Commit 90b4d0e1 authored by “yiyousong”'s avatar “yiyousong”
parents 3ce6740c 5f535641
use `base-platform`; use
`base-platform`;
-- ---------------------------- -- ----------------------------
-- 模块表 -- 模块表
-- ---------------------------- -- ----------------------------
...@@ -142,20 +143,24 @@ CREATE TABLE `mortals_sys_site_business` ...@@ -142,20 +143,24 @@ CREATE TABLE `mortals_sys_site_business`
-- 站点事项表 -- 站点事项表
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `mortals_sys_site_matter`; DROP TABLE IF EXISTS `mortals_sys_site_matter`;
CREATE TABLE `mortals_sys_site_matter` CREATE TABLE mortals_sys_site_matter
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '序号,主键,自增长', `id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`siteId` bigint(20) DEFAULT NULL COMMENT '站点ID', `siteId` bigint(20) COMMENT '站点ID',
`siteName` varchar(255) DEFAULT NULL COMMENT '站点名称', `siteName` varchar(255) COMMENT '站点名称',
`matterId` bigint(20) DEFAULT NULL COMMENT '事项ID', `matterId` bigint(20) COMMENT '事项ID',
`matterName` varchar(1024) DEFAULT NULL COMMENT '事项名称', `matterName` varchar(1024) COMMENT '事项名称',
`deptId` bigint(20) DEFAULT NULL COMMENT '部门ID', `matterCode` varchar(512) COMMENT '事项编码',
`deptName` varchar(64) DEFAULT NULL COMMENT '部门名称', `deptId` bigint(20) COMMENT '部门ID',
`createTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间', `deptName` varchar(64) COMMENT '部门名称',
`createUserId` bigint(20) DEFAULT NULL COMMENT '创建用户', `source` tinyint(2) COMMENT '事项来源',
`updateTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', `deptCode` varchar(255) COMMENT '部门编号',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建用户',
`updateTime` datetime COMMENT '修改时间',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '站点事项表' ROW_FORMAT = Dynamic; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='站点事项';
-- ---------------------------- -- ----------------------------
...@@ -318,26 +323,26 @@ CREATE TABLE `mortals_sys_workman` ...@@ -318,26 +323,26 @@ CREATE TABLE `mortals_sys_workman`
-- 基础事项表 -- 基础事项表
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `mortals_sys_matter`; DROP TABLE IF EXISTS `mortals_sys_matter`;
CREATE TABLE mortals_sys_matter CREATE TABLE mortals_sys_matter(
(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长', `id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`siteId` bigint(20) COMMENT '站点ID', `siteId` bigint(20) COMMENT '站点ID',
`tid` varchar(128) COMMENT '从政务系统来的事项id', `tid` varchar(256) COMMENT '从政务系统来的事项id',
`tcode` varchar(128) COMMENT '从政务系统来的事项code', `tcode` varchar(256) COMMENT '从政务系统来的事项code',
`tname` varchar(512) COMMENT '从政务系统来的事项name', `tname` varchar(2048) COMMENT '从政务系统来的事项name',
`matterName` varchar(1024) COMMENT '事项名称', `matterName` varchar(2048) COMMENT '事项名称',
`englishName` varchar(256) COMMENT '英语事项名', `englishName` varchar(256) COMMENT '英语事项名',
`matterNo` varchar(64) COMMENT '事项编号', `matterNo` varchar(512) COMMENT '事项编号',
`areaCode` varchar(255) COMMENT '区域编码', `areaCode` varchar(255) COMMENT '区域编码',
`deptCode` varchar(255) COMMENT '部门编号', `deptCode` varchar(255) COMMENT '部门编号',
`deptName` varchar(255) COMMENT '部门名称',
`powerCode` varchar(255) COMMENT '行政权力编号', `powerCode` varchar(255) COMMENT '行政权力编号',
`themeCode` varchar(255) COMMENT '主题编号', `themeCode` varchar(255) COMMENT '主题编号',
`usertypeCode` varchar(255) COMMENT '服务类型编号', `usertypeCode` varchar(255) COMMENT '服务类型编号',
`groupName` varchar(1024) COMMENT '事项组名', `groupName` varchar(255) COMMENT '事项组名',
`url` varchar(1024) COMMENT '事项详情链接', `url` varchar(1024) COMMENT '事项详情链接',
`haveGetMatterInfo` varchar(20) COMMENT '是否获取事项详情', `haveGetMatterInfo` varchar(20) COMMENT '是否获取事项详情',
`belongDept` varchar(64) COMMENT '所属部门', `belongDept` varchar(64) COMMENT '所属部门',
`appoveObjectShow` varchar(256) COMMENT '服务对象 (事业法人.事业法人,社会组织法人.社会组织法人,非法人企业.非法人企业,企业法人.企业法人,自然人.自然人,其他组织.其他组织)', `appoveObjectShow` varchar(16) COMMENT '服务对象 (事业法人.事业法人,社会组织法人.社会组织法人,非法人企业.非法人企业,企业法人.企业法人,自然人.自然人,其他组织.其他组织)',
`operatScopeShow` varchar(64) COMMENT '通办范围 (无.无,全国.全国,全市.全市,全县.全县,全镇[乡 街道].全镇[乡 街道],跨村[社区].跨村[社区])', `operatScopeShow` varchar(64) COMMENT '通办范围 (无.无,全国.全国,全市.全市,全县.全县,全镇[乡 街道].全镇[乡 街道],跨村[社区].跨村[社区])',
`appoveTimeLimitShow` varchar(16) COMMENT '办件类型(网络办件.网络办件,行政审批一般件.行政审批一般件,综合窗口件.综合窗口件)', `appoveTimeLimitShow` varchar(16) COMMENT '办件类型(网络办件.网络办件,行政审批一般件.行政审批一般件,综合窗口件.综合窗口件)',
`handleType` varchar(12) COMMENT '办理形式(窗口办理.窗口办理,网上办理.网上办理) ', `handleType` varchar(12) COMMENT '办理形式(窗口办理.窗口办理,网上办理.网上办理) ',
...@@ -402,169 +407,200 @@ CREATE TABLE mortals_sys_matter ...@@ -402,169 +407,200 @@ CREATE TABLE mortals_sys_matter
-- ---------------------------- -- ----------------------------
-- 事项材料表 -- 事项受理条件表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_sys_matter_accept`;
CREATE TABLE mortals_sys_matter_accept
(
`id` bigint(20) AUTO_INCREMENT COMMENT '主键,自增长',
`matterId` bigint(20) NOT NULL COMMENT '基础事项表id',
`matterCode` varchar(512) COMMENT '事项编码',
`matterName` varchar(1024) COMMENT '事项名称',
`content` text COMMENT '受理条件',
`source` tinyint(2) COMMENT '事项来源 (0.政务网,1.自定义)',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建用户',
`updateTime` datetime COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='事项受理条件';
-- ----------------------------
-- 事项收费标准表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_sys_matter_charges`;
CREATE TABLE mortals_sys_matter_charges
(
`id` bigint(20) AUTO_INCREMENT COMMENT '主键,自增长',
`matterId` bigint(20) NOT NULL COMMENT '事项基础表matter id',
`matterCode` varchar(512) COMMENT '事项编码',
`matterName` varchar(1024) COMMENT '事项名称',
`content` varchar(1024) COMMENT '收费标准',
`source` tinyint(2) COMMENT '事项来源,(0.政务网,1.自定义)',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建用户',
`updateTime` datetime COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='事项收费标准';
-- ----------------------------
-- 事项申请材料表
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `mortals_sys_matter_datum`; DROP TABLE IF EXISTS `mortals_sys_matter_datum`;
CREATE TABLE `mortals_sys_matter_datum` CREATE TABLE mortals_sys_matter_datum
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键,自增长', `id` bigint(20) AUTO_INCREMENT COMMENT '主键,自增长',
`matterId` bigint(20) COMMENT '事项id', `matterId` bigint(20) COMMENT '事项id',
`matterName` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '事项名称', `matterCode` varchar(512) COMMENT '事项编码',
`materialName` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '材料名', `matterName` varchar(1024) COMMENT '事项名称',
`isMust` varchar(32) DEFAULT '非必要' COMMENT '必交性(非必要.非必要,必要.必要,必要|容缺后补.必要|容缺后补,非必要|容缺后补.非必要|容缺后补)', `materialName` varchar(1024) NOT NULL COMMENT '材料名',
`materialType` varchar(32) DEFAULT '无' COMMENT '材料类型(无.无,原件.原件,复印件.复印件,原件和复印件.原件和复印件)', `isMust` varchar(32) COMMENT '必交性(非必要.非必要,必要.必要,必要|容缺后补.必要|容缺后补,非必要|容缺后补.非必要|容缺后补)',
`materialProperty` varchar(32) DEFAULT '纸质' COMMENT '材料形式(纸质.纸质,电子.电子,纸质|电子.纸质|电子)', `materialType` varchar(32) COMMENT '材料类型(无.无,原件.原件,复印件.复印件,原件和复印件.原件和复印件)',
`electronicgs` varchar(32) DEFAULT '无' COMMENT '电子材料格式(无.无,不限.不限,jpg.jpg,jpeg.jpeg,pdf.pdf,word.word,pdf|jpg|jpeg.pdf|jpg|jpeg,pdf|jpg.pdf|jpg)', `materialProperty` varchar(32) COMMENT '材料形式(纸质.纸质,电子.电子,纸质|电子.纸质|电子)',
`materialSource` varchar(32) DEFAULT '无' COMMENT '材料来源渠道(无.无,申请人自备.申请人自备,政府部门核发.政府部门核发,其他.其他)', `electronicgs` varchar(32) COMMENT '电子材料格式(无.无,不限.不限,jpg.jpg,jpeg.jpeg,pdf.pdf,word.word,pdf|jpg|jpeg.pdf|jpg|jpeg,pdf|jpg.pdf|jpg)',
`paperNum` int(4) DEFAULT '1' COMMENT '纸质材料份数', `materialSource` varchar(32) COMMENT '材料来源渠道(无.无,申请人自备.申请人自备,政府部门核发.政府部门核发,其他.其他)',
`paperNum` tinyint(4) COMMENT '纸质材料份数',
`paperGg` varchar(32) COMMENT '纸质材料规格', `paperGg` varchar(32) COMMENT '纸质材料规格',
`jianmMs` varchar(32) DEFAULT '无' COMMENT '减免模式(无.无,减.减,免.免)', `jianmMs` varchar(32) COMMENT '减免模式(无.无,减.减,免.免)',
`sealWay` varchar(32) COMMENT '盖章方式', `sealWay` varchar(128) COMMENT '盖章方式',
`isjianm` varchar(32) DEFAULT '是' COMMENT '是否减免(否.否,是.是)', `isjianm` varchar(32) COMMENT '是否减免(否.否,是.是)',
`isLack` varchar(32) DEFAULT '必要' COMMENT '材料是否容缺(必要.必要,非必要.非必要)', `isLack` varchar(32) COMMENT '材料是否容缺(必要.必要,非必要.非必要)',
`ybUrl` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '材料地址', `ybUrl` varchar(512) COMMENT '材料地址',
`materialSourceSm` varchar(512) DEFAULT '' COMMENT '来源渠道说明', `materialSourceSm` varchar(512) COMMENT '来源渠道说明',
`remarkSub` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '填报须知', `remarkSub` text COMMENT '填报须知',
`clauseContent` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '要求提供材料的依据', `clauseContent` text COMMENT '要求提供材料的依据',
`summary` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '受理标准', `summary` text COMMENT '受理标准',
`remark` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '备注', `remark` varchar(4096) COMMENT '备注',
`source` tinyint(2) DEFAULT '1' COMMENT '事项来源(0.政务网,1.自定义)', `source` tinyint(2) COMMENT '事项来源(0.政务网,1.自定义)',
`createTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间', `createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) DEFAULT NULL COMMENT '创建用户', `createUserId` bigint(20) COMMENT '创建用户',
`updateTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', `updateTime` datetime COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='事项申请材料'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='事项申请材料';
-- ---------------------------- -- ----------------------------
-- 事项材料附件表 -- 材料附件表
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `mortals_sys_matter_datum_file`; DROP TABLE IF EXISTS `mortals_sys_matter_datum_file`;
CREATE TABLE `mortals_sys_matter_datum_file` CREATE TABLE mortals_sys_matter_datum_file
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键,自增长', `id` bigint(20) AUTO_INCREMENT COMMENT '主键,自增长',
`datumId` bigint(20) DEFAULT NULL COMMENT '材料id', `datumId` bigint(20) COMMENT '材料id',
`materialName` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '材料名', `matterCode` varchar(255) COMMENT '事项编码',
`fileName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '附件名称', `materialName` varchar(1024) NOT NULL COMMENT '材料名',
`fileUrl` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '附件下载地址', `fileName` varchar(255) COMMENT '附件名称',
`filetype` varchar(20) DEFAULT '示例样表' COMMENT '附件类型 (示例样表.示例样表,空白表格.空白表格)', `fileUrl` varchar(255) COMMENT '附件下载地址',
`source` tinyint(2) DEFAULT '1' COMMENT '附件来源 (0.政务网,1.自定义)', `filetype` varchar(64) COMMENT '附件类型 (示例样表.示例样表,空白表格.空白表格)',
`createTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间', `source` tinyint(2) COMMENT '附件来源 (0.政务网,1.自定义)',
`createUserId` bigint(20) DEFAULT NULL COMMENT '创建用户', `createTime` datetime COMMENT '创建时间',
`updateTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', `createUserId` bigint(20) COMMENT '创建用户',
PRIMARY KEY (`id`) USING BTREE `updateTime` datetime COMMENT '修改时间',
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='材料附件表'; PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='材料附件';
-- ---------------------------- -- ----------------------------
-- 事项受理条件表 -- 材料附件表
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `mortals_sys_matter_accept`; DROP TABLE IF EXISTS `mortals_sys_matter_datum_file`;
CREATE TABLE `mortals_sys_matter_accept` CREATE TABLE mortals_sys_matter_datum_file
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键,自增长', `id` bigint(20) AUTO_INCREMENT COMMENT '主键,自增长',
`matterId` bigint(20) NOT NULL DEFAULT '0' COMMENT '基础事项表id', `datumId` bigint(20) COMMENT '材料id',
`matterName` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '事项名称', `matterCode` varchar(255) COMMENT '事项编码',
`content` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '受理条件', `materialName` varchar(1024) NOT NULL COMMENT '材料名',
`source` tinyint(2) DEFAULT '1' COMMENT '事项来源 (0.政务网,1.自定义)', `fileName` varchar(255) COMMENT '附件名称',
`createTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间', `fileUrl` varchar(255) COMMENT '附件下载地址',
`createUserId` bigint(20) DEFAULT NULL COMMENT '创建用户', `localFileUrl` varchar(255) COMMENT '附件本地下载地址',
`updateTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', `filetype` varchar(64) COMMENT '附件类型 (示例样表.示例样表,空白表格.空白表格)',
PRIMARY KEY (`id`) USING BTREE `source` tinyint(2) COMMENT '附件来源 (0.政务网,1.自定义)',
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='事项受理条件'; `createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建用户',
`updateTime` datetime COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='材料附件';
-- ---------------------------- -- ----------------------------
-- 事项办理流程 -- 事项中介服务
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `mortals_sys_matter_flowlimit`; DROP TABLE IF EXISTS `mortals_sys_matter_intermediary`;
CREATE TABLE `mortals_sys_matter_flowlimit` CREATE TABLE mortals_sys_matter_intermediary
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键,自增长', `id` bigint(20) AUTO_INCREMENT COMMENT '主键,自增长',
`matterId` bigint(20) NOT NULL DEFAULT '0' COMMENT '事项基础表id', `matterId` bigint(20) NOT NULL COMMENT '事项matter id',
`matterName` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '事项名称', `matterCode` varchar(512) COMMENT '事项编码',
`flowName` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '办理流程', `matterName` varchar(1024) COMMENT '事项名称',
`flowTime` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '办理时长', `title` varchar(1024) COMMENT '中介服务事项名称',
`flowLimit` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '转外时限', `intermediaryRequest` text COMMENT '中介服务实施机构及资质资格要求',
`flowDesc` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '办理流程说明', `intermediaryRequestTime` varchar(512) COMMENT '服务时限',
`source` tinyint(2) DEFAULT '1' COMMENT '事项来源(0.政务网,1.自定义)', `remark` text COMMENT '内容',
`createTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间', `source` tinyint(2) COMMENT '事项来源,(0.政务网,1.自定义)',
`createUserId` bigint(20) DEFAULT NULL COMMENT '创建用户', `createTime` datetime COMMENT '创建时间',
`updateTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', `createUserId` bigint(20) COMMENT '创建用户',
PRIMARY KEY (`id`) USING BTREE `updateTime` datetime COMMENT '修改时间',
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='事项办理流程'; PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='事项中介服务';
-- ---------------------------- -- ----------------------------
-- 事项收费标准 -- 事项常见问题
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `mortals_sys_matter_charges`; DROP TABLE IF EXISTS `mortals_sys_matter_question`;
CREATE TABLE `mortals_sys_matter_charges` CREATE TABLE mortals_sys_matter_question
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键,自增长', `id` bigint(20) AUTO_INCREMENT COMMENT '主键,自增长',
`matterId` bigint(20) NOT NULL DEFAULT '0' COMMENT '事项基础表matter id', `matterId` bigint(20) NOT NULL COMMENT '事项基础表matter id',
`matterName` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '事项名称', `matterCode` varchar(512) COMMENT '事项编码',
`content` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '收费标准', `matterName` varchar(1024) COMMENT '事项名称',
`source` tinyint(2) DEFAULT '1' COMMENT '事项来源,(0.政务网,1.自定义)', `question` varchar(512) COMMENT '问题',
`createTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间', `answer` varchar(2048) COMMENT '常见问题',
`createUserId` bigint(20) DEFAULT NULL COMMENT '创建用户', `source` tinyint(2) COMMENT '事项来源,(0.政务网,1.自定义)',
`updateTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', `createTime` datetime COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE `createUserId` bigint(20) COMMENT '创建用户',
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='事项收费标准'; `updateTime` datetime COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='事项常见问题';
-- ---------------------------- -- ----------------------------
-- 事项设定依据表 -- 事项设定依据表
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `mortals_sys_matter_setbase`; DROP TABLE IF EXISTS `mortals_sys_matter_setbase`;
CREATE TABLE `mortals_sys_matter_setbase` CREATE TABLE mortals_sys_matter_setbase
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键,自增长', `id` bigint(20) AUTO_INCREMENT COMMENT '主键,自增长',
`matterId` bigint(20) NOT NULL DEFAULT '0' COMMENT '事项matter id', `matterId` bigint(20) NOT NULL COMMENT '事项matter id',
`matterName` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '事项名称', `matterCode` varchar(255) COMMENT '事项编码',
`policyName` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '法规标题', `matterName` varchar(1024) COMMENT '事项名称',
`policyType` varchar(32) DEFAULT '法律' COMMENT '法规类型,(法律.法律,行政法规.行政法规,地方法规.地方法规,部门规章.部门规章,其他.其他,政府规章.政府规章,规范性文件.规范性文件)', `policyName` varchar(1024) COMMENT '法规标题',
`policyType` varchar(32) COMMENT '法规类型,(法律.法律,行政法规.行政法规,地方法规.地方法规,部门规章.部门规章,其他.其他,政府规章.政府规章,规范性文件.规范性文件)',
`policyitem` varchar(1024) COMMENT '条例', `policyitem` varchar(1024) COMMENT '条例',
`content` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '条款内容', `content` text COMMENT '条款内容',
`source` tinyint(2) DEFAULT '1' COMMENT '事项来源,(0.政务网,1.自定义)', `source` tinyint(2) COMMENT '事项来源,(0.政务网,1.自定义)',
`createTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间', `createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) NULL DEFAULT NULL COMMENT '创建用户', `createUserId` bigint(20) COMMENT '创建用户',
`updateTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', `updateTime` datetime COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='事项设定依据表'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='事项设定依据';
-- ---------------------------- -- ----------------------------
-- 事项中介服务 -- 事项办理流程
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `mortals_sys_matter_intermediary`; DROP TABLE IF EXISTS `mortals_sys_matter_flowlimit`;
CREATE TABLE `mortals_sys_matter_intermediary` CREATE TABLE mortals_sys_matter_flowlimit
( (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键,自增长', `id` bigint(20) AUTO_INCREMENT COMMENT '主键,自增长',
`matterId` bigint(20) NOT NULL DEFAULT '0' COMMENT '事项matter id', `matterId` bigint(20) NOT NULL COMMENT '事项基础表id',
`matterName` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '事项名称', `matterCode` varchar(512) COMMENT '事项编码',
`title` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '中介服务事项名称', `matterName` varchar(1024) COMMENT '事项名称',
`intermediaryRequest` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '中介服务实施机构及资质资格要求', `flowName` varchar(256) COMMENT '办理流程',
`intermediaryRequestTime` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '服务时限', `flowTime` varchar(256) COMMENT '办理时长',
`remark` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '备注', `flowLimit` varchar(256) COMMENT '转外时限',
`source` tinyint(2) DEFAULT '0' COMMENT '事项来源,(0.政务网,1.自定义)', `flowDesc` varchar(1024) COMMENT '办理流程说明',
`createTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间', `source` tinyint(2) COMMENT '事项来源(0.政务网,1.自定义)',
`createUserId` bigint(20) DEFAULT NULL COMMENT '创建用户', `createTime` datetime COMMENT '创建时间',
`updateTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', `createUserId` bigint(20) COMMENT '创建用户',
PRIMARY KEY (`id`) USING BTREE `updateTime` datetime COMMENT '修改时间',
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='事项中介服务表'; PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='事项办理流程';
-- ----------------------------
-- 事项常见问题表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_sys_matter_question`;
CREATE TABLE `mortals_sys_matter_question`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键,自增长',
`matterId` bigint(20) NOT NULL DEFAULT '0' COMMENT '事项基础表matter id',
`matterName` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '事项名称',
`question` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '问题',
`answer` varchar(2048) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '回答',
`source` tinyint(2) DEFAULT '0' COMMENT '事项来源,(0.政务网,1.自定义)',
`createTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
`createUserId` bigint(20) DEFAULT NULL COMMENT '创建用户',
`updateTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='事项常见问题';
-- ---------------------------- -- ----------------------------
......
...@@ -1295,6 +1295,46 @@ data|Object|数据|- ...@@ -1295,6 +1295,46 @@ data|Object|数据|-
``` ```
### 同步站点相关事项
**请求URL:** site/syncGovMatterBySiteId
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 同步站点相关事项
**请求参数:**
参数名称|类型|备注|必填|其它
id|Long|站点id|是|-
**请求样例:**
```
{“id”:3}
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码(-1.失败,1.成功)|-
msg|String|消息|-
data|Object|数据|-
**响应消息样例:**
```
{
"code":1,
"msg":"成功"
}
```
### 根据区域查询站点列表 ### 根据区域查询站点列表
**请求URL:** site/getFlatSitesByAreaCode **请求URL:** site/getFlatSitesByAreaCode
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</activation> </activation>
<properties> <properties>
<profiles.active>develop</profiles.active> <profiles.active>develop</profiles.active>
<profiles.server.ip>192.168.0.98</profiles.server.ip> <profiles.server.ip>127.0.0.1</profiles.server.ip>
<profiles.server.port>17211</profiles.server.port> <profiles.server.port>17211</profiles.server.port>
<profiles.nginx.port>11071</profiles.nginx.port> <profiles.nginx.port>11071</profiles.nginx.port>
<profiles.server.gatewayport>11078</profiles.server.gatewayport> <profiles.server.gatewayport>11078</profiles.server.gatewayport>
......
...@@ -45,7 +45,7 @@ fi ...@@ -45,7 +45,7 @@ fi
if [ -e "$BASEDIR" ] if [ -e "$BASEDIR" ]
then then
JAVA_OPTS="-Xms1024M -Xmx1024M -Xss256K -XX:+UseAdaptiveSizePolicy -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:GCTimeRatio=39 -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:$GC_PATH -XX:+HeapDumpOnOutOfMemoryError -XX:ErrorFile=$HS_ERR_PATH -XX:HeapDumpPath=$HEAP_DUMP_PATH" JAVA_OPTS="-Xms1024M -Xmx2048M -Xss256K -XX:+UseAdaptiveSizePolicy -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:GCTimeRatio=39 -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:$GC_PATH -XX:+HeapDumpOnOutOfMemoryError -XX:ErrorFile=$HS_ERR_PATH -XX:HeapDumpPath=$HEAP_DUMP_PATH"
fi fi
CLASSPATH=$CLASSPATH_PREFIX: CLASSPATH=$CLASSPATH_PREFIX:
......
package com.mortals.xhx.common.utils; package com.mortals.xhx.common.utils;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.XmlUtil;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.ibm.wsdl.util.xml.XPathUtils;
import com.mortals.framework.common.Rest;
import com.mortals.xhx.common.code.FiletypeEnum; import com.mortals.xhx.common.code.FiletypeEnum;
import com.mortals.xhx.common.code.SourceEnum; import com.mortals.xhx.common.code.SourceEnum;
import com.mortals.xhx.module.matter.model.MatterDatumFileEntity; import com.mortals.xhx.module.matter.model.MatterDatumFileEntity;
import com.mortals.xhx.module.matter.model.MatterEntity;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.htmlcleaner.CleanerProperties;
import org.htmlcleaner.DomSerializer;
import org.htmlcleaner.HtmlCleaner;
import org.htmlcleaner.TagNode;
import org.jsoup.Jsoup; import org.jsoup.Jsoup;
import org.springframework.util.xml.SimpleNamespaceContext; import org.jsoup.nodes.Document;
import org.w3c.dom.*; import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import javax.xml.namespace.NamespaceContext;
import javax.xml.xpath.XPath; import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory; import javax.xml.xpath.XPathFactory;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
@Slf4j @Slf4j
public class MatterDetailHtmlParseUtil { public class MatterDetailHtmlParseUtil {
public static Document getDomByHtml(String url) { public static Document getDomByHtml(String url) {
Document document = null;
String html = null;
try { try {
document = Jsoup.connect(url).get();
return document;
/*Jsoup.connect(url).get();
html = Jsoup.connect(url).get().body().html(); html = Jsoup.connect(url).get().body().html();
// html = HttpUtil.get(url); // html = HttpUtil.get(url);
//System.out.println(html); //System.out.println(html);
HtmlCleaner hc = new HtmlCleaner(); HtmlCleaner hc = new HtmlCleaner();
TagNode tn = hc.clean(html); TagNode tn = hc.clean(html);
/* Object[] rs = tn.evaluateXPath("//div[@class='section10']//table[1]//tr[2]//td");
Object[] rs = tn.evaluateXPath("//div");
for (Integer i = 0; i < rs.length; i++) { for (Integer i = 0; i < rs.length; i++) {
TagNode n = (TagNode) rs[i]; TagNode n = (TagNode) rs[i];
...@@ -48,7 +39,20 @@ public class MatterDetailHtmlParseUtil { ...@@ -48,7 +39,20 @@ public class MatterDetailHtmlParseUtil {
}*/ }*/
// System.out.println(tn.getText()); // System.out.println(tn.getText());
Document dom = new DomSerializer(new CleanerProperties()).createDOM(tn); /* CleanerProperties cleanerProperties = new CleanerProperties();
cleanerProperties.setAdvancedXmlEscape(true);
cleanerProperties.setOmitXmlDeclaration(true);
cleanerProperties.setOmitDoctypeDeclaration(true);
cleanerProperties.setTranslateSpecialEntities(true);
cleanerProperties.setTransResCharsToNCR(true);
cleanerProperties.setRecognizeUnicodeChars(true);
cleanerProperties.setIgnoreQuestAndExclam(true);
cleanerProperties.setUseEmptyElementTags(false);
Document dom = new DomSerializer(cleanerProperties).createDOM(tn);*/
/*XPath xPath = XPathFactory.newInstance().newXPath(); /*XPath xPath = XPathFactory.newInstance().newXPath();
String tklrExp = String.format("//div[@class=\"smltc9_bottom\"]//p"); String tklrExp = String.format("//div[@class=\"smltc9_bottom\"]//p");
...@@ -60,20 +64,21 @@ public class MatterDetailHtmlParseUtil { ...@@ -60,20 +64,21 @@ public class MatterDetailHtmlParseUtil {
System.out.println(nodeList.item(i).getTextContent()); System.out.println(nodeList.item(i).getTextContent());
System.out.println("==============="); System.out.println("===============");
}*/ }*/
//div[@class='section10']//table[1]//tr[%d]//td //div[@class='section10']//table[1]//tr[%d]//td
return dom; //return dom;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
return null; return null;
} }
/**
* 解析事项基本信息
*
* @param dom
* @return
*/
public static Map<String, String> getbaseInfoMapByHtml(Document dom) { public static Map<String, String> getbaseInfoMapByHtml(Document dom) {
Map<String, String> params = new HashMap<>(); Map<String, String> params = new HashMap<>();
String baseInfoExp = "//div[@class=\"section1\"]//table[1]//td"; String baseInfoExp = "//div[@class=\"section1\"]//table[1]//td";
...@@ -83,25 +88,23 @@ public class MatterDetailHtmlParseUtil { ...@@ -83,25 +88,23 @@ public class MatterDetailHtmlParseUtil {
baseInfoExp += "|" + baseInfoExp1; baseInfoExp += "|" + baseInfoExp1;
baseInfoExp += "|" + baseInfoExp2; baseInfoExp += "|" + baseInfoExp2;
baseInfoExp += "|" + baseInfoExp3; baseInfoExp += "|" + baseInfoExp3;
XPath xPath = XPathFactory.newInstance().newXPath();
Object result;
try { try {
result = xPath.evaluate(baseInfoExp, dom, XPathConstants.NODESET); Elements elements = dom.selectXpath(baseInfoExp);
if (result instanceof NodeList) { for (int i = 0; i < elements.size(); i++) {
NodeList nodeList = (NodeList) result; Element element = elements.get(i);
for (int i = 0; i < nodeList.getLength(); i++) { if (element == null) {
continue;
}
if (i % 2 == 0) { if (i % 2 == 0) {
continue; continue;
} }
Node node = nodeList.item(i);
if (i > 0) { if (i > 0) {
Node prenode = nodeList.item(i - 1); Element prenode = elements.get(i - 1);
params.put(prenode.getTextContent().trim(), node.getTextContent().trim()); params.put(prenode.text().trim(), element.text().trim());
}
} }
} }
} catch (XPathExpressionException e) { } catch (Exception e) {
log.error("xpath解析异常:", e); log.error("基本信息xpath解析异常:", e);
} }
return params; return params;
} }
...@@ -117,89 +120,79 @@ public class MatterDetailHtmlParseUtil { ...@@ -117,89 +120,79 @@ public class MatterDetailHtmlParseUtil {
String blankSampleExp = "//div[@id=\"zhezhao\"]//div[@class='zhezhao4']"; String blankSampleExp = "//div[@id=\"zhezhao\"]//div[@class='zhezhao4']";
String sampleExp = "//div[@id=\"zhezhao\"]//div[@class='zhezhao2']"; String sampleExp = "//div[@id=\"zhezhao\"]//div[@class='zhezhao2']";
String baseInfoExp = "//div[@id=\"zhezhao\"]//div[@class='zhezhao3']"; String baseInfoExp = "//div[@id=\"zhezhao\"]//div[@class='zhezhao3']";
XPath xPath = XPathFactory.newInstance().newXPath();
Object result;
try { try {
result = xPath.evaluate(blankSampleExp, dom, XPathConstants.NODESET); Elements elements = dom.selectXpath(blankSampleExp);
if (result instanceof NodeList) { int rowNum = elements.size();
NodeList nodeList = (NodeList) result;
int rowNum = nodeList.getLength();
for (int i = 1; i <= rowNum; i++) { for (int i = 1; i <= rowNum; i++) {
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
List<MatterDatumFileEntity> datumFileEntities = new ArrayList<>(); List<MatterDatumFileEntity> datumFileEntities = new ArrayList<>();
List<MatterDatumFileEntity> datumSampleFileEntities = new ArrayList<>(); List<MatterDatumFileEntity> datumSampleFileEntities = new ArrayList<>();
//查询空白样表数量 //查询空白样表数量
String tempxPath = blankSampleExp + String.format("[%d]//table//tr[position()>1]//td", i); String tempxPath = blankSampleExp + String.format("[%d]//table//tr[position()>1]//td", i);
Object evaluate = xPath.evaluate(tempxPath, dom, XPathConstants.NODESET);
if (evaluate instanceof NodeList) { Elements evaluateList = dom.selectXpath(tempxPath);
NodeList evaluateList = (NodeList) evaluate; for (int j = 0; j < evaluateList.size(); j++) {
for (int j = 0; j < evaluateList.getLength(); j++) {
if (j % 2 == 0) { if (j % 2 == 0) {
continue; continue;
} }
Node node = evaluateList.item(j); Element node = evaluateList.get(j);
if (j > 0) { if (j > 0) {
Node prenode = evaluateList.item(j - 1); Element prenode = evaluateList.get(j - 1);
MatterDatumFileEntity fileEntity = new MatterDatumFileEntity(); MatterDatumFileEntity fileEntity = new MatterDatumFileEntity();
fileEntity.setCreateTime(new Date()); fileEntity.setCreateTime(new Date());
fileEntity.setCreateUser("system"); fileEntity.setCreateUser("system");
fileEntity.setSource(SourceEnum.政务网.getValue()); fileEntity.setSource(SourceEnum.政务网.getValue());
fileEntity.setFiletype(2); fileEntity.setFiletype(FiletypeEnum.空白表格.getValue());
fileEntity.setFileName(prenode.getTextContent().trim()); fileEntity.setFileName(prenode.text().trim());
fileEntity.setFileUrl(node.getFirstChild().getAttributes().getNamedItem("href").getNodeValue().trim()); fileEntity.setFileUrl(node.firstChild().attr("href").trim());
datumFileEntities.add(fileEntity); datumFileEntities.add(fileEntity);
} }
} }
map.put("blankList", datumFileEntities); map.put("blankList", datumFileEntities);
}
//查询样表 //查询样表
String tempxPath1 = sampleExp + String.format("[%d]//table//tr[position()>1]//td", i); String tempxPath1 = sampleExp + String.format("[%d]//table//tr[position()>1]//td", i);
Object sample = xPath.evaluate(tempxPath1, dom, XPathConstants.NODESET); Elements sampleList = dom.selectXpath(tempxPath1);
if (sample instanceof NodeList) {
NodeList sampleList = (NodeList) sample; for (int j = 0; j < sampleList.size(); j++) {
for (int j = 0; j < sampleList.getLength(); j++) {
if (j % 2 == 0) { if (j % 2 == 0) {
continue; continue;
} }
Node node = sampleList.item(j); Element node = sampleList.get(j);
if (j > 0) { if (j > 0) {
Node prenode = sampleList.item(j - 1); Element prenode = sampleList.get(j - 1);
MatterDatumFileEntity fileEntity = new MatterDatumFileEntity(); MatterDatumFileEntity fileEntity = new MatterDatumFileEntity();
fileEntity.setCreateTime(new Date()); fileEntity.setCreateTime(new Date());
fileEntity.setCreateUser("system"); fileEntity.setCreateUser("system");
fileEntity.setSource(SourceEnum.政务网.getValue()); fileEntity.setSource(SourceEnum.政务网.getValue());
fileEntity.setFiletype(2); fileEntity.setFiletype(FiletypeEnum.示例样表.getValue());
fileEntity.setFileName(prenode.getTextContent().trim()); fileEntity.setFileName(prenode.text().trim());
fileEntity.setFileUrl(node.getFirstChild().getAttributes().getNamedItem("href").getNodeValue().trim()); fileEntity.setFileUrl(node.firstChild().attr("href").trim());
datumSampleFileEntities.add(fileEntity); datumSampleFileEntities.add(fileEntity);
} }
map.put("sampleList", datumSampleFileEntities); map.put("sampleList", datumSampleFileEntities);
} }
}
//查询基本信息 //查询基本信息
String tempxPath2 = baseInfoExp + String.format("[%d]//table//tr//td", i); String tempxPath2 = baseInfoExp + String.format("[%d]//table//tr//td", i);
Object baseinfo = xPath.evaluate(tempxPath2, dom, XPathConstants.NODESET); Elements baseinfoList = dom.selectXpath(tempxPath2);
HashMap<String, String> baseInfoMap = new HashMap<>(); HashMap<String, String> baseInfoMap = new HashMap<>();
if (baseinfo instanceof NodeList) { for (int j = 0; j < baseinfoList.size(); j++) {
NodeList baseinfoList = (NodeList) baseinfo;
for (int j = 0; j < baseinfoList.getLength(); j++) {
if (j % 2 == 0) { if (j % 2 == 0) {
continue; continue;
} }
Node node = baseinfoList.item(j); Element node = baseinfoList.get(j);
if (j > 0) { if (j > 0) {
Node prenode = baseinfoList.item(j - 1); Element prenode = baseinfoList.get(j - 1);
System.out.println(prenode.getTextContent().trim() + "=" + node.getTextContent().trim()); baseInfoMap.put(prenode.text().trim(), node.text().trim());
baseInfoMap.put(prenode.getTextContent().trim(), node.getTextContent().trim());
}
} }
} }
map.put("baseinfo", baseInfoMap); map.put("baseinfo", baseInfoMap);
mapList.add(map); mapList.add(map);
} }
}
} catch (Exception e) { } catch (Exception e) {
log.error("xpath解析异常:", e); log.error("申请材料表格解析xpath解析异常:", e);
} }
return mapList; return mapList;
} }
...@@ -214,21 +207,15 @@ public class MatterDetailHtmlParseUtil { ...@@ -214,21 +207,15 @@ public class MatterDetailHtmlParseUtil {
public static Map<String, String> getSltjMapByHtml(Document dom) { public static Map<String, String> getSltjMapByHtml(Document dom) {
Map<String, String> resultMap = new HashMap<>(); Map<String, String> resultMap = new HashMap<>();
String baseInfoExp = "//div[@class='section6']//p"; String baseInfoExp = "//div[@class='section6']//p";
XPath xPath = XPathFactory.newInstance().newXPath();
Object result;
try { try {
result = xPath.evaluate(baseInfoExp, dom, XPathConstants.NODESET); Elements elements = dom.selectXpath(baseInfoExp);
if (result instanceof NodeList) {
NodeList nodeList = (NodeList) result;
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for (int i = 0; i < nodeList.getLength(); i++) { for (int i = 0; i < elements.size(); i++) {
sb.append(nodeList.item(i).getTextContent()); sb.append(elements.get(i).text().trim());
} }
resultMap.put("sltj", sb.toString()); resultMap.put("sltj", sb.toString());
} } catch (Exception e) {
} catch (XPathExpressionException e) { log.error("受理条件xpath解析异常:", e);
log.error("xpath解析异常:", e);
} }
return resultMap; return resultMap;
} }
...@@ -245,8 +232,22 @@ public class MatterDetailHtmlParseUtil { ...@@ -245,8 +232,22 @@ public class MatterDetailHtmlParseUtil {
String baseInfoExp1 = "//div[@class='section7']//table[1]//tr"; String baseInfoExp1 = "//div[@class='section7']//table[1]//tr";
XPath xPath = XPathFactory.newInstance().newXPath(); XPath xPath = XPathFactory.newInstance().newXPath();
Object result; Object result;
int rowNum = 1; int rowNum = 0;
try { try {
Elements elements = dom.selectXpath(baseInfoExp1);
rowNum = elements.size();
Elements nodeList = dom.selectXpath(baseInfoExp);
for (int j = 1; j <= rowNum; j++) {
Map<String, Object> map = new HashMap<>();
String baseInfoTempExp = String.format("//div[@class='section7']//table[1]//tr[%d]//td", j + 1);
Elements evaluateList = dom.selectXpath(baseInfoTempExp);
for (int k = 0; k < evaluateList.size(); k++) {
map.put(nodeList.get(k).text(), evaluateList.get(k).text().trim());
map.put("sort", j);
}
resultListMap.add(map);
}
/*
result = xPath.evaluate(baseInfoExp1, dom, XPathConstants.NODESET); result = xPath.evaluate(baseInfoExp1, dom, XPathConstants.NODESET);
if (result instanceof NodeList) { if (result instanceof NodeList) {
NodeList nodeList = (NodeList) result; NodeList nodeList = (NodeList) result;
...@@ -269,9 +270,9 @@ public class MatterDetailHtmlParseUtil { ...@@ -269,9 +270,9 @@ public class MatterDetailHtmlParseUtil {
} }
resultListMap.add(map); resultListMap.add(map);
} }
} }*/
} catch (XPathExpressionException e) { } catch (Exception e) {
log.error("xpath解析异常:", e); log.error("办理流程xpath解析异常:", e);
} }
return resultListMap; return resultListMap;
} }
...@@ -285,11 +286,14 @@ public class MatterDetailHtmlParseUtil { ...@@ -285,11 +286,14 @@ public class MatterDetailHtmlParseUtil {
public static Map<String, String> getSfbzMapByHtml(Document dom) { public static Map<String, String> getSfbzMapByHtml(Document dom) {
Map<String, String> resultMap = new HashMap<>(); Map<String, String> resultMap = new HashMap<>();
String baseInfoExp = "//div[@class='section8']//p"; String baseInfoExp = "//div[@class='section8']//p";
XPath xPath = XPathFactory.newInstance().newXPath();
Object result;
try { try {
result = xPath.evaluate(baseInfoExp, dom, XPathConstants.NODESET); Elements elements = dom.selectXpath(baseInfoExp);
StringBuilder sb = new StringBuilder();
for (int i = 0; i < elements.size(); i++) {
sb.append(elements.get(i).text());
}
resultMap.put("sfbz", sb.toString());
/* result = xPath.evaluate(baseInfoExp, dom, XPathConstants.NODESET);
if (result instanceof NodeList) { if (result instanceof NodeList) {
NodeList nodeList = (NodeList) result; NodeList nodeList = (NodeList) result;
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
...@@ -297,9 +301,9 @@ public class MatterDetailHtmlParseUtil { ...@@ -297,9 +301,9 @@ public class MatterDetailHtmlParseUtil {
sb.append(nodeList.item(i).getTextContent()); sb.append(nodeList.item(i).getTextContent());
} }
resultMap.put("sfbz", sb.toString()); resultMap.put("sfbz", sb.toString());
} }*/
} catch (XPathExpressionException e) { } catch (Exception e) {
log.error("xpath解析异常:", e); log.error("收费标准xpath解析异常:", e);
} }
return resultMap; return resultMap;
} }
...@@ -315,18 +319,37 @@ public class MatterDetailHtmlParseUtil { ...@@ -315,18 +319,37 @@ public class MatterDetailHtmlParseUtil {
List<Map<String, Object>> resultListMap = new ArrayList<>(); List<Map<String, Object>> resultListMap = new ArrayList<>();
String baseInfoExp = "//div[@class='section9']//table[1]//tr"; String baseInfoExp = "//div[@class='section9']//table[1]//tr";
String baseInfoExp1 = "//div[@class='section9']//table[1]//tr[1]//td"; String baseInfoExp1 = "//div[@class='section9']//table[1]//tr[1]//td";
XPath xPath = XPathFactory.newInstance().newXPath();
int num = 0; int num = 0;
Object result;
try { try {
Elements elements = dom.selectXpath(baseInfoExp);
num = elements.size();
Elements nodeList = dom.selectXpath(baseInfoExp1);
for (int j = 1; j < num; j++) {
Map<String, Object> map = new HashMap<>();
String baseInfoTempExp = String.format("//div[@class='section9']//table[1]//tr[%d]//td", j + 1);
Elements evaluateList = dom.selectXpath(baseInfoTempExp);
for (int k = 1; k < evaluateList.size(); k++) {
map.put(nodeList.get(k - 1).text().trim(), evaluateList.get(k).text().trim());
if (nodeList.get(k - 1).text().trim().equalsIgnoreCase("条款内容")) {
//查找对应内容
String tklrExp = String.format("//div[@class=\"smltc9_bottom\"]//p");
Elements tklrList = dom.selectXpath(tklrExp);
map.put(nodeList.get(k - 1).text().trim(), tklrList.get(j - 1).text().trim());
}
}
map.put("sort", j);
resultListMap.add(map);
}
/*
result = xPath.evaluate(baseInfoExp, dom, XPathConstants.NODESET); result = xPath.evaluate(baseInfoExp, dom, XPathConstants.NODESET);
NodeList nodeList = (NodeList) result; NodeList nodeList = (NodeList) result;
num = nodeList.getLength(); num = nodeList.getLength();
result = xPath.evaluate(baseInfoExp1, dom, XPathConstants.NODESET); result = xPath.evaluate(baseInfoExp1, dom, XPathConstants.NODESET);
nodeList = (NodeList) result; nodeList = (NodeList) result;
for (int j = 1; j < num; j++) { for (int j = 1; j < num; j++) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
String baseInfoTempExp = String.format("//div[@class='section9']//table[1]//tr[%d]//td", j + 1); String baseInfoTempExp = String.format("//div[@class='section9']//table[1]//tr[%d]//td", j + 1);
...@@ -335,7 +358,6 @@ public class MatterDetailHtmlParseUtil { ...@@ -335,7 +358,6 @@ public class MatterDetailHtmlParseUtil {
NodeList evaluateList = (NodeList) evaluate; NodeList evaluateList = (NodeList) evaluate;
for (int k = 1; k < evaluateList.getLength(); k++) { for (int k = 1; k < evaluateList.getLength(); k++) {
map.put(nodeList.item(k - 1).getTextContent(), evaluateList.item(k).getTextContent().trim()); map.put(nodeList.item(k - 1).getTextContent(), evaluateList.item(k).getTextContent().trim());
if (nodeList.item(k - 1).getTextContent().trim().equalsIgnoreCase("条款内容")) { if (nodeList.item(k - 1).getTextContent().trim().equalsIgnoreCase("条款内容")) {
//查找对应内容 //查找对应内容
String tklrExp = String.format("//div[@class=\"smltc9_bottom\"]//p"); String tklrExp = String.format("//div[@class=\"smltc9_bottom\"]//p");
...@@ -343,15 +365,13 @@ public class MatterDetailHtmlParseUtil { ...@@ -343,15 +365,13 @@ public class MatterDetailHtmlParseUtil {
NodeList tklrList = (NodeList) tklr; NodeList tklrList = (NodeList) tklr;
map.put(nodeList.item(k - 1).getTextContent(), tklrList.item(j - 1).getTextContent().trim()); map.put(nodeList.item(k - 1).getTextContent(), tklrList.item(j - 1).getTextContent().trim());
} }
} }
map.put("sort", j); map.put("sort", j);
resultListMap.add(map); resultListMap.add(map);
} }*/
} catch (XPathExpressionException e) { } catch (Exception e) {
log.error("xpath解析异常:", e); log.error("设定依据xpath解析异常:", e);
} }
return resultListMap; return resultListMap;
} }
...@@ -366,23 +386,19 @@ public class MatterDetailHtmlParseUtil { ...@@ -366,23 +386,19 @@ public class MatterDetailHtmlParseUtil {
public static Map<String, String> getZjfwMapByHtml(Document dom) { public static Map<String, String> getZjfwMapByHtml(Document dom) {
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
String baseInfoExp = "//div[@class='section10']//table[1]//tr"; String baseInfoExp = "//div[@class='section10']//table[1]//tr";
XPath xPath = XPathFactory.newInstance().newXPath();
int rownum = 0; int rownum = 0;
Object result;
try { try {
result = xPath.evaluate(baseInfoExp, dom, XPathConstants.NODESET); Elements elements = dom.selectXpath(baseInfoExp);
NodeList nodeList = (NodeList) result; rownum = elements.size();
rownum = nodeList.getLength();
for (int j = 1; j <= rownum; j++) { for (int j = 1; j <= rownum; j++) {
String baseInfoTempExp = String.format("//div[@class='section10']//table[1]//tr[%d]//td", j); String baseInfoTempExp = String.format("//div[@class='section10']//table[1]//tr[%d]//td", j);
Object evaluate = xPath.evaluate(baseInfoTempExp, dom, XPathConstants.NODESET); Elements evaluateList = dom.selectXpath(baseInfoTempExp);
NodeList evaluateList = (NodeList) evaluate; if (evaluateList.size() > 1) {
if (evaluateList.getLength() > 1) { map.put(evaluateList.get(evaluateList.size() - 2).text().trim(), evaluateList.get(evaluateList.size() - 1).text().trim());
map.put(evaluateList.item(evaluateList.getLength() - 2).getTextContent().trim(), evaluateList.item(evaluateList.getLength() - 1).getTextContent().trim());
} }
} }
} catch (XPathExpressionException e) { } catch (Exception e) {
log.error("xpath解析异常:", e); log.error("中介服务xpath解析异常:", e);
} }
return map; return map;
} }
...@@ -396,25 +412,21 @@ public class MatterDetailHtmlParseUtil { ...@@ -396,25 +412,21 @@ public class MatterDetailHtmlParseUtil {
public static List<Map<String, Object>> getCjwtMapByHtml(Document dom) { public static List<Map<String, Object>> getCjwtMapByHtml(Document dom) {
List<Map<String, Object>> resultListMap = new ArrayList<>(); List<Map<String, Object>> resultListMap = new ArrayList<>();
String baseInfoExp = "//div[@class='section11']//table[1]//tr"; String baseInfoExp = "//div[@class='section11']//table[1]//tr";
XPath xPath = XPathFactory.newInstance().newXPath();
int num = 0; int num = 0;
Object result;
try { try {
result = xPath.evaluate(baseInfoExp, dom, XPathConstants.NODESET); Elements elements = dom.selectXpath(baseInfoExp);
NodeList nodeList = (NodeList) result; num = elements.size();
num = nodeList.getLength();
for (int j = 1; j <= num; j++) { for (int j = 1; j <= num; j++) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
String baseInfoTempExp = String.format("//div[@class='section11']//table[1]//tr[%d]//td[2]", j ); String baseInfoTempExp = String.format("//div[@class='section11']//table[1]//tr[%d]//td[2]", j);
Object evaluate = xPath.evaluate(baseInfoTempExp, dom, XPathConstants.NODESET); Elements evaluateList = dom.selectXpath(baseInfoTempExp);
NodeList evaluateList = (NodeList) evaluate; for (int k = 0; k < evaluateList.size(); k++) {
for (int k = 0; k < evaluateList.getLength(); k++) { map.put(evaluateList.get(k).firstElementChild().text(), evaluateList.get(k).lastElementChild().text().trim());
map.put(evaluateList.item(k).getFirstChild().getTextContent().trim(),evaluateList.item(k).getLastChild().getTextContent().trim());
} }
map.put("sort", j); map.put("sort", j);
resultListMap.add(map); resultListMap.add(map);
} }
} catch (XPathExpressionException e) { } catch (Exception e) {
log.error("常用问题xpath解析异常:", e); log.error("常用问题xpath解析异常:", e);
} }
return resultListMap; return resultListMap;
...@@ -426,42 +438,40 @@ public class MatterDetailHtmlParseUtil { ...@@ -426,42 +438,40 @@ public class MatterDetailHtmlParseUtil {
//String url = "http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=511102000000&itemCode=511A0116400001-511102000000-000-11511000008554251k-1-00&taskType=1&deptCode=1151124000008554251k_28064"; //String url = "http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=511102000000&itemCode=511A0116400001-511102000000-000-11511000008554251k-1-00&taskType=1&deptCode=1151124000008554251k_28064";
// String url = "http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=510110307000&itemCode=511E99406004-510110307000-000-11510110009212261X-1-00&taskType=9&deptCode=1703461"; // String url = "http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=510110307000&itemCode=511E99406004-510110307000-000-11510110009212261X-1-00&taskType=9&deptCode=1703461";
String url = "http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=511102000000&itemCode=511A0099100005-511102000000-000-11511002735871990X-1-00&taskType=1&deptCode=11511002735871990X"; String url = "http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=511102000000&itemCode=511A0099100005-511102000000-000-11511002735871990X-1-00&taskType=1&deptCode=11511002735871990X";
//String url = "http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=513426000000&itemCode=511F3000300009-513426000000-000-11513426MB1541028A-1-00&taskType=7&deptCode=009075316";
Document dom = MatterDetailHtmlParseUtil.getDomByHtml(url); Document dom = MatterDetailHtmlParseUtil.getDomByHtml(url);
Map<String, String> baseInfoMap = MatterDetailHtmlParseUtil.getbaseInfoMapByHtml(dom);
System.out.println(JSON.toJSONString(baseInfoMap));
baseInfoMap.entrySet().stream().forEach(item -> {
System.out.println(item.getKey() + "=" + item.getValue());
});
// Map<String, String> baseInfoMap = MatterDetailHtmlParseUtil.getbaseInfoMapByHtml(dom); List<Map<String, Object>> mapList = MatterDetailHtmlParseUtil.getsqclInfoMapByHtml(dom);
// System.out.println(JSON.toJSONString(mapList));
// // System.out.println(JSON.toJSONString(baseInfoMap));
// baseInfoMap.entrySet().stream().forEach(item->{
// System.out.println(item.getKey()+"="+item.getValue());
// });
// List<Map<String, Object>> mapList = MatterDetailHtmlParseUtil.getsqclInfoMapByHtml(dom);
//
// System.out.println(JSON.toJSONString(mapList));
// Map<String, String> sltjMapByHtml = MatterDetailHtmlParseUtil.getSltjMapByHtml(dom);
//
// System.out.println(JSON.toJSONString(sltjMapByHtml));
// List<Map<String, Object>> mapList = MatterDetailHtmlParseUtil.getbllcMapByHtml(dom);
// System.out.println(JSON.toJSONString(mapList));
// Map<String, String> sfbzMapByHtml = MatterDetailHtmlParseUtil.getSfbzMapByHtml(dom);
// System.out.println(JSON.toJSONString(sfbzMapByHtml));
Map<String, String> sltjMapByHtml = MatterDetailHtmlParseUtil.getSltjMapByHtml(dom);
System.out.println("==============受理条件==============");
System.out.println(JSON.toJSONString(sltjMapByHtml));
// List<Map<String, Object>> mapList = MatterDetailHtmlParseUtil.getSdyjMapByHtml(dom); System.out.println("==============办理流程==============");
// System.out.println(JSON.toJSONString(mapList)); List<Map<String, Object>> bllcListMap = MatterDetailHtmlParseUtil.getbllcMapByHtml(dom);
System.out.println(JSON.toJSONString(bllcListMap));
// Map<String, String> zjfwMapByHtml = MatterDetailHtmlParseUtil.getZjfwMapByHtml(dom); System.out.println("==============收费标准==============");
// System.out.println(JSON.toJSONString(zjfwMapByHtml)); Map<String, String> sfbzMapByHtml = MatterDetailHtmlParseUtil.getSfbzMapByHtml(dom);
System.out.println(JSON.toJSONString(sfbzMapByHtml));
System.out.println("==============设定依据==============");
List<Map<String, Object>> sdyjMapByHtml = MatterDetailHtmlParseUtil.getSdyjMapByHtml(dom);
System.out.println(JSON.toJSONString(sdyjMapByHtml));
System.out.println("==============中介服务==============");
Map<String, String> zjfwMapByHtml = MatterDetailHtmlParseUtil.getZjfwMapByHtml(dom);
System.out.println(JSON.toJSONString(zjfwMapByHtml));
List<Map<String, Object>> mapList = MatterDetailHtmlParseUtil.getCjwtMapByHtml(dom); System.out.println("==============常见问题==============");
System.out.println(JSON.toJSONString(mapList)); List<Map<String, Object>> cjwtMapByHtml = MatterDetailHtmlParseUtil.getCjwtMapByHtml(dom);
System.out.println(JSON.toJSONString(cjwtMapByHtml));
} }
......
...@@ -5,25 +5,16 @@ import cn.hutool.core.util.CharsetUtil; ...@@ -5,25 +5,16 @@ import cn.hutool.core.util.CharsetUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.util.DataUtil; import com.mortals.framework.util.DataUtil;
import com.mortals.framework.util.HttpUtil; import com.mortals.xhx.common.code.SourceEnum;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.matter.model.MatterEntity; import com.mortals.xhx.module.matter.model.MatterEntity;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringEscapeUtils;
import org.htmlcleaner.CleanerProperties;
import org.htmlcleaner.DomSerializer;
import org.htmlcleaner.HtmlCleaner;
import org.htmlcleaner.TagNode;
import org.jsoup.Jsoup; import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -36,32 +27,20 @@ public class MatterHtmlParseUtil { ...@@ -36,32 +27,20 @@ public class MatterHtmlParseUtil {
String matterTotalExp = "//input[@id=\"result_count\"]"; String matterTotalExp = "//input[@id=\"result_count\"]";
String matterPageExp = "//input[@id=\"pageNum\"]"; String matterPageExp = "//input[@id=\"pageNum\"]";
Map<String, Integer> resultMap = new HashMap<>(); Map<String, Integer> resultMap = new HashMap<>();
String html;
Object result;
try { try {
html = HttpUtil.doGet(url, params); Document dom = Jsoup.connect(url).data(params).get();
HtmlCleaner hc = new HtmlCleaner(); Elements elements = dom.selectXpath(matterTotalExp);
TagNode tn = hc.clean(html); if (elements.size() > 0) {
Document dom = new DomSerializer(new CleanerProperties()).createDOM(tn); Integer total = elements.get(0) == null ? 0 : DataUtil.converStr2Int(elements.get(0).attr("value"), 0);
XPath xPath = XPathFactory.newInstance().newXPath();
result = xPath.evaluate(matterTotalExp, dom, XPathConstants.NODESET);
if (result instanceof NodeList) {
NodeList nodeList = (NodeList) result;
if (nodeList.getLength() > 0) {
Integer total = nodeList.item(0) == null ? 0 : DataUtil.converStr2Int(nodeList.item(0).getAttributes().getNamedItem("value").getNodeValue(), 0);
resultMap.put("total", total); resultMap.put("total", total);
} }
}
result = xPath.evaluate(matterPageExp, dom, XPathConstants.NODESET); elements = dom.selectXpath(matterPageExp);
if (result instanceof NodeList) { if (elements.size() > 0) {
NodeList nodeList = (NodeList) result; Integer pageNum = elements.get(0) == null ? 0 : DataUtil.converStr2Int(elements.get(0).attr("value"), 0);
if (nodeList.getLength() > 0) {
Integer pageNum = nodeList.item(0) == null ? 0 : DataUtil.converStr2Int(nodeList.item(0).getAttributes().getNamedItem("value").getNodeValue(), 0);
resultMap.put("pageNum", pageNum); resultMap.put("pageNum", pageNum);
} }
}
} catch (Exception e) { } catch (Exception e) {
log.error("获取事项数量异常!params:" + JSON.toJSONString(params), e); log.error("获取事项数量异常!params:" + JSON.toJSONString(params), e);
return Rest.fail(e.getMessage()); return Rest.fail(e.getMessage());
...@@ -71,63 +50,46 @@ public class MatterHtmlParseUtil { ...@@ -71,63 +50,46 @@ public class MatterHtmlParseUtil {
} }
public static Rest<List<MatterEntity>> getMatterList(Map<String, String> params, String url) { public static Rest<List<MatterEntity>> getMatterList(Map<String, String> params, String url) {
// String url = GlobalSysInfo.getParamValue(Constant.GOV_MATTER_PAGELIST_URL, "http://www.sczwfw.gov.cn/jiq/interface/item/tags");
//String url = "http://www.sczwfw.gov.cn/jiq/interface/item/tags";
String matterListExp = "//div[@class=\"sx_list\"]//span[1]"; String matterListExp = "//div[@class=\"sx_list\"]//span[1]";
String matterListLiExp = "//div[@class=\"sx_list\"]//li/a[1]"; String matterListLiExp = "//div[@class=\"sx_list\"]//li/a[1]";
List<MatterEntity> matterEntityList = new ArrayList<>(); List<MatterEntity> matterEntityList = new ArrayList<>();
String html;
Object result;
try { try {
//html = HttpUtil.doGet(url, params); Document dom = Jsoup.connect(url).data(params).get();
html = Jsoup.connect(url).data(params).get().body().html(); Elements elements = dom.selectXpath(matterListExp);
// System.out.println(html);
HtmlCleaner hc = new HtmlCleaner(); for (int i = 0; i < elements.size(); i++) {
TagNode tn = hc.clean(html); Element element = elements.get(i);
if (element == null) {
Document dom = new DomSerializer(new CleanerProperties()).createDOM(tn);
XPath xPath = XPathFactory.newInstance().newXPath();
result = xPath.evaluate(matterListExp, dom, XPathConstants.NODESET);
if (result instanceof NodeList) {
NodeList nodeList = (NodeList) result;
for (int i = 0; i < nodeList.getLength(); i++) {
Node node = nodeList.item(i);
if (node == null) {
continue; continue;
} }
String title = StringEscapeUtils.unescapeHtml4(node.getAttributes().getNamedItem("title").getNodeValue()); String title = element.attr("title");
String href = StringEscapeUtils.unescapeHtml4(node.getFirstChild().getAttributes().getNamedItem("href").getNodeValue()); String href = element.firstElementChild().attr("href");
if (href.equalsIgnoreCase("javascript:void(0)")) { if (href.equalsIgnoreCase("javascript:void(0)")) {
continue; continue;
} }
UrlBuilder builder = UrlBuilder.ofHttp(href, CharsetUtil.CHARSET_UTF_8); buildMatter(matterEntityList, title, href);
String itemCode = builder.getQuery().get("itemCode").toString(); }
String taskType = builder.getQuery().get("taskType").toString();
String deptCode = builder.getQuery().get("deptCode").toString();
String areaCode = builder.getQuery().get("areaCode").toString();
MatterEntity matterEntity = new MatterEntity(); elements = dom.selectXpath(matterListLiExp);
matterEntity.initAttrValue(); for (int i = 0; i < elements.size(); i++) {
matterEntity.setTcode(itemCode); Element element = elements.get(i);
matterEntity.setTname(title); if (element == null) {
matterEntity.setDeptCode(deptCode); continue;
matterEntity.setMatterNo(itemCode);
matterEntity.setMatterName(title);
matterEntity.setAreaCode(areaCode);
matterEntity.setUrl(href);
matterEntity.setHaveGetMatterInfo("false");
matterEntityList.add(matterEntity);
} }
String title = element.attr("title");
String href = element.attr("href");
buildMatter(matterEntityList, title, href);
} }
result = xPath.evaluate(matterListLiExp, dom, XPathConstants.NODESET); } catch (Exception e) {
if (result instanceof NodeList) { log.error("获取列表异常!params:" + JSON.toJSONString(params), e);
NodeList nodeList = (NodeList) result; return Rest.fail(e.getMessage());
for (int j = 0; j < nodeList.getLength(); j++) { }
Node node = nodeList.item(j);
String title = StringEscapeUtils.unescapeHtml4(node.getAttributes().getNamedItem("title").getNodeValue()); return Rest.ok(matterEntityList);
String href = StringEscapeUtils.unescapeHtml4(node.getAttributes().getNamedItem("href").getNodeValue()); }
private static void buildMatter(List<MatterEntity> matterEntityList, String title, String href) {
UrlBuilder builder = UrlBuilder.ofHttp(href, CharsetUtil.CHARSET_UTF_8); UrlBuilder builder = UrlBuilder.ofHttp(href, CharsetUtil.CHARSET_UTF_8);
String itemCode = builder.getQuery().get("itemCode").toString(); String itemCode = builder.getQuery().get("itemCode").toString();
String taskType = builder.getQuery().get("taskType").toString(); String taskType = builder.getQuery().get("taskType").toString();
...@@ -143,91 +105,32 @@ public class MatterHtmlParseUtil { ...@@ -143,91 +105,32 @@ public class MatterHtmlParseUtil {
matterEntity.setAreaCode(areaCode); matterEntity.setAreaCode(areaCode);
matterEntity.setMatterName(title); matterEntity.setMatterName(title);
matterEntity.setUrl(href); matterEntity.setUrl(href);
matterEntity.setSource(SourceEnum.政务网.getValue());
matterEntityList.add(matterEntity); matterEntityList.add(matterEntity);
} }
}
} catch (Exception e) { public static Rest<Map<String, String>> syncDeptBySiteId(Map<String, String> params, String url) {
log.error("获取列表异常!params:" + JSON.toJSONString(params), e); String deptListExp = "//ul[@class='bm-list']//li";
return Rest.fail(e.getMessage()); Map<String, String> map = new HashMap<>();
}
return Rest.ok(matterEntityList);
}
/**
* 解析事项基本信息
*
* @param dom
* @return
*/
public static Map<String, String> getbaseInfoMapByHtml(Document dom) {
Map<String, String> params = new HashMap<>();
String baseInfoExp = "//div[@class=\"section1\"]//table[1]//td";
String baseInfoExp1 = "//div[@class=\"section2\"]/table[1]//td";
String baseInfoExp2 = "//div[@class=\"section3\"]/table[1]//td";
String baseInfoExp3 = "//div[@class=\"section4\"]/table//td";
baseInfoExp += "|" + baseInfoExp1;
baseInfoExp += "|" + baseInfoExp2;
baseInfoExp += "|" + baseInfoExp3;
XPath xPath = XPathFactory.newInstance().newXPath();
Object result;
try { try {
result = xPath.evaluate(baseInfoExp, dom, XPathConstants.NODESET); Document dom = Jsoup.connect(url).data(params).get();
if (result instanceof NodeList) { Elements elements = dom.selectXpath(deptListExp);
NodeList nodeList = (NodeList) result; for (int i = 0; i < elements.size(); i++) {
for (int i = 0; i < nodeList.getLength(); i++) { Element element = elements.get(i);
if (i % 2 == 0) { if (element == null) {
continue; continue;
} }
Node node = nodeList.item(i); String deptName = element.attr("title");
if (i > 0) { String href = element.firstElementChild().attr("href");
Node prenode = nodeList.item(i - 1);
params.put(prenode.getTextContent().trim(), node.getTextContent().trim());
}
}
}
} catch (XPathExpressionException e) {
log.error("xpath解析异常:", e);
}
return params;
}
public static Rest<String> syncDeptBySiteId(Map<String, String> params, String url) {
//String url = GlobalSysInfo.getParamValue(Constant.GOV_DEPT_URL, "http://www.sczwfw.gov.cn/jiq/front/channel/deptSwitch");
// String url = "http://www.sczwfw.gov.cn/jiq/front/channel/deptSwitch";
String exp = "//ul[@class='bm-list']//li";
String html;
Object result;
try {
html = HttpUtil.doGet(url, params);
HtmlCleaner hc = new HtmlCleaner();
TagNode tn = hc.clean(html);
Document dom = new DomSerializer(new CleanerProperties()).createDOM(tn);
XPath xPath = XPathFactory.newInstance().newXPath();
result = xPath.evaluate(exp, dom, XPathConstants.NODESET);
if (result instanceof NodeList) {
NodeList nodeList = (NodeList) result;
for (int i = 0; i < nodeList.getLength(); i++) {
Node node = nodeList.item(i);
String deptName = node.getAttributes().getNamedItem("title").getNodeValue();
String href = node.getFirstChild().getAttributes().getNamedItem("href").getNodeValue();
UrlBuilder builder = UrlBuilder.ofHttp(href, CharsetUtil.CHARSET_UTF_8); UrlBuilder builder = UrlBuilder.ofHttp(href, CharsetUtil.CHARSET_UTF_8);
String deptCode = builder.getQuery().get("deptCode").toString(); String deptCode = builder.getQuery().get("deptCode").toString();
map.put(deptCode, deptName);
System.out.println(href);
}
} }
} catch (Exception e) { } catch (Exception e) {
return Rest.fail(e.getMessage()); return Rest.fail(e.getMessage());
} }
return Rest.ok("当前站点同步添加部门成功!"); return Rest.ok("当前站点同步添加部门成功!", map);
} }
...@@ -252,7 +155,7 @@ public class MatterHtmlParseUtil { ...@@ -252,7 +155,7 @@ public class MatterHtmlParseUtil {
// String url = "http://www.sczwfw.gov.cn/jiq/front/item/qlqd"; // String url = "http://www.sczwfw.gov.cn/jiq/front/item/qlqd";
String url = "http://www.sczwfw.gov.cn/jiq/interface/item/tags"; /* String url = "http://www.sczwfw.gov.cn/jiq/interface/item/tags";
HashMap<String, String> params = new HashMap<>(); HashMap<String, String> params = new HashMap<>();
params.put("areaCode", "510110006007"); params.put("areaCode", "510110006007");
params.put("dxType", "56"); params.put("dxType", "56");
...@@ -285,10 +188,53 @@ public class MatterHtmlParseUtil { ...@@ -285,10 +188,53 @@ public class MatterHtmlParseUtil {
for (int i = 0; i < allList.size(); i++) { for (int i = 0; i < allList.size(); i++) {
System.out.println(i + " " + allList.get(i).getMatterName()); System.out.println(i + " " + allList.get(i).getMatterName());
} }*/
// System.out.println(JSON.toJSONString(allList)); // System.out.println(JSON.toJSONString(allList));
String url = "http://www.sczwfw.gov.cn/jiq/interface/item/tags";
HashMap<String, String> params = new HashMap<>();
params.put("areaCode", "510110006007");
params.put("dxType", "56");
params.put("deptCode", "");
params.put("searchtext", "");
params.put("taskType", "");
params.put("pageno", "1");
Rest<Map<String, Integer>> rest = MatterHtmlParseUtil.statSiteMatterCount(params, url);
System.out.println(JSON.toJSONString(rest));
List<MatterEntity> allList = new ArrayList<>();
String url1 = "http://www.sczwfw.gov.cn/jiq/interface/item/tags";
HashMap<String, String> params1 = new HashMap<>();
params1.put("dxType", "56");
params1.put("areaCode", "510110006007");
params1.put("deptCode", "");
params1.put("searchtext", "");
params1.put("taskType", "");
for (int i = 1; i <= rest.getData().get("pageNum"); i++) {
params1.put("pageno", String.valueOf(i));
Rest<List<MatterEntity>> restList = MatterHtmlParseUtil.getMatterList(params1, url1);
if (restList.getCode() == YesNoEnum.YES.getValue() && !ObjectUtils.isEmpty(restList.getData())) {
allList.addAll(restList.getData());
}
}
// for (int i = 0; i < allList.size(); i++) {
// System.out.println(i + " " + allList.get(i).getMatterName());
// }
url = "http://www.sczwfw.gov.cn/jiq/front/channel/deptSwitch";
params = new HashMap<>();
params.put("areaCode", "510110006007");
Rest<Map<String, String>> rest1 = MatterHtmlParseUtil.syncDeptBySiteId(params, url);
System.out.println(JSON.toJSONString(rest1));
} }
} }
package com.mortals.xhx.common.utils; package com.mortals.xhx.common.utils;
import cn.hutool.core.collection.ListUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.xhx.ManagerBaseApplication;
import com.mortals.xhx.common.code.SourceEnum; import com.mortals.xhx.common.code.SourceEnum;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.dept.service.DeptService; import com.mortals.xhx.module.dept.service.DeptService;
...@@ -10,16 +12,22 @@ import com.mortals.xhx.module.matter.model.MatterEntity; ...@@ -10,16 +12,22 @@ import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.matter.model.MatterQuery; import com.mortals.xhx.module.matter.model.MatterQuery;
import com.mortals.xhx.module.matter.service.MatterService; import com.mortals.xhx.module.matter.service.MatterService;
import com.mortals.xhx.module.site.model.SiteEntity; import com.mortals.xhx.module.site.model.SiteEntity;
import com.mortals.xhx.module.site.model.SiteMatterEntity;
import com.mortals.xhx.module.site.model.SiteQuery;
import com.mortals.xhx.module.site.service.SiteMatterService;
import com.mortals.xhx.module.site.service.SiteService; import com.mortals.xhx.module.site.service.SiteService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.CustomLog;
import lombok.extern.apachecommons.CommonsLog;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import javax.xml.transform.Source; import javax.xml.transform.Source;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
@AllArgsConstructor @AllArgsConstructor
@Slf4j @CommonsLog
public class SyncGovMatterDetailThread implements Runnable { public class SyncGovMatterDetailThread implements Runnable {
private MatterService matterService; private MatterService matterService;
...@@ -28,23 +36,56 @@ public class SyncGovMatterDetailThread implements Runnable { ...@@ -28,23 +36,56 @@ public class SyncGovMatterDetailThread implements Runnable {
private DeptService deptService; private DeptService deptService;
private SiteMatterService siteMatterService;
private SiteEntity siteEntity; private SiteEntity siteEntity;
private Context context; private Context context;
@Override @Override
public void run() { public void run() {
log.info("同步站点事项开始.....");
Rest<String> deptRest = deptService.syncDeptBySiteId(siteEntity.getId(), context); Rest<String> deptRest = deptService.syncDeptBySiteId(siteEntity.getId(), context);
log.info("同步站点部门:"+ JSON.toJSONString(deptRest));
Rest<String> rest = siteService.syncMatterBySiteId(siteEntity.getId(), context); Rest<String> rest = siteService.syncMatterBySiteId(siteEntity.getId(), context);
log.info("syncMatterBySiteId:"+ JSON.toJSONString(rest)); log.info("同步事项列表:"+ JSON.toJSONString(rest));
if(rest.getCode()== YesNoEnum.YES.getValue()){ if(rest.getCode()== YesNoEnum.YES.getValue()){
List<MatterEntity> matterEntityList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode()).haveGetMatterInfo("false").source(SourceEnum.政务网.getValue())); List<MatterEntity> matterEntityList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode()).source(SourceEnum.政务网.getValue()));
matterEntityList.parallelStream().forEach(matterEntity -> {
List<MatterEntity> unSyncDetailMatterList = matterEntityList.stream().filter(f -> f.getHaveGetMatterInfo().equalsIgnoreCase("false")).collect(Collectors.toList());
log.info("同步站点事项到站点.....");
//查询站点事项相关
List<SiteEntity> siteEntities = siteService.find(new SiteQuery().areaCode(siteEntity.getAreaCode()));
//删除站点与政务事项相关项
for (SiteEntity site : siteEntities) {
siteMatterService.deleteBysiteIdAndSource(site.getId(),SourceEnum.政务网.getValue(), context);
}
//重新添加
for (SiteEntity site : siteEntities) {
List<SiteMatterEntity> siteMatterList = matterEntityList.stream().map(item -> {
return matterService.switchMatterToSiteMatterr(item, site.getId(), context).getData();
}).filter(f -> f != null).collect(Collectors.toList());
List<List<SiteMatterEntity>> partition = ListUtil.partition(siteMatterList, 100);
for (List<SiteMatterEntity> rests : partition) {
siteMatterService.save(rests);
}
}
log.info("同步站点事项到站点完成.....");
log.info("同步站点事项详细条数....."+unSyncDetailMatterList.size());
/* for (MatterEntity matterEntity : matterEntityList) {
matterService.buildMatterDetail(matterEntity, context);
matterService.update(matterEntity,context);
}*/
unSyncDetailMatterList.parallelStream().forEach(matterEntity -> {
matterService.buildMatterDetail(matterEntity, context); matterService.buildMatterDetail(matterEntity, context);
matterService.update(matterEntity,context);
}); });
} }
log.info("同步站点事项结束.....");
} }
} }
...@@ -7,7 +7,10 @@ import com.mortals.framework.common.Rest; ...@@ -7,7 +7,10 @@ import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import com.mortals.framework.util.HttpUtil; import com.mortals.framework.util.HttpUtil;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.key.Constant; import com.mortals.xhx.common.key.Constant;
import com.mortals.xhx.common.utils.MatterHtmlParseUtil;
import com.mortals.xhx.module.area.model.AreaEntity;
import com.mortals.xhx.module.dept.dao.DeptDao; import com.mortals.xhx.module.dept.dao.DeptDao;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptQuery; import com.mortals.xhx.module.dept.model.DeptQuery;
...@@ -54,6 +57,11 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -54,6 +57,11 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
@Autowired @Autowired
private MattersDeptService mattersDeptService; private MattersDeptService mattersDeptService;
@Override
protected String getExtKey(DeptEntity data) {
return data.getDeptNumber();
}
@Override @Override
public void syncDept(String areaCode, Context context) { public void syncDept(String areaCode, Context context) {
List<MattersDeptEntity> deptList = mattersDeptService.find(new MattersDeptQuery()); List<MattersDeptEntity> deptList = mattersDeptService.find(new MattersDeptQuery());
...@@ -83,30 +91,15 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -83,30 +91,15 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
SiteEntity siteEntity = siteService.get(siteId, context); SiteEntity siteEntity = siteService.get(siteId, context);
if (!ObjectUtils.isEmpty(siteEntity)) { if (!ObjectUtils.isEmpty(siteEntity)) {
String areaCode = siteEntity.getAreaCode(); String areaCode = siteEntity.getAreaCode();
String exp = "//ul[@class='bm-list']//li";
Map<String, String> params = new HashMap<>(); Map<String, String> params = new HashMap<>();
params.put("areaCode",areaCode); params.put("areaCode", areaCode);
// url += "?areaCode=" + areaCode;
String html; Rest<Map<String, String>> rest = MatterHtmlParseUtil.syncDeptBySiteId(params, url);
Object result; if (rest.getCode() == YesNoEnum.YES.getValue()) {
try { rest.getData().entrySet().stream().forEach(item -> {
html = HttpUtil.doGet(url, params); String deptCode = item.getKey();
//html = HttpUtil.get(url); String deptName = item.getValue();
HtmlCleaner hc = new HtmlCleaner();
TagNode tn = hc.clean(html);
Document dom = new DomSerializer(new CleanerProperties()).createDOM(tn);
XPath xPath = XPathFactory.newInstance().newXPath();
result = xPath.evaluate(exp, dom, XPathConstants.NODESET);
if (result instanceof NodeList) {
NodeList nodeList = (NodeList) result;
for (int i = 0; i < nodeList.getLength(); i++) {
Node node = nodeList.item(i);
String deptName = node.getAttributes().getNamedItem("title").getNodeValue();
String href = StringEscapeUtils.unescapeHtml4(node.getFirstChild().getAttributes().getNamedItem("href").getNodeValue());
UrlBuilder builder = UrlBuilder.ofHttp(href, CharsetUtil.CHARSET_UTF_8);
String deptCode = builder.getQuery().get("deptCode").toString();
//根据站点添加部门信息,部门编号存在时候不添加
DeptEntity deptExistEntity = deptService.selectOne(new DeptQuery().siteId(siteId).deptNumber(deptCode), context); DeptEntity deptExistEntity = deptService.selectOne(new DeptQuery().siteId(siteId).deptNumber(deptCode), context);
if (ObjectUtils.isEmpty(deptExistEntity)) { if (ObjectUtils.isEmpty(deptExistEntity)) {
DeptEntity deptEntity = new DeptEntity(); DeptEntity deptEntity = new DeptEntity();
...@@ -118,14 +111,12 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -118,14 +111,12 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
deptEntity.setCreateUserId(1L); deptEntity.setCreateUserId(1L);
deptService.save(deptEntity, context); deptService.save(deptEntity, context);
} }
});
} else {
return Rest.fail(rest.getMsg());
} }
} } else {
} return Rest.fail("当前站点不存在!");
catch (Exception e) {
log.error("同步部门异常!siteId:" + siteId, e);
return Rest.fail(e.getMessage());
}
} }
return Rest.ok("当前站点同步添加部门成功!"); return Rest.ok("当前站点同步添加部门成功!");
} }
......
...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterAcceptVo; ...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterAcceptVo;
* 事项受理条件实体对象 * 事项受理条件实体对象
* *
* @author zxfei * @author zxfei
* @date 2022-01-12 * @date 2022-11-16
*/ */
public class MatterAcceptEntity extends MatterAcceptVo { public class MatterAcceptEntity extends MatterAcceptVo {
...@@ -21,6 +21,10 @@ public class MatterAcceptEntity extends MatterAcceptVo { ...@@ -21,6 +21,10 @@ public class MatterAcceptEntity extends MatterAcceptVo {
*/ */
private Long matterId; private Long matterId;
/** /**
* 事项编码
*/
private String matterCode;
/**
* 事项名称 * 事项名称
*/ */
private String matterName; private String matterName;
...@@ -51,6 +55,20 @@ public class MatterAcceptEntity extends MatterAcceptVo { ...@@ -51,6 +55,20 @@ public class MatterAcceptEntity extends MatterAcceptVo {
this.matterId = matterId; this.matterId = matterId;
} }
/** /**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/**
* 获取 事项名称 * 获取 事项名称
* @return String * @return String
*/ */
...@@ -115,6 +133,7 @@ public class MatterAcceptEntity extends MatterAcceptVo { ...@@ -115,6 +133,7 @@ public class MatterAcceptEntity extends MatterAcceptVo {
public String toString(){ public String toString(){
StringBuilder sb = new StringBuilder(""); StringBuilder sb = new StringBuilder("");
sb.append(",matterId:").append(getMatterId()); sb.append(",matterId:").append(getMatterId());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",matterName:").append(getMatterName()); sb.append(",matterName:").append(getMatterName());
sb.append(",content:").append(getContent()); sb.append(",content:").append(getContent());
sb.append(",source:").append(getSource()); sb.append(",source:").append(getSource());
...@@ -125,6 +144,8 @@ public class MatterAcceptEntity extends MatterAcceptVo { ...@@ -125,6 +144,8 @@ public class MatterAcceptEntity extends MatterAcceptVo {
this.matterId = 0L; this.matterId = 0L;
this.matterCode = "";
this.matterName = ""; this.matterName = "";
this.content = ""; this.content = "";
......
...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterAcceptEntity; ...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterAcceptEntity;
* 事项受理条件查询对象 * 事项受理条件查询对象
* *
* @author zxfei * @author zxfei
* @date 2022-01-12 * @date 2022-11-16
*/ */
public class MatterAcceptQuery extends MatterAcceptEntity { public class MatterAcceptQuery extends MatterAcceptEntity {
/** 开始 主键,自增长 */ /** 开始 主键,自增长 */
...@@ -33,6 +33,9 @@ public class MatterAcceptQuery extends MatterAcceptEntity { ...@@ -33,6 +33,9 @@ public class MatterAcceptQuery extends MatterAcceptEntity {
/** 基础事项表id列表 */ /** 基础事项表id列表 */
private List <Long> matterIdList; private List <Long> matterIdList;
/** 事项编码 */
private List<String> matterCodeList;
/** 事项名称 */ /** 事项名称 */
private List<String> matterNameList; private List<String> matterNameList;
...@@ -211,6 +214,21 @@ public class MatterAcceptQuery extends MatterAcceptEntity { ...@@ -211,6 +214,21 @@ public class MatterAcceptQuery extends MatterAcceptEntity {
this.matterIdList = matterIdList; this.matterIdList = matterIdList;
} }
/**
* 获取 事项编码
* @return matterCodeList
*/
public List<String> getMatterCodeList(){
return this.matterCodeList;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public void setMatterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
}
/** /**
* 获取 事项名称 * 获取 事项名称
* @return matterNameList * @return matterNameList
...@@ -524,6 +542,25 @@ public class MatterAcceptQuery extends MatterAcceptEntity { ...@@ -524,6 +542,25 @@ public class MatterAcceptQuery extends MatterAcceptEntity {
} }
/**
* 设置 事项编码
* @param matterCode
*/
public MatterAcceptQuery matterCode(String matterCode){
setMatterCode(matterCode);
return this;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public MatterAcceptQuery matterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
return this;
}
/** /**
* 设置 事项名称 * 设置 事项名称
* @param matterName * @param matterName
......
...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterChargesVo; ...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterChargesVo;
* 事项收费标准实体对象 * 事项收费标准实体对象
* *
* @author zxfei * @author zxfei
* @date 2022-01-12 * @date 2022-11-16
*/ */
public class MatterChargesEntity extends MatterChargesVo { public class MatterChargesEntity extends MatterChargesVo {
...@@ -21,6 +21,10 @@ public class MatterChargesEntity extends MatterChargesVo { ...@@ -21,6 +21,10 @@ public class MatterChargesEntity extends MatterChargesVo {
*/ */
private Long matterId; private Long matterId;
/** /**
* 事项编码
*/
private String matterCode;
/**
* 事项名称 * 事项名称
*/ */
private String matterName; private String matterName;
...@@ -51,6 +55,20 @@ public class MatterChargesEntity extends MatterChargesVo { ...@@ -51,6 +55,20 @@ public class MatterChargesEntity extends MatterChargesVo {
this.matterId = matterId; this.matterId = matterId;
} }
/** /**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/**
* 获取 事项名称 * 获取 事项名称
* @return String * @return String
*/ */
...@@ -93,6 +111,9 @@ public class MatterChargesEntity extends MatterChargesVo { ...@@ -93,6 +111,9 @@ public class MatterChargesEntity extends MatterChargesVo {
this.source = source; this.source = source;
} }
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -112,6 +133,7 @@ public class MatterChargesEntity extends MatterChargesVo { ...@@ -112,6 +133,7 @@ public class MatterChargesEntity extends MatterChargesVo {
public String toString(){ public String toString(){
StringBuilder sb = new StringBuilder(""); StringBuilder sb = new StringBuilder("");
sb.append(",matterId:").append(getMatterId()); sb.append(",matterId:").append(getMatterId());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",matterName:").append(getMatterName()); sb.append(",matterName:").append(getMatterName());
sb.append(",content:").append(getContent()); sb.append(",content:").append(getContent());
sb.append(",source:").append(getSource()); sb.append(",source:").append(getSource());
...@@ -122,6 +144,8 @@ public class MatterChargesEntity extends MatterChargesVo { ...@@ -122,6 +144,8 @@ public class MatterChargesEntity extends MatterChargesVo {
this.matterId = 0L; this.matterId = 0L;
this.matterCode = "";
this.matterName = ""; this.matterName = "";
this.content = ""; this.content = "";
......
...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterChargesEntity; ...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterChargesEntity;
* 事项收费标准查询对象 * 事项收费标准查询对象
* *
* @author zxfei * @author zxfei
* @date 2022-01-12 * @date 2022-11-16
*/ */
public class MatterChargesQuery extends MatterChargesEntity { public class MatterChargesQuery extends MatterChargesEntity {
/** 开始 主键,自增长 */ /** 开始 主键,自增长 */
...@@ -33,6 +33,9 @@ public class MatterChargesQuery extends MatterChargesEntity { ...@@ -33,6 +33,9 @@ public class MatterChargesQuery extends MatterChargesEntity {
/** 事项基础表matter id列表 */ /** 事项基础表matter id列表 */
private List <Long> matterIdList; private List <Long> matterIdList;
/** 事项编码 */
private List<String> matterCodeList;
/** 事项名称 */ /** 事项名称 */
private List<String> matterNameList; private List<String> matterNameList;
...@@ -211,6 +214,21 @@ public class MatterChargesQuery extends MatterChargesEntity { ...@@ -211,6 +214,21 @@ public class MatterChargesQuery extends MatterChargesEntity {
this.matterIdList = matterIdList; this.matterIdList = matterIdList;
} }
/**
* 获取 事项编码
* @return matterCodeList
*/
public List<String> getMatterCodeList(){
return this.matterCodeList;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public void setMatterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
}
/** /**
* 获取 事项名称 * 获取 事项名称
* @return matterNameList * @return matterNameList
...@@ -524,6 +542,25 @@ public class MatterChargesQuery extends MatterChargesEntity { ...@@ -524,6 +542,25 @@ public class MatterChargesQuery extends MatterChargesEntity {
} }
/**
* 设置 事项编码
* @param matterCode
*/
public MatterChargesQuery matterCode(String matterCode){
setMatterCode(matterCode);
return this;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public MatterChargesQuery matterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
return this;
}
/** /**
* 设置 事项名称 * 设置 事项名称
* @param matterName * @param matterName
......
...@@ -11,7 +11,7 @@ import com.mortals.xhx.module.matter.model.MatterDatumFileEntity; ...@@ -11,7 +11,7 @@ import com.mortals.xhx.module.matter.model.MatterDatumFileEntity;
* 事项申请材料实体对象 * 事项申请材料实体对象
* *
* @author zxfei * @author zxfei
* @date 2022-01-17 * @date 2022-11-16
*/ */
public class MatterDatumEntity extends MatterDatumVo { public class MatterDatumEntity extends MatterDatumVo {
...@@ -21,6 +21,10 @@ public class MatterDatumEntity extends MatterDatumVo { ...@@ -21,6 +21,10 @@ public class MatterDatumEntity extends MatterDatumVo {
* 事项id * 事项id
*/ */
private Long matterId; private Long matterId;
/**
* 事项编码
*/
private String matterCode;
/** /**
* 事项名称 * 事项名称
*/ */
...@@ -123,6 +127,20 @@ public class MatterDatumEntity extends MatterDatumVo { ...@@ -123,6 +127,20 @@ public class MatterDatumEntity extends MatterDatumVo {
public void setMatterId(Long matterId){ public void setMatterId(Long matterId){
this.matterId = matterId; this.matterId = matterId;
} }
/**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/** /**
* 获取 事项名称 * 获取 事项名称
* @return String * @return String
...@@ -433,6 +451,7 @@ public class MatterDatumEntity extends MatterDatumVo { ...@@ -433,6 +451,7 @@ public class MatterDatumEntity extends MatterDatumVo {
public String toString(){ public String toString(){
StringBuilder sb = new StringBuilder(""); StringBuilder sb = new StringBuilder("");
sb.append(",matterId:").append(getMatterId()); sb.append(",matterId:").append(getMatterId());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",matterName:").append(getMatterName()); sb.append(",matterName:").append(getMatterName());
sb.append(",materialName:").append(getMaterialName()); sb.append(",materialName:").append(getMaterialName());
sb.append(",isMust:").append(getIsMust()); sb.append(",isMust:").append(getIsMust());
...@@ -460,6 +479,8 @@ public class MatterDatumEntity extends MatterDatumVo { ...@@ -460,6 +479,8 @@ public class MatterDatumEntity extends MatterDatumVo {
this.matterId = null; this.matterId = null;
this.matterCode = "";
this.matterName = ""; this.matterName = "";
this.materialName = ""; this.materialName = "";
......
...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterDatumFileVo; ...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterDatumFileVo;
* 材料附件实体对象 * 材料附件实体对象
* *
* @author zxfei * @author zxfei
* @date 2022-01-17 * @date 2022-11-16
*/ */
public class MatterDatumFileEntity extends MatterDatumFileVo { public class MatterDatumFileEntity extends MatterDatumFileVo {
...@@ -20,6 +20,14 @@ public class MatterDatumFileEntity extends MatterDatumFileVo { ...@@ -20,6 +20,14 @@ public class MatterDatumFileEntity extends MatterDatumFileVo {
* 材料id * 材料id
*/ */
private Long datumId; private Long datumId;
/**
* 事项编码
*/
private String matterCode;
/**
* 材料名
*/
private String materialName;
/** /**
* 附件名称 * 附件名称
*/ */
...@@ -29,17 +37,17 @@ public class MatterDatumFileEntity extends MatterDatumFileVo { ...@@ -29,17 +37,17 @@ public class MatterDatumFileEntity extends MatterDatumFileVo {
*/ */
private String fileUrl; private String fileUrl;
/** /**
* 附件类型 (1.示例样表,2.空白表格) * 附件本地下载地址
*/ */
private Integer filetype; private String localFileUrl;
/** /**
* 附件来源 (0.政务网,1.自定义) * 附件类型 (示例样表.示例样表,空白表格.空白表格)
*/ */
private Integer source; private String filetype;
/** /**
* 材料名 * 附件来源 (0.政务网,1.自定义)
*/ */
private String materialName; private Integer source;
...@@ -58,6 +66,34 @@ public class MatterDatumFileEntity extends MatterDatumFileVo { ...@@ -58,6 +66,34 @@ public class MatterDatumFileEntity extends MatterDatumFileVo {
public void setDatumId(Long datumId){ public void setDatumId(Long datumId){
this.datumId = datumId; this.datumId = datumId;
} }
/**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/**
* 获取 材料名
* @return String
*/
public String getMaterialName(){
return materialName;
}
/**
* 设置 材料名
* @param materialName
*/
public void setMaterialName(String materialName){
this.materialName = materialName;
}
/** /**
* 获取 附件名称 * 获取 附件名称
* @return String * @return String
...@@ -87,17 +123,31 @@ public class MatterDatumFileEntity extends MatterDatumFileVo { ...@@ -87,17 +123,31 @@ public class MatterDatumFileEntity extends MatterDatumFileVo {
this.fileUrl = fileUrl; this.fileUrl = fileUrl;
} }
/** /**
* 获取 附件类型 (1.示例样表,2.空白表格) * 获取 附件本地下载地址
* @return Integer * @return String
*/
public String getLocalFileUrl(){
return localFileUrl;
}
/**
* 设置 附件本地下载地址
* @param localFileUrl
*/
public void setLocalFileUrl(String localFileUrl){
this.localFileUrl = localFileUrl;
}
/**
* 获取 附件类型 (示例样表.示例样表,空白表格.空白表格)
* @return String
*/ */
public Integer getFiletype(){ public String getFiletype(){
return filetype; return filetype;
} }
/** /**
* 设置 附件类型 (1.示例样表,2.空白表格) * 设置 附件类型 (示例样表.示例样表,空白表格.空白表格)
* @param filetype * @param filetype
*/ */
public void setFiletype(Integer filetype){ public void setFiletype(String filetype){
this.filetype = filetype; this.filetype = filetype;
} }
/** /**
...@@ -114,20 +164,6 @@ public class MatterDatumFileEntity extends MatterDatumFileVo { ...@@ -114,20 +164,6 @@ public class MatterDatumFileEntity extends MatterDatumFileVo {
public void setSource(Integer source){ public void setSource(Integer source){
this.source = source; this.source = source;
} }
/**
* 获取 材料名
* @return String
*/
public String getMaterialName(){
return materialName;
}
/**
* 设置 材料名
* @param materialName
*/
public void setMaterialName(String materialName){
this.materialName = materialName;
}
...@@ -151,11 +187,13 @@ public class MatterDatumFileEntity extends MatterDatumFileVo { ...@@ -151,11 +187,13 @@ public class MatterDatumFileEntity extends MatterDatumFileVo {
public String toString(){ public String toString(){
StringBuilder sb = new StringBuilder(""); StringBuilder sb = new StringBuilder("");
sb.append(",datumId:").append(getDatumId()); sb.append(",datumId:").append(getDatumId());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",materialName:").append(getMaterialName());
sb.append(",fileName:").append(getFileName()); sb.append(",fileName:").append(getFileName());
sb.append(",fileUrl:").append(getFileUrl()); sb.append(",fileUrl:").append(getFileUrl());
sb.append(",localFileUrl:").append(getLocalFileUrl());
sb.append(",filetype:").append(getFiletype()); sb.append(",filetype:").append(getFiletype());
sb.append(",source:").append(getSource()); sb.append(",source:").append(getSource());
sb.append(",materialName:").append(getMaterialName());
return sb.toString(); return sb.toString();
} }
...@@ -163,14 +201,18 @@ public class MatterDatumFileEntity extends MatterDatumFileVo { ...@@ -163,14 +201,18 @@ public class MatterDatumFileEntity extends MatterDatumFileVo {
this.datumId = null; this.datumId = null;
this.fileName = null; this.matterCode = "";
this.fileUrl = null; this.materialName = "";
this.filetype = 1; this.fileName = "";
this.source = 1; this.fileUrl = "";
this.materialName = ""; this.localFileUrl = "";
this.filetype = "示例样表";
this.source = 1;
} }
} }
\ No newline at end of file
...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterDatumFileEntity; ...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterDatumFileEntity;
* 材料附件查询对象 * 材料附件查询对象
* *
* @author zxfei * @author zxfei
* @date 2022-01-17 * @date 2022-11-16
*/ */
public class MatterDatumFileQuery extends MatterDatumFileEntity { public class MatterDatumFileQuery extends MatterDatumFileEntity {
/** 开始 主键,自增长 */ /** 开始 主键,自增长 */
...@@ -33,23 +33,23 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity { ...@@ -33,23 +33,23 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity {
/** 材料id列表 */ /** 材料id列表 */
private List <Long> datumIdList; private List <Long> datumIdList;
/** 事项编码 */
private List<String> matterCodeList;
/** 材料名 */
private List<String> materialNameList;
/** 附件名称 */ /** 附件名称 */
private List<String> fileNameList; private List<String> fileNameList;
/** 附件下载地址 */ /** 附件下载地址 */
private List<String> fileUrlList; private List<String> fileUrlList;
/** 开始 附件类型 (1.示例样表,2.空白表格) */ /** 附件本地下载地址 */
private Integer filetypeStart; private List<String> localFileUrlList;
/** 结束 附件类型 (1.示例样表,2.空白表格) */ /** 附件类型 (示例样表.示例样表,空白表格.空白表格) */
private Integer filetypeEnd; private List<String> filetypeList;
/** 增加 附件类型 (1.示例样表,2.空白表格) */
private Integer filetypeIncrement;
/** 附件类型 (1.示例样表,2.空白表格)列表 */
private List <Integer> filetypeList;
/** 开始 附件来源 (0.政务网,1.自定义) */ /** 开始 附件来源 (0.政务网,1.自定义) */
private Integer sourceStart; private Integer sourceStart;
...@@ -87,9 +87,6 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity { ...@@ -87,9 +87,6 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity {
/** 结束 修改时间 */ /** 结束 修改时间 */
private String updateTimeEnd; private String updateTimeEnd;
/** 材料名 */
private List<String> materialNameList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<MatterDatumFileQuery> orConditionList; private List<MatterDatumFileQuery> orConditionList;
...@@ -226,6 +223,36 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity { ...@@ -226,6 +223,36 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity {
this.datumIdList = datumIdList; this.datumIdList = datumIdList;
} }
/**
* 获取 事项编码
* @return matterCodeList
*/
public List<String> getMatterCodeList(){
return this.matterCodeList;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public void setMatterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
}
/**
* 获取 材料名
* @return materialNameList
*/
public List<String> getMaterialNameList(){
return this.materialNameList;
}
/**
* 设置 材料名
* @param materialNameList
*/
public void setMaterialNameList(List<String> materialNameList){
this.materialNameList = materialNameList;
}
/** /**
* 获取 附件名称 * 获取 附件名称
* @return fileNameList * @return fileNameList
...@@ -257,69 +284,35 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity { ...@@ -257,69 +284,35 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity {
this.fileUrlList = fileUrlList; this.fileUrlList = fileUrlList;
} }
/** /**
* 获取 开始 附件类型 (1.示例样表,2.空白表格) * 获取 附件本地下载地址
* @return filetypeStart * @return localFileUrlList
*/ */
public Integer getFiletypeStart(){ public List<String> getLocalFileUrlList(){
return this.filetypeStart; return this.localFileUrlList;
} }
/** /**
* 设置 开始 附件类型 (1.示例样表,2.空白表格) * 设置 附件本地下载地址
* @param filetypeStart * @param localFileUrlList
*/ */
public void setFiletypeStart(Integer filetypeStart){ public void setLocalFileUrlList(List<String> localFileUrlList){
this.filetypeStart = filetypeStart; this.localFileUrlList = localFileUrlList;
} }
/**
* 获取 结束 附件类型 (1.示例样表,2.空白表格)
* @return $filetypeEnd
*/
public Integer getFiletypeEnd(){
return this.filetypeEnd;
}
/**
* 设置 结束 附件类型 (1.示例样表,2.空白表格)
* @param filetypeEnd
*/
public void setFiletypeEnd(Integer filetypeEnd){
this.filetypeEnd = filetypeEnd;
}
/**
* 获取 增加 附件类型 (1.示例样表,2.空白表格)
* @return filetypeIncrement
*/
public Integer getFiletypeIncrement(){
return this.filetypeIncrement;
}
/**
* 设置 增加 附件类型 (1.示例样表,2.空白表格)
* @param filetypeIncrement
*/
public void setFiletypeIncrement(Integer filetypeIncrement){
this.filetypeIncrement = filetypeIncrement;
}
/** /**
* 获取 附件类型 (1.示例样表,2.空白表格) * 获取 附件类型 (示例样表.示例样表,空白表格.空白表格)
* @return filetypeList * @return filetypeList
*/ */
public List<Integer> getFiletypeList(){ public List<String> getFiletypeList(){
return this.filetypeList; return this.filetypeList;
} }
/** /**
* 设置 附件类型 (1.示例样表,2.空白表格) * 设置 附件类型 (示例样表.示例样表,空白表格.空白表格)
* @param filetypeList * @param filetypeList
*/ */
public void setFiletypeList(List<Integer> filetypeList){ public void setFiletypeList(List<String> filetypeList){
this.filetypeList = filetypeList; this.filetypeList = filetypeList;
} }
/** /**
* 获取 开始 附件来源 (0.政务网,1.自定义) * 获取 开始 附件来源 (0.政务网,1.自定义)
* @return sourceStart * @return sourceStart
...@@ -512,21 +505,6 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity { ...@@ -512,21 +505,6 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity {
this.updateTimeEnd = updateTimeEnd; this.updateTimeEnd = updateTimeEnd;
} }
/**
* 获取 材料名
* @return materialNameList
*/
public List<String> getMaterialNameList(){
return this.materialNameList;
}
/**
* 设置 材料名
* @param materialNameList
*/
public void setMaterialNameList(List<String> materialNameList){
this.materialNameList = materialNameList;
}
/** /**
* 设置 主键,自增长 * 设置 主键,自增长
* @param id * @param id
...@@ -618,6 +596,44 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity { ...@@ -618,6 +596,44 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity {
} }
/**
* 设置 事项编码
* @param matterCode
*/
public MatterDatumFileQuery matterCode(String matterCode){
setMatterCode(matterCode);
return this;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public MatterDatumFileQuery matterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
return this;
}
/**
* 设置 材料名
* @param materialName
*/
public MatterDatumFileQuery materialName(String materialName){
setMaterialName(materialName);
return this;
}
/**
* 设置 材料名
* @param materialNameList
*/
public MatterDatumFileQuery materialNameList(List<String> materialNameList){
this.materialNameList = materialNameList;
return this;
}
/** /**
* 设置 附件名称 * 设置 附件名称
* @param fileName * @param fileName
...@@ -655,47 +671,40 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity { ...@@ -655,47 +671,40 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity {
return this; return this;
} }
/**
* 设置 附件类型 (1.示例样表,2.空白表格)
* @param filetype
*/
public MatterDatumFileQuery filetype(Integer filetype){
setFiletype(filetype);
return this;
}
/** /**
* 设置 开始 附件类型 (1.示例样表,2.空白表格) * 设置 附件本地下载地址
* @param filetypeStart * @param localFileUrl
*/ */
public MatterDatumFileQuery filetypeStart(Integer filetypeStart){ public MatterDatumFileQuery localFileUrl(String localFileUrl){
this.filetypeStart = filetypeStart; setLocalFileUrl(localFileUrl);
return this; return this;
} }
/** /**
* 设置 结束 附件类型 (1.示例样表,2.空白表格) * 设置 附件本地下载地址
* @param filetypeEnd * @param localFileUrlList
*/ */
public MatterDatumFileQuery filetypeEnd(Integer filetypeEnd){ public MatterDatumFileQuery localFileUrlList(List<String> localFileUrlList){
this.filetypeEnd = filetypeEnd; this.localFileUrlList = localFileUrlList;
return this; return this;
} }
/** /**
* 设置 增加 附件类型 (1.示例样表,2.空白表格) * 设置 附件类型 (示例样表.示例样表,空白表格.空白表格)
* @param filetypeIncrement * @param filetype
*/ */
public MatterDatumFileQuery filetypeIncrement(Integer filetypeIncrement){ public MatterDatumFileQuery filetype(String filetype){
this.filetypeIncrement = filetypeIncrement; setFiletype(filetype);
return this; return this;
} }
/** /**
* 设置 附件类型 (1.示例样表,2.空白表格) * 设置 附件类型 (示例样表.示例样表,空白表格.空白表格)
* @param filetypeList * @param filetypeList
*/ */
public MatterDatumFileQuery filetypeList(List<Integer> filetypeList){ public MatterDatumFileQuery filetypeList(List<String> filetypeList){
this.filetypeList = filetypeList; this.filetypeList = filetypeList;
return this; return this;
} }
...@@ -792,25 +801,6 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity { ...@@ -792,25 +801,6 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity {
} }
/**
* 设置 材料名
* @param materialName
*/
public MatterDatumFileQuery materialName(String materialName){
setMaterialName(materialName);
return this;
}
/**
* 设置 材料名
* @param materialNameList
*/
public MatterDatumFileQuery materialNameList(List<String> materialNameList){
this.materialNameList = materialNameList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
...@@ -7,7 +7,7 @@ import com.mortals.xhx.module.matter.model.MatterDatumEntity; ...@@ -7,7 +7,7 @@ import com.mortals.xhx.module.matter.model.MatterDatumEntity;
* 事项申请材料查询对象 * 事项申请材料查询对象
* *
* @author zxfei * @author zxfei
* @date 2022-01-17 * @date 2022-11-16
*/ */
public class MatterDatumQuery extends MatterDatumEntity { public class MatterDatumQuery extends MatterDatumEntity {
/** 开始 主键,自增长 */ /** 开始 主键,自增长 */
...@@ -34,6 +34,9 @@ public class MatterDatumQuery extends MatterDatumEntity { ...@@ -34,6 +34,9 @@ public class MatterDatumQuery extends MatterDatumEntity {
/** 事项id列表 */ /** 事项id列表 */
private List <Long> matterIdList; private List <Long> matterIdList;
/** 事项编码 */
private List<String> matterCodeList;
/** 事项名称 */ /** 事项名称 */
private List<String> matterNameList; private List<String> matterNameList;
...@@ -272,6 +275,21 @@ public class MatterDatumQuery extends MatterDatumEntity { ...@@ -272,6 +275,21 @@ public class MatterDatumQuery extends MatterDatumEntity {
this.matterIdList = matterIdList; this.matterIdList = matterIdList;
} }
/**
* 获取 事项编码
* @return matterCodeList
*/
public List<String> getMatterCodeList(){
return this.matterCodeList;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public void setMatterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
}
/** /**
* 获取 事项名称 * 获取 事项名称
* @return matterNameList * @return matterNameList
...@@ -889,6 +907,25 @@ public class MatterDatumQuery extends MatterDatumEntity { ...@@ -889,6 +907,25 @@ public class MatterDatumQuery extends MatterDatumEntity {
} }
/**
* 设置 事项编码
* @param matterCode
*/
public MatterDatumQuery matterCode(String matterCode){
setMatterCode(matterCode);
return this;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public MatterDatumQuery matterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
return this;
}
/** /**
* 设置 事项名称 * 设置 事项名称
* @param matterName * @param matterName
......
...@@ -13,7 +13,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterVo; ...@@ -13,7 +13,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterVo;
* 基础事项实体对象 * 基础事项实体对象
* *
* @author zxfei * @author zxfei
* @date 2022-10-13 * @date 2022-11-16
*/ */
public class MatterEntity extends MatterVo { public class MatterEntity extends MatterVo {
...@@ -55,6 +55,10 @@ public class MatterEntity extends MatterVo { ...@@ -55,6 +55,10 @@ public class MatterEntity extends MatterVo {
* 部门编号 * 部门编号
*/ */
private String deptCode; private String deptCode;
/**
* 部门名称
*/
private String deptName;
/** /**
* 行政权力编号 * 行政权力编号
*/ */
...@@ -474,6 +478,24 @@ public class MatterEntity extends MatterVo { ...@@ -474,6 +478,24 @@ public class MatterEntity extends MatterVo {
this.deptCode = deptCode; this.deptCode = deptCode;
} }
/**
* 获取 部门名称
*
* @return String
*/
public String getDeptName() {
return deptName;
}
/**
* 设置 部门名称
*
* @param deptName
*/
public void setDeptName(String deptName) {
this.deptName = deptName;
}
/** /**
* 获取 行政权力编号 * 获取 行政权力编号
* *
...@@ -1616,7 +1638,7 @@ public class MatterEntity extends MatterVo { ...@@ -1616,7 +1638,7 @@ public class MatterEntity extends MatterVo {
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj == "") return false; if (obj == null) return false;
if (obj instanceof MatterEntity) { if (obj instanceof MatterEntity) {
MatterEntity tmp = (MatterEntity) obj; MatterEntity tmp = (MatterEntity) obj;
if (this.getId() == tmp.getId()) { if (this.getId() == tmp.getId()) {
...@@ -1637,6 +1659,7 @@ public class MatterEntity extends MatterVo { ...@@ -1637,6 +1659,7 @@ public class MatterEntity extends MatterVo {
sb.append(",matterNo:").append(getMatterNo()); sb.append(",matterNo:").append(getMatterNo());
sb.append(",areaCode:").append(getAreaCode()); sb.append(",areaCode:").append(getAreaCode());
sb.append(",deptCode:").append(getDeptCode()); sb.append(",deptCode:").append(getDeptCode());
sb.append(",deptName:").append(getDeptName());
sb.append(",powerCode:").append(getPowerCode()); sb.append(",powerCode:").append(getPowerCode());
sb.append(",themeCode:").append(getThemeCode()); sb.append(",themeCode:").append(getThemeCode());
sb.append(",usertypeCode:").append(getUsertypeCode()); sb.append(",usertypeCode:").append(getUsertypeCode());
...@@ -1723,6 +1746,8 @@ public class MatterEntity extends MatterVo { ...@@ -1723,6 +1746,8 @@ public class MatterEntity extends MatterVo {
this.deptCode = ""; this.deptCode = "";
this.deptName = "";
this.powerCode = ""; this.powerCode = "";
this.themeCode = ""; this.themeCode = "";
...@@ -1847,6 +1872,6 @@ public class MatterEntity extends MatterVo { ...@@ -1847,6 +1872,6 @@ public class MatterEntity extends MatterVo {
this.sort = 0; this.sort = 0;
this.source = 1; this.source = 0;
} }
} }
\ No newline at end of file
...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterFlowlimitVo; ...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterFlowlimitVo;
* 事项办理流程实体对象 * 事项办理流程实体对象
* *
* @author zxfei * @author zxfei
* @date 2022-01-12 * @date 2022-11-16
*/ */
public class MatterFlowlimitEntity extends MatterFlowlimitVo { public class MatterFlowlimitEntity extends MatterFlowlimitVo {
...@@ -21,6 +21,10 @@ public class MatterFlowlimitEntity extends MatterFlowlimitVo { ...@@ -21,6 +21,10 @@ public class MatterFlowlimitEntity extends MatterFlowlimitVo {
*/ */
private Long matterId; private Long matterId;
/** /**
* 事项编码
*/
private String matterCode;
/**
* 事项名称 * 事项名称
*/ */
private String matterName; private String matterName;
...@@ -63,6 +67,20 @@ public class MatterFlowlimitEntity extends MatterFlowlimitVo { ...@@ -63,6 +67,20 @@ public class MatterFlowlimitEntity extends MatterFlowlimitVo {
this.matterId = matterId; this.matterId = matterId;
} }
/** /**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/**
* 获取 事项名称 * 获取 事项名称
* @return String * @return String
*/ */
...@@ -169,6 +187,7 @@ public class MatterFlowlimitEntity extends MatterFlowlimitVo { ...@@ -169,6 +187,7 @@ public class MatterFlowlimitEntity extends MatterFlowlimitVo {
public String toString(){ public String toString(){
StringBuilder sb = new StringBuilder(""); StringBuilder sb = new StringBuilder("");
sb.append(",matterId:").append(getMatterId()); sb.append(",matterId:").append(getMatterId());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",matterName:").append(getMatterName()); sb.append(",matterName:").append(getMatterName());
sb.append(",flowName:").append(getFlowName()); sb.append(",flowName:").append(getFlowName());
sb.append(",flowTime:").append(getFlowTime()); sb.append(",flowTime:").append(getFlowTime());
...@@ -182,6 +201,8 @@ public class MatterFlowlimitEntity extends MatterFlowlimitVo { ...@@ -182,6 +201,8 @@ public class MatterFlowlimitEntity extends MatterFlowlimitVo {
this.matterId = 0L; this.matterId = 0L;
this.matterCode = "";
this.matterName = ""; this.matterName = "";
this.flowName = ""; this.flowName = "";
......
...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterFlowlimitEntity; ...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterFlowlimitEntity;
* 事项办理流程查询对象 * 事项办理流程查询对象
* *
* @author zxfei * @author zxfei
* @date 2022-01-12 * @date 2022-11-16
*/ */
public class MatterFlowlimitQuery extends MatterFlowlimitEntity { public class MatterFlowlimitQuery extends MatterFlowlimitEntity {
/** 开始 主键,自增长 */ /** 开始 主键,自增长 */
...@@ -33,6 +33,9 @@ public class MatterFlowlimitQuery extends MatterFlowlimitEntity { ...@@ -33,6 +33,9 @@ public class MatterFlowlimitQuery extends MatterFlowlimitEntity {
/** 事项基础表id列表 */ /** 事项基础表id列表 */
private List <Long> matterIdList; private List <Long> matterIdList;
/** 事项编码 */
private List<String> matterCodeList;
/** 事项名称 */ /** 事项名称 */
private List<String> matterNameList; private List<String> matterNameList;
...@@ -220,6 +223,21 @@ public class MatterFlowlimitQuery extends MatterFlowlimitEntity { ...@@ -220,6 +223,21 @@ public class MatterFlowlimitQuery extends MatterFlowlimitEntity {
this.matterIdList = matterIdList; this.matterIdList = matterIdList;
} }
/**
* 获取 事项编码
* @return matterCodeList
*/
public List<String> getMatterCodeList(){
return this.matterCodeList;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public void setMatterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
}
/** /**
* 获取 事项名称 * 获取 事项名称
* @return matterNameList * @return matterNameList
...@@ -578,6 +596,25 @@ public class MatterFlowlimitQuery extends MatterFlowlimitEntity { ...@@ -578,6 +596,25 @@ public class MatterFlowlimitQuery extends MatterFlowlimitEntity {
} }
/**
* 设置 事项编码
* @param matterCode
*/
public MatterFlowlimitQuery matterCode(String matterCode){
setMatterCode(matterCode);
return this;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public MatterFlowlimitQuery matterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
return this;
}
/** /**
* 设置 事项名称 * 设置 事项名称
* @param matterName * @param matterName
......
...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterIntermediaryVo; ...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterIntermediaryVo;
* 事项中介服务实体对象 * 事项中介服务实体对象
* *
* @author zxfei * @author zxfei
* @date 2022-01-12 * @date 2022-11-16
*/ */
public class MatterIntermediaryEntity extends MatterIntermediaryVo { public class MatterIntermediaryEntity extends MatterIntermediaryVo {
...@@ -21,6 +21,10 @@ public class MatterIntermediaryEntity extends MatterIntermediaryVo { ...@@ -21,6 +21,10 @@ public class MatterIntermediaryEntity extends MatterIntermediaryVo {
*/ */
private Long matterId; private Long matterId;
/** /**
* 事项编码
*/
private String matterCode;
/**
* 事项名称 * 事项名称
*/ */
private String matterName; private String matterName;
...@@ -37,7 +41,7 @@ public class MatterIntermediaryEntity extends MatterIntermediaryVo { ...@@ -37,7 +41,7 @@ public class MatterIntermediaryEntity extends MatterIntermediaryVo {
*/ */
private String intermediaryRequestTime; private String intermediaryRequestTime;
/** /**
* 备注 * 内容
*/ */
private String remark; private String remark;
/** /**
...@@ -63,6 +67,20 @@ public class MatterIntermediaryEntity extends MatterIntermediaryVo { ...@@ -63,6 +67,20 @@ public class MatterIntermediaryEntity extends MatterIntermediaryVo {
this.matterId = matterId; this.matterId = matterId;
} }
/** /**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/**
* 获取 事项名称 * 获取 事项名称
* @return String * @return String
*/ */
...@@ -119,14 +137,14 @@ public class MatterIntermediaryEntity extends MatterIntermediaryVo { ...@@ -119,14 +137,14 @@ public class MatterIntermediaryEntity extends MatterIntermediaryVo {
this.intermediaryRequestTime = intermediaryRequestTime; this.intermediaryRequestTime = intermediaryRequestTime;
} }
/** /**
* 获取 备注 * 获取 内容
* @return String * @return String
*/ */
public String getRemark(){ public String getRemark(){
return remark; return remark;
} }
/** /**
* 设置 备注 * 设置 内容
* @param remark * @param remark
*/ */
public void setRemark(String remark){ public void setRemark(String remark){
...@@ -169,6 +187,7 @@ public class MatterIntermediaryEntity extends MatterIntermediaryVo { ...@@ -169,6 +187,7 @@ public class MatterIntermediaryEntity extends MatterIntermediaryVo {
public String toString(){ public String toString(){
StringBuilder sb = new StringBuilder(""); StringBuilder sb = new StringBuilder("");
sb.append(",matterId:").append(getMatterId()); sb.append(",matterId:").append(getMatterId());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",matterName:").append(getMatterName()); sb.append(",matterName:").append(getMatterName());
sb.append(",title:").append(getTitle()); sb.append(",title:").append(getTitle());
sb.append(",intermediaryRequest:").append(getIntermediaryRequest()); sb.append(",intermediaryRequest:").append(getIntermediaryRequest());
...@@ -182,15 +201,17 @@ public class MatterIntermediaryEntity extends MatterIntermediaryVo { ...@@ -182,15 +201,17 @@ public class MatterIntermediaryEntity extends MatterIntermediaryVo {
this.matterId = 0L; this.matterId = 0L;
this.matterName = null; this.matterCode = "";
this.matterName = "";
this.title = null; this.title = "";
this.intermediaryRequest = null; this.intermediaryRequest = "";
this.intermediaryRequestTime = null; this.intermediaryRequestTime = "";
this.remark = null; this.remark = "";
this.source = 0; this.source = 0;
} }
......
...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterIntermediaryEntity; ...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterIntermediaryEntity;
* 事项中介服务查询对象 * 事项中介服务查询对象
* *
* @author zxfei * @author zxfei
* @date 2022-01-12 * @date 2022-11-16
*/ */
public class MatterIntermediaryQuery extends MatterIntermediaryEntity { public class MatterIntermediaryQuery extends MatterIntermediaryEntity {
/** 开始 主键,自增长 */ /** 开始 主键,自增长 */
...@@ -33,6 +33,9 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity { ...@@ -33,6 +33,9 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity {
/** 事项matter id列表 */ /** 事项matter id列表 */
private List <Long> matterIdList; private List <Long> matterIdList;
/** 事项编码 */
private List<String> matterCodeList;
/** 事项名称 */ /** 事项名称 */
private List<String> matterNameList; private List<String> matterNameList;
...@@ -45,7 +48,7 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity { ...@@ -45,7 +48,7 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity {
/** 服务时限 */ /** 服务时限 */
private List<String> intermediaryRequestTimeList; private List<String> intermediaryRequestTimeList;
/** 备注 */ /** 内容 */
private List<String> remarkList; private List<String> remarkList;
/** 开始 事项来源,(0.政务网,1.自定义) */ /** 开始 事项来源,(0.政务网,1.自定义) */
...@@ -220,6 +223,21 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity { ...@@ -220,6 +223,21 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity {
this.matterIdList = matterIdList; this.matterIdList = matterIdList;
} }
/**
* 获取 事项编码
* @return matterCodeList
*/
public List<String> getMatterCodeList(){
return this.matterCodeList;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public void setMatterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
}
/** /**
* 获取 事项名称 * 获取 事项名称
* @return matterNameList * @return matterNameList
...@@ -281,7 +299,7 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity { ...@@ -281,7 +299,7 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity {
this.intermediaryRequestTimeList = intermediaryRequestTimeList; this.intermediaryRequestTimeList = intermediaryRequestTimeList;
} }
/** /**
* 获取 备注 * 获取 内容
* @return remarkList * @return remarkList
*/ */
public List<String> getRemarkList(){ public List<String> getRemarkList(){
...@@ -289,7 +307,7 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity { ...@@ -289,7 +307,7 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity {
} }
/** /**
* 设置 备注 * 设置 内容
* @param remarkList * @param remarkList
*/ */
public void setRemarkList(List<String> remarkList){ public void setRemarkList(List<String> remarkList){
...@@ -578,6 +596,25 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity { ...@@ -578,6 +596,25 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity {
} }
/**
* 设置 事项编码
* @param matterCode
*/
public MatterIntermediaryQuery matterCode(String matterCode){
setMatterCode(matterCode);
return this;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public MatterIntermediaryQuery matterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
return this;
}
/** /**
* 设置 事项名称 * 设置 事项名称
* @param matterName * @param matterName
...@@ -655,7 +692,7 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity { ...@@ -655,7 +692,7 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity {
/** /**
* 设置 备注 * 设置 内容
* @param remark * @param remark
*/ */
public MatterIntermediaryQuery remark(String remark){ public MatterIntermediaryQuery remark(String remark){
...@@ -664,7 +701,7 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity { ...@@ -664,7 +701,7 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity {
} }
/** /**
* 设置 备注 * 设置 内容
* @param remarkList * @param remarkList
*/ */
public MatterIntermediaryQuery remarkList(List<String> remarkList){ public MatterIntermediaryQuery remarkList(List<String> remarkList){
......
...@@ -7,7 +7,7 @@ import com.mortals.xhx.module.matter.model.MatterEntity; ...@@ -7,7 +7,7 @@ import com.mortals.xhx.module.matter.model.MatterEntity;
* 基础事项查询对象 * 基础事项查询对象
* *
* @author zxfei * @author zxfei
* @date 2022-10-13 * @date 2022-11-16
*/ */
public class MatterQuery extends MatterEntity { public class MatterQuery extends MatterEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
...@@ -58,6 +58,9 @@ public class MatterQuery extends MatterEntity { ...@@ -58,6 +58,9 @@ public class MatterQuery extends MatterEntity {
/** 部门编号 */ /** 部门编号 */
private List<String> deptCodeList; private List<String> deptCodeList;
/** 部门名称 */
private List<String> deptNameList;
/** 行政权力编号 */ /** 行政权力编号 */
private List<String> powerCodeList; private List<String> powerCodeList;
...@@ -578,6 +581,21 @@ public class MatterQuery extends MatterEntity { ...@@ -578,6 +581,21 @@ public class MatterQuery extends MatterEntity {
public void setDeptCodeList(List<String> deptCodeList){ public void setDeptCodeList(List<String> deptCodeList){
this.deptCodeList = deptCodeList; this.deptCodeList = deptCodeList;
} }
/**
* 获取 部门名称
* @return deptNameList
*/
public List<String> getDeptNameList(){
return this.deptNameList;
}
/**
* 设置 部门名称
* @param deptNameList
*/
public void setDeptNameList(List<String> deptNameList){
this.deptNameList = deptNameList;
}
/** /**
* 获取 行政权力编号 * 获取 行政权力编号
* @return powerCodeList * @return powerCodeList
...@@ -2173,6 +2191,25 @@ public class MatterQuery extends MatterEntity { ...@@ -2173,6 +2191,25 @@ public class MatterQuery extends MatterEntity {
} }
/**
* 设置 部门名称
* @param deptName
*/
public MatterQuery deptName(String deptName){
setDeptName(deptName);
return this;
}
/**
* 设置 部门名称
* @param deptNameList
*/
public MatterQuery deptNameList(List<String> deptNameList){
this.deptNameList = deptNameList;
return this;
}
/** /**
* 设置 行政权力编号 * 设置 行政权力编号
* @param powerCode * @param powerCode
......
...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterQuestionVo; ...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterQuestionVo;
* 事项常见问题实体对象 * 事项常见问题实体对象
* *
* @author zxfei * @author zxfei
* @date 2022-01-12 * @date 2022-11-16
*/ */
public class MatterQuestionEntity extends MatterQuestionVo { public class MatterQuestionEntity extends MatterQuestionVo {
...@@ -21,6 +21,10 @@ public class MatterQuestionEntity extends MatterQuestionVo { ...@@ -21,6 +21,10 @@ public class MatterQuestionEntity extends MatterQuestionVo {
*/ */
private Long matterId; private Long matterId;
/** /**
* 事项编码
*/
private String matterCode;
/**
* 事项名称 * 事项名称
*/ */
private String matterName; private String matterName;
...@@ -29,7 +33,7 @@ public class MatterQuestionEntity extends MatterQuestionVo { ...@@ -29,7 +33,7 @@ public class MatterQuestionEntity extends MatterQuestionVo {
*/ */
private String question; private String question;
/** /**
* 回答 * 常见问题
*/ */
private String answer; private String answer;
/** /**
...@@ -55,6 +59,20 @@ public class MatterQuestionEntity extends MatterQuestionVo { ...@@ -55,6 +59,20 @@ public class MatterQuestionEntity extends MatterQuestionVo {
this.matterId = matterId; this.matterId = matterId;
} }
/** /**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/**
* 获取 事项名称 * 获取 事项名称
* @return String * @return String
*/ */
...@@ -83,14 +101,14 @@ public class MatterQuestionEntity extends MatterQuestionVo { ...@@ -83,14 +101,14 @@ public class MatterQuestionEntity extends MatterQuestionVo {
this.question = question; this.question = question;
} }
/** /**
* 获取 回答 * 获取 常见问题
* @return String * @return String
*/ */
public String getAnswer(){ public String getAnswer(){
return answer; return answer;
} }
/** /**
* 设置 回答 * 设置 常见问题
* @param answer * @param answer
*/ */
public void setAnswer(String answer){ public void setAnswer(String answer){
...@@ -133,6 +151,7 @@ public class MatterQuestionEntity extends MatterQuestionVo { ...@@ -133,6 +151,7 @@ public class MatterQuestionEntity extends MatterQuestionVo {
public String toString(){ public String toString(){
StringBuilder sb = new StringBuilder(""); StringBuilder sb = new StringBuilder("");
sb.append(",matterId:").append(getMatterId()); sb.append(",matterId:").append(getMatterId());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",matterName:").append(getMatterName()); sb.append(",matterName:").append(getMatterName());
sb.append(",question:").append(getQuestion()); sb.append(",question:").append(getQuestion());
sb.append(",answer:").append(getAnswer()); sb.append(",answer:").append(getAnswer());
...@@ -144,6 +163,8 @@ public class MatterQuestionEntity extends MatterQuestionVo { ...@@ -144,6 +163,8 @@ public class MatterQuestionEntity extends MatterQuestionVo {
this.matterId = 0L; this.matterId = 0L;
this.matterCode = "";
this.matterName = ""; this.matterName = "";
this.question = ""; this.question = "";
......
...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterQuestionEntity; ...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterQuestionEntity;
* 事项常见问题查询对象 * 事项常见问题查询对象
* *
* @author zxfei * @author zxfei
* @date 2022-01-12 * @date 2022-11-16
*/ */
public class MatterQuestionQuery extends MatterQuestionEntity { public class MatterQuestionQuery extends MatterQuestionEntity {
/** 开始 主键,自增长 */ /** 开始 主键,自增长 */
...@@ -33,13 +33,16 @@ public class MatterQuestionQuery extends MatterQuestionEntity { ...@@ -33,13 +33,16 @@ public class MatterQuestionQuery extends MatterQuestionEntity {
/** 事项基础表matter id列表 */ /** 事项基础表matter id列表 */
private List <Long> matterIdList; private List <Long> matterIdList;
/** 事项编码 */
private List<String> matterCodeList;
/** 事项名称 */ /** 事项名称 */
private List<String> matterNameList; private List<String> matterNameList;
/** 问题 */ /** 问题 */
private List<String> questionList; private List<String> questionList;
/** 回答 */ /** 常见问题 */
private List<String> answerList; private List<String> answerList;
/** 开始 事项来源,(0.政务网,1.自定义) */ /** 开始 事项来源,(0.政务网,1.自定义) */
...@@ -214,6 +217,21 @@ public class MatterQuestionQuery extends MatterQuestionEntity { ...@@ -214,6 +217,21 @@ public class MatterQuestionQuery extends MatterQuestionEntity {
this.matterIdList = matterIdList; this.matterIdList = matterIdList;
} }
/**
* 获取 事项编码
* @return matterCodeList
*/
public List<String> getMatterCodeList(){
return this.matterCodeList;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public void setMatterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
}
/** /**
* 获取 事项名称 * 获取 事项名称
* @return matterNameList * @return matterNameList
...@@ -245,7 +263,7 @@ public class MatterQuestionQuery extends MatterQuestionEntity { ...@@ -245,7 +263,7 @@ public class MatterQuestionQuery extends MatterQuestionEntity {
this.questionList = questionList; this.questionList = questionList;
} }
/** /**
* 获取 回答 * 获取 常见问题
* @return answerList * @return answerList
*/ */
public List<String> getAnswerList(){ public List<String> getAnswerList(){
...@@ -253,7 +271,7 @@ public class MatterQuestionQuery extends MatterQuestionEntity { ...@@ -253,7 +271,7 @@ public class MatterQuestionQuery extends MatterQuestionEntity {
} }
/** /**
* 设置 回答 * 设置 常见问题
* @param answerList * @param answerList
*/ */
public void setAnswerList(List<String> answerList){ public void setAnswerList(List<String> answerList){
...@@ -542,6 +560,25 @@ public class MatterQuestionQuery extends MatterQuestionEntity { ...@@ -542,6 +560,25 @@ public class MatterQuestionQuery extends MatterQuestionEntity {
} }
/**
* 设置 事项编码
* @param matterCode
*/
public MatterQuestionQuery matterCode(String matterCode){
setMatterCode(matterCode);
return this;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public MatterQuestionQuery matterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
return this;
}
/** /**
* 设置 事项名称 * 设置 事项名称
* @param matterName * @param matterName
...@@ -581,7 +618,7 @@ public class MatterQuestionQuery extends MatterQuestionEntity { ...@@ -581,7 +618,7 @@ public class MatterQuestionQuery extends MatterQuestionEntity {
/** /**
* 设置 回答 * 设置 常见问题
* @param answer * @param answer
*/ */
public MatterQuestionQuery answer(String answer){ public MatterQuestionQuery answer(String answer){
...@@ -590,7 +627,7 @@ public class MatterQuestionQuery extends MatterQuestionEntity { ...@@ -590,7 +627,7 @@ public class MatterQuestionQuery extends MatterQuestionEntity {
} }
/** /**
* 设置 回答 * 设置 常见问题
* @param answerList * @param answerList
*/ */
public MatterQuestionQuery answerList(List<String> answerList){ public MatterQuestionQuery answerList(List<String> answerList){
......
...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterSetbaseVo; ...@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterSetbaseVo;
* 事项设定依据实体对象 * 事项设定依据实体对象
* *
* @author zxfei * @author zxfei
* @date 2022-01-12 * @date 2022-11-16
*/ */
public class MatterSetbaseEntity extends MatterSetbaseVo { public class MatterSetbaseEntity extends MatterSetbaseVo {
...@@ -21,6 +21,10 @@ public class MatterSetbaseEntity extends MatterSetbaseVo { ...@@ -21,6 +21,10 @@ public class MatterSetbaseEntity extends MatterSetbaseVo {
*/ */
private Long matterId; private Long matterId;
/** /**
* 事项编码
*/
private String matterCode;
/**
* 事项名称 * 事项名称
*/ */
private String matterName; private String matterName;
...@@ -63,6 +67,20 @@ public class MatterSetbaseEntity extends MatterSetbaseVo { ...@@ -63,6 +67,20 @@ public class MatterSetbaseEntity extends MatterSetbaseVo {
this.matterId = matterId; this.matterId = matterId;
} }
/** /**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/**
* 获取 事项名称 * 获取 事项名称
* @return String * @return String
*/ */
...@@ -169,6 +187,7 @@ public class MatterSetbaseEntity extends MatterSetbaseVo { ...@@ -169,6 +187,7 @@ public class MatterSetbaseEntity extends MatterSetbaseVo {
public String toString(){ public String toString(){
StringBuilder sb = new StringBuilder(""); StringBuilder sb = new StringBuilder("");
sb.append(",matterId:").append(getMatterId()); sb.append(",matterId:").append(getMatterId());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",matterName:").append(getMatterName()); sb.append(",matterName:").append(getMatterName());
sb.append(",policyName:").append(getPolicyName()); sb.append(",policyName:").append(getPolicyName());
sb.append(",policyType:").append(getPolicyType()); sb.append(",policyType:").append(getPolicyType());
...@@ -182,6 +201,8 @@ public class MatterSetbaseEntity extends MatterSetbaseVo { ...@@ -182,6 +201,8 @@ public class MatterSetbaseEntity extends MatterSetbaseVo {
this.matterId = 0L; this.matterId = 0L;
this.matterCode = "";
this.matterName = ""; this.matterName = "";
this.policyName = ""; this.policyName = "";
......
...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterSetbaseEntity; ...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterSetbaseEntity;
* 事项设定依据查询对象 * 事项设定依据查询对象
* *
* @author zxfei * @author zxfei
* @date 2022-01-12 * @date 2022-11-16
*/ */
public class MatterSetbaseQuery extends MatterSetbaseEntity { public class MatterSetbaseQuery extends MatterSetbaseEntity {
/** 开始 主键,自增长 */ /** 开始 主键,自增长 */
...@@ -33,6 +33,9 @@ public class MatterSetbaseQuery extends MatterSetbaseEntity { ...@@ -33,6 +33,9 @@ public class MatterSetbaseQuery extends MatterSetbaseEntity {
/** 事项matter id列表 */ /** 事项matter id列表 */
private List <Long> matterIdList; private List <Long> matterIdList;
/** 事项编码 */
private List<String> matterCodeList;
/** 事项名称 */ /** 事项名称 */
private List<String> matterNameList; private List<String> matterNameList;
...@@ -220,6 +223,21 @@ public class MatterSetbaseQuery extends MatterSetbaseEntity { ...@@ -220,6 +223,21 @@ public class MatterSetbaseQuery extends MatterSetbaseEntity {
this.matterIdList = matterIdList; this.matterIdList = matterIdList;
} }
/**
* 获取 事项编码
* @return matterCodeList
*/
public List<String> getMatterCodeList(){
return this.matterCodeList;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public void setMatterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
}
/** /**
* 获取 事项名称 * 获取 事项名称
* @return matterNameList * @return matterNameList
...@@ -578,6 +596,25 @@ public class MatterSetbaseQuery extends MatterSetbaseEntity { ...@@ -578,6 +596,25 @@ public class MatterSetbaseQuery extends MatterSetbaseEntity {
} }
/**
* 设置 事项编码
* @param matterCode
*/
public MatterSetbaseQuery matterCode(String matterCode){
setMatterCode(matterCode);
return this;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public MatterSetbaseQuery matterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
return this;
}
/** /**
* 设置 事项名称 * 设置 事项名称
* @param matterName * @param matterName
......
...@@ -4,6 +4,7 @@ import com.mortals.framework.model.Context; ...@@ -4,6 +4,7 @@ import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDCacheService; import com.mortals.framework.service.ICRUDCacheService;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.matter.model.MatterEntity; import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.site.model.SiteMatterEntity;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import java.util.Map; import java.util.Map;
...@@ -56,4 +57,13 @@ public interface MatterService extends ICRUDCacheService<MatterEntity,Long> { ...@@ -56,4 +57,13 @@ public interface MatterService extends ICRUDCacheService<MatterEntity,Long> {
Rest<String> buildMatterDetail(MatterEntity matterEntity, Context context); Rest<String> buildMatterDetail(MatterEntity matterEntity, Context context);
/**
* 添加业务到站点
* @param matterEntity
* @param siteId
* @param context
*/
Rest<SiteMatterEntity> switchMatterToSiteMatterr(MatterEntity matterEntity, Long siteId, Context context);
} }
\ No newline at end of file
...@@ -2,8 +2,6 @@ package com.mortals.xhx.module.matter.service.impl; ...@@ -2,8 +2,6 @@ package com.mortals.xhx.module.matter.service.impl;
import cn.hutool.core.util.PageUtil; import cn.hutool.core.util.PageUtil;
import cn.hutool.core.util.ReflectUtil; import cn.hutool.core.util.ReflectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpUtil;
import cn.hutool.setting.Setting; import cn.hutool.setting.Setting;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
...@@ -15,8 +13,13 @@ import com.mortals.framework.model.PageInfo; ...@@ -15,8 +13,13 @@ import com.mortals.framework.model.PageInfo;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import com.mortals.framework.util.DataUtil; import com.mortals.framework.util.DataUtil;
import com.mortals.xhx.base.framework.config.InterceptorConfig; import com.mortals.xhx.base.framework.config.InterceptorConfig;
import com.mortals.xhx.common.code.FiletypeEnum;
import com.mortals.xhx.common.code.SourceEnum; import com.mortals.xhx.common.code.SourceEnum;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.utils.MatterDetailHtmlParseUtil; import com.mortals.xhx.common.utils.MatterDetailHtmlParseUtil;
import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.matter.dao.MatterDao; import com.mortals.xhx.module.matter.dao.MatterDao;
import com.mortals.xhx.module.matter.model.*; import com.mortals.xhx.module.matter.model.*;
import com.mortals.xhx.module.matter.service.*; import com.mortals.xhx.module.matter.service.*;
...@@ -24,7 +27,6 @@ import com.mortals.xhx.module.matters.model.MattersDetailEntity; ...@@ -24,7 +27,6 @@ import com.mortals.xhx.module.matters.model.MattersDetailEntity;
import com.mortals.xhx.module.matters.model.MattersDetailQuery; import com.mortals.xhx.module.matters.model.MattersDetailQuery;
import com.mortals.xhx.module.matters.model.MattersEntity; import com.mortals.xhx.module.matters.model.MattersEntity;
import com.mortals.xhx.module.matters.model.MattersQuery; import com.mortals.xhx.module.matters.model.MattersQuery;
import com.mortals.xhx.module.matters.service.MattersAreaService;
import com.mortals.xhx.module.matters.service.MattersDetailService; import com.mortals.xhx.module.matters.service.MattersDetailService;
import com.mortals.xhx.module.matters.service.MattersService; import com.mortals.xhx.module.matters.service.MattersService;
import com.mortals.xhx.module.site.model.SiteEntity; import com.mortals.xhx.module.site.model.SiteEntity;
...@@ -32,25 +34,14 @@ import com.mortals.xhx.module.site.model.SiteMatterEntity; ...@@ -32,25 +34,14 @@ import com.mortals.xhx.module.site.model.SiteMatterEntity;
import com.mortals.xhx.module.site.model.SiteMatterQuery; import com.mortals.xhx.module.site.model.SiteMatterQuery;
import com.mortals.xhx.module.site.service.SiteMatterService; import com.mortals.xhx.module.site.service.SiteMatterService;
import com.mortals.xhx.module.site.service.SiteService; import com.mortals.xhx.module.site.service.SiteService;
import lombok.extern.slf4j.Slf4j; import org.apache.commons.logging.Log;
import org.htmlcleaner.CleanerProperties; import org.apache.commons.logging.LogFactory;
import org.htmlcleaner.DomSerializer;
import org.htmlcleaner.HtmlCleaner;
import org.htmlcleaner.TagNode;
import org.jsoup.Jsoup; import org.jsoup.Jsoup;
import org.springframework.beans.BeanUtils; import org.jsoup.nodes.Document;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import java.math.BigInteger;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -62,8 +53,8 @@ import java.util.stream.Collectors; ...@@ -62,8 +53,8 @@ import java.util.stream.Collectors;
* @date 2022-01-12 * @date 2022-01-12
*/ */
@Service("matterService") @Service("matterService")
@Slf4j
public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, MatterEntity, Long> implements MatterService { public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, MatterEntity, Long> implements MatterService {
protected Log log = LogFactory.getLog(this.getClass());
@Autowired @Autowired
private SiteMatterService siteMatterService; private SiteMatterService siteMatterService;
@Autowired @Autowired
...@@ -72,9 +63,6 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -72,9 +63,6 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
private MattersService mattersService; private MattersService mattersService;
@Autowired @Autowired
private InterceptorConfig interceptorConfig; private InterceptorConfig interceptorConfig;
@Autowired
private MattersAreaService mattersAreaService;
@Autowired @Autowired
private MattersDetailService mattersDetailService; private MattersDetailService mattersDetailService;
@Autowired @Autowired
...@@ -93,6 +81,8 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -93,6 +81,8 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
private MatterDatumFileService matterDatumFileService; private MatterDatumFileService matterDatumFileService;
@Autowired @Autowired
private MatterChargesService matterChargesService; private MatterChargesService matterChargesService;
@Autowired
private DeptService deptService;
@Override @Override
...@@ -135,19 +125,23 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -135,19 +125,23 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
List<Long> matterIdList = Arrays.asList(matterIds.split(",")).stream().map(Long::parseLong).collect(Collectors.toList()); List<Long> matterIdList = Arrays.asList(matterIds.split(",")).stream().map(Long::parseLong).collect(Collectors.toList());
MatterQuery matterQuery = new MatterQuery(); MatterQuery matterQuery = new MatterQuery();
matterQuery.setIdList(matterIdList); matterQuery.setIdList(matterIdList);
List<MatterEntity> matterEntities = this.find(matterQuery); List<MatterEntity> matterEntities = this.find(matterQuery);
int success = 0; int success = 0;
int fail = 0; int fail = 0;
List<SiteMatterEntity> siteMatterEntities = new ArrayList<>();
for (MatterEntity matterEntity : matterEntities) { for (MatterEntity matterEntity : matterEntities) {
Boolean bool = updateOrSave(matterEntity, siteId, context); SiteMatterEntity siteMatterEntity = updateOrSave(matterEntity, siteId, context);
if (bool) { if (!ObjectUtils.isEmpty(siteMatterEntity)) {
siteMatterEntities.add(siteMatterEntity);
success++; success++;
} else { } else {
fail++; fail++;
} }
} }
if (!ObjectUtils.isEmpty(siteMatterEntities)) {
siteMatterService.save(siteMatterEntities, context);
}
String msg = "当前加入事项已存在!"; String msg = "当前加入事项已存在!";
if (matterIdList.size() == 1) { if (matterIdList.size() == 1) {
if (success > 0) { if (success > 0) {
...@@ -165,21 +159,42 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -165,21 +159,42 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
return Rest.ok(msg); return Rest.ok(msg);
} }
private Boolean updateOrSave(MatterEntity item, Long siteId, Context context) { private SiteMatterEntity updateOrSave(MatterEntity item, Long siteId, Context context) {
SiteMatterEntity siteMatterEntity = siteMatterService.selectOne(new SiteMatterQuery().siteId(siteId).matterId(item.getId())); SiteMatterEntity siteMatterEntity = siteMatterService.selectOne(new SiteMatterQuery().siteId(siteId).matterId(item.getId()));
if (ObjectUtils.isEmpty(siteMatterEntity)) { if (ObjectUtils.isEmpty(siteMatterEntity)) {
siteMatterEntity = new SiteMatterEntity(); Rest<SiteMatterEntity> rest = switchMatterToSiteMatterr(item, siteId, context);
SiteEntity siteEntity = siteService.get(siteId); if (rest.getCode() == YesNoEnum.YES.getValue()) {
return rest.getData();
}
}
return null;
}
@Override
public Rest<SiteMatterEntity> switchMatterToSiteMatterr(MatterEntity item, Long siteId, Context context) {
try {
DeptEntity deptEntity = deptService.getExtCache(item.getDeptCode());
SiteMatterEntity siteMatterEntity = new SiteMatterEntity();
SiteEntity siteEntity = siteService.getCache(siteId.toString());
//SiteEntity siteEntity = siteService.get(siteId);
siteMatterEntity.setSiteId(siteEntity.getId()); siteMatterEntity.setSiteId(siteEntity.getId());
siteMatterEntity.setSiteName(siteEntity.getSiteName()); siteMatterEntity.setSiteName(siteEntity.getSiteName());
siteMatterEntity.setMatterId(item.getId()); siteMatterEntity.setMatterId(item.getId());
siteMatterEntity.setMatterCode(item.getMatterNo());
siteMatterEntity.setMatterName(item.getMatterName()); siteMatterEntity.setMatterName(item.getMatterName());
siteMatterEntity.setDeptCode(item.getDeptCode());
siteMatterEntity.setSource(item.getSource());
siteMatterEntity.setEventTypeShow(item.getEventTypeShow());
siteMatterEntity.setDeptName(deptEntity == null ? "" : deptEntity.getName());
siteMatterEntity.setDeptId(deptEntity == null ? -1L : deptEntity.getId());
siteMatterEntity.setCreateUserId(context == null ? 1L : context.getUser() == null ? 1L : context.getUser().getId()); siteMatterEntity.setCreateUserId(context == null ? 1L : context.getUser() == null ? 1L : context.getUser().getId());
siteMatterEntity.setCreateTime(new Date()); siteMatterEntity.setCreateTime(new Date());
siteMatterService.save(siteMatterEntity, context); return Rest.ok(siteMatterEntity);
return true;
} catch (Exception e) {
log.error("转换异常", e);
return Rest.fail(e.getMessage());
} }
return false;
} }
...@@ -381,7 +396,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -381,7 +396,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
fileEntity.setDatumId(datumEntity.getId()); fileEntity.setDatumId(datumEntity.getId());
fileEntity.setMaterialName(datumEntity.getMaterialName()); fileEntity.setMaterialName(datumEntity.getMaterialName());
fileEntity.setSource(SourceEnum.政务网.getValue()); fileEntity.setSource(SourceEnum.政务网.getValue());
fileEntity.setFiletype(1); fileEntity.setFiletype(FiletypeEnum.空白表格.getValue());
jsonArrayone.getJSONObject(j).entrySet().stream().peek(m -> { jsonArrayone.getJSONObject(j).entrySet().stream().peek(m -> {
fileEntity.setFileName(m.getKey()); fileEntity.setFileName(m.getKey());
fileEntity.setFileUrl(m.getValue().toString()); fileEntity.setFileUrl(m.getValue().toString());
...@@ -402,7 +417,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -402,7 +417,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
fileEntity.setDatumId(datumEntity.getId()); fileEntity.setDatumId(datumEntity.getId());
fileEntity.setMaterialName(datumEntity.getMaterialName()); fileEntity.setMaterialName(datumEntity.getMaterialName());
fileEntity.setSource(SourceEnum.政务网.getValue()); fileEntity.setSource(SourceEnum.政务网.getValue());
fileEntity.setFiletype(2); fileEntity.setFiletype(FiletypeEnum.空白表格.getValue());
jsonArraytwo.getJSONObject(j).entrySet().stream().peek(m -> { jsonArraytwo.getJSONObject(j).entrySet().stream().peek(m -> {
fileEntity.setFileName(m.getKey()); fileEntity.setFileName(m.getKey());
fileEntity.setFileUrl(m.getValue().toString()); fileEntity.setFileUrl(m.getValue().toString());
...@@ -895,13 +910,11 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -895,13 +910,11 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
//根据事项url 获取事项详细信息,构建相关详细信息 //根据事项url 获取事项详细信息,构建相关详细信息
String html = null; String html = null;
try { try {
html = Jsoup.connect(matterEntity.getUrl()).get().body().html(); Document dom = Jsoup.connect(matterEntity.getUrl()).get();
// html = Jsoup.connect(matterEntity.getUrl()).get().body().html();
// html = HttpUtil.get(matterEntity.getUrl()); // html = HttpUtil.get(matterEntity.getUrl());
//System.out.println(html); //System.out.println(html);
HtmlCleaner hc = new HtmlCleaner(); // log.info("build detail:" + matterEntity.getMatterNo());
TagNode tn = hc.clean(html);
Document dom = new DomSerializer(new CleanerProperties()).createDOM(tn);
//设置基本属性值 //设置基本属性值
Setting baseInfoSetting = interceptorConfig.getBaseInfoSetting(); Setting baseInfoSetting = interceptorConfig.getBaseInfoSetting();
Setting sqclInfoSetting = interceptorConfig.getSqclInfoSetting(); Setting sqclInfoSetting = interceptorConfig.getSqclInfoSetting();
...@@ -934,16 +947,17 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -934,16 +947,17 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
matterEntity.setHaveGetMatterInfo("true"); matterEntity.setHaveGetMatterInfo("true");
} catch (Exception e) { } catch (Exception e) {
log.error("获取详细异常! id:{},matterCode:{}", matterEntity.getId(), matterEntity.getMatterNo()); log.error(String.format("获取详细异常! id:%s,matterCode:%s,url:%s", matterEntity.getId(), matterEntity.getMatterNo(), matterEntity.getUrl()), e);
return Rest.fail("更新事项失败!" + e.getMessage()); return Rest.fail("更新事项失败!" + e.getMessage());
} }
return Rest.ok("更新详细成功!"); return Rest.ok("更新详细成功!");
} }
private void saveCjwtInfo(MatterEntity matterEntity, Context context, Document dom) { private void saveCjwtInfo(MatterEntity matterEntity, Context context, Document dom) {
matterQuestionService.deleteByMatterId(matterEntity.getId(), context); matterQuestionService.deleteByMatterId(matterEntity.getId(), context);
List<Map<String, Object>> cjwtMapList = MatterDetailHtmlParseUtil.getCjwtMapByHtml(dom); List<Map<String, Object>> cjwtMapList = MatterDetailHtmlParseUtil.getCjwtMapByHtml(dom);
List<MatterQuestionEntity> questionEntityList =new ArrayList<>(); List<MatterQuestionEntity> questionEntityList = new ArrayList<>();
for (Map<String, Object> cjwtMap : cjwtMapList) { for (Map<String, Object> cjwtMap : cjwtMapList) {
List<MatterQuestionEntity> collect = cjwtMap.entrySet().stream().map(question -> { List<MatterQuestionEntity> collect = cjwtMap.entrySet().stream().map(question -> {
MatterQuestionEntity questionEntity = new MatterQuestionEntity(); MatterQuestionEntity questionEntity = new MatterQuestionEntity();
...@@ -951,6 +965,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -951,6 +965,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
questionEntity.setQuestion(question.getKey()); questionEntity.setQuestion(question.getKey());
questionEntity.setAnswer(question.getValue().toString()); questionEntity.setAnswer(question.getValue().toString());
questionEntity.setMatterId(matterEntity.getId()); questionEntity.setMatterId(matterEntity.getId());
questionEntity.setMatterCode(matterEntity.getMatterNo());
questionEntity.setMatterName(matterEntity.getMatterName()); questionEntity.setMatterName(matterEntity.getMatterName());
questionEntity.setSource(SourceEnum.政务网.getValue()); questionEntity.setSource(SourceEnum.政务网.getValue());
questionEntity.setCreateTime(new Date()); questionEntity.setCreateTime(new Date());
...@@ -970,6 +985,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -970,6 +985,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
MatterIntermediaryEntity matterIntermediaryEntity = new MatterIntermediaryEntity(); MatterIntermediaryEntity matterIntermediaryEntity = new MatterIntermediaryEntity();
matterIntermediaryEntity.initAttrValue(); matterIntermediaryEntity.initAttrValue();
matterIntermediaryEntity.setMatterId(matterEntity.getId()); matterIntermediaryEntity.setMatterId(matterEntity.getId());
matterIntermediaryEntity.setMatterCode(matterEntity.getMatterNo());
matterIntermediaryEntity.setMatterName(matterEntity.getMatterName()); matterIntermediaryEntity.setMatterName(matterEntity.getMatterName());
matterIntermediaryEntity.setSource(SourceEnum.政务网.getValue()); matterIntermediaryEntity.setSource(SourceEnum.政务网.getValue());
matterIntermediaryEntity.setCreateTime(new Date()); matterIntermediaryEntity.setCreateTime(new Date());
...@@ -989,6 +1005,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -989,6 +1005,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
for (Map<String, Object> sdyjMap : sdyjMapList) { for (Map<String, Object> sdyjMap : sdyjMapList) {
MatterSetbaseEntity matterSetbaseEntity = new MatterSetbaseEntity(); MatterSetbaseEntity matterSetbaseEntity = new MatterSetbaseEntity();
matterSetbaseEntity.setMatterId(matterEntity.getId()); matterSetbaseEntity.setMatterId(matterEntity.getId());
matterSetbaseEntity.setMatterCode(matterEntity.getMatterNo());
matterSetbaseEntity.setMatterName(matterEntity.getMatterName()); matterSetbaseEntity.setMatterName(matterEntity.getMatterName());
matterSetbaseEntity.setSource(SourceEnum.政务网.getValue()); matterSetbaseEntity.setSource(SourceEnum.政务网.getValue());
matterSetbaseEntity.setCreateTime(new Date()); matterSetbaseEntity.setCreateTime(new Date());
...@@ -1023,6 +1040,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -1023,6 +1040,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
matterChargesEntity.initAttrValue(); matterChargesEntity.initAttrValue();
matterChargesEntity.setContent(sfbzMap.getOrDefault("sfbz", "")); matterChargesEntity.setContent(sfbzMap.getOrDefault("sfbz", ""));
matterChargesEntity.setMatterId(matterEntity.getId()); matterChargesEntity.setMatterId(matterEntity.getId());
matterChargesEntity.setMatterCode(matterEntity.getMatterNo());
matterChargesEntity.setMatterName(matterEntity.getMatterName()); matterChargesEntity.setMatterName(matterEntity.getMatterName());
matterChargesEntity.setSource(SourceEnum.政务网.getValue()); matterChargesEntity.setSource(SourceEnum.政务网.getValue());
matterChargesEntity.setCreateTime(new Date()); matterChargesEntity.setCreateTime(new Date());
...@@ -1031,16 +1049,16 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -1031,16 +1049,16 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
matterChargesService.save(matterChargesEntity); matterChargesService.save(matterChargesEntity);
} }
private static void savebaseInfo(MatterEntity matterEntity, Document dom, Setting baseInfoSetting) { private void savebaseInfo(MatterEntity matterEntity, Document dom, Setting baseInfoSetting) {
Map<String, String> baseInfoMap = MatterDetailHtmlParseUtil.getbaseInfoMapByHtml(dom); Map<String, String> baseInfoMap = MatterDetailHtmlParseUtil.getbaseInfoMapByHtml(dom);
baseInfoMap.entrySet().stream() baseInfoMap.entrySet().stream()
.forEach(m -> { .forEach(m -> {
String value = baseInfoSetting.getOrDefault(m.getKey(), ""); String value = baseInfoSetting.getOrDefault(m.getKey(), "");
if (!ObjectUtils.isEmpty(value) && !"无".equals(m.getValue())) { if (!ObjectUtils.isEmpty(value) && !ObjectUtils.isEmpty(m.getValue()) && !"无".equals(m.getValue())) {
try { try {
ReflectUtil.setFieldValue(matterEntity, value, m.getValue()); ReflectUtil.setFieldValue(matterEntity, value, m.getValue());
} catch (Exception e) { } catch (Exception e) {
log.error(String.format("设置值异常!key:%s,value:%s", value, m.getValue())); log.error(String.format("设置值异常!key:%s,value:%s,orginKey:%s", value, m.getValue(), m.getKey()));
} }
} }
}); });
...@@ -1054,6 +1072,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -1054,6 +1072,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
MatterFlowlimitEntity matterFlowlimitEntity = new MatterFlowlimitEntity(); MatterFlowlimitEntity matterFlowlimitEntity = new MatterFlowlimitEntity();
matterFlowlimitEntity.initAttrValue(); matterFlowlimitEntity.initAttrValue();
matterFlowlimitEntity.setMatterId(matterEntity.getId()); matterFlowlimitEntity.setMatterId(matterEntity.getId());
matterFlowlimitEntity.setMatterCode(matterEntity.getMatterNo());
matterFlowlimitEntity.setMatterName(matterEntity.getMatterName()); matterFlowlimitEntity.setMatterName(matterEntity.getMatterName());
matterFlowlimitEntity.setSource(SourceEnum.政务网.getValue()); matterFlowlimitEntity.setSource(SourceEnum.政务网.getValue());
matterFlowlimitEntity.setCreateTime(new Date()); matterFlowlimitEntity.setCreateTime(new Date());
...@@ -1086,6 +1105,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -1086,6 +1105,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
matterAcceptEntity.initAttrValue(); matterAcceptEntity.initAttrValue();
matterAcceptEntity.setContent(sltjMap.getOrDefault("sltj", "")); matterAcceptEntity.setContent(sltjMap.getOrDefault("sltj", ""));
matterAcceptEntity.setMatterId(matterEntity.getId()); matterAcceptEntity.setMatterId(matterEntity.getId());
matterAcceptEntity.setMatterCode(matterEntity.getMatterNo());
matterAcceptEntity.setMatterName(matterEntity.getMatterName()); matterAcceptEntity.setMatterName(matterEntity.getMatterName());
matterAcceptEntity.setSource(SourceEnum.政务网.getValue()); matterAcceptEntity.setSource(SourceEnum.政务网.getValue());
matterAcceptEntity.setCreateTime(new Date()); matterAcceptEntity.setCreateTime(new Date());
...@@ -1098,11 +1118,12 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -1098,11 +1118,12 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
Long[] datumIds = matterDatumService.find(new MatterDatumQuery().matterId(matterEntity.getId()).source(SourceEnum.政务网.getValue())).stream().map(item -> item.getId()).toArray(Long[]::new); Long[] datumIds = matterDatumService.find(new MatterDatumQuery().matterId(matterEntity.getId()).source(SourceEnum.政务网.getValue())).stream().map(item -> item.getId()).toArray(Long[]::new);
if (!ObjectUtils.isEmpty(datumIds)) { if (!ObjectUtils.isEmpty(datumIds)) {
matterDatumService.remove(datumIds, context); matterDatumService.remove(datumIds, context);
}
Long[] datumFileIds = matterDatumFileService.find(new MatterDatumFileQuery().datumIdList(Arrays.asList(datumIds))).stream().map(item -> item.getId()).toArray(Long[]::new); Long[] datumFileIds = matterDatumFileService.find(new MatterDatumFileQuery().datumIdList(Arrays.asList(datumIds))).stream().map(item -> item.getId()).toArray(Long[]::new);
if (!ObjectUtils.isEmpty(datumFileIds)) { if (!ObjectUtils.isEmpty(datumFileIds)) {
matterDatumService.remove(datumFileIds, context); matterDatumService.remove(datumFileIds, context);
} }
}
List<Map<String, Object>> sqclList = MatterDetailHtmlParseUtil.getsqclInfoMapByHtml(dom); List<Map<String, Object>> sqclList = MatterDetailHtmlParseUtil.getsqclInfoMapByHtml(dom);
for (Map<String, Object> sqclMap : sqclList) { for (Map<String, Object> sqclMap : sqclList) {
Map<String, String> baseinfoMap = (HashMap<String, String>) sqclMap.get("baseinfo"); Map<String, String> baseinfoMap = (HashMap<String, String>) sqclMap.get("baseinfo");
...@@ -1112,6 +1133,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -1112,6 +1133,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
MatterDatumEntity datumEntity = new MatterDatumEntity(); MatterDatumEntity datumEntity = new MatterDatumEntity();
datumEntity.initAttrValue(); datumEntity.initAttrValue();
datumEntity.setMatterId(matterEntity.getId()); datumEntity.setMatterId(matterEntity.getId());
datumEntity.setMatterCode(matterEntity.getMatterNo());
datumEntity.setMaterialName(matterEntity.getMatterName()); datumEntity.setMaterialName(matterEntity.getMatterName());
datumEntity.setSource(SourceEnum.政务网.getValue()); datumEntity.setSource(SourceEnum.政务网.getValue());
datumEntity.setCreateTime(new Date()); datumEntity.setCreateTime(new Date());
...@@ -1134,6 +1156,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -1134,6 +1156,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
if (!ObjectUtils.isEmpty(sampleList)) { if (!ObjectUtils.isEmpty(sampleList)) {
sampleList.forEach(fileEntity -> { sampleList.forEach(fileEntity -> {
fileEntity.setDatumId(datumEntity.getId()); fileEntity.setDatumId(datumEntity.getId());
fileEntity.setMatterCode(matterEntity.getMatterNo());
fileEntity.setMaterialName(datumEntity.getMaterialName()); fileEntity.setMaterialName(datumEntity.getMaterialName());
}); });
} }
...@@ -1143,6 +1166,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -1143,6 +1166,7 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
if (!ObjectUtils.isEmpty(blankList)) { if (!ObjectUtils.isEmpty(blankList)) {
blankList.forEach(fileEntity -> { blankList.forEach(fileEntity -> {
fileEntity.setDatumId(datumEntity.getId()); fileEntity.setDatumId(datumEntity.getId());
fileEntity.setMatterCode(matterEntity.getMatterNo());
fileEntity.setMaterialName(datumEntity.getMaterialName()); fileEntity.setMaterialName(datumEntity.getMaterialName());
}); });
} }
...@@ -1151,7 +1175,4 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M ...@@ -1151,7 +1175,4 @@ public class MatterServiceImpl extends AbstractCRUDCacheServiceImpl<MatterDao, M
} }
} }
\ No newline at end of file
package com.mortals.xhx.module.site.model; package com.mortals.xhx.module.site.model;
import com.mortals.xhx.module.site.model.vo.SiteMatterVo; import com.mortals.xhx.module.site.model.vo.SiteMatterVo;
/** /**
* 站点事项实体对象 * 站点事项实体对象
* *
* @author zxfei * @author zxfei
* @date 2022-01-20 * @date 2022-11-16
*/ */
public class SiteMatterEntity extends SiteMatterVo { public class SiteMatterEntity extends SiteMatterVo {
...@@ -28,6 +27,10 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -28,6 +27,10 @@ public class SiteMatterEntity extends SiteMatterVo {
* 事项名称 * 事项名称
*/ */
private String matterName; private String matterName;
/**
* 事项编码
*/
private String matterCode;
/** /**
* 部门ID * 部门ID
*/ */
...@@ -36,6 +39,18 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -36,6 +39,18 @@ public class SiteMatterEntity extends SiteMatterVo {
* 部门名称 * 部门名称
*/ */
private String deptName; private String deptName;
/**
* 事项类型
*/
private String eventTypeShow;
/**
* 事项来源
*/
private Integer source;
/**
* 部门编号
*/
private String deptCode;
...@@ -96,6 +111,20 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -96,6 +111,20 @@ public class SiteMatterEntity extends SiteMatterVo {
public void setMatterName(String matterName){ public void setMatterName(String matterName){
this.matterName = matterName; this.matterName = matterName;
} }
/**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/** /**
* 获取 部门ID * 获取 部门ID
* @return Long * @return Long
...@@ -124,6 +153,48 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -124,6 +153,48 @@ public class SiteMatterEntity extends SiteMatterVo {
public void setDeptName(String deptName){ public void setDeptName(String deptName){
this.deptName = deptName; this.deptName = deptName;
} }
/**
* 获取 事项类型
* @return String
*/
public String getEventTypeShow(){
return eventTypeShow;
}
/**
* 设置 事项类型
* @param eventTypeShow
*/
public void setEventTypeShow(String eventTypeShow){
this.eventTypeShow = eventTypeShow;
}
/**
* 获取 事项来源
* @return Integer
*/
public Integer getSource(){
return source;
}
/**
* 设置 事项来源
* @param source
*/
public void setSource(Integer source){
this.source = source;
}
/**
* 获取 部门编号
* @return String
*/
public String getDeptCode(){
return deptCode;
}
/**
* 设置 部门编号
* @param deptCode
*/
public void setDeptCode(String deptCode){
this.deptCode = deptCode;
}
...@@ -150,8 +221,12 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -150,8 +221,12 @@ public class SiteMatterEntity extends SiteMatterVo {
sb.append(",siteName:").append(getSiteName()); sb.append(",siteName:").append(getSiteName());
sb.append(",matterId:").append(getMatterId()); sb.append(",matterId:").append(getMatterId());
sb.append(",matterName:").append(getMatterName()); sb.append(",matterName:").append(getMatterName());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",deptId:").append(getDeptId()); sb.append(",deptId:").append(getDeptId());
sb.append(",deptName:").append(getDeptName()); sb.append(",deptName:").append(getDeptName());
sb.append(",eventTypeShow:").append(getEventTypeShow());
sb.append(",source:").append(getSource());
sb.append(",deptCode:").append(getDeptCode());
return sb.toString(); return sb.toString();
} }
...@@ -159,14 +234,22 @@ public class SiteMatterEntity extends SiteMatterVo { ...@@ -159,14 +234,22 @@ public class SiteMatterEntity extends SiteMatterVo {
this.siteId = null; this.siteId = null;
this.siteName = null; this.siteName = "";
this.matterId = null; this.matterId = null;
this.matterName = null; this.matterName = "";
this.matterCode = "";
this.deptId = null; this.deptId = null;
this.deptName = null; this.deptName = "";
this.eventTypeShow = "";
this.source = 0;
this.deptCode = "";
} }
} }
\ No newline at end of file
...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.site.model.SiteMatterEntity; ...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.site.model.SiteMatterEntity;
* 站点事项查询对象 * 站点事项查询对象
* *
* @author zxfei * @author zxfei
* @date 2022-01-20 * @date 2022-11-16
*/ */
public class SiteMatterQuery extends SiteMatterEntity { public class SiteMatterQuery extends SiteMatterEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
...@@ -51,6 +51,39 @@ public class SiteMatterQuery extends SiteMatterEntity { ...@@ -51,6 +51,39 @@ public class SiteMatterQuery extends SiteMatterEntity {
/** 事项名称 */ /** 事项名称 */
private List<String> matterNameList; private List<String> matterNameList;
/** 事项编码 */
private List<String> matterCodeList;
/** 开始 部门ID */
private Long deptIdStart;
/** 结束 部门ID */
private Long deptIdEnd;
/** 增加 部门ID */
private Long deptIdIncrement;
/** 部门ID列表 */
private List <Long> deptIdList;
/** 部门名称 */
private List<String> deptNameList;
/** 开始 事项来源 */
private Integer sourceStart;
/** 结束 事项来源 */
private Integer sourceEnd;
/** 增加 事项来源 */
private Integer sourceIncrement;
/** 事项来源列表 */
private List <Integer> sourceList;
/** 部门编号 */
private List<String> deptCodeList;
/** 开始 创建时间 */ /** 开始 创建时间 */
private String createTimeStart; private String createTimeStart;
...@@ -75,21 +108,6 @@ public class SiteMatterQuery extends SiteMatterEntity { ...@@ -75,21 +108,6 @@ public class SiteMatterQuery extends SiteMatterEntity {
/** 结束 修改时间 */ /** 结束 修改时间 */
private String updateTimeEnd; private String updateTimeEnd;
/** 开始 部门ID */
private Long deptIdStart;
/** 结束 部门ID */
private Long deptIdEnd;
/** 增加 部门ID */
private Long deptIdIncrement;
/** 部门ID列表 */
private List <Long> deptIdList;
/** 部门名称 */
private List<String> deptNameList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<SiteMatterQuery> orConditionList; private List<SiteMatterQuery> orConditionList;
...@@ -320,6 +338,179 @@ public class SiteMatterQuery extends SiteMatterEntity { ...@@ -320,6 +338,179 @@ public class SiteMatterQuery extends SiteMatterEntity {
public void setMatterNameList(List<String> matterNameList){ public void setMatterNameList(List<String> matterNameList){
this.matterNameList = matterNameList; this.matterNameList = matterNameList;
} }
/**
* 获取 事项编码
* @return matterCodeList
*/
public List<String> getMatterCodeList(){
return this.matterCodeList;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public void setMatterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
}
/**
* 获取 开始 部门ID
* @return deptIdStart
*/
public Long getDeptIdStart(){
return this.deptIdStart;
}
/**
* 设置 开始 部门ID
* @param deptIdStart
*/
public void setDeptIdStart(Long deptIdStart){
this.deptIdStart = deptIdStart;
}
/**
* 获取 结束 部门ID
* @return $deptIdEnd
*/
public Long getDeptIdEnd(){
return this.deptIdEnd;
}
/**
* 设置 结束 部门ID
* @param deptIdEnd
*/
public void setDeptIdEnd(Long deptIdEnd){
this.deptIdEnd = deptIdEnd;
}
/**
* 获取 增加 部门ID
* @return deptIdIncrement
*/
public Long getDeptIdIncrement(){
return this.deptIdIncrement;
}
/**
* 设置 增加 部门ID
* @param deptIdIncrement
*/
public void setDeptIdIncrement(Long deptIdIncrement){
this.deptIdIncrement = deptIdIncrement;
}
/**
* 获取 部门ID
* @return deptIdList
*/
public List<Long> getDeptIdList(){
return this.deptIdList;
}
/**
* 设置 部门ID
* @param deptIdList
*/
public void setDeptIdList(List<Long> deptIdList){
this.deptIdList = deptIdList;
}
/**
* 获取 部门名称
* @return deptNameList
*/
public List<String> getDeptNameList(){
return this.deptNameList;
}
/**
* 设置 部门名称
* @param deptNameList
*/
public void setDeptNameList(List<String> deptNameList){
this.deptNameList = deptNameList;
}
/**
* 获取 开始 事项来源
* @return sourceStart
*/
public Integer getSourceStart(){
return this.sourceStart;
}
/**
* 设置 开始 事项来源
* @param sourceStart
*/
public void setSourceStart(Integer sourceStart){
this.sourceStart = sourceStart;
}
/**
* 获取 结束 事项来源
* @return $sourceEnd
*/
public Integer getSourceEnd(){
return this.sourceEnd;
}
/**
* 设置 结束 事项来源
* @param sourceEnd
*/
public void setSourceEnd(Integer sourceEnd){
this.sourceEnd = sourceEnd;
}
/**
* 获取 增加 事项来源
* @return sourceIncrement
*/
public Integer getSourceIncrement(){
return this.sourceIncrement;
}
/**
* 设置 增加 事项来源
* @param sourceIncrement
*/
public void setSourceIncrement(Integer sourceIncrement){
this.sourceIncrement = sourceIncrement;
}
/**
* 获取 事项来源
* @return sourceList
*/
public List<Integer> getSourceList(){
return this.sourceList;
}
/**
* 设置 事项来源
* @param sourceList
*/
public void setSourceList(List<Integer> sourceList){
this.sourceList = sourceList;
}
/**
* 获取 部门编号
* @return deptCodeList
*/
public List<String> getDeptCodeList(){
return this.deptCodeList;
}
/**
* 设置 部门编号
* @param deptCodeList
*/
public void setDeptCodeList(List<String> deptCodeList){
this.deptCodeList = deptCodeList;
}
/** /**
* 获取 开始 创建时间 * 获取 开始 创建时间
* @return createTimeStart * @return createTimeStart
...@@ -448,85 +639,6 @@ public class SiteMatterQuery extends SiteMatterEntity { ...@@ -448,85 +639,6 @@ public class SiteMatterQuery extends SiteMatterEntity {
this.updateTimeEnd = updateTimeEnd; this.updateTimeEnd = updateTimeEnd;
} }
/**
* 获取 开始 部门ID
* @return deptIdStart
*/
public Long getDeptIdStart(){
return this.deptIdStart;
}
/**
* 设置 开始 部门ID
* @param deptIdStart
*/
public void setDeptIdStart(Long deptIdStart){
this.deptIdStart = deptIdStart;
}
/**
* 获取 结束 部门ID
* @return $deptIdEnd
*/
public Long getDeptIdEnd(){
return this.deptIdEnd;
}
/**
* 设置 结束 部门ID
* @param deptIdEnd
*/
public void setDeptIdEnd(Long deptIdEnd){
this.deptIdEnd = deptIdEnd;
}
/**
* 获取 增加 部门ID
* @return deptIdIncrement
*/
public Long getDeptIdIncrement(){
return this.deptIdIncrement;
}
/**
* 设置 增加 部门ID
* @param deptIdIncrement
*/
public void setDeptIdIncrement(Long deptIdIncrement){
this.deptIdIncrement = deptIdIncrement;
}
/**
* 获取 部门ID
* @return deptIdList
*/
public List<Long> getDeptIdList(){
return this.deptIdList;
}
/**
* 设置 部门ID
* @param deptIdList
*/
public void setDeptIdList(List<Long> deptIdList){
this.deptIdList = deptIdList;
}
/**
* 获取 部门名称
* @return deptNameList
*/
public List<String> getDeptNameList(){
return this.deptNameList;
}
/**
* 设置 部门名称
* @param deptNameList
*/
public void setDeptNameList(List<String> deptNameList){
this.deptNameList = deptNameList;
}
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param id * @param id
...@@ -702,51 +814,23 @@ public class SiteMatterQuery extends SiteMatterEntity { ...@@ -702,51 +814,23 @@ public class SiteMatterQuery extends SiteMatterEntity {
/** /**
* 设置 创建用户 * 设置 事项编码
* @param createUserId * @param matterCode
*/ */
public SiteMatterQuery createUserId(Long createUserId){ public SiteMatterQuery matterCode(String matterCode){
setCreateUserId(createUserId); setMatterCode(matterCode);
return this; return this;
} }
/** /**
* 设置 开始 创建用户 * 设置 事项编码
* @param createUserIdStart * @param matterCodeList
*/ */
public SiteMatterQuery createUserIdStart(Long createUserIdStart){ public SiteMatterQuery matterCodeList(List<String> matterCodeList){
this.createUserIdStart = createUserIdStart; this.matterCodeList = matterCodeList;
return this; return this;
} }
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public SiteMatterQuery createUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
return this;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public SiteMatterQuery createUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
return this;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public SiteMatterQuery createUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
return this;
}
/** /**
* 设置 部门ID * 设置 部门ID
* @param deptId * @param deptId
...@@ -811,6 +895,117 @@ public class SiteMatterQuery extends SiteMatterEntity { ...@@ -811,6 +895,117 @@ public class SiteMatterQuery extends SiteMatterEntity {
return this; return this;
} }
/**
* 设置 事项来源
* @param source
*/
public SiteMatterQuery source(Integer source){
setSource(source);
return this;
}
/**
* 设置 开始 事项来源
* @param sourceStart
*/
public SiteMatterQuery sourceStart(Integer sourceStart){
this.sourceStart = sourceStart;
return this;
}
/**
* 设置 结束 事项来源
* @param sourceEnd
*/
public SiteMatterQuery sourceEnd(Integer sourceEnd){
this.sourceEnd = sourceEnd;
return this;
}
/**
* 设置 增加 事项来源
* @param sourceIncrement
*/
public SiteMatterQuery sourceIncrement(Integer sourceIncrement){
this.sourceIncrement = sourceIncrement;
return this;
}
/**
* 设置 事项来源
* @param sourceList
*/
public SiteMatterQuery sourceList(List<Integer> sourceList){
this.sourceList = sourceList;
return this;
}
/**
* 设置 部门编号
* @param deptCode
*/
public SiteMatterQuery deptCode(String deptCode){
setDeptCode(deptCode);
return this;
}
/**
* 设置 部门编号
* @param deptCodeList
*/
public SiteMatterQuery deptCodeList(List<String> deptCodeList){
this.deptCodeList = deptCodeList;
return this;
}
/**
* 设置 创建用户
* @param createUserId
*/
public SiteMatterQuery createUserId(Long createUserId){
setCreateUserId(createUserId);
return this;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public SiteMatterQuery createUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
return this;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public SiteMatterQuery createUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
return this;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public SiteMatterQuery createUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
return this;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public SiteMatterQuery createUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
package com.mortals.xhx.module.site.service; package com.mortals.xhx.module.site.service;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.site.model.SiteMatterEntity; import com.mortals.xhx.module.site.model.SiteMatterEntity;
/** /**
...@@ -10,5 +11,5 @@ import com.mortals.xhx.module.site.model.SiteMatterEntity; ...@@ -10,5 +11,5 @@ import com.mortals.xhx.module.site.model.SiteMatterEntity;
* @date 2022-01-12 * @date 2022-01-12
*/ */
public interface SiteMatterService extends ICRUDService<SiteMatterEntity,Long>{ public interface SiteMatterService extends ICRUDService<SiteMatterEntity,Long>{
void deleteBysiteIdAndSource(Long siteId,Integer source, Context context);
} }
\ No newline at end of file
...@@ -74,4 +74,6 @@ public interface SiteService extends ICRUDCacheService<SiteEntity, Long> { ...@@ -74,4 +74,6 @@ public interface SiteService extends ICRUDCacheService<SiteEntity, Long> {
Rest<String> syncMatterBySiteId(Long siteId, Context context); Rest<String> syncMatterBySiteId(Long siteId, Context context);
void deleteBysiteIdAndSource(Long siteId,Integer source, Context context);
} }
\ No newline at end of file
...@@ -12,7 +12,9 @@ import com.mortals.xhx.module.site.model.SiteMatterEntity; ...@@ -12,7 +12,9 @@ import com.mortals.xhx.module.site.model.SiteMatterEntity;
import com.mortals.xhx.module.site.service.SiteMatterService; import com.mortals.xhx.module.site.service.SiteMatterService;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* SiteMatterService * SiteMatterService
...@@ -42,4 +44,12 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao ...@@ -42,4 +44,12 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao
}); });
super.findAfter(params, pageInfo, context, list); super.findAfter(params, pageInfo, context, list);
} }
@Override
public void deleteBysiteIdAndSource(Long siteId, Integer source, Context context) {
Map<String, Object> condition = new HashMap<>();
condition.put("siteId", siteId);
condition.put("source", source);
this.dao.delete(condition);
}
} }
\ No newline at end of file
package com.mortals.xhx.module.site.service.impl; package com.mortals.xhx.module.site.service.impl;
import cn.hutool.core.net.url.UrlBuilder; import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.util.CharsetUtil;
import cn.hutool.core.util.URLUtil; import cn.hutool.core.util.URLUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.mortals.framework.ap.GlobalSysInfo; import com.mortals.framework.ap.GlobalSysInfo;
...@@ -11,7 +10,6 @@ import com.mortals.framework.model.Context; ...@@ -11,7 +10,6 @@ import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import com.mortals.framework.util.DataUtil; import com.mortals.framework.util.DataUtil;
import com.mortals.framework.util.HttpUtil;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.base.system.user.service.UserService; import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.AreaLevelDxTypeEnum; import com.mortals.xhx.common.code.AreaLevelDxTypeEnum;
...@@ -25,13 +23,10 @@ import com.mortals.xhx.module.area.model.AreaEntity; ...@@ -25,13 +23,10 @@ import com.mortals.xhx.module.area.model.AreaEntity;
import com.mortals.xhx.module.area.model.AreaQuery; import com.mortals.xhx.module.area.model.AreaQuery;
import com.mortals.xhx.module.area.service.AreaService; import com.mortals.xhx.module.area.service.AreaService;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService; import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.matter.model.MatterEntity; import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.matter.model.MatterQuery; import com.mortals.xhx.module.matter.model.MatterQuery;
import com.mortals.xhx.module.matter.service.MatterService; import com.mortals.xhx.module.matter.service.MatterService;
import com.mortals.xhx.module.matters.model.MattersEntity;
import com.mortals.xhx.module.matters.model.MattersQuery;
import com.mortals.xhx.module.matters.service.MattersService; import com.mortals.xhx.module.matters.service.MattersService;
import com.mortals.xhx.module.model.model.ModelEntity; import com.mortals.xhx.module.model.model.ModelEntity;
import com.mortals.xhx.module.model.model.ModelQuery; import com.mortals.xhx.module.model.model.ModelQuery;
...@@ -43,25 +38,14 @@ import com.mortals.xhx.module.site.model.SiteTreeSelect; ...@@ -43,25 +38,14 @@ import com.mortals.xhx.module.site.model.SiteTreeSelect;
import com.mortals.xhx.module.site.service.SiteService; import com.mortals.xhx.module.site.service.SiteService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.poi.ss.formula.functions.T; import org.apache.commons.logging.Log;
import org.htmlcleaner.CleanerProperties; import org.apache.commons.logging.LogFactory;
import org.htmlcleaner.DomSerializer;
import org.htmlcleaner.HtmlCleaner;
import org.htmlcleaner.TagNode;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathFactory;
import java.util.*; import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.IntStream;
import static com.mortals.xhx.common.key.Constant.PARAM_SERVER_HTTP_IMAGE_URL; import static com.mortals.xhx.common.key.Constant.PARAM_SERVER_HTTP_IMAGE_URL;
...@@ -73,9 +57,9 @@ import static com.mortals.xhx.common.key.Constant.PARAM_SERVER_HTTP_IMAGE_URL; ...@@ -73,9 +57,9 @@ import static com.mortals.xhx.common.key.Constant.PARAM_SERVER_HTTP_IMAGE_URL;
* @date 2022-01-12 * @date 2022-01-12
*/ */
@Service("siteService") @Service("siteService")
@Slf4j
public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteEntity, Long> implements SiteService { public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteEntity, Long> implements SiteService {
protected Log log = LogFactory.getLog(this.getClass());
// private List<SiteTreeSelect> siteTreeList; // private List<SiteTreeSelect> siteTreeList;
/** /**
* 根据用户id 暂存对应站点树 默认0为全站点树 * 根据用户id 暂存对应站点树 默认0为全站点树
...@@ -151,7 +135,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -151,7 +135,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
} }
} }
//查詢指定的站點ids //查詢指定的站點ids
log.info("siteQuery==>{}", JSON.toJSONString(siteQuery)); log.info(String.format("siteQuery==>%s", JSON.toJSONString(siteQuery)));
List<SiteEntity> siteList = this.find(siteQuery); List<SiteEntity> siteList = this.find(siteQuery);
//如果是管理员 默认全部站点 //如果是管理员 默认全部站点
if (context.getUser().isAdmin()) { if (context.getUser().isAdmin()) {
...@@ -438,18 +422,28 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -438,18 +422,28 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
Rest<List<MatterEntity>> matterAllRest = this.getMatterAllListByGOV(params, pageNum, context); Rest<List<MatterEntity>> matterAllRest = this.getMatterAllListByGOV(params, pageNum, context);
if (total != matterAllRest.getData().size()) { if (total != matterAllRest.getData().size()) {
log.warn("抓取事项数量不一致,total:{} ,cursize:{}", total, matterAllRest.getData().size()); log.warn(String.format("抓取事项数量不一致,抓取计划:%d条 ,实际抓取:%d条", total, matterAllRest.getData().size()));
} }
if (matterAllRest.getCode() == YesNoEnum.YES.getValue()) { if (matterAllRest.getCode() == YesNoEnum.YES.getValue()) {
List<MatterEntity> govMatterList = matterAllRest.getData(); List<MatterEntity> govMatterList = matterAllRest.getData();
List<MatterEntity> localMatterList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode())); List<MatterEntity> localMatterList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode()));
List<MatterEntity> subList = this.subList(govMatterList, localMatterList); List<MatterEntity> subList = this.subList(govMatterList, localMatterList);
log.info("需要添加事项数量====" + subList.size());
//差集进行插入并更新详细数据 //差集进行插入并更新详细数据
if (!ObjectUtils.isEmpty(subList)) { if (!ObjectUtils.isEmpty(subList)) {
log.info("insert subList size:" + subList.size()); for (MatterEntity matterEntity : subList) {
int count = matterService.save(subList, context); DeptEntity deptCache = deptService.getExtCache(matterEntity.getDeptCode());
matterEntity.setDeptName(deptCache == null ? "" : deptCache.getName());
matterService.save(matterEntity, context);
}
/* List<List<MatterEntity>> partition = ListUtil.partition(subList, 50);
for (List<MatterEntity> matterEntityList : partition) {
log.info("insert subList size:" + matterEntityList.size());
int count = matterService.save(matterEntityList, context);
log.info("insert subList size success:" +count); log.info("insert subList size success:" +count);
}*/
} }
} }
} }
...@@ -457,6 +451,14 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -457,6 +451,14 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
return Rest.ok("同步事项条数成功!"); return Rest.ok("同步事项条数成功!");
} }
@Override
public void deleteBysiteIdAndSource(Long siteId, Integer source, Context context) {
Map<String, Object> condition = new HashMap<>();
condition.put("siteId", siteId);
condition.put("source", source);
this.dao.delete(condition);
}
public List<MatterEntity> subList(List<MatterEntity> firstList, List<MatterEntity> secondList) { public List<MatterEntity> subList(List<MatterEntity> firstList, List<MatterEntity> secondList) {
Set<String> secondSet = secondList.parallelStream().map(e -> e.getMatterNo()).collect(Collectors.toSet()); Set<String> secondSet = secondList.parallelStream().map(e -> e.getMatterNo()).collect(Collectors.toSet());
......
...@@ -22,6 +22,7 @@ import com.mortals.xhx.module.model.service.ModelService; ...@@ -22,6 +22,7 @@ import com.mortals.xhx.module.model.service.ModelService;
import com.mortals.xhx.module.site.model.SiteEntity; import com.mortals.xhx.module.site.model.SiteEntity;
import com.mortals.xhx.module.site.model.SiteQuery; import com.mortals.xhx.module.site.model.SiteQuery;
import com.mortals.xhx.module.site.model.SiteTreeSelect; import com.mortals.xhx.module.site.model.SiteTreeSelect;
import com.mortals.xhx.module.site.service.SiteMatterService;
import com.mortals.xhx.module.site.service.SiteService; import com.mortals.xhx.module.site.service.SiteService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
...@@ -57,6 +58,8 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic ...@@ -57,6 +58,8 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
private DeptService deptService; private DeptService deptService;
@Autowired @Autowired
private SiteService siteService; private SiteService siteService;
@Autowired
private SiteMatterService siteMatterService;
public SiteController() { public SiteController() {
super.setFormClass(SiteForm.class); super.setFormClass(SiteForm.class);
...@@ -265,17 +268,21 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic ...@@ -265,17 +268,21 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
* 同步站点事项数据 * 同步站点事项数据
*/ */
@PostMapping(value = "syncGovMatterBySiteId") @PostMapping(value = "syncGovMatterBySiteId")
@UnAuth
public String syncMatterBySiteId(@RequestBody SiteQuery site) { public String syncMatterBySiteId(@RequestBody SiteQuery site) {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
String busiDesc = "同步站点事项数据" + this.getModuleDesc(); String busiDesc = "同步站点事项数据" + this.getModuleDesc();
try { try {
SiteEntity siteEntity = this.service.get(site.getId(), getContext()); SiteEntity siteEntity = this.service.get(site.getId(), getContext());
//启动 //启动
if(ObjectUtils.isEmpty(siteEntity)){
throw new AppException("当前站点为空!");
}
boolean bool = cacheService.setnx(RedisCacheKeys.getFlowDistributedLockKey() + siteEntity.getAreaCode(), siteEntity.getAreaCode(), 60L); boolean bool = cacheService.setnx(RedisCacheKeys.getFlowDistributedLockKey() + siteEntity.getAreaCode(), siteEntity.getAreaCode(), 60L);
if (!bool) { if (!bool) {
throw new AppException("当前正在同步事项数据中,请勿重复提交!"); throw new AppException("当前正在同步事项数据中,请勿重复提交!");
} }
ThreadPool.getInstance().execute(new SyncGovMatterDetailThread(matterService, siteService, deptService, siteEntity, getContext())); ThreadPool.getInstance().execute(new SyncGovMatterDetailThread(matterService, siteService, deptService, siteMatterService, siteEntity, getContext()));
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS); jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, "同步站点事项数据命令下发成功!"); jsonObject.put(KEY_RESULT_MSG, "同步站点事项数据命令下发成功!");
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<resultMap type="MatterAcceptEntity" id="MatterAcceptEntity-Map"> <resultMap type="MatterAcceptEntity" id="MatterAcceptEntity-Map">
<id property="id" column="id" /> <id property="id" column="id" />
<result property="matterId" column="matterId" /> <result property="matterId" column="matterId" />
<result property="matterCode" column="matterCode" />
<result property="matterName" column="matterName" /> <result property="matterName" column="matterName" />
<result property="content" column="content" /> <result property="content" column="content" />
<result property="source" column="source" /> <result property="source" column="source" />
...@@ -21,46 +22,49 @@ ...@@ -21,46 +22,49 @@
<sql id="_columns"> <sql id="_columns">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id as id, a.id,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))">
a.matterId as matterId, a.matterId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterCode') or colPickMode == 1 and data.containsKey('matterCode')))">
a.matterCode,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))">
a.matterName as matterName, a.matterName,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('content') or colPickMode == 1 and data.containsKey('content')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('content') or colPickMode == 1 and data.containsKey('content')))">
a.content as content, a.content,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))">
a.source as source, a.source,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime as createTime, a.createTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId as createUserId, a.createUserId,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime as updateTime, a.updateTime,
</if> </if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="MatterAcceptEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="MatterAcceptEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_matter_accept insert into mortals_sys_matter_accept
(matterId,matterName,content,source,createTime,createUserId,updateTime) (matterId,matterCode,matterName,content,source,createTime,createUserId,updateTime)
VALUES VALUES
(#{matterId},#{matterName},#{content},#{source},#{createTime},#{createUserId},#{updateTime}) (#{matterId},#{matterCode},#{matterName},#{content},#{source},#{createTime},#{createUserId},#{updateTime})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_matter_accept insert into mortals_sys_matter_accept
(matterId,matterName,content,source,createTime,createUserId,updateTime) (matterId,matterCode,matterName,content,source,createTime,createUserId,updateTime)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.matterId},#{item.matterName},#{item.content},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime}) (#{item.matterId},#{item.matterCode},#{item.matterName},#{item.content},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime})
</foreach> </foreach>
</insert> </insert>
...@@ -76,6 +80,9 @@ ...@@ -76,6 +80,9 @@
<if test="(colPickMode==0 and data.containsKey('matterIdIncrement')) or (colPickMode==1 and !data.containsKey('matterIdIncrement'))"> <if test="(colPickMode==0 and data.containsKey('matterIdIncrement')) or (colPickMode==1 and !data.containsKey('matterIdIncrement'))">
a.matterId=ifnull(a.matterId,0) + #{data.matterIdIncrement}, a.matterId=ifnull(a.matterId,0) + #{data.matterIdIncrement},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('matterCode')) or (colPickMode==1 and !data.containsKey('matterCode'))">
a.matterCode=#{data.matterCode},
</if>
<if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))"> <if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))">
a.matterName=#{data.matterName}, a.matterName=#{data.matterName},
</if> </if>
...@@ -124,6 +131,13 @@ ...@@ -124,6 +131,13 @@
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="matterCode=(case" suffix="ELSE matterCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterCode')) or (colPickMode==1 and !item.containsKey('matterCode'))">
when a.id=#{item.id} then #{item.matterCode}
</if>
</foreach>
</trim>
<trim prefix="matterName=(case" suffix="ELSE matterName end),"> <trim prefix="matterName=(case" suffix="ELSE matterName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterName')) or (colPickMode==1 and !item.containsKey('matterName'))"> <if test="(colPickMode==0 and item.containsKey('matterName')) or (colPickMode==1 and !item.containsKey('matterName'))">
...@@ -320,6 +334,21 @@ ...@@ -320,6 +334,21 @@
</if> </if>
<if test="conditionParamRef.containsKey('matterCode')">
<if test="conditionParamRef.matterCode != null and conditionParamRef.matterCode != ''">
${_conditionType_} a.matterCode like #{${_conditionParam_}.matterCode}
</if>
<if test="conditionParamRef.matterCode == null">
${_conditionType_} a.matterCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('matterCodeList')">
${_conditionType_} a.matterCode in
<foreach collection="conditionParamRef.matterCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('matterName')"> <if test="conditionParamRef.containsKey('matterName')">
<if test="conditionParamRef.matterName != null and conditionParamRef.matterName != ''"> <if test="conditionParamRef.matterName != null and conditionParamRef.matterName != ''">
${_conditionType_} a.matterName like #{${_conditionParam_}.matterName} ${_conditionType_} a.matterName like #{${_conditionParam_}.matterName}
...@@ -444,6 +473,11 @@ ...@@ -444,6 +473,11 @@
<if test='orderCol.matterId != null and "DESC".equalsIgnoreCase(orderCol.matterId)'>DESC</if> <if test='orderCol.matterId != null and "DESC".equalsIgnoreCase(orderCol.matterId)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('matterCode')">
a.matterCode
<if test='orderCol.matterCode != null and "DESC".equalsIgnoreCase(orderCol.matterCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('matterName')"> <if test="orderCol.containsKey('matterName')">
a.matterName a.matterName
<if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if> <if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if>
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<resultMap type="MatterChargesEntity" id="MatterChargesEntity-Map"> <resultMap type="MatterChargesEntity" id="MatterChargesEntity-Map">
<id property="id" column="id" /> <id property="id" column="id" />
<result property="matterId" column="matterId" /> <result property="matterId" column="matterId" />
<result property="matterCode" column="matterCode" />
<result property="matterName" column="matterName" /> <result property="matterName" column="matterName" />
<result property="content" column="content" /> <result property="content" column="content" />
<result property="source" column="source" /> <result property="source" column="source" />
...@@ -21,46 +22,49 @@ ...@@ -21,46 +22,49 @@
<sql id="_columns"> <sql id="_columns">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id as id, a.id,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))">
a.matterId as matterId, a.matterId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterCode') or colPickMode == 1 and data.containsKey('matterCode')))">
a.matterCode,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))">
a.matterName as matterName, a.matterName,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('content') or colPickMode == 1 and data.containsKey('content')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('content') or colPickMode == 1 and data.containsKey('content')))">
a.content as content, a.content,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))">
a.source as source, a.source,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime as createTime, a.createTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId as createUserId, a.createUserId,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime as updateTime, a.updateTime,
</if> </if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="MatterChargesEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="MatterChargesEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_matter_charges insert into mortals_sys_matter_charges
(matterId,matterName,content,source,createTime,createUserId,updateTime) (matterId,matterCode,matterName,content,source,createTime,createUserId,updateTime)
VALUES VALUES
(#{matterId},#{matterName},#{content},#{source},#{createTime},#{createUserId},#{updateTime}) (#{matterId},#{matterCode},#{matterName},#{content},#{source},#{createTime},#{createUserId},#{updateTime})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_matter_charges insert into mortals_sys_matter_charges
(matterId,matterName,content,source,createTime,createUserId,updateTime) (matterId,matterCode,matterName,content,source,createTime,createUserId,updateTime)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.matterId},#{item.matterName},#{item.content},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime}) (#{item.matterId},#{item.matterCode},#{item.matterName},#{item.content},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime})
</foreach> </foreach>
</insert> </insert>
...@@ -76,6 +80,9 @@ ...@@ -76,6 +80,9 @@
<if test="(colPickMode==0 and data.containsKey('matterIdIncrement')) or (colPickMode==1 and !data.containsKey('matterIdIncrement'))"> <if test="(colPickMode==0 and data.containsKey('matterIdIncrement')) or (colPickMode==1 and !data.containsKey('matterIdIncrement'))">
a.matterId=ifnull(a.matterId,0) + #{data.matterIdIncrement}, a.matterId=ifnull(a.matterId,0) + #{data.matterIdIncrement},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('matterCode')) or (colPickMode==1 and !data.containsKey('matterCode'))">
a.matterCode=#{data.matterCode},
</if>
<if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))"> <if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))">
a.matterName=#{data.matterName}, a.matterName=#{data.matterName},
</if> </if>
...@@ -124,6 +131,13 @@ ...@@ -124,6 +131,13 @@
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="matterCode=(case" suffix="ELSE matterCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterCode')) or (colPickMode==1 and !item.containsKey('matterCode'))">
when a.id=#{item.id} then #{item.matterCode}
</if>
</foreach>
</trim>
<trim prefix="matterName=(case" suffix="ELSE matterName end),"> <trim prefix="matterName=(case" suffix="ELSE matterName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterName')) or (colPickMode==1 and !item.containsKey('matterName'))"> <if test="(colPickMode==0 and item.containsKey('matterName')) or (colPickMode==1 and !item.containsKey('matterName'))">
...@@ -320,6 +334,21 @@ ...@@ -320,6 +334,21 @@
</if> </if>
<if test="conditionParamRef.containsKey('matterCode')">
<if test="conditionParamRef.matterCode != null and conditionParamRef.matterCode != ''">
${_conditionType_} a.matterCode like #{${_conditionParam_}.matterCode}
</if>
<if test="conditionParamRef.matterCode == null">
${_conditionType_} a.matterCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('matterCodeList')">
${_conditionType_} a.matterCode in
<foreach collection="conditionParamRef.matterCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('matterName')"> <if test="conditionParamRef.containsKey('matterName')">
<if test="conditionParamRef.matterName != null and conditionParamRef.matterName != ''"> <if test="conditionParamRef.matterName != null and conditionParamRef.matterName != ''">
${_conditionType_} a.matterName like #{${_conditionParam_}.matterName} ${_conditionType_} a.matterName like #{${_conditionParam_}.matterName}
...@@ -444,6 +473,11 @@ ...@@ -444,6 +473,11 @@
<if test='orderCol.matterId != null and "DESC".equalsIgnoreCase(orderCol.matterId)'>DESC</if> <if test='orderCol.matterId != null and "DESC".equalsIgnoreCase(orderCol.matterId)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('matterCode')">
a.matterCode
<if test='orderCol.matterCode != null and "DESC".equalsIgnoreCase(orderCol.matterCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('matterName')"> <if test="orderCol.containsKey('matterName')">
a.matterName a.matterName
<if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if> <if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if>
......
...@@ -7,14 +7,16 @@ ...@@ -7,14 +7,16 @@
<resultMap type="MatterDatumFileEntity" id="MatterDatumFileEntity-Map"> <resultMap type="MatterDatumFileEntity" id="MatterDatumFileEntity-Map">
<id property="id" column="id" /> <id property="id" column="id" />
<result property="datumId" column="datumId" /> <result property="datumId" column="datumId" />
<result property="matterCode" column="matterCode" />
<result property="materialName" column="materialName" />
<result property="fileName" column="fileName" /> <result property="fileName" column="fileName" />
<result property="fileUrl" column="fileUrl" /> <result property="fileUrl" column="fileUrl" />
<result property="localFileUrl" column="localFileUrl" />
<result property="filetype" column="filetype" /> <result property="filetype" column="filetype" />
<result property="source" column="source" /> <result property="source" column="source" />
<result property="createTime" column="createTime" /> <result property="createTime" column="createTime" />
<result property="createUserId" column="createUserId" /> <result property="createUserId" column="createUserId" />
<result property="updateTime" column="updateTime" /> <result property="updateTime" column="updateTime" />
<result property="materialName" column="materialName" />
</resultMap> </resultMap>
...@@ -23,52 +25,58 @@ ...@@ -23,52 +25,58 @@
<sql id="_columns"> <sql id="_columns">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id as id, a.id,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('datumId') or colPickMode == 1 and data.containsKey('datumId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('datumId') or colPickMode == 1 and data.containsKey('datumId')))">
a.datumId as datumId, a.datumId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterCode') or colPickMode == 1 and data.containsKey('matterCode')))">
a.matterCode,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('materialName') or colPickMode == 1 and data.containsKey('materialName')))">
a.materialName,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('fileName') or colPickMode == 1 and data.containsKey('fileName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('fileName') or colPickMode == 1 and data.containsKey('fileName')))">
a.fileName as fileName, a.fileName,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('fileUrl') or colPickMode == 1 and data.containsKey('fileUrl')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('fileUrl') or colPickMode == 1 and data.containsKey('fileUrl')))">
a.fileUrl as fileUrl, a.fileUrl,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('localFileUrl') or colPickMode == 1 and data.containsKey('localFileUrl')))">
a.localFileUrl,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('filetype') or colPickMode == 1 and data.containsKey('filetype')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('filetype') or colPickMode == 1 and data.containsKey('filetype')))">
a.filetype as filetype, a.filetype,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))">
a.source as source, a.source,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime as createTime, a.createTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId as createUserId, a.createUserId,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime as updateTime, a.updateTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('materialName') or colPickMode == 1 and data.containsKey('materialName')))">
a.materialName as materialName,
</if> </if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="MatterDatumFileEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="MatterDatumFileEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_matter_datum_file insert into mortals_sys_matter_datum_file
(datumId,fileName,fileUrl,filetype,source,createTime,createUserId,updateTime,materialName) (datumId,matterCode,materialName,fileName,fileUrl,localFileUrl,filetype,source,createTime,createUserId,updateTime)
VALUES VALUES
(#{datumId},#{fileName},#{fileUrl},#{filetype},#{source},#{createTime},#{createUserId},#{updateTime},#{materialName}) (#{datumId},#{matterCode},#{materialName},#{fileName},#{fileUrl},#{localFileUrl},#{filetype},#{source},#{createTime},#{createUserId},#{updateTime})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_matter_datum_file insert into mortals_sys_matter_datum_file
(datumId,fileName,fileUrl,filetype,source,createTime,createUserId,updateTime,materialName) (datumId,matterCode,materialName,fileName,fileUrl,localFileUrl,filetype,source,createTime,createUserId,updateTime)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.datumId},#{item.fileName},#{item.fileUrl},#{item.filetype},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime},#{item.materialName}) (#{item.datumId},#{item.matterCode},#{item.materialName},#{item.fileName},#{item.fileUrl},#{item.localFileUrl},#{item.filetype},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime})
</foreach> </foreach>
</insert> </insert>
...@@ -84,18 +92,24 @@ ...@@ -84,18 +92,24 @@
<if test="(colPickMode==0 and data.containsKey('datumIdIncrement')) or (colPickMode==1 and !data.containsKey('datumIdIncrement'))"> <if test="(colPickMode==0 and data.containsKey('datumIdIncrement')) or (colPickMode==1 and !data.containsKey('datumIdIncrement'))">
a.datumId=ifnull(a.datumId,0) + #{data.datumIdIncrement}, a.datumId=ifnull(a.datumId,0) + #{data.datumIdIncrement},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('matterCode')) or (colPickMode==1 and !data.containsKey('matterCode'))">
a.matterCode=#{data.matterCode},
</if>
<if test="(colPickMode==0 and data.containsKey('materialName')) or (colPickMode==1 and !data.containsKey('materialName'))">
a.materialName=#{data.materialName},
</if>
<if test="(colPickMode==0 and data.containsKey('fileName')) or (colPickMode==1 and !data.containsKey('fileName'))"> <if test="(colPickMode==0 and data.containsKey('fileName')) or (colPickMode==1 and !data.containsKey('fileName'))">
a.fileName=#{data.fileName}, a.fileName=#{data.fileName},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('fileUrl')) or (colPickMode==1 and !data.containsKey('fileUrl'))"> <if test="(colPickMode==0 and data.containsKey('fileUrl')) or (colPickMode==1 and !data.containsKey('fileUrl'))">
a.fileUrl=#{data.fileUrl}, a.fileUrl=#{data.fileUrl},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('localFileUrl')) or (colPickMode==1 and !data.containsKey('localFileUrl'))">
a.localFileUrl=#{data.localFileUrl},
</if>
<if test="(colPickMode==0 and data.containsKey('filetype')) or (colPickMode==1 and !data.containsKey('filetype'))"> <if test="(colPickMode==0 and data.containsKey('filetype')) or (colPickMode==1 and !data.containsKey('filetype'))">
a.filetype=#{data.filetype}, a.filetype=#{data.filetype},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('filetypeIncrement')) or (colPickMode==1 and !data.containsKey('filetypeIncrement'))">
a.filetype=ifnull(a.filetype,0) + #{data.filetypeIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('source')) or (colPickMode==1 and !data.containsKey('source'))"> <if test="(colPickMode==0 and data.containsKey('source')) or (colPickMode==1 and !data.containsKey('source'))">
a.source=#{data.source}, a.source=#{data.source},
</if> </if>
...@@ -114,9 +128,6 @@ ...@@ -114,9 +128,6 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))"> <if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime}, a.updateTime=#{data.updateTime},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('materialName')) or (colPickMode==1 and !data.containsKey('materialName'))">
a.materialName=#{data.materialName},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -141,6 +152,20 @@ ...@@ -141,6 +152,20 @@
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="matterCode=(case" suffix="ELSE matterCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterCode')) or (colPickMode==1 and !item.containsKey('matterCode'))">
when a.id=#{item.id} then #{item.matterCode}
</if>
</foreach>
</trim>
<trim prefix="materialName=(case" suffix="ELSE materialName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('materialName')) or (colPickMode==1 and !item.containsKey('materialName'))">
when a.id=#{item.id} then #{item.materialName}
</if>
</foreach>
</trim>
<trim prefix="fileName=(case" suffix="ELSE fileName end),"> <trim prefix="fileName=(case" suffix="ELSE fileName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('fileName')) or (colPickMode==1 and !item.containsKey('fileName'))"> <if test="(colPickMode==0 and item.containsKey('fileName')) or (colPickMode==1 and !item.containsKey('fileName'))">
...@@ -155,16 +180,18 @@ ...@@ -155,16 +180,18 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="localFileUrl=(case" suffix="ELSE localFileUrl end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('localFileUrl')) or (colPickMode==1 and !item.containsKey('localFileUrl'))">
when a.id=#{item.id} then #{item.localFileUrl}
</if>
</foreach>
</trim>
<trim prefix="filetype=(case" suffix="ELSE filetype end),"> <trim prefix="filetype=(case" suffix="ELSE filetype end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <if test="(colPickMode==0 and item.containsKey('filetype')) or (colPickMode==1 and !item.containsKey('filetype'))">
<when test="(colPickMode==0 and item.containsKey('filetype')) or (colPickMode==1 and !item.containsKey('filetype'))">
when a.id=#{item.id} then #{item.filetype} when a.id=#{item.id} then #{item.filetype}
</when> </if>
<when test="(colPickMode==0 and item.containsKey('filetypeIncrement')) or (colPickMode==1 and !item.containsKey('filetypeIncrement'))">
when a.id=#{item.id} then ifnull(a.filetype,0) + #{item.filetypeIncrement}
</when>
</choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="source=(case" suffix="ELSE source end),"> <trim prefix="source=(case" suffix="ELSE source end),">
...@@ -205,13 +232,6 @@ ...@@ -205,13 +232,6 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="materialName=(case" suffix="ELSE materialName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('materialName')) or (colPickMode==1 and !item.containsKey('materialName'))">
when a.id=#{item.id} then #{item.materialName}
</if>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -356,6 +376,36 @@ ...@@ -356,6 +376,36 @@
</if> </if>
<if test="conditionParamRef.containsKey('matterCode')">
<if test="conditionParamRef.matterCode != null and conditionParamRef.matterCode != ''">
${_conditionType_} a.matterCode like #{${_conditionParam_}.matterCode}
</if>
<if test="conditionParamRef.matterCode == null">
${_conditionType_} a.matterCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('matterCodeList')">
${_conditionType_} a.matterCode in
<foreach collection="conditionParamRef.matterCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('materialName')">
<if test="conditionParamRef.materialName != null and conditionParamRef.materialName != ''">
${_conditionType_} a.materialName like #{${_conditionParam_}.materialName}
</if>
<if test="conditionParamRef.materialName == null">
${_conditionType_} a.materialName is null
</if>
</if>
<if test="conditionParamRef.containsKey('materialNameList')">
${_conditionType_} a.materialName in
<foreach collection="conditionParamRef.materialNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('fileName')"> <if test="conditionParamRef.containsKey('fileName')">
<if test="conditionParamRef.fileName != null and conditionParamRef.fileName != ''"> <if test="conditionParamRef.fileName != null and conditionParamRef.fileName != ''">
${_conditionType_} a.fileName like #{${_conditionParam_}.fileName} ${_conditionType_} a.fileName like #{${_conditionParam_}.fileName}
...@@ -385,9 +435,25 @@ ...@@ -385,9 +435,25 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('localFileUrl')">
<if test="conditionParamRef.localFileUrl != null and conditionParamRef.localFileUrl != ''">
${_conditionType_} a.localFileUrl like #{${_conditionParam_}.localFileUrl}
</if>
<if test="conditionParamRef.localFileUrl == null">
${_conditionType_} a.localFileUrl is null
</if>
</if>
<if test="conditionParamRef.containsKey('localFileUrlList')">
${_conditionType_} a.localFileUrl in
<foreach collection="conditionParamRef.localFileUrlList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('filetype')"> <if test="conditionParamRef.containsKey('filetype')">
<if test="conditionParamRef.filetype != null "> <if test="conditionParamRef.filetype != null and conditionParamRef.filetype != ''">
${_conditionType_} a.filetype = #{${_conditionParam_}.filetype} ${_conditionType_} a.filetype like #{${_conditionParam_}.filetype}
</if> </if>
<if test="conditionParamRef.filetype == null"> <if test="conditionParamRef.filetype == null">
${_conditionType_} a.filetype is null ${_conditionType_} a.filetype is null
...@@ -399,13 +465,6 @@ ...@@ -399,13 +465,6 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('filetypeStart') and conditionParamRef.filetypeStart != null">
${_conditionType_} a.filetype <![CDATA[ >= ]]> #{${_conditionParam_}.filetypeStart}
</if>
<if test="conditionParamRef.containsKey('filetypeEnd') and conditionParamRef.filetypeEnd != null">
${_conditionType_} a.filetype <![CDATA[ <= ]]> #{${_conditionParam_}.filetypeEnd}
</if>
<if test="conditionParamRef.containsKey('source')"> <if test="conditionParamRef.containsKey('source')">
<if test="conditionParamRef.source != null "> <if test="conditionParamRef.source != null ">
${_conditionType_} a.source = #{${_conditionParam_}.source} ${_conditionType_} a.source = #{${_conditionParam_}.source}
...@@ -478,21 +537,6 @@ ...@@ -478,21 +537,6 @@
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''"> <if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') ${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if> </if>
<if test="conditionParamRef.containsKey('materialName')">
<if test="conditionParamRef.materialName != null and conditionParamRef.materialName != ''">
${_conditionType_} a.materialName like #{${_conditionParam_}.materialName}
</if>
<if test="conditionParamRef.materialName == null">
${_conditionType_} a.materialName is null
</if>
</if>
<if test="conditionParamRef.containsKey('materialNameList')">
${_conditionType_} a.materialName in
<foreach collection="conditionParamRef.materialNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -516,6 +560,16 @@ ...@@ -516,6 +560,16 @@
<if test='orderCol.datumId != null and "DESC".equalsIgnoreCase(orderCol.datumId)'>DESC</if> <if test='orderCol.datumId != null and "DESC".equalsIgnoreCase(orderCol.datumId)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('matterCode')">
a.matterCode
<if test='orderCol.matterCode != null and "DESC".equalsIgnoreCase(orderCol.matterCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('materialName')">
a.materialName
<if test='orderCol.materialName != null and "DESC".equalsIgnoreCase(orderCol.materialName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('fileName')"> <if test="orderCol.containsKey('fileName')">
a.fileName a.fileName
<if test='orderCol.fileName != null and "DESC".equalsIgnoreCase(orderCol.fileName)'>DESC</if> <if test='orderCol.fileName != null and "DESC".equalsIgnoreCase(orderCol.fileName)'>DESC</if>
...@@ -526,6 +580,11 @@ ...@@ -526,6 +580,11 @@
<if test='orderCol.fileUrl != null and "DESC".equalsIgnoreCase(orderCol.fileUrl)'>DESC</if> <if test='orderCol.fileUrl != null and "DESC".equalsIgnoreCase(orderCol.fileUrl)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('localFileUrl')">
a.localFileUrl
<if test='orderCol.localFileUrl != null and "DESC".equalsIgnoreCase(orderCol.localFileUrl)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('filetype')"> <if test="orderCol.containsKey('filetype')">
a.filetype a.filetype
<if test='orderCol.filetype != null and "DESC".equalsIgnoreCase(orderCol.filetype)'>DESC</if> <if test='orderCol.filetype != null and "DESC".equalsIgnoreCase(orderCol.filetype)'>DESC</if>
...@@ -551,11 +610,6 @@ ...@@ -551,11 +610,6 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if> <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('materialName')">
a.materialName
<if test='orderCol.materialName != null and "DESC".equalsIgnoreCase(orderCol.materialName)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
<resultMap type="MatterDatumEntity" id="MatterDatumEntity-Map"> <resultMap type="MatterDatumEntity" id="MatterDatumEntity-Map">
<id property="id" column="id" /> <id property="id" column="id" />
<result property="matterId" column="matterId" /> <result property="matterId" column="matterId" />
<result property="matterCode" column="matterCode" />
<result property="matterName" column="matterName" />
<result property="materialName" column="materialName" /> <result property="materialName" column="materialName" />
<result property="isMust" column="isMust" /> <result property="isMust" column="isMust" />
<result property="materialType" column="materialType" /> <result property="materialType" column="materialType" />
...@@ -29,7 +31,6 @@ ...@@ -29,7 +31,6 @@
<result property="createTime" column="createTime" /> <result property="createTime" column="createTime" />
<result property="createUserId" column="createUserId" /> <result property="createUserId" column="createUserId" />
<result property="updateTime" column="updateTime" /> <result property="updateTime" column="updateTime" />
<result property="matterName" column="matterName" />
<collection property="matterDatumFileList" column="id" ofType="MatterDatumFileEntity" javaType="ArrayList" select="getMatterDatumFileByDatumId"></collection> <collection property="matterDatumFileList" column="id" ofType="MatterDatumFileEntity" javaType="ArrayList" select="getMatterDatumFileByDatumId"></collection>
</resultMap> </resultMap>
<resultMap type="MatterDatumFileEntity" id="MatterDatumFileEntity-Map"> <resultMap type="MatterDatumFileEntity" id="MatterDatumFileEntity-Map">
...@@ -50,103 +51,106 @@ ...@@ -50,103 +51,106 @@
<sql id="_columns"> <sql id="_columns">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id as id, a.id,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))">
a.matterId as matterId, a.matterId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterCode') or colPickMode == 1 and data.containsKey('matterCode')))">
a.matterCode,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))">
a.matterName,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('materialName') or colPickMode == 1 and data.containsKey('materialName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('materialName') or colPickMode == 1 and data.containsKey('materialName')))">
a.materialName as materialName, a.materialName,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('isMust') or colPickMode == 1 and data.containsKey('isMust')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('isMust') or colPickMode == 1 and data.containsKey('isMust')))">
a.isMust as isMust, a.isMust,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('materialType') or colPickMode == 1 and data.containsKey('materialType')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('materialType') or colPickMode == 1 and data.containsKey('materialType')))">
a.materialType as materialType, a.materialType,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('materialProperty') or colPickMode == 1 and data.containsKey('materialProperty')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('materialProperty') or colPickMode == 1 and data.containsKey('materialProperty')))">
a.materialProperty as materialProperty, a.materialProperty,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('electronicgs') or colPickMode == 1 and data.containsKey('electronicgs')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('electronicgs') or colPickMode == 1 and data.containsKey('electronicgs')))">
a.electronicgs as electronicgs, a.electronicgs,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('materialSource') or colPickMode == 1 and data.containsKey('materialSource')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('materialSource') or colPickMode == 1 and data.containsKey('materialSource')))">
a.materialSource as materialSource, a.materialSource,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('paperNum') or colPickMode == 1 and data.containsKey('paperNum')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('paperNum') or colPickMode == 1 and data.containsKey('paperNum')))">
a.paperNum as paperNum, a.paperNum,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('paperGg') or colPickMode == 1 and data.containsKey('paperGg')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('paperGg') or colPickMode == 1 and data.containsKey('paperGg')))">
a.paperGg as paperGg, a.paperGg,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('jianmMs') or colPickMode == 1 and data.containsKey('jianmMs')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('jianmMs') or colPickMode == 1 and data.containsKey('jianmMs')))">
a.jianmMs as jianmMs, a.jianmMs,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sealWay') or colPickMode == 1 and data.containsKey('sealWay')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sealWay') or colPickMode == 1 and data.containsKey('sealWay')))">
a.sealWay as sealWay, a.sealWay,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('isjianm') or colPickMode == 1 and data.containsKey('isjianm')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('isjianm') or colPickMode == 1 and data.containsKey('isjianm')))">
a.isjianm as isjianm, a.isjianm,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('isLack') or colPickMode == 1 and data.containsKey('isLack')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('isLack') or colPickMode == 1 and data.containsKey('isLack')))">
a.isLack as isLack, a.isLack,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('ybUrl') or colPickMode == 1 and data.containsKey('ybUrl')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('ybUrl') or colPickMode == 1 and data.containsKey('ybUrl')))">
a.ybUrl as ybUrl, a.ybUrl,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('materialSourceSm') or colPickMode == 1 and data.containsKey('materialSourceSm')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('materialSourceSm') or colPickMode == 1 and data.containsKey('materialSourceSm')))">
a.materialSourceSm as materialSourceSm, a.materialSourceSm,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remarkSub') or colPickMode == 1 and data.containsKey('remarkSub')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remarkSub') or colPickMode == 1 and data.containsKey('remarkSub')))">
a.remarkSub as remarkSub, a.remarkSub,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('clauseContent') or colPickMode == 1 and data.containsKey('clauseContent')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('clauseContent') or colPickMode == 1 and data.containsKey('clauseContent')))">
a.clauseContent as clauseContent, a.clauseContent,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('summary') or colPickMode == 1 and data.containsKey('summary')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('summary') or colPickMode == 1 and data.containsKey('summary')))">
a.summary as summary, a.summary,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))">
a.remark as remark, a.remark,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))">
a.source as source, a.source,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime as createTime, a.createTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId as createUserId, a.createUserId,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime as updateTime, a.updateTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))">
a.matterName as matterName,
</if> </if>
</trim> </trim>
</sql> </sql>
<!-- 子表所有列 --> <!-- 子表所有列 -->
<sql id="_columns_sub"> <sql id="_columns_sub">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
b.id as id,b.datumId as datumId,b.fileName as fileName,b.fileUrl as fileUrl,b.filetype as filetype,b.source as source,b.createTime as createTime,b.createUserId as createUserId,b.updateTime as updateTime,b.materialName as materialName, b.id,b.datumId,b.fileName,b.fileUrl,b.filetype,b.source,b.createTime,b.createUserId,b.updateTime,b.materialName,
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="MatterDatumEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="MatterDatumEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_matter_datum insert into mortals_sys_matter_datum
(matterId,materialName,isMust,materialType,materialProperty,electronicgs,materialSource,paperNum,paperGg,jianmMs,sealWay,isjianm,isLack,ybUrl,materialSourceSm,remarkSub,clauseContent,summary,remark,source,createTime,createUserId,updateTime,matterName) (matterId,matterCode,matterName,materialName,isMust,materialType,materialProperty,electronicgs,materialSource,paperNum,paperGg,jianmMs,sealWay,isjianm,isLack,ybUrl,materialSourceSm,remarkSub,clauseContent,summary,remark,source,createTime,createUserId,updateTime)
VALUES VALUES
(#{matterId},#{materialName},#{isMust},#{materialType},#{materialProperty},#{electronicgs},#{materialSource},#{paperNum},#{paperGg},#{jianmMs},#{sealWay},#{isjianm},#{isLack},#{ybUrl},#{materialSourceSm},#{remarkSub},#{clauseContent},#{summary},#{remark},#{source},#{createTime},#{createUserId},#{updateTime},#{matterName}) (#{matterId},#{matterCode},#{matterName},#{materialName},#{isMust},#{materialType},#{materialProperty},#{electronicgs},#{materialSource},#{paperNum},#{paperGg},#{jianmMs},#{sealWay},#{isjianm},#{isLack},#{ybUrl},#{materialSourceSm},#{remarkSub},#{clauseContent},#{summary},#{remark},#{source},#{createTime},#{createUserId},#{updateTime})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_matter_datum insert into mortals_sys_matter_datum
(matterId,materialName,isMust,materialType,materialProperty,electronicgs,materialSource,paperNum,paperGg,jianmMs,sealWay,isjianm,isLack,ybUrl,materialSourceSm,remarkSub,clauseContent,summary,remark,source,createTime,createUserId,updateTime,matterName) (matterId,matterCode,matterName,materialName,isMust,materialType,materialProperty,electronicgs,materialSource,paperNum,paperGg,jianmMs,sealWay,isjianm,isLack,ybUrl,materialSourceSm,remarkSub,clauseContent,summary,remark,source,createTime,createUserId,updateTime)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.matterId},#{item.materialName},#{item.isMust},#{item.materialType},#{item.materialProperty},#{item.electronicgs},#{item.materialSource},#{item.paperNum},#{item.paperGg},#{item.jianmMs},#{item.sealWay},#{item.isjianm},#{item.isLack},#{item.ybUrl},#{item.materialSourceSm},#{item.remarkSub},#{item.clauseContent},#{item.summary},#{item.remark},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime},#{item.matterName}) (#{item.matterId},#{item.matterCode},#{item.matterName},#{item.materialName},#{item.isMust},#{item.materialType},#{item.materialProperty},#{item.electronicgs},#{item.materialSource},#{item.paperNum},#{item.paperGg},#{item.jianmMs},#{item.sealWay},#{item.isjianm},#{item.isLack},#{item.ybUrl},#{item.materialSourceSm},#{item.remarkSub},#{item.clauseContent},#{item.summary},#{item.remark},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime})
</foreach> </foreach>
</insert> </insert>
...@@ -162,6 +166,12 @@ ...@@ -162,6 +166,12 @@
<if test="(colPickMode==0 and data.containsKey('matterIdIncrement')) or (colPickMode==1 and !data.containsKey('matterIdIncrement'))"> <if test="(colPickMode==0 and data.containsKey('matterIdIncrement')) or (colPickMode==1 and !data.containsKey('matterIdIncrement'))">
a.matterId=ifnull(a.matterId,0) + #{data.matterIdIncrement}, a.matterId=ifnull(a.matterId,0) + #{data.matterIdIncrement},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('matterCode')) or (colPickMode==1 and !data.containsKey('matterCode'))">
a.matterCode=#{data.matterCode},
</if>
<if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))">
a.matterName=#{data.matterName},
</if>
<if test="(colPickMode==0 and data.containsKey('materialName')) or (colPickMode==1 and !data.containsKey('materialName'))"> <if test="(colPickMode==0 and data.containsKey('materialName')) or (colPickMode==1 and !data.containsKey('materialName'))">
a.materialName=#{data.materialName}, a.materialName=#{data.materialName},
</if> </if>
...@@ -237,9 +247,6 @@ ...@@ -237,9 +247,6 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))"> <if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime}, a.updateTime=#{data.updateTime},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))">
a.matterName=#{data.matterName},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -264,6 +271,20 @@ ...@@ -264,6 +271,20 @@
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="matterCode=(case" suffix="ELSE matterCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterCode')) or (colPickMode==1 and !item.containsKey('matterCode'))">
when a.id=#{item.id} then #{item.matterCode}
</if>
</foreach>
</trim>
<trim prefix="matterName=(case" suffix="ELSE matterName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterName')) or (colPickMode==1 and !item.containsKey('matterName'))">
when a.id=#{item.id} then #{item.matterName}
</if>
</foreach>
</trim>
<trim prefix="materialName=(case" suffix="ELSE materialName end),"> <trim prefix="materialName=(case" suffix="ELSE materialName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('materialName')) or (colPickMode==1 and !item.containsKey('materialName'))"> <if test="(colPickMode==0 and item.containsKey('materialName')) or (colPickMode==1 and !item.containsKey('materialName'))">
...@@ -433,13 +454,6 @@ ...@@ -433,13 +454,6 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="matterName=(case" suffix="ELSE matterName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterName')) or (colPickMode==1 and !item.containsKey('matterName'))">
when a.id=#{item.id} then #{item.matterName}
</if>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -592,6 +606,36 @@ ...@@ -592,6 +606,36 @@
</if> </if>
<if test="conditionParamRef.containsKey('matterCode')">
<if test="conditionParamRef.matterCode != null and conditionParamRef.matterCode != ''">
${_conditionType_} a.matterCode like #{${_conditionParam_}.matterCode}
</if>
<if test="conditionParamRef.matterCode == null">
${_conditionType_} a.matterCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('matterCodeList')">
${_conditionType_} a.matterCode in
<foreach collection="conditionParamRef.matterCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('matterName')">
<if test="conditionParamRef.matterName != null and conditionParamRef.matterName != ''">
${_conditionType_} a.matterName like #{${_conditionParam_}.matterName}
</if>
<if test="conditionParamRef.matterName == null">
${_conditionType_} a.matterName is null
</if>
</if>
<if test="conditionParamRef.containsKey('matterNameList')">
${_conditionType_} a.matterName in
<foreach collection="conditionParamRef.matterNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('materialName')"> <if test="conditionParamRef.containsKey('materialName')">
<if test="conditionParamRef.materialName != null and conditionParamRef.materialName != ''"> <if test="conditionParamRef.materialName != null and conditionParamRef.materialName != ''">
${_conditionType_} a.materialName like #{${_conditionParam_}.materialName} ${_conditionType_} a.materialName like #{${_conditionParam_}.materialName}
...@@ -939,21 +983,6 @@ ...@@ -939,21 +983,6 @@
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''"> <if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') ${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if> </if>
<if test="conditionParamRef.containsKey('matterName')">
<if test="conditionParamRef.matterName != null and conditionParamRef.matterName != ''">
${_conditionType_} a.matterName like #{${_conditionParam_}.matterName}
</if>
<if test="conditionParamRef.matterName == null">
${_conditionType_} a.matterName is null
</if>
</if>
<if test="conditionParamRef.containsKey('matterNameList')">
${_conditionType_} a.matterName in
<foreach collection="conditionParamRef.matterNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -977,6 +1006,16 @@ ...@@ -977,6 +1006,16 @@
<if test='orderCol.matterId != null and "DESC".equalsIgnoreCase(orderCol.matterId)'>DESC</if> <if test='orderCol.matterId != null and "DESC".equalsIgnoreCase(orderCol.matterId)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('matterCode')">
a.matterCode
<if test='orderCol.matterCode != null and "DESC".equalsIgnoreCase(orderCol.matterCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('matterName')">
a.matterName
<if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('materialName')"> <if test="orderCol.containsKey('materialName')">
a.materialName a.materialName
<if test='orderCol.materialName != null and "DESC".equalsIgnoreCase(orderCol.materialName)'>DESC</if> <if test='orderCol.materialName != null and "DESC".equalsIgnoreCase(orderCol.materialName)'>DESC</if>
...@@ -1087,11 +1126,6 @@ ...@@ -1087,11 +1126,6 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if> <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('matterName')">
a.matterName
<if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<resultMap type="MatterFlowlimitEntity" id="MatterFlowlimitEntity-Map"> <resultMap type="MatterFlowlimitEntity" id="MatterFlowlimitEntity-Map">
<id property="id" column="id" /> <id property="id" column="id" />
<result property="matterId" column="matterId" /> <result property="matterId" column="matterId" />
<result property="matterCode" column="matterCode" />
<result property="matterName" column="matterName" /> <result property="matterName" column="matterName" />
<result property="flowName" column="flowName" /> <result property="flowName" column="flowName" />
<result property="flowTime" column="flowTime" /> <result property="flowTime" column="flowTime" />
...@@ -24,55 +25,58 @@ ...@@ -24,55 +25,58 @@
<sql id="_columns"> <sql id="_columns">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id as id, a.id,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))">
a.matterId as matterId, a.matterId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterCode') or colPickMode == 1 and data.containsKey('matterCode')))">
a.matterCode,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))">
a.matterName as matterName, a.matterName,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('flowName') or colPickMode == 1 and data.containsKey('flowName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('flowName') or colPickMode == 1 and data.containsKey('flowName')))">
a.flowName as flowName, a.flowName,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('flowTime') or colPickMode == 1 and data.containsKey('flowTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('flowTime') or colPickMode == 1 and data.containsKey('flowTime')))">
a.flowTime as flowTime, a.flowTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('flowLimit') or colPickMode == 1 and data.containsKey('flowLimit')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('flowLimit') or colPickMode == 1 and data.containsKey('flowLimit')))">
a.flowLimit as flowLimit, a.flowLimit,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('flowDesc') or colPickMode == 1 and data.containsKey('flowDesc')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('flowDesc') or colPickMode == 1 and data.containsKey('flowDesc')))">
a.flowDesc as flowDesc, a.flowDesc,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))">
a.source as source, a.source,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime as createTime, a.createTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId as createUserId, a.createUserId,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime as updateTime, a.updateTime,
</if> </if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="MatterFlowlimitEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="MatterFlowlimitEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_matter_flowlimit insert into mortals_sys_matter_flowlimit
(matterId,matterName,flowName,flowTime,flowLimit,flowDesc,source,createTime,createUserId,updateTime) (matterId,matterCode,matterName,flowName,flowTime,flowLimit,flowDesc,source,createTime,createUserId,updateTime)
VALUES VALUES
(#{matterId},#{matterName},#{flowName},#{flowTime},#{flowLimit},#{flowDesc},#{source},#{createTime},#{createUserId},#{updateTime}) (#{matterId},#{matterCode},#{matterName},#{flowName},#{flowTime},#{flowLimit},#{flowDesc},#{source},#{createTime},#{createUserId},#{updateTime})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_matter_flowlimit insert into mortals_sys_matter_flowlimit
(matterId,matterName,flowName,flowTime,flowLimit,flowDesc,source,createTime,createUserId,updateTime) (matterId,matterCode,matterName,flowName,flowTime,flowLimit,flowDesc,source,createTime,createUserId,updateTime)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.matterId},#{item.matterName},#{item.flowName},#{item.flowTime},#{item.flowLimit},#{item.flowDesc},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime}) (#{item.matterId},#{item.matterCode},#{item.matterName},#{item.flowName},#{item.flowTime},#{item.flowLimit},#{item.flowDesc},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime})
</foreach> </foreach>
</insert> </insert>
...@@ -88,6 +92,9 @@ ...@@ -88,6 +92,9 @@
<if test="(colPickMode==0 and data.containsKey('matterIdIncrement')) or (colPickMode==1 and !data.containsKey('matterIdIncrement'))"> <if test="(colPickMode==0 and data.containsKey('matterIdIncrement')) or (colPickMode==1 and !data.containsKey('matterIdIncrement'))">
a.matterId=ifnull(a.matterId,0) + #{data.matterIdIncrement}, a.matterId=ifnull(a.matterId,0) + #{data.matterIdIncrement},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('matterCode')) or (colPickMode==1 and !data.containsKey('matterCode'))">
a.matterCode=#{data.matterCode},
</if>
<if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))"> <if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))">
a.matterName=#{data.matterName}, a.matterName=#{data.matterName},
</if> </if>
...@@ -145,6 +152,13 @@ ...@@ -145,6 +152,13 @@
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="matterCode=(case" suffix="ELSE matterCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterCode')) or (colPickMode==1 and !item.containsKey('matterCode'))">
when a.id=#{item.id} then #{item.matterCode}
</if>
</foreach>
</trim>
<trim prefix="matterName=(case" suffix="ELSE matterName end),"> <trim prefix="matterName=(case" suffix="ELSE matterName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterName')) or (colPickMode==1 and !item.containsKey('matterName'))"> <if test="(colPickMode==0 and item.containsKey('matterName')) or (colPickMode==1 and !item.containsKey('matterName'))">
...@@ -362,6 +376,21 @@ ...@@ -362,6 +376,21 @@
</if> </if>
<if test="conditionParamRef.containsKey('matterCode')">
<if test="conditionParamRef.matterCode != null and conditionParamRef.matterCode != ''">
${_conditionType_} a.matterCode like #{${_conditionParam_}.matterCode}
</if>
<if test="conditionParamRef.matterCode == null">
${_conditionType_} a.matterCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('matterCodeList')">
${_conditionType_} a.matterCode in
<foreach collection="conditionParamRef.matterCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('matterName')"> <if test="conditionParamRef.containsKey('matterName')">
<if test="conditionParamRef.matterName != null and conditionParamRef.matterName != ''"> <if test="conditionParamRef.matterName != null and conditionParamRef.matterName != ''">
${_conditionType_} a.matterName like #{${_conditionParam_}.matterName} ${_conditionType_} a.matterName like #{${_conditionParam_}.matterName}
...@@ -531,6 +560,11 @@ ...@@ -531,6 +560,11 @@
<if test='orderCol.matterId != null and "DESC".equalsIgnoreCase(orderCol.matterId)'>DESC</if> <if test='orderCol.matterId != null and "DESC".equalsIgnoreCase(orderCol.matterId)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('matterCode')">
a.matterCode
<if test='orderCol.matterCode != null and "DESC".equalsIgnoreCase(orderCol.matterCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('matterName')"> <if test="orderCol.containsKey('matterName')">
a.matterName a.matterName
<if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if> <if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if>
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<resultMap type="MatterIntermediaryEntity" id="MatterIntermediaryEntity-Map"> <resultMap type="MatterIntermediaryEntity" id="MatterIntermediaryEntity-Map">
<id property="id" column="id" /> <id property="id" column="id" />
<result property="matterId" column="matterId" /> <result property="matterId" column="matterId" />
<result property="matterCode" column="matterCode" />
<result property="matterName" column="matterName" /> <result property="matterName" column="matterName" />
<result property="title" column="title" /> <result property="title" column="title" />
<result property="intermediaryRequest" column="intermediaryRequest" /> <result property="intermediaryRequest" column="intermediaryRequest" />
...@@ -24,55 +25,58 @@ ...@@ -24,55 +25,58 @@
<sql id="_columns"> <sql id="_columns">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id as id, a.id,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))">
a.matterId as matterId, a.matterId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterCode') or colPickMode == 1 and data.containsKey('matterCode')))">
a.matterCode,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))">
a.matterName as matterName, a.matterName,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('title') or colPickMode == 1 and data.containsKey('title')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('title') or colPickMode == 1 and data.containsKey('title')))">
a.title as title, a.title,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('intermediaryRequest') or colPickMode == 1 and data.containsKey('intermediaryRequest')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('intermediaryRequest') or colPickMode == 1 and data.containsKey('intermediaryRequest')))">
a.intermediaryRequest as intermediaryRequest, a.intermediaryRequest,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('intermediaryRequestTime') or colPickMode == 1 and data.containsKey('intermediaryRequestTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('intermediaryRequestTime') or colPickMode == 1 and data.containsKey('intermediaryRequestTime')))">
a.intermediaryRequestTime as intermediaryRequestTime, a.intermediaryRequestTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))">
a.remark as remark, a.remark,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))">
a.source as source, a.source,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime as createTime, a.createTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId as createUserId, a.createUserId,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime as updateTime, a.updateTime,
</if> </if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="MatterIntermediaryEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="MatterIntermediaryEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_matter_intermediary insert into mortals_sys_matter_intermediary
(matterId,matterName,title,intermediaryRequest,intermediaryRequestTime,remark,source,createTime,createUserId,updateTime) (matterId,matterCode,matterName,title,intermediaryRequest,intermediaryRequestTime,remark,source,createTime,createUserId,updateTime)
VALUES VALUES
(#{matterId},#{matterName},#{title},#{intermediaryRequest},#{intermediaryRequestTime},#{remark},#{source},#{createTime},#{createUserId},#{updateTime}) (#{matterId},#{matterCode},#{matterName},#{title},#{intermediaryRequest},#{intermediaryRequestTime},#{remark},#{source},#{createTime},#{createUserId},#{updateTime})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_matter_intermediary insert into mortals_sys_matter_intermediary
(matterId,matterName,title,intermediaryRequest,intermediaryRequestTime,remark,source,createTime,createUserId,updateTime) (matterId,matterCode,matterName,title,intermediaryRequest,intermediaryRequestTime,remark,source,createTime,createUserId,updateTime)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.matterId},#{item.matterName},#{item.title},#{item.intermediaryRequest},#{item.intermediaryRequestTime},#{item.remark},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime}) (#{item.matterId},#{item.matterCode},#{item.matterName},#{item.title},#{item.intermediaryRequest},#{item.intermediaryRequestTime},#{item.remark},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime})
</foreach> </foreach>
</insert> </insert>
...@@ -88,6 +92,9 @@ ...@@ -88,6 +92,9 @@
<if test="(colPickMode==0 and data.containsKey('matterIdIncrement')) or (colPickMode==1 and !data.containsKey('matterIdIncrement'))"> <if test="(colPickMode==0 and data.containsKey('matterIdIncrement')) or (colPickMode==1 and !data.containsKey('matterIdIncrement'))">
a.matterId=ifnull(a.matterId,0) + #{data.matterIdIncrement}, a.matterId=ifnull(a.matterId,0) + #{data.matterIdIncrement},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('matterCode')) or (colPickMode==1 and !data.containsKey('matterCode'))">
a.matterCode=#{data.matterCode},
</if>
<if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))"> <if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))">
a.matterName=#{data.matterName}, a.matterName=#{data.matterName},
</if> </if>
...@@ -145,6 +152,13 @@ ...@@ -145,6 +152,13 @@
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="matterCode=(case" suffix="ELSE matterCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterCode')) or (colPickMode==1 and !item.containsKey('matterCode'))">
when a.id=#{item.id} then #{item.matterCode}
</if>
</foreach>
</trim>
<trim prefix="matterName=(case" suffix="ELSE matterName end),"> <trim prefix="matterName=(case" suffix="ELSE matterName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterName')) or (colPickMode==1 and !item.containsKey('matterName'))"> <if test="(colPickMode==0 and item.containsKey('matterName')) or (colPickMode==1 and !item.containsKey('matterName'))">
...@@ -362,6 +376,21 @@ ...@@ -362,6 +376,21 @@
</if> </if>
<if test="conditionParamRef.containsKey('matterCode')">
<if test="conditionParamRef.matterCode != null and conditionParamRef.matterCode != ''">
${_conditionType_} a.matterCode like #{${_conditionParam_}.matterCode}
</if>
<if test="conditionParamRef.matterCode == null">
${_conditionType_} a.matterCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('matterCodeList')">
${_conditionType_} a.matterCode in
<foreach collection="conditionParamRef.matterCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('matterName')"> <if test="conditionParamRef.containsKey('matterName')">
<if test="conditionParamRef.matterName != null and conditionParamRef.matterName != ''"> <if test="conditionParamRef.matterName != null and conditionParamRef.matterName != ''">
${_conditionType_} a.matterName like #{${_conditionParam_}.matterName} ${_conditionType_} a.matterName like #{${_conditionParam_}.matterName}
...@@ -531,6 +560,11 @@ ...@@ -531,6 +560,11 @@
<if test='orderCol.matterId != null and "DESC".equalsIgnoreCase(orderCol.matterId)'>DESC</if> <if test='orderCol.matterId != null and "DESC".equalsIgnoreCase(orderCol.matterId)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('matterCode')">
a.matterCode
<if test='orderCol.matterCode != null and "DESC".equalsIgnoreCase(orderCol.matterCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('matterName')"> <if test="orderCol.containsKey('matterName')">
a.matterName a.matterName
<if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if> <if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if>
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<result property="matterNo" column="matterNo" /> <result property="matterNo" column="matterNo" />
<result property="areaCode" column="areaCode" /> <result property="areaCode" column="areaCode" />
<result property="deptCode" column="deptCode" /> <result property="deptCode" column="deptCode" />
<result property="deptName" column="deptName" />
<result property="powerCode" column="powerCode" /> <result property="powerCode" column="powerCode" />
<result property="themeCode" column="themeCode" /> <result property="themeCode" column="themeCode" />
<result property="usertypeCode" column="usertypeCode" /> <result property="usertypeCode" column="usertypeCode" />
...@@ -118,6 +119,9 @@ ...@@ -118,6 +119,9 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptCode') or colPickMode == 1 and data.containsKey('deptCode')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptCode') or colPickMode == 1 and data.containsKey('deptCode')))">
a.deptCode, a.deptCode,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptName') or colPickMode == 1 and data.containsKey('deptName')))">
a.deptName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('powerCode') or colPickMode == 1 and data.containsKey('powerCode')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('powerCode') or colPickMode == 1 and data.containsKey('powerCode')))">
a.powerCode, a.powerCode,
</if> </if>
...@@ -321,18 +325,18 @@ ...@@ -321,18 +325,18 @@
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="MatterEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="MatterEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_matter insert into mortals_sys_matter
(siteId,tid,tcode,tname,matterName,englishName,matterNo,areaCode,deptCode,powerCode,themeCode,usertypeCode,groupName,url,haveGetMatterInfo,belongDept,appoveObjectShow,operatScopeShow,appoveTimeLimitShow,handleType,legalTimeLimitShow,legalEndExplain,promiseTimeLimitShow,promiseEndExplain,isChargesShow,certificationLevelsShow,planTakeTime,promiseTakeTime,specialProcedure,windowToTheSceneNum,isOnlineSubscribeShow,isExpressTakeShow,isProvinceAcquisitionShow,isApplyProvinceShow,mustSceneExplain,onlineType,onlineToTheSceneNum,onlineOperatDeep,isExpressTakeOnlineShow,isDoorTakeShow,onlineMustSceneExplain,performDeptType,matterEdition,eventTypeShow,performHierarchyShow,powerSourceShow,performDeptTypeShow,goveServiceCenterShow,isConvenientCenterShow,terminalHandle,isOnline,isOnlinePayShow,entrustmentDepartmen,jointInfoShow,matterStatus,numberLimit,type,baseCode,implementCode,implementBodyCode,operateItemCode,townshipName,townshipCode,villageName,villageCode,operateTime,operateSite,cousultingShow,cousultingTelephoneShow,superviseShow,sort,source,createTime,createUserId,updateTime) (siteId,tid,tcode,tname,matterName,englishName,matterNo,areaCode,deptCode,deptName,powerCode,themeCode,usertypeCode,groupName,url,haveGetMatterInfo,belongDept,appoveObjectShow,operatScopeShow,appoveTimeLimitShow,handleType,legalTimeLimitShow,legalEndExplain,promiseTimeLimitShow,promiseEndExplain,isChargesShow,certificationLevelsShow,planTakeTime,promiseTakeTime,specialProcedure,windowToTheSceneNum,isOnlineSubscribeShow,isExpressTakeShow,isProvinceAcquisitionShow,isApplyProvinceShow,mustSceneExplain,onlineType,onlineToTheSceneNum,onlineOperatDeep,isExpressTakeOnlineShow,isDoorTakeShow,onlineMustSceneExplain,performDeptType,matterEdition,eventTypeShow,performHierarchyShow,powerSourceShow,performDeptTypeShow,goveServiceCenterShow,isConvenientCenterShow,terminalHandle,isOnline,isOnlinePayShow,entrustmentDepartmen,jointInfoShow,matterStatus,numberLimit,type,baseCode,implementCode,implementBodyCode,operateItemCode,townshipName,townshipCode,villageName,villageCode,operateTime,operateSite,cousultingShow,cousultingTelephoneShow,superviseShow,sort,source,createTime,createUserId,updateTime)
VALUES VALUES
(#{siteId},#{tid},#{tcode},#{tname},#{matterName},#{englishName},#{matterNo},#{areaCode},#{deptCode},#{powerCode},#{themeCode},#{usertypeCode},#{groupName},#{url},#{haveGetMatterInfo},#{belongDept},#{appoveObjectShow},#{operatScopeShow},#{appoveTimeLimitShow},#{handleType},#{legalTimeLimitShow},#{legalEndExplain},#{promiseTimeLimitShow},#{promiseEndExplain},#{isChargesShow},#{certificationLevelsShow},#{planTakeTime},#{promiseTakeTime},#{specialProcedure},#{windowToTheSceneNum},#{isOnlineSubscribeShow},#{isExpressTakeShow},#{isProvinceAcquisitionShow},#{isApplyProvinceShow},#{mustSceneExplain},#{onlineType},#{onlineToTheSceneNum},#{onlineOperatDeep},#{isExpressTakeOnlineShow},#{isDoorTakeShow},#{onlineMustSceneExplain},#{performDeptType},#{matterEdition},#{eventTypeShow},#{performHierarchyShow},#{powerSourceShow},#{performDeptTypeShow},#{goveServiceCenterShow},#{isConvenientCenterShow},#{terminalHandle},#{isOnline},#{isOnlinePayShow},#{entrustmentDepartmen},#{jointInfoShow},#{matterStatus},#{numberLimit},#{type},#{baseCode},#{implementCode},#{implementBodyCode},#{operateItemCode},#{townshipName},#{townshipCode},#{villageName},#{villageCode},#{operateTime},#{operateSite},#{cousultingShow},#{cousultingTelephoneShow},#{superviseShow},#{sort},#{source},#{createTime},#{createUserId},#{updateTime}) (#{siteId},#{tid},#{tcode},#{tname},#{matterName},#{englishName},#{matterNo},#{areaCode},#{deptCode},#{deptName},#{powerCode},#{themeCode},#{usertypeCode},#{groupName},#{url},#{haveGetMatterInfo},#{belongDept},#{appoveObjectShow},#{operatScopeShow},#{appoveTimeLimitShow},#{handleType},#{legalTimeLimitShow},#{legalEndExplain},#{promiseTimeLimitShow},#{promiseEndExplain},#{isChargesShow},#{certificationLevelsShow},#{planTakeTime},#{promiseTakeTime},#{specialProcedure},#{windowToTheSceneNum},#{isOnlineSubscribeShow},#{isExpressTakeShow},#{isProvinceAcquisitionShow},#{isApplyProvinceShow},#{mustSceneExplain},#{onlineType},#{onlineToTheSceneNum},#{onlineOperatDeep},#{isExpressTakeOnlineShow},#{isDoorTakeShow},#{onlineMustSceneExplain},#{performDeptType},#{matterEdition},#{eventTypeShow},#{performHierarchyShow},#{powerSourceShow},#{performDeptTypeShow},#{goveServiceCenterShow},#{isConvenientCenterShow},#{terminalHandle},#{isOnline},#{isOnlinePayShow},#{entrustmentDepartmen},#{jointInfoShow},#{matterStatus},#{numberLimit},#{type},#{baseCode},#{implementCode},#{implementBodyCode},#{operateItemCode},#{townshipName},#{townshipCode},#{villageName},#{villageCode},#{operateTime},#{operateSite},#{cousultingShow},#{cousultingTelephoneShow},#{superviseShow},#{sort},#{source},#{createTime},#{createUserId},#{updateTime})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_matter insert into mortals_sys_matter
(siteId,tid,tcode,tname,matterName,englishName,matterNo,areaCode,deptCode,powerCode,themeCode,usertypeCode,groupName,url,haveGetMatterInfo,belongDept,appoveObjectShow,operatScopeShow,appoveTimeLimitShow,handleType,legalTimeLimitShow,legalEndExplain,promiseTimeLimitShow,promiseEndExplain,isChargesShow,certificationLevelsShow,planTakeTime,promiseTakeTime,specialProcedure,windowToTheSceneNum,isOnlineSubscribeShow,isExpressTakeShow,isProvinceAcquisitionShow,isApplyProvinceShow,mustSceneExplain,onlineType,onlineToTheSceneNum,onlineOperatDeep,isExpressTakeOnlineShow,isDoorTakeShow,onlineMustSceneExplain,performDeptType,matterEdition,eventTypeShow,performHierarchyShow,powerSourceShow,performDeptTypeShow,goveServiceCenterShow,isConvenientCenterShow,terminalHandle,isOnline,isOnlinePayShow,entrustmentDepartmen,jointInfoShow,matterStatus,numberLimit,type,baseCode,implementCode,implementBodyCode,operateItemCode,townshipName,townshipCode,villageName,villageCode,operateTime,operateSite,cousultingShow,cousultingTelephoneShow,superviseShow,sort,source,createTime,createUserId,updateTime) (siteId,tid,tcode,tname,matterName,englishName,matterNo,areaCode,deptCode,deptName,powerCode,themeCode,usertypeCode,groupName,url,haveGetMatterInfo,belongDept,appoveObjectShow,operatScopeShow,appoveTimeLimitShow,handleType,legalTimeLimitShow,legalEndExplain,promiseTimeLimitShow,promiseEndExplain,isChargesShow,certificationLevelsShow,planTakeTime,promiseTakeTime,specialProcedure,windowToTheSceneNum,isOnlineSubscribeShow,isExpressTakeShow,isProvinceAcquisitionShow,isApplyProvinceShow,mustSceneExplain,onlineType,onlineToTheSceneNum,onlineOperatDeep,isExpressTakeOnlineShow,isDoorTakeShow,onlineMustSceneExplain,performDeptType,matterEdition,eventTypeShow,performHierarchyShow,powerSourceShow,performDeptTypeShow,goveServiceCenterShow,isConvenientCenterShow,terminalHandle,isOnline,isOnlinePayShow,entrustmentDepartmen,jointInfoShow,matterStatus,numberLimit,type,baseCode,implementCode,implementBodyCode,operateItemCode,townshipName,townshipCode,villageName,villageCode,operateTime,operateSite,cousultingShow,cousultingTelephoneShow,superviseShow,sort,source,createTime,createUserId,updateTime)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.siteId},#{item.tid},#{item.tcode},#{item.tname},#{item.matterName},#{item.englishName},#{item.matterNo},#{item.areaCode},#{item.deptCode},#{item.powerCode},#{item.themeCode},#{item.usertypeCode},#{item.groupName},#{item.url},#{item.haveGetMatterInfo},#{item.belongDept},#{item.appoveObjectShow},#{item.operatScopeShow},#{item.appoveTimeLimitShow},#{item.handleType},#{item.legalTimeLimitShow},#{item.legalEndExplain},#{item.promiseTimeLimitShow},#{item.promiseEndExplain},#{item.isChargesShow},#{item.certificationLevelsShow},#{item.planTakeTime},#{item.promiseTakeTime},#{item.specialProcedure},#{item.windowToTheSceneNum},#{item.isOnlineSubscribeShow},#{item.isExpressTakeShow},#{item.isProvinceAcquisitionShow},#{item.isApplyProvinceShow},#{item.mustSceneExplain},#{item.onlineType},#{item.onlineToTheSceneNum},#{item.onlineOperatDeep},#{item.isExpressTakeOnlineShow},#{item.isDoorTakeShow},#{item.onlineMustSceneExplain},#{item.performDeptType},#{item.matterEdition},#{item.eventTypeShow},#{item.performHierarchyShow},#{item.powerSourceShow},#{item.performDeptTypeShow},#{item.goveServiceCenterShow},#{item.isConvenientCenterShow},#{item.terminalHandle},#{item.isOnline},#{item.isOnlinePayShow},#{item.entrustmentDepartmen},#{item.jointInfoShow},#{item.matterStatus},#{item.numberLimit},#{item.type},#{item.baseCode},#{item.implementCode},#{item.implementBodyCode},#{item.operateItemCode},#{item.townshipName},#{item.townshipCode},#{item.villageName},#{item.villageCode},#{item.operateTime},#{item.operateSite},#{item.cousultingShow},#{item.cousultingTelephoneShow},#{item.superviseShow},#{item.sort},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime}) (#{item.siteId},#{item.tid},#{item.tcode},#{item.tname},#{item.matterName},#{item.englishName},#{item.matterNo},#{item.areaCode},#{item.deptCode},#{item.deptName},#{item.powerCode},#{item.themeCode},#{item.usertypeCode},#{item.groupName},#{item.url},#{item.haveGetMatterInfo},#{item.belongDept},#{item.appoveObjectShow},#{item.operatScopeShow},#{item.appoveTimeLimitShow},#{item.handleType},#{item.legalTimeLimitShow},#{item.legalEndExplain},#{item.promiseTimeLimitShow},#{item.promiseEndExplain},#{item.isChargesShow},#{item.certificationLevelsShow},#{item.planTakeTime},#{item.promiseTakeTime},#{item.specialProcedure},#{item.windowToTheSceneNum},#{item.isOnlineSubscribeShow},#{item.isExpressTakeShow},#{item.isProvinceAcquisitionShow},#{item.isApplyProvinceShow},#{item.mustSceneExplain},#{item.onlineType},#{item.onlineToTheSceneNum},#{item.onlineOperatDeep},#{item.isExpressTakeOnlineShow},#{item.isDoorTakeShow},#{item.onlineMustSceneExplain},#{item.performDeptType},#{item.matterEdition},#{item.eventTypeShow},#{item.performHierarchyShow},#{item.powerSourceShow},#{item.performDeptTypeShow},#{item.goveServiceCenterShow},#{item.isConvenientCenterShow},#{item.terminalHandle},#{item.isOnline},#{item.isOnlinePayShow},#{item.entrustmentDepartmen},#{item.jointInfoShow},#{item.matterStatus},#{item.numberLimit},#{item.type},#{item.baseCode},#{item.implementCode},#{item.implementBodyCode},#{item.operateItemCode},#{item.townshipName},#{item.townshipCode},#{item.villageName},#{item.villageCode},#{item.operateTime},#{item.operateSite},#{item.cousultingShow},#{item.cousultingTelephoneShow},#{item.superviseShow},#{item.sort},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime})
</foreach> </foreach>
</insert> </insert>
...@@ -372,6 +376,9 @@ ...@@ -372,6 +376,9 @@
<if test="(colPickMode==0 and data.containsKey('deptCode')) or (colPickMode==1 and !data.containsKey('deptCode'))"> <if test="(colPickMode==0 and data.containsKey('deptCode')) or (colPickMode==1 and !data.containsKey('deptCode'))">
a.deptCode=#{data.deptCode}, a.deptCode=#{data.deptCode},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('deptName')) or (colPickMode==1 and !data.containsKey('deptName'))">
a.deptName=#{data.deptName},
</if>
<if test="(colPickMode==0 and data.containsKey('powerCode')) or (colPickMode==1 and !data.containsKey('powerCode'))"> <if test="(colPickMode==0 and data.containsKey('powerCode')) or (colPickMode==1 and !data.containsKey('powerCode'))">
a.powerCode=#{data.powerCode}, a.powerCode=#{data.powerCode},
</if> </if>
...@@ -668,6 +675,13 @@ ...@@ -668,6 +675,13 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="deptName=(case" suffix="ELSE deptName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('deptName')) or (colPickMode==1 and !item.containsKey('deptName'))">
when a.id=#{item.id} then #{item.deptName}
</if>
</foreach>
</trim>
<trim prefix="powerCode=(case" suffix="ELSE powerCode end),"> <trim prefix="powerCode=(case" suffix="ELSE powerCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('powerCode')) or (colPickMode==1 and !item.containsKey('powerCode'))"> <if test="(colPickMode==0 and item.containsKey('powerCode')) or (colPickMode==1 and !item.containsKey('powerCode'))">
...@@ -1424,6 +1438,21 @@ ...@@ -1424,6 +1438,21 @@
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('deptName')">
<if test="conditionParamRef.deptName != null and conditionParamRef.deptName != ''">
${_conditionType_} a.deptName like #{${_conditionParam_}.deptName}
</if>
<if test="conditionParamRef.deptName == null">
${_conditionType_} a.deptName is null
</if>
</if>
<if test="conditionParamRef.containsKey('deptNameList')">
${_conditionType_} a.deptName in
<foreach collection="conditionParamRef.deptNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('powerCode')"> <if test="conditionParamRef.containsKey('powerCode')">
<if test="conditionParamRef.powerCode != null and conditionParamRef.powerCode != ''"> <if test="conditionParamRef.powerCode != null and conditionParamRef.powerCode != ''">
${_conditionType_} a.powerCode like #{${_conditionParam_}.powerCode} ${_conditionType_} a.powerCode like #{${_conditionParam_}.powerCode}
...@@ -2512,6 +2541,11 @@ ...@@ -2512,6 +2541,11 @@
<if test='orderCol.deptCode != null and "DESC".equalsIgnoreCase(orderCol.deptCode)'>DESC</if> <if test='orderCol.deptCode != null and "DESC".equalsIgnoreCase(orderCol.deptCode)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('deptName')">
a.deptName
<if test='orderCol.deptName != null and "DESC".equalsIgnoreCase(orderCol.deptName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('powerCode')"> <if test="orderCol.containsKey('powerCode')">
a.powerCode a.powerCode
<if test='orderCol.powerCode != null and "DESC".equalsIgnoreCase(orderCol.powerCode)'>DESC</if> <if test='orderCol.powerCode != null and "DESC".equalsIgnoreCase(orderCol.powerCode)'>DESC</if>
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<resultMap type="MatterQuestionEntity" id="MatterQuestionEntity-Map"> <resultMap type="MatterQuestionEntity" id="MatterQuestionEntity-Map">
<id property="id" column="id" /> <id property="id" column="id" />
<result property="matterId" column="matterId" /> <result property="matterId" column="matterId" />
<result property="matterCode" column="matterCode" />
<result property="matterName" column="matterName" /> <result property="matterName" column="matterName" />
<result property="question" column="question" /> <result property="question" column="question" />
<result property="answer" column="answer" /> <result property="answer" column="answer" />
...@@ -22,49 +23,52 @@ ...@@ -22,49 +23,52 @@
<sql id="_columns"> <sql id="_columns">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id as id, a.id,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))">
a.matterId as matterId, a.matterId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterCode') or colPickMode == 1 and data.containsKey('matterCode')))">
a.matterCode,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))">
a.matterName as matterName, a.matterName,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('question') or colPickMode == 1 and data.containsKey('question')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('question') or colPickMode == 1 and data.containsKey('question')))">
a.question as question, a.question,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('answer') or colPickMode == 1 and data.containsKey('answer')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('answer') or colPickMode == 1 and data.containsKey('answer')))">
a.answer as answer, a.answer,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))">
a.source as source, a.source,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime as createTime, a.createTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId as createUserId, a.createUserId,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime as updateTime, a.updateTime,
</if> </if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="MatterQuestionEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="MatterQuestionEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_matter_question insert into mortals_sys_matter_question
(matterId,matterName,question,answer,source,createTime,createUserId,updateTime) (matterId,matterCode,matterName,question,answer,source,createTime,createUserId,updateTime)
VALUES VALUES
(#{matterId},#{matterName},#{question},#{answer},#{source},#{createTime},#{createUserId},#{updateTime}) (#{matterId},#{matterCode},#{matterName},#{question},#{answer},#{source},#{createTime},#{createUserId},#{updateTime})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_matter_question insert into mortals_sys_matter_question
(matterId,matterName,question,answer,source,createTime,createUserId,updateTime) (matterId,matterCode,matterName,question,answer,source,createTime,createUserId,updateTime)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.matterId},#{item.matterName},#{item.question},#{item.answer},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime}) (#{item.matterId},#{item.matterCode},#{item.matterName},#{item.question},#{item.answer},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime})
</foreach> </foreach>
</insert> </insert>
...@@ -80,6 +84,9 @@ ...@@ -80,6 +84,9 @@
<if test="(colPickMode==0 and data.containsKey('matterIdIncrement')) or (colPickMode==1 and !data.containsKey('matterIdIncrement'))"> <if test="(colPickMode==0 and data.containsKey('matterIdIncrement')) or (colPickMode==1 and !data.containsKey('matterIdIncrement'))">
a.matterId=ifnull(a.matterId,0) + #{data.matterIdIncrement}, a.matterId=ifnull(a.matterId,0) + #{data.matterIdIncrement},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('matterCode')) or (colPickMode==1 and !data.containsKey('matterCode'))">
a.matterCode=#{data.matterCode},
</if>
<if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))"> <if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))">
a.matterName=#{data.matterName}, a.matterName=#{data.matterName},
</if> </if>
...@@ -131,6 +138,13 @@ ...@@ -131,6 +138,13 @@
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="matterCode=(case" suffix="ELSE matterCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterCode')) or (colPickMode==1 and !item.containsKey('matterCode'))">
when a.id=#{item.id} then #{item.matterCode}
</if>
</foreach>
</trim>
<trim prefix="matterName=(case" suffix="ELSE matterName end),"> <trim prefix="matterName=(case" suffix="ELSE matterName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterName')) or (colPickMode==1 and !item.containsKey('matterName'))"> <if test="(colPickMode==0 and item.containsKey('matterName')) or (colPickMode==1 and !item.containsKey('matterName'))">
...@@ -334,6 +348,21 @@ ...@@ -334,6 +348,21 @@
</if> </if>
<if test="conditionParamRef.containsKey('matterCode')">
<if test="conditionParamRef.matterCode != null and conditionParamRef.matterCode != ''">
${_conditionType_} a.matterCode like #{${_conditionParam_}.matterCode}
</if>
<if test="conditionParamRef.matterCode == null">
${_conditionType_} a.matterCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('matterCodeList')">
${_conditionType_} a.matterCode in
<foreach collection="conditionParamRef.matterCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('matterName')"> <if test="conditionParamRef.containsKey('matterName')">
<if test="conditionParamRef.matterName != null and conditionParamRef.matterName != ''"> <if test="conditionParamRef.matterName != null and conditionParamRef.matterName != ''">
${_conditionType_} a.matterName like #{${_conditionParam_}.matterName} ${_conditionType_} a.matterName like #{${_conditionParam_}.matterName}
...@@ -473,6 +502,11 @@ ...@@ -473,6 +502,11 @@
<if test='orderCol.matterId != null and "DESC".equalsIgnoreCase(orderCol.matterId)'>DESC</if> <if test='orderCol.matterId != null and "DESC".equalsIgnoreCase(orderCol.matterId)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('matterCode')">
a.matterCode
<if test='orderCol.matterCode != null and "DESC".equalsIgnoreCase(orderCol.matterCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('matterName')"> <if test="orderCol.containsKey('matterName')">
a.matterName a.matterName
<if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if> <if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if>
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<resultMap type="MatterSetbaseEntity" id="MatterSetbaseEntity-Map"> <resultMap type="MatterSetbaseEntity" id="MatterSetbaseEntity-Map">
<id property="id" column="id" /> <id property="id" column="id" />
<result property="matterId" column="matterId" /> <result property="matterId" column="matterId" />
<result property="matterCode" column="matterCode" />
<result property="matterName" column="matterName" /> <result property="matterName" column="matterName" />
<result property="policyName" column="policyName" /> <result property="policyName" column="policyName" />
<result property="policyType" column="policyType" /> <result property="policyType" column="policyType" />
...@@ -24,55 +25,58 @@ ...@@ -24,55 +25,58 @@
<sql id="_columns"> <sql id="_columns">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id as id, a.id,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))">
a.matterId as matterId, a.matterId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterCode') or colPickMode == 1 and data.containsKey('matterCode')))">
a.matterCode,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))">
a.matterName as matterName, a.matterName,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('policyName') or colPickMode == 1 and data.containsKey('policyName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('policyName') or colPickMode == 1 and data.containsKey('policyName')))">
a.policyName as policyName, a.policyName,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('policyType') or colPickMode == 1 and data.containsKey('policyType')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('policyType') or colPickMode == 1 and data.containsKey('policyType')))">
a.policyType as policyType, a.policyType,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('policyitem') or colPickMode == 1 and data.containsKey('policyitem')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('policyitem') or colPickMode == 1 and data.containsKey('policyitem')))">
a.policyitem as policyitem, a.policyitem,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('content') or colPickMode == 1 and data.containsKey('content')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('content') or colPickMode == 1 and data.containsKey('content')))">
a.content as content, a.content,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))">
a.source as source, a.source,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime as createTime, a.createTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId as createUserId, a.createUserId,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime as updateTime, a.updateTime,
</if> </if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="MatterSetbaseEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="MatterSetbaseEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_matter_setbase insert into mortals_sys_matter_setbase
(matterId,matterName,policyName,policyType,policyitem,content,source,createTime,createUserId,updateTime) (matterId,matterCode,matterName,policyName,policyType,policyitem,content,source,createTime,createUserId,updateTime)
VALUES VALUES
(#{matterId},#{matterName},#{policyName},#{policyType},#{policyitem},#{content},#{source},#{createTime},#{createUserId},#{updateTime}) (#{matterId},#{matterCode},#{matterName},#{policyName},#{policyType},#{policyitem},#{content},#{source},#{createTime},#{createUserId},#{updateTime})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_matter_setbase insert into mortals_sys_matter_setbase
(matterId,matterName,policyName,policyType,policyitem,content,source,createTime,createUserId,updateTime) (matterId,matterCode,matterName,policyName,policyType,policyitem,content,source,createTime,createUserId,updateTime)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.matterId},#{item.matterName},#{item.policyName},#{item.policyType},#{item.policyitem},#{item.content},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime}) (#{item.matterId},#{item.matterCode},#{item.matterName},#{item.policyName},#{item.policyType},#{item.policyitem},#{item.content},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime})
</foreach> </foreach>
</insert> </insert>
...@@ -88,6 +92,9 @@ ...@@ -88,6 +92,9 @@
<if test="(colPickMode==0 and data.containsKey('matterIdIncrement')) or (colPickMode==1 and !data.containsKey('matterIdIncrement'))"> <if test="(colPickMode==0 and data.containsKey('matterIdIncrement')) or (colPickMode==1 and !data.containsKey('matterIdIncrement'))">
a.matterId=ifnull(a.matterId,0) + #{data.matterIdIncrement}, a.matterId=ifnull(a.matterId,0) + #{data.matterIdIncrement},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('matterCode')) or (colPickMode==1 and !data.containsKey('matterCode'))">
a.matterCode=#{data.matterCode},
</if>
<if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))"> <if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))">
a.matterName=#{data.matterName}, a.matterName=#{data.matterName},
</if> </if>
...@@ -145,6 +152,13 @@ ...@@ -145,6 +152,13 @@
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="matterCode=(case" suffix="ELSE matterCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterCode')) or (colPickMode==1 and !item.containsKey('matterCode'))">
when a.id=#{item.id} then #{item.matterCode}
</if>
</foreach>
</trim>
<trim prefix="matterName=(case" suffix="ELSE matterName end),"> <trim prefix="matterName=(case" suffix="ELSE matterName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterName')) or (colPickMode==1 and !item.containsKey('matterName'))"> <if test="(colPickMode==0 and item.containsKey('matterName')) or (colPickMode==1 and !item.containsKey('matterName'))">
...@@ -362,6 +376,21 @@ ...@@ -362,6 +376,21 @@
</if> </if>
<if test="conditionParamRef.containsKey('matterCode')">
<if test="conditionParamRef.matterCode != null and conditionParamRef.matterCode != ''">
${_conditionType_} a.matterCode like #{${_conditionParam_}.matterCode}
</if>
<if test="conditionParamRef.matterCode == null">
${_conditionType_} a.matterCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('matterCodeList')">
${_conditionType_} a.matterCode in
<foreach collection="conditionParamRef.matterCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('matterName')"> <if test="conditionParamRef.containsKey('matterName')">
<if test="conditionParamRef.matterName != null and conditionParamRef.matterName != ''"> <if test="conditionParamRef.matterName != null and conditionParamRef.matterName != ''">
${_conditionType_} a.matterName like #{${_conditionParam_}.matterName} ${_conditionType_} a.matterName like #{${_conditionParam_}.matterName}
...@@ -531,6 +560,11 @@ ...@@ -531,6 +560,11 @@
<if test='orderCol.matterId != null and "DESC".equalsIgnoreCase(orderCol.matterId)'>DESC</if> <if test='orderCol.matterId != null and "DESC".equalsIgnoreCase(orderCol.matterId)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('matterCode')">
a.matterCode
<if test='orderCol.matterCode != null and "DESC".equalsIgnoreCase(orderCol.matterCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('matterName')"> <if test="orderCol.containsKey('matterName')">
a.matterName a.matterName
<if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if> <if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if>
......
...@@ -10,11 +10,14 @@ ...@@ -10,11 +10,14 @@
<result property="siteName" column="siteName" /> <result property="siteName" column="siteName" />
<result property="matterId" column="matterId" /> <result property="matterId" column="matterId" />
<result property="matterName" column="matterName" /> <result property="matterName" column="matterName" />
<result property="matterCode" column="matterCode" />
<result property="deptId" column="deptId" />
<result property="deptName" column="deptName" />
<result property="source" column="source" />
<result property="deptCode" column="deptCode" />
<result property="createTime" column="createTime" /> <result property="createTime" column="createTime" />
<result property="createUserId" column="createUserId" /> <result property="createUserId" column="createUserId" />
<result property="updateTime" column="updateTime" /> <result property="updateTime" column="updateTime" />
<result property="deptId" column="deptId" />
<result property="deptName" column="deptName" />
</resultMap> </resultMap>
...@@ -23,52 +26,61 @@ ...@@ -23,52 +26,61 @@
<sql id="_columns"> <sql id="_columns">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id as id, a.id,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteId') or colPickMode == 1 and data.containsKey('siteId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteId') or colPickMode == 1 and data.containsKey('siteId')))">
a.siteId as siteId, a.siteId,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteName') or colPickMode == 1 and data.containsKey('siteName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteName') or colPickMode == 1 and data.containsKey('siteName')))">
a.siteName as siteName, a.siteName,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))">
a.matterId as matterId, a.matterId,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))">
a.matterName as matterName, a.matterName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterCode') or colPickMode == 1 and data.containsKey('matterCode')))">
a.matterCode,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptId') or colPickMode == 1 and data.containsKey('deptId')))">
a.deptId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptName') or colPickMode == 1 and data.containsKey('deptName')))">
a.deptName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))">
a.source,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptCode') or colPickMode == 1 and data.containsKey('deptCode')))">
a.deptCode,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime as createTime, a.createTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId as createUserId, a.createUserId,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime as updateTime, a.updateTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptId') or colPickMode == 1 and data.containsKey('deptId')))">
a.deptId as deptId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptName') or colPickMode == 1 and data.containsKey('deptName')))">
a.deptName as deptName,
</if> </if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="SiteMatterEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="SiteMatterEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_site_matter insert into mortals_sys_site_matter
(siteId,siteName,matterId,matterName,createTime,createUserId,updateTime,deptId,deptName) (siteId,siteName,matterId,matterName,matterCode,deptId,deptName,source,deptCode,createTime,createUserId,updateTime)
VALUES VALUES
(#{siteId},#{siteName},#{matterId},#{matterName},#{createTime},#{createUserId},#{updateTime},#{deptId},#{deptName}) (#{siteId},#{siteName},#{matterId},#{matterName},#{matterCode},#{deptId},#{deptName},#{source},#{deptCode},#{createTime},#{createUserId},#{updateTime})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_site_matter insert into mortals_sys_site_matter
(siteId,siteName,matterId,matterName,createTime,createUserId,updateTime,deptId,deptName) (siteId,siteName,matterId,matterName,matterCode,deptId,deptName,source,deptCode,createTime,createUserId,updateTime)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.siteId},#{item.siteName},#{item.matterId},#{item.matterName},#{item.createTime},#{item.createUserId},#{item.updateTime},#{item.deptId},#{item.deptName}) (#{item.siteId},#{item.siteName},#{item.matterId},#{item.matterName},#{item.matterCode},#{item.deptId},#{item.deptName},#{item.source},#{item.deptCode},#{item.createTime},#{item.createUserId},#{item.updateTime})
</foreach> </foreach>
</insert> </insert>
...@@ -96,6 +108,27 @@ ...@@ -96,6 +108,27 @@
<if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))"> <if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))">
a.matterName=#{data.matterName}, a.matterName=#{data.matterName},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('matterCode')) or (colPickMode==1 and !data.containsKey('matterCode'))">
a.matterCode=#{data.matterCode},
</if>
<if test="(colPickMode==0 and data.containsKey('deptId')) or (colPickMode==1 and !data.containsKey('deptId'))">
a.deptId=#{data.deptId},
</if>
<if test="(colPickMode==0 and data.containsKey('deptIdIncrement')) or (colPickMode==1 and !data.containsKey('deptIdIncrement'))">
a.deptId=ifnull(a.deptId,0) + #{data.deptIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('deptName')) or (colPickMode==1 and !data.containsKey('deptName'))">
a.deptName=#{data.deptName},
</if>
<if test="(colPickMode==0 and data.containsKey('source')) or (colPickMode==1 and !data.containsKey('source'))">
a.source=#{data.source},
</if>
<if test="(colPickMode==0 and data.containsKey('sourceIncrement')) or (colPickMode==1 and !data.containsKey('sourceIncrement'))">
a.source=ifnull(a.source,0) + #{data.sourceIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('deptCode')) or (colPickMode==1 and !data.containsKey('deptCode'))">
a.deptCode=#{data.deptCode},
</if>
<if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))"> <if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
a.createTime=#{data.createTime}, a.createTime=#{data.createTime},
</if> </if>
...@@ -108,15 +141,6 @@ ...@@ -108,15 +141,6 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))"> <if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime}, a.updateTime=#{data.updateTime},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('deptId')) or (colPickMode==1 and !data.containsKey('deptId'))">
a.deptId=#{data.deptId},
</if>
<if test="(colPickMode==0 and data.containsKey('deptIdIncrement')) or (colPickMode==1 and !data.containsKey('deptIdIncrement'))">
a.deptId=ifnull(a.deptId,0) + #{data.deptIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('deptName')) or (colPickMode==1 and !data.containsKey('deptName'))">
a.deptName=#{data.deptName},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -167,48 +191,74 @@ ...@@ -167,48 +191,74 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="createTime=(case" suffix="ELSE createTime end),"> <trim prefix="matterCode=(case" suffix="ELSE matterCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))"> <if test="(colPickMode==0 and item.containsKey('matterCode')) or (colPickMode==1 and !item.containsKey('matterCode'))">
when a.id=#{item.id} then #{item.createTime} when a.id=#{item.id} then #{item.matterCode}
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="createUserId=(case" suffix="ELSE createUserId end),"> <trim prefix="deptId=(case" suffix="ELSE deptId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <choose>
<when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))"> <when test="(colPickMode==0 and item.containsKey('deptId')) or (colPickMode==1 and !item.containsKey('deptId'))">
when a.id=#{item.id} then #{item.createUserId} when a.id=#{item.id} then #{item.deptId}
</when> </when>
<when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))"> <when test="(colPickMode==0 and item.containsKey('deptIdIncrement')) or (colPickMode==1 and !item.containsKey('deptIdIncrement'))">
when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement} when a.id=#{item.id} then ifnull(a.deptId,0) + #{item.deptIdIncrement}
</when> </when>
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="updateTime=(case" suffix="ELSE updateTime end),"> <trim prefix="deptName=(case" suffix="ELSE deptName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))"> <if test="(colPickMode==0 and item.containsKey('deptName')) or (colPickMode==1 and !item.containsKey('deptName'))">
when a.id=#{item.id} then #{item.updateTime} when a.id=#{item.id} then #{item.deptName}
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="deptId=(case" suffix="ELSE deptId end),"> <trim prefix="source=(case" suffix="ELSE source end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <choose>
<when test="(colPickMode==0 and item.containsKey('deptId')) or (colPickMode==1 and !item.containsKey('deptId'))"> <when test="(colPickMode==0 and item.containsKey('source')) or (colPickMode==1 and !item.containsKey('source'))">
when a.id=#{item.id} then #{item.deptId} when a.id=#{item.id} then #{item.source}
</when> </when>
<when test="(colPickMode==0 and item.containsKey('deptIdIncrement')) or (colPickMode==1 and !item.containsKey('deptIdIncrement'))"> <when test="(colPickMode==0 and item.containsKey('sourceIncrement')) or (colPickMode==1 and !item.containsKey('sourceIncrement'))">
when a.id=#{item.id} then ifnull(a.deptId,0) + #{item.deptIdIncrement} when a.id=#{item.id} then ifnull(a.source,0) + #{item.sourceIncrement}
</when> </when>
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="deptName=(case" suffix="ELSE deptName end),"> <trim prefix="deptCode=(case" suffix="ELSE deptCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('deptName')) or (colPickMode==1 and !item.containsKey('deptName'))"> <if test="(colPickMode==0 and item.containsKey('deptCode')) or (colPickMode==1 and !item.containsKey('deptCode'))">
when a.id=#{item.id} then #{item.deptName} when a.id=#{item.id} then #{item.deptCode}
</if>
</foreach>
</trim>
<trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
when a.id=#{item.id} then #{item.createTime}
</if>
</foreach>
</trim>
<trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
when a.id=#{item.id} then #{item.createUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="updateTime=(case" suffix="ELSE updateTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
when a.id=#{item.id} then #{item.updateTime}
</if> </if>
</foreach> </foreach>
</trim> </trim>
...@@ -407,6 +457,93 @@ ...@@ -407,6 +457,93 @@
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('matterCode')">
<if test="conditionParamRef.matterCode != null and conditionParamRef.matterCode != ''">
${_conditionType_} a.matterCode like #{${_conditionParam_}.matterCode}
</if>
<if test="conditionParamRef.matterCode == null">
${_conditionType_} a.matterCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('matterCodeList')">
${_conditionType_} a.matterCode in
<foreach collection="conditionParamRef.matterCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deptId')">
<if test="conditionParamRef.deptId != null ">
${_conditionType_} a.deptId = #{${_conditionParam_}.deptId}
</if>
<if test="conditionParamRef.deptId == null">
${_conditionType_} a.deptId is null
</if>
</if>
<if test="conditionParamRef.containsKey('deptIdList')">
${_conditionType_} a.deptId in
<foreach collection="conditionParamRef.deptIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deptIdStart') and conditionParamRef.deptIdStart != null">
${_conditionType_} a.deptId <![CDATA[ >= ]]> #{${_conditionParam_}.deptIdStart}
</if>
<if test="conditionParamRef.containsKey('deptIdEnd') and conditionParamRef.deptIdEnd != null">
${_conditionType_} a.deptId <![CDATA[ <= ]]> #{${_conditionParam_}.deptIdEnd}
</if>
<if test="conditionParamRef.containsKey('deptName')">
<if test="conditionParamRef.deptName != null and conditionParamRef.deptName != ''">
${_conditionType_} a.deptName like #{${_conditionParam_}.deptName}
</if>
<if test="conditionParamRef.deptName == null">
${_conditionType_} a.deptName is null
</if>
</if>
<if test="conditionParamRef.containsKey('deptNameList')">
${_conditionType_} a.deptName in
<foreach collection="conditionParamRef.deptNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('source')">
<if test="conditionParamRef.source != null ">
${_conditionType_} a.source = #{${_conditionParam_}.source}
</if>
<if test="conditionParamRef.source == null">
${_conditionType_} a.source is null
</if>
</if>
<if test="conditionParamRef.containsKey('sourceList')">
${_conditionType_} a.source in
<foreach collection="conditionParamRef.sourceList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sourceStart') and conditionParamRef.sourceStart != null">
${_conditionType_} a.source <![CDATA[ >= ]]> #{${_conditionParam_}.sourceStart}
</if>
<if test="conditionParamRef.containsKey('sourceEnd') and conditionParamRef.sourceEnd != null">
${_conditionType_} a.source <![CDATA[ <= ]]> #{${_conditionParam_}.sourceEnd}
</if>
<if test="conditionParamRef.containsKey('deptCode')">
<if test="conditionParamRef.deptCode != null and conditionParamRef.deptCode != ''">
${_conditionType_} a.deptCode like #{${_conditionParam_}.deptCode}
</if>
<if test="conditionParamRef.deptCode == null">
${_conditionType_} a.deptCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('deptCodeList')">
${_conditionType_} a.deptCode in
<foreach collection="conditionParamRef.deptCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createTime')"> <if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null "> <if test="conditionParamRef.createTime != null ">
${_conditionType_} a.createTime = #{${_conditionParam_}.createTime} ${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
...@@ -457,42 +594,6 @@ ...@@ -457,42 +594,6 @@
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''"> <if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') ${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if> </if>
<if test="conditionParamRef.containsKey('deptId')">
<if test="conditionParamRef.deptId != null ">
${_conditionType_} a.deptId = #{${_conditionParam_}.deptId}
</if>
<if test="conditionParamRef.deptId == null">
${_conditionType_} a.deptId is null
</if>
</if>
<if test="conditionParamRef.containsKey('deptIdList')">
${_conditionType_} a.deptId in
<foreach collection="conditionParamRef.deptIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deptIdStart') and conditionParamRef.deptIdStart != null">
${_conditionType_} a.deptId <![CDATA[ >= ]]> #{${_conditionParam_}.deptIdStart}
</if>
<if test="conditionParamRef.containsKey('deptIdEnd') and conditionParamRef.deptIdEnd != null">
${_conditionType_} a.deptId <![CDATA[ <= ]]> #{${_conditionParam_}.deptIdEnd}
</if>
<if test="conditionParamRef.containsKey('deptName')">
<if test="conditionParamRef.deptName != null and conditionParamRef.deptName != ''">
${_conditionType_} a.deptName like #{${_conditionParam_}.deptName}
</if>
<if test="conditionParamRef.deptName == null">
${_conditionType_} a.deptName is null
</if>
</if>
<if test="conditionParamRef.containsKey('deptNameList')">
${_conditionType_} a.deptName in
<foreach collection="conditionParamRef.deptNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -531,6 +632,31 @@ ...@@ -531,6 +632,31 @@
<if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if> <if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('matterCode')">
a.matterCode
<if test='orderCol.matterCode != null and "DESC".equalsIgnoreCase(orderCol.matterCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('deptId')">
a.deptId
<if test='orderCol.deptId != null and "DESC".equalsIgnoreCase(orderCol.deptId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('deptName')">
a.deptName
<if test='orderCol.deptName != null and "DESC".equalsIgnoreCase(orderCol.deptName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('source')">
a.source
<if test='orderCol.source != null and "DESC".equalsIgnoreCase(orderCol.source)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('deptCode')">
a.deptCode
<if test='orderCol.deptCode != null and "DESC".equalsIgnoreCase(orderCol.deptCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createTime')"> <if test="orderCol.containsKey('createTime')">
a.createTime a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if> <if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
...@@ -546,16 +672,6 @@ ...@@ -546,16 +672,6 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if> <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('deptId')">
a.deptId
<if test='orderCol.deptId != null and "DESC".equalsIgnoreCase(orderCol.deptId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('deptName')">
a.deptName
<if test='orderCol.deptName != null and "DESC".equalsIgnoreCase(orderCol.deptName)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
......
{ {
"base-local": { "base-local": {
"baseUrl": "http://127.0.0.1:17214/base" "baseUrl": "http://127.0.0.1:17211/base"
}, },
"base-dev": { "base-dev": {
"baseUrl": "http://192.168.0.60:17211/base" "baseUrl": "http://192.168.0.60:17211/base"
......
...@@ -86,7 +86,7 @@ Authorization: {{authToken}} ...@@ -86,7 +86,7 @@ Authorization: {{authToken}}
Content-Type: application/json Content-Type: application/json
{ {
"id":3 "id":7
} }
......
...@@ -5,7 +5,7 @@ Content-Type: application/json ...@@ -5,7 +5,7 @@ Content-Type: application/json
{ {
"loginName":"admin", "loginName":"admin",
"password":"admin", "password":"adsmile",
"securityCode":"8888" "securityCode":"8888"
} }
......
...@@ -24,12 +24,12 @@ ...@@ -24,12 +24,12 @@
<profiles.active>develop</profiles.active> <profiles.active>develop</profiles.active>
<profiles.server.port>17212</profiles.server.port> <profiles.server.port>17212</profiles.server.port>
<profiles.queue.type>rabbitmq</profiles.queue.type> <profiles.queue.type>rabbitmq</profiles.queue.type>
<profiles.rabbitmq.host>192.168.0.218</profiles.rabbitmq.host> <profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host>
<profiles.rabbitmq.port>5672</profiles.rabbitmq.port> <profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
<profiles.rabbitmq.username>root_mq</profiles.rabbitmq.username> <profiles.rabbitmq.username>root_mq</profiles.rabbitmq.username>
<profiles.rabbitmq.password>xhx@2022</profiles.rabbitmq.password> <profiles.rabbitmq.password>xhx@2022</profiles.rabbitmq.password>
<profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost> <profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost>
<profiles.nacos.server-addr>192.168.0.218:8848</profiles.nacos.server-addr> <profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group> <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace> <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
<profiles.log.level>INFO</profiles.log.level> <profiles.log.level>INFO</profiles.log.level>
......
...@@ -74,4 +74,14 @@ public interface UserService extends ICRUDService<UserEntity,Long>{ ...@@ -74,4 +74,14 @@ public interface UserService extends ICRUDService<UserEntity,Long>{
*/ */
void synchSitesAuth() throws AppException; void synchSitesAuth() throws AppException;
/**
* 重置密码
*
* @param loginName
* @param newPwd
* @return
* @throws AppException
*/
boolean resetUserPwd(String loginName, String newPwd , Context context) throws AppException;
} }
\ No newline at end of file
...@@ -289,6 +289,27 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity ...@@ -289,6 +289,27 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
}); });
} }
@Override
public boolean resetUserPwd(String loginName, String newPwd, Context context) throws AppException {
if(context==null){
throw new AppException("登录过期!");
}
if(context.getUser().getId()!=1){
throw new AppException("当前用户非管理员,不能使用此功能");
}
UserEntity sysUser = this.findByLoginName(loginName);
if (sysUser == null || !sysUser.getLoginName().equals(loginName)) {
throw new AppException("帐号错误!");
}
try {
sysUser.setLoginPwd(SecurityUtil.md5DoubleEncoding(newPwd));
} catch (Exception e) {
throw new AppException("密码转换异常!", e);
}
dao.update(sysUser);
return true;
}
private void updateRedisUserSession(UserEntity userEntity) { private void updateRedisUserSession(UserEntity userEntity) {
Set<String> keys = cacheService.scan(Constant.LOGIN_TOKEN_KEY + userEntity.getId()); Set<String> keys = cacheService.scan(Constant.LOGIN_TOKEN_KEY + userEntity.getId());
keys.forEach(key -> { keys.forEach(key -> {
......
...@@ -244,4 +244,18 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic ...@@ -244,4 +244,18 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
ret.setMsg(model.get("message_info") == null ? "" : model.remove("message_info").toString()); ret.setMsg(model.get("message_info") == null ? "" : model.remove("message_info").toString());
return ret; return ret;
} }
@RequestMapping(value = "reset/password", method = RequestMethod.POST)
public String resetPassword(@RequestBody UserEntity entity) {
JSONObject ret = new JSONObject();
try {
service.resetUserPwd(entity.getLoginName(), entity.getNewPwd(),this.getContext());
ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
ret.put(KEY_RESULT_MSG, "密码修改成功!");
} catch (Exception e) {
ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
ret.put(KEY_RESULT_MSG, super.convertException(e));
}
return ret.toJSONString();
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment