计量中心项目
18
jlzx-single/docs/b97.bwyljy.com.conf
Normal file
@@ -0,0 +1,18 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name b97.bwyljy.com;
|
||||
|
||||
location / {
|
||||
root /home/bwyl/webapps/jlzx-oa;
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
location /prod-api/{
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header REMOTE-HOST $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://39.104.100.138:8111/;
|
||||
}
|
||||
}
|
||||
5
jlzx-single/docs/bugs/20201107/问题.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
1. 查询,流程状态,“请选择”显示的是隐藏的
|
||||
2. 流程动作-创建-选择人员,没有接口
|
||||
3. 流程授权,没有接口
|
||||
|
||||
|
||||
BIN
jlzx-single/docs/bugs/流程管理测试1112.docx
Normal file
BIN
jlzx-single/docs/ca/微信图片_20210926101115.jpg
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
jlzx-single/docs/ca/微信图片_20210926101125.jpg
Normal file
|
After Width: | Height: | Size: 30 KiB |
21
jlzx-single/docs/db/cxjl.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
DROP TABLE IF EXISTS `promise_self_file`;
|
||||
CREATE TABLE `promise_self_file`
|
||||
(
|
||||
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 技术人员扩展表',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) DEFAULT '1' COMMENT '记录状态值',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`industryKey` varchar(64) DEFAULT NULL COMMENT '行业key',
|
||||
`filePath` varchar(64) DEFAULT NULL COMMENT '模板路径',
|
||||
`fileName` varchar(64) NULL DEFAULT NULL COMMENT '模板名称',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='自评表模板文件';
|
||||
88048
jlzx-single/docs/db/jlzx_cxjl.sql
Normal file
666
jlzx-single/docs/db/tables.sql
Normal file
@@ -0,0 +1,666 @@
|
||||
-- CREATE DATABASE `jlzx_jlcyry` /*!40100 COLLATE 'utf8mb4_unicode_ci' */
|
||||
|
||||
-- 人员信息表
|
||||
DROP TABLE IF EXISTS `personnel`;
|
||||
CREATE TABLE `personnel`
|
||||
(
|
||||
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号',
|
||||
`sid` varchar(64) NOT NULL DEFAULT '0' COMMENT '字符型编号',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NULL DEFAULT NULL COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`state` int(11) NOT NULL DEFAULT '1' COMMENT '记录状态值',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`isDelete` int(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`name` varchar(100) NOT NULL COMMENT '登录名',
|
||||
`password` varchar(100) NOT NULL COMMENT '密码',
|
||||
`realName` varchar(100) NOT NULL COMMENT '真实姓名',
|
||||
`sex` int(11) NOT NULL DEFAULT '1',
|
||||
`email` varchar(200) DEFAULT NULL COMMENT '邮箱',
|
||||
`phone` varchar(200) DEFAULT NULL COMMENT '电话',
|
||||
`mobile` varchar(200) DEFAULT NULL COMMENT '手机',
|
||||
`userType` varchar(2) DEFAULT '00' COMMENT '用户类型(00系统用户)',
|
||||
`photo` varchar(1000) DEFAULT NULL COMMENT '用户头像',
|
||||
`loginIp` varchar(100) DEFAULT NULL COMMENT '最后登陆IP',
|
||||
`loginDate` datetime DEFAULT NULL COMMENT '最后登陆时间',
|
||||
`loginAddress` varchar(100) DEFAULT NULL COMMENT '最后登陆地址',
|
||||
`roleids` varchar(1000) DEFAULT NULL COMMENT '角色ID,[id]格式',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB COMMENT ='人员信息表';
|
||||
|
||||
-- 证书表
|
||||
DROP TABLE IF EXISTS `certificate`;
|
||||
CREATE TABLE `certificate`
|
||||
(
|
||||
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 证书表',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) DEFAULT '1' COMMENT '记录状态值',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`certNo` varchar(64) DEFAULT NULL COMMENT '证书编号',
|
||||
`registerNo` varchar(64) DEFAULT NULL COMMENT '注册号/批文号/其他相关的管理号',
|
||||
`dateStart` timestamp NULL DEFAULT NULL COMMENT '证书有效期始',
|
||||
`dateEnd` timestamp NULL DEFAULT NULL COMMENT '证书有效期止',
|
||||
`issueOrg` varchar(64) DEFAULT NULL COMMENT '发证机构',
|
||||
`certTrade` varchar(64) DEFAULT NULL COMMENT '证书行业(特种设备、计量等)',
|
||||
`certType` varchar(64) DEFAULT NULL COMMENT '证书类别(注册计量师证、考评员证等官方名称)',
|
||||
`certLevel` varchar(64) DEFAULT NULL COMMENT '等级,非必填项',
|
||||
`subject` varchar(64) DEFAULT NULL COMMENT '专业名称,非必填',
|
||||
`otherName` varchar(64) DEFAULT NULL COMMENT '其他名称,如资格名称,非必填',
|
||||
`professionalSeries` varchar(64) DEFAULT NULL COMMENT '专业技术系列,非必填',
|
||||
`certUrl` varchar(64) DEFAULT NULL COMMENT '证书路径',
|
||||
`ownerOrg` varchar(64) DEFAULT NULL COMMENT '聘用单位',
|
||||
`approvalDate` timestamp NULL DEFAULT NULL COMMENT '批准日期',
|
||||
`post` varchar(64) DEFAULT NULL COMMENT '职务(非必填)',
|
||||
`staffSid` varchar(64) DEFAULT NULL COMMENT '人员sid',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='证书表';
|
||||
|
||||
|
||||
-- 专业项目表
|
||||
DROP TABLE IF EXISTS `certitem`;
|
||||
CREATE TABLE `certitem`
|
||||
(
|
||||
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 专业项目',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) DEFAULT '1' COMMENT '记录状态值',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`subject` varchar(64) DEFAULT NULL COMMENT '专业',
|
||||
`item` varchar(64) DEFAULT NULL COMMENT '项目',
|
||||
`subItem` varchar(64) DEFAULT NULL COMMENT '子项目',
|
||||
`basis` varchar(64) DEFAULT NULL COMMENT '依据、标准、规程、规范等',
|
||||
`certSid` varchar(64) DEFAULT NULL COMMENT '证书sid',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='专业项目';
|
||||
|
||||
-- 教育经历表
|
||||
DROP TABLE IF EXISTS `education`;
|
||||
CREATE TABLE `education`
|
||||
(
|
||||
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 教育经历表',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) DEFAULT '1' COMMENT '记录状态值',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`schoolName` varchar(64) DEFAULT NULL COMMENT '毕业院校',
|
||||
`eduStartDate` timestamp NULL DEFAULT NULL COMMENT '开始日期',
|
||||
`gradDate` timestamp NULL DEFAULT NULL COMMENT '毕业日期',
|
||||
`cultlevel` varchar(64) DEFAULT NULL COMMENT '文化程度(学历)',
|
||||
`degree` varchar(64) DEFAULT NULL COMMENT '学位',
|
||||
`speciality` varchar(64) DEFAULT NULL COMMENT '专业',
|
||||
`diploma` varchar(64) DEFAULT NULL COMMENT '学历证(毕业证)',
|
||||
`degreeCert` varchar(64) DEFAULT NULL COMMENT '学位证书',
|
||||
`staffSid` varchar(64) DEFAULT NULL COMMENT '人员sid',
|
||||
`signChar` varchar(64) DEFAULT NULL COMMENT '学历标识(第一学历、最高学历)',
|
||||
`studyMode` varchar(64) DEFAULT NULL COMMENT '学习形式(普通全日制、非全日制……)',
|
||||
`studyType` varchar(64) DEFAULT NULL COMMENT '学习类型(普高、职高、自考、学历文凭、)',
|
||||
`studyYears` varchar(64) DEFAULT NULL COMMENT '学制',
|
||||
`diplomaCertNo` varchar(64) DEFAULT NULL COMMENT '毕业证书编号',
|
||||
`issueDate` varchar(64) DEFAULT NULL COMMENT '学位证授予日期',
|
||||
`degreeCertNo` varchar(64) DEFAULT NULL COMMENT '学位证书编号',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='教育经历表';
|
||||
|
||||
|
||||
-- 机构信息表
|
||||
DROP TABLE IF EXISTS `organization`;
|
||||
CREATE TABLE `organization`
|
||||
(
|
||||
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 机构',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) DEFAULT '1' COMMENT '记录状态值:机构状态(正常、注销、吊销和过期) C053 默认编码为1 页面上不显示',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`name` varchar(64) DEFAULT NULL COMMENT '机构名称',
|
||||
`orgAddress` varchar(64) DEFAULT NULL COMMENT '住所',
|
||||
`orgCode` varchar(64) DEFAULT NULL COMMENT '机构代码 C006',
|
||||
`contactMan` varchar(64) DEFAULT NULL COMMENT '联系人',
|
||||
`contactTelephone` varchar(64) DEFAULT NULL COMMENT '联系人座机电话',
|
||||
`contactMobile` varchar(64) DEFAULT NULL COMMENT '联系人手机号码',
|
||||
`postAddress` varchar(64) DEFAULT NULL COMMENT '通信地址 默认为行政区划+具体地址,如河北省石家庄市桥西区XXXX街XXX号,如果修改组织机构代码则需要重新填写地址',
|
||||
`postcode` varchar(64) DEFAULT NULL COMMENT '邮政编码',
|
||||
`email` varchar(64) DEFAULT NULL COMMENT '电子邮件',
|
||||
`gisInfo` varchar(64) DEFAULT NULL COMMENT '地理信息(经度,纬度)',
|
||||
`pSid` varchar(64) DEFAULT NULL COMMENT '上级sid',
|
||||
`sidPath` varchar(64) DEFAULT NULL COMMENT '组织机构sid全路径(各路径中间以"/"分隔)',
|
||||
`regionSid` varchar(64) DEFAULT NULL COMMENT '区域sid',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='机构信息表';
|
||||
|
||||
|
||||
-- 区域表
|
||||
DROP TABLE IF EXISTS `region`;
|
||||
CREATE TABLE `region`
|
||||
(
|
||||
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 区域',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) DEFAULT '1' COMMENT '记录状态值',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`name` varchar(64) DEFAULT NULL COMMENT '名称,区域名称',
|
||||
`districtCode` varchar(64) DEFAULT NULL COMMENT '行政区划代码',
|
||||
`pSid` varchar(64) DEFAULT NULL COMMENT '上级sid',
|
||||
`sidPath` varchar(64) DEFAULT NULL COMMENT 'sid全路径Id(provincesid/citysid/countysid/townsid)',
|
||||
`summary` varchar(64) DEFAULT NULL COMMENT '备注',
|
||||
`sortNo` varchar(64) DEFAULT NULL COMMENT '排序号',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='区域表';
|
||||
|
||||
|
||||
-- 学术情况(著作、论文及重要技术报告)
|
||||
DROP TABLE IF EXISTS `science`;
|
||||
CREATE TABLE `science`
|
||||
(
|
||||
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 学术情况(著作、论文及重要技术报告)',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) DEFAULT '1' COMMENT '记录状态值',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`pubDate` timestamp NULL DEFAULT NULL COMMENT '公布日期',
|
||||
`title` varchar(64) DEFAULT NULL COMMENT '名称',
|
||||
`summary` varchar(64) DEFAULT NULL COMMENT '内容提要',
|
||||
`achievement` varchar(64) DEFAULT NULL COMMENT '成果情况(出版、登载获奖或在学术会议上交流情况)',
|
||||
`partakeType` varchar(64) DEFAULT NULL COMMENT '参与形式(合(独)著、译)',
|
||||
`staffSid` varchar(64) DEFAULT NULL COMMENT 'staffSid 属于 学术情况(著作、论文及重要技术报告)',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='学术情况(著作、论文及重要技术报告';
|
||||
|
||||
|
||||
-- 人员机构关系表
|
||||
DROP TABLE IF EXISTS `staff_org`;
|
||||
CREATE TABLE `staff_org`
|
||||
(
|
||||
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 人员机构关系表',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) DEFAULT '1' COMMENT '记录状态值:0未审核,1审核通过',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`staffSid` varchar(64) DEFAULT NULL COMMENT '人员sid',
|
||||
`orgSid` varchar(64) DEFAULT NULL COMMENT '机构sid',
|
||||
`linkDate` timestamp NULL DEFAULT NULL COMMENT '关联日期',
|
||||
`identity` varchar(64) DEFAULT NULL COMMENT '人员身份(在编、聘用等)',
|
||||
`joinDate` varchar(64) DEFAULT NULL COMMENT '进入本单位日期',
|
||||
`joinType` varchar(64) DEFAULT NULL COMMENT '进入本单位形式',
|
||||
`staffClass` varchar(64) DEFAULT NULL COMMENT '人员类别(公务员、事业单位工作人员、企业人员、其他)',
|
||||
`currentjob` varchar(64) DEFAULT NULL COMMENT '现从事工作',
|
||||
`nowTechtitle` varchar(64) DEFAULT NULL COMMENT '现任职务(资格)',
|
||||
`nowTechtitleDate` varchar(64) DEFAULT NULL COMMENT '现任职务(资格)日期',
|
||||
`currentPost` varchar(64) DEFAULT NULL COMMENT '现聘(职级)岗位',
|
||||
`currentPostDate` varchar(64) DEFAULT NULL COMMENT '现聘(职级)岗位日期',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='人员机构关系表';
|
||||
|
||||
|
||||
-- 人员基础信息表
|
||||
DROP TABLE IF EXISTS `staffinfo`;
|
||||
CREATE TABLE `staffinfo`
|
||||
(
|
||||
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 人员基础信息表',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NULL DEFAULT NULL COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) DEFAULT '1' COMMENT '记录状态值',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`name` varchar(64) DEFAULT NULL COMMENT 'name 属于 人员基础信息表',
|
||||
`beforeName` varchar(64) DEFAULT NULL COMMENT '曾用名',
|
||||
`idType` varchar(64) DEFAULT NULL COMMENT '证件类型',
|
||||
`idNo` varchar(64) DEFAULT NULL COMMENT '证件号码',
|
||||
`gender` int(32) DEFAULT NULL COMMENT '性别 :1男,2女',
|
||||
`national` varchar(64) DEFAULT NULL COMMENT '民族',
|
||||
`birthPlace` varchar(64) DEFAULT NULL COMMENT '出生地',
|
||||
`joinGroupDate` varchar(64) DEFAULT NULL COMMENT '入党团日期',
|
||||
`nativePlace` varchar(64) DEFAULT NULL COMMENT '籍贯',
|
||||
`birthday` timestamp NULL DEFAULT NULL COMMENT '出生日期',
|
||||
`poliCode` varchar(64) DEFAULT NULL COMMENT '政治面貌 ',
|
||||
`mobile` varchar(64) DEFAULT NULL COMMENT '手机号码',
|
||||
`telephone` varchar(64) DEFAULT NULL COMMENT '联系电话',
|
||||
`address` varchar(64) DEFAULT NULL COMMENT '家庭住址',
|
||||
`postcode` varchar(64) DEFAULT NULL COMMENT '邮编',
|
||||
`email` varchar(64) DEFAULT NULL COMMENT '电子邮箱',
|
||||
`photoPath` varchar(64) DEFAULT NULL COMMENT '照片文件路径',
|
||||
`organizationSid` varchar(64) DEFAULT NULL COMMENT '所属机构sid',
|
||||
`jobDateStart` timestamp NULL DEFAULT NULL COMMENT '参加工作日期',
|
||||
`highestDegree` varchar(64) DEFAULT NULL COMMENT '最高学位',
|
||||
`highestEducation` varchar(64) DEFAULT NULL COMMENT '最高学历',
|
||||
`jlJobDate` timestamp NULL DEFAULT NULL COMMENT '从事计量工作开始日期',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 7
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='人员基础信息表';
|
||||
|
||||
|
||||
-- 培训经历表
|
||||
DROP TABLE IF EXISTS `train`;
|
||||
|
||||
CREATE TABLE `train`
|
||||
(
|
||||
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 培训经历表',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) DEFAULT '1' COMMENT '记录状态值',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`trainType` varchar(64) DEFAULT NULL COMMENT '培训类别',
|
||||
`trainMode` varchar(64) DEFAULT NULL COMMENT '培训形式',
|
||||
`trainTopics` varchar(64) DEFAULT NULL COMMENT '培训专题',
|
||||
`trainDateS` timestamp NULL DEFAULT NULL COMMENT '培训日期起始',
|
||||
`trainDateE` timestamp NULL DEFAULT NULL COMMENT '培训日期结束',
|
||||
`hourLong` varchar(64) DEFAULT NULL COMMENT '学时',
|
||||
`trainResult` varchar(64) DEFAULT NULL COMMENT '考核等次或考核结果',
|
||||
`organizeDept` varchar(64) DEFAULT NULL COMMENT '组织单位',
|
||||
`trainPlace` varchar(64) DEFAULT NULL COMMENT '培训地点',
|
||||
`staffSid` varchar(64) DEFAULT NULL COMMENT 'staffSid 属于 培训经历表',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='培训经历表';
|
||||
|
||||
|
||||
-- 工作经历表
|
||||
DROP TABLE IF EXISTS `workexperience`;
|
||||
CREATE TABLE `workexperience`
|
||||
(
|
||||
`id` int(32) NOT NULL DEFAULT '0' COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 人员机构关系表',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) DEFAULT '1' COMMENT '记录状态值:0未审核,1审核通过',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`staffSid` varchar(64) DEFAULT NULL COMMENT '人员sid',
|
||||
`orgSid` varchar(64) DEFAULT NULL COMMENT '机构sid',
|
||||
`identity` varchar(64) DEFAULT NULL COMMENT '人员身份(在编、聘用等)',
|
||||
`joinDate` varchar(64) DEFAULT NULL COMMENT '进入本单位日期',
|
||||
`joinType` varchar(64) DEFAULT NULL COMMENT '进入本单位形式',
|
||||
`staffClass` varchar(64) DEFAULT NULL COMMENT '人员类别(公务员、事业单位工作人员、企业人员、其他)',
|
||||
`currentjob` varchar(64) DEFAULT NULL COMMENT '现从事工作',
|
||||
`nowTechtitle` varchar(64) DEFAULT NULL COMMENT '现任职务(资格)',
|
||||
`nowTechtitleDate` varchar(64) DEFAULT NULL COMMENT '现任职务(资格)日期',
|
||||
`currentPost` varchar(64) DEFAULT NULL COMMENT '现聘(职级)岗位',
|
||||
`currentPostDate` varchar(64) DEFAULT NULL COMMENT '现聘(职级)岗位日期',
|
||||
`orgName` varchar(64) DEFAULT NULL COMMENT '单位名称',
|
||||
`leaveDate` varchar(64) DEFAULT NULL COMMENT '离职日期'
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='工作经历表';
|
||||
|
||||
|
||||
-- 人员注册待审核表
|
||||
DROP TABLE IF EXISTS `staff_apply`;
|
||||
CREATE TABLE `staff_apply`
|
||||
(
|
||||
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录修改时间',
|
||||
`state` int(32) NOT NULL DEFAULT '1' COMMENT '记录状态值:2审核通过,1待审核',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`isDelete` int(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`name` varchar(64) DEFAULT NULL COMMENT '姓名',
|
||||
`idNo` varchar(64) DEFAULT NULL COMMENT '证件号码',
|
||||
`mobile` varchar(64) DEFAULT NULL COMMENT '手机号码',
|
||||
`idFrontPhoto` varchar(255) DEFAULT NULL COMMENT '身份证正面照路径',
|
||||
`idBackPhoto` varchar(255) DEFAULT NULL COMMENT '身份证反面照路径',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8 COMMENT ='人员注册待审核';
|
||||
|
||||
-- 专家任职情况表
|
||||
DROP TABLE IF EXISTS `expert_post_info`;
|
||||
CREATE TABLE `expert_post_info`
|
||||
(
|
||||
`id` int(32) NOT NULL DEFAULT '0' COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 人员机构关系表',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) DEFAULT '1' COMMENT '记录状态值:0未审核,1审核通过',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`ownerOrg` varchar(64) DEFAULT NULL COMMENT '任职机构',
|
||||
`post` varchar(64) DEFAULT NULL COMMENT '职务',
|
||||
`subject` varchar(64) DEFAULT NULL COMMENT '专业类别',
|
||||
`certNo` varchar(64) DEFAULT NULL COMMENT '编号',
|
||||
`issueOrg` varchar(64) DEFAULT NULL COMMENT '发证单位',
|
||||
`dateStart` varchar(64) DEFAULT NULL COMMENT '起始日期',
|
||||
`dateEnd` varchar(64) DEFAULT NULL COMMENT '有效期止',
|
||||
`staffSid` varchar(64) DEFAULT NULL COMMENT 'staffSid 属于 专家任职情况'
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='专家任职情况表';
|
||||
|
||||
-- 机构资质证书表
|
||||
DROP TABLE IF EXISTS `org_cert`;
|
||||
CREATE TABLE `org_cert`
|
||||
(
|
||||
`id` int(32) NOT NULL DEFAULT '0' COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 人员机构关系表',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) DEFAULT '1' COMMENT '记录状态值:0未审核,1审核通过',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`name` varchar(64) DEFAULT NULL COMMENT '证书名称',
|
||||
`certNo` varchar(64) DEFAULT NULL COMMENT '证书编号',
|
||||
`issueOrg` varchar(64) DEFAULT NULL COMMENT '发证机关',
|
||||
`issueDate` varchar(64) DEFAULT NULL COMMENT '发证日期',
|
||||
`dateEnd` varchar(64) DEFAULT NULL COMMENT '到期日期',
|
||||
`certUrl` varchar(64) DEFAULT NULL COMMENT '证书路径',
|
||||
`orgSid` varchar(64) DEFAULT NULL COMMENT 'orgSid 属于 机构资质证书'
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='机构资质证书表';
|
||||
|
||||
-- 图片表
|
||||
DROP TABLE IF EXISTS `photocommon`;
|
||||
CREATE TABLE `photocommon`
|
||||
(
|
||||
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid',
|
||||
`lockVersion` int(32) DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`state` int(32) DEFAULT '1' COMMENT '状态值',
|
||||
`isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0没有,1删除',
|
||||
`linkSid` varchar(64) DEFAULT NULL COMMENT '关联sid',
|
||||
`FilePath` varchar(64) DEFAULT NULL COMMENT '位置',
|
||||
`type` varchar(64) DEFAULT NULL COMMENT '类型',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
AUTO_INCREMENT = 13
|
||||
DEFAULT CHARSET = utf8 COMMENT ='图片表';
|
||||
|
||||
-- 专业技术工作业绩
|
||||
DROP TABLE IF EXISTS `professional_achievement`;
|
||||
CREATE TABLE `professional_achievement`
|
||||
(
|
||||
`id` int(32) NOT NULL DEFAULT '0' COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 专业技术工作经历及业绩',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) DEFAULT '1' COMMENT '记录状态值',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`dateStart` timestamp NULL DEFAULT NULL COMMENT '开始日期',
|
||||
`dateEnd` timestamp NULL DEFAULT NULL COMMENT '结束日期',
|
||||
`achievementType` varchar(64) DEFAULT NULL COMMENT '成果类型',
|
||||
`achievementLevel` varchar(64) DEFAULT NULL COMMENT '成果等级',
|
||||
`partakeType` varchar(64) DEFAULT NULL COMMENT '参与方式',
|
||||
`certUrl` varchar(64) DEFAULT NULL COMMENT '证书图片路径',
|
||||
`staffSid` varchar(64) DEFAULT NULL COMMENT 'staffSid 属于 专业技术工作业绩',
|
||||
`workSid` varchar(64) DEFAULT NULL COMMENT '专业技术工作Sid,暂时为空'
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='专业技术工作业绩';
|
||||
|
||||
-- 专业技术资格
|
||||
DROP TABLE IF EXISTS `professional_qualification`;
|
||||
CREATE TABLE `professional_qualification`
|
||||
(
|
||||
`id` int(32) NOT NULL DEFAULT '0' COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 人员机构关系表',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) DEFAULT '1' COMMENT '记录状态值:0未审核,1审核通过',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`certNo` varchar(64) DEFAULT NULL COMMENT '编号',
|
||||
`professionalSeries` varchar(64) DEFAULT NULL COMMENT '专业技术系列',
|
||||
`subject` varchar(64) DEFAULT NULL COMMENT '专业名称',
|
||||
`name` varchar(64) DEFAULT NULL COMMENT '资格名称(高级工程师、中级工程师等)',
|
||||
`approlNo` varchar(64) DEFAULT NULL COMMENT '批文号',
|
||||
`confermentDate` varchar(64) DEFAULT NULL COMMENT '授予时间',
|
||||
`dateEnd` varchar(64) DEFAULT NULL COMMENT '有效期至',
|
||||
`issueOrg` varchar(64) DEFAULT NULL COMMENT '发证机关',
|
||||
`staffSid` varchar(64) DEFAULT NULL COMMENT 'staffSid 属于 专业技术资格'
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='专业技术资格表';
|
||||
|
||||
-- 专业技术工作经历
|
||||
DROP TABLE IF EXISTS `professionalwork`;
|
||||
CREATE TABLE `professionalwork`
|
||||
(
|
||||
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 专业技术工作经历及业绩',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) DEFAULT '1' COMMENT '记录状态值',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`dateStart` timestamp NULL DEFAULT NULL COMMENT '开始日期',
|
||||
`dateEnd` timestamp NULL DEFAULT NULL COMMENT '结束日期',
|
||||
`workLevel` varchar(64) DEFAULT NULL COMMENT '工作级别(国际、国家等等)',
|
||||
`workTitle` varchar(64) DEFAULT NULL COMMENT '工作名称',
|
||||
`workContent` varchar(64) DEFAULT NULL COMMENT '工作内容',
|
||||
`completionStatus` varchar(64) DEFAULT NULL COMMENT '完成情况',
|
||||
`partakeType` varchar(64) DEFAULT NULL COMMENT '参与方式(主持、参与)',
|
||||
`staffSid` varchar(64) DEFAULT NULL COMMENT 'staffSid 部分标识 专业技术工作经历',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='专业技术工作经历';
|
||||
|
||||
-- 奖励情况
|
||||
DROP TABLE IF EXISTS `reward_info`;
|
||||
CREATE TABLE `reward_info`
|
||||
(
|
||||
`id` int(32) NOT NULL DEFAULT '0' COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 人员机构关系表',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) NOT NULL DEFAULT '1' COMMENT '记录状态值:0未审核,1审核通过',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`name` varchar(64) DEFAULT NULL COMMENT '奖励名称',
|
||||
`issueOrg` varchar(64) DEFAULT NULL COMMENT '授予单位',
|
||||
`issueDate` timestamp NULL DEFAULT NULL COMMENT '授予日期',
|
||||
`certNo` varchar(64) DEFAULT NULL COMMENT '证件编号',
|
||||
`certUrl` varchar(64) DEFAULT NULL COMMENT '证件图片',
|
||||
`staffSid` varchar(64) DEFAULT NULL COMMENT 'staffSid 属于 奖励情况'
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='奖励情况';
|
||||
|
||||
-- 计量工作经历
|
||||
DROP TABLE IF EXISTS `workexperience_jl`;
|
||||
CREATE TABLE `workexperience_jl`
|
||||
(
|
||||
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 工作经历',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) DEFAULT '1' COMMENT '记录状态值',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`deptName` varchar(64) DEFAULT NULL COMMENT '工作单位',
|
||||
`post` varchar(64) DEFAULT NULL COMMENT '职位或岗位或职务',
|
||||
`job` varchar(64) DEFAULT NULL COMMENT '从事工作或从事专业',
|
||||
`dateStart` timestamp NULL DEFAULT NULL COMMENT '开始日期',
|
||||
`dateEnd` timestamp NULL DEFAULT NULL COMMENT '结束日期',
|
||||
`staffSid` varchar(64) DEFAULT NULL COMMENT '员工sid',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='计量工作经历';
|
||||
|
||||
|
||||
|
||||
-- 目前废除
|
||||
-- 行政人员信息扩展表
|
||||
DROP TABLE IF EXISTS `staff_supervise_extra`;
|
||||
CREATE TABLE `staff_supervise_extra`
|
||||
(
|
||||
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 行政人员信息扩展表',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) DEFAULT '1' COMMENT '记录状态值',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`jlManageJobDateStart` timestamp NULL DEFAULT NULL COMMENT '计量管理工作开始日期',
|
||||
`post` varchar(64) DEFAULT NULL COMMENT '职务',
|
||||
`postLevel` varchar(64) DEFAULT NULL COMMENT '职级',
|
||||
`identity` varchar(64) DEFAULT NULL COMMENT '身份(在编、聘用等)',
|
||||
`staffSid` varchar(64) DEFAULT NULL COMMENT 'staffsid 属于 行政人员信息扩展表',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='行政人员信息扩展表';
|
||||
|
||||
|
||||
-- 技术人员扩展表
|
||||
DROP TABLE IF EXISTS `staff_technical_extra`;
|
||||
CREATE TABLE `staff_technical_extra`
|
||||
(
|
||||
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`sid` varchar(64) NOT NULL COMMENT 'sid 标识 技术人员扩展表',
|
||||
`lockVersion` int(32) NOT NULL DEFAULT '0' COMMENT '记录版本,锁',
|
||||
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
|
||||
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
|
||||
`isEnable` int(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用,1:可用,0:不可用',
|
||||
`state` int(11) DEFAULT '1' COMMENT '记录状态值',
|
||||
`isDelete` int(32) DEFAULT '0' COMMENT '记录是否被删除,0:未删除,1:已经删除',
|
||||
`remarks` varchar(255) DEFAULT NULL COMMENT '备注信息',
|
||||
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建者',
|
||||
`updateBySid` varchar(64) DEFAULT NULL COMMENT '更新者',
|
||||
`techTitle` varchar(64) DEFAULT NULL COMMENT '职称',
|
||||
`currentJob` varchar(64) DEFAULT NULL COMMENT '现从事工作',
|
||||
`jlJobDateStart` timestamp NULL DEFAULT NULL COMMENT '从事计量工作开始日期',
|
||||
`identity` varchar(64) DEFAULT NULL COMMENT '身份(在编、聘用等)',
|
||||
`joinDate` timestamp NULL DEFAULT NULL COMMENT '进入本单位日期',
|
||||
`joinType` varchar(64) DEFAULT NULL COMMENT '进入本单位形式',
|
||||
`award` varchar(64) DEFAULT NULL COMMENT '奖励情况',
|
||||
`currentPost` varchar(64) DEFAULT NULL COMMENT '现聘岗位',
|
||||
`currentPostDate` timestamp NULL DEFAULT NULL COMMENT '现聘岗位日期',
|
||||
`staffSid` varchar(64) DEFAULT NULL COMMENT 'staffsid 属于 技术人员扩展表',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8
|
||||
ROW_FORMAT = DYNAMIC COMMENT ='技术人员扩展表';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
3019
jlzx-single/docs/error-info.20210317.txt
Normal file
BIN
jlzx-single/docs/pageoffice/306803188.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
jlzx-single/docs/pageoffice/571946699.jpg
Normal file
|
After Width: | Height: | Size: 84 KiB |
59
jlzx-single/docs/pageoffice/ca/HebCAService.ashx
Normal file
@@ -0,0 +1,59 @@
|
||||
<%@ WebHandler Language="C#" Class="HebCAService" %>
|
||||
|
||||
using System;
|
||||
using System.Web;
|
||||
using hyplat.bean.htmlsignature;
|
||||
using hyplat.biz.daoimpl;
|
||||
using System.Data;
|
||||
using hyplat.biz.service.htmlsignature;
|
||||
using hyplat.biz;
|
||||
|
||||
|
||||
public class HebCAService : IHttpHandler {
|
||||
|
||||
public void ProcessRequest (HttpContext context) {
|
||||
string keyvalue = context.Request["keyvalue"];
|
||||
string InstanceRecordId = context.Request["InstanceRecordId"];
|
||||
string filesId = context.Request["filesId"];
|
||||
string opinion = context.Request["opinion"];
|
||||
HTMLSignatureService htmlsignatureService = ServiceManager.getServiceBean("HTMLSignatureService") as HTMLSignatureService;
|
||||
if (keyvalue!=null && keyvalue != "")
|
||||
{
|
||||
HTMLSignature htmlsignature = new HTMLSignature();
|
||||
htmlsignature.ID = SIDWrapper.getSID("HTMLSignature");
|
||||
htmlsignature.DocumentID = filesId;
|
||||
htmlsignature.SignatureID = InstanceRecordId;
|
||||
htmlsignature.Signature = keyvalue;
|
||||
|
||||
DataTable dt = htmlsignatureService.GetByDocumentIDAndSignatureId(htmlsignature.DocumentID, htmlsignature.SignatureID);
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
htmlsignature.ID = dt.Rows[0]["ID"].ToString();
|
||||
htmlsignatureService.Update(htmlsignature);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
htmlsignatureService.Add(htmlsignature);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
string Signature = "";
|
||||
DataTable dt = htmlsignatureService.GetByDocumentIDAndSignatureId(filesId, InstanceRecordId);
|
||||
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
Signature = dt.Rows[0]["Signature"].ToString();
|
||||
}
|
||||
context.Response.Write(InstanceRecordId + "," + Signature + "," + opinion);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsReusable {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
366
jlzx-single/docs/pageoffice/ca/HebcaClient.js
Normal file
@@ -0,0 +1,366 @@
|
||||
function HebcaClient()
|
||||
{
|
||||
this.clientCtrl = null;
|
||||
}
|
||||
|
||||
HebcaClient.prototype = {
|
||||
|
||||
/*
|
||||
旧版客户端实现
|
||||
_GetClientCtrl: function() {
|
||||
if (this.clientCtrl)
|
||||
return this.clientCtrl;
|
||||
else {
|
||||
document.body.insertAdjacentHTML(
|
||||
"afterEnd",
|
||||
'<OBJECT classid="CLSID:78D1D24A-C552-4402-95FA-E9CA2E8924F2" id="HebcaClient" VIEWASTEXT width="1" height="1"></object>'
|
||||
);
|
||||
this.clientCtrl = document.getElementById("HebcaClient");
|
||||
return this.clientCtrl;
|
||||
}
|
||||
},
|
||||
*/
|
||||
|
||||
_GetClientCtrl: function() {
|
||||
if (this.clientCtrl)
|
||||
return this.clientCtrl;
|
||||
else {
|
||||
var certMgrObj;
|
||||
try {
|
||||
certMgrObj = new ActiveXObject("HebcaP11X.CertMgr");
|
||||
}
|
||||
catch (e) {
|
||||
throw Error("没有安装客户端软件或IE阻止其运行");
|
||||
}
|
||||
|
||||
certMgrObj.Licence = "aWViYx5oZWIcYWhlnWxhaJplY2FoZWJjoKw7gT6hg+O7EtJhfalPbDH9UlE=";
|
||||
this.clientCtrl = certMgrObj;
|
||||
return this.clientCtrl;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Sign: function(source) {
|
||||
var c = this._GetClientCtrl().SelectSignCert();
|
||||
return c.SignText(source, 1);
|
||||
},
|
||||
|
||||
GetSignCert: function() {
|
||||
return this._GetClientCtrl().SelectSignCert().GetCertB64();
|
||||
},
|
||||
|
||||
GetCryptCert: function() {
|
||||
return this._GetClientCtrl().SelectEncryptCert().GetCertB64();
|
||||
},
|
||||
//登录设备
|
||||
Login: function(pwd) {
|
||||
|
||||
this._GetClientCtrl().SelectDevice().Login(pwd);
|
||||
},
|
||||
//退出设备
|
||||
Logout:function(){
|
||||
this._GetClientCtrl().SelectSignCert().Logout();
|
||||
},
|
||||
GetSubjectItem: function(item) {
|
||||
return this._GetClientCtrl().SelectSignCert().GetSubjectItem(item);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
function HebcaEncrypt(){
|
||||
this.alg = 0;
|
||||
this.userCertMap = new Array();
|
||||
this.fileIn = "";
|
||||
this.fileOut = "";
|
||||
this.userKeyMap = new Array();
|
||||
this.clientCtrl = null;
|
||||
}
|
||||
|
||||
HebcaEncrypt.prototype =
|
||||
{
|
||||
_GetClientCtrl: function() {
|
||||
if (this.clientCtrl)
|
||||
return this.clientCtrl;
|
||||
else {
|
||||
var certMgrObj;
|
||||
try {
|
||||
certMgrObj = new ActiveXObject("HebcaClient.CertMgr");
|
||||
}
|
||||
catch (e) {
|
||||
throw Error("没有安装客户端软件或IE组织其运行");
|
||||
}
|
||||
|
||||
certMgrObj.Licence = "aWViYx5oZWIcYWhlnWxhaJplY2FoZWJjoKw7gT6hg+O7EtJhfalPbDH9UlE=";
|
||||
this.clientCtrl = certMgrObj;
|
||||
return this.clientCtrl;
|
||||
}
|
||||
},
|
||||
|
||||
//添加一个接收者
|
||||
AddReciever : function(user,cert){
|
||||
this.userCertMap[this.userCertMap.length]={
|
||||
user: user,
|
||||
cert: cert
|
||||
};
|
||||
},
|
||||
|
||||
//加密
|
||||
Encrypt : function(){
|
||||
|
||||
// _GetClientCtrl().
|
||||
|
||||
},
|
||||
|
||||
//获取用户名和密钥的对应字符串,字符串格式如下:
|
||||
//用户1:用户1密钥;用户2:用户2密钥; ....
|
||||
GetUserKeyString : function(){
|
||||
var str="";
|
||||
for(var i=0;i<this.userKeyMap.length;i++)
|
||||
{
|
||||
str=this.userKeyMap[i].user+":"+this.userKeyMap[i].key;
|
||||
if(i!=this.userKeyMap.length-1)
|
||||
str+=";";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//第一次提交提示签名,第二次提交可以直接提交
|
||||
var count = 0;
|
||||
function checkSignature() {
|
||||
var mLength1 = document.getElementsByName("iHtmlSignature").length;
|
||||
//已签名
|
||||
if (mLength1 > 0) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
//第二次提交,签不签名都提交
|
||||
if (count == 1) {
|
||||
count = 0;
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
//第一次提交,提示
|
||||
alert("需要先签名后,再提交!");
|
||||
count += 1;
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
//return true;
|
||||
}
|
||||
|
||||
//作用:进行签名
|
||||
function doSignature(objectname,caName,signatureid,documentid) {
|
||||
if (document.getElementById("txtTransactMessage").value.replace(/^\s+|\s+$/g, '') == "") {
|
||||
|
||||
alert('请先填写处理意见,再签名!');
|
||||
return false;
|
||||
}
|
||||
var client = new HebcaClient();
|
||||
var aa = client.GetSubjectItem("G");
|
||||
if (caName == "") {
|
||||
alert('请先到个人设置中绑定证书,再进行签名!');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (aa != caName ) {
|
||||
alert('请用登录的key进行签名!');
|
||||
return false;
|
||||
}
|
||||
//对各个字段值以分号连接组织成一串字符串
|
||||
var formData = document.getElementById("txtTransactMessage").value; //自定义组织数据结构形式
|
||||
try {
|
||||
//调用签章控件的盖章接口, 显示电子签章并生成签章结果
|
||||
archivesSealResult = document.getElementById(objectname).SignAndSealForResult(formData, "", 1, false, true);
|
||||
document.getElementById("archivesSealResult").value = archivesSealResult;
|
||||
if (archivesSealResult != null && archivesSealResult != "") {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "../HebCAService.ashx",
|
||||
data: { keyvalue: archivesSealResult, InstanceRecordId: signatureid, filesId: documentid },
|
||||
dataType: 'text',
|
||||
success: function(msg) {
|
||||
|
||||
},
|
||||
error: function() {
|
||||
// alert("默认审核人未能自动获取,请点击“选择用户”");
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
alert(e.message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//处理环节不能为空,选择用户不能为空,处理意见不能为空
|
||||
function submitCheck(isSignatureBool, caName) {
|
||||
var radios = document.getElementsByName("radiobutton");
|
||||
var j = 0;
|
||||
var m = 0;
|
||||
if (radios != null) {
|
||||
var i;
|
||||
for (i = 0; i < radios.length; i++) {
|
||||
if (radios[i].checked) {
|
||||
j = j + 1;
|
||||
}
|
||||
else {
|
||||
m = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (j == 0) {
|
||||
alert("请选择处理环节!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (document.getElementById("selectUser").value == "") {
|
||||
alert('请填写选择用户!');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (document.getElementById("txtTransactMessage").value.replace(/^\s+|\s+$/g, '') == "") {
|
||||
alert("请填写处理意见!");
|
||||
return false;
|
||||
}
|
||||
|
||||
//验证意见的长度 不能超过250个汉字或500个字符 一个汉字=2个字符
|
||||
if (!checkdata()) {
|
||||
alert("不能超过250个汉字或500个字符!");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//检查签章
|
||||
return SignatureOnOpinion(isSignatureBool, caName);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//意见审批页面必须要签名的判断
|
||||
|
||||
function SignatureOnOpinion(isSignatureBool, caName) {
|
||||
//验证是否需要签名
|
||||
if (new String(isSignatureBool).toLowerCase() == "true") {
|
||||
//验证是否签名
|
||||
if (document.getElementById("archivesSealResult").value == "") {
|
||||
alert("请先签名,再提交!");
|
||||
return false;
|
||||
}
|
||||
//验证签名是否有效
|
||||
document.getElementById(caName).VerifyAndShowSealWithResult(document.getElementById("archivesSealResult").value, 1, document.getElementById("txtTransactMessage").value);
|
||||
var result = document.getElementById(caName).GetVerifyResult();
|
||||
if (result != "0") {
|
||||
alert("意见已修改,请在签名上点击右键,选择撤销签名,撤销后重新签名!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//在网页中验证和显示签章
|
||||
function verifyAndShowSeal(documentid, url1) {
|
||||
var obs = document.getElementsByName("object");
|
||||
for (var i = 0; i < obs.length; i++) {
|
||||
|
||||
var id = obs.item(i).id;
|
||||
var opinion = obs.item(i).title;
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: url1+"HebCAService.ashx",
|
||||
data: { InstanceRecordId: id, filesId: documentid, opinion: opinion },
|
||||
dataType: 'text',
|
||||
success: function(msg) {
|
||||
if (msg.length > 0) {
|
||||
var a = msg.split(",");
|
||||
if (a.length == 3) {
|
||||
document.getElementById(a[0]).VerifyAndShowSealWithResult(a[1], 1, a[2]);
|
||||
if (document.getElementById(a[0] + "1") != null) {
|
||||
document.getElementById(a[0] + "1").VerifyAndShowSealWithResult(a[1].replace(" ", "+"), 1, a[2]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
error: function(msg) {
|
||||
alert(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
function checkdata() {
|
||||
|
||||
//判断输入长度是否合法
|
||||
if (strlen(document.getElementById("txtTransactMessage").value) > 500) {
|
||||
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//获取字符串长度
|
||||
function strlen(str) {
|
||||
|
||||
var totalCount = 0;
|
||||
for (var i = 0; i < str.length; i++) {
|
||||
var c = str.charCodeAt(i);
|
||||
if ((c >= 0x0001 && c <= 0x007e) || (0xff60 <= c && c <= 0xff9f)) {
|
||||
totalCount++;
|
||||
}
|
||||
else {
|
||||
totalCount += 2;
|
||||
}
|
||||
}
|
||||
return totalCount;
|
||||
}
|
||||
//无效章的判断
|
||||
function TjConfirm(validate) {
|
||||
if (validate == "0")
|
||||
{
|
||||
var j = 0;
|
||||
var mSignXMl = DocForm.SignatureControl.GetSignatureInfo();
|
||||
var XmlObj = new ActiveXObject("Microsoft.XMLDOM");
|
||||
XmlObj.async = false;
|
||||
var LoadOk = XmlObj.loadXML(mSignXMl);
|
||||
var ErrorObj = XmlObj.parseError;
|
||||
|
||||
var CurNodes = XmlObj.getElementsByTagName("iSignature_HTML");
|
||||
for (var iXml = 0; iXml < CurNodes.length; iXml++)
|
||||
{
|
||||
var TmpNodes = CurNodes.item(iXml);
|
||||
if (TmpNodes.selectSingleNode("SignatureResult").text == "False")
|
||||
{
|
||||
j = j + 1;
|
||||
}
|
||||
}
|
||||
if (j >= 1)
|
||||
{
|
||||
alert("当前文档内有" + j + "个无效章,请撤销重新签章后,再提交!");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
703
jlzx-single/docs/pageoffice/ca/JFWEdit.aspx
Normal file
@@ -0,0 +1,703 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="JFWEdit.aspx.cs" Inherits="office_workflow_OAjfw_JFWEdit" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||
<head id="Head1" runat="server">
|
||||
<title>您现在正在办理的工作是:<%=dtPro.Rows[0]["processName"].ToString()%></title>
|
||||
<script type="text/javascript" src="../../../js/fullscreen.js"></script>
|
||||
|
||||
<script src="../../../js/HebcaClient.js" type="text/javascript"></script>
|
||||
<link href="../../../css/layout.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../../css/columns.css" rel="stylesheet" type="text/css" />
|
||||
<script src="../../../js/ChooseUser.js" type="text/javascript"></script>
|
||||
<script language="javascript" src="../../../js/control.js" type="text/javascript"></script>
|
||||
<script language="javascript" src="../../../js/jquery-1.3.2-vsdoc2.js"></script>
|
||||
<link href="../../../css/css.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" language="javascript">
|
||||
function T()
|
||||
{
|
||||
document.getElementById('ceng').style.display='none';
|
||||
document.getElementById('close').style.display='none';
|
||||
var cslb="";
|
||||
var radios=document.getElementsByName("users");
|
||||
for(var i=0;i<radios.length;i++){
|
||||
if(radios[i].checked==true){
|
||||
document.getElementById("selectUser").value=radios[i].value;
|
||||
document.getElementById("hh").value=radios[i].id;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
function Pub()
|
||||
{
|
||||
document.getElementById("change").value="1";
|
||||
}
|
||||
// function Pub1()
|
||||
// {
|
||||
// document.getElementById("change1").value="1";
|
||||
// }
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
function GetId()
|
||||
{
|
||||
document.getElementById("selectUser").value="";
|
||||
var radios = document.getElementsByName("radiobutton");
|
||||
for (var i = 0; i < radios.length; i++) {
|
||||
if (radios[i].checked == true) {
|
||||
document.getElementById("HiddenField4").value = radios[i].id;
|
||||
document.getElementById("hiddenradio").value = radios[i].value;
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url:"../GetActionPerson.ashx",
|
||||
data:{name:document.getElementById("HiddenField4").value,shili:document.getElementById("HiddenFieldShiLi").value},
|
||||
dataType:'text',
|
||||
success: function(msg)
|
||||
{
|
||||
if(msg.length>2){
|
||||
var a=msg.split(",");
|
||||
if(a[0]=="1")
|
||||
{
|
||||
document.getElementById("btnSelect").style.display="none";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("btnSelect").style.display="block";
|
||||
}
|
||||
document.getElementById("hh").value=a[1];
|
||||
document.getElementById("selectUser").value=a[2];
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// document.getElementById("selectUser").value="";
|
||||
// }
|
||||
},
|
||||
error: function()
|
||||
{
|
||||
// alert("默认审核人未能自动获取,请点击“选择用户”");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
function Fload()
|
||||
{
|
||||
document.getElementById('iDBody1').style.display = "";
|
||||
document.getElementById('iDBody2').style.display = "none";
|
||||
document.getElementById('iDBody3').style.display = "none";
|
||||
document.getElementById('iDBody4').style.display = "none";
|
||||
document.getElementById('iDBody5').style.display = "";
|
||||
document.getElementById('topdiv').style.display = "";
|
||||
document.getElementById('divtext').style.display = "";
|
||||
}
|
||||
|
||||
var iBStatus="0";
|
||||
$(function() {
|
||||
document.getElementById("iUpload").src = "../UploadFile.aspx?filesID=" + document.getElementById("txthide").value;
|
||||
|
||||
//上传《公平竞争自查、审查表》
|
||||
document.getElementById("iUploadgpjzsc").src = "UploadFile.aspx?filesID=" + document.getElementById("txthide").value + "&ordel=1";
|
||||
//选择是否涉及下拉框时,是否显示“下载模板”和上传自查、审查表的附件
|
||||
$("#ddlaboutmark").change(function() {
|
||||
|
||||
if ($("#ddlaboutmark").val() == "涉及") {
|
||||
$("#gpjzsc").css("display", "");
|
||||
$("#uptabletr").css("display", "");
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
$("#gpjzsc").css("display", "none");
|
||||
$("#uptabletr").css("display", "none");
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//页面加载时判断是否显示“下载模板”和上传自查、审查表的附件
|
||||
if ($("#ddlaboutmark").val() == "涉及") {
|
||||
$("#gpjzsc").css("display", "");
|
||||
$("#uptabletr").css("display", "");
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
$("#gpjzsc").css("display", "none");
|
||||
$("#uptabletr").css("display", "none");
|
||||
}
|
||||
|
||||
|
||||
|
||||
$("#docedit").click(function() {
|
||||
if (document.getElementById("change").value != "1") {
|
||||
alert("请选择信息公开类别!");
|
||||
return;
|
||||
}
|
||||
if (document.getElementById("ddlaboutmark").value == "请选择") {
|
||||
|
||||
alert("请选择是否涉及市场主体经济活动!");
|
||||
return;
|
||||
}
|
||||
|
||||
// if(document.getElementById("change1").value!="1")
|
||||
// {
|
||||
// alert("请选择是否纳入体系文件!");
|
||||
// return;
|
||||
// }
|
||||
$("#iDBody1").hide();
|
||||
if (iBStatus == "1") {
|
||||
CopyTextToBookMark();
|
||||
}
|
||||
$("#iDBody2").show();
|
||||
$("#iDBody3").hide();
|
||||
$("#iDBody4").hide();
|
||||
$("#iDBody5").show();
|
||||
// setparent("true");
|
||||
|
||||
});
|
||||
$("#returnMenu").click(function() {
|
||||
$("#iDBody2").hide();
|
||||
$("#iDBody1").show();
|
||||
$("#iDBody3").hide();
|
||||
$("#iDBody4").hide();
|
||||
$("#iDBody5").show();
|
||||
//switchBar("true");
|
||||
// setparent("false");
|
||||
});
|
||||
$("#fujian").click(function() {
|
||||
if (document.getElementById("change").value != "1") {
|
||||
alert("请选择信息公开类别!");
|
||||
return;
|
||||
}
|
||||
if (document.getElementById("ddlaboutmark").value == "请选择") {
|
||||
|
||||
alert("请选择是否涉及市场主体经济活动!");
|
||||
return;
|
||||
}
|
||||
if ($("#ddlaboutmark").val() == "涉及" && $("#iUploadgpjzsc").contents().find("#dlAcc").html() == null) {
|
||||
alert("涉及市场主体经济活动时,请上传《公平竞争自查、审查表》!")
|
||||
return;
|
||||
}
|
||||
// if(document.getElementById("change1").value!="1")
|
||||
// {
|
||||
// alert("请选择是否纳入体系文件!");
|
||||
// return;
|
||||
// }
|
||||
$("#iDBody2").hide();
|
||||
$("#iDBody1").hide();
|
||||
$("#iDBody3").show();
|
||||
$("#iDBody4").hide();
|
||||
$("#iDBody5").show();
|
||||
//switchBar("true");
|
||||
// setparent("false");
|
||||
});
|
||||
$("#Btijiao").click(function() {
|
||||
|
||||
if (document.getElementById("TxtZCJG").value == "") {
|
||||
alert("主送机关不能为空!");
|
||||
$("#iDBody2").hide();
|
||||
$("#iDBody1").show();
|
||||
$("#iDBody3").hide();
|
||||
$("#iDBody4").hide();
|
||||
$("#iDBody5").show();
|
||||
// setparent("false");
|
||||
} else if (document.getElementById("change").value != "1") {
|
||||
alert("请选择信息公开类别!");
|
||||
return;
|
||||
} else if (document.getElementById("ddlaboutmark").value == "请选择") {
|
||||
|
||||
alert("请选择是否涉及市场主体经济活动!");
|
||||
return;
|
||||
}
|
||||
else if ($("#ddlaboutmark").val() == "涉及" && $("#iUploadgpjzsc").contents().find("#dlAcc").html() == null) {
|
||||
alert("涉及市场主体经济活动时,请上传《公平竞争自查、审查表》!")
|
||||
return;
|
||||
}
|
||||
// else if(document.getElementById("change1").value!="1")
|
||||
// {
|
||||
// alert("请选择是否纳入体系文件!");
|
||||
// return;
|
||||
// }
|
||||
else {
|
||||
if (iBStatus == "1") {
|
||||
SoaSave();
|
||||
$("#iDBody2").hide();
|
||||
$("#iDBody1").hide();
|
||||
$("#iDBody3").hide();
|
||||
$("#iDBody4").show();
|
||||
$("#iDBody5").hide();
|
||||
$("#topdiv").hide();
|
||||
$("#divtext").hide();
|
||||
// setparent("false");
|
||||
}
|
||||
else {
|
||||
alert("您还未编辑正文,编辑正文后才可以提交!");
|
||||
iBStatus = "1";
|
||||
$("#iDBody1").hide();
|
||||
if (iBStatus == "1") {
|
||||
CopyTextToBookMark();
|
||||
}
|
||||
$("#iDBody2").show();
|
||||
$("#iDBody3").hide();
|
||||
$("#iDBody4").hide();
|
||||
$("#iDBody5").show();
|
||||
// setparent("true");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#toBack").click(function() {
|
||||
$("#iDBody2").hide();
|
||||
$("#iDBody1").show();
|
||||
$("#iDBody3").hide();
|
||||
$("#iDBody4").hide();
|
||||
$("#iDBody5").show();
|
||||
$("#topdiv").show();
|
||||
$("#divtext").show();
|
||||
//switchBar("true");
|
||||
// setparent("false");
|
||||
});
|
||||
});
|
||||
|
||||
function CopyTextToBookMark()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
BookMarkReplace();
|
||||
}
|
||||
catch(err){
|
||||
// alert(err);
|
||||
}
|
||||
finally{
|
||||
}
|
||||
}
|
||||
|
||||
function SetWinHeight(obj)
|
||||
{
|
||||
var win=obj;
|
||||
if (document.getElementById)
|
||||
{
|
||||
if (win && !window.opera)
|
||||
{
|
||||
if (win.contentDocument && win.contentDocument.body.offsetHeight)
|
||||
win.height = win.contentDocument.body.offsetHeight;
|
||||
else if(win.Document && win.Document.body.scrollHeight)
|
||||
win.height = win.Document.body.scrollHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function SoaSave()
|
||||
{
|
||||
document.getElementById("selectJJCD").value = document.getElementById("DrpJJCD").value;
|
||||
document.getElementById("selectOrPublic").value = document.getElementById("DrpOrPublic").value;
|
||||
document.getElementById("selectAboutMark").value = document.getElementById("ddlaboutmark").value;
|
||||
document.getElementById("txtFileCode").value=document.getElementById("txthide").value;
|
||||
// document.getElementById("DropTX").value=document.getElementById("DropType").value;
|
||||
if(iBStatus=="1")
|
||||
document.getElementById("SOAOfficeCtrl").WebSave();
|
||||
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript" language="javascript">
|
||||
|
||||
//签名
|
||||
function DoSignature() {
|
||||
doSignature("ObjWebSealCtrl2", "<%=caName %>", "<%=signatureid %>", "<%=documentid %>");
|
||||
}
|
||||
//提交检查
|
||||
function SubmitCheck() {
|
||||
|
||||
|
||||
return submitCheck('<%=isqzbool %>', "ObjWebSealCtrl2");
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body style="padding:2px;" onload="verifyAndShowSeal('<%=documentid %>','../');">
|
||||
<form id="DocForm" runat="server" >
|
||||
<div class="workflowhere">
|
||||
您现在正在办理的工作是:<%=dtPro.Rows[0]["processName"].ToString()%>
|
||||
</div>
|
||||
<div class="workflowright" >
|
||||
<div id="topdiv" class="linktitle">
|
||||
<a id="returnMenu" style=" text-decoration :underline; cursor:pointer;">1)审核单</a>
|
||||
<a id="docedit" style=" text-decoration:underline;cursor:pointer;">2)编辑正文</a>
|
||||
<a id="fujian" style="text-decoration:underline;cursor:pointer;display:none;">3)上传非编辑型附件 </a></div>
|
||||
<div id="iDBody1" align="center" >
|
||||
<div id="divtext" class="workflowtitle">
|
||||
<span style="color:Red;">注:请填写表单中带*的项后,点击“编辑正文”</span>
|
||||
</div>
|
||||
<asp:HiddenField ID="HiddenFieldShiLi" runat="server" />
|
||||
<asp:HiddenField ID="HiddenFieldLiuCheng" runat="server" />
|
||||
<asp:HiddenField ID="HiddenFieldUserName" runat="server" />
|
||||
<asp:HiddenField ID="docHead" runat="server" />
|
||||
<asp:HiddenField ID="change" runat="server" />
|
||||
<%--<asp:HiddenField ID="change1" runat="server" />--%>
|
||||
<input type='hidden' name='archivesSealResult' id='archivesSealResult' value="" />
|
||||
<table class="messagetable">
|
||||
<tr>
|
||||
<td class="messagetable_td_right">
|
||||
文件标题:</td>
|
||||
<td colspan="3" class="messagetable_td_body">
|
||||
<asp:TextBox ID="TxtTitle" runat="server" Width="90%"></asp:TextBox> <asp:TextBox ID="txthide" runat="server" Width="50px" style="display:none">
|
||||
</asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="messagetable_td_right">
|
||||
起草处室:</td>
|
||||
<td class="messagetable_td_body">
|
||||
<asp:TextBox ID="TxtFilesDraftOffice" runat="server" Width="201px"
|
||||
BackColor="#C0C0C0" ReadOnly="True"></asp:TextBox></td>
|
||||
<td class="messagetable_td_right">
|
||||
起 草 人:</td>
|
||||
<td class="messagetable_td_body">
|
||||
<asp:TextBox ID="TxtFilesDraftPerson" runat="server" Width="201px"
|
||||
BackColor="#C0C0C0" ReadOnly="True"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="messagetable_td_right">
|
||||
签 发 人:</td>
|
||||
<td class="messagetable_td_body">
|
||||
<asp:TextBox ID="TxtFilesIssuePerson" runat="server" Width="201px" BackColor="#C0C0C0" Enabled="False"></asp:TextBox></td>
|
||||
<td class="messagetable_td_right">
|
||||
签发日期: </td>
|
||||
<td class="messagetable_td_body">
|
||||
<asp:TextBox ID="TxtilesIssueTime" runat="server" Width="201px"
|
||||
BackColor="#C0C0C0" Enabled="False"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="messagetable_td_right">
|
||||
主 题 词:</td>
|
||||
<td colspan="3" class="messagetable_td_body">
|
||||
<asp:TextBox ID="TxtZTC" runat="server" Width="383px"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="messagetable_td_right">
|
||||
主送机关:</td>
|
||||
<td colspan="3" class="messagetable_td_body">
|
||||
<asp:TextBox ID="TxtZCJG" runat="server" Width="383px"></asp:TextBox>
|
||||
<span style="color:Red;">*</span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="messagetable_td_right">
|
||||
抄送机关:</td>
|
||||
<td colspan="3" class="messagetable_td_body">
|
||||
<asp:TextBox ID="TxtCSJG" runat="server" Width="383px"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="messagetable_td_right">
|
||||
密 级:</td>
|
||||
<td class="messagetable_td_body">
|
||||
<asp:TextBox ID="TxtMJ" runat="server" Width="201px"
|
||||
ReadOnly="True" ForeColor="Red">非密</asp:TextBox></td>
|
||||
<td class="messagetable_td_right">
|
||||
紧急程度:</td>
|
||||
<td class="messagetable_td_body">
|
||||
<asp:DropDownList ID="DrpJJCD" runat="server">
|
||||
<asp:ListItem Value="一般">一般</asp:ListItem>
|
||||
<asp:ListItem Value="紧急"></asp:ListItem>
|
||||
|
||||
</asp:DropDownList><input type="hidden" name="selectJJCD" id="selectJJCD" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="messagetable_td_right">
|
||||
文件编号:</td>
|
||||
<td class="messagetable_td_body">
|
||||
<asp:TextBox ID="TxtFileNum" runat="server" Width="201px" BackColor="#C0C0C0" Enabled="False"></asp:TextBox>
|
||||
<input type="hidden" name="selectDllFileNum" id="selectDllFileNum" value=""/>
|
||||
<input type="hidden" name="txtFileCode" id="txtFileCode" value="" /></td>
|
||||
<td class="messagetable_td_right">
|
||||
印 数:</td>
|
||||
<td class="messagetable_td_body">
|
||||
<asp:TextBox ID="TxtPageNum" runat="server" Width="201px"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="messagetable_td_right">
|
||||
信息公开类别:</td>
|
||||
<td class="messagetable_td_body">
|
||||
<asp:DropDownList ID="DrpOrPublic" runat="server" onclick="Pub()">
|
||||
<asp:ListItem>主动公开</asp:ListItem>
|
||||
<asp:ListItem>依申请公开</asp:ListItem>
|
||||
<asp:ListItem>不予公开</asp:ListItem>
|
||||
</asp:DropDownList><span style="color:Red;">*</span>
|
||||
<input type="hidden" name="selectOrPublic" id="selectOrPublic" value="" /></td>
|
||||
|
||||
<td class="messagetable_td_right">
|
||||
是否涉及市场主体经济活动:</td>
|
||||
<td class="messagetable_td_body">
|
||||
<asp:DropDownList ID="ddlaboutmark" runat="server">
|
||||
<asp:ListItem>请选择</asp:ListItem>
|
||||
<asp:ListItem>不涉及</asp:ListItem>
|
||||
<asp:ListItem>涉及</asp:ListItem>
|
||||
</asp:DropDownList><span style="color:Red;">*</span>
|
||||
<a id="gpjzsc" style="text-decoration: underline; cursor: pointer; display:none;" href="template\gpjzsc.doc" target="_blank">下载《公平竞争自查、审查表》模板</a>
|
||||
<input type="hidden" name="selectAboutMark" id="selectAboutMark" value="" /></td>
|
||||
</tr>
|
||||
<tr id="uptabletr" runat="server" style="display:none;">
|
||||
<td colspan="4">
|
||||
<div id="iDBody31" runat="server">
|
||||
<iframe name="iUploadgpjzsc" id="iUploadgpjzsc" frameborder="0" style="border: 0; height: 80px;width: 100%"></iframe>
|
||||
</div>
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="iDBody2" style="display:none;">
|
||||
<div class="soaoffice">
|
||||
<TABLE>
|
||||
<TBODY>
|
||||
<TR vAlign="top">
|
||||
<TD height="100%">
|
||||
<table class="soatable">
|
||||
<tr>
|
||||
<td><A href="javascript:jsSave();">保存文件</A></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><A href="javascript:saveLocal();">保存本地</A></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><A href="javascript:jsDocPageSetup();">页面设置</A></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><A href="javascript:jsPrintDoc();">打印文件</A></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><A href="javascript:jsFullScreen();">全屏显示</A></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a disabled>文件套红</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><A href="javascript:jsStartHandDraw();">批注[<font color="#993300">绘图</font>]</A></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><A href="javascript:jsOpenImageDialog();">插入图片</A></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><A href="javascript:jsToggleTitlebar();">切换标题栏</A></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><A href="javascript:jsToggleMenubar();">切换菜单栏</A></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><A href="javascript:jsToggleToolbars();">切换工具栏</A></td>
|
||||
</tr>
|
||||
</table>
|
||||
</TD>
|
||||
<TD width="100%">
|
||||
<TABLE class="soa">
|
||||
<TBODY>
|
||||
<TR vAlign="top" align="left">
|
||||
<td height="655px">
|
||||
<script language="javascript">
|
||||
|
||||
function SoaSaveReturn()
|
||||
{
|
||||
if(iBStatus=="1")
|
||||
{
|
||||
|
||||
// document.getElementById("DropTX").value = document.getElementById("DropType").value;
|
||||
document.getElementById("selectJJCD").value = document.getElementById("DrpJJCD").value;
|
||||
document.getElementById("selectOrPublic").value = document.getElementById("DrpOrPublic").value;
|
||||
document.getElementById("selectAboutMark").value = document.getElementById("ddlaboutmark").value;
|
||||
|
||||
document.getElementById("txtFileCode").value=document.getElementById("txthide").value;
|
||||
document.getElementById("SOAOfficeCtrl").WebSave();
|
||||
// setparent("false");
|
||||
window.location.href='../Transact.aspx';
|
||||
}else
|
||||
{
|
||||
alert("请先编辑正文!");
|
||||
$("#iDBody1").hide();
|
||||
$("#iDBody2").show();
|
||||
$("#iDBody3").hide();
|
||||
$("#iDBody4").hide();
|
||||
$("#iDBody5").show();
|
||||
// setparent("true");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//文档另存为Html,并发布到web服务器
|
||||
function SaveAsHtml()
|
||||
{
|
||||
if (bDocOpen)
|
||||
{
|
||||
formData.SOAOfficeCtrl.WebSaveAsHtml();
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
function ShowUserDialog(){
|
||||
var obj=new Object();
|
||||
var userDg=window.showModalDialog("selectuser1/PubIndex.aspx",obj,"dialogHeight=600px;dialogWidth=800px;center=yes;");
|
||||
document.getElementById("lblCheckedUser").value=userDg[0];
|
||||
document.getElementById("selectUser").value = userDg[1];
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<!--************** SOAOFFICE 客户端代码开始 ************************-->
|
||||
<SCRIPT language="JavaScript" event="OnInit()" for="SOAOfficeCtrl">
|
||||
// 控件打开文档前触发,用来初始化界面样式
|
||||
</SCRIPT>
|
||||
<SCRIPT language="JavaScript" event="OnDocumentOpened(str, obj)" for="SOAOfficeCtrl">
|
||||
// 控件打开文档后立即触发,添加自定义菜单,自定义工具栏,禁止打印,禁止另存,禁止保存等等
|
||||
bDocOpen = true;
|
||||
|
||||
// 添加自定义菜单
|
||||
SOAOfficeCtrl.UserMenuCaption = "自定义菜单(&N)";
|
||||
SOAOfficeCtrl.AppendMenuItem(1, "显示痕迹(&S)", false);
|
||||
SOAOfficeCtrl.AppendMenuItem(2, "隐藏痕迹(&H)", false);
|
||||
SOAOfficeCtrl.AppendMenuItem(3, "-");
|
||||
SOAOfficeCtrl.AppendMenuItem(4, "显示标题(&T)");
|
||||
SOAOfficeCtrl.AppendMenuItem(5, "-");
|
||||
SOAOfficeCtrl.AppendMenuItem(6, "领导圈阅(&D)");
|
||||
// SOAOfficeCtrl.AppendMenuItem(7, "插入印章(&I)",false);
|
||||
SOAOfficeCtrl.AppendMenuItem(8, "接受所有修订(&A)", false);
|
||||
SOAOfficeCtrl.AppendMenuItem(9, "-");
|
||||
SOAOfficeCtrl.AppendMenuItem(10, "分层显示手写批注(&G)");
|
||||
// document.all("SOAOfficeCtrl").Titlebar = false;
|
||||
// TrackRevision(false);
|
||||
BookMarkReplace();
|
||||
//TrackRevision(true);
|
||||
//修改痕迹所有者
|
||||
//SetWordRevisionUser('<%= Session["UserName"].ToString() %>');
|
||||
iBStatus="1";
|
||||
//SOAOfficeCtrl.ShowRevisions = false;
|
||||
</SCRIPT>
|
||||
<SCRIPT language="JavaScript" event="OnDocumentClosed()" for="SOAOfficeCtrl">
|
||||
bDocOpen = false;
|
||||
</SCRIPT>
|
||||
<SCRIPT language="JavaScript" event="OnUserMenuClick(index, caption)" for="SOAOfficeCtrl">
|
||||
// 添加您的自定义菜单项事件响应
|
||||
if(index == 1) SOAOfficeCtrl.ShowRevisions = true;
|
||||
if(index == 2) SOAOfficeCtrl.ShowRevisions = false;
|
||||
if(index == 4) alert("该菜单的标题是:"+caption);
|
||||
if(index == 6) SOAOfficeCtrl.StartHandDraw();
|
||||
if(index == 7) jsInsertSeal();
|
||||
if(index == 8) SOAOfficeCtrl.AcceptAllRevisions();
|
||||
if(index == 10) SOAOfficeCtrl.ShowHandDrawDispBar();
|
||||
</SCRIPT>
|
||||
<SCRIPT language="JavaScript" event="OnCustomToolBarClick(index, caption)" for="SOAOfficeCtrl">
|
||||
// 添加您的自定义工具栏按钮事件响应
|
||||
if(index == 1) {
|
||||
formData.SOAOfficeCtrl.WebSave();
|
||||
alert("保存成功!");
|
||||
}
|
||||
if(index == 3) SOAOfficeCtrl.ShowRevisions = !SOAOfficeCtrl.ShowRevisions;
|
||||
if(index == 6) SOAOfficeCtrl.StartHandDraw();
|
||||
if(index == 7) SOAOfficeCtrl.ShowHandDrawDispBar();
|
||||
if(index == 9) SOAOfficeCtrl.FullScreen = !SOAOfficeCtrl.FullScreen;
|
||||
</SCRIPT>
|
||||
<!--************** SOAOFFICE 客户端代码结束 ************************-->
|
||||
<script src="../../../js/soaoffice.js"></script>
|
||||
</td>
|
||||
</TR>
|
||||
</TBODY></TABLE>
|
||||
</TD>
|
||||
</TR>
|
||||
</TBODY></TABLE>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="iDBody3" style="display:none;">
|
||||
<iframe name="iUpload" id="iUpload" frameborder="0" style="border:0;height:auto;width:100%"></iframe>
|
||||
</div>
|
||||
<div id="iDBody4" style="display:<%=iDBody4Display %>;">
|
||||
<table class="messagetable" style="font-size:14px;">
|
||||
<tr>
|
||||
<td class="messagetable_td_right">当前环节:</td>
|
||||
<td colspan="2" class="messagetable_td_body">起草人办理<asp:HiddenField ID="HiddenField1" runat="server" />
|
||||
<asp:HiddenField ID="hiddenFieldFileName" runat="server" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="messagetable_td_right" style="width:20%">处理动作:</td>
|
||||
<td class="messagetable_td_body" style="width:40%"><input id="hiddenradio" name="hiddenradio" type="hidden" value=""/>
|
||||
<%for (int i = 0; i < 4; i++)
|
||||
{%>
|
||||
<input id="<%=dtAction.Rows[i]["actionID"].ToString() %>" type="radio" name="radiobutton" value="<%=dtAction.Rows[i]["nexNodeID"].ToString() %>" onclick="document.getElementById('show').style.display='block',GetId()"/><%=dtAction.Rows[i]["actionName"].ToString()%>
|
||||
<br/>
|
||||
<%} %><asp:HiddenField ID="HiddenField4" runat="server" />
|
||||
|
||||
</td>
|
||||
<td style="width:40%">
|
||||
<div id="show" style="border:0px;display:none; background-color: #FFFFFF;">
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td style="border:0px"> <input type="text" name="selectUser" style="font-size:14px;" id="selectUser" value="" readonly="readonly" /> <input type="hidden" id="hh" name="hh" value=""/></td>
|
||||
<td style="border:0px"> <input type="button" id="btnSelect" onclick="user_select('hh','selectUser','','1','../../userdialog/selectuser_local/PubIndex.aspx')" value="" class="xzyh" /><asp:Label style="display:none;" runat="server" ID="lblCheckedUser" Text=""></asp:Label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="messagetable_td_right">处理意见:</td>
|
||||
<td colspan="2" class="messagetable_td_body">
|
||||
<asp:TextBox ID="txtTransactMessage" name="txtTransactMessage" runat="server" Font-Size="14px" Height="105px" TextMode="MultiLine"
|
||||
Width="85%"></asp:TextBox><asp:HiddenField ID="hidRecordid" runat="server" />
|
||||
<input id="hidopinion" name="<%=signatureid %>" type="hidden" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display: <%=issignature %>">
|
||||
<td class="messagetable_td_right">
|
||||
签名区:
|
||||
</td>
|
||||
<td class="messagetable_td_body">
|
||||
<object style="width:94px;height:57px" id="ObjWebSealCtrl2" classid="CLSID:AD05FC92-22B4-47D3-9D3A-A8558CBFB912"></object>
|
||||
</td>
|
||||
<td class="messagetable_td_body" style="text-align: left; height: 35px; vertical-align: middle;">
|
||||
<input type="button" value="" class="qm" onclick="DoSignature()" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="messagetable_td_right">提醒方式:</td>
|
||||
<td colspan="2" class="messagetable_td_body">
|
||||
<asp:CheckBox ID="CheckBox6" runat="server" Text="及时提醒" Checked="true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="messagetable_td_right" colspan="3">
|
||||
<asp:ImageButton ID="ImageButton1" runat="server"
|
||||
ImageUrl="~/images/Button/button26.gif" OnClientClick="return SubmitCheck()" onclick="ImageButton1_Click" />
|
||||
|
||||
<img src="../../../images/Button/button25.gif" id="toBack"/>
|
||||
|
||||
<asp:ImageButton ID="ImageButton2" runat="server"
|
||||
ImageUrl="~/images/Button/dybd.gif" onclick="imgBtnPrint_Click" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="iDBody5" class="tablebtn" style="height:30px;">
|
||||
<img id="Btijiao" src="../../../images/Button/button26.gif" />
|
||||
|
||||
<img src="../../../images/Button/bcbfh.gif" onClick="SoaSaveReturn();" />
|
||||
|
||||
<asp:ImageButton ID="imgBtnPrint" runat="server"
|
||||
ImageUrl="~/images/Button/dybd.gif" OnClientClick="SoaSave();" onclick="imgBtnPrint_Click" />
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
236
jlzx-single/docs/pageoffice/ca/JFWEdit.aspx.cs
Normal file
@@ -0,0 +1,236 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using hyplat.bean.workflat;
|
||||
using hyplat.biz.service.workflat;
|
||||
using hyplat.biz;
|
||||
using System.Collections.Generic;
|
||||
using hyplat.utilities;
|
||||
using hyplat.biz.service.organization;
|
||||
using hyplat.biz.service.user;
|
||||
using System.Text;
|
||||
using hyplat.bean.plat.workflow;
|
||||
using hyplat.biz.service.plat.workflow;
|
||||
using hyplat.bean.SMSremind;
|
||||
using hyplat.biz.service.SMSremind;
|
||||
using hyplat.bean.user;
|
||||
|
||||
public partial class office_workflow_OAjfw_JFWEdit : System.Web.UI.Page
|
||||
{
|
||||
|
||||
public string fileName;
|
||||
//public DataTable dt = new DataTable();
|
||||
private ProcessInstanceService processInstanceService = ServiceManager.getServiceBean("ProcessInstanceService") as ProcessInstanceService;
|
||||
private UserCaService userCaS = ServiceManager.getServiceBean("UserCaService") as UserCaService;
|
||||
//当前环节的所有的action
|
||||
public DataTable dtAction = null;
|
||||
//流程定义
|
||||
public DataTable dtPro = null;
|
||||
//表单中的流程实例
|
||||
public DataTable dtProcessInstance = null;
|
||||
|
||||
public string iDBody1Display;
|
||||
public string iDBody2Display;
|
||||
public string iDBody3Display;
|
||||
public string iDBody4Display;
|
||||
public string iDBody5Display;
|
||||
|
||||
|
||||
//签名定义
|
||||
protected string documentid = ""; //formid
|
||||
protected string signatureid = ""; //instanceid
|
||||
|
||||
protected string caName = "";
|
||||
protected string isqzbool = "";
|
||||
protected string issignature = "none";
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
//是否签章验证
|
||||
isqzbool = DictionaryClass.getIsSignature(Session["RoleID"].ToString());
|
||||
if (isqzbool == "true")
|
||||
{
|
||||
issignature = "";
|
||||
//电子签名
|
||||
if (Session["UserId"] != null && Session["UserId"].ToString() != "")
|
||||
{
|
||||
DataTable dtca = userCaS.GetByUserId(Session["UserId"].ToString());
|
||||
if (dtca != null && dtca.Rows.Count > 0)
|
||||
{
|
||||
caName = dtca.Rows[0]["ca"].ToString();
|
||||
}
|
||||
}
|
||||
//签章,流程记录id
|
||||
signatureid = hidRecordid.Value;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//先判断是否session过期
|
||||
LoginLogic.reloadSession();
|
||||
HiddenFieldUserName.Value = Session["UserName"].ToString();
|
||||
//流程实例Table
|
||||
dtProcessInstance = processInstanceService.getProcessInstanceByID(Request.QueryString["instanceId"].ToString());
|
||||
//动作Table
|
||||
NodeActionService nodeActionService = ServiceManager.getServiceBean("NodeActionService") as NodeActionService;
|
||||
dtAction = nodeActionService.getActionsByNodeIDAndProcessID(dtProcessInstance.Rows[0]["currentNodeID"].ToString(), dtProcessInstance.Rows[0]["processID"].ToString());
|
||||
iDBody2Display = "none";
|
||||
iDBody3Display = "none";
|
||||
iDBody4Display = "none";
|
||||
|
||||
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
change.Value = "0";
|
||||
HiddenField1.Value = DateTime.Now.ToString();
|
||||
txthide.Text = SIDWrapper.getSID("FilesId");//生成表单主键
|
||||
documentid = txthide.Text; //签章的documentid
|
||||
|
||||
//签章
|
||||
hidRecordid.Value = SIDWrapper.getSID("InstanceRecord"); //审批记录ID
|
||||
signatureid = hidRecordid.Value;
|
||||
|
||||
}
|
||||
|
||||
#region
|
||||
this.TxtTitle.Text = Server.UrlDecode(Request.QueryString["Title"].ToString());
|
||||
fileName = dtProcessInstance.Rows[0]["docpath"].ToString();
|
||||
hiddenFieldFileName.Value = fileName;
|
||||
SOAOfficeX.SOAOfficeCtrl SOACtrl = new SOAOfficeX.SOAOfficeCtrl();
|
||||
|
||||
SOACtrl.ServerURL = "../soaservice/soaserv.aspx";
|
||||
SOACtrl.MainStyle = SOAOfficeX.soaMainStyle.VistaBlue;
|
||||
SOACtrl.Caption = "编辑或查看正文";
|
||||
SOACtrl.BorderStyle = SOAOfficeX.soaBorderStyle.BorderNone;
|
||||
SOACtrl.MenubarStyle = SOAOfficeX.soaMenubarStyle.Center1;
|
||||
SOACtrl.MenubarColor = Color.FromArgb(236, 233, 216);
|
||||
SOACtrl.TitlebarTextColor = Color.FromArgb(80, 192, 72);
|
||||
SOACtrl.TitlebarColor = Color.ForestGreen;
|
||||
|
||||
HiddenFieldShiLi.Value = Request.QueryString["instanceId"].ToString();//实例ID
|
||||
HiddenFieldLiuCheng.Value = Request.QueryString["processId"].ToString();//流程ID
|
||||
ProcessDefinitionService processDefinitionService = ServiceManager.getServiceBean("ProcessDefinitionService") as ProcessDefinitionService;
|
||||
dtPro = processDefinitionService.getProcessDefinitionByID(HiddenFieldLiuCheng.Value);
|
||||
|
||||
SDepartmentService deptService = (SDepartmentService)ServiceManager.getServiceBean("SDepartmentService");
|
||||
DataTable dtDept = deptService.getSDepartmentByID(Session["DeptID"].ToString());
|
||||
TxtFilesDraftOffice.Text = dtDept.Rows[0]["DeptName"].ToString();
|
||||
TxtFilesDraftPerson.Text = Session["UserName"].ToString();
|
||||
|
||||
SOACtrl.SaveDocURL = "SaveDoc/SaveDoc2.aspx";
|
||||
SOACtrl.FileTitle = StringHandler.replaceIllegalCharacter(TxtTitle.Text.Trim());
|
||||
SOACtrl.WebOpen(fileName, SOAOfficeX.soaWorkMode.docAdmin, Session["UserName"].ToString(), "Word.Document");
|
||||
|
||||
#endregion
|
||||
string[] manageDept = new OrgTool().getManageDeptByID(Session["DeptID"].ToString()).Split(',');
|
||||
//套红doc表头
|
||||
docHead.Value = manageDept[1];
|
||||
}
|
||||
|
||||
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
//先判断是否session过期
|
||||
LoginLogic.reloadSession();
|
||||
//DataTable dtInstance = processInstanceService.getProcessInstanceByID(HiddenFieldShiLi.Value);
|
||||
//判断瞬间重复多次提交
|
||||
if (dtProcessInstance.Rows[0]["currentProcesserID"].ToString() != Request.Form["hh"].ToString() || dtProcessInstance.Rows[0]["currentActionID"].ToString() != HiddenField4.Value)
|
||||
{
|
||||
//更新的流程实例
|
||||
ProcessInstance processInstance = new ProcessInstance();
|
||||
processInstance.instanceID = HiddenFieldShiLi.Value;
|
||||
processInstance.processID = dtProcessInstance.Rows[0]["processID"].ToString();
|
||||
processInstance.drafterID = dtProcessInstance.Rows[0]["drafterID"].ToString();
|
||||
processInstance.drafterTime = (DateTime)dtProcessInstance.Rows[0]["drafterTime"];
|
||||
//需要修改的字段
|
||||
//当前处理人ID=====>下一步处理人的ID
|
||||
processInstance.currentProcesserID = Request.Form["hh"].ToString();
|
||||
//当前动作=========选择的下一步处理动作
|
||||
processInstance.currentActionID = HiddenField4.Value;//当前处理动作
|
||||
//当前环节=========>所选择的动作的环节ID
|
||||
processInstance.currentNodeID = Request.Form["hiddenradio"].ToString();
|
||||
//当前状态
|
||||
processInstance.instanceStatus = "00";
|
||||
//表单ID
|
||||
processInstance.formID = txthide.Text;
|
||||
//表单标题
|
||||
processInstance.formTitleName = TxtTitle.Text;
|
||||
processInstance.docPath = hiddenFieldFileName.Value;
|
||||
processInstance.workType = dtPro.Rows[0]["processName"].ToString();
|
||||
/*上一步处理人信息*/
|
||||
processInstance.priorProcesserID = dtProcessInstance.Rows[0]["currentProcesserID"].ToString();
|
||||
processInstance.priorNodeID = dtProcessInstance.Rows[0]["currentNodeID"].ToString();
|
||||
processInstance.priorActionID = dtProcessInstance.Rows[0]["currentActionID"].ToString();
|
||||
///发起部门
|
||||
processInstance.CreateDept = dtProcessInstance.Rows[0]["CreateDept"].ToString();
|
||||
processInstance.CreateDeptId = dtProcessInstance.Rows[0]["CreateDeptId"].ToString();
|
||||
//审批记录
|
||||
InstanceRecord instanceRecord = new InstanceRecord();
|
||||
instanceRecord.recordID = hidRecordid.Value;
|
||||
instanceRecord.instanceID = HiddenFieldShiLi.Value;//实例ID
|
||||
instanceRecord.processID = HiddenFieldLiuCheng.Value;//流程ID
|
||||
instanceRecord.currentProcesserID = Session["UserId"].ToString();//当前处理人
|
||||
instanceRecord.currentProcessTime = DateTime.Now;//当前处理时间
|
||||
instanceRecord.currentNodeID = processInstance.currentNodeID;//当前处理环节
|
||||
instanceRecord.currentNodeActionID = processInstance.currentActionID;//当前处理动作
|
||||
instanceRecord.nextProcesserID = Request.Form["hh"].ToString();//Request.Form["hh"].ToString();下一步处理人
|
||||
instanceRecord.nextNodeID = processInstance.currentNodeID;//修改通过查询得到
|
||||
instanceRecord.status = "00";
|
||||
///当前处理人的部门
|
||||
instanceRecord.currentDeptName = Session["DeptName"].ToString();
|
||||
instanceRecord.currentDeptId = Session["DeptID"].ToString();
|
||||
|
||||
//处理意见
|
||||
|
||||
InstanceOpinion instanceOpinion = new InstanceOpinion();
|
||||
instanceOpinion.recordID = instanceRecord.recordID;
|
||||
instanceOpinion.instanceID = processInstance.instanceID;//流程实例ID
|
||||
instanceOpinion.processID = instanceRecord.processID;
|
||||
instanceOpinion.opinion = txtTransactMessage.Text;
|
||||
instanceOpinion.isRemind = this.CheckBox6.Checked == true ? "01" : "00";
|
||||
|
||||
|
||||
//如果选择了消息提醒,在消息提醒表中添加一条记录
|
||||
if (this.CheckBox6.Checked == true)
|
||||
{
|
||||
//添加一条消息提醒记录,多个接受者添加多条记录
|
||||
//string receiveID = txtuserIDs.Text.Trim();
|
||||
string receiveUserID = Request.Form["hh"].ToString();
|
||||
|
||||
SMS sms = new SMS();
|
||||
sms.msgContent = dtProcessInstance.Rows[0]["formTitleName"].ToString();
|
||||
sms.msgID = dtProcessInstance.Rows[0]["formID"].ToString();
|
||||
sms.msgSource = "工作流_" + dtPro.Rows[0]["processName"].ToString();
|
||||
sms.senderID = Session["UserID"].ToString();
|
||||
sms.sendTime = DateTime.Now.ToString();
|
||||
sms.status = "00";
|
||||
//添加一个消息提醒记录
|
||||
SMSService smsService = ServiceManager.getServiceBean("SMSService") as SMSService;
|
||||
smsService.addSMS(sms, receiveUserID);
|
||||
#region 发送短信
|
||||
MsgWs msgWs = new MsgWs();
|
||||
msgWs.SendWaitWorkMsg(Session["UserId"].ToString(), Request.Form["hh"].ToString(), dtProcessInstance.Rows[0]["formTitleName"].ToString(), dtPro.Rows[0]["processName"].ToString(), "", "");
|
||||
#endregion
|
||||
|
||||
}
|
||||
ProcessManagerService processManagerService = ServiceManager.getServiceBean("ProcessManagerService") as ProcessManagerService;
|
||||
processManagerService.nextProcess(instanceRecord, instanceOpinion, processInstance);
|
||||
}
|
||||
Response.Write("<script>alert('操作成功');window.location.href='../Transact.aspx'</script>");
|
||||
}
|
||||
|
||||
//打印表单
|
||||
protected void imgBtnPrint_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
string url = "Print.aspx?shiliID=" + HiddenFieldShiLi.Value;
|
||||
Page.ClientScript.RegisterStartupScript(this.GetType(), "", " <script type='text/JavaScript'>window.open('" + url + "'); </script>");
|
||||
}
|
||||
}
|
||||
186
jlzx-single/docs/pageoffice/ca/Login.aspx
Normal file
@@ -0,0 +1,186 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>
|
||||
<%@ OutputCache Location="None" VaryByParam="none" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
|
||||
|
||||
<title>河北省质量技术监督局机关标准化管理系统<%=versionTitle %> - 用户登录</title>
|
||||
|
||||
<script src="js/HebcaClient.js" type="text/javascript"></script>
|
||||
<link href="css/css.css" type="text/css" rel="stylesheet"/>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
// var client = new HebcaClient();
|
||||
function Sign() {
|
||||
try {
|
||||
|
||||
var client = new HebcaClient();
|
||||
document.getElementById("signature").value = client.Sign(Form1.msg.value);
|
||||
document.getElementById("signCert").value = client.GetSignCert();
|
||||
document.getElementById("cryptCert").value = client.GetCryptCert();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (e) {
|
||||
alert(e.message);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
function document.onkeydown() {
|
||||
if (event.keyCode == 13) {
|
||||
document.getElementById("ImgBtnLogin").click();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.style1
|
||||
{
|
||||
height: 48px;
|
||||
}
|
||||
.style3
|
||||
{
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body style="background-color:#A6CDFE;">
|
||||
<form id="Form1" runat="server">
|
||||
<asp:HiddenField runat="server" ID="hidsolt" />
|
||||
<div style="display: none">
|
||||
<asp:TextBox ID="msg" runat="server"></asp:TextBox>
|
||||
<asp:TextBox runat="server" ID="signature" />
|
||||
<asp:TextBox runat="server" ID="signCert" />
|
||||
<asp:TextBox runat="server" ID="cryptCert" />
|
||||
</div>
|
||||
<!--登录中间最外层背景填充-->
|
||||
<div class="login1" align="center">
|
||||
|
||||
<!--中间三部分图片的外层容器-->
|
||||
<div style="width:1024px;">
|
||||
<div id="login_left" style="background-image:url(<%=loginLeft%>);" ></div>
|
||||
<div id="login_center">
|
||||
<table border="0" cellspacing="0" cellpadding="0" align="center"
|
||||
style="height: 173px; width: 384px;">
|
||||
<tr>
|
||||
<td width="90" align="right" style="height:18px">
|
||||
</td>
|
||||
<td width="207" style="height:18px">
|
||||
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="90" align="right" class="style3">
|
||||
登录名:
|
||||
</td>
|
||||
<td width="207" class="style3">
|
||||
<asp:TextBox ID="txtUserName" class="logintxt" runat="server"></asp:TextBox>
|
||||
</td>
|
||||
<td rowspan="2" style="display:<%=issignature%>">
|
||||
<asp:Button ID="btnCa" Text="证书登录"
|
||||
runat="server" Width="80px" OnClientClick="return Sign();"
|
||||
onclick="btnCa_Click" Height="60px" TabIndex="3" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="90" align="right" class="style3">
|
||||
密 码:
|
||||
</td>
|
||||
<td width="207" class="style3">
|
||||
<asp:TextBox runat="server" class="logintxt" ID="txtUserPassword"
|
||||
TextMode="Password" TabIndex="1" ></asp:TextBox>
|
||||
</td>
|
||||
|
||||
<%--<td class="style3"><a href="UserReGetPassword.aspx" target="_blank" title="获取密码" style=" text-decoration:underline;">获取密码</a>
|
||||
</td>--%>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="90px" align="right" style="height:30px; line-height:30px">验 证 码:</td>
|
||||
<td colspan="2" style="height:30px; line-height:30px; text-align:left;">
|
||||
<asp:TextBox id="validatechar" runat="server" style="width:80px;height:18px; line-height:18px; vertical-align:middle;margin-left:5px;" />
|
||||
<asp:ImageButton id="imgBtn" runat="server" Width="80px" Height="30px" style="vertical-align:middle;" /><a href="javascript:changeCode()" style="text-decoration: underline;"> 换一张</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align="center" class="style1" valign="bottom">
|
||||
<asp:ImageButton src="images/login-1.gif" Width="81" Height="23" ID="ImgBtnLogin"
|
||||
runat="server" OnClick="ImgBtnLogin_Click" TabIndex="2" /> <asp:ImageButton
|
||||
src="images/login-2.gif" Width="81" Height="23" ID="ImgBtnClear" runat="server"
|
||||
OnClick="ImgBtnClear_Click" TabIndex="4" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="30" colspan="3" align="center" style="text-align: left">
|
||||
<asp:Label ID="lblLoginMsg" runat="server" ForeColor="Red" TabIndex="6"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="text-align: center;">
|
||||
如果您的机器不能正常安装在线办公的插件请<asp:LinkButton ID="LinkButton1" runat="server" ForeColor="Red"
|
||||
OnClick="LinkButton1_Click" TabIndex="5">下载在线客户端控件</asp:LinkButton>
|
||||
</div>
|
||||
<div style="text-align: center; line-height:20px;"><span style="color:yellow;">(目前证书登录功能仅限局领导使用,其他人员可按原登录方式登录。)</span><br/>
|
||||
查看局领导电子签名,请下载并安装<a href="soasetup/河北腾翔电子签章客户端.zip" target="_blank"
|
||||
style="color:Red;" tabindex="7">证书客户端</a>。
|
||||
|
||||
|
||||
</div>
|
||||
<!-- OBJECT标签,客户端控件引用 -->
|
||||
<br />
|
||||
<div id="obj" style="display: none">
|
||||
<object id="SOAOfficeCtrl" codebase="zsoffice.cab#version=2,0,0,1" height="5px"
|
||||
width="5px" data="" classid="clsid:AD06827C-D92F-4648-B880-138AF11E8A13" viewastext>
|
||||
</object>
|
||||
</div>
|
||||
<div id="install" style="display:inline">
|
||||
<span style="color: red; text-align: left;">
|
||||
本机尚未安装在线客户端控件,请安装浏览器上方黄色提示条或弹出提示框中的客户端控件。第一次登录系统后,请及时修改密码。 </span>
|
||||
</div>
|
||||
<div id="chk">
|
||||
<img src="images/load.gif" width="100%" height="16">
|
||||
</div>
|
||||
<div id="info" style="display: none">
|
||||
</div>
|
||||
<!--************** SOAOFFICE 客户端代码结束 ************************-->
|
||||
<table width="1px"><tr><td height="1"><%--<object id="WebPDF" width="100%" height="100%" classid="clsid:39E08D82-C8AC-4934-BE07-F6E816FD47A1" codebase="iso9000/iWebPDF.cab#version=7,2,0,338" VIEWASTEXT></object>--%></td></tr></table>
|
||||
</div>
|
||||
<div id="login_right"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function changeCode() {
|
||||
document.getElementById('imgBtn').src = document.getElementById('imgBtn').src + '?';
|
||||
}
|
||||
// confirm(' 2012年8月21日19:00-21:00省局信息中心对“河北省质量技术监督局协同办公系统(省局版)”\n进行了迁移升级,新系统的登录地址、用户名及登录密码与原系统相同。\n\n 具体功能变化详见新系统首页通知公告!\n\n 对新系统使用中的问题和疑问请联系信息中心,以便改进完善。联系方式:0311-67568151,\n0311-67568150或13513219196\n\n2012年8月22日');
|
||||
var mObject=false;
|
||||
try{
|
||||
document.getElementById("SOAOfficeCtrl").Menubar = false;
|
||||
|
||||
}catch(e)
|
||||
{
|
||||
mObject=true;
|
||||
}
|
||||
if(!mObject){
|
||||
//alert('1');
|
||||
document.all.install.style.display="none";
|
||||
document.all.chk.style.display="none";
|
||||
}
|
||||
else{
|
||||
//alert('2');
|
||||
document.all.install.style.display="block";
|
||||
document.all.chk.style.display="none";
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
335
jlzx-single/docs/pageoffice/ca/Login.aspx.cs
Normal file
@@ -0,0 +1,335 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using hyplat.bean.sysconfig;
|
||||
using hyplat.biz;
|
||||
using hyplat.biz.service.orgcode;
|
||||
using hyplat.biz.service.sysconfig;
|
||||
using hyplat.biz.service.user;
|
||||
using hyplat.utilities;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using SSOAgentLibrary.client.filter;
|
||||
|
||||
public partial class Login : System.Web.UI.Page
|
||||
{
|
||||
protected static string loginLeft = "images/loginImgs/bg_left.jpg";
|
||||
protected static string versionTitle = "";
|
||||
protected string issignature = "none";
|
||||
protected string iscertlogin = "false";
|
||||
UserLoginTimeService ulservice = ServiceManager.getServiceBean("UserLoginTimeService") as UserLoginTimeService;
|
||||
private UserCaService userCaS = ServiceManager.getServiceBean("UserCaService") as UserCaService;
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
//神州融信单点登录
|
||||
//AuthenFilter authenfilter = new AuthenFilter();
|
||||
//authenfilter.doFilter(Request);
|
||||
|
||||
|
||||
//if (Session["UserID"] != null && Session["UserID"].ToString().Length > 0)
|
||||
//{
|
||||
// Response.Redirect("Default.aspx");
|
||||
//}
|
||||
|
||||
//是否签章验证
|
||||
iscertlogin = DictionaryClass.getValue("是否证书登录");
|
||||
if (iscertlogin == "true")
|
||||
issignature = "";
|
||||
if (!IsPostBack)
|
||||
{
|
||||
|
||||
//不知道干什么用,11.26mtl暂时删除
|
||||
//if (Request.QueryString["userName"] != null && Request.QueryString["userPassword"] != null)
|
||||
// {
|
||||
// txtUserName.Text = Server.UrlDecode(Request.QueryString["userName"].ToString());
|
||||
// txtUserPassword.Text = Server.UrlDecode(Request.QueryString["userPassword"].ToString());
|
||||
// userLoginChecked();
|
||||
|
||||
// }
|
||||
|
||||
|
||||
//打开页面时先生成一个随机数发给客户端,并保存到session中。
|
||||
Random r = new Random();
|
||||
String random = RandomString.Next();
|
||||
Session["random"] = random;
|
||||
msg.Text = random.ToString();
|
||||
|
||||
}
|
||||
//随机字符串
|
||||
Session["solt"] = RandomString.Next();
|
||||
hidsolt.Value = Session["solt"].ToString();
|
||||
|
||||
imgBtn.ImageUrl = "ImageCodeValidate.aspx";
|
||||
}
|
||||
protected void ImgBtnClear_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
clearLoginContent();
|
||||
}
|
||||
|
||||
protected void ImgBtnLogin_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
string code = validatechar.Text;
|
||||
HttpCookie htco = Request.Cookies["ImageV"];
|
||||
string scode = htco.Value.ToString();
|
||||
if (code != scode)
|
||||
{
|
||||
MessageBox.Show("验证码输入不正确,请重新输入!", Page);
|
||||
validatechar.Text = "";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
userLoginChecked();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 清空登录的文本框并让用户名文本框获得焦点以便用户重新输入
|
||||
/// </summary>
|
||||
protected void clearLoginContent()
|
||||
{
|
||||
txtUserName.Text = string.Empty;
|
||||
txtUserPassword.Text = string.Empty;
|
||||
txtUserName.Focus();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 登录信息验证的方法
|
||||
/// </summary>
|
||||
protected void userLoginChecked()
|
||||
{
|
||||
if (Session["solt"].ToString() != hidsolt.Value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Session["solt"] = null;
|
||||
string userName = txtUserName.Text.Trim();
|
||||
//特殊情况可以不用证书登录
|
||||
bool isSpecial = userName.Contains("_hebqts@yxt");
|
||||
//解密页面上传过来的密码
|
||||
//string userPassword = hyplat.utilities.EncryptionTool.GetDecodeString(txtUserPassword.Text.Trim());
|
||||
//加密密码与数据库中的对比
|
||||
|
||||
string userPassword = hyplat.utilities.EncryptionTool.BBS_MD5_Encrypt(txtUserPassword.Text.Trim(), 32);
|
||||
if (userName != string.Empty && userPassword != string.Empty)
|
||||
{
|
||||
UserService uService = (UserService)ServiceManager.getServiceBean("UserService");
|
||||
DataTable dtLoginUser = uService.getUserForLogin(userName);
|
||||
if (dtLoginUser != null && dtLoginUser.Rows.Count > 0)
|
||||
{
|
||||
string userOrg = dtLoginUser.Rows[0]["OrgID"].ToString();
|
||||
OrgCodeService codeServide = ServiceManager.getServiceBean("OrgCodeService") as OrgCodeService;
|
||||
string localOrg = codeServide.getLocalCode();
|
||||
if (userOrg != "0" && userOrg != localOrg)
|
||||
{
|
||||
lblLoginMsg.Text = "请核对您登录的服务器是否正确";
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
lblLoginMsg.Text = "用户名或密码错误!";
|
||||
return;
|
||||
}
|
||||
//特殊情况可以不用证书登录
|
||||
if (!isSpecial)
|
||||
{
|
||||
DictionaryService DicSer = ServiceManager.getServiceBean("DictionaryService") as DictionaryService;
|
||||
string value = DictionaryClass.getIsSignature(dtLoginUser.Rows[0]["RoleID"].ToString());
|
||||
if (value == "true")
|
||||
{
|
||||
DataTable dtCa = userCaS.GetByUserId(dtLoginUser.Rows[0]["ID"].ToString());
|
||||
if (dtCa != null && dtCa.Rows.Count > 0)
|
||||
{
|
||||
if (dtCa.Rows[0]["ca"].ToString() != "hebqts_commonuser")
|
||||
{
|
||||
MessageBox.Show("已绑定数字证书,请使用数字证书登录!", Page);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//需要有一个非法字符的判断
|
||||
int result = 0;
|
||||
lblLoginMsg.Text = string.Empty;
|
||||
|
||||
result = ulservice.LoginControl(userName, userPassword,HttpContext.Current.Request.UserHostAddress);
|
||||
//登录成功
|
||||
if (1 == result)
|
||||
{
|
||||
//是否允许重复登陆,读写配置文件中的项,1为不允许,其他为允许(mtl20170422)
|
||||
string filterStr = System.Configuration.ConfigurationManager.AppSettings["hebqts_onlylogin"];
|
||||
if (filterStr == "1")
|
||||
{
|
||||
if (dtLoginUser.Rows[0]["Status"].ToString() == "01")
|
||||
{
|
||||
lblLoginMsg.Text = "您已经登陆,不能重复登陆。";
|
||||
return;
|
||||
}
|
||||
}
|
||||
LoginLogic.LoginInit(dtLoginUser);
|
||||
if (Request.QueryString["type"] != null)
|
||||
Response.Redirect("Default.aspx?type=" + Request.QueryString["type"].ToString());
|
||||
else
|
||||
Response.Redirect("Default.aspx");
|
||||
//Response.Redirect("TreeTest.aspx");
|
||||
//Response.Redirect("Index.aspx");
|
||||
//Response.Redirect("iso9000/isoFiles/IsoFilesCollection.aspx");
|
||||
//Response.Redirect("office/sendfile/sendfile.aspx");
|
||||
//return;
|
||||
}
|
||||
if (0 == result)
|
||||
{
|
||||
lblLoginMsg.Text = "用户或密码错误,请核对";
|
||||
return;
|
||||
}
|
||||
//默认密码登录,请修改密码
|
||||
if (-6 == result)
|
||||
{
|
||||
Session["checkstr"] = System.DateTime.Now.ToString();
|
||||
Response.Redirect("AlterPassword.aspx?UserName=" + userName);
|
||||
return;
|
||||
}
|
||||
//网络连接失败
|
||||
if (-90 == result)
|
||||
{
|
||||
lblLoginMsg.Text = "网络连接失败,请稍候重试!";
|
||||
return;
|
||||
}
|
||||
//网络连接失败
|
||||
if (-99 == result)
|
||||
{
|
||||
lblLoginMsg.Text = "未知错误!";
|
||||
return;
|
||||
}
|
||||
|
||||
ErrorControl(dtLoginUser.Rows[0]["ID"].ToString(),result);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblLoginMsg.Text = "用户名和密码不允许为空 !";
|
||||
}
|
||||
}
|
||||
|
||||
private void ErrorControl(string userId,int error)
|
||||
{
|
||||
//用户名或者密码不正确
|
||||
DataTable dtul = ulservice.getUserLoginTimeByUserID(userId);
|
||||
if (dtul != null && dtul.Rows.Count > 0)
|
||||
{
|
||||
int errorcount = Convert.ToInt32(ulservice.getLoginErrorQuantity()) - Convert.ToInt32(dtul.Rows[0]["ErrorQuantity"]);
|
||||
if (error == -1)
|
||||
{
|
||||
lblLoginMsg.Text = "输入用户名或密码错误。";
|
||||
//if (errorcount > 0)
|
||||
lblLoginMsg.Text += "您还有 " + errorcount.ToString() + " 次机会可以登陆到系统";
|
||||
|
||||
}
|
||||
if (error == -9)
|
||||
{
|
||||
int lockMinutes = Convert.ToInt32(ulservice.getLockTime());
|
||||
int errorTimes = DateTool.DateDiff(DateTime.Now, Convert.ToDateTime(dtul.Rows[0]["LastErrorTime"]), "minute");
|
||||
lblLoginMsg.Text = "对不起,您的账户已经锁定,在 " + (lockMinutes-errorTimes).ToString() + " 分钟后才可以重新登陆到系统。<br />如果您忘记密码请联系管理员!";
|
||||
txtUserName.Enabled = false;
|
||||
txtUserPassword.Enabled = false;
|
||||
ImgBtnLogin.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void LinkButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Response.Buffer = true;
|
||||
Response.Clear();
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode("SOA中间件安装SOAOfficeSetup.rar"));
|
||||
Response.ContentType = "application/octet-stream";
|
||||
Response.WriteFile("~/soasetup/download.rar");
|
||||
Response.Flush();
|
||||
Response.End();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
protected void btnCa_Click(object sender, EventArgs e)
|
||||
{
|
||||
//从session中获取随机数
|
||||
if (Session["random"] == null)
|
||||
{
|
||||
MessageBox.Show("验签失败:操作超时,请重新登录", Page);
|
||||
return;
|
||||
}
|
||||
String random = msg.Text;
|
||||
//LogFile.log(random + "点击登陆", "时间:" + DateTime.Now);
|
||||
//联系svs服务器,进行验证
|
||||
int result = BLL.SvsManager.VerifyCertSign(Encoding.ASCII.GetBytes(random), signCert.Text, signature.Text);
|
||||
if (result != 0) //认证失败
|
||||
{
|
||||
|
||||
string strResult = "验证失败:";
|
||||
switch (result)
|
||||
{
|
||||
case -1:
|
||||
strResult += "(无法连接svs服务器)";
|
||||
break;
|
||||
case 2:
|
||||
strResult += "(证书已经过期,需要延期后才能使用)";
|
||||
break;
|
||||
case -6805:
|
||||
strResult += "(无效的证书文件)";
|
||||
break;
|
||||
case -6406:
|
||||
strResult += "(签名验证失败)";
|
||||
break;
|
||||
default:
|
||||
strResult += "(errorcode:" + result + ")";
|
||||
break;
|
||||
}
|
||||
|
||||
MessageBox.Show(strResult, Page);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//解析证书获取CN
|
||||
X509Certificate2 xcert = new X509Certificate2(Encoding.ASCII.GetBytes(signCert.Text));
|
||||
DN dn = new DN(xcert.Subject);
|
||||
String cn = dn.CommonName;
|
||||
String gName = dn.GivenName;
|
||||
|
||||
String uniqueCode = gName;
|
||||
if (cn.Length > gName.Length)
|
||||
{
|
||||
uniqueCode = cn;
|
||||
}
|
||||
//LogFile.log(random+"验证成功", "时间:" + DateTime.Now);
|
||||
|
||||
UserService uservice = ServiceManager.getServiceBean("UserService") as UserService;
|
||||
DataTable dtLoginUser = uservice.GetLoginByCA(uniqueCode);
|
||||
if (dtLoginUser != null && dtLoginUser.Rows.Count > 0)
|
||||
{
|
||||
LoginLogic.LoginInit(dtLoginUser);
|
||||
Response.Redirect("Default.aspx");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("证书还没有绑定用户!", Page);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
54
jlzx-single/docs/pageoffice/ca/selectTemplate.aspx
Normal file
@@ -0,0 +1,54 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="selectTemplate.aspx.cs" Inherits="office_workflow_selectTemplate" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>可选择的套红模版</title>
|
||||
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
|
||||
<SCRIPT LANGUAGE="javascript" type="text/javascript" src="../../js/control.js"></SCRIPT>
|
||||
<script language="javascript" src="../../js/jquery-1.3.2-vsdoc2.js"></script>
|
||||
<link href="../../css/css.css" rel="stylesheet" type="text/css" />
|
||||
<script language=javascript>
|
||||
function CheckValue(theForm) {
|
||||
var mObject;
|
||||
if (parent.dialogArguments)
|
||||
mObject = parent.dialogArguments;
|
||||
else
|
||||
mObject = window.parent.opener;
|
||||
|
||||
|
||||
mObject = window.dialogArguments;
|
||||
mObject.SelectValue = theForm.WordList.value;
|
||||
|
||||
window.close();
|
||||
return;
|
||||
}
|
||||
</SCRIPT>
|
||||
</head>
|
||||
<body style="background-color:#fdfae7">
|
||||
<form name="FormSelect">
|
||||
<table class="messagetable">
|
||||
<tr>
|
||||
<td align="center">请选择您要使用的套红模板</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<select name="WordList">
|
||||
<%for (int i = 0; i < dtTemp.Rows.Count;i++ ){%>
|
||||
<option value="<%=dtTemp.Rows[i]["webPath"].ToString() %>"><%=dtTemp.Rows[i]["VbaName"].ToString()%></option>
|
||||
<%} %>
|
||||
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<input class="button" type="button" value="确定" onclick="CheckValue(FormSelect);">
|
||||
<input class="button" type="button" value="取消" onclick="window.close();"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
32
jlzx-single/docs/pageoffice/ca/selectTemplate.aspx.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using hyplat.biz.service.soaweb;
|
||||
using hyplat.biz;
|
||||
|
||||
public partial class office_workflow_selectTemplate : System.Web.UI.Page
|
||||
{
|
||||
|
||||
|
||||
public DataTable dtTemp;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
LoginLogic.reloadSession();
|
||||
if (Request.QueryString["ProcessId"].ToString() != "")
|
||||
{
|
||||
VbaAuthorizeService vbaAuthorizeService = ServiceManager.getServiceBean("VbaAuthorizeService") as VbaAuthorizeService;
|
||||
dtTemp = vbaAuthorizeService.getVbaAuthorizeByID(Session["UserId"].ToString(), Request.QueryString["ProcessId"].ToString());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
3
jlzx-single/docs/pageoffice/jar2maven.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
mvn install:install-file -Dfile=pageoffice-5.1.0.1.jar -DgroupId=com.zhuozhengsoft -DartifactId=pageoffice -Dversion=5.1.0.1 -Dpackaging=jar
|
||||
|
||||
227
jlzx-single/docs/pageoffice/pageofficecontrol.js
Normal file
@@ -0,0 +1,227 @@
|
||||
//pageoffice内容
|
||||
|
||||
//保存文档到web服务器
|
||||
function jsSave() {
|
||||
try {
|
||||
if (iBStatus == "1")
|
||||
document.getElementById("PageOfficeCtrl1").WebSave(); // 保存到服务器
|
||||
}
|
||||
catch (e) {
|
||||
alert("文档保存失败!\n错误信息:" + e.message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//保存并返回
|
||||
function SoaSaveReturn() {
|
||||
|
||||
if (iBStatus == "1") {
|
||||
jsSave();
|
||||
|
||||
window.location.href = '../Transact.aspx';
|
||||
|
||||
} else {
|
||||
alert("请先编辑或查看正文!");
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//另存到本地1:打开 2:保存 3:另存为 4:打印 5:打印设置 6:文件属性
|
||||
function saveLocal() {
|
||||
|
||||
document.getElementById("PageOfficeCtrl1").ShowDialog(3);
|
||||
|
||||
}
|
||||
//页面设置
|
||||
function jsDocPageSetup() {
|
||||
|
||||
document.getElementById("PageOfficeCtrl1").ShowDialog(5);
|
||||
}
|
||||
|
||||
//打印文件
|
||||
function jsPrintDoc() {
|
||||
document.getElementById("PageOfficeCtrl1").ShowDialog(4);
|
||||
}
|
||||
|
||||
//全屏显示
|
||||
function jsFullScreen() {
|
||||
|
||||
document.getElementById("PageOfficeCtrl1").FullScreen = !document.getElementById("PageOfficeCtrl1").FullScreen;
|
||||
|
||||
}
|
||||
|
||||
//打开插入本地图片的对话框
|
||||
function jsOpenImageDialog() {
|
||||
document.getElementById("PageOfficeCtrl1").OpenImageDialog();
|
||||
}
|
||||
|
||||
//隐藏或显示修订痕迹
|
||||
function jsShowTrack(value) {
|
||||
document.getElementById("PageOfficeCtrl1").ShowRevisions = value;
|
||||
}
|
||||
|
||||
|
||||
//作用:是否保留痕迹,true表示保留痕迹,false表示不保留痕迹
|
||||
//function TrackRevision(value) {
|
||||
// try {
|
||||
// document.getElementById("PageOfficeCtrl1").ShowRevisions = value;
|
||||
// }
|
||||
// catch (e) {
|
||||
|
||||
// }
|
||||
//}
|
||||
|
||||
//切换标题栏
|
||||
function jsToggleTitlebar() {
|
||||
document.getElementById("PageOfficeCtrl1").Titlebar = !document.getElementById("PageOfficeCtrl1").Titlebar;
|
||||
}
|
||||
//切换菜单栏
|
||||
function jsToggleMenubar() {
|
||||
document.getElementById("PageOfficeCtrl1").Menubar = !document.getElementById("PageOfficeCtrl1").Menubar;
|
||||
}
|
||||
//切换工具栏
|
||||
function jsToggleToolbars() {
|
||||
document.getElementById("PageOfficeCtrl1").CustomToolbar = !document.getElementById("PageOfficeCtrl1").CustomToolbar;
|
||||
}
|
||||
|
||||
//全文手写批注
|
||||
function jsStartHandDraw() {
|
||||
document.getElementById("PageOfficeCtrl1").HandDraw.Start();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//控制套红是否显示
|
||||
function orVbaShow() {
|
||||
if (document.getElementById("vbaStatus").value == "true") {
|
||||
document.getElementById("vbaOne").style.display = "block";
|
||||
document.getElementById("vbaTwo").style.display = "none";
|
||||
|
||||
} else {
|
||||
document.getElementById("vbaOne").style.display = "none";
|
||||
document.getElementById("vbaTwo").style.display = "block";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//使用指定的模板套红../office/workflow/selectTemplate.aspx
|
||||
function jsApplyFileTemplate() {
|
||||
|
||||
var mDialogUrl = "../selectTemplate.aspx?ProcessId=" + document.getElementById("HiddenFieldLiuCheng").value;
|
||||
var mObject = new Object();
|
||||
mObject.SelectValue = "";
|
||||
window.showModalDialog(mDialogUrl, mObject, "dialogHeight:180px; dialogWidth:440px;center:yes;scroll:no;status:no;");
|
||||
//判断用户是否选择模板
|
||||
if (mObject.SelectValue != "") {
|
||||
|
||||
document.getElementById("PageOfficeCtrl1").InsertDocumentFromURL("../" + mObject.SelectValue);
|
||||
|
||||
BookMarkReplace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//替换页面标签
|
||||
function BookMarkReplace() {
|
||||
|
||||
|
||||
//如果是套红,则会动态增加书签,需要先刷新
|
||||
|
||||
document.getElementById("PageOfficeCtrl1").DataRegionList.Refresh();
|
||||
|
||||
for (i = 0; i < document.getElementById("PageOfficeCtrl1").DataRegionList.Count; i++) {
|
||||
|
||||
var formMark = document.getElementById("PageOfficeCtrl1").DataRegionList.Item(i).Name.replace("PO_", "");
|
||||
|
||||
if (formMark.toLowerCase() == "content") {
|
||||
continue;
|
||||
}
|
||||
//套红中的编号和紧急程度替换
|
||||
if (formMark.toLowerCase() == "jjcd") {
|
||||
formMark = "DrpJJCD";
|
||||
}
|
||||
if (formMark.toLowerCase() == "filecode") {
|
||||
formMark = "selectDllFileNum";
|
||||
}
|
||||
if (formMark.toLowerCase() == "qfr") {
|
||||
formMark = "TxtFilesIssuePerson";
|
||||
}
|
||||
//采标流程中的日期大写
|
||||
if (formMark.toLowerCase() == "txtcbdate") {
|
||||
|
||||
document.getElementById("PageOfficeCtrl1").DataRegionList.Item(i).Value = ConverToDate(document.getElementById(formMark).value);
|
||||
}
|
||||
else {
|
||||
var marktxt = new String(document.getElementById("PageOfficeCtrl1").DataRegionList.Item(i).Value).replace(/\r\n/g, '').replace(/\s/g, '');
|
||||
var lbltxt = new String(document.getElementById(formMark).value).replace(/\r\n/g, '').replace(/\s/g, '');
|
||||
|
||||
//替换之前先判断标题是否改过,如果改过需要替换,如果只是修改了格式则无需替换。
|
||||
if (marktxt != lbltxt) {
|
||||
if (lbltxt != "")
|
||||
document.getElementById("PageOfficeCtrl1").DataRegionList.Item(i).Value = document.getElementById(formMark).value;
|
||||
else
|
||||
document.getElementById("PageOfficeCtrl1").DataRegionList.Item(i).Value = " ";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//默认为隐藏痕迹
|
||||
jsShowTrack(false);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function ConverToDate(date) {
|
||||
var chinese = ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
|
||||
var strs = date.split('-');
|
||||
var y = strs[0];
|
||||
var m = strs[1];
|
||||
var d = strs[2];
|
||||
|
||||
var result = "";
|
||||
for (var i = 0; i < y.length; i++) {
|
||||
result += chinese[y.charAt(i)];
|
||||
}
|
||||
result += "年";
|
||||
if (m.length == 2) {
|
||||
|
||||
if (m.charAt(0) == "1") {
|
||||
result += ("十" + chinese[m.charAt(1)] + "月");
|
||||
}
|
||||
else {
|
||||
result += (chinese[m.charAt(1)] + "月");
|
||||
}
|
||||
} else {
|
||||
result += (chinese[m.charAt(0)] + "月");
|
||||
}
|
||||
if (d.length == 2) {
|
||||
if (d.charAt(0) == "0") {
|
||||
result += (chinese[d.charAt(0)] + "日");
|
||||
}
|
||||
else if (d.charAt(0) == "1") {
|
||||
result += ("十" + chinese[d.charAt(1)] + "日");
|
||||
}
|
||||
else {
|
||||
result += (chinese[d.charAt(0)] + "十" + chinese[d.charAt(1)] + "日");
|
||||
}
|
||||
} else {
|
||||
result += (chinese[d.charAt(0)] + "日");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1
jlzx-single/docs/pageoffice/pageoffice需要的按钮.txt
Normal file
@@ -0,0 +1 @@
|
||||
保存本地、打印文件、文件套红、显示痕迹、隐藏痕迹、插入图片、全屏显示、书签管理
|
||||
108
jlzx-single/docs/serverinfo.txt
Normal file
@@ -0,0 +1,108 @@
|
||||
SVN:
|
||||
https://39.104.142.92/svn/jlzx lzh/lzh
|
||||
|
||||
hbjl.bwyljy.com
|
||||
FTP账号资料
|
||||
用户:hbjlbwyljycom
|
||||
密码:hbjlbwyljycom
|
||||
http://39.105.204.214/
|
||||
|
||||
现在给你发下pageoffice5.0产品三个版本的试用号及版本更换方法
|
||||
PageOffice V5.0 企业版试用序列号:
|
||||
V541A-Y7PD-C6J1-4TPFH
|
||||
PageOffice V5.0 专业版试用序列号:
|
||||
MLZRX-KG3X-FK75-2UBYH
|
||||
PageOffice V5.0标准版试用序列号:
|
||||
AH3YT-HD6F-QE4D-3J4TN
|
||||
试用程序都是一样的,你用那个版本试用号来注册出来的就是相应版本的功能。
|
||||
pageoffice由专业版改为企业版的方法:
|
||||
pageoffice的话,先删除服务器端的license.lic文件,然后在弹出的注册页面框里把企业版授权序列号输入直接注册就可以了。如果你.NET开发,license.lic文件在服务器端web项目中“pageoffice\lic”文件夹下;如果您使用Java开发,license.lic文件到“WEB-INF\lib”目录下。
|
||||
|
||||
|
||||
http://39.104.100.138:8082
|
||||
130123196708080003
|
||||
Yxt123456
|
||||
|
||||
http://39.104.100.138:8111/oa/doc.html
|
||||
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://39.104.100.138:8111/oa`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
// public: '127.0.0.1', // 本地ip
|
||||
disableHostCheck: true,
|
||||
|
||||
|
||||
http://39.104.100.138:8111/workflow/doc.html
|
||||
|
||||
|
||||
https://39.104.142.92/svn/yxt/yxt-workflow
|
||||
|
||||
|
||||
sftp: 122.51.36.31/bwyl/hbbw123abc
|
||||
http://b97.bwyljy.com/
|
||||
|
||||
|
||||
pageoffice技术支持:010-84721198-213,找技术董工
|
||||
|
||||
|
||||
CA证书服务器 121.28.49.156 端口5000
|
||||
|
||||
http://39.104.100.138:8082/
|
||||
130123196708080001
|
||||
Yxt123456
|
||||
130123196708080001 申请人
|
||||
130123196708080002 办公室主任
|
||||
130123196708080003 部门负责人
|
||||
130123196708080004 中心领导
|
||||
130123196708080005 办公室文秘
|
||||
|
||||
|
||||
//作用:进行签名
|
||||
function doSignature(objectname,caName,signatureid,documentid) {
|
||||
if (document.getElementById("txtTransactMessage").value.replace(/^\s+|\s+$/g, '') == "") {
|
||||
|
||||
alert('请先填写处理意见,再签名!');
|
||||
return false;
|
||||
}
|
||||
var client = new HebcaClient();
|
||||
var aa = client.GetSubjectItem("G");
|
||||
if (caName == "") {
|
||||
alert('请先到个人设置中绑定证书,再进行签名!');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (aa != caName ) {
|
||||
alert('请用登录的key进行签名!');
|
||||
return false;
|
||||
}
|
||||
//对各个字段值以分号连接组织成一串字符串
|
||||
var formData = document.getElementById("txtTransactMessage").value; //自定义组织数据结构形式
|
||||
try {
|
||||
//调用签章控件的盖章接口, 显示电子签章并生成签章结果
|
||||
archivesSealResult = document.getElementById(objectname).SignAndSealForResult(formData, "", 1, false, true);
|
||||
document.getElementById("archivesSealResult").value = archivesSealResult;
|
||||
if (archivesSealResult != null && archivesSealResult != "") {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "../HebCAService.ashx",
|
||||
data: { keyvalue: archivesSealResult, InstanceRecordId: signatureid, filesId: documentid },
|
||||
dataType: 'text',
|
||||
success: function(msg) {
|
||||
|
||||
},
|
||||
error: function() {
|
||||
// alert("默认审核人未能自动获取,请点击“选择用户”");
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
alert(e.message);
|
||||
}
|
||||
}
|
||||
BIN
jlzx-single/docs/开发文档/1381368809.jpg
Normal file
|
After Width: | Height: | Size: 300 KiB |
BIN
jlzx-single/docs/开发文档/270374206.jpg
Normal file
|
After Width: | Height: | Size: 101 KiB |
BIN
jlzx-single/docs/开发文档/679700888.jpg
Normal file
|
After Width: | Height: | Size: 404 KiB |
BIN
jlzx-single/docs/开发文档/Message.xlsx
Normal file
BIN
jlzx-single/docs/开发文档/OA公文审核单.docx
Normal file
BIN
jlzx-single/docs/开发文档/OA公文表单页面.docx
Normal file
BIN
jlzx-single/docs/开发文档/oa接口.docx
Normal file
BIN
jlzx-single/docs/开发文档/数据字典(v2.1.xlsx
Normal file
BIN
jlzx-single/docs/开发文档/数据库设计(oa).xlsx
Normal file
BIN
jlzx-single/docs/开发文档/河北省计量业务应用平台-OA接口对接计划v1.0.xlsx
Normal file
BIN
jlzx-single/docs/开发文档/河北省计量业务应用平台-OA接口文档v1.0.xlsx
Normal file
BIN
jlzx-single/docs/开发文档/河北省计量业务应用平台接口文档及计划2.xls
Normal file
BIN
jlzx-single/docs/开发文档/计量从业人员信息表.xlsx
Normal file
BIN
jlzx-single/docs/设计资料/1073777312.jpg
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
jlzx-single/docs/设计资料/2090485357.jpg
Normal file
|
After Width: | Height: | Size: 273 KiB |
BIN
jlzx-single/docs/设计资料/412086149.jpg
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
jlzx-single/docs/设计资料/968899347.jpg
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
jlzx-single/docs/设计资料/OA首页.psd
Normal file
BIN
jlzx-single/docs/设计资料/宇信通计量从业人员系统前端需求分析(1).docx
Normal file
BIN
jlzx-single/docs/设计资料/计量项目接口整理.docx
Normal file
BIN
jlzx-single/docs/诚信计量/微信图片_20210218190221.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
jlzx-single/docs/诚信计量/诚信计量项目计划.docx
Normal file
88
jlzx-single/jlzx-single-gateway/pom.xml
Normal file
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.yxt</groupId>
|
||||
<artifactId>yxt-parent</artifactId>
|
||||
<version>0.0.1</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.yxt.jlzx</groupId>
|
||||
<artifactId>jlzx-single-gateway</artifactId>
|
||||
<version>0.0.1</version>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt</artifactId>
|
||||
<version>0.9.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-gateway</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
</dependency>
|
||||
<!--引入redis-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>io.lettuce</groupId>
|
||||
<artifactId>lettuce-core</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>redis.clients</groupId>
|
||||
<artifactId>jedis</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.yml</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,121 @@
|
||||
package com.yxt.jlzx;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yxt.jlzx.utils.*;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
|
||||
import org.springframework.cloud.gateway.filter.GlobalFilter;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.io.buffer.DataBufferFactory;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/12/2 9:52
|
||||
* @description 网关鉴权
|
||||
* 1.某些接口不需要不进行登录验证,如登录,注册,获取验证码等接口。(uri白名单)
|
||||
*2.某些接口需要登录验证,但是不需要刷新token有效时间,如客户端轮询请求的接口。
|
||||
*3.特定场景下IP黑、白名单。
|
||||
*4.处于安全考虑的接口流量控制。
|
||||
*/
|
||||
@Component
|
||||
public class AuthFilter implements GlobalFilter, Ordered {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(AuthFilter.class);
|
||||
//过期时间设置为4小时
|
||||
private final static long EXPIRE_TIME = Constants.TOKEN_EXPIRE * 60;
|
||||
private final static long EXPIRE_TIME_APP = Constants.TOKEN_EXPIRE_APP * 60;
|
||||
|
||||
// 排除过滤的 uri 地址,nacos自行添加
|
||||
@Autowired
|
||||
private IgnoreWhiteProperties ignoreWhite;
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
/*
|
||||
redis中数据存储结构为两个键值对
|
||||
键为用户ID,值为用户token,可以通过用户ID查询用户token,实现立刻失效用户token功能。
|
||||
键为用户token,值为用户数据,实现token有效性,用户数据缓存功能。
|
||||
*/
|
||||
|
||||
@Override
|
||||
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
|
||||
String url = exchange.getRequest().getURI().getPath();
|
||||
//1.uri白名单。 跳过不需要验证的路径
|
||||
if (StringUtils.matches(url, ignoreWhite.getWhites())) {
|
||||
return chain.filter(exchange);
|
||||
}else if(StringUtils.matchesTwo(url, ignoreWhite.getWhitesTwo())){
|
||||
return chain.filter(exchange);
|
||||
}
|
||||
//2.验证有无令牌。 从请求的header中获取token
|
||||
String token = getToken(exchange.getRequest());
|
||||
if (StringUtils.isBlank(token)) {
|
||||
return setUnauthorizedResponse(exchange, "令牌不能为空");
|
||||
}
|
||||
//3.验证token是否有效。(a.验证token是否合法 b.验证token是否过期)
|
||||
//从redis缓存中获取key对应的内容
|
||||
String userName = redisUtil.get(token);
|
||||
|
||||
if (StringUtils.isBlank(userName)) {
|
||||
|
||||
return setUnauthorizedResponse(exchange, "登录状态已过期");
|
||||
}
|
||||
//验签:需要验证token中的签名是否与用户sid一致,后台用密钥+userSid+token除签名以外的内容,重新生成签名,与token中的签名进行比较
|
||||
|
||||
//刷新token过期日期
|
||||
if(token.contains("App")){
|
||||
//redisUtil.set(token, userName, EXPIRE_TIME_APP);
|
||||
redisUtil.expire(token, EXPIRE_TIME_APP);
|
||||
}else{
|
||||
//redisUtil.set(token, userName, EXPIRE_TIME);
|
||||
redisUtil.expire(token, EXPIRE_TIME);
|
||||
}
|
||||
|
||||
// 在请求中增加用户信息
|
||||
ServerHttpRequest mutableReq = exchange.getRequest().mutate()
|
||||
.header(CacheConstants.DETAILS_USERNAME, userName).build();
|
||||
ServerWebExchange mutableExchange = exchange.mutate().request(mutableReq).build();
|
||||
return chain.filter(mutableExchange);
|
||||
}
|
||||
/**
|
||||
* 鉴权异常处理
|
||||
* @param exchange
|
||||
* @param msg
|
||||
* @return
|
||||
*/
|
||||
private Mono<Void> setUnauthorizedResponse(ServerWebExchange exchange, String msg) {
|
||||
ServerHttpResponse response = exchange.getResponse();
|
||||
response.getHeaders().setContentType(MediaType.APPLICATION_JSON);
|
||||
response.setStatusCode(HttpStatus.OK);
|
||||
|
||||
log.error("[鉴权异常处理]请求路径:{}", exchange.getRequest().getPath());
|
||||
|
||||
return response.writeWith(Mono.fromSupplier(() -> {
|
||||
DataBufferFactory bufferFactory = response.bufferFactory();
|
||||
return bufferFactory.wrap(JSON.toJSONBytes(R.fail(msg)));
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取请求token
|
||||
*/
|
||||
private String getToken(ServerHttpRequest request) {
|
||||
String token = request.getHeaders().getFirst(CacheConstants.HEADER);
|
||||
// if (StringUtils.isNotEmpty(token) && token.startsWith(CacheConstants.TOKEN_PREFIX)) {
|
||||
// token = token.replace(CacheConstants.TOKEN_PREFIX, "");
|
||||
// }
|
||||
return token;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.yxt.jlzx;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/8/28 14:11
|
||||
* @description 网关
|
||||
*/
|
||||
@EnableDiscoveryClient
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
|
||||
public class JlzxGatewayApplication{
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(JlzxGatewayApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.yxt.jlzx;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||
import com.fasterxml.jackson.annotation.PropertyAccessor;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
|
||||
import org.springframework.data.redis.serializer.StringRedisSerializer;
|
||||
import redis.clients.jedis.JedisPoolConfig;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/9/18 19:37
|
||||
* @description
|
||||
*/
|
||||
@Configuration
|
||||
public class RedisConfig {
|
||||
|
||||
@Value("${spring.redis.host}")
|
||||
private String host;
|
||||
|
||||
@Value("${spring.redis.password}")
|
||||
private String password;
|
||||
|
||||
@Value("${spring.redis.port}")
|
||||
private int port;
|
||||
|
||||
@Value("${spring.redis.timeout}")
|
||||
private int timeout;
|
||||
|
||||
@Value("${spring.redis.jedis.pool.max-active}")
|
||||
private int redisPoolMaxActive;
|
||||
|
||||
@Value("${spring.redis.jedis.pool.max-wait}")
|
||||
private int redisPoolMaxWait;
|
||||
|
||||
@Value("${spring.redis.jedis.pool.max-idle}")
|
||||
private int redisPoolMaxIdle;
|
||||
|
||||
@Value("${spring.redis.jedis.pool.min-idle}")
|
||||
private int redisPoolMinIdle;
|
||||
@Value("${spring.redis.database}")
|
||||
private int database;
|
||||
|
||||
@Bean
|
||||
public JedisPoolConfig getJedisPoolConfig() {
|
||||
JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
|
||||
//最大空闲数
|
||||
jedisPoolConfig.setMaxIdle(redisPoolMaxIdle);
|
||||
//最小空闲数
|
||||
jedisPoolConfig.setMinIdle(redisPoolMinIdle);
|
||||
//最大建立连接等待时间
|
||||
jedisPoolConfig.setMaxWaitMillis(redisPoolMaxWait);
|
||||
//连接池的最大数据库连接数
|
||||
jedisPoolConfig.setMaxTotal(redisPoolMaxActive);
|
||||
return jedisPoolConfig;
|
||||
}
|
||||
|
||||
|
||||
@Bean
|
||||
public JedisConnectionFactory jedisConnectionFactory(JedisPoolConfig jedisPoolConfig) {
|
||||
|
||||
JedisConnectionFactory jedisConnectionFactory = new JedisConnectionFactory(jedisPoolConfig);
|
||||
jedisConnectionFactory.setDatabase(database);
|
||||
//IP地址
|
||||
jedisConnectionFactory.setHostName(host);
|
||||
//如果redis设置有密码
|
||||
jedisConnectionFactory.setPassword(password);
|
||||
//端口号
|
||||
jedisConnectionFactory.setPort(port);
|
||||
//客户端超时时间单位是毫秒
|
||||
jedisConnectionFactory.setTimeout(timeout);
|
||||
// jedisConnectionFactory.afterPropertiesSet(); //记得添加这行!
|
||||
return jedisConnectionFactory;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) {
|
||||
RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
|
||||
redisTemplate.setConnectionFactory(redisConnectionFactory);
|
||||
// 使用Jackson2JsonRedisSerialize 替换默认序列化
|
||||
Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
|
||||
ObjectMapper om = new ObjectMapper();
|
||||
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
|
||||
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
|
||||
jackson2JsonRedisSerializer.setObjectMapper(om);
|
||||
StringRedisSerializer stringRedisSerializer = new StringRedisSerializer();
|
||||
// key采用String的序列化方式
|
||||
//redisTemplate.setKeySerializer(new StringRedisSerializer());
|
||||
redisTemplate.setKeySerializer(stringRedisSerializer);
|
||||
// hash的key也采用String的序列化方式
|
||||
redisTemplate.setHashKeySerializer(stringRedisSerializer);
|
||||
// value序列化方式采用jackson
|
||||
// redisTemplate.setValueSerializer(jackson2JsonRedisSerializer);
|
||||
redisTemplate.setValueSerializer(stringRedisSerializer);
|
||||
// hash的value序列化方式采用jackson
|
||||
redisTemplate.setHashValueSerializer(stringRedisSerializer);
|
||||
redisTemplate.afterPropertiesSet();
|
||||
return redisTemplate;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,300 @@
|
||||
package com.yxt.jlzx;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.data.redis.connection.RedisConnection;
|
||||
import org.springframework.data.redis.connection.RedisStringCommands;
|
||||
import org.springframework.data.redis.core.*;
|
||||
import org.springframework.data.redis.core.types.Expiration;
|
||||
import org.springframework.data.redis.serializer.RedisSerializer;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/9/9 17:35
|
||||
* @description redis工具类
|
||||
*/
|
||||
@Service
|
||||
public class RedisUtil {
|
||||
|
||||
@Autowired
|
||||
private RedisTemplate redisTemplate;
|
||||
|
||||
|
||||
/**
|
||||
* 字符串类型:根据key设置value值,如果key中的value存在,那么返回false
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public Boolean setnx(final String key, final String value, final long expration, final TimeUnit timeUnit) {
|
||||
return (Boolean) redisTemplate.execute(new RedisCallback<Boolean>() {
|
||||
@Override
|
||||
public Boolean doInRedis(RedisConnection redisConnection) throws DataAccessException {
|
||||
RedisSerializer<String> redisSerializer = redisTemplate.getStringSerializer();
|
||||
byte keys[] = redisSerializer.serialize(key);
|
||||
byte values[] = redisSerializer.serialize(value);
|
||||
return redisConnection.set(keys, values, Expiration.from(expration, timeUnit), RedisStringCommands.SetOption.SET_IF_ABSENT);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 写入缓存
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public boolean set(final String key, final String value) {
|
||||
|
||||
boolean result = (boolean) redisTemplate.execute(new RedisCallback<Boolean>() {
|
||||
@Override
|
||||
public Boolean doInRedis(RedisConnection connection) throws DataAccessException {
|
||||
RedisSerializer<String> serializer = redisTemplate.getStringSerializer();
|
||||
connection.set(serializer.serialize(key), serializer.serialize(value));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 写入缓存设置时效时间
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public boolean set(final String key, Object value, Long expireTime) {
|
||||
boolean result = false;
|
||||
try {
|
||||
ValueOperations<Serializable, Object> operations = redisTemplate.opsForValue();
|
||||
operations.set(key, value);
|
||||
redisTemplate.expire(key, expireTime, TimeUnit.SECONDS);
|
||||
result = true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* 刷新缓存到期时间
|
||||
* @param key
|
||||
* @param expire
|
||||
* @return
|
||||
*/
|
||||
public boolean expire(String key, long expire) {
|
||||
return redisTemplate.expire(key, expire, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取缓存
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
public String get(final String key) {
|
||||
String result = (String) redisTemplate.execute(new RedisCallback<String>() {
|
||||
@Override
|
||||
public String doInRedis(RedisConnection connection) throws DataAccessException {
|
||||
RedisSerializer<String> serializer = redisTemplate.getStringSerializer();
|
||||
byte[] value = connection.get(serializer.serialize(key));
|
||||
return serializer.deserialize(value);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 正则获取key集合
|
||||
*
|
||||
* @param pattern
|
||||
* @return
|
||||
*/
|
||||
public Set<String> keys(String pattern) {
|
||||
Set<String> keys = redisTemplate.keys(pattern);
|
||||
return keys;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除对应的value
|
||||
*
|
||||
* @param keys
|
||||
*/
|
||||
public void remove(final String... keys) {
|
||||
for (String key : keys) {
|
||||
remove(key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除key
|
||||
*
|
||||
* @param pattern
|
||||
*/
|
||||
public void removePattern(final String pattern) {
|
||||
Set<Serializable> keys = redisTemplate.keys(pattern);
|
||||
if (keys.size() > 0) {
|
||||
redisTemplate.delete(keys);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public Long remove(final String key) {
|
||||
return (Long) redisTemplate.execute(new RedisCallback<Long>() {
|
||||
@Override
|
||||
public Long doInRedis(RedisConnection redisConnection) throws DataAccessException {
|
||||
RedisSerializer<String> serializer = redisTemplate.getStringSerializer();
|
||||
byte keys[] = serializer.serialize(key);
|
||||
return redisConnection.del(keys);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 判断缓存中是否有对应的value
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
public boolean exists(final String key) {
|
||||
return redisTemplate.hasKey(key);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 哈希 添加
|
||||
*
|
||||
* @param key
|
||||
* @param hashKey
|
||||
* @param value
|
||||
*/
|
||||
public void hmSet(String key, Object hashKey, Object value) {
|
||||
HashOperations<String, Object, Object> hash = redisTemplate.opsForHash();
|
||||
hash.put(key, hashKey, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 哈希获取数据
|
||||
*
|
||||
* @param key
|
||||
* @param hashKey
|
||||
* @return
|
||||
*/
|
||||
public String hmGet(String key, Object hashKey) {
|
||||
HashOperations<String, String, String> hash = redisTemplate.opsForHash();
|
||||
return hash.get(key, hashKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取哈希 keys
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
public Set<String> hmGetKeys(String key) {
|
||||
HashOperations<String, String, String> hash = redisTemplate.opsForHash();
|
||||
return hash.keys(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除集合中的key
|
||||
*
|
||||
* @param key
|
||||
* @param hashKey
|
||||
*/
|
||||
public void hmDelete(String key, Object hashKey) {
|
||||
HashOperations<String, Object, Object> hash = redisTemplate.opsForHash();
|
||||
hash.delete(key, hashKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表添加
|
||||
*
|
||||
* @param k
|
||||
* @param v
|
||||
*/
|
||||
public void lPush(String k, Object v) {
|
||||
ListOperations<String, Object> list = redisTemplate.opsForList();
|
||||
list.rightPush(k, v);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表获取
|
||||
*
|
||||
* @param k
|
||||
* @param l
|
||||
* @param l1
|
||||
* @return
|
||||
*/
|
||||
public List<Object> lRange(String k, long l, long l1) {
|
||||
ListOperations<String, Object> list = redisTemplate.opsForList();
|
||||
return list.range(k, l, l1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 集合添加
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
public void add(String key, Object value) {
|
||||
SetOperations<String, Object> set = redisTemplate.opsForSet();
|
||||
set.add(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 集合获取
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
public Set<Object> setMembers(String key) {
|
||||
SetOperations<String, Object> set = redisTemplate.opsForSet();
|
||||
return set.members(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* 有序集合添加
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
* @param scoure
|
||||
*/
|
||||
public void zAdd(String key, Object value, double scoure) {
|
||||
ZSetOperations<String, Object> zset = redisTemplate.opsForZSet();
|
||||
zset.add(key, value, scoure);
|
||||
}
|
||||
|
||||
/**
|
||||
* 有序集合获取
|
||||
*
|
||||
* @param key
|
||||
* @param scoure
|
||||
* @param scoure1
|
||||
* @return
|
||||
*/
|
||||
public Set<Object> rangeByScore(String key, double scoure, double scoure1) {
|
||||
ZSetOperations<String, Object> zset = redisTemplate.opsForZSet();
|
||||
return zset.rangeByScore(key, scoure, scoure1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 实现命令:TTL key 以秒为单位,返回给定key的剩余生存时间
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
public long ttl(String key) {
|
||||
return redisTemplate.getExpire(key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.yxt.jlzx.utils;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/12/2 9:58
|
||||
* @description 缓存的key 常量
|
||||
*/
|
||||
|
||||
public class CacheConstants {
|
||||
|
||||
/**
|
||||
* 令牌自定义标识
|
||||
*/
|
||||
public static final String HEADER = "token";
|
||||
|
||||
/**
|
||||
* 令牌前缀
|
||||
*/
|
||||
public static final String TOKEN_PREFIX = "Bearer ";
|
||||
|
||||
/**
|
||||
* 用户名字段
|
||||
*/
|
||||
public static final String DETAILS_USERNAME = "userName";
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.yxt.jlzx.utils;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/12/2 10:02
|
||||
* @description
|
||||
*/
|
||||
|
||||
public class CharsetKit {
|
||||
|
||||
/** ISO-8859-1 */
|
||||
public static final String ISO_8859_1 = "ISO-8859-1";
|
||||
/** UTF-8 */
|
||||
public static final String UTF_8 = "UTF-8";
|
||||
/** GBK */
|
||||
public static final String GBK = "GBK";
|
||||
|
||||
/** ISO-8859-1 */
|
||||
public static final Charset CHARSET_ISO_8859_1 = Charset.forName(ISO_8859_1);
|
||||
/** UTF-8 */
|
||||
public static final Charset CHARSET_UTF_8 = Charset.forName(UTF_8);
|
||||
/** GBK */
|
||||
public static final Charset CHARSET_GBK = Charset.forName(GBK);
|
||||
|
||||
/**
|
||||
* 转换为Charset对象
|
||||
*
|
||||
* @param charset 字符集,为空则返回默认字符集
|
||||
* @return Charset
|
||||
*/
|
||||
public static Charset charset(String charset)
|
||||
{
|
||||
return StringUtils.isEmpty(charset) ? Charset.defaultCharset() : Charset.forName(charset);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换字符串的字符集编码
|
||||
*
|
||||
* @param source 字符串
|
||||
* @param srcCharset 源字符集,默认ISO-8859-1
|
||||
* @param destCharset 目标字符集,默认UTF-8
|
||||
* @return 转换后的字符集
|
||||
*/
|
||||
public static String convert(String source, String srcCharset, String destCharset)
|
||||
{
|
||||
return convert(source, Charset.forName(srcCharset), Charset.forName(destCharset));
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换字符串的字符集编码
|
||||
*
|
||||
* @param source 字符串
|
||||
* @param srcCharset 源字符集,默认ISO-8859-1
|
||||
* @param destCharset 目标字符集,默认UTF-8
|
||||
* @return 转换后的字符集
|
||||
*/
|
||||
public static String convert(String source, Charset srcCharset, Charset destCharset)
|
||||
{
|
||||
if (null == srcCharset)
|
||||
{
|
||||
srcCharset = StandardCharsets.ISO_8859_1;
|
||||
}
|
||||
|
||||
if (null == destCharset)
|
||||
{
|
||||
destCharset = StandardCharsets.UTF_8;
|
||||
}
|
||||
|
||||
if (StringUtils.isEmpty(source) || srcCharset.equals(destCharset))
|
||||
{
|
||||
return source;
|
||||
}
|
||||
return new String(source.getBytes(srcCharset), destCharset);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return 系统字符集编码
|
||||
*/
|
||||
public static String systemCharset()
|
||||
{
|
||||
return Charset.defaultCharset().name();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.yxt.jlzx.utils;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/12/2 9:56
|
||||
* @description 通用常量信息
|
||||
*/
|
||||
|
||||
public class Constants {
|
||||
|
||||
/**
|
||||
* 成功标记
|
||||
*/
|
||||
public static final Integer SUCCESS = 200;
|
||||
|
||||
/**
|
||||
* 失败标记
|
||||
*/
|
||||
public static final Integer FAIL = 5000;
|
||||
|
||||
public static final boolean fail = false;
|
||||
public static final boolean success = true;
|
||||
|
||||
/**
|
||||
* 令牌有效期(分钟)
|
||||
*/
|
||||
public final static long TOKEN_EXPIRE = 4*60;
|
||||
public final static long TOKEN_EXPIRE_APP = 15*24*60;
|
||||
}
|
||||
@@ -0,0 +1,999 @@
|
||||
package com.yxt.jlzx.utils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.Charset;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/12/2 10:01
|
||||
* @description
|
||||
*/
|
||||
|
||||
public class Convert {
|
||||
|
||||
/**
|
||||
* 转换为字符串<br>
|
||||
* 如果给定的值为null,或者转换失败,返回默认值<br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
* @return 结果
|
||||
*/
|
||||
public static String toStr(Object value, String defaultValue)
|
||||
{
|
||||
if (null == value)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
if (value instanceof String)
|
||||
{
|
||||
return (String) value;
|
||||
}
|
||||
return value.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为字符串<br>
|
||||
* 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @return 结果
|
||||
*/
|
||||
public static String toStr(Object value)
|
||||
{
|
||||
return toStr(value, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为字符<br>
|
||||
* 如果给定的值为null,或者转换失败,返回默认值<br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Character toChar(Object value, Character defaultValue)
|
||||
{
|
||||
if (null == value)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
if (value instanceof Character)
|
||||
{
|
||||
return (Character) value;
|
||||
}
|
||||
|
||||
final String valueStr = toStr(value, null);
|
||||
return StringUtils.isEmpty(valueStr) ? defaultValue : valueStr.charAt(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为字符<br>
|
||||
* 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Character toChar(Object value)
|
||||
{
|
||||
return toChar(value, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为byte<br>
|
||||
* 如果给定的值为<code>null</code>,或者转换失败,返回默认值<br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Byte toByte(Object value, Byte defaultValue)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
if (value instanceof Byte)
|
||||
{
|
||||
return (Byte) value;
|
||||
}
|
||||
if (value instanceof Number)
|
||||
{
|
||||
return ((Number) value).byteValue();
|
||||
}
|
||||
final String valueStr = toStr(value, null);
|
||||
if (StringUtils.isEmpty(valueStr))
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
try
|
||||
{
|
||||
return Byte.parseByte(valueStr);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为byte<br>
|
||||
* 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Byte toByte(Object value)
|
||||
{
|
||||
return toByte(value, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为Short<br>
|
||||
* 如果给定的值为<code>null</code>,或者转换失败,返回默认值<br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Short toShort(Object value, Short defaultValue)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
if (value instanceof Short)
|
||||
{
|
||||
return (Short) value;
|
||||
}
|
||||
if (value instanceof Number)
|
||||
{
|
||||
return ((Number) value).shortValue();
|
||||
}
|
||||
final String valueStr = toStr(value, null);
|
||||
if (StringUtils.isEmpty(valueStr))
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
try
|
||||
{
|
||||
return Short.parseShort(valueStr.trim());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为Short<br>
|
||||
* 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Short toShort(Object value)
|
||||
{
|
||||
return toShort(value, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为Number<br>
|
||||
* 如果给定的值为空,或者转换失败,返回默认值<br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Number toNumber(Object value, Number defaultValue)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
if (value instanceof Number)
|
||||
{
|
||||
return (Number) value;
|
||||
}
|
||||
final String valueStr = toStr(value, null);
|
||||
if (StringUtils.isEmpty(valueStr))
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
try
|
||||
{
|
||||
return NumberFormat.getInstance().parse(valueStr);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为Number<br>
|
||||
* 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Number toNumber(Object value)
|
||||
{
|
||||
return toNumber(value, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为int<br>
|
||||
* 如果给定的值为空,或者转换失败,返回默认值<br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Integer toInt(Object value, Integer defaultValue)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
if (value instanceof Integer)
|
||||
{
|
||||
return (Integer) value;
|
||||
}
|
||||
if (value instanceof Number)
|
||||
{
|
||||
return ((Number) value).intValue();
|
||||
}
|
||||
final String valueStr = toStr(value, null);
|
||||
if (StringUtils.isEmpty(valueStr))
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
try
|
||||
{
|
||||
return Integer.parseInt(valueStr.trim());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为int<br>
|
||||
* 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Integer toInt(Object value)
|
||||
{
|
||||
return toInt(value, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为Integer数组<br>
|
||||
*
|
||||
* @param str 被转换的值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Integer[] toIntArray(String str)
|
||||
{
|
||||
return toIntArray(",", str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为Long数组<br>
|
||||
*
|
||||
* @param str 被转换的值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Long[] toLongArray(String str)
|
||||
{
|
||||
return toLongArray(",", str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为Integer数组<br>
|
||||
*
|
||||
* @param split 分隔符
|
||||
* @param split 被转换的值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Integer[] toIntArray(String split, String str)
|
||||
{
|
||||
if (StringUtils.isEmpty(str))
|
||||
{
|
||||
return new Integer[] {};
|
||||
}
|
||||
String[] arr = str.split(split);
|
||||
final Integer[] ints = new Integer[arr.length];
|
||||
for (int i = 0; i < arr.length; i++)
|
||||
{
|
||||
final Integer v = toInt(arr[i], 0);
|
||||
ints[i] = v;
|
||||
}
|
||||
return ints;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为Long数组<br>
|
||||
*
|
||||
* @param split 分隔符
|
||||
* @param str 被转换的值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Long[] toLongArray(String split, String str)
|
||||
{
|
||||
if (StringUtils.isEmpty(str))
|
||||
{
|
||||
return new Long[] {};
|
||||
}
|
||||
String[] arr = str.split(split);
|
||||
final Long[] longs = new Long[arr.length];
|
||||
for (int i = 0; i < arr.length; i++)
|
||||
{
|
||||
final Long v = toLong(arr[i], null);
|
||||
longs[i] = v;
|
||||
}
|
||||
return longs;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为String数组<br>
|
||||
*
|
||||
* @param str 被转换的值
|
||||
* @return 结果
|
||||
*/
|
||||
public static String[] toStrArray(String str)
|
||||
{
|
||||
return toStrArray(",", str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为String数组<br>
|
||||
*
|
||||
* @param split 分隔符
|
||||
* @param split 被转换的值
|
||||
* @return 结果
|
||||
*/
|
||||
public static String[] toStrArray(String split, String str)
|
||||
{
|
||||
return str.split(split);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为long<br>
|
||||
* 如果给定的值为空,或者转换失败,返回默认值<br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Long toLong(Object value, Long defaultValue)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
if (value instanceof Long)
|
||||
{
|
||||
return (Long) value;
|
||||
}
|
||||
if (value instanceof Number)
|
||||
{
|
||||
return ((Number) value).longValue();
|
||||
}
|
||||
final String valueStr = toStr(value, null);
|
||||
if (StringUtils.isEmpty(valueStr))
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
try
|
||||
{
|
||||
// 支持科学计数法
|
||||
return new BigDecimal(valueStr.trim()).longValue();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为long<br>
|
||||
* 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Long toLong(Object value)
|
||||
{
|
||||
return toLong(value, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为double<br>
|
||||
* 如果给定的值为空,或者转换失败,返回默认值<br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Double toDouble(Object value, Double defaultValue)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
if (value instanceof Double)
|
||||
{
|
||||
return (Double) value;
|
||||
}
|
||||
if (value instanceof Number)
|
||||
{
|
||||
return ((Number) value).doubleValue();
|
||||
}
|
||||
final String valueStr = toStr(value, null);
|
||||
if (StringUtils.isEmpty(valueStr))
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
try
|
||||
{
|
||||
// 支持科学计数法
|
||||
return new BigDecimal(valueStr.trim()).doubleValue();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为double<br>
|
||||
* 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Double toDouble(Object value)
|
||||
{
|
||||
return toDouble(value, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为Float<br>
|
||||
* 如果给定的值为空,或者转换失败,返回默认值<br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Float toFloat(Object value, Float defaultValue)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
if (value instanceof Float)
|
||||
{
|
||||
return (Float) value;
|
||||
}
|
||||
if (value instanceof Number)
|
||||
{
|
||||
return ((Number) value).floatValue();
|
||||
}
|
||||
final String valueStr = toStr(value, null);
|
||||
if (StringUtils.isEmpty(valueStr))
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
try
|
||||
{
|
||||
return Float.parseFloat(valueStr.trim());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为Float<br>
|
||||
* 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Float toFloat(Object value)
|
||||
{
|
||||
return toFloat(value, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为boolean<br>
|
||||
* String支持的值为:true、false、yes、ok、no,1,0 如果给定的值为空,或者转换失败,返回默认值<br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Boolean toBool(Object value, Boolean defaultValue)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
if (value instanceof Boolean)
|
||||
{
|
||||
return (Boolean) value;
|
||||
}
|
||||
String valueStr = toStr(value, null);
|
||||
if (StringUtils.isEmpty(valueStr))
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
valueStr = valueStr.trim().toLowerCase();
|
||||
switch (valueStr)
|
||||
{
|
||||
case "true":
|
||||
return true;
|
||||
case "false":
|
||||
return false;
|
||||
case "yes":
|
||||
return true;
|
||||
case "ok":
|
||||
return true;
|
||||
case "no":
|
||||
return false;
|
||||
case "1":
|
||||
return true;
|
||||
case "0":
|
||||
return false;
|
||||
default:
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为boolean<br>
|
||||
* 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @return 结果
|
||||
*/
|
||||
public static Boolean toBool(Object value)
|
||||
{
|
||||
return toBool(value, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为Enum对象<br>
|
||||
* 如果给定的值为空,或者转换失败,返回默认值<br>
|
||||
*
|
||||
* @param clazz Enum的Class
|
||||
* @param value 值
|
||||
* @param defaultValue 默认值
|
||||
* @return Enum
|
||||
*/
|
||||
public static <E extends Enum<E>> E toEnum(Class<E> clazz, Object value, E defaultValue)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
if (clazz.isAssignableFrom(value.getClass()))
|
||||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
E myE = (E) value;
|
||||
return myE;
|
||||
}
|
||||
final String valueStr = toStr(value, null);
|
||||
if (StringUtils.isEmpty(valueStr))
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
try
|
||||
{
|
||||
return Enum.valueOf(clazz, valueStr);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为Enum对象<br>
|
||||
* 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
|
||||
*
|
||||
* @param clazz Enum的Class
|
||||
* @param value 值
|
||||
* @return Enum
|
||||
*/
|
||||
public static <E extends Enum<E>> E toEnum(Class<E> clazz, Object value)
|
||||
{
|
||||
return toEnum(clazz, value, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为BigInteger<br>
|
||||
* 如果给定的值为空,或者转换失败,返回默认值<br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
* @return 结果
|
||||
*/
|
||||
public static BigInteger toBigInteger(Object value, BigInteger defaultValue)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
if (value instanceof BigInteger)
|
||||
{
|
||||
return (BigInteger) value;
|
||||
}
|
||||
if (value instanceof Long)
|
||||
{
|
||||
return BigInteger.valueOf((Long) value);
|
||||
}
|
||||
final String valueStr = toStr(value, null);
|
||||
if (StringUtils.isEmpty(valueStr))
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
try
|
||||
{
|
||||
return new BigInteger(valueStr);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为BigInteger<br>
|
||||
* 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @return 结果
|
||||
*/
|
||||
public static BigInteger toBigInteger(Object value)
|
||||
{
|
||||
return toBigInteger(value, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为BigDecimal<br>
|
||||
* 如果给定的值为空,或者转换失败,返回默认值<br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @param defaultValue 转换错误时的默认值
|
||||
* @return 结果
|
||||
*/
|
||||
public static BigDecimal toBigDecimal(Object value, BigDecimal defaultValue)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
if (value instanceof BigDecimal)
|
||||
{
|
||||
return (BigDecimal) value;
|
||||
}
|
||||
if (value instanceof Long)
|
||||
{
|
||||
return new BigDecimal((Long) value);
|
||||
}
|
||||
if (value instanceof Double)
|
||||
{
|
||||
return new BigDecimal((Double) value);
|
||||
}
|
||||
if (value instanceof Integer)
|
||||
{
|
||||
return new BigDecimal((Integer) value);
|
||||
}
|
||||
final String valueStr = toStr(value, null);
|
||||
if (StringUtils.isEmpty(valueStr))
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
try
|
||||
{
|
||||
return new BigDecimal(valueStr);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换为BigDecimal<br>
|
||||
* 如果给定的值为空,或者转换失败,返回默认值<br>
|
||||
* 转换失败不会报错
|
||||
*
|
||||
* @param value 被转换的值
|
||||
* @return 结果
|
||||
*/
|
||||
public static BigDecimal toBigDecimal(Object value)
|
||||
{
|
||||
return toBigDecimal(value, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将对象转为字符串<br>
|
||||
* 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法
|
||||
*
|
||||
* @param obj 对象
|
||||
* @return 字符串
|
||||
*/
|
||||
public static String utf8Str(Object obj)
|
||||
{
|
||||
return str(obj, CharsetKit.CHARSET_UTF_8);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将对象转为字符串<br>
|
||||
* 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法
|
||||
*
|
||||
* @param obj 对象
|
||||
* @param charsetName 字符集
|
||||
* @return 字符串
|
||||
*/
|
||||
public static String str(Object obj, String charsetName)
|
||||
{
|
||||
return str(obj, Charset.forName(charsetName));
|
||||
}
|
||||
|
||||
/**
|
||||
* 将对象转为字符串<br>
|
||||
* 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法
|
||||
*
|
||||
* @param obj 对象
|
||||
* @param charset 字符集
|
||||
* @return 字符串
|
||||
*/
|
||||
public static String str(Object obj, Charset charset)
|
||||
{
|
||||
if (null == obj)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (obj instanceof String)
|
||||
{
|
||||
return (String) obj;
|
||||
}
|
||||
else if (obj instanceof byte[] || obj instanceof Byte[])
|
||||
{
|
||||
return str((Byte[]) obj, charset);
|
||||
}
|
||||
else if (obj instanceof ByteBuffer)
|
||||
{
|
||||
return str((ByteBuffer) obj, charset);
|
||||
}
|
||||
return obj.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 将byte数组转为字符串
|
||||
*
|
||||
* @param bytes byte数组
|
||||
* @param charset 字符集
|
||||
* @return 字符串
|
||||
*/
|
||||
public static String str(byte[] bytes, String charset)
|
||||
{
|
||||
return str(bytes, StringUtils.isEmpty(charset) ? Charset.defaultCharset() : Charset.forName(charset));
|
||||
}
|
||||
|
||||
/**
|
||||
* 解码字节码
|
||||
*
|
||||
* @param data 字符串
|
||||
* @param charset 字符集,如果此字段为空,则解码的结果取决于平台
|
||||
* @return 解码后的字符串
|
||||
*/
|
||||
public static String str(byte[] data, Charset charset)
|
||||
{
|
||||
if (data == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (null == charset)
|
||||
{
|
||||
return new String(data);
|
||||
}
|
||||
return new String(data, charset);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将编码的byteBuffer数据转换为字符串
|
||||
*
|
||||
* @param data 数据
|
||||
* @param charset 字符集,如果为空使用当前系统字符集
|
||||
* @return 字符串
|
||||
*/
|
||||
public static String str(ByteBuffer data, String charset)
|
||||
{
|
||||
if (data == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return str(data, Charset.forName(charset));
|
||||
}
|
||||
|
||||
/**
|
||||
* 将编码的byteBuffer数据转换为字符串
|
||||
*
|
||||
* @param data 数据
|
||||
* @param charset 字符集,如果为空使用当前系统字符集
|
||||
* @return 字符串
|
||||
*/
|
||||
public static String str(ByteBuffer data, Charset charset)
|
||||
{
|
||||
if (null == charset)
|
||||
{
|
||||
charset = Charset.defaultCharset();
|
||||
}
|
||||
return charset.decode(data).toString();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------- 全角半角转换
|
||||
/**
|
||||
* 半角转全角
|
||||
*
|
||||
* @param input String.
|
||||
* @return 全角字符串.
|
||||
*/
|
||||
public static String toSBC(String input)
|
||||
{
|
||||
return toSBC(input, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 半角转全角
|
||||
*
|
||||
* @param input String
|
||||
* @param notConvertSet 不替换的字符集合
|
||||
* @return 全角字符串.
|
||||
*/
|
||||
public static String toSBC(String input, Set<Character> notConvertSet)
|
||||
{
|
||||
char c[] = input.toCharArray();
|
||||
for (int i = 0; i < c.length; i++)
|
||||
{
|
||||
if (null != notConvertSet && notConvertSet.contains(c[i]))
|
||||
{
|
||||
// 跳过不替换的字符
|
||||
continue;
|
||||
}
|
||||
|
||||
if (c[i] == ' ')
|
||||
{
|
||||
c[i] = '\u3000';
|
||||
}
|
||||
else if (c[i] < '\177')
|
||||
{
|
||||
c[i] = (char) (c[i] + 65248);
|
||||
|
||||
}
|
||||
}
|
||||
return new String(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* 全角转半角
|
||||
*
|
||||
* @param input String.
|
||||
* @return 半角字符串
|
||||
*/
|
||||
public static String toDBC(String input)
|
||||
{
|
||||
return toDBC(input, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 替换全角为半角
|
||||
*
|
||||
* @param text 文本
|
||||
* @param notConvertSet 不替换的字符集合
|
||||
* @return 替换后的字符
|
||||
*/
|
||||
public static String toDBC(String text, Set<Character> notConvertSet)
|
||||
{
|
||||
char c[] = text.toCharArray();
|
||||
for (int i = 0; i < c.length; i++)
|
||||
{
|
||||
if (null != notConvertSet && notConvertSet.contains(c[i]))
|
||||
{
|
||||
// 跳过不替换的字符
|
||||
continue;
|
||||
}
|
||||
|
||||
if (c[i] == '\u3000')
|
||||
{
|
||||
c[i] = ' ';
|
||||
}
|
||||
else if (c[i] > '\uFF00' && c[i] < '\uFF5F')
|
||||
{
|
||||
c[i] = (char) (c[i] - 65248);
|
||||
}
|
||||
}
|
||||
String returnString = new String(c);
|
||||
|
||||
return returnString;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数字金额大写转换 先写个完整的然后将如零拾替换成零
|
||||
*
|
||||
* @param n 数字
|
||||
* @return 中文大写数字
|
||||
*/
|
||||
public static String digitUppercase(double n)
|
||||
{
|
||||
String[] fraction = { "角", "分" };
|
||||
String[] digit = { "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" };
|
||||
String[][] unit = { { "元", "万", "亿" }, { "", "拾", "佰", "仟" } };
|
||||
|
||||
String head = n < 0 ? "负" : "";
|
||||
n = Math.abs(n);
|
||||
|
||||
String s = "";
|
||||
for (int i = 0; i < fraction.length; i++)
|
||||
{
|
||||
s += (digit[(int) (Math.floor(n * 10 * Math.pow(10, i)) % 10)] + fraction[i]).replaceAll("(零.)+", "");
|
||||
}
|
||||
if (s.length() < 1)
|
||||
{
|
||||
s = "整";
|
||||
}
|
||||
int integerPart = (int) Math.floor(n);
|
||||
|
||||
for (int i = 0; i < unit[0].length && integerPart > 0; i++)
|
||||
{
|
||||
String p = "";
|
||||
for (int j = 0; j < unit[1].length && n > 0; j++)
|
||||
{
|
||||
p = digit[integerPart % 10] + unit[1][j] + p;
|
||||
integerPart = integerPart / 10;
|
||||
}
|
||||
s = p.replaceAll("(零.)*零$", "").replaceAll("^$", "零") + unit[0][i] + s;
|
||||
}
|
||||
return head + s.replaceAll("(零.)*零元", "元").replaceFirst("(零.)+", "").replaceAll("(零.)+", "零").replaceAll("^整$", "零元整");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.yxt.jlzx.utils;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/12/2 9:54
|
||||
* @description 放行白名单配置
|
||||
*/
|
||||
@Configuration
|
||||
@RefreshScope
|
||||
@ConfigurationProperties(prefix = "ignore")
|
||||
public class IgnoreWhiteProperties {
|
||||
|
||||
/**
|
||||
* 放行白名单配置,网关不校验此处的白名单
|
||||
*/
|
||||
private List<String> whites = new ArrayList<>();
|
||||
|
||||
public List<String> getWhites() {
|
||||
return whites;
|
||||
}
|
||||
|
||||
public void setWhites(List<String> whites) {
|
||||
this.whites = whites;
|
||||
}
|
||||
|
||||
private List<String> whitesTwo = new ArrayList<>();
|
||||
|
||||
public List<String> getWhitesTwo() {
|
||||
return whitesTwo;
|
||||
}
|
||||
|
||||
public void setWhitesTwo(List<String> whitesTwo) {
|
||||
this.whitesTwo = whitesTwo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.yxt.jlzx.utils;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/12/2 10:07
|
||||
* @description
|
||||
*/
|
||||
|
||||
public class R<T> implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 成功
|
||||
*/
|
||||
public static final int SUCCESS = Constants.SUCCESS;
|
||||
|
||||
/**
|
||||
* 失败
|
||||
*/
|
||||
public static final int FAIL = Constants.FAIL;
|
||||
|
||||
private int code;
|
||||
|
||||
private String msg;
|
||||
private boolean success;
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
private T data;
|
||||
|
||||
public static <T> R<T> ok() {
|
||||
return restResult(null, SUCCESS, null, true);
|
||||
}
|
||||
|
||||
public static <T> R<T> ok(T data) {
|
||||
return restResult(data, SUCCESS, null, true);
|
||||
}
|
||||
|
||||
public static <T> R<T> ok(T data, String msg) {
|
||||
return restResult(data, SUCCESS, msg, true);
|
||||
}
|
||||
|
||||
public static <T> R<T> fail() {
|
||||
return restResult(null, FAIL, null, false);
|
||||
}
|
||||
|
||||
public static <T> R<T> fail(String msg) {
|
||||
return restResult(null, FAIL, msg, false);
|
||||
}
|
||||
|
||||
public static <T> R<T> fail(T data) {
|
||||
return restResult(data, FAIL, null, false);
|
||||
}
|
||||
|
||||
public static <T> R<T> fail(T data, String msg) {
|
||||
return restResult(data, FAIL, msg, false);
|
||||
}
|
||||
|
||||
public static <T> R<T> fail(int code, String msg) {
|
||||
return restResult(null, code, msg, false);
|
||||
}
|
||||
|
||||
private static <T> R<T> restResult(T data, int code, String msg, boolean success) {
|
||||
R<T> apiResult = new R<>();
|
||||
apiResult.setCode(code);
|
||||
apiResult.setData(data);
|
||||
apiResult.setMsg(msg);
|
||||
apiResult.setSuccess(success);
|
||||
return apiResult;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public T getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(T data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.yxt.jlzx.utils;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/12/2 10:00
|
||||
* @description
|
||||
*/
|
||||
|
||||
public class StrFormatter {
|
||||
|
||||
public static final String EMPTY_JSON = "{}";
|
||||
public static final char C_BACKSLASH = '\\';
|
||||
public static final char C_DELIM_START = '{';
|
||||
public static final char C_DELIM_END = '}';
|
||||
|
||||
/**
|
||||
* 格式化字符串<br>
|
||||
* 此方法只是简单将占位符 {} 按照顺序替换为参数<br>
|
||||
* 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可<br>
|
||||
* 例:<br>
|
||||
* 通常使用:format("this is {} for {}", "a", "b") -> this is a for b<br>
|
||||
* 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a<br>
|
||||
* 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br>
|
||||
*
|
||||
* @param strPattern 字符串模板
|
||||
* @param argArray 参数列表
|
||||
* @return 结果
|
||||
*/
|
||||
public static String format(final String strPattern, final Object... argArray)
|
||||
{
|
||||
if (StringUtils.isEmpty(strPattern) || StringUtils.isEmpty(argArray))
|
||||
{
|
||||
return strPattern;
|
||||
}
|
||||
final int strPatternLength = strPattern.length();
|
||||
|
||||
// 初始化定义好的长度以获得更好的性能
|
||||
StringBuilder sbuf = new StringBuilder(strPatternLength + 50);
|
||||
|
||||
int handledPosition = 0;
|
||||
int delimIndex;// 占位符所在位置
|
||||
for (int argIndex = 0; argIndex < argArray.length; argIndex++)
|
||||
{
|
||||
delimIndex = strPattern.indexOf(EMPTY_JSON, handledPosition);
|
||||
if (delimIndex == -1)
|
||||
{
|
||||
if (handledPosition == 0)
|
||||
{
|
||||
return strPattern;
|
||||
}
|
||||
else
|
||||
{ // 字符串模板剩余部分不再包含占位符,加入剩余部分后返回结果
|
||||
sbuf.append(strPattern, handledPosition, strPatternLength);
|
||||
return sbuf.toString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (delimIndex > 0 && strPattern.charAt(delimIndex - 1) == C_BACKSLASH)
|
||||
{
|
||||
if (delimIndex > 1 && strPattern.charAt(delimIndex - 2) == C_BACKSLASH)
|
||||
{
|
||||
// 转义符之前还有一个转义符,占位符依旧有效
|
||||
sbuf.append(strPattern, handledPosition, delimIndex - 1);
|
||||
sbuf.append(Convert.utf8Str(argArray[argIndex]));
|
||||
handledPosition = delimIndex + 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 占位符被转义
|
||||
argIndex--;
|
||||
sbuf.append(strPattern, handledPosition, delimIndex - 1);
|
||||
sbuf.append(C_DELIM_START);
|
||||
handledPosition = delimIndex + 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 正常占位符
|
||||
sbuf.append(strPattern, handledPosition, delimIndex);
|
||||
sbuf.append(Convert.utf8Str(argArray[argIndex]));
|
||||
handledPosition = delimIndex + 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 加入最后一个占位符后所有的字符
|
||||
sbuf.append(strPattern, handledPosition, strPattern.length());
|
||||
|
||||
return sbuf.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,526 @@
|
||||
package com.yxt.jlzx.utils;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/12/2 9:59
|
||||
* @description
|
||||
*/
|
||||
|
||||
public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||
|
||||
/**
|
||||
* 空字符串
|
||||
*/
|
||||
private static final String NULLSTR = "";
|
||||
|
||||
/**
|
||||
* 下划线
|
||||
*/
|
||||
private static final char SEPARATOR = '_';
|
||||
|
||||
/**
|
||||
* 星号
|
||||
*/
|
||||
private static final String START = "*";
|
||||
|
||||
/**
|
||||
* 获取参数不为空值
|
||||
*
|
||||
* @param value defaultValue 要判断的value
|
||||
* @return value 返回值
|
||||
*/
|
||||
public static <T> T nvl(T value, T defaultValue) {
|
||||
return value != null ? value : defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* * 判断一个Collection是否为空, 包含List,Set,Queue
|
||||
*
|
||||
* @param coll 要判断的Collection
|
||||
* @return true:为空 false:非空
|
||||
*/
|
||||
public static boolean isEmpty(Collection<?> coll) {
|
||||
return isNull(coll) || coll.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* * 判断一个Collection是否非空,包含List,Set,Queue
|
||||
*
|
||||
* @param coll 要判断的Collection
|
||||
* @return true:非空 false:空
|
||||
*/
|
||||
public static boolean isNotEmpty(Collection<?> coll) {
|
||||
return !isEmpty(coll);
|
||||
}
|
||||
|
||||
/**
|
||||
* * 判断一个对象数组是否为空
|
||||
*
|
||||
* @param objects 要判断的对象数组
|
||||
* * @return true:为空 false:非空
|
||||
*/
|
||||
public static boolean isEmpty(Object[] objects) {
|
||||
return isNull(objects) || (objects.length == 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* * 判断一个对象数组是否非空
|
||||
*
|
||||
* @param objects 要判断的对象数组
|
||||
* @return true:非空 false:空
|
||||
*/
|
||||
public static boolean isNotEmpty(Object[] objects) {
|
||||
return !isEmpty(objects);
|
||||
}
|
||||
|
||||
/**
|
||||
* * 判断一个Map是否为空
|
||||
*
|
||||
* @param map 要判断的Map
|
||||
* @return true:为空 false:非空
|
||||
*/
|
||||
public static boolean isEmpty(Map<?, ?> map) {
|
||||
return isNull(map) || map.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* * 判断一个Map是否为空
|
||||
*
|
||||
* @param map 要判断的Map
|
||||
* @return true:非空 false:空
|
||||
*/
|
||||
public static boolean isNotEmpty(Map<?, ?> map) {
|
||||
return !isEmpty(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* * 判断一个字符串是否为空串
|
||||
*
|
||||
* @param str String
|
||||
* @return true:为空 false:非空
|
||||
*/
|
||||
public static boolean isEmpty(String str) {
|
||||
return isNull(str) || NULLSTR.equals(str.trim());
|
||||
}
|
||||
|
||||
/**
|
||||
* * 判断一个字符串是否为非空串
|
||||
*
|
||||
* @param str String
|
||||
* @return true:非空串 false:空串
|
||||
*/
|
||||
public static boolean isNotEmpty(String str) {
|
||||
return !isEmpty(str);
|
||||
}
|
||||
|
||||
/**
|
||||
* * 判断一个对象是否为空
|
||||
*
|
||||
* @param object Object
|
||||
* @return true:为空 false:非空
|
||||
*/
|
||||
public static boolean isNull(Object object) {
|
||||
return object == null;
|
||||
}
|
||||
|
||||
/**
|
||||
* * 判断一个对象是否非空
|
||||
*
|
||||
* @param object Object
|
||||
* @return true:非空 false:空
|
||||
*/
|
||||
public static boolean isNotNull(Object object) {
|
||||
return !isNull(object);
|
||||
}
|
||||
|
||||
/**
|
||||
* * 判断一个对象是否是数组类型(Java基本型别的数组)
|
||||
*
|
||||
* @param object 对象
|
||||
* @return true:是数组 false:不是数组
|
||||
*/
|
||||
public static boolean isArray(Object object) {
|
||||
return isNotNull(object) && object.getClass().isArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* 去空格
|
||||
*/
|
||||
public static String trim(String str) {
|
||||
return (str == null ? "" : str.trim());
|
||||
}
|
||||
|
||||
/**
|
||||
* 截取字符串
|
||||
*
|
||||
* @param str 字符串
|
||||
* @param start 开始
|
||||
* @return 结果
|
||||
*/
|
||||
public static String substring(final String str, int start) {
|
||||
if (str == null) {
|
||||
return NULLSTR;
|
||||
}
|
||||
|
||||
if (start < 0) {
|
||||
start = str.length() + start;
|
||||
}
|
||||
|
||||
if (start < 0) {
|
||||
start = 0;
|
||||
}
|
||||
if (start > str.length()) {
|
||||
return NULLSTR;
|
||||
}
|
||||
|
||||
return str.substring(start);
|
||||
}
|
||||
|
||||
/**
|
||||
* 截取字符串
|
||||
*
|
||||
* @param str 字符串
|
||||
* @param start 开始
|
||||
* @param end 结束
|
||||
* @return 结果
|
||||
*/
|
||||
public static String substring(final String str, int start, int end) {
|
||||
if (str == null) {
|
||||
return NULLSTR;
|
||||
}
|
||||
|
||||
if (end < 0) {
|
||||
end = str.length() + end;
|
||||
}
|
||||
if (start < 0) {
|
||||
start = str.length() + start;
|
||||
}
|
||||
|
||||
if (end > str.length()) {
|
||||
end = str.length();
|
||||
}
|
||||
|
||||
if (start > end) {
|
||||
return NULLSTR;
|
||||
}
|
||||
|
||||
if (start < 0) {
|
||||
start = 0;
|
||||
}
|
||||
if (end < 0) {
|
||||
end = 0;
|
||||
}
|
||||
|
||||
return str.substring(start, end);
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化文本, {} 表示占位符<br>
|
||||
* 此方法只是简单将占位符 {} 按照顺序替换为参数<br>
|
||||
* 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可<br>
|
||||
* 例:<br>
|
||||
* 通常使用:format("this is {} for {}", "a", "b") -> this is a for b<br>
|
||||
* 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a<br>
|
||||
* 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br>
|
||||
*
|
||||
* @param template 文本模板,被替换的部分用 {} 表示
|
||||
* @param params 参数值
|
||||
* @return 格式化后的文本
|
||||
*/
|
||||
public static String format(String template, Object... params) {
|
||||
if (isEmpty(params) || isEmpty(template)) {
|
||||
return template;
|
||||
}
|
||||
return StrFormatter.format(template, params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下划线转驼峰命名
|
||||
*/
|
||||
public static String toUnderScoreCase(String str) {
|
||||
if (str == null) {
|
||||
return null;
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
// 前置字符是否大写
|
||||
boolean preCharIsUpperCase = true;
|
||||
// 当前字符是否大写
|
||||
boolean curreCharIsUpperCase = true;
|
||||
// 下一字符是否大写
|
||||
boolean nexteCharIsUpperCase = true;
|
||||
for (int i = 0; i < str.length(); i++) {
|
||||
char c = str.charAt(i);
|
||||
if (i > 0) {
|
||||
preCharIsUpperCase = Character.isUpperCase(str.charAt(i - 1));
|
||||
} else {
|
||||
preCharIsUpperCase = false;
|
||||
}
|
||||
|
||||
curreCharIsUpperCase = Character.isUpperCase(c);
|
||||
|
||||
if (i < (str.length() - 1)) {
|
||||
nexteCharIsUpperCase = Character.isUpperCase(str.charAt(i + 1));
|
||||
}
|
||||
|
||||
if (preCharIsUpperCase && curreCharIsUpperCase && !nexteCharIsUpperCase) {
|
||||
sb.append(SEPARATOR);
|
||||
} else if ((i != 0 && !preCharIsUpperCase) && curreCharIsUpperCase) {
|
||||
sb.append(SEPARATOR);
|
||||
}
|
||||
sb.append(Character.toLowerCase(c));
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否包含字符串
|
||||
*
|
||||
* @param str 验证字符串
|
||||
* @param strs 字符串组
|
||||
* @return 包含返回true
|
||||
*/
|
||||
public static boolean inStringIgnoreCase(String str, String... strs) {
|
||||
if (str != null && strs != null) {
|
||||
for (String s : strs) {
|
||||
if (str.equalsIgnoreCase(trim(s))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将下划线大写方式命名的字符串转换为驼峰式。如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。 例如:HELLO_WORLD->HelloWorld
|
||||
*
|
||||
* @param name 转换前的下划线大写方式命名的字符串
|
||||
* @return 转换后的驼峰式命名的字符串
|
||||
*/
|
||||
public static String convertToCamelCase(String name) {
|
||||
StringBuilder result = new StringBuilder();
|
||||
// 快速检查
|
||||
if (name == null || name.isEmpty()) {
|
||||
// 没必要转换
|
||||
return "";
|
||||
} else if (!name.contains("_")) {
|
||||
// 不含下划线,仅将首字母大写
|
||||
return name.substring(0, 1).toUpperCase() + name.substring(1);
|
||||
}
|
||||
// 用下划线将原始字符串分割
|
||||
String[] camels = name.split("_");
|
||||
for (String camel : camels) {
|
||||
// 跳过原始字符串中开头、结尾的下换线或双重下划线
|
||||
if (camel.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
// 首字母大写
|
||||
result.append(camel.substring(0, 1).toUpperCase());
|
||||
result.append(camel.substring(1).toLowerCase());
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 驼峰式命名法 例如:user_name->userName
|
||||
*/
|
||||
public static String toCamelCase(String s) {
|
||||
if (s == null) {
|
||||
return null;
|
||||
}
|
||||
s = s.toLowerCase();
|
||||
StringBuilder sb = new StringBuilder(s.length());
|
||||
boolean upperCase = false;
|
||||
for (int i = 0; i < s.length(); i++) {
|
||||
char c = s.charAt(i);
|
||||
|
||||
if (c == SEPARATOR) {
|
||||
upperCase = true;
|
||||
} else if (upperCase) {
|
||||
sb.append(Character.toUpperCase(c));
|
||||
upperCase = false;
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找指定字符串是否匹配指定字符串列表中的任意一个字符串
|
||||
*
|
||||
* @param str 指定字符串
|
||||
* @param strs 需要检查的字符串数组
|
||||
* @return 是否匹配
|
||||
*/
|
||||
public static boolean matchesTwo(String str, List<String> strs) {
|
||||
if (isEmpty(str) || isEmpty(strs)) {
|
||||
return false;
|
||||
}
|
||||
for (String testStr : strs) {
|
||||
if (matchesTwo(str, testStr)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean matches(String str, List<String> strs) {
|
||||
if (isEmpty(str) || isEmpty(strs)) {
|
||||
return false;
|
||||
}
|
||||
for (String testStr : strs) {
|
||||
if (matches(str, testStr)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找指定字符串是否匹配指定字符串数组中的任意一个字符串
|
||||
*
|
||||
* @param str 指定字符串
|
||||
* @param strs 需要检查的字符串数组
|
||||
* @return 是否匹配
|
||||
*/
|
||||
public static boolean matches(String str, String... strs) {
|
||||
if (isEmpty(str) || isEmpty(strs)) {
|
||||
return false;
|
||||
}
|
||||
for (String testStr : strs) {
|
||||
if (matches(str, testStr)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean matches(String str, String pattern) {
|
||||
if (isEmpty(pattern) || isEmpty(str)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
pattern = pattern.replaceAll("\\s*", ""); // 替换空格
|
||||
int beginOffset = 0; // pattern截取开始位置
|
||||
int formerStarOffset = -1; // 前星号的偏移位置
|
||||
int latterStarOffset = -1; // 后星号的偏移位置
|
||||
|
||||
String remainingURI = str;
|
||||
String prefixPattern = "";
|
||||
String suffixPattern = "";
|
||||
|
||||
boolean result = false;
|
||||
do {
|
||||
formerStarOffset = indexOf(pattern, START, beginOffset);
|
||||
prefixPattern = substring(pattern, beginOffset, formerStarOffset > -1 ? formerStarOffset : pattern.length());
|
||||
|
||||
// 匹配前缀Pattern
|
||||
result = remainingURI.equals(prefixPattern);
|
||||
// 已经没有星号,直接返回
|
||||
if (formerStarOffset == -1) {
|
||||
return result;
|
||||
}
|
||||
|
||||
// 匹配失败,直接返回
|
||||
if (!result){
|
||||
return false;
|
||||
}
|
||||
if (!isEmpty(prefixPattern)) {
|
||||
remainingURI = substringAfter(str, prefixPattern);
|
||||
}
|
||||
|
||||
// 匹配后缀Pattern
|
||||
latterStarOffset = indexOf(pattern, START, formerStarOffset + 1);
|
||||
suffixPattern = substring(pattern, formerStarOffset + 1, latterStarOffset > -1 ? latterStarOffset : pattern.length());
|
||||
|
||||
result = remainingURI.equals(suffixPattern);
|
||||
// 匹配失败,直接返回
|
||||
if (!result){
|
||||
return false;
|
||||
}
|
||||
if (!isEmpty(suffixPattern)) {
|
||||
remainingURI = substringAfter(str, suffixPattern);
|
||||
}
|
||||
|
||||
// 移动指针
|
||||
beginOffset = latterStarOffset + 1;
|
||||
|
||||
}
|
||||
while (!isEmpty(suffixPattern) && !isEmpty(remainingURI));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找指定字符串是否匹配
|
||||
*
|
||||
* @param str 指定字符串
|
||||
* @param pattern 需要检查的字符串
|
||||
* @return 是否匹配
|
||||
*/
|
||||
public static boolean matchesTwo(String str, String pattern) {
|
||||
if (isEmpty(pattern) || isEmpty(str)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
pattern = pattern.replaceAll("\\s*", ""); // 替换空格
|
||||
int beginOffset = 0; // pattern截取开始位置
|
||||
int formerStarOffset = -1; // 前星号的偏移位置
|
||||
int latterStarOffset = -1; // 后星号的偏移位置
|
||||
|
||||
String remainingURI = str;
|
||||
String prefixPattern = "";
|
||||
String suffixPattern = "";
|
||||
|
||||
boolean result = false;
|
||||
do {
|
||||
formerStarOffset = indexOf(pattern, START, beginOffset);
|
||||
prefixPattern = substring(pattern, beginOffset, formerStarOffset > -1 ? formerStarOffset : pattern.length());
|
||||
|
||||
// 匹配前缀Pattern
|
||||
result = remainingURI.contains(prefixPattern);
|
||||
// 已经没有星号,直接返回
|
||||
if (formerStarOffset == -1) {
|
||||
return result;
|
||||
}
|
||||
|
||||
// 匹配失败,直接返回
|
||||
if (!result){
|
||||
return false;
|
||||
}
|
||||
if (!isEmpty(prefixPattern)) {
|
||||
remainingURI = substringAfter(str, prefixPattern);
|
||||
}
|
||||
|
||||
// 匹配后缀Pattern
|
||||
latterStarOffset = indexOf(pattern, START, formerStarOffset + 1);
|
||||
suffixPattern = substring(pattern, formerStarOffset + 1, latterStarOffset > -1 ? latterStarOffset : pattern.length());
|
||||
|
||||
result = remainingURI.contains(suffixPattern);
|
||||
// 匹配失败,直接返回
|
||||
if (!result){
|
||||
return false;
|
||||
}
|
||||
if (!isEmpty(suffixPattern)) {
|
||||
remainingURI = substringAfter(str, suffixPattern);
|
||||
}
|
||||
|
||||
// 移动指针
|
||||
beginOffset = latterStarOffset + 1;
|
||||
|
||||
}
|
||||
while (!isEmpty(suffixPattern) && !isEmpty(remainingURI));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> T cast(Object obj) {
|
||||
return (T) obj;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
spring:
|
||||
resources:
|
||||
static-locations: file:E://jlzx
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 127.0.0.1:8848
|
||||
redis:
|
||||
database: 6 # Redis数据库索引(默认为0)
|
||||
host: 127.0.0.1
|
||||
jedis:
|
||||
pool:
|
||||
max-active: -1 #连接池最大连接数(使用负值表示没有限制)
|
||||
max-idle: 8 #连接池中的最大空闲连接
|
||||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
min-idle: 0 # 连接池中的最小空闲连接
|
||||
password: 123456
|
||||
port: 6379
|
||||
timeout: 0 # 连接超时时间(毫秒)
|
||||
@@ -0,0 +1,18 @@
|
||||
spring:
|
||||
resources:
|
||||
static-locations: file:D://jlzx
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 39.104.100.138:8848
|
||||
redis:
|
||||
database: 2 # Redis数据库索引(默认为0)
|
||||
host: 39.104.100.138
|
||||
jedis:
|
||||
pool:
|
||||
max-active: -1 #连接池最大连接数(使用负值表示没有限制)
|
||||
max-idle: 8 #连接池中的最大空闲连接
|
||||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
min-idle: 0 # 连接池中的最小空闲连接
|
||||
password: 123456
|
||||
port: 6379
|
||||
timeout: 0 # 连接超时时间(毫秒)
|
||||
@@ -0,0 +1,19 @@
|
||||
spring:
|
||||
resources:
|
||||
static-locations: file:E://jlzx
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 192.168.103.6:8848
|
||||
redis:
|
||||
database: 2 # Redis数据库索引(默认为0)
|
||||
host: 192.168.103.6
|
||||
jedis:
|
||||
pool:
|
||||
max-active: -1 #连接池最大连接数(使用负值表示没有限制)
|
||||
max-idle: 8 #连接池中的最大空闲连接
|
||||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
min-idle: 0 # 连接池中的最小空闲连接
|
||||
password: 123456
|
||||
port: 6379
|
||||
timeout: 0 # 连接超时时间(毫秒)
|
||||
@@ -0,0 +1,19 @@
|
||||
spring:
|
||||
resources:
|
||||
static-locations: file:D://jlzx
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 127.0.0.1:8848
|
||||
redis:
|
||||
database: 2 # Redis数据库索引(默认为0)
|
||||
host: 127.0.0.1
|
||||
jedis:
|
||||
pool:
|
||||
max-active: -1 #连接池最大连接数(使用负值表示没有限制)
|
||||
max-idle: 8 #连接池中的最大空闲连接
|
||||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
min-idle: 0 # 连接池中的最小空闲连接
|
||||
password:
|
||||
port: 6379
|
||||
timeout: 0 # 连接超时时间(毫秒)
|
||||
@@ -0,0 +1,145 @@
|
||||
hystrix:
|
||||
command:
|
||||
default:
|
||||
execution:
|
||||
isolation:
|
||||
strategy: SEMAPHORE
|
||||
thread:
|
||||
timeoutInMilliseconds: 300000
|
||||
server:
|
||||
port: 8111
|
||||
spring:
|
||||
application:
|
||||
name: gateway-server
|
||||
profiles:
|
||||
active: dev
|
||||
cloud:
|
||||
gateway:
|
||||
###设置跨域
|
||||
globalcors:
|
||||
corsConfigurations:
|
||||
'[/**]':
|
||||
allowedOrigins: "*"
|
||||
allowedMethods: "*"
|
||||
allowedHeaders: "*"
|
||||
#default-filters:
|
||||
#- DedupeResponseHeader=Access-Control-Allow-Origin, RETAIN_UNIQUE
|
||||
routes:
|
||||
- id: jlzx-jlcyry
|
||||
predicates:
|
||||
- Path= /jlcyry/**
|
||||
uri: lb://yxt-jlzx-jlcyry
|
||||
filters:
|
||||
- StripPrefix=1
|
||||
|
||||
- id: jlzx-system
|
||||
predicates:
|
||||
- Path= /system/**
|
||||
uri: lb://yxt-jlzx-system
|
||||
filters:
|
||||
- StripPrefix=1
|
||||
|
||||
- id: jlzx-oa
|
||||
predicates:
|
||||
- Path= /oa/**
|
||||
uri: lb://yxt-jlzx-oa
|
||||
filters:
|
||||
- StripPrefix=1
|
||||
|
||||
- id: yxt-workflow
|
||||
predicates:
|
||||
- Path= /workflow/**
|
||||
uri: lb://yxt-workflow
|
||||
filters:
|
||||
- StripPrefix=1
|
||||
|
||||
- id: yxt-messagecenter
|
||||
predicates:
|
||||
- Path= /messagecenter/**
|
||||
uri: lb://yxt-messagecenter
|
||||
filters:
|
||||
- StripPrefix=1
|
||||
|
||||
- id: yxt-attend
|
||||
predicates:
|
||||
- Path= /attend/**
|
||||
uri: lb://yxt-attend
|
||||
filters:
|
||||
- StripPrefix=1 #忽略Path配置的个数,此处为1代表访问/api/customer/**时,会将api忽略,真实的访问地址为lb://customer-center/customer/**,如果为2,则为lb://customer-center/**
|
||||
|
||||
- id: jlzx-cxjl
|
||||
predicates:
|
||||
- Path= /cxjl/**
|
||||
uri: lb://yxt-jlzx-cxjl
|
||||
filters:
|
||||
- StripPrefix=1
|
||||
|
||||
ignore:
|
||||
whites:
|
||||
- /oa/file/download
|
||||
- /oa/file/upload
|
||||
- /system/user/loginReturnBase
|
||||
- /system/user/loginReturnOa
|
||||
- /system/user/loginReturnCxjl
|
||||
- /system/user/login #pc端登录
|
||||
- /system/user/save #用户注册
|
||||
- /system/user/getVerificationCode #用户注册获取手机验证码
|
||||
- /system/organization/save #单位注册
|
||||
- /system/organization/getVerificationCode #单位注册获取手机验证码
|
||||
- /jlcyry/staffInfo/isRepeatByIDCard #单位注册获取手机验证码
|
||||
- /system/v1/appusers/login
|
||||
###单位级别、单位类别、下载委托书
|
||||
- /system/dictCommon/getDwType
|
||||
- /system/dictCommon/getRylb
|
||||
- /system/dictCommon/getDwJb
|
||||
- /system/region/getCity
|
||||
- /system/region/getCounty
|
||||
- /system/region/getProvince
|
||||
- /system/organization/download
|
||||
- /system/user/userList #用户列表的获取
|
||||
- /system/v1/appVersion/selectNewVersion
|
||||
- /system/v1/appVersion/save
|
||||
- /system/v1/appVersion/selectNewAppVersion
|
||||
- /system/organization/selectByOrgCode
|
||||
- /system/v1/appusers/selectCaUserDetails #ca回调接口
|
||||
- /system/v1/appusers/selectPcCreateQrCode #PC获取登录二维码
|
||||
- /system/v1/appusers/selectCreateQrCodeOne
|
||||
- /cxjl/v1/punishments/getExcelInfo
|
||||
- /cxjl/v1/promises/orgPagerListPublicity
|
||||
- /system/organization/selectByOrgCodeOne
|
||||
- /system/organization/generateWordTemplate
|
||||
|
||||
|
||||
- /system/api/clickWord
|
||||
- /system/file/upload
|
||||
- /oa/file/upload
|
||||
- /jlcyry/file/upload
|
||||
- /cxjl/file/upload
|
||||
- /cxjl/v1/promisefiles/upload2
|
||||
- /system/index/selectCode
|
||||
- /system/index/orgDetails
|
||||
- /system/index/indexUserDetails
|
||||
- /system/index/indexOrgDetails
|
||||
- /cxjl/v1/promisebookpdfs/exportOrder
|
||||
|
||||
|
||||
whitesTwo:
|
||||
###swagger相关开始
|
||||
- /doc.html
|
||||
- /webjars/**
|
||||
- /swagger-resources
|
||||
- /v2/**
|
||||
- /favicon.ico
|
||||
- /upload/**
|
||||
- /system/user/reGetPwd/** #忘记密码
|
||||
- /system/v1/rolemenus/**
|
||||
- /system/v1/apporganizations/**
|
||||
- /system/v1/appusers/selectIdNo/**
|
||||
- /system/v1/appusers/selectLunXunResult/**
|
||||
- /system/v1/appSubsetVersion/**
|
||||
- /system/v1/appSubsets/**
|
||||
- /cxjl/v1/promises/initPromise/**
|
||||
- /cxjl/v1/promisebookpdfs/selectPromisePdf/**
|
||||
- /cxjl/v1/promises/detailsVo/**
|
||||
###swagger相关结束
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.yxt</groupId>
|
||||
<artifactId>yxt-parent</artifactId>
|
||||
<version>0.0.1</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
<groupId>com.yxt.jlzx</groupId>
|
||||
<artifactId>jlzx-single-jlcyry-api</artifactId>
|
||||
<version>0.0.1</version>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.yxt</groupId>
|
||||
<artifactId>yxt-common-core</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yxt.jlzx</groupId>
|
||||
<artifactId>jlzx-single-system-api</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate.validator</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-annotation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yxt</groupId>
|
||||
<artifactId>yxt-common-base</artifactId>
|
||||
<version>0.0.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!-- <dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-annotations</artifactId>
|
||||
<version>2.0.4</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>com.deepoove</groupId>
|
||||
<artifactId>poi-tl</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.yxt.jlzx.jlcyry.api.certItem;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/8/27 16:00
|
||||
* @description 专业项目
|
||||
*/
|
||||
@Data
|
||||
@TableName("certitem")
|
||||
public class CertItem extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 2579070891345148657L;
|
||||
/**
|
||||
* 专业
|
||||
*/
|
||||
private String subject;
|
||||
/**
|
||||
* 项目
|
||||
*/
|
||||
private String item;
|
||||
/**
|
||||
* 子项目
|
||||
*/
|
||||
private String subItem;
|
||||
/**
|
||||
* 依据、标准、规程、规范等
|
||||
*/
|
||||
private String basis;
|
||||
/**
|
||||
* 证书sid
|
||||
*/
|
||||
private String certSid;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.yxt.jlzx.jlcyry.api.certItem;
|
||||
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import com.yxt.jlzx.jlcyry.api.certificate.CertificateVo;
|
||||
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/9/4 9:21
|
||||
* @description 专业项目
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-jlzx-jlcyry-CertItem",
|
||||
name = "yxt-jlzx-jlcyry",
|
||||
path = "certItem",
|
||||
fallback = CertItemApiFallback.class)
|
||||
public interface CertItemApi {
|
||||
|
||||
|
||||
/**
|
||||
* 分页列表
|
||||
*
|
||||
* @param pagerQuery
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/pagerList")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "分页列表")
|
||||
public ResultBean<PagerVo<CertItem>> pagerList(PagerQuery pagerQuery);
|
||||
|
||||
/**
|
||||
* 专业项目保存
|
||||
*
|
||||
* @param certItemDto 专业项目dto对象
|
||||
* @return ResultBean
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "专业项目保存")
|
||||
public ResultBean save(@Valid CertItemDto certItemDto);
|
||||
|
||||
/**
|
||||
* 专业项目修改(@PathVariable是spring3.0的一个新功能:接收请求路径中占位符的值.
|
||||
* 通过 @PathVariable 可以将URL中占位符参数{xxx}绑定到处理器类的方法形参中@PathVariable(“xxx“) )
|
||||
*
|
||||
* @param certItemDto 专业项目dto对象
|
||||
* @param sid 专业项目sid
|
||||
* @return ResultBean
|
||||
*/
|
||||
@PostMapping("/update/{sid}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "专业技术工作经历及业绩修改")
|
||||
public ResultBean update(@Valid CertItemDto certItemDto, @ApiParam(value = "专业项目sid", required = true) @PathVariable("sid") String sid);
|
||||
|
||||
/**
|
||||
* 专业项目删除
|
||||
*
|
||||
* @param sid 专业项目sid
|
||||
* @return ResultBean
|
||||
*/
|
||||
@ResponseBody
|
||||
@DeleteMapping("/delete/{sid}")
|
||||
public ResultBean delete(@ApiParam(value = "专业项目sid", required = true) @PathVariable("sid") String sid);
|
||||
|
||||
|
||||
|
||||
@PostMapping("/infoUpdate")
|
||||
@ApiOperation(value = "证书项目信息审核")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "state", value = "审核状态", required = true),
|
||||
@ApiImplicitParam(name = "sid", value = "证书项目sid", required = true)
|
||||
})
|
||||
@ResponseBody
|
||||
public ResultBean infoUpdate(@RequestParam("state") Integer state,
|
||||
@RequestParam("sid") String sid);
|
||||
@GetMapping("/selectByCertfSid")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "根据证书sid查询证书项目")
|
||||
public ResultBean<List<CertItemVo>> selectByCertSid(String certSid);
|
||||
|
||||
@GetMapping("/getVo")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "证书项目信息")
|
||||
public ResultBean<CertItemVo> getVo( String sid);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.yxt.jlzx.jlcyry.api.certItem;
|
||||
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import com.yxt.jlzx.jlcyry.api.certificate.CertificateVo;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/9/4 9:22
|
||||
* @description 专业项目
|
||||
*/
|
||||
@Component
|
||||
public class CertItemApiFallback implements CertItemApi {
|
||||
|
||||
|
||||
/**
|
||||
* 分页列表
|
||||
*
|
||||
* @param pagerQuery
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ResultBean<PagerVo<CertItem>> pagerList(PagerQuery pagerQuery) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
/**
|
||||
* 专业项目保存
|
||||
*
|
||||
* @param certItemDto 专业项目dto对象
|
||||
* @return ResultBean
|
||||
*/
|
||||
@Override
|
||||
public ResultBean save(@Valid CertItemDto certItemDto) {
|
||||
return ResultBean.fireFail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
/**
|
||||
* 专业项目修改(@PathVariable是spring3.0的一个新功能:接收请求路径中占位符的值.
|
||||
* 通过 @PathVariable 可以将URL中占位符参数{xxx}绑定到处理器类的方法形参中@PathVariable(“xxx“) )
|
||||
*
|
||||
* @param certItemDto 专业项目dto对象
|
||||
* @param sid 专业项目sid
|
||||
* @return ResultBean
|
||||
*/
|
||||
@Override
|
||||
public ResultBean update(@Valid CertItemDto certItemDto, String sid) {
|
||||
return ResultBean.fireFail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
/**
|
||||
* 专业项目删除
|
||||
*
|
||||
* @param sid 专业项目sid
|
||||
* @return ResultBean
|
||||
*/
|
||||
@Override
|
||||
public ResultBean delete(String sid) {
|
||||
return ResultBean.fireFail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean infoUpdate(Integer state, String sid) {
|
||||
// TODO Auto-generated method stub
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<CertItemVo> getVo(String sid) {
|
||||
// TODO Auto-generated method stub
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<CertItemVo>> selectByCertSid(String certSid) {
|
||||
// TODO Auto-generated method stub
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.yxt.jlzx.jlcyry.api.certItem;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/9/4 9:17
|
||||
* @description 专业项目
|
||||
*/
|
||||
@Data
|
||||
public class CertItemDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -4518426813856137583L;
|
||||
/**
|
||||
* 专业
|
||||
*/
|
||||
@ApiModelProperty(value = "专业", required = true)
|
||||
@NotBlank(message = "专业不能为空")
|
||||
private String subject;
|
||||
/**
|
||||
* 项目
|
||||
*/
|
||||
@ApiModelProperty(value = "项目", required = true)
|
||||
@NotBlank(message = "项目不能为空")
|
||||
private String item;
|
||||
/**
|
||||
* 子项目
|
||||
*/
|
||||
@ApiModelProperty(value = "子项目", required = true)
|
||||
@NotBlank(message = "子项目不能为空")
|
||||
private String subItem;
|
||||
/**
|
||||
* 依据、标准、规程、规范等
|
||||
*/
|
||||
@ApiModelProperty(value = "依据、标准、规程、规范等", required = true)
|
||||
@NotBlank(message = "依据、标准、规程、规范不能为空")
|
||||
private String basis;
|
||||
/**
|
||||
* 证书sid
|
||||
*/
|
||||
@ApiModelProperty(value = "证书sid", required = true)
|
||||
private String certSid;
|
||||
|
||||
@Valid
|
||||
public CertItem toEntity() {
|
||||
CertItem certItem = new CertItem();
|
||||
BeanUtils.copyProperties(this, certItem);
|
||||
return certItem;
|
||||
}
|
||||
|
||||
@Valid
|
||||
public Map toMap(CertItem certItem) {
|
||||
BeanUtils.copyProperties(this, certItem);
|
||||
Map map = JSON.parseObject(JSON.toJSONString(certItem), Map.class);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.yxt.jlzx.jlcyry.api.certItem;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/8/27 16:00
|
||||
* @description 专业项目
|
||||
*/
|
||||
@Data
|
||||
@TableName("certitem")
|
||||
public class CertItemVo implements Vo {
|
||||
|
||||
@ApiModelProperty(value = "专业")
|
||||
private String subject;
|
||||
/**
|
||||
* 项目
|
||||
*/
|
||||
@ApiModelProperty(value = "项目")
|
||||
private String item;
|
||||
/**
|
||||
* 子项目
|
||||
*/
|
||||
@ApiModelProperty(value = "子项目")
|
||||
private String subItem;
|
||||
|
||||
@ApiModelProperty(value = "审核状态")
|
||||
private int state;
|
||||
/**
|
||||
* 依据、标准、规程、规范等
|
||||
*/
|
||||
@ApiModelProperty(value = "依据、标准、规程、规范等")
|
||||
private String basis;
|
||||
/**
|
||||
* 证书sid
|
||||
*/
|
||||
@ApiModelProperty(value = "证书sid")
|
||||
private String certSid;
|
||||
|
||||
@ApiModelProperty(value = "sid")
|
||||
private String sid;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
|
||||
package com.yxt.jlzx.jlcyry.api.certificate;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/8/27 14:40
|
||||
* @description 从业资格情况
|
||||
*/
|
||||
@Data
|
||||
@TableName("certificate")
|
||||
public class Certificate extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 7973349309250979087L;
|
||||
|
||||
/**
|
||||
* 证书行业(特种设备、计量等)
|
||||
*/
|
||||
private String certTrade;
|
||||
/**
|
||||
* 证书类别(注册计量师证、考评员证等官方名称)
|
||||
*/
|
||||
private String certType;
|
||||
/**
|
||||
* 等级,非必填项
|
||||
*/
|
||||
private String certLevel;
|
||||
/**
|
||||
* 发证机构
|
||||
*/
|
||||
private String issueOrg;
|
||||
/**
|
||||
* 证书编号
|
||||
*/
|
||||
private String certNo;
|
||||
/**
|
||||
* 批准日期
|
||||
*/
|
||||
private String approvalDate;
|
||||
|
||||
/**
|
||||
* 证书有效期始
|
||||
*/
|
||||
private String dateStart;
|
||||
/**
|
||||
* 证书有效期止
|
||||
*/
|
||||
private String dateEnd;
|
||||
/**
|
||||
* 专业名称,非必填
|
||||
*/
|
||||
private String subject;
|
||||
/**
|
||||
* 其他,可填写资格证书编号,非必填
|
||||
*/
|
||||
private String others;
|
||||
/**
|
||||
* 证书路径
|
||||
*/
|
||||
private String certUrl;
|
||||
/**
|
||||
* 人员sid
|
||||
*/
|
||||
private String staffSid;
|
||||
|
||||
private String jlzymc;//计量专业名称
|
||||
|
||||
private String sxzymc;//所学专业名称
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.yxt.jlzx.jlcyry.api.certificate;
|
||||
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import com.yxt.jlzx.jlcyry.api.education.EducationVo;
|
||||
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/9/3 9:43
|
||||
* @description
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-jlzx-jlcyry-Certificate",
|
||||
name = "yxt-jlzx-jlcyry",
|
||||
path = "certificate",
|
||||
fallback = CertificateApiFallback.class)
|
||||
public interface CertificateApi {
|
||||
|
||||
/**
|
||||
* 分页列表
|
||||
*
|
||||
* @param pagerQuery
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/pagerList")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "分页列表")
|
||||
public ResultBean<PagerVo<Certificate>> pagerList(PagerQuery pagerQuery);
|
||||
|
||||
/**
|
||||
* 证书保存
|
||||
*
|
||||
* @param certificateDto 证书dto对象
|
||||
* @return ResultBean
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "证书保存")
|
||||
public ResultBean save(@Valid @RequestBody CertificateDto certificateDto);
|
||||
|
||||
/**
|
||||
* 证书修改(@PathVariable是spring3.0的一个新功能:接收请求路径中占位符的值.
|
||||
* 通过 @PathVariable 可以将URL中占位符参数{xxx}绑定到处理器类的方法形参中@PathVariable(“xxx“) )
|
||||
*
|
||||
* @param certificateDto 证书dto对象
|
||||
* @param sid 证书sid
|
||||
* @return ResultBean
|
||||
*/
|
||||
@PostMapping("/update/{sid}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "证书修改")
|
||||
public ResultBean update(@Valid CertificateDto certificateDto, @ApiParam(value = "证书sid", required = true) @PathVariable("sid") String sid);
|
||||
|
||||
/**
|
||||
* 证书删除
|
||||
*
|
||||
* @param sid 证书sid
|
||||
* @return ResultBean
|
||||
*/
|
||||
@ResponseBody
|
||||
@DeleteMapping("/delete/{sid}")
|
||||
public ResultBean delete(@ApiParam(value = "证书sid", required = true) @PathVariable("sid") String sid);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通过人员sid查询培训经历
|
||||
*
|
||||
* @param staffSid
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/selectByStaffSid")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "查询该人员的证书")
|
||||
public ResultBean<List<CertificateVo>> selectByStaffSid(String staffSid);
|
||||
|
||||
|
||||
@PostMapping("/infoUpdate")
|
||||
@ApiOperation(value = "证书审核")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "state", value = "审核状态", required = true),
|
||||
@ApiImplicitParam(name = "sid", value = "证书sid", required = true)
|
||||
})
|
||||
@ResponseBody
|
||||
public ResultBean infoUpdate(@RequestParam("state") Integer state,
|
||||
@RequestParam("sid") String sid);
|
||||
|
||||
@GetMapping("/getVo")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "证书信息")
|
||||
public ResultBean<CertificateVo> getVo( String sid);
|
||||
|
||||
@ResponseBody
|
||||
@GetMapping("/dictSelect")
|
||||
@ApiOperation(value = "人员从业资格情况下拉框初始化")
|
||||
ResultBean<Map<String, Object>> dictSelect();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.yxt.jlzx.jlcyry.api.certificate;
|
||||
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/9/3 9:43
|
||||
* @description 证书容错处理
|
||||
*/
|
||||
@Component
|
||||
public class CertificateApiFallback implements CertificateApi {
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<Certificate>> pagerList(PagerQuery pagerQuery) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
/**
|
||||
* 证书保存
|
||||
*
|
||||
* @param certificateDto 证书dto对象
|
||||
* @return ResultBean
|
||||
*/
|
||||
@Override
|
||||
public ResultBean save(@Valid CertificateDto certificateDto) {
|
||||
return ResultBean.fireFail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
/**
|
||||
* 证书修改(@PathVariable是spring3.0的一个新功能:接收请求路径中占位符的值.
|
||||
* 通过 @PathVariable 可以将URL中占位符参数{xxx}绑定到处理器类的方法形参中@PathVariable(“xxx“) )
|
||||
*
|
||||
* @param certificateDto 证书dto对象
|
||||
* @param sid 证书sid
|
||||
* @return ResultBean
|
||||
*/
|
||||
@Override
|
||||
public ResultBean update(@Valid CertificateDto certificateDto, String sid) {
|
||||
return ResultBean.fireFail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
/**
|
||||
* 证书删除
|
||||
*
|
||||
* @param sid 证书sid
|
||||
* @return ResultBean
|
||||
*/
|
||||
@Override
|
||||
public ResultBean delete(String sid) {
|
||||
return ResultBean.fireFail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<CertificateVo>> selectByStaffSid(String staffSid) {
|
||||
// TODO Auto-generated method stub
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean infoUpdate(Integer state, String sid) {
|
||||
// TODO Auto-generated method stub
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<CertificateVo> getVo(String sid) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<Map<String, Object>> dictSelect() {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.yxt.jlzx.jlcyry.api.certificate;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/9/3 9:36
|
||||
* @description 证书
|
||||
*/
|
||||
@Data
|
||||
public class CertificateDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 8572983523382626945L;
|
||||
@ApiModelProperty(value = "证书名称", required = true)
|
||||
@NotBlank(message = "证书名称不能为空")
|
||||
private String certType;
|
||||
@ApiModelProperty(value = "等级", required = true)
|
||||
@NotBlank(message = "等级不能为空")
|
||||
private String certLevel;
|
||||
@ApiModelProperty(value = "计量专业名称", required = true)
|
||||
@NotBlank(message = "专业名称不能为空")
|
||||
private String jlzymc;
|
||||
@ApiModelProperty(value = "所学专业名称", required = true)
|
||||
@NotBlank(message = "所学专业不能为空")
|
||||
private String sxzymc;
|
||||
@ApiModelProperty(value = "证书编号", required = true)
|
||||
@NotBlank(message = "证书编号不能为空")
|
||||
private String certNo;
|
||||
@ApiModelProperty(value = "发证机构", required = true)
|
||||
@NotBlank(message = "发证机构不能为空")
|
||||
private String issueOrg;
|
||||
@ApiModelProperty(value = "批准日期", required = true)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd", iso = DateTimeFormat.ISO.DATE_TIME)
|
||||
@NotBlank(message = "批准日期不能为空")
|
||||
private String approvalDate;
|
||||
@ApiModelProperty(value = "证书有效期至", required = true)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd", iso = DateTimeFormat.ISO.DATE_TIME)
|
||||
@NotBlank(message = "证书有效期至不能为空")
|
||||
private String dateEnd;
|
||||
@ApiModelProperty(value = "证书路径", required = true)
|
||||
@NotBlank(message = "证书不能为空")
|
||||
private String certUrl;
|
||||
@ApiModelProperty(value = "人员sid", required = true)
|
||||
private String staffSid;
|
||||
|
||||
|
||||
// @ApiModelProperty(value = "证书有效期始", required = true)
|
||||
// @DateTimeFormat(pattern = "yyyy-MM-dd", iso = DateTimeFormat.ISO.DATE_TIME)
|
||||
// @NotBlank(message = "证书有效期始不能为空")
|
||||
// private String dateStart;
|
||||
// @ApiModelProperty(value = "其他,可填写资格证书编号,非必填", required = true)
|
||||
// private String others;
|
||||
|
||||
@Valid
|
||||
public Certificate toEntity() {
|
||||
Certificate certificate = new Certificate();
|
||||
BeanUtils.copyProperties(this, certificate);
|
||||
return certificate;
|
||||
}
|
||||
|
||||
@Valid
|
||||
public Map toMap(Certificate certificate) {
|
||||
BeanUtils.copyProperties(this, certificate);
|
||||
Map map = JSON.parseObject(JSON.toJSONString(certificate), Map.class);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.yxt.jlzx.jlcyry.api.certificate;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/10/9 11:48
|
||||
* @description 人员从业资格情况
|
||||
*/
|
||||
@Data
|
||||
public class CertificateVo implements Vo{
|
||||
|
||||
/**
|
||||
* 证书类别(注册计量师证、考评员证等官方名称)
|
||||
*/
|
||||
@ApiModelProperty(value = "证书类别")
|
||||
private String certType;
|
||||
/**
|
||||
* 等级,非必填项
|
||||
*/
|
||||
@ApiModelProperty(value = "证书等级")
|
||||
private String certLevel;
|
||||
|
||||
/**
|
||||
* 发证机构
|
||||
*/
|
||||
@ApiModelProperty(value = "发证机构")
|
||||
private String issueOrg;
|
||||
/**
|
||||
* 证书编号
|
||||
*/
|
||||
@ApiModelProperty(value = "证书编号")
|
||||
private String certNo;
|
||||
/**
|
||||
* 批准日期
|
||||
*/
|
||||
@ApiModelProperty(value = "批准日期")
|
||||
private String approvalDate;
|
||||
|
||||
/**
|
||||
* 证书有效期始
|
||||
*/
|
||||
private String dateStart;
|
||||
/**
|
||||
* 证书有效期止
|
||||
*/
|
||||
@ApiModelProperty(value = "证书有效期止")
|
||||
private String dateEnd;
|
||||
/**
|
||||
* 专业名称,非必填
|
||||
*/
|
||||
@ApiModelProperty(value = "专业名称")
|
||||
private String subject;
|
||||
|
||||
@ApiModelProperty(value = "其他,可填写资格证书编号,非必填", required = false)
|
||||
private String others;
|
||||
|
||||
/**
|
||||
* 证书路径
|
||||
*/
|
||||
@ApiModelProperty(value = "证书路径")
|
||||
private String certUrl;
|
||||
|
||||
@ApiModelProperty(value = "审核状态")
|
||||
private int state;
|
||||
|
||||
private String certUrlPath;
|
||||
/**
|
||||
* 发证日期
|
||||
*/
|
||||
@ApiModelProperty(value = "发证日期")
|
||||
private String certificateDate;
|
||||
|
||||
@ApiModelProperty(value = "sid")
|
||||
private String sid;
|
||||
|
||||
@ApiModelProperty(value = "人员sid")
|
||||
private String staffSid;
|
||||
|
||||
@ApiModelProperty(value = "计量专业名称")
|
||||
private String jlzymc;
|
||||
|
||||
@ApiModelProperty(value = "所学专业名称")
|
||||
private String sxzymc;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
package com.yxt.jlzx.jlcyry.api.clientalterrecord;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/8/27 14:40
|
||||
* @description 从业资格情况
|
||||
*/
|
||||
@Data
|
||||
@TableName("client_alter_record")
|
||||
public class ClientAlterRecord extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 7973349309250979087L;
|
||||
|
||||
|
||||
private String staffSid;//人员sid
|
||||
private String orgSid;
|
||||
private String name;
|
||||
private String idNo;
|
||||
private String mobile;
|
||||
private Date startDate;
|
||||
private Date endDate;
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.yxt.jlzx.jlcyry.api.clientalterrecord;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.yxt.common.core.api.BaseApi;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import com.yxt.jlzx.jlcyry.api.staffinfo.StaffClientVo;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/9/3 9:43
|
||||
* @description
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-jlzx-jlcyry-ClientAlterRecord",
|
||||
name = "yxt-jlzx-jlcyry",
|
||||
path = "v1/clientalterrecords",
|
||||
fallback = ClientAlterRecordApiFallback.class)
|
||||
public interface ClientAlterRecordApi {
|
||||
|
||||
/**
|
||||
* 分页列表
|
||||
*
|
||||
* @param pagerQuery
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/pagerList")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "分页列表")
|
||||
public ResultBean<PagerVo<ClientAlterRecordVo>> pagerList(@Valid @RequestBody PagerQuery<ClientAlterRecordQuery> pagerQuery);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 变更选择委托人列表
|
||||
*
|
||||
* @param pagerQuery
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/staffClientList")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "变更选择委托人列表")
|
||||
public ResultBean<PagerVo<StaffClientVo>> staffClientList(@Valid @RequestBody PagerQuery<ClientAlterRecordQuery> pagerQuery);
|
||||
|
||||
/**
|
||||
* 变更记录保存
|
||||
*
|
||||
* @param clientAlterRecordDto 证书dto对象
|
||||
* @return ResultBean
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "变更记录保存")
|
||||
public ResultBean save(@Valid @RequestBody ClientAlterRecordDto clientAlterRecordDto);
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/getVo")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "记录信息详情")
|
||||
public ResultBean<ClientAlterRecordVo> getVo( String sid);
|
||||
|
||||
@PostMapping("/doClientAlter")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "委托人变更操作")
|
||||
public ResultBean doClientAlter(@Valid @RequestBody ClientAlterRecordDto clientAlterRecordDto);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.yxt.jlzx.jlcyry.api.clientalterrecord;
|
||||
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import com.yxt.jlzx.jlcyry.api.staffinfo.StaffClientVo;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/9/3 9:43
|
||||
* @description 证书容错处理
|
||||
*/
|
||||
@Component
|
||||
public class ClientAlterRecordApiFallback implements ClientAlterRecordApi {
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<ClientAlterRecordVo>> pagerList(PagerQuery pagerQuery) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<StaffClientVo>> staffClientList(PagerQuery pagerQuery) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean save(@Valid ClientAlterRecordDto clientAlterRecordDto) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<ClientAlterRecordVo> getVo(String sid) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean doClientAlter(@Valid ClientAlterRecordDto clientAlterRecordDto) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.yxt.jlzx.jlcyry.api.clientalterrecord;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/9/3 9:36
|
||||
* @description 证书
|
||||
*/
|
||||
@Data
|
||||
public class ClientAlterRecordDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 8572983523382626945L;
|
||||
|
||||
@ApiModelProperty(value = "变更后人员sid", required = true)
|
||||
@NotBlank(message = "人员sid不能为空")
|
||||
private String staffSid;
|
||||
|
||||
@ApiModelProperty(value = "企业sid", required = true)
|
||||
@NotBlank(message = "企业sid不能为空")
|
||||
private String orgSid;
|
||||
|
||||
@ApiModelProperty(value = "姓名", required = true)
|
||||
@NotBlank(message = "姓名不能为空")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "身份证号", required = true)
|
||||
@NotBlank(message = "身份证号不能为空")
|
||||
private String idNo;
|
||||
|
||||
@ApiModelProperty(value = "手机号", required = true)
|
||||
@NotBlank(message = "手机号不能为空")
|
||||
private String mobile;
|
||||
|
||||
|
||||
@Valid
|
||||
public ClientAlterRecord toEntity() {
|
||||
ClientAlterRecord clientAlterRecord = new ClientAlterRecord();
|
||||
BeanUtils.copyProperties(this, clientAlterRecord);
|
||||
return clientAlterRecord;
|
||||
}
|
||||
|
||||
@Valid
|
||||
public Map toMap(ClientAlterRecord clientAlterRecord) {
|
||||
BeanUtils.copyProperties(this, clientAlterRecord);
|
||||
Map map = JSON.parseObject(JSON.toJSONString(clientAlterRecord), Map.class);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.yxt.jlzx.jlcyry.api.clientalterrecord;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.query.Query;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/9/3 9:36
|
||||
* @description 证书
|
||||
*/
|
||||
@Data
|
||||
public class ClientAlterRecordQuery implements Query {
|
||||
|
||||
private static final long serialVersionUID = 8572983523382626945L;
|
||||
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "开始日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
|
||||
private Date startDate;
|
||||
|
||||
@ApiModelProperty(value = "结束日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
|
||||
private Date endDate;
|
||||
|
||||
@ApiModelProperty(value = "单位sid" , required = true)
|
||||
@NotBlank(message = "单位sid不能为空")
|
||||
private String orgSid;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.yxt.jlzx.jlcyry.api.clientalterrecord;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/10/9 11:48
|
||||
* @description 人员从业资格情况
|
||||
*/
|
||||
@Data
|
||||
public class ClientAlterRecordVo implements Vo{
|
||||
|
||||
@ApiModelProperty(value = "人员sid")
|
||||
private String staffSid;
|
||||
|
||||
@ApiModelProperty(value = "企业sid")
|
||||
private String orgSid;
|
||||
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private String idNo;
|
||||
|
||||
@ApiModelProperty(value = "手机号")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty(value = "开始日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
|
||||
private Date startDate;
|
||||
|
||||
@ApiModelProperty(value = "结束日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
|
||||
private Date endDate;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.yxt.jlzx.jlcyry.api.datadictionary;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/8/28 13:54
|
||||
* @description 数据字典
|
||||
*/
|
||||
@Data
|
||||
@TableName("dict_common")
|
||||
public class DictCommon extends BaseEntity {
|
||||
private static final long serialVersionUID = 4855229752388226674L;
|
||||
/**
|
||||
* key值,例子:1,2
|
||||
*/
|
||||
private String dictKey;
|
||||
/**
|
||||
* 数据类型,例子:sex
|
||||
*/
|
||||
private String dictType;
|
||||
|
||||
/**
|
||||
* 数据值:例子:男,女
|
||||
*/
|
||||
private String dictValue;
|
||||
/**
|
||||
* sid全路径
|
||||
*/
|
||||
private String sidPath;
|
||||
/**
|
||||
* 上级sid
|
||||
*/
|
||||
private String pSid;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.yxt.jlzx.jlcyry.api.datadictionary;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/9/18 15:08
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class DictCommonVo {
|
||||
|
||||
private String dictKey;
|
||||
private String dictType;
|
||||
private String dictValue;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.yxt.jlzx.jlcyry.api.datadictionary;
|
||||
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/8/28 14:01
|
||||
* @description 数据字典类型
|
||||
*/
|
||||
@Data
|
||||
public class DictType extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
private String dictTypeCode;
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
private String dictTypeName;
|
||||
/**
|
||||
* 类型级别
|
||||
*/
|
||||
private String dictTypeLevel;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.yxt.jlzx.jlcyry.api.education;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/8/27 16:08
|
||||
* @description 教育经历
|
||||
*/
|
||||
@Data
|
||||
@TableName("education")
|
||||
public class Education extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 7663453140604035413L;
|
||||
/**
|
||||
* 毕业院校
|
||||
*/
|
||||
private String schoolName;
|
||||
/**
|
||||
* 专业
|
||||
*/
|
||||
private String speciality;
|
||||
/**
|
||||
* 学习形式(普通全日制、非全日制……)
|
||||
*/
|
||||
private String studyMode;
|
||||
/**
|
||||
* 学习类型(普高、职高、自考、学历文凭、)
|
||||
*/
|
||||
private String studyType;
|
||||
/**
|
||||
* 毕业日期
|
||||
*/
|
||||
private String gradDate;
|
||||
/**
|
||||
* 开始日期
|
||||
*/
|
||||
private String eduStartDate;
|
||||
/**
|
||||
* 学制
|
||||
*/
|
||||
private String studyYears;
|
||||
/**
|
||||
* 文化程度(学历)
|
||||
*/
|
||||
private String cultlevel;
|
||||
/**
|
||||
* 毕业证书编号
|
||||
*/
|
||||
private String diplomaCertNo;
|
||||
/**
|
||||
* 学历证(毕业证)
|
||||
*/
|
||||
private String diploma;
|
||||
/**
|
||||
* 学位
|
||||
*/
|
||||
private String degree;
|
||||
/**
|
||||
* 学位证授予日期
|
||||
*/
|
||||
private String issueDate;
|
||||
|
||||
/**
|
||||
* 学位证书编号
|
||||
*/
|
||||
private String degreeCertNo;
|
||||
/**
|
||||
* 学位证书
|
||||
*/
|
||||
private String degreeCert;
|
||||
/**
|
||||
* 人员sid
|
||||
*/
|
||||
private String staffSid;
|
||||
/**
|
||||
* 学历标识(第一学历、最高学历)
|
||||
*/
|
||||
private String signChar;
|
||||
|
||||
/**
|
||||
* 本科专业门类
|
||||
*/
|
||||
private String bkzyml;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.yxt.jlzx.jlcyry.api.education;
|
||||
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import com.yxt.jlzx.jlcyry.api.certificate.CertificateVo;
|
||||
import com.yxt.jlzx.jlcyry.api.staffinfo.StaffRegisterDto;
|
||||
import com.yxt.jlzx.jlcyry.api.tempeducation.TempEducationVo;
|
||||
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/8/31 8:47
|
||||
* @description 教育经历
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-jlzx-jlcyry-Education",
|
||||
name = "yxt-jlzx-jlcyry",
|
||||
path = "education",
|
||||
fallback = EducationApiFallback.class)
|
||||
public interface EducationApi {
|
||||
|
||||
/**
|
||||
* 分页列表
|
||||
*
|
||||
* @param pagerQuery
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/pagerList")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "分页列表")
|
||||
public ResultBean<PagerVo<Education>> pagerList(PagerQuery pagerQuery);
|
||||
|
||||
/**
|
||||
* 教育经历保存
|
||||
*
|
||||
* @param educationDto 教育经历Dto对象
|
||||
* @return ResultBean
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "教育经历保存")
|
||||
public ResultBean save(@Valid @RequestBody EducationDto educationDto);
|
||||
|
||||
/**
|
||||
* 教育经历修改(@PathVariable是spring3.0的一个新功能:接收请求路径中占位符的值.
|
||||
* 通过 @PathVariable 可以将URL中占位符参数{xxx}绑定到处理器类的方法形参中@PathVariable(“xxx“) )
|
||||
*
|
||||
* @param educationDto 教育经历Dto对象
|
||||
* @param sid 教育经历sid
|
||||
* @return ResultBean
|
||||
*/
|
||||
@PostMapping("/update/{sid}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "教育经历修改")
|
||||
public ResultBean update(@Valid EducationDto educationDto, @ApiParam(value = "教育经历sid", required = true) @PathVariable("sid") String sid);
|
||||
|
||||
/**
|
||||
* 删除教育经历
|
||||
*
|
||||
* @param sid 教育经历sid
|
||||
* @return ResultBean
|
||||
*/
|
||||
@ResponseBody
|
||||
@DeleteMapping("/delete/{sid}")
|
||||
@ApiOperation(value = "删除教育经历")
|
||||
public ResultBean delete(@ApiParam(value = "教育经历sid", required = true) @PathVariable("sid") String sid);
|
||||
|
||||
/**
|
||||
* 通过人员sid查询教育经历
|
||||
*
|
||||
* @param staffSid
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/selectByStaffSid")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "查询该人员的教育经历")
|
||||
public ResultBean<List<EducationVo>> selectByStaffSid(String staffSid);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通过人员sid查询教育经历
|
||||
*
|
||||
* @param staffSid
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getVo")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "教育经历信息")
|
||||
public ResultBean<EducationVo> getVo(String sid);
|
||||
|
||||
/**
|
||||
* 教育信息审核
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/educationInfoUpdate")
|
||||
@ApiOperation(value = "教育经历信息审核")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "state", value = "审核状态", required = true),
|
||||
@ApiImplicitParam(name = "sid", value = "教育经历sid", required = true)
|
||||
})
|
||||
@ResponseBody
|
||||
public ResultBean educationInfoUpdate(@RequestParam("state") Integer state,
|
||||
@RequestParam("sid") String sid);
|
||||
|
||||
|
||||
/**
|
||||
* 初始化人员填报信息页面
|
||||
*
|
||||
* @return ResultBean
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/dictSelect")
|
||||
@ApiOperation(value = "教育信息下拉框初始化")
|
||||
public ResultBean<Map<String, Object>> dictSelect();
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.yxt.jlzx.jlcyry.api.education;
|
||||
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/8/31 8:51
|
||||
* @description 教育经历容错处理
|
||||
*/
|
||||
@Component
|
||||
public class EducationApiFallback implements EducationApi {
|
||||
|
||||
/**
|
||||
* 分页列表
|
||||
*
|
||||
* @param pagerQuery
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ResultBean<PagerVo<Education>> pagerList(PagerQuery pagerQuery) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
/**
|
||||
* 教育经历保存
|
||||
*
|
||||
* @param educationDto 教育经历Dto对象
|
||||
* @return ResultBean
|
||||
*/
|
||||
@Override
|
||||
public ResultBean save(@Valid EducationDto educationDto) {
|
||||
return ResultBean.fireFail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
/**
|
||||
* 教育经历修改(@PathVariable是spring3.0的一个新功能:接收请求路径中占位符的值.
|
||||
* 通过 @PathVariable 可以将URL中占位符参数{xxx}绑定到处理器类的方法形参中@PathVariable(“xxx“) )
|
||||
*
|
||||
* @param educationDto 教育经历Dto对象
|
||||
* @param sid 教育经历sid
|
||||
* @return ResultBean
|
||||
*/
|
||||
@Override
|
||||
public ResultBean update(@Valid EducationDto educationDto, String sid) {
|
||||
return ResultBean.fireFail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除教育经历
|
||||
*
|
||||
* @param sid 教育经历sid
|
||||
* @return ResultBean
|
||||
*/
|
||||
@Override
|
||||
public ResultBean delete(String sid) {
|
||||
return ResultBean.fireFail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过人员sid查询教育经历
|
||||
*
|
||||
* @param staffSid
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ResultBean<List<EducationVo>> selectByStaffSid(String staffSid) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean educationInfoUpdate(Integer state, String educationSid) {
|
||||
// TODO Auto-generated method stub
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<Map<String, Object>> dictSelect() {
|
||||
// TODO Auto-generated method stub
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<EducationVo> getVo(String sid) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.yxt.jlzx.jlcyry.api.education;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/8/31 8:56
|
||||
* @description 教育经历
|
||||
*/
|
||||
@Data
|
||||
public class EducationDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -5720714898653921612L;
|
||||
|
||||
@ApiModelProperty(value = "毕业院校", required = true)
|
||||
@NotBlank(message = "毕业院校不能为空")
|
||||
private String schoolName;
|
||||
@ApiModelProperty(value = "所学专业", required = false)
|
||||
@NotBlank(message = "所学专业不能为空")
|
||||
private String speciality;
|
||||
@ApiModelProperty(value = "学习形式", required = false)
|
||||
@NotBlank(message = "学习形式不能为空")
|
||||
private String studyMode;
|
||||
@ApiModelProperty(value = "学制", required = false)
|
||||
@NotBlank(message = "学制不能为空")
|
||||
private String studyYears;
|
||||
@ApiModelProperty(value = "文化程度", required = false)
|
||||
private String cultlevel;
|
||||
@ApiModelProperty(value = "毕业日期", required = false)
|
||||
@NotBlank(message = "毕业日期不能为空")
|
||||
private String gradDate;
|
||||
@ApiModelProperty(value = "学历标识", required = false)
|
||||
@NotBlank(message = "学历标识不能为空")
|
||||
private String signChar;
|
||||
@ApiModelProperty(value = "学位证授予日期", required = false)
|
||||
private String issueDate;
|
||||
@ApiModelProperty(value = "学位", required = false)
|
||||
@NotBlank(message = "学位不能为空")
|
||||
private String degree;
|
||||
@ApiModelProperty(value = "学位授予门类", required = false)
|
||||
private String bkzyml;
|
||||
@ApiModelProperty(value = "学历证(毕业证)", required = false)
|
||||
@NotBlank(message = "学历证书照片不能为空")
|
||||
private String diploma;
|
||||
@ApiModelProperty(value = "学位证书", required = false)
|
||||
private String degreeCert;
|
||||
@ApiModelProperty(value = "人员sid", required = true)
|
||||
@NotBlank(message = "请指定人员")
|
||||
private String staffSid;
|
||||
|
||||
|
||||
// @ApiModelProperty(value = "学习类型", required = false)
|
||||
// @NotBlank(message = "学习类型不能为空")
|
||||
// private String studyType;
|
||||
// @ApiModelProperty(value = "入学日期", required = false)
|
||||
// @NotBlank(message = "入学日期不能为空")
|
||||
// private String eduStartDate;
|
||||
// @ApiModelProperty(value = "毕业证书编号", required = false)
|
||||
// @NotBlank(message = "毕业证书编号不能为空")
|
||||
// private String diplomaCertNo;
|
||||
// @ApiModelProperty(value = "学位证书编号", required = false)
|
||||
// private String degreeCertNo;
|
||||
|
||||
|
||||
@Valid
|
||||
public Education toEntity() {
|
||||
Education education = new Education();
|
||||
BeanUtils.copyProperties(this, education);
|
||||
return education;
|
||||
}
|
||||
|
||||
@Valid
|
||||
public Map toMap(Education education) {
|
||||
BeanUtils.copyProperties(this, education);
|
||||
Map map = JSON.parseObject(JSON.toJSONString(education), Map.class);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.yxt.jlzx.jlcyry.api.education;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/10/9 11:17
|
||||
* @description 教育经历
|
||||
*/
|
||||
@Data
|
||||
public class EducationVo implements Vo {
|
||||
|
||||
/**
|
||||
* 毕业院校
|
||||
*/
|
||||
@ApiModelProperty(value = "毕业院校")
|
||||
private String schoolName;
|
||||
/**
|
||||
* 所学专业
|
||||
*/
|
||||
@ApiModelProperty(value = "所学专业")
|
||||
private String speciality;
|
||||
/**
|
||||
* 学习形式(普通全日制、非全日制……)
|
||||
*/
|
||||
@ApiModelProperty(value = "学习形式")
|
||||
private String studyMode;
|
||||
/**
|
||||
* 学习类型(普高、职高、自考、学历文凭、)
|
||||
*/
|
||||
@ApiModelProperty(value = "学习类型")
|
||||
private String studyType;
|
||||
/**
|
||||
* 毕业日期
|
||||
*/
|
||||
@ApiModelProperty(value = "毕业日期")
|
||||
private String gradDate;
|
||||
/**
|
||||
* 入学日期
|
||||
*/
|
||||
@ApiModelProperty(value = "入学日期")
|
||||
private String eduStartDate;
|
||||
/**
|
||||
* 学制
|
||||
*/
|
||||
@ApiModelProperty(value = "学制")
|
||||
private String studyYears;
|
||||
/**
|
||||
* 文化程度(学历)
|
||||
*/
|
||||
@ApiModelProperty(value = "学历")
|
||||
private String cultlevel;
|
||||
/**
|
||||
* 毕业证书编号
|
||||
*/
|
||||
@ApiModelProperty(value = "毕业证书编号")
|
||||
private String diplomaCertNo;
|
||||
/**
|
||||
* 学历证(毕业证)
|
||||
*/
|
||||
@ApiModelProperty(value = "学历证书")
|
||||
private String diploma;
|
||||
/**
|
||||
* 学位
|
||||
*/
|
||||
@ApiModelProperty(value = "学位")
|
||||
private String degree;
|
||||
/**
|
||||
* 学位证授予日期
|
||||
*/
|
||||
@ApiModelProperty(value = "学位授予日期")
|
||||
private String issueDate;
|
||||
|
||||
/**
|
||||
* 学位证书编号
|
||||
*/
|
||||
@ApiModelProperty(value = "学位证书编号")
|
||||
private String degreeCertNo;
|
||||
/**
|
||||
* 学位证书
|
||||
*/
|
||||
@ApiModelProperty(value = "学位证书")
|
||||
private String degreeCert;
|
||||
|
||||
@ApiModelProperty(value = "本科专业门类")
|
||||
private String bkzyml;
|
||||
|
||||
@ApiModelProperty(value = "学历sid")
|
||||
private String sid;
|
||||
|
||||
@ApiModelProperty(value = "学历标识")
|
||||
private String signChar;
|
||||
|
||||
@ApiModelProperty(value = "人员sid")
|
||||
private String staffSid;
|
||||
|
||||
@ApiModelProperty(value = "审核状态")
|
||||
private int state;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.yxt.jlzx.jlcyry.api.enterpriseinfo;
|
||||
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2021/4/22 9:33
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class EnterpriseInfo extends BaseEntity {
|
||||
private static final long serialVersionUID = 8465508571090018600L;
|
||||
/**
|
||||
* 单位sid
|
||||
*/
|
||||
private String orgSid;
|
||||
/**
|
||||
* 企业名称
|
||||
*/
|
||||
private String enterpriseName;
|
||||
/**
|
||||
* 注册资本
|
||||
*/
|
||||
private String registeredCapital;
|
||||
/**
|
||||
* 成立日期
|
||||
*/
|
||||
private String establishmentDate;
|
||||
/**
|
||||
* 从业人数
|
||||
*/
|
||||
private int employeesNum;
|
||||
/**
|
||||
* 营业期限
|
||||
*/
|
||||
private String operationsDuration;
|
||||
/**
|
||||
* 主营范围
|
||||
*/
|
||||
private String mainCampRange;
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private String enterpriseType;
|
||||
/**
|
||||
* 发证机关
|
||||
*/
|
||||
private String issueOrg;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.yxt.jlzx.jlcyry.api.enterpriseinfo;
|
||||
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2021/4/22 9:40
|
||||
* @description
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-jlzx-jlcyry-EnterpriseInfo",
|
||||
name = "yxt-jlzx-jlcyry",
|
||||
path = "v1/enterpriseinfos",
|
||||
fallback = EnterpriseInfoApiFallback.class)
|
||||
public interface EnterpriseInfoApi {
|
||||
|
||||
@PostMapping("/selectOrgNameList")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "企业名称下拉选")
|
||||
ResultBean<List<EnterpriseInfoOneVo>> selectOrgNameList(String orgName);
|
||||
|
||||
@PostMapping("/selectOrg/{orgSid}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "根据orgSid查询企业信息")
|
||||
public ResultBean<EnterpriseInfoOneVo> selectOrg(@ApiParam(value = "单位sid", required = true) @PathVariable("orgSid") String orgSid);
|
||||
|
||||
@PostMapping("/save")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "保存企业信息")
|
||||
public ResultBean save(@RequestBody EnterpriseInfoDto enterpriseInfoDto);
|
||||
|
||||
@PostMapping("/getExcelInfo")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "导入单位")
|
||||
public ResultBean getExcelInfo(@RequestParam(value = "fileName") String fileName, @RequestParam(value = "file") MultipartFile file) throws IOException;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.yxt.jlzx.jlcyry.api.enterpriseinfo;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2021/4/22 9:41
|
||||
* @description
|
||||
*/
|
||||
@Component
|
||||
public class EnterpriseInfoApiFallback {
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.yxt.jlzx.jlcyry.api.enterpriseinfo;
|
||||
|
||||
import com.yxt.common.core.dto.Dto;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2021/4/26 17:47
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class EnterpriseInfoDto implements Dto {
|
||||
private static final long serialVersionUID = -7814192611955135979L;
|
||||
|
||||
@ApiModelProperty(value = "单位sid")
|
||||
private String orgSid;
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
private String enterpriseName;
|
||||
@ApiModelProperty(value = "注册资本")
|
||||
private String registeredCapital;
|
||||
@ApiModelProperty(value = "成立日期")
|
||||
private String establishmentDate;
|
||||
@ApiModelProperty(value = "从业人数")
|
||||
private int employeesNum;
|
||||
@ApiModelProperty(value = "主营范围")
|
||||
private String mainCampRange;
|
||||
@ApiModelProperty(value = "类型")
|
||||
private String enterpriseType;
|
||||
@ApiModelProperty(value = "发证机关")
|
||||
private String issueOrg;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.yxt.jlzx.jlcyry.api.enterpriseinfo;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2021/4/22 10:01
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class EnterpriseInfoOneVo implements Vo {
|
||||
private static final long serialVersionUID = -8473075248764055179L;
|
||||
@ApiModelProperty(value = "单位sid")
|
||||
private String orgSid;
|
||||
@ApiModelProperty(value = "单位名称")
|
||||
private String orgName;
|
||||
@ApiModelProperty(value = "统一信用代码")
|
||||
private String orgCode;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.yxt.jlzx.jlcyry.api.enterpriseinfo;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2021/4/22 9:42
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class EnterpriseInfoVo implements Vo {
|
||||
private static final long serialVersionUID = 2376461641444410273L;
|
||||
@ApiModelProperty(value = "单位sid")
|
||||
private String orgSid;
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
private String enterpriseName;
|
||||
@ApiModelProperty(value = "注册资本")
|
||||
private String registeredCapital;
|
||||
@ApiModelProperty(value = "成立日期")
|
||||
private String establishmentDate;
|
||||
@ApiModelProperty(value = "从业人数")
|
||||
private int employeesNum;
|
||||
@ApiModelProperty(value = "营业期限")
|
||||
private String operationsDuration;
|
||||
@ApiModelProperty(value = "主营范围")
|
||||
private String mainCampRange;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private String enterpriseType;
|
||||
/**
|
||||
* 发证机关
|
||||
*/
|
||||
private String issueOrg;
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.yxt.jlzx.jlcyry.api.expertPostInfo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/8/27 16:18
|
||||
* @description 专家任职情况
|
||||
*/
|
||||
@Data
|
||||
@TableName("expert_post_info")
|
||||
public class ExpertPostInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = -6466981220806251105L;
|
||||
/**
|
||||
* 任职机构
|
||||
|
||||
*/
|
||||
private String ownerOrg;
|
||||
/**
|
||||
* 职务
|
||||
|
||||
*/
|
||||
private String post;
|
||||
/**
|
||||
* 专业类别
|
||||
*/
|
||||
private String subject;
|
||||
|
||||
private String fzjg;
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private String certNo;
|
||||
/**
|
||||
* 发证单位
|
||||
*/
|
||||
private String issueOrg;
|
||||
/**
|
||||
* 起始日期
|
||||
*/
|
||||
private String dateStart;
|
||||
/**
|
||||
* 有效期止
|
||||
*/
|
||||
private String dateEnd;
|
||||
/**
|
||||
* staffSid 属于 专业技术资格
|
||||
*/
|
||||
private String staffSid;
|
||||
|
||||
/**
|
||||
* staffSid 证书图片
|
||||
*/
|
||||
private String certUrl;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.yxt.jlzx.jlcyry.api.expertPostInfo;
|
||||
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/8/31 8:47
|
||||
* @description 教育经历
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-jlzx-jlcyry-ExpertPostInfo",
|
||||
name = "yxt-jlzx-jlcyry",
|
||||
path = "expertPostInfo",
|
||||
fallback = ExpertPostInfoApiFallback.class)
|
||||
public interface ExpertPostInfoApi {
|
||||
|
||||
|
||||
/**
|
||||
* 专家任职情况保存
|
||||
*
|
||||
* @param educationDto 专家任职情况Dto对象
|
||||
* @return ResultBean
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "专家任职情况保存")
|
||||
public ResultBean save(@Valid @RequestBody ExpertPostInfoDto expertPostInfoDto);
|
||||
|
||||
@PostMapping("/update/{sid}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "专家任职情况修改")
|
||||
public ResultBean update(@Valid ExpertPostInfoDto expertPostInfoDto, @ApiParam(value = "教育经历sid", required = true) @PathVariable("sid") String sid);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除专家任职情况
|
||||
*
|
||||
* @param sid 专家任职情况sid
|
||||
* @return ResultBean
|
||||
*/
|
||||
@ResponseBody
|
||||
@DeleteMapping("/delete/{sid}")
|
||||
@ApiOperation(value = "删除专家任职情况")
|
||||
public ResultBean delete(@ApiParam(value = "专家任职情况sid", required = true) @PathVariable("sid") String sid);
|
||||
|
||||
/**
|
||||
* 通过人员sid查询专家任职情况
|
||||
*
|
||||
* @param staffSid
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/selectByStaffSid")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "查询该人员的专家任职情况")
|
||||
public ResultBean<List<ExpertPostInfoVo>> selectByStaffSid(String staffSid);
|
||||
|
||||
/**
|
||||
* 教育信息审核
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/infoUpdate")
|
||||
@ApiOperation(value = "专家任职情况审核")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "state", value = "审核状态", required = true),
|
||||
@ApiImplicitParam(name = "sid", value = "专家任职情况sid", required = true)
|
||||
})
|
||||
@ResponseBody
|
||||
public ResultBean infoUpdate(@RequestParam("state") Integer state,@RequestParam("sid") String sid);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通过人员sid查询教育经历
|
||||
*
|
||||
* @param staffSid
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getVo")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "专家任职情况信息")
|
||||
public ResultBean<ExpertPostInfoVo> getVo(String sid);
|
||||
|
||||
@ResponseBody
|
||||
@GetMapping("/dictSelect")
|
||||
@ApiOperation(value = "专家任职情况下拉框初始化")
|
||||
ResultBean<Map<String, Object>> dictSelect();
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.yxt.jlzx.jlcyry.api.expertPostInfo;
|
||||
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/8/31 8:51
|
||||
* @description 教育经历容错处理
|
||||
*/
|
||||
@Component
|
||||
public class ExpertPostInfoApiFallback implements ExpertPostInfoApi {
|
||||
|
||||
@Override
|
||||
public ResultBean save(@Valid ExpertPostInfoDto expertPostInfoDto) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean update(@Valid ExpertPostInfoDto expertPostInfoDto, String sid) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean delete(String sid) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<ExpertPostInfoVo>> selectByStaffSid(String staffSid) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean infoUpdate(Integer state, String sid) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<ExpertPostInfoVo> getVo(String sid) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<Map<String, Object>> dictSelect() {
|
||||
// TODO Auto-generated method stub
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.yxt.jlzx.jlcyry.api.expertPostInfo;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/8/31 8:56
|
||||
* @description 教育经历
|
||||
*/
|
||||
@Data
|
||||
public class ExpertPostInfoDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -1152019208376318796L;
|
||||
|
||||
@ApiModelProperty(value = "任职机构", required = true)
|
||||
@NotBlank(message = "任职机构不能为空")
|
||||
private String ownerOrg;
|
||||
@ApiModelProperty(value = "职务", required = true)
|
||||
@NotBlank(message = "职务不能为空")
|
||||
private String post;
|
||||
@ApiModelProperty(value = "专业类别", required = true)
|
||||
@NotBlank(message = "专业类别不能为空")
|
||||
private String subject;
|
||||
@ApiModelProperty(value = "发证单位", required = true)
|
||||
@NotBlank(message = "发证单位不能为空")
|
||||
private String issueOrg;
|
||||
@ApiModelProperty(value = "分支机构", required = true)
|
||||
@NotBlank(message = "分支机构不能为空")
|
||||
private String fzjg;
|
||||
@ApiModelProperty(value = "有效期至", required = true)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd", iso = DateTimeFormat.ISO.DATE_TIME)
|
||||
@NotBlank(message = "有效期至不能为空")
|
||||
private String dateEnd;
|
||||
@ApiModelProperty(value = "起始日期", required = true)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd", iso = DateTimeFormat.ISO.DATE_TIME)
|
||||
@NotBlank(message = "发证单位不能为空")
|
||||
private String dateStart;
|
||||
@ApiModelProperty(value = "证书照片", required = true)
|
||||
@NotBlank(message = "证书照片不能为空")
|
||||
private String certUrl;
|
||||
@ApiModelProperty(value = "人员sid", required = true)
|
||||
@NotBlank(message = "请指定人员")
|
||||
private String staffSid;
|
||||
|
||||
// @ApiModelProperty(value = "编号", required = true)
|
||||
// @NotBlank(message = "编号不能为空")
|
||||
// private String certNo;
|
||||
|
||||
@Valid
|
||||
public ExpertPostInfo toEntity() {
|
||||
ExpertPostInfo expertPostInfo = new ExpertPostInfo();
|
||||
BeanUtils.copyProperties(this, expertPostInfo);
|
||||
return expertPostInfo;
|
||||
}
|
||||
|
||||
@Valid
|
||||
public Map toMap(ExpertPostInfo expertPostInfo) {
|
||||
BeanUtils.copyProperties(this, expertPostInfo);
|
||||
Map map = JSON.parseObject(JSON.toJSONString(expertPostInfo), Map.class);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.yxt.jlzx.jlcyry.api.expertPostInfo;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/10/9 18:02
|
||||
* @description 专家任职情况
|
||||
*/
|
||||
@Data
|
||||
public class ExpertPostInfoVo implements Vo{
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@ApiModelProperty(value = "任职机构")
|
||||
private String ownerOrg;
|
||||
/**
|
||||
* 专业技术系列
|
||||
*/
|
||||
@ApiModelProperty(value = "职务")
|
||||
private String post;
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
@ApiModelProperty(value = "专业类别")
|
||||
private String subject;
|
||||
|
||||
@ApiModelProperty(value = "分支机构")
|
||||
private String fzjg;
|
||||
/**
|
||||
* 资格名称(高级工程师、中级工程师等)
|
||||
*/
|
||||
@ApiModelProperty(value = "编号")
|
||||
private String certNo;
|
||||
/**
|
||||
* 发证单位
|
||||
*/
|
||||
@ApiModelProperty(value = "发证单位")
|
||||
private String issueOrg;
|
||||
/**
|
||||
* 授予时间
|
||||
*/
|
||||
@ApiModelProperty(value = "起止日期")
|
||||
private String dateStart;
|
||||
/**
|
||||
* 有效期至
|
||||
*/
|
||||
@ApiModelProperty(value = "有效期止")
|
||||
private String dateEnd;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "人员sid")
|
||||
private String staffSid;
|
||||
|
||||
@ApiModelProperty(value = "sid")
|
||||
private String sid;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "审核状态")
|
||||
private int state;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "证书图片")
|
||||
private String certUrl;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.yxt.jlzx.jlcyry.api.organizationlabel;
|
||||
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2021/9/15 10:16
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
public class OrganizationLabel extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "单位sid")
|
||||
private String orgSid;
|
||||
@ApiModelProperty(value = "标签的类别key")
|
||||
private String labelKey;
|
||||
}
|
||||