chore: import verified syly2 maintenance baseline without embedded credentials

This commit is contained in:
Ethan
2026-10-29 22:22:49 +08:00
commit da8224efd8
5265 changed files with 1199963 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
.DS_Store
.idea/
.settings/
.classpath
.project
target/
.local/
runtime/
secrets/
*.log
*.war
*.class
*.pyc
__pycache__/
*.bak
*.lastUpdated
_remote.repositories
*.pem
*.key
*.p12
*.pfx
.env
.env.*
!.env.example
**/sanya_ch*.sql
config/*.local.properties
# Historical mobile release binaries are distributed separately.
*.apk
*.ipa
+17
View File
@@ -0,0 +1,17 @@
[extend]
useDefault = true
[allowlist]
description = "Reviewed false positives: inventory SHA-256, PEM serialization code, public login userKey"
condition = "AND"
paths = [
'^docs/evidence/original-source-manifest\.json$',
'^src/main/webapp/plug-in/jsencrypt/jsencrypt\.min\.js$',
'^src/main/java/com/zzc/app/login/UserLoginController\.java$',
]
regexTarget = "match"
regexes = [
'["\s:]+[0-9a-f]{64}',
'getPrivateBaseKeyB64\(\)',
'key = "[0-9a-f]{32}"',
]
+33
View File
@@ -0,0 +1,33 @@
# 三亚旅游统计管理系统 syly2
本仓库从 2026-10-29 交接包的**外层 Maven 工程**建立维护基线。原始清单的 5,302 个文件已逐一核验 SHA-256,与当天成功构建和 UAT 部署的源文件一致。
入库版本包含已验证的三处 Java 8/Linux 编译兼容修正:POM 使用平台路径分隔符,两个统计 Controller 删除未使用的 JDK 内部类导入。数据库备份、历史 target、内层重复工程及真实凭据不进入仓库。
## 构建
需要 JDK 8、Maven 3.9.11。原工程包含 6 个中央仓库缺失的旧组件,脚本将交接 JAR 安装到项目专用 Maven 仓库,再编译 WAR:
```sh
export JAVA_HOME=/absolute/path/to/jdk8
export PATH="$JAVA_HOME/bin:$PATH"
bash scripts/build.sh
```
可通过 `MVN=/absolute/path/to/mvn` 指定 Maven,通过 `MAVEN_REPO_LOCAL=/absolute/path/to/repository` 指定依赖缓存。输出为 `target/syly.war`。脚本显式跳过原有测试编译和执行;这些历史测试含外部系统访问,不能作为离线单元测试运行。`src/main/com` 沿用原 POM,不属于主编译源码根。
## 部署配置与密钥
入库前移出了数据库、邮件、短信及诊断工具中的硬编码凭据,RSA 私钥和 AES 密钥改由 `RuntimeSecrets` 读取。配置模板位于 `config/secrets.example.properties`,支持同名环境变量,或 `SYLY_SECRETS_FILE` / JVM 参数 `-Dsyly.secrets.file=/absolute/private/path` 指向的私有 properties 文件。环境变量优先;必需密钥缺失时明确报错,不自动生成替代密钥。
**历史数据必须使用原 AES 密钥;当前前端公钥要求原 RSA 私钥配对。** 这些值从原交接配置经私有渠道取得,本次没有轮换密钥。私有配置应保存在仓库和 WAR 外,限制为运行用户可读。邮件、短信为空时须继续禁用相关外部任务。
`src/main/resources/dbconfig.properties`、`sysConfig.properties` 与 `zzc/zzc_database.properties` 是去除凭据的配置基线;部署前在运行副本中配置实际数据库/邮件连接。默认外部接口指向本地禁用地址。Druid 监控 Servlet 按此前 UAT 的做法移除。
`ops/uat-build`、`ops/uat-deploy` 保存**此前 UAT 的操作脚本与说明**,含当次路径和原始产物哈希检查。它们是历史复现资料,不是当前仓库 WAR 的直接发布命令。现有 UAT 未被本次入库操作更新。
## 验证范围
见 [验证记录](docs/VERIFICATION.md) 和 `docs/evidence/`。此前 UAT 已通过编译、部署、登录及基础页面检查,但仍存在旧 JavaScript 报错和菜单内嵌页面切换问题;全量报表、业务填报、附件及省级接口尚未验收。
入库时 UAT 网络不可达,因此对凭据移出后的版本执行本地 Java 8 编译和离线加解密兼容检查,不能将此前 UAT 运行结果视为当前提交的完整运行验收。
+15
View File
@@ -0,0 +1,15 @@
# Copy outside the checkout/WAR; restrict permissions to the runtime user.
# Set SYLY_SECRETS_FILE or -Dsyly.secrets.file=/absolute/private/path.
# Preserve the existing keys for historical data and the existing RSA public key.
SYLY_AES_KEY=
SYLY_RSA_PRIVATE_KEY=
SYLY_MAIL_HOST=
SYLY_MAIL_SENDER=
SYLY_MAIL_USER=
SYLY_MAIL_PASSWORD=
SYLY_SMS_ACCOUNT=
SYLY_SMS_PASSWORD=
# Optional manual diagnostic utilities only:
SYLY_LDAP_TEST_PASSWORD=
SYLY_TEST_DB_PASSWORD=
SYLY_TEST_API_KEY=
+38
View File
@@ -0,0 +1,38 @@
# 入库验证记录
日期:2026-10-29,北京时间。
## 源码来源与此前 UAT
交接包外层 `pom.xml`、`src`、`jar` 共 5,302 个文件,入库前逐文件 SHA-256 与原构建清单一致。清单见 `evidence/original-source-manifest.json`。未采用内层重复工程或历史 target。
此前 UAT 使用 Corretto 8.512.09.1、Maven 3.9.11,在 16:46 完成主工程构建;949 个应用 class、145 个 JAR。原 WAR SHA-256 为 `7c1e4236d32f2d2106df738d2523f08588d73eab7f70089382e3ae5e7c827e76`。原始验证摘要保存在 `evidence/uat-build-20261029.json`。
当天后续 UAT 部署记录显示:登录、用户查询、酒店基本信息直接页面可用,12 项 HTTP 检查通过。浏览器记录见 `evidence/uat-browser-20261029.json`,HTTP 记录见 `evidence/uat-http-20261029.json`。旧脚本报错和酒店菜单内嵌页面切换问题尚未解决;业务填报、审核、全量报表、附件和真实外部接口不属于已完成验收。
## 入库调整
- 应用此前验证的三处编译兼容修正,保留业务算法。
- 配置文件去除数据库和邮件凭据;默认外部接口设置为本地禁用地址。
- RSA 私钥、AES 密钥和邮件/短信等硬编码凭据迁至部署环境或私有 properties 文件;移除源码中的示例生产密文和注释内凭据,历史测试 API 密钥改为私有配置。没有轮换现有密钥。
- 按已验证 UAT 的做法移除含硬编码口令的 Druid 监控 Servlet。
- 排除备份配置、Maven 缓存元数据、重复依赖 ZIP、学习资料 APK/DOC 及历史 iOS 安装包;保留应用所需的原始 JAR、前端资源和报表模板。
- 添加独立构建入口、配置模板与离线验证工具。`ops/` 保存原始 UAT 脚本,不代表本次执行过部署。
## 本地验证
入库期间 UAT 网络不可达。本轮未连接数据库、未启动应用、未替换现有 UAT 服务。
使用本机 Zulu JDK 1.8.0_412(macOS ARM64)和 Maven 3.9.11,执行 `bash scripts/build.sh`:`clean package` 成功。Maven 官方发行包已核验 SHA-512;6 个旧组件均从交接包原 JAR 注册到项目专用仓库。依赖缓存与构建产物不入库。
`scripts/verify-artifact.py` 检查 WAR CRC、登录/认证/酒店月报/密钥读取关键条目、Java 字节码版本、打包配置和 Druid 删除情况。结果为 950 个应用 class(新增 `RuntimeSecrets`)、major 52、145 个 JAR。产物摘要见 `evidence/local-build-20261029.json`。
`scripts/verify-secrets.sh` 使用原交接密钥在仅内存的进程环境中执行离线检查,不读取业务数据、不输出密钥:必需密钥缺失时报错、可选项为空、私有文件读取与环境变量优先级、AES 带前缀及无前缀密文兼容、空值及明文兼容、RSA 公私钥配对和独立解密均通过。仅加解密自检不构成登录或业务运行验收。
原 Maven 测试编译与执行显式跳过;没有声称历史集成测试通过。旧编译器参数和未固定插件版本仍有警告。本地验证不能替代 Linux/UAT 对当前入库版本的运行回归。
## 提交检查
Gitleaks 8.24.2 对暂存区完整扫描通过(约 50.6 MB 文本)。已核对并限定放行三类误报:源码文件 SHA-256、JSEncrypt 构造 PEM 文本的序列化代码、与登录表单相同的公开 userKey 字段;规则见 `.gitleaks.toml`。真实测试 API 密钥已移出。数据库密码、RSA 私钥和 AES 密钥的原值检索未发现残留。文件范围检查确认未暂存备份、运行目录、私钥文件、WAR 或移动端安装包。
`evidence/source-import-20261029.json` 记录相对原始清单的文件变化与排除项。现有原始交接目录保持不变。
+26
View File
@@ -0,0 +1,26 @@
{
"war_sha256": "233f5aa8ee8830af680542cd6afa6a289e210a05e68882abdac55b413d763a2c",
"war_bytes": 111225398,
"zip_crc_check": "passed",
"compiled_class_files": 950,
"class_major_versions": {
"52": 950
},
"bundled_jars": 145,
"required_entries_present": [
"WEB-INF/web.xml",
"WEB-INF/classes/com/zzc/web/system/controller/core/LoginController.class",
"WEB-INF/classes/com/zzc/core/interceptors/AuthInterceptor.class",
"WEB-INF/classes/com/zzc/web/htoal/controller/HotelMonthlyController.class",
"WEB-INF/classes/com/zzc/core/util/RuntimeSecrets.class"
],
"packaged_credential_checks": "passed",
"build_success": true,
"built_at": "2026-10-29T22:21:09+08:00",
"elapsed": "15.632 s",
"java": "Zulu 1.8.0_412, macOS ARM64",
"maven": "3.9.11",
"legacy_maven_tests_skipped": true,
"offline_crypto_and_configuration_checks": "passed",
"uat_retested": false
}
File diff suppressed because it is too large Load Diff
+158
View File
@@ -0,0 +1,158 @@
{
"original_file_count": 5302,
"modified_files": [
{
"path": "pom.xml",
"original_sha256": "c543015b9ff6c46aaf5c3333b0e490b13522ff8044fb12183b66510480a59d5c",
"repository_sha256": "c863b482e41709817c6991eb6279a8504158b14508c0d1cab542b2387b5f64dd"
},
{
"path": "src/main/java/com/zzc/core/util/DynamicDBUtil.java",
"original_sha256": "73555c1b4aae3797f10cdd82ce743a6cccec53c84d16d36efe9b4d3d5c45c0ef",
"repository_sha256": "41222a2121a86a958eb07975a79498582f1628f089c1282e047409870b46e1a0"
},
{
"path": "src/main/java/com/zzc/core/util/EncryptionUtil.java",
"original_sha256": "1e47419bb10dae56279c50b6bcaaaf36c783ca6fa2da25169f0afe0bac237f25",
"repository_sha256": "2d3edebed0f9ce1a9e6acad9e86bf36dcbcb09bad2e2f90a5ecc92c4bae6c2c5"
},
{
"path": "src/main/java/com/zzc/core/util/LdapUtil.java",
"original_sha256": "614ac8e29ce9bf404398eb3c01b8b2e8a119ea24fa80f58e54c0f8794f7819d2",
"repository_sha256": "d8bebba9f289738999458b041af9b09e4b6222bb15a5e6683e6d70c1dd3d3178"
},
{
"path": "src/main/java/com/zzc/core/util/RsaUtils.java",
"original_sha256": "68587c598fd8a0c39b99ec872d164ab7f4c6330dbac1009ec472af7f16bab513",
"repository_sha256": "853e50db1dc1eb2e408237a5636a1eb7dbeaebe6a6378dd7571e314921478e15"
},
{
"path": "src/main/java/com/zzc/core/util/SendMailUtil.java",
"original_sha256": "4c74c91255cdbe31ccd81ba5093596ac6fa4ba0a5ce0665460e9d68974db5b94",
"repository_sha256": "82927a958302c624dcb3cf8939d44f998f4750151e6706ea6b5fe287a8f02748"
},
{
"path": "src/main/java/com/zzc/web/htoal/controller/HotelQuarterStatisticController.java",
"original_sha256": "e5b575b67d3657bf768aa61103e6eb78b7283072bdd03ec2d751b4cdf7d8e91d",
"repository_sha256": "bee7dcc280c4eb58ead7652723d9cfc6be837bca04f259bdd102994b8a76c350"
},
{
"path": "src/main/java/com/zzc/web/out/OutController.java",
"original_sha256": "4b1c134af74c3538afa9ae91dc2095067b297f5a9b29621b2ec99d06915aa9c8",
"repository_sha256": "b9129884777b046a09dda24029cdddc61132a0b68bef5b7b7e2e46edc3ceb1d4"
},
{
"path": "src/main/java/com/zzc/web/sms/util/Constants.java",
"original_sha256": "fb9e04b8d9b126bd06444ef15f98ffaf5b7f2f6ba8dde3b734a55de64048d005",
"repository_sha256": "c2564ae9f926d4a61845147a336d1ac16523c394f97ec0cb9668ab5719d087a5"
},
{
"path": "src/main/java/com/zzc/web/sms/util/webservice/XmlConstant.java",
"original_sha256": "bd65b814b4425b302fc2ddfe06915401fde51d62a9e3914429f5ea05524a7392",
"repository_sha256": "93fa9aaae116073d88f5bc03780db0483b51b8e444831f489bee8342cf0db00f"
},
{
"path": "src/main/java/com/zzc/web/travel/controller/InlandStatisticPageController.java",
"original_sha256": "ea8edbe597dd592a9c23f13dd381bb7ea98631e76812ad92b232bbd96db9c6bc",
"repository_sha256": "4446a2331961e81a50582c895ed9459167c9cfb306b5dd908b6aaccc098b732f"
},
{
"path": "src/main/resources/dbconfig.properties",
"original_sha256": "ae964ae0c76efa1015700d596e377c523f1259ff97a119daea28b799051f690f",
"repository_sha256": "9bfda80e7760cb2841e24832ceb7406ff564eebc2e1d4d51ee19e359063809de"
},
{
"path": "src/main/resources/sysConfig.properties",
"original_sha256": "b1c7d6d231207adcbabdbdfb06063a3723e507913636b30826719d971ef5cc9f",
"repository_sha256": "a5ec3d348e02af2942e7a5ff35ef80377c4851dbcd48d8ca71df78c17c97edf2"
},
{
"path": "src/main/resources/zzc/zzc_database.properties",
"original_sha256": "061517eff0882a48809d2017137b8ebf5b4dcda31221dd2aeca1f49d08639099",
"repository_sha256": "4b6bfb150d060c1a4e3f1af17fe9aabd1f1e956a97e0fe85ff73f7fdc348ecd5"
},
{
"path": "src/main/webapp/WEB-INF/web.xml",
"original_sha256": "6b730d22f0d440d68c7d55327b0bfcc97390aabe5d28e46f953205d17d2bbf84",
"repository_sha256": "7f1a87a61c27cbd6bddcf085facb39753f4020036da898517885ffb963e79405"
},
{
"path": "src/test/java/com/zzc/test/Testurl.java",
"original_sha256": "92c69bb090001569fec40d9de2f725cfe3b0ef4adcc47712105efd8eca91a127",
"repository_sha256": "4aeb7680c4635debe150f8ead864c3ebb079dc1430491817096e4a72f22bcb89"
}
],
"excluded_files": [
"jar/ckfinder.zip",
"jar/ckfinder/ckfinder/CKFinder-updateByAlexander/2.4/CKFinder-updateByAlexander-2.4.jar.lastUpdated",
"jar/ckfinder/ckfinder/CKFinder-updateByAlexander/2.4/CKFinder-updateByAlexander-2.4.jar.md5",
"jar/ckfinder/ckfinder/CKFinder-updateByAlexander/2.4/CKFinder-updateByAlexander-2.4.jar.sha1",
"jar/ckfinder/ckfinder/CKFinder-updateByAlexander/2.4/CKFinder-updateByAlexander-2.4.pom.lastUpdated",
"jar/ckfinder/ckfinder/CKFinder-updateByAlexander/2.4/CKFinder-updateByAlexander-2.4.pom.md5",
"jar/ckfinder/ckfinder/CKFinder-updateByAlexander/2.4/CKFinder-updateByAlexander-2.4.pom.sha1",
"jar/ckfinder/ckfinder/CKFinder-updateByAlexander/2.4/_remote.repositories",
"jar/ckfinder/ckfinder/CKFinderPlugin-FileEditor/2.3/_remote.repositories",
"jar/ckfinder/ckfinder/CKFinderPlugin-FileEditor/2.3/ckfinderplugin-fileeditor-2.3.jar.lastUpdated",
"jar/ckfinder/ckfinder/CKFinderPlugin-FileEditor/2.3/ckfinderplugin-fileeditor-2.3.jar.md5",
"jar/ckfinder/ckfinder/CKFinderPlugin-FileEditor/2.3/ckfinderplugin-fileeditor-2.3.jar.sha1",
"jar/ckfinder/ckfinder/CKFinderPlugin-FileEditor/2.3/ckfinderplugin-fileeditor-2.3.pom.lastUpdated",
"jar/ckfinder/ckfinder/CKFinderPlugin-FileEditor/2.3/ckfinderplugin-fileeditor-2.3.pom.md5",
"jar/ckfinder/ckfinder/CKFinderPlugin-FileEditor/2.3/ckfinderplugin-fileeditor-2.3.pom.sha1",
"jar/ckfinder/ckfinder/CKFinderPlugin-FileEditor/2.4/CKFinderPlugin-FileEditor-2.4.jar.lastUpdated",
"jar/ckfinder/ckfinder/CKFinderPlugin-FileEditor/2.4/CKFinderPlugin-FileEditor-2.4.jar.md5",
"jar/ckfinder/ckfinder/CKFinderPlugin-FileEditor/2.4/CKFinderPlugin-FileEditor-2.4.jar.sha1",
"jar/ckfinder/ckfinder/CKFinderPlugin-FileEditor/2.4/CKFinderPlugin-FileEditor-2.4.pom.md5",
"jar/ckfinder/ckfinder/CKFinderPlugin-FileEditor/2.4/CKFinderPlugin-FileEditor-2.4.pom.sha1",
"jar/ckfinder/ckfinder/CKFinderPlugin-FileEditor/2.4/_remote.repositories",
"jar/ckfinder/ckfinder/CKFinderPlugin-ImageResize/2.3/_remote.repositories",
"jar/ckfinder/ckfinder/CKFinderPlugin-ImageResize/2.3/ckfinderplugin-imageresize-2.3.jar.lastUpdated",
"jar/ckfinder/ckfinder/CKFinderPlugin-ImageResize/2.3/ckfinderplugin-imageresize-2.3.jar.md5",
"jar/ckfinder/ckfinder/CKFinderPlugin-ImageResize/2.3/ckfinderplugin-imageresize-2.3.jar.sha1",
"jar/ckfinder/ckfinder/CKFinderPlugin-ImageResize/2.3/ckfinderplugin-imageresize-2.3.pom.lastUpdated",
"jar/ckfinder/ckfinder/CKFinderPlugin-ImageResize/2.3/ckfinderplugin-imageresize-2.3.pom.md5",
"jar/ckfinder/ckfinder/CKFinderPlugin-ImageResize/2.3/ckfinderplugin-imageresize-2.3.pom.sha1",
"jar/ckfinder/ckfinder/CKFinderPlugin-ImageResize/2.4/CKFinderPlugin-ImageResize-2.4.jar.lastUpdated",
"jar/ckfinder/ckfinder/CKFinderPlugin-ImageResize/2.4/CKFinderPlugin-ImageResize-2.4.jar.md5",
"jar/ckfinder/ckfinder/CKFinderPlugin-ImageResize/2.4/CKFinderPlugin-ImageResize-2.4.jar.sha1",
"jar/ckfinder/ckfinder/CKFinderPlugin-ImageResize/2.4/CKFinderPlugin-ImageResize-2.4.pom.md5",
"jar/ckfinder/ckfinder/CKFinderPlugin-ImageResize/2.4/CKFinderPlugin-ImageResize-2.4.pom.sha1",
"jar/ckfinder/ckfinder/CKFinderPlugin-ImageResize/2.4/_remote.repositories",
"jar/ckfinder/ckfinder/CKFinderPlugin-Watermark/2.4/CKFinderPlugin-Watermark-2.4.jar.lastUpdated",
"jar/ckfinder/ckfinder/CKFinderPlugin-Watermark/2.4/CKFinderPlugin-Watermark-2.4.jar.md5",
"jar/ckfinder/ckfinder/CKFinderPlugin-Watermark/2.4/CKFinderPlugin-Watermark-2.4.jar.sha1",
"jar/ckfinder/ckfinder/CKFinderPlugin-Watermark/2.4/CKFinderPlugin-Watermark-2.4.pom.md5",
"jar/ckfinder/ckfinder/CKFinderPlugin-Watermark/2.4/CKFinderPlugin-Watermark-2.4.pom.sha1",
"jar/ckfinder/ckfinder/CKFinderPlugin-Watermark/2.4/_remote.repositories",
"jar/ckfinder/ckfinder/apache-ant-zip/2.3/_remote.repositories",
"jar/ckfinder/ckfinder/apache-ant-zip/2.3/apache-ant-zip-2.3.jar.lastUpdated",
"jar/ckfinder/ckfinder/apache-ant-zip/2.3/apache-ant-zip-2.3.jar.md5",
"jar/ckfinder/ckfinder/apache-ant-zip/2.3/apache-ant-zip-2.3.jar.sha1",
"jar/ckfinder/ckfinder/apache-ant-zip/2.3/apache-ant-zip-2.3.pom.lastUpdated",
"jar/ckfinder/ckfinder/apache-ant-zip/2.3/apache-ant-zip-2.3.pom.md5",
"jar/ckfinder/ckfinder/apache-ant-zip/2.3/apache-ant-zip-2.3.pom.sha1",
"jar/ckfinder/ckfinder/apache-ant-zip/2.4/apache-ant-zip-2.4.jar.lastUpdated",
"jar/ckfinder/ckfinder/apache-ant-zip/2.4/apache-ant-zip-2.4.pom.lastUpdated",
"jar/ckfinder/ckfinder/ckfinder/2.3/_remote.repositories",
"jar/ckfinder/ckfinder/ckfinder/2.3/ckfinder-2.3.jar.lastUpdated",
"jar/ckfinder/ckfinder/ckfinder/2.3/ckfinder-2.3.jar.md5",
"jar/ckfinder/ckfinder/ckfinder/2.3/ckfinder-2.3.jar.sha1",
"jar/ckfinder/ckfinder/ckfinder/2.3/ckfinder-2.3.pom.lastUpdated",
"jar/ckfinder/ckfinder/ckfinder/2.3/ckfinder-2.3.pom.md5",
"jar/ckfinder/ckfinder/ckfinder/2.3/ckfinder-2.3.pom.sha1",
"jar/ckfinder/ckfinder/ckfinder/2.4/ckfinder-2.4.jar.lastUpdated",
"jar/ckfinder/ckfinder/ckfinder/2.4/ckfinder-2.4.pom.lastUpdated",
"jar/ojdbc14.zip",
"jar/ojdbc14/ojdbc14/10.2.0.4.0/_remote.repositories",
"jar/ojdbc14/ojdbc14/10.2.0.4.0/ojdbc14-10.2.0.4.0.jar.lastUpdated",
"jar/ojdbc14/ojdbc14/10.2.0.4.0/ojdbc14-10.2.0.4.0.pom.md5",
"jar/ojdbc14/ojdbc14/10.2.0.4.0/ojdbc14-10.2.0.4.0.pom.sha1",
"src/main/java/com/zzc/app/study/study.doc",
"src/main/java/com/zzc/app/study/涓変簹鏃呮父.apk",
"src/main/resources/zzc/zzc_database.properties.bak",
"src/main/webapp/css/login/images/sanya_logo.png.bak",
"src/main/webapp/plug-in/login/js/login.js.bak",
"src/main/webapp/webpage/appservice/download/SanYaTourism.ipa",
"src/main/webapp/webpage/common/upload/404.jsp.bak",
"src/main/webapp/webpage/main/ace_main.jsp.bak"
]
}
+15
View File
@@ -0,0 +1,15 @@
{
"url": "https://192.168.68.223:8445/syly/loginController.do?login",
"directHttpsLogin": true,
"account": "uat_admin",
"userListSearchPassed": true,
"hotelDirectPagePassed": true,
"hotelListTotal": 395,
"menuFrameRefreshNeedsReview": true,
"legacyJavascriptErrors": [
"curdtools_zh-cn.js frameElement.api/opener",
"easyuiextend.js defaults/progress"
],
"businessMutationsPerformed": false,
"sshTunnelClosed": true
}
+48
View File
@@ -0,0 +1,48 @@
{
"host": "192.168.68.223",
"run": "/home/ubuntu/builds/syly2/20261029-01",
"phase": "compatibility-build",
"build_success": true,
"artifact": "/home/ubuntu/builds/syly2/20261029-01/artifacts/syly.war",
"artifact_bytes": 113959750,
"artifact_sha256": "7c1e4236d32f2d2106df738d2523f08588d73eab7f70089382e3ae5e7c827e76",
"zip_crc_check": "passed",
"required_entries_present": [
"WEB-INF/web.xml",
"WEB-INF/classes/com/zzc/web/system/controller/core/LoginController.class",
"WEB-INF/classes/com/zzc/core/interceptors/AuthInterceptor.class",
"WEB-INF/classes/com/zzc/web/htoal/controller/HotelMonthlyController.class"
],
"compiled_class_files": 949,
"class_major_versions": {
"52": 949
},
"bundled_jars": 145,
"main_java_sources": 910,
"extra_java_sources_outside_maven_root": 21,
"source_manifest_files": 5302,
"changed_source_files": [
{
"path": "pom.xml",
"original_sha256": "c543015b9ff6c46aaf5c3333b0e490b13522ff8044fb12183b66510480a59d5c",
"build_sha256": "c863b482e41709817c6991eb6279a8504158b14508c0d1cab542b2387b5f64dd"
},
{
"path": "src/main/java/com/zzc/web/htoal/controller/HotelQuarterStatisticController.java",
"original_sha256": "e5b575b67d3657bf768aa61103e6eb78b7283072bdd03ec2d751b4cdf7d8e91d",
"build_sha256": "bee7dcc280c4eb58ead7652723d9cfc6be837bca04f259bdd102994b8a76c350"
},
{
"path": "src/main/java/com/zzc/web/travel/controller/InlandStatisticPageController.java",
"original_sha256": "ea8edbe597dd592a9c23f13dd381bb7ea98631e76812ad92b232bbd96db9c6bc",
"build_sha256": "4446a2331961e81a50582c895ed9459167c9cfb306b5dd908b6aaccc098b732f"
}
],
"tests_skipped": true,
"containers_before": 12,
"containers_after": 12,
"existing_containers_unchanged": true,
"built_at": "2026-10-29T08:46:05Z",
"elapsed": "02:11 min",
"java_version": "openjdk version \"1.8.0_512\"\nOpenJDK Runtime Environment Corretto-8.512.09.1 (build 1.8.0_512-b09)\nOpenJDK 64-Bit Server VM Corretto-8.512.09.1 (build 25.512-b09, mixed mode)"
}
+86
View File
@@ -0,0 +1,86 @@
[
{
"check": "login-page",
"status": 200,
"expected_status": 200,
"passed": true,
"bytes": 8395
},
{
"check": "login-controller",
"status": 200,
"expected_status": 200,
"passed": true,
"bytes": 8395
},
{
"check": "captcha",
"status": 200,
"expected_status": 200,
"passed": true,
"bytes": 2192
},
{
"check": "anonymous-business",
"status": 401,
"expected_status": 401,
"passed": true,
"bytes": 727
},
{
"check": "repair-disabled",
"status": 403,
"expected_status": 403,
"passed": true,
"bytes": 665
},
{
"check": "password-reset-disabled",
"status": 403,
"expected_status": 403,
"passed": true,
"bytes": 665
},
{
"check": "mobile-disabled",
"status": 403,
"expected_status": 403,
"passed": true,
"bytes": 665
},
{
"check": "sync-disabled",
"status": 403,
"expected_status": 403,
"passed": true,
"bytes": 665
},
{
"check": "druid-disabled",
"status": 403,
"expected_status": 403,
"passed": true,
"bytes": 665
},
{
"check": "upload-disabled",
"status": 403,
"expected_status": 403,
"passed": true,
"bytes": 665
},
{
"check": "rest-disabled",
"status": 403,
"expected_status": 403,
"passed": true,
"bytes": 665
},
{
"check": "backup-account-login-disabled",
"status": 200,
"expected_status": 200,
"passed": true,
"bytes": 69
}
]
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ckfinder</groupId>
<artifactId>CKFinder-updateByAlexander</artifactId>
<version>2.4</version>
</project>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ckfinder</groupId>
<artifactId>ckfinderplugin-fileeditor</artifactId>
<version>2.3</version>
</project>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ckfinder</groupId>
<artifactId>CKFinderPlugin-FileEditor</artifactId>
<version>2.4</version>
<description>POM was created by Sonatype Nexus</description>
</project>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ckfinder</groupId>
<artifactId>ckfinderplugin-imageresize</artifactId>
<version>2.3</version>
</project>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ckfinder</groupId>
<artifactId>CKFinderPlugin-ImageResize</artifactId>
<version>2.4</version>
<description>POM was created by Sonatype Nexus</description>
</project>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ckfinder</groupId>
<artifactId>CKFinderPlugin-Watermark</artifactId>
<version>2.4</version>
<description>POM was created by Sonatype Nexus</description>
</project>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ckfinder</groupId>
<artifactId>apache-ant-zip</artifactId>
<version>2.3</version>
</project>
Binary file not shown.
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ckfinder</groupId>
<artifactId>ckfinder</artifactId>
<version>2.3</version>
</project>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.4.0</version>
<description>POM was created by Sonatype Nexus</description>
</project>
+15
View File
@@ -0,0 +1,15 @@
mvn install:install-file -DgroupId='com.oracle' -DartifactId=ojdbc14 -Dversion='10.2.0.4.0' -Dpackaging=jar -Dfile=D:\work-space\work-space\syly2\syly\syly2\jar\ojdbc14\ojdbc14\10.2.0.4.0\ojdbc14-10.2.0.4.0.jar
mvn install:install-file -DgroupId='com.ckfinder' -DartifactId=CKFinder-updateByAlexander -Dversion='2.4' -Dpackaging=jar -Dfile=D:\work-space\work-space\syly2\syly\syly2\jar\ckfinder\ckfinder\CKFinder-updateByAlexander\2.4\CKFinder-updateByAlexander-2.4.jar
mvn install:install-file -DgroupId='com.ckfinder' -DartifactId=CKFinderPlugin-FileEditor -Dversion='2.4' -Dpackaging=jar -Dfile=D:\work-space\work-space\syly2\syly\syly2\jar\ckfinder\ckfinder\CKFinderPlugin-FileEditor\2.4\CKFinderPlugin-FileEditor-2.4.jar
mvn install:install-file -DgroupId='com.ckfinder' -DartifactId=CKFinderPlugin-ImageResize -Dversion='2.4' -Dpackaging=jar -Dfile=D:\work-space\work-space\syly2\syly\syly2\jar\ckfinder\ckfinder\CKFinderPlugin-ImageResize\2.4\CKFinderPlugin-ImageResize-2.4.jar
mvn install:install-file -DgroupId='com.ckfinder' -DartifactId=CKFinderPlugin-Watermark -Dversion='2.4' -Dpackaging=jar -Dfile=D:\work-space\work-space\syly2\syly\syly2\jar\ckfinder\ckfinder\CKFinderPlugin-Watermark\2.4\CKFinderPlugin-Watermark-2.4.jar
+53
View File
@@ -0,0 +1,53 @@
> 历史记录:以下说明对应 2026-10-29 原始 UAT 构建及部署,当前仓库的构建入口和密钥配置请看根目录 README。
# syly2 UAT 编译工具
目标主机:`ubuntu@192.168.68.223`。这些工具用于隔离的源码编译,不包含数据库初始化或应用发布步骤。
## 本次目录
- 工具链:`/home/ubuntu/.local/opt/syly2-build`
- Maven 专用仓库:`/home/ubuntu/.local/share/syly2-build/m2`
- 构建记录:`/home/ubuntu/builds/syly2/20261029-01`
- 编译副本:上述构建目录下的 `source`
- 构建日志:上述构建目录下的 `logs`
- 本地传输包、原始文件哈希清单及回收证据:项目 `.local/uat-build/20261029-01`
## 工具职责
1. `prepare-toolchain.py`:安装固定版本 Corretto 8.512.09.1 与 Maven 3.9.11,验证官方 SHA-256/SHA-512 校验值;只写入当前用户的专用目录,不修改系统 Java 或 shell 配置。
2. `install-private-libs.py RUN_DIRECTORY`:将交接包中的 6 个旧 JAR 注册到专用 Maven 仓库,记录原文件哈希。JODConverter 使用原项目声明的坐标和交接包中的 JAR,其原嵌入坐标不同,未据此升级或替换组件。
3. `apply-compatibility.py RUN_DIRECTORY`:校验原始文件哈希,备份并修改编译副本中的三个文件:POM 的 Windows bootclasspath 分号改为 `${path.separator}`,两个统计 Controller 各删除一条未使用的 JDK 内部类 import。保留原换行符,并输出完整 `compatibility.patch`。`pom-linux.patch` 单独展示第一项差异。
4. `run-build.sh RUN_DIRECTORY PHASE`:在专用 JDK/仓库下执行 `clean package`,限制 JVM 内存、降低 CPU 调度优先级并记录退出码;显式跳过测试编译及执行。
5. `verify-build.py RUN_DIRECTORY PHASE`:校验构建退出码、WAR CRC、关键条目和 Java 字节码版本,核对源码差异,保存产物与哈希,并比较构建前后的共享 UAT 容器状态。需要构建目录中已有 `containers-before.json` 基线记录。
本次只打包外层工程的 `pom.xml`、`src`、`jar`,不带历史 `target` 或内层重复工程。传输包与展开后的 5,302 个文件均核验了 SHA-256。
## 重新编译当前 UAT 副本
```sh
ssh ubuntu@192.168.68.223 'bash /home/ubuntu/builds/syly2/20261029-01/scripts/run-build.sh /home/ubuntu/builds/syly2/20261029-01 repeat'
```
`repeat` 对应日志文件名;需要保留每次日志时请使用不同的阶段名。
仅使用编译工具链时:
```sh
source /home/ubuntu/.local/opt/syly2-build/env.sh
java -version
mvn -version
```
## 在新的构建目录复现
先建立当前用户所有、权限为 700 的独立目录,创建 `source`、`logs`、`artifacts`、`scripts` 子目录,复制并核验源码包、原始 `source-manifest.json` 与这些工具。然后执行:
```sh
python3 scripts/prepare-toolchain.py
python3 scripts/install-private-libs.py /absolute/path/to/build-run
python3 scripts/apply-compatibility.py /absolute/path/to/build-run
bash scripts/run-build.sh /absolute/path/to/build-run linux-build
```
源码包包含原有配置,构建目录、传输包和产物均应按受限资料管理。编译通过不代表应用启动、数据库恢复、JSP 运行或省级接口联调通过。
+54
View File
@@ -0,0 +1,54 @@
#!/usr/bin/env python3
"""Apply only the three verified compilation fixes to an isolated source copy."""
import difflib
import hashlib
import json
import os
from pathlib import Path
import re
import sys
os.umask(0o077)
run = Path(sys.argv[1]).resolve()
source = run / 'source'
manifest = json.loads((run / 'source-manifest.json').read_text())
changes = {
'pom.xml': (
b'${java.home}/lib/rt.jar;${java.home}/lib/jce.jar',
b'${java.home}/lib/rt.jar${path.separator}${java.home}/lib/jce.jar',
),
'src/main/java/com/zzc/web/htoal/controller/HotelQuarterStatisticController.java': (
b'import com.sun.org.apache.regexp.internal.recompile;\r\n', b'',
),
'src/main/java/com/zzc/web/travel/controller/InlandStatisticPageController.java': (
b'import com.sun.org.apache.regexp.internal.recompile;\r\n', b'',
),
}
patches = []
for relative, (before, after) in changes.items():
path = source / relative
data = path.read_bytes()
backup = run / 'artifacts/original-build-files' / relative
if hashlib.sha256(data).hexdigest() == manifest[relative]:
assert data.count(before) == 1, relative
if relative.endswith('.java'):
assert len(re.findall(rb'\brecompile\b', data)) == 1, relative
backup.parent.mkdir(parents=True, exist_ok=True)
backup.write_bytes(data)
path.write_bytes(data.replace(before, after, 1))
elif relative == 'pom.xml' and (run / 'artifacts/pom-original.xml').exists():
original = (run / 'artifacts/pom-original.xml').read_bytes()
assert hashlib.sha256(original).hexdigest() == manifest[relative]
assert data == original.replace(before, after, 1)
backup.parent.mkdir(parents=True, exist_ok=True)
backup.write_bytes(original)
else:
assert backup.exists(), 'Unexpected source change: ' + relative
assert hashlib.sha256(backup.read_bytes()).hexdigest() == manifest[relative]
assert data == backup.read_bytes().replace(before, after, 1)
patches.extend(difflib.unified_diff(
backup.read_text().splitlines(keepends=True), path.read_text().splitlines(keepends=True),
fromfile='a/' + relative, tofile='b/' + relative,
))
print('Compatibility fix verified:', relative)
(run / 'artifacts/compatibility.patch').write_text(''.join(patches))
+53
View File
@@ -0,0 +1,53 @@
#!/usr/bin/env python3
"""Register the six supplied legacy JARs in a dedicated Maven repository."""
import hashlib
import json
import os
from pathlib import Path
import subprocess
import sys
import xml.etree.ElementTree as ET
os.umask(0o077)
run = Path(sys.argv[1]).resolve()
source = run / 'source'
repo = Path.home() / '.local/share/syly2-build/m2'
base = Path.home() / '.local/opt/syly2-build'
env = dict(os.environ, JAVA_HOME=str(base / 'corretto-8.512.09.1'))
env['PATH'] = env['JAVA_HOME'] + '/bin:' + env['PATH']
mvn = base / 'apache-maven-3.9.11/bin/mvn'
artifacts = [
('com.oracle', 'ojdbc14', '10.2.0.4.0', 'jar/ojdbc14/ojdbc14/10.2.0.4.0/ojdbc14-10.2.0.4.0.jar'),
*[('com.ckfinder', name, '2.4', f'jar/ckfinder/ckfinder/{name}/2.4/{name}-2.4.jar') for name in [
'CKFinder-updateByAlexander', 'CKFinderPlugin-FileEditor',
'CKFinderPlugin-ImageResize', 'CKFinderPlugin-Watermark',
]],
('com.artofsolving', 'jodconverter', '3.0-beta-4', 'src/main/webapp/WEB-INF/lib/jodconverter-3.0-beta-4.jar'),
]
evidence = []
poms = run / 'artifacts/local-poms'
poms.mkdir(exist_ok=True)
for group, artifact, version, relative in artifacts:
jar = source / relative
original_pom = jar.with_suffix('.pom')
if original_pom.is_file():
pom = original_pom
else:
project = ET.Element('project', xmlns='http://maven.apache.org/POM/4.0.0')
for tag, text in [('modelVersion', '4.0.0'), ('groupId', group), ('artifactId', artifact), ('version', version), ('packaging', 'jar')]:
ET.SubElement(project, tag).text = text
pom = poms / f'{artifact}-{version}.pom'
ET.ElementTree(project).write(pom, encoding='utf-8', xml_declaration=True)
log = run / 'logs' / f'install-{artifact}.log'
with log.open('w') as output:
result = subprocess.run([
str(mvn), '-B', '-ntp', f'-Dmaven.repo.local={repo}',
'org.apache.maven.plugins:maven-install-plugin:3.1.4:install-file',
f'-Dfile={jar}', f'-DpomFile={pom}',
f'-DgroupId={group}', f'-DartifactId={artifact}', f'-Dversion={version}', '-Dpackaging=jar',
], cwd=run, env=env, stdout=output, stderr=subprocess.STDOUT, timeout=300)
if result.returncode:
raise RuntimeError(f'Installation failed: {artifact}; see {log}')
evidence.append({'coordinates': f'{group}:{artifact}:{version}', 'source': relative, 'sha256': hashlib.sha256(jar.read_bytes()).hexdigest()})
print('Installed', evidence[-1]['coordinates'], flush=True)
(run / 'artifacts/private-libs.json').write_text(json.dumps(evidence, indent=2) + '\n')
+11
View File
@@ -0,0 +1,11 @@
--- a/pom.xml
+++ b/pom.xml
@@ -812,7 +812,7 @@
</compilerArgs>
<compilerArguments>
<verbose/>
- <bootclasspath>${java.home}/lib/rt.jar;${java.home}/lib/jce.jar</bootclasspath>
+ <bootclasspath>${java.home}/lib/rt.jar${path.separator}${java.home}/lib/jce.jar</bootclasspath>
</compilerArguments>
<fork>true</fork>
</configuration>
+68
View File
@@ -0,0 +1,68 @@
#!/usr/bin/env python3
"""Install the pinned syly2 build toolchain in the current UAT user's home."""
import hashlib
import json
import os
from pathlib import Path
import subprocess
import tarfile
import urllib.request
os.umask(0o077)
base = Path.home() / '.local/opt/syly2-build'
base.mkdir(parents=True, exist_ok=True)
downloads = base / 'downloads'
downloads.mkdir(exist_ok=True)
packages = [
{
'name': 'corretto-8.512.09.1',
'url': 'https://corretto.aws/downloads/resources/8.512.09.1/amazon-corretto-8.512.09.1-linux-x64.tar.gz',
'algorithm': 'sha256',
'checksum': '2f2df938886e61c80010ed5af0ea6504ca685280a3b807c5c59ed3ca4fb95be4',
'checksum_source': 'https://corretto.aws/downloads/latest_sha256/amazon-corretto-8-x64-linux-jdk.tar.gz',
'executable': 'bin/java',
},
{
'name': 'apache-maven-3.9.11',
'url': 'https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.tar.gz',
'algorithm': 'sha512',
'checksum': 'bcfe4fe305c962ace56ac7b5fc7a08b87d5abd8b7e89027ab251069faebee516b0ded8961445d6d91ec1985dfe30f8153268843c89aa392733d1a3ec956c9978',
'checksum_source': 'https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.tar.gz.sha512',
'executable': 'bin/mvn',
},
]
for package in packages:
archive = downloads / (package['name'] + '.tar.gz')
if not archive.exists():
print('Downloading', package['name'], flush=True)
partial = archive.with_suffix('.part')
with urllib.request.urlopen(package['url'], timeout=90) as response, partial.open('wb') as output:
while chunk := response.read(1024 * 1024):
output.write(chunk)
partial.rename(archive)
digest = hashlib.new(package['algorithm'], archive.read_bytes()).hexdigest()
if digest != package['checksum']:
raise RuntimeError('Checksum mismatch: ' + package['name'])
dest = base / package['name']
if not dest.exists():
staging = base / (package['name'] + '.extract')
staging.mkdir(exist_ok=False)
with tarfile.open(archive) as tar:
tar.extractall(staging, filter='data')
children = list(staging.iterdir())
if len(children) != 1 or not children[0].is_dir():
raise RuntimeError('Unexpected archive layout')
children[0].rename(dest)
staging.rmdir()
if not (dest / package['executable']).is_file():
raise RuntimeError('Incomplete installation: ' + str(dest))
print('Verified and installed', dest, flush=True)
jdk = base / packages[0]['name']
maven = base / packages[1]['name']
env_text = f'export JAVA_HOME="{jdk}"\nexport PATH="{jdk}/bin:{maven}/bin:$PATH"\nexport MAVEN_OPTS="-Xmx1536m -Djava.awt.headless=true"\n'
(base / 'env.sh').write_text(env_text)
(base / 'manifest.json').write_text(json.dumps(packages, indent=2) + '\n')
env = dict(os.environ, JAVA_HOME=str(jdk), PATH=f'{jdk}/bin:{maven}/bin:' + os.environ['PATH'])
subprocess.run([str(jdk / 'bin/java'), '-version'], env=env, check=True)
subprocess.run([str(maven / 'bin/mvn'), '-version'], env=env, check=True)
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -euo pipefail
umask 077
run_dir="${1:?Usage: run-build.sh RUN_DIRECTORY PHASE}"
phase="${2:?Missing build phase}"
case "$phase" in
*[!a-zA-Z0-9_-]*|'') printf 'Invalid phase\n' >&2; exit 2 ;;
esac
source "$HOME/.local/opt/syly2-build/env.sh"
mkdir -p "$run_dir/logs" "$HOME/.local/share/syly2-build/m2"
cd "$run_dir/source"
set +e
nice -n 10 timeout 1200 mvn --batch-mode --no-transfer-progress \
-Dstyle.color=never \
-Dmaven.repo.local="$HOME/.local/share/syly2-build/m2" \
-Dmaven.test.skip=true -DskipTests=true \
clean package > "$run_dir/logs/$phase.log" 2>&1
result=$?
set -e
printf '%s\n' "$result" > "$run_dir/logs/$phase.exit-code"
printf 'Build phase %s exited %s; log: %s\n' "$phase" "$result" "$run_dir/logs/$phase.log"
exit "$result"
+77
View File
@@ -0,0 +1,77 @@
#!/usr/bin/env python3
"""Verify the WAR, record exact source changes, and compare shared UAT containers."""
import collections
import hashlib
import json
import os
from pathlib import Path
import shutil
import struct
import subprocess
import sys
import zipfile
os.umask(0o077)
run = Path(sys.argv[1]).resolve()
phase = sys.argv[2]
assert (run / 'logs' / (phase + '.exit-code')).read_text().strip() == '0'
log = (run / 'logs' / (phase + '.log')).read_text(errors='replace')
assert 'BUILD SUCCESS' in log
source = run / 'source'
war = source / 'target/syly.war'
required = [
'WEB-INF/web.xml',
'WEB-INF/classes/com/zzc/web/system/controller/core/LoginController.class',
'WEB-INF/classes/com/zzc/core/interceptors/AuthInterceptor.class',
'WEB-INF/classes/com/zzc/web/htoal/controller/HotelMonthlyController.class',
]
with zipfile.ZipFile(war) as archive:
bad = archive.testzip()
assert bad is None, bad
names = archive.namelist()
assert all(name in names for name in required)
classes = [name for name in names if name.startswith('WEB-INF/classes/') and name.endswith('.class')]
major_versions = collections.Counter(struct.unpack('>H', archive.read(name)[6:8])[0] for name in classes)
assert set(major_versions) == {52}, major_versions
libs = [name for name in names if name.startswith('WEB-INF/lib/') and name.endswith('.jar')]
manifest = json.loads((run / 'source-manifest.json').read_text())
changes = []
for relative, expected in manifest.items():
actual = hashlib.sha256((source / relative).read_bytes()).hexdigest()
if expected != actual:
changes.append({'path': relative, 'original_sha256': expected, 'build_sha256': actual})
expected_changes = {
'pom.xml',
'src/main/java/com/zzc/web/htoal/controller/HotelQuarterStatisticController.java',
'src/main/java/com/zzc/web/travel/controller/InlandStatisticPageController.java',
}
assert {change['path'] for change in changes} == expected_changes, changes
ids = subprocess.check_output(['docker', 'ps', '-aq'], text=True).split()
fmt = '{"id":{{json .Id}},"name":{{json .Name}},"startedAt":{{json .State.StartedAt}},"running":{{json .State.Running}},"restartCount":{{json .RestartCount}}}'
after = [json.loads(subprocess.check_output(['docker', 'inspect', '--format', fmt, cid], text=True)) for cid in ids]
before = json.loads((run / 'containers-before.json').read_text())
key = lambda values: {value['id']: value for value in values}
unchanged = key(before) == key(after)
(run / 'containers-after.json').write_text(json.dumps(after, indent=2) + '\n')
artifact = run / 'artifacts/syly.war'
shutil.copyfile(war, artifact)
artifact.chmod(0o600)
evidence = {
'host': '192.168.68.223', 'run': str(run), 'phase': phase, 'build_success': True,
'artifact': str(artifact), 'artifact_bytes': artifact.stat().st_size,
'artifact_sha256': hashlib.sha256(artifact.read_bytes()).hexdigest(),
'zip_crc_check': 'passed', 'required_entries_present': required,
'compiled_class_files': len(classes), 'class_major_versions': dict(major_versions), 'bundled_jars': len(libs),
'main_java_sources': len(list((source / 'src/main/java').rglob('*.java'))),
'extra_java_sources_outside_maven_root': len(list((source / 'src/main/com').rglob('*.java'))),
'source_manifest_files': len(manifest), 'changed_source_files': changes,
'tests_skipped': 'Tests are skipped' in log,
'containers_before': len(before), 'containers_after': len(after), 'existing_containers_unchanged': unchanged,
'built_at': next((line.split('Finished at:', 1)[1].strip() for line in log.splitlines() if 'Finished at:' in line), None),
'elapsed': next((line.split('Total time:', 1)[1].strip() for line in log.splitlines() if 'Total time:' in line), None),
'java_version': subprocess.check_output([str(Path.home() / '.local/opt/syly2-build/corretto-8.512.09.1/bin/java'), '-version'], stderr=subprocess.STDOUT, text=True).strip(),
}
(run / 'artifacts/verification.json').write_text(json.dumps(evidence, indent=2) + '\n')
print(json.dumps(evidence, indent=2))
if not unchanged:
print('NOTICE: Container inventory changed during the build; inspect before/after records.')
+6
View File
@@ -0,0 +1,6 @@
FROM syly2-uat-base:20261029
COPY java/ /opt/java/
COPY tomcat/ /opt/tomcat/
ENV JAVA_HOME=/opt/java CATALINA_HOME=/opt/tomcat CATALINA_BASE=/opt/tomcat PATH=/opt/java/bin:$PATH
USER 1000:1000
CMD ["/opt/tomcat/bin/catalina.sh", "run"]
+4
View File
@@ -0,0 +1,4 @@
FROM docker.jianmuhub.com/library/ubuntu@sha256:98f43fe45e1073f27722eb362248541a6c90599b5ac458de28cee309d92a7199
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libaio1 libnuma1 libncurses5 libtinfo5 libfontconfig1 fonts-dejavu-core tzdata ca-certificates && rm -rf /var/lib/apt/lists/*
ENV TZ=Asia/Shanghai LANG=C.UTF-8
RUN groupadd -g 1000 syly && useradd -u 1000 -g 1000 -M syly
+5
View File
@@ -0,0 +1,5 @@
FROM syly2-uat-base:20261029
COPY mysql/ /opt/mysql/
ENV PATH=/opt/mysql/bin:$PATH
USER 1000:1000
ENTRYPOINT ["/opt/mysql/bin/mysqld", "--defaults-file=/etc/mysql-uat.cnf"]
+16
View File
@@ -0,0 +1,16 @@
import java.net.*;
public class EgressProbe {
public static void main(String[] args) throws Exception {
String[] hosts = {"db", "10.5.34.202", "1.1.1.1"};
int[] ports = {3306, 3306, 443};
for (int i=0;i<hosts.length;i++) {
boolean connected=false;
try (Socket socket=new Socket()) {
socket.connect(new InetSocketAddress(hosts[i],ports[i]),1500);
connected=true;
} catch(Exception expected) {}
System.out.println(hosts[i]+":"+ports[i]+"="+(connected?"connected":"blocked"));
if ((i==0)!=connected) throw new IllegalStateException("Unexpected UAT network policy");
}
}
}
+63
View File
@@ -0,0 +1,63 @@
> 历史记录:以下说明对应 2026-10-29 原始 UAT 构建及部署,当前仓库的构建入口和密钥配置请看根目录 README。
# syly2 独立 UAT 部署
目标:`ubuntu@192.168.68.223`。部署目录:`/home/ubuntu/apps/syly2-uat`。
## 组成
- 专用 Compose 项目 `syly2-uat`,数据库、Java 应用和 Nginx 各一个容器。
- MySQL **5.7.44**,与用户提供的线上版本一致;独立数据目录 `runtime/mysql-data`,不发布数据库端口。
- Corretto **8.512.09.1**、Tomcat **9.0.123**;使用已编译并校验的外层工程 WAR。
- Ubuntu 基础镜像和 Nginx 来自建木镜像仓库,固定 digest;MySQL 和 Tomcat 从厂商官方 HTTPS 地址下载。
- MySQL 官方包核验官方 MD5,再记录 SHA-256。`package-mysql.py` 从已验证的包提取必要运行文件,避免重复传输调试库、静态库和工具。运行包再核对 SHA-256。Tomcat 核验官方 SHA-512。
## 数据及边界
使用项目根目录的 `sanya_ch_full.sql`,128,389,799 字节。仅进行流式校验、传输、导入;不把备份正文写入报告。
原备份 SHA-256:`d6ec01e162f4b1c92350a0c97bd163b5deb633cdd187f96ff2aadb32e899c5d4`。
备份恢复到此项目自己的 MySQL 实例内,库名仍为 `sanya_ch`。部署脚本只允许首次恢复,拒绝覆盖已有 UAT 数据。恢复后保存所有表的精确行数,不输出用户或业务行。
创建专用 `uat_admin` 用户及测试组织、角色,保留恢复数据中的原账号及密码。部署过滤器仅允许专用测试用户登录。密码保存在权限 600 的 `secrets/credentials.json`,不写入 Compose 环境变量、日志或报告。
应用与数据库只连接 `internal` 网络。省级上报和邮件配置改为本地禁用地址,停用定时调度;浏览器 CSP 限制页面向外部地址请求。UAT 过滤器阻断免登录重置密码、修复清库、移动端绕过登录、同步、上传连接器及 Druid 入口,并对其余非公开资源检查 UAT 登录状态。
这些保护仅作用于部署副本,不能替代原系统安全修复。Web 应用文件以只读方式挂载,附件上传功能未在本次部署中开放。备份数据属于受限资料,UAT 不用于真实省级上报、短信或邮件发送。
## 首次部署顺序
脚本固定目标目录;不要在已有实例上重新运行初始化/恢复。
1. 保存原有容器 ID、启动时间、重启计数;检查端口和空间。建立权限 700 的部署目录及私有子目录。
2. 上传脚本、Compose、Nginx 配置以及 SQL 备份;在服务端再次核验 SQL SHA-256。
3. 下载官方发行包并校验。执行 `package-mysql.py`,上传生成的运行包和 manifest。
4. 构建 `Dockerfile.base`,执行 `prepare-runtime.py`,构建 `Dockerfile.mysql` 和 `Dockerfile.app`。
5. 使用 `docker compose -f compose.json run --rm --no-deps db --initialize-insecure` 初始化空数据目录;此时配置仍为 `skip_networking=ON`。
6. 只启动 `db`。执行 `database-uat.py restore`,核对版本、表数及精确行数,再执行 `database-uat.py seed` 设置新数据库密码与测试账号。
7. 将 `runtime/mysql.cnf` 中 `skip_networking=ON` 改为 `OFF`,只重建本项目 `db` 服务,启动 `app` 和 `web`。
8. 检查应用启动、登录页、验证码、登录、菜单和列表;验证阻断规则、外连隔离,并比较原有服务状态。
## 访问与运维
- 业务入口:`https://192.168.68.223:8445/syly/`。
- 本实例使用独立自签名证书,公钥证书在 `secrets/tls/server.crt`。浏览器首次访问可能提示证书不受信任。
- 直接访问上述 UAT HTTPS 地址,不需要 SSH 隧道。验证过程中使用的临时隧道及回环 HTTP 入口已移除。
```sh
cd /home/ubuntu/apps/syly2-uat
docker compose -f compose.json ps
docker compose -f compose.json logs --tail 100 app
docker compose -f compose.json up -d
```
只暂停本应用并保留恢复数据:
```sh
docker compose -f compose.json stop web app db
```
恢复运行使用上面的 `up -d`。不要全局 prune,也不要对其他 Compose 项目执行停启、清理或重建。
证据位于远程 `evidence/`;本地核验结果回收到项目 `.local/uat-deploy/evidence/`。密码另存私有交接文件。启动与页面验证不代表生产验收、全量报表正确性、历史附件完整性或外部接口联调通过。
+46
View File
@@ -0,0 +1,46 @@
package uat;
import java.io.IOException;
import java.util.Locale;
import javax.servlet.*;
import javax.servlet.http.*;
/** Deployment-only boundary for the isolated restored UAT copy. */
public class UatGuardFilter implements Filter {
public void init(FilterConfig config) {}
public void destroy() {}
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
HttpServletRequest req = (HttpServletRequest) request;
HttpServletResponse res = (HttpServletResponse) response;
String path = req.getServletPath().toLowerCase(Locale.ROOT);
res.setHeader("X-Syly-Environment", "isolated-uat");
res.setHeader("X-Content-Type-Options", "nosniff");
if (path.contains("appservice") || path.contains("repaircontroller") || path.contains("dataupdatecontroller")
|| path.contains("druid") || path.equals("/rest") || path.startsWith("/rest/") || path.contains("connector.java")
|| path.contains("filesuploadcontroller") || path.contains("/ueditor/jsp/")
|| (path.contains("usercontroller") && req.getParameterMap().containsKey("savenewpwdforuser"))) {
res.sendError(403, "Disabled in isolated UAT"); return;
}
boolean login = path.equals("/logincontroller.do") || path.equals("/logincontroller.action");
if (login && req.getParameterMap().containsKey("checkuser")
&& !"uat_admin".equals(req.getParameter("userName"))) {
res.setContentType("application/json;charset=UTF-8");
res.getWriter().write("{\"success\":false,\"msg\":\"UAT permits only the dedicated test account\"}"); return;
}
boolean publicPath = (login && (req.getParameterMap().containsKey("login") || req.getParameterMap().containsKey("checkuser")))
|| path.equals("/randcodeimage") || path.equals("/") || path.equals("")
|| path.equals("/webpage/login/login.jsp")
|| ((path.startsWith("/plug-in/") || path.startsWith("/style/") || path.startsWith("/images/") || path.startsWith("/css/") || path.startsWith("/js/"))
&& path.matches(".*\\.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot|swf|map)$"));
if (!publicPath) {
HttpSession session = req.getSession(false);
com.zzc.web.system.pojo.base.Client client = session == null ? null :
com.zzc.web.system.manager.ClientManager.getInstance().getClient(session.getId());
if (client == null || client.getUser() == null || !"uat_admin".equals(client.getUser().getUserName())) {
res.sendError(401, "UAT login required"); return;
}
}
chain.doFilter(request, response);
}
}
+60
View File
@@ -0,0 +1,60 @@
{
"name": "syly2-uat",
"services": {
"db": {
"image": "syly2-uat-mysql:5.7.44-20261029",
"pull_policy": "never",
"restart": "unless-stopped",
"user": "1000:1000",
"read_only": true,
"cap_drop": ["ALL"],
"security_opt": ["no-new-privileges:true"],
"mem_limit": "1g",
"cpus": 1.5,
"pids_limit": 200,
"volumes": ["./runtime/mysql-data:/var/lib/mysql", "./runtime/mysql.cnf:/etc/mysql-uat.cnf:ro", "./secrets/mysql-client.cnf:/run/secrets/mysql-client.cnf:ro"],
"tmpfs": ["/tmp:uid=1000,gid=1000,mode=1777,size=128m"],
"networks": ["backend"],
"healthcheck": {"test": ["CMD", "/opt/mysql/bin/mysqladmin", "--defaults-extra-file=/run/secrets/mysql-client.cnf", "ping", "--silent"], "interval": "10s", "timeout": "5s", "retries": 12},
"logging": {"driver":"json-file", "options":{"max-size":"10m","max-file":"3"}}
},
"app": {
"image": "syly2-uat-app:tomcat9.0.123-java8-20261029",
"pull_policy": "never",
"restart": "unless-stopped",
"user": "1000:1000",
"read_only": true,
"cap_drop": ["ALL"],
"security_opt": ["no-new-privileges:true"],
"mem_limit": "2g",
"cpus": 2,
"pids_limit": 300,
"environment": {"CATALINA_OPTS":"-Xms256m -Xmx1280m -XX:MaxMetaspaceSize=384m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Duser.timezone=Asia/Shanghai"},
"volumes": ["./runtime/webapp:/opt/tomcat/webapps/syly:ro", "./runtime/server.xml:/opt/tomcat/conf/server.xml:ro", "./runtime/tomcat-work:/opt/tomcat/work", "./runtime/tomcat-logs:/opt/tomcat/logs"],
"tmpfs": ["/tmp:uid=1000,gid=1000,mode=1777,size=128m", "/opt/tomcat/temp:uid=1000,gid=1000,mode=1777,size=128m", "/opt/tomcat/conf/Catalina:uid=1000,gid=1000,mode=0755,size=8m"],
"networks": ["backend"],
"depends_on": {"db":{"condition":"service_healthy"}},
"logging": {"driver":"json-file", "options":{"max-size":"10m","max-file":"3"}}
},
"web": {
"image": "docker.jianmuhub.com/library/nginx@sha256:04ac43f568bd51a2e8f37fa0a185ff8f9f4d55c3aa1f1af5008f094d026f950d",
"pull_policy": "never",
"entrypoint": ["nginx", "-g", "daemon off;"],
"user": "1000:1000",
"restart": "unless-stopped",
"read_only": true,
"cap_drop": ["ALL"],
"security_opt": ["no-new-privileges:true"],
"mem_limit": "128m",
"cpus": 0.5,
"pids_limit": 50,
"ports": ["192.168.68.223:8445:8445"],
"volumes": ["./nginx.conf:/etc/nginx/nginx.conf:ro", "./secrets/tls:/etc/nginx/tls:ro"],
"tmpfs": ["/var/cache/nginx:uid=1000,gid=1000", "/var/run:uid=1000,gid=1000", "/tmp:uid=1000,gid=1000"],
"networks": ["backend", "ingress"],
"depends_on": ["app"],
"logging": {"driver":"json-file", "options":{"max-size":"5m","max-file":"2"}}
}
},
"networks": {"backend":{"internal":true}, "ingress":{}}
}
+72
View File
@@ -0,0 +1,72 @@
#!/usr/bin/env python3
"""Restore the user-supplied dump only to the new isolated MySQL container."""
import json, os, subprocess, sys, time
from pathlib import Path
os.umask(0o077)
ROOT=Path('/home/ubuntu/apps/syly2-uat')
DC=['docker','compose','-f',str(ROOT/'compose.json')]
cid=subprocess.check_output(DC+['ps','-q','db'],text=True).strip()
assert cid
label=subprocess.check_output(['docker','inspect','--format','{{index .Config.Labels "com.docker.compose.project"}}',cid],text=True).strip()
assert label=='syly2-uat'
phase=sys.argv[1]
cmd=['docker','exec','-i',cid,'/opt/mysql/bin/mysql','--max-allowed-packet=512M','--default-character-set=utf8mb4','-uroot','-N','-B']
if phase=='inventory': cmd.insert(-4,'--defaults-extra-file=/run/secrets/mysql-client.cnf')
def query(sql):
p=subprocess.run(cmd,input=sql,text=True,capture_output=True)
if p.returncode:
(ROOT/'evidence/db-last-error.log').write_text(p.stderr)
raise RuntimeError('SQL failed; private error log saved')
return p.stdout.strip()
if phase=='restore':
assert not (ROOT/'evidence/restore-complete.json').exists(), 'Refusing repeated restore over existing UAT'
assert query("SELECT COUNT(*) FROM information_schema.schemata WHERE schema_name='sanya_ch'")=='0'
started=time.time()
with (ROOT/'incoming/sanya_ch_full.sql').open('rb') as inp,(ROOT/'evidence/restore.log').open('wb') as log:
p=subprocess.run(cmd,stdin=inp,stdout=log,stderr=log)
if p.returncode: raise RuntimeError('Restore failed; inspect private log')
tables=query("SELECT table_name FROM information_schema.tables WHERE table_schema='sanya_ch' AND table_type='BASE TABLE' ORDER BY table_name").splitlines()
counts={t:int(query('SELECT COUNT(*) FROM sanya_ch.`'+t+'`')) for t in tables}
info={'mysql_version':query('SELECT VERSION()'),'tables':len(tables),'rows':sum(counts.values()),'row_counts':counts,'seconds':round(time.time()-started,1)}
(ROOT/'evidence/restore-complete.json').write_text(json.dumps(info,indent=2))
cols=query("SELECT column_name FROM information_schema.columns WHERE table_schema='sanya_ch' AND table_name='t_s_base_user'").splitlines()
(ROOT/'evidence/base-user-columns.json').write_text(json.dumps(cols))
print(json.dumps({k:v for k,v in info.items() if k!='row_counts'}))
elif phase=='seed':
assert (ROOT/'evidence/restore-complete.json').exists()
assert query("SELECT COUNT(*) FROM sanya_ch.t_s_base_user WHERE username='uat_admin'")=='0', 'Refusing to change an existing account'
creds=json.loads((ROOT/'secrets/credentials.json').read_text())
jdk='/home/ubuntu/.local/opt/syly2-build/corretto-8.512.09.1/bin/'
helper=ROOT/'scripts/HashUat.java'
helper.write_text('import java.io.*; import org.mindrot.jbcrypt.BCrypt; public class HashUat { public static void main(String[] a) throws Exception { String p=new BufferedReader(new InputStreamReader(System.in)).readLine(); System.out.print(BCrypt.hashpw(p,BCrypt.gensalt(12))); }}')
cp=str(ROOT/'runtime/webapp/WEB-INF/lib/*')
subprocess.run([jdk+'javac','-cp',cp,str(helper)],check=True)
hashed=subprocess.check_output([jdk+'java','-cp',str(ROOT/'scripts')+':'+cp,'HashUat'],input=creds['uat_password'],text=True)
columns=json.loads((ROOT/'evidence/base-user-columns.json').read_text())
added=[]
if 'password_update_date' not in columns:
query('ALTER TABLE sanya_ch.t_s_base_user ADD COLUMN password_update_date datetime NULL;')
added.append('t_s_base_user.password_update_date')
# All IDs belong to this synthetic UAT fixture, never to a restored account.
uid='01a186a4e1407e328d2bfe6687e68b01'
org='01a186a4e1407e328d2bfe6687e68b02'
role='01a186a4e1407e328d2bfe6687e68b03'
sql=f"""USE sanya_ch;
START TRANSACTION;
INSERT INTO t_s_depart(ID,departname,description,org_code,org_type) VALUES('{org}','UAT验证组织','仅用于隔离测试','UAT','1');
INSERT INTO t_s_base_user(ID,username,password,realname,status,activitiSync,area,login_fail_count,is_locked,password_update_date) VALUES('{uid}','uat_admin','{hashed}','UAT验证管理员',1,0,'460200',0,0,NOW());
INSERT INTO t_s_user(id,create_date,create_by,create_name) VALUES('{uid}',NOW(),'uat-deploy','UAT deployment');
INSERT INTO t_s_user_org(ID,user_id,org_id) VALUES(REPLACE(UUID(),'-',''),'{uid}','{org}');
INSERT INTO t_s_role(ID,rolecode,rolename) VALUES('{role}','uat_admin','UAT验证角色');
INSERT INTO t_s_role_user(ID,roleid,userid) VALUES(REPLACE(UUID(),'-',''),'{role}','{uid}');
INSERT INTO t_s_role_function(ID,functionid,roleid) SELECT REPLACE(UUID(),'-',''),ID,'{role}' FROM t_s_function;
COMMIT;
CREATE USER 'syly_uat'@'%' IDENTIFIED BY '{creds['mysql_app']}';
GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE, SHOW VIEW ON sanya_ch.* TO 'syly_uat'@'%';
ALTER USER 'root'@'localhost' IDENTIFIED BY '{creds['mysql_root']}';
"""
query(sql)
(ROOT/'evidence/uat-seed.json').write_text(json.dumps({'username':'uat_admin','user_id':uid,'org_id':org,'role_id':role,'added_columns':added,'existing_account_passwords_changed':False,'business_rows_changed':False},indent=2))
print('Dedicated UAT account added; original accounts preserved; DB credentials initialized.')
else:
raise ValueError(phase)
+33
View File
@@ -0,0 +1,33 @@
worker_processes 1;
pid /var/run/nginx.pid;
events { worker_connections 256; }
http {
include /etc/nginx/mime.types;
server_tokens off;
access_log off;
error_log /dev/stderr warn;
client_max_body_size 10m;
proxy_connect_timeout 5s;
proxy_read_timeout 60s;
server {
listen 8445 ssl;
server_name _;
absolute_redirect off;
ssl_certificate /etc/nginx/tls/server.crt;
ssl_certificate_key /etc/nginx/tls/server.key;
ssl_protocols TLSv1.2 TLSv1.3;
add_header Content-Security-Policy "default-src 'self' 'unsafe-inline' 'unsafe-eval' data: blob:; connect-src 'self'; form-action 'self'; frame-src 'self'; base-uri 'self'" always;
add_header X-Frame-Options SAMEORIGIN always;
location = / { return 302 /syly/; }
location = /syly/ { return 302 /syly/loginController.do?login; }
location /syly/ {
proxy_pass http://app:8080;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port 8445;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
}
location / { return 404; }
}
}
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env python3
"""Verify the official archive and transfer only required runtime files."""
import hashlib,json,re,tarfile
from pathlib import Path
root=Path(__file__).resolve().parents[1]/'.local/uat-deploy'
archive=root/'mysql-5.7.44.tar.gz'
def hashfile(p, alg):
h=hashlib.new(alg)
with p.open('rb') as f:
for block in iter(lambda:f.read(1024*1024),b''):h.update(block)
return h.hexdigest()
expected=re.search(r'\b[0-9a-fA-F]{32}\b',(root/'mysql-5.7.44.tar.gz.md5').read_text()).group().lower()
assert hashfile(archive,'md5')==expected
out=root/'mysql-5.7.44-runtime.tar.gz'
files=[]
with tarfile.open(archive,'r|gz') as src,tarfile.open(out,'w:gz',compresslevel=6) as dst:
for m in src:
rel=m.name.split('/',1)[1] if '/' in m.name else ''
take=rel in ['bin/mysqld','bin/mysql','bin/mysqladmin','bin/mysqldump'] or rel.startswith(('lib/','share/'))
if take and '/debug/' not in rel and not rel.endswith('.a'):
assert '..' not in Path(rel).parts
dst.addfile(m,src.extractfile(m) if m.isfile() else None)
files.append({'path':rel,'bytes':m.size})
manifest={'source_url':'https://cdn.mysql.com/archives/mysql-5.7/mysql-5.7.44-linux-glibc2.12-x86_64.tar.gz','source_md5_verified':expected,'source_sha256':hashfile(archive,'sha256'),'runtime_sha256':hashfile(out,'sha256'),'runtime_bytes':out.stat().st_size,'files':files}
(root/'mysql-runtime-manifest.json').write_text(json.dumps(manifest,indent=2))
print(json.dumps({k:v for k,v in manifest.items() if k!='files'},indent=2))
+152
View File
@@ -0,0 +1,152 @@
#!/usr/bin/env python3
"""Prepare only the syly2 UAT directory. Never prints credentials or dump rows."""
import hashlib, json, os, re, secrets, shutil, subprocess, sys, tarfile, zipfile
from pathlib import Path
os.umask(0o077)
ROOT = Path('/home/ubuntu/apps/syly2-uat')
assert not (ROOT/'evidence/restore-complete.json').exists(), 'Preparation is for a fresh deployment only; refusing to overwrite initialized UAT configuration'
JDK = Path('/home/ubuntu/.local/opt/syly2-build/corretto-8.512.09.1')
WAR = Path('/home/ubuntu/builds/syly2/20261029-01/artifacts/syly.war')
def digest(path, alg='sha256'):
h = hashlib.new(alg)
with path.open('rb') as f:
for chunk in iter(lambda: f.read(1024*1024), b''): h.update(chunk)
return h.hexdigest()
def write(path, text, mode=0o600):
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text(text)
path.chmod(mode)
assert digest(WAR) == '7c1e4236d32f2d2106df738d2523f08588d73eab7f70089382e3ae5e7c827e76'
dump = ROOT/'incoming/sanya_ch_full.sql'
assert digest(dump) == 'd6ec01e162f4b1c92350a0c97bd163b5deb633cdd187f96ff2aadb32e899c5d4'
dump.chmod(0o600)
mysql = ROOT/'downloads/mysql-5.7.44-runtime.tar.gz'
app_only = '--app-only' in sys.argv
if not app_only:
mysql_manifest=json.loads((ROOT/'downloads/mysql-runtime-manifest.json').read_text())
assert mysql_manifest['source_md5_verified']
assert digest(mysql) == mysql_manifest['runtime_sha256']
tomcat = ROOT/'downloads/apache-tomcat-9.0.123.tar.gz'
assert digest(tomcat, 'sha512') == (ROOT/'downloads/apache-tomcat-9.0.123.tar.gz.sha512').read_text().split()[0]
ctx = ROOT/'image-context'
ctx.mkdir(exist_ok=True)
for archive, dest, allowed in [(mysql, ctx/'mysql', ('bin/', 'lib/', 'share/')), (tomcat, ctx/'tomcat', ('bin/', 'lib/', 'conf/'))]:
if archive == mysql and app_only: continue
if not dest.exists():
dest.mkdir()
with tarfile.open(archive, 'r|gz') as tf:
for m in tf:
name = m.name.split('/',1)[1] if '/' in m.name else ''
if name.startswith(allowed) and '/debug/' not in name and not name.endswith('-debug'):
assert '..' not in Path(name).parts
m.name = name
tf.extract(m, dest)
if not (ctx/'java').exists(): shutil.copytree(JDK, ctx/'java', symlinks=True)
for f in ['Dockerfile.mysql','Dockerfile.app']:
shutil.copy2(ROOT/'scripts'/f,ctx/f)
for p in [ctx/'tomcat/webapps',ctx/'tomcat/work',ctx/'tomcat/temp',ctx/'tomcat/logs']:
p.mkdir(exist_ok=True)
p.chmod(0o755)
# Image files must be traversable by the runtime uid.
for base, dirs, files in os.walk(ctx):
Path(base).chmod(0o755)
for file in files:
p = Path(base)/file
if not p.is_symlink(): p.chmod(0o755 if p.stat().st_mode & 0o111 else 0o644)
secret_file = ROOT/'secrets/credentials.json'
if not secret_file.exists():
creds = {k:secrets.token_urlsafe(24) for k in ['mysql_root','mysql_app','uat_password']}
creds['uat_username']='uat_admin'
write(secret_file,json.dumps(creds,indent=2))
creds=json.loads(secret_file.read_text())
write(ROOT/'secrets/mysql-client.cnf','[client]\nuser=root\npassword='+creds['mysql_root']+'\nsocket=/tmp/mysql.sock\n')
write(ROOT/'runtime/mysql.cnf','''[mysqld]
basedir=/opt/mysql
datadir=/var/lib/mysql
socket=/tmp/mysql.sock
pid-file=/tmp/mysql.pid
port=3306
bind-address=0.0.0.0
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
lower_case_table_names=1
sql_mode=NO_ENGINE_SUBSTITUTION
max_allowed_packet=512M
innodb_buffer_pool_size=384M
max_connections=60
event_scheduler=OFF
local_infile=OFF
secure_file_priv=NULL
skip_name_resolve=ON
skip_networking=ON
''')
webapp=ROOT/'runtime/webapp'
if not webapp.exists():
webapp.mkdir()
with zipfile.ZipFile(WAR) as z: z.extractall(webapp)
classes=webapp/'WEB-INF/classes'
db='''hibernate.dialect=org.hibernate.dialect.MySQLDialect
validationQuery.sqlserver=SELECT 1
jdbc.url=jdbc:mysql://db:3306/sanya_ch?useUnicode=true&characterEncoding=UTF-8&useSSL=false&connectTimeout=5000&socketTimeout=30000
jdbc.username=syly_uat
jdbc.password='''+creds['mysql_app']+'''
jdbc.dbType=mysql
hibernate.hbm2ddl.auto=none
scenicWebServiceBase=http://127.0.0.1:9
hotelWebServiceBase=http://127.0.0.1:9
hotelProviceurl=http://127.0.0.1:9
scenicProvice=http://127.0.0.1:9
hotelIp=127.0.0.1
'''
write(classes/'dbconfig.properties',db)
write(classes/'spring-mvc-timeTask.xml','''<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="schedulerFactory" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"><property name="autoStartup" value="false"/></bean>
</beans>''')
write(classes/'log4j.properties','''log4j.rootLogger=WARN,A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=[%p][%c]%m%n
log4j.logger.org.hibernate.type.descriptor.sql.BasicBinder=OFF
log4j.logger.org.hibernate.type.descriptor.sql.BasicExtractor=OFF
log4j.logger.org.hibernate.engine.QueryParameters=OFF
''')
p=classes/'spring-mvc-hibernate.xml';s=p.read_text();s=s.replace('<prop key="hibernate.show_sql">true</prop>','<prop key="hibernate.show_sql">false</prop>');s=re.sub(r'<property name="maxIdle" value="20"\s*/>','',s);write(p,s)
p=classes/'sysConfig.properties';s=p.read_text();s=re.sub(r'^mail\.[^=]+=.*$',lambda m: m.group().split('=')[0]+'=',s,flags=re.M);s=re.sub(r'^ck.userfiles=.*$', 'ck.userfiles=/syly/upload/',s,flags=re.M);write(p,s)
# Remove alternate embedded database credentials in the runtime copy.
for p in (classes/'zzc').glob('zzc_database.properties*'):
write(p,'# Disabled in isolated UAT; runtime uses dbconfig.properties\n')
p=webapp/'WEB-INF/web.xml';s=p.read_text()
s=s.replace('<url-pattern>*</url-pattern>','<url-pattern>/*</url-pattern>')
if 'uatGuard' not in s:
start=s.index('>',s.index('<web-app'))+1
s=s[:start]+'''\n<filter><filter-name>uatGuard</filter-name><filter-class>uat.UatGuardFilter</filter-class></filter>
<filter-mapping><filter-name>uatGuard</filter-name><url-pattern>/*</url-pattern><dispatcher>REQUEST</dispatcher></filter-mapping>\n'''+s[start:]
# Eliminate the unused Druid servlet and its embedded credentials.
s=re.sub(r'<servlet>\s*<servlet-name>druidStatView</servlet-name>.*?</servlet>','',s,flags=re.S)
s=re.sub(r'<servlet-mapping>\s*<servlet-name>druidStatView</servlet-name>.*?</servlet-mapping>','',s,flags=re.S)
write(p,s)
login=webapp/'webpage/login/login.jsp'
text=login.read_text()
if 'isolated-uat-banner' not in text:
text=text.replace('<title>','<title>[UAT] ')
text=re.sub(r'(<body[^>]*>)',r'\1<div id="isolated-uat-banner" style="position:fixed;top:0;left:0;right:0;z-index:9999;text-align:center;background:#fff3cd;color:#664d03;padding:6px">UAT 隔离测试环境 · 数据来自备份 · 外部上报已禁用</div>',text,count=1)
write(login,text)
cp=str(classes)+':'+str(webapp/'WEB-INF/lib/*')+':'+str(ctx/'tomcat/lib/servlet-api.jar')
subprocess.run([str(JDK/'bin/javac'),'-encoding','UTF-8','-cp',cp,'-d',str(classes),str(ROOT/'scripts/UatGuardFilter.java')],check=True)
write(ROOT/'runtime/server.xml','''<Server port="-1"><Service name="Catalina">
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" URIEncoding="UTF-8" maxThreads="80" />
<Engine name="Catalina" defaultHost="localhost"><Host name="localhost" appBase="webapps" unpackWARs="false" autoDeploy="false">
<Valve className="org.apache.catalina.valves.RemoteIpValve" internalProxies=".*" remoteIpHeader="x-forwarded-for" protocolHeader="x-forwarded-proto" portHeader="x-forwarded-port" hostHeader="x-forwarded-host"/>
</Host></Engine></Service></Server>''')
for p in [ROOT/'runtime/mysql-data', ROOT/'runtime/tomcat-work', ROOT/'runtime/tomcat-logs']:
p.mkdir(exist_ok=True)
tls=ROOT/'secrets/tls';tls.mkdir(exist_ok=True)
if not (tls/'server.crt').exists():
subprocess.run(['openssl','req','-x509','-newkey','rsa:3072','-nodes','-keyout',str(tls/'server.key'),'-out',str(tls/'server.crt'),'-days','365','-subj','/CN=syly2-uat','-addext','subjectAltName=IP:192.168.68.223,DNS:localhost'],check=True,stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL)
write(ROOT/'evidence/runtime-manifest.json',json.dumps({'war_sha256':digest(WAR),'dump_sha256':digest(dump),'dump_bytes':dump.stat().st_size,'mysql_tar_sha256':None if app_only else digest(mysql),'mysql_vendor_md5_verified':not app_only,'tomcat_tar_sha512_verified':True,'tomcat':'9.0.123','java':'Corretto 8.512.09.1','mysql':'5.7.44'},indent=2))
print('Runtime prepared; hashes verified; credentials kept in private files.')
+34
View File
@@ -0,0 +1,34 @@
#!/usr/bin/env python3
"""No business mutations; inspect only status and non-sensitive response shape."""
import json, ssl, urllib.request, urllib.error
from pathlib import Path
ROOT=Path(__file__).resolve().parents[1]
evidence=ROOT/'.local/uat-deploy/evidence'
ctx=ssl.create_default_context(cafile=str(evidence/'server.crt'))
base='https://192.168.68.223:8445/syly/'
results=[]
cases=[
('login-page','',200,'formLogin'),
('login-controller','loginController.do?login',200,'formLogin'),
('captcha','randCodeImage',200,None),
('anonymous-business','hotelController.do?datagrid',401,None),
('repair-disabled','repairController.do?uat_probe',403,None),
('password-reset-disabled','userController.do?savenewpwdforuser',403,None),
('mobile-disabled','appservice.do?uat_probe',403,None),
('sync-disabled','hoteldataupdatecontroller.do?uat_probe',403,None),
('druid-disabled','webpage/system/druid/index.html',403,None),
('upload-disabled','plug-in/ckfinder/core/connector/java/connector.java',403,None),
('rest-disabled','rest/uat_probe',403,None),
('backup-account-login-disabled','loginController.do?checkuser&userName=admin',200,'UAT permits only'),
]
for name,path,expected,marker in cases:
req=urllib.request.Request(base+path,headers={'User-Agent':'syly2-uat-deployment-verification'})
try: res=urllib.request.urlopen(req,context=ctx,timeout=45)
except urllib.error.HTTPError as e: res=e
body=res.read(1024*1024)
ok=res.status==expected and (marker is None or marker.encode() in body)
if name=='captcha': ok=ok and body.startswith(b'\xff\xd8')
results.append({'check':name,'status':res.status,'expected_status':expected,'passed':ok,'bytes':len(body)})
(evidence/'http-checks.json').write_text(json.dumps(results,indent=2))
print(json.dumps(results,indent=2))
assert all(x['passed'] for x in results)
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env python3
import json,subprocess
from pathlib import Path
root=Path('/home/ubuntu/apps/syly2-uat')
fmt='{"id":{{json .Id}},"name":{{json .Name}},"startedAt":{{json .State.StartedAt}},"running":{{json .State.Running}},"restartCount":{{json .RestartCount}}}'
before=[json.loads(x) for x in (root/'evidence/containers-before.jsonl').read_text().splitlines()]
after=[]
for old in before:
after.append(json.loads(subprocess.check_output(['docker','inspect','--format',fmt,old['id']],text=True)))
images={}
runtime=[]
for service in ['db','app','web']:
cid=subprocess.check_output(['docker','compose','-f',str(root/'compose.json'),'ps','-q',service],text=True).strip()
assert cid, service
state=json.loads(subprocess.check_output(['docker','inspect','--format',fmt,cid],text=True))
state['service']=service
state['image']=subprocess.check_output(['docker','inspect','--format','{{.Image}}',cid],text=True).strip()
state['network_names']=json.loads(subprocess.check_output(['docker','inspect','--format','{{json .NetworkSettings.Networks}}',cid],text=True)).keys()
state['network_names']=list(state['network_names'])
runtime.append(state)
info={'original_container_count':len(before),'original_containers_unchanged':before==after,'runtime':runtime}
(root/'evidence/containers-after.json').write_text(json.dumps(after,indent=2))
(root/'evidence/runtime-verification.json').write_text(json.dumps(info,indent=2))
print(json.dumps(info,indent=2))
assert before==after
assert all(x['running'] for x in runtime)
assert all(x['network_names']==['syly2-uat_backend'] for x in runtime if x['service'] in ['app','db'])
+862
View File
@@ -0,0 +1,862 @@
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.zzc</groupId>
<artifactId>syly</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- 主要依赖库的版本定义 -->
<spring.version>3.2.18.RELEASE</spring.version>
<hibernate.version>4.1.0.Final</hibernate.version>
<hibernate-common-annotations.version>4.0.2.Final</hibernate-common-annotations.version>
<hibernate-jpa.version>1.0.1.Final</hibernate-jpa.version>
<!-- <zzccore.version>1.0</zzccore.version> -->
<guava.version>16.0.1</guava.version>
<!-- 工作流 -->
<activiti.version>5.11</activiti.version>
<mybatis.version>3.1.1</mybatis.version>
<!-- 辅助依赖包 -->
<cglib.version>2.2</cglib.version>
<aspectj.version>1.6.9</aspectj.version>
<jodd.version>3.3.7</jodd.version>
<javassist.version>3.15.0-GA</javassist.version>
<ant.version>1.6.5</ant.version>
<!-- todo 没有用到 <spring-jpa.versoin>2.0.8</spring-jpa.versoin> -->
<mybatis-spring.version>1.1.1</mybatis-spring.version>
<!-- 工具包 -->
<!-- json start -->
<jackson.version>1.9.13</jackson.version>
<!-- todo 没有用到 <jackson2.version>2.1.2</jackson2.version> -->
<jacksonframework.version>1.84</jacksonframework.version>
<json-lib.version>2.1</json-lib.version>
<fastjson-lib.version>1.2.83</fastjson-lib.version>
<gson.version>2.2.4</gson.version>
<!-- json start -->
<dom4j.version>1.6.1</dom4j.version>
<slf4j.version>1.6.1</slf4j.version>
<log4j.version>1.2.17</log4j.version>
<classmate.version>0.5.4</classmate.version>
<commons-beanutils.version>1.7.0</commons-beanutils.version>
<commons-collections.version>3.2.1</commons-collections.version>
<commons-chain.version>1.2</commons-chain.version>
<commons-codec.version>1.3</commons-codec.version>
<commons-digester.version>2.0</commons-digester.version>
<commons-io.version>1.3.2</commons-io.version>
<commons-fileupload.version>1.2.1</commons-fileupload.version>
<commons-lang.version>2.6</commons-lang.version>
<commons-lang3.version>3.1</commons-lang3.version>
<commons-email.version>1.2</commons-email.version>
<commons-logging.version>1.0.4</commons-logging.version>
<commons-logging-api.version>1.1</commons-logging-api.version>
<commons-validator.version>1.3.1</commons-validator.version>
<ehcache.version>2.4.3</ehcache.version>
<freemarker.version>2.3.19</freemarker.version>
<hibernate-validator.version>4.2.0.Final</hibernate-validator.version>
<poi.version>3.9</poi.version>
<antlr.version>3.3</antlr.version>
<openoffice.version>3.2.1</openoffice.version>
<!-- <jodconverter.version>3.0-beta-4</jodconverter.version> -->
<!-- <jodconverter.version>2.2.1</jodconverter.version> -->
<!-- todo 为什么要引入struts的lib呢? -->
<xwork-core.version>2.1.6</xwork-core.version>
<!-- 数据库组件包 _start -->
<proxool.version>0.9.1</proxool.version>
<commons-pool.version>1.6</commons-pool.version>
<commons-dbcp.version>1.4</commons-dbcp.version>
<druid.version>0.2.9</druid.version>
<mysql.version>5.1.27</mysql.version>
<!-- sqlserver2005 -->
<sqlserver.version>1.0.0</sqlserver.version>
<!-- oracle -->
<ojdbc14.version>10.2.0.4.0</ojdbc14.version>
<!-- jtds for mssql/db2 -->
<jtds.version>1.2.4</jtds.version>
<h2.version>1.3.170</h2.version>
<postgresql.version>9.1-903.jdbc4</postgresql.version>
<!-- 测试依赖包 -->
<junit.version>4.7</junit.version>
<!-- todo 没有用到 <hamcrest.version>1.3</hamcrest.version> -->
<!-- todo 没有用到 <mockito.version>1.9.5</mockito.version> -->
<!-- todo 没有用到 <powermock.version>1.5</powermock.version> -->
<!-- todo 没有用到 <selenium.version>2.28.0</selenium.version> -->
<!-- todo 没有用到 <jetty.version>7.6.8.v20121106</jetty.version> -->
<!-- Plugin的属性定义 -->
<!-- todo 没有用到 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> -->
<!-- todo 没有用到 <jdk.version>1.6</jdk.version> -->
<CKFinder.version>2.4</CKFinder.version>
<!-- java生成缩略图 -->
<thumbnailator.version>0.4.6</thumbnailator.version>
<pinyin4j.version>2.5.0</pinyin4j.version>
<org.quartz.version>1.6.2</org.quartz.version>
<activation.version>1.1.1</activation.version>
<aopalliance.version>1.0</aopalliance.version>
<xstream.version>1.4.4</xstream.version>
<groovy.version>2.3.3</groovy.version>
<!--poi 工具类 -->
<easypoi.version>2.1.1</easypoi.version>
</properties>
<dependencies>
<!-- activation -->
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>${activation.version}</version>
</dependency>
<!-- aopalliance -->
<dependency>
<groupId>aopalliance</groupId>
<artifactId>aopalliance</artifactId>
<version>${aopalliance.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<!-- <dependency> <groupId>com.zzc</groupId> <artifactId>zzc-core</artifactId>
<version>${zzccore.version}</version> </dependency> -->
<!-- 自定义的依赖包 -->
<dependency>
<groupId>com.ckfinder</groupId>
<artifactId>CKFinder-updateByAlexander</artifactId>
<version>${CKFinder.version}</version>
</dependency>
<dependency>
<groupId>com.ckfinder</groupId>
<artifactId>CKFinderPlugin-FileEditor</artifactId>
<version>${CKFinder.version}</version>
</dependency>
<dependency>
<groupId>com.ckfinder</groupId>
<artifactId>CKFinderPlugin-ImageResize</artifactId>
<version>${CKFinder.version}</version>
</dependency>
<dependency>
<groupId>com.ckfinder</groupId>
<artifactId>CKFinderPlugin-Watermark</artifactId>
<version>${CKFinder.version}</version>
</dependency>
<!-- ckfinder end -->
<!-- java生成缩略图 -->
<dependency>
<groupId>net.coobird</groupId>
<artifactId>thumbnailator</artifactId>
<version>${thumbnailator.version}</version>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-vfs</artifactId>
<version>3.1.0.Final</version>
</dependency>
<dependency>
<groupId>com.belerweb</groupId>
<artifactId>pinyin4j</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>org.opensymphony.quartz</groupId>
<artifactId>quartz</artifactId>
<version>1.6.1</version>
</dependency>
<!-- SPRING start -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- SPRING end -->
<!-- hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<!-- todo 为什么要用4.2.3,而不是统一使用${hibernate.version} -->
<version>4.2.3.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-proxool</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>${hibernate-common-annotations.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>${hibernate-jpa.version}</version>
</dependency>
<!-- anltr -->
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr</artifactId>
<version>${antlr.version}</version>
</dependency>
<!-- spring orm -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- mybatis -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>${mybatis.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>${mybatis-spring.version}</version>
</dependency>
<dependency>
<groupId>net.oschina.zcx7878</groupId>
<artifactId>fastdfs-client-java</artifactId>
<version>1.27.0.0</version>
</dependency>
<!-- 数据库相关依赖包 _start -->
<!--proxool start -->
<dependency>
<groupId>com.cloudhopper.proxool</groupId>
<artifactId>proxool</artifactId>
<version>${proxool.version}</version>
<!-- 许仙明加入 geronimo-javamail_1.4_spec后删除 -->
<exclusions>
<exclusion>
<artifactId>geronimo-spec-javamail</artifactId>
<groupId>geronimo-spec</groupId>
</exclusion>
<exclusion>
<artifactId>avalon-framework-api</artifactId>
<groupId>avalon-framework</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.cloudhopper.proxool</groupId>
<artifactId>proxool-cglib</artifactId>
<version>${proxool.version}</version>
</dependency>
<!-- proxool end -->
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>${commons-pool.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>${commons-dbcp.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>${druid.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>${ojdbc14.version}</version>
</dependency>
<!-- jtds for mssql/db2 -->
<dependency>
<groupId>net.sourceforge.jtds</groupId>
<artifactId>jtds</artifactId>
<version>${jtds.version}</version>
<scope>runtime</scope>
</dependency>
<!-- h2 -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
<scope>test</scope>
</dependency>
<!-- postgresql -->
<!-- 数据库相关依赖包 _end -->
<!-- WEB begin -->
<!-- spring mvc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- web依赖包 -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- WEB end -->
<!-- 辅助依赖包 _start -->
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>${cglib.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.jodd</groupId>
<artifactId>jodd</artifactId>
<version>${jodd.version}</version>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>${javassist.version}</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
<version>${ant.version}</version>
</dependency>
<!-- 辅助依赖包 _end -->
<!-- 工具包 -->
<!-- JSON begin -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>${json-lib.version}</version>
<classifier>jdk15</classifier>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson-lib.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
<!-- JSON end -->
<!-- dom4j -->
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>${dom4j.version}</version>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- slf4j -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<!-- classmate -->
<dependency>
<groupId>com.fasterxml</groupId>
<artifactId>classmate</artifactId>
<version>${classmate.version}</version>
</dependency>
<!-- commons-beanutils -->
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>${commons-beanutils.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- commons-collections -->
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>${commons-collections.version}</version>
</dependency>
<!-- commons-chain -->
<dependency>
<groupId>commons-chain</groupId>
<artifactId>commons-chain</artifactId>
<version>${commons-chain.version}</version>
</dependency>
<!-- commons-codec -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${commons-codec.version}</version>
</dependency>
<!-- jbcrypt for password hashing -->
<dependency>
<groupId>org.mindrot</groupId>
<artifactId>jbcrypt</artifactId>
<version>0.4</version>
</dependency>
<!-- commons-digester -->
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>${commons-digester.version}</version>
</dependency>
<!-- commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>
<!-- commons-fileupload -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons-fileupload.version}</version>
</dependency>
<!-- commons-lang -->
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>${commons-lang.version}</version>
</dependency>
<!-- commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<!-- commons-email -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-email</artifactId>
<version>${commons-email.version}</version>
</dependency>
<!-- commons-logging -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>${commons-logging.version}</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
<version>${commons-logging-api.version}</version>
</dependency>
<!-- commons-validator -->
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>${commons-validator.version}</version>
</dependency>
<!-- ehcache -->
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-core</artifactId>
<version>${ehcache.version}</version>
</dependency>
<!-- freemarker -->
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>${freemarker.version}</version>
</dependency>
<!-- JSR303 Bean Validator -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-validator.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator-annotation-processor</artifactId>
<version>${hibernate-validator.version}</version>
</dependency>
<!-- poi start -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>${poi.version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>${poi.version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-scratchpad</artifactId>
<version>${poi.version}</version>
</dependency>
<!-- openoffice start -->
<dependency>
<groupId>org.openoffice</groupId>
<artifactId>juh</artifactId>
<version>${openoffice.version}</version>
</dependency>
<dependency>
<groupId>org.openoffice</groupId>
<artifactId>unoil</artifactId>
<version>${openoffice.version}</version>
</dependency>
<dependency>
<groupId>org.openoffice</groupId>
<artifactId>jurt</artifactId>
<version>${openoffice.version}</version>
</dependency>
<!-- java的OpenDucument文件转换器,它利用OpenOffice来进行转换工作 -->
<!-- openoffice end -->
<dependency>
<groupId>com.opensymphony</groupId>
<artifactId>xwork-core</artifactId>
<version>${xwork-core.version}</version>
</dependency>
<!-- TEST begin -->
<!-- junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
<!-- hamcrest -->
<!--<dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest-all</artifactId>
<version>${hamcrest.version}</version> </dependency> -->
<!-- spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<!-- jacob -->
<dependency>
<groupId>net.sf.jacob-project</groupId>
<artifactId>jacob</artifactId>
<version>1.14.3</version>
</dependency>
<!-- highchart 图片导出 -->
<dependency>
<groupId>com.kenai.nbpwr</groupId>
<artifactId>org-apache-batik-all</artifactId>
<version>1.7-201003011305</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.7.1</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis-ext</artifactId>
<version>1.3.04</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.3.04</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>xmlgraphics-commons</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.0</version>
</dependency>
<!-- Xml数据导出导入 -->
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>${xstream.version}</version>
</dependency>
<!-- groovy 脚本 -->
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>${groovy.version}</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.0.1</version>
</dependency>
<!-- 许仙明加入 geronimo-javamail_1.4_spec -->
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-javamail_1.4_spec</artifactId>
<version>1.6</version>
</dependency>
<!-- 龙金波加入 ueditor依赖jar -->
<!-- httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.10</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.6</version>
</dependency>
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>com.artofsolving</groupId>
<artifactId>jodconverter</artifactId>
<version>3.0-beta-4</version>
</dependency>
<dependency>
<groupId>javax.xml.rpc</groupId>
<artifactId>javax.xml.rpc-api</artifactId>
<version>1.1.2</version>
</dependency>
<!-- Hutool工具包 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.25</version>
</dependency>
</dependencies>
<organization>
<name>zzc开发平台</name>
</organization>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.0</version>
<!-- <configuration>
<webResources>
<resource>
<directory>${project.basedir}/src/main/java/com/zzc/web/export/model</directory>
<targetPath>WEB-INF\classes\com\zzc\web\export</targetPath>
<filtering>false</filtering>
<includes>
<include>**/*</include>
</includes>
</resource>
</webResources>
</configuration>-->
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.1</version>
<configuration>
<path>/syly</path>
<port>8080</port>
<uriEncoding>UTF-8</uriEncoding>
<url>http://localhost:8080/manager/html</url>
<server>tomcat7</server>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArgs>
<arg>-XDignore.symbol.file</arg>
</compilerArgs>
<compilerArguments>
<verbose/>
<bootclasspath>${java.home}/lib/rt.jar${path.separator}${java.home}/lib/jce.jar</bootclasspath>
</compilerArguments>
<fork>true</fork>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
<finalName>syly</finalName>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.sql</include>
<include>**/*.ftl</include>
<include>**/*.xls</include>
<include>**/*.xlsx</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/java</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.sql</include>
<include>**/*.ftl</include>
</includes>
<filtering>false</filtering>
</testResource>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
</build>
</project>
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
root="$PWD"
mvn_bin="${MVN:-mvn}"
repo="${MAVEN_REPO_LOCAL:-$root/.local/m2}"
mkdir -p "$repo"
install_jar() {
"$mvn_bin" -B -ntp "-Dmaven.repo.local=$repo" \
org.apache.maven.plugins:maven-install-plugin:3.1.4:install-file \
"-DgroupId=$1" "-DartifactId=$2" "-Dversion=$3" \
-Dpackaging=jar -DgeneratePom=true "-Dfile=$4"
}
install_jar com.oracle ojdbc14 10.2.0.4.0 jar/ojdbc14/ojdbc14/10.2.0.4.0/ojdbc14-10.2.0.4.0.jar
for name in CKFinder-updateByAlexander CKFinderPlugin-FileEditor CKFinderPlugin-ImageResize CKFinderPlugin-Watermark; do
install_jar com.ckfinder "$name" 2.4 "jar/ckfinder/ckfinder/$name/2.4/$name-2.4.jar"
done
install_jar com.artofsolving jodconverter 3.0-beta-4 src/main/webapp/WEB-INF/lib/jodconverter-3.0-beta-4.jar
"$mvn_bin" -B -ntp "-Dmaven.repo.local=$repo" -Dmaven.test.skip=true clean package
+49
View File
@@ -0,0 +1,49 @@
import com.zzc.core.util.EncryptionUtil;
import com.zzc.core.util.RsaUtils;
import com.zzc.core.util.RuntimeSecrets;
import cn.hutool.crypto.asymmetric.KeyType;
import cn.hutool.crypto.asymmetric.RSA;
import cn.hutool.crypto.SecureUtil;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
/** Offline checks; the caller supplies test keys in a private temporary file. */
public class SecretsCheck {
private static void check(boolean result, String message) {
if (!result) throw new AssertionError(message);
}
public static void main(String[] args) {
if (args.length > 0 && args[0].equals("config")) {
check(args[1].equals(RuntimeSecrets.required("SYLY_CONFIG_TEST")), "Configuration source/precedence");
System.out.println("Private-file/environment configuration checks passed");
return;
}
if (args.length > 0 && args[0].equals("missing")) {
try {
RuntimeSecrets.required("SYLY_MISSING_TEST_SECRET");
throw new AssertionError("Missing secrets must fail");
} catch (IllegalStateException expected) {
check(!expected.getMessage().contains("test-secret-value"), "Value leaked");
}
check(RuntimeSecrets.optional("SYLY_MISSING_TEST_SECRET").isEmpty(), "Optional default");
System.out.println("Missing-secret checks passed");
return;
}
String plain = "offline-check-中文-2026";
String encrypted = EncryptionUtil.encrypt(plain);
check(!plain.equals(encrypted), "AES must encrypt");
check(plain.equals(EncryptionUtil.decrypt(encrypted)), "AES round trip");
String raw = SecureUtil.aes(Base64.getDecoder().decode(RuntimeSecrets.required("SYLY_AES_KEY"))).encryptBase64(plain);
check(encrypted.substring(8).equals(raw), "AES format changed");
check(plain.equals(EncryptionUtil.decrypt(raw)), "Legacy ciphertext without prefix");
check(EncryptionUtil.encrypt(null) == null, "Null input");
check("".equals(EncryptionUtil.decrypt("")), "Empty input");
check(plain.equals(EncryptionUtil.decrypt(plain)), "Plaintext compatibility");
String rsaCipher = RsaUtils.getInstance().encrypt(plain);
check(plain.equals(RsaUtils.decrypt(rsaCipher)), "RSA round trip with retained public key");
RSA independent = new RSA(RuntimeSecrets.required("SYLY_RSA_PRIVATE_KEY"), RsaUtils.getPublicKey());
check(plain.equals(new String(independent.decrypt(Base64.getDecoder().decode(rsaCipher), KeyType.PrivateKey), StandardCharsets.UTF_8)), "RSA compatibility");
System.out.println("AES/RSA offline compatibility checks passed");
}
}
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env python3
"""Inspect the built WAR without launching the application or reading business data."""
from pathlib import Path
import collections
import hashlib
import json
import struct
import zipfile
root = Path(__file__).resolve().parents[1]
war = root / 'target/syly.war'
required = [
'WEB-INF/web.xml',
'WEB-INF/classes/com/zzc/web/system/controller/core/LoginController.class',
'WEB-INF/classes/com/zzc/core/interceptors/AuthInterceptor.class',
'WEB-INF/classes/com/zzc/web/htoal/controller/HotelMonthlyController.class',
'WEB-INF/classes/com/zzc/core/util/RuntimeSecrets.class',
]
with zipfile.ZipFile(war) as archive:
assert archive.testzip() is None, 'WAR CRC failure'
names = archive.namelist()
assert all(name in names for name in required), 'Missing application entry'
classes = [n for n in names if n.startswith('WEB-INF/classes/') and n.endswith('.class')]
versions = collections.Counter(struct.unpack('>H', archive.read(n)[6:8])[0] for n in classes)
assert set(versions) == {52}, versions
libs = [n for n in names if n.startswith('WEB-INF/lib/') and n.endswith('.jar')]
for name in ['dbconfig.properties', 'sysConfig.properties', 'zzc/zzc_database.properties']:
data = archive.read('WEB-INF/classes/' + name).decode('utf-8')
for line in data.splitlines():
if line.startswith(('jdbc.password=', 'mail.pwd=', 'password=')):
assert not line.split('=', 1)[1].strip(), 'Packaged credential in ' + name
assert 'druidStatView' not in archive.read('WEB-INF/web.xml').decode('utf-8')
print(json.dumps({
'war_sha256': hashlib.sha256(war.read_bytes()).hexdigest(),
'war_bytes': war.stat().st_size,
'zip_crc_check': 'passed',
'compiled_class_files': len(classes),
'class_major_versions': dict(versions),
'bundled_jars': len(libs),
'required_entries_present': required,
'packaged_credential_checks': 'passed',
}, indent=2))
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
mkdir -p target/offline-checks
jdk_bin="${JAVA_HOME:?Set JAVA_HOME to JDK 8}/bin"
cp="target/classes:target/syly/WEB-INF/lib/*"
"$jdk_bin/javac" -encoding UTF-8 -cp "$cp" -d target/offline-checks scripts/verification/SecretsCheck.java
"$jdk_bin/java" -cp "target/offline-checks:$cp" SecretsCheck missing
printf 'SYLY_CONFIG_TEST=from-file\n' > target/offline-checks/config-test.properties
env -u SYLY_CONFIG_TEST "$jdk_bin/java" -Dsyly.secrets.file="$PWD/target/offline-checks/config-test.properties" -cp "target/offline-checks:$cp" SecretsCheck config from-file
SYLY_CONFIG_TEST=from-environment "$jdk_bin/java" -Dsyly.secrets.file="$PWD/target/offline-checks/config-test.properties" -cp "target/offline-checks:$cp" SecretsCheck config from-environment
# Uses the existing deployment keys supplied privately by the operator.
"$jdk_bin/java" -cp "target/offline-checks:$cp" SecretsCheck
+635
View File
@@ -0,0 +1,635 @@
package taiji.swj.client;
import taiji.swj.service.SwjService;
import taiji.swj.service.impl.SwjServiceImplService;
public class Client {
public static void main(String[] args) {
SwjServiceImplService service = new SwjServiceImplService();
SwjService s = service.getSwjServiceImplPort();
//企业设立
int result = SpEnpInforRev("1", "2", getEnpInfor(),s);
//企业变更
// int result = SpEnpChangeRev("1","2","3",getEnpInforChange(),s);
//企业换照
// int result = SpEnpChangeLic("1", "2", getChangeLic(), s);
//企业注销
// int result = SpEnpLogoutRev("1","2",getLogoutInfo(),s);
//个体设立
// int result = spGtInforRev("1","2",getGtInfor(),s);
//个体变更
// int result = SpGtChangeRev("1","2","3",getGtInforChange(),s);
//个体注销(暂时还未xml信息模板)
// int result = SpGtLogoutRev("1","2",getGtLogoutRev(),s);
//企业设立前的基本信息接口
// int result = spBeforeCreateRev("1","2",getMainInfo(),s);
System.out.println("result=" + result);
}
/**
* 企业设立
* @param GsEnpid
* @param Md5Code
* @param EnpInfor
* @return
*/
private static Integer SpEnpInforRev(String GsEnpid,String Md5Code,String EnpInfor,SwjService s){
int result = s.spEnpInforRev(GsEnpid, Md5Code, EnpInfor);
return result;
}
//返回企业设立测试xml
private static String getEnpInfor(){
// String EnpInfor = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"+
// "<ROOT>"+
// "<INFOR_MAIN>"+
// "<natrualrate>0.0</natrualrate>"+
// "<corporationname>天津刚刚科技发展有限责任公司</corporationname>"+
// "<certificatefinancetypeName/>"+
// "<invCountryNameZj>?й?</invCountryNameZj>"+
// "<webAddress/>"+
// "<appDepNameSw>????б????????г??????????????</appDepNameSw>"+
// "<taxAgentPhone/>"+
// "<districtNameSw>??????????</districtNameSw>"+
// "<couIndustry>7519</couIndustry>"+
// "<certificatefinancecode>130230198903151219</certificatefinancecode>"+
// "<workNameCode>06</workNameCode>"+
// "<institutionname>无</institutionname>"+
// "<singleTax>1</singleTax>"+
// "<workphone>18812616111</workphone>"+
// "<regMoney>10.0</regMoney>"+
// "<appDepCode>328662147</appDepCode>"+
// "<product1Name/>"+
// "<financename>55</financename>"+
// "<organizationCode/>"+
// "<regphone>18812616111</regphone>"+
// "<certificatecode>210300198407115718</certificatecode>"+
// "<isFtz>1</isFtz>"+
// "<gsCheckTime/>"+
// "<delegateName>44</delegateName>"+
// "<forEntName/>"+
// "<certificatetype>1</certificatetype>"+
// "<applypeopleAd>?????ó??????(???????????)55555</applypeopleAd>"+
// "<revenuename>33</revenuename>"+
// "<certificaterevenuetype>01</certificaterevenuetype>"+
// "<appDepCodeSw>0063</appDepCodeSw>"+
// "<calculatetypeSw>12</calculatetypeSw>"+
// "<rundeadlineend/>"+
// "<districtNameZj>????б???????</districtNameZj>"+
// "<certificatefinancetype>01</certificatefinancetype>"+
// "<regAddress>?????ó??????(???????????)55555</regAddress>"+
// "<UniSCID>91120118MA05Q42D3K</UniSCID>"+
// "<certificatetypeZj>0</certificatetypeZj>"+
// "<workNumber>2</workNumber>"+
// "<gsCreateTime>2018-01-12 17:02:10</gsCreateTime>"+
// "<gsCreateUserName>石鑫丽</gsCreateUserName>"+
// "<calculatetype/>"+
// "<rundeadlinestart>2017-07-01</rundeadlinestart>"+
// "<accountingtype>02</accountingtype>"+
// "<financeemail>无</financeemail>"+
// "<moneyTypeCodeZS>156</moneyTypeCodeZS>"+
// "<certificatetypeSw>01</certificatetypeSw>"+
// "<regpostalcode>300463</regpostalcode>"+
// "<applypeople>55</applypeople>"+
// "<unittype>01</unittype>"+
// "<foreignrate>0</foreignrate>"+
// "<product2Name/>"+
// "<isopen>1</isopen>"+
// "<depType>1</depType>"+
// "<applypeoplectypeName>身份证</applypeoplectypeName>"+
// "<copyNum>1.0</copyNum>"+
// "<companytypeName>其它有限责任公司</companytypeName>"+
// "<workAddress>?????ó??????(???????????)55555</workAddress>"+
// "<revenuephone>18812616114</revenuephone>"+
// "<accountingtypeName/>"+
// "<icNum>0</icNum>"+
// "<moneyTypeCode/>"+
// "<workpostalcode>300463</workpostalcode>"+
// "<foundDate>2017-07-01</foundDate>"+
// "<industry94>M7519</industry94>"+
// "<certificatetypeNameZj>身份证</certificatetypeNameZj>"+
// "<industry02>M7710</industry02>"+
// "<regNem>120118000153785</regNem>"+
// "<financecellphone>18812616113</financecellphone>"+
// "<ftzRegType>1</ftzRegType>"+
// "<districtCodeZj>120116</districtCodeZj>"+
// "<certificaterevenuetypeName/>"+
// "<jdxzdm>120116502</jdxzdm>"+
// "<gsCreateUserId>0305e4b353ee8a145961340d834b7287</gsCreateUserId>"+
// "<cellphone>18812616111</cellphone>"+
// "<workName>?????</workName>"+
// "<taxAgentName/>"+
// "<appDepName>????б????????г??????????????</appDepName>"+
// "<adminDepName/>"+
// "<forEntAddress/>"+
// "<applypeoplectype>0</applypeoplectype>"+
// "<gsCheckUserName/>"+
// "<applypeoplephone>18812616113</applypeoplephone>"+
// "<countryrate>0</countryrate>"+
// "<moneyTypeNameZS>?????</moneyTypeNameZS>"+
// "<invCountryCodeZj>156</invCountryCodeZj>"+
// "<industryClass/>"+
// "<districtName>市自贸区市场监管局</districtName>"+
// "<couIndustryName/>"+
// "<taxAgentTaxCode/>"+
// "<moneyTypeName/>"+
// "<revenueemail>无</revenueemail>"+
// "<email/>"+
// "<certificatetypeNameSw>身份证</certificatetypeNameSw>"+
// "<isSmall>1</isSmall>"+
// "<applypeoplecellphone>18812616113</applypeoplecellphone>"+
// "<workarea>自营和代理货物及技术的进出口;对外贸易经营。</workarea>"+
// "<certificaterevenuecode>140700198003136217</certificaterevenuecode>"+
// "<payid_institution>无</payid_institution>"+
// "<foreignpeoplenum/>"+
// "<applypeoplecid>130230198903151219</applypeoplecid>"+
// "<economyType00>150</economyType00>"+
// "<adminDepCode/>"+
// "<mainWorkArea>无</mainWorkArea>"+
// "<gsid>201094</gsid>"+
// "<product3Name/>"+
// "<mainRegAd>无</mainRegAd>"+
// "<invCountryCode/>"+
// "<taxAgentEmail/>"+
// "<invCountryName/>"+
// "<companytype>159</companytype>"+
// "<linkphone>18812616111</linkphone>"+
// "<jdxzmc>滨海东疆保税港区</jdxzmc>"+
// "<economyType94>62</economyType94>"+
// "<districtCodeSw>40200</districtCodeSw>"+
// "<districtCode>120118</districtCode>"+
// "<financephone>18812616113</financephone>"+
// "<regtempid>23</regtempid>"+
// "<applypeoplepostcode>300463</applypeoplepostcode>"+
// "<revenuecellphone>18812616114</revenuecellphone>"+
// "<unittypeName>???</unittypeName>"+
// "</INFOR_MAIN>"+
// "<INFOR_INVESTOR>"+
// "<InvCerNO>130230198903151219</InvCerNO>"+
// "<parZrfsName/>"+
// "<assignRate>1</assignRate>"+
// "<InvAddress>1</InvAddress>"+
// "<investMoney>10.0</investMoney>"+
// "<investType>05</investType>"+
// "<investRate>1</investRate>"+
// "<time>2027-06-15</time>"+
// "<parPgfsCode/>"+
// "<affiliationName>51</affiliationName>"+
// "<invCerTypeName>事业法人登记证</invCerTypeName>"+
// "<zgbm_djjgCode/>"+
// "<zgbm_djjgName/>"+
// "<investName>55</investName>"+
// "<affiliation>51</affiliation>"+
// "<zgbm_frlxCode>12</zgbm_frlxCode>"+
// "<invCurrency>人民币</invCurrency>"+
// "<parZrfsCode/>"+
// "<certificatetypeName>身份证</certificatetypeName>"+
// "<zgbm_frlxName>事业法人</zgbm_frlxName>"+
// "<invCurrencyCode>156</invCurrencyCode>"+
// "<parPgfsName/>"+
// "<investNatureCode/>"+
// "<certificatecode/>"+
// "<gsInvestorID>fc197aac3fa801421a75e1997b7aa1dc</gsInvestorID>"+
// "<address>中国</address>"+
// "<rmb>10.0</rmb>"+
// "<parActConAm>0.0</parActConAm>"+
// "<investTypeName>05</investTypeName>"+
// "<addressCode>156</addressCode>"+
// "<invCerTypeCode>61</invCerTypeCode>"+
// "<investNature/>"+
// "<certificatetype>01</certificatetype>"+
// "</INFOR_INVESTOR>"+
// "</ROOT>";
// return EnpInfor;
String result =
"<?xml version=\"1.0\" encoding=\"utf-8\"?>"+
"<ROOT>"+
"<INFOR_MAIN>"+
"<natrualrate>50</natrualrate>"+
"<corporationname>天津阳下暖阳文化有限公司</corporationname>"+
"<certificatefinancetypeName>身份证</certificatefinancetypeName>"+
"<invCountryNameZj>缅甸</invCountryNameZj>"+
"<webAddress/>"+
"<appDepNameSw>天津市南开区市场和质量监督管</appDepNameSw>"+
"<taxAgentPhone/>"+
"<districtNameSw>南开区</districtNameSw>"+
"<couIndustry>0111</couIndustry>"+
"<certificatefinancecode>13052119890430140X</certificatefinancecode>"+
"<workNameCode>90</workNameCode>"+
"<institutionname>111</institutionname>"+
"<singleTax>1</singleTax>"+
"<workphone>11111111</workphone>"+
"<regMoney>2.0</regMoney>"+
"<appDepCode>111111111</appDepCode>"+
"<product1Name/>"+
"<financename>琪琪</financename>"+
"<organizationCode/>"+
"<regphone/>"+
"<certificatecode>111111</certificatecode>"+
"<isFtz>0</isFtz>"+
"<gsCheckTime/>"+
"<delegateName>阳下暖阳</delegateName>"+
"<forEntName/>"+
"<certificatetype>4</certificatetype>"+
"<applypeopleAd/>"+
"<revenuename>111</revenuename>"+
"<certificaterevenuetype>01</certificaterevenuetype>"+
"<appDepCodeSw>0006</appDepCodeSw>"+
"<calculatetypeSw>11</calculatetypeSw>"+
"<rundeadlineend>2018-02-28</rundeadlineend>"+
"<districtNameZj>天津市南开区</districtNameZj>"+
"<certificatefinancetype>01</certificatefinancetype>"+
"<regAddress>111111</regAddress>"+
"<UniSCID>91120000MA06A68T19</UniSCID>"+
"<certificatetypeZj>C</certificatetypeZj>"+
"<workNumber>1</workNumber>"+
"<gsCreateTime>2018-02-08 17:39:37</gsCreateTime>"+
"<gsCreateUserName>威奕达软件管理员</gsCreateUserName>"+
"<calculatetype/>"+
"<rundeadlinestart>2018-02-07</rundeadlinestart>"+
"<accountingtype>01</accountingtype>"+
"<financeemail/>"+
"<moneyTypeCodeZS>156</moneyTypeCodeZS>"+
"<certificatetypeSw>01</certificatetypeSw>"+
"<regpostalcode>000000</regpostalcode>"+
"<applypeople>111</applypeople>"+
"<unittype>01</unittype>"+
"<foreignrate>50</foreignrate>"+
"<product2Name/>"+
"<isopen>1</isopen>"+
"<depType>B</depType>"+
"<applypeoplectypeName>其它</applypeoplectypeName>"+
"<copyNum>0.0</copyNum>"+
"<companytypeName>外资企业</companytypeName>"+
"<workAddress>111</workAddress>"+
"<revenuephone>111111</revenuephone>"+
"<accountingtypeName>企业会计制度</accountingtypeName>"+
"<icNum>0</icNum>"+
"<moneyTypeCode/>"+
"<workpostalcode>111111</workpostalcode>"+
"<foundDate>2018-02-07</foundDate>"+
"<industry94>A0159</industry94>"+
"<certificatetypeNameZj>其它</certificatetypeNameZj>"+
"<industry02>A0114</industry02>"+
"<regNem>120000400169869</regNem>"+
"<financecellphone>13211111111</financecellphone>"+
"<ftzRegType>1</ftzRegType>"+
"<districtCodeZj>120104</districtCodeZj>"+
"<certificaterevenuetypeName>身份证</certificaterevenuetypeName>"+
"<jdxzdm>120104001</jdxzdm>"+
"<gsCreateUserId>eee900e553ee8a3c5961340ddc39efa4</gsCreateUserId>"+
"<cellphone>13211111111</cellphone>"+
"<workName>其他批准证件类别</workName>"+
"<taxAgentName/>"+
"<appDepName>111111111</appDepName>"+
"<adminDepName/>"+
"<forEntAddress/>"+
"<applypeoplectype>C</applypeoplectype>"+
"<gsCheckUserName/>"+
"<applypeoplephone/>"+
"<countryrate>0</countryrate>"+
"<moneyTypeNameZS>人民币</moneyTypeNameZS>"+
"<invCountryCodeZj>104</invCountryCodeZj>"+
"<industryClass/>"+
"<districtName>南开区</districtName>"+
"<couIndustryName>稻谷种植</couIndustryName>"+
"<taxAgentTaxCode/>"+
"<moneyTypeName/>"+
"<revenueemail/>"+
"<email/>"+
"<certificatetypeNameSw>身份证</certificatetypeNameSw>"+
"<isSmall/>"+
"<applypeoplecellphone>13211111111</applypeoplecellphone>"+
"<workarea>测试(依法须经批准的项目,经相关部门批准后方可开展经营活动)</workarea>"+
"<certificaterevenuecode>452131199002034471</certificaterevenuecode>"+
"<payid_institution/>"+
"<foreignpeoplenum>0.0</foreignpeoplenum>"+
"<applypeoplecid>111</applypeoplecid>"+
"<economyType00>300</economyType00>"+
"<adminDepCode/>"+
"<mainWorkArea>测试</mainWorkArea>"+
"<gsid>582766</gsid>"+
"<product3Name/>"+
"<mainRegAd>111</mainRegAd>"+
"<invCountryCode>104</invCountryCode>"+
"<taxAgentEmail/>"+
"<invCountryName>缅甸</invCountryName>"+
"<companytype>330</companytype>"+
"<linkphone>13211111111</linkphone>"+
"<jdxzmc>长虹街道</jdxzmc>"+
"<economyType94>7</economyType94>"+
"<districtCodeSw>10400</districtCodeSw>"+
"<districtCode>120104</districtCode>"+
"<financephone>13211111111</financephone>"+
"<regtempid>6</regtempid>"+
"<applypeoplepostcode>111111</applypeoplepostcode>"+
"<revenuecellphone>13211111111</revenuecellphone>"+
"<unittypeName>企业</unittypeName>"+
"</INFOR_MAIN>"+
"<INFOR_INVESTOR>"+
"<InvCerNO>111111</InvCerNO>"+
"<parZrfsName/>"+
"<assignRate>0</assignRate>"+
"<InvAddress/>"+
"<investMoney>0.241217</investMoney>"+
"<investType>05</investType>"+
"<investRate>1</investRate>"+
"<time/>"+
"<parPgfsCode/>"+
"<affiliationName>中央</affiliationName>"+
"<invCerTypeName>其他</invCerTypeName>"+
"<zgbm_djjgCode/>"+
"<zgbm_djjgName/>"+
"<investName>阳下暖阳</investName>"+
"<affiliation>10</affiliation>"+
"<zgbm_frlxCode>99</zgbm_frlxCode>"+
"<invCurrency>人民币元</invCurrency>"+
"<parZrfsCode/>"+
"<certificatetypeName>身份证</certificatetypeName>"+
"<zgbm_frlxName>其他投资者</zgbm_frlxName>"+
"<invCurrencyCode>156</invCurrencyCode>"+
"<parPgfsName/>"+
"<investNatureCode>330</investNatureCode>"+
"<certificatecode>142202199003020112</certificatecode>"+
"<gsInvestorID>7000ef837f0000011a75e199351b4d7d</gsInvestorID>"+
"<address>缅甸</address>"+
"<rmb>0.0</rmb>"+
"<parActConAm>0.0</parActConAm>"+
"<investTypeName>资金</investTypeName>"+
"<addressCode>104</addressCode>"+
"<invCerTypeCode>9</invCerTypeCode>"+
"<investNature>外资企业</investNature>"+
"<certificatetype>01</certificatetype>"+
"</INFOR_INVESTOR>"+
"</ROOT>";
return result;
}
/**
* 企业换照接口
* @param uniSCID
* @param Md5Code
* @param ChangeLicInfor
* @return
*/
private static Integer SpEnpChangeLic(String uniSCID, String Md5Code, String ChangeLicInfor,SwjService s){
int result = s.spEnpChangeLic(uniSCID, Md5Code, ChangeLicInfor);
return result;
}
//返回企业换照测试xml信息
private static String getChangeLic(){
String result = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<ROOT>" +
"<belongdept>120000</belongdept>" +
"<zjCode>712809836</zjCode>" +
"<changedate>2017-12-04</changedate>" +
"<regOrgName>天津市市场和质量监督管理委员会</regOrgName>" +
"<regno>120000000018500</regno>" +
"<uniSCID>911200007128098369</uniSCID>" +
"<entname>天津市森特投资发展集团有限公司</entname>" +
"</ROOT>";
return result;
}
/**
* 企业变更方法
* @param uniSCID
* @param regNO
* @param Md5Code
* @param EnpInforChange
* @param s
* @return
*/
private static Integer SpEnpChangeRev(String uniSCID,String regNO,String Md5Code,String EnpInforChange,SwjService s){
int result = s.spEnpChangeRev(uniSCID, regNO, Md5Code, EnpInforChange);
return result;
}
//返回企业变更测试xml
public static String getEnpInforChange(){
String result = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<ROOT>"+
"<ALTER_INFO_MAIN>"+
"<apprDate>2017-12-29</apprDate>"+
"<curUserName></curUserName>"+
"<gsid>201383</gsid>"+
"<entName>天津同利祥煤炭贸易有限公司</entName>"+
"<regOrgName>市自贸区市场监管局</regOrgName>"+
"<uniSCID>911201163007225665</uniSCID>"+
"<curTime></curTime>"+
"<regOrgCode>120118</regOrgCode>"+
"<regNO>120116000252433</regNO>"+
"</ALTER_INFO_MAIN>"+
"<ALTER_INFO_BASE>"+
"<altBe_streetName></altBe_streetName>"+
"<altAf_streetCode>120116503</altAf_streetCode>"+
"<altBe_districtName>滨海新区</altBe_districtName>"+
"<altAf_districtCode>120116</altAf_districtCode>"+
"<altAf_address>天津市滨海新区中心商务区响螺湾旷世国际大厦B座</altAf_address>"+
"<altAf_operationSign>变更</altAf_operationSign>"+
"<altAf_streetName>中心商务区</altAf_streetName>"+
"<altAf_districtName>滨海新区</altAf_districtName>"+
"<altBe_operationSign>迁入</altBe_operationSign>"+
"<altBe_streetCode></altBe_streetCode>"+
"<altBe_address>天津市滨海新区中心商务区响螺湾旷世国际大厦B座305-321</altBe_address>"+
"<altBe_districtCode>120116</altBe_districtCode>"+
"</ALTER_INFO_BASE>"+
"</ROOT>";
return result;
}
/**
* 企业注销接口
* @param uniSCID
* @param Md5Code
* @param LogoutInfo
* @param s
* @return
*/
private static Integer SpEnpLogoutRev(String uniSCID,String Md5Code,String LogoutInfo,SwjService s){
int result = s.spEnpLogoutRev(uniSCID,Md5Code,LogoutInfo);
return result;
}
//返回企业注销接口测试xml
private static String getLogoutInfo(){
String result = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<ROOT>" +
"<belongdept>120104</belongdept>" +
"<zjCode>MA05Q4AK1</zjCode>" +
"<canDate>2017-12-15</canDate>" +
"<entName>常驻代表机构注销数据测试</entName>" +
"<regOrgName>天津市南开区市场和质量监督管理局</regOrgName>" +
"<regno>120000500008987</regno>" +
"<uniSCID>91120000MA05Q4AK1Q</uniSCID>" +
"</ROOT>";
return result;
}
/**
* 个体设立接口
* @param uniSCID
* @param Md5Code
* @param GtInfor
* @param s
* @return
*/
private static Integer spGtInforRev(String uniSCID,String Md5Code,String GtInfor,SwjService s){
int result = s.spGtInforRev(uniSCID,Md5Code,GtInfor);
return result;
}
//返回个体设立测试xml
private static String getGtInfor(){
String result = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<ROOT>" +
"<INFOR_GT_MAIN>" +
"<EstDate>2017-02-07</EstDate>" +
"<IndustryCo>5229</IndustryCo>" +
"<RegState>1</RegState>" +
"<TraName>天津策士食品经营中心</TraName>" +
"<RegOrg>120101</RegOrg>" +
"<OpLoc>1111111</OpLoc>" +
"<CompForm>1</CompForm>" +
"<EmpNum>2</EmpNum>" +
"<streetName>劝业场街道</streetName>" +
"<UniSCID>92120101MA05K8JB3T</UniSCID>" +
"<streetCode>120101001</streetCode>" +
"<PostalCode>1111</PostalCode>" +
"<RegNO>120101600194863</RegNO>" +
"<OpLocDistrict>120101</OpLocDistrict>" +
"<forEntName></forEntName>" +
"<ApprDate>2017-02-07</ApprDate>" +
"<EntType>9500</EntType>" +
"<Tel>111</Tel>" +
"<OpScope>111111(依法须经批准的项目,经相关部门批准后方可开展经营活动)</OpScope>" +
"<NotNO></NotNO>" +
"<forEntAddress></forEntAddress>" +
"</INFOR_GT_MAIN>" +
"<INFOR_GT_INVESTOR>" +
"<CerType>4</CerType>" +
"<Name>这是</Name>" +
"<PostalCode>111111</PostalCode>" +
"<CerNO>1</CerNO>" +
"<Email></Email>" +
"<MobTel></MobTel>" +
"<Dom>123</Dom>" +
"<Tel>111</Tel>" +
"</INFOR_GT_INVESTOR>" +
"</ROOT>";
return result;
}
/**
* 个体变更接口
* @param uniSCID
* @param regNO
* @param Md5Code
* @param GtInforChange
* @param s
* @return
*/
private static Integer SpGtChangeRev(String uniSCID,String regNO,String Md5Code,String GtInforChange,SwjService s){
int result = s.spGtChangeRev(uniSCID,regNO,Md5Code,GtInforChange);
return result;
}
//返回个体变更测试xml
private static String getGtInforChange(){
String result = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<ROOT>" +
"<ALTER_INFO_GT_MAIN>" +
"<apprDate>2017-06-05</apprDate>" +
"<regOrgName>市自贸区市场监管局</regOrgName>" +
"<uniSCID>92120118MA05Q41B0F</uniSCID>" +
"<regOrgCode>120118</regOrgCode>" +
"<regNO>120118600012684</regNO>" +
"</ALTER_INFO_GT_MAIN>" +
"<ALTER_INFO_GT_BASE>" +
"<AltItem>10</AltItem>" +
"<AltDate>2017-06-05</AltDate>" +
"<AltAf>劳务服务;(依法须经批准的项目,经相关部门批准后方可开展经营活动)</AltAf>" +
"<AltBe>劳务服务;</AltBe>" +
"<NotNO>( 自贸 )登记个体变字[2017]第00000378号</NotNO>" +
"</ALTER_INFO_GT_BASE>" +
"<ALTER_INFO_GT_BASE>" +
"<AltItem>10</AltItem>" +
"<AltDate>2017-06-05</AltDate>" +
"<AltAf>劳务服务;(依法须经批准的项目,经相关部门批准后方可开展经营活动)</AltAf>" +
"<AltBe>劳务服务;</AltBe>" +
"<NotNO>( 自贸 )登记个体变字[2017]第00000378号</NotNO>" +
"</ALTER_INFO_GT_BASE>" +
"</ROOT>";
return result;
}
/**
* 个体注销接口
* @param uniSCID
* @param Md5Code
* @param GtLogoutInfo
* @param s
* @return
*/
private static Integer SpGtLogoutRev(String uniSCID,String Md5Code,String GtLogoutInfo,SwjService s){
int result = s.spGtLogoutRev(uniSCID, Md5Code, GtLogoutInfo);
return result;
}
//返回个体注销测试xml
private static String getGtLogoutRev(){
String result = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<ROOT>" +
"<uniSCID>120000</uniSCID>" +
"<CanRegRea>712809836</CanRegRea>" +
"<TraName>北京市开县</TraName>" +
"<RegState>2</RegState>" +
"<ApprDate>2017-06-05 12:23:12</ApprDate>" +
"</ROOT>";
return result;
}
/**
* 企业设立基本信息
* @param GsEnpid
* @param Md5Code
* @param mainInfo
* @param s
* @return
*/
private static Integer spBeforeCreateRev(String GsEnpid, String Md5Code, String mainInfo,SwjService s){
int result = s.spBeforeCreateRev(GsEnpid,Md5Code,mainInfo);
return result;
}
private static String getMainInfo(){
String result = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<ROOT>" +
"<corporationname>120000</corporationname>" +
"<companytypeName>712809836</companytypeName>" +
"<couIndustryName>北京市开县</couIndustryName>" +
"<type>2</type>" +
"<regtempid>www</regtempid>" +
"<delegateName>王老者</delegateName>" +
"<applypeople>渥太维</applypeople>" +
"<applypeoplecid>詹姆斯</applypeoplecid>" +
"<applypeoplephone>18925059838</applypeoplephone>" +
"<districtName>太极股份</districtName>" +
"<gsCreateUserId>1234</gsCreateUserId>" +
"</ROOT>";
return result;
}
}
@@ -0,0 +1,323 @@
package taiji.swj.service;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.namespace.QName;
/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the com.taiji.swj.service package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
*
*/
@XmlRegistry
public class ObjectFactory {
private final static QName _SpBeforeCreateRev_QNAME = new QName("http://service.swj.taiji.com/", "SpBeforeCreateRev");
private final static QName _SpBeforeCreateRevResponse_QNAME = new QName("http://service.swj.taiji.com/", "SpBeforeCreateRevResponse");
private final static QName _SpEnpChangeLic_QNAME = new QName("http://service.swj.taiji.com/", "SpEnpChangeLic");
private final static QName _SpEnpChangeLicResponse_QNAME = new QName("http://service.swj.taiji.com/", "SpEnpChangeLicResponse");
private final static QName _SpEnpChangeRev_QNAME = new QName("http://service.swj.taiji.com/", "SpEnpChangeRev");
private final static QName _SpEnpChangeRevResponse_QNAME = new QName("http://service.swj.taiji.com/", "SpEnpChangeRevResponse");
private final static QName _SpEnpInforRev_QNAME = new QName("http://service.swj.taiji.com/", "SpEnpInforRev");
private final static QName _SpEnpInforRevResponse_QNAME = new QName("http://service.swj.taiji.com/", "SpEnpInforRevResponse");
private final static QName _SpEnpLogoutRev_QNAME = new QName("http://service.swj.taiji.com/", "SpEnpLogoutRev");
private final static QName _SpEnpLogoutRevResponse_QNAME = new QName("http://service.swj.taiji.com/", "SpEnpLogoutRevResponse");
private final static QName _SpGtChangeRev_QNAME = new QName("http://service.swj.taiji.com/", "SpGtChangeRev");
private final static QName _SpGtChangeRevResponse_QNAME = new QName("http://service.swj.taiji.com/", "SpGtChangeRevResponse");
private final static QName _SpGtInforRev_QNAME = new QName("http://service.swj.taiji.com/", "SpGtInforRev");
private final static QName _SpGtInforRevResponse_QNAME = new QName("http://service.swj.taiji.com/", "SpGtInforRevResponse");
private final static QName _SpGtLogoutRev_QNAME = new QName("http://service.swj.taiji.com/", "SpGtLogoutRev");
private final static QName _SpGtLogoutRevResponse_QNAME = new QName("http://service.swj.taiji.com/", "SpGtLogoutRevResponse");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.taiji.swj.service
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link SpBeforeCreateRev }
*
*/
public SpBeforeCreateRev createSpBeforeCreateRev() {
return new SpBeforeCreateRev();
}
/**
* Create an instance of {@link SpBeforeCreateRevResponse }
*
*/
public SpBeforeCreateRevResponse createSpBeforeCreateRevResponse() {
return new SpBeforeCreateRevResponse();
}
/**
* Create an instance of {@link SpEnpChangeLic }
*
*/
public SpEnpChangeLic createSpEnpChangeLic() {
return new SpEnpChangeLic();
}
/**
* Create an instance of {@link SpEnpChangeLicResponse }
*
*/
public SpEnpChangeLicResponse createSpEnpChangeLicResponse() {
return new SpEnpChangeLicResponse();
}
/**
* Create an instance of {@link SpEnpChangeRev }
*
*/
public SpEnpChangeRev createSpEnpChangeRev() {
return new SpEnpChangeRev();
}
/**
* Create an instance of {@link SpEnpChangeRevResponse }
*
*/
public SpEnpChangeRevResponse createSpEnpChangeRevResponse() {
return new SpEnpChangeRevResponse();
}
/**
* Create an instance of {@link SpEnpInforRev }
*
*/
public SpEnpInforRev createSpEnpInforRev() {
return new SpEnpInforRev();
}
/**
* Create an instance of {@link SpEnpInforRevResponse }
*
*/
public SpEnpInforRevResponse createSpEnpInforRevResponse() {
return new SpEnpInforRevResponse();
}
/**
* Create an instance of {@link SpEnpLogoutRev }
*
*/
public SpEnpLogoutRev createSpEnpLogoutRev() {
return new SpEnpLogoutRev();
}
/**
* Create an instance of {@link SpEnpLogoutRevResponse }
*
*/
public SpEnpLogoutRevResponse createSpEnpLogoutRevResponse() {
return new SpEnpLogoutRevResponse();
}
/**
* Create an instance of {@link SpGtChangeRev }
*
*/
public SpGtChangeRev createSpGtChangeRev() {
return new SpGtChangeRev();
}
/**
* Create an instance of {@link SpGtChangeRevResponse }
*
*/
public SpGtChangeRevResponse createSpGtChangeRevResponse() {
return new SpGtChangeRevResponse();
}
/**
* Create an instance of {@link SpGtInforRev }
*
*/
public SpGtInforRev createSpGtInforRev() {
return new SpGtInforRev();
}
/**
* Create an instance of {@link SpGtInforRevResponse }
*
*/
public SpGtInforRevResponse createSpGtInforRevResponse() {
return new SpGtInforRevResponse();
}
/**
* Create an instance of {@link SpGtLogoutRev }
*
*/
public SpGtLogoutRev createSpGtLogoutRev() {
return new SpGtLogoutRev();
}
/**
* Create an instance of {@link SpGtLogoutRevResponse }
*
*/
public SpGtLogoutRevResponse createSpGtLogoutRevResponse() {
return new SpGtLogoutRevResponse();
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SpBeforeCreateRev }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://service.swj.taiji.com/", name = "SpBeforeCreateRev")
public JAXBElement<SpBeforeCreateRev> createSpBeforeCreateRev(SpBeforeCreateRev value) {
return new JAXBElement<SpBeforeCreateRev>(_SpBeforeCreateRev_QNAME, SpBeforeCreateRev.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SpBeforeCreateRevResponse }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://service.swj.taiji.com/", name = "SpBeforeCreateRevResponse")
public JAXBElement<SpBeforeCreateRevResponse> createSpBeforeCreateRevResponse(SpBeforeCreateRevResponse value) {
return new JAXBElement<SpBeforeCreateRevResponse>(_SpBeforeCreateRevResponse_QNAME, SpBeforeCreateRevResponse.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SpEnpChangeLic }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://service.swj.taiji.com/", name = "SpEnpChangeLic")
public JAXBElement<SpEnpChangeLic> createSpEnpChangeLic(SpEnpChangeLic value) {
return new JAXBElement<SpEnpChangeLic>(_SpEnpChangeLic_QNAME, SpEnpChangeLic.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SpEnpChangeLicResponse }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://service.swj.taiji.com/", name = "SpEnpChangeLicResponse")
public JAXBElement<SpEnpChangeLicResponse> createSpEnpChangeLicResponse(SpEnpChangeLicResponse value) {
return new JAXBElement<SpEnpChangeLicResponse>(_SpEnpChangeLicResponse_QNAME, SpEnpChangeLicResponse.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SpEnpChangeRev }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://service.swj.taiji.com/", name = "SpEnpChangeRev")
public JAXBElement<SpEnpChangeRev> createSpEnpChangeRev(SpEnpChangeRev value) {
return new JAXBElement<SpEnpChangeRev>(_SpEnpChangeRev_QNAME, SpEnpChangeRev.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SpEnpChangeRevResponse }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://service.swj.taiji.com/", name = "SpEnpChangeRevResponse")
public JAXBElement<SpEnpChangeRevResponse> createSpEnpChangeRevResponse(SpEnpChangeRevResponse value) {
return new JAXBElement<SpEnpChangeRevResponse>(_SpEnpChangeRevResponse_QNAME, SpEnpChangeRevResponse.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SpEnpInforRev }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://service.swj.taiji.com/", name = "SpEnpInforRev")
public JAXBElement<SpEnpInforRev> createSpEnpInforRev(SpEnpInforRev value) {
return new JAXBElement<SpEnpInforRev>(_SpEnpInforRev_QNAME, SpEnpInforRev.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SpEnpInforRevResponse }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://service.swj.taiji.com/", name = "SpEnpInforRevResponse")
public JAXBElement<SpEnpInforRevResponse> createSpEnpInforRevResponse(SpEnpInforRevResponse value) {
return new JAXBElement<SpEnpInforRevResponse>(_SpEnpInforRevResponse_QNAME, SpEnpInforRevResponse.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SpEnpLogoutRev }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://service.swj.taiji.com/", name = "SpEnpLogoutRev")
public JAXBElement<SpEnpLogoutRev> createSpEnpLogoutRev(SpEnpLogoutRev value) {
return new JAXBElement<SpEnpLogoutRev>(_SpEnpLogoutRev_QNAME, SpEnpLogoutRev.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SpEnpLogoutRevResponse }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://service.swj.taiji.com/", name = "SpEnpLogoutRevResponse")
public JAXBElement<SpEnpLogoutRevResponse> createSpEnpLogoutRevResponse(SpEnpLogoutRevResponse value) {
return new JAXBElement<SpEnpLogoutRevResponse>(_SpEnpLogoutRevResponse_QNAME, SpEnpLogoutRevResponse.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SpGtChangeRev }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://service.swj.taiji.com/", name = "SpGtChangeRev")
public JAXBElement<SpGtChangeRev> createSpGtChangeRev(SpGtChangeRev value) {
return new JAXBElement<SpGtChangeRev>(_SpGtChangeRev_QNAME, SpGtChangeRev.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SpGtChangeRevResponse }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://service.swj.taiji.com/", name = "SpGtChangeRevResponse")
public JAXBElement<SpGtChangeRevResponse> createSpGtChangeRevResponse(SpGtChangeRevResponse value) {
return new JAXBElement<SpGtChangeRevResponse>(_SpGtChangeRevResponse_QNAME, SpGtChangeRevResponse.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SpGtInforRev }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://service.swj.taiji.com/", name = "SpGtInforRev")
public JAXBElement<SpGtInforRev> createSpGtInforRev(SpGtInforRev value) {
return new JAXBElement<SpGtInforRev>(_SpGtInforRev_QNAME, SpGtInforRev.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SpGtInforRevResponse }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://service.swj.taiji.com/", name = "SpGtInforRevResponse")
public JAXBElement<SpGtInforRevResponse> createSpGtInforRevResponse(SpGtInforRevResponse value) {
return new JAXBElement<SpGtInforRevResponse>(_SpGtInforRevResponse_QNAME, SpGtInforRevResponse.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SpGtLogoutRev }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://service.swj.taiji.com/", name = "SpGtLogoutRev")
public JAXBElement<SpGtLogoutRev> createSpGtLogoutRev(SpGtLogoutRev value) {
return new JAXBElement<SpGtLogoutRev>(_SpGtLogoutRev_QNAME, SpGtLogoutRev.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SpGtLogoutRevResponse }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://service.swj.taiji.com/", name = "SpGtLogoutRevResponse")
public JAXBElement<SpGtLogoutRevResponse> createSpGtLogoutRevResponse(SpGtLogoutRevResponse value) {
return new JAXBElement<SpGtLogoutRevResponse>(_SpGtLogoutRevResponse_QNAME, SpGtLogoutRevResponse.class, null, value);
}
}
@@ -0,0 +1,114 @@
package taiji.swj.service;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>SpBeforeCreateRev complex type�� Java �ࡣ
*
* <p>����ģʽƬ��ָ�����ڴ����е�Ԥ�����ݡ�
*
* <pre>
* &lt;complexType name="SpBeforeCreateRev"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="arg0" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="arg1" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="arg2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SpBeforeCreateRev", propOrder = {
"arg0",
"arg1",
"arg2"
})
public class SpBeforeCreateRev {
protected String arg0;
protected String arg1;
protected String arg2;
/**
* ��ȡarg0���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg0() {
return arg0;
}
/**
* ����arg0���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg0(String value) {
this.arg0 = value;
}
/**
* ��ȡarg1���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg1() {
return arg1;
}
/**
* ����arg1���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg1(String value) {
this.arg1 = value;
}
/**
* ��ȡarg2���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg2() {
return arg2;
}
/**
* ����arg2���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg2(String value) {
this.arg2 = value;
}
}
@@ -0,0 +1,54 @@
package taiji.swj.service;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>SpBeforeCreateRevResponse complex type�� Java �ࡣ
*
* <p>����ģʽƬ��ָ�����ڴ����е�Ԥ�����ݡ�
*
* <pre>
* &lt;complexType name="SpBeforeCreateRevResponse"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="return" type="{http://www.w3.org/2001/XMLSchema}int"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SpBeforeCreateRevResponse", propOrder = {
"_return"
})
public class SpBeforeCreateRevResponse {
@XmlElement(name = "return")
protected int _return;
/**
* ��ȡreturn���Ե�ֵ��
*
*/
public int getReturn() {
return _return;
}
/**
* ����return���Ե�ֵ��
*
*/
public void setReturn(int value) {
this._return = value;
}
}
@@ -0,0 +1,114 @@
package taiji.swj.service;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>SpEnpChangeLic complex type�� Java �ࡣ
*
* <p>����ģʽƬ��ָ�����ڴ����е�Ԥ�����ݡ�
*
* <pre>
* &lt;complexType name="SpEnpChangeLic"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="arg0" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="arg1" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="arg2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SpEnpChangeLic", propOrder = {
"arg0",
"arg1",
"arg2"
})
public class SpEnpChangeLic {
protected String arg0;
protected String arg1;
protected String arg2;
/**
* ��ȡarg0���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg0() {
return arg0;
}
/**
* ����arg0���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg0(String value) {
this.arg0 = value;
}
/**
* ��ȡarg1���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg1() {
return arg1;
}
/**
* ����arg1���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg1(String value) {
this.arg1 = value;
}
/**
* ��ȡarg2���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg2() {
return arg2;
}
/**
* ����arg2���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg2(String value) {
this.arg2 = value;
}
}
@@ -0,0 +1,54 @@
package taiji.swj.service;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>SpEnpChangeLicResponse complex type�� Java �ࡣ
*
* <p>����ģʽƬ��ָ�����ڴ����е�Ԥ�����ݡ�
*
* <pre>
* &lt;complexType name="SpEnpChangeLicResponse"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="return" type="{http://www.w3.org/2001/XMLSchema}int"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SpEnpChangeLicResponse", propOrder = {
"_return"
})
public class SpEnpChangeLicResponse {
@XmlElement(name = "return")
protected int _return;
/**
* ��ȡreturn���Ե�ֵ��
*
*/
public int getReturn() {
return _return;
}
/**
* ����return���Ե�ֵ��
*
*/
public void setReturn(int value) {
this._return = value;
}
}
@@ -0,0 +1,141 @@
package taiji.swj.service;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>SpEnpChangeRev complex type�� Java �ࡣ
*
* <p>����ģʽƬ��ָ�����ڴ����е�Ԥ�����ݡ�
*
* <pre>
* &lt;complexType name="SpEnpChangeRev"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="arg0" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="arg1" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="arg2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="arg3" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SpEnpChangeRev", propOrder = {
"arg0",
"arg1",
"arg2",
"arg3"
})
public class SpEnpChangeRev {
protected String arg0;
protected String arg1;
protected String arg2;
protected String arg3;
/**
* ��ȡarg0���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg0() {
return arg0;
}
/**
* ����arg0���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg0(String value) {
this.arg0 = value;
}
/**
* ��ȡarg1���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg1() {
return arg1;
}
/**
* ����arg1���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg1(String value) {
this.arg1 = value;
}
/**
* ��ȡarg2���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg2() {
return arg2;
}
/**
* ����arg2���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg2(String value) {
this.arg2 = value;
}
/**
* ��ȡarg3���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg3() {
return arg3;
}
/**
* ����arg3���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg3(String value) {
this.arg3 = value;
}
}
@@ -0,0 +1,54 @@
package taiji.swj.service;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>SpEnpChangeRevResponse complex type�� Java �ࡣ
*
* <p>����ģʽƬ��ָ�����ڴ����е�Ԥ�����ݡ�
*
* <pre>
* &lt;complexType name="SpEnpChangeRevResponse"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="return" type="{http://www.w3.org/2001/XMLSchema}int"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SpEnpChangeRevResponse", propOrder = {
"_return"
})
public class SpEnpChangeRevResponse {
@XmlElement(name = "return")
protected int _return;
/**
* ��ȡreturn���Ե�ֵ��
*
*/
public int getReturn() {
return _return;
}
/**
* ����return���Ե�ֵ��
*
*/
public void setReturn(int value) {
this._return = value;
}
}
@@ -0,0 +1,114 @@
package taiji.swj.service;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>SpEnpInforRev complex type�� Java �ࡣ
*
* <p>����ģʽƬ��ָ�����ڴ����е�Ԥ�����ݡ�
*
* <pre>
* &lt;complexType name="SpEnpInforRev"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="arg0" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="arg1" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="arg2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SpEnpInforRev", propOrder = {
"arg0",
"arg1",
"arg2"
})
public class SpEnpInforRev {
protected String arg0;
protected String arg1;
protected String arg2;
/**
* ��ȡarg0���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg0() {
return arg0;
}
/**
* ����arg0���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg0(String value) {
this.arg0 = value;
}
/**
* ��ȡarg1���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg1() {
return arg1;
}
/**
* ����arg1���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg1(String value) {
this.arg1 = value;
}
/**
* ��ȡarg2���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg2() {
return arg2;
}
/**
* ����arg2���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg2(String value) {
this.arg2 = value;
}
}
@@ -0,0 +1,54 @@
package taiji.swj.service;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>SpEnpInforRevResponse complex type�� Java �ࡣ
*
* <p>����ģʽƬ��ָ�����ڴ����е�Ԥ�����ݡ�
*
* <pre>
* &lt;complexType name="SpEnpInforRevResponse"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="return" type="{http://www.w3.org/2001/XMLSchema}int"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SpEnpInforRevResponse", propOrder = {
"_return"
})
public class SpEnpInforRevResponse {
@XmlElement(name = "return")
protected int _return;
/**
* ��ȡreturn���Ե�ֵ��
*
*/
public int getReturn() {
return _return;
}
/**
* ����return���Ե�ֵ��
*
*/
public void setReturn(int value) {
this._return = value;
}
}
@@ -0,0 +1,114 @@
package taiji.swj.service;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>SpEnpLogoutRev complex type�� Java �ࡣ
*
* <p>����ģʽƬ��ָ�����ڴ����е�Ԥ�����ݡ�
*
* <pre>
* &lt;complexType name="SpEnpLogoutRev"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="arg0" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="arg1" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="arg2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SpEnpLogoutRev", propOrder = {
"arg0",
"arg1",
"arg2"
})
public class SpEnpLogoutRev {
protected String arg0;
protected String arg1;
protected String arg2;
/**
* ��ȡarg0���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg0() {
return arg0;
}
/**
* ����arg0���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg0(String value) {
this.arg0 = value;
}
/**
* ��ȡarg1���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg1() {
return arg1;
}
/**
* ����arg1���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg1(String value) {
this.arg1 = value;
}
/**
* ��ȡarg2���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg2() {
return arg2;
}
/**
* ����arg2���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg2(String value) {
this.arg2 = value;
}
}
@@ -0,0 +1,54 @@
package taiji.swj.service;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>SpEnpLogoutRevResponse complex type�� Java �ࡣ
*
* <p>����ģʽƬ��ָ�����ڴ����е�Ԥ�����ݡ�
*
* <pre>
* &lt;complexType name="SpEnpLogoutRevResponse"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="return" type="{http://www.w3.org/2001/XMLSchema}int"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SpEnpLogoutRevResponse", propOrder = {
"_return"
})
public class SpEnpLogoutRevResponse {
@XmlElement(name = "return")
protected int _return;
/**
* ��ȡreturn���Ե�ֵ��
*
*/
public int getReturn() {
return _return;
}
/**
* ����return���Ե�ֵ��
*
*/
public void setReturn(int value) {
this._return = value;
}
}
@@ -0,0 +1,141 @@
package taiji.swj.service;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>SpGtChangeRev complex type�� Java �ࡣ
*
* <p>����ģʽƬ��ָ�����ڴ����е�Ԥ�����ݡ�
*
* <pre>
* &lt;complexType name="SpGtChangeRev"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="arg0" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="arg1" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="arg2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="arg3" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SpGtChangeRev", propOrder = {
"arg0",
"arg1",
"arg2",
"arg3"
})
public class SpGtChangeRev {
protected String arg0;
protected String arg1;
protected String arg2;
protected String arg3;
/**
* ��ȡarg0���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg0() {
return arg0;
}
/**
* ����arg0���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg0(String value) {
this.arg0 = value;
}
/**
* ��ȡarg1���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg1() {
return arg1;
}
/**
* ����arg1���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg1(String value) {
this.arg1 = value;
}
/**
* ��ȡarg2���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg2() {
return arg2;
}
/**
* ����arg2���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg2(String value) {
this.arg2 = value;
}
/**
* ��ȡarg3���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg3() {
return arg3;
}
/**
* ����arg3���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg3(String value) {
this.arg3 = value;
}
}
@@ -0,0 +1,54 @@
package taiji.swj.service;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>SpGtChangeRevResponse complex type�� Java �ࡣ
*
* <p>����ģʽƬ��ָ�����ڴ����е�Ԥ�����ݡ�
*
* <pre>
* &lt;complexType name="SpGtChangeRevResponse"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="return" type="{http://www.w3.org/2001/XMLSchema}int"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SpGtChangeRevResponse", propOrder = {
"_return"
})
public class SpGtChangeRevResponse {
@XmlElement(name = "return")
protected int _return;
/**
* ��ȡreturn���Ե�ֵ��
*
*/
public int getReturn() {
return _return;
}
/**
* ����return���Ե�ֵ��
*
*/
public void setReturn(int value) {
this._return = value;
}
}
@@ -0,0 +1,114 @@
package taiji.swj.service;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>SpGtInforRev complex type�� Java �ࡣ
*
* <p>����ģʽƬ��ָ�����ڴ����е�Ԥ�����ݡ�
*
* <pre>
* &lt;complexType name="SpGtInforRev"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="arg0" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="arg1" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="arg2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SpGtInforRev", propOrder = {
"arg0",
"arg1",
"arg2"
})
public class SpGtInforRev {
protected String arg0;
protected String arg1;
protected String arg2;
/**
* ��ȡarg0���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg0() {
return arg0;
}
/**
* ����arg0���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg0(String value) {
this.arg0 = value;
}
/**
* ��ȡarg1���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg1() {
return arg1;
}
/**
* ����arg1���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg1(String value) {
this.arg1 = value;
}
/**
* ��ȡarg2���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg2() {
return arg2;
}
/**
* ����arg2���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg2(String value) {
this.arg2 = value;
}
}
@@ -0,0 +1,54 @@
package taiji.swj.service;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>SpGtInforRevResponse complex type�� Java �ࡣ
*
* <p>����ģʽƬ��ָ�����ڴ����е�Ԥ�����ݡ�
*
* <pre>
* &lt;complexType name="SpGtInforRevResponse"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="return" type="{http://www.w3.org/2001/XMLSchema}int"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SpGtInforRevResponse", propOrder = {
"_return"
})
public class SpGtInforRevResponse {
@XmlElement(name = "return")
protected int _return;
/**
* ��ȡreturn���Ե�ֵ��
*
*/
public int getReturn() {
return _return;
}
/**
* ����return���Ե�ֵ��
*
*/
public void setReturn(int value) {
this._return = value;
}
}
@@ -0,0 +1,114 @@
package taiji.swj.service;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>SpGtLogoutRev complex type�� Java �ࡣ
*
* <p>����ģʽƬ��ָ�����ڴ����е�Ԥ�����ݡ�
*
* <pre>
* &lt;complexType name="SpGtLogoutRev"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="arg0" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="arg1" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="arg2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SpGtLogoutRev", propOrder = {
"arg0",
"arg1",
"arg2"
})
public class SpGtLogoutRev {
protected String arg0;
protected String arg1;
protected String arg2;
/**
* ��ȡarg0���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg0() {
return arg0;
}
/**
* ����arg0���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg0(String value) {
this.arg0 = value;
}
/**
* ��ȡarg1���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg1() {
return arg1;
}
/**
* ����arg1���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg1(String value) {
this.arg1 = value;
}
/**
* ��ȡarg2���Ե�ֵ��
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg2() {
return arg2;
}
/**
* ����arg2���Ե�ֵ��
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg2(String value) {
this.arg2 = value;
}
}
@@ -0,0 +1,54 @@
package taiji.swj.service;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>SpGtLogoutRevResponse complex type�� Java �ࡣ
*
* <p>����ģʽƬ��ָ�����ڴ����е�Ԥ�����ݡ�
*
* <pre>
* &lt;complexType name="SpGtLogoutRevResponse"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="return" type="{http://www.w3.org/2001/XMLSchema}int"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SpGtLogoutRevResponse", propOrder = {
"_return"
})
public class SpGtLogoutRevResponse {
@XmlElement(name = "return")
protected int _return;
/**
* ��ȡreturn���Ե�ֵ��
*
*/
public int getReturn() {
return _return;
}
/**
* ����return���Ե�ֵ��
*
*/
public void setReturn(int value) {
this._return = value;
}
}
@@ -0,0 +1,128 @@
package taiji.swj.service;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
/**
* This class was generated by Apache CXF 3.1.8
* 2018-02-07T14:49:33.695+08:00
* Generated source version: 3.1.8
*
*/
@WebService(targetNamespace = "http://service.swj.taiji.com/", name = "SwjService")
@XmlSeeAlso({ObjectFactory.class})
public interface SwjService {
@WebMethod(operationName = "SpBeforeCreateRev")
@RequestWrapper(localName = "SpBeforeCreateRev", targetNamespace = "http://service.swj.taiji.com/", className = "com.taiji.swj.service.SpBeforeCreateRev")
@ResponseWrapper(localName = "SpBeforeCreateRevResponse", targetNamespace = "http://service.swj.taiji.com/", className = "com.taiji.swj.service.SpBeforeCreateRevResponse")
@WebResult(name = "return", targetNamespace = "")
public int spBeforeCreateRev(
@WebParam(name = "arg0", targetNamespace = "")
java.lang.String arg0,
@WebParam(name = "arg1", targetNamespace = "")
java.lang.String arg1,
@WebParam(name = "arg2", targetNamespace = "")
java.lang.String arg2
);
@WebMethod(operationName = "SpEnpLogoutRev")
@RequestWrapper(localName = "SpEnpLogoutRev", targetNamespace = "http://service.swj.taiji.com/", className = "com.taiji.swj.service.SpEnpLogoutRev")
@ResponseWrapper(localName = "SpEnpLogoutRevResponse", targetNamespace = "http://service.swj.taiji.com/", className = "com.taiji.swj.service.SpEnpLogoutRevResponse")
@WebResult(name = "return", targetNamespace = "")
public int spEnpLogoutRev(
@WebParam(name = "arg0", targetNamespace = "")
java.lang.String arg0,
@WebParam(name = "arg1", targetNamespace = "")
java.lang.String arg1,
@WebParam(name = "arg2", targetNamespace = "")
java.lang.String arg2
);
@WebMethod(operationName = "SpGtLogoutRev")
@RequestWrapper(localName = "SpGtLogoutRev", targetNamespace = "http://service.swj.taiji.com/", className = "com.taiji.swj.service.SpGtLogoutRev")
@ResponseWrapper(localName = "SpGtLogoutRevResponse", targetNamespace = "http://service.swj.taiji.com/", className = "com.taiji.swj.service.SpGtLogoutRevResponse")
@WebResult(name = "return", targetNamespace = "")
public int spGtLogoutRev(
@WebParam(name = "arg0", targetNamespace = "")
java.lang.String arg0,
@WebParam(name = "arg1", targetNamespace = "")
java.lang.String arg1,
@WebParam(name = "arg2", targetNamespace = "")
java.lang.String arg2
);
@WebMethod(operationName = "SpEnpInforRev")
@RequestWrapper(localName = "SpEnpInforRev", targetNamespace = "http://service.swj.taiji.com/", className = "com.taiji.swj.service.SpEnpInforRev")
@ResponseWrapper(localName = "SpEnpInforRevResponse", targetNamespace = "http://service.swj.taiji.com/", className = "com.taiji.swj.service.SpEnpInforRevResponse")
@WebResult(name = "return", targetNamespace = "")
public int spEnpInforRev(
@WebParam(name = "arg0", targetNamespace = "")
java.lang.String arg0,
@WebParam(name = "arg1", targetNamespace = "")
java.lang.String arg1,
@WebParam(name = "arg2", targetNamespace = "")
java.lang.String arg2
);
@WebMethod(operationName = "SpGtInforRev")
@RequestWrapper(localName = "SpGtInforRev", targetNamespace = "http://service.swj.taiji.com/", className = "com.taiji.swj.service.SpGtInforRev")
@ResponseWrapper(localName = "SpGtInforRevResponse", targetNamespace = "http://service.swj.taiji.com/", className = "com.taiji.swj.service.SpGtInforRevResponse")
@WebResult(name = "return", targetNamespace = "")
public int spGtInforRev(
@WebParam(name = "arg0", targetNamespace = "")
java.lang.String arg0,
@WebParam(name = "arg1", targetNamespace = "")
java.lang.String arg1,
@WebParam(name = "arg2", targetNamespace = "")
java.lang.String arg2
);
@WebMethod(operationName = "SpEnpChangeLic")
@RequestWrapper(localName = "SpEnpChangeLic", targetNamespace = "http://service.swj.taiji.com/", className = "com.taiji.swj.service.SpEnpChangeLic")
@ResponseWrapper(localName = "SpEnpChangeLicResponse", targetNamespace = "http://service.swj.taiji.com/", className = "com.taiji.swj.service.SpEnpChangeLicResponse")
@WebResult(name = "return", targetNamespace = "")
public int spEnpChangeLic(
@WebParam(name = "arg0", targetNamespace = "")
java.lang.String arg0,
@WebParam(name = "arg1", targetNamespace = "")
java.lang.String arg1,
@WebParam(name = "arg2", targetNamespace = "")
java.lang.String arg2
);
@WebMethod(operationName = "SpGtChangeRev")
@RequestWrapper(localName = "SpGtChangeRev", targetNamespace = "http://service.swj.taiji.com/", className = "com.taiji.swj.service.SpGtChangeRev")
@ResponseWrapper(localName = "SpGtChangeRevResponse", targetNamespace = "http://service.swj.taiji.com/", className = "com.taiji.swj.service.SpGtChangeRevResponse")
@WebResult(name = "return", targetNamespace = "")
public int spGtChangeRev(
@WebParam(name = "arg0", targetNamespace = "")
java.lang.String arg0,
@WebParam(name = "arg1", targetNamespace = "")
java.lang.String arg1,
@WebParam(name = "arg2", targetNamespace = "")
java.lang.String arg2,
@WebParam(name = "arg3", targetNamespace = "")
java.lang.String arg3
);
@WebMethod(operationName = "SpEnpChangeRev")
@RequestWrapper(localName = "SpEnpChangeRev", targetNamespace = "http://service.swj.taiji.com/", className = "com.taiji.swj.service.SpEnpChangeRev")
@ResponseWrapper(localName = "SpEnpChangeRevResponse", targetNamespace = "http://service.swj.taiji.com/", className = "com.taiji.swj.service.SpEnpChangeRevResponse")
@WebResult(name = "return", targetNamespace = "")
public int spEnpChangeRev(
@WebParam(name = "arg0", targetNamespace = "")
java.lang.String arg0,
@WebParam(name = "arg1", targetNamespace = "")
java.lang.String arg1,
@WebParam(name = "arg2", targetNamespace = "")
java.lang.String arg2,
@WebParam(name = "arg3", targetNamespace = "")
java.lang.String arg3
);
}
@@ -0,0 +1,88 @@
package taiji.swj.service.impl;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;
import taiji.swj.service.SwjService;
import javax.xml.ws.Service;
/**
* This class was generated by Apache CXF 3.1.8
* 2018-02-07T14:49:33.845+08:00
* Generated source version: 3.1.8
*
*/
@WebServiceClient(name = "SwjServiceImplService",
wsdlLocation = "http://localhost:8080/approval/service/gscService?wsdl",
targetNamespace = "http://impl.service.swj.taiji.com/")
public class SwjServiceImplService extends Service {
public final static URL WSDL_LOCATION;
public final static QName SERVICE = new QName("http://impl.service.swj.taiji.com/", "SwjServiceImplService");
public final static QName SwjServiceImplPort = new QName("http://impl.service.swj.taiji.com/", "SwjServiceImplPort");
static {
URL url = null;
try {
url = new URL("http://localhost:8080/approval/service/gscService?wsdl");
} catch (MalformedURLException e) {
java.util.logging.Logger.getLogger(SwjServiceImplService.class.getName())
.log(java.util.logging.Level.INFO,
"Can not initialize the default wsdl from {0}", "http://localhost:8080/approval/service/gscService?wsdl");
}
WSDL_LOCATION = url;
}
public SwjServiceImplService(URL wsdlLocation) {
super(wsdlLocation, SERVICE);
}
public SwjServiceImplService(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
public SwjServiceImplService() {
super(WSDL_LOCATION, SERVICE);
}
public SwjServiceImplService(WebServiceFeature ... features) {
super(WSDL_LOCATION, SERVICE, features);
}
public SwjServiceImplService(URL wsdlLocation, WebServiceFeature ... features) {
super(wsdlLocation, SERVICE, features);
}
public SwjServiceImplService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
super(wsdlLocation, serviceName, features);
}
/**
*
* @return
* returns SwjService
*/
@WebEndpoint(name = "SwjServiceImplPort")
public SwjService getSwjServiceImplPort() {
return super.getPort(SwjServiceImplPort, SwjService.class);
}
/**
*
* @param features
* A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
* @return
* returns SwjService
*/
@WebEndpoint(name = "SwjServiceImplPort")
public SwjService getSwjServiceImplPort(WebServiceFeature... features) {
return super.getPort(SwjServiceImplPort, SwjService.class, features);
}
}
@@ -0,0 +1,2 @@
@javax.xml.bind.annotation.XmlSchema(namespace = "http://service.swj.taiji.com/")
package taiji.swj.service;
@@ -0,0 +1,81 @@
package com.zzc.app.entity;
import com.zzc.web.system.pojo.base.TSUser;
public class AppTSUser {
private String enterpriseName;
private String enterpriseCode;
private String enterpriseArea;
private String enterpriseAddress;
private String enterpriseType;
private String role;
private TSUser user;
// 登录提示
private String tip;
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getEnterpriseCode() {
return enterpriseCode;
}
public void setEnterpriseCode(String enterpriseCode) {
this.enterpriseCode = enterpriseCode;
}
public String getEnterpriseArea() {
return enterpriseArea;
}
public void setEnterpriseArea(String enterpriseArea) {
this.enterpriseArea = enterpriseArea;
}
public String getEnterpriseAddress() {
return enterpriseAddress;
}
public void setEnterpriseAddress(String enterpriseAddress) {
this.enterpriseAddress = enterpriseAddress;
}
public String getEnterpriseType() {
return enterpriseType;
}
public void setEnterpriseType(String enterpriseType) {
this.enterpriseType = enterpriseType;
}
public TSUser getUser() {
return user;
}
public void setUser(TSUser user) {
this.user = user;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public String getTip() {
return tip;
}
public void setTip(String tip) {
this.tip = tip;
}
}
@@ -0,0 +1,79 @@
package com.zzc.app.entity;
public class EnterpriseInfo {
private String id;
private String enterpriseName;
private String enterpriseCode;
private String enterpriseArea;
private String enterpriseAddress;
private String enterpriseType;
private String enterpriseScore;
private String telephone;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getEnterpriseCode() {
return enterpriseCode;
}
public void setEnterpriseCode(String enterpriseCode) {
this.enterpriseCode = enterpriseCode;
}
public String getEnterpriseArea() {
return enterpriseArea;
}
public void setEnterpriseArea(String enterpriseArea) {
this.enterpriseArea = enterpriseArea;
}
public String getEnterpriseAddress() {
return enterpriseAddress;
}
public void setEnterpriseAddress(String enterpriseAddress) {
this.enterpriseAddress = enterpriseAddress;
}
public String getEnterpriseType() {
return enterpriseType;
}
public void setEnterpriseType(String enterpriseType) {
this.enterpriseType = enterpriseType;
}
public String getEnterpriseScore() {
return enterpriseScore;
}
public void setEnterpriseScore(String enterpriseScore) {
this.enterpriseScore = enterpriseScore;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
}
@@ -0,0 +1,108 @@
package com.zzc.app.entity;
import java.io.Serializable;
/**
* Created by CC on 2017/1/12. 企业信息实体类
*/
public class EnterpriseInfoEntity implements Serializable {
private int imgHotel;// 图片
private String name;// 企业名字
private String level;// 企业级别
private String address;// 企业地址
private int imgCreditLevel; // 信用级别图片
private String creditLevelDescription;// 信用度描述
private int creditNum;// 信用值
// 诚信积分
private int score;
private String telephone;
public EnterpriseInfoEntity() {
}
public EnterpriseInfoEntity(int imgHotel, String name, String level,
String address, int imgCreditLevel, String creditLevelDescription,
int creditNum) {
this.imgHotel = imgHotel;
this.name = name;
this.level = level;
this.address = address;
this.imgCreditLevel = imgCreditLevel;
this.creditLevelDescription = creditLevelDescription;
this.creditNum = creditNum;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLevel() {
return level;
}
public void setLevel(String level) {
this.level = level;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public int getImgHotel() {
return imgHotel;
}
public void setImgHotel(int imgHotel) {
this.imgHotel = imgHotel;
}
public int getImgCreditLevel() {
return imgCreditLevel;
}
public void setImgCreditLevel(int imgCreditLevel) {
this.imgCreditLevel = imgCreditLevel;
}
public String getCreditLevelDescription() {
return creditLevelDescription;
}
public void setCreditLevelDescription(String creditLevelDescription) {
this.creditLevelDescription = creditLevelDescription;
}
public int getCreditNum() {
return creditNum;
}
public void setCreditNum(int creditNum) {
this.creditNum = creditNum;
}
public int getScore() {
return score;
}
public void setScore(int score) {
this.score = score;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,393 @@
package com.zzc.app.hotel.entity;
public class HotelAnnual {
private String userId;// 用户id
private String year;// 年报年份
private String debt;// 年末资产负债
private String realNights;// 实际出租间夜数
private String canNights;// 可提供出租夜数
private String streamTotal;// 流动资产小计
private String manageCost;// 管理费用
private String longInvest;// 长期投资
private String taxes;// 税金
private String fixedAssets;// 固定资产
private String travelExpense;// 差旅费
private String fixedPrice;// 固定资产原价
private String financialCost;// 财务费用
private String depreciation;// 累计折旧
private String interestCost;// 利息支出
private String yearDepreciation;// 本年折旧
private String assetTotal;// 资产合计
private String valueVariation;// 公允价值变动收益
private String liabilitiesTotal;// 负债合计
private String operationIncome;// 营业收入
private String possessorTotal;// 所有者权益合计
private String oprFeeAndTax;// 营业税金及附加
private String realIncome;// 实收资本
private String invest;// 投资收益
private String roomIncome; // 客房收入
private String canteeIncome; // 餐厅收入
private String otherIncome; // 其他收入
private String operationCost;// 营业成本
private String operationFee;// 营业费用
private String fianceCost;// 财务费用
private String opreationIntrest;// 营业利润
private String ownTax;// 所得税
private String profitTotal;// 利润总额
private String salary;// 本年应付职工薪酬
private String college;// 大专以上学历人数
private String people;// 全部从业人员平均人数
private String deposit; // 存货
private String room; // 客房数
private String bed; // 床位数
private String actualRent; // 实际出租夜数
private String forHire; // 可供出租夜数
private String status;// 审核状态
private String reportDate; // 报出日期
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getYear() {
return year;
}
public void setYear(String year) {
this.year = year;
}
public String getDebt() {
return debt;
}
public void setDebt(String debt) {
this.debt = debt;
}
public String getRealNights() {
return realNights;
}
public void setRealNights(String realNights) {
this.realNights = realNights;
}
public String getCanNights() {
return canNights;
}
public void setCanNights(String canNights) {
this.canNights = canNights;
}
public String getStreamTotal() {
return streamTotal;
}
public void setStreamTotal(String streamTotal) {
this.streamTotal = streamTotal;
}
public String getManageCost() {
return manageCost;
}
public void setManageCost(String manageCost) {
this.manageCost = manageCost;
}
public String getLongInvest() {
return longInvest;
}
public void setLongInvest(String longInvest) {
this.longInvest = longInvest;
}
public String getTaxes() {
return taxes;
}
public void setTaxes(String taxes) {
this.taxes = taxes;
}
public String getFixedAssets() {
return fixedAssets;
}
public void setFixedAssets(String fixedAssets) {
this.fixedAssets = fixedAssets;
}
public String getTravelExpense() {
return travelExpense;
}
public void setTravelExpense(String travelExpense) {
this.travelExpense = travelExpense;
}
public String getFixedPrice() {
return fixedPrice;
}
public void setFixedPrice(String fixedPrice) {
this.fixedPrice = fixedPrice;
}
public String getFinancialCost() {
return financialCost;
}
public void setFinancialCost(String financialCost) {
this.financialCost = financialCost;
}
public String getDepreciation() {
return depreciation;
}
public void setDepreciation(String depreciation) {
this.depreciation = depreciation;
}
public String getInterestCost() {
return interestCost;
}
public void setInterestCost(String interestCost) {
this.interestCost = interestCost;
}
public String getYearDepreciation() {
return yearDepreciation;
}
public void setYearDepreciation(String yearDepreciation) {
this.yearDepreciation = yearDepreciation;
}
public String getAssetTotal() {
return assetTotal;
}
public void setAssetTotal(String assetTotal) {
this.assetTotal = assetTotal;
}
public String getValueVariation() {
return valueVariation;
}
public void setValueVariation(String valueVariation) {
this.valueVariation = valueVariation;
}
public String getLiabilitiesTotal() {
return liabilitiesTotal;
}
public void setLiabilitiesTotal(String liabilitiesTotal) {
this.liabilitiesTotal = liabilitiesTotal;
}
public String getOperationIncome() {
return operationIncome;
}
public void setOperationIncome(String operationIncome) {
this.operationIncome = operationIncome;
}
public String getPossessorTotal() {
return possessorTotal;
}
public void setPossessorTotal(String possessorTotal) {
this.possessorTotal = possessorTotal;
}
public String getOprFeeAndTax() {
return oprFeeAndTax;
}
public void setOprFeeAndTax(String oprFeeAndTax) {
this.oprFeeAndTax = oprFeeAndTax;
}
public String getRealIncome() {
return realIncome;
}
public void setRealIncome(String realIncome) {
this.realIncome = realIncome;
}
public String getInvest() {
return invest;
}
public void setInvest(String invest) {
this.invest = invest;
}
public String getRoomIncome() {
return roomIncome;
}
public void setRoomIncome(String roomIncome) {
this.roomIncome = roomIncome;
}
public String getCanteeIncome() {
return canteeIncome;
}
public void setCanteeIncome(String canteeIncome) {
this.canteeIncome = canteeIncome;
}
public String getOtherIncome() {
return otherIncome;
}
public void setOtherIncome(String otherIncome) {
this.otherIncome = otherIncome;
}
public String getOperationCost() {
return operationCost;
}
public void setOperationCost(String operationCost) {
this.operationCost = operationCost;
}
public String getOperationFee() {
return operationFee;
}
public void setOperationFee(String operationFee) {
this.operationFee = operationFee;
}
public String getFianceCost() {
return fianceCost;
}
public void setFianceCost(String fianceCost) {
this.fianceCost = fianceCost;
}
public String getOpreationIntrest() {
return opreationIntrest;
}
public void setOpreationIntrest(String opreationIntrest) {
this.opreationIntrest = opreationIntrest;
}
public String getOwnTax() {
return ownTax;
}
public void setOwnTax(String ownTax) {
this.ownTax = ownTax;
}
public String getProfitTotal() {
return profitTotal;
}
public void setProfitTotal(String profitTotal) {
this.profitTotal = profitTotal;
}
public String getSalary() {
return salary;
}
public void setSalary(String salary) {
this.salary = salary;
}
public String getCollege() {
return college;
}
public void setCollege(String college) {
this.college = college;
}
public String getPeople() {
return people;
}
public void setPeople(String people) {
this.people = people;
}
public String getDeposit() {
return deposit;
}
public void setDeposit(String deposit) {
this.deposit = deposit;
}
public String getRoom() {
return room;
}
public void setRoom(String room) {
this.room = room;
}
public String getBed() {
return bed;
}
public void setBed(String bed) {
this.bed = bed;
}
public String getActualRent() {
return actualRent;
}
public void setActualRent(String actualRent) {
this.actualRent = actualRent;
}
public String getForHire() {
return forHire;
}
public void setForHire(String forHire) {
this.forHire = forHire;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getReportDate() {
return reportDate;
}
public void setReportDate(String reportDate) {
this.reportDate = reportDate;
}
}
@@ -0,0 +1,118 @@
package com.zzc.app.hotel.entity;
public class HotelDay{
private String id;
// 总收入
private String totalIncome;
// 餐厅收入
private String canteenIncome;
// 客房收入
private String roomIncome;
// 其他收入
private String otherIncome;
// 实际出租间夜数
private String realNights;
// 可供出租间夜数
private String canNights;
// 平均房价
private String avgHotelPrice;
// 出租率
private String rentPercent;
// 区级审核状态
private String districtStatus;
// 市级审核状态
private String status;
// 填报人
private String reportPerson;
// 填报时间
private String reportDate;
// 填报人电话
private String reportTel;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTotalIncome() {
return totalIncome;
}
public void setTotalIncome(String totalIncome) {
this.totalIncome = totalIncome;
}
public String getCanteenIncome() {
return canteenIncome;
}
public void setCanteenIncome(String canteenIncome) {
this.canteenIncome = canteenIncome;
}
public String getRoomIncome() {
return roomIncome;
}
public void setRoomIncome(String roomIncome) {
this.roomIncome = roomIncome;
}
public String getOtherIncome() {
return otherIncome;
}
public void setOtherIncome(String otherIncome) {
this.otherIncome = otherIncome;
}
public String getRealNights() {
return realNights;
}
public void setRealNights(String realNights) {
this.realNights = realNights;
}
public String getCanNights() {
return canNights;
}
public void setCanNights(String canNights) {
this.canNights = canNights;
}
public String getAvgHotelPrice() {
return avgHotelPrice;
}
public void setAvgHotelPrice(String avgHotelPrice) {
this.avgHotelPrice = avgHotelPrice;
}
public String getRentPercent() {
return rentPercent;
}
public void setRentPercent(String rentPercent) {
this.rentPercent = rentPercent;
}
public String getDistrictStatus() {
return districtStatus;
}
public void setDistrictStatus(String districtStatus) {
this.districtStatus = districtStatus;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getReportPerson() {
return reportPerson;
}
public void setReportPerson(String reportPerson) {
this.reportPerson = reportPerson;
}
public String getReportDate() {
return reportDate;
}
public void setReportDate(String reportDate) {
this.reportDate = reportDate;
}
public String getReportTel() {
return reportTel;
}
public void setReportTel(String reportTel) {
this.reportTel = reportTel;
}
}
@@ -0,0 +1,151 @@
package com.zzc.app.hotel.entity;
public class HotelQuarter {
private String userId; // 用户id
private String year; // 年份
private String quarter;// 1 2 3 4 第一二三四季度
private String writer; // 填报人
private String mobile; // 手机号码
private String writerDate; // 填报日期
private String totalIncome; // 总收入(万元)
private String canteenIncome; // 餐厅收入(万元)
private String roomIncome; // 客房收入(万元)
private String otherIncome; // 其他收入(万元)
private String roomnum; // 客房数量
private String bednum; // 床位数量
private String realNights;// 实际出租夜间数
private String canNights;// 可供出租夜间数
private String avgHotelPrice; // 平均房价
private String status;// 审核状态
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getYear() {
return year;
}
public void setYear(String year) {
this.year = year;
}
public String getQuarter() {
return quarter;
}
public void setQuarter(String quarter) {
this.quarter = quarter;
}
public String getWriter() {
return writer;
}
public void setWriter(String writer) {
this.writer = writer;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getWriterDate() {
return writerDate;
}
public void setWriterDate(String writerDate) {
this.writerDate = writerDate;
}
public String getTotalIncome() {
return totalIncome;
}
public void setTotalIncome(String totalIncome) {
this.totalIncome = totalIncome;
}
public String getCanteenIncome() {
return canteenIncome;
}
public void setCanteenIncome(String canteenIncome) {
this.canteenIncome = canteenIncome;
}
public String getRoomIncome() {
return roomIncome;
}
public void setRoomIncome(String roomIncome) {
this.roomIncome = roomIncome;
}
public String getOtherIncome() {
return otherIncome;
}
public void setOtherIncome(String otherIncome) {
this.otherIncome = otherIncome;
}
public String getRoomnum() {
return roomnum;
}
public void setRoomnum(String roomnum) {
this.roomnum = roomnum;
}
public String getBednum() {
return bednum;
}
public void setBednum(String bednum) {
this.bednum = bednum;
}
public String getRealNights() {
return realNights;
}
public void setRealNights(String realNights) {
this.realNights = realNights;
}
public String getCanNights() {
return canNights;
}
public void setCanNights(String canNights) {
this.canNights = canNights;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getAvgHotelPrice() {
return avgHotelPrice;
}
public void setAvgHotelPrice(String avgHotelPrice) {
this.avgHotelPrice = avgHotelPrice;
}
}
@@ -0,0 +1,153 @@
package com.zzc.app.login;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.alibaba.fastjson.JSON;
import com.zzc.web.system.service.SystemService;
@Controller
@RequestMapping("/appservice/scheduleRemindercontroller")
public class ScheduleReminderController {
private SystemService systemService;
public SystemService getSystemService() {
return systemService;
}
@Autowired
public void setSystemService(SystemService systemService) {
this.systemService = systemService;
}
@RequestMapping(params = "scheduleReminder", method = RequestMethod.GET)
@ResponseBody
public String scheduleReminder(HttpServletRequest request) {
String userId = request.getParameter("userId");
Map<String, Object> roleMap = systemService
.findOneForJdbc(
"select * from t_s_role t where t.id=(select tr.roleid from t_s_role_user tr where tr.userid =?)",
userId);
String role = roleMap.get("rolename").toString();
Calendar calendar = Calendar.getInstance();
int nowYear = calendar.get(Calendar.YEAR);
int nowWeek = calendar.get(Calendar.WEEK_OF_YEAR);
int nowDay = calendar.get(Calendar.DAY_OF_MONTH);
int nowWeekDay = calendar.get(Calendar.DAY_OF_WEEK) - 1;
int hour = calendar.get(Calendar.HOUR_OF_DAY);
int nowMonth = calendar.get(Calendar.MONTH) + 1;
List<String> scheduleList = new ArrayList<String>();
if (role.contains("酒店")) {
// 年报填报
if (nowMonth < 2) {
scheduleList.add(nowYear - 1 + "年年报填报工作开始");
} else if (nowMonth == 2 && nowDay < 15) {
scheduleList.add(nowYear - 1 + "年年报填报工作开始");
}
// 季报填报
if (nowMonth == 4 && nowDay < 10) {
scheduleList.add(nowYear + "年第1季度季报填报工作开始");
} else if (nowMonth == 7 && nowDay < 10) {
scheduleList.add(nowYear + "年第2季度季报填报工作开始");
} else if (nowMonth == 10 && nowDay < 10) {
scheduleList.add(nowYear + "年第3季度季报填报工作开始");
} else if (nowMonth == 1 && nowDay < 10) {
scheduleList.add(nowYear - 1 + "年第4季度季报填报工作开始");
}
// 月报填报
if (nowMonth == 1) {
if (nowDay < 3) {
scheduleList.add(nowYear - 1 + "年12月报填报工作开始");
}
} else {
if (nowDay < 3) {
scheduleList.add(nowYear + "年" + (nowMonth - 1)
+ "月报填报工作开始");
}
}
} else if (role.contains("景区")) {
// 年报填报
if (nowMonth < 2) {
scheduleList.add(nowYear - 1 + "年年报填报工作开始");
} else if (nowMonth == 2 && nowDay < 15) {
scheduleList.add(nowYear - 1 + "年年报填报工作开始");
}
// 季报填报
if (nowMonth == 4 && nowDay < 10) {
scheduleList.add(nowYear + "年第1季度季报填报工作开始");
} else if (nowMonth == 7 && nowDay < 10) {
scheduleList.add(nowYear + "年第2季度季报填报工作开始");
} else if (nowMonth == 10 && nowDay < 10) {
scheduleList.add(nowYear + "年第3季度季报填报工作开始");
} else if (nowMonth == 1 && nowDay < 10) {
scheduleList.add(nowYear - 1 + "年第4季度季报填报工作开始");
}
// 月报填报
if (nowMonth == 1) {
if (nowDay < 5) {
scheduleList.add(nowYear - 1 + "年12月报填报工作开始");
}
} else {
if (nowDay < 5) {
scheduleList.add(nowYear + "年" + (nowMonth - 1)
+ "月报填报工作开始");
}
}
// 周报填报
if (nowWeek == 1) {
if (nowWeekDay == 1 && hour < 15) {
scheduleList.add(nowYear - 1 + "年第52周周报填报工作开始");
}
} else {
if (nowWeekDay == 1 && hour < 15) {
scheduleList.add(nowYear + "年第" + (nowWeek - 1)
+ "周周报填报工作开始");
}
}
} else if (role.contains("旅行社")) {
// 年报填报
if (nowMonth < 2) {
scheduleList.add(nowYear - 1 + "年年报填报工作开始");
} else if (nowMonth == 2 && nowDay < 15) {
scheduleList.add(nowYear - 1 + "年年报填报工作开始");
}
// 季报填报
if (nowMonth == 4 && nowDay < 10) {
scheduleList.add(nowYear + "年第1季度季报填报工作开始");
} else if (nowMonth == 7 && nowDay < 10) {
scheduleList.add(nowYear + "年第2季度季报填报工作开始");
} else if (nowMonth == 10 && nowDay < 10) {
scheduleList.add(nowYear + "年第3季度季报填报工作开始");
} else if (nowMonth == 1 && nowDay < 10) {
scheduleList.add(nowYear - 1 + "年第4季度季报填报工作开始");
}
} else if (role.contains("机场") || role.contains("动车")
|| role.contains("高尔夫") || role.contains("游艇")
|| role.contains("空中飞行")) {
// 月报填报
if (nowMonth == 1) {
if (nowDay < 5) {
scheduleList.add(nowYear - 1 + "年12月报填报工作开始");
}
} else {
if (nowDay < 5) {
scheduleList.add(nowYear + "年" + (nowMonth - 1)
+ "月报填报工作开始");
}
}
}
String res = JSON.toJSONString(scheduleList);
return res;
}
}
@@ -0,0 +1,909 @@
package com.zzc.app.login;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSONObject;
import com.zzc.app.entity.AppTSUser;
import com.zzc.app.entity.EnterpriseInfo;
import com.zzc.app.login.entity.APPHotel;
import com.zzc.app.login.entity.APPOtherTravel;
import com.zzc.app.login.entity.APPTraveldata;
import com.zzc.app.utils.ResolveParams;
import com.zzc.core.extend.datasource.DataSourceContextHolder;
import com.zzc.core.extend.datasource.DataSourceType;
import com.zzc.web.htoal.entity.Hotelmanage;
import com.zzc.web.htoal.entity.HotelmanageSta;
import com.zzc.web.otherTravel.entity.OtherTravelInfo;
import com.zzc.web.system.pojo.base.TSDepart;
import com.zzc.web.system.pojo.base.TSUser;
import com.zzc.web.system.service.SystemService;
import com.zzc.web.system.service.UserService;
import com.zzc.web.travel.entity.Traveldata;
@Controller
@RequestMapping("/appservice/userlogincontroller")
public class UserLoginController {
private SystemService systemService;
private UserService userService;
@Autowired
public void setSystemService(SystemService systemService) {
this.systemService = systemService;
}
@Autowired
public void setUserService(UserService userService) {
this.userService = userService;
}
@RequestMapping(params = "getVersion")
@ResponseBody
public JSONObject getVersion(HttpServletRequest request,
HttpServletResponse response) {
InputStream in = new BufferedInputStream(
UserLoginController.class
.getResourceAsStream("/sysConfig.properties"));
Properties p = new Properties();
try {
p.load(in);
} catch (IOException e) {
return null;
}
JSONObject json = new JSONObject();
json.put("android_version", p.getProperty("android_version"));
json.put("ios_version", p.getProperty("ios_version"));
return json;
}
/**
*
* 服务策略
*
* @author Fp
* @param request
* @param response
* @return
*/
@RequestMapping(params = "privacyClause")
public ModelAndView privacyClause(HttpServletRequest request,
HttpServletResponse response) {
return new ModelAndView("appservice/pages/privacyClause");
}
/**
*
* 隐私条款
*
* @author Fp
* @param request
* @param response
* @return
*/
@RequestMapping(params = "serviceStrategy")
public ModelAndView otserviceStrategyherTravel(HttpServletRequest request,
HttpServletResponse response) {
return new ModelAndView("appservice/pages/serviceStrategy");
}
@RequestMapping(params = "otherTravel")
public ModelAndView otherTravel(HttpServletRequest request,
HttpServletResponse response) {
String userId = request.getParameter("userId");
request.setAttribute("userId", userId);
return new ModelAndView("appservice/company");
}
@RequestMapping(params = "hotel")
public ModelAndView hotel(HttpServletRequest request,
HttpServletResponse response) {
String userId = request.getParameter("userId");
request.setAttribute("userId", userId);
return new ModelAndView("appservice/hotel");
}
@RequestMapping(params = "scenic")
public ModelAndView scenic(HttpServletRequest request,
HttpServletResponse response) {
String userId = request.getParameter("userId");
request.setAttribute("userId", userId);
return new ModelAndView("appservice/scenic");
}
@RequestMapping(params = "login")
@ResponseBody
public AppTSUser login(HttpServletRequest request,
HttpServletResponse response) {
// 请求参数解析
Map<String, String> map = ResolveParams.getParameterMap(request);
String username = map.get("username");
String password = map.get("password");
// 去掉登录的大小写限制
List<Map<String, Object>> mapUsername = systemService.findForJdbc("select t.username from t_s_base_user t where upper(t.username)=?", username);
if(mapUsername.size() != 0) username = mapUsername.get(0).get("username").toString();
String key = "D1B5CC2FE46C4CC983C073BCA897935608D926CD32992B5900";
TSUser user = new TSUser();
user.setUserKey(key);
user.setUserName(username);
user.setPassword(password);
DataSourceContextHolder
.setDataSourceType(DataSourceType.dataSource_zzc);
String tip = "success";
AppTSUser appUser = new AppTSUser();
int users = userService.getList(TSUser.class).size();
try {
if (users == 0) {
tip = "用户名或密码错误";
appUser.setTip(tip);
return appUser;
} else {
TSUser u = userService.checkUserExits(user);
if (u == null) {
tip = "用户名或密码错误";
appUser.setTip(tip);
return appUser;
}
TSUser u2 = userService.getEntity(TSUser.class, u.getId());
if (u != null && u2.getStatus() != 0) {
appUser = new AppTSUser();
Map<String, Object> attrMap = new HashMap<String, Object>();
Long orgNum = systemService
.getCountForJdbc("select count(1) from t_s_user_org where user_id = '"
+ u.getId() + "'");
if (orgNum > 1) {
attrMap.put("orgNum", orgNum);
attrMap.put("user", u2);
} else {
Map<String, Object> userOrgMap = systemService
.findOneForJdbc(
"select org_id as orgId from t_s_user_org where user_id=?",
u2.getId());
TSDepart currentDepart = systemService.get(
TSDepart.class,
(String) userOrgMap.get("orgId"));
user.setCurrentDepart(currentDepart);
}
appUser.setUser(user);
Map<String, Object> roleMap = systemService
.findOneForJdbc(
"select * from t_s_role t where t.id=(select tr.roleid from t_s_role_user tr where tr.userid =?)",
u2.getId());
String role = roleMap.get("rolename").toString();
Map<String, Object> rs = new HashMap<>();
if (role.contains("旅行社")) {
StringBuffer sql = new StringBuffer();
sql.append(" SELECT ");
sql.append(" t.`name` enterpriseName, ");
sql.append(" t.licensenum enterpriseCode, ");
sql.append(" t.address enterpriseAddress, ");
sql.append(" if(t.area='0','市辖区',if(t.area='1','崖州区',if(t.area='2','海棠区',if(t.area='3','天涯区',if(t.area='4','吉阳区',''))))) enterpriseArea, ");
sql.append(" if(t.scene_spotlevel='0','未评定',if(t.scene_spotlevel='1','A级',if(t.scene_spotlevel='2','AA级',if(t.scene_spotlevel='3','AAA级',if(t.scene_spotlevel='4','AAAA级',if(t.scene_spotlevel='5','AAAAA级','')))))) enterpriseType ");
sql.append(" FROM ");
sql.append(" t_travelagency_info t ");
sql.append(" WHERE ");
sql.append(" t.user_id=?");
rs = systemService.findOneForJdbc(sql.toString(),
u2.getId());
} else if (role.contains("景区")) {
StringBuffer sql = new StringBuffer();
sql.append(" SELECT ");
sql.append(" t.`name` enterpriseName, ");
sql.append(" t. CODE enterpriseCode, ");
sql.append(" t.address enterpriseAddress, ");
sql.append(" if(t.area='5','三亚市',if(t.area='0','市辖区',if(t.area='1','崖州区',if(t.area='2','海棠区',if(t.area='3','天涯区',if(t.area='4','吉阳区','')))))) enterpriseArea, ");
sql.append(" if(t.`level`='0','未评定',if(t.`level`='1','A级',if(t.`level`='2','AA级',if(t.`level`='3','AAA级',if(t.`level`='4','AAAA级',if(t.`level`='5','AAAAA级','')))))) enterpriseType ");
sql.append(" FROM ");
sql.append(" t_scenicspot_info_sta t ");
sql.append(" WHERE ");
sql.append(" t.user_id =?");
rs = systemService.findOneForJdbc(sql.toString(),
u2.getId());
} else if (role.contains("酒店")) {
StringBuffer sql = new StringBuffer();
sql.append(" SELECT ");
sql.append(" t.unitname enterpriseName, ");
sql.append(" t.organizationNum enterpriseCode, ");
sql.append(" t.address enterpriseAddress, ");
sql.append(" if(t.w_county='0','市辖区',if(t.w_county='1','崖州区',if(t.w_county='2','海棠区',if(t.w_county='3','天涯区',if(t.w_county='4','吉阳区',''))))) enterpriseArea, ");
sql.append(" if(t.housegrade='0','其他',if(t.housegrade='1','舒适',if(t.housegrade='2','高档',if(t.housegrade='3','豪华',if(t.housegrade='4','一星',if(t.housegrade='5','二星',if(t.housegrade='6','三星',if(t.housegrade='7','四星',if(t.housegrade='8','五星',''))))))))) enterpriseType ");
sql.append(" FROM ");
sql.append(" t_hotelmanage t ");
sql.append(" WHERE ");
sql.append(" t.id=? ");
rs = systemService.findOneForJdbc(sql.toString(),
u2.getId());
} else if (role.contains("机场") || role.contains("动车")
|| role.contains("高尔夫") || role.contains("游艇")
|| role.contains("空中飞行")) {
StringBuffer sql = new StringBuffer();
sql.append(" SELECT ");
sql.append(" t.`name` enterpriseName, ");
sql.append(" '' enterpriseCode, ");
sql.append(" t.address enterpriseAddress, ");
sql.append(" if(t.area='0','市辖区',if(t.area='1','崖州区',if(t.area='2','海棠区',if(t.area='3','天涯区',if(t.area='4','吉阳区',''))))) enterpriseArea, ");
sql.append(" if(t.type='1','高尔夫项目',if(t.type='2','游艇项目',if(t.type='3','空中飞行项目',if(t.type='4','机场项目',if(t.type='5','动车项目',''))))) enterpriseType ");
sql.append(" FROM ");
sql.append(" t_othercompany_info t ");
sql.append(" WHERE ");
sql.append(" t.id=? ");
rs = systemService.findOneForJdbc(sql.toString(),
u2.getId());
}
appUser.setRole(role);
appUser.setUser(u2);
appUser.setEnterpriseName(rs.get("enterpriseName") == null ? ""
: rs.get("enterpriseName").toString());
appUser.setEnterpriseCode(rs.get("enterpriseCode") == null ? ""
: rs.get("enterpriseCode").toString());
appUser.setEnterpriseAddress(rs.get("enterpriseAddress") == null ? ""
: rs.get("enterpriseAddress").toString());
appUser.setEnterpriseArea(rs.get("enterpriseArea") == null ? ""
: rs.get("enterpriseArea").toString());
appUser.setEnterpriseType(rs.get("enterpriseType") == null ? ""
: rs.get("enterpriseType").toString());
} else {
if (u2.getStatus() == 0) {
tip = "该账户已被锁定";
appUser.setTip(tip);
return appUser;
}
tip = "用户信息获取失败,请完善企业信息";
appUser.setTip(tip);
return appUser;
}
}
} catch (Exception e) {
e.printStackTrace();
tip = "用户信息获取失败,请完善企业信息";
appUser.setTip(tip);
return appUser;
}
appUser.setTip(tip);
return appUser;
}
@RequestMapping(params = "enterpriseQuery")
@ResponseBody
public List<EnterpriseInfo> enterpriseQuery(HttpServletRequest request,
HttpServletResponse response) {
try {
request.setCharacterEncoding("UTF-8");
} catch (UnsupportedEncodingException e) {
// TODO 自动生成的 catch 块
e.printStackTrace();
}
String name = request.getParameter("name");
String role = request.getParameter("role");
if (role == null || role.length() == 0)
return null;
List<Map<String, Object>> rs = new ArrayList<>();
if (role.contains("旅行社")) {
StringBuffer sql = new StringBuffer();
sql.append(" SELECT ");
sql.append(" t.id id, ");
sql.append(" t.phone telephone, ");
sql.append(" (select g.score from t_user_score g where g.user_id=t.user_id) enterpriseScore, ");
sql.append(" t.`name` enterpriseName, ");
sql.append(" t.licensenum enterpriseCode, ");
sql.append(" t.address enterpriseAddress, ");
sql.append(" if(t.area='0','市辖区',if(t.area='1','崖州区',if(t.area='2','海棠区',if(t.area='3','天涯区',if(t.area='4','吉阳区',''))))) enterpriseArea, ");
sql.append(" if(t.scene_spotlevel='0','未评定',if(t.scene_spotlevel='1','A级',if(t.scene_spotlevel='2','AA级',if(t.scene_spotlevel='3','AAA级',if(t.scene_spotlevel='4','AAAA级',if(t.scene_spotlevel='5','AAAAA级','')))))) enterpriseType ");
sql.append(" FROM ");
sql.append(" t_travelagency_info t ");
sql.append(" WHERE 1=1 ");
if (name != null && name.length() != 0) {
sql.append(" and t.`name` like '%" + name + "%'");
}
rs = systemService.findForJdbc(sql.toString());
} else if (role.contains("景区")) {
StringBuffer sql = new StringBuffer();
sql.append(" SELECT ");
sql.append(" t.id id, ");
sql.append(" t.consult_phone telephone, ");
sql.append(" (select g.score from t_user_score g where g.user_id=t.id) enterpriseScore, ");
sql.append(" t.`name` enterpriseName, ");
sql.append(" t. CODE enterpriseCode, ");
sql.append(" t.address enterpriseAddress, ");
sql.append(" if(t.area='5','三亚市',if(t.area='0','市辖区',if(t.area='1','崖州区',if(t.area='2','海棠区',if(t.area='3','天涯区',if(t.area='4','吉阳区','')))))) enterpriseArea, ");
sql.append(" if(t.`level`='0','未评定',if(t.`level`='1','A级',if(t.`level`='2','AA级',if(t.`level`='3','AAA级',if(t.`level`='4','AAAA级',if(t.`level`='5','AAAAA级','')))))) enterpriseType ");
sql.append(" FROM ");
sql.append(" t_scenicspot_info_sta t ");
sql.append(" WHERE 1=1 ");
if (name != null && name.length() != 0) {
sql.append(" and t.`name` like '%" + name + "%'");
}
rs = systemService.findForJdbc(sql.toString());
} else if (role.contains("酒店")) {
StringBuffer sql = new StringBuffer();
sql.append(" SELECT ");
sql.append(" t.id id, ");
sql.append(" t.telephone telephone, ");
sql.append(" (select g.score from t_user_score g where g.user_id=t.id) enterpriseScore, ");
sql.append(" t.unitname enterpriseName, ");
sql.append(" t.organizationNum enterpriseCode, ");
sql.append(" t.address enterpriseAddress, ");
sql.append(" if(t.w_county='0','市辖区',if(t.w_county='1','崖州区',if(t.w_county='2','海棠区',if(t.w_county='3','天涯区',if(t.w_county='4','吉阳区',''))))) enterpriseArea, ");
sql.append(" if(t.housegrade='0','其他',if(t.housegrade='1','舒适',if(t.housegrade='2','高档',if(t.housegrade='3','豪华',if(t.housegrade='4','一星',if(t.housegrade='5','二星',if(t.housegrade='6','三星',if(t.housegrade='7','四星',if(t.housegrade='8','五星',''))))))))) enterpriseType ");
sql.append(" FROM ");
sql.append(" t_hotelmanage t ");
sql.append(" WHERE 1=1 ");
if (name != null && name.length() != 0) {
sql.append(" and t.unitname like '%" + name + "%'");
}
rs = systemService.findForJdbc(sql.toString());
} else if (role.contains("机场") || role.contains("动车")
|| role.contains("高尔夫") || role.contains("游艇")
|| role.contains("空中飞行")) {
StringBuffer sql = new StringBuffer();
sql.append(" SELECT ");
sql.append(" t.id id, ");
sql.append(" t.phone telephone, ");
sql.append(" t.`name` enterpriseName, ");
sql.append(" '' enterpriseCode, ");
sql.append(" t.address enterpriseAddress, ");
sql.append(" if(t.area='0','市辖区',if(t.area='1','崖州区',if(t.area='2','海棠区',if(t.area='3','天涯区',if(t.area='4','吉阳区',''))))) enterpriseArea, ");
sql.append(" if(t.type='1','高尔夫项目',if(t.type='2','游艇项目',if(t.type='3','空中飞行项目',if(t.type='4','机场项目',if(t.type='5','动车项目',''))))) enterpriseType ");
sql.append(" FROM ");
sql.append(" t_othercompany_info t ");
sql.append(" WHERE 1=1 ");
if (name != null && name.length() != 0) {
sql.append(" and t.`name` like '%" + name + "%'");
}
rs = systemService.findForJdbc(sql.toString());
}
List<EnterpriseInfo> list = new ArrayList<>();
for (Iterator iterator = rs.iterator(); iterator.hasNext();) {
Map<String, Object> map = (Map<String, Object>) iterator.next();
EnterpriseInfo enterpriseInfo = new EnterpriseInfo();
enterpriseInfo.setId(map.get("id") == null ? "" : map.get("id")
.toString());
enterpriseInfo
.setEnterpriseAddress(map.get("enterpriseAddress") == null ? ""
: map.get("enterpriseAddress").toString());
enterpriseInfo
.setEnterpriseArea(map.get("enterpriseArea") == null ? ""
: map.get("enterpriseArea").toString());
enterpriseInfo
.setEnterpriseCode(map.get("enterpriseCode") == null ? ""
: map.get("enterpriseCode").toString());
enterpriseInfo
.setEnterpriseName(map.get("enterpriseName") == null ? ""
: map.get("enterpriseName").toString());
enterpriseInfo
.setEnterpriseType(map.get("enterpriseType") == null ? ""
: map.get("enterpriseType").toString());
enterpriseInfo
.setEnterpriseScore(map.get("enterpriseScore") == null ? ""
: map.get("enterpriseScore").toString());
enterpriseInfo.setTelephone(map.get("telephone") == null ? "" : map
.get("telephone").toString());
list.add(enterpriseInfo);
}
return list;
}
/**
* 获取旅行社基本信息
*
* @param request
* @param response
* @return 旅行社基本信息
*/
@RequestMapping(params = "getTravelAgencyDetailInfo")
@ResponseBody
public APPTraveldata getTravelAgencyDetailInfo(HttpServletRequest request,
HttpServletResponse response) {
String userId = request.getParameter("userId");
APPTraveldata data = new APPTraveldata();
// 参数校验
if (userId == null || userId.length() == 0)
return data;
List<Traveldata> traveldataList = systemService.findByProperty(
Traveldata.class, "userId", userId);
Traveldata traveldata = traveldataList.get(0);
// 主键
data.setId(traveldata.getId());
// 许可证编号
data.setLicensenum(traveldata.getLicensenum());
;
// 旅行社名称
data.setName(traveldata.getName());
// 英文名称
data.setEnglishname(traveldata.getEnglishname());
// 组织机构代码
data.setOrganizationnum(traveldata.getOrganizationnum());
// 法人代表
data.setCorporate(traveldata.getCorporate());
// 行政区域代码
data.setAdminnum(traveldata.getAdminnum());
// 统一社会信用代码
data.setProvince(traveldata.getProvince());
// 所在地区
data.setArea(traveldata.getArea());
// 详细地址
data.setAddress(traveldata.getAddress());
// 邮政编码
data.setZonecode(traveldata.getZonecode());
// 固定电话
data.setPhone(traveldata.getPhone());
// 固定电话分机
data.setPhoneextension(traveldata.getPhoneextension());
// 传真
data.setFax(traveldata.getFax());
// 传真分机
data.setFaxextension(traveldata.getFaxextension());
// 手机
data.setMobile(traveldata.getMobile());
// 邮箱
data.setEmail(traveldata.getEmail());
// 单位负责人
data.setPrincipal(traveldata.getPrincipal());
// 企业登记注册类型
data.setRegisterstyle(traveldata.getRegisterstyle());
// 是否经营出境游
data.setBusinessexit("1".equals(traveldata.getBusinessexit()) ? "是"
: "否");
// 是否经营边境游
data.setBusinessborder("1".equals(traveldata.getBusinessborder()) ? "是"
: "否");
// 旅行社协会会员
data.setIsmember("1".equals(traveldata.getIsmember()) ? "是" : "否");
// qq
data.setQq(traveldata.getQq());
// 网站
data.setWeburl(traveldata.getWeburl());
// 旅行社等级
data.setSceneSpotlevel(traveldata.getSceneSpotlevel());
// 工商登记注册时间
data.setTableDate(traveldata.getTableDate());
// 填表人
data.setFiller(traveldata.getFiller());
// 填表人电话
data.setFillerTel(traveldata.getFillerTel());
// 批准文号
data.setAccommodationStar(traveldata.getAccommodationStar());
// 旅行社经营场所
data.setTravelAgencyType(traveldata.getTravelAgencyType());
return data;
}
/**
* 获取酒店基本信息
*
* @param request
* @param response
* @return 酒店基本信息
*/
@RequestMapping(params = "getOfficalHotelDetailInfo")
@ResponseBody
public APPHotel getOfficalHotelDetailInfo(HttpServletRequest request,
HttpServletResponse response) {
/** 设置响应头允许ajax跨域访问 **/
response.setHeader("Access-Control-Allow-Origin", "*");
/* 星号表示所有的异域请求都可以接受, */
response.setHeader("Access-Control-Allow-Methods", "GET,POST");
String userId = request.getParameter("userId");
APPHotel data = new APPHotel();
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
try {
// 获取酒店信息
Hotelmanage hotelmanage = systemService.get(Hotelmanage.class,
userId);
data.setId(hotelmanage.getId());
// 标牌编码
data.setCode(hotelmanage.getCode());
// 酒店法人
data.setLegalPerson(hotelmanage.getLegalPerson());
// 组织机构代码
data.setOrganizationNum(hotelmanage.getOrganizationNum());
// 单位名称
data.setUnitname(hotelmanage.getUnitname());
// 所属市,默认三亚市
data.setCity("三亚市");
// 所在地区,"市辖区_0","吉阳区_1","崖州区_2","天涯区_3","海棠区_4"
String county = "";
switch (hotelmanage.getCounty() == null ? "" : hotelmanage
.getCounty()) {
case "0":
county = "市辖区";
break;
case "1":
county = "吉阳区";
break;
case "2":
county = "崖州区";
break;
case "3":
county = "天涯区";
break;
case "4":
county = "海棠区";
break;
}
data.setCounty(county);
// 所属湾区 0 市区1亚龙湾2大东海3三亚湾 4海棠湾
String bay = "";
switch (hotelmanage.getBay() == null ? "" : hotelmanage.getBay()) {
case "0":
bay = "市区";
break;
case "1":
bay = "亚龙湾";
break;
case "2":
bay = "大东海";
break;
case "3":
bay = "三亚湾";
break;
case "4":
bay = "海棠湾";
break;
}
data.setBay(bay);
// 地址
data.setAddress(hotelmanage.getAddress());
// 负责人
data.setManager(hotelmanage.getManager());
// 邮政编码
data.setZipcode(hotelmanage.getZipcode());
// 电话号码
data.setTelephone(hotelmanage.getTelephone());
// 手机号码
data.setMobile(hotelmanage.getMobile());
// 酒店星级,"其他_0","舒适_1","高档_2","豪华_3","一星_4","二星_5","三星_6","四星_7","五星_8"
String housegrade = "";
switch (hotelmanage.getHousegrade() == null ? "" : hotelmanage
.getHousegrade()) {
case "0":
housegrade = "其他";
break;
case "1":
housegrade = "舒适";
break;
case "2":
housegrade = "高档";
break;
case "3":
housegrade = "豪华";
break;
case "4":
housegrade = "一星";
break;
case "5":
housegrade = "二星";
break;
case "6":
housegrade = "三星";
break;
case "7":
housegrade = "四星";
break;
case "8":
housegrade = "五星";
break;
}
data.setHousegrade(housegrade);
// 房间数
data.setHousenum(hotelmanage.getHousenum() == null ? "" : String
.valueOf(hotelmanage.getHousenum()));
// 床位数
data.setBednum(hotelmanage.getBednum() == null ? "" : String
.valueOf(hotelmanage.getBednum()));
// 工商注册登记时间
String registertime = "";
try {
registertime = sdf.format(hotelmanage.getRegistertime());
} catch (Exception e) {
}
data.setRegistertime(registertime);
// 企业注册登记类型
data.setRegisterstyle(hotelmanage.getRegisterstyle());
// 填表人
data.setWriter(hotelmanage.getWriter());
// 传真
data.setFax(hotelmanage.getFax());
// 网址
data.setWeburl(hotelmanage.getWeburl());
// 邮件
data.setEmail(hotelmanage.getEmail());
} catch (Exception e) {
e.printStackTrace();
}
return data;
}
/**
* 获取酒店基本信息
*
* @param request
* @param response
* @return 酒店基本信息
*/
@RequestMapping(params = "getHotelDetailInfo")
@ResponseBody
public APPHotel getHotelDetailInfo(HttpServletRequest request,
HttpServletResponse response) {
/** 设置响应头允许ajax跨域访问 **/
response.setHeader("Access-Control-Allow-Origin", "*");
/* 星号表示所有的异域请求都可以接受, */
response.setHeader("Access-Control-Allow-Methods", "GET,POST");
String userId = request.getParameter("userId");
APPHotel data = new APPHotel();
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
try {
// 获取酒店信息
HotelmanageSta hotelmanage = systemService.get(
HotelmanageSta.class, userId);
data.setId(hotelmanage.getId());
// 标牌编码
data.setCode(hotelmanage.getCode());
// 酒店法人
data.setLegalPerson(hotelmanage.getLegalPerson());
// 组织机构代码
data.setOrganizationNum(hotelmanage.getOrganizationNum());
// 单位名称
data.setUnitname(hotelmanage.getUnitname());
// 所属市,默认三亚市
data.setCity("三亚市");
// 所在地区,"市辖区_0","吉阳区_1","崖州区_2","天涯区_3","海棠区_4"
String county = "";
switch (hotelmanage.getCounty() == null ? "" : hotelmanage
.getCounty()) {
case "0":
county = "市辖区";
break;
case "1":
county = "吉阳区";
break;
case "2":
county = "崖州区";
break;
case "3":
county = "天涯区";
break;
case "4":
county = "海棠区";
break;
}
data.setCounty(county);
// 所属湾区 0 市区1亚龙湾2大东海3三亚湾 4海棠湾
String bay = "";
switch (hotelmanage.getBay() == null ? "" : hotelmanage.getBay()) {
case "0":
bay = "市区";
break;
case "1":
bay = "亚龙湾";
break;
case "2":
bay = "大东海";
break;
case "3":
bay = "三亚湾";
break;
case "4":
bay = "海棠湾";
break;
}
data.setBay(bay);
// 地址
data.setAddress(hotelmanage.getAddress());
// 负责人
data.setManager(hotelmanage.getManager());
// 邮政编码
data.setZipcode(hotelmanage.getZipcode());
// 电话号码
data.setTelephone(hotelmanage.getTelephone());
// 手机号码
data.setMobile(hotelmanage.getMobile());
// 酒店星级,"其他_0","舒适_1","高档_2","豪华_3","一星_4","二星_5","三星_6","四星_7","五星_8"
String housegrade = "";
switch (hotelmanage.getHousegrade() == null ? "" : hotelmanage
.getHousegrade()) {
case "0":
housegrade = "其他";
break;
case "1":
housegrade = "舒适";
break;
case "2":
housegrade = "高档";
break;
case "3":
housegrade = "豪华";
break;
case "4":
housegrade = "一星";
break;
case "5":
housegrade = "二星";
break;
case "6":
housegrade = "三星";
break;
case "7":
housegrade = "四星";
break;
case "8":
housegrade = "五星";
break;
}
data.setHousegrade(housegrade);
// 房间数
data.setHousenum(hotelmanage.getHousenum() == null ? "" : String
.valueOf(hotelmanage.getHousenum()));
// 床位数
data.setBednum(hotelmanage.getBednum() == null ? "" : String
.valueOf(hotelmanage.getBednum()));
// 工商注册登记时间
String registertime = "";
try {
registertime = sdf.format(hotelmanage.getRegistertime());
} catch (Exception e) {
}
data.setRegistertime(registertime);
// 企业注册登记类型
data.setRegisterstyle(hotelmanage.getRegisterstyle());
// 填表人
data.setWriter(hotelmanage.getWriter());
// 传真
data.setFax(hotelmanage.getFax());
// 网址
data.setWeburl(hotelmanage.getWeburl());
// 邮件
data.setEmail(hotelmanage.getEmail());
// 审核状态
String status = this.getStatus(hotelmanage.getStatus());
data.setStatus(status);
String districtStatus = this.getStatus(hotelmanage
.getDistrictStatus());
data.setDistrictStatus(districtStatus);
} catch (Exception e) {
e.printStackTrace();
}
return data;
}
public String getStatus(String status) {
switch (status) {
case "1":
status = "未填报";
break;
case "2":
status = "待审核";
break;
case "3":
status = "审核不通过";
break;
case "4":
status = "审核通过";
break;
}
return status;
}
/**
* 获取涉旅企业基本信息
*
* @param request
* @param response
* @return 涉旅企业基本信息
*/
@RequestMapping(params = "getOtherTravelDetailInfo")
@ResponseBody
public APPOtherTravel getOtherTravelDetailInfo(HttpServletRequest request,
HttpServletResponse response) {
/** 设置响应头允许ajax跨域访问 **/
response.setHeader("Access-Control-Allow-Origin", "*");
/* 星号表示所有的异域请求都可以接受, */
response.setHeader("Access-Control-Allow-Methods", "GET,POST");
APPOtherTravel data = new APPOtherTravel();
String userId = request.getParameter("userId");
try {
OtherTravelInfo otherTravelInfo = systemService.get(
OtherTravelInfo.class, userId);
data.setId(otherTravelInfo.getId());
// 企业名称
data.setName(otherTravelInfo.getName());
// 负责人
data.setPrincipal(otherTravelInfo.getPrincipal());
// 联系电话
data.setPhone(otherTravelInfo.getPhone());
// 企业类型,高尔夫_1","游艇_2","空中飞行_3","机场_4,动车_5
String type = "";
switch (otherTravelInfo.getType() == null ? "" : otherTravelInfo
.getType()) {
case "1":
type = "高尔夫";
break;
case "2":
type = "游艇";
break;
case "3":
type = "空中飞行";
break;
case "4":
type = "机场";
break;
case "5":
type = "动车";
break;
}
data.setType(type);
// 所属区,0-市辖区;1-崖州区;2-海棠区;3-天涯区;4-吉阳区
String area = "";
switch (otherTravelInfo.getArea() == null ? "" : otherTravelInfo
.getArea()) {
case "0":
area = "市辖区";
break;
case "1":
area = "崖州区";
break;
case "2":
area = "海棠区";
break;
case "3":
area = "天涯区";
break;
case "4":
area = "吉阳区";
break;
}
data.setArea(area);
// 详细地址
data.setAddress(otherTravelInfo.getAddress());
// 邮政编码
data.setPostalcode(otherTravelInfo.getPostalcode());
// 所在省,默认海南省
data.setPrivince(otherTravelInfo.getPrivince());
// 所在市,默认三亚市
data.setCity(otherTravelInfo.getCity());
data.setTel(otherTravelInfo.getMobile());
} catch (Exception e) {
e.printStackTrace();
}
return data;
}
}
@@ -0,0 +1,245 @@
package com.zzc.app.login.entity;
public class APPHotel {
private String id;
// 标牌编码
private String code;
// 酒店法人
private String legalPerson;
// 组织机构代码
private String organizationNum;
// 单位名称
private String unitname;
// 所属市,默认三亚市
private String city;
// 所在地区,"市辖区_0","吉阳区_1","崖州区_2","天涯区_3","海棠区_4"
private String county;
// 所属湾区 0 市区1亚龙湾2大东海3三亚湾 4海棠湾
private String bay;
// 地址
private String address;
// 负责人
private String manager;
// 邮政编码
private String zipcode;
// 电话号码
private String telephone;
// 手机号码
private String mobile;
// 酒店星级,"其他_0","舒适_1","高档_2","豪华_3","一星_4","二星_5","三星_6","四星_7","五星_8"
private String housegrade;
// 房间数
private String housenum;
// 床位数
private String bednum;
// 工商注册登记时间
private String registertime;
// 企业注册登记类型
private String registerstyle;
// 填表人
private String writer;
// 传真
private String fax;
// 网址
private String weburl;
// 邮件
private String email;
// 市级审核状态
private String status;
// 区级审核状态
private String districtStatus;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getLegalPerson() {
return legalPerson;
}
public void setLegalPerson(String legalPerson) {
this.legalPerson = legalPerson;
}
public String getOrganizationNum() {
return organizationNum;
}
public void setOrganizationNum(String organizationNum) {
this.organizationNum = organizationNum;
}
public String getUnitname() {
return unitname;
}
public void setUnitname(String unitname) {
this.unitname = unitname;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getCounty() {
return county;
}
public void setCounty(String county) {
this.county = county;
}
public String getBay() {
return bay;
}
public void setBay(String bay) {
this.bay = bay;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getManager() {
return manager;
}
public void setManager(String manager) {
this.manager = manager;
}
public String getZipcode() {
return zipcode;
}
public void setZipcode(String zipcode) {
this.zipcode = zipcode;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getHousegrade() {
return housegrade;
}
public void setHousegrade(String housegrade) {
this.housegrade = housegrade;
}
public String getHousenum() {
return housenum;
}
public void setHousenum(String housenum) {
this.housenum = housenum;
}
public String getBednum() {
return bednum;
}
public void setBednum(String bednum) {
this.bednum = bednum;
}
public String getRegistertime() {
return registertime;
}
public void setRegistertime(String registertime) {
this.registertime = registertime;
}
public String getRegisterstyle() {
return registerstyle;
}
public void setRegisterstyle(String registerstyle) {
this.registerstyle = registerstyle;
}
public String getWriter() {
return writer;
}
public void setWriter(String writer) {
this.writer = writer;
}
public String getFax() {
return fax;
}
public void setFax(String fax) {
this.fax = fax;
}
public String getWeburl() {
return weburl;
}
public void setWeburl(String weburl) {
this.weburl = weburl;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getDistrictStatus() {
return districtStatus;
}
public void setDistrictStatus(String districtStatus) {
this.districtStatus = districtStatus;
}
}
@@ -0,0 +1,114 @@
package com.zzc.app.login.entity;
public class APPOtherTravel {
private String id;
// 企业名称
private String name;
// 负责人
private String principal;
// 联系电话
private String phone;
// 企业类型,高尔夫项目_1","游艇项目_2","空中飞行项目_3","机场项目_4,动车项目_5
private String type;
// 所属区,0-市辖区;1-崖州区;2-海棠区;3-天涯区;4-吉阳区
private String area;
// 详细地址
private String address;
// 邮政编码
private String postalcode;
// 所在省,默认海南省
private String privince;
// 所在市,默认三亚市
private String city;
private String tel;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPrincipal() {
return principal;
}
public void setPrincipal(String principal) {
this.principal = principal;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getArea() {
return area;
}
public void setArea(String area) {
this.area = area;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getPostalcode() {
return postalcode;
}
public void setPostalcode(String postalcode) {
this.postalcode = postalcode;
}
public String getPrivince() {
return privince;
}
public void setPrivince(String privince) {
this.privince = privince;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getTel() {
return tel;
}
public void setTel(String tel) {
this.tel = tel;
}
}
@@ -0,0 +1,306 @@
package com.zzc.app.login.entity;
public class APPTraveldata {
// 主键
private String id;
// 许可证编号
private String licensenum;
// 旅行社名称
private String name;
// 英文名称
private String englishname;
// 组织机构代码
private String organizationnum;
// 法人代表
private String corporate;
// 行政区域代码
private String adminnum;
// 统一社会信用代码
private String province;
// 所在地区
private String area;
// 详细地址
private String address;
// 邮政编码
private String zonecode;
// 固定电话
private String phone;
// 固定电话分机
private String phoneextension;
// 传真
private String fax;
// 传真分机
private String faxextension;
// 手机
private String mobile;
// 邮箱
private String email;
// 单位负责人
private String principal;
// 企业登记注册类型
private String registerstyle;
// 是否经营出境游
private String businessexit;
// 是否经营边境游
private String businessborder;
// 旅行社协会会员
private String ismember;
// qq
private String qq;
// 网站
private String weburl;
// 旅行社等级 0:未评定,1:A级,2:AA级;3:AAA级,4:AAAA级,5:AAAAA级
private String sceneSpotlevel;
// 工商登记注册时间
private String tableDate;
// 填表人
private String filler;
// 填表人电话
private String fillerTel;
// 批准文号
private String accommodationStar;
// 旅行社经营场所
private String travelAgencyType;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getLicensenum() {
return licensenum;
}
public void setLicensenum(String licensenum) {
this.licensenum = licensenum;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEnglishname() {
return englishname;
}
public void setEnglishname(String englishname) {
this.englishname = englishname;
}
public String getOrganizationnum() {
return organizationnum;
}
public void setOrganizationnum(String organizationnum) {
this.organizationnum = organizationnum;
}
public String getCorporate() {
return corporate;
}
public void setCorporate(String corporate) {
this.corporate = corporate;
}
public String getAdminnum() {
return adminnum;
}
public void setAdminnum(String adminnum) {
this.adminnum = adminnum;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getArea() {
return area;
}
public void setArea(String area) {
this.area = area;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getZonecode() {
return zonecode;
}
public void setZonecode(String zonecode) {
this.zonecode = zonecode;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getPhoneextension() {
return phoneextension;
}
public void setPhoneextension(String phoneextension) {
this.phoneextension = phoneextension;
}
public String getFax() {
return fax;
}
public void setFax(String fax) {
this.fax = fax;
}
public String getFaxextension() {
return faxextension;
}
public void setFaxextension(String faxextension) {
this.faxextension = faxextension;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPrincipal() {
return principal;
}
public void setPrincipal(String principal) {
this.principal = principal;
}
public String getRegisterstyle() {
return registerstyle;
}
public void setRegisterstyle(String registerstyle) {
this.registerstyle = registerstyle;
}
public String getBusinessexit() {
return businessexit;
}
public void setBusinessexit(String businessexit) {
this.businessexit = businessexit;
}
public String getBusinessborder() {
return businessborder;
}
public void setBusinessborder(String businessborder) {
this.businessborder = businessborder;
}
public String getIsmember() {
return ismember;
}
public void setIsmember(String ismember) {
this.ismember = ismember;
}
public String getQq() {
return qq;
}
public void setQq(String qq) {
this.qq = qq;
}
public String getWeburl() {
return weburl;
}
public void setWeburl(String weburl) {
this.weburl = weburl;
}
public String getSceneSpotlevel() {
return sceneSpotlevel;
}
public void setSceneSpotlevel(String sceneSpotlevel) {
this.sceneSpotlevel = sceneSpotlevel;
}
public String getTableDate() {
return tableDate;
}
public void setTableDate(String tableDate) {
this.tableDate = tableDate;
}
public String getFiller() {
return filler;
}
public void setFiller(String filler) {
this.filler = filler;
}
public String getFillerTel() {
return fillerTel;
}
public void setFillerTel(String fillerTel) {
this.fillerTel = fillerTel;
}
public String getAccommodationStar() {
return accommodationStar;
}
public void setAccommodationStar(String accommodationStar) {
this.accommodationStar = accommodationStar;
}
public String getTravelAgencyType() {
return travelAgencyType;
}
public void setTravelAgencyType(String travelAgencyType) {
this.travelAgencyType = travelAgencyType;
}
}
@@ -0,0 +1,125 @@
package com.zzc.app.notice.controller;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import com.zzc.app.notice.entity.InformEntity;
import com.zzc.web.notice.entity.Notice;
import com.zzc.web.system.service.SystemService;
@Controller
@RequestMapping("/appservice/appnoticeController")
public class AppNoticeController {
private SystemService systemService;
public SystemService getSystemService() {
return systemService;
}
@Autowired
public void setSystemService(SystemService systemService) {
this.systemService = systemService;
}
/**
*
* 获取通知详情
*
* @param request
* @param userId
* @return 通知json
*/
@RequestMapping(params = "notice", method = RequestMethod.GET)
@ResponseBody
public String getNotice(HttpServletRequest request, String userId) {
Map<String, Object> roleMap = systemService
.findOneForJdbc(
"select * from t_s_role t where t.id=(select tr.roleid from t_s_role_user tr where tr.userid =?)",
userId);
String role = roleMap.get("rolename").toString();
String response = null;
String noticerange = null;
if (role.contains("景区")) {
noticerange = "1";
} else if (role.contains("旅行社")) {
noticerange = "2";
} else if (role.equals("星级酒店数据上报员")) {
noticerange = "3";
} else if (role.contains("星级酒店")) {
noticerange = "4";
} else if (role.contains("机场") || role.contains("动车")
|| role.contains("高尔夫") || role.contains("游艇")
|| role.contains("空中飞行")) {
noticerange = "5";
}
List<Notice> noticelist = new ArrayList<Notice>();
List<InformEntity> appnoticelist = new ArrayList<InformEntity>();
if (noticerange != null) {
noticelist = systemService
.findHql("from Notice n where n.range='0' or n.range=?",
noticerange);
} else {
noticelist = systemService.findHql("from Notice");
}
Notice notice[] = new Notice[noticelist.size()];
InformEntity informEntity[] = new InformEntity[noticelist.size()];
for (int i = 0; i < noticelist.size(); i++) {
notice[i] = noticelist.get(i);
informEntity[i] = new InformEntity();
informEntity[i].setId(notice[i].getId());
informEntity[i].setInformContent(notice[i].getAppContent());
informEntity[i].setInformFrom(notice[i].getSource());
informEntity[i].setInformName(notice[i].getTitle());
informEntity[i].setInformTime(String.valueOf(notice[i]
.getCreateDate() == null ? "" : notice[i].getCreateDate()));
if (notice[i].getRange().equals("0")) {
notice[i].setRange("全部企业");
} else if (notice[i].getRange().equals("1")) {
notice[i].setRange("景区");
} else if (notice[i].getRange().equals("2")) {
notice[i].setRange("旅行社");
} else if (notice[i].getRange().equals("3")) {
notice[i].setRange("星级酒店");
} else if (notice[i].getRange().equals("4")) {
notice[i].setRange("所有酒店");
} else if (notice[i].getRange().equals("5")) {
notice[i].setRange("其他涉旅企业");
}
informEntity[i].setRange(notice[i].getRange());
informEntity[i].setReleaser(notice[i].getAnnouncer());
appnoticelist.add(informEntity[i]);
}
String giveapp = "|success";
response = JSON.toJSONString(appnoticelist) + giveapp;
return response;
}
/**
* 返回通知视图
*
* @param request
* @return 通知视图
*/
@RequestMapping(params = "detail", method = RequestMethod.GET)
public ModelAndView detail(HttpServletRequest request) {
String id = request.getParameter("id");
Notice notice = systemService.getEntity(Notice.class, id);
request.setAttribute("notice", notice);
return new ModelAndView("notice/appnotice").addObject("notice", notice);
/*
* return
* "http://192.168.0.106:8080/syly/webpage/notice/appnotice.jsp?id="+id;
*/
}
}
@@ -0,0 +1,135 @@
package com.zzc.app.notice.entity;
import java.io.Serializable;
/**
* Created by CC on 2017/1/12. 通知实体类,通知界面中使用
*/
public class InformEntity implements Serializable {
/**
* 通知的名称
*/
private String informName;
/**
* 通知的时间
*/
private String informTime;
/**
* 通知的内容
*/
private String informContent;
/**
* 通知范围
*/
private String range;
/**
* 消息发布者
*/
private String releaser;
/**
* 响应码
*/
private String responseCode;
/**
* 通知ID
*/
private String id;
/**
* 通知的来源
*/
private String informFrom;
public InformEntity() {
}
public InformEntity(String informName, String informTime,
String informContent, String range, String releaser,
String responseCode, String id, String informFrom) {
this.informName = informName;
this.informTime = informTime;
this.informContent = informContent;
this.range = range;
this.releaser = releaser;
this.responseCode = responseCode;
this.id = id;
this.informFrom = informFrom;
}
public String getInformName() {
return informName;
}
public void setInformName(String informName) {
this.informName = informName;
}
public String getInformTime() {
return informTime;
}
public void setInformTime(String informTime) {
this.informTime = informTime;
}
public String getInformFrom() {
return informFrom;
}
public void setInformFrom(String informFrom) {
this.informFrom = informFrom;
}
public String getResponseCode() {
return responseCode;
}
public void setResponseCode(String responseCode) {
this.responseCode = responseCode;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getInformContent() {
return informContent;
}
public void setInformContent(String informContent) {
this.informContent = informContent;
}
public String getReleaser() {
return releaser;
}
public void setReleaser(String releaser) {
this.releaser = releaser;
}
public String getRange() {
return range;
}
public void setRange(String range) {
this.range = range;
}
@Override
public String toString() {
return "InformEntity{" + "range='" + range + '\'' + ", releaser='"
+ releaser + '\'' + ", responseCode='" + responseCode + '\''
+ ", id='" + id + '\'' + ", informContent='" + informContent
+ '\'' + ", informName='" + informName + '\''
+ ", informTime='" + informTime + '\'' + ", informFrom='"
+ informFrom + '\'' + '}';
}
}
@@ -0,0 +1,392 @@
package com.zzc.app.otherTravel.controller;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.alibaba.fastjson.JSON;
import com.zzc.app.otherTravel.entity.AirportMonthlyReportEntity;
import com.zzc.web.otherTravel.entity.AirportMonthly;
import com.zzc.web.otherTravel.entity.OtherTravelInfo;
import com.zzc.web.sylyUtils.Status;
import com.zzc.web.sylyUtils.TimeUtils;
import com.zzc.web.system.service.SystemService;
/**
*
*
* @date: 2017年2月9日
* @Author: 龙
* @Email:
* @FileName: AirportMonthController.java
* @Version: 1.0
* @About: 保存/展示空中飞行项目接口
*/
@Controller
@RequestMapping("/appservice/appAirportMonthController")
public class AirportMonthController {
private SystemService systemService;
public SystemService getSystemService() {
return systemService;
}
@Autowired
public void setSystemService(SystemService systemService) {
this.systemService = systemService;
}
/**
* 是否填报月报
*
* @param userId
* @return 月报实体类
*/
@RequestMapping(params = "ifhavemonthdata")
@ResponseBody
public AirportMonthlyReportEntity ifhavemonthdata(String userId) {
List<OtherTravelInfo> otherTravelInfolist = systemService.findHql(
"from OtherTravelInfo ot where ot.id=?", userId);
String repsonse = null;
AirportMonthlyReportEntity airportMonthlyReportEntity = new AirportMonthlyReportEntity();
if (otherTravelInfolist.size() > 0) {
OtherTravelInfo otherTravelInfo = otherTravelInfolist.get(0);
String uid = otherTravelInfo.getId();
String lastMonth = TimeUtils.getLastMonth();
// 获取当前年份飞行项目的月报列表
List<Map<String, Object>> list = systemService
.findForJdbc(
"SELECT * FROM `t_airport_monthly` tf WHERE tf.oid=? AND tf.smonth LIKE ?",
uid, lastMonth);
if (list.size() > 0) {
AirportMonthly airportMonthly = systemService.get(
AirportMonthly.class, (String) list.get(0).get("ID"));
airportMonthlyReportEntity.setDates(String
.valueOf(airportMonthly.getSmonth()));
airportMonthlyReportEntity.setUserId(userId);
airportMonthlyReportEntity.setPlansortie(String
.valueOf(airportMonthly.getPlansortie()));
airportMonthlyReportEntity.setActualsortie(String
.valueOf(airportMonthly.getActualsortie()));
airportMonthlyReportEntity.setPlansortieyear(String
.valueOf(airportMonthly.getPlansortieyear()));
airportMonthlyReportEntity.setPlanouttraveller(String
.valueOf(airportMonthly.getPlanouttraveller()));
airportMonthlyReportEntity.setActualouttraveller(String
.valueOf(airportMonthly.getActualouttraveller()));
airportMonthlyReportEntity.setPlanouttravelleryear(String
.valueOf(airportMonthly.getPlanouttravelleryear()));
airportMonthlyReportEntity.setPlanoutwill(String
.valueOf(airportMonthly.getPlanoutwill()));
airportMonthlyReportEntity.setActualoutwill(String
.valueOf(airportMonthly.getActualoutwill()));
airportMonthlyReportEntity.setPlanoutwillyear(String
.valueOf(airportMonthly.getPlanoutwillyear()));
airportMonthlyReportEntity.setPlanIntegerraveller(String
.valueOf(airportMonthly.getPlanIntegerraveller()));
airportMonthlyReportEntity.setActualIntegerraveller(String
.valueOf(airportMonthly.getActualIntegerraveller()));
airportMonthlyReportEntity.setPlanIntegerravelleryear(String
.valueOf(airportMonthly.getPlanIntegerravelleryear()));
airportMonthlyReportEntity.setPlaninwill(String
.valueOf(airportMonthly.getPlaninwill()));
airportMonthlyReportEntity.setActualinwill(String
.valueOf(airportMonthly.getActualinwill()));
airportMonthlyReportEntity.setPlaninwillyear(String
.valueOf(airportMonthly.getPlaninwillyear()));
airportMonthlyReportEntity.setPlanthroughputtraveller(String
.valueOf(airportMonthly.getPlanthroughputtraveller()));
airportMonthlyReportEntity
.setActualthroughputtraveller(String
.valueOf(airportMonthly
.getActualthroughputtraveller()));
airportMonthlyReportEntity
.setPlanthroughputtravelleryear(String
.valueOf(airportMonthly
.getPlanthroughputtravelleryear()));
airportMonthlyReportEntity.setPlanthroughputwill(String
.valueOf(airportMonthly.getPlanthroughputwill()));
airportMonthlyReportEntity.setActualthroughputwill(String
.valueOf(airportMonthly.getActualthroughputwill()));
airportMonthlyReportEntity.setPlanthroughputwillyear(String
.valueOf(airportMonthly.getPlanthroughputwillyear()));
airportMonthlyReportEntity.setReporter(String
.valueOf(airportMonthly.getReporter()));
if (null != airportMonthly.getReportdate()) {
airportMonthlyReportEntity.setReportdate(TimeUtils
.getMonth(airportMonthly.getReportdate()));
}
String status = getstatus(String.valueOf(airportMonthly
.getStatus()));
airportMonthlyReportEntity.setStatus(status);
// flightMonthlyReportEntity;
} else {
AirportMonthlyReportEntity airportMonthlyReportEntity1 = new AirportMonthlyReportEntity();
airportMonthlyReportEntity1.setDates(TimeUtils.getLastMonth());
airportMonthlyReportEntity1
.setStatus(getstatus(Status.noSumbit));
repsonse = JSON.toJSONString(airportMonthlyReportEntity1);
return airportMonthlyReportEntity1;
}
}
return airportMonthlyReportEntity;
}
/**
* 月报提交
*
* @param json
* @return
* @throws ParseException
*/
@RequestMapping(params = "monthdata", method = RequestMethod.POST)
@ResponseBody
public String editmonthdata(HttpServletRequest request)
throws ParseException {
String json = request.getParameter("param");
String flag = request.getParameter("flag");
JSONObject node = JSONObject.fromObject(json);
String repsonse = "error";
AirportMonthly airportMonthly = new AirportMonthly();
String userId = node.getString("userId");
List<OtherTravelInfo> otherTravelInfolist = systemService.findHql(
"from OtherTravelInfo ot where ot.id=?", userId);
if (otherTravelInfolist.size() > 0) {
OtherTravelInfo otherTravelInfo = otherTravelInfolist.get(0);
String uid = otherTravelInfo.getId();
String lastMonth = TimeUtils.getLastMonth();
// 获取当前年份飞行项目的月报列表
List<Map<String, Object>> list = systemService
.findForJdbc(
"SELECT * FROM `t_airport_monthly` tf WHERE tf.oid=? AND tf.smonth LIKE ?",
uid, lastMonth);
if (list.size() > 0) {
airportMonthly = systemService.get(AirportMonthly.class,
(String) list.get(0).get("ID"));
}
airportMonthly.setOtherTravelInfo(otherTravelInfo);
airportMonthly.setSmonth(node.getString("dates"));
airportMonthly.setOtid(userId);
airportMonthly.setDates(new SimpleDateFormat("yyyy-MM").parse(node
.getString("dates")));
airportMonthly.setPlansortie(node.getString("plansortie")
.equals("") ? 0 : Integer.valueOf(node
.getString("plansortie")));
airportMonthly.setActualsortie(node.getString("actualsortie")
.equals("") ? 0 : Integer.valueOf(node
.getString("actualsortie")));
airportMonthly.setPlansortieyear(node.getString("plansortieyear")
.equals("") ? 0 : Integer.valueOf(node
.getString("plansortieyear")));
airportMonthly.setPlanouttraveller(node.getString(
"planouttraveller").equals("") ? 0.0 : Double.valueOf(node
.getString("planouttraveller")));
airportMonthly.setActualouttraveller(node.getString(
"actualouttraveller").equals("") ? 0.0 : Double
.valueOf(node.getString("actualouttraveller")));
airportMonthly.setPlanouttravelleryear(node.getString(
"planouttravelleryear").equals("") ? 0.0 : Double
.valueOf(node.getString("planouttravelleryear")));
airportMonthly.setPlanoutwill(node.getString("planoutwill").equals(
"") ? 0.0 : Double.valueOf(node.getString("planoutwill")));
airportMonthly.setActualoutwill(node.getString("actualoutwill")
.equals("") ? 0.0 : Double.valueOf(node
.getString("actualoutwill")));
airportMonthly.setPlanoutwillyear(node.getString("planoutwillyear")
.equals("") ? 0.0 : Double.valueOf(node
.getString("planoutwillyear")));
airportMonthly.setPlanIntegerraveller(node.getString(
"planIntegerraveller").equals("") ? 0.0 : Double
.valueOf(node.getString("planIntegerraveller")));
airportMonthly.setActualIntegerraveller(node.getString(
"actualIntegerraveller").equals("") ? 0.0 : Double
.valueOf(node.getString("actualIntegerraveller")));
airportMonthly.setPlanIntegerravelleryear(node.getString(
"planIntegerravelleryear").equals("") ? 0.0 : Double
.valueOf(node.getString("planIntegerravelleryear")));
airportMonthly.setPlaninwill(node.getString("planinwill")
.equals("") ? 0.0 : Double.valueOf(node
.getString("planinwill")));
airportMonthly.setActualinwill(node.getString("actualinwill")
.equals("") ? 0.0 : Double.valueOf(node
.getString("actualinwill")));
airportMonthly.setPlaninwillyear(node.getString("planinwillyear")
.equals("") ? 0.0 : Double.valueOf(node
.getString("planinwillyear")));
airportMonthly.setPlanthroughputtraveller(node.getString(
"planthroughputtraveller").equals("") ? 0.0 : Double
.valueOf(node.getString("planthroughputtraveller")));
airportMonthly.setActualthroughputtraveller(node.getString(
"actualthroughputtraveller").equals("") ? 0.0 : Double
.valueOf(node.getString("actualthroughputtraveller")));
airportMonthly.setPlanthroughputtravelleryear(node.getString(
"planthroughputtravelleryear").equals("") ? 0.0 : Double
.valueOf(node.getString("planthroughputtravelleryear")));
airportMonthly.setPlanthroughputwill(node.getString(
"planthroughputwill").equals("") ? 0.0 : Double
.valueOf(node.getString("planthroughputwill")));
airportMonthly.setActualthroughputwill(node.getString(
"actualthroughputwill").equals("") ? 0.0 : Double
.valueOf(node.getString("actualthroughputwill")));
airportMonthly.setPlanthroughputwillyear(node.getString(
"planthroughputwillyear").equals("") ? 0.0 : Double
.valueOf(node.getString("planthroughputwillyear")));
airportMonthly.setReporter(node.getString("reporter"));
// airportMonthly.setReportdate(new Date());
// airportMonthly.setReporter();
// airportMonthly.setStatus(Status.noAudit);
// airportMonthly.setReporter(node.getString("repoter"));
if (flag.equals("1")) {
Date date = new Date();
airportMonthly.setReportdate(date);
airportMonthly.setStatus(Status.noAudit);
systemService.saveOrUpdate(airportMonthly);
repsonse = "success";
} else if (flag.equals("0")) {
airportMonthly.setStatus(Status.noSumbit);
systemService.saveOrUpdate(airportMonthly);
repsonse = "success";
}
}
return repsonse;
}
/**
* 获取所有的月报数据
*
* @throws ParseException
*/
@RequestMapping(params = "allmonthdata")
@ResponseBody
public String getAllMonthData(HttpServletRequest request)
throws ParseException {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
String userId = request.getParameter("userId");
String response = null;
List<OtherTravelInfo> otherTravelInfolist = systemService.findHql(
"from OtherTravelInfo ot where ot.id=?", userId);
OtherTravelInfo otherTravelInfo = otherTravelInfolist.get(0);
List<AirportMonthly> monthList = this.systemService
.findHql(
"from AirportMonthly fm where fm.status<>1 and fm.otherTravelInfo=?",
otherTravelInfo);
List<AirportMonthlyReportEntity> appMonthList = new ArrayList<>();
AirportMonthly airportMonth[] = new AirportMonthly[monthList.size()];
AirportMonthlyReportEntity airportMonthlyReportEntity[] = new AirportMonthlyReportEntity[monthList
.size()];
for (int i = 0; i < monthList.size(); i++) {
airportMonth[i] = monthList.get(i);
airportMonthlyReportEntity[i] = new AirportMonthlyReportEntity();
airportMonthlyReportEntity[i].setDates(String
.valueOf(airportMonth[i].getSmonth()));
airportMonthlyReportEntity[i].setUserId(userId);
airportMonthlyReportEntity[i].setPlansortie(String
.valueOf(airportMonth[i].getPlansortie()));
airportMonthlyReportEntity[i].setActualsortie(String
.valueOf(airportMonth[i].getActualsortie()));
airportMonthlyReportEntity[i].setPlansortieyear(String
.valueOf(airportMonth[i].getPlansortieyear()));
airportMonthlyReportEntity[i].setPlanouttraveller(String
.valueOf(airportMonth[i].getPlanouttraveller()));
airportMonthlyReportEntity[i].setActualouttraveller(String
.valueOf(airportMonth[i].getActualouttraveller()));
airportMonthlyReportEntity[i].setPlanouttravelleryear(String
.valueOf(airportMonth[i].getPlanouttravelleryear()));
airportMonthlyReportEntity[i].setPlanoutwill(String
.valueOf(airportMonth[i].getPlanoutwill()));
airportMonthlyReportEntity[i].setActualoutwill(String
.valueOf(airportMonth[i].getActualoutwill()));
airportMonthlyReportEntity[i].setPlanoutwillyear(String
.valueOf(airportMonth[i].getPlanoutwillyear()));
airportMonthlyReportEntity[i].setPlanIntegerraveller(String
.valueOf(airportMonth[i].getPlanIntegerraveller()));
airportMonthlyReportEntity[i].setActualIntegerraveller(String
.valueOf(airportMonth[i].getActualIntegerraveller()));
airportMonthlyReportEntity[i].setPlanIntegerravelleryear(String
.valueOf(airportMonth[i].getPlanIntegerravelleryear()));
airportMonthlyReportEntity[i].setPlaninwill(String
.valueOf(airportMonth[i].getPlaninwill()));
airportMonthlyReportEntity[i].setActualinwill(String
.valueOf(airportMonth[i].getActualinwill()));
airportMonthlyReportEntity[i].setPlaninwillyear(String
.valueOf(airportMonth[i].getPlaninwillyear()));
airportMonthlyReportEntity[i].setPlanthroughputtraveller(String
.valueOf(airportMonth[i].getPlanthroughputtraveller()));
airportMonthlyReportEntity[i].setActualthroughputtraveller(String
.valueOf(airportMonth[i].getActualthroughputtraveller()));
airportMonthlyReportEntity[i].setPlanthroughputtravelleryear(String
.valueOf(airportMonth[i].getPlanthroughputtravelleryear()));
airportMonthlyReportEntity[i].setPlanthroughputwill(String
.valueOf(airportMonth[i].getPlanthroughputwill()));
airportMonthlyReportEntity[i].setActualthroughputwill(String
.valueOf(airportMonth[i].getActualthroughputwill()));
airportMonthlyReportEntity[i].setPlanthroughputwillyear(String
.valueOf(airportMonth[i].getPlanthroughputwillyear()));
airportMonthlyReportEntity[i].setReporter(String
.valueOf(airportMonth[i].getReporter()));
airportMonthlyReportEntity[i].setReportdate(TimeUtils
.getMonth(airportMonth[i].getReportdate()));
String status = getstatus(String.valueOf(airportMonth[i]
.getStatus()));
airportMonthlyReportEntity[i].setStatus(status);
appMonthList.add(airportMonthlyReportEntity[i]);
}
response = JSON.toJSONString(appMonthList);
return response;
}
public static String getstatus(String status) {
if (status.equals(Status.noSumbit)) {
status = "未填报";
} else if (status.equals(Status.noAudit)) {
status = "未审核";
} else if (status.equals(Status.notAudit)) {
status = "管理员已审核(审核不通过)";
} else if (status.equals(Status.passAudit)) {
status = "管理员已审核(审核通过)";
} else if (status.equals(Status.notAuditByP)) {
status = "省已审核 审核结果:不通过";
} else if (status.equals(Status.passAuditByP)) {
status = "省已审核 审核结果:通过";
}
return status;
}
}
@@ -0,0 +1,95 @@
package com.zzc.app.otherTravel.controller;
import java.io.UnsupportedEncodingException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.alibaba.fastjson.JSON;
import com.zzc.app.login.entity.APPOtherTravel;
import com.zzc.web.otherTravel.entity.OtherTravelInfo;
import com.zzc.web.system.service.SystemService;
@Controller
@RequestMapping("/appservice/basicinfocontroller")
public class BasicInfoController {
private SystemService systemService;
@Autowired
public void setSystemService(SystemService systemService) {
this.systemService = systemService;
}
/**
* 基本信息填报
*
* @param request
* @param response
* @return 成功标志
*/
@RequestMapping(params = "fillBasicInfo")
@ResponseBody
public String fillBasicInfo(HttpServletRequest request,
HttpServletResponse response) {
/** 设置响应头允许ajax跨域访问 **/
response.setHeader("Access-Control-Allow-Origin", "*");
/* 星号表示所有的异域请求都可以接受, */
response.setHeader("Access-Control-Allow-Methods", "GET,POST");
String tip = "success";
try {
request.setCharacterEncoding("UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
String msg = request.getParameter("param");
String userId = request.getParameter("userId");
APPOtherTravel appTravelInfo = null;
try {
appTravelInfo = JSON.parseObject(msg, APPOtherTravel.class);
} catch (Exception e) {
e.printStackTrace();
tip = "数据转化失败!";
return tip;
}
try {
OtherTravelInfo otherTravelInfo = systemService.get(
OtherTravelInfo.class, userId);
// 企业名称
otherTravelInfo.setName(appTravelInfo.getName());
// 负责人
otherTravelInfo.setPrincipal(appTravelInfo.getPrincipal());
// 联系电话
otherTravelInfo.setPhone(appTravelInfo.getPhone());
// 详细地址
otherTravelInfo.setAddress(appTravelInfo.getAddress());
// 邮编
otherTravelInfo.setPostalcode(appTravelInfo.getPostalcode());
otherTravelInfo.setMobile(appTravelInfo.getTel());
/*
* String county = appTravelInfo.getArea(); switch (county) { case
* "市辖区": county = "0"; break; case "崖州区": county = "1"; break; case
* "海棠区": county = "2"; break; case "天涯区": county = "3"; break; case
* "吉阳区": county = "4"; break; } otherTravelInfo.setArea(county)
*/
systemService.saveOrUpdate(otherTravelInfo);
} catch (Exception e) {
e.printStackTrace();
tip = "操作失败";
}
return tip;
}
}
@@ -0,0 +1,229 @@
package com.zzc.app.otherTravel.controller;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.alibaba.fastjson.JSON;
import com.zzc.app.otherTravel.entity.BoatMonthlyReportEntity;
import com.zzc.web.otherTravel.entity.BoatMonthly;
import com.zzc.web.otherTravel.entity.OtherTravelInfo;
import com.zzc.web.sylyUtils.Status;
import com.zzc.web.sylyUtils.TimeUtils;
import com.zzc.web.system.service.SystemService;
/**
*
*
* @date: 2017年2月9日
* @Author: 龙
* @Email:
* @FileName: golfMonthController.java
* @Version: 1.0
* @About: 保存/展示空中飞行项目接口
*/
@Controller
@RequestMapping("/appservice/appBoatMonthController")
public class BoatMonthController {
private SystemService systemService;
public SystemService getSystemService() {
return systemService;
}
@Autowired
public void setSystemService(SystemService systemService) {
this.systemService = systemService;
}
/**
* 是否填报月报
*
* @param userId
* @return 月报实体类
*/
@RequestMapping(params = "ifhavemonthdata", method = RequestMethod.GET)
@ResponseBody
public BoatMonthlyReportEntity ifhavemonthdata(String userId) {
List<OtherTravelInfo> otherTravelInfolist = systemService.findHql(
"from OtherTravelInfo ot where ot.id=?", userId);
String repsonse = null;
BoatMonthlyReportEntity boatMonthlyReportEntity = new BoatMonthlyReportEntity();
if (otherTravelInfolist.size() > 0) {
OtherTravelInfo otherTravelInfo = otherTravelInfolist.get(0);
String uid = otherTravelInfo.getId();
String lastMonth = TimeUtils.getLastMonth();
// 获取当前年份高尔夫项目的月报列表
List<Map<String, Object>> list = systemService
.findForJdbc(
"SELECT * FROM `t_boat_monthly` tb WHERE tb.oid=? AND tb.smonth LIKE ?",
uid, lastMonth);
if (list.size() > 0) {
BoatMonthly boatMonthly = systemService.get(BoatMonthly.class,
(String) list.get(0).get("ID"));
boatMonthlyReportEntity.setDates(String.valueOf(boatMonthly
.getSmonth()));
boatMonthlyReportEntity.setUserId(userId);
boatMonthlyReportEntity.setIncome(String.valueOf(boatMonthly
.getIncome()));
boatMonthlyReportEntity.setRecepNum(String.valueOf(boatMonthly
.getRecepNum()));
boatMonthlyReportEntity.setReporter(String.valueOf(boatMonthly
.getReporter()));
String status = getstatus(String.valueOf(boatMonthly
.getStatus()));
boatMonthlyReportEntity.setStatus(status);
if (null != boatMonthly.getWriteDate()) {
boatMonthlyReportEntity.setWriteDate(TimeUtils
.getMonth(boatMonthly.getWriteDate()));
}
} else {
BoatMonthlyReportEntity boatMonthlyReportEntity1 = new BoatMonthlyReportEntity();
boatMonthlyReportEntity1.setDates(TimeUtils.getLastMonth());
boatMonthlyReportEntity1.setStatus(getstatus(Status.noSumbit));
repsonse = JSON.toJSONString(boatMonthlyReportEntity1);
return boatMonthlyReportEntity1;
}
}
return boatMonthlyReportEntity;
}
/**
* 月报提交
*
* @param json
* @return
* @throws ParseException
*/
@RequestMapping(params = "monthdata", method = RequestMethod.POST)
@ResponseBody
public String editmonthdata(HttpServletRequest request)
throws ParseException {
String json = request.getParameter("param");
String flag = request.getParameter("flag");
JSONObject node = JSONObject.fromObject(json);
String repsonse = "error";
BoatMonthly boatMonthly = new BoatMonthly();
String userId = node.getString("userId");
List<OtherTravelInfo> otherTravelInfolist = systemService.findHql(
"from OtherTravelInfo ot where ot.id=?", userId);
if (otherTravelInfolist.size() > 0) {
OtherTravelInfo otherTravelInfo = otherTravelInfolist.get(0);
String uid = otherTravelInfo.getId();
String lastMonth = TimeUtils.getLastMonth();
// 获取当前年份飞行项目的月报列表
List<Map<String, Object>> list = systemService
.findForJdbc(
"SELECT * FROM `t_boat_monthly` tb WHERE tb.oid=? AND tb.smonth LIKE ?",
uid, lastMonth);
if (list.size() > 0) {
boatMonthly = systemService.get(BoatMonthly.class,
(String) list.get(0).get("ID"));
}
boatMonthly.setOtherTravelInfo(otherTravelInfo);
boatMonthly.setOtid(userId);
boatMonthly.setDates(new SimpleDateFormat("yyyy-MM").parse(node
.getString("dates")));
boatMonthly.setIncome(node.getString("income").equals("") ? 0.0
: Double.valueOf(node.getString("income")));
boatMonthly.setRecepNum(node.getString("recepNum").equals("") ? 0
: Integer.valueOf(node.getString("recepNum")));
boatMonthly.setSmonth(node.getString("dates"));
boatMonthly.setReporter(node.getString("reporter"));
if (flag.equals("1")) {
Date date = new Date();
boatMonthly.setWriteDate(date);
boatMonthly.setStatus(Status.noAudit);
systemService.saveOrUpdate(boatMonthly);
repsonse = "success";
} else if (flag.equals("0")) {
boatMonthly.setStatus(Status.noSumbit);
systemService.saveOrUpdate(boatMonthly);
repsonse = "success";
}
}
return repsonse;
}
/**
* 获取所有的月报数据
*
* @throws ParseException
*/
@RequestMapping(params = "allmonthdata", method = RequestMethod.GET)
@ResponseBody
public String getAllMonthData(HttpServletRequest request, String userId)
throws ParseException {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
String response = null;
List<OtherTravelInfo> otherTravelInfolist = systemService.findHql(
"from OtherTravelInfo ot where ot.id=?", userId);
OtherTravelInfo otherTravelInfo = otherTravelInfolist.get(0);
List<BoatMonthly> monthList = this.systemService
.findHql(
"from BoatMonthly bt where bt.status <> 1 and bt.otherTravelInfo=?",
otherTravelInfo);
List<BoatMonthlyReportEntity> appMonthList = new ArrayList<>();
BoatMonthly boatMonth[] = new BoatMonthly[monthList.size()];
BoatMonthlyReportEntity boatMonthlyReportEntity[] = new BoatMonthlyReportEntity[monthList
.size()];
for (int i = 0; i < monthList.size(); i++) {
boatMonth[i] = monthList.get(i);
boatMonthlyReportEntity[i] = new BoatMonthlyReportEntity();
boatMonthlyReportEntity[i].setDates(String.valueOf(boatMonth[i]
.getSmonth()));
boatMonthlyReportEntity[i].setUserId(userId);
boatMonthlyReportEntity[i].setIncome(String.valueOf(boatMonth[i]
.getIncome()));
boatMonthlyReportEntity[i].setRecepNum(String.valueOf(boatMonth[i]
.getRecepNum()));
boatMonthlyReportEntity[i].setReporter(String.valueOf(boatMonth[i]
.getReporter()));
String status = getstatus(String.valueOf(boatMonth[i].getStatus()));
boatMonthlyReportEntity[i].setStatus(status);
boatMonthlyReportEntity[i].setWriteDate(TimeUtils
.getMonth(boatMonth[i].getWriteDate()));
appMonthList.add(boatMonthlyReportEntity[i]);
}
response = JSON.toJSONString(appMonthList);
return response;
}
public static String getstatus(String status) {
if (status.equals(Status.noSumbit)) {
status = "未填报";
} else if (status.equals(Status.noAudit)) {
status = "未审核";
} else if (status.equals(Status.notAudit)) {
status = "管理员已审核(审核不通过)";
} else if (status.equals(Status.passAudit)) {
status = "管理员已审核(审核通过)";
} else if (status.equals(Status.notAuditByP)) {
status = "省已审核 审核结果:不通过";
} else if (status.equals(Status.passAuditByP)) {
status = "省已审核 审核结果:通过";
}
return status;
}
}
@@ -0,0 +1,239 @@
package com.zzc.app.otherTravel.controller;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.alibaba.fastjson.JSON;
import com.zzc.app.otherTravel.entity.FlightMonthlyReportEntity;
import com.zzc.web.otherTravel.entity.FlightMonthly;
import com.zzc.web.otherTravel.entity.OtherTravelInfo;
import com.zzc.web.sylyUtils.Status;
import com.zzc.web.sylyUtils.TimeUtils;
import com.zzc.web.system.service.SystemService;
/**
*
*
* @date: 2017年2月9日
* @Author: 龙
* @Email:
* @FileName: FlightMonthController.java
* @Version: 1.0
* @About: 保存/展示空中飞行项目接口
*/
@Controller
@RequestMapping("/appservice/appFlightMonthController")
public class FlightMonthController {
private SystemService systemService;
public SystemService getSystemService() {
return systemService;
}
@Autowired
public void setSystemService(SystemService systemService) {
this.systemService = systemService;
}
/**
* 是否填报月报
*
* @param userId
* @return 月报实体类
*/
@RequestMapping(params = "ifhavemonthdata", method = RequestMethod.GET)
@ResponseBody
public FlightMonthlyReportEntity ifhavemonthdata(String userId) {
List<OtherTravelInfo> otherTravelInfolist = systemService.findHql(
"from OtherTravelInfo ot where ot.id=?", userId);
String repsonse = null;
FlightMonthlyReportEntity flightMonthlyReportEntity = new FlightMonthlyReportEntity();
if (otherTravelInfolist.size() > 0) {
OtherTravelInfo otherTravelInfo = otherTravelInfolist.get(0);
String uid = otherTravelInfo.getId();
String lastMonth = TimeUtils.getLastMonth();
// 获取当前年份飞行项目的月报列表
List<Map<String, Object>> list = systemService
.findForJdbc(
"SELECT * FROM `t_flight_monthly` tf WHERE tf.otravel_id=? AND tf.smonth LIKE ?",
uid, lastMonth);
if (list.size() > 0) {
FlightMonthly flightMonthly = systemService.get(
FlightMonthly.class, (String) list.get(0).get("ID"));
flightMonthlyReportEntity.setDates(String.valueOf(flightMonthly
.getSmonth()));
flightMonthlyReportEntity.setUserId(userId);
flightMonthlyReportEntity.setBusinessincome(String
.valueOf(flightMonthly.getBusinessincome()));
flightMonthlyReportEntity.setFlighttimes(String
.valueOf(flightMonthly.getFlighttimes()));
flightMonthlyReportEntity.setReceptionnum(String
.valueOf(flightMonthly.getReceptionnum()));
flightMonthlyReportEntity.setReporter(String
.valueOf(flightMonthly.getReporter()));
String status = getstatus(String.valueOf(flightMonthly
.getStatus()));
flightMonthlyReportEntity.setStatus(status);
if (null != flightMonthly.getWriteDate()) {
flightMonthlyReportEntity.setWriteDate(TimeUtils
.getMonth(flightMonthly.getWriteDate()));
// flightMonthlyReportEntity;
}
} else {
FlightMonthlyReportEntity flightMonthlyReportEntity1 = new FlightMonthlyReportEntity();
flightMonthlyReportEntity1.setDates(TimeUtils.getLastMonth());
flightMonthlyReportEntity1
.setStatus(getstatus(Status.noSumbit));
repsonse = JSON.toJSONString(flightMonthlyReportEntity1);
return flightMonthlyReportEntity1;
}
}
return flightMonthlyReportEntity;
}
/**
* 月报提交
*
* @param json
* @return
* @throws ParseException
*/
@RequestMapping(params = "monthdata", method = RequestMethod.POST)
@ResponseBody
public String editmonthdata(HttpServletRequest request)
throws ParseException {
String json = request.getParameter("param");
String flag = request.getParameter("flag");
JSONObject node = JSONObject.fromObject(json);
String repsonse = "error";
FlightMonthly flightMonthly = new FlightMonthly();
String userId = node.getString("userId");
List<OtherTravelInfo> otherTravelInfolist = systemService.findHql(
"from OtherTravelInfo ot where ot.id=?", userId);
if (otherTravelInfolist.size() > 0) {
OtherTravelInfo otherTravelInfo = otherTravelInfolist.get(0);
String uid = otherTravelInfo.getId();
String lastMonth = TimeUtils.getLastMonth();
// 获取当前年份飞行项目的月报列表
List<Map<String, Object>> list = systemService
.findForJdbc(
"SELECT * FROM `t_flight_monthly` tf WHERE tf.oid=? AND tf.smonth LIKE ?",
uid, lastMonth);
if (list.size() > 0) {
flightMonthly = systemService.get(FlightMonthly.class,
(String) list.get(0).get("ID"));
}
flightMonthly.setOtherTravelInfo(otherTravelInfo);
flightMonthly.setOtid(userId);
flightMonthly.setDates(new SimpleDateFormat("yyyy-MM").parse(node
.getString("dates")));
flightMonthly.setBusinessincome(node.getString("businessincome")
.equals("") ? 0.0 : Double.valueOf(node
.getString("businessincome")));
flightMonthly.setFlighttimes(node.getString("flighttimes").equals(
"") ? 0 : Integer.valueOf(node.getString("flighttimes")));
flightMonthly.setReceptionnum(node.getString("receptionnum")
.equals("") ? 0 : Integer.valueOf(node
.getString("receptionnum")));
flightMonthly.setSmonth(node.getString("dates"));
flightMonthly.setReporter(node.getString("reporter"));
// flightMonthly.setWriteDate(new Date());
if (flag.equals("1")) {
Date date = new Date();
flightMonthly.setWriteDate(date);
flightMonthly.setStatus(Status.noAudit);
systemService.saveOrUpdate(flightMonthly);
repsonse = "success";
} else if (flag.equals("0")) {
flightMonthly.setStatus(Status.noSumbit);
systemService.saveOrUpdate(flightMonthly);
repsonse = "success";
}
}
return repsonse;
}
/**
* 获取所有的月报数据
*
* @throws ParseException
*/
@RequestMapping(params = "allmonthdata", method = RequestMethod.GET)
@ResponseBody
public String getAllMonthData(HttpServletRequest request, String userId)
throws ParseException {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
String response = null;
List<OtherTravelInfo> otherTravelInfolist = systemService.findHql(
"from OtherTravelInfo ot where ot.id=?", userId);
OtherTravelInfo otherTravelInfo = otherTravelInfolist.get(0);
List<FlightMonthly> monthList = this.systemService
.findHql(
"from FlightMonthly fm where fm.status <> 1 and fm.otherTravelInfo=?",
otherTravelInfo);
List<FlightMonthlyReportEntity> appMonthList = new ArrayList<>();
FlightMonthly flightMonth[] = new FlightMonthly[monthList.size()];
FlightMonthlyReportEntity flightMonthlyReportEntity[] = new FlightMonthlyReportEntity[monthList
.size()];
for (int i = 0; i < monthList.size(); i++) {
flightMonth[i] = monthList.get(i);
flightMonthlyReportEntity[i] = new FlightMonthlyReportEntity();
flightMonthlyReportEntity[i].setDates(String.valueOf(flightMonth[i]
.getSmonth()));
flightMonthlyReportEntity[i].setUserId(userId);
flightMonthlyReportEntity[i].setBusinessincome(String
.valueOf(flightMonth[i].getBusinessincome()));
flightMonthlyReportEntity[i].setFlighttimes(String
.valueOf(flightMonth[i].getFlighttimes()));
flightMonthlyReportEntity[i].setReceptionnum(String
.valueOf(flightMonth[i].getReceptionnum()));
flightMonthlyReportEntity[i].setReporter(String
.valueOf(flightMonth[i].getReporter()));
String status = getstatus(String
.valueOf(flightMonth[i].getStatus()));
flightMonthlyReportEntity[i].setStatus(status);
flightMonthlyReportEntity[i].setWriteDate(TimeUtils
.getMonth(flightMonth[i].getWriteDate()));
appMonthList.add(flightMonthlyReportEntity[i]);
}
response = JSON.toJSONString(appMonthList);
return response;
}
public static String getstatus(String status) {
if (status.equals(Status.noSumbit)) {
status = "未填报";
} else if (status.equals(Status.noAudit)) {
status = "未审核";
} else if (status.equals(Status.notAudit)) {
status = "管理员已审核(审核不通过)";
} else if (status.equals(Status.passAudit)) {
status = "管理员已审核(审核通过)";
} else if (status.equals(Status.notAuditByP)) {
status = "省已审核 审核结果:不通过";
} else if (status.equals(Status.passAuditByP)) {
status = "省已审核 审核结果:通过";
}
return status;
}
}
@@ -0,0 +1,228 @@
package com.zzc.app.otherTravel.controller;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.alibaba.fastjson.JSON;
import com.zzc.app.otherTravel.entity.GolfMonthlyReportEntity;
import com.zzc.web.otherTravel.entity.GolfMonthly;
import com.zzc.web.otherTravel.entity.OtherTravelInfo;
import com.zzc.web.sylyUtils.Status;
import com.zzc.web.sylyUtils.TimeUtils;
import com.zzc.web.system.service.SystemService;
/**
*
*
* @date: 2017年2月9日
* @Author: 龙
* @Email:
* @FileName: golfMonthController.java
* @Version: 1.0
* @About: 保存/展示空中飞行项目接口
*/
@Controller
@RequestMapping("/appservice/appGolfMonthController")
public class GolfMonthController {
private SystemService systemService;
public SystemService getSystemService() {
return systemService;
}
@Autowired
public void setSystemService(SystemService systemService) {
this.systemService = systemService;
}
/**
* 是否填报月报
*
* @param userId
* @return 月报实体类
*/
@RequestMapping(params = "ifhavemonthdata", method = RequestMethod.GET)
@ResponseBody
public GolfMonthlyReportEntity ifhavemonthdata(String userId) {
List<OtherTravelInfo> otherTravelInfolist = systemService.findHql(
"from OtherTravelInfo ot where ot.id=?", userId);
String repsonse = null;
GolfMonthlyReportEntity golfMonthlyReportEntity = new GolfMonthlyReportEntity();
if (otherTravelInfolist.size() > 0) {
OtherTravelInfo otherTravelInfo = otherTravelInfolist.get(0);
String uid = otherTravelInfo.getId();
String lastMonth = TimeUtils.getLastMonth();
// 获取当前年份高尔夫项目的月报列表
List<Map<String, Object>> list = systemService
.findForJdbc(
"SELECT * FROM `t_golf_monthly` tg WHERE tg.oid=? AND tg.smonth LIKE ?",
uid, lastMonth);
if (list.size() > 0) {
GolfMonthly golfMonthly = systemService.get(GolfMonthly.class,
(String) list.get(0).get("ID"));
golfMonthlyReportEntity.setDates(String.valueOf(golfMonthly
.getSmonth()));
golfMonthlyReportEntity.setUserId(userId);
golfMonthlyReportEntity.setBusinessincome(String
.valueOf(golfMonthly.getBusinessincome()));
golfMonthlyReportEntity.setReceptionnum(String
.valueOf(golfMonthly.getReceptionnum()));
golfMonthlyReportEntity.setReporter(String.valueOf(golfMonthly
.getReporter()));
String status = getstatus(String.valueOf(golfMonthly
.getStatus()));
golfMonthlyReportEntity.setStatus(status);
if (null != golfMonthly.getWriteDate()) {
golfMonthlyReportEntity.setWriteDate(TimeUtils
.getMonth(golfMonthly.getWriteDate()));
}
// flightMonthlyReportEntity;
} else {
GolfMonthlyReportEntity golfMonthlyReportEntity1 = new GolfMonthlyReportEntity();
golfMonthlyReportEntity1.setDates(TimeUtils.getLastMonth());
golfMonthlyReportEntity1.setStatus(getstatus(Status.noSumbit));
repsonse = JSON.toJSONString(golfMonthlyReportEntity1);
return golfMonthlyReportEntity1;
}
}
return golfMonthlyReportEntity;
}
/**
* 月报提交
*
* @param json
* @return
* @throws ParseException
*/
@RequestMapping(params = "monthdata", method = RequestMethod.POST)
@ResponseBody
public String editmonthdata(HttpServletRequest request)
throws ParseException {
String json = request.getParameter("param");
String flag = request.getParameter("flag");
JSONObject node = JSONObject.fromObject(json);
String repsonse = "error";
GolfMonthly golfMonthly = new GolfMonthly();
String userId = node.getString("userId");
List<OtherTravelInfo> otherTravelInfolist = systemService.findHql(
"from OtherTravelInfo ot where ot.id=?", userId);
if (otherTravelInfolist.size() > 0) {
OtherTravelInfo otherTravelInfo = otherTravelInfolist.get(0);
String uid = otherTravelInfo.getId();
String lastMonth = TimeUtils.getLastMonth();
// 获取当前年份飞行项目的月报列表
List<Map<String, Object>> list = systemService
.findForJdbc(
"SELECT * FROM `t_golf_monthly` tg WHERE tg.oid=? AND tg.smonth LIKE ?",
uid, lastMonth);
if (list.size() > 0) {
golfMonthly = systemService.get(GolfMonthly.class,
(String) list.get(0).get("ID"));
}
golfMonthly.setOtherTravelInfo(otherTravelInfo);
golfMonthly.setOtid(userId);
golfMonthly.setDates(new SimpleDateFormat("yyyy-MM").parse(node
.getString("dates")));
golfMonthly.setBusinessincome(node.getString("businessincome")
.equals("") ? 0.0 : Double.valueOf(node
.getString("businessincome")));
golfMonthly.setReceptionnum(node.getString("receptionnum").equals(
"") ? 0 : Integer.valueOf(node.getString("receptionnum")));
golfMonthly.setSmonth(node.getString("dates"));
golfMonthly.setReporter(node.getString("reporter"));
if (flag.equals("1")) {
Date date = new Date();
golfMonthly.setWriteDate(date);
golfMonthly.setStatus(Status.noAudit);
systemService.saveOrUpdate(golfMonthly);
repsonse = "success";
} else if (flag.equals("0")) {
golfMonthly.setStatus(Status.noSumbit);
systemService.saveOrUpdate(golfMonthly);
repsonse = "success";
}
}
return repsonse;
}
/**
* 获取所有的月报数据
*
* @throws ParseException
*/
@RequestMapping(params = "allmonthdata", method = RequestMethod.GET)
@ResponseBody
public String getAllMonthData(HttpServletRequest request, String userId)
throws ParseException {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
String response = null;
List<OtherTravelInfo> otherTravelInfolist = systemService.findHql(
"from OtherTravelInfo ot where ot.id=?", userId);
OtherTravelInfo otherTravelInfo = otherTravelInfolist.get(0);
List<GolfMonthly> monthList = this.systemService
.findHql(
"from GolfMonthly gf where gf.status <> 1 and gf.otherTravelInfo=?",
otherTravelInfo);
List<GolfMonthlyReportEntity> appMonthList = new ArrayList<>();
GolfMonthly golfMonth[] = new GolfMonthly[monthList.size()];
GolfMonthlyReportEntity golfMonthlyReportEntity[] = new GolfMonthlyReportEntity[monthList
.size()];
for (int i = 0; i < monthList.size(); i++) {
golfMonth[i] = monthList.get(i);
golfMonthlyReportEntity[i] = new GolfMonthlyReportEntity();
golfMonthlyReportEntity[i].setDates(String.valueOf(golfMonth[i]
.getSmonth()));
golfMonthlyReportEntity[i].setUserId(userId);
golfMonthlyReportEntity[i].setBusinessincome(String
.valueOf(golfMonth[i].getBusinessincome()));
golfMonthlyReportEntity[i].setReceptionnum(String
.valueOf(golfMonth[i].getReceptionnum()));
golfMonthlyReportEntity[i].setReporter(String.valueOf(golfMonth[i]
.getReporter()));
String status = getstatus(String.valueOf(golfMonth[i].getStatus()));
golfMonthlyReportEntity[i].setStatus(status);
golfMonthlyReportEntity[i].setWriteDate(TimeUtils
.getMonth(golfMonth[i].getWriteDate()));
appMonthList.add(golfMonthlyReportEntity[i]);
}
response = JSON.toJSONString(appMonthList);
return response;
}
public static String getstatus(String status) {
if (status.equals(Status.noSumbit)) {
status = "未填报";
} else if (status.equals(Status.noAudit)) {
status = "未审核";
} else if (status.equals(Status.notAudit)) {
status = "管理员已审核(审核不通过)";
} else if (status.equals(Status.passAudit)) {
status = "管理员已审核(审核通过)";
} else if (status.equals(Status.notAuditByP)) {
status = "省已审核 审核结果:不通过";
} else if (status.equals(Status.passAuditByP)) {
status = "省已审核 审核结果:通过";
}
return status;
}
}
@@ -0,0 +1,237 @@
package com.zzc.app.otherTravel.controller;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.alibaba.fastjson.JSON;
import com.zzc.app.otherTravel.entity.MotorcarMonthlyReportEntity;
import com.zzc.web.otherTravel.entity.MotorcarMonthly;
import com.zzc.web.otherTravel.entity.OtherTravelInfo;
import com.zzc.web.sylyUtils.Status;
import com.zzc.web.sylyUtils.TimeUtils;
import com.zzc.web.system.service.SystemService;
/**
*
*
* @date: 2017年2月9日
* @Author: 龙
* @Email:
* @FileName: golfMonthController.java
* @Version: 1.0
* @About: 保存/展示动车项目接口
*/
@Controller
@RequestMapping("/appservice/appMotorcarMonthController")
public class MotorcarMonthController {
private SystemService systemService;
public SystemService getSystemService() {
return systemService;
}
@Autowired
public void setSystemService(SystemService systemService) {
this.systemService = systemService;
}
/**
* 是否填报月报
*
* @param userId
* @return 月报实体类
*/
@RequestMapping(params = "ifhavemonthdata", method = RequestMethod.GET)
@ResponseBody
public MotorcarMonthlyReportEntity ifhavemonthdata(String userId) {
List<OtherTravelInfo> otherTravelInfolist = systemService.findHql(
"from OtherTravelInfo ot where ot.id=?", userId);
String repsonse = null;
MotorcarMonthlyReportEntity motorcarMonthlyReportEntity = new MotorcarMonthlyReportEntity();
if (otherTravelInfolist.size() > 0) {
OtherTravelInfo otherTravelInfo = otherTravelInfolist.get(0);
String uid = otherTravelInfo.getId();
String lastMonth = TimeUtils.getLastMonth();
// 获取当前年份动车项目的月报列表
List<Map<String, Object>> list = systemService
.findForJdbc(
"SELECT * FROM `t_motorcar_monthly` tm WHERE tm.otravel_id=? AND tm.smonth LIKE ?",
uid, lastMonth);
if (list.size() > 0) {
MotorcarMonthly motorcarMonthly = systemService.get(
MotorcarMonthly.class, (String) list.get(0).get("ID"));
motorcarMonthlyReportEntity.setDates(String
.valueOf(motorcarMonthly.getSmonth()));
motorcarMonthlyReportEntity.setUserId(userId);
motorcarMonthlyReportEntity.setInnum(String
.valueOf(motorcarMonthly.getInnum()));
motorcarMonthlyReportEntity.setOutnum(String
.valueOf(motorcarMonthly.getOutnum()));
motorcarMonthlyReportEntity.setThroughput(String
.valueOf(motorcarMonthly.getThroughput()));
motorcarMonthlyReportEntity.setReporter(String
.valueOf(motorcarMonthly.getReporter()));
String status = getstatus(String.valueOf(motorcarMonthly
.getStatus()));
motorcarMonthlyReportEntity.setStatus(status);
if (null != motorcarMonthly.getWriteDate()) {
motorcarMonthlyReportEntity.setWriteDate(TimeUtils
.getMonth(motorcarMonthly.getWriteDate()));
}
// flightMonthlyReportEntity;
} else {
MotorcarMonthlyReportEntity motorcarMonthlyReportEntity1 = new MotorcarMonthlyReportEntity();
motorcarMonthlyReportEntity1.setDates(TimeUtils.getLastMonth());
motorcarMonthlyReportEntity1
.setStatus(getstatus(Status.noSumbit));
repsonse = JSON.toJSONString(motorcarMonthlyReportEntity1);
return motorcarMonthlyReportEntity1;
}
}
return motorcarMonthlyReportEntity;
}
/**
* 月报提交
*
* @param json
* @return
* @throws ParseException
*/
@RequestMapping(params = "monthdata", method = RequestMethod.POST)
@ResponseBody
public String editmonthdata(HttpServletRequest request)
throws ParseException {
String json = request.getParameter("param");
String flag = request.getParameter("flag");
JSONObject node = JSONObject.fromObject(json);
String repsonse = "error";
MotorcarMonthly motorcarMonthly = new MotorcarMonthly();
String userId = node.getString("userId");
List<OtherTravelInfo> otherTravelInfolist = systemService.findHql(
"from OtherTravelInfo ot where ot.id=?", userId);
if (otherTravelInfolist.size() > 0) {
OtherTravelInfo otherTravelInfo = otherTravelInfolist.get(0);
String uid = otherTravelInfo.getId();
String lastMonth = TimeUtils.getLastMonth();
// 获取当前年份飞行项目的月报列表
List<Map<String, Object>> list = systemService
.findForJdbc(
"SELECT * FROM `t_motorcar_monthly` tm WHERE tm.oid=? AND tm.smonth LIKE ?",
uid, lastMonth);
if (list.size() > 0) {
motorcarMonthly = systemService.get(MotorcarMonthly.class,
(String) list.get(0).get("ID"));
}
motorcarMonthly.setOtherTravelInfo(otherTravelInfo);
motorcarMonthly.setOtid(userId);
motorcarMonthly.setDates(new SimpleDateFormat("yyyy-MM").parse(node
.getString("dates")));
motorcarMonthly.setInnum(node.getString("innum"));
motorcarMonthly.setOutnum(node.getString("outnum"));
motorcarMonthly.setThroughput(node.getString("throughput"));
motorcarMonthly.setSmonth(node.getString("dates"));
motorcarMonthly.setReporter(node.getString("reporter"));
if (flag.equals("1")) {
Date date = new Date();
motorcarMonthly.setWriteDate(date);
motorcarMonthly.setStatus(Status.noAudit);
systemService.saveOrUpdate(motorcarMonthly);
repsonse = "success";
} else if (flag.equals("0")) {
motorcarMonthly.setStatus(Status.noSumbit);
systemService.saveOrUpdate(motorcarMonthly);
repsonse = "success";
}
}
return repsonse;
}
/**
* 获取所有的月报数据
*
* @throws ParseException
*/
@RequestMapping(params = "allmonthdata", method = RequestMethod.GET)
@ResponseBody
public String getAllMonthData(HttpServletRequest request, String userId)
throws ParseException {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
String response = null;
List<OtherTravelInfo> otherTravelInfolist = systemService.findHql(
"from OtherTravelInfo ot where ot.id=?", userId);
OtherTravelInfo otherTravelInfo = otherTravelInfolist.get(0);
List<MotorcarMonthly> monthList = this.systemService
.findHql(
"from MotorcarMonthly mc where mc.status<>1 and mc.otherTravelInfo=? ",
otherTravelInfo);
List<MotorcarMonthlyReportEntity> appMonthList = new ArrayList<>();
MotorcarMonthly motorcarMonth[] = new MotorcarMonthly[monthList.size()];
MotorcarMonthlyReportEntity motorcarMonthlyReportEntity[] = new MotorcarMonthlyReportEntity[monthList
.size()];
for (int i = 0; i < monthList.size(); i++) {
motorcarMonth[i] = monthList.get(i);
motorcarMonthlyReportEntity[i] = new MotorcarMonthlyReportEntity();
motorcarMonthlyReportEntity[i].setDates(String
.valueOf(motorcarMonth[i].getSmonth()));
motorcarMonthlyReportEntity[i].setUserId(userId);
motorcarMonthlyReportEntity[i].setInnum(String
.valueOf(motorcarMonth[i].getInnum()));
motorcarMonthlyReportEntity[i].setOutnum(String
.valueOf(motorcarMonth[i].getOutnum()));
motorcarMonthlyReportEntity[i].setThroughput(String
.valueOf(motorcarMonth[i].getThroughput()));
motorcarMonthlyReportEntity[i].setReporter(String
.valueOf(motorcarMonth[i].getReporter()));
String status = getstatus(String.valueOf(motorcarMonth[i]
.getStatus()));
motorcarMonthlyReportEntity[i].setStatus(status);
motorcarMonthlyReportEntity[i].setWriteDate(TimeUtils
.getMonth(motorcarMonth[i].getWriteDate()));
appMonthList.add(motorcarMonthlyReportEntity[i]);
}
response = JSON.toJSONString(appMonthList);
return response;
}
public static String getstatus(String status) {
if (status.equals(Status.noSumbit)) {
status = "未填报";
} else if (status.equals(Status.noAudit)) {
status = "未审核";
} else if (status.equals(Status.notAudit)) {
status = "管理员已审核(审核不通过)";
} else if (status.equals(Status.passAudit)) {
status = "管理员已审核(审核通过)";
} else if (status.equals(Status.notAuditByP)) {
status = "省已审核 审核结果:不通过";
} else if (status.equals(Status.passAuditByP)) {
status = "省已审核 审核结果:通过";
}
return status;
}
}
@@ -0,0 +1,278 @@
package com.zzc.app.otherTravel.entity;
/**
* 服务端获取实体类
*
* @date: 2016年12月14日
* @Author: 龙亚辉
* @Email: 502230926@qq.com
* @FileName: AirportMonthly.java
* @Version: 1.0
* @About: 机场月报
*
*/
@SuppressWarnings("serial")
public class AirportMonthlyReportEntity implements java.io.Serializable {
// 对应涉旅的id
private String userId;
// 月报时间,格式2016-12
private String dates;
// 本月计划完成的运输起降架次
private String plansortie;
// 本月实际完成的运输起降架次
private String actualsortie;
// 全年计划完成的运输起降架次
private String plansortieyear;
// 本月计划出发运量-旅客(万人)
private String planouttraveller;
// 本月实际完成的出发货运-旅客(万人)
private String actualouttraveller;
// 全年计划完成的出发货运
private String planouttravelleryear;
// 本月计划完成的出发运量-货邮行
private String planoutwill;
// 本月实际完成的出发运量-货邮行
private String actualoutwill;
// 全年计划完成的出发货运-货邮行(吨)
private String planoutwillyear;
// 本月计划完成的到达运量-旅客(万人)
private String planIntegerraveller;
// 本月实际完成的到达运量-旅客(万人)
private String actualIntegerraveller;
// 全年计划完成的到达运量-旅客(万人)
private String planIntegerravelleryear;
// 本月计划完成的到达运量-货邮行(吨)
private String planinwill;
// 本月实际完成的到达运量-货邮行(吨)
private String actualinwill;
// 全年计划完成的到达运量-货邮行(吨)
private String planinwillyear;
// 本月计划完成的吞吐量-旅客(万人)
private String planthroughputtraveller;
// 本月实际完成的吞吐量-旅客(万人)
private String actualthroughputtraveller;
// 全年计划完成的吞吐量-旅客(万人)
private String planthroughputtravelleryear;
// 本月计划完成的吞吐量-货邮行(吨)
private String planthroughputwill;
// 本月实际完成的吞吐量-货邮行(吨)
private String actualthroughputwill;
// 全年计划完成的吞吐量-货邮行(吨)
private String planthroughputwillyear;
// 填报人
private String reporter;
// 填报时间
private String reportdate;
// 审核状态,1-未填报,2-未审核,3-管理员已审核(审核不通过),4-管理员已审核(审核通过)
private String status;
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getDates() {
return dates;
}
public void setDates(String dates) {
this.dates = dates;
}
public String getPlansortie() {
return plansortie;
}
public void setPlansortie(String plansortie) {
this.plansortie = plansortie;
}
public String getActualsortie() {
return actualsortie;
}
public void setActualsortie(String actualsortie) {
this.actualsortie = actualsortie;
}
public String getPlansortieyear() {
return plansortieyear;
}
public void setPlansortieyear(String plansortieyear) {
this.plansortieyear = plansortieyear;
}
public String getPlanouttraveller() {
return planouttraveller;
}
public void setPlanouttraveller(String planouttraveller) {
this.planouttraveller = planouttraveller;
}
public String getActualouttraveller() {
return actualouttraveller;
}
public void setActualouttraveller(String actualouttraveller) {
this.actualouttraveller = actualouttraveller;
}
public String getPlanouttravelleryear() {
return planouttravelleryear;
}
public void setPlanouttravelleryear(String planouttravelleryear) {
this.planouttravelleryear = planouttravelleryear;
}
public String getPlanoutwill() {
return planoutwill;
}
public void setPlanoutwill(String planoutwill) {
this.planoutwill = planoutwill;
}
public String getActualoutwill() {
return actualoutwill;
}
public void setActualoutwill(String actualoutwill) {
this.actualoutwill = actualoutwill;
}
public String getPlanoutwillyear() {
return planoutwillyear;
}
public void setPlanoutwillyear(String planoutwillyear) {
this.planoutwillyear = planoutwillyear;
}
public String getPlanIntegerraveller() {
return planIntegerraveller;
}
public void setPlanIntegerraveller(String planIntegerraveller) {
this.planIntegerraveller = planIntegerraveller;
}
public String getActualIntegerraveller() {
return actualIntegerraveller;
}
public void setActualIntegerraveller(String actualIntegerraveller) {
this.actualIntegerraveller = actualIntegerraveller;
}
public String getPlanIntegerravelleryear() {
return planIntegerravelleryear;
}
public void setPlanIntegerravelleryear(String planIntegerravelleryear) {
this.planIntegerravelleryear = planIntegerravelleryear;
}
public String getPlaninwill() {
return planinwill;
}
public void setPlaninwill(String planinwill) {
this.planinwill = planinwill;
}
public String getActualinwill() {
return actualinwill;
}
public void setActualinwill(String actualinwill) {
this.actualinwill = actualinwill;
}
public String getPlaninwillyear() {
return planinwillyear;
}
public void setPlaninwillyear(String planinwillyear) {
this.planinwillyear = planinwillyear;
}
public String getPlanthroughputtraveller() {
return planthroughputtraveller;
}
public void setPlanthroughputtraveller(String planthroughputtraveller) {
this.planthroughputtraveller = planthroughputtraveller;
}
public String getActualthroughputtraveller() {
return actualthroughputtraveller;
}
public void setActualthroughputtraveller(String actualthroughputtraveller) {
this.actualthroughputtraveller = actualthroughputtraveller;
}
public String getPlanthroughputtravelleryear() {
return planthroughputtravelleryear;
}
public void setPlanthroughputtravelleryear(
String planthroughputtravelleryear) {
this.planthroughputtravelleryear = planthroughputtravelleryear;
}
public String getPlanthroughputwill() {
return planthroughputwill;
}
public void setPlanthroughputwill(String planthroughputwill) {
this.planthroughputwill = planthroughputwill;
}
public String getActualthroughputwill() {
return actualthroughputwill;
}
public void setActualthroughputwill(String actualthroughputwill) {
this.actualthroughputwill = actualthroughputwill;
}
public String getPlanthroughputwillyear() {
return planthroughputwillyear;
}
public void setPlanthroughputwillyear(String planthroughputwillyear) {
this.planthroughputwillyear = planthroughputwillyear;
}
public String getReporter() {
return reporter;
}
public void setReporter(String reporter) {
this.reporter = reporter;
}
public String getReportdate() {
return reportdate;
}
public void setReportdate(String reportdate) {
this.reportdate = reportdate;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
}
@@ -0,0 +1,80 @@
package com.zzc.app.otherTravel.entity;
/**
*
*
* @date: 2016年12月14日
* @Author: 龙亚辉
* @Email: 502230926@qq.com
* @FileName: BoatMonthly.java
* @Version: 1.0
* @About: 游艇月报
*/
public class BoatMonthlyReportEntity implements java.io.Serializable {
// 对应企业的id
private String userId;
private String dates;
private String recepNum;// 接待人数
private String income;// 营业收入
private String reporter;// 填报人
private String writeDate;// 填表日期
private String status;
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getDates() {
return dates;
}
public void setDates(String dates) {
this.dates = dates;
}
public String getRecepNum() {
return recepNum;
}
public void setRecepNum(String recepNum) {
this.recepNum = recepNum;
}
public String getIncome() {
return income;
}
public void setIncome(String income) {
this.income = income;
}
public String getReporter() {
return reporter;
}
public void setReporter(String reporter) {
this.reporter = reporter;
}
public String getWriteDate() {
return writeDate;
}
public void setWriteDate(String writeDate) {
this.writeDate = writeDate;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
}
@@ -0,0 +1,86 @@
package com.zzc.app.otherTravel.entity;
/**
* 空中飞行-月报实体类
*/
public class FlightMonthlyReportEntity implements java.io.Serializable {
private String userId;
// 月报时间,格式:2016-12
private String dates;
// 接待人次
private String receptionnum;
// 营业收入
private String businessincome;
// 飞行架次
private String flighttimes;
// 审核状态,1-未填报,2-未审核,3-管理员已审核(审核通过),4-管理员已审核(审核不通过)
private String status;
private String writeDate;// 填表日期
private String reporter;// 填报人
public String getDates() {
return dates;
}
public void setDates(String dates) {
this.dates = dates;
}
public String getReceptionnum() {
return receptionnum;
}
public void setReceptionnum(String receptionnum) {
this.receptionnum = receptionnum;
}
public String getBusinessincome() {
return businessincome;
}
public void setBusinessincome(String businessincome) {
this.businessincome = businessincome;
}
public String getFlighttimes() {
return flighttimes;
}
public void setFlighttimes(String flighttimes) {
this.flighttimes = flighttimes;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getWriteDate() {
return writeDate;
}
public void setWriteDate(String writeDate) {
this.writeDate = writeDate;
}
public String getReporter() {
return reporter;
}
public void setReporter(String reporter) {
this.reporter = reporter;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
}
@@ -0,0 +1,82 @@
package com.zzc.app.otherTravel.entity;
public class GolfMonthlyReportEntity implements java.io.Serializable {
// 对应企业的id
private String userId;
// 月报时间,格式:2016-12
private String dates;
// 接待人次(单位:人次)
private String receptionnum;
// 营业收入(万元)
private String businessincome;
// private String hisreport;
private String status;
private String writeDate;// 填表日期
private String reporter;// 填报人
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getDates() {
return dates;
}
public void setDates(String dates) {
this.dates = dates;
}
public String getReceptionnum() {
return receptionnum;
}
public void setReceptionnum(String receptionnum) {
this.receptionnum = receptionnum;
}
public String getBusinessincome() {
return businessincome;
}
public void setBusinessincome(String businessincome) {
this.businessincome = businessincome;
}
/*
* public String getHisreport() { return hisreport; }
*
* public void setHisreport(String hisreport) { this.hisreport = hisreport;
* }
*/
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getWriteDate() {
return writeDate;
}
public void setWriteDate(String writeDate) {
this.writeDate = writeDate;
}
public String getReporter() {
return reporter;
}
public void setReporter(String reporter) {
this.reporter = reporter;
}
}

Some files were not shown because too many files have changed in this diff Show More