Merge remote-tracking branch 'origin/branch20241月中旬'

This commit is contained in:
lijiarao
2024-01-17 17:40:10 +08:00
64 changed files with 5949 additions and 108 deletions
+160
View File
@@ -0,0 +1,160 @@
-- 新增 pay_drafting_group表(起草组表)
CREATE TABLE `pay_drafting_group` (
`id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
`drafting_group_project` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '起草组项目',
`working_group_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工作组id',
`year` int NULL DEFAULT NULL COMMENT '运行年份',
`principal_id_a` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责人Aid',
`principal_name_a` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责人名称A',
`principal_id_b` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责人Bid',
`principal_name_b` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责人名称B',
`convoke_num` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '每年召开次数',
`operation_cycle` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '运行周期',
`mission_and_objectives` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '任务及目标',
`remarks` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '起草组表' ROW_FORMAT = Dynamic;
-- 新增 pay_drafting_group_subitem表 (起草组成员表)
CREATE TABLE `pay_drafting_group_subitem` (
`id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '主键',
`drafting_group_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '起草组id',
`charge_company_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '成员单位id',
`charge_company_temporary_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '临时成员单位id',
`charge_company_temporary_name` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '临时成员单临时成员单位(未审核状态下会多出5位,因此修改成55长度)',
`contacts_id_one` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '企业联系人一id',
`contacts_temporary_id_one` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '临时企业联系人一id',
`contacts_temporary_name_one` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '临时企业联系人一名称',
`remarks_one` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人备注1',
`check_result` int NULL DEFAULT NULL COMMENT '审核状态 1-未审核 2-已通过 3-已驳回',
`check_remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '审核说明',
`contacts_id_two` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '企业联系人二id',
`contacts_temporary_id_two` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '临时企业联系人二id',
`contacts_temporary_name_two` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '临时企业联系人二名称',
`remarks_two` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人备注2',
`contacts_id_three` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '企业联系人三id',
`contacts_temporary_id_three` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '临时企业联系人三id',
`contacts_temporary_name_three` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '临时企业联系人三名称',
`remarks_three` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人备注3',
`remarks` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `working_drafting_id_and_company_id_index`(`drafting_group_id`, `charge_company_id`) USING BTREE COMMENT '工作组与企业唯一',
INDEX `working_drafting_company_index`(`charge_company_temporary_name`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '起草组成员表' ROW_FORMAT = Dynamic;
-- 新增 pay_drafting_group_subitem_contacts表(起草组成员-企业联系人表)
CREATE TABLE `pay_drafting_group_subitem_contacts` (
`id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`drafting_group_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '起草组id',
`drafting_group_sub_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '起草组成员id',
`contacts_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '企业联系人id',
`contacts_temporary_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '临时企业联系人id',
`contacts_temporary_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '临时企业联系人名称',
`remarks` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人备注',
`order_num` int NULL DEFAULT NULL COMMENT '序号',
`create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_wg_working_group_id`(`drafting_group_id`) USING BTREE,
INDEX `idx_wg_working_group_sub_id`(`drafting_group_sub_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '起草组成员-企业联系人表' ROW_FORMAT = Dynamic;
-- 新增 pay_drafting_group_research_project表(起草组-在研项目表)
CREATE TABLE `pay_drafting_group_research_project` (
`id` varchar(32) CHARACTER SET utf16 COLLATE utf16_general_ci NOT NULL COMMENT '主键',
`drafting_group_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '起草组id',
`project_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目名称',
`draft_company` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主要起草单位',
`files` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '过程文件',
`project_schedule` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目进度',
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `committee_name_index`(`project_name`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '起草组-在研项目表' ROW_FORMAT = Dynamic;
-- 新增 pay_drafting_group_research_project_file表(起草组-在研项目-资料文件表)
CREATE TABLE `pay_drafting_group_research_project_file` (
`id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
`project_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目id',
`file_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件id',
`create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '起草组-在研项目-资料文件表' ROW_FORMAT = Dynamic;
-- pay_meeting表 新增 drafting_group_id(起草组id),drafting_group_name(起草组名称)字段
ALTER TABLE `pay_meeting` ADD COLUMN `drafting_group_id` varchar(50) COMMENT '起草组id';
ALTER TABLE `pay_meeting` ADD COLUMN `drafting_group_name` varchar(50) COMMENT '起草组名称';
-- sys_permission表 新增起草组相关菜单
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744975224801075202', '1736675369997905922', '审核', '', NULL, NULL, NULL, 2, 'draftingGroupMember:check', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-10 14:51:28', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744650871911792641', '1742070808427126785', '上传会议纪要', NULL, NULL, NULL, NULL, 2, 'draftGroupMeeting:uploadCouncil', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 17:22:37', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744650747009613826', '1742070808427126785', '删除', '', NULL, NULL, NULL, 2, 'draftGroupMeeting:delete', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 17:22:07', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744650680030773249', '1742070808427126785', '编辑', '', NULL, NULL, NULL, 2, 'draftGroupMeeting:edit', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 17:21:51', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744650603614748673', '1742070808427126785', '上传文件', '', NULL, NULL, NULL, 2, 'draftGroupMeeting:upload', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 17:21:33', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744650486782410753', '1742070808427126785', '发布', NULL, NULL, NULL, NULL, 2, 'draftGroupMeeting:publish', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 17:21:05', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744650398005772289', '1742070808427126785', '批量删除', '', NULL, NULL, NULL, 2, 'draftGroupMeeting:batchDel', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 17:20:44', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744650314702700546', '1742070808427126785', '导出', '', NULL, NULL, NULL, 2, 'draftGroupMeeting:export', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 17:20:24', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744650199401283585', '1742070808427126785', '新增', '', NULL, NULL, NULL, 2, 'draftGroupMeeting:add', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 17:19:56', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744650007667064833', '1742070808427126785', '查询', NULL, NULL, NULL, NULL, 2, 'draftGroupMeeting:search', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 17:19:11', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744618617370066946', '1744610339198091266', '资料状态(嘉宾是否可以在企业端上传)', NULL, NULL, NULL, NULL, 2, 'draftGroupMeetingSituation:guestsUploadFileFlag', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 15:14:26', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744618038157656066', '1744610339198091266', '审核凭证', NULL, NULL, NULL, NULL, 2, 'draftGroupMeetingSituation:auditSignUp', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 15:12:08', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744617928828928002', '1744610339198091266', '审核报名信息', NULL, NULL, NULL, NULL, 2, 'draftGroupMeetingSituation:auditCredentials', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 15:11:42', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744617734913671170', '1744610339198091266', '删除', '', NULL, NULL, NULL, 2, 'draftGroupMeetingSituation:delete', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 15:10:56', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744617671705509890', '1744610339198091266', '编辑', '', NULL, NULL, NULL, 2, 'draftGroupMeetingSituation:edit', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 15:10:41', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744617607901757441', '1744610339198091266', '批量删除', NULL, NULL, NULL, NULL, 2, 'draftGroupMeetingSituation:batchDel', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 15:10:26', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744617378741764097', '1744610339198091266', '导出', NULL, NULL, NULL, NULL, 2, 'draftGroupMeetingSituation:export', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 15:09:31', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744617286152503297', '1744610339198091266', '添加参会人', NULL, NULL, NULL, NULL, 2, 'draftGroupMeetingSituation:add', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 15:09:09', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744617202534858754', '1744610339198091266', '查询', '', NULL, NULL, NULL, 2, 'draftGroupMeetingSituation:search', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 15:08:49', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744610339198091266', '1430376424950026242', '起草组参会情况', '/incomePayments/meetManage/AttendanceDraftGroupMeeting', 'incomePayments/meetManage/Attendance', NULL, NULL, 1, NULL, '1', 22.00, 0, NULL, 1, 0, 0, 1, NULL, 'LKGLZ', '2024-01-09 14:41:33', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744557748690894850', '1742065161262358530', '删除', '', NULL, NULL, NULL, 2, 'draftingGroup:underStudy:delete', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 11:12:34', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744557677312229378', '1742065161262358530', '编辑', '', NULL, NULL, NULL, 2, 'draftingGroup:underStudy:edit', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 11:12:17', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744557618365480962', '1742065161262358530', '批量删除', '', NULL, NULL, NULL, 2, 'draftingGroup:underStudy:batchDel', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 11:12:03', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744557548442238978', '1742065161262358530', '新增', '', NULL, NULL, NULL, 2, 'draftingGroup:underStudy:add', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 11:11:47', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744557479416578050', '1742065161262358530', '查询', '', NULL, NULL, NULL, 2, 'draftingGroup:underStudy:search', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 11:11:30', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744556066435252226', '1736675369997905922', '新增', '', NULL, NULL, NULL, 2, 'draftingGroupMember:add', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 11:05:53', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744553118539988993', '1736675369997905922', '编辑', '', NULL, NULL, NULL, 2, 'draftingGroupMember:edit', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 10:54:10', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744552595946487809', '1736675369997905922', '删除', '', NULL, NULL, NULL, 2, 'draftingGroupMember:delete', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 10:52:06', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744552520780365825', '1736675369997905922', '批量删除', '', NULL, NULL, NULL, 2, 'draftingGroupMember:batchDel', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 10:51:48', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744552416749043714', '1736675369997905922', '下载模板', '', NULL, NULL, NULL, 2, 'draftingGroupMember:downTemplate', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 10:51:23', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744552350437097473', '1736675369997905922', '导出', '', NULL, NULL, NULL, 2, 'draftingGroupMember:export', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 10:51:07', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744552151597727745', '1736675369997905922', '导入', '', NULL, NULL, NULL, 2, 'draftingGroupMember:import', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 10:50:20', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744551907694755841', '1736675369997905922', '查询', '', NULL, NULL, NULL, 2, 'draftingGroupMember:search', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 10:49:22', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744550770337923073', '1736668960149286914', '在研项目', '', NULL, NULL, NULL, 2, 'draftingGroup:underStudyProject', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 10:44:50', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744550626938863617', '1736668960149286914', '删除', NULL, NULL, NULL, NULL, 2, 'draftingGroup:delete', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 10:44:16', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744550489080479745', '1736668960149286914', '基本信息维护', '', NULL, NULL, NULL, 2, 'draftingGroup:edit', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 10:43:43', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744550409195765762', '1736668960149286914', '复制', '', NULL, NULL, NULL, 2, 'draftingGroup:copy', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 10:43:24', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744550212579377153', '1736668960149286914', '起草组会议', '', NULL, NULL, NULL, 2, 'draftingGroup:meetingMaintenance', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 10:42:38', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744550123177787393', '1736668960149286914', '其他分发资料', '', NULL, NULL, NULL, 2, 'draftingGroup:fileMaintenance', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 10:42:16', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744549961910992898', '1736668960149286914', '批量删除', '', NULL, NULL, NULL, 2, 'draftingGroup:batchDel', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 10:41:38', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744549877257355266', '1736668960149286914', '新增', '', NULL, NULL, NULL, 2, 'draftingGroup:add', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 10:41:18', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1744549760974471169', '1736668960149286914', '查询', '', NULL, NULL, NULL, 2, 'draftingGroup:search', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-01-09 10:40:50', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1736675369997905922', '1430376424950026242', '起草组成员维护', '/draftingGroup/DraftingGroupMemberUnitMaintenance', 'draftingGroup/DraftingGroupMemberUnitMaintenance', NULL, NULL, 1, NULL, '1', 20.00, 0, NULL, 1, 0, 0, 0, NULL, 'LKGLZ', '2023-12-18 17:10:49', NULL, NULL, 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1736668960149286914', '', '起草组管理', '/draftingGroup/DraftingGroupManagement', 'draftingGroup/DraftingGroupManagement', NULL, NULL, 0, NULL, '1', 3.10, 0, 'cus_working', 1, 0, 0, 0, NULL, 'LKGLZ', '2023-12-18 16:45:20', 'LKGLZ', '2024-01-09 15:20:33', 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1742065161262358530', '1430376424950026242', '起草组在研项目', '/draftingGroup/DraftingGroupUnderStudyProject', 'draftingGroup/DraftingGroupUnderStudyProject', NULL, NULL, 1, NULL, '1', 21.00, 0, NULL, 1, 0, 0, 1, NULL, 'LKGLZ', '2024-01-02 14:07:55', 'LKGLZ', '2024-01-02 14:08:09', 0, 0, '1', 0, 1);
INSERT INTO `income_payments`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1742070808427126785', '1430376424950026242', '起草组会议维护', '/draftingGroup/ConferenceMaintenance', 'draftingGroup/ConferenceMaintenance', NULL, NULL, 1, NULL, '1', 22.00, 0, NULL, 1, 0, 0, 1, NULL, 'LKGLZ', '2024-01-02 14:30:21', 'LKGLZ', '2024-01-02 14:30:32', 0, 0, '1', 0, 1);
-- sys_dict_item表 新增 起草组会议类型
INSERT INTO `income_payments`.`sys_dict_item`(`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1477781428149047297', '1432280766382727169', '起草组会议', '7', '起草组会议', 7.00, 1, 'LKGLZ', '2024-01-05 14:56:54', NULL, NULL);
ALTER TABLE `pay_meeting`
MODIFY COLUMN `remark` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注' AFTER `hotel_address`;
@@ -201,6 +201,11 @@ public class ShiroConfig {
// 快递100-快递信息
filterChainDefinitionMap.put("/mail/postInfo/queryInfo","anon");
// 起草组报名-按照id查询
filterChainDefinitionMap.put("/drafting/payDraftingGroup/applyQueryById","anon");
// 起草组报名-提交信息
filterChainDefinitionMap.put("/drafting/payDraftingGroupSubitem/addByQRCode","anon");
// 添加自己的过滤器并且取名为jwt
Map<String, Filter> filterMap = new HashMap<String, Filter>(1);
//如果cloudServer为空 则说明是单体 需要加载跨域配置
@@ -37,6 +37,10 @@ public class ProjectCommon {
* 项目类型(1:普通项目,2:工作组项目,3:会议项目,4:会员项目,5:标协会员项目,6:证书)
*/
public final static String PROJECT_TYPE6 = "6";
/**
* 项目类型(1:普通项目,2:工作组项目,3:会议项目,4:会员项目,5:标协会员项目,6:证书,7: 起草组项目)
*/
public final static String PROJECT_TYPE7 = "7";
/**
* 来源(1:收入合同,2:打包管理)
*/
@@ -204,4 +208,6 @@ public class ProjectCommon {
* 条件 0为发送创建通知,1为发送缴费通知
*/
public final static String FLAG1 = "1";
public final static String INFO_TYPE9 = "9";
}
@@ -75,6 +75,52 @@
AND tmps.id = #{projectId}
</if>
</where>
UNION ALL
SELECT
gsub.id,
g.drafting_group_project,
'',
g.principal_id_a,
su.realname,
gsub.contacts_temporary_id_one,
gsub.contacts_temporary_name_one,
gsub.charge_company_temporary_name,
'',
'',
'',
'',
'',
'',
'',
gsub.create_time,
7,
'',
'',
gsub.remarks,
'',
gsub.charge_company_temporary_id,
'',
'',
'',
'',
g.year,
'',
g.mission_and_objectives,
'',
'',
'',
''
FROM
pay_drafting_group g
LEFT JOIN
sys_user su ON g.principal_id_a = su.id
INNER JOIN
pay_drafting_group_subitem gsub ON g.id = gsub.drafting_group_id
<where>
<if test="projectId != null and projectId != ''">
AND gsub.id = #{projectId}
</if>
</where>
</select>
<select id="queryProjectList" resultType="com.jero.project.entity.PayCommonProject">
<!-- 普通项目-->
@@ -21,6 +21,10 @@ import com.jero.contract.entity.PayIncomeContract;
import com.jero.contract.entity.PayIncomeContractAssociated;
import com.jero.contract.service.IPayIncomeContractAssociatedService;
import com.jero.contract.service.IPayIncomeContractService;
import com.jero.drafting.entity.PayDraftingGroupSubItem;
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
import com.jero.drafting.service.IPayDraftingGroupSubItemContactsService;
import com.jero.drafting.service.IPayDraftingGroupSubItemService;
import com.jero.mail.entity.PayMailBill;
import com.jero.mail.entity.PayMailBillProject;
import com.jero.mail.service.IPayMailBillProjectService;
@@ -86,6 +90,10 @@ public class ProjectDetailServiceImpl implements ProjectDetailService {
private IPayWorkingGroupSubItemService payWorkingGroupSubItemService;
@Resource
private IPayWorkingGroupSubItemContactsService payWorkingGroupSubItemContactsService;
@Resource
private IPayDraftingGroupSubItemService payDraftingGroupSubItemService;
@Resource
private IPayDraftingGroupSubItemContactsService payDraftingGroupSubItemContactsService;
@Override
public ProjectDetailVO getProjectDetail(String projectId) {
@@ -129,6 +137,26 @@ public class ProjectDetailServiceImpl implements ProjectDetailService {
payCommonProject.setFiles(sb.toString());
}
}
// 起草组项目资料
if(Objects.equals(String.valueOf(payCommonProject.getProjectType()), ProjectCommon.PROJECT_TYPE7)){
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
LambdaQueryWrapper<PayWorkingGroupDistributionRecord> queryPayWorkingGroupDistributionRecord = new LambdaQueryWrapper<>();
queryPayWorkingGroupDistributionRecord.eq(PayWorkingGroupDistributionRecord::getSubId,projectId);
queryPayWorkingGroupDistributionRecord.eq(PayWorkingGroupDistributionRecord::getContactsId,sysUser.getId());
List<PayWorkingGroupDistributionRecord> listPayWorkingGroupDistributionRecord = payWorkingGroupDistributionRecordService.list(queryPayWorkingGroupDistributionRecord);
if(!CollectionUtils.isEmpty(listPayWorkingGroupDistributionRecord)){
StringBuilder sb = new StringBuilder();
listPayWorkingGroupDistributionRecord.forEach(p->{
sb.append(p.getFileId());
if(listPayWorkingGroupDistributionRecord.indexOf(p) != (listPayWorkingGroupDistributionRecord.size() - 1)){
sb.append(",");
}
});
payCommonProject.setFiles(sb.toString());
}
}
ProjectDetailVO projectDetailVO = new ProjectDetailVO();
LoginUser user = sysBaseAPI.getUserById(payCommonProject.getPrincipalId());
projectDetailVO.setPrincipalName(user.getRealname());
@@ -274,6 +302,43 @@ public class ProjectDetailServiceImpl implements ProjectDetailService {
projectDetailVO.setPayWorkingGroupSubItemContactsList(listPayWorkingGroupSubItemContacts);
}
}
}else if(Objects.equals(String.valueOf(payCommonProject.getProjectType()), ProjectCommon.PROJECT_TYPE7)) {
PayDraftingGroupSubItem payDraftingGroupSubItem = payDraftingGroupSubItemService.getById(projectId);
if(Objects.isNull(payDraftingGroupSubItem)){
throw new JeroBootException("项目不存在!");
}
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> queryPayDraftingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayDraftingGroupSubItemContacts.in(PayDraftingGroupSubItemContacts::getDraftingGroupSubId,projectId);
queryPayDraftingGroupSubItemContacts.orderByAsc(PayDraftingGroupSubItemContacts::getOrderNum);
List<PayDraftingGroupSubItemContacts> listPayDraftingGroupSubItemContacts = payDraftingGroupSubItemContactsService.list(queryPayDraftingGroupSubItemContacts);
if(!CollectionUtils.isEmpty(listPayDraftingGroupSubItemContacts)){
List<String> listIds = listPayDraftingGroupSubItemContacts.stream().map(PayDraftingGroupSubItemContacts::getContactsTemporaryId).collect(Collectors.toList());
List<PayContactsManagementTemporary> payContactsManagementTemporaryList = payContactsManagementTemporaryService.listByIds(listIds);
if(!CollectionUtils.isEmpty(payContactsManagementTemporaryList)){
listPayDraftingGroupSubItemContacts.forEach(p->{
List<PayContactsManagementTemporary> listNew = payContactsManagementTemporaryList.stream().filter(o->Objects.equals(o.getId(),p.getContactsTemporaryId())).collect(Collectors.toList());
if(CollectionUtils.isEmpty(listNew)){
return;
}
PayContactsManagementTemporary payContactsManagementTemporary = listNew.get(0);
p.setGender(payContactsManagementTemporary.getGender());
if(!Objects.isNull(payContactsManagementTemporary.getGender())){
p.setGender_dictText(sysBaseAPI.translateDict("sex",String.valueOf(payContactsManagementTemporary.getGender())));
}
p.setPost(payContactsManagementTemporary.getPost());
if(!StringUtils.isBlank(payContactsManagementTemporary.getPhone())){
p.setPhone(PasswordUtil.decrypt(payContactsManagementTemporary.getPhone()));
}
if(!StringUtils.isBlank(payContactsManagementTemporary.getEmail())){
p.setEmail(PasswordUtil.decrypt(payContactsManagementTemporary.getEmail()));
}
p.setPostalCodeContacts(payContactsManagementTemporary.getPostalCode());
p.setContactAddress(payContactsManagementTemporary.getContactAddress());
});
List<PayWorkingGroupSubItemContacts> payWorkingGroupSubItemContactsList = JSON.parseArray(JSONArray.toJSONString(listPayDraftingGroupSubItemContacts), PayWorkingGroupSubItemContacts.class);
projectDetailVO.setPayWorkingGroupSubItemContactsList(payWorkingGroupSubItemContactsList);
}
}
}else {
PayContactsManagementTemporary payContactsManagementTemporary = payContactsManagementTemporaryService.getById(payCommonProject.getContactsTemporaryId());
if(Objects.isNull(payContactsManagementTemporary)){
@@ -1,6 +1,5 @@
package com.jero.common.service.impl;
import cn.hutool.core.thread.ThreadUtil;
import com.alibaba.fastjson.JSONObject;
import com.jero.common.common.ProjectCommon;
import com.jero.common.constant.CommonConstant;
@@ -32,10 +31,8 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.*;
import java.util.concurrent.ExecutorService;
@Slf4j
@Service
@@ -121,18 +118,18 @@ public class SendMessageServiceImpl implements SendMessageService {
}
email = PasswordUtil.decrypt(email);
emailPassword = PasswordUtil.decrypt(emailPassword);
//EmailSendMsgHandle emailHandle = new EmailSendMsgHandle(email,emailPassword);
//// 发送带附件邮箱
//if(!CollectionUtils.isEmpty(sendMessageDTO.getListFile())){
// emailHandle.SendMsgAndFile(sendMessageDTO.getEmail(), title, content,sendMessageDTO.getListFile());
//}else{
// //如果有通知内容就替换
// if (StringUtils.isNotBlank(sendMessageDTO.getMeetingNotice())){
// emailHandle.SendMsg(sendMessageDTO.getEmail(), title, sendMessageDTO.getMeetingNotice());
// }else {
// emailHandle.SendMsg(sendMessageDTO.getEmail(), title, content);
// }
//}
EmailSendMsgHandle emailHandle = new EmailSendMsgHandle(email,emailPassword);
// 发送带附件邮箱emailPassword = "wflwijcpdmwvcihc"
if(!CollectionUtils.isEmpty(sendMessageDTO.getListFile())){
emailHandle.SendMsgAndFile(sendMessageDTO.getEmail(), title, content,sendMessageDTO.getListFile());
}else{
//如果有通知内容就替换
if (StringUtils.isNotBlank(sendMessageDTO.getMeetingNotice())){
emailHandle.SendMsg(sendMessageDTO.getEmail(), title, sendMessageDTO.getMeetingNotice());
}else {
emailHandle.SendMsg(sendMessageDTO.getEmail(), title, content);
}
}
}catch (Exception e){
log.error("发送邮件异常",e);
if (e.getMessage() !=null){
@@ -2,6 +2,7 @@ package com.jero.common.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jero.common.aspect.annotation.Dict;
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
import com.jero.payment.entity.PayPaymentRecord;
import com.jero.project.entity.PayWorkingGroupSubItemContacts;
import io.swagger.annotations.ApiModelProperty;
@@ -285,4 +286,8 @@ public class ProjectDetailVO implements Serializable {
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal noTaxAmount;
/**起草组成员联系人**/
@ApiModelProperty(value = "起草组成员联系人")
private List<PayDraftingGroupSubItemContacts> payDraftingGroupSubItemContactsLists;
}
@@ -15,6 +15,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.exception.JeroBootException;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.oConvertUtils;
@@ -23,11 +24,15 @@ import com.jero.data.entity.DTO.PayCaseCommitteeDTO;
import com.jero.data.entity.DTO.PayCaseCommitteeUpdateDTO;
import com.jero.data.service.IPayCaseCommitteeService;
import com.jero.data.service.IPayCaseCommitteeSubitemService;
import com.jero.meeting.common.MeetingCommon;
import com.jero.meeting.entity.PayMeeting;
import com.jero.meeting.service.IPayMeetingService;
import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.service.ISysUserService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
@@ -60,8 +65,8 @@ public class PayCaseCommitteeController extends JeroController<PayCaseCommittee,
@Resource
private IOSSFileService iossFileService;
@Autowired
private IPayCaseCommitteeService payCaseCommitteeService;
@Autowired
private IPayCaseCommitteeService payCaseCommitteeService;
@Autowired
private IPayCaseCommitteeSubitemService payCaseCommitteeSubitemService;
@@ -69,6 +74,9 @@ public class PayCaseCommitteeController extends JeroController<PayCaseCommittee,
@Resource
private ISysUserService sysUserService;
@Resource
private IPayMeetingService payMeetingService;
/**
* 分标委表-企业端分页列表查询
*
@@ -249,9 +257,16 @@ public class PayCaseCommitteeController extends JeroController<PayCaseCommittee,
List<PayCaseCommitteeSubitem> payCaseCommitteeSubitems = payCaseCommitteeSubitemService.selectList(queryWrapper);
if(payCaseCommitteeSubitems.size()>0){
return Result.error("分标委下级仍有数据,不可删除!");
}payCaseCommitteeService.removeById(id);
}
// 判断分标委下是否存在会议
LambdaQueryWrapper<PayMeeting> meetingQuery = new LambdaQueryWrapper<>();
meetingQuery.eq(PayMeeting::getCaseCommitteeId,id);
meetingQuery.eq(PayMeeting::getMeetingType, MeetingCommon.COMMITTEE_MEETING_INT);
List<PayMeeting> listPayMeeting = payMeetingService.list(meetingQuery);
if (!CollectionUtils.isEmpty(listPayMeeting)) {
throw new JeroBootException("分标委下存在会议,不可进行删除!");
}
payCaseCommitteeService.removeById(id);
return Result.OK("删除成功!");
}
}
@@ -0,0 +1,14 @@
package com.jero.drafting.common;
public interface DraftingConstant {
/**审核状态 1:待审核 2:已通过 3:未通过*/
Integer CHECK_PENDING = 1;
/**审核状态 1:待审核 2:已通过 3:未通过*/
Integer CHECK_PASS = 2;
/**审核状态 1:待审核 2:已通过 3:未通过*/
Integer CHECK_REJECTION = 3;
}
@@ -0,0 +1,329 @@
package com.jero.drafting.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.service.RolePermissionService;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.ValidUtil;
import com.jero.common.util.oConvertUtils;
import com.jero.drafting.entity.PayDraftingGroup;
import com.jero.drafting.service.IPayDraftingGroupService;
import com.jero.drafting.vo.PayDraftingGroupVo;
import com.jero.project.common.PayProjectCommon;
import com.jero.project.entity.PayWorkingGroup;
import com.jero.project.service.IPayWorkingGroupService;
import com.jero.util.QrcodeUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;
/**
* <p>
* 起草组表 前端控制器
* </p>
*
* @author sz
* @since 2024-01-02
*/
@Api(tags = "起草组项目")
@RestController
@RequestMapping("/drafting/payDraftingGroup")
@Slf4j
public class PayDraftingGroupController extends JeroController<PayDraftingGroup, IPayDraftingGroupService> {
@Resource
private IPayDraftingGroupService payDraftingGroupService;
@Resource
private RolePermissionService rolePermissionService;
@Resource
private IPayWorkingGroupService payWorkingGroupService;
/**
* 分页列表查询
*
* @param payDraftingGroup 起草组项目
* @param pageNo 页数
* @param pageSize 条数
*/
@RequiresPermissions("draftingGroup:search")
@ApiOperation(value="起草组项目-分页列表查询", notes="起草组项目-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(PayDraftingGroup payDraftingGroup,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
// 校验参数
if(!StringUtils.isBlank(payDraftingGroup.getDraftingGroupProject()) && payDraftingGroup.getDraftingGroupProject().length() > 50){
return Result.error("起草组项目长度不能大于50个字符");
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if(!rolePermissionService.getRolePermission("draftingGroup:search")){
payDraftingGroup.setPrincipalA(sysUser.getId());
payDraftingGroup.setPrincipalB(sysUser.getId());
}
// 分页条件查询
Page<PayDraftingGroupVo> page = new Page<>(pageNo, pageSize);
if(!StringUtils.isBlank(payDraftingGroup.getDraftingGroupProject())){
payDraftingGroup.setDraftingGroupProject(oConvertUtils.replaceAllPercent(payDraftingGroup.getDraftingGroupProject()));
}
if(!StringUtils.isBlank(payDraftingGroup.getWorkingGroupName())){
payDraftingGroup.setWorkingGroupName(oConvertUtils.replaceAllPercent(payDraftingGroup.getWorkingGroupName()));
}
IPage<PayDraftingGroupVo> pageList = payDraftingGroupService.queryPageList(page,payDraftingGroup);
if (!Objects.isNull(pageList)) {
List<PayDraftingGroupVo> listPayDraftingGroupVo = pageList.getRecords();
if (!CollectionUtils.isEmpty(listPayDraftingGroupVo)) {
listPayDraftingGroupVo.forEach(p->{
if(!rolePermissionService.getRolePermission("generalProject:search") && Objects.equals(p.getPrincipalIdB(),sysUser.getId())){
p.setCheckoutOperation(PayProjectCommon.CHECKOUT_OPERATION2);
}else{
p.setCheckoutOperation(PayProjectCommon.CHECKOUT_OPERATION1);
}
});
pageList.setRecords(listPayDraftingGroupVo);
}
}
return Result.OK(pageList);
}
/**
* 添加
*
* @param payDraftingGroup 起草组项目
* @return
*/
@AutoLog(value = "起草组项目-添加",operateType = 1)
@RequiresPermissions("draftingGroup:add")
@ApiOperation(value="起草组项目-添加", notes="起草组项目-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody PayDraftingGroup payDraftingGroup) {
// 参数校验
StringBuilder msg = ValidUtil.validateAll(payDraftingGroup);
if(!StringUtils.isBlank(msg)){
return Result.error(msg.toString());
}
try {
LambdaQueryWrapper<PayDraftingGroup> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PayDraftingGroup::getDraftingGroupProject,payDraftingGroup.getDraftingGroupProject());
PayDraftingGroup payDraftingGroupDB = payDraftingGroupService.getOne(queryWrapper);
if(!Objects.isNull(payDraftingGroupDB)) {
return Result.error("起草组项目已存在!");
}
}catch (Exception e){
log.info("起草组项目-添加",e);
return Result.error("起草组项目已存在!");
}
payDraftingGroupService.setPayDraftingGroup(payDraftingGroup);
payDraftingGroupService.save(payDraftingGroup);
return Result.OK("添加成功!");
}
/**
* 通过id删除
*
* @param id 工作组项目id
* @return
*/
@AutoLog(value = "起草组项目-通过id删除",operateType = 2)
@RequiresPermissions("draftingGroup:delete")
@ApiOperation(value="起草组项目-通过id删除", notes="起草组项目-通过id删除")
@GetMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id") String id) {
if(StringUtils.isBlank(id)){
return Result.error("id不能为空!");
}
payDraftingGroupService.deleteById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids 起草组项目ids 逗号分隔
* @return
*/
@RequiresPermissions("draftingGroup:batchDel")
@ApiOperation(value="起草组项目-批量删除", notes="起草组项目-批量删除")
@GetMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids") String ids) {
if(StringUtils.isBlank(ids)){
return Result.error("id不能为空!");
}
String[] s = ids.split(",");
for (String s1 : s) {
if(StringUtils.isBlank(s1)){
return Result.error("id不能为空!");
}
}
payDraftingGroupService.deleteByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 复制
*
* @param payDraftingGroup 起草组项目
* @return
*/
@AutoLog(value = "起草组项目-复制",operateType = 3)
@RequiresPermissions("draftingGroup:copy")
@ApiOperation(value="起草组项目-复制", notes="起草组项目-复制")
@PostMapping(value = "/copy")
public Result<?> copy(@RequestBody PayDraftingGroup payDraftingGroup) {
if(StringUtils.isBlank(payDraftingGroup.getId())){
return Result.error("起草组id不能为空!");
}
PayDraftingGroup payDraftingGroupOld = payDraftingGroupService.getById(payDraftingGroup.getId());
if(Objects.isNull(payDraftingGroupOld)){
return Result.error("起草组不存在!");
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if(!rolePermissionService.getRolePermission("draftingGroup:copy") && !Objects.equals(payDraftingGroupOld.getPrincipalIdA(),sysUser.getId())){
return Result.error(payDraftingGroupOld.getDraftingGroupProject() + "数据权限不足!");
}
payDraftingGroupService.copy(payDraftingGroup);
return Result.OK("复制成功!");
}
/**
* 通过id查询
*
* @param id 起草组项目id
* @return
*/
@ApiOperation(value="起草组项目-通过id查询", notes="起草组项目-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id") String id) {
if (StringUtils.isBlank(id)) {
return Result.error("起草组id不能为空");
}
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(id);
if(Objects.isNull(payDraftingGroup)) {
return Result.error("未找到对应数据");
}
// 根据工作组id查询对应的工作组名称
if (StringUtils.isNotBlank(payDraftingGroup.getWorkingGroupId())) {
PayWorkingGroup payWorkingGroup = payDraftingGroupService.getPayWorkingGroupNameById(payDraftingGroup.getWorkingGroupId());
if (!Objects.isNull(payWorkingGroup)) {
payDraftingGroup.setWorkingGroupName(payWorkingGroup.getWorkingGroupProject());
}
}
return Result.OK(payDraftingGroup);
}
/**
* 查询所有工作组
* @return
*/
@ApiOperation(value="工作组项目-查询所有工作组", notes="工作组项目-查询所有工作组")
@GetMapping(value = "/queryAllWorkingGroupsIdAndName")
public Result<?> queryAllWorkingGroupsIdAndName() {
QueryWrapper<PayWorkingGroup> queryWrapper = new QueryWrapper<>();
queryWrapper.select("id","working_group_project");
queryWrapper.lambda().groupBy(PayWorkingGroup::getWorkingGroupProject);
List<PayWorkingGroup> payWorkingGroups = payWorkingGroupService.list(queryWrapper);
List<HashMap<String, String>> mapList = payWorkingGroups.stream().map(p -> {
HashMap<String, String> map = new HashMap<>();
map.put("id", p.getId());
map.put("workingGroupProject", p.getWorkingGroupProject());
return map;
}).collect(Collectors.toList());
return Result.OK(mapList);
}
/**
* 编辑
*
* @param payDraftingGroup 起草组项目
* @return
*/
@AutoLog(value = "起草组项目-修改",operateType = 3)
@RequiresPermissions("draftingGroup:edit")
@ApiOperation(value="起草组项目-编辑", notes="起草组项目-编辑")
@PostMapping(value = "/edit")
public Result<?> edit(@RequestBody PayDraftingGroup payDraftingGroup) {
StringBuilder msg = ValidUtil.validateAll(payDraftingGroup);
if(!StringUtils.isBlank(msg)){
return Result.error(msg.toString());
}
if(StringUtils.isEmpty(payDraftingGroup.getId())){
return Result.error("起草组id不能为空!");
}
PayDraftingGroup payDraftingGroupOld = payDraftingGroupService.getById(payDraftingGroup.getId());
if(Objects.isNull(payDraftingGroupOld)){
return Result.error("起草组不存在!");
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if(!rolePermissionService.getRolePermission("draftingGroup:edit") && !Objects.equals(payDraftingGroupOld.getPrincipalIdA(),sysUser.getId())){
return Result.error(payDraftingGroupOld.getDraftingGroupProject() + "数据权限不足!");
}
try {
// 编辑保存前再次校验来款项目是否存在
LambdaQueryWrapper<PayDraftingGroup> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PayDraftingGroup::getDraftingGroupProject,payDraftingGroup.getDraftingGroupProject());
PayDraftingGroup payDraftingGroupNew = payDraftingGroupService.getOne(queryWrapper);
// 来款项目存在,并且编辑id与查询不同,则校验不通过
if(!Objects.isNull(payDraftingGroupNew) && !Objects.equals(payDraftingGroupNew.getId(),payDraftingGroup.getId())) {
return Result.error("起草组项目已存在!");
}
}catch (Exception e){
log.info("工作组项目-编辑异常",e);
return Result.error("起草组项目已存在!");
}
payDraftingGroupService.setPayDraftingGroup(payDraftingGroup);
payDraftingGroupService.updateById(payDraftingGroup);
return Result.OK("编辑成功!");
}
@ApiOperation(value = "生成base64")
@GetMapping(value = "/createBase64")
@ApiImplicitParam(name = "contact", value = "内容", required = true, paramType = "query")
public Result<String> createBase64(String contact) {
return Result.OK(QrcodeUtil.create(contact));
}
/**
* 报名-起草组项目报名-通过id查询
*
* @param id 起草组项目id
* @return
*/
@ApiOperation(value="报名-起草组项目-通过id查询", notes="报名-起草组项目-通过id查询")
@GetMapping(value = "/applyQueryById")
public Result<?> applyQueryById(@RequestParam(name="id") String id) {
if (StringUtils.isBlank(id)) {
return Result.error("起草组id不能为空");
}
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(id);
if(Objects.isNull(payDraftingGroup)) {
return Result.error("未找到对应数据");
}
// 根据工作组id查询对应的工作组名称
if (StringUtils.isNotBlank(payDraftingGroup.getWorkingGroupId())) {
PayWorkingGroup payWorkingGroup = payDraftingGroupService.getPayWorkingGroupNameById(payDraftingGroup.getWorkingGroupId());
if (!Objects.isNull(payWorkingGroup)) {
payDraftingGroup.setWorkingGroupName(payWorkingGroup.getWorkingGroupProject());
}
}
return Result.OK(payDraftingGroup);
}
}
@@ -0,0 +1,251 @@
package com.jero.drafting.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.exception.JeroBootException;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.util.ValidUtil;
import com.jero.drafting.entity.PayDraftingGroupResearchProject;
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
import com.jero.drafting.service.IPayDraftingGroupResearchProjectService;
import com.jero.drafting.service.IPayDraftingGroupService;
import com.jero.drafting.service.IPayDraftingGroupSubItemContactsService;
import com.jero.modules.oss.service.IOSSFileService;
import com.jero.project.entity.PayResearchProject;
import com.jero.project.service.IPayResearchProjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
/**
* <p>
* 起草组 在研项目表 前端控制器
* </p>
*
* @author sz
* @since 2024-01-05
*/
@Api(tags="起草组 在研项目")
@RestController
@RequestMapping("/drafting/payDraftingGroupResearchProject")
@Slf4j
public class PayDraftingGroupResearchProjectController extends JeroController<PayDraftingGroupResearchProject, IPayDraftingGroupResearchProjectService> {
@Autowired
private IPayDraftingGroupResearchProjectService payDraftingGroupResearchProjectService;
@Autowired
private IOSSFileService iossFileService;
/**
* 分页列表查询
*
* @param payResearchProject
* @param pageNo
* @param pageSize
* @param
* @return
*/
@AutoLog(value = "起草组-在研项目-分页列表查询")
@ApiOperation(value="起草组-在研项目-分页列表查询", notes="起草组-在研项目-分页列表查询")
@GetMapping(value = "/list")
@RequiresPermissions("draftingGroup:underStudy:search")
public Result<?> queryPageList(PayDraftingGroupResearchProject payResearchProject,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize
) {
QueryWrapper<PayDraftingGroupResearchProject> queryWrapper = new QueryWrapper<>();
if(StringUtils.isNotBlank(payResearchProject.getDraftingGroupId())){
queryWrapper.eq("drafting_group_id",payResearchProject.getDraftingGroupId());
}else {
return Result.error("起草组id为空!");
}
if(StringUtils.isNotBlank(payResearchProject.getProjectName())){
queryWrapper.like("project_name",payResearchProject.getProjectName());
}
Page<PayDraftingGroupResearchProject> page = new Page<>(pageNo, pageSize);
IPage<PayDraftingGroupResearchProject> pageList = payDraftingGroupResearchProjectService.pageList(page,queryWrapper);
return Result.OK(pageList);
}
/**
* 分页列表查询(用于企业端,不带权限)
*
* @param payResearchProject
* @param pageNo
* @param pageSize
* @param
* @return
*/
@AutoLog(value = "起草组-企业端-在研项目-分页列表查询")
@ApiOperation(value="起草组-企业端-在研项目-分页列表查询", notes="起草组-企业端-在研项目-分页列表查询")
@GetMapping(value = "/enterpriseQueryPageList")
public Result<?> enterpriseQueryPageList(PayDraftingGroupResearchProject payResearchProject,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize
) {
QueryWrapper<PayDraftingGroupResearchProject> queryWrapper = new QueryWrapper<>();
if(StringUtils.isNotBlank(payResearchProject.getDraftingGroupId())){
queryWrapper.eq("drafting_group_id",payResearchProject.getDraftingGroupId());
}else {
return Result.error("起草组id为空!");
}
if(StringUtils.isNotBlank(payResearchProject.getProjectName())){
queryWrapper.like("project_name",payResearchProject.getProjectName());
}
Page<PayDraftingGroupResearchProject> page = new Page<>(pageNo, pageSize);
IPage<PayDraftingGroupResearchProject> pageList = payDraftingGroupResearchProjectService.pageList(page,queryWrapper);
return Result.OK(pageList);
}
/**
* 新增
*
* @param payResearchProject
* @return
*/
@Transactional
@AutoLog(value = "起草组-在研项目-新增")
@ApiOperation(value="起草组-在研项目-新增", notes="起草组-在研项目-新增")
@PostMapping(value = "/add")
@RequiresPermissions("draftingGroup:underStudy:add")
public Result<?> add(@RequestBody PayDraftingGroupResearchProject payResearchProject) {
StringBuilder msg = ValidUtil.validateAll(payResearchProject);
if (!StringUtils.isBlank(msg)) {
return Result.error(msg.toString());
}
QueryWrapper<PayDraftingGroupResearchProject> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("drafting_group_id",payResearchProject.getDraftingGroupId());
queryWrapper.eq("project_name",payResearchProject.getProjectName());
int count = payDraftingGroupResearchProjectService.count(queryWrapper);
if (count>0) {
return Result.error("项目名称已存在");
}
payDraftingGroupResearchProjectService.save(payResearchProject);
if(StringUtils.isNotBlank(payResearchProject.getFiles())){
String files = payResearchProject.getFiles();
List<String> filesList = Arrays.asList(files.split(","));
for(String s:filesList){
if(StringUtils.isBlank(s)){
throw new JeroBootException("文件id不能为空!");
}
UUID uuid = UUID.randomUUID();
payDraftingGroupResearchProjectService.saveFile(uuid.toString(),s,payResearchProject.getId());
}
}
return Result.OK("新增成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@Transactional
@AutoLog(value = "起草组-在研项目-通过id删除")
@ApiOperation(value="起草组-在研项目-通过id删除", notes="起草组-在研项目-通过id删除")
@GetMapping(value = "/delete")
@RequiresPermissions("draftingGroup:underStudy:delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
if (StringUtils.isBlank(id)) {
return Result.error("id不能为空");
}
//删除关联文件表
payDraftingGroupResearchProjectService.deleteFile(id);
//删除文件表
PayDraftingGroupResearchProject payResearchProject = payDraftingGroupResearchProjectService.getById(id);
if (Objects.isNull(payResearchProject)) {
return Result.error("对象不存在");
}
if(StringUtils.isNotBlank(payResearchProject.getFiles())){
List<String> filesList = Arrays.asList(payResearchProject.getFiles().split(","));
iossFileService.removeByIds(filesList);
}
payDraftingGroupResearchProjectService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "起草组-在研项目-批量删除")
@ApiOperation(value="起草组-在研项目-批量删除", notes="起草组-在研项目-批量删除")
@GetMapping(value = "/deleteBatch")
@RequiresPermissions("draftingGroup:underStudy:batchDel")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
if (StringUtils.isBlank(ids)) {
return Result.error("id不能为空");
}
List<String> strings = Arrays.asList(ids.split(","));
for(String s:strings){
delete(s);
}
return Result.OK("批量删除成功!");
}
/**
* 编辑
*
* @param payResearchProject
* @return
*/
@Transactional
@AutoLog(value = "起草组-在研项目-编辑")
@ApiOperation(value="起草组-在研项目-编辑", notes="起草组-在研项目-编辑")
@PostMapping(value = "/edit")
@RequiresPermissions("draftingGroup:underStudy:edit")
public Result<?> edit(@RequestBody PayDraftingGroupResearchProject payResearchProject) {
StringBuilder msg = ValidUtil.validateAll(payResearchProject);
if (!StringUtils.isBlank(msg)) {
return Result.error(msg.toString());
}
if (StringUtils.isBlank(payResearchProject.getId())) {
return Result.error("在研项目的id不能为空");
}
PayDraftingGroupResearchProject dbPayResearchProject = payDraftingGroupResearchProjectService.getById(payResearchProject.getId());
if (Objects.isNull(dbPayResearchProject)) {
return Result.error("该项目不存在");
}
QueryWrapper<PayDraftingGroupResearchProject> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("project_name",payResearchProject.getProjectName());
queryWrapper.eq("drafting_group_id",payResearchProject.getDraftingGroupId());
queryWrapper.ne("id",payResearchProject.getId());
int count = payDraftingGroupResearchProjectService.count(queryWrapper);
if (count>0) {
return Result.error("项目名称已存在,请修改");
}
//删除关联文件表
payDraftingGroupResearchProjectService.deleteFile(payResearchProject.getId());
//重新加入关系表
if(StringUtils.isNotBlank(payResearchProject.getFiles())){
String files = payResearchProject.getFiles();
List<String> filesList = Arrays.asList(files.split(","));
for(String s:filesList){
if(StringUtils.isBlank(s)){
throw new JeroBootException("文件id不能为空!");
}
UUID uuid = UUID.randomUUID();
payDraftingGroupResearchProjectService.saveFile(uuid.toString(),s,payResearchProject.getId());
}
}
//更新
payDraftingGroupResearchProjectService.updateById(payResearchProject);
return Result.OK("编辑成功!");
}
}
@@ -0,0 +1,27 @@
package com.jero.drafting.controller;
import com.jero.common.system.base.controller.JeroController;
import com.jero.drafting.entity.PayDraftingGroupSubItem;
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
import com.jero.drafting.service.IPayDraftingGroupSubItemContactsService;
import com.jero.drafting.service.IPayDraftingGroupSubItemService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 起草组成员企业联系人表 前端控制器
* </p>
*
* @author sz
* @since 2024-01-02
*/
@Api(tags="起草组成员 联系人信息")
@RestController
@RequestMapping("/drafting/payDraftingGroupSubitemContacts")
@Slf4j
public class PayDraftingGroupSubItemContactsController extends JeroController<PayDraftingGroupSubItemContacts, IPayDraftingGroupSubItemContactsService> {
}
@@ -0,0 +1,540 @@
package com.jero.drafting.controller;
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.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.exception.JeroBootException;
import com.jero.common.service.RolePermissionService;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.PasswordUtil;
import com.jero.common.util.ValidUtil;
import com.jero.common.util.oConvertUtils;
import com.jero.drafting.common.DraftingConstant;
import com.jero.drafting.entity.PayDraftingGroup;
import com.jero.drafting.entity.PayDraftingGroupSubItem;
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
import com.jero.drafting.service.IPayDraftingGroupService;
import com.jero.drafting.service.IPayDraftingGroupSubItemContactsService;
import com.jero.drafting.service.IPayDraftingGroupSubItemService;
import com.jero.drafting.vo.CheckVo;
import com.jero.drafting.vo.PayDraftingGroupSubItemExcel;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.service.ISysUserService;
import com.jero.temporary.entity.PayContactsManagementTemporary;
import com.jero.temporary.service.IPayContactsManagementTemporaryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
import java.util.stream.Collectors;
/**
* <p>
* 起草组成员表 前端控制器
* </p>
*
* @author sz
* @since 2024-01-02
*/
@Api(tags="起草组成员")
@RestController
@RequestMapping("/drafting/payDraftingGroupSubitem")
@Slf4j
public class PayDraftingGroupSubItemController extends JeroController<PayDraftingGroupSubItem, IPayDraftingGroupSubItemService> {
@Resource
private IPayDraftingGroupService payDraftingGroupService;
@Resource
private IPayDraftingGroupSubItemService payDraftingGroupSubItemService;
@Resource
private IPayDraftingGroupSubItemContactsService payDraftingGroupSubItemContactsService;
@Resource
private RolePermissionService rolePermissionService;
@Resource
private IPayContactsManagementTemporaryService payContactsManagementTemporaryService;
@Resource
private ISysUserService sysUserService;
/**
* 分页列表查询
*
* @param payDraftingGroupSubItem 起草组成员
* @param pageNo 页数
* @param pageSize 条数
* @param paymentDate 日期
* @return
*/
@RequiresPermissions("draftingGroupMember:search")
@ApiOperation(value = "起草组成员-分页列表查询", notes = "起草组成员-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(PayDraftingGroupSubItem payDraftingGroupSubItem,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
@RequestParam(name = "paymentDate", required = false) String paymentDate) {
if (!StringUtils.isBlank(payDraftingGroupSubItem.getChargeCompanyTemporaryName()) && payDraftingGroupSubItem.getChargeCompanyTemporaryName().length() > 50) {
return Result.error("成员单位长度不能大于50个字符");
}
if (StringUtils.isBlank(payDraftingGroupSubItem.getDraftingGroupId())) {
return Result.error("起草组id不能为空!");
}
if(!StringUtils.isBlank(payDraftingGroupSubItem.getChargeCompanyTemporaryName())){
payDraftingGroupSubItem.setChargeCompanyTemporaryName(oConvertUtils.replaceAllPercent(payDraftingGroupSubItem.getChargeCompanyTemporaryName()));
}
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(payDraftingGroupSubItem.getDraftingGroupId());
if(Objects.isNull(payDraftingGroup)){
return Result.error("起草组不存在!");
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if(!rolePermissionService.getRolePermission("draftingGroupMember:search") && !Objects.equals(payDraftingGroup.getPrincipalIdA(),sysUser.getId())){
return Result.error("数据权限不足!");
}
Page<PayDraftingGroupSubItem> page = new Page<>(pageNo, pageSize);
IPage<PayDraftingGroupSubItem> pageList = payDraftingGroupSubItemService.queryPageList(page, payDraftingGroupSubItem, paymentDate);
return Result.OK(pageList);
}
/**
* 企业端-起草组项目-分页列表查询
* 起草组的企业联系人1,2,3
* @param payDraftingGroupSubItem 起草组项目成员
* @param pageNo 页数
* @param pageSize 条数
* @return
*/
@ApiOperation(value="起草组项目-企业端-分页列表查询", notes="起草组项目-企业端-分页列表查询")
@GetMapping(value = "/queryCompanyPageList")
public Result<?> queryCompanyPageList(PayDraftingGroupSubItem payDraftingGroupSubItem,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if(Objects.isNull(sysUser)){
return Result.error("没有查到用户信息!");
}
Page<PayDraftingGroupSubItem> page = new Page<>(pageNo, pageSize);
List<Integer> listNeedInvoice = new ArrayList<>();
if(!StringUtils.isBlank(payDraftingGroupSubItem.getChargeProject())){
payDraftingGroupSubItem.setChargeProject(oConvertUtils.replaceAllPercent(payDraftingGroupSubItem.getChargeProject()));
}
IPage<PayDraftingGroupSubItem> pageList;
//非企业管理员
if (!sysUser.getIsCompanyManager()) {
List<String> listProjectIds = new ArrayList<>();
// 起草组的企业联系人
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> queryPayDraftingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayDraftingGroupSubItemContacts.eq(PayDraftingGroupSubItemContacts::getContactsId,sysUser.getId());
List<PayDraftingGroupSubItemContacts> listPayDraftingGroupSubItemContacts = payDraftingGroupSubItemContactsService.list(queryPayDraftingGroupSubItemContacts);
if(!CollectionUtils.isEmpty(listPayDraftingGroupSubItemContacts)){
List<String> listProjectId = listPayDraftingGroupSubItemContacts.stream().map(PayDraftingGroupSubItemContacts::getDraftingGroupSubId).collect(Collectors.toList());
listProjectIds.addAll(listProjectId);
}
List<String> listProjectIdsNew = new ArrayList<>();
if(!CollectionUtils.isEmpty(listProjectIds)){
listProjectIdsNew = listProjectIds.stream().distinct().collect(Collectors.toList());
}else{
listProjectIdsNew.add("");
}
pageList = payDraftingGroupSubItemService.queryCompanyPageList(page, payDraftingGroupSubItem,listNeedInvoice,listProjectIdsNew);
}else{
pageList = payDraftingGroupSubItemService.queryCompanyPageListByCompanyManager(page, payDraftingGroupSubItem,listNeedInvoice,sysUser.getCompanyId());
}
// 过滤数据,只要审核通过的数据
List<PayDraftingGroupSubItem> passList = pageList.getRecords().stream().filter(item -> Objects.equals(item.getCheckResult(), DraftingConstant.CHECK_PASS)).collect(Collectors.toList());
pageList.setRecords(passList);
if(!CollectionUtils.isEmpty(pageList.getRecords())){
List<PayDraftingGroupSubItem> list = pageList.getRecords();
// 过滤数据,只要审核通过的数据
list = list.stream().filter(item -> Objects.equals(item.getCheckResult(), DraftingConstant.CHECK_PASS)).collect(Collectors.toList());
List<String> listIds = list.stream().map(PayDraftingGroupSubItem::getDraftingGroupId).collect(Collectors.toList());
LambdaQueryWrapper<PayDraftingGroup> queryPayDraftingGroup = new LambdaQueryWrapper<>();
queryPayDraftingGroup.in(PayDraftingGroup::getId,listIds);
List<PayDraftingGroup> listPayDraftingGroup = payDraftingGroupService.list(queryPayDraftingGroup);
if(CollectionUtils.isEmpty(listPayDraftingGroup)){
return Result.error("起草组不存在");
}
List<String> listString = listPayDraftingGroup.stream().map(PayDraftingGroup::getPrincipalIdA).collect(Collectors.toList());
LambdaQueryWrapper<SysUser> querySysUser = new LambdaQueryWrapper<>();
querySysUser.in(SysUser::getId,listString);
List<SysUser> listSysUser = sysUserService.list(querySysUser);
// 获取企业联系人
List<String> subItemIds = list.stream().map(PayDraftingGroupSubItem::getId).collect(Collectors.toList());
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> queryDraftingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryDraftingGroupSubItemContacts.in(PayDraftingGroupSubItemContacts::getDraftingGroupSubId, subItemIds);
List<PayDraftingGroupSubItemContacts> payDraftingGroupSubItemContactsList = payDraftingGroupSubItemContactsService.list(queryDraftingGroupSubItemContacts);
list.forEach(p->{
if (!CollectionUtils.isEmpty(payDraftingGroupSubItemContactsList)) {
List<PayDraftingGroupSubItemContacts> payDraftingGroupSubItemContacts = payDraftingGroupSubItemContactsList
.stream().filter(item -> Objects.equals(item.getDraftingGroupSubId(), p.getId())).collect(Collectors.toList());
p.setPayDraftingGroupSubItemContactsList(payDraftingGroupSubItemContacts);
}
List<PayDraftingGroup> listPrincipalIdA = listPayDraftingGroup.stream().filter(item->Objects.equals(item.getId(),p.getDraftingGroupId())).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listPrincipalIdA)){
if(!CollectionUtils.isEmpty(listSysUser)){
List<SysUser> listSysUserNew = listSysUser.stream().filter(item->Objects.equals(item.getId(),listPrincipalIdA.get(0).getPrincipalIdA())).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listSysUserNew)){
if(!StringUtils.isBlank(listSysUserNew.get(0).getPhone())){
p.setPrincipalPhone(PasswordUtil.decrypt(listSysUserNew.get(0).getPhone()));
}
if(!StringUtils.isBlank(listSysUserNew.get(0).getEmail())){
p.setPrincipalEmail(PasswordUtil.decrypt(listSysUserNew.get(0).getEmail()));
}
p.setPrincipalName(listSysUserNew.get(0).getRealname());
}
}
p.setOperationCycle(listPrincipalIdA.get(0).getOperationCycle());
p.setMissionAndObjectives(listPrincipalIdA.get(0).getMissionAndObjectives());
p.setPrincipalName(listPrincipalIdA.get(0).getPrincipalNameA());
p.setYear(listPrincipalIdA.get(0).getYear());
}
});
pageList.setRecords(list);
}
return Result.OK(pageList);
}
/**
* 添加
*
* @param payDraftingGroupSubItem 起草组成员
* @return
*/
@AutoLog(value = "起草组成员-添加",operateType = 2)
@RequiresPermissions("draftingGroupMember:add")
@ApiOperation(value = "起草组成员-添加", notes = "起草组成员-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody PayDraftingGroupSubItem payDraftingGroupSubItem) {
StringBuilder msg = ValidUtil.validateAll(payDraftingGroupSubItem);
if (!StringUtils.isBlank(msg)) {
return Result.error(msg.toString());
}
payDraftingGroupSubItemService.addPayDraftingGroupSubItem(payDraftingGroupSubItem);
return Result.OK("添加成功!");
}
/**
* 通过id删除
*
* @param id 起草组成员id
* @return
*/
@AutoLog(value = "起草组成员-删除",operateType = 4)
@RequiresPermissions("draftingGroupMember:delete")
@ApiOperation(value = "起草组成员-通过id删除", notes = "起草组成员-通过id删除")
@GetMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id") String id) {
payDraftingGroupSubItemService.delete(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids 起草组成员ids 逗号分隔
* @return
*/
@RequiresPermissions("draftingGroupMember:batchDel")
@ApiOperation(value = "起草组成员-批量删除", notes = "起草组成员-批量删除")
@GetMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids") String ids) {
payDraftingGroupSubItemService.deleteBatch(ids);
return Result.OK("批量删除成功!");
}
/**
* 编辑
*
* @param payDraftingGroupSubItem 起草组成员
* @return
*/
@AutoLog(value = "起草组成员-修改",operateType = 3)
@RequiresPermissions("draftingGroupMember:edit")
@ApiOperation(value = "起草组成员-编辑", notes = "起草组成员-编辑")
@PostMapping(value = "/edit")
public Result<?> edit(@RequestBody PayDraftingGroupSubItem payDraftingGroupSubItem) {
StringBuilder msg = ValidUtil.validateAll(payDraftingGroupSubItem);
if (!StringUtils.isBlank(msg)) {
return Result.error(msg.toString());
}
payDraftingGroupSubItemService.editPayWorkingGroupSubItem(payDraftingGroupSubItem);
return Result.OK("编辑成功!");
}
/**
* 企业端-工作组成员-修改
*
* @param payDraftingGroupSubItem 工作组成员
* @return
*/
@AutoLog(value = "企业端-工作组成员-修改",operateType = 3)
@ApiOperation(value = "企业端-工作组成员-修改", notes = "企业端-工作组成员-修改")
@PostMapping(value = "/editCompany")
public Result<?> editCompany(@RequestBody PayDraftingGroupSubItem payDraftingGroupSubItem) {
StringBuilder msg = ValidUtil.validateAll(payDraftingGroupSubItem);
if (!StringUtils.isBlank(msg)) {
return Result.error(msg.toString());
}
payDraftingGroupSubItemService.editPayWorkingGroupSubItemByCompany(payDraftingGroupSubItem);
return Result.OK("编辑成功!");
}
/**
* 模板下载
*
* @return
*/
@RequiresPermissions("draftingGroupMember:downTemplate")
@ApiOperation(value = "起草组成员-模板下载", notes = "起草组成员-模板下载")
@GetMapping(value = "/downloadExcelModel")
public ModelAndView downloadExcelModel() {
return super.exportTemplate(PayDraftingGroupSubItem.class, "起草组成员导入模板");
}
/**
* 通过excel导入数据
*
* @param request
* @return
*/
@AutoLog(value = "起草组成员-excel导入数据",operateType = 5)
@RequiresPermissions("draftingGroupMember:import")
@PostMapping(value = "/importExcel")
@ApiOperation(value = "起草组成员-通过excel导入数据", notes = "起草组成员-通过excel导入数据")
public Result<?> importExcel(HttpServletRequest request) {
List<Object> excelData = super.getExcelData(request, PayDraftingGroupSubItem.class);
if (excelData.isEmpty()) {
throw new JeroBootException("导入数据为空,请填写数据之后重新导入!");
}
payDraftingGroupSubItemService.importExcel(request);
return Result.OK("文件导入成功!");
}
/**
* 导出excel
*
* @param request
* @param payDraftingGroupSubItem 起草组成员
*/
@AutoLog(value = "起草组成员-导出excel",operateType = 6)
@RequiresPermissions("draftingGroupMember:export")
@GetMapping(value = "/exportXls")
@ApiOperation(value = "起草组成员-导出excel", notes = "起草组成员-导出excel")
public ModelAndView exportXls(HttpServletRequest request,
PayDraftingGroupSubItem payDraftingGroupSubItem,
@RequestParam(name = "paymentDate", required = false) String paymentDate) {
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(payDraftingGroupSubItem.getDraftingGroupId());
if(Objects.isNull(payDraftingGroup)){
throw new JeroBootException("起草组不存在!");
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if(!rolePermissionService.getRolePermission("draftingGroupMember:export")
&& !Objects.equals(payDraftingGroup.getPrincipalIdA(),sysUser.getId())
&& !Objects.equals(payDraftingGroup.getPrincipalIdB(),sysUser.getId())){
throw new JeroBootException("数据权限不足!");
}
// Step.2 获取导出数据
Page<PayDraftingGroupSubItem> page = new Page<>(-1, -1);
IPage<PayDraftingGroupSubItem> payWorkingGroupSubItemIPage = payDraftingGroupSubItemService.queryPageList(page, payDraftingGroupSubItem, paymentDate);
List<PayDraftingGroupSubItem> pageList = payWorkingGroupSubItemIPage.getRecords();
List<PayDraftingGroupSubItem> exportList;
// 过滤选中数据
String selections = request.getParameter("selections");
if (oConvertUtils.isNotEmpty(selections)) {
List<String> selectionList = Arrays.asList(selections.split(","));
exportList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
} else {
exportList = pageList;
}
List<PayDraftingGroupSubItemExcel> excelList = new ArrayList<>();
if(!CollectionUtils.isEmpty(exportList)){
// 拿到所有的起草组成员id的list
List<String> listDGSIds = exportList.stream().map(PayDraftingGroupSubItem::getId).collect(Collectors.toList());
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> queryPayDraftingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayDraftingGroupSubItemContacts.in(PayDraftingGroupSubItemContacts::getDraftingGroupSubId,listDGSIds);
// 拿到所有起草组成员对应的起草组联系人信息
List<PayDraftingGroupSubItemContacts> payDraftingGroupSubItemContactsList = payDraftingGroupSubItemContactsService.list(queryPayDraftingGroupSubItemContacts);
for (PayDraftingGroupSubItem draftingGroupSubItem : exportList) {
PayDraftingGroupSubItemExcel excel = new PayDraftingGroupSubItemExcel();
BeanUtils.copyProperties(draftingGroupSubItem,excel);
// 拿到该成员对应联系人信息的list
List<PayDraftingGroupSubItemContacts> listPayDraftingGroupSubItemContacts = payDraftingGroupSubItemContactsList.stream().filter(o->Objects.equals(draftingGroupSubItem.getId(),o.getDraftingGroupSubId())).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listPayDraftingGroupSubItemContacts)){
listPayDraftingGroupSubItemContacts.sort(Comparator.comparing(PayDraftingGroupSubItemContacts::getOrderNum));
// 拿到该名成员对应的联系人的id的list
List<String> listIds = listPayDraftingGroupSubItemContacts.stream().map(PayDraftingGroupSubItemContacts::getContactsTemporaryId).collect(Collectors.toList());
// 拿到所有联系人信息对应的详情信息
List<PayContactsManagementTemporary> listPayContactsManagementTemporary = payContactsManagementTemporaryService.listByIds(listIds);
for (int i = 0; i < listPayDraftingGroupSubItemContacts.size(); i++) {
PayDraftingGroupSubItemContacts payDraftingGroupSubItemContacts = listPayDraftingGroupSubItemContacts.get(i);
// 拿到该联系人的详情信息
List<PayContactsManagementTemporary> temporary = listPayContactsManagementTemporary.stream().filter(s->Objects.equals(s.getId(),payDraftingGroupSubItemContacts.getContactsTemporaryId())).collect(Collectors.toList());
String email = "";
String phone = "";
String name = payDraftingGroupSubItemContacts.getContactsTemporaryName();
String remark = payDraftingGroupSubItemContacts.getRemarks();
if(!CollectionUtils.isEmpty(temporary)){
email = temporary.get(0).getEmail();
// 解密
if (StringUtils.isNotBlank(email)){
email = PasswordUtil.decrypt(email);
}
phone = temporary.get(0).getPhone();
if (StringUtils.isNotBlank(phone)){
phone = PasswordUtil.decrypt(phone);
}
}
switch (i){
case 0:
excel.setContactsNameOne(name);
excel.setRemarksOne(remark);
excel.setContactsEmailOne(email);
excel.setContactsPhoneOne(phone);
break;
case 1:
excel.setContactsNameTwo(name);
excel.setRemarksTwo(remark);
excel.setContactsEmailTwo(email);
excel.setContactsPhoneTwo(phone);
break;
case 2:
excel.setContactsNameThree(name);
excel.setRemarksThree(remark);
excel.setContactsEmailThree(email);
excel.setContactsPhoneThree(phone);
break;
case 3:
excel.setContactsNameFour(name);
excel.setRemarksFour(remark);
excel.setContactsEmailFour(email);
excel.setContactsPhoneFour(phone);
break;
case 4:
excel.setContactsNameFive(name);
excel.setRemarksFive(remark);
excel.setContactsEmailFive(email);
excel.setContactsPhoneFive(phone);
break;
case 5:
excel.setContactsNameSix(name);
excel.setRemarksSix(remark);
excel.setContactsEmailSix(email);
excel.setContactsPhoneSix(phone);
break;
case 6:
excel.setContactsNameSeven(name);
excel.setRemarksSeven(remark);
excel.setContactsEmailSeven(email);
excel.setContactsPhoneSeven(phone);
break;
case 7:
excel.setContactsNameEight(name);
excel.setRemarksEight(remark);
excel.setContactsEmailEight(email);
excel.setContactsPhoneEight(phone);
break;
case 8:
excel.setContactsNameNine(name);
excel.setRemarksNine(remark);
excel.setContactsEmailNine(email);
excel.setContactsPhoneNine(phone);
break;
case 9:
excel.setContactsNameTen(name);
excel.setRemarksTen(remark);
excel.setContactsEmailTen(email);
excel.setContactsPhoneTen(phone);
break;
default:break;
}
}
}
excelList.add(excel);
}
}
return super.exportListXls(excelList, PayDraftingGroupSubItemExcel.class, "起草组成员");
}
/**
* 审核起草组报名信息
*/
@AutoLog(value = "审核起草组报名信息")
@RequiresPermissions("draftingGroupMember:check")
@ApiOperation(value = "审核起草组报名信息")
@PostMapping(value = "/checkRegister")
public Result<?> checkRegister(@RequestBody CheckVo checkVO) {
payDraftingGroupSubItemService.checkRegister(checkVO);
return Result.OK("审核成功!");
}
/**
* 分页列表查询
*
* @param payDraftingGroupSubItem 起草组成员
* @return
*/
@ApiOperation(value = "企业端-查询起草组成员", notes = "企业端-查询起草组成员")
@GetMapping(value = "/getItemById")
public Result<?> query(PayDraftingGroupSubItem payDraftingGroupSubItem,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
@RequestParam(name = "paymentDate", required = false) String paymentDate) {
if (!StringUtils.isBlank(payDraftingGroupSubItem.getChargeCompanyTemporaryName()) && payDraftingGroupSubItem.getChargeCompanyTemporaryName().length() > 50) {
return Result.error("成员单位长度不能大于50个字符");
}
if (StringUtils.isBlank(payDraftingGroupSubItem.getDraftingGroupId())) {
return Result.error("起草组id不能为空!");
}
if (StringUtils.isBlank(payDraftingGroupSubItem.getId())) {
return Result.error("起草组成员id不能为空!");
}
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(payDraftingGroupSubItem.getDraftingGroupId());
if(Objects.isNull(payDraftingGroup)){
return Result.error("起草组不存在!");
}
Page<PayDraftingGroupSubItem> page = new Page<>(pageNo, pageSize);
IPage<PayDraftingGroupSubItem> pageList = payDraftingGroupSubItemService.queryPageList(page, payDraftingGroupSubItem, paymentDate);
List<PayDraftingGroupSubItem> records = pageList.getRecords();
if (CollectionUtils.isEmpty(records)) {
return Result.error("该成员不存在!");
}
PayDraftingGroupSubItem item = records.get(0);
return Result.OK(item);
}
/**
* 企业端-起草组成员添加(不带权限)
*
* @param payDraftingGroupSubItem 起草组成员
* @return
*/
@ApiOperation(value = "企业端-起草组成员添加", notes = "企业端-起草组成员添加")
@PostMapping(value = "/addByQRCode")
public Result<?> addByQRCode(@RequestBody PayDraftingGroupSubItem payDraftingGroupSubItem) {
StringBuilder msg = ValidUtil.validateAll(payDraftingGroupSubItem);
if (!StringUtils.isBlank(msg)) {
return Result.error(msg.toString());
}
payDraftingGroupSubItemService.addPayDraftingGroupSubItem(payDraftingGroupSubItem);
return Result.OK("添加成功!");
}
}
@@ -0,0 +1,155 @@
package com.jero.drafting.entity;
import com.baomidou.mybatisplus.annotation.*;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
/**
* <p>
* 起草组表
* </p>
*
* @author sz
* @since 2024-01-02
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("pay_drafting_group")
@ApiModel(value="PayDraftingGroup对象", description="起草组表")
public class PayDraftingGroup implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID)
private String id;
/**起草组项目*/
@Excel(name = "起草组项目", width = 15)
@ApiModelProperty(value = "起草组项目")
@NotEmpty(message = "起草组项目不能为空")
@Size(max = 50,message = "起草组项目长度不能大于50个字符")
private String draftingGroupProject;
@ApiModelProperty(value = "工作组id")
@NotEmpty(message = "工作组id不能为空")
@Size(max = 50,message = "工作组id长度不能大于50个字符")
private String workingGroupId;
@ApiModelProperty(value = "工作组名称")
@TableField(exist = false)
private String workingGroupName;
/**运行年份*/
@Excel(name = "运行年份", width = 15)
@ApiModelProperty(value = "运行年份")
@NotEmpty(message = "运行年份不能为空")
@Pattern(regexp = "^\\d{4}$",message = "运行年份格式错误")
private String year;
/**负责人Aid*/
@Excel(name = "负责人Aid", width = 15)
@ApiModelProperty(value = "负责人Aid")
@NotEmpty(message = "负责人Aid不能为空")
@Size(max = 32,message = "负责人Aid长度不能大于32个字符")
private String principalIdA;
/**负责人名称A*/
@Excel(name = "负责人名称A", width = 15)
@ApiModelProperty(value = "负责人名称A")
private String principalNameA;
/**负责人Bid*/
@Excel(name = "负责人Bid", width = 15)
@ApiModelProperty(value = "负责人Bid")
// @NotEmpty(message = "负责人Bid不能为空")
@Size(max = 32,message = "负责人Bid长度不能大于32个字符")
private String principalIdB;
/**负责人名称B*/
@Excel(name = "负责人名称N", width = 15)
@ApiModelProperty(value = "负责人名称B")
private String principalNameB;
/**每年召开次数*/
@Excel(name = "每年召开次数", width = 15)
@ApiModelProperty(value = "每年召开次数")
@Size(max = 50,message = "每年召开次数长度不能大于50个字符")
private String convokeNum;
/**运行周期*/
@Excel(name = "运行周期", width = 15)
@ApiModelProperty(value = "运行周期")
@Size(max = 50,message = "运行周期长度不能大于50个字符")
private String operationCycle;
/**任务及目标*/
@Excel(name = "任务及目标", width = 15)
@ApiModelProperty(value = "任务及目标")
@Size(max = 200,message = "任务及目标长度不能大于200个字符")
private String missionAndObjectives;
/**备注*/
@Excel(name = "备注", width = 15)
@ApiModelProperty(value = "备注")
@Size(max = 200,message = "备注长度不能大于200个字符")
private String remarks;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新时间")
private Date updateTime;
/**
* 负责人A(用于权限查询)
*/
@TableField(exist = false)
private String principalA;
/**
* 负责人B(用于权限查询)
*/
@TableField(exist = false)
private String principalB;
@TableField(exist = false)
@ApiModelProperty(value = "企业联系人")
private String companyContactName;
@TableField(exist = false)
@ApiModelProperty(value = "企业名称")
private String companyName;
}
@@ -0,0 +1,84 @@
package com.jero.drafting.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jero.data.entity.Files;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;
@Data
@TableName("pay_drafting_group_research_project")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="pay_drafting_group_research_project对象", description="pay_drafting_group_research_project")
public class PayDraftingGroupResearchProject {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**起草组id*/
@NotNull(message ="起草组id不能为空")
@ApiModelProperty(value = "起草组id")
private String draftingGroupId;
/**项目名称*/
@Excel(name = "项目名称", width = 15)
@NotNull(message ="项目名称不能为空")
@Size(max = 50,message = "项目名称长度不超过50个字符")
@ApiModelProperty(value = "项目名称")
private String projectName;
/**主要起草单位*/
@Excel(name = "主要起草单位", width = 15)
@ApiModelProperty(value = "主要起草单位")
@NotEmpty(message = "主要起草单位不能为空")
private String draftCompany;
/**过程文件*/
@Excel(name = "过程文件", width = 15)
@ApiModelProperty(value = "过程文件(多个都好隔开)")
@NotEmpty(message = "过程文件不能为空")
private String files;
/**文件集合*/
@TableField(exist = false)
@Excel(name = "文件集合", width = 15)
@ApiModelProperty(value = "文件集合")
private List<Files> filesList;
/**项目进度*/
@Excel(name = "项目进度", width = 15)
@ApiModelProperty(value = "项目进度")
@NotEmpty(message = "项目进度不能为空")
private java.lang.String projectSchedule;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "创建时间")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "更新时间")
private java.util.Date updateTime;
}
@@ -0,0 +1,431 @@
package com.jero.drafting.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @Description: 起草组成员表 实体
* @Author: sz
* @Date: 2024-01-02
* @Version: V1.0
*/
@Data
@TableName("pay_drafting_group_subitem")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="pay_drafting_group_subitem对象", description="pay_drafting_group_subitem")
public class PayDraftingGroupSubItem implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**来款项目*/
@ApiModelProperty(value = "来款项目")
@TableField(exist = false)
private String chargeProject;
/**起草组id*/
@ApiModelProperty(value = "起草组id")
@Size(max = 32,message = "起草组id长度不能大于32个字符")
private String draftingGroupId;
/**成员单位id*/
@ApiModelProperty(value = "成员单位id")
@Size(max = 32,message = "成员单位id长度不能大于32个字符")
private String chargeCompanyId;
/**临时成员单位id*/
@ApiModelProperty(value = "临时成员单位id")
private String chargeCompanyTemporaryId;
/**临时成员单位*/
@Excel(name = "成员单位", width = 15)
@ApiModelProperty(value = "临时成员单位")
private String chargeCompanyTemporaryName;
/**企业联系人1id*/
@ApiModelProperty(value = "企业联系人1id")
@Size(max = 32,message = "企业联系人1id长度不能大于32个字符")
private String contactsIdOne;
/**临时企业联系人1id*/
@ApiModelProperty(value = "临时企业联系人1id")
private String contactsTemporaryIdOne;
/**临时企业联系人1名称*/
@ApiModelProperty(value = "临时企业联系人1名称")
private String contactsTemporaryNameOne;
/**企业联系人2id*/
@Size(max = 32,message = "企业联系人2id长度不能大于32个字符")
private String contactsIdTwo;
/**临时企业联系人2id*/
@ApiModelProperty(value = "临时企业联系人2id")
private String contactsTemporaryIdTwo;
/**临时企业联系人2名称*/
@ApiModelProperty(value = "临时企业联系人2名称")
private String contactsTemporaryNameTwo;
/**企业联系人3id*/
@Size(max = 32,message = "企业联系人3id长度不能大于32个字符")
private String contactsIdThree;
/**临时企业联系人3id*/
@ApiModelProperty(value = "临时企业联系人3id")
private String contactsTemporaryIdThree;
/**临时企业联系人3名称*/
@ApiModelProperty(value = "临时企业联系人3名称")
private String contactsTemporaryNameThree;
/**备注*/
@Excel(name = "备注", width = 15)
@ApiModelProperty(value = "备注")
@Size(max = 200,message = "备注长度不能大于200个字符")
private String remarks;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新时间")
private Date updateTime;
/**
* 企业联系人列表
*/
@ApiModelProperty(value = "企业联系人列表")
@TableField(exist = false)
private List<PayDraftingGroupSubItemContacts> payDraftingGroupSubItemContactsList;
/**项目ids 多个以逗号分隔*/
@TableField(exist = false)
@ApiModelProperty(value = "项目ids 多个以逗号分隔")
private String projectIds;
/**会议id*/
@TableField(exist = false)
private String meetingId;
/**
* 负责人
*/
@TableField(exist = false)
@ApiModelProperty(value = "负责人")
private String principalName;
/**负责人联系电话*/
@TableField(exist = false)
@ApiModelProperty(value = "负责人联系电话")
private String principalPhone;
/**负责人邮箱*/
@TableField(exist = false)
@ApiModelProperty(value = "负责人邮箱")
private String principalEmail;
/**
* 运行年份
*/
@TableField(exist = false)
@ApiModelProperty(value = "运行年份")
private String year;
/**运行周期*/
@ApiModelProperty(value = "运行周期")
@TableField(exist = false)
private String operationCycle;
/**任务及目标*/
@ApiModelProperty(value = "任务及目标")
@TableField(exist = false)
private String missionAndObjectives;
/**企业联系人1名称*/
@Excel(name = "企业联系人1", width = 15)
@ApiModelProperty(value = "企业联系人1")
@TableField(exist = false)
private String contactsNameOne;
/**
* 企业联系人1手机号
*/
@Excel(name = "企业联系人1手机号", width = 15)
@TableField(exist = false)
private String contactsPhoneOne;
/**
* 企业联系人1邮箱
*/
@Excel(name = "企业联系人1邮箱", width = 15)
@TableField(exist = false)
private String contactsEmailOne;
/**联系人1备注*/
@Excel(name = "联系人1备注", width = 15)
@ApiModelProperty(value = "联系人1备注")
@Size(max = 50,message = "联系人1备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksOne;
/**企业联系人2名称*/
@Excel(name = "企业联系人2", width = 15)
@ApiModelProperty(value = "企业联系人2")
@TableField(exist = false)
private String contactsNameTwo;
/**
* 企业联系人2手机号
*/
@Excel(name = "企业联系人2手机号", width = 15)
@TableField(exist = false)
private String contactsPhoneTwo;
/**
* 企业联系人2邮箱
*/
@Excel(name = "企业联系人2邮箱", width = 15)
@TableField(exist = false)
private String contactsEmailTwo;
/**联系人2备注*/
@Excel(name = "联系人2备注", width = 15)
@ApiModelProperty(value = "联系人2备注")
@Size(max = 50,message = "联系人2备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksTwo;
/**企业联系人3名称*/
@Excel(name = "企业联系人3", width = 15)
@ApiModelProperty(value = "企业联系人3")
@TableField(exist = false)
private String contactsNameThree;
/**
* 企业联系人3手机号
*/
@Excel(name = "企业联系人3手机号", width = 15)
@TableField(exist = false)
private String contactsPhoneThree;
/**
* 企业联系人3邮箱
*/
@Excel(name = "企业联系人3邮箱", width = 15)
@TableField(exist = false)
private String contactsEmailThree;
/**联系人3备注*/
@Excel(name = "联系人3备注", width = 15)
@ApiModelProperty(value = "联系人3备注")
@Size(max = 50,message = "联系人3备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksThree;
/**企业联系人4名称*/
@Excel(name = "企业联系人4", width = 15)
@ApiModelProperty(value = "企业联系人4")
@TableField(exist = false)
private String contactsNameFour;
/**
* 企业联系人4手机号
*/
@Excel(name = "企业联系人4手机号", width = 15)
@TableField(exist = false)
private String contactsPhoneFour;
/**
* 企业联系人4邮箱
*/
@Excel(name = "企业联系人4邮箱", width = 15)
@TableField(exist = false)
private String contactsEmailFour;
/**联系人4备注*/
@Excel(name = "联系人4备注", width = 15)
@ApiModelProperty(value = "联系人4备注")
@Size(max = 50,message = "联系人4备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksFour;
/**企业联系人5名称*/
@Excel(name = "企业联系人5", width = 15)
@ApiModelProperty(value = "企业联系人5")
@TableField(exist = false)
private String contactsNameFive;
/**
* 企业联系人5手机号
*/
@Excel(name = "企业联系人5手机号", width = 15)
@TableField(exist = false)
private String contactsPhoneFive;
/**
* 企业联系人5邮箱
*/
@Excel(name = "企业联系人5邮箱", width = 15)
@TableField(exist = false)
private String contactsEmailFive;
/**联系人5备注*/
@Excel(name = "联系人5备注", width = 15)
@ApiModelProperty(value = "联系人5备注")
@Size(max = 50,message = "联系人5备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksFive;
/**企业联系人6名称*/
@Excel(name = "企业联系人6", width = 15)
@ApiModelProperty(value = "企业联系人6")
@TableField(exist = false)
private String contactsNameSix;
/**
* 企业联系人6手机号
*/
@Excel(name = "企业联系人6手机号", width = 15)
@TableField(exist = false)
private String contactsPhoneSix;
/**
* 企业联系人6邮箱
*/
@Excel(name = "企业联系人6邮箱", width = 15)
@TableField(exist = false)
private String contactsEmailSix;
/**联系人6备注*/
@Excel(name = "联系人6备注", width = 15)
@ApiModelProperty(value = "联系人6备注")
@Size(max = 50,message = "联系人6备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksSix;
/**企业联系人7名称*/
@Excel(name = "企业联系人7", width = 15)
@ApiModelProperty(value = "企业联系人7")
@TableField(exist = false)
private String contactsNameSeven;
/**
* 企业联系人7手机号
*/
@Excel(name = "企业联系人7手机号", width = 15)
@TableField(exist = false)
private String contactsPhoneSeven;
/**
* 企业联系人7邮箱
*/
@Excel(name = "企业联系人7邮箱", width = 15)
@TableField(exist = false)
private String contactsEmailSeven;
/**联系人7备注*/
@Excel(name = "联系人7备注", width = 15)
@ApiModelProperty(value = "联系人7备注")
@Size(max = 50,message = "联系人7备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksSeven;
/**企业联系人8名称*/
@Excel(name = "企业联系人8", width = 15)
@ApiModelProperty(value = "企业联系人8")
@TableField(exist = false)
private String contactsNameEight;
/**
* 企业联系人8手机号
*/
@Excel(name = "企业联系人8手机号", width = 15)
@TableField(exist = false)
private String contactsPhoneEight;
/**
* 企业联系人8邮箱
*/
@Excel(name = "企业联系人8邮箱", width = 15)
@TableField(exist = false)
private String contactsEmailEight;
/**联系人8备注*/
@Excel(name = "联系人8备注", width = 15)
@ApiModelProperty(value = "联系人8备注")
@Size(max = 50,message = "联系人8备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksEight;
/**企业联系人9名称*/
@Excel(name = "企业联系人9", width = 15)
@ApiModelProperty(value = "企业联系人9")
@TableField(exist = false)
private String contactsNameNine;
/**
* 企业联系人9手机号
*/
@Excel(name = "企业联系人9手机号", width = 15)
@TableField(exist = false)
private String contactsPhoneNine;
/**
* 企业联系人9邮箱
*/
@Excel(name = "企业联系人9邮箱", width = 15)
@TableField(exist = false)
private String contactsEmailNine;
/**联系人9备注*/
@Excel(name = "联系人9备注", width = 15)
@ApiModelProperty(value = "联系人9备注")
@Size(max = 50,message = "联系人9备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksNine;
/**企业联系人10名称*/
@Excel(name = "企业联系人10", width = 15)
@ApiModelProperty(value = "企业联系人10")
@TableField(exist = false)
private String contactsNameTen;
/**
* 企业联系人10手机号
*/
@Excel(name = "企业联系人10手机号", width = 15)
@TableField(exist = false)
private String contactsPhoneTen;
/**
* 企业联系人10邮箱
*/
@Excel(name = "企业联系人10邮箱", width = 15)
@TableField(exist = false)
private String contactsEmailTen;
/**联系人10备注*/
@Excel(name = "联系人10备注", width = 15)
@ApiModelProperty(value = "联系人10备注")
@Size(max = 50,message = "联系人10备注长度不能大于50个字符")
@TableField(exist = false)
private String remarksTen;
/**已提醒*/
@TableField(exist = false)
@Dict(dicCode = "yn")
private Integer remind;
/**邮件提醒*/
@TableField(exist = false)
@Dict(dicCode = "yn")
private Integer mailRemind;
/**审核状态 1:待审核 2:已通过 3:已驳回**/
@ApiModelProperty(value = "审核状态")
private Integer checkResult;
/**审核说明**/
@ApiModelProperty(value = "审核说明")
private String checkRemark;
}
@@ -0,0 +1,131 @@
package com.jero.drafting.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 起草组企业联系人表 实体
* @Author: sz
* @Date: 2024-01-02
* @Version: V1.0
*/
@Data
@TableName("pay_drafting_group_subitem_contacts")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="pay_drafting_group_subitem_contacts", description="pay_drafting_group_subitem_contacts")
public class PayDraftingGroupSubItemContacts implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private String id;
/**起草组id*/
@Excel(name = "起草组id", width = 15)
@ApiModelProperty(value = "起草组id")
private String draftingGroupId;
/**起草组成员id*/
@Excel(name = "起草组成员id", width = 15)
@ApiModelProperty(value = "起草组成员id")
private String draftingGroupSubId;
/**企业联系人id*/
@Excel(name = "企业联系人id", width = 15)
@ApiModelProperty(value = "企业联系人id")
private String contactsId;
/**临时企业联系人id*/
@Excel(name = "临时企业联系人id", width = 15)
@ApiModelProperty(value = "临时企业联系人id")
private String contactsTemporaryId;
/**临时企业联系人名称*/
@Excel(name = "临时企业联系人名称", width = 15)
@ApiModelProperty(value = "临时企业联系人名称")
private String contactsTemporaryName;
/**联系人备注*/
@Excel(name = "联系人备注", width = 15)
@ApiModelProperty(value = "联系人备注")
private String remarks;
/**序号*/
@Excel(name = "序号", width = 15)
@ApiModelProperty(value = "序号")
private Integer orderNum;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新时间")
private Date updateTime;
/**
* 企业联系人性别3
*/
@ApiModelProperty(value = "企业联系人性别")
@TableField(exist = false)
private String gender;
/**
* 企业联系人性别3
*/
@ApiModelProperty(value = "企业联系人性别")
@TableField(exist = false)
private String gender_dictText;
/**
* 企业联系人职务3
*/
@ApiModelProperty(value = "企业联系人职务")
@TableField(exist = false)
private String post;
/**
* 企业联系人电话3
*/
@ApiModelProperty(value = "企业联系人电话")
@TableField(exist = false)
private String phone;
/**
* 企业联系人邮箱3
*/
@ApiModelProperty(value = "企业联系人邮箱")
@TableField(exist = false)
private String email;
/**
* 企业联系人邮编3
*/
@ApiModelProperty(value = "企业联系人邮编")
@TableField(exist = false)
private String postalCodeContacts;
/**
* 企业联系人地址
*/
@ApiModelProperty(value = "企业联系人地址")
@TableField(exist = false)
private String contactAddress;
/**
* 企业名称
*/
@TableField(exist = false)
@ApiModelProperty(value = "企业名称")
private String companyName;
}
@@ -0,0 +1,22 @@
package com.jero.drafting.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.drafting.entity.PayDraftingGroup;
import com.jero.drafting.vo.PayDraftingGroupVo;
import com.jero.project.vo.PayWorkingGroupVO;
/**
* <p>
* 起草组表 Mapper 接口
* </p>
*
* @author sz
* @since 2024-01-02
*/
public interface PayDraftingGroupMapper extends BaseMapper<PayDraftingGroup> {
IPage<PayDraftingGroupVo> queryPageList(Page<PayDraftingGroupVo> page, PayDraftingGroup payDraftingGroup);
}
@@ -0,0 +1,27 @@
package com.jero.drafting.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.drafting.entity.PayDraftingGroupResearchProject;
import com.jero.drafting.entity.PayDraftingGroupSubItem;
import org.apache.ibatis.annotations.Param;
/**
* <p>
* 起草组 在研项目表 Mapper 接口
* </p>
*
* @author sz
* @since 2024-01-05
*/
public interface PayDraftingGroupResearchProjectMapper extends BaseMapper<PayDraftingGroupResearchProject> {
IPage<PayDraftingGroupResearchProject> pageList(Page<PayDraftingGroupResearchProject> page, @Param(Constants.WRAPPER) QueryWrapper<PayDraftingGroupResearchProject> queryWrapper);
void saveFile(@Param("id")String id,@Param("fileId")String fileId,@Param("projectId") String projectId);
void deleteFile(@Param("id")String id);
}
@@ -0,0 +1,25 @@
package com.jero.drafting.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jero.drafting.entity.PayDraftingGroupSubItem;
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
* 起草组成员企业联系人表 Mapper 接口
* </p>
*
* @author sz
* @since 2024-01-02
*/
public interface PayDraftingGroupSubItemContactsMapper extends BaseMapper<PayDraftingGroupSubItemContacts> {
List<PayDraftingGroupSubItemContacts> getSubItemContacts(@Param("draftingGroupSubId")String id);
/**
* 根据成员id获得主联系人
*/
String getMasterContactsId(String draftingGroupSubItemId);
}
@@ -0,0 +1,55 @@
package com.jero.drafting.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.drafting.entity.PayDraftingGroupSubItem;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
* 起草组成员表 Mapper 接口
* </p>
*
* @author sz
* @since 2024-01-02
*/
public interface PayDraftingGroupSubItemMapper extends BaseMapper<PayDraftingGroupSubItem> {
/**
* 分页查询
* @param page
* @param payDraftingGroupSubItem
* @param paymentDate
* @return
*/
IPage<PayDraftingGroupSubItem> queryPageList(Page<PayDraftingGroupSubItem> page, PayDraftingGroupSubItem payDraftingGroupSubItem, String paymentDate);
/**
* 起草组成员-发布提醒列表查询
*
* @param page
* @param payDraftingGroupSubItem
* @return
*/
IPage<PayDraftingGroupSubItem> publishReminderList(Page<PayDraftingGroupSubItem> page, PayDraftingGroupSubItem payDraftingGroupSubItem);
/**
* @Description 企业端-我的工作组分页查询
* @Author lqt
* @Date 2021/9/29
* @Param listProjectIds 项目成员id集合
* @Return
* @Exception
*/
IPage<PayDraftingGroupSubItem> queryCompanyPageList(Page<PayDraftingGroupSubItem> page, @Param("payDraftingGroupSubItem") PayDraftingGroupSubItem payDraftingGroupSubItem, @Param("listNeedInvoice") List<Integer> listNeedInvoice, @Param("listProjectIds") List<String> listProjectIds);
IPage<PayDraftingGroupSubItem> queryCompanyPageList(Page<PayDraftingGroupSubItem> page,@Param("payDraftingGroupSubItem") PayDraftingGroupSubItem payDraftingGroupSubItem,@Param("listProjectIds") List<String> listProjectIds);
/**
* 企业端-管理员-我的工作组分页查询
*/
IPage<PayDraftingGroupSubItem> queryCompanyPageListByCompanyManager(Page<PayDraftingGroupSubItem> page, @Param("payDraftingGroupSubItem") PayDraftingGroupSubItem payDraftingGroupSubItem, @Param("listNeedInvoice") List<Integer> listNeedInvoice, @Param("companyId") String companyId);
}
@@ -0,0 +1,65 @@
<?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.jero.drafting.mapper.PayDraftingGroupMapper">
<select id="queryPageList" resultType="com.jero.drafting.vo.PayDraftingGroupVo">
SELECT
distinct pdg.id,
pdg.drafting_group_project AS draftingGroupProject,
pdg.working_group_id AS workingGroupId,
pdg.year,
pdg.principal_id_a AS principalIdA,
pdg.principal_id_b AS principalIdB,
pdg.convoke_num AS convokeNum,
pdg.operation_cycle AS operationCycle,
pdg.mission_and_objectives AS missionAndObjectives,
pdg.remarks,
pdg.create_by AS createBy,
pdg.create_time AS createTime,
pdg.update_by AS updateBy,
pdg.update_time AS updateTime,
su.realname AS principalNameA,
su1.realname AS principalNameB,
pwg.working_group_project AS workingGroupName
FROM pay_drafting_group pdg
left join sys_user su on pdg.principal_id_a = su.id
left join sys_user su1 on pdg.principal_id_b = su1.id
left join pay_working_group pwg on pwg.id = pdg.working_group_id
<!-- 动态添加表连接 -->
<if test="(payDraftingGroup.companyContactName != null and payDraftingGroup.companyContactName != '')
or (payDraftingGroup.companyName != null and payDraftingGroup.companyName != '')">
left join pay_drafting_group_subitem pdgs on pdg.id = pdgs.drafting_group_id
left JOIN pay_drafting_group_subitem_contacts pdgsc on pdgsc.drafting_group_sub_id = pdgs.id
</if>
<where>
<!-- 动态条件 -->
<!-- <if test="(payDraftingGroup.companyContactName != null and payDraftingGroup.companyContactName != '')-->
<!-- or (payDraftingGroup.companyName != null and payDraftingGroup.companyName != '')">-->
<!-- AND pdgs.check_result != 3-->
<!-- </if>-->
<if test="payDraftingGroup.draftingGroupProject != null and payDraftingGroup.draftingGroupProject != ''">
AND drafting_group_project LIKE concat('%',concat(#{payDraftingGroup.draftingGroupProject},'%'))
</if>
<if test="payDraftingGroup.principalIdA != null and payDraftingGroup.principalIdA != ''">
AND pdg.principal_id_a = #{payDraftingGroup.principalIdA}
</if>
<if test="payDraftingGroup.year != null and payDraftingGroup.year != ''">
AND pdg.year = #{payDraftingGroup.year}
</if>
<if test="payDraftingGroup.workingGroupId != null and payDraftingGroup.workingGroupId != ''">
AND working_group_id = #{payDraftingGroup.workingGroupId}
</if>
<if test="payDraftingGroup.workingGroupName != null and payDraftingGroup.workingGroupName != ''">
AND pwg.working_group_project like concat('%', #{payDraftingGroup.workingGroupName}, '%')
</if>
<if test="payDraftingGroup.companyContactName != null and payDraftingGroup.companyContactName != ''">
and pdgsc.contacts_temporary_name like concat('%', #{payDraftingGroup.companyContactName}, '%')
</if>
<if test="payDraftingGroup.companyName != null and payDraftingGroup.companyName != ''">
and pdgs.charge_company_temporary_name like concat('%', #{payDraftingGroup.companyName}, '%')
</if>
</where>
ORDER BY pdg.create_time DESC
</select>
</mapper>
@@ -0,0 +1,35 @@
<?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.jero.drafting.mapper.PayDraftingGroupResearchProjectMapper">
<resultMap id="page" type="com.jero.drafting.entity.PayDraftingGroupResearchProject">
<id property="id" column="id" />
<result property="projectName" column="project_name" />
<result property="draftCompany" column="draft_company" />
<result property="files" column="files" />
<result property="projectSchedule" column="project_schedule" />
<collection property="filesList" ofType="com.jero.data.entity.Files" select="pageFile" javaType="java.util.List" column="id=id" >
<result property="fileId" column="fileId" />
<result property="fileName" column="file_name" />
<result property="createTime" column="create_time" />
</collection>
</resultMap>
<select id="pageList" resultMap="page">
select * from pay_drafting_group_research_project
${ew.customSqlSegment}
</select>
<insert id="saveFile" >
insert into pay_drafting_group_research_project_file (id,project_id,file_id) value (#{id},#{projectId},#{fileId})
</insert>
<select id="pageFile" resultType="com.jero.data.entity.Files">
select oof.id AS fileId,oof.file_name,oof.create_time from pay_drafting_group_research_project_file prpf left join oss_file oof on(prpf.file_id=oof.id) where prpf.project_id=#{id}
</select>
<delete id="deleteFile">
delete from pay_drafting_group_research_project_file where project_id=#{id}
</delete>
</mapper>
@@ -0,0 +1,16 @@
<?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.jero.drafting.mapper.PayDraftingGroupSubItemContactsMapper">
<select id="getSubItemContacts" resultType="com.jero.drafting.entity.PayDraftingGroupSubItemContacts">
select *
from pay_drafting_group_subitem_contacts
where drafting_group_sub_id=#{draftingGroupSubId}
</select>
<select id="getMasterContactsId" resultType="java.lang.String" parameterType="java.lang.String">
select contacts_id
from pay_drafting_group_subitem_contacts
where drafting_group_sub_id=#{draftingGroupSubId} order by order_num asc limit 1
</select>
</mapper>
@@ -0,0 +1,118 @@
<?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.jero.drafting.mapper.PayDraftingGroupSubItemMapper">
<select id="queryPageList" resultType="com.jero.drafting.entity.PayDraftingGroupSubItem">
SELECT
pdgs.id,
pdgs.drafting_group_id AS draftingGroupId,
pdgs.charge_company_id AS chargeCompanyId,
pdgs.charge_company_temporary_id AS chargeCompanyTemporaryId,
IF(
pdgs.charge_company_temporary_name =
IF(
pdgs.charge_company_temporary_name LIKE '%(未审核)',
CONCAT(pcm.company_name, '(未审核)'),
pcm.company_name
),
pdgs.charge_company_temporary_name,
CONCAT(pdgs.charge_company_temporary_name, '(更名为', pcm.company_name, ')')
) AS chargeCompanyTemporaryName,
pdgs.contacts_id_one AS contactsIdOne,
pdgs.contacts_temporary_id_one AS contactsTemporaryIdOne,
pdgs.contacts_temporary_name_one AS contactsTemporaryNameOne,
pdgs.remarks_one as remarksOne,
pdgs.contacts_id_two AS contactsIdTwo,
pdgs.contacts_temporary_id_two AS contactsTemporaryIdTwo,
pdgs.contacts_temporary_name_two AS contactsTemporaryNameTwo,
pdgs.remarks_two as remarksTwo,
pdgs.contacts_id_three AS contactsIdThree,
pdgs.contacts_temporary_id_three AS contactsTemporaryIdThree,
pdgs.contacts_temporary_name_three AS contactsTemporaryNameThree,
pdgs.remarks,
pdgs.check_result AS checkResult,
pdgs.create_by AS createBy,
pdgs.create_time AS createTime,
pdgs.update_by AS updateBy
FROM pay_drafting_group_subitem pdgs
left join pay_company_management_temporary pcmt on pdgs.charge_company_temporary_id = pcmt.id
left join pay_company_management pcm on pcmt.company_id = pcm.id
<where>
pdgs.drafting_group_id = #{payDraftingGroupSubItem.draftingGroupId} AND (pdgs.check_result = 1 OR pdgs.check_result = 2)
<if test="payDraftingGroupSubItem.chargeCompanyTemporaryName != null and payDraftingGroupSubItem.chargeCompanyTemporaryName != ''">
AND pcm.company_name LIKE
concat('%',concat(#{payDraftingGroupSubItem.chargeCompanyTemporaryName},'%'))
</if>
<if test="payDraftingGroupSubItem.id != null and payDraftingGroupSubItem.id != ''">
AND pdgs.id = #{payDraftingGroupSubItem.id}
</if>
</where>
GROUP BY pdgs.id
ORDER BY pdgs.create_time desc
</select>
<select id="publishReminderList" resultType="com.jero.drafting.entity.PayDraftingGroupSubItem">
select distinct pcm.id as id,pcm.name contactsTemporaryNameOne,pcm.company_name chargeCompanyTemporaryName
,if(pmrr.id,'1','0') remind,
if(pmrmr.id,'1','0') mailRemind
from pay_contacts_management pcm
left join pay_drafting_group_subitem_contacts pdgsc on pcm.id = pdgsc.contacts_id
left join (SELECT * from pay_meeting_remind_record where meeting_id = #{param2.meetingId}) pmrr on pmrr.contact_id = pcm.id
left join (SELECT * from pay_meeting_remind_mail_record where meeting_id = #{param2.meetingId}) pmrmr on pmrmr.contact_id = pcm.id
<where>
pdgsc.drafting_group_id = #{payDraftingGroupSubItem.draftingGroupId}
<if test="payDraftingGroupSubItem.chargeCompanyTemporaryName != null and payDraftingGroupSubItem.chargeCompanyTemporaryName != ''">
and pcm.company_name like concat('%',#{payDraftingGroupSubItem.chargeCompanyTemporaryName},'%')
</if>
<if test="payDraftingGroupSubItem.remind == 1">
and pmrr.id is not null
</if>
<if test="payDraftingGroupSubItem.remind == 0">
and pmrr.id is null
</if>
<if test="payDraftingGroupSubItem.mailRemind == 1">
and pmrmr.id is not null
</if>
<if test="payDraftingGroupSubItem.mailRemind == 0">
and pmrmr.id is null
</if>
</where>
</select>
<select id="queryCompanyPageList" resultType="com.jero.drafting.entity.PayDraftingGroupSubItem">
select pwgs.*,pwg.drafting_group_project as chargeProject from pay_drafting_group_subitem pwgs
left join pay_drafting_group pwg ON pwgs.drafting_group_id = pwg.id
<where>
<if test="payDraftingGroupSubItem.chargeProject != null and payDraftingGroupSubItem.chargeProject != ''">
AND pwg.drafting_group_project like concat('%',concat(#{payDraftingGroupSubItem.chargeProject},'%'))
</if>
<if test="payDraftingGroupSubItem.year != null and payDraftingGroupSubItem.year != ''">
AND pwg.year = #{payDraftingGroupSubItem.year}
</if>
<if test="listProjectIds != null and listProjectIds.size() > 0">
AND pwgs.id in
<foreach collection="listProjectIds" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</where>
group by pwgs.id order by pwgs.create_time desc
</select>
<select id="queryCompanyPageListByCompanyManager"
resultType="com.jero.drafting.entity.PayDraftingGroupSubItem">
select pwgs.*,pwg.drafting_group_project as chargeProject from pay_drafting_group_subitem pwgs
left join pay_drafting_group pwg ON pwgs.drafting_group_id = pwg.id
<where>
<if test="payDraftingGroupSubItem.chargeProject != null and payDraftingGroupSubItem.chargeProject != ''">
AND pwg.drafting_group_project like concat('%',concat(#{payDraftingGroupSubItem.chargeProject},'%'))
</if>
<if test="payDraftingGroupSubItem.year != null and payDraftingGroupSubItem.year != ''">
AND pwg.year = #{payDraftingGroupSubItem.year}
</if>
<if test="companyId != null and companyId != ''">
and pwgs.charge_company_id = #{companyId}
</if>
</where>
group by pwgs.id order by pwgs.create_time desc
</select>
</mapper>
@@ -0,0 +1,42 @@
package com.jero.drafting.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.drafting.entity.PayDraftingGroupResearchProject;
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
import com.jero.project.entity.PayResearchProject;
/**
* <p>
* 起草组 在研项目表 服务类
* </p>
*
* @author sz
* @since 2024-01-05
*/
public interface IPayDraftingGroupResearchProjectService extends IService<PayDraftingGroupResearchProject> {
/**
* 分页条件查询
* @param page
* @param queryWrapper
* @return
*/
IPage<PayDraftingGroupResearchProject> pageList(Page<PayDraftingGroupResearchProject> page, QueryWrapper<PayDraftingGroupResearchProject> queryWrapper);
/**
* 新增
* @param id
* @param fileId
* @param projectId
*/
void saveFile(String id, String fileId, String projectId);
/**
* 通过id删除
* @param id
*/
void deleteFile(String id);
}
@@ -0,0 +1,61 @@
package com.jero.drafting.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.drafting.entity.PayDraftingGroup;
import com.jero.drafting.vo.PayDraftingGroupVo;
import com.jero.project.entity.PayWorkingGroup;
import com.jero.project.vo.PayWorkingGroupVO;
import java.util.List;
/**
* <p>
* 起草组表 服务类
* </p>
*
* @author sz
* @since 2024-01-02
*/
public interface IPayDraftingGroupService extends IService<PayDraftingGroup> {
/**
* 分页查询
* @param page
* @param payDraftingGroup
* @return
*/
IPage<PayDraftingGroupVo> queryPageList(Page<PayDraftingGroupVo> page, PayDraftingGroup payDraftingGroup);
/**
* 给PayDraftingGroup 属性赋值
* @param payDraftingGroup
*/
void setPayDraftingGroup(PayDraftingGroup payDraftingGroup);
/**
* 根据工作组的id拿到工作组的名称
* @param payWorkingGroupId
* @return
*/
PayWorkingGroup getPayWorkingGroupNameById(String payWorkingGroupId);
/**
* 根据id删除
* @param id
*/
void deleteById(String id);
/**
* 批量删除
* @param ids
*/
void deleteByIds(List<String> ids);
/**
* 复制
* @param payDraftingGroup
*/
void copy(PayDraftingGroup payDraftingGroup);
}
@@ -0,0 +1,19 @@
package com.jero.drafting.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
import java.util.List;
/**
* <p>
* 起草组成员企业联系人表 服务类
* </p>
*
* @author sz
* @since 2024-01-02
*/
public interface IPayDraftingGroupSubItemContactsService extends IService<PayDraftingGroupSubItemContacts> {
List<PayDraftingGroupSubItemContacts> getContactsInfo(String projectId);
}
@@ -0,0 +1,96 @@
package com.jero.drafting.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.drafting.entity.PayDraftingGroupSubItem;
import com.jero.drafting.vo.CheckVo;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* <p>
* 起草组成员表 服务类
* </p>
*
* @author sz
* @since 2024-01-02
*/
public interface IPayDraftingGroupSubItemService extends IService<PayDraftingGroupSubItem> {
/**
* 分页查询
* @param page
* @param payDraftingGroupSubItem
* @param paymentDate
* @return
*/
IPage<PayDraftingGroupSubItem> queryPageList(Page<PayDraftingGroupSubItem> page, PayDraftingGroupSubItem payDraftingGroupSubItem, String paymentDate);
/**
* 添加
* @param payDraftingGroupSubItem
*/
void addPayDraftingGroupSubItem(PayDraftingGroupSubItem payDraftingGroupSubItem);
/**
* 根据id删除
* @param id
*/
void delete(String id);
/**
* 批量删除
* @param ids
*/
void deleteBatch(String ids);
/**
* 编辑
* @param payDraftingGroupSubItem
*/
void editPayWorkingGroupSubItem(PayDraftingGroupSubItem payDraftingGroupSubItem);
/**
* 企业端编辑
* @param payDraftingGroupSubItem
*/
void editPayWorkingGroupSubItemByCompany(PayDraftingGroupSubItem payDraftingGroupSubItem);
/**
* excel导入
* @param request
*/
void importExcel(HttpServletRequest request);
/**
* 起草组成员-发布提醒列表查询
* @param page
* @param payDraftingGroupSubItem
* @return
*/
IPage<PayDraftingGroupSubItem> publishReminderList(Page<PayDraftingGroupSubItem> page, PayDraftingGroupSubItem payDraftingGroupSubItem);
/**
* 审核报名信息
* @param checkVO
*/
void checkRegister(CheckVo checkVO);
/**
* @Description 企业端-我的工作组分页查询
* @Author lqt
* @Date 2021/9/29
* @Param listProjectIds 项目成员id集合
* @Return
* @Exception
*/
IPage<PayDraftingGroupSubItem> queryCompanyPageList(Page<PayDraftingGroupSubItem> page, PayDraftingGroupSubItem payWorkingGroupSubItem, List<Integer> listNeedInvoice, List<String> listProjectIds);
/**
* 企业端-管理员-我的工作组分页查询
*/
IPage<PayDraftingGroupSubItem> queryCompanyPageListByCompanyManager(Page<PayDraftingGroupSubItem> page, PayDraftingGroupSubItem payWorkingGroupSubItem, List<Integer> listNeedInvoice, String companyId);
}
@@ -0,0 +1,65 @@
package com.jero.drafting.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.jero.drafting.entity.PayDraftingGroupResearchProject;
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
import com.jero.drafting.mapper.PayDraftingGroupResearchProjectMapper;
import com.jero.drafting.mapper.PayDraftingGroupSubItemContactsMapper;
import com.jero.drafting.service.IPayDraftingGroupResearchProjectService;
import com.jero.drafting.service.IPayDraftingGroupSubItemContactsService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
/**
* <p>
* 起草组 在研项目表 服务实现类
* </p>
*
* @author sz
* @since 2024-01-05
*/
@Service
@Transactional
public class PayDraftingGroupResearchProjectServiceImpl extends ServiceImpl<PayDraftingGroupResearchProjectMapper, PayDraftingGroupResearchProject> implements IPayDraftingGroupResearchProjectService {
@Resource
private PayDraftingGroupResearchProjectMapper researchProjectMapper;
/**
* 分页条件查询
* @param page
* @param queryWrapper
* @return
*/
@Override
public IPage<PayDraftingGroupResearchProject> pageList(Page<PayDraftingGroupResearchProject> page, QueryWrapper<PayDraftingGroupResearchProject> queryWrapper) {
return researchProjectMapper.pageList(page,queryWrapper);
}
/**
* 新增
* @param id
* @param fileId
* @param projectId
*/
@Override
public void saveFile(String id, String fileId, String projectId) {
researchProjectMapper.saveFile(id,fileId,projectId);
}
/**
* 通过id删除
*
* @param id
*/
@Override
public void deleteFile(String id) {
researchProjectMapper.deleteFile(id);
}
}
@@ -0,0 +1,399 @@
package com.jero.drafting.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
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.jero.common.common.ProjectCommon;
import com.jero.common.dto.PaySendContactsMessageDTO;
import com.jero.common.exception.JeroBootException;
import com.jero.common.service.ContractCreateProjectSendMessageService;
import com.jero.common.service.RolePermissionService;
import com.jero.common.system.vo.LoginUser;
import com.jero.company.entity.PayContactsManagement;
import com.jero.company.service.IPayContactsManagementService;
import com.jero.drafting.common.DraftingConstant;
import com.jero.drafting.entity.PayDraftingGroup;
import com.jero.drafting.entity.PayDraftingGroupResearchProject;
import com.jero.drafting.entity.PayDraftingGroupSubItem;
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
import com.jero.drafting.mapper.PayDraftingGroupMapper;
import com.jero.drafting.mapper.PayDraftingGroupSubItemContactsMapper;
import com.jero.drafting.service.IPayDraftingGroupResearchProjectService;
import com.jero.drafting.service.IPayDraftingGroupService;
import com.jero.drafting.service.IPayDraftingGroupSubItemService;
import com.jero.drafting.vo.PayDraftingGroupVo;
import com.jero.meeting.common.MeetingCommon;
import com.jero.meeting.entity.PayMeeting;
import com.jero.meeting.service.IPayMeetingService;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.service.ISysUserService;
import com.jero.project.entity.PayWorkingGroup;
import com.jero.project.service.IPayWorkingGroupService;
import com.jero.temporary.entity.PayCompanyManagementTemporary;
import com.jero.temporary.entity.PayContactsManagementTemporary;
import com.jero.temporary.service.IPayCompanyManagementTemporaryService;
import com.jero.temporary.service.IPayContactsManagementTemporaryService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* <p>
* 起草组表 服务实现类
* </p>
*
* @author sz
* @since 2024-01-02
*/
@Service
@Transactional
public class PayDraftingGroupServiceImpl extends ServiceImpl<PayDraftingGroupMapper, PayDraftingGroup> implements IPayDraftingGroupService {
@Resource
private PayDraftingGroupMapper payDraftingGroupMapper;
@Resource
private ISysUserService sysUserService;
@Resource
private IPayWorkingGroupService payWorkingGroupService;
@Resource
private RolePermissionService rolePermissionService;
@Resource
private IPayDraftingGroupSubItemService payDraftingGroupSubItemService;
@Resource
private IPayMeetingService payMeetingService;
@Resource
private IPayDraftingGroupService payDraftingGroupService;
@Resource
private IPayDraftingGroupResearchProjectService payDraftingGroupResearchProjectService;
@Resource
private IPayCompanyManagementTemporaryService payCompanyManagementTemporaryService;
@Resource
private PayDraftingGroupSubItemContactsMapper payDraftingGroupSubItemContactsMapper;
@Resource
private IPayContactsManagementTemporaryService payContactsManagementTemporaryService;
@Resource
private ContractCreateProjectSendMessageService contractCreateProjectSendMessageService;
@Resource
private IPayContactsManagementService payContactsManagementService;
/**
* 分页查询
*
* @param page
* @param payDraftingGroup
* @return
*/
@Override
public IPage<PayDraftingGroupVo> queryPageList(Page<PayDraftingGroupVo> page, PayDraftingGroup payDraftingGroup) {
return payDraftingGroupMapper.queryPageList(page, payDraftingGroup);
}
/**
* 获取负责人A的名称
*
* @param payDraftingGroup
*/
@Override
public void setPayDraftingGroup(PayDraftingGroup payDraftingGroup) {
// 负责人A名称
SysUser principalIdA = sysUserService.getById(payDraftingGroup.getPrincipalIdA());
if (Objects.isNull(principalIdA)) {
throw new JeroBootException("负责人A不存在!");
}
payDraftingGroup.setPrincipalNameA(principalIdA.getRealname());
// 负责人B名称
if (!Objects.isNull(payDraftingGroup.getPrincipalIdB())) {
SysUser principalIdB = sysUserService.getById(payDraftingGroup.getPrincipalIdB());
if (Objects.isNull(principalIdB)) {
throw new JeroBootException("负责人B不存在!");
}
payDraftingGroup.setPrincipalNameB(principalIdB.getRealname());
}
}
/**
* 根据工作组的id拿到工作组的名称
*
* @param payWorkingGroupId
* @return
*/
@Override
public PayWorkingGroup getPayWorkingGroupNameById(String payWorkingGroupId) {
LambdaQueryWrapper<PayWorkingGroup> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PayWorkingGroup::getId, payWorkingGroupId);
PayWorkingGroup payWorkingGroup = payWorkingGroupService.getOne(queryWrapper);
return payWorkingGroup;
}
/**
* 根据id删除
*
* @param id
*/
@Override
public void deleteById(String id) {
PayDraftingGroup payDraftingGroupOld = getById(id);
if (Objects.isNull(payDraftingGroupOld)) {
throw new JeroBootException("该起草组不存在!");
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if (!rolePermissionService.getRolePermission("draftingGroup:delete") && !Objects.equals(payDraftingGroupOld.getPrincipalIdA(), sysUser.getId())) {
throw new JeroBootException(payDraftingGroupOld.getDraftingGroupProject() + "起草组项目不可操作!");
}
LambdaQueryWrapper<PayDraftingGroupSubItem> query = new LambdaQueryWrapper<>();
query.eq(PayDraftingGroupSubItem::getDraftingGroupId, id);
List<PayDraftingGroupSubItem> listPayDraftingGroupSubItem = payDraftingGroupSubItemService.list(query);
if (!CollectionUtils.isEmpty(listPayDraftingGroupSubItem)) {
throw new JeroBootException(payDraftingGroupOld.getDraftingGroupProject() + "起草组下存在企业,不可进行删除!");
}
// LambdaQueryWrapper<PayDraftingGroupSubItem> query = new LambdaQueryWrapper<>();
// query.eq(PayDraftingGroupSubItem::getDraftingGroupId, id);
// List<PayDraftingGroupSubItem> listPayDraftingGroupSubItem = payDraftingGroupSubItemService.list(query);
// if (!CollectionUtils.isEmpty(listPayDraftingGroupSubItem)) {
// for (PayDraftingGroupSubItem payDraftingGroupSubItem : listPayDraftingGroupSubItem) {
// if (!Objects.equals(payDraftingGroupSubItem.getCheckResult(), DraftingConstant.CHECK_REJECTION)) {
// throw new JeroBootException(payDraftingGroupOld.getDraftingGroupProject() + "起草组下存在企业,不可进行删除!");
// }
// }
// }
LambdaQueryWrapper<PayMeeting> meetingQuery = new LambdaQueryWrapper<>();
meetingQuery.eq(PayMeeting::getDraftingGroupId,id);
meetingQuery.eq(PayMeeting::getMeetingType, MeetingCommon.DRAFTING_GROUP_MEETING_INT);
List<PayMeeting> listPayMeeting = payMeetingService.list(meetingQuery);
if (!CollectionUtils.isEmpty(listPayMeeting)) {
throw new JeroBootException(payDraftingGroupOld.getDraftingGroupProject() + "起草组下存在会议,不可进行删除!");
}
removeById(id);
LambdaUpdateWrapper<PayDraftingGroupSubItem> updatePayDraftingGroupSubItem = new LambdaUpdateWrapper<>();
updatePayDraftingGroupSubItem.eq(PayDraftingGroupSubItem::getDraftingGroupId, id);
payDraftingGroupSubItemService.remove(updatePayDraftingGroupSubItem);
LambdaUpdateWrapper<PayDraftingGroupSubItemContacts> updatePayDraftingGroupContacts = new LambdaUpdateWrapper<>();
updatePayDraftingGroupContacts.eq(PayDraftingGroupSubItemContacts::getDraftingGroupId,id);
payDraftingGroupSubItemContactsMapper.delete(updatePayDraftingGroupContacts);
}
/**
* 批量删除
*
* @param ids
*/
@Override
public void deleteByIds(List<String> ids) {
StringBuilder sb = new StringBuilder();
StringBuilder sb1 = new StringBuilder();
ids.forEach(p -> {
PayDraftingGroup payDraftingGroupOld = getById(p);
if (Objects.isNull(payDraftingGroupOld)) {
throw new JeroBootException("起草组不存在!");
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if (!rolePermissionService.getRolePermission("draftingGroup:batchDel") && !Objects.equals(payDraftingGroupOld.getPrincipalIdA(), sysUser.getId())) {
sb.append(payDraftingGroupOld.getDraftingGroupProject() + "起草组项目不可操作!<br/>");
}
LambdaQueryWrapper<PayDraftingGroupSubItem> query = new LambdaQueryWrapper<>();
query.eq(PayDraftingGroupSubItem::getDraftingGroupId, p);
List<PayDraftingGroupSubItem> listPayDraftingGroupSubItem = payDraftingGroupSubItemService.list(query);
if (!CollectionUtils.isEmpty(listPayDraftingGroupSubItem)) {
sb1.append(payDraftingGroupOld.getDraftingGroupProject() + "起草组下存在企业,不可进行删除!<br/>");
}
// LambdaQueryWrapper<PayDraftingGroupSubItem> query = new LambdaQueryWrapper<>();
// query.eq(PayDraftingGroupSubItem::getDraftingGroupId, p);
// List<PayDraftingGroupSubItem> listPayDraftingGroupSubItem = payDraftingGroupSubItemService.list(query);
// if (!CollectionUtils.isEmpty(listPayDraftingGroupSubItem)) {
// for (PayDraftingGroupSubItem payDraftingGroupSubItem : listPayDraftingGroupSubItem) {
// if (!Objects.equals(payDraftingGroupSubItem.getCheckResult(), DraftingConstant.CHECK_REJECTION)) {
// sb1.append(payDraftingGroupOld.getDraftingGroupProject() + "起草组下存在企业,不可进行删除!<br/>");
// break;
// }
// }
// }
LambdaQueryWrapper<PayMeeting> meetingQuery = new LambdaQueryWrapper<>();
meetingQuery.eq(PayMeeting::getDraftingGroupId,p);
meetingQuery.eq(PayMeeting::getMeetingType, MeetingCommon.DRAFTING_GROUP_MEETING_INT);
List<PayMeeting> listPayMeeting = payMeetingService.list(meetingQuery);
if (!CollectionUtils.isEmpty(listPayMeeting)) {
throw new JeroBootException(payDraftingGroupOld.getDraftingGroupProject() + "起草组下存在会议,不可进行删除!<br/>");
}
});
if (!StringUtils.isEmpty(sb)) {
throw new JeroBootException(sb.toString());
}
if (!StringUtils.isEmpty(sb1)) {
throw new JeroBootException(sb1.toString());
}
removeByIds(ids);
LambdaUpdateWrapper<PayDraftingGroupSubItem> updatePayDraftingGroupSubItem = new LambdaUpdateWrapper<>();
updatePayDraftingGroupSubItem.in(PayDraftingGroupSubItem::getDraftingGroupId, ids);
payDraftingGroupSubItemService.remove(updatePayDraftingGroupSubItem);
LambdaUpdateWrapper<PayDraftingGroupSubItemContacts> updatePayDraftingGroupContacts = new LambdaUpdateWrapper<>();
updatePayDraftingGroupContacts.in(PayDraftingGroupSubItemContacts::getDraftingGroupId,ids);
payDraftingGroupSubItemContactsMapper.delete(updatePayDraftingGroupContacts);
}
/**
* 复制
*
* @param payDraftingGroup
*/
@Override
public void copy(PayDraftingGroup payDraftingGroup) {
PayDraftingGroup payDraftingGroupOld = getById(payDraftingGroup.getId());
if(Objects.isNull(payDraftingGroupOld)){
throw new JeroBootException("起草组不存在!");
}
if(payDraftingGroupOld.getDraftingGroupProject().length() == 50){
throw new JeroBootException("起草组名称长度为50位,不可复制,请修改之后再复制!");
}
String str = payDraftingGroupOld.getDraftingGroupProject() + "-副本";
if(str.length() >= 50) {
throw new JeroBootException("起草组名称长度为50位,不可复制,请修改之后再复制!");
}
LambdaQueryWrapper<PayDraftingGroup> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.like(PayDraftingGroup::getDraftingGroupProject,str);
List<PayDraftingGroup> listPayDraftingGroup = list(queryWrapper);
if(!CollectionUtils.isEmpty(listPayDraftingGroup)){
String rex = "^[0-9]*[1-9][0-9]*$";
List<Integer> list = new ArrayList<>();
String finalStr = str;
listPayDraftingGroup.forEach(p->{
String project = p.getDraftingGroupProject();
if(!StringUtils.isEmpty(project) && !Objects.equals(p.getId(),payDraftingGroupOld.getId())){
String projectNew = project.substring(finalStr.length());
Pattern pa = Pattern.compile(rex);
Matcher m = pa.matcher(projectNew);
if (m.find()){
list.add(Integer.parseInt(projectNew));
}
}
});
if(!CollectionUtils.isEmpty(list)){
int m = list.stream().max(Comparator.comparing(Integer::intValue)).get();
str = str + (m + 1);
}
}else{
str = str + 1;
}
payDraftingGroupOld.setId(null);
payDraftingGroupOld.setDraftingGroupProject(str);
payDraftingGroupOld.setCreateBy(null);
payDraftingGroupOld.setCreateTime(null);
payDraftingGroupOld.setUpdateBy(null);
payDraftingGroupOld.setUpdateTime(null);
setPayDraftingGroup(payDraftingGroupOld);
payDraftingGroupService.save(payDraftingGroupOld);
//拷贝在研项目
QueryWrapper<PayDraftingGroupResearchProject> researchProjectQueryWrapper = new QueryWrapper<>();
researchProjectQueryWrapper.eq("drafting_group_id",payDraftingGroup.getId());
List<PayDraftingGroupResearchProject> list = payDraftingGroupResearchProjectService.list(researchProjectQueryWrapper);
if(ObjectUtils.isNotEmpty(list)){
for(PayDraftingGroupResearchProject payResearchProject:list){
payResearchProject.setDraftingGroupId(payDraftingGroupOld.getId());
payResearchProject.setId(null);
payDraftingGroupResearchProjectService.save(payResearchProject);
//复制在研关联文件表
if(StringUtils.isNotBlank(payResearchProject.getFiles())){
String files = payResearchProject.getFiles();
List<String> filesList = Arrays.asList(files.split(","));
for(String s:filesList){
UUID uuid = UUID.randomUUID();
payDraftingGroupResearchProjectService.saveFile(uuid.toString(),s,payResearchProject.getId());
}
}
}
}
// 拷贝起草组成员
LambdaQueryWrapper<PayDraftingGroupSubItem> query = new LambdaQueryWrapper<>();
query.eq(PayDraftingGroupSubItem::getDraftingGroupId,payDraftingGroup.getId());
List<PayDraftingGroupSubItem> listPayDraftGroupSubItem = payDraftingGroupSubItemService.list(query);
if(!CollectionUtils.isEmpty(listPayDraftGroupSubItem)){
listPayDraftGroupSubItem.forEach(p->{
String draftingGroupSubItemId = p.getId();
// 添加企业临时数据
PayCompanyManagementTemporary payCompanyManagementTemporary = payCompanyManagementTemporaryService.getById(p.getChargeCompanyTemporaryId());
if(Objects.isNull(payCompanyManagementTemporary)){
payCompanyManagementTemporary = payCompanyManagementTemporaryService.insertCompanyManagementTemporary(p.getChargeCompanyId());
}else{
payCompanyManagementTemporary.setCompanyId(payCompanyManagementTemporary.getCompanyId());
payCompanyManagementTemporary.setId(null);
payCompanyManagementTemporaryService.save(payCompanyManagementTemporary);
}
//暂存历史联系人
List<PayDraftingGroupSubItemContacts> subItemContacts = payDraftingGroupSubItemContactsMapper.getSubItemContacts(draftingGroupSubItemId);
p.setPayDraftingGroupSubItemContactsList(subItemContacts);
p.setChargeCompanyTemporaryId(payCompanyManagementTemporary.getId());
p.setId(null);
p.setCreateBy(null);
p.setCreateTime(null);
p.setUpdateBy(null);
p.setUpdateTime(null);
p.setDraftingGroupId(payDraftingGroupOld.getId());
});
payDraftingGroupSubItemService.saveBatch(listPayDraftGroupSubItem);
//拷贝起草组成员联系人
listPayDraftGroupSubItem.forEach(p->{
List<PayDraftingGroupSubItemContacts> itemContactsList = p.getPayDraftingGroupSubItemContactsList();
for (PayDraftingGroupSubItemContacts subItemContacts : itemContactsList) {
PayContactsManagementTemporary payContactsManagementTemporary = payContactsManagementTemporaryService.getById(subItemContacts.getContactsTemporaryId());
if(Objects.isNull(payContactsManagementTemporary)){
payContactsManagementTemporary = payContactsManagementTemporaryService.insertContactsManagementTemporary(subItemContacts.getContactsId());
}else{
payContactsManagementTemporary.setId(null);
payContactsManagementTemporary.setCompanyId(p.getChargeCompanyTemporaryId());
payContactsManagementTemporaryService.save(payContactsManagementTemporary);
}
subItemContacts.setId(null);
subItemContacts.setDraftingGroupId(p.getDraftingGroupId());
subItemContacts.setContactsTemporaryId(payContactsManagementTemporary.getId());
subItemContacts.setDraftingGroupSubId(p.getId());
payDraftingGroupSubItemContactsMapper.insert(subItemContacts);
}
});
listPayDraftGroupSubItem.forEach(p->{
JSONObject json = new JSONObject();
json.put("type", ProjectCommon.INFO_TYPE9);
json.put("DraftingGroupId",p.getDraftingGroupId());
json.put("projectId",p.getId());
json.put("path","/draftTeam/DraftTeamDetail");
//新建项目 给企业联系人发消息
List<PayDraftingGroupSubItemContacts> itemContactsList = p.getPayDraftingGroupSubItemContactsList();
for (PayDraftingGroupSubItemContacts subItemContacts : itemContactsList) {
PayContactsManagement payContactsManagement = payContactsManagementService.getById(subItemContacts.getContactsId());
if (!Objects.isNull(payContactsManagement)) {
PaySendContactsMessageDTO paySendContactsMessageDTO = new PaySendContactsMessageDTO();
paySendContactsMessageDTO.setProjectName(payDraftingGroupOld.getDraftingGroupProject());
paySendContactsMessageDTO.setProjectId(p.getId());
paySendContactsMessageDTO.setEmail(payContactsManagement.getEmail());
paySendContactsMessageDTO.setUserId(payDraftingGroupOld.getPrincipalIdA());
paySendContactsMessageDTO.setPhone(payContactsManagement.getPhone());
paySendContactsMessageDTO.setFlag(ProjectCommon.FLAG0);
paySendContactsMessageDTO.setJson(json);
contractCreateProjectSendMessageService.createProjectSendMessageToContactsService(paySendContactsMessageDTO);
}
}
});
}
}
}
@@ -0,0 +1,54 @@
package com.jero.drafting.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
import com.jero.drafting.mapper.PayDraftingGroupSubItemContactsMapper;
import com.jero.drafting.service.IPayDraftingGroupSubItemContactsService;
import com.jero.temporary.entity.PayContactsManagementTemporary;
import com.jero.temporary.service.IPayContactsManagementTemporaryService;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
/**
* <p>
* 起草组成员企业联系人表 服务实现类
* </p>
*
* @author sz
* @since 2024-01-02
*/
@Service
public class PayDraftingGroupSubItemContactsServiceImpl extends ServiceImpl<PayDraftingGroupSubItemContactsMapper, PayDraftingGroupSubItemContacts> implements IPayDraftingGroupSubItemContactsService {
@Resource
private IPayContactsManagementTemporaryService payContactsManagementTemporaryService;
@Override
public List<PayDraftingGroupSubItemContacts> getContactsInfo(String projectId){
//1.获取成员信息
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> queryPayDraftingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayDraftingGroupSubItemContacts.eq(PayDraftingGroupSubItemContacts::getDraftingGroupId,projectId);
List<PayDraftingGroupSubItemContacts> listPayDraftingGroupSubItemContacts = this.list(queryPayDraftingGroupSubItemContacts);
if(CollectionUtils.isEmpty(listPayDraftingGroupSubItemContacts)){
return listPayDraftingGroupSubItemContacts;
}
//2.根据成员id获取用户信息
List<String> temporaryIds = listPayDraftingGroupSubItemContacts.stream().map(PayDraftingGroupSubItemContacts::getContactsTemporaryId).collect(Collectors.toList());
List<PayContactsManagementTemporary> contactsManagementTemporaryList = payContactsManagementTemporaryService.listByIds(temporaryIds);
Map<String, PayContactsManagementTemporary> collectMap = contactsManagementTemporaryList.stream().collect(Collectors.toMap(PayContactsManagementTemporary::getId, PayContactsManagementTemporary -> PayContactsManagementTemporary));
for (PayDraftingGroupSubItemContacts subItemContacts : listPayDraftingGroupSubItemContacts) {
String contactsTemporaryId = subItemContacts.getContactsTemporaryId();
PayContactsManagementTemporary payContactsManagementTemporary = collectMap.get(contactsTemporaryId);
if(!Objects.isNull(payContactsManagementTemporary)) {
subItemContacts.setCompanyName(payContactsManagementTemporary.getCompanyName());
}
}
return listPayDraftingGroupSubItemContacts;
}
}
@@ -0,0 +1,850 @@
package com.jero.drafting.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
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.jero.common.common.ProjectCommon;
import com.jero.common.dto.PaySendContactsMessageDTO;
import com.jero.common.exception.JeroBootException;
import com.jero.common.service.ContractCreateProjectSendMessageService;
import com.jero.common.service.RolePermissionService;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.ImportExcelUtil;
import com.jero.common.util.ValidUtil;
import com.jero.company.entity.PayCompanyManagement;
import com.jero.company.entity.PayContactsManagement;
import com.jero.company.service.IPayCompanyManagementService;
import com.jero.company.service.IPayContactsManagementService;
import com.jero.drafting.common.DraftingConstant;
import com.jero.drafting.entity.PayDraftingGroup;
import com.jero.drafting.entity.PayDraftingGroupSubItem;
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
import com.jero.drafting.mapper.PayDraftingGroupSubItemContactsMapper;
import com.jero.drafting.mapper.PayDraftingGroupSubItemMapper;
import com.jero.drafting.service.IPayDraftingGroupService;
import com.jero.drafting.service.IPayDraftingGroupSubItemContactsService;
import com.jero.drafting.service.IPayDraftingGroupSubItemService;
import com.jero.drafting.vo.CheckVo;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.service.ISysUserService;
import com.jero.temporary.entity.PayCompanyManagementTemporary;
import com.jero.temporary.entity.PayContactsManagementTemporary;
import com.jero.temporary.service.IPayCompanyManagementTemporaryService;
import com.jero.temporary.service.IPayContactsManagementTemporaryService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.jeecgframework.poi.excel.ExcelImportCheckUtil;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
import java.util.stream.Collectors;
/**
* <p>
* 起草组成员表 服务实现类
* </p>
*
* @author sz
* @since 2024-01-02
*/
@Service
@Transactional
public class PayDraftingGroupSubItemServiceImpl extends ServiceImpl<PayDraftingGroupSubItemMapper, PayDraftingGroupSubItem> implements IPayDraftingGroupSubItemService {
@Resource
private PayDraftingGroupSubItemMapper payDraftingGroupSubItemMapper;
@Resource
private IPayDraftingGroupSubItemContactsService payDraftingGroupSubItemContactsService;
@Resource
private IPayDraftingGroupService payDraftingGroupService;
@Resource
private IPayDraftingGroupSubItemService payDraftingGroupSubItemService;
@Resource
private IPayCompanyManagementTemporaryService payCompanyManagementTemporaryService;
@Resource
private IPayContactsManagementTemporaryService payContactsManagementTemporaryService;
@Resource
private ISysUserService sysUserService;
@Resource
private IPayCompanyManagementService payCompanyManagementService;
@Resource
private IPayContactsManagementService payContactsManagementService;
@Resource
private RolePermissionService rolePermissionService;
@Resource
private PayDraftingGroupSubItemContactsMapper payDraftingGroupSubItemContactsMapper;
@Resource
private ContractCreateProjectSendMessageService contractCreateProjectSendMessageService;
/**
* 分页查询
*
* @param page
* @param payDraftingGroupSubItem
* @param paymentDate
* @return
*/
@Override
public IPage<PayDraftingGroupSubItem> queryPageList(Page<PayDraftingGroupSubItem> page, PayDraftingGroupSubItem payDraftingGroupSubItem, String paymentDate) {
IPage<PayDraftingGroupSubItem> payDraftingGroupSubItemIPage = payDraftingGroupSubItemMapper.queryPageList(page, payDraftingGroupSubItem, paymentDate);
List<PayDraftingGroupSubItem> records = payDraftingGroupSubItemIPage.getRecords();
if (!CollectionUtils.isEmpty(records)) {
// 获取企业联系人
List<String> listIds = records.stream().map(PayDraftingGroupSubItem::getId).collect(Collectors.toList());
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> queryDraftingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryDraftingGroupSubItemContacts.in(PayDraftingGroupSubItemContacts::getDraftingGroupSubId, listIds);
List<PayDraftingGroupSubItemContacts> payDraftingGroupSubItemContactsList = payDraftingGroupSubItemContactsService.list(queryDraftingGroupSubItemContacts);
for (PayDraftingGroupSubItem draftingGroupSubItem : records) {
if (!CollectionUtils.isEmpty(payDraftingGroupSubItemContactsList)) {
List<PayDraftingGroupSubItemContacts> pdg = payDraftingGroupSubItemContactsList.stream().filter(p -> Objects.equals(p.getDraftingGroupSubId(), draftingGroupSubItem.getId())).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(pdg)) {
pdg.sort(Comparator.comparing(PayDraftingGroupSubItemContacts::getOrderNum));
draftingGroupSubItem.setContactsTemporaryNameOne(pdg.get(0).getContactsTemporaryName());
draftingGroupSubItem.setPayDraftingGroupSubItemContactsList(pdg);
} else {
draftingGroupSubItem.setContactsTemporaryNameOne("");
draftingGroupSubItem.setPayDraftingGroupSubItemContactsList(null);
}
} else {
draftingGroupSubItem.setContactsTemporaryNameOne("");
draftingGroupSubItem.setPayDraftingGroupSubItemContactsList(null);
}
}
}
return payDraftingGroupSubItemIPage;
}
/**
* 添加
*
* @param payDraftingGroupSubItem
*/
@Override
public void addPayDraftingGroupSubItem(PayDraftingGroupSubItem payDraftingGroupSubItem) {
// 验证企业联系人list中是否有重复的联系人
List<PayDraftingGroupSubItemContacts> payDraftingGroupSubItemContactsList = payDraftingGroupSubItem.getPayDraftingGroupSubItemContactsList();
if (!CollectionUtils.isEmpty(payDraftingGroupSubItemContactsList)) {
long oldNum = payDraftingGroupSubItemContactsList.size();
long newNum = payDraftingGroupSubItemContactsList.stream().map(PayDraftingGroupSubItemContacts::getContactsId).collect(Collectors.toList()).stream().distinct().count();
if (oldNum != newNum) {
throw new JeroBootException("企业联系人重复");
}
}
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(payDraftingGroupSubItem.getDraftingGroupId());
if (Objects.isNull(payDraftingGroup)) {
throw new JeroBootException("起草组不存在!");
}
try {
// 编辑保存前再次校验来款项目是否存在
LambdaQueryWrapper<PayDraftingGroupSubItem> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PayDraftingGroupSubItem::getDraftingGroupId, payDraftingGroupSubItem.getDraftingGroupId());
queryWrapper.eq(PayDraftingGroupSubItem::getChargeCompanyId, payDraftingGroupSubItem.getChargeCompanyId());
queryWrapper.ne(PayDraftingGroupSubItem::getCheckResult,DraftingConstant.CHECK_REJECTION);
PayDraftingGroupSubItem payDraftingGroupSubItemNew = payDraftingGroupSubItemService.getOne(queryWrapper);
// 企业和联系人同时存在,则校验不通过
if (!Objects.isNull(payDraftingGroupSubItemNew)) {
throw new JeroBootException("起草组成员单位已存在!");
}
} catch (Exception e) {
throw new JeroBootException("起草组成员单位已存在!");
}
setPayDraftingGroupSubItemAdd(payDraftingGroupSubItem);
payDraftingGroupSubItemService.save(payDraftingGroupSubItem);
List<PayDraftingGroupSubItemContacts> listPayDraftingGroupSubItemContactsNew = payDraftingGroupSubItem.getPayDraftingGroupSubItemContactsList();
// 添加联系人表
if (!CollectionUtils.isEmpty(listPayDraftingGroupSubItemContactsNew)) {
for (int i = 0; i < listPayDraftingGroupSubItemContactsNew.size(); i++) {
listPayDraftingGroupSubItemContactsNew.get(i).setOrderNum(i + 1);
listPayDraftingGroupSubItemContactsNew.get(i).setDraftingGroupId(payDraftingGroupSubItem.getDraftingGroupId());
listPayDraftingGroupSubItemContactsNew.get(i).setDraftingGroupSubId(payDraftingGroupSubItem.getId());
}
payDraftingGroupSubItemContactsService.saveBatch(listPayDraftingGroupSubItemContactsNew);
}
SysUser sysUserInfo = sysUserService.getById(payDraftingGroup.getPrincipalIdA());
if (Objects.isNull(sysUserInfo)) {
throw new JeroBootException("负责人不存在!");
}
// 如果是审核通过的状态就发送消息
if (Objects.equals(payDraftingGroupSubItem.getCheckResult(),DraftingConstant.CHECK_PASS)){
sendMessage(payDraftingGroupSubItem, payDraftingGroup, listPayDraftingGroupSubItemContactsNew);
}
}
private void sendMessage(PayDraftingGroupSubItem payDraftingGroupSubItem, PayDraftingGroup payDraftingGroup, List<PayDraftingGroupSubItemContacts> listPayDraftingGroupSubItemContactsNew) {
JSONObject json = new JSONObject();
json.put("type",ProjectCommon.INFO_TYPE9);
json.put("draftGroupId", payDraftingGroupSubItem.getDraftingGroupId());
json.put("projectId", payDraftingGroupSubItem.getId());
json.put("path","/draftTeam/DraftTeamDetail");
//新建项目 给企业联系人发消息
if(!CollectionUtils.isEmpty(listPayDraftingGroupSubItemContactsNew)) {
for (PayDraftingGroupSubItemContacts subItemContacts : listPayDraftingGroupSubItemContactsNew) {
PayContactsManagement payContactsManagement = payContactsManagementService.getById(subItemContacts.getContactsId());
if (!Objects.isNull(payContactsManagement)) {
PaySendContactsMessageDTO paySendContactsMessageDTO = new PaySendContactsMessageDTO();
paySendContactsMessageDTO.setProjectName(payDraftingGroup.getDraftingGroupProject());
paySendContactsMessageDTO.setProjectId(payDraftingGroupSubItem.getId());
paySendContactsMessageDTO.setEmail(payContactsManagement.getEmail());
paySendContactsMessageDTO.setUserId(payDraftingGroup.getPrincipalIdA());
paySendContactsMessageDTO.setPhone(payContactsManagement.getPhone());
paySendContactsMessageDTO.setFlag(ProjectCommon.FLAG0);
paySendContactsMessageDTO.setJson(json);
contractCreateProjectSendMessageService.createProjectSendMessageToContactsService(paySendContactsMessageDTO);
}
}
}
}
/**
* 插入企业信息,联系人信息到临时表,更新项目记录
*
* @param payDraftingGroupSubItem
*/
private void setPayDraftingGroupSubItemAdd(PayDraftingGroupSubItem payDraftingGroupSubItem) {
// 企业
PayCompanyManagementTemporary chargeCompanyName = payCompanyManagementTemporaryService.insertCompanyManagementTemporary(payDraftingGroupSubItem.getChargeCompanyId());
if (Objects.isNull(chargeCompanyName)) {
throw new JeroBootException("企业名称为空!");
}
payDraftingGroupSubItem.setChargeCompanyTemporaryId(chargeCompanyName.getId());
payDraftingGroupSubItem.setChargeCompanyTemporaryName(chargeCompanyName.getCompanyName());
List<PayDraftingGroupSubItemContacts> payDraftingGroupSubItemContactsList = payDraftingGroupSubItem.getPayDraftingGroupSubItemContactsList();
if (!CollectionUtils.isEmpty(payDraftingGroupSubItemContactsList)) {
for (int i = 0; i < payDraftingGroupSubItemContactsList.size(); i++) {
// 企业联系人
PayContactsManagementTemporary contactsName = payContactsManagementTemporaryService.insertContactsManagementTemporary(payDraftingGroupSubItemContactsList.get(i).getContactsId());
if (Objects.isNull(contactsName)) {
throw new JeroBootException("企业联系人" + (i + 1) + "名称为空!");
}
payDraftingGroupSubItemContactsList.get(i).setContactsTemporaryId(contactsName.getId());
payDraftingGroupSubItemContactsList.get(i).setContactsTemporaryName(contactsName.getName());
}
}
}
/**
* 根据id删除
*
* @param id
*/
@Override
public void delete(String id) {
if (StringUtils.isBlank(id)) {
throw new JeroBootException("id不能为空!");
}
deleteProject(id, "draftingGroupMember:delete");
payDraftingGroupSubItemService.removeById(id);
// 删除成员企业联系人
LambdaUpdateWrapper<PayDraftingGroupSubItemContacts> updatePayWorkingGroupSubItemContacts = new LambdaUpdateWrapper<>();
updatePayWorkingGroupSubItemContacts.eq(PayDraftingGroupSubItemContacts::getDraftingGroupSubId, id);
payDraftingGroupSubItemContactsService.remove(updatePayWorkingGroupSubItemContacts);
}
/**
* 删除联系信息
*
* @param id
* @param perm
*/
private void deleteProject(String id, String perm) {
PayDraftingGroupSubItem payDraftingGroupSubItem = payDraftingGroupSubItemService.getById(id);
if (Objects.isNull(payDraftingGroupSubItem)) {
throw new JeroBootException("该成员不存在!");
}
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(payDraftingGroupSubItem.getDraftingGroupId());
if (Objects.isNull(payDraftingGroup)) {
throw new JeroBootException("起草组不存在!");
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if (!rolePermissionService.getRolePermission(perm)
&& !Objects.equals(payDraftingGroup.getPrincipalIdA(), sysUser.getId())
&& !Objects.equals(payDraftingGroup.getPrincipalIdB(), sysUser.getId())) {
throw new JeroBootException("起草组成员不可操作!");
}
// 删除企业联系人临时数据
payCompanyManagementTemporaryService.removeById(payDraftingGroupSubItem.getChargeCompanyTemporaryId());
List<PayDraftingGroupSubItemContacts> subItemContacts = payDraftingGroupSubItemContactsMapper.getSubItemContacts(id);
List<String> temporaryIds = subItemContacts.stream().map(PayDraftingGroupSubItemContacts::getContactsTemporaryId).collect(Collectors.toList());
payContactsManagementTemporaryService.removeByIds(temporaryIds);
}
/**
* 批量删除
*
* @param ids
*/
@Override
public void deleteBatch(String ids) {
if (StringUtils.isBlank(ids)) {
throw new JeroBootException("id不能为空!");
}
String[] s = ids.split(",");
for (String s1 : s) {
if (StringUtils.isBlank(s1)) {
throw new JeroBootException("id不能为空!");
}
deleteProject(s1, "draftingGroupMember:batchDel");
}
payDraftingGroupSubItemService.removeByIds(Arrays.asList(ids.split(",")));
// 删除成员企业联系人
LambdaUpdateWrapper<PayDraftingGroupSubItemContacts> updatePayWorkingGroupSubItemContacts = new LambdaUpdateWrapper<>();
updatePayWorkingGroupSubItemContacts.in(PayDraftingGroupSubItemContacts::getDraftingGroupSubId, Arrays.asList(ids.split(",")));
payDraftingGroupSubItemContactsService.remove(updatePayWorkingGroupSubItemContacts);
}
/**
* 编辑
*
* @param payDraftingGroupSubItem
*/
@Override
public void editPayWorkingGroupSubItem(PayDraftingGroupSubItem payDraftingGroupSubItem) {
String draftingGroupSubItemId = payDraftingGroupSubItem.getId();
PayDraftingGroupSubItem payDraftingGroupSubItemOld = payDraftingGroupSubItemService.getById(draftingGroupSubItemId);
if (Objects.isNull(payDraftingGroupSubItemOld)) {
throw new JeroBootException("项目不存在!");
}
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(payDraftingGroupSubItemOld.getDraftingGroupId());
if (Objects.isNull(payDraftingGroup)) {
throw new JeroBootException("起草组不存在!");
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if (!rolePermissionService.getRolePermission("draftingGroupMember:edit")
&& !Objects.equals(payDraftingGroup.getPrincipalIdA(), sysUser.getId())
&& !Objects.equals(payDraftingGroup.getPrincipalIdB(), sysUser.getId())) {
throw new JeroBootException("起草组成员不可操作!");
}
try {
// 编辑保存前再次校验来款项目是否存在
LambdaQueryWrapper<PayDraftingGroupSubItem> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PayDraftingGroupSubItem::getDraftingGroupId, payDraftingGroupSubItem.getDraftingGroupId());
queryWrapper.eq(PayDraftingGroupSubItem::getChargeCompanyId, payDraftingGroupSubItem.getChargeCompanyId());
PayDraftingGroupSubItem payDraftingGroupSubItemNew = payDraftingGroupSubItemService.getOne(queryWrapper);
// 企业和联系人同时存在,则校验不通过
if (!Objects.isNull(payDraftingGroupSubItemNew) && !Objects.equals(payDraftingGroupSubItemNew.getId(), draftingGroupSubItemId)) {
throw new JeroBootException("起草组成员单位已存在!");
}
} catch (Exception e) {
throw new JeroBootException("起草组成员单位已存在!");
}
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> queryPayDraftingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayDraftingGroupSubItemContacts.eq(PayDraftingGroupSubItemContacts::getDraftingGroupSubId, payDraftingGroupSubItemOld.getId());
List<PayDraftingGroupSubItemContacts> listPayDraftingGroupSubItemContacts = payDraftingGroupSubItemContactsService.list(queryPayDraftingGroupSubItemContacts);
if (!CollectionUtils.isEmpty(listPayDraftingGroupSubItemContacts)) {
payDraftingGroupSubItemOld.setPayDraftingGroupSubItemContactsList(listPayDraftingGroupSubItemContacts);
}
setPayDraftingGroupSubItemEdit(payDraftingGroupSubItem, payDraftingGroupSubItemOld);
List<PayDraftingGroupSubItemContacts> listPayDraftingGroupSubItemContactsNew = payDraftingGroupSubItem.getPayDraftingGroupSubItemContactsList();
// 添加联系人表
if (!CollectionUtils.isEmpty(listPayDraftingGroupSubItemContactsNew)) {
// 先删除之前的企业联系人
LambdaUpdateWrapper<PayDraftingGroupSubItemContacts> updatePayWorkingGroupSubItemContacts = new LambdaUpdateWrapper<>();
updatePayWorkingGroupSubItemContacts.eq(PayDraftingGroupSubItemContacts::getDraftingGroupSubId, draftingGroupSubItemId);
payDraftingGroupSubItemContactsService.remove(updatePayWorkingGroupSubItemContacts);
// 添加新的企业联系人
for (int i = 0; i < listPayDraftingGroupSubItemContactsNew.size(); i++) {
listPayDraftingGroupSubItemContactsNew.get(i).setOrderNum(i + 1);
listPayDraftingGroupSubItemContactsNew.get(i).setDraftingGroupSubId(draftingGroupSubItemId);
listPayDraftingGroupSubItemContactsNew.get(i).setDraftingGroupId(payDraftingGroupSubItem.getDraftingGroupId());
}
payDraftingGroupSubItemContactsService.saveBatch(listPayDraftingGroupSubItemContactsNew);
}
payDraftingGroupSubItemService.updateById(payDraftingGroupSubItem);
}
/**
* 编辑
*
* @param payDraftingGroupSubItem
*/
@Override
public void editPayWorkingGroupSubItemByCompany(PayDraftingGroupSubItem payDraftingGroupSubItem) {
String draftingGroupSubItemId = payDraftingGroupSubItem.getId();
PayDraftingGroupSubItem payDraftingGroupSubItemOld = payDraftingGroupSubItemService.getById(draftingGroupSubItemId);
if (Objects.isNull(payDraftingGroupSubItemOld)) {
throw new JeroBootException("项目不存在!");
}
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(payDraftingGroupSubItemOld.getDraftingGroupId());
if (Objects.isNull(payDraftingGroup)) {
throw new JeroBootException("起草组不存在!");
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// 判断当前登录人是否为企业联系人
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> queryDraftingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryDraftingGroupSubItemContacts.eq(PayDraftingGroupSubItemContacts::getDraftingGroupSubId, draftingGroupSubItemId);
queryDraftingGroupSubItemContacts.eq(PayDraftingGroupSubItemContacts::getContactsId,sysUser.getId());
long l = payDraftingGroupSubItemContactsService.count(queryDraftingGroupSubItemContacts);
if(l == 0){
throw new JeroBootException("非起草组成员不可操作!");
}
try {
// 编辑保存前再次校验来款项目是否存在
LambdaQueryWrapper<PayDraftingGroupSubItem> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PayDraftingGroupSubItem::getDraftingGroupId, payDraftingGroupSubItem.getDraftingGroupId());
queryWrapper.eq(PayDraftingGroupSubItem::getChargeCompanyId, payDraftingGroupSubItem.getChargeCompanyId());
PayDraftingGroupSubItem payDraftingGroupSubItemNew = payDraftingGroupSubItemService.getOne(queryWrapper);
// 企业和联系人同时存在,则校验不通过
if (!Objects.isNull(payDraftingGroupSubItemNew) && !Objects.equals(payDraftingGroupSubItemNew.getId(), draftingGroupSubItemId)) {
throw new JeroBootException("起草组成员单位已存在!");
}
} catch (Exception e) {
throw new JeroBootException("起草组成员单位已存在!");
}
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> queryPayDraftingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayDraftingGroupSubItemContacts.eq(PayDraftingGroupSubItemContacts::getDraftingGroupSubId, payDraftingGroupSubItemOld.getId());
List<PayDraftingGroupSubItemContacts> listPayDraftingGroupSubItemContacts = payDraftingGroupSubItemContactsService.list(queryPayDraftingGroupSubItemContacts);
if (!CollectionUtils.isEmpty(listPayDraftingGroupSubItemContacts)) {
payDraftingGroupSubItemOld.setPayDraftingGroupSubItemContactsList(listPayDraftingGroupSubItemContacts);
}
setPayDraftingGroupSubItemEdit(payDraftingGroupSubItem, payDraftingGroupSubItemOld);
List<PayDraftingGroupSubItemContacts> listPayDraftingGroupSubItemContactsNew = payDraftingGroupSubItem.getPayDraftingGroupSubItemContactsList();
// 添加联系人表
if (!CollectionUtils.isEmpty(listPayDraftingGroupSubItemContactsNew)) {
// 先删除之前的企业联系人
LambdaUpdateWrapper<PayDraftingGroupSubItemContacts> updatePayWorkingGroupSubItemContacts = new LambdaUpdateWrapper<>();
updatePayWorkingGroupSubItemContacts.eq(PayDraftingGroupSubItemContacts::getDraftingGroupSubId, draftingGroupSubItemId);
payDraftingGroupSubItemContactsService.remove(updatePayWorkingGroupSubItemContacts);
// 添加新的企业联系人
for (int i = 0; i < listPayDraftingGroupSubItemContactsNew.size(); i++) {
listPayDraftingGroupSubItemContactsNew.get(i).setOrderNum(i + 1);
listPayDraftingGroupSubItemContactsNew.get(i).setDraftingGroupSubId(draftingGroupSubItemId);
listPayDraftingGroupSubItemContactsNew.get(i).setDraftingGroupId(payDraftingGroupSubItem.getDraftingGroupId());
}
payDraftingGroupSubItemContactsService.saveBatch(listPayDraftingGroupSubItemContactsNew);
}
payDraftingGroupSubItemService.updateById(payDraftingGroupSubItem);
}
/**
* 插入企业信息,联系人信息到临时表,更新项目记录
*
* @param payDraftingGroupSubItem
* @param payDraftingGroupSubItemOld
*/
private void setPayDraftingGroupSubItemEdit(PayDraftingGroupSubItem payDraftingGroupSubItem, PayDraftingGroupSubItem payDraftingGroupSubItemOld) {
if (!Objects.equals(payDraftingGroupSubItemOld.getChargeCompanyTemporaryId(), payDraftingGroupSubItem.getChargeCompanyId())) {
// 企业信息
PayCompanyManagementTemporary chargeCompanyName = payCompanyManagementTemporaryService.insertCompanyManagementTemporary(payDraftingGroupSubItem.getChargeCompanyId());
if (Objects.isNull(chargeCompanyName)) {
throw new JeroBootException("企业名称为空!");
}
payDraftingGroupSubItem.setChargeCompanyTemporaryId(chargeCompanyName.getId());
payDraftingGroupSubItem.setChargeCompanyTemporaryName(chargeCompanyName.getCompanyName());
payCompanyManagementTemporaryService.removeById(payDraftingGroupSubItemOld.getChargeCompanyTemporaryId());
} else {
payDraftingGroupSubItem.setChargeCompanyId(payDraftingGroupSubItemOld.getChargeCompanyId());
}
// 企业联系人信息
List<PayDraftingGroupSubItemContacts> payDraftingGroupSubItemContactsList = payDraftingGroupSubItem.getPayDraftingGroupSubItemContactsList();
if (!CollectionUtils.isEmpty(payDraftingGroupSubItemContactsList)) {
// 删除临时表历史记录
if (!CollectionUtils.isEmpty(payDraftingGroupSubItemOld.getPayDraftingGroupSubItemContactsList())) {
List<String> list = payDraftingGroupSubItemOld.getPayDraftingGroupSubItemContactsList().stream().map(PayDraftingGroupSubItemContacts::getContactsTemporaryId).collect(Collectors.toList());
payContactsManagementTemporaryService.removeByIds(list);
}
// 删除联系人记录
LambdaUpdateWrapper<PayDraftingGroupSubItemContacts> updatePayDraftingGroupSubItemContacts = new LambdaUpdateWrapper<>();
updatePayDraftingGroupSubItemContacts.eq(PayDraftingGroupSubItemContacts::getDraftingGroupSubId, payDraftingGroupSubItem.getId());
payDraftingGroupSubItemContactsService.remove(updatePayDraftingGroupSubItemContacts);
// 新增
for (int i = 0; i < payDraftingGroupSubItemContactsList.size(); i++) {
// 企业联系人
PayContactsManagementTemporary contactsName = payContactsManagementTemporaryService.insertContactsManagementTemporary(payDraftingGroupSubItemContactsList.get(i).getContactsId());
if (Objects.isNull(contactsName)) {
throw new JeroBootException("企业联系人" + (i + 1) + "名称为空!");
}
payDraftingGroupSubItemContactsList.get(i).setContactsTemporaryId(contactsName.getId());
payDraftingGroupSubItemContactsList.get(i).setContactsTemporaryName(contactsName.getName());
}
}
}
/**
* excel导入
*
* @param request
*/
@Override
public void importExcel(HttpServletRequest request) {
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
String draftGroupId;
try {
draftGroupId = multipartRequest.getParameter("draftGroupId");
}catch (Exception e){
log.error("获取起草组id异常",e);
throw new JeroBootException("起草组id不能为空 !");
}
if(StringUtils.isBlank(draftGroupId)){
throw new JeroBootException("起草组id不能为空 !");
}
StringBuilder msg = new StringBuilder();
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
MultipartFile file = entity.getValue();// 获取上传文件对象
// 校验文件是否为excel
if(!ImportExcelUtil.checkExcelFile(file)){
throw new JeroBootException("请导入excel文件!");
}
ImportParams params = new ImportParams();
params.setTitleRows(1);
params.setHeadRows(1);
try {
Boolean t = ExcelImportCheckUtil.check(file.getInputStream(), PayDraftingGroupSubItem.class, params);
if(!t){
throw new JeroBootException("文件格式有误,请下载模板后上传!");
}
} catch (Exception e) {
e.printStackTrace();
throw new JeroBootException("文件格式有误,请下载模板后上传!");
}
try {
List<PayDraftingGroupSubItem> list = ExcelImportUtil.importExcel(file.getInputStream(), PayDraftingGroupSubItem.class, params);
if(!CollectionUtils.isEmpty(list)){
// 校验重复成员的集合
List<PayDraftingGroupSubItem> listCompanyAndContacts = new ArrayList<>();
// 获取excel中的企业名称
List<String> listCompanyName = list.stream().map(PayDraftingGroupSubItem::getChargeCompanyTemporaryName).collect(Collectors.toList());
// 获取excel企业信息
LambdaQueryWrapper<PayCompanyManagement> companyWrapper = new LambdaQueryWrapper<>();
companyWrapper.in(PayCompanyManagement::getCompanyName,listCompanyName);
List<PayCompanyManagement> listCompanyInfo = payCompanyManagementService.list(companyWrapper);
List<String> listContactsName = new ArrayList<>();
// 导入的数据默认为审核通过状态
for (PayDraftingGroupSubItem payDraftingGroupSubItem : list) {
payDraftingGroupSubItem.setCheckResult(DraftingConstant.CHECK_PASS);
}
// 获取excel中联系人1名称
List<String> listContactsName1 = list.stream().map(PayDraftingGroupSubItem::getContactsNameOne).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName1)){
listContactsName.addAll(listContactsName1);
}
// 获取excel中联系人2名称
List<String> listContactsName2 = list.stream().map(PayDraftingGroupSubItem::getContactsNameTwo).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName2)){
listContactsName.addAll(listContactsName2);
}
// 获取excel中联系人3名称
List<String> listContactsName3 = list.stream().map(PayDraftingGroupSubItem::getContactsNameThree).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName3)){
listContactsName.addAll(listContactsName3);
}
// 获取excel中联系人4名称
List<String> listContactsName4 = list.stream().map(PayDraftingGroupSubItem::getContactsNameFour).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName4)){
listContactsName.addAll(listContactsName4);
}
// 获取excel中联系人5名称
List<String> listContactsName5 = list.stream().map(PayDraftingGroupSubItem::getContactsNameFive).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName5)){
listContactsName.addAll(listContactsName5);
}
// 获取excel中联系人6名称
List<String> listContactsName6 = list.stream().map(PayDraftingGroupSubItem::getContactsNameSix).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName6)){
listContactsName.addAll(listContactsName6);
}
// 获取excel中联系人7名称
List<String> listContactsName7 = list.stream().map(PayDraftingGroupSubItem::getContactsNameSeven).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName7)){
listContactsName.addAll(listContactsName7);
}
// 获取excel中联系人8名称
List<String> listContactsName8 = list.stream().map(PayDraftingGroupSubItem::getContactsNameEight).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName8)){
listContactsName.addAll(listContactsName8);
}
// 获取excel中联系人9名称
List<String> listContactsName9 = list.stream().map(PayDraftingGroupSubItem::getContactsNameNine).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName9)){
listContactsName.addAll(listContactsName9);
}
// 获取excel中联系人10名称
List<String> listContactsName10 = list.stream().map(PayDraftingGroupSubItem::getContactsNameTen).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(listContactsName10)){
listContactsName.addAll(listContactsName10);
}
// 获取excel联系人信息
LambdaQueryWrapper<PayContactsManagement> contactsWrapper = new LambdaQueryWrapper<>();
contactsWrapper.in(PayContactsManagement::getName,listContactsName);
List<PayContactsManagement> listContactsInfo = payContactsManagementService.list(contactsWrapper);
// 获取起草组信息
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(draftGroupId);
if(Objects.isNull(payDraftingGroup)){
msg.append("起草组不存在 !");
}
if(StringUtils.isBlank(msg)) {
// 获取起草组成员
LambdaQueryWrapper<PayDraftingGroupSubItem> query = new LambdaQueryWrapper<>();
query.eq(PayDraftingGroupSubItem::getDraftingGroupId, draftGroupId);
List<PayDraftingGroupSubItem> listData = payDraftingGroupSubItemService.list(query);
list.forEach(p -> {
p.setDraftingGroupId(draftGroupId);
int count = list.indexOf(p);
// 校验企业名称
List<PayCompanyManagement> listCompany = new ArrayList<>();
if (StringUtils.isBlank(p.getChargeCompanyTemporaryName())) {
msg.append("第").append(count + 3).append("行:企业名称不能为空,请修改。<br/>");
} else {
// 通过企业名称获取企业id
listCompany = listCompanyInfo.stream().filter(item ->
Objects.equals(item.getCompanyName(), p.getChargeCompanyTemporaryName())).collect(Collectors.toList());
if (CollectionUtils.isEmpty(listCompany)) {
msg.append("第").append(count + 3).append("行:企业名称不存在,请修改。<br/>");
} else {
p.setChargeCompanyId(listCompany.get(0).getId());
}
}
// 校验起草组成员单位是否已存在(是否重复)
if (!StringUtils.isBlank(p.getChargeCompanyId())) {
List<PayDraftingGroupSubItem> listDateNew = listData.stream().filter(item -> Objects.equals(p.getChargeCompanyId(), item.getChargeCompanyId())).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(listDateNew)) {
msg.append("第").append(count + 3).append("行:工作组成员单位已存在,请修改。<br/>");
}
}
// 校验重复
List<PayDraftingGroupSubItemContacts> listPayDraftingGroupSubItemContacts = checkRepeat(p,msg,count,listCompany,listContactsInfo);
p.setPayDraftingGroupSubItemContactsList(listPayDraftingGroupSubItemContacts);
// 校验成员唯一性
List<PayDraftingGroupSubItem> listCompanyAndContactsNew = listCompanyAndContacts.stream().filter(item -> Objects.equals(p.getChargeCompanyTemporaryName(), item.getChargeCompanyTemporaryName())).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(listCompanyAndContactsNew)) {
msg.append("第").append(count + 3).append("行:工作组成员单位重复出现,请修改。<br/>");
}
listCompanyAndContacts.add(p);
// 校验字段值
StringBuilder s = ValidUtil.validateExcel(p, (count + 3));
if (!StringUtils.isBlank(s)) {
msg.append(s);
}
});
if (StringUtils.isBlank(msg)) {
// 拷贝企业,联系人
list.forEach(this::setPayDraftingGroupSubItemAdd);
// 更新数据
payDraftingGroupSubItemService.saveBatch(list);
list.forEach(p->{
// 处理联系人的备注字段
List<String> remarks = dealRemarkField(p);
String draftingGroupSubItemId = p.getId();
List<PayDraftingGroupSubItemContacts> listPayDraftingGroupSubItemContacts = p.getPayDraftingGroupSubItemContactsList();
if(!CollectionUtils.isEmpty(listPayDraftingGroupSubItemContacts)){
for (int i = 0; i < listPayDraftingGroupSubItemContacts.size(); i++) {
listPayDraftingGroupSubItemContacts.get(i).setDraftingGroupId(p.getDraftingGroupId());
listPayDraftingGroupSubItemContacts.get(i).setDraftingGroupSubId(draftingGroupSubItemId);
listPayDraftingGroupSubItemContacts.get(i).setOrderNum(i + 1);
listPayDraftingGroupSubItemContacts.get(i).setRemarks(remarks.get(i));
}
payDraftingGroupSubItemContactsService.saveBatch(listPayDraftingGroupSubItemContacts);
}
});
}
}
}
}catch (Exception e){
log.error(e.getMessage(),e);
throw new JeroBootException("文件导入失败!");
} finally {
try {
file.getInputStream().close();
} catch (Exception e) {
e.printStackTrace();
}
}
if(!StringUtils.isBlank(msg)){
throw new JeroBootException(msg.toString());
}
}
}
// 处理联系人的remark字段
public List<String> dealRemarkField(PayDraftingGroupSubItem p) {
ArrayList<String> arrayList = new ArrayList<>();
arrayList.add(p.getRemarksOne());
arrayList.add(p.getRemarksTwo());
arrayList.add(p.getRemarksThree());
arrayList.add(p.getRemarksFour());
arrayList.add(p.getRemarksFive());
arrayList.add(p.getRemarksSix());
arrayList.add(p.getRemarksSeven());
arrayList.add(p.getRemarksEight());
arrayList.add(p.getRemarksNine());
arrayList.add(p.getRemarksTen());
return arrayList;
}
/**
* 验证重复
* @param p
* @param msg
* @param count 行数
* @param listCompany 企业集合
* @param listContactsInfo 联系人集合
* @return
*/
private List<PayDraftingGroupSubItemContacts> checkRepeat(PayDraftingGroupSubItem p, StringBuilder msg, int count, List<PayCompanyManagement> listCompany, List<PayContactsManagement> listContactsInfo) {
List<PayDraftingGroupSubItemContacts> list = new ArrayList<>();
HashMap<String,Integer> map = new HashMap<>();
if(!StringUtils.isBlank(p.getContactsNameOne())){
PayDraftingGroupSubItemContacts payDraftingGroupSubItemContacts = setContactsId(msg,p.getContactsNameOne(),1,count,listCompany,listContactsInfo,map);
list.add(payDraftingGroupSubItemContacts);
}else{
msg.append("第").append(count + 3).append("行:企业联系人1不能为空,请修改。<br/>");
}
if(!StringUtils.isBlank(p.getContactsNameTwo())){
PayDraftingGroupSubItemContacts payDraftingGroupSubItemContacts = setContactsId(msg,p.getContactsNameTwo(),2,count,listCompany,listContactsInfo,map);
list.add(payDraftingGroupSubItemContacts);
}
if(!StringUtils.isBlank(p.getContactsNameThree())){
PayDraftingGroupSubItemContacts payDraftingGroupSubItemContacts = setContactsId(msg,p.getContactsNameThree(),3,count,listCompany,listContactsInfo,map);
list.add(payDraftingGroupSubItemContacts);
}
if(!StringUtils.isBlank(p.getContactsNameFour())){
PayDraftingGroupSubItemContacts payDraftingGroupSubItemContacts = setContactsId(msg,p.getContactsNameFour(),4,count,listCompany,listContactsInfo,map);
list.add(payDraftingGroupSubItemContacts);
}
if(!StringUtils.isBlank(p.getContactsNameFive())){
PayDraftingGroupSubItemContacts payDraftingGroupSubItemContacts = setContactsId(msg,p.getContactsNameFive(),5,count,listCompany,listContactsInfo,map);
list.add(payDraftingGroupSubItemContacts);
}
if(!StringUtils.isBlank(p.getContactsNameSix())){
PayDraftingGroupSubItemContacts payDraftingGroupSubItemContacts = setContactsId(msg,p.getContactsNameSix(),6,count,listCompany,listContactsInfo,map);
list.add(payDraftingGroupSubItemContacts);
}
if(!StringUtils.isBlank(p.getContactsNameSeven())){
PayDraftingGroupSubItemContacts payDraftingGroupSubItemContacts = setContactsId(msg,p.getContactsNameSeven(),7,count,listCompany,listContactsInfo,map);
list.add(payDraftingGroupSubItemContacts);
}
if(!StringUtils.isBlank(p.getContactsNameEight())){
PayDraftingGroupSubItemContacts payDraftingGroupSubItemContacts = setContactsId(msg,p.getContactsNameEight(),8,count,listCompany,listContactsInfo,map);
list.add(payDraftingGroupSubItemContacts);
}
if(!StringUtils.isBlank(p.getContactsNameNine())){
PayDraftingGroupSubItemContacts payDraftingGroupSubItemContacts = setContactsId(msg,p.getContactsNameNine(),9,count,listCompany,listContactsInfo,map);
list.add(payDraftingGroupSubItemContacts);
}
if(!StringUtils.isBlank(p.getContactsNameTen())){
PayDraftingGroupSubItemContacts payDraftingGroupSubItemContacts = setContactsId(msg,p.getContactsNameTen(),10,count,listCompany,listContactsInfo,map);
list.add(payDraftingGroupSubItemContacts);
}
return list;
}
private PayDraftingGroupSubItemContacts setContactsId(StringBuilder msg,String name,int num,int count,List<PayCompanyManagement> listCompany,List<PayContactsManagement> listContactsInfo,HashMap<String,Integer> map){
PayDraftingGroupSubItemContacts payDraftingGroupSubItemContacts = new PayDraftingGroupSubItemContacts();
if(map.containsKey(name)){
int c = map.get(name);
msg.append("第").append(count + 3).append("行:企业联系人").append(c).append("与企业联系人").append(num).append("重复,请修改。<br/>");
}else{
map.put(name,num);
}
if (!CollectionUtils.isEmpty(listCompany)) {
// 通过联系人获取联系人id
List<PayContactsManagement> listContacts = listContactsInfo.stream().filter(item ->
Objects.equals(item.getName(), name)
&& Objects.equals(item.getCompanyId(), listCompany.get(0).getId())).collect(Collectors.toList());
if (CollectionUtils.isEmpty(listContacts)) {
msg.append("第").append(count + 3).append("行:该企业下不存在企业联系人").append(num).append(",请修改。<br/>");
} else {
payDraftingGroupSubItemContacts.setContactsId(listContacts.get(0).getId());
}
}
return payDraftingGroupSubItemContacts;
}
/**
* 起草组成员-发布提醒列表查询
*
* @param page
* @param payDraftingGroupSubItem
* @return
*/
@Override
public IPage<PayDraftingGroupSubItem> publishReminderList(Page<PayDraftingGroupSubItem> page, PayDraftingGroupSubItem payDraftingGroupSubItem) {
return payDraftingGroupSubItemMapper.publishReminderList(page,payDraftingGroupSubItem);
}
/**
* 审核报名信息
*
* @param checkVO
*/
@Override
public void checkRegister(CheckVo checkVO) {
String payDraftingGroupSubItemId = checkVO.getId();
String checkRemark = checkVO.getCheckRemark();
Integer checkResult = checkVO.getCheckResult();
PayDraftingGroupSubItem payDraftingGroupSubItem = payDraftingGroupSubItemService.getById(payDraftingGroupSubItemId);
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(payDraftingGroupSubItem.getDraftingGroupId());
//判断是否有权限审核
verificationGuests(payDraftingGroupSubItem);
if(Objects.equals(checkVO.getCheckResult(),DraftingConstant.CHECK_PASS)) {
// 审核通过,将状态改为2 发送消息
LambdaUpdateWrapper<PayDraftingGroupSubItem> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(PayDraftingGroupSubItem::getId,payDraftingGroupSubItemId);
updateWrapper.set(StringUtils.isNotBlank(checkRemark),PayDraftingGroupSubItem::getCheckRemark,checkRemark);
updateWrapper.set(!Objects.isNull(checkResult),PayDraftingGroupSubItem::getCheckResult,checkResult);
payDraftingGroupSubItemService.update(updateWrapper);
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PayDraftingGroupSubItemContacts::getDraftingGroupId,payDraftingGroupSubItem.getDraftingGroupId());
queryWrapper.eq(PayDraftingGroupSubItemContacts::getDraftingGroupSubId,payDraftingGroupSubItem.getId());
List<PayDraftingGroupSubItemContacts> payDraftingGroupSubItemContactsList = payDraftingGroupSubItemContactsService.list(queryWrapper);
sendMessage(payDraftingGroupSubItem,payDraftingGroup,payDraftingGroupSubItemContactsList);
}
if(Objects.equals(checkVO.getCheckResult(),DraftingConstant.CHECK_REJECTION)) {
// 直接将数据删除
payDraftingGroupSubItemService.removeById(payDraftingGroupSubItemId);
// 删除对应的联系表
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PayDraftingGroupSubItemContacts::getDraftingGroupId,payDraftingGroupSubItem.getDraftingGroupId());
queryWrapper.eq(PayDraftingGroupSubItemContacts::getDraftingGroupSubId,payDraftingGroupSubItem.getId());
payDraftingGroupSubItemContactsService.remove(queryWrapper);
}
}
/**
* 判断是否有权限审核
*
* @author lijiarao
* @date 2021/9/28
*/
private void verificationGuests(PayDraftingGroupSubItem payDraftingGroupSubItem) {
//判断是否有权限审核
String draftingGroupId = payDraftingGroupSubItem.getDraftingGroupId();
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(draftingGroupId);
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String sysUserId = sysUser.getId();
if (!rolePermissionService.getRolePermission("draftingGroupMember:check") &&
!Objects.equals(payDraftingGroup.getPrincipalIdA(),sysUserId) &&
!Objects.equals(payDraftingGroup.getPrincipalIdB(),sysUserId)) {
throw new JeroBootException("没有审核的权限");
}
}
@Override
public IPage<PayDraftingGroupSubItem> queryCompanyPageList(Page<PayDraftingGroupSubItem> page, PayDraftingGroupSubItem payWorkingGroupSubItem, List<Integer> listNeedInvoice, List<String> listProjectIds) {
return payDraftingGroupSubItemMapper.queryCompanyPageList( page, payWorkingGroupSubItem,listNeedInvoice, listProjectIds);
}
@Override
public IPage<PayDraftingGroupSubItem> queryCompanyPageListByCompanyManager(Page<PayDraftingGroupSubItem> page, PayDraftingGroupSubItem payWorkingGroupSubItem, List<Integer> listNeedInvoice, String companyId) {
return payDraftingGroupSubItemMapper.queryCompanyPageListByCompanyManager( page, payWorkingGroupSubItem,listNeedInvoice,companyId);
}
}
@@ -0,0 +1,19 @@
package com.jero.drafting.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class CheckVo {
@ApiModelProperty("审核结果 1:待审核 2:已通过 3:拒绝")
private Integer checkResult;
@ApiModelProperty("审核说明")
private String checkRemark;
@ApiModelProperty("起草组id")
private String id;
}
@@ -0,0 +1,253 @@
package com.jero.drafting.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
public class PayDraftingGroupSubItemExcel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 临时成员单位
*/
@Excel(name = "成员单位", width = 15)
@ApiModelProperty(value = "临时成员单位")
private String chargeCompanyTemporaryName;
/**
* 备注
*/
@Excel(name = "备注", width = 15)
@ApiModelProperty(value = "备注")
private String remarks;
/**
* 企业联系人1名称
*/
@Excel(name = "企业联系人1", width = 15)
@ApiModelProperty(value = "企业联系人1名称")
private String contactsNameOne;
/**
* 企业联系人1手机号
*/
@Excel(name = "企业联系人1手机号", width = 17)
private String contactsPhoneOne;
/**
* 企业联系人1邮箱
*/
@Excel(name = "企业联系人1邮箱", width = 15)
private String contactsEmailOne;
/**
* 联系人1备注
*/
@Excel(name = "联系人1备注", width = 15)
@ApiModelProperty(value = "联系人1备注")
private String remarksOne;
/**
* 企业联系人2名称
*/
@Excel(name = "企业联系人2", width = 15)
@ApiModelProperty(value = "企业联系人2名称")
private String contactsNameTwo;
/**
* 企业联系人2手机号
*/
@Excel(name = "企业联系人2手机号", width = 17)
private String contactsPhoneTwo;
/**
* 企业联系人2邮箱
*/
@Excel(name = "企业联系人2邮箱", width = 15)
private String contactsEmailTwo;
/**
* 联系人2备注
*/
@Excel(name = "联系人2备注", width = 15)
@ApiModelProperty(value = "联系人2备注")
private String remarksTwo;
/**
* 企业联系人3名称
*/
@Excel(name = "企业联系人3", width = 15)
@ApiModelProperty(value = "企业联系人3名称")
private String contactsNameThree;
/**
* 企业联系人3手机号
*/
@Excel(name = "企业联系人3手机号", width = 17)
private String contactsPhoneThree;
/**
* 企业联系人3邮箱
*/
@Excel(name = "企业联系人3邮箱", width = 15)
private String contactsEmailThree;
/**
* 联系人3备注
*/
@Excel(name = "联系人3备注", width = 15)
@ApiModelProperty(value = "联系人3备注")
private String remarksThree;
/**
* 企业联系人4名称
*/
@Excel(name = "企业联系人4", width = 15)
@ApiModelProperty(value = "企业联系人4名称")
private String contactsNameFour;
/**
* 企业联系人4手机号
*/
@Excel(name = "企业联系人4手机号", width = 17)
private String contactsPhoneFour;
/**
* 企业联系人4邮箱
*/
@Excel(name = "企业联系人4邮箱", width = 15)
private String contactsEmailFour;
/**
* 联系人4备注
*/
@Excel(name = "联系人4备注", width = 15)
@ApiModelProperty(value = "联系人4备注")
private String remarksFour;
/**
* 企业联系人5名称
*/
@Excel(name = "企业联系人5", width = 15)
@ApiModelProperty(value = "企业联系人5名称")
private String contactsNameFive;
/**
* 企业联系人5手机号
*/
@Excel(name = "企业联系人5手机号", width = 17)
private String contactsPhoneFive;
/**
* 企业联系人5邮箱
*/
@Excel(name = "企业联系人5邮箱", width = 15)
private String contactsEmailFive;
/**
* 联系人5备注
*/
@Excel(name = "联系人5备注", width = 15)
@ApiModelProperty(value = "联系人5备注")
private String remarksFive;
/**
* 企业联系人6名称
*/
@Excel(name = "企业联系人6", width = 15)
@ApiModelProperty(value = "企业联系人6名称")
private String contactsNameSix;
/**
* 企业联系人6手机号
*/
@Excel(name = "企业联系人6手机号", width = 17)
private String contactsPhoneSix;
/**
* 企业联系人6邮箱
*/
@Excel(name = "企业联系人6邮箱", width = 15)
private String contactsEmailSix;
/**
* 联系人6备注
*/
@Excel(name = "联系人6备注", width = 15)
@ApiModelProperty(value = "联系人6备注")
private String remarksSix;
/**
* 企业联系人7名称
*/
@Excel(name = "企业联系人7", width = 15)
@ApiModelProperty(value = "企业联系人7名称")
private String contactsNameSeven;
/**
* 企业联系人7手机号
*/
@Excel(name = "企业联系人7手机号", width = 17)
private String contactsPhoneSeven;
/**
* 企业联系人7邮箱
*/
@Excel(name = "企业联系人7邮箱", width = 15)
private String contactsEmailSeven;
/**
* 联系人7备注
*/
@Excel(name = "联系人7备注", width = 15)
@ApiModelProperty(value = "联系人7备注")
private String remarksSeven;
/**
* 企业联系人8名称
*/
@Excel(name = "企业联系人8", width = 15)
@ApiModelProperty(value = "企业联系人8名称")
private String contactsNameEight;
/**
* 企业联系人8手机号
*/
@Excel(name = "企业联系人8手机号", width = 17)
private String contactsPhoneEight;
/**
* 企业联系人8邮箱
*/
@Excel(name = "企业联系人8邮箱", width = 15)
private String contactsEmailEight;
/**
* 联系人8备注
*/
@Excel(name = "联系人8备注", width = 15)
@ApiModelProperty(value = "联系人8备注")
private String remarksEight;
/**
* 企业联系人9名称
*/
@Excel(name = "企业联系人9", width = 15)
@ApiModelProperty(value = "企业联系人9名称")
private String contactsNameNine;
/**
* 企业联系人9手机号
*/
@Excel(name = "企业联系人9手机号", width = 17)
private String contactsPhoneNine;
/**
* 企业联系人9邮箱
*/
@Excel(name = "企业联系人9邮箱", width = 15)
private String contactsEmailNine;
/**
* 联系人9备注
*/
@Excel(name = "联系人9备注", width = 15)
@ApiModelProperty(value = "联系人9备注")
private String remarksNine;
/**
* 企业联系人10名称
*/
@Excel(name = "企业联系人10", width = 15)
@ApiModelProperty(value = "企业联系人10名称")
private String contactsNameTen;
/**
* 企业联系人10手机号
*/
@Excel(name = "企业联系人10手机号", width = 17)
private String contactsPhoneTen;
/**
* 企业联系人10邮箱
*/
@Excel(name = "企业联系人10邮箱", width = 15)
private String contactsEmailTen;
/**
* 联系人10备注
*/
@Excel(name = "联系人10备注", width = 15)
@ApiModelProperty(value = "联系人10备注")
private String remarksTen;
}
@@ -0,0 +1,24 @@
package com.jero.drafting.vo;
import com.jero.drafting.entity.PayDraftingGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class PayDraftingGroupVo extends PayDraftingGroup {
/**
* 打包(1:是,0:否)
*/
private String pack;
/**
* 项目id
*/
private String projectId;
/**
* 当前登录人是否可以操作(1为可操作,2为不可操作)
*/
private Integer checkoutOperation;
}
@@ -56,6 +56,14 @@ public class MeetingCommon {
* 理事会会议
*/
public final static Integer COUNCIL_MEETING_INT = 6;
/**
* 起草组会议
*/
public final static String DRAFTING_GROUP_MEETING = "7";
/**
* 起草组会议
*/
public final static Integer DRAFTING_GROUP_MEETING_INT = 7;
/**
* 标准宣贯
*/
@@ -0,0 +1,227 @@
package com.jero.meeting.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.enums.CompanyMessageEnums;
import com.jero.common.exception.JeroBootException;
import com.jero.common.system.api.ISysBaseAPI;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.PasswordUtil;
import com.jero.common.util.ValidUtil;
import com.jero.drafting.entity.PayDraftingGroup;
import com.jero.drafting.service.IPayDraftingGroupService;
import com.jero.meeting.common.MeetingCommon;
import com.jero.meeting.entity.PayMeeting;
import com.jero.meeting.entity.PayMeetingHotelContacts;
import com.jero.meeting.service.IPayMeetingHotelContactsService;
import com.jero.meeting.service.IPayMeetingService;
import com.jero.meeting.vo.PayMeetingVO;
import com.jero.meeting.vo.PublishReminderVO;
import com.jero.meeting.vo.UploadFileVO;
import com.jero.modules.system.volid.group.UpdateGroup;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
@Api(tags = "会议管理-起草组会议")
@RestController
@RequestMapping("/meeting/draftGroupMeeting")
@Slf4j
public class DraftGroupMeetingController extends JeroController<PayMeeting, IPayMeetingService> {
@Resource
private IPayMeetingService payMeetingService;
@Resource
private ISysBaseAPI sysBaseAPI;
@Resource
private IPayMeetingHotelContactsService meetingHotelContactsService;
@Resource
private IPayDraftingGroupService payDraftingGroupService;
/**
* 分页列表查询
*/
@RequiresPermissions("draftGroupMeeting:search")
@ApiOperation(value = "会议管理-分页列表查询", notes = "会议管理-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(PayMeeting payMeeting,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
payMeeting.setMeetingType(MeetingCommon.DRAFTING_GROUP_MEETING_INT);
IPage<PayMeeting> pageList = payMeetingService.queryPageList(payMeeting, pageNo, pageSize, req);
return Result.OK(pageList);
}
/**
* 添加
*/
@RequiresPermissions("draftGroupMeeting:add")
@AutoLog(value = "会议管理-添加")
@ApiOperation(value = "会议管理-添加", notes = "会议管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody PayMeetingVO payMeetingVO) {
String meetingType = payMeetingVO.getMeetingType();
if (!Objects.equals(meetingType, MeetingCommon.DRAFTING_GROUP_MEETING)) {
throw new RuntimeException();
}
ValidUtil.validate(payMeetingVO);
payMeetingService.add(payMeetingVO);
return Result.OK("添加成功!");
}
/**
* 编辑
*/
// @RequiresPermissions("draftGroupMeeting:edit")
@AutoLog(value = "会议管理-编辑")
@ApiOperation(value = "会议管理-编辑", notes = "会议管理-编辑")
@PostMapping(value = "/edit")
public Result<?> edit(@RequestBody PayMeetingVO payMeetingVO) {
String id = payMeetingVO.getId();
verifyMeetingType(id);
ValidUtil.validate(payMeetingVO, UpdateGroup.class);
payMeetingService.editById(payMeetingVO);
return Result.OK("编辑成功!");
}
/**
* 验证会议类型
* @param id
*/
private void verifyMeetingType(String id) {
if (StringUtils.isBlank(id)) {
throw new JeroBootException("会议id不能为空");
}
PayMeeting payMeeting = payMeetingService.getById(id);
if (Objects.isNull(payMeeting)) {
throw new JeroBootException("该会议不存在");
}
Integer meetingType = payMeeting.getMeetingType();
if (!Objects.equals(meetingType, MeetingCommon.DRAFTING_GROUP_MEETING_INT)) {
throw new RuntimeException();
}
}
/**
* 通过id删除
*/
@RequiresPermissions("draftGroupMeeting:delete")
@AutoLog(value = "会议管理-通过id删除")
@ApiOperation(value = "会议管理-通过id删除", notes = "会议管理-通过id删除")
@GetMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id") String id) {
verifyMeetingType(id);
payMeetingService.deleteById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*/
@RequiresPermissions("draftGroupMeeting:batchDel")
@AutoLog(value = "会议管理-批量删除")
@ApiOperation(value = "会议管理-批量删除", notes = "会议管理-批量删除")
@GetMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids") String ids) {
List<String> idList = Arrays.asList(ids.split(","));
for (String id : idList) {
verifyMeetingType(id);
}
this.payMeetingService.deleteByIds(idList);
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*/
@ApiOperation(value = "会议管理-通过id查询", notes = "会议管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id") String id) {
PayMeeting meeting = payMeetingService.queryById(id);
if (meeting == null || !Objects.equals(meeting.getMeetingType(), MeetingCommon.DRAFTING_GROUP_MEETING_INT)) {
return Result.error("未找到对应数据");
}
//查询会议负责人
LoginUser user = sysBaseAPI.getUserById(meeting.getDirectorId());
meeting.setDirectorName(user.getRealname());
meeting.setDirectorPhone(PasswordUtil.decrypt(user.getPhone()));
PayMeetingVO payMeetingVO = new PayMeetingVO();
BeanUtils.copyProperties(meeting, payMeetingVO);
String meetingType = meeting.getMeetingType().toString();
payMeetingVO.setMeetingType(meetingType);
payMeetingVO.setTbMeetingType(meeting.getMeetingType().toString());
//会议查询酒店联系人列表
LambdaQueryWrapper<PayMeetingHotelContacts> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(PayMeetingHotelContacts::getMeetingId, meeting.getId());
List<PayMeetingHotelContacts> payMeetingHotelContactsList = meetingHotelContactsService.list(wrapper);
payMeetingVO.setHotelContactsList(payMeetingHotelContactsList);
// 起草组项目查询起草组项目名
String draftingGroupId = meeting.getDraftingGroupId();
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(draftingGroupId);
payMeetingVO.setDirectorName(payDraftingGroup.getDraftingGroupProject());
return Result.OK(payMeetingVO);
}
/**
* 上传文件
*/
@AutoLog(value = "上传文件")
@RequiresPermissions("draftGroupMeeting:upload")
@ApiOperation(value = "上传资料", notes = "上传文件")
@PostMapping(value = "/uploadFile")
public Result<?> uploadFile(@RequestBody UploadFileVO uploadFileVO) {
List<String> strings = payMeetingService.uploadFileSendMsg(uploadFileVO, MeetingCommon.DRAFTING_GROUP_MEETING_INT, false);
return Result.OK("上传资料成功!",strings);
}
/**
* 上传会议纪要
*/
@AutoLog(value = "上传会议纪要")
@RequiresPermissions("draftGroupMeeting:uploadCouncil")
@ApiOperation(value = "上传会议纪要", notes = "上传会议纪要")
@PostMapping(value = "/uploadCouncilFile")
public Result<?> uploadCouncilFile(@RequestBody UploadFileVO uploadFileVO) {
payMeetingService.uploadFile(uploadFileVO, MeetingCommon.DRAFTING_GROUP_MEETING_INT);
return Result.OK("上传会议纪要成功!");
}
/**
* 发布提醒
*/
@AutoLog("发布提醒")
@RequiresPermissions("draftGroupMeeting:publish")
@ApiOperation(value = "发布提醒", notes = "发布提醒")
@PostMapping(value = "/publishReminder")
public Result<?> publishReminder(@RequestBody PublishReminderVO publishReminderVO) {
List<String> strings = payMeetingService.publishReminder(publishReminderVO, CompanyMessageEnums.MSG1, "C_OPEN_TYPE1");
return Result.OK("发布成功",strings);
}
/**
* 导出excel
*/
@RequiresPermissions("draftGroupMeeting:export")
@GetMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, PayMeeting payMeeting) {
payMeeting.setMeetingType(MeetingCommon.DRAFTING_GROUP_MEETING_INT);
IPage<PayMeeting> queryPageList = payMeetingService.queryPageList(payMeeting, -1, -1, request);
List<Object> exportList = payMeetingService.getExportList(request, queryPageList);
Class<?> aClass = payMeetingService.getaClass(MeetingCommon.DRAFTING_GROUP_MEETING_INT);
return super.exportListXls(exportList, aClass, "会议管理");
}
}
@@ -0,0 +1,272 @@
package com.jero.meeting.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.aspect.annotation.CompanyNameTranslate;
import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.aspect.annotation.DictPoint;
import com.jero.common.exception.JeroBootException;
import com.jero.common.service.RolePermissionService;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.query.QueryGenerator;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.ValidUtil;
import com.jero.common.util.oConvertUtils;
import com.jero.drafting.entity.PayDraftingGroup;
import com.jero.drafting.entity.PayDraftingGroupSubItem;
import com.jero.drafting.service.IPayDraftingGroupService;
import com.jero.drafting.service.IPayDraftingGroupSubItemService;
import com.jero.meeting.common.MeetingCommon;
import com.jero.meeting.entity.PayMeeting;
import com.jero.meeting.entity.PayMeetingSituation;
import com.jero.meeting.service.IPayMeetingSituationService;
import com.jero.meeting.vo.CheckVO;
import com.jero.meeting.vo.PayMeetingSituationVO;
import com.jero.meeting.vo.SetGuestsUploadFileVO;
import com.jero.project.common.PayProjectCommon;
import com.jero.project.entity.PayWorkingGroup;
import com.jero.project.entity.PayWorkingGroupSubItem;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
/**
* 起草组会议 参会人信息
* 2024-01-08
*/
@Api(tags = "参会人员信息-起草组会议")
@RestController
@RequestMapping("/meeting/draftGroupMeetingSituation")
@Slf4j
public class DraftGroupMeetingSituationController extends JeroController<PayMeetingSituation, IPayMeetingSituationService> {
@Resource
private IPayMeetingSituationService payMeetingSituationService;
@Resource
private IPayDraftingGroupService payDraftingGroupService;
@Resource
private IPayDraftingGroupSubItemService payDraftingGroupSubItemService;
@Resource
private RolePermissionService rolePermissionService;
private final Integer MEETING_TYPE = MeetingCommon.DRAFTING_GROUP_MEETING_INT;
/**
* 分页列表查询
*/
@CompanyNameTranslate
@RequiresPermissions("draftGroupMeetingSituation:search")
@ApiOperation(value = "参会人员信息-分页列表查询", notes = "参会人员信息-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(PayMeetingSituation payMeetingSituation,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
String meetingId = payMeetingSituation.getMeetingId();
if (StringUtils.isBlank(meetingId)) {
throw new JeroBootException("会议id不能为空");
}
QueryWrapper<PayMeetingSituation> queryWrapper = QueryGenerator.initQueryWrapper(payMeetingSituation, req.getParameterMap());
String particularYear = req.getParameter("particularYear");
if (StringUtils.isNotBlank(particularYear)) {
queryWrapper.eq("DATE_FORMAT( ppr.payment_date, '%Y' )", particularYear);
}
Page<PayMeetingSituation> page = new Page<>(pageNo, pageSize);
IPage<PayMeetingSituation> pageList = payMeetingSituationService.pageListContract(meetingId, page, queryWrapper, MEETING_TYPE);
List<PayMeetingSituation> situationList = pageList.getRecords();
for (PayMeetingSituation meetingSituation : situationList) {
Integer payMode = meetingSituation.getPayMode();
//汇款并且缴费凭证为空
if (Objects.equals(payMode, 1) && StringUtils.isBlank(meetingSituation.getPaymentRecord())) {
meetingSituation.setIdentification(PayProjectCommon.YES);
} else {
meetingSituation.setIdentification(PayProjectCommon.NO);
}
}
return Result.OK(pageList);
}
/**
* 添加参会人
*/
@RequiresPermissions("draftGroupMeetingSituation:add")
@AutoLog(value = "参会人员信息-添加参会人")
@ApiOperation(value = "参会人员信息-添加参会人", notes = "参会人员信息-添加参会人")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody PayMeetingSituation payMeetingSituation) {
payMeetingSituationService.add(payMeetingSituation, MEETING_TYPE);
return Result.OK("添加成功!");
}
/**
* 编辑
*/
@AutoLog(value = "参会人员信息-编辑")
@RequiresPermissions("draftGroupMeetingSituation:edit")
@ApiOperation(value = "参会人员信息-编辑", notes = "参会人员信息-编辑")
@PostMapping(value = "/edit")
public Result<?> edit(@RequestBody PayMeetingSituationVO payMeetingSituationVO) {
payMeetingSituationService.editById(payMeetingSituationVO, MEETING_TYPE);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*/
@RequiresPermissions("draftGroupMeetingSituation:delete")
@AutoLog(value = "参会人员信息-通过id删除")
@ApiOperation(value = "参会人员信息-通过id删除", notes = "参会人员信息-通过id删除")
@GetMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id") String id) {
if (StringUtils.isBlank(id)) {
return Result.error("会议成员id不能为空");
}
payMeetingSituationService.deleteById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*/
@RequiresPermissions("draftGroupMeetingSituation:batchDel")
@AutoLog(value = "参会人员信息-批量删除")
@ApiOperation(value = "参会人员信息-批量删除", notes = "参会人员信息-批量删除")
@GetMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids") String ids) {
if (StringUtils.isBlank(ids)) {
return Result.error("会议成员id不能为空");
}
this.payMeetingSituationService.deleteByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*/
@CompanyNameTranslate
@DictPoint
@ApiOperation(value = "参会人员信息-通过id查询", notes = "参会人员信息-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id") String id) {
PayMeetingSituation payMeetingSituation = payMeetingSituationService.queryById(id);
if (payMeetingSituation == null) {
return Result.error("未找到对应数据");
}
return Result.OK(payMeetingSituation);
}
/**
* 通过会议id查询自己的参会人信息
*/
// @CompanyNameTranslate
// @DictPoint
@ApiOperation(value = "参会人员信息-通过会议id查询自己的参会人信息")
@GetMapping(value = "/queryByMeetingId")
public Result<?> queryByMeetingId(@RequestParam(name = "meetingId") String meetingId) {
PayMeetingSituation payMeetingSituation = payMeetingSituationService.queryByMeetingIdAndContactId(meetingId);
if (payMeetingSituation == null) {
return Result.error("未找到对应数据");
}
return Result.OK(payMeetingSituation);
}
/**
* 审核报名信息
*/
@AutoLog(value = "审核报名信息")
@RequiresPermissions("draftGroupMeetingSituation:auditCredentials")
@ApiOperation(value = "审核报名信息")
@PostMapping(value = "/checkRegister")
public Result<?> checkRegister(@RequestBody CheckVO checkVO) {
payMeetingSituationService.checkRegister(checkVO);
return Result.OK("审核成功!");
}
// /**
// * 审核缴费凭证
// */
// @RequiresPermissions("draftGroupMeetingSituation:auditSignUp")
// @AutoLog(value = "审核缴费凭证")
// @ApiOperation(value = "审核缴费凭证")
// @PostMapping(value = "/check")
// public Result<?> check(@RequestBody CheckVO checkVO) {
// payMeetingSituationService.check(checkVO);
// return Result.OK("审核成功!");
// }
/**
* 设置嘉宾上传文件
*/
@RequiresPermissions("draftGroupMeetingSituation:guestsUploadFileFlag")
@AutoLog(value = "设置嘉宾上传文件")
@ApiOperation(value = "设置嘉宾上传文件", notes = "设置嘉宾上传文件")
@PostMapping(value = "/setGuestsUploadFile")
public Result<?> setGuestsUploadFile(@RequestBody SetGuestsUploadFileVO setGuestsUploadFileVO) {
ValidUtil.validate(setGuestsUploadFileVO);
payMeetingSituationService.setGuestsUploadFile(setGuestsUploadFileVO,MEETING_TYPE);
return Result.OK("设置嘉宾上传文件成功!");
}
/**
* 导出excel
*/
@RequiresPermissions("draftGroupMeetingSituation:export")
@GetMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, PayMeetingSituation payMeetingSituation) {
List<Object> objects = payMeetingSituationService.MeetingSituationGetModelAndView(request, payMeetingSituation,MEETING_TYPE);
Class<?> aClass = payMeetingSituationService.getaClass(MEETING_TYPE);
return super.exportListXls(objects, aClass, "参会人员信息");
}
/**
* 分页列表查询
*
* @param payDraftingGroupSubItem 起草组成员
* @param pageNo 页数
* @param pageSize 条数
* @param paymentDate 日期
* @return
*/
@RequiresPermissions("draftingGroupMember:search")
@ApiOperation(value = "起草组成员-发布提醒列表查询")
@GetMapping(value = "/publishReminderList")
public Result<?> publishReminderList(PayDraftingGroupSubItem payDraftingGroupSubItem,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
@RequestParam(name = "paymentDate", required = false) String paymentDate) {
if (!StringUtils.isBlank(payDraftingGroupSubItem.getChargeCompanyTemporaryName()) && payDraftingGroupSubItem.getChargeCompanyTemporaryName().length() > 50) {
return Result.error("成员单位长度不能大于50个字符");
}
if (StringUtils.isBlank(payDraftingGroupSubItem.getDraftingGroupId())) {
return Result.error("起草组id不能为空!");
}
if(!StringUtils.isBlank(payDraftingGroupSubItem.getChargeCompanyTemporaryName())){
payDraftingGroupSubItem.setChargeCompanyTemporaryName(oConvertUtils.replaceAllPercent(payDraftingGroupSubItem.getChargeCompanyTemporaryName()));
}
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(payDraftingGroupSubItem.getDraftingGroupId());
if(Objects.isNull(payDraftingGroup)){
return Result.error("起草组不存在!");
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if(!rolePermissionService.getRolePermission("draftingGroupMember:search")
&& !Objects.equals(payDraftingGroup.getPrincipalIdA(),sysUser.getId())
&& !Objects.equals(payDraftingGroup.getPrincipalIdB(),sysUser.getId())){
return Result.error("数据权限不足!");
}
Page<PayDraftingGroupSubItem> page = new Page<>(pageNo, pageSize);
IPage<PayDraftingGroupSubItem> pageList = payDraftingGroupSubItemService.publishReminderList(page, payDraftingGroupSubItem);
return Result.OK(pageList);
}
}
@@ -397,4 +397,13 @@ public class PayMeeting implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "征集截止日期")
private java.util.Date endTimeAddQuestion;
/**起草组id*/
@Excel(name = "起草组名称", width = 15, dictTable = "pay_drafting_group",dicText = "drafting_group_project",dicCode = "id")
@ApiModelProperty(value = "起草id")
private String draftingGroupId;
/**起草组名称*/
@ApiModelProperty(value = "起草组名称")
private String draftingGroupName;
}
@@ -35,6 +35,9 @@ public interface PayMeetingMapper extends BaseMapper<PayMeeting> {
IPage<PayMeeting> workGroupPage(Page<PayMeeting> page, @Param(Constants.WRAPPER) QueryWrapper<PayMeeting> queryWrapper);
IPage<PayMeeting> draftGroupPage(Page<PayMeeting> page,@Param(Constants.WRAPPER) QueryWrapper<PayMeeting> queryWrapper);
IPage<PayMeeting> standardPage(Page<PayMeeting> page, @Param(Constants.WRAPPER) QueryWrapper<PayMeeting> queryWrapper);
IPage<PayMeeting> basePage(Page<PayMeeting> page, @Param(Constants.WRAPPER) QueryWrapper<PayMeeting> queryWrapper);
@@ -230,6 +230,16 @@
${ew.customSqlSegment}
</select>
<select id="draftGroupPage" resultMap="PayMeetingResultMap">
select distinct pm.*
from pay_meeting pm
left join pay_meeting_situation pms on pm.id = pms.meeting_id
left join pay_drafting_group pdg on pdg.id = pm.drafting_group_id
left join pay_meeting_contacts pmc on pm.id = pmc.meeting_id
${ew.customSqlSegment}
</select>
<select id="standardPage" resultMap="PayMeetingResultMap">
select distinct pm.*
from pay_meeting pm
@@ -36,6 +36,10 @@ import com.jero.data.service.IPayCaseCommitteeService;
import com.jero.data.service.IPayCaseCommitteeSubitemService;
import com.jero.data.service.IPayCaseCouncilService;
import com.jero.data.service.IPayCaseCouncilSubitemService;
import com.jero.drafting.entity.PayDraftingGroup;
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
import com.jero.drafting.service.IPayDraftingGroupService;
import com.jero.drafting.service.IPayDraftingGroupSubItemContactsService;
import com.jero.meeting.common.MeetingCommon;
import com.jero.meeting.common.MeetingSubitemCommon;
import com.jero.meeting.entity.*;
@@ -134,6 +138,10 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
private PayMeetingGuestsFileMapper meetingGuestsFileMapper;
@Resource
private PayMeetingRemindMailRecordService meetingRemindMailRecordService;
@Resource
private IPayDraftingGroupService payDraftingGroupService;
@Resource
private IPayDraftingGroupSubItemContactsService draftingGroupSubItemContactsService;
/**
* 新增会议
@@ -458,6 +466,16 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
payMeetingVO.setWorkingGroupName(workingGroup.getWorkingGroupProject());
payMeetingVO.setRemind(MeetingCommon.REMIND_0);
break;
case MeetingCommon.DRAFTING_GROUP_MEETING:
// ValidUtil.validate(payMeetingVO, DraftingGroupMeeting.class);
String draftingGroupId = payMeetingVO.getDraftingGroupId();
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(draftingGroupId);
if (payDraftingGroup == null) {
throw new JeroBootException("起草组项目不存在");
}
payMeetingVO.setDraftingGroupName(payDraftingGroup.getDraftingGroupProject());
payMeetingVO.setRemind(MeetingCommon.REMIND_0);
break;
case MeetingCommon.STANDARD_MEETING:
//ValidUtil.validate(payMeetingVO, StandardMeeting.class);
//标协会议类型
@@ -669,6 +687,7 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
LambdaQueryWrapper<PayContactsManagement> wrapper = new LambdaQueryWrapper<>();
List<String> contactsIdList = new ArrayList<>();
String workingGroupId = null;
String draftingGroupId = null;
//工作组项目直接是人
if (Objects.equals(projectType, 1)) {
//把单位会员中所有的联系人取出
@@ -713,7 +732,24 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
.setContactId(contactsId)
);
}
}else {
} else if (Objects.equals(projectType, 4)) {
//把单位会员中所有的联系人取出
draftingGroupId = publishReminderVO.getDraftingGroupId();
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> wrapper1 = new LambdaQueryWrapper<>();
wrapper1.eq(PayDraftingGroupSubItemContacts::getDraftingGroupId, draftingGroupId);
wrapper1.in(PayDraftingGroupSubItemContacts::getContactsId,subitemIds);
List<PayDraftingGroupSubItemContacts> groupSubItemContactsList = draftingGroupSubItemContactsService.list(wrapper1);
for (PayDraftingGroupSubItemContacts payDraftingGroupSubItemContacts : groupSubItemContactsList) {
String groupSubItemId = payDraftingGroupSubItemContacts.getDraftingGroupSubId();
String contactsId = payDraftingGroupSubItemContacts.getContactsId();
contactsIdList.add(contactsId);
meetingRemindRecordList.add(
new PayMeetingRemindRecord()
.setSubitemId(groupSubItemId)
.setContactId(contactsId)
);
}
} else {
throw new JeroBootException("项目类型不正确");
}
wrapper.in(PayContactsManagement::getId, contactsIdList);
@@ -737,6 +773,13 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
LoginUser userById = sysBaseAPI.getUserById(principalIdA);
fromUser = userById.getUsername();
}
//起草组项目用工作组负责人A发邮件
if (Objects.nonNull(draftingGroupId)) {
PayDraftingGroup draftingGroup = payDraftingGroupService.getById(draftingGroupId);
String principalIdA = draftingGroup.getPrincipalIdA();
LoginUser userById = sysBaseAPI.getUserById(principalIdA);
fromUser = userById.getUsername();
}
//发送消息
int success = list.size();
int failed = 0;
@@ -961,8 +1004,10 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
permission = "otherMeeting:search";
}else if (meetingType.equals(MeetingCommon.COMMITTEE_MEETING_INT)){
permission = "committeeMeeting:search";
}else if (meetingType.equals(MeetingCommon.COUNCIL_MEETING_INT)){
}else if (meetingType.equals(MeetingCommon.COUNCIL_MEETING_INT)) {
permission = "committeeMeeting:search";
}else if (meetingType.equals(MeetingCommon.DRAFTING_GROUP_MEETING_INT)) {
permission = "draftGroupMeeting:search";
}
}
if (StringUtils.isNotBlank(permission)) {
@@ -980,6 +1025,19 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
.eq("pmc.meeting_contacts_id", sysUser.getId())
);
pageList = baseMapper.workGroupPage(page,queryWrapper);
}else if (meetingType.equals(MeetingCommon.DRAFTING_GROUP_MEETING_INT)){
queryWrapper.and(
a -> a.eq("pdg.principal_id_a", sysUser.getId())
.or()
.eq("pdg.principal_id_b", sysUser.getId())
.or()
.eq("dock_id", sysUser.getId())
.or()
.eq("pm.director_id", sysUser.getId())
.or()
.eq("pmc.meeting_contacts_id", sysUser.getId())
);
pageList = baseMapper.draftGroupPage(page,queryWrapper);
}else if (meetingType.equals(MeetingCommon.INTERNATIONAL_MEETING_INT)){
queryWrapper.and(
a -> a.eq("director_id", sysUser.getId())
@@ -1289,6 +1347,8 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
classToExport = CommitteeMeetingExcel.class;
}else if (meetingType.equals(MeetingCommon.COUNCIL_MEETING_INT)){
classToExport = CouncilMeetingExcel.class;
}else if (meetingType.equals(MeetingCommon.DRAFTING_GROUP_MEETING_INT)){
classToExport = DraftingGroupMeetingExcel.class;
}
return classToExport;
}
@@ -1387,6 +1447,15 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
BeanUtils.copyProperties(payMeetingVO, councilMeetingExcel);
exportList.add(councilMeetingExcel);
break;
case MeetingCommon.DRAFTING_GROUP_MEETING:
String draftingGroupId = meeting.getDraftingGroupId();
PayDraftingGroup draftingGroup = payDraftingGroupService.getById(draftingGroupId);
payMeetingVO.setDraftingGroupName(draftingGroup.getDraftingGroupProject());
//保存数据
DraftingGroupMeetingExcel draftingGroupMeetingExcel = new DraftingGroupMeetingExcel();
BeanUtils.copyProperties(payMeetingVO, draftingGroupMeetingExcel);
exportList.add(draftingGroupMeetingExcel);
break;
}
}
return exportList;
@@ -46,6 +46,8 @@ import com.jero.data.entity.PayCaseCouncilSubitem;
import com.jero.data.service.IPayCaseCommitteeSubitemService;
import com.jero.data.service.IPayCaseCouncilService;
import com.jero.data.service.IPayCaseCouncilSubitemService;
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
import com.jero.drafting.service.IPayDraftingGroupSubItemContactsService;
import com.jero.mail.entity.PayMailBill;
import com.jero.mail.service.IPayMailBillService;
import com.jero.meeting.common.MeetingCommon;
@@ -161,6 +163,8 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
private PayMeetingGuestsFileMapper meetingGuestsFileMapper;
@Resource
private ISysBaseAPI sysBaseAPI;
@Resource
private IPayDraftingGroupSubItemContactsService draftingGroupSubItemContactsService;
private static final String[] CAN_MODIFY_LIST =
@@ -586,7 +590,6 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
payPaymentRecordService.addAmountReceived(payPaymentRecords,ProjectCommon.PAYMENT_FLAG1,"record");
//非成员单位审核通过且上传的缴费凭证审核通过也发送。(即需要审核的都审核通过才发送)
sendMessage(payMeeting, payMeetingSituation, CompanyMessageEnums.MSG6, "C_OPEN_TYPE6");
}
}
@@ -1343,6 +1346,15 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
if (count <= 0) {
payMeetingSituation1.setRegisterCheckResult(MeetingSubitemCommon.SIGNUP_STATUS_0);
}
} else if (meetingType.equals(MeetingCommon.DRAFTING_GROUP_MEETING_INT)) {
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(PayDraftingGroupSubItemContacts::getDraftingGroupId, payMeeting.getDraftingGroupId());
wrapper.eq(PayDraftingGroupSubItemContacts::getContactsId, payMeetingSituation1.getCompanyContactId());
int count = draftingGroupSubItemContactsService.count(wrapper);
if (count <= 0) {
payMeetingSituation1.setRegisterCheckResult(MeetingSubitemCommon.SIGNUP_STATUS_0);
}
} else if (meetingType.equals(MeetingCommon.COMMITTEE_MEETING_INT)) {
LambdaQueryWrapper<PayCaseCommitteeSubitem> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(PayCaseCommitteeSubitem::getCommitteeId, payMeeting.getCaseCommitteeId());
@@ -1729,9 +1741,14 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
BeanUtils.copyProperties(meetingSituation, councilSituationExcel);
exportList.add(councilSituationExcel);
break;
case MeetingCommon.DRAFTING_GROUP_MEETING:
//保存数据
DraftingGroupSituationExcel draftingGroupSituationExcel = new DraftingGroupSituationExcel();
BeanUtils.copyProperties(meetingSituation, draftingGroupSituationExcel);
exportList.add(draftingGroupSituationExcel);
break;
}
}
return exportList;
}
@@ -1750,6 +1767,8 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
classToExport = CommitteeSituationExcel.class;
}else if (meetingType.equals(MeetingCommon.COUNCIL_MEETING_INT)){
classToExport = CouncilSituationExcel.class;
}else if (meetingType.equals(MeetingCommon.DRAFTING_GROUP_MEETING_INT)){
classToExport = DraftingGroupSituationExcel.class;
}
return classToExport;
}
@@ -1821,9 +1840,11 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
String meetingId = setGuestsUploadFileVO.getMeetingId();
PayMeeting payMeeting = meetingService.getById(meetingId);
String meetingType = payMeeting.getMeetingType().toString();
Integer meetingType2 = MeetingCommon.DRAFTING_GROUP_MEETING_INT;
if (meetingType1 != null && !Objects.equals(payMeeting.getMeetingType(),meetingType1)) {
if (meetingType == null ||
(!Objects.equals(payMeeting.getMeetingType(), meetingType1) &&
!Objects.equals(payMeeting.getMeetingType(), meetingType2))) {
throw new JeroBootException("数据权限不足");
}
@@ -0,0 +1,9 @@
package com.jero.meeting.valid.group;
/**
* 起草组类型
* @author sz
* @date 2024-01-05
*/
public @interface DraftingGroupMeeting {
}
@@ -290,7 +290,7 @@ public class PayMeetingVO implements Serializable {
/**备注*/
@Excel(name = "备注", width = 15)
@ApiModelProperty(value = "备注")
@Size(max = 200, message = "备注最大为200字符")
@Size(max = 1000, message = "备注最大为1000字符")
private String remark;
/**会议通知文件*/
@@ -358,4 +358,13 @@ public class PayMeetingVO implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "征集截止日期")
private java.util.Date endTimeAddQuestion;
/**起草组id*/
@Excel(name = "起草组名称", width = 15, dictTable = "pay_drafting_group",dicText = "drafting_group_project",dicCode = "id")
@ApiModelProperty(value = "起草id")
private String draftingGroupId;
/**起草组名称*/
@ApiModelProperty(value = "起草组名称")
private String draftingGroupName;
}
@@ -19,8 +19,11 @@ public class PublishReminderVO {
private List<String> meetingIds;
@ApiModelProperty(value = "成员id列表")
private List<String> subitemIds;
@ApiModelProperty(value = "项目类型1:工作组,2:分标委")
@ApiModelProperty(value = "项目类型1:工作组, 2:分标委, 3:起草组")
private Integer projectType;
@ApiModelProperty(value = "是否发送邮件")
private Integer sendEmailFlag;
@ApiModelProperty(value = "起草组id")
private java.lang.String draftingGroupId;
}
@@ -0,0 +1,98 @@
package com.jero.meeting.vo.excel;
import com.jero.meeting.entity.PayMeetingContacts;
import com.jero.meeting.entity.PayMeetingHotelContacts;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
import java.math.BigDecimal;
import java.util.List;
@Data
public class DraftingGroupMeetingExcel {
/**工作组项目名称*/
@Excel(name = "起草组项目名称", width = 15)
private String draftingGroupName;
/**会议名称*/
@Excel(name = "会议名称", width = 15)
private String meetingName;
/**会议类型*/
@Excel(name = "会议类型", width = 15)
private String meetingType;
/**开始时间*/
@Excel(name = "会议开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
private java.util.Date startTime;
/**结束时间*/
@Excel(name = "会议结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
private java.util.Date endTime;
/**年份*/
@Excel(name = "年份", width = 15)
private String particularYear;
/**召开地点*/
@Excel(name = "召开地点", width = 15)
private String venue;
/**详细地址*/
@Excel(name = "详细地址", width = 15)
private String address;
/**预计参加人数*/
@Excel(name = "预计参加人数", width = 15)
private String estimatedNumber;
/**会议内容*/
@Excel(name = "会议内容", width = 15)
private String meetingContent;
/**报名截止时间*/
@Excel(name = "报名截止时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
private java.util.Date registerDeadline;
/**会议费用*/
@Excel(name = "会议费用", width = 15)
private BigDecimal meetingCosts;
/**会议负责人*/
@Excel(name = "会议负责人", width = 15)
private String directorName;
/**会议负责人手机号*/
@Excel(name = "会议负责人手机号", width = 15)
private String directorPhone;
/**酒店名称*/
@Excel(name = "酒店名称", width = 15)
private String hotelName;
/**酒店地址*/
@Excel(name = "酒店地址", width = 15)
private String hotelAddress;
/**
* 会议关联酒店联系人列表
*/
private List<PayMeetingHotelContacts> hotelContactsList;
/**
* 会议联系人列表
*/
@ExcelCollection(name = "会议联系人列表")
private List<PayMeetingContacts> meetingContactsList;
/**备注*/
@Excel(name = "备注", width = 15)
private String remark;
// /**通知正文*/
// @Excel(name = "通知正文", width = 15,orderNum = "1")
// private String notice;
}
@@ -0,0 +1,75 @@
package com.jero.meeting.vo.excel;
import com.jero.common.aspect.annotation.Dict;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
@Data
public class DraftingGroupSituationExcel extends SituationBaseExcel {
/**会议id*/
@Excel(name = "会议名称", width = 15,dictTable = "pay_meeting",dicCode = "id",dicText = "meeting_name")
private String meetingId;
/**企业id*/
@Excel(name = "企业名称", width = 15)
private String companyName;
/**企业联系人id*/
@Excel(name = "企业联系人名称", width = 15)
private String companyContactName;
/**职务*/
@Excel(name = "职务", width = 15)
private String post;
/**手机号*/
@Excel(name = "手机号", width = 15)
private String phone;
/**邮箱*/
@Excel(name = "邮箱", width = 15)
private String email;
/**身份*/
@Dict(dicCode = "meet_identify_type")
@Excel(name = "身份", width = 15,dicCode = "meet_identify_type")
private Integer identity;
/**是否入住协议酒店*/
@Excel(name = "是否入住酒店", width = 15,dicCode = "yn")
private Integer checkInHotel;
/**抵达时间*/
@Excel(name = "抵达时间", width = 20, format = "yyyy-MM-dd")
private java.util.Date arrivalTime;
/**离开时间*/
@Excel(name = "离开时间", width = 20, format = "yyyy-MM-dd")
private java.util.Date departureTime;
/**邮寄联系人*/
@Excel(name = "邮寄联系人", width = 15, dictTable = "pay_contacts_management", dicText = "name", dicCode = "id")
private String postContactId;
/**邮寄联系人地址*/
@Excel(name = "邮寄联系人地址", width = 15)
private String postContactAddress;
/**邮编*/
@Excel(name = "邮编", width = 15)
private String postCode;
/**缴费方式*/
@Excel(name = "缴费方式", width = 15,dicCode = "meeting_pay_type")
private Integer payMode;
/**需要发票*/
@Excel(name = "需要发票", width = 15,dicCode = "invoice_type")
private Integer needInvoice;
/**订单后4位编码*/
@Excel(name = "订单后4位编码", width = 15)
private String orderCode;
}
@@ -60,7 +60,17 @@
<select id="getPage" resultMap="MemberProjectSubitemResultMap">
select pmps.id,pmps.create_by,pmps.create_time,pmps.update_by,pmps.update_time,pmps.project_id,pmps.company_id,pmps.company_temporary_id,
if(pmps.company_name = pcm.company_name, pmps.company_name, concat(pmps.company_name,'(更名为',pcm.company_name,')')) as company_name,
# if(pmps.company_name = pcm.company_name, pmps.company_name, concat(pmps.company_name,'(更名为',pcm.company_name,')')) as company_name,
IF(
pmps.company_name =
IF(
pmps.company_name LIKE '%(未审核)',
CONCAT(pcm.company_name, '(未审核)'),
pcm.company_name
),
pmps.company_name,
CONCAT(pmps.company_name, '(更名为', pcm.company_name, ')')
) AS company_name,
pmps.company_contact_id,pmps.company_contact_temporary_id,pmps.company_contact_name,pmps.post_contact_id,
pmps.post_contact_temporary_id,
pmps.post_contact_name,pmps.amount_receivable,pmps.paid_amount,pmps.confirm_amount,pmps.payment_method,pmps.charge_notice_no,
@@ -97,17 +97,22 @@ public class PayProjectCommon {
public static final Integer YES = 1;
/**
* 项目类型1:工作组,2:分标委, 3:理事会
* 项目类型1:工作组,2:分标委, 3:理事会, 4:起草组
*/
public final static Integer PROJECT_TYPE_FILE1 = 1;
/**
* 项目类型1:工作组,2:分标委, 3:理事会
* 项目类型1:工作组,2:分标委, 3:理事会, 4:起草组
*/
public final static Integer PROJECT_TYPE_FILE2 = 2;
/**
* 项目类型1:工作组,2:分标委, 3:理事会
* 项目类型1:工作组,2:分标委, 3:理事会, 4:起草组
*/
public final static Integer PROJECT_TYPE_FILE3 = 3;
/**
* 项目类型1:工作组,2:分标委, 3:理事会, 4:起草组
*/
public final static Integer PROJECT_TYPE_FILE4 = 4;
/**
* 需要发票(1:增值税普通发票,2:增值税专用发票,0:否,3:需要发票(小程序需要))
*/
@@ -25,6 +25,8 @@ import com.jero.contract.entity.PayIncomeContract;
import com.jero.contract.entity.PayIncomeContractAssociated;
import com.jero.contract.service.IPayIncomeContractAssociatedService;
import com.jero.contract.service.IPayIncomeContractService;
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
import com.jero.drafting.service.IPayDraftingGroupSubItemContactsService;
import com.jero.mail.entity.PayMailBill;
import com.jero.mail.entity.PayMailBillProject;
import com.jero.mail.service.IPayMailBillProjectService;
@@ -102,6 +104,8 @@ public class PayCommonProjectController extends JeroController<PayCommonProject,
private RolePermissionService rolePermissionService;
@Resource
private IPayWorkingGroupSubItemContactsService payWorkingGroupSubItemContactsService;
@Resource
private IPayDraftingGroupSubItemContactsService payDraftingGroupSubItemContactsService;
/**
* 分页列表查询
*
@@ -359,7 +363,7 @@ public class PayCommonProjectController extends JeroController<PayCommonProject,
return Result.OK(listPayCommonProjectOutputNew);
}
/**
* 添加
*
@@ -381,7 +385,7 @@ public class PayCommonProjectController extends JeroController<PayCommonProject,
payCommonProjectService.addPayCommonProject(payCommonProject);
return Result.OK("添加成功!");
}
/**
* 编辑
*
@@ -420,7 +424,7 @@ public class PayCommonProjectController extends JeroController<PayCommonProject,
payCommonProjectService.delete(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
@@ -491,6 +495,39 @@ public class PayCommonProjectController extends JeroController<PayCommonProject,
}
}
// 起草组项目资料
if(Objects.equals(String.valueOf(payCommonProject.getProjectType()), ProjectCommon.PROJECT_TYPE7)){
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
LambdaQueryWrapper<PayWorkingGroupDistributionRecord> queryPayWorkingGroupDistributionRecord = new LambdaQueryWrapper<>();
queryPayWorkingGroupDistributionRecord.eq(PayWorkingGroupDistributionRecord::getSubId,id);
queryPayWorkingGroupDistributionRecord.eq(PayWorkingGroupDistributionRecord::getContactsId,sysUser.getId());
queryPayWorkingGroupDistributionRecord.groupBy(PayWorkingGroupDistributionRecord::getFileId);
List<PayWorkingGroupDistributionRecord> listPayWorkingGroupDistributionRecord = payWorkingGroupDistributionRecordService.list(queryPayWorkingGroupDistributionRecord);
if(!CollectionUtils.isEmpty(listPayWorkingGroupDistributionRecord)){
StringBuilder sb = new StringBuilder();
listPayWorkingGroupDistributionRecord.forEach(p->{
sb.append(p.getFileId());
if(listPayWorkingGroupDistributionRecord.indexOf(p) != (listPayWorkingGroupDistributionRecord.size() - 1)){
sb.append(",");
}
});
payCommonProject.setFiles(sb.toString());
}
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> queryPayDraftingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayDraftingGroupSubItemContacts.eq(PayDraftingGroupSubItemContacts::getDraftingGroupId,id);
List<PayDraftingGroupSubItemContacts> pwg = payDraftingGroupSubItemContactsService.list(queryPayDraftingGroupSubItemContacts);
if(!CollectionUtils.isEmpty(pwg)){
pwg.sort(Comparator.comparing(PayDraftingGroupSubItemContacts::getOrderNum));
payCommonProject.setContactsTemporaryId(pwg.get(0).getContactsTemporaryId());
payCommonProject.setContactsTemporaryName(pwg.get(0).getContactsTemporaryName());
}else{
payCommonProject.setContactsTemporaryId("");
payCommonProject.setContactsTemporaryName("");
}
}
String strProject = JSON.toJSONString(payCommonProject);
payCompanyCommonProject = JSONObject.parseObject(strProject,PayCompanyCommonProject.class);
if(Objects.isNull(payCompanyCommonProject.getPaidAmount())){
@@ -557,7 +594,7 @@ public class PayCommonProjectController extends JeroController<PayCommonProject,
}
return Result.OK(payCompanyCommonProject);
}
/**
* 通过id查询
*
@@ -11,6 +11,8 @@ import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.ValidUtil;
import com.jero.common.util.oConvertUtils;
import com.jero.drafting.entity.PayDraftingGroup;
import com.jero.drafting.service.IPayDraftingGroupService;
import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService;
import com.jero.project.common.PayProjectCommon;
@@ -59,6 +61,9 @@ public class PayWorkingGroupDataFileController extends JeroController<PayWorking
private RolePermissionService rolePermissionService;
@Resource
private IPayWorkingGroupService payWorkingGroupService;
@Resource
private IPayDraftingGroupService payDraftingGroupService;
@Value("${jero.path.upload}")
private String upLoadPath;
@@ -81,13 +86,14 @@ public class PayWorkingGroupDataFileController extends JeroController<PayWorking
if(StringUtils.isBlank(payWorkingGroupDataFile.getProjectId())){
return Result.error("工作组id不能为空!");
}
if(payWorkingGroupDataFile.getProjectType() != PayProjectCommon.PROJECT_TYPE_FILE1
&& payWorkingGroupDataFile.getProjectType() != PayProjectCommon.PROJECT_TYPE_FILE2
&& payWorkingGroupDataFile.getProjectType() != PayProjectCommon.PROJECT_TYPE_FILE3){
if(!Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE1)
&& !Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE2)
&& !Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE3)
&& !Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE4)){
return Result.error("项目状态不正确!");
}
if(payWorkingGroupDataFile.getProjectType() == PayProjectCommon.PROJECT_TYPE_FILE1){
if(Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE1)){
PayWorkingGroup payWorkingGroup = payWorkingGroupService.getById(payWorkingGroupDataFile.getProjectId());
if(Objects.isNull(payWorkingGroup)){
throw new JeroBootException("工作组不存在!");
@@ -99,6 +105,20 @@ public class PayWorkingGroupDataFileController extends JeroController<PayWorking
throw new JeroBootException("数据权限不足!");
}
}
// 起草组验证权限
if(Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE4)){
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(payWorkingGroupDataFile.getProjectId());
if(Objects.isNull(payDraftingGroup)){
throw new JeroBootException("起草组不存在!");
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// todo 缺少数据权限
if(!rolePermissionService.getRolePermission("fileMaintenance:search")
&& !Objects.equals(payDraftingGroup.getPrincipalIdA(),sysUser.getId())
&& !Objects.equals(payDraftingGroup.getPrincipalIdB(),sysUser.getId())){
throw new JeroBootException("数据权限不足!");
}
}
if(!StringUtils.isBlank(payWorkingGroupDataFile.getFileName())){
payWorkingGroupDataFile.setFileName(oConvertUtils.replaceAllPercent(payWorkingGroupDataFile.getFileName()));
@@ -122,9 +142,10 @@ public class PayWorkingGroupDataFileController extends JeroController<PayWorking
if(StringUtils.isBlank(payWorkingGroupDataFile.getProjectId())){
return Result.error("项目id不能为空!");
}
if(payWorkingGroupDataFile.getProjectType() != PayProjectCommon.PROJECT_TYPE_FILE1
&& payWorkingGroupDataFile.getProjectType() != PayProjectCommon.PROJECT_TYPE_FILE2
&& payWorkingGroupDataFile.getProjectType() != PayProjectCommon.PROJECT_TYPE_FILE3){
if(!Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE1)
&& !Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE2)
&& !Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE3)
&& !Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE4)){
return Result.error("项目状态不正确!");
}
if(StringUtils.isBlank(payWorkingGroupDataFile.getFileIds())){
@@ -184,7 +205,7 @@ public class PayWorkingGroupDataFileController extends JeroController<PayWorking
return Result.error("资料不存在!");
}
if(payWorkingGroupDataFile.getProjectType() == PayProjectCommon.PROJECT_TYPE_FILE1){
if(Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE1)){
PayWorkingGroup payWorkingGroup = payWorkingGroupService.getById(payWorkingGroupDataFile.getProjectId());
if(Objects.isNull(payWorkingGroup)){
throw new JeroBootException("工作组不存在!");
@@ -196,6 +217,20 @@ public class PayWorkingGroupDataFileController extends JeroController<PayWorking
throw new JeroBootException("数据权限不足!");
}
}
// 起草组验证权限
if(Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE4)){
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(payWorkingGroupDataFile.getProjectId());
if(Objects.isNull(payDraftingGroup)){
throw new JeroBootException("起草组不存在!");
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// todo 缺少数据权限
if(!rolePermissionService.getRolePermission("fileMaintenance:search")
&& !Objects.equals(payDraftingGroup.getPrincipalIdA(),sysUser.getId())
&& !Objects.equals(payDraftingGroup.getPrincipalIdB(),sysUser.getId())){
throw new JeroBootException("数据权限不足!");
}
}
payWorkingGroupDataFileService.removeById(id);
return Result.OK("删除成功!");
}
@@ -214,7 +249,6 @@ public class PayWorkingGroupDataFileController extends JeroController<PayWorking
return Result.error("id不能为空!");
}
String[] s = ids.split(",");
StringBuilder msg = new StringBuilder();
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
for (String s1 : s) {
if(StringUtils.isBlank(s1)){
@@ -224,7 +258,7 @@ public class PayWorkingGroupDataFileController extends JeroController<PayWorking
if(Objects.isNull(payWorkingGroupDataFile)){
return Result.error("资料不存在!");
}else{
if(payWorkingGroupDataFile.getProjectType() == PayProjectCommon.PROJECT_TYPE_FILE1){
if(Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE1)){
PayWorkingGroup payWorkingGroup = payWorkingGroupService.getById(payWorkingGroupDataFile.getProjectId());
if(Objects.isNull(payWorkingGroup)){
throw new JeroBootException("工作组不存在!");
@@ -235,6 +269,19 @@ public class PayWorkingGroupDataFileController extends JeroController<PayWorking
throw new JeroBootException("数据权限不足!");
}
}
// 起草组验证权限
if(Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE4)){
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(payWorkingGroupDataFile.getProjectId());
if(Objects.isNull(payDraftingGroup)){
throw new JeroBootException("起草组不存在!");
}
// todo 缺少数据权限
if(!rolePermissionService.getRolePermission("fileMaintenance:search")
&& !Objects.equals(payDraftingGroup.getPrincipalIdA(),sysUser.getId())
&& !Objects.equals(payDraftingGroup.getPrincipalIdB(),sysUser.getId())){
throw new JeroBootException("数据权限不足!");
}
}
}
}
this.payWorkingGroupDataFileService.removeByIds(Arrays.asList(ids.split(",")));
@@ -287,10 +334,11 @@ public class PayWorkingGroupDataFileController extends JeroController<PayWorking
}
if(!Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE1)
&& !Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE2)
&& !Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE3)){
&& !Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE3)
&& !Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE4)){
throw new JeroBootException("项目状态不正确!");
}
if(payWorkingGroupDataFile.getProjectType() == PayProjectCommon.PROJECT_TYPE_FILE1){
if(Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE1)){
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
PayWorkingGroup payWorkingGroup = payWorkingGroupService.getById(payWorkingGroupDataFile.getProjectId());
if(Objects.isNull(payWorkingGroup)){
@@ -302,6 +350,21 @@ public class PayWorkingGroupDataFileController extends JeroController<PayWorking
throw new JeroBootException("数据权限不足!");
}
}
// 起草组验证权限
if(Objects.equals(payWorkingGroupDataFile.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE4)){
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(payWorkingGroupDataFile.getProjectId());
if(Objects.isNull(payDraftingGroup)){
throw new JeroBootException("起草组不存在!");
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// todo 缺少数据权限
if(!rolePermissionService.getRolePermission("fileMaintenance:search")
&& !Objects.equals(payDraftingGroup.getPrincipalIdA(),sysUser.getId())
&& !Objects.equals(payDraftingGroup.getPrincipalIdB(),sysUser.getId())){
throw new JeroBootException("数据权限不足!");
}
}
if(!StringUtils.isBlank(payWorkingGroupDataFile.getFileName())){
payWorkingGroupDataFile.setFileName(oConvertUtils.replaceAllPercent(payWorkingGroupDataFile.getFileName()));
}
@@ -17,6 +17,8 @@ import com.jero.data.entity.PayCaseCouncilSubitem;
import com.jero.data.mapper.PayFileEmailRemindRecordMapper;
import com.jero.data.service.IPayCaseCommitteeSubitemService;
import com.jero.data.service.IPayCaseCouncilSubitemService;
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
import com.jero.drafting.service.IPayDraftingGroupSubItemContactsService;
import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService;
import com.jero.project.common.PayProjectCommon;
@@ -41,10 +43,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import java.util.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
@@ -69,6 +68,8 @@ public class PayWorkingGroupDistributionRecordController extends JeroController<
private IPayCaseCouncilSubitemService payCaseCouncilSubitemService;
@Resource
private IPayWorkingGroupSubItemContactsService payWorkingGroupSubItemContactsService;
@Resource
private IPayDraftingGroupSubItemContactsService payDraftingGroupSubItemContactsService;
@Resource
private IOSSFileService iossFileService;
@@ -166,13 +167,13 @@ public class PayWorkingGroupDistributionRecordController extends JeroController<
//这里,防止要下载的文件有重名的导致下载失败
zipos.putNextEntry(new ZipEntry(ossFile.getFileName()));
os = new DataOutputStream(zipos);
InputStream is = new FileInputStream(file);
byte[] b = new byte[1024];
int length = 0;
while((length = is.read(b))!= -1){
os.write(b, 0, length);
try(InputStream is = new FileInputStream(file);){
byte[] b = new byte[1024];
int length = 0;
while((length = is.read(b))!= -1){
os.write(b, 0, length);
}
}
is.close();
zipos.closeEntry();
}catch (Exception e){
e.printStackTrace();
@@ -208,13 +209,14 @@ public class PayWorkingGroupDistributionRecordController extends JeroController<
if(StringUtils.isBlank(projectId)){
throw new JeroBootException("项目id不能为空!");
}
if(projectType != PayProjectCommon.PROJECT_TYPE_FILE1
&& projectType != PayProjectCommon.PROJECT_TYPE_FILE2
&& projectType != PayProjectCommon.PROJECT_TYPE_FILE3){
if(!Objects.equals(projectType,PayProjectCommon.PROJECT_TYPE_FILE1)
&& !Objects.equals(projectType,PayProjectCommon.PROJECT_TYPE_FILE2)
&& !Objects.equals(projectType,PayProjectCommon.PROJECT_TYPE_FILE3)
&& !Objects.equals(projectType,PayProjectCommon.PROJECT_TYPE_FILE4)){
return Result.error("项目状态不正确!");
}
List<PayContactsManagement> listData = new ArrayList<>();
if(projectType == PayProjectCommon.PROJECT_TYPE_FILE1){
if(Objects.equals(projectType,PayProjectCommon.PROJECT_TYPE_FILE1)){
//LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
//queryPayWorkingGroupSubItemContacts.eq(PayWorkingGroupSubItemContacts::getWorkingGroupId,projectId);
//List<PayWorkingGroupSubItemContacts> list = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
@@ -228,7 +230,7 @@ public class PayWorkingGroupDistributionRecordController extends JeroController<
listData.add(payContactsManagement);
});
}
}else if(projectType == PayProjectCommon.PROJECT_TYPE_FILE2){
}else if(Objects.equals(projectType,PayProjectCommon.PROJECT_TYPE_FILE2)){
LambdaQueryWrapper<PayCaseCommitteeSubitem> queryPayCaseCommitteeSubitem = new LambdaQueryWrapper<>();
queryPayCaseCommitteeSubitem.eq(PayCaseCommitteeSubitem::getCommitteeId,projectId);
List<PayCaseCommitteeSubitem> list = payCaseCommitteeSubitemService.list(queryPayCaseCommitteeSubitem);
@@ -241,7 +243,7 @@ public class PayWorkingGroupDistributionRecordController extends JeroController<
listData.add(payContactsManagement);
});
}
}else if(projectType == PayProjectCommon.PROJECT_TYPE_FILE3){
}else if(Objects.equals(projectType,PayProjectCommon.PROJECT_TYPE_FILE3)){
LambdaQueryWrapper<PayCaseCouncilSubitem> queryPayCaseCommitteeSubitem = new LambdaQueryWrapper<>();
queryPayCaseCommitteeSubitem.eq(PayCaseCouncilSubitem::getCouncilId,projectId);
List<PayCaseCouncilSubitem> list = payCaseCouncilSubitemService.list(queryPayCaseCommitteeSubitem);
@@ -254,6 +256,17 @@ public class PayWorkingGroupDistributionRecordController extends JeroController<
listData.add(payContactsManagement);
});
}
}else if(Objects.equals(projectType,PayProjectCommon.PROJECT_TYPE_FILE4)){
List<PayDraftingGroupSubItemContacts> list = payDraftingGroupSubItemContactsService.getContactsInfo(projectId);
if(!CollectionUtils.isEmpty(list)){
list.forEach(p->{
PayContactsManagement payContactsManagement = new PayContactsManagement();
payContactsManagement.setId(p.getContactsTemporaryId());
payContactsManagement.setName(p.getContactsTemporaryName());
payContactsManagement.setCompanyName(p.getCompanyName());
listData.add(payContactsManagement);
});
}
}else {
throw new JeroBootException("项目状态不正确!");
@@ -2,7 +2,6 @@ package com.jero.project.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.api.vo.Result;
@@ -14,13 +13,11 @@ import com.jero.common.service.ProjectDetailService;
import com.jero.common.service.RolePermissionService;
import com.jero.common.service.SendMessageService;
import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.query.QueryGenerator;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.PasswordUtil;
import com.jero.common.util.ValidUtil;
import com.jero.common.util.oConvertUtils;
import com.jero.common.vo.ProjectDetailVO;
import com.jero.company.entity.PayContactsManagement;
import com.jero.contract.entity.PayIncomeContract;
import com.jero.contract.entity.PayIncomeContractAssociated;
import com.jero.contract.service.IPayIncomeContractAssociatedService;
@@ -52,7 +49,6 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.formula.functions.T;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.BeanUtils;
@@ -155,6 +151,58 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
return Result.OK(pageList);
}
/**
*
* 查询工作组成员信息(不带权限)
* @param payWorkingGroupSubItem 工作组成员
* @param pageNo 页数
* @param pageSize 条数
* @param paymentDate 日期
* @return
*/
@ApiOperation(value = "企业端-工作组成员-查询某个工作组", notes = "企业端-工作组成员-查询某个工作组")
@GetMapping(value = "/getItemById")
public Result<?> getItemById(PayWorkingGroupSubItem payWorkingGroupSubItem,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
@RequestParam(name = "paymentDate", required = false) String paymentDate) {
if (!StringUtils.isBlank(payWorkingGroupSubItem.getChargeCompanyTemporaryName()) && payWorkingGroupSubItem.getChargeCompanyTemporaryName().length() > 50) {
return Result.error("成员单位长度不能大于50个字符");
}
if (StringUtils.isBlank(payWorkingGroupSubItem.getWorkingGroupId())) {
return Result.error("工作组id不能为空!");
}
if (StringUtils.isBlank(payWorkingGroupSubItem.getId())) {
return Result.error("工作组成员id不能为空!");
}
if(!StringUtils.isBlank(payWorkingGroupSubItem.getChargeCompanyTemporaryName())){
payWorkingGroupSubItem.setChargeCompanyTemporaryName(oConvertUtils.replaceAllPercent(payWorkingGroupSubItem.getChargeCompanyTemporaryName()));
}
PayWorkingGroup payWorkingGroup = payWorkingGroupService.getById(payWorkingGroupSubItem.getWorkingGroupId());
if(Objects.isNull(payWorkingGroup)){
return Result.error("工作组不存在!");
}
Page<PayWorkingGroupSubItem> page = new Page<>(pageNo, pageSize);
IPage<PayWorkingGroupSubItem> pageList = payWorkingGroupSubItemService.queryPageList(page, payWorkingGroupSubItem, paymentDate);
if(!CollectionUtils.isEmpty(pageList.getRecords())){
List<PayWorkingGroupSubItem> list = pageList.getRecords();
list.forEach(p->{
if(Objects.isNull(p.getReceivableAmount())){
p.setReceivableAmount(new BigDecimal("0.00"));
}
if(Objects.isNull(p.getPaidAmount())){
p.setPaidAmount(new BigDecimal("0.00"));
}
});
}
List<PayWorkingGroupSubItem> records = pageList.getRecords();
if (CollectionUtils.isEmpty(records)){
return Result.error("该成员不存在");
}
PayWorkingGroupSubItem item = records.get(0);
return Result.OK(item);
}
/**
* 分页列表查询
*
@@ -390,6 +438,27 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
return Result.OK("编辑成功!");
}
/**
* 企业端-工作组成员-修改
*
* @param payWorkingGroupSubItem 工作组成员
* @return
*/
@AutoLog(value = "企业端-工作组成员-修改",operateType = 3)
@ApiOperation(value = "企业端-工作组成员-修改", notes = "企业端-工作组成员-修改")
@PostMapping(value = "/editCompany")
public Result<?> editCompany(@RequestBody PayWorkingGroupSubItem payWorkingGroupSubItem) {
if (Objects.isNull(payWorkingGroupSubItem.getEstimatedArrivalDate())) {
return Result.error("预估到账日期不能为空");
}
StringBuilder msg = ValidUtil.validateAll(payWorkingGroupSubItem);
if (!StringUtils.isBlank(msg)) {
return Result.error(msg.toString());
}
payWorkingGroupSubItemService.editPayWorkingGroupSubItemByCompany(payWorkingGroupSubItem);
return Result.OK("编辑成功!");
}
/**
* 催款提醒
*
@@ -1,21 +1,21 @@
package com.jero.project.entity;
import java.io.Serializable;
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 lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* @Description: pay_working_group_data_file
@@ -40,8 +40,8 @@ public class PayWorkingGroupDataFile implements Serializable {
@NotEmpty(message = "工项目id不能为空")
@Size(max = 32,message = "项目id长度不能大于32个字符")
private java.lang.String projectId;
/**项目类型1:工作组,2:分标委*/
@ApiModelProperty(value = "项目类型1:工作组,2:分标委,3:理事会")
/**项目类型1:工作组,2:分标委,3:理事会, 4:起草组*/
@ApiModelProperty(value = "项目类型1:工作组,2:分标委,3:理事会,4:起草组")
@NotEmpty(message = "项目类型1不能为空")
private java.lang.Integer projectType;
/**文件id*/
@@ -11,7 +11,17 @@
su.realname as principal_name,
pcp.charge_company_id,
pcp.charge_company_temporary_id,
if(pcp.charge_company_temporary_name = pcm.company_name, pcp.charge_company_temporary_name, concat(pcp.charge_company_temporary_name,'(更名为',pcm.company_name,')')) as charge_company_temporary_name,
# if(pcp.charge_company_temporary_name = pcm.company_name, pcp.charge_company_temporary_name, concat(pcp.charge_company_temporary_name,'(更名为',pcm.company_name,')')) as charge_company_temporary_name,
IF(
pcp.charge_company_temporary_name =
IF(
pcp.charge_company_temporary_name LIKE '%(未审核)',
CONCAT(pcm.company_name, '(未审核)'),
pcm.company_name
),
pcp.charge_company_temporary_name,
CONCAT(pcp.charge_company_temporary_name, '(更名为', pcm.company_name, ')')
) AS chargeCompanyTemporaryName,
pcp.charge_use,
pcp.contacts_id,
pcp.contacts_temporary_id,
@@ -9,7 +9,17 @@
pwgs.charge_company_id AS chargeCompanyId,
pwgs.charge_company_temporary_id AS chargeCompanyTemporaryId,
<!-- pwgs.charge_company_temporary_name AS chargeCompanyTemporaryName,-->
if(pwgs.charge_company_temporary_name = pcm.company_name, pwgs.charge_company_temporary_name, concat(pwgs.charge_company_temporary_name,'(更名为',pcm.company_name,')')) as chargeCompanyTemporaryName,
# if(pwgs.charge_company_temporary_name = pcm.company_name, pwgs.charge_company_temporary_name, concat(pwgs.charge_company_temporary_name,'(更名为',pcm.company_name,')')) as chargeCompanyTemporaryName,
IF(
pwgs.charge_company_temporary_name =
IF(
pwgs.charge_company_temporary_name LIKE '%(未审核)',
CONCAT(pcm.company_name, '(未审核)'),
pcm.company_name
),
pwgs.charge_company_temporary_name,
CONCAT(pwgs.charge_company_temporary_name, '(更名为', pcm.company_name, ')')
) AS chargeCompanyTemporaryName,
pwgs.contacts_id_one AS contactsIdOne,
pwgs.contacts_temporary_id_one AS contactsTemporaryIdOne,
pwgs.contacts_temporary_name_one AS contactsTemporaryNameOne,
@@ -78,6 +88,9 @@
<if test="payWorkingGroupSubItem.estimatedArrivalEndDate != null">
AND pwgs.estimated_arrival_date &lt;= #{payWorkingGroupSubItem.estimatedArrivalEndDate}
</if>
<if test="payWorkingGroupSubItem.id != null and payWorkingGroupSubItem.id != ''">
and pwgs.id = #{payWorkingGroupSubItem.id}
</if>
</where>
GROUP BY pwgs.id
ORDER BY pwgs.create_time desc
@@ -1,11 +1,9 @@
package com.jero.project.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.company.entity.PayContactsManagement;
import com.jero.project.entity.PayWorkGroupSubletStatistics;
import com.jero.project.entity.PayWorkingGroupSubItem;
import com.jero.project.entity.PayWorkingGroupSubletSearch;
@@ -50,6 +48,17 @@ public interface IPayWorkingGroupSubItemService extends IService<PayWorkingGroup
* @Exception
*/
void editPayWorkingGroupSubItem(PayWorkingGroupSubItem payWorkingGroupSubItem);
/**
* @Description 编辑
* @Author lqt
* @Date 2021/9/3
* @Param
* @Return
* @Exception
*/
void editPayWorkingGroupSubItemByCompany(PayWorkingGroupSubItem payWorkingGroupSubItem);
/**
* @Description excel导入
* @Author lqt
@@ -17,9 +17,19 @@ import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.PasswordUtil;
import com.jero.company.entity.PayContactsManagement;
import com.jero.company.service.IPayContactsManagementService;
import com.jero.data.entity.*;
import com.jero.data.service.*;
import com.jero.data.entity.PayCaseCommittee;
import com.jero.data.entity.PayCaseCommitteeSubitem;
import com.jero.data.entity.PayCaseCouncil;
import com.jero.data.entity.PayCaseCouncilSubitem;
import com.jero.data.service.IPayCaseCommitteeService;
import com.jero.data.service.IPayCaseCommitteeSubitemService;
import com.jero.data.service.IPayCaseCouncilService;
import com.jero.data.service.IPayCaseCouncilSubitemService;
import com.jero.data.service.impl.PayFileEmailRemindRecordService;
import com.jero.drafting.entity.PayDraftingGroup;
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
import com.jero.drafting.service.IPayDraftingGroupService;
import com.jero.drafting.service.IPayDraftingGroupSubItemContactsService;
import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService;
import com.jero.project.common.PayProjectCommon;
@@ -34,6 +44,7 @@ import org.apache.shiro.SecurityUtils;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.io.File;
import java.util.*;
@@ -82,6 +93,11 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
private IPayWorkingGroupSubItemContactsService payWorkingGroupSubItemContactsService;
@Resource
private PayFileEmailRemindRecordService fileEmailRemindRecordService;
@Resource
private IPayDraftingGroupService payDraftingGroupService;
@Resource
private IPayDraftingGroupSubItemContactsService payDraftingGroupSubItemContactsService;
@Override
@Transactional
@@ -115,7 +131,7 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
List<PayContactsManagementTemporary> list = new ArrayList<>();
String msg = "";
List<PayWorkingGroupDistributionRecord> listPayWorkingGroupDistributionRecord = new ArrayList<>();
if(payWorkingGroupDistributionRecord.getProjectType() == PayProjectCommon.PROJECT_TYPE_FILE1){
if(Objects.equals(payWorkingGroupDistributionRecord.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE1)){
PayWorkingGroup payWorkingGroup = payWorkingGroupService.getById(payWorkingGroupDistributionRecord.getProjectId());
if(Objects.isNull(payWorkingGroup)){
throw new JeroBootException("工作组不存在!");
@@ -134,7 +150,7 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
list = listContacts;
}
msg = payWorkingGroup.getWorkingGroupProject();
}else if(payWorkingGroupDistributionRecord.getProjectType() == PayProjectCommon.PROJECT_TYPE_FILE2){
}else if(Objects.equals(payWorkingGroupDistributionRecord.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE2)){
LambdaQueryWrapper<PayContactsManagement> queryPayContactsManagement = new LambdaQueryWrapper<>();
queryPayContactsManagement.in(PayContactsManagement::getId, Arrays.asList(contactsIds.split(",")));
List<PayContactsManagement> listContacts = payContactsManagementService.list(queryPayContactsManagement);
@@ -166,7 +182,7 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
throw new JeroBootException("分标委不存在!");
}
msg = payCaseCommittee.getName();
}else if(payWorkingGroupDistributionRecord.getProjectType() == PayProjectCommon.PROJECT_TYPE_FILE3){
}else if(Objects.equals(payWorkingGroupDistributionRecord.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE3)){
LambdaQueryWrapper<PayContactsManagement> queryPayContactsManagement = new LambdaQueryWrapper<>();
queryPayContactsManagement.in(PayContactsManagement::getId, Arrays.asList(contactsIds.split(",")));
List<PayContactsManagement> listContacts = payContactsManagementService.list(queryPayContactsManagement);
@@ -197,6 +213,25 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
throw new JeroBootException("理事会不存在!");
}
msg = payCaseCouncil.getName();
}else if(Objects.equals(payWorkingGroupDistributionRecord.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE4)){
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(payWorkingGroupDistributionRecord.getProjectId());
if(Objects.isNull(payDraftingGroup)){
throw new JeroBootException("起草组不存在!");
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if(!rolePermissionService.getRolePermission("fileMaintenance:distribute")
&& !Objects.equals(payDraftingGroup.getPrincipalIdA(),sysUser.getId())
&& !Objects.equals(payDraftingGroup.getPrincipalIdB(),sysUser.getId())){
throw new JeroBootException("资料不可操作!");
}
setRecordByDrafting( payWorkingGroupDistributionRecord,s,listPayWorkingGroupDistributionRecord, byId);
LambdaQueryWrapper<PayContactsManagementTemporary> queryPayContactsManagementTemporary = new LambdaQueryWrapper<>();
queryPayContactsManagementTemporary.in(PayContactsManagementTemporary::getId, Arrays.asList(s));
List<PayContactsManagementTemporary> listContacts = payContactsManagementTemporaryService.list(queryPayContactsManagementTemporary);
if(!CollectionUtils.isEmpty(listContacts)){
list = listContacts;
}
msg = payDraftingGroup.getDraftingGroupProject();
}else{
throw new JeroBootException("项目状态不正确!");
}
@@ -212,14 +247,6 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
List<String> listMsg = new ArrayList<>();
for (PayContactsManagementTemporary p : list) {
try {
List<PayWorkingGroupDistributionRecord> listStr = listPayWorkingGroupDistributionRecord.stream().filter(item->
(payWorkingGroupDistributionRecord.getProjectType() == PayProjectCommon.PROJECT_TYPE_FILE1) ?
Objects.equals(item.getTemporaryContactsId(),p.getId()) :
Objects.equals(item.getContactsId(),p.getId())).collect(Collectors.toList());
if(CollectionUtils.isEmpty(listStr)){
continue;
}
// 发送消息
SendMessageDTO sendMessageDTO = new SendMessageDTO();
Integer sendEmailFlag = payWorkingGroupDistributionRecord.getSendEmailFlag();
@@ -239,10 +266,33 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
sendMessageDTO.setListFile(listFile);
sendMessageDTO.setBusType("C_OPEN_TYPE12");
JSONObject json = new JSONObject();
if(payWorkingGroupDistributionRecord.getProjectType() == PayProjectCommon.PROJECT_TYPE_FILE1){
if(Objects.equals(payWorkingGroupDistributionRecord.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE1)){
List<PayWorkingGroupDistributionRecord> listStr = listPayWorkingGroupDistributionRecord.stream().filter(item->
Objects.equals(payWorkingGroupDistributionRecord.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE1) ?
Objects.equals(item.getTemporaryContactsId(),p.getId()) :
Objects.equals(item.getContactsId(),p.getId())).collect(Collectors.toList());
if(CollectionUtils.isEmpty(listStr)){
continue;
}
json.put("id",listStr.get(0).getSubId());
}else if(payWorkingGroupDistributionRecord.getProjectType() == PayProjectCommon.PROJECT_TYPE_FILE2){
}else if(Objects.equals(payWorkingGroupDistributionRecord.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE2)){
List<PayWorkingGroupDistributionRecord> listStr = listPayWorkingGroupDistributionRecord.stream().filter(item->
Objects.equals(payWorkingGroupDistributionRecord.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE2) ?
Objects.equals(item.getTemporaryContactsId(),p.getId()) :
Objects.equals(item.getContactsId(),p.getId())).collect(Collectors.toList());
if(CollectionUtils.isEmpty(listStr)){
continue;
}
json.put("id",listStr.get(0).getProjectId());
}else if(Objects.equals(payWorkingGroupDistributionRecord.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE4)){
List<PayWorkingGroupDistributionRecord> listStr = listPayWorkingGroupDistributionRecord.stream().filter(item->
Objects.equals(payWorkingGroupDistributionRecord.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE4) ?
Objects.equals(item.getTemporaryContactsId(),p.getId()) :
Objects.equals(item.getContactsId(),p.getId())).collect(Collectors.toList());
if(CollectionUtils.isEmpty(listStr)){
continue;
}
json.put("id",listStr.get(0).getSubId());
}
sendMessageDTO.setBusId(json.toJSONString());
sendMessageService.SendMessageService(sendMessageDTO);
@@ -292,7 +342,7 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
String msg = "";
List<PayContactsManagementTemporary> list = new ArrayList<>();
List<PayWorkingGroupDistributionRecord> listPayWorkingGroupDistributionRecord = new ArrayList<>();
if(payWorkingGroupDistributionRecord.getProjectType() == PayProjectCommon.PROJECT_TYPE_FILE1){
if(Objects.equals(payWorkingGroupDistributionRecord.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE1)){
PayWorkingGroup payWorkingGroup = payWorkingGroupService.getById(payWorkingGroupDistributionRecord.getProjectId());
if(Objects.isNull(payWorkingGroup)){
throw new JeroBootException("工作组不存在!");
@@ -321,7 +371,7 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
list = listContacts;
}
msg = payWorkingGroup.getWorkingGroupProject();
}else if(payWorkingGroupDistributionRecord.getProjectType() == PayProjectCommon.PROJECT_TYPE_FILE2){
}else if(Objects.equals(payWorkingGroupDistributionRecord.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE2)){
// 查询分标委成员
LambdaQueryWrapper<PayCaseCommitteeSubitem> queryPayCaseCommitteeSubitem = new LambdaQueryWrapper<>();
queryPayCaseCommitteeSubitem.eq(PayCaseCommitteeSubitem::getCommitteeId,payWorkingGroupDistributionRecord.getProjectId());
@@ -362,7 +412,7 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
throw new JeroBootException("分标委不存在!");
}
msg = payCaseCommittee.getName();
}else if(payWorkingGroupDistributionRecord.getProjectType() == PayProjectCommon.PROJECT_TYPE_FILE3){
}else if(Objects.equals(payWorkingGroupDistributionRecord.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE3)){
// 查询理事会成员
LambdaQueryWrapper<PayCaseCouncilSubitem> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(PayCaseCouncilSubitem::getCouncilId,payWorkingGroupDistributionRecord.getProjectId());
@@ -403,6 +453,35 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
throw new JeroBootException("理事会不存在!");
}
msg = payCaseCouncil.getName();
}if(Objects.equals(payWorkingGroupDistributionRecord.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE4)){
PayDraftingGroup payDraftingGroup = payDraftingGroupService.getById(payWorkingGroupDistributionRecord.getProjectId());
if(Objects.isNull(payDraftingGroup)){
throw new JeroBootException("起草组不存在!");
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if(!rolePermissionService.getRolePermission("fileMaintenance:distribute")
&& !Objects.equals(payDraftingGroup.getPrincipalIdA(),sysUser.getId())
&& !Objects.equals(payDraftingGroup.getPrincipalIdB(),sysUser.getId())){
throw new JeroBootException("资料不可操作!");
}
listPayWorkingGroupDataFile.forEach(p->{
OSSFile byId = iossFileService.getById(p.getFileId());
if(Objects.isNull(byId)){
throw new JeroBootException("没有找到文件!");
}
// 文件路径
String url = byId.getUrl();
listFile.add(path + url);
payWorkingGroupDistributionRecord.setDataId(p.getId());
setRecordByDrafting( payWorkingGroupDistributionRecord,s,listPayWorkingGroupDistributionRecord, byId);
});
LambdaQueryWrapper<PayContactsManagementTemporary> queryPayContactsManagementTemporary = new LambdaQueryWrapper<>();
queryPayContactsManagementTemporary.in(PayContactsManagementTemporary::getId, Arrays.asList(s));
List<PayContactsManagementTemporary> listContacts = payContactsManagementTemporaryService.list(queryPayContactsManagementTemporary);
if(!CollectionUtils.isEmpty(listContacts)){
list = listContacts;
}
msg = payDraftingGroup.getDraftingGroupProject();
}else {
throw new JeroBootException("项目状态不正确!");
}
@@ -419,7 +498,7 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
for (PayContactsManagementTemporary p : list) {
try {
List<PayWorkingGroupDistributionRecord> listStr = listPayWorkingGroupDistributionRecord.stream().filter(item->
(payWorkingGroupDistributionRecord.getProjectType() == PayProjectCommon.PROJECT_TYPE_FILE1) ?
Objects.equals(payWorkingGroupDistributionRecord.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE1) ?
Objects.equals(item.getTemporaryContactsId(),p.getId()) :
Objects.equals(item.getContactsId(),p.getId())).collect(Collectors.toList());
if(CollectionUtils.isEmpty(listStr)){
@@ -444,9 +523,9 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
sendMessageDTO.setListFile(listFile);
sendMessageDTO.setBusType("C_OPEN_TYPE12");
JSONObject json = new JSONObject();
if(payWorkingGroupDistributionRecord.getProjectType() == PayProjectCommon.PROJECT_TYPE_FILE1){
if(Objects.equals(payWorkingGroupDistributionRecord.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE1)){
json.put("id",listStr.get(0).getSubId());
}else if(payWorkingGroupDistributionRecord.getProjectType() == PayProjectCommon.PROJECT_TYPE_FILE2){
}else if(Objects.equals(payWorkingGroupDistributionRecord.getProjectType(),PayProjectCommon.PROJECT_TYPE_FILE2)){
json.put("id",listStr.get(0).getProjectId());
}
sendMessageDTO.setBusId(json.toJSONString());
@@ -492,4 +571,26 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
});
}
}
private void setRecordByDrafting(PayWorkingGroupDistributionRecord payWorkingGroupDistributionRecord,String[] s,List<PayWorkingGroupDistributionRecord> listPayWorkingGroupDistributionRecord,OSSFile byId){
// 查询工作组成员
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> queryPayDraftingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayDraftingGroupSubItemContacts.eq(PayDraftingGroupSubItemContacts::getDraftingGroupId,payWorkingGroupDistributionRecord.getProjectId());
queryPayDraftingGroupSubItemContacts.in(PayDraftingGroupSubItemContacts::getContactsTemporaryId,Arrays.asList(s));
List<PayDraftingGroupSubItemContacts> list = payDraftingGroupSubItemContactsService.list(queryPayDraftingGroupSubItemContacts);
if(!CollectionUtils.isEmpty(list)){
list.forEach(p->{
PayWorkingGroupDistributionRecord payWorkingGroupDistributionRecordNew = new PayWorkingGroupDistributionRecord();
payWorkingGroupDistributionRecordNew.setDataId(payWorkingGroupDistributionRecord.getDataId());
payWorkingGroupDistributionRecordNew.setProjectId(payWorkingGroupDistributionRecord.getProjectId());
payWorkingGroupDistributionRecordNew.setProjectType(payWorkingGroupDistributionRecord.getProjectType());
payWorkingGroupDistributionRecordNew.setFileId(byId.getId());
payWorkingGroupDistributionRecordNew.setSubId(p.getDraftingGroupSubId());
payWorkingGroupDistributionRecordNew.setContactsId(p.getContactsId());
payWorkingGroupDistributionRecordNew.setContactsName(p.getContactsTemporaryName());
payWorkingGroupDistributionRecordNew.setTemporaryContactsId(p.getContactsTemporaryId());
listPayWorkingGroupDistributionRecord.add(payWorkingGroupDistributionRecordNew);
});
}
}
}
@@ -20,6 +20,9 @@ import com.jero.company.service.IPayContactsManagementService;
import com.jero.config.StaticConfig;
import com.jero.contract.entity.PayIncomeContractAssociated;
import com.jero.contract.service.IPayIncomeContractAssociatedService;
import com.jero.meeting.common.MeetingCommon;
import com.jero.meeting.entity.PayMeeting;
import com.jero.meeting.service.IPayMeetingService;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.service.ISysUserService;
import com.jero.project.common.PayProjectCommon;
@@ -84,6 +87,8 @@ public class PayWorkingGroupServiceImpl extends ServiceImpl<PayWorkingGroupMappe
private ContractCreateProjectSendMessageService contractCreateProjectSendMessageService;
@Resource
private PayWorkingGroupSubItemContactsMapper payWorkingGroupSubItemContactsMapper;
@Resource
private IPayMeetingService payMeetingService;
@Override
public IPage<PayWorkingGroupVO> queryPageList(Page<PayWorkingGroupVO> page, PayWorkingGroup payWorkingGroup) {
@@ -117,6 +122,14 @@ public class PayWorkingGroupServiceImpl extends ServiceImpl<PayWorkingGroupMappe
throw new JeroBootException(payWorkingGroupOld.getWorkingGroupProject() + "工作组下存在企业,不可进行删除!");
}
// 判断工作组下是否存在会议
LambdaQueryWrapper<PayMeeting> meetingQuery = new LambdaQueryWrapper<>();
meetingQuery.eq(PayMeeting::getWorkingGroupId,id);
meetingQuery.eq(PayMeeting::getMeetingType, MeetingCommon.WORKING_GROUP_MEETING_INT);
List<PayMeeting> listPayMeeting = payMeetingService.list(meetingQuery);
if (!CollectionUtils.isEmpty(listPayMeeting)) {
throw new JeroBootException(payWorkingGroupOld.getWorkingGroupProject() + "工作组下存在会议,不可进行删除!");
}
payWorkingGroupService.removeById(id);
LambdaUpdateWrapper<PayWorkingGroupSubItem> updatePayWorkingGroupSubItem = new LambdaUpdateWrapper<>();
updatePayWorkingGroupSubItem.eq(PayWorkingGroupSubItem::getWorkingGroupId,id);
@@ -141,7 +154,15 @@ public class PayWorkingGroupServiceImpl extends ServiceImpl<PayWorkingGroupMappe
query.eq(PayWorkingGroupSubItem::getWorkingGroupId, p);
List<PayWorkingGroupSubItem> listPayWorkingGroupSubItem = payWorkingGroupSubItemService.list(query);
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItem)) {
sb1.append(payWorkingGroupOld.getWorkingGroupProject() + "工作组下存在企业,不可进行删除!<br/");
sb1.append(payWorkingGroupOld.getWorkingGroupProject() + "工作组下存在企业,不可进行删除!<br/>");
}
// 判断工作组下是否存在会议
LambdaQueryWrapper<PayMeeting> meetingQuery = new LambdaQueryWrapper<>();
meetingQuery.eq(PayMeeting::getWorkingGroupId,p);
meetingQuery.eq(PayMeeting::getMeetingType, MeetingCommon.WORKING_GROUP_MEETING_INT);
List<PayMeeting> listPayMeeting = payMeetingService.list(meetingQuery);
if (!CollectionUtils.isEmpty(listPayMeeting)) {
sb1.append(payWorkingGroupOld.getWorkingGroupProject() + "工作组下存在会议,不可进行删除!<br/>");
}
});
if(!StringUtils.isEmpty(sb)){
@@ -1,6 +1,5 @@
package com.jero.project.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.project.entity.PayWorkingGroupSubItemContacts;
@@ -8,11 +7,13 @@ import com.jero.project.mapper.PayWorkingGroupSubItemContactsMapper;
import com.jero.project.service.IPayWorkingGroupSubItemContactsService;
import com.jero.temporary.entity.PayContactsManagementTemporary;
import com.jero.temporary.service.IPayContactsManagementTemporaryService;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
@@ -33,6 +34,9 @@ public class PayWorkingGroupSubItemContactsServiceImpl extends ServiceImpl<PayWo
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayWorkingGroupSubItemContacts.eq(PayWorkingGroupSubItemContacts::getWorkingGroupId,projectId);
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = this.list(queryPayWorkingGroupSubItemContacts);
if(CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
return listPayWorkingGroupSubItemContacts;
}
//2.根据成员id获取用户信息
List<String> temporaryIds = listPayWorkingGroupSubItemContacts.stream().map(PayWorkingGroupSubItemContacts::getContactsTemporaryId).collect(Collectors.toList());
List<PayContactsManagementTemporary> contactsManagementTemporaryList = payContactsManagementTemporaryService.listByIds(temporaryIds);
@@ -40,7 +44,10 @@ public class PayWorkingGroupSubItemContactsServiceImpl extends ServiceImpl<PayWo
for (PayWorkingGroupSubItemContacts subItemContacts : listPayWorkingGroupSubItemContacts) {
String contactsTemporaryId = subItemContacts.getContactsTemporaryId();
PayContactsManagementTemporary payContactsManagementTemporary = collectMap.get(contactsTemporaryId);
subItemContacts.setCompanyName(payContactsManagementTemporary.getCompanyName());
if(!Objects.isNull(payContactsManagementTemporary)){
subItemContacts.setCompanyName(payContactsManagementTemporary.getCompanyName());
}
}
return listPayWorkingGroupSubItemContacts;
}
@@ -25,7 +25,6 @@ import com.jero.company.entity.PayCompanyManagement;
import com.jero.company.entity.PayContactsManagement;
import com.jero.company.service.IPayCompanyManagementService;
import com.jero.company.service.IPayContactsManagementService;
import com.jero.config.StaticConfig;
import com.jero.contract.entity.PayIncomeContract;
import com.jero.contract.entity.PayIncomeContractAssociated;
import com.jero.contract.service.IPayIncomeContractAssociatedService;
@@ -57,13 +56,11 @@ import com.jero.temporary.service.IPayContactsManagementTemporaryService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.DataFormat;
import org.apache.shiro.SecurityUtils;
import org.jeecgframework.poi.excel.ExcelImportCheckUtil;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.springframework.core.env.Environment;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
@@ -74,7 +71,6 @@ import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.*;
@@ -473,6 +469,169 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
payMailBillService.updateContactByProjectId(mailContactsId, workingGroupSubItemId, null);
}
@Override
@Transactional
public void editPayWorkingGroupSubItemByCompany(PayWorkingGroupSubItem payWorkingGroupSubItem) {
String workingGroupSubItemId = payWorkingGroupSubItem.getId();
PayWorkingGroupSubItem payWorkingGroupSubItemOld = payWorkingGroupSubItemService.getById(workingGroupSubItemId);
if(Objects.isNull(payWorkingGroupSubItemOld)){
throw new JeroBootException("项目不存在!");
}
PayWorkingGroup payWorkingGroup = payWorkingGroupService.getById(payWorkingGroupSubItem.getWorkingGroupId());
if(Objects.isNull(payWorkingGroup)){
throw new JeroBootException("工作组不存在!");
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// 判断当前登录人是否为企业联系人
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryWorkingGroupSubItemContacts.eq(PayWorkingGroupSubItemContacts::getWorkingGroupSubId, workingGroupSubItemId);
queryWorkingGroupSubItemContacts.eq(PayWorkingGroupSubItemContacts::getContactsId,sysUser.getId());
long l = payWorkingGroupSubItemContactsService.count(queryWorkingGroupSubItemContacts);
if(l == 0){
throw new JeroBootException("非工作组成员不可操作!");
}
// 项目为打包状态 || 到账!=0 || 开票!=0 || 邮寄!=0
if(!Objects.equals(payWorkingGroupSubItem.getChargeCompanyId(),payWorkingGroupSubItemOld.getChargeCompanyId())
&& (Objects.equals(payWorkingGroupSubItem.getPack(),PayProjectCommon.PACKAGING1)
|| !Objects.equals(payWorkingGroupSubItem.getInAccount(),PayProjectCommon.IN_ACCOUNT0)
|| !Objects.equals(payWorkingGroupSubItem.getMakeInvoice(),PayProjectCommon.MAKE_INVOICE0)
|| !Objects.equals(payWorkingGroupSubItem.getMail(),PayProjectCommon.MAIL0))){
throw new JeroBootException("来款企业不可更改!");
}
if(Objects.equals(payWorkingGroupSubItem.getChargeWay(),PayProjectCommon.CHARGE_WAY2)){
if(Objects.isNull(payWorkingGroupSubItem.getReceivableAmount())){
throw new JeroBootException("待确收金额不能为空");
}
if(StringUtils.isBlank(payWorkingGroupSubItem.getContractNum())){
throw new JeroBootException("合同号不能为空");
}
}
if(Objects.equals(payWorkingGroupSubItem.getChargeWay(),PayProjectCommon.CHARGE_WAY3)){
if(Objects.isNull(payWorkingGroupSubItem.getChargeNoticeNo())){
throw new JeroBootException("收费通知号不能为空");
}
if(Objects.isNull(payWorkingGroupSubItem.getReceivableAmount())){
throw new JeroBootException("待确收金额不能为空");
}
}
try {
// 编辑保存前再次校验来款项目是否存在
LambdaQueryWrapper<PayWorkingGroupSubItem> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PayWorkingGroupSubItem::getWorkingGroupId,payWorkingGroupSubItem.getWorkingGroupId());
queryWrapper.eq(PayWorkingGroupSubItem::getChargeCompanyId,payWorkingGroupSubItem.getChargeCompanyId());
// queryWrapper.eq(PayWorkingGroupSubItem::getContactsIdOne,payWorkingGroupSubItem.getContactsIdOne());
PayWorkingGroupSubItem payWorkingGroupSubItemNew = payWorkingGroupSubItemService.getOne(queryWrapper);
// 来款项目存在,并且编辑id与查询不同,则校验不通过
if(!Objects.isNull(payWorkingGroupSubItemNew)
&& !Objects.equals(payWorkingGroupSubItemNew.getId(), workingGroupSubItemId)) {
throw new JeroBootException("工作组成员单位已存在!");
}
}catch (Exception e){
log.info("工作组成员-编辑异常",e);
throw new JeroBootException("工作组成员单位已存在!");
}
// 校验项目是否已关联合同
PayIncomeContract payIncomeContract = payIncomeContractService.checkPayIncomeContractAssociated(workingGroupSubItemId);
if(!Objects.isNull(payIncomeContract)){
if(!Objects.equals(payWorkingGroupSubItem.getChargeWay(),payWorkingGroupSubItemOld.getChargeWay())){
throw new JeroBootException("项目已关联合同,来款方式不可修改!");
}
if(Objects.equals(payWorkingGroupSubItemOld.getChargeWay(),PayProjectCommon.CHARGE_WAY2) && !Objects.equals(payWorkingGroupSubItemOld.getContractNum(),payWorkingGroupSubItem.getContractNum())){
throw new JeroBootException("项目已关联合同,合同编号不可修改!");
}
}else{
PayIncomeContract payIncomeContractAdd = null;
// 来款方式为合同,校验合同编号
if(Objects.equals(payWorkingGroupSubItem.getChargeWay(),PayProjectCommon.CHARGE_WAY2)){
payIncomeContractAdd = payIncomeContractService.setPayIncomeContractAssociated(payWorkingGroupSubItem.getContractNum(),payWorkingGroupSubItem.getChargeCompanyId(), workingGroupSubItemId);
}
if(!Objects.isNull(payIncomeContractAdd)){
// 合同存在 && 合同状态不为草稿,不为未通过 关联合同
payIncomeContractService.insertPayIncomeContract(payIncomeContractAdd, workingGroupSubItemId,Integer.parseInt(PayProjectCommon.PROJECT_TYPE2));
Integer pack = payIncomeContractAdd.getPack();
if (Objects.equals(pack,PayProjectCommon.PACKAGING1)){
payWorkingGroupSubItem.setPack(PayProjectCommon.PACKAGING1);
}
}else{
payWorkingGroupSubItem.setPack(payWorkingGroupSubItemOld.getPack());
}
// 关联了合同,判断合同是否打包,更新项目打包状态,添加打包
if(!Objects.isNull(payIncomeContractAdd) && Objects.equals(payIncomeContractAdd.getPack(),PayProjectCommon.PACKAGING1)){
String masterContactsId = payWorkingGroupSubItemContactsMapper.getMasterContactsId(workingGroupSubItemId);
payPackCompanyProjectService.setPack(payWorkingGroupSubItem.getChargeCompanyId(),masterContactsId,payIncomeContractAdd.getPackYear(), workingGroupSubItemId,PayProjectCommon.PROJECT_TYPE2,payIncomeContractAdd.getPack());
}
}
LambdaQueryWrapper<PayWorkingGroupSubItemContacts> queryPayWorkingGroupSubItemContacts = new LambdaQueryWrapper<>();
queryPayWorkingGroupSubItemContacts.eq(PayWorkingGroupSubItemContacts::getWorkingGroupSubId,payWorkingGroupSubItemOld.getId());
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContacts)){
payWorkingGroupSubItemOld.setPayWorkingGroupSubItemContactsList(listPayWorkingGroupSubItemContacts);
}
setPayWorkingGroupSubItemEdit(payWorkingGroupSubItem,payWorkingGroupSubItemOld);
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContactsNew = payWorkingGroupSubItem.getPayWorkingGroupSubItemContactsList();
// 添加联系人表
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItemContactsNew)){
for (int i = 0; i < listPayWorkingGroupSubItemContactsNew.size(); i++) {
listPayWorkingGroupSubItemContactsNew.get(i).setOrderNum(i+1);
listPayWorkingGroupSubItemContactsNew.get(i).setWorkingGroupId(payWorkingGroupSubItem.getWorkingGroupId());
listPayWorkingGroupSubItemContactsNew.get(i).setWorkingGroupSubId(workingGroupSubItemId);
}
payWorkingGroupSubItemContactsService.saveBatch(listPayWorkingGroupSubItemContactsNew);
}
payWorkingGroupSubItem.setChargeUse(PayProjectCommon.CHARGE_USE1);
// 变更待确收金额,重新校验状态
ProjectStatusVO projectStatusVO = projectDetailService.getStatus(workingGroupSubItemId,payWorkingGroupSubItem.getReceivableAmount(),payWorkingGroupSubItem.getNeedInvoice());
if(!Objects.isNull(projectStatusVO)){
if(!Objects.isNull(projectStatusVO.getInAccount())){
payWorkingGroupSubItem.setInAccount(projectStatusVO.getInAccount());
}
if(!Objects.isNull(projectStatusVO.getMakeInvoice())){
payWorkingGroupSubItem.setMakeInvoice(projectStatusVO.getMakeInvoice());
}
if(!Objects.isNull(projectStatusVO.getMail())){
payWorkingGroupSubItem.setMail(projectStatusVO.getMail());
}
}
String paymentStatus = payPaymentCheckService.getPaymentStatus(payWorkingGroupSubItem.getReceivableAmount(),payWorkingGroupSubItemOld.getPaidAmount(),payWorkingGroupSubItemOld.getPaymentStatus());
payWorkingGroupSubItem.setPaymentStatus(paymentStatus);
payWorkingGroupSubItem.setInAccount(null);
payWorkingGroupSubItem.setPaidAmount(null);
BigDecimal taxRate = payWorkingGroupSubItem.getTaxRate();
BigDecimal receivableAmount = payWorkingGroupSubItem.getReceivableAmount();
BigDecimal noTaxAmount = receivableAmount.divide(taxRate.add(BigDecimal.ONE), 2, RoundingMode.HALF_UP);
BigDecimal tax = receivableAmount.subtract(noTaxAmount);
payWorkingGroupSubItem.setNoTaxAmount(noTaxAmount);
payWorkingGroupSubItem.setTax(tax);
payWorkingGroupSubItemService.updateById(payWorkingGroupSubItem);
LambdaUpdateWrapper<PayWorkingGroupSubItem> updatePayWorkingGroupSubItem = new LambdaUpdateWrapper<>();
updatePayWorkingGroupSubItem.eq(PayWorkingGroupSubItem::getId, workingGroupSubItemId);
// 选择无
if(Objects.equals(payWorkingGroupSubItem.getChargeWay(),PayProjectCommon.CHARGE_WAY1)){
//updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getReceivableAmount,null);
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getContractNum,null);
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getCharge,null);
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getChargeNoticeNo,null);
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getChargeNoticeId,null);
}
// 选择合同
if(Objects.equals(payWorkingGroupSubItem.getChargeWay(),PayProjectCommon.CHARGE_WAY2)){
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getCharge,null);
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getChargeNoticeNo,null);
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getChargeNoticeId,null);
}
// 选择收费通知
if(Objects.equals(payWorkingGroupSubItem.getChargeWay(),PayProjectCommon.CHARGE_WAY3)){
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getContractNum,null);
}
payWorkingGroupSubItemService.update(updatePayWorkingGroupSubItem);
// 如果有邮寄信息更新邮寄联系人信息
String mailContactsId = payWorkingGroupSubItem.getMailContactsId();
payMailBillService.updateContactByProjectId(mailContactsId, workingGroupSubItemId, null);
}
@Override
@Transactional(rollbackFor = JeroBootException.class)
public void importExcel(HttpServletRequest request) {
@@ -25,7 +25,8 @@ spring:
max-file-size: 50MB
max-request-size: 50MB
mail:
host: smtp.126.com
host: smtp.qq.com
# host: smtp.126.com
# host: smtp.qiye.163.com
username: zhangqinlin@syxysoft.com
password: Zql0000000
@@ -136,6 +137,10 @@ spring:
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource:
master:
# url: jdbc:mysql://10.10.10.44:3306/income_payments_test?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
# username: root
# password: hzwlsoft.com
# driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:p6spy:mysql://lijiarao.cn:3306/income_payments_prod?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root
password: 704670af746903fa
@@ -158,7 +163,7 @@ spring:
min-idle: 0 #最小等待连接中的数量,设 0 为没有限制
shutdown-timeout: 100ms
# password: hzwlsoft.com
password: 123456
# password: 123456
# port: 4780
port: 6379