Administrator
2023-06-19 49588f5a462ae7425e7eb030438a35fd80c246fa
fireworkserver
已添加663个文件
88161 ■■■■■ 文件已修改
generator/jingjy.xml 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
generator/liy.xml 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
generator/mybatis-generator-core-1.3.2.jar 补丁 | 查看 | 原始文档 | blame | 历史
generator/mysql-connector-java-5.1.26-bin.jar 补丁 | 查看 | 原始文档 | blame | 历史
generator/yufei.xml 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
generator/生成语句.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml 418 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Api/ApiController.java 572 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Cors/CorsConfig.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Cors/CorsFilter.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Cors/MyMvcConfigurer.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/DataSource/DataSourceConfig.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/DataSource/MyBatisConfigOne.java 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/DataSource/MybatisAspectj.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/DataSource/MybatisPlusConfig.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Log/JsonParamsLogAspect.java 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Oauth2/AccessTokenFilter.java 214 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Oauth2/IRedisService.java 180 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Oauth2/JwtAccessToken.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Oauth2/JwtConfig.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Oauth2/LoginAuthenticationFilter.java 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Oauth2/OAuth2Config.java 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Oauth2/OauthRole.java 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Oauth2/OauthUser.java 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Oauth2/RedisKeyEnum.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Oauth2/ResourceServerConfig.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Oauth2/SpringContextUtil.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Oauth2/UserServiceDetail.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Oauth2/WebSecurityConfig.java 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/ServiceContext/ApplicationContextUtil.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Swagger/SwaggerConfig.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Swagger/WebMvcConfig.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/ThreadExecutor/ExecutorConfig.java 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/Upload/UploadConfig.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/WebSocket/WebSocketConfig.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Config/WebSocket/WebSocketServer.java 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/AppFileController.java 211 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/AssessApplyController.java 185 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/AuthorizationController.java 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/Base/BaseController.java 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/BlackListController.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/ContractController.java 1209 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/DeliveryController.java 469 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/DictionaryController.java 333 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/EnterpriseController.java 1128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/EntryController.java 237 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/FlowController.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/HiddenDangerController.java 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/LicenseController.java 611 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/LoginController.java 442 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/PatrolController.java 593 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/PermissionController.java 147 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/ProductController.java 879 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/RegisterController.java 258 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/RoleController.java 183 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/SaleOrderController.java 1016 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/SelfCheckReportController.java 166 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/StandardController.java 540 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/StatisticsController.java 452 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/StockController.java 904 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/TransportController.java 559 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/UserController.java 802 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Controller/WarningController.java 577 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/AccessAssessApply.java 336 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/AppFileInfo.java 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/AssessApply.java 287 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/AuthorizationInfo.java 144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/BO/DirectionProductBO.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/BO/ProductLocusInfoBO.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/BO/SaleOrderDetailInfoBO.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/BlackList.java 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/ContractDetailInfo.java 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/ContractFile.java 160 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/ContractLogInfo.java 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/ContractOrderInfo.java 696 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/ContractUnitDetail.java 294 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/ControlPrintParam.java 424 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/CustomerInfo.java 216 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/DO/ProductDO.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/DTO/JiangWaiDeadlineReqDTO.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/DeliveryDetailInfo.java 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/DeliveryOrderInfo.java 151 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/DictionaryItemInfo.java 158 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/DictionaryTypeInfo.java 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/DistrictInfo.java 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enterprise.java 870 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/EnterpriseAnnual.java 172 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/EnterpriseApply.java 909 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/EnterpriseDocument.java 196 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/EnterpriseFeed.java 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/EnterpriseLicense.java 229 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/EnterprisePerson.java 251 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/EnterpriseResource.java 172 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/EnterpriseStaff.java 174 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/EnterpriseStandardization.java 235 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/EnterpriseWarehouse.java 239 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/EntryDetailInfo.java 165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/EntryOrderInfo.java 171 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/ApplyStatus.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/AssessAppealStatus.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/AssessApplyStatus.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/AssessPunishment.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/AssessType.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/CertificatePersonType.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/CertificateStatus.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/CommitStatus.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/DocumentType.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/Element.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/EnterpriseSafetySupervision.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/EnterpriseSize.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/EnterpriseStatus.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/ErrorCode.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/HiddenDangerReportStatus.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/LicenseStatus.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/MsgContentType.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/MsgType.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/PersonnelCategory.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/ProvinceCode.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Enum/PunishStatus.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Exception/BusinessException.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Exception/Handler/CustomExceptionHandler.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Extension/StockTotal.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/HelpDocInfo.java 158 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/HiddenDangerCheckContent.java 148 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/HiddenDangerCheckCriteria.java 147 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/HiddenDangerCheckResult.java 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/HiddenDangerCheckType.java 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/HiddenDangerMenu.java 146 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/HiddenDangerReport.java 256 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/HiddenDangerReportDetail.java 207 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/HistoryStock.java 238 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/LicenseInfo.java 642 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/LicenseStorage.java 191 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Log/JsonParams.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/PatrolDetailInfo.java 181 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/PatrolOrderInfo.java 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/PermissionInfo.java 273 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/ProductCategory.java 138 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/ProductCodeInfo.java 177 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/ProductInfo.java 298 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/ProductLocusInfo.java 158 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/ProductPriceInfo.java 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/ProductThresholdInfo.java 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/RegisterInfo.java 469 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/RoleInfo.java 143 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/RolePermissionsInfo.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/SaleOrderDetailInfo.java 149 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/SaleOrderInfo.java 249 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/SaleProductInfo.java 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/SecuritySupervisory.java 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/SelfCheckInfo.java 171 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/SelfCheckReport.java 140 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/SmsLogInfo.java 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/SoldNoStockInfo.java 208 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/StandardConferenceRecord.java 211 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/StandardDeviceToolsLeger.java 223 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/StandardEducationLeger.java 279 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/StandardEquipmentLeger.java 213 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/StandardGuardRoll.java 213 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/StandardHiddenDangerLeger.java 236 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/StandardLawList.java 281 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/StandardProductLeger.java 197 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/StandardRewardRecord.java 222 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/StandardSupplyMarketObject.java 235 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/StandardTemplate1.java 233 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/StaticStock.java 278 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/StockInfo.java 238 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/TransportCarrier.java 197 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/TransportCert.java 301 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/TransportCertFile.java 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/TransportCertProduct.java 158 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/TransportCertificate.java 631 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/TransportCertificateApproach.java 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/TransportCertificateArrivalRecord.java 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/TransportCertificateFile.java 185 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/TransportCertificatePerson.java 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/TransportCertificateProduct.java 170 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/TransportPerson.java 222 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/UserDeadlineOperationLog.java 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/UserInfo.java 356 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/UserRolesInfo.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/Base64Encrypt.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/BeanProperty.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/BeanUtils.java 223 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/BooleanReason.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/CommonUtil.java 139 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/ConfigUtil.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/Constants.java 139 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/DateUtils.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/DigestUtils.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/DivideFlagUtil.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/ExcelProperty.java 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/FileOptUtils.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/FilterObject.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/HexUtil.java 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/HttpUtils.java 199 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/IdCardUtil.java 171 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/JacksonObjectMapper.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/JaxbUtils.java 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/JsonUtils.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/MatrixToImageWriter.java 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/Message.java 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/Msg.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/PageInfo.java 143 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/Properties.java 206 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/QRCode.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/Result.java 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/SignUtils.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/SpringBeanUtil.java 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/StringUtils.java 219 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/Tree.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/UploadUtil.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/WebSocketClientManager.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/WebUtils.java 197 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Utils/WordTemplate.java 682 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/AppFileVo.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/ApprovalVo.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/AssessApplyAppealVo.java 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/CheckReportVo.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/CityDataVo.java 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/ContractOrderVo.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/ContractStatus.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/DailySaleReport.java 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/DealingRangeVo.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/DeliveryOrderInfoVo.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/DirectionDetail.java 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/EnterpriseDataVo.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/EnterpriseDocumentVo.java 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/EnterpriseExportVo.java 275 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/EnterpriseFeedVo.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/EnterpriseLicenseVo.java 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/EnterprisePersonVo.java 155 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/EnterpriseStandardizationVo.java 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/EnterpriseVo.java 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/EnterpriseWarehouseVo.java 139 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/EntryOrderInfoVo.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/EntryUtils.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/FireworkDeal.java 288 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/GenerateCode.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/HelpDocVo.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/HiddenDangerTableRow.java 292 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/LicenseVo.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/Menu.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/NoEntryVo.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/PageInfoExtension.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/PatrolOrderVo.java 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/Product2JsonVo.java 171 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/ProductCodePrint.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/ProductCodeVo.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/ProductLocusVo.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/ProductThresholdVo.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/ProductVo.java 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/RegisterVo.java 155 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/SaleDetailVo.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/SaleNumVo.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/SaleOrderVo.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/SelfCheckReportSearchVo.java 159 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/SelfCheckReportVo.java 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/SortData.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/SortTime.java 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/StandardTemplate1Vo.java 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/StockVo.java 264 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/TransportArrivalSum.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/TransportArrivalVo.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/TransportCertVo.java 162 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/UserVo.java 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/WarnContentVo.java 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/Vo/ZplUtil.java 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/WarnContentInfo.java 179 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Domain/WarningInfo.java 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/FireworkApplication.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/AccessAssessApplyMapper.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/AppFileInfoMapper.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/AssessApplyMapper.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/AuthorizationInfoMapper.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/BlackListMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/ContractDetailInfoMapper.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/ContractFileMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/ContractLogInfoMapper.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/ContractOrderInfoMapper.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/ContractUnitDetailMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/ControlPrintParamMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/CustomerInfoMapper.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/DeliveryDetailInfoMapper.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/DeliveryOrderInfoMapper.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/DictionaryItemInfoMapper.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/DictionaryTypeInfoMapper.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/DistrictInfoMapper.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/EnterpriseAnnualMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/EnterpriseApplyMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/EnterpriseDocumentMapper.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/EnterpriseFeedMapper.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/EnterpriseLicenseMapper.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/EnterpriseMapper.java 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/EnterprisePersonMapper.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/EnterpriseResourceMapper.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/EnterpriseStaffMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/EnterpriseStandardizationMapper.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/EnterpriseWarehouseMapper.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/EntryDetailInfoMapper.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/EntryOrderInfoMapper.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/HelpDocInfoMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/HiddenDangerCheckContentMapper.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/HiddenDangerCheckCriteriaMapper.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/HiddenDangerCheckResultMapper.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/HiddenDangerCheckTypeMapper.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/HiddenDangerMenuMapper.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/HiddenDangerReportDetailMapper.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/HiddenDangerReportMapper.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/HistoryStockMapper.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/LicenseInfoMapper.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/LicenseStorageMapper.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/PatrolDetailInfoMapper.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/PatrolOrderInfoMapper.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/PermissionInfoMapper.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/ProductCategoryMapper.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/ProductCodeInfoMapper.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/ProductInfoMapper.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/ProductLocusInfoMapper.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/ProductPriceInfoMapper.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/ProductThresholdInfoMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/RegisterInfoMapper.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/RoleInfoMapper.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/RolePermissionsInfoMapper.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/SaleOrderDetailInfoMapper.java 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/SaleOrderInfoMapper.java 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/SaleProductInfoMapper.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/SecuritySupervisoryMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/SelfCheckInfoMapper.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/SelfCheckReportMapper.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/SmsLogInfoMapper.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/SoldNoStockInfoMapper.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/StandDeviceToolsLegerMapper.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/StandHiddenDangerLegerMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/StandProductLegerMapper.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/StandardConferenceRecordMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/StandardEducationLegerMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/StandardEquipmentLegerMapper.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/StandardGuardRollMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/StandardLawListMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/StandardRewardRecordMapper.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/StandardSupplyMarketObjectMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/StandardTemplate1Mapper.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/StaticStockMapper.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/StockInfoMapper.java 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/TransportCarrierMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/TransportCertFileMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/TransportCertMapper.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/TransportCertProductMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/TransportCertificateApproachMapper.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/TransportCertificateArrivalRecordMapper.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/TransportCertificateFileMapper.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/TransportCertificateMapper.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/TransportCertificatePersonMapper.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/TransportCertificateProductMapper.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/TransportPersonMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/UserDeadlineLogMapper.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/UserInfoMapper.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/UserRolesInfoMapper.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/WarnContentInfoMapper.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/WarningInfoMapper.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/AccessAssessApplyMapper.xml 172 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/AppFileInfoMapper.xml 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/AssessApplyMapper.xml 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/AuthorizationInfoMapper.xml 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/BlackListMapper.xml 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/ContractDetailInfoMapper.xml 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/ContractFileMapper.xml 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/ContractLogInfoMapper.xml 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/ContractOrderInfoMapper.xml 275 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/ContractUnitDetailMapper.xml 307 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/ControlPrintParamMapper.xml 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/CustomerInfoMapper.xml 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/DeliveryDetailInfoMapper.xml 342 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/DeliveryOrderInfoMapper.xml 179 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/DictionaryItemInfoMapper.xml 217 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/DictionaryTypeInfoMapper.xml 176 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/DistrictInfoMapper.xml 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseAnnualMapper.xml 173 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseApplyMapper.xml 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseDocumentMapper.xml 188 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseFeedMapper.xml 208 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseLicenseMapper.xml 210 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseMapper.xml 768 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/EnterprisePersonMapper.xml 279 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseResourceMapper.xml 187 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseStaffMapper.xml 163 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseStandardizationMapper.xml 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseWarehouseMapper.xml 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/EntryDetailInfoMapper.xml 354 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/EntryOrderInfoMapper.xml 200 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/HelpDocInfoMapper.xml 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/HiddenDangerCheckContentMapper.xml 256 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/HiddenDangerCheckCriteriaMapper.xml 149 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/HiddenDangerCheckResultMapper.xml 150 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/HiddenDangerCheckTypeMapper.xml 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/HiddenDangerMenuMapper.xml 175 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/HiddenDangerReportDetailMapper.xml 261 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/HiddenDangerReportMapper.xml 525 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/HistoryStockMapper.xml 202 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/LicenseInfoMapper.xml 233 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/LicenseStorageMapper.xml 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/PatrolDetailInfoMapper.xml 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/PatrolOrderInfoMapper.xml 160 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/PermissionInfoMapper.xml 165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/ProductCategoryMapper.xml 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/ProductCodeInfoMapper.xml 206 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/ProductInfoMapper.xml 287 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/ProductLocusInfoMapper.xml 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/ProductPriceInfoMapper.xml 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/ProductThresholdInfoMapper.xml 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/RegisterInfoMapper.xml 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/RoleInfoMapper.xml 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/RolePermissionsInfoMapper.xml 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/SaleOrderDetailInfoMapper.xml 1533 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/SaleOrderInfoMapper.xml 1112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/SaleProductInfoMapper.xml 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/SecuritySupervisoryMapper.xml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/SelfCheckInfoMapper.xml 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/SelfCheckReportMapper.xml 147 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/SmsLogInfoMapper.xml 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/SoldNoStockInfoMapper.xml 264 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/StandDeviceToolsLegerMapper.xml 268 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/StandHiddenDangerLegerMapper.xml 279 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/StandProductLegerMapper.xml 245 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/StandardConferenceRecordMapper.xml 259 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/StandardEducationLegerMapper.xml 319 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/StandardEquipmentLegerMapper.xml 231 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/StandardGuardRollMapper.xml 282 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/StandardLawListMapper.xml 296 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/StandardRewardRecordMapper.xml 268 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/StandardSupplyMarketObjectMapper.xml 280 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/StandardTemplate1Mapper.xml 325 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/StaticStockMapper.xml 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/StockInfoMapper.xml 1829 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/TransportCarrierMapper.xml 195 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/TransportCertFileMapper.xml 114 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/TransportCertMapper.xml 367 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/TransportCertProductMapper.xml 172 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/TransportCertificateApproachMapper.xml 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/TransportCertificateArrivalRecordMapper.xml 143 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/TransportCertificateFileMapper.xml 189 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/TransportCertificateMapper.xml 481 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/TransportCertificatePersonMapper.xml 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/TransportCertificateProductMapper.xml 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/TransportPersonMapper.xml 190 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/UserDeadlineLog.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/UserInfoMapper.xml 417 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/UserRolesInfoMapper.xml 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/WarnContentInfoMapper.xml 265 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Mapper/mybatis/WarningInfoMapper.xml 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Scheduls/AssessTask/EnforcePunishmentTask.java 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Scheduls/AssessTask/RecoverFromPunishmentTask.java 159 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Scheduls/DL/DeviceIdRobot.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Scheduls/DL/ReportOrderTask.java 382 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Scheduls/DealSoldNoStock/DealSoldNoStock.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Scheduls/GenerateCode/GenerateCodeTask.java 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Scheduls/ReportTask/AsyncGetStockTask.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Scheduls/ReportTask/HistoryStockRobot.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Scheduls/Task/CheckEnterpriseTask.java 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Scheduls/Test.java 239 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Scheduls/WarningTask/MessageSendTask.java 317 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Scheduls/WarningTask/NoEntryWarnTask.java 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Scheduls/WarningTask/PurchaseWarnTask.java 152 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Scheduls/WarningTask/StockWarnTask.java 148 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Scheduls/WarningTask/TransportWarnTask.java 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/AccessAssessApplyService.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/AppFileService.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/AssessApplyService.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/AuthorizationService.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/BlackListService.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ContractDetailService.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ContractFileService.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ContractLogService.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ContractOrderService.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ContractUnitDetailService.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ControlPrintParamService.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/CustomerService.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/DeliveryDetailService.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/DeliveryOrderService.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/DictionaryItemService.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/DictionaryTypeService.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/DistrictService.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/EnterpriseAnnualService.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/EnterpriseApplyService.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/EnterpriseDocumentService.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/EnterpriseFeedService.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/EnterpriseLicenseService.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/EnterprisePersonService.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/EnterpriseResourceService.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/EnterpriseService.java 210 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/EnterpriseStaffService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/EnterpriseStandardizationService.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/EnterpriseWarehouseService.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/EntryDetailService.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/EntryService.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ExcelExportService.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/HelpDocService.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/HiddenDangerCheckService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/HiddenDangerMenuService.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/HiddenDangerReportDetailService.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/HiddenDangerReportService.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/HistoryStockService.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/LicenseService.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/LicenseStorageService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/PatrolDetailService.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/PatrolOrderService.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/PermissionService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ProductCategoryService.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ProductCodeService.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ProductLocusService.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ProductPriceService.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ProductService.java 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ProductThresholdService.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/RegisterService.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/RolePermissionsService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/RoleService.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/SaleOrderDetailService.java 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/SaleOrderService.java 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/SaleProductService.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/SecuritySupervisoryService.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/SelfCheckReportService.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/SelfCheckService.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/AccessAssessApplyServiceImpl.java 239 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/AppFileServiceImpl.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/AssessApplyServiceImpl.java 286 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/AuthorizationServiceImpl.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/BlackListServiceImpl.java 139 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/ContractDetailServiceImpl.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/ContractFileServiceImpl.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/ContractLogServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/ContractOrderServiceImpl.java 774 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/ContractUnitDetailServiceImpl.java 166 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/ControlPrintParamServiceImpl.java 155 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/CustomerServiceImpl.java 161 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/DeliveryDetailServiceImpl.java 173 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/DeliveryOrderServiceImpl.java 177 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/DictionaryItemServiceImpl.java 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/DictionaryTypeServiceImpl.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/DistrictServiceImpl.java 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseAnnualServiceImpl.java 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseApplyServiceImpl.java 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseDocumentServiceImpl.java 194 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseFeedServiceImpl.java 183 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseLicenseServiceImpl.java 222 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/EnterprisePersonServiceImpl.java 219 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseResourceServiceImpl.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseServiceImpl.java 1566 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseStaffServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseStandardizationServiceImpl.java 209 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseWarehouseServiceImpl.java 212 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/EntryDetailServiceImpl.java 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/EntryServiceImpl.java 251 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/ExcelExportServiceImpl.java 1767 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/HelpDocServiceImpl.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/HiddenDangerCheckServiceImpl.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/HiddenDangerMenuServiceImpl.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/HiddenDangerReportDetailServiceImpl.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/HiddenDangerReportServiceImpl.java 464 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/HistoryStockServiceImpl.java 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/LicenseServiceImpl.java 407 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/LicenseStorageServiceImpl.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/PatrolDetailServiceImpl.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/PatrolOrderServiceImpl.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/PermissionServiceImpl.java 142 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/ProductCategoryServiceImpl.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/ProductCodeServiceImpl.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/ProductLocusServiceImpl.java 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/ProductPriceServiceImpl.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/ProductServiceImpl.java 330 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/ProductThresholdServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/RegisterServiceImpl.java 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/RolePermissionsServiceImpl.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/RoleServiceImpl.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/SaleOrderDetailServiceImpl.java 615 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/SaleOrderServiceImpl.java 801 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/SaleProductServiceImpl.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/SecuritySupervisoryServiceImpl.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/SelfCheckReportServiceImpl.java 191 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/SelfCheckServiceImpl.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/SmsLogServiceImpl.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/SoldNoStockServiceImpl.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/StandardConferenceRecordServiceImpl.java 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/StandardDeviceToolsLegerServiceImpl.java 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/StandardEducationLegerServiceImpl.java 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/StandardGuardRollServiceImpl.java 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/StandardHiddenDangerLegerServiceImpl.java 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/StandardLawListServiceImpl.java 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/StandardProductLegerServiceImpl.java 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/StandardRewardRecordServiceImpl.java 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/StandardSupplyMarketObjectServiceImpl.java 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/StandardTemplate1ServiceImpl.java 160 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/StaticStockServiceImpl.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/StockServiceImpl.java 899 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/TransportCarrierServiceImpl.java 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/TransportCertFileServiceImpl.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/TransportCertProductServiceImpl.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/TransportCertServiceImpl.java 373 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/TransportCertificateApproachServiceImpl.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/TransportCertificateArrivalRecordServiceImpl.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/TransportCertificateFileServiceImpl.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/TransportCertificatePersonServiceImpl.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/TransportCertificateProductSeriveImpl.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/TransportCertificateServiceImpl.java 838 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/TransportPersonServiceImpl.java 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/UserDeadlineServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/UserRolesServiceImpl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/UserServiceImpl.java 232 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/WarnContentServiceImpl.java 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/ServiceImpl/WarningServiceImpl.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/SmsLogService.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/SoldNoStockService.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/StandardConferenceRecordService.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/StandardDeviceToolsLegerService.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/StandardEducationLegerService.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/StandardGuardRollService.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/StandardHiddenDangerLegerService.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/StandardLawListService.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/StandardProductLegerService.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/StandardRewardRecordService.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/StandardSupplyMarketObjectService.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/StandardTemplate1Service.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/StaticStockService.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/StockService.java 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/TransportCarrierService.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/TransportCertFileService.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/TransportCertProductService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/TransportCertService.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/TransportCertificateApproachService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/TransportCertificateArrivalRecordService.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/TransportCertificateFileService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/TransportCertificatePersonService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/TransportCertificateProductService.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/TransportCertificateService.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/TransportPersonService.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/UserDeadlineService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/UserRolesService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/UserService.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/WarnContentService.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/firework/Service/WarningService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-aliyun-prod.yml 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-aliyun-test.yml 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-dev.yml 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-gkhyprov.yml 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-prod.yml 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-sznmsprov.yml 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-test.yml 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-testOnline.yml 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-xj8103prov.yml 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-xj8104prov.yml 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-xj8105prov.yml 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-xjbackprov.yml 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-xjprov.yml 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-xjzwprov.yml 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/cert/keystorePass-cn.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/cert/keystorePass.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/cert/sinanoaq.cn.jks 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/cert/sinanoaq.com.jks 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/error.setting 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/log4j.properties 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/printTemplate/certificatelicense.docx 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/printTemplate/certificatelicenseapply.docx 补丁 | 查看 | 原始文档 | blame | 历史
generator/jingjy.xml
对比新文件
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
    <!-- 数据库驱动包位置 -->
    <classPathEntry location="D:\workspace\firework\generator\mysql-connector-java-5.1.26-bin.jar" />
    <!--<classPathEntry location="C:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar" />-->
    <context id="DB2Tables" targetRuntime="MyBatis3">
        <property name="javaFileEncoding" value="UTF-8"/>
        <commentGenerator>
            <property name="suppressAllComments" value="false" />
        </commentGenerator>
        <!-- 数据库链接URL、用户名、密码 -->
        <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://sinanoaq.com:23306/firework" userId="root" password="NMS@uss20201!">
            <!--<jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver" connectionURL="jdbc:oracle:thin:@localhost:1521:orcl" userId="msa" password="msa">-->
        </jdbcConnection>
        <javaTypeResolver>
            <property name="forceBigDecimals" value="false" />
        </javaTypeResolver>
        <!-- 生成模型的包名和位置 -->
        <javaModelGenerator targetPackage="com.gk.firework.Domain" targetProject="D:\workspace\firework\src\main\java\">
            <property name="enableSubPackages" value="true" />
            <property name="trimStrings" value="true" />
        </javaModelGenerator>
        <!-- 生成的xml映射文件包名和位置 -->
        <sqlMapGenerator targetPackage="com.gk.firework.Mapper.mybatis" targetProject="D:\workspace\firework\src\main\java\">
            <property name="enableSubPackages" value="true" />
        </sqlMapGenerator>
        <!-- 生成DAO的包名和位置 -->
        <javaClientGenerator type="XMLMAPPER" targetPackage="com.gk.firework.Mapper" targetProject="D:\workspace\firework\src\main\java\">
            <property name="enableSubPackages" value="true" />
        </javaClientGenerator>
        <!-- 要生成那些表(更改tableName和domainObjectName就可以) -->
<!--        <table tableName="entryorder" domainObjectName="EntryOrderInfo" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" />-->
<!--        <table tableName="stock" domainObjectName="StockInfo" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" />-->
<!--        <table tableName="entrydetail" domainObjectName="EntryDetailInfo" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" />-->
        <table tableName="controlprintparam" domainObjectName="ControlPrintParam" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" />
<!--        <table tableName="licensestorage" domainObjectName="LicenseStorage" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" />-->
    </context>
</generatorConfiguration>
generator/liy.xml
对比新文件
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
    <!-- 数据库驱动包位置 -->
    <classPathEntry location="E:\GK_CODE\firework_main\firework\generator\mysql-connector-java-5.1.26-bin.jar" />
    <!--<classPathEntry location="C:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar" />-->
    <context id="DB2Tables" targetRuntime="MyBatis3">
        <property name="javaFileEncoding" value="UTF-8"/>
        <commentGenerator>
            <property name="suppressAllComments" value="false" />
        </commentGenerator>
        <!-- 数据库链接URL、用户名、密码 -->
        <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://sinanoaq.com:23306/firework" userId="root" password="NMS@uss20201!">
            <!--<jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver" connectionURL="jdbc:oracle:thin:@localhost:1521:orcl" userId="msa" password="msa">-->
        </jdbcConnection>
        <javaTypeResolver>
            <property name="forceBigDecimals" value="false" />
        </javaTypeResolver>
        <!-- 生成模型的包名和位置 -->
        <javaModelGenerator targetPackage="com.gk.firework.Domain" targetProject="E:\GK_CODE\firework_main\firework\src\main\java\">
            <property name="enableSubPackages" value="true" />
            <property name="trimStrings" value="true" />
        </javaModelGenerator>
        <!-- 生成的xml映射文件包名和位置 -->
        <sqlMapGenerator targetPackage="com.gk.firework.Mapper.mybatis" targetProject="E:\GK_CODE\firework_main\firework\src\main\java\">
            <property name="enableSubPackages" value="true" />
        </sqlMapGenerator>
        <!-- 生成DAO的包名和位置 -->
        <javaClientGenerator type="XMLMAPPER" targetPackage="com.gk.firework.Mapper" targetProject="E:\GK_CODE\firework_main\firework\src\main\java\">
            <property name="enableSubPackages" value="true" />
        </javaClientGenerator>
        <!-- 要生成那些表(更改tableName和domainObjectName就可以) -->
        <table tableName="selfcheck" domainObjectName="SelfCheckInfo" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" />
        <table tableName="patrolorder" domainObjectName="PatrolOrderInfo" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" />
        <table tableName="patroldetail" domainObjectName="PatrolDetailInfo" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" />
    </context>
</generatorConfiguration>
generator/mybatis-generator-core-1.3.2.jar
Binary files differ
generator/mysql-connector-java-5.1.26-bin.jar
Binary files differ
generator/yufei.xml
对比新文件
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
    <!-- 数据库驱动包位置 -->
    <classPathEntry location="D:\workspace\firework\generator\mysql-connector-java-5.1.26-bin.jar" />
    <!--<classPathEntry location="C:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar" />-->
    <context id="DB2Tables" targetRuntime="MyBatis3">
        <property name="javaFileEncoding" value="UTF-8"/>
        <commentGenerator>
            <property name="suppressAllComments" value="false" />
        </commentGenerator>
        <!-- 数据库链接URL、用户名、密码 -->
        <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://sinanoaq.com:23306/firework" userId="root" password="NMS@uss20201!">
            <!--<jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver" connectionURL="jdbc:oracle:thin:@localhost:1521:orcl" userId="msa" password="msa">-->
        </jdbcConnection>
        <javaTypeResolver>
            <property name="forceBigDecimals" value="false" />
        </javaTypeResolver>
        <!-- 生成模型的包名和位置 -->
        <javaModelGenerator targetPackage="com.gk.firework.Domain" targetProject="D:\workspace\firework\src\main\java\">
            <property name="enableSubPackages" value="true" />
            <property name="trimStrings" value="true" />
        </javaModelGenerator>
        <!-- 生成的xml映射文件包名和位置 -->
        <sqlMapGenerator targetPackage="com.gk.firework.Mapper.mybatis" targetProject="D:\workspace\firework\src\main\java\">
            <property name="enableSubPackages" value="true" />
        </sqlMapGenerator>
        <!-- 生成DAO的包名和位置 -->
        <javaClientGenerator type="XMLMAPPER" targetPackage="com.gk.firework.Mapper" targetProject="D:\workspace\firework\src\main\java\">
            <property name="enableSubPackages" value="true" />
        </javaClientGenerator>
        <!-- 要生成那些表(更改tableName和domainObjectName就可以) -->
<!--        <table tableName="enterpsrise" domainObjectName="Enterprise" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" />-->
<!--        <table tableName="securitysupervisory" domainObjectName="SecuritySupervisory" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" />-->
<!--        <table tableName="enterpriseresource" domainObjectName="EnterpriseResource" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" />-->
<!--        <table tableName="enterpriseperson" domainObjectName="EnterprisePerson" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" />-->
<!--        <table tableName="enterpriseannual" domainObjectName="EnterpriseAnnual" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" />-->
<!--        <table tableName="enterprisedocument" domainObjectName="EnterpriseDocument" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" />-->
<!--        <table tableName="transportperson" domainObjectName="TransportPerson" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" />-->
<!--        <table tableName="enterprisestaff" domainObjectName="EnterpriseStaff" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" />-->
<!--        <table tableName="transportcertificate" domainObjectName="TransportCertificate" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" />-->
<!--        <table tableName="transportcertificateperson" domainObjectName="TransportCertificatePerson" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" />-->
        <table tableName="transportcertificateproduct" domainObjectName="TransportCertificateProduct" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" />
    </context>
</generatorConfiguration>
generator/生成语句.txt
对比新文件
@@ -0,0 +1 @@
java -jar mybatis-generator-core-1.3.2.jar -configfile liy.xml -overwrite
pom.xml
对比新文件
@@ -0,0 +1,418 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.3.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.gk.firework</groupId>
    <artifactId>firework</artifactId>
    <version>1.0.0</version>
    <name>firework</name>
<!--    <properties>-->
<!--        <java.version>1.8</java.version>-->
<!--        <project.name>firework</project.name>-->
<!--        &lt;!&ndash; docker配置远程地址和本地证书&ndash;&gt;-->
<!--        <docker.host>https://121.239.169.27:12375</docker.host>-->
<!--        <docker.cert>D:\docker</docker.cert>-->
<!--    </properties>-->
    <dependencies>
        <dependency>
            <groupId>javax.activation</groupId>
            <artifactId>activation</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.apache.axis/axis -->
        <dependency>
            <groupId>org.apache.axis</groupId>
            <artifactId>axis</artifactId>
            <version>1.4</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/joda-time/joda-time -->
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.10.13</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/javax.xml.rpc/javax.xml.rpc-api -->
        <dependency>
            <groupId>javax.xml.rpc</groupId>
            <artifactId>javax.xml.rpc-api</artifactId>
            <version>1.1.2</version>
        </dependency>
        <dependency>
            <groupId>commons-discovery</groupId>
            <artifactId>commons-discovery</artifactId>
            <version>0.5</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.2</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/wsdl4j/wsdl4j -->
        <dependency>
            <groupId>wsdl4j</groupId>
            <artifactId>wsdl4j</artifactId>
            <version>1.5.2</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.google.zxing</groupId>
            <artifactId>core</artifactId>
            <version>3.4.1</version>
        </dependency>
        <!-- 日志打印 -->
        <!--<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-logging</artifactId>
        </dependency>-->
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>2.1.3</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-log4j -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-log4j</artifactId>
            <version>1.3.8.RELEASE</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.baomidou/mybatis-plus-boot-starter -->
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
            <version>3.3.2</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.alibaba/druid-spring-boot-starter -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid-spring-boot-starter</artifactId>
            <version>1.1.22</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.14</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.11</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>4.1.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>4.1.2</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.springframework/spring-beans -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>5.2.8.RELEASE</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.java-websocket/Java-WebSocket -->
        <dependency>
            <groupId>org.java-websocket</groupId>
            <artifactId>Java-WebSocket</artifactId>
            <version>1.5.1</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-websocket</artifactId>
            <version>2.1.0.RELEASE</version>
        </dependency>
<!--        整合swagger2-->
        <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger2 -->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>2.8.0</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui -->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>2.8.0</version>
        </dependency>
<!--        整合redis auth2-->
        <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-security -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
            <version>2.3.3.RELEASE</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-redis -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
            <version>2.3.3.RELEASE</version>
            <exclusions>
                <exclusion>
                    <groupId>io.lettuce</groupId>
                    <artifactId>lettuce-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- https://mvnrepository.com/artifact/redis.clients/jedis -->
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
            <version>3.3.0</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.springframework.security.oauth/spring-security-oauth2 -->
        <dependency>
            <groupId>org.springframework.security.oauth</groupId>
            <artifactId>spring-security-oauth2</artifactId>
            <version>2.3.3.RELEASE</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-core -->
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-core</artifactId>
            <version>5.3.4.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-all</artifactId>
            <version>5.0.6</version>
        </dependency>
        <!--json tools-->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>2.0.17</version>
        </dependency>
        <!--jwt-->
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt</artifactId>
            <version>0.9.0</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-jwt</artifactId>
            <version>1.0.9.RELEASE</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.liferay/org.apache.commons.fileupload -->
        <dependency>
            <groupId>com.liferay</groupId>
            <artifactId>org.apache.commons.fileupload</artifactId>
            <version>1.2.2.LIFERAY-PATCHED-1</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.jetbrains/annotations -->
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <version>20.1.0</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.12</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation</artifactId>
        </dependency>
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-extension</artifactId>
            <version>3.4.1</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId >
            <artifactId>aspectjweaver</artifactId >
            <version>1.8.13</version >
        </dependency>
        <dependency>
            <groupId>e-iceblue</groupId>
            <artifactId>spire.office.free</artifactId>
            <version>3.1.1</version>
        </dependency>
    </dependencies>
    <repositories>
        <repository>
            <id>com.e-iceblue</id>
            <url>http://repo.e-iceblue.cn/repository/maven-public/</url>
        </repository>
    </repositories>
    <build>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </resource>
            <!--设置自己目录下的配置文件-->
            <resource>
                <!--下方resources的文件夹名字要和自己项目的文件夹名确认一致才行 很多人就是忽略了名字不一致 -->
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>com.gk.firework.FireworkApplication</mainClass>
                    <fork>true</fork>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
<!--            docker插件-->
<!--            <plugin>-->
<!--                <groupId>com.spotify</groupId>-->
<!--                <artifactId>docker-maven-plugin</artifactId>-->
<!--                <version>1.0.0</version>-->
<!--                &lt;!&ndash;将插件绑定在某个phase执行&ndash;&gt;-->
<!--                <executions>-->
<!--                    <execution>-->
<!--                        <id>remove-image</id>-->
<!--                        <phase>package</phase>-->
<!--                        <goals>-->
<!--                            <goal>removeImage</goal>-->
<!--                        </goals>-->
<!--                        <configuration>-->
<!--                            <imageName>-->
<!--                                ${project.artifactId}-${project.version}-->
<!--                            </imageName>-->
<!--                            <imageTags>-->
<!--                                <imageTag>latest</imageTag>-->
<!--                            </imageTags>-->
<!--                        </configuration>-->
<!--                    </execution>-->
<!--                    <execution>-->
<!--                        <id>build-image</id>-->
<!--                        &lt;!&ndash;将插件绑定在package这个phase上。也就是说,用户只需执行mvn package ,就会自动执行mvn docker:build&ndash;&gt;-->
<!--                        <phase>package</phase>-->
<!--                        <goals>-->
<!--                            <goal>build</goal>-->
<!--                        </goals>-->
<!--                    </execution>-->
<!--                </executions>-->
<!--                <configuration>-->
<!--                    &lt;!&ndash;指定生成的镜像名&ndash;&gt;-->
<!--                    <imageName>-->
<!--                        ${project.artifactId}-${project.version}-->
<!--                    </imageName>-->
<!--                    &lt;!&ndash;指定标签&ndash;&gt;-->
<!--                    <imageTags>-->
<!--                        <imageTag>latest</imageTag>-->
<!--                    </imageTags>-->
<!--                    &lt;!&ndash; 指定 Dockerfile 路径 ${project.basedir}:项目根路径下&ndash;&gt;-->
<!--                    <dockerDirectory>${project.basedir}</dockerDirectory>-->
<!--                    &lt;!&ndash;指定远程 docker api地址&ndash;&gt;-->
<!--                    <dockerHost>${docker.host}</dockerHost>-->
<!--                    <dockerCertPath>${docker.cert}</dockerCertPath>-->
<!--                    &lt;!&ndash; 这里是复制 jar 包到 docker 容器指定目录配置 &ndash;&gt;-->
<!--                    <resources>-->
<!--                        <resource>-->
<!--                            <targetPath>/</targetPath>-->
<!--                            &lt;!&ndash;jar 包所在的路径 此处配置的 即对应 target 目录&ndash;&gt;-->
<!--                            <directory>${project.build.directory}</directory>-->
<!--                            &lt;!&ndash; 需要包含的 jar包 ,这里对应的是 Dockerfile中添加的文件名 &ndash;&gt;-->
<!--                            <include>${project.build.finalName}.jar</include>-->
<!--                        </resource>-->
<!--                    </resources>-->
<!--                    &lt;!&ndash; 以下两行是为了docker push到DockerHub使用的。 &ndash;&gt;-->
<!--                    <serverId>docker-hub</serverId>-->
<!--                    <registryUrl>https://index.docker.io/v1</registryUrl>-->
<!--                </configuration>-->
<!--            </plugin>-->
        </plugins>
    </build>
</project>
src/main/java/com/gk/firework/Api/ApiController.java
对比新文件
@@ -0,0 +1,572 @@
package com.gk.firework.Api;
import com.gk.firework.Scheduls.WarningTask.MessageSendTask;
import io.swagger.annotations.Api;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
@Api(tags = "Api接口数据接口")
@RestController
@RequestMapping("/api")
public class ApiController {
    @Value("${filePath}")
    private String filePath; //配置文件配置的物理保存地址
    @Value("${fileurl}")
    private String fileurl;
    private Logger logger = LogManager.getLogger(MessageSendTask.class);
//    @Autowired
//    private SmsLogService smsLogService;
//    //在android上传图片后返回url
//    @ApiOperation(value = "公众号上保存插座监测数据",notes = "传入实验室以及电源极性数据")
//    @ApiImplicitParams({
//            @ApiImplicitParam(paramType="query",name = "operator",value = "操作人"),
//            @ApiImplicitParam(paramType="query",name = "number",value = "场所条码",required = true),
//            @ApiImplicitParam(paramType="query",name = "name",value = "场所名称"),
//            @ApiImplicitParam(paramType="query",name = "location",value = "具体地点"),
//            @ApiImplicitParam(paramType="query",name = "houseType",value = "实验室类型"),
//            @ApiImplicitParam(paramType="query",name = "manager",value = "实验室负责人" ),
//            @ApiImplicitParam(paramType="query",name = "safer",value = "实验室安全员"),
//            @ApiImplicitParam(paramType="query",name = "polarity",value = "电源极性数组"),
//            @ApiImplicitParam(paramType="query",name = "list",value = "插座个数"),
//            @ApiImplicitParam(paramType="query",name = "picpath",value = "首张图片"),
//            @ApiImplicitParam(paramType="query",name = "signature",value = "签名",required = true),
//    })
//    @PostMapping("/mobile/putpolarityUrl")
//    @ResponseBody
//    public Msg PutPolarityUrl(
//            String operator, String number, String name, String location,
//            String  houseType, String manager, String safer, String polarity,
//            String list,String signature,String picpath,String picList){
//        Msg msg = new Msg();
//        msg.setCode("404");
//        if (StringUtils.isNotBlank(signature) && signature.equals("7DAD4D03150E978F88F9F66F6F01EB68")){
//            PolarityInfo polarityInfo = new PolarityInfo();
//            if (StringUtils.isBlank(number)){
//                msg.setMessage("场所条码不能为空");
//                return msg;
//            }else {
//                polarityInfo.setNumber(number);
//            }
//            polarityInfo.setName(name);
//            polarityInfo.setLocation(location);
//            polarityInfo.setHousetype(houseType);
//            polarityInfo.setManager(manager);
//            polarityInfo.setSafer(safer);
//            polarityInfo.setOperator(operator);
//            polarityInfo.setUpdatetime(new Date());
//
//            int n = 1;
//            List<String> polarityList = new ArrayList<>();
//            if (StringUtils.isNotBlank(polarity)){
//                polarityList = StringUtils.toList(polarity);
//            }
//            if (StringUtils.isNotBlank(list)) {
//                String[] str = list.split(",");
//                n += str.length;
//            }
//
//            List<PolarityDetailInfo> polarityDetailInfoList = new ArrayList<>();
//            String advice = "";
//            //判断火地零的灯分别显示了哪个,根据不同的灯给出不同的建议
//            //n为插座个数,polarityList存入1-1,2-3,表示那盏灯亮,前缀表示第几排,后缀表示第几个灯亮
//            for (int i = 1; i <= n; i++){
//                PolarityDetailInfo polarityDetailInfo = new PolarityDetailInfo();
//                polarityDetailInfo.setLinea((byte)0);
//                polarityDetailInfo.setLineb((byte)0);
//                polarityDetailInfo.setLinec((byte)0);
//
//                if (i == 1){
//                    polarityDetailInfo.setPicname(picpath);
//                }else {
//                    String pic = "pic-"+i;
//                    String[] picListstr = picList.split(",");
//                    for (String picstr : picListstr){
//                        String[] picArray = picstr.split(";");
//                        if (picArray[0].equals(pic)){
//                            polarityDetailInfo.setPicname(picArray[1]);
//                        }
//                    }
//                }
//
//                List<String> tempList = new ArrayList<> ();
//                for (String str : polarityList){
//                    if (str.startsWith(i+"-")){
//                        tempList.add(str.substring(str.length() - 1));
//                    }
//                }
//
//                //极性只有0灯、1灯、2灯,截取最后一位数 表示第几盏灯亮
//                if (tempList.size() > 0){
//                    if (tempList.size() == 1){
//                        if (tempList.get(0).equals("1")){
//                            advice += PolarityStatus.a;
//                            polarityDetailInfo.setLinea((byte)1);
//                        }else if (tempList.get(0).equals("3")){
//                            advice += PolarityStatus.c;
//                            polarityDetailInfo.setLinec((byte)1);
//                        }
//                    }else if (tempList.size() == 2) {
//                        if ((tempList.get(0).equals("1") && tempList.get(1).equals("2"))
//                                || (tempList.get(0).equals("2") && tempList.get(1).equals("1"))){
//                            advice += PolarityStatus.ab;
//                            polarityDetailInfo.setLinea((byte)1);
//                            polarityDetailInfo.setLineb((byte)1);
//                        }
//                        if ((tempList.get(0).equals("1") && tempList.get(1).equals("3"))
//                                || (tempList.get(0).equals("3") && tempList.get(1).equals("1"))){
//                            advice += PolarityStatus.ac;
//                            polarityDetailInfo.setLinea((byte)1);
//                            polarityDetailInfo.setLinec((byte)1);
//                        }
//                        if ((tempList.get(0).equals("2") && tempList.get(1).equals("3"))
//                                || (tempList.get(0).equals("3") && tempList.get(1).equals("2"))){
//                            advice += PolarityStatus.bc;
//                            polarityDetailInfo.setLineb((byte)1);
//                            polarityDetailInfo.setLinec((byte)1);
//                        }
//                    }
//                }else {
//                    advice += PolarityStatus.none;
//                }
//
//                polarityDetailInfoList.add(polarityDetailInfo);
//            }
//            if (advice.length()> 255){
//                advice = advice.substring(0, 255);
//            }
//            polarityInfo.setAdvice(advice);
//            //查找是否存在该场所的信息,如果存在则更新,否则删除
//            PolarityInfo polarityInfoExist = polarityService.selectByNumber(number);
//            if (null != polarityInfoExist){
//                polarityInfo.setId(polarityInfoExist.getId());
//                polarityService.updateById(polarityInfo);
//            }else {
//                polarityService.save(polarityInfo);
//            }
//            //删除该场所历史的电源极性明细,重新插入数据
//            polarityDetailService.deleteByPid(polarityInfo.getId());
//            for (PolarityDetailInfo detailInfo : polarityDetailInfoList){
//                detailInfo.setPid(polarityInfo.getId());
//                detailInfo.setOperator(operator);
//                detailInfo.setUpdatetime(new Date());
//                polarityDetailService.save(detailInfo);
//            }
//        }
//        else {
//            msg.setMessage("签名错误");
//            return msg;
//        }
//        msg.setCode("200");
//        msg.setMessage("success");
//        return msg;
//    }
//
////   在vant上传图片
//    @ApiOperation(value = "公众号上保存插座监测数据",notes = "传入实验室以及电源极性数据")
//    @ApiImplicitParams({
//            @ApiImplicitParam(paramType="query",name = "operator",value = "操作人"),
//            @ApiImplicitParam(paramType="query",name = "number",value = "场所条码",required = true),
//            @ApiImplicitParam(paramType="query",name = "name",value = "场所名称"),
//            @ApiImplicitParam(paramType="query",name = "location",value = "具体地点"),
//            @ApiImplicitParam(paramType="query",name = "houseType",value = "实验室类型"),
//            @ApiImplicitParam(paramType="query",name = "manager",value = "实验室负责人" ),
//            @ApiImplicitParam(paramType="query",name = "safer",value = "实验室安全员"),
//            @ApiImplicitParam(paramType="query",name = "polarity",value = "电源极性数组"),
//            @ApiImplicitParam(paramType="query",name = "list",value = "插座个数"),
//            @ApiImplicitParam(paramType="query",name = "picpath",value = "首张图片"),
//            @ApiImplicitParam(paramType="query",name = "signature",value = "签名",required = true),
//    })
//    @PostMapping("/mobile/putpolarity")
//    @ResponseBody
//    public Msg PutPolarity(
//            String operator, String number, String name, String location,
//            String  houseType, String manager, String safer, String polarity,
//            String list,String signature,MultipartFile picpath,StandardMultipartHttpServletRequest req)throws Exception{
//        Msg msg = new Msg();
//        msg.setCode("404");
//        if (StringUtils.isNotBlank(signature) && signature.equals("7DAD4D03150E978F88F9F66F6F01EB68")){
//            PolarityInfo polarityInfo = new PolarityInfo();
//            if (StringUtils.isBlank(number)){
//                msg.setMessage("场所条码不能为空");
//                return msg;
//            }else {
//                polarityInfo.setNumber(number);
//            }
//            polarityInfo.setName(name);
//            polarityInfo.setLocation(location);
//            polarityInfo.setHousetype(houseType);
//            polarityInfo.setManager(manager);
//            polarityInfo.setSafer(safer);
//            polarityInfo.setOperator(operator);
//            polarityInfo.setUpdatetime(new Date());
//
//            int n = 1;
//            List<String> polarityList = new ArrayList<>();
//            if (StringUtils.isNotBlank(polarity)){
//                polarityList = StringUtils.toList(polarity);
//            }
//            if (StringUtils.isNotBlank(list)) {
//                String[] str = list.split(",");
//                n += str.length;
//            }
//
//            List<PolarityDetailInfo> polarityDetailInfoList = new ArrayList<>();
//            String advice = "";
//            //判断火地零的灯分别显示了哪个,根据不同的灯给出不同的建议
//            //n为插座个数,polarityList存入1-1,2-3,表示那盏灯亮,前缀表示第几排,后缀表示第几个灯亮
//            for (int i = 1; i <= n; i++){
//                PolarityDetailInfo polarityDetailInfo = new PolarityDetailInfo();
//                polarityDetailInfo.setLinea((byte)0);
//                polarityDetailInfo.setLineb((byte)0);
//                polarityDetailInfo.setLinec((byte)0);
//
//                if (i == 1){
//                    String picmame = UploadUtil.uploadFile(picpath,filePath);
//                    polarityDetailInfo.setPicname(fileurl+picmame);
//                }else {
//                    String pic = "pic-"+i;
//                    MultiValueMap<String, MultipartFile> multipartFiles = req.getMultiFileMap();
//                    MultipartFile  picFile = multipartFiles.get(pic).get(0);
//                    String picmame = UploadUtil.uploadFile(picFile,filePath);
//                    polarityDetailInfo.setPicname(fileurl+picmame);
//                }
//
//                List<String> tempList = new ArrayList<> ();
//                for (String str : polarityList){
//                    if (str.startsWith(i+"-")){
//                        tempList.add(str.substring(str.length() - 1));
//                    }
//                }
//
//                //极性只有0灯、1灯、2灯,截取最后一位数 表示第几盏灯亮
//                if (tempList.size() > 0){
//                    if (tempList.size() == 1){
//                        if (tempList.get(0).equals("1")){
//                            advice += PolarityStatus.a;
//                            polarityDetailInfo.setLinea((byte)1);
//                        }else if (tempList.get(0).equals("3")){
//                            advice += PolarityStatus.c;
//                            polarityDetailInfo.setLinec((byte)1);
//                        }
//                    }else if (tempList.size() == 2) {
//                        if ((tempList.get(0).equals("1") && tempList.get(1).equals("2"))
//                                || (tempList.get(0).equals("2") && tempList.get(1).equals("1"))){
//                            advice += PolarityStatus.ab;
//                            polarityDetailInfo.setLinea((byte)1);
//                            polarityDetailInfo.setLineb((byte)1);
//                        }
//                        if ((tempList.get(0).equals("1") && tempList.get(1).equals("3"))
//                                || (tempList.get(0).equals("3") && tempList.get(1).equals("1"))){
//                            advice += PolarityStatus.ac;
//                            polarityDetailInfo.setLinea((byte)1);
//                            polarityDetailInfo.setLinec((byte)1);
//                        }
//                        if ((tempList.get(0).equals("2") && tempList.get(1).equals("3"))
//                                || (tempList.get(0).equals("3") && tempList.get(1).equals("2"))){
//                            advice += PolarityStatus.bc;
//                            polarityDetailInfo.setLineb((byte)1);
//                            polarityDetailInfo.setLinec((byte)1);
//                        }
//                    }
//                }else {
//                    advice += PolarityStatus.none;
//                }
//
//                polarityDetailInfoList.add(polarityDetailInfo);
//            }
//            if (advice.length()> 255){
//                advice = advice.substring(0, 255);
//            }
//            polarityInfo.setAdvice(advice);
//            //查找是否存在该场所的信息,如果存在则更新,否则删除
//            PolarityInfo polarityInfoExist = polarityService.selectByNumber(number);
//            if (null != polarityInfoExist){
//                polarityInfo.setId(polarityInfoExist.getId());
//                polarityService.updateById(polarityInfo);
//            }else {
//                polarityService.save(polarityInfo);
//            }
//            //删除该场所历史的电源极性明细,重新插入数据
//            polarityDetailService.deleteByPid(polarityInfo.getId());
//            for (PolarityDetailInfo detailInfo : polarityDetailInfoList){
//                detailInfo.setPid(polarityInfo.getId());
//                detailInfo.setOperator(operator);
//                detailInfo.setUpdatetime(new Date());
//                polarityDetailService.save(detailInfo);
//            }
//        }
//        else {
//            msg.setMessage("签名错误");
//            return msg;
//        }
//        msg.setCode("200");
//        msg.setMessage("success");
//        return msg;
//    }
//
//
//    @ApiOperation(value = "上传图片",notes = "上传图片")
//    @ApiImplicitParams({
//            @ApiImplicitParam(paramType="query",name = "picpath",value = "文件"),
//    })
//    @PostMapping("/mobile/uploadPic")
//    @ResponseBody
//    public Msg uploadPic(StandardMultipartHttpServletRequest req){
//        Msg msg = new Msg();
//        msg.setCode("200");
//        msg.setMessage("success");
//
//        MultiValueMap<String, MultipartFile> multipartFiles = req.getMultiFileMap();
//        MultipartFile  picFile = multipartFiles.get("files").get(0);
//        if (null == picFile){
//            msg.setCode("404");
//            msg.setMessage("上传文件为空");
//        }else {
//            try {
//                String picmame = UploadUtil.uploadFile(picFile,filePath);
//                msg.setResult(fileurl+picmame);
//            }catch (Exception e){
//                e.printStackTrace();
//                msg.setCode("500");
//                msg.setMessage("上传失败");
//            }
//        }
//        return msg;
//    }
//
//
//    @ApiOperation(value = "发送报警短信",notes = "每天每个手机号只能发20个")
//    @ApiImplicitParams({
//            @ApiImplicitParam(paramType="query",name = "head",value = "系统名称",required = true),
//            @ApiImplicitParam(paramType="query",name = "telnumber",value = "手机号码以英文,分隔",required = true),
//            @ApiImplicitParam(paramType="query",name = "content",value = "报警内容",required = true),
//            @ApiImplicitParam(paramType="query",name = "signature",value = "签名",required = true),
//    })
//    @PostMapping("/sendmessage")
//    @ResponseBody
//    public Msg SendMessage(
//            String head,String telnumber,String content,String signature)throws Exception{
//        Msg msg = new Msg();
//        if (StringUtils.isNotBlank(signature) && signature.equals("4E85FE3F203915AC358A92205814D043")){
//            boolean issend = sendMessage(head,telnumber,content);
//            if (!issend){
//                msg.setCode("400");
//                msg.setMessage("发送短信失败,超出日发送条数");
//                return msg;
//            }
//        }
//        else {
//            msg.setCode("500");
//            msg.setMessage("签名错误");
//            return msg;
//        }
//        msg.setCode("200");
//        msg.setMessage("success");
//        return msg;
//    }
//
//    public Boolean sendMessage(String head,String telnumber,String content) throws UnsupportedEncodingException {
//        String url ="http://v.juhe.cn/sms/send";//请求接口地址
//        String tpl_id = "222840";
//        String dtype = "json";
//        String key = "f89279278b739f972ed922fa708eafa0";
//        String tpl_value = URLEncoder.encode("#name#=" + head + "&#code#=" + content,"utf-8");
//        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//        SimpleDateFormat sdfstart = new SimpleDateFormat("yyyy-MM-dd 00:00:00");
//        SimpleDateFormat sdfend = new SimpleDateFormat("yyyy-MM-dd 23:59:59");
//        Date now = new Date();
//        String starttime  = sdfstart.format(now);
//        String endtime = sdfend.format(now);
//
//        Calendar calendar = Calendar.getInstance();
//        calendar.setTime(now);
//        calendar.add(Calendar.HOUR_OF_DAY, -1);
//        Date onehour = calendar.getTime();
//        String onehourstart = sdf.format(onehour);
//        String onehourend = sdf.format(now);
//
//        boolean issend = false;
//        List<String> mobiles = StringUtils.toList(telnumber);
//        for (String mobile : mobiles) {
//            /**运营商限制同1个号码同1个签名的内容1分钟内只能接收1条,10分钟3条,1小时内4条,一天20条,否则可能会被运营商屏蔽**/
//            SmsLogInfo smsLogInfo = smsLogService.selectByTel(mobile,starttime,endtime,(byte)2);
//            if (null != smsLogInfo && smsLogInfo.getTimes()>=20){
//                logger.error("手机号:" + mobile + ",在时间为" + sdf.format(now) + ",当天已发出20条,无法继续发送");
//                continue;
//            }
//            SmsLogInfo smsLogInfoHour = smsLogService.selectByTel(mobile,onehourstart,onehourend,(byte)1);
//            if (null != smsLogInfoHour && smsLogInfoHour.getTimes()>=4){
//                logger.error("手机号:" + mobile + ",在时间为" + sdf.format(now) + ",本小时已发出4条,无法继续发送");
//                continue;
//            }
//            String respnse = null;
//            Map params = new HashMap();//请求参数
//            params.put("mobile", mobile);//接收短信的手机号码
//            params.put("tpl_id", tpl_id);//短信模板ID,请参考个人中心短信模板设置
//            params.put("tpl_value", tpl_value);
//            params.put("key", key);//应用APPKEY(应用详细页查询)
//            params.put("dtype", dtype);//返回数据的格式,xml或json,默认json
//            try {
//                respnse = HttpUtils.net(url, params, "GET");
//                JSONObject jsonResult = JSONObject.parseObject(respnse);
//                String errorcode = jsonResult.getString("error_code");
//                String reason = jsonResult.getString("reason");
//                if (errorcode.equals("0")) {
//                    //增加发送次数
//                    JSONObject result = jsonResult.getJSONObject("result");
//                    Integer count = result.getInteger("count");
//                    if (null !=  smsLogInfo){
//                        smsLogInfo.setTimes(smsLogInfo.getTimes()+count);
//                        smsLogService.updateById(smsLogInfo);
//                    }else {
//                        SmsLogInfo smsLogInfo1 = new SmsLogInfo();
//                        smsLogInfo1.setMobile(mobile);
//                        smsLogInfo1.setSendtime(now);
//                        smsLogInfo1.setTimes(count);
//                        smsLogInfo1.setType((byte)2);
//                        smsLogService.save(smsLogInfo1);
//                    }
//                    issend = true;
//                    if (null !=  smsLogInfoHour){
//                        smsLogInfoHour.setTimes(smsLogInfoHour.getTimes()+count);
//                        smsLogService.updateById(smsLogInfoHour);
//                    }else {
//                        SmsLogInfo smsLogInfo1 = new SmsLogInfo();
//                        smsLogInfo1.setMobile(mobile);
//                        smsLogInfo1.setSendtime(now);
//                        smsLogInfo1.setTimes(count);
//                        smsLogInfo1.setType((byte)1);
//                        smsLogService.save(smsLogInfo1);
//                    }
//                } else {
//                    logger.error("手机号:" + mobile + ",在时间为" + sdf.format(now) + "发送短信失败,原因为:" + reason);
//                }
//            } catch (Exception e) {
//                e.printStackTrace();
//            }
//        }
//        return issend;
//    }
//    //根据研究所id显示设备报警和故障个数 get请求
//    @ApiOperation(value = "根据研究所id显示设备报警和故障个数")
//    @ApiImplicitParams({
//            @ApiImplicitParam(paramType="query",name = "instituteid",value = "研究所id",required = true),
//            @ApiImplicitParam(paramType="query",name = "appkey",value = "appkey",required = true),
//            @ApiImplicitParam(paramType="query",name = "timestamp",value = "时间戳",required = true),
//            @ApiImplicitParam(paramType="query",name = "signature",value = "签名",required = true),
//    })
//    @GetMapping("/getElectricalWarn")
//    @ResponseBody
//    public Msg getElectricalWarn(@RequestParam String instituteid,@RequestParam String appkey,
//                                 @RequestParam String timestamp,@RequestParam String signature){
//        Msg msg = new Msg();
//        msg.setCode("200");
//        msg.setMessage("success");
//
//        String errorMsg =  validSign(appkey,signature,timestamp);
//        if (StringUtils.isNotBlank(errorMsg)){
//            msg.setCode("500");
//            msg.setMessage(errorMsg);
//            return msg;
//        }
//
//       int yujing = 0;
//       int guzhang = 0;
//
//       SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//       Date now = new Date();
//       Calendar calendar = Calendar.getInstance();
//       calendar.setTime(now);
//       calendar.add(Calendar.MINUTE, -2);
//       Date starttime = calendar.getTime();
//       String starttimeStr = sdf.format(starttime);
//       String endttimeStr = sdf.format(now);
//
//       InstituteInfo instituteInfo = instituteService.getById(instituteid);
//
//       List<String> numberList = electricalHistoryService.getElectricalWarn(starttimeStr,endttimeStr);
//       if (numberList.size() > 0){
//           List<ResearchHouseVo> researchHouseVoList = researchHouseService.selectByNumbers(numberList);
//           for (ResearchHouseVo researchHouseVo : researchHouseVoList){
//               if (researchHouseVo.getInstituteName().equals(instituteInfo.getName())){
//                   yujing ++;
//               }
//           }
//       }
//
//       List<DeviceInfo> deviceInfoList = deviceService.selectByStatusAndInstitute((byte)1);
//       if (deviceInfoList.size() > 0){
//           for (DeviceInfo deviceInfo : deviceInfoList) {
//               if (deviceInfo.getInstitute().equals(instituteInfo.getName())){
//                   guzhang ++;
//               }
//           }
//       }
//
//       Map<String,Object> map = new HashMap<> ();
//       map.put("yujing",yujing);
//       map.put("guzhang",guzhang);
//
//       msg.setResult(map);
//       return msg;
//    }
//
//
//    private String validSign(String appkey,String signature,String timestamp) {
//        String appsecret = "5E84FE3F20N915AC357A92206817D023";
//        if (StringUtils.isBlank(signature)||StringUtils.isBlank(appkey)
//                || StringUtils.isBlank(timestamp)){
//            return "签名不能为空";
//        }
//        if (!appkey.equals("sznms")){
//            return "appkey有误";
//        }
//
//        Long nowtimestamp = System.currentTimeMillis()/1000;
//
//        Integer signtimestamp = Integer.parseInt(timestamp);
//
//        if(Math.abs(nowtimestamp - signtimestamp) > 120)
//        {
//            return "超出时间范围";
//        }
//
//        String sign = MD5Encoder(appkey+appsecret+timestamp,"UTF-8");
//        if (!sign.equals(signature)){
//            return "签名验证失败";
//        }
//        return null;
//    }
//
//    public String MD5Encoder(String s,String charset){
//        try{
//            byte[] btInput = s.getBytes(charset);
//            MessageDigest mdInst = MessageDigest.getInstance("MD5");
//            mdInst.update(btInput);
//
//            byte[] md = mdInst.digest();
//            StringBuffer sb = new StringBuffer();
//            for(int i =0 ;i<md.length;i++)
//            {
//                int val = ((int)md[i]) & 0xff;
//                if(val<16){
//                    sb.append("0");
//                }
//                sb.append(Integer.toHexString(val));
//            }
//            return sb.toString();
//        }
//        catch (Exception e)
//        {
//            return  null;
//        }
//    }
}
src/main/java/com/gk/firework/Config/Cors/CorsConfig.java
对比新文件
@@ -0,0 +1,17 @@
package com.gk.firework.Config.Cors;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@Configuration
public class CorsConfig  extends WebMvcConfigurerAdapter {
    @Override
    public void addCorsMappings(CorsRegistry registry) {
        registry.addMapping("/**").allowedOrigins("*")
                .allowedMethods("GET", "HEAD", "POST","PUT", "DELETE", "OPTIONS")
                .allowCredentials(true).maxAge(3600);
    }
}
src/main/java/com/gk/firework/Config/Cors/CorsFilter.java
对比新文件
@@ -0,0 +1,39 @@
package com.gk.firework.Config.Cors;
import org.springframework.stereotype.Component;
import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@Component
@WebFilter(urlPatterns = "/*", filterName = "CorsFilter")
public class CorsFilter implements Filter {
    @Override
    public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
        HttpServletResponse response = (HttpServletResponse) res;
        HttpServletRequest reqs = (HttpServletRequest) req;
        String curOrigin = reqs.getHeader("Origin");
        response.setHeader("Access-Control-Allow-Origin", curOrigin == null ? "*" : curOrigin);
//        response.setHeader("Access-Control-Allow-Origin", "*");
        response.setHeader("Access-Control-Allow-Credentials", "true");
        response.setHeader("Access-Control-Allow-Methods", "POST, GET, PATCH, DELETE, PUT, OPTIONS");
        response.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, X-Auth-Token, Authorization");
//        response.setHeader("Access-Control-Allow-Headers", "*");
        response.setHeader("Access-Control-Max-Age","3600");
        chain.doFilter(req, res);
    }
    @Override
    public void init(FilterConfig filterConfig) {
        System.out.println("cors");
    }
    @Override
    public void destroy() {}
}
src/main/java/com/gk/firework/Config/Cors/MyMvcConfigurer.java
对比新文件
@@ -0,0 +1,65 @@
package com.gk.firework.Config.Cors;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class MyMvcConfigurer implements WebMvcConfigurer {
    @Value("${filePath}")
    private String filePath; //配置文件配置的物理保存地址
    @Value("${sqlPath}")
    private String sqlPath;
    @Value("${enterprisePath}")
    private String enterprisePath; //配置文件配置的物理保存地址
    @Value("${contractPath}")
    private String contractPath; //配置文件配置的物理保存地址
    @Value("${transportCertificatePath}")
    private String transportCertificatePath;
    @Value("${hiddenDangerPath}")
    private String hiddenDangerPath;
    @Value("${patrolPath}")
    private String patrolPath;
    @Value("${appPath}")
    private String appPath;
    @Value("${customerPath}")
    private String customerPath;
    @Override
    public void addCorsMappings(CorsRegistry registry) {
        registry.addMapping("/**")
                .allowedOrigins("*")
                .allowCredentials(true)
                .allowedMethods("GET", "POST", "DELETE", "PUT","PATCH")
                .maxAge(3600);
    }
    /**服务器静态资源配置**/
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/upload/**")
                .addResourceLocations("file:"+ filePath)   //媒体资源
                .addResourceLocations("classpath:/META-INF/resources/"); //swagger2页面
        registry.addResourceHandler("/dbback/**")
                .addResourceLocations("file:"+sqlPath);
        registry.addResourceHandler("/upload/enterprise/**")
                .addResourceLocations("file:"+enterprisePath);
        registry.addResourceHandler("/upload/contract/**")
                .addResourceLocations("file:"+contractPath);
        registry.addResourceHandler("/upload/transportCertificate/**")
                .addResourceLocations("file:" + transportCertificatePath);
        registry.addResourceHandler("/upload/hiddenDanger/**")
                .addResourceLocations("file:" + hiddenDangerPath);
        registry.addResourceHandler("/upload/patrol/**")
                .addResourceLocations("file:" + patrolPath);
        registry.addResourceHandler("/upload/app/**")
                .addResourceLocations("file:" + appPath);
        registry.addResourceHandler("/upload/customer/**")
                .addResourceLocations("file:" + customerPath);
        registry.addResourceHandler("/logs/**").
                addResourceLocations("file:" + System.getProperty("user.dir") + "/logs/");
    }
}
src/main/java/com/gk/firework/Config/DataSource/DataSourceConfig.java
对比新文件
@@ -0,0 +1,19 @@
package com.gk.firework.Config.DataSource;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.sql.DataSource;
@Configuration
public class DataSourceConfig {
    @Bean
    @ConfigurationProperties("spring.datasource.one")
    DataSource dsOne(){
        return DruidDataSourceBuilder.create().build();
    }
}
src/main/java/com/gk/firework/Config/DataSource/MyBatisConfigOne.java
对比新文件
@@ -0,0 +1,80 @@
package com.gk.firework.Config.DataSource;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.extension.plugins.handler.TableNameHandler;
import com.baomidou.mybatisplus.extension.plugins.inner.DynamicTableNameInnerInterceptor;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import org.apache.ibatis.plugin.Interceptor;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
import org.springframework.stereotype.Repository;
import javax.sql.DataSource;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
@Configuration
@MapperScan(value = "com.gk.firework.Mapper",sqlSessionFactoryRef = "sqlSessionFactoryBean1" ,annotationClass = Repository.class)
public class MyBatisConfigOne {
    @Autowired
    @Qualifier("dsOne")
    DataSource dsOne;
    @Autowired
    private PaginationInterceptor paginationInterceptor;
    @Autowired
    private MybatisPlusInterceptor mybatisPlusInterceptor;
    @Bean
    SqlSessionFactory sqlSessionFactoryBean1() throws Exception {
        MybatisSqlSessionFactoryBean factoryBean = new MybatisSqlSessionFactoryBean();
        factoryBean.setDataSource(dsOne);
        factoryBean.setMapperLocations(resolveMapperLocations());
        paginationInterceptor.setLimit(100000);
        //关键代码 设置 MyBatis-Plus 分页插件
        Interceptor[] plugins = {paginationInterceptor,mybatisPlusInterceptor};
        factoryBean.setPlugins(plugins);
        return factoryBean.getObject();
    }
    public Resource[] resolveMapperLocations() {
        ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver();
        List<String> mapperLocations = new ArrayList<>();
        mapperLocations.add("classpath*:com/gk/firework/Mapper/mybatis/*.xml");
        List<Resource> resources = new ArrayList();
        if (mapperLocations != null) {
            for (String mapperLocation : mapperLocations) {
                try {
                    Resource[] mappers = resourceResolver.getResources(mapperLocation);
                    resources.addAll(Arrays.asList(mappers));
                } catch (IOException e) {
                    // ignore
                }
            }
        }
        return resources.toArray(new Resource[resources.size()]);
    }
    @Bean
    SqlSessionTemplate sqlSessionTemplate1() throws Exception{
        return new SqlSessionTemplate(sqlSessionFactoryBean1());
    }
}
src/main/java/com/gk/firework/Config/DataSource/MybatisAspectj.java
对比新文件
@@ -0,0 +1,27 @@
package com.gk.firework.Config.DataSource;
import com.baomidou.mybatisplus.core.conditions.AbstractWrapper;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;
@Aspect
@Component
public class MybatisAspectj {
    // 配置织入点
    @Pointcut("execution(public * com.baomidou.mybatisplus.core.mapper.BaseMapper.selectOne(..))")
    public void selectOneAspect() {
    }
    @Before("selectOneAspect()")
    public void beforeSelect(JoinPoint point) {
        Object arg = point.getArgs()[0];
        if (arg instanceof AbstractWrapper) {
            arg = (AbstractWrapper) arg;
            ((AbstractWrapper) arg).last("limit 1");
        }
    }
}
src/main/java/com/gk/firework/Config/DataSource/MybatisPlusConfig.java
对比新文件
@@ -0,0 +1,48 @@
package com.gk.firework.Config.DataSource;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.handler.TableNameHandler;
import com.baomidou.mybatisplus.extension.plugins.inner.DynamicTableNameInnerInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.HashMap;
/**
 * @author : jingjy
 * @date : 2021/4/1 17:15
 */
@Configuration
@MapperScan("com.gk.firework.Mapper")
public class MybatisPlusConfig {
    public static ThreadLocal<String> myTableName = new ThreadLocal<>();
    @Value("${slice}")
    private String tableSlice;
    /**
     * 通过拦截器,拦截SQL请求,可更换表名
     */
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        DynamicTableNameInnerInterceptor dynamicTableNameInnerInterceptor = new DynamicTableNameInnerInterceptor();
        HashMap<String, TableNameHandler> map = new HashMap<String, TableNameHandler>(2) {{
            put("deliveryorder", (sql, tableName) -> tableName + tableSlice);
            put("deliverydetail", (sql, tableName) -> tableName + tableSlice);
            put("saleorder", (sql, tableName) -> tableName + tableSlice);
            put("saleorderdetail", (sql, tableName) -> tableName + tableSlice);
            put("customer", (sql, tableName) -> tableName + tableSlice);
            put("entryorder", (sql, tableName) -> tableName + tableSlice);
            put("entrydetail", (sql, tableName) -> tableName + tableSlice);
        }};
        dynamicTableNameInnerInterceptor.setTableNameHandlerMap(map);
        interceptor.addInnerInterceptor(dynamicTableNameInnerInterceptor);
        return interceptor;
    }
}
src/main/java/com/gk/firework/Config/Log/JsonParamsLogAspect.java
对比新文件
@@ -0,0 +1,59 @@
package com.gk.firework.Config.Log;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.gk.firework.Domain.Exception.BusinessException;
import org.apache.log4j.Logger;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.Objects;
@Aspect
@Component
public class JsonParamsLogAspect {
    private static final Logger logger = Logger.getLogger(JsonParamsLogAspect.class);
    @Pointcut("@annotation(com.gk.firework.Domain.Log.JsonParams)")
    public void controllerAspect(){
    }
    @Before(value = "controllerAspect()")
    public void beforeEnterControllerExecute(JoinPoint point) {
        this.logHandle(point);
    }
    private void logHandle(JoinPoint point) {
        try {
            Object[] args = point.getArgs();
            if (args.length != 1) throw new BusinessException("系统错误,参数对象只能是一个且固定");
            HttpServletRequest request = ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest();
            String url = request.getRequestURL().toString();
            SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            String current = formatter.format(new Date());
            Object arg = args[0];
            if (arg instanceof JSONArray || arg instanceof JSONObject) {
                logger.info("\n请求时间:" + current +
                            "\n请求地址:" + url +
                            "\n请求参数:" + arg.toString());
            }
        } catch (BusinessException e) {
            e.printStackTrace();
            logger.error(e.getMessage());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
src/main/java/com/gk/firework/Config/Oauth2/AccessTokenFilter.java
对比新文件
@@ -0,0 +1,214 @@
package com.gk.firework.Config.Oauth2;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.gk.firework.Domain.AuthorizationInfo;
import com.gk.firework.Domain.Utils.CommonUtil;
import com.gk.firework.Domain.Utils.Constants;
import com.gk.firework.Domain.Utils.Msg;
import com.gk.firework.Domain.Vo.UserVo;
import com.gk.firework.Service.AuthorizationService;
import com.gk.firework.Service.UserService;
import io.jsonwebtoken.Claims;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.util.AntPathMatcher;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;
import java.util.Map;
/**
 * AccessToken filter
 *
 * @author zhangby
 * @date 2019-05-20 20:32
 */
public class AccessTokenFilter implements Filter {
    private final Logger logger = LoggerFactory.getLogger(this.getClass());
    /**
     * redis service
     */
    IRedisService redisService = SpringContextUtil.getBean(IRedisService.class);
    UserService userService = SpringContextUtil.getBean(UserService.class);
    AuthorizationService authorizationService = SpringContextUtil.getBean(AuthorizationService.class);
    /**
     * do filter
     *
     * @param servletRequest  servletRequest
     * @param servletResponse servletResponse
     * @param filterChain     filterChain
     * @throws IOException      IOException
     * @throws ServletException ServletException
     */
    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        HttpServletRequest request = (HttpServletRequest) servletRequest;
        HttpServletResponse response = (HttpServletResponse) servletResponse;
        response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
        Msg msg = new Msg();
        try {
            // filter url  && !request.getMethod().equals("OPTIONS")
            if (urlMatcher(request.getRequestURI(), Constants.FILTER_EXCLUDE_PATH)){
                String token = request.getHeader(HttpHeaders.AUTHORIZATION);
                if (null != token && !token.equals("undefined")) {
                    /** 解析token */
                    Claims claims = CommonUtil.parseJWT(token);
                    if (ObjectUtil.isNotNull(claims)) {
                        //设置当前登录用户
                        System.setProperty(Constants.CURRENT_USER_ID, claims.get("user_id").toString());
                        try {
                            //获取redis 查询token是否有效 [jti]
                            String tokenKey = StrUtil.format(RedisKeyEnum.AUTH_TOKEN.getKey(), claims.getId());
                            Object userInfo = redisService.get(tokenKey);
                            if (ObjectUtil.isNotNull(userInfo)) {
                                Map map = JSON.parseObject(userInfo.toString(), Map.class);
                                UserVo userVo = userService.selectUserVoByName(map.get("username").toString());
                                if (null == userVo) {
                                    msg.setCode("100");
                                    msg.setMessage("用户不存在");
                                    returnJson(response, msg);
                                    return;
                                }
                                if (userVo.getIssale() == 1){
                                    if (userVo.getStatus()!=null && userVo.getStatus() != 1){
                                        msg.setCode("100");
                                        msg.setMessage("用户已失效");
                                        returnJson(response, msg);
                                        return;
                                    }
                                    if (userVo.getExpiredate() != null && userVo.getExpiredate().getTime() < System.currentTimeMillis()){
                                        msg.setCode("100");
                                        msg.setMessage("用户已超期");
                                        returnJson(response, msg);
                                        return;
                                    }
                                    Object loginObj =  map.get("logintime");
                                    Object authObj =  map.get("auth");
                                    if (loginObj != null && authObj != null){
                                        //通过auth查询授权码最后登录时间
                                        AuthorizationInfo authInfo = authorizationService.selectByUser(userVo.getCompanynumber(),authObj.toString());
                                        if (authInfo == null){
                                            msg.setCode("100");
                                            msg.setMessage("授权码无效");
                                            returnJson(response, msg);
                                            return;
                                        }
                                        if (authInfo.getLasttime().getTime() > Long.parseLong(loginObj.toString())){
                                            redisService.set(tokenKey, userInfo, 0L);
                                            msg.setCode("100");
                                            msg.setMessage("登录失效,请重新登录");
                                            returnJson(response, msg);
                                            return;
                                        }
                                    }
                                }
                                //更新登录超时时间
                                redisService.set(tokenKey, userInfo, 60L*60L*18L);
                            } else {
                                logger.info("998:登录超时,无效认证");
                                msg.setCode("100");
                                msg.setMessage("登录超时,无效认证");
                                returnJson(response, msg);
                                return;
                            }
                        } catch (Exception e) {
                            logger.info("401:非授权访问,无效的token");
                        }
                    } else {
                        logger.info("500: 账户或密码不正确,登录失败");
                    }
                }
                else if(request.getMethod().equals("OPTIONS")) {
                    response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
                    response.setHeader("Access-Control-Allow-Credentials", "true");
                    response.setHeader("Access-Control-Allow-Methods", "POST, GET, PATCH, DELETE, PUT, OPTIONS");
                    response.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, X-Auth-Token, Authorization");
                    response.setHeader("Access-Control-Max-Age","3600");
                    response.setStatus(HttpStatus.OK.value());
                    return;
                }
                else {
                    logger.info("500: token不存在");
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            //系统异常
            msg.setCode("100");
            msg.setMessage("系统异常请稍后重试");
            returnJson(response, msg);
            response.setStatus(HttpStatus.OK.value());
        }
        filterChain.doFilter(servletRequest, servletResponse);
        //过滤器结束之后销毁
        System.clearProperty(Constants.CURRENT_USER_ID);
    }
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
    }
    @Override
    public void destroy() {
    }
    /**
     * 认证是否需要,验证session url
     *
     * @param real_url
     * @return
     */
    private boolean urlMatcher(String real_url, String pathFilter) {
        AntPathMatcher antPathMatcher = new AntPathMatcher();
        /** 验证添加项url */
        if (StrUtil.isNotBlank(pathFilter)) {
            for (String path : pathFilter.split(",")) {
                if (antPathMatcher.match(path.trim(), real_url.trim())) {
                    return false;
                }
            }
        }
        return true;
    }
    /**
     * 返回url
     *
     * @param response
     * @param json
     */
    private void returnJson(HttpServletResponse response, Msg msg) {
        PrintWriter writer = null;
        response.setCharacterEncoding("UTF-8");
        response.setContentType("text/html; charset=utf-8");
        response.setHeader("Access-Control-Allow-Credentials", "true");
        response.setHeader("Access-Control-Allow-Methods", "POST, GET, PATCH, DELETE, PUT, OPTIONS");
        response.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, X-Auth-Token, Authorization");
        response.setHeader("Access-Control-Max-Age","3600");
        try {
            writer = response.getWriter();
            writer.print(JSON.toJSON(msg));
        } catch (IOException e) {
        } finally {
            if (writer != null) {
                writer.close();
            }
        }
    }
}
src/main/java/com/gk/firework/Config/Oauth2/IRedisService.java
对比新文件
@@ -0,0 +1,180 @@
package com.gk.firework.Config.Oauth2;
import com.alibaba.fastjson.JSON;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
/**
 * redis service
 *
 * @author zhangby
 * @date 2019-05-15 09:34
 */
@Service
public class IRedisService {
    /**
     * logger
     */
    private final Logger logger = LoggerFactory.getLogger(this.getClass());
    /**
     * redis service
     */
    @Autowired
    protected StringRedisTemplate redisTemplate;
    /**
     * Write to redis cache
     *
     * @param key key
     * @param value value
     * @return boolean
     */
    public boolean set(final String key, Object value) {
        boolean result = false;
        if (value != null) {
            try {
                ValueOperations operations = redisTemplate.opsForValue();
                if (value instanceof String) {
                    operations.set(key, value.toString());
                } else {
                    operations.set(key, JSON.toJSONString(value));
                }
                result = true;
            } catch (Exception e) {
                logger.info("Writing redis cache failed! The error message is:" + e.getMessage());
                e.printStackTrace();
            }
        }
        return result;
    }
    /**
     * Write redis cache (set expire survival time)
     *
     * @param key key
     * @param value value
     * @param expire time
     * @return boolean
     */
    public boolean set(final String key, Object value, Long expire) {
        boolean result = false;
        try {
            ValueOperations operations = redisTemplate.opsForValue();
            if (value instanceof String) {
                operations.set(key, value.toString());
            } else {
                operations.set(key, JSON.toJSONString(value));
            }
            redisTemplate.expire(key, expire, TimeUnit.SECONDS);
            result = true;
        } catch (Exception e) {
            logger.info("Writing to the redis cache (setting the expire lifetime) failed! The error message is:" + e.getMessage());
            e.printStackTrace();
        }
        return result;
    }
    /**
     * Read redis cache
     *
     * @param key key
     * @return object
     */
    public Object get(final String key) {
        Object result = null;
        try {
            ValueOperations operations = redisTemplate.opsForValue();
            result = operations.get(key);
        } catch (Exception e) {
            logger.info("Failed to read redis cache! The error message is:" + e.getMessage());
            e.printStackTrace();
        }
        return result;
    }
    /**
     * Read redis to entity
     *
     * @param key   redis key
     * @param clazz 实体类class
     * @param <T>   泛型
     * @return T
     */
    public <T> T getBean(final String key, Class<T> clazz) {
        return Optional.ofNullable(get(key))
                .map(o -> JSON.parseObject(o.toString(), clazz))
                .orElse(null);
    }
    /**
     * Read redis to List
     * @param key
     * @param clazz
     * @param <T>
     * @return
     */
    public <T> List<T> getArrayBean(final String key, Class<T> clazz) {
        return Optional.ofNullable(get(key))
                .map(o -> JSON.parseArray(o.toString(), clazz))
                .orElse(null);
    }
    /**
     * Determine if there is a corresponding key in the redis cache
     *
     * @param key key
     * @return boolean
     */
    public boolean exists(final String key) {
        boolean result = false;
        try {
            result = redisTemplate.hasKey(key);
        } catch (Exception e) {
           logger.info("Determine if there is a corresponding key in the redis cache failed! The error message is:" + e.getMessage());
            e.printStackTrace();
        }
        return result;
    }
    /**
     * Redis deletes the corresponding value according to the key
     *
     * @param key key
     * @return boolean
     */
    public boolean remove(final String key) {
        boolean result = false;
        try {
            if (exists(key)) {
                redisTemplate.delete(key);
            }
            result = true;
        } catch (Exception e) {
            logger.info("Redis fails to delete the corresponding value according to the key! The error message is:" + e.getMessage());
            e.printStackTrace();
        }
        return result;
    }
    /**
     * Redis deletes the corresponding value according to the keywords batch
     *
     * @param keys keys
     */
    public void remove(final String... keys) {
        for (String key : keys) {
            remove(key);
        }
    }
}
src/main/java/com/gk/firework/Config/Oauth2/JwtAccessToken.java
对比新文件
@@ -0,0 +1,26 @@
package com.gk.firework.Config.Oauth2;
import org.springframework.security.oauth2.common.DefaultOAuth2AccessToken;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
import org.springframework.security.oauth2.provider.OAuth2Authentication;
import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter;
/**
 * 自定义token
 *
 * @author zhangby
 * @date 2019-04-01 11:39
 */
public class JwtAccessToken extends JwtAccessTokenConverter {
    @Override
    public OAuth2AccessToken enhance(OAuth2AccessToken accessToken, OAuth2Authentication authentication) {
        DefaultOAuth2AccessToken defaultOAuth2AccessToken = new DefaultOAuth2AccessToken(accessToken);
        // 设置额外用户信息
        OauthUser baseUser = ((OauthUser) authentication.getPrincipal());
        // 将用户信息添加到token额外信息中
        defaultOAuth2AccessToken.getAdditionalInformation().put("user_id", baseUser.getId());
        return super.enhance(defaultOAuth2AccessToken, authentication);
    }
}
src/main/java/com/gk/firework/Config/Oauth2/JwtConfig.java
对比新文件
@@ -0,0 +1,32 @@
package com.gk.firework.Config.Oauth2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.oauth2.provider.token.TokenStore;
import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter;
import org.springframework.security.oauth2.provider.token.store.JwtTokenStore;
/**
 * 配置jwt
 */
@Configuration
public class JwtConfig {
    @Autowired
    JwtAccessTokenConverter jwtAccessTokenConverter;
    @Bean
    @Qualifier("tokenStore")
    public TokenStore tokenStore() {
        return new JwtTokenStore(jwtAccessTokenConverter);
    }
    @Bean
    protected JwtAccessTokenConverter jwtTokenEnhancer() {
        JwtAccessToken converter = new JwtAccessToken();
        converter.setSigningKey("springCloud_oauth_service");
        return converter;
    }
}
src/main/java/com/gk/firework/Config/Oauth2/LoginAuthenticationFilter.java
对比新文件
@@ -0,0 +1,77 @@
package com.gk.firework.Config.Oauth2;
import com.gk.firework.Domain.Utils.Constants;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
import org.springframework.security.web.util.matcher.OrRequestMatcher;
import org.springframework.security.web.util.matcher.RequestMatcher;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.GenericFilterBean;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Optional;
/**
 * 添加用户授权统一过滤【对登录类型支持】
 *
 * @author zhangby
 * @date 2019-04-09 16:41
 */
@Component
public class LoginAuthenticationFilter extends GenericFilterBean implements ApplicationContextAware {
    private static final String OAUTH_TOKEN_URL = "/oauth/token";
    private RequestMatcher requestMatcher;
    public LoginAuthenticationFilter(){
        this.requestMatcher = new OrRequestMatcher(
                new AntPathRequestMatcher(OAUTH_TOKEN_URL, "GET"),
                new AntPathRequestMatcher(OAUTH_TOKEN_URL, "POST")
        );
    }
    /**
     * 过滤拦截
     * @param servletRequest
     * @param servletResponse
     * @param filterChain
     * @throws IOException
     * @throws ServletException
     */
    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        HttpServletRequest request = (HttpServletRequest) servletRequest;
        HttpServletResponse response = (HttpServletResponse) servletResponse;
        if(requestMatcher.matches(request)){
            try{
                //设置集成登录信息
                String auth_type = request.getParameter("auth_type");
                System.setProperty(Constants.AUTH_TYPE, Optional.ofNullable(auth_type).orElse(""));
                //预处理
                filterChain.doFilter(request,response);
                //后置处理
            }finally {
                System.clearProperty(Constants.AUTH_TYPE);
            }
        }else{
            filterChain.doFilter(request,response);
        }
    }
    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
    }
}
src/main/java/com/gk/firework/Config/Oauth2/OAuth2Config.java
对比新文件
@@ -0,0 +1,70 @@
package com.gk.firework.Config.Oauth2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer;
import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer;
import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer;
import org.springframework.security.oauth2.provider.token.TokenStore;
import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter;
/**
 * 配置oauth2.0
 *
 * @author zhangby
 * @date 2019/2/27 11:27 AM
 */
@Configuration
@EnableAuthorizationServer
public class OAuth2Config extends AuthorizationServerConfigurerAdapter {
    @Override
    public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
        clients.inMemory()
                .withClient("uaa-service")
                .secret("123456")
                .scopes("service")
                .autoApprove(true)
                .authorizedGrantTypes("implicit", "refresh_token", "password", "authorization_code")
                //18小时过期
                .refreshTokenValiditySeconds(18*60*60)
                .accessTokenValiditySeconds(18*60*60);
    }
    @Override
    public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
        endpoints.tokenStore(tokenStore)
                .tokenEnhancer(tokenConverter)
                .reuseRefreshTokens(false)
                .authenticationManager(authenticationManager)
                .userDetailsService(userServiceDetail);
    }
    @Autowired
    private LoginAuthenticationFilter loginAuthenticationFilter;
    @Override
    public void configure(AuthorizationServerSecurityConfigurer security) throws Exception {
        security.allowFormAuthenticationForClients()
                .tokenKeyAccess("isAuthenticated()")
                .checkTokenAccess("permitAll()")
                .addTokenEndpointAuthenticationFilter(loginAuthenticationFilter);
    }
    @Autowired
    private UserServiceDetail userServiceDetail;
    @Autowired
    @Qualifier("authenticationManagerBean")
    private AuthenticationManager authenticationManager;
    @Autowired
    TokenStore tokenStore;
    @Autowired
    JwtAccessTokenConverter tokenConverter;
}
src/main/java/com/gk/firework/Config/Oauth2/OauthRole.java
对比新文件
@@ -0,0 +1,71 @@
package com.gk.firework.Config.Oauth2;
import org.springframework.security.core.GrantedAuthority;
/**
 * oauth2.0授权 角色类
 *
 * @author zhangby
 * @date 2019-05-14 09:25
 */
public class OauthRole implements GrantedAuthority {
    /**
     * 角色id
     */
    private String id;
    /**
     * 角色名称
     */
    private String name;
    private String code;
    private String btnAccess;
    public OauthRole(String id, String name,String code,String btnAccess) {
        this.name = name;
        this.id = id;
        this.code = code;
        this.btnAccess = btnAccess;
    }
    @Override
    public String getAuthority() {
        return name;
    }
    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 getBtnAccess() {
        return btnAccess;
    }
    public void setBtnAccess(String btnAccess) {
        this.btnAccess = btnAccess;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
}
src/main/java/com/gk/firework/Config/Oauth2/OauthUser.java
对比新文件
@@ -0,0 +1,107 @@
package com.gk.firework.Config.Oauth2;
import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import java.util.Collection;
import java.util.List;
/**
 * oauth2.0授权 用户类
 *
 * @author zhangby
 * @date 2019-05-13 16:22
 */
@ApiModel(value = "OauthUser")
public class OauthUser implements UserDetails {
    /**
     * 用户id
     */
    @ApiModelProperty(hidden = true)
    private String id;
    /**
     * 用户名
     */
    @ApiModelProperty(value = "username(登录名)", example = "admin")
    private String username;
    /**
     * 密码
     */
    @ApiModelProperty(value = "password(密码)", example = "123")
    private String password;
    /**
     * 用户角色
     */
    @ApiModelProperty(hidden = true)
    private List<OauthRole> oauthRoles = Lists.newArrayList();
    @Override
    @ApiModelProperty(hidden = true)
    public Collection<? extends GrantedAuthority> getAuthorities() {
        return this.oauthRoles;
    }
    @Override
    @ApiModelProperty(hidden = true)
    public String getPassword() {
        return this.password;
    }
    @Override
    @ApiModelProperty(hidden = true)
    public String getUsername() {
        return this.username;
    }
    @Override
    @ApiModelProperty(hidden = true)
    public boolean isAccountNonExpired() {
        return true;
    }
    @Override
    @ApiModelProperty(hidden = true)
    public boolean isAccountNonLocked() {
        return true;
    }
    @Override
    @ApiModelProperty(hidden = true)
    public boolean isCredentialsNonExpired() {
        return true;
    }
    @Override
    @ApiModelProperty(hidden = true)
    public boolean isEnabled() {
        return true;
    }
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public void setUsername(String username) {
        this.username = username;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public List<OauthRole> getOauthRoles() {
        return oauthRoles;
    }
    public void setOauthRoles(List<OauthRole> oauthRoles) {
        this.oauthRoles = oauthRoles;
    }
}
src/main/java/com/gk/firework/Config/Oauth2/RedisKeyEnum.java
对比新文件
@@ -0,0 +1,56 @@
package com.gk.firework.Config.Oauth2;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.StrUtil;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;
/**
 * Redis key 枚举
 *
 * @author zhangby
 * @date 14/10/19 2:02 pm
 */
public enum RedisKeyEnum {
    /**
     * redis for access_token key
     */
    AUTH_TOKEN("auth:token:{}"),
    /**
     * app user for redis key
     */
    REDIS_KEY_USER_ID("user:id:{}"),
    /**
     * redis for dict key
     */
    REDIS_KEY_DICT_TYPE("dict:type:{}");
    private String key;
    RedisKeyEnum(String key) {
        this.key = key;
    }
    public String getKey() {
        return this.key;
    }
    /**
     * 枚举转list
     *
     * @return
     */
    public static List<Dict> toList() {
        return Stream.of(values())
                .collect(
                        ArrayList::new,
                        (li, item) -> li.add(Dict.create()
                                .set("label", StrUtil.format(item.getKey(), ""))
                                .set("value", StrUtil.format(item.getKey(), ""))
                        ),
                        List::addAll
                );
    }
}
src/main/java/com/gk/firework/Config/Oauth2/ResourceServerConfig.java
对比新文件
@@ -0,0 +1,50 @@
package com.gk.firework.Config.Oauth2;
import com.gk.firework.Domain.Utils.Constants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;
import org.springframework.security.oauth2.config.annotation.web.configurers.ResourceServerSecurityConfigurer;
import org.springframework.security.oauth2.provider.token.TokenStore;
import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter;
import org.springframework.security.web.authentication.www.BasicAuthenticationFilter;
/**
 * resource config
 *
 * @author zhangby
 * @date 2019-05-19 12:08
 */
@Configuration
@EnableResourceServer
public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
    Logger log = LoggerFactory.getLogger(ResourceServerConfig.class);
    //去除部分不需要token的url  FILTER_EXCLUDE_PATH
    @Override
    public void configure(HttpSecurity http) throws Exception {
        http
                .csrf().disable()
                .logout().disable()
                .addFilterBefore(new AccessTokenFilter(), BasicAuthenticationFilter.class)
                .authorizeRequests()
                .antMatchers(Constants.FILTER_EXCLUDE_PATH.split(",")).permitAll()
                .antMatchers("/**").authenticated();
    }
    @Override
    public void configure(ResourceServerSecurityConfigurer resources) throws Exception {
        resources.resourceId("oauth-client").tokenStore(tokenStore);
    }
    @Autowired
    TokenStore tokenStore;
    @Autowired
    JwtAccessTokenConverter tokenConverter;
}
src/main/java/com/gk/firework/Config/Oauth2/SpringContextUtil.java
对比新文件
@@ -0,0 +1,69 @@
package com.gk.firework.Config.Oauth2;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
/**
 * Static injection of spring objects
 *
 * @author zhangby
 * @date 2019-05-15 11:45
 */
@Component
public class SpringContextUtil implements ApplicationContextAware {
    private static ApplicationContext applicationContext;
    /**
     * 设置 setApplicationContext
     * @param applicationContext application
     * @throws BeansException beansException
     */
    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        if (SpringContextUtil.applicationContext == null) {
            SpringContextUtil.applicationContext = applicationContext;
        }
    }
    /**
     * 获取applicationContext
     * @return ApplicationContext
     */
    public static ApplicationContext getApplicationContext() {
        return applicationContext;
    }
    /**
     * 通过name获取 Bean.
     * @param name 名称
     * @return Object
     */
    public static Object getBean(String name) {
        return getApplicationContext().getBean(name);
    }
    /**
     * 通过class获取Bean.
     * @param clazz class
     * @param <T> T
     * @return T
     */
    public static <T> T getBean(Class<T> clazz) {
        return getApplicationContext().getBean(clazz);
    }
    /**
     * 通过name,以及Clazz返回指定的Bean
     * @param name name
     * @param clazz class
     * @param <T> T
     * @return T
     */
    public static <T> T getBean(String name, Class<T> clazz) {
        return getApplicationContext().getBean(name, clazz);
    }
}
src/main/java/com/gk/firework/Config/Oauth2/UserServiceDetail.java
对比新文件
@@ -0,0 +1,56 @@
package com.gk.firework.Config.Oauth2;
import com.gk.firework.Domain.UserInfo;
import com.gk.firework.Domain.Utils.CommonUtil;
import com.gk.firework.Domain.Utils.Constants;
import com.gk.firework.Service.UserService;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Optional;
/**
 * 加载用户特定数据的核心接口(Core interface which loads user-specific data.)
 *
 * @author zhangby
 * @date 2019-05-14 09:49
 */
@Service
public class UserServiceDetail implements UserDetailsService {
    @Autowired
    UserService userService;
    /**
     * 根据用户名查询用户
     */
    @Override
    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
        String authType = System.getProperty(Constants.AUTH_TYPE);
        OauthUser oauthUser = new OauthUser();
        //查询登录用户
        UserInfo userInfo = userService.selectByLoginname(username);
        Optional.of(userInfo).ifPresent(us ->{
            //查询角色
            List<OauthRole> roleByUser = userService.selectRoleByUser(us.getId().intValue());
            //数据类型转换
            List<OauthRole> oauthRoles = CommonUtil
                    .convers(roleByUser, role -> new OauthRole(
                            role.getId(),
                            role.getAuthority(),null,null)
                    );
            //数据结果集封装
            oauthUser.setId(us.getId().toString());
            oauthUser.setPassword(us.getPassword());
            oauthUser.setUsername(us.getUsername());
            oauthUser.setOauthRoles(oauthRoles);
        });
        //判断登录入口
        return oauthUser;
    }
}
src/main/java/com/gk/firework/Config/Oauth2/WebSecurityConfig.java
对比新文件
@@ -0,0 +1,85 @@
package com.gk.firework.Config.Oauth2;
import com.gk.firework.Domain.Utils.Base64Encrypt;
import com.gk.firework.Domain.Utils.StringUtils;
import org.apache.tomcat.util.security.MD5Encoder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.crypto.password.PasswordEncoder;
import javax.servlet.http.HttpServletResponse;
@Configuration
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
    @Autowired
    private UserServiceDetail userServiceDetail;
    @Override
    @Bean
    public AuthenticationManager authenticationManagerBean() throws Exception {
        return super.authenticationManagerBean();
    }
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        //CSRF:因为不再依赖于Cookie,所以你就不需要考虑对CSRF(跨站请求伪造)的防范
        http
                .csrf().disable()
                .exceptionHandling()
                .authenticationEntryPoint((request, response, authException) -> response.sendError(HttpServletResponse.SC_UNAUTHORIZED))
                .and()
                .logout().disable()
//                .addFilter(loginAuthenticationFilter)
                .authorizeRequests()
                .regexMatchers("/actuator.*").permitAll()
                .antMatchers("/**").authenticated()
                .and()
                .httpBasic();
    }
    @Override
    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
        auth
                .userDetailsService(userServiceDetail)
                .passwordEncoder(new PasswordEncoder() {
                    @Override
                    public String encode(CharSequence rawPassword) {
                        return Base64Encrypt.encode(rawPassword.toString().getBytes());
                    }
                    @Override
                    public boolean matches(CharSequence rawPassword, String encodedPassword) {
                        return encodedPassword.equals(Base64Encrypt.encode(rawPassword.toString().getBytes()));
                    }
                });
    }
    /**
     * Configuration password encryption
     * @return
     */
    @Bean
    PasswordEncoder passwordEncoder() {
        return new PasswordEncoder() {
            @Override
            public String encode(CharSequence charSequence) {
                return charSequence.toString();
            }
            @Override
            public boolean matches(CharSequence charSequence, String s) {
                return s.equals(charSequence.toString());
            }
        };
    }
}
src/main/java/com/gk/firework/Config/ServiceContext/ApplicationContextUtil.java
对比新文件
@@ -0,0 +1,32 @@
package com.gk.firework.Config.ServiceContext;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
/**
 * 配置类,解决定时任务无法注入service的问题
 */
@Component
public class ApplicationContextUtil implements ApplicationContextAware {
    private static ApplicationContext applicationContext;
    public static ApplicationContext getApplicationContext() {
        return applicationContext;
    }
    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        ApplicationContextUtil.applicationContext = applicationContext;
    }
    public static Object getBean(String beanName) {
        return applicationContext.getBean(beanName);
    }
}
src/main/java/com/gk/firework/Config/Swagger/SwaggerConfig.java
对比新文件
@@ -0,0 +1,42 @@
package com.gk.firework.Config.Swagger;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.ParameterBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.schema.ModelRef;
import springfox.documentation.service.Contact;
import springfox.documentation.service.Parameter;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import java.util.*;
@Configuration
@EnableSwagger2
public class SwaggerConfig {
    @Bean
    public Docket docket() {
        ParameterBuilder ticketPar = new ParameterBuilder();
        List<Parameter> pars = new ArrayList<Parameter>();
        ticketPar.name("Authorization").description("token")
                .modelRef(new ModelRef("string")).parameterType("header")
                .required(false).build(); //header中的ticket参数非必填,传空也可以
        pars.add(ticketPar.build());
        return new Docket(DocumentationType.SWAGGER_2)
                .select().apis(RequestHandlerSelectors.withClassAnnotation(RestController.class))
                .paths(PathSelectors.any())
                .build().globalOperationParameters(pars).apiInfo(new ApiInfoBuilder()
                        .description("烟花爆竹流向管理系统接口文档").contact(new Contact("李宇", "", "986321569@qq.com"))
                        .version("1.0").title("API文档").license("Apache2.0")
                        .licenseUrl("http://www.apache.org/licnesens/LINCENSE-2.0").build());
    }
}
src/main/java/com/gk/firework/Config/Swagger/WebMvcConfig.java
对比新文件
@@ -0,0 +1,17 @@
package com.gk.firework.Config.Swagger;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("swagger-ui.html")
                .addResourceLocations("classpath:/META-INF/resources/");
        registry.addResourceHandler("/webjars/**")
                .addResourceLocations("classpath:/META-INF/resources/webjars/");
    }
}
src/main/java/com/gk/firework/Config/ThreadExecutor/ExecutorConfig.java
对比新文件
@@ -0,0 +1,80 @@
package com.gk.firework.Config.ThreadExecutor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.AsyncConfigurer;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.lang.reflect.Method;
import java.util.concurrent.Executor;
import java.util.concurrent.ThreadPoolExecutor;
@Configuration
@EnableAsync
public class ExecutorConfig implements AsyncConfigurer {
    private Logger logger = LoggerFactory.getLogger(ExecutorConfig.class);
    /**
     * 最小线程数(核心线程数)
     */
    @Value("${threadPool.corePoolSize}")
    private int corePoolSize;
    /**
     * 最大线程数
     */
    @Value("${threadPool.maxPoolSize}")
    private int maxPoolSize;
    /**
     * 等待队列(队列最大长度)
     */
    @Value("${threadPool.queueCapacity}")
    private int queueCapacity;
    @Bean(name = "SocketTaskExecutor")
    public Executor asyncServiceExecutor() {
        logger.info("start asyncServiceExecutor");
        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
        //配置核心线程数
        executor.setCorePoolSize(corePoolSize);
        //配置最大线程数
        executor.setMaxPoolSize(maxPoolSize);
        //配置队列大小
        executor.setQueueCapacity(queueCapacity);
        //配置线程池中的线程的名称前缀
        executor.setThreadNamePrefix("async-service-");
        // rejection-policy:当pool已经达到max size的时候,如何处理新任务
        // CALLER_RUNS:不在新线程中执行任务,而是有调用者所在的线程来执行
        executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
        //执行初始化
        executor.initialize();
        return executor;
    }
    /**
     * 异步异常处理
     *
     * @return
     */
    @Override
    public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
        return new SpringAsyncExceptionHandler();
    }
    class SpringAsyncExceptionHandler implements AsyncUncaughtExceptionHandler {
        @Override
        public void handleUncaughtException(Throwable throwable, Method method, Object... obj) {
            logger.error("Exception occurs in async method", throwable.getMessage());
        }
    }
}
src/main/java/com/gk/firework/Config/Upload/UploadConfig.java
对比新文件
@@ -0,0 +1,21 @@
package com.gk.firework.Config.Upload;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.web.servlet.MultipartAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
@EnableAutoConfiguration(exclude = {MultipartAutoConfiguration.class})
public class UploadConfig {
    @Bean(name = "multipartResolver")
    public MultipartResolver multipartResolver() {
        CommonsMultipartResolver resolver = new CommonsMultipartResolver();
        resolver.setDefaultEncoding("UTF-8");
        resolver.setResolveLazily(true);
        resolver.setMaxInMemorySize(40960);
        //上传文件大小
        resolver.setMaxUploadSize(100 * 1024 * 1024);
        return resolver;
    }
}
src/main/java/com/gk/firework/Config/WebSocket/WebSocketConfig.java
对比新文件
@@ -0,0 +1,14 @@
package com.gk.firework.Config.WebSocket;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
@Configuration
public class WebSocketConfig {
    @Bean
    public ServerEndpointExporter serverEndpointExporter(){
        return new ServerEndpointExporter();
    }
}
src/main/java/com/gk/firework/Config/WebSocket/WebSocketServer.java
对比新文件
@@ -0,0 +1,123 @@
package com.gk.firework.Config.WebSocket;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.websocket.*;
import javax.websocket.server.PathParam;
import javax.websocket.server.ServerEndpoint;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.atomic.AtomicInteger;
@Component("websocket")
@ServerEndpoint("/push/{uid}")
@Slf4j
public class WebSocketServer {
    @PostConstruct
    public void init() {
        System.out.println("websocket 加载");
    }
    //静态变量,用来记录当前在线连接数。应该把它设计成线程安全的。
    private static final AtomicInteger onlineCount = new AtomicInteger(0);
    //concurrent包的线程安全Set,用来存放每个客户端对应的MyWebSocket对象。
    private static Map<Long,WebSocketServer> webSocketMap = new ConcurrentHashMap<>();
    //与某个客户端的连接会话,需要通过它来给客户端发送数据
    private Session session;
    private Long uid;
    /**
     * 连接建立成功调用的方法
     */
    @OnOpen
    public void onOpen(Session session,@PathParam("uid") Long uid) {
        this.session = session;
        this.uid = uid;
        if(webSocketMap.containsKey(uid)){
            webSocketMap.remove(uid);
            webSocketMap.put(uid,this);
        }else{
            webSocketMap.put(uid,this);
            onlineCount.incrementAndGet();
        }
        log.info("有新窗口开始监听:当前在线人数为" + onlineCount);
    }
    /**
     * 连接关闭调用的方法
     */
    @OnClose
    public void onClose() {
        if (webSocketMap.containsKey(uid)) {
            webSocketMap.remove(uid);
            onlineCount.decrementAndGet();
        }
        log.info("有一连接关闭!当前在线人数为" + onlineCount);
    }
    /**
     * 收到客户端消息后调用的方法
     * @param message 客户端发送过来的消息
     */
    @OnMessage
    public void onMessage(String message) throws IOException {
        log.info("来自客户端的消息:{}",message);
        sendMessage("收到消息,消息内容:"+message);
    }
    @OnError
    public void onError(Session session, Throwable error) {
        log.error("发生错误:{},Session ID: {}",error.getMessage(),session.getId());
    }
    public void sendMessage(String message) throws IOException {
        synchronized(session) {
            this.session.getBasicRemote().sendText(message);
        }
    }
    /**
     * @param uid
     * @param message
     */
    public static void sendMessage(@PathParam("uid") Long uid, String message) {
        try {
            if (webSocketMap.containsKey(uid))  webSocketMap.get(uid).sendMessage(message);
        } catch (IOException e) {
            log.error("发送消息出错:{}", e.getMessage());
            e.printStackTrace();
        }
    }
    /**
     * 群发消息
     * @param message
     * @throws IOException
     */
    public static void broadcast(String message) throws IOException {
    }
    public Session getSession() {
        return session;
    }
    public void setSession(Session session) {
        this.session = session;
    }
}
src/main/java/com/gk/firework/Controller/AppFileController.java
对比新文件
@@ -0,0 +1,211 @@
package com.gk.firework.Controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.*;
import com.gk.firework.Domain.Utils.*;
import com.gk.firework.Domain.Vo.*;
import com.gk.firework.Service.AppFileService;
import com.gk.firework.Service.HelpDocService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@Api(tags = "APP版本信息接口")
@RestController
public class AppFileController extends BaseController {
    @Value("${appPath}")
    private String appPath;
    @Value("${appUrl}")
    private String appUrl;
    @Autowired
    AppFileService appFileService;
    @Autowired
    HelpDocService helpDocService;
    @GetMapping("/appFile")
    @ApiOperation(value = "获取App文件数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "sort",value = "排序规则"),
            @ApiImplicitParam(name = "order",value = "排序字段"),
            @ApiImplicitParam(name = "filetype",value = "文件类型"),
    })
    public Msg getAppFileInfo(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize, String sort, String order,
                            String filetype){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(filetype)){
            condition.put("filetype",filetype.trim());
        }
        pageInfo.setCondition(condition);
        appFileService.selectDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @GetMapping("/newAppFile")
    @ApiOperation(value = "获取最新App文件数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "filetype",value = "文件类型"),
    })
    public Msg getNewAppFile(String filetype){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        AppFileInfo appFileInfo = appFileService.selectNew(filetype);
        if (appFileInfo != null){
            msg.setResult(appFileInfo);
            return msg;
        }else {
            msg.setCode("999");
            msg.setMessage("未找到文件");
            return msg;
        }
    }
    @ApiOperation(value = "添加文件",response = Msg.class)
    @PostMapping("/addAppFile")
    public Msg addAppFile(AppFileVo appFileVo) throws Exception {
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        AppFileInfo appFileInfo = BeanUtils.copy(appFileVo, AppFileInfo.class);
        if (appFileVo.getFile() != null){
            String filePath = UploadUtil.uploadFile(appFileVo.getFile(),appPath);
            appFileInfo.setFileurl(appUrl+filePath);
        }
        appFileInfo.setCreated(new Date());
        appFileInfo.setUpdated(new Date());
        appFileService.save(appFileInfo);
        return msg;
    }
    @ApiOperation(value = "修改文件",response = Msg.class)
    @PostMapping("/editAppFile")
    public Msg editAppFile(AppFileVo appFileVo) throws Exception {
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        AppFileInfo appFileInfo = BeanUtils.copy(appFileVo, AppFileInfo.class);
        if (appFileVo.getFile() != null){
            String filePath = UploadUtil.uploadFile(appFileVo.getFile(),appPath);
            appFileInfo.setFileurl(appUrl+filePath);
        }
        appFileInfo.setUpdated(new Date());
        appFileService.updateById(appFileInfo);
        return msg;
    }
    @ApiOperation(value = "删除文件",response = Msg.class)
    @PostMapping("/delAppFile")
    public Msg delAppFile(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        Long id = jsonObject.getLong("id");
        AppFileInfo appFileInfo = appFileService.getById(id);
        if (appFileInfo != null){
            appFileService.removeById(appFileInfo);
        }else {
            msg.setCode("999");
            msg.setMessage("未找到记录");
        }
        return msg;
    }
    @GetMapping("/helpDoc")
    @ApiOperation(value = "获取帮助文档数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "sort",value = "排序规则"),
            @ApiImplicitParam(name = "order",value = "排序字段"),
            @ApiImplicitParam(name = "name",value = "文件名称"),
    })
    public Msg getHelpDocInfo(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize, String sort, String order,
                              String name){
        Msg msg = new Msg(true);
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        HashMap<String, Object> condition = new HashMap<>(4);
        if (StringUtils.isNotBlank(name)){
            condition.put("name",name.trim());
        }
        pageInfo.setCondition(condition);
        helpDocService.selectDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @ApiOperation(value = "添加帮助文档",response = Msg.class)
    @PostMapping("/addHelpDoc")
    public Msg addHelpDoc(HelpDocVo helpDocVo) throws Exception {
        Msg msg = new Msg(true);
        HelpDocInfo helpDocInfo = BeanUtils.copy(helpDocVo, HelpDocInfo.class);
        if (helpDocVo.getFile() != null){
            String filePath = UploadUtil.uploadFile(helpDocVo.getFile(),appPath);
            helpDocInfo.setFileurl(appUrl+filePath);
        }
        helpDocInfo.setCreated(new Date());
        helpDocInfo.setUpdated(new Date());
        helpDocService.save(helpDocInfo);
        return msg;
    }
    @ApiOperation(value = "修改帮助文档",response = Msg.class)
    @PostMapping("/editHelpDoc")
    public Msg editHelpDoc(HelpDocVo helpDocVo) throws Exception {
        Msg msg = new Msg(true);
        HelpDocInfo helpDocInfo = BeanUtils.copy(helpDocVo, HelpDocInfo.class);
        if (helpDocVo.getFile() != null){
            String filePath = UploadUtil.uploadFile(helpDocVo.getFile(),appPath);
            helpDocInfo.setFileurl(appUrl+filePath);
        }
        helpDocInfo.setUpdated(new Date());
        helpDocService.updateById(helpDocInfo);
        return msg;
    }
    @ApiOperation(value = "删除帮助文档(假删)",response = Msg.class)
    @PostMapping("/delHelpDoc")
    public Msg delHelpDoc(@RequestBody JSONObject jsonObject) {
        Msg msg = new Msg(true);
        Long id = jsonObject.getLong("id");
        HelpDocInfo helpDocInfo = helpDocService.getById(id);
        if (helpDocInfo != null) {
            helpDocInfo.setIsdel((byte) 1);
            helpDocService.updateById(helpDocInfo);
        } else {
            msg.setCode("999");
            msg.setMessage("未找到记录");
        }
        return msg;
    }
}
src/main/java/com/gk/firework/Controller/AssessApplyController.java
对比新文件
@@ -0,0 +1,185 @@
package com.gk.firework.Controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.AccessAssessApply;
import com.gk.firework.Domain.AssessApply;
import com.gk.firework.Domain.Utils.FilterObject;
import com.gk.firework.Service.AccessAssessApplyService;
import com.gk.firework.Service.AssessApplyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@Api(tags = "销售,准入评定")
@RequestMapping("/assess")
@RestController
public class AssessApplyController extends BaseController {
    @Autowired
    AssessApplyService assessApplyService;
    @Autowired
    AccessAssessApplyService accessAssessApplyService;
    @PostMapping("/addApply-sale")
    @ApiOperation(value = "新增评定申请", httpMethod = "POST")
    public Object addSaleAssessApply(AssessApply assessApply) {
        assessApplyService.addSaleAssessApply(assessApply, getUser());
        return success();
    }
    @PostMapping("/modApply-sale")
    @ApiOperation(value = "修改评定申请", httpMethod = "POST")
    public Object modSaleAssessApply(AssessApply assessApply) {
        assessApplyService.modSaleAssessApply(assessApply, getUser());
        return success();
    }
    @PostMapping("/submitApply-sale")
    @ApiOperation(value = "提交申请",httpMethod = "POST")
    public Object submitSaleAssessApply(@RequestParam Long id) {
        assessApplyService.submitSaleAssessApply(id, getUser());
        return success();
    }
    @PostMapping("/approveApply-sale")
    @ApiOperation(value = "审批通过", httpMethod = "POST")
    public Object approveSaleAssessApply(@RequestBody JSONObject entity) {
        assessApplyService.approveSaleAssessApply(entity,getUser());
        return success();
    }
    @PostMapping("/rejectApply-sale")
    @ApiOperation(value = "审批驳回", httpMethod = "POST")
    public Object rejectSaleAssessApply(@RequestBody JSONObject entity) {
        assessApplyService.rejectSaleAssessApply(entity,getUser());
        return success();
    }
    @PostMapping("/applyList-sale")
    @ApiOperation(value = "分页查询", httpMethod = "POST")
    public Object saleApplyList(@RequestBody FilterObject filterAssess) {
        Integer pageIndex = filterAssess.getPageIndex();
        Integer pageSize = filterAssess.getPageSize();
        IPage page = assessApplyService.selectSalePages(new Page<>(pageIndex, pageSize), filterAssess.getFilter(), getUser());
        return success(page);
    }
    @PostMapping("/addApply-access")
    @ApiOperation(value = "新增准入申请", httpMethod = "POST")
    public Object addAccessAssessApply(AssessApply assessApply) {
        assessApplyService.addAccessAssessApply(assessApply, getUser());
        return success();
    }
    @PostMapping("/modApply-access")
    @ApiOperation(value = "修改准入申请", httpMethod = "POST")
    public Object modAccessAssessApply(AssessApply assessApply) {
        assessApplyService.modAccessAssessApply(assessApply, getUser());
        return success();
    }
    @PostMapping("/submitApply-access")
    @ApiOperation(value = "提交准入申请",httpMethod = "POST")
    public Object submitAccessAssessApply(@RequestParam Long id) {
        assessApplyService.submitAccessAssessApply(id, getUser());
        return success();
    }
    @PostMapping("/approveApply-access")
    @ApiOperation(value = "审批通过",httpMethod = "POST")
    public Object approveAccessAssessApply(@RequestBody JSONObject entity) {
        accessAssessApplyService.approveAccessAssessApply(entity, getUser());
        return success();
    }
    @PostMapping("/rejectApply-access")
    @ApiOperation(value = "拒绝通过",httpMethod = "POST")
    public Object rejectAccessAssessApply(@RequestBody JSONObject entity) {
        accessAssessApplyService.rejectAccessAssessApply(entity, getUser());
        return success();
    }
    /**
    * @Description: 准入评定申请分页(协会)
    * @date 2021/7/7 16:07
    */
    @PostMapping("/applyList-access")
    @ApiOperation(value = "准入评定申请分页", httpMethod = "POST")
    public Object accessApplyList(@RequestBody FilterObject filterAssess) {
        Integer pageIndex = filterAssess.getPageIndex();
        Integer pageSize = filterAssess.getPageSize();
        IPage page = accessAssessApplyService.selectAccessPages(new Page<>(pageIndex, pageSize), filterAssess.getFilter(), getUser());
        return success(page);
    }
    /**
     * @Description: 准入评定申诉分页(被处罚企业)
     * @date 2021/7/7 16:07
     */
    @PostMapping("/applyList-access-appeal")
    @ApiOperation(value = "准入评定申诉分页", httpMethod = "POST")
    public Object accessApplyAppealList(@RequestBody FilterObject filterAssess) {
        Integer pageIndex = filterAssess.getPageIndex();
        Integer pageSize = filterAssess.getPageSize();
        IPage page = accessAssessApplyService.selectAccessAppealPages(new Page<>(pageIndex, pageSize), filterAssess.getFilter(), getUser());
        return success(page);
    }
    /**
     * @Description: 企业申诉(将被处罚企业) 14天内可以申诉
     * @date 2021/7/7 16:07
     */
    @PostMapping("/appealApply-access")
    @ApiOperation(value = "企业准入评定申诉", httpMethod = "POST")
    public Object appealAccessApply(AccessAssessApply accessAccessApply) {
        accessAssessApplyService.AccessAppeal(accessAccessApply,getUser());
        return success();
    }
    /**
     * @Description: 申诉通过
     * @date 2021/7/7 16:07
     */
    @PostMapping("/appealPass-access")
    @ApiOperation(value = "申诉通过", httpMethod = "POST")
    public Object appealAccessPass(@RequestParam Long id) {
        accessAssessApplyService.appealAccessPass(id,getUser());
        return success();
    }
    /**
     * @Description: 申诉拒绝(可以包含拒绝理由)
     * @date 2021/7/7 16:07
     */
    @PostMapping("/appealReject-access")
    @ApiOperation(value = "申诉拒绝", httpMethod = "POST")
    public Object appealAccessReject(@RequestBody JSONObject entity) {
        accessAssessApplyService.appealAccessReject(entity,getUser());
        return success();
    }
}
src/main/java/com/gk/firework/Controller/AuthorizationController.java
对比新文件
@@ -0,0 +1,145 @@
package com.gk.firework.Controller;
import com.alibaba.fastjson.JSONObject;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.AuthorizationInfo;
import com.gk.firework.Domain.Enterprise;
import com.gk.firework.Domain.Enum.ErrorCode;
import com.gk.firework.Domain.UserInfo;
import com.gk.firework.Domain.Utils.Msg;
import com.gk.firework.Domain.Utils.StringUtils;
import com.gk.firework.Service.AuthorizationService;
import com.gk.firework.Service.EnterpriseService;
import com.gk.firework.Service.UserService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.List;
/**
 * @author : jingjy
 * @date : 2021/7/2 14:31
 */
@Api("授权码")
@RequestMapping("auth")
@RestController
public class AuthorizationController extends BaseController {
    @Autowired
    private AuthorizationService authorizationService;
    @Autowired
    private EnterpriseService enterpriseService;
    @Autowired
    private UserService userService;
    @GetMapping("/list")
    public Msg getAuthListByEnterpriseId(@RequestParam("userId") String userId) {
        if (StringUtils.isBlank(userId)) {
            return new Msg(ErrorCode.ERROR_10001);
        }
        UserInfo userInfo = userService.getById(userId);
        if (userInfo == null) {
            return new Msg(ErrorCode.ERROR_50001);
        }
        List<AuthorizationInfo> authorizationInfo = authorizationService.getAuthByEnterprise(userInfo.getCompanynumber());
        return success(authorizationInfo);
    }
    @PostMapping("/create")
    public Msg createAuth(@RequestBody JSONObject jsonObject) {
        String userId = jsonObject.getString("userId");
        String contractCode = jsonObject.getString("contractCode");
        Byte flag = jsonObject.getByte("flag");
        if (StringUtils.isBlank(userId)) {
            return new Msg(ErrorCode.ERROR_10001);
        }
        UserInfo userInfo = userService.getById(userId);
        if (userInfo == null) {
            return new Msg(ErrorCode.ERROR_50001);
        }
        if (StringUtils.isBlank(contractCode)) {
            return new Msg(ErrorCode.ERROR_10002, "合同编号不能为空");
        }
        AuthorizationInfo authorizationInfo = new AuthorizationInfo();
        List<AuthorizationInfo> authorizationExist = authorizationService.getAuthByEnterprise(userInfo.getCompanynumber());
        String prefix;
        if (authorizationExist.size() > 0) {
            //企业已经生成过授权码,则使用第一次生成的前缀
            prefix = authorizationExist.get(0).getAuthcodeprefix();
        } else {
            //未生成则随机生成,不能重复
            String str;
            str = randomLetter(3);
            boolean isPrefixExist;
            isPrefixExist = authorizationService.checkPrefixExist(str);
            while (isPrefixExist) {
                str = randomLetter(3);
                isPrefixExist = authorizationService.checkPrefixExist(str);
            }
            prefix = str;
        }
        String suffix;
            suffix = randomLetter(3);
        boolean isAuthCodeExist;
        isAuthCodeExist = authorizationService.checkCodeExist(prefix + suffix);
        while (isAuthCodeExist) {
            suffix = randomLetter(3);
            isAuthCodeExist = authorizationService.checkCodeExist(prefix + suffix);
        }
        authorizationInfo.setAuthcode(prefix+suffix);
        authorizationInfo.setAuthcodeprefix(prefix);
        authorizationInfo.setFlag(flag);
        authorizationInfo.setEnterprisenumber(userInfo.getCompanynumber());
        authorizationInfo.setContractcode(contractCode);
        authorizationInfo.setCreatedat(new Date());
        authorizationInfo.setCreatedby(userService.getById(getUser().getId()).getUsername());
        authorizationInfo.setStatus((byte)1);
        authorizationService.save(authorizationInfo);
        return success();
    }
    @PostMapping("status")
    public Msg changeStatus(@RequestBody JSONObject jsonObject){
        String id = jsonObject.getString("id");
        String status = jsonObject.getString("status");
        if (!"0".equals(status) && !"1".equals(status)){
            return new Msg(ErrorCode.ERROR_10004);
        }
        if (StringUtils.isBlank(id)){
            return new Msg(ErrorCode.ERROR_10002);
        }
        AuthorizationInfo authorizationInfo = authorizationService.getById(id);
        if (authorizationInfo == null){
            return new Msg(ErrorCode.ERROR_50001);
        }
        authorizationInfo.setStatus(Byte.parseByte(status));
        authorizationService.updateById(authorizationInfo);
        return success();
    }
    @PostMapping("delete")
    public Msg deleteAuth(@RequestBody JSONObject jsonObject){
        String id = jsonObject.getString("id");
        if (StringUtils.isBlank(id)){
            return new Msg(ErrorCode.ERROR_10002);
        }
        AuthorizationInfo authorizationInfo = authorizationService.getById(id);
        if (authorizationInfo == null){
            return new Msg(ErrorCode.ERROR_50001);
        }
        authorizationService.removeById(id);
        return success();
    }
    /**
     * @param n 随机字符串长度
     * @return 生成的随机字符串
     */
    private String randomLetter(int n) {
        StringBuilder str = new StringBuilder();
        for (int i = 0; i < n; i++) {
            str.append((char) (Math.random() * 26 + 'A'));
        }
        return str.toString();
    }
}
src/main/java/com/gk/firework/Controller/Base/BaseController.java
对比新文件
@@ -0,0 +1,137 @@
package com.gk.firework.Controller.Base;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.gk.firework.Config.Oauth2.IRedisService;
import com.gk.firework.Config.Oauth2.RedisKeyEnum;
import com.gk.firework.Domain.UserInfo;
import com.gk.firework.Domain.Utils.CommonUtil;
import com.gk.firework.Domain.Utils.Msg;
import com.google.common.net.HttpHeaders;
import io.jsonwebtoken.Claims;
import org.apache.log4j.Logger;
import org.springframework.web.bind.annotation.ModelAttribute;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.io.PrintWriter;
public class BaseController {
    protected static final Logger logger = Logger.getLogger(BaseController.class);
    protected HttpServletRequest request;
    protected HttpServletResponse response;
    protected HttpSession session;
    @Resource
    IRedisService redisService;
    @ModelAttribute
    public void setReqAndResp(HttpServletRequest request, HttpServletResponse response){
        this.request = request;
        this.response = response;
        this.session = request.getSession();
    }
    /**
     * 输出信息到页面
     * @param msg:要输出的信息(可以是js脚本等)
     */
    public void printOutMsg(String msg){
        try {
            this.response.setCharacterEncoding("UTF-8");
            this.response.setContentType("text/html;charset=utf-8");
            PrintWriter out = null;
            out = this.response.getWriter();
            out.print(msg);
            out.flush();
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    /**
     * 获取请求完整路径
     * @param request
     * @return
     */
    public String getUrl(HttpServletRequest request){
        String url = request.getRequestURI();
        String params = "";
        if(request.getQueryString()!=null){
            params = request.getQueryString().toString();
        }
        if(!"".equals(params)){
            url = url+"?"+params;
        }
        return url;
    }
    /**
    * @Description: 获取用户
    * @param
    * @date 2021/3/23 14:36
    */
    public UserInfo getUser() {
        String token = this.request.getHeader(HttpHeaders.AUTHORIZATION);
        //解析token
        Claims claims = CommonUtil.parseJWT(token);
        if (null != claims){
            String tokenKey = StrUtil.format(RedisKeyEnum.AUTH_TOKEN.getKey(), claims.getId());
            Object o = redisService.get(tokenKey);
            if (o == null) {
                return null;
            }else{
                JSONObject jo = JSONObject.parseObject(o.toString());
                UserInfo user = new UserInfo();
                user.setId(jo.getLong("id"));;
                user.setUsername(jo.getString("username"));
                user.setCompanyid(jo.getLong("companyid"));
                user.setType(jo.getInteger("type"));
                return user;
            }
        }else{
            return null;
        }
    }
    public String getAuth(){
        String token = this.request.getHeader(HttpHeaders.AUTHORIZATION);
        Claims claims = CommonUtil.parseJWT(token);
        if (null != claims){
            String tokenKey = StrUtil.format(RedisKeyEnum.AUTH_TOKEN.getKey(), claims.getId());
            Object o = redisService.get(tokenKey);
            if (o == null) {
                return null;
            }else{
                JSONObject object = JSONObject.parseObject(o.toString());
                return object.getString("auth");
            }
        }else{
            return null;
        }
    }
    public Msg success() {
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        return msg;
    }
    public Msg success(Object object) {
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        msg.setResult(object);
        return msg;
    }
}
src/main/java/com/gk/firework/Controller/BlackListController.java
对比新文件
@@ -0,0 +1,44 @@
package com.gk.firework.Controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.BlackList;
import com.gk.firework.Domain.Utils.FilterObject;
import com.gk.firework.Service.BlackListService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@Api(tags = "黑名单")
@RequestMapping("/blackList")
@RestController
public class BlackListController extends BaseController {
    @Autowired
    private BlackListService blackListService;
    @PostMapping("/add")
    public Object addBlackList(@RequestBody BlackList blackList){
        blackListService.addBlackList(blackList, getUser());
        return success();
    }
    @PostMapping("/del")
    public Object delBlackList(@RequestParam Long id){
        blackListService.delBlackList(id, getUser());
        return success();
    }
    @PostMapping("/list")
    public Object list(@RequestBody FilterObject filterObj){
        Integer pageIndex = filterObj.getPageIndex();
        Integer pageSize = filterObj.getPageSize();
        IPage page = blackListService.selectPages(new Page<>(pageIndex, pageSize), filterObj.getFilter(), getUser());
        return success(page);
    }
}
src/main/java/com/gk/firework/Controller/ContractController.java
对比新文件
@@ -0,0 +1,1209 @@
package com.gk.firework.Controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.*;
import com.gk.firework.Domain.Enum.ErrorCode;
import com.gk.firework.Domain.Utils.*;
import com.gk.firework.Domain.Vo.*;
import com.gk.firework.Service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import static com.gk.firework.Domain.Enum.ErrorCode.*;
@Api(tags = "在线交易合同接口")
@RequestMapping("/contract")
@RestController
public class ContractController extends BaseController {
    @Value("${contractPath}")
    private String contractPath; //配置文件配置的物理保存地址
    @Autowired
    ContractOrderService contractOrderService;
    @Autowired
    ContractDetailService contractDetailService;
    @Autowired
    ContractLogService contractLogService;
    @Autowired
    ContractUnitDetailService contractUnitDetailService;
    @Autowired
    ProductService productService;
    @Autowired
    UserService userService;
    @Autowired
    ProductCodeService productCodeService;
    @Autowired
    ProductLocusService productLocusService;
    @Autowired
    ControlPrintParamService controlPrintParamService;
    @GetMapping("/getApply")
    @ApiOperation(value = "获取合同申请数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "sort",value = "排序规则"),
            @ApiImplicitParam(name = "order",value = "排序字段"),
//            @ApiImplicitParam(name = "operator",value = "购买企业"),
            @ApiImplicitParam(name = "supplyunitname",value = "生产企业"),
            @ApiImplicitParam(name = "status",value = "合同状态"),
            @ApiImplicitParam(name = "ordercode",value = "合同单号"),
//            @ApiImplicitParam(name = "province",value = "省份"),
//            @ApiImplicitParam(name = "city",value = "城市"),
//            @ApiImplicitParam(name = "area",value = "区县"),
//            @ApiImplicitParam(name = "town",value = "乡镇"),
//            @ApiImplicitParam(name = "community",value = "社区"),
    })
    public Msg getApplyInfo(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize, String sort, String order,
                                    String supplyunitname, String status, String ordercode){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(supplyunitname)) {
            condition.put("supplyunitname", supplyunitname.trim());
        }
        if (StringUtils.isNotBlank(status)) {
            condition.put("status", status.trim());
        }
        if (StringUtils.isNotBlank(ordercode)){
            condition.put("ordercode",ordercode.trim());
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        if (userInfo.getCompanyid() != null){
            condition.put("purchaseenterprisenumber", userInfo.getCompanynumber());
        }else if (userInfo.getType() == 3){
            condition.put("province",userInfo.getProvince());
            condition.put("city",userInfo.getCity());
            condition.put("area",userInfo.getArea());
            condition.put("town",userInfo.getTown());
            condition.put("community",userInfo.getCommunity());
        }
//        if (StringUtils.isNotBlank(province) && condition.get("province") == null){
//            condition.put("province",province.trim());
//
//        if (StringUtils.isNotBlank(city)){
//            condition.put("city",city.trim());
//        }
//
//        if (StringUtils.isNotBlank(area)){
//            condition.put("area",area.trim());
//        }
//
//        if (StringUtils.isNotBlank(town)){
//            condition.put("town",town.trim());
//        }
//
//        if (StringUtils.isNotBlank(community)){
//            condition.put("community",community.trim());
//        }
//        }
        pageInfo.setCondition(condition);
        contractOrderService.selectDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @GetMapping("/getConfirm")
    @ApiOperation(value = "获取合同确认数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "sort",value = "排序规则"),
            @ApiImplicitParam(name = "order",value = "排序字段"),
            @ApiImplicitParam(name = "operator",value = "购买企业"),
//            @ApiImplicitParam(name = "manufacturer",value = "生产企业"),
            @ApiImplicitParam(name = "status",value = "合同状态"),
            @ApiImplicitParam(name = "ordercode",value = "合同单号"),
    })
    public Msg getConfirm(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize, String sort, String order,
                                    String operator, String status, String ordercode){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(operator)) {
            condition.put("operator", operator.trim());
        }
        if (StringUtils.isNotBlank(status)) {
            condition.put("status", status.trim());
        }
        if (StringUtils.isNotBlank(ordercode)){
            condition.put("ordercode",ordercode.trim());
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        if (userInfo.getCompanyid() != null){
            condition.put("supplyenterprisenumber", userInfo.getCompanynumber());
        }else if (userInfo.getType() == 3){
            condition.put("province",userInfo.getProvince());
            condition.put("city",userInfo.getCity());
            condition.put("area",userInfo.getArea());
            condition.put("town",userInfo.getTown());
            condition.put("community",userInfo.getCommunity());
        }
//        if (StringUtils.isNotBlank(province) && condition.get("province") == null){
//            condition.put("province",province.trim());
//
//        if (StringUtils.isNotBlank(city)){
//            condition.put("city",city.trim());
//        }
//
//        if (StringUtils.isNotBlank(area)){
//            condition.put("area",area.trim());
//        }
//
//        if (StringUtils.isNotBlank(town)){
//            condition.put("town",town.trim());
//        }
//
//        if (StringUtils.isNotBlank(community)){
//            condition.put("community",community.trim());
//        }
//        }
        condition.put("confirm",(byte)1);
        pageInfo.setCondition(condition);
        contractOrderService.selectDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @ApiOperation(value = "添加合同", response = Msg.class)
    @PostMapping("/addApply")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "purchaseunitname",value = "单位名称",required = true),
            @ApiImplicitParam(name = "purchaseunitaddress",value = "单位地址",required = true),
            @ApiImplicitParam(name = "purchaserepresentative",value = "法定代表人",required = true),
            @ApiImplicitParam(name = "purchaserepresentativephone",value = "法定代表人联系电话",required = true),
            @ApiImplicitParam(name = "purchaserepresentativeemail",value = "法定代表人电子邮箱",required = true),
            @ApiImplicitParam(name = "purchasebank",value = "开户银行",required = true),
            @ApiImplicitParam(name = "purchaselicensenumber",value = "许可证编号",required = true),
            @ApiImplicitParam(name = "purchasezipcode",value = "邮政编码",required = true),
            @ApiImplicitParam(name = "purchaseagent",value = "委托代理人",required = true),
            @ApiImplicitParam(name = "purchaseagentphone",value = "委托代理人联系电话",required = true),
            @ApiImplicitParam(name = "purchaseagentemail",value = "委托代理人电子邮箱",required = true),
            @ApiImplicitParam(name = "purchaseaccount",value = "账户",required = true),
            @ApiImplicitParam(name = "purchaseenterprisenumber",value = "企业编号",required = true),
            @ApiImplicitParam(name = "supplyunitname",value = "单位名称",required = true),
            @ApiImplicitParam(name = "supplyunitaddress",value = "单位地址",required = true),
            @ApiImplicitParam(name = "supplyrepresentative",value = "法定代表人",required = true),
            @ApiImplicitParam(name = "supplyrepresentativephone",value = "法定代表人联系电话",required = true),
            @ApiImplicitParam(name = "supplyrepresentativeemail",value = "法定代表人电子邮箱",required = true),
            @ApiImplicitParam(name = "supplybank",value = "开户银行",required = true),
            @ApiImplicitParam(name = "supplylicensenumber",value = "许可证编号",required = true),
            @ApiImplicitParam(name = "supplyzipcode",value = "邮政编码",required = true),
            @ApiImplicitParam(name = "supplyagent",value = "委托代理人",required = true),
            @ApiImplicitParam(name = "supplyagentphone",value = "委托代理人联系电话",required = true),
            @ApiImplicitParam(name = "supplyagentemail",value = "委托代理人电子邮箱",required = true),
            @ApiImplicitParam(name = "supplyaccount",value = "账户",required = true),
            @ApiImplicitParam(name = "supplyenterprisenumber",value = "企业编号",required = true),
            @ApiImplicitParam(name = "signtime",value = "签订时间",required = true),
            @ApiImplicitParam(name = "signlocation",value = "签订地点",required = true),
            @ApiImplicitParam(name = "qualitystandard",value = "产品质量标准及要求",required = true),
            @ApiImplicitParam(name = "prohibiteddrug",value = "禁(限)用药物要求",required = true),
            @ApiImplicitParam(name = "packingstandard",value = "产品包装标准及要求   ",required = true),
            @ApiImplicitParam(name = "timeandlocation",value = "提(交)货时间和地点",required = true),
            @ApiImplicitParam(name = "transportandcost",value = "运输方式及费用负担",required = true),
            @ApiImplicitParam(name = "acceptstandard",value = "验收标准与方法",required = true),
            @ApiImplicitParam(name = "objectdeadline",value = "提出异议期限",required = true),
            @ApiImplicitParam(name = "settlemethod",value = "结算方式与期限",required = true),
            @ApiImplicitParam(name = "productsafetyandquality",value = "产品安全与质量责任",required = true),
            @ApiImplicitParam(name = "transportsafety",value = "运输安全责任",required = true),
            @ApiImplicitParam(name = "breakcontract",value = "违约责任",required = true),
            @ApiImplicitParam(name = "contractdisputesfelid",value = "合同争议的解决方式:序号",required = true),
            @ApiImplicitParam(name = "contractdisputesfelidcontent",value = "合同争议的解决方式:序号内容",required = true),
            @ApiImplicitParam(name = "otheragreedmatters",value = "其他约定事项",required = true),
            @ApiImplicitParam(name = "validstarttime",value = "合同有效开始时间",required = true),
            @ApiImplicitParam(name = "validendtime",value = "合同有效结束时间",required = true),
            @ApiImplicitParam(name = "file",value = "合同附件",required = true),
            @ApiImplicitParam(name = "productList",value = "合同产品列表",required = true),
    }
    )
    public Msg addApply(ContractOrderVo contractOrderVo) throws Exception {
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        contractOrderService.checkAdd(contractOrderVo);
        contractOrderService.addApply(contractOrderVo, getUser());
        return msg;
    }
    @ApiOperation(value = "修改合同",response = Msg.class)
    @PostMapping("/putApply")
    public Msg putApply(ContractOrderVo contractOrderVo) throws Exception {
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        contractOrderService.checkAdd(contractOrderVo);
        contractOrderService.putApply(contractOrderVo, getUser());
        return msg;
    }
    @ApiOperation(value = "删除合同",response = Msg.class)
    @PostMapping("/delApply")
    public Msg putApply(@RequestBody JSONObject jsonObject) throws Exception {
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        String operator = getUser().getUsername();
        Long id = jsonObject.getLong("id");
        ContractOrderInfo contractOrderInfo = contractOrderService.getById(id);
        //
        if (!contractOrderInfo.getStatus().equals(ContractStatus.WAIT_SUBMIT) &&
                !contractOrderInfo.getStatus().equals(ContractStatus.Refuse_Product)){
            msg.setCode("999");
            msg.setMessage("合同状态不为待提交、拒绝生产,无法删除");
            return msg;
        }
        contractOrderInfo.setIsdel((byte)1);
        contractOrderInfo.setModifiedby(operator);
        contractOrderInfo.setModifieddate(new Date());
        contractOrderService.updateById(contractOrderInfo);
        ContractLogInfo contractLogInfo = new ContractLogInfo();
        contractLogInfo.setOptlog("删除合同");
        contractLogInfo.setOperator(operator);
        contractLogInfo.setOrdercode(contractOrderInfo.getOrdercode());
        contractLogInfo.setOperatordate(new Date());
        contractLogService.save(contractLogInfo);
        return msg;
    }
    @ApiOperation(value = "提交合同",response = Msg.class)
    @PostMapping("/submitApply")
    public Msg submitApply(@RequestBody JSONObject jsonObject) throws Exception {
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        String operator = getUser().getUsername();
        Long id = jsonObject.getLong("id");
        ContractOrderInfo contractOrderInfo = contractOrderService.getById(id);
        if (!contractOrderInfo.getStatus().equals(ContractStatus.WAIT_SUBMIT) &&
                !contractOrderInfo.getStatus().equals(ContractStatus.Refuse_Product)){
            msg.setCode("999");
            msg.setMessage("合同状态不为待提交、拒绝生产,无法提交");
            return msg;
        }
        contractOrderInfo.setStatus(ContractStatus.WAIT_CONFIRM);
        contractOrderInfo.setModifiedby(operator);
        contractOrderInfo.setModifieddate(new Date());
        contractOrderInfo.setOpinion("");
        contractOrderService.updateById(contractOrderInfo);
        ContractLogInfo contractLogInfo = new ContractLogInfo();
        contractLogInfo.setOptlog("提交合同");
        contractLogInfo.setOperator(operator);
        contractLogInfo.setOrdercode(contractOrderInfo.getOrdercode());
        contractLogInfo.setOperatordate(new Date());
        contractLogService.save(contractLogInfo);
        return msg;
    }
    @ApiOperation(value = "确认生产", response = Msg.class)
    @PostMapping("/confirmProduct")
    public Msg confirmProduct(@RequestBody ContractOrderVo contractOrderVo) {
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        contractOrderService.checkConfirm(contractOrderVo);
        contractOrderService.confirmProduct(contractOrderVo, getUser());
        return msg;
    }
    @ApiOperation(value = "导出电子标签号",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ordercode",value = "合同单号"),
    })
    @PostMapping("/exportRFID")
    public Msg exportRFID(@RequestBody JSONObject jsonObject) throws Exception {
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        String ordercode = jsonObject.getString("ordercode");
        ContractOrderInfo contractOrderInfo = contractOrderService.selectByOrderCode(ordercode);
        if (!contractOrderInfo.getStatus().equals(ContractStatus.Generated)) {
            msg.setCode("999");
            msg.setMessage("合同状态不为已生成,无法导出");
            return msg;
        }
        List<ProductCodeInfo> productCodeInfos = productCodeService.selectByOrderCode(ordercode);
        List<ProductCodeVo> productCodeVoList = new ArrayList<> ();
        for (ProductCodeInfo productCodeInfo : productCodeInfos){
            ProductCodeVo productCodeVo = BeanUtils.copy(productCodeInfo,ProductCodeVo.class);
            String start = productCodeInfo.getOriginalcode().substring(14,19);
            Integer end = Integer.parseInt(start)+productCodeInfo.getBoxnumber()-1;
            productCodeVo.setBoxrange("("+start+"-"+String.format("%05d", end)+")");
            productCodeVo.setCrc(productCodeInfo.getOrdercode().substring(productCodeInfo.getOrdercode().length()-8));
            productCodeVoList.add(productCodeVo);
        }
        msg.setResult(productCodeVoList);
        return msg;
    }
    @ApiOperation(value = "导出内包装码",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ordercode",value = "合同单号"),
    })
    @PostMapping("/exportBarCode")
    public Msg exportBarCode(@RequestBody JSONObject jsonObject) throws Exception {
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        String ordercode = jsonObject.getString("ordercode");
        ContractOrderInfo contractOrderInfo = contractOrderService.selectByOrderCode(ordercode);
        if (!contractOrderInfo.getStatus().equals(ContractStatus.Generated)) {
            msg.setCode("999");
            msg.setMessage("合同状态不为已生成,无法导出");
            return msg;
        }
        List<ProductCodeVo> productCodeVos = new ArrayList<>();
        List<ProductCodeVo> printCodeVos = new ArrayList<>();
        List<ProductCodeInfo> productCodeInfos = productCodeService.selectByOrderCode(ordercode);
        for (ProductCodeInfo productCodeInfo : productCodeInfos){
            ProductCodeVo productCodeVo = BeanUtils.copy(productCodeInfo,ProductCodeVo.class);
            BigDecimal explosiveContent = new BigDecimal(productCodeVo.getExplosivecontent().replace("kg","").replace("g",""));
            Integer boxNumber = productCodeVo.getBoxnumber();
//            try {
//                productCodeVo.setImg(MatrixToImageWriter.getBase64Img(productCodeInfo.getOriginalcode()));
//            }catch (Exception e){
//                e.printStackTrace();
//            }
            if (productCodeVo.getExplosivecontent().contains("kg")){
                BigDecimal explosive = explosiveContent.multiply(new BigDecimal(1000)).divide(new BigDecimal(boxNumber),0, RoundingMode.HALF_UP);
                productCodeVo.setExplosivecontent(explosive + "g");
            } else {
                BigDecimal explosive = explosiveContent.divide(new BigDecimal(boxNumber),0, RoundingMode.HALF_UP);
                productCodeVo.setExplosivecontent(explosive + "g");
            }
            Map<String,List<ProductCodeVo>> result = FireworkDeal.getProductCodeVoList(productCodeVo);
            productCodeVos.addAll(result.get("productCodeVoList"));
            printCodeVos.addAll(result.get("printCodeVoList"));
        }
        // printCodeVos
        int length = printCodeVos.size();
        int pageSize = 10;
        int quotient  = length / pageSize;
        int remainder = length % pageSize;
        int maxPageIndex = quotient;
        if (remainder > 0) maxPageIndex++;
        List<List<ProductCodeVo>> splitPrintSize = new ArrayList<>();
        for (int pageIndex = 0; pageIndex < maxPageIndex; pageIndex++) {
            if (pageIndex + 1 == maxPageIndex) {
                splitPrintSize.add(printCodeVos.subList(pageIndex * pageSize, length));
                break;
            }
            splitPrintSize.add(printCodeVos.subList(pageIndex * pageSize, (pageIndex + 1) * pageSize));
        }
        HashMap<String, Object> result = new HashMap<>();
//        result.put("exportInfo", productCodeVos);
        result.put("printInfo", splitPrintSize);
        msg.setResult(result);
        return msg;
    }
    @ApiOperation(value = "显示内包装码批次",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ordercode",value = "合同单号"),
    })
    @PostMapping("/batchBarCode")
    public Msg batchBarCode(@RequestBody JSONObject jsonObject) throws Exception {
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        String ordercode = jsonObject.getString("ordercode");
        Integer needBlank = jsonObject.getInteger("needBlank");
        ContractOrderInfo contractOrderInfo = contractOrderService.selectByOrderCode(ordercode);
        if (!contractOrderInfo.getStatus().equals(ContractStatus.Generated)) {
            msg.setCode("999");
            msg.setMessage("合同状态不为已生成,无法打印");
            return msg;
        }
        List<ProductCodeVo> printCodeVos = new ArrayList<>();
        List<ProductCodeInfo> productCodeInfos = productCodeService.selectByOrderCode(ordercode);
        for (ProductCodeInfo productCodeInfo : productCodeInfos){
            ProductCodeVo productCodeVo = BeanUtils.copy(productCodeInfo,ProductCodeVo.class);
            BigDecimal explosiveContent = new BigDecimal(productCodeVo.getExplosivecontent().replace("kg","").replace("g",""));
            Integer boxNumber = productCodeVo.getBoxnumber();
            if (productCodeVo.getExplosivecontent().contains("kg")){
                BigDecimal explosive = explosiveContent.multiply(new BigDecimal(1000)).divide(new BigDecimal(boxNumber),0, RoundingMode.HALF_UP);
                productCodeVo.setExplosivecontent(explosive + "g");
            } else {
                BigDecimal explosive = explosiveContent.divide(new BigDecimal(boxNumber),0, RoundingMode.HALF_UP);
                productCodeVo.setExplosivecontent(explosive + "g");
            }
            printCodeVos.addAll(FireworkDeal.getBatchProductCodeList(productCodeVo,needBlank));
        }
        // printCodeVos
        int length = printCodeVos.size();
        int pageSize = 1000;
        int quotient  = length / pageSize;
        int remainder = length % pageSize;
        int maxPageIndex = quotient;
        if (remainder > 0) maxPageIndex++;
        List<ProductCodePrint> splitPrintSize = new ArrayList<>();
        for (int pageIndex = 0; pageIndex < maxPageIndex; pageIndex++) {
            ProductCodePrint productCodePrint = new ProductCodePrint();
            productCodePrint.setOrderCode(ordercode);
            productCodePrint.setBatchCode(pageIndex+1);
            if (pageIndex + 1 == maxPageIndex) {
                List<ProductCodeVo> productCodeVoList = printCodeVos.subList(pageIndex * pageSize, length);
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(i).getItemcode())) {
                        productCodePrint.setStartCode(productCodeVoList.get(i).getItemcode());
                        break;
                    }
                }
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(productCodeVoList.size()-1-i).getItemcode())) {
                        productCodePrint.setEndCode(productCodeVoList.get(productCodeVoList.size()-1-i).getItemcode());
                        break;
                    }
                }
                splitPrintSize.add(productCodePrint);
            }
            else {
                List<ProductCodeVo> productCodeVoList = printCodeVos.subList(pageIndex * pageSize, (pageIndex + 1) * pageSize);
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(i).getItemcode())) {
                        productCodePrint.setStartCode(productCodeVoList.get(i).getItemcode());
                        break;
                    }
                }
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(productCodeVoList.size()-1-i).getItemcode())) {
                        productCodePrint.setEndCode(productCodeVoList.get(productCodeVoList.size()-1-i).getItemcode());
                        break;
                    }
                }
                splitPrintSize.add(productCodePrint);
            }
        }
        HashMap<String, Object> result = new HashMap<>();
        result.put("printInfo", splitPrintSize);
        msg.setResult(result);
        return msg;
    }
    @ApiOperation(value = "分批打印内包装码",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "orderCode",value = "合同单号"),
            @ApiImplicitParam(name = "batchCode",value = "批次号"),
    })
    @PostMapping("/printBarCode")
    public Msg printBarCode(@RequestBody JSONObject jsonObject) throws Exception {
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        String orderCode = jsonObject.getString("orderCode");
        Integer batchCode = jsonObject.getInteger("batchCode");
        Integer needBlank = jsonObject.getInteger("needBlank");
        ContractOrderInfo contractOrderInfo = contractOrderService.selectByOrderCode(orderCode);
        if (!contractOrderInfo.getStatus().equals(ContractStatus.Generated)) {
            msg.setCode("999");
            msg.setMessage("合同状态不为已生成,无法打印");
            return msg;
        }
        List<ProductCodeVo> printCodeVos = new ArrayList<>();
        List<ProductCodeInfo> productCodeInfos = productCodeService.selectByOrderCode(orderCode);
        for (ProductCodeInfo productCodeInfo : productCodeInfos){
            ProductCodeVo productCodeVo = BeanUtils.copy(productCodeInfo,ProductCodeVo.class);
            BigDecimal explosiveContent = new BigDecimal(productCodeVo.getExplosivecontent().replace("kg","").replace("g",""));
            Integer boxNumber = productCodeVo.getBoxnumber();
            if (productCodeVo.getExplosivecontent().contains("kg")){
                BigDecimal explosive = explosiveContent.multiply(new BigDecimal(1000)).divide(new BigDecimal(boxNumber),0, RoundingMode.HALF_UP);
                productCodeVo.setExplosivecontent(explosive + "g");
            } else {
                BigDecimal explosive = explosiveContent.divide(new BigDecimal(boxNumber),0, RoundingMode.HALF_UP);
                productCodeVo.setExplosivecontent(explosive + "g");
            }
            printCodeVos.addAll(FireworkDeal.getBatchProductCodeList(productCodeVo,needBlank));
        }
        // printCodeVos
        int length = printCodeVos.size();
        int pageSize = 1000;
        int quotient  = length / pageSize;
        int remainder = length % pageSize;
        int maxPageIndex = quotient;
        if (remainder > 0) maxPageIndex++;
        ProductCodePrint productPrint = new ProductCodePrint();
        for (int pageIndex = 0; pageIndex < maxPageIndex; pageIndex++) {
            ProductCodePrint productCodePrint = new ProductCodePrint();
            productCodePrint.setOrderCode(orderCode);
            productCodePrint.setBatchCode(pageIndex+1);
            if (pageIndex + 1 == maxPageIndex) {
                List<ProductCodeVo> productCodeVoList = printCodeVos.subList(pageIndex * pageSize, length);
                productCodePrint.setProductCodeVos(productCodeVoList);
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(i).getItemcode())) {
                        productCodePrint.setStartCode(productCodeVoList.get(i).getItemcode());
                        break;
                    }
                }
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(productCodeVoList.size()-1-i).getItemcode())) {
                        productCodePrint.setEndCode(productCodeVoList.get(productCodeVoList.size()-1-i).getItemcode());
                        break;
                    }
                }
            } else {
                List<ProductCodeVo> productCodeVoList = printCodeVos.subList(pageIndex * pageSize, (pageIndex + 1) * pageSize);
                productCodePrint.setProductCodeVos(productCodeVoList);
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(i).getItemcode())) {
                        productCodePrint.setStartCode(productCodeVoList.get(i).getItemcode());
                        break;
                    }
                }
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(productCodeVoList.size()-1-i).getItemcode())) {
                        productCodePrint.setEndCode(productCodeVoList.get(productCodeVoList.size()-1-i).getItemcode());
                        break;
                    }
                }
            }
            if (productCodePrint.getBatchCode().equals(batchCode)){
                productPrint = productCodePrint;
                break;
            }
        }
        msg.setResult(productPrint);
        return msg;
    }
    @ApiOperation(value = "分批打印内包装码",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "orderCode",value = "合同单号"),
            @ApiImplicitParam(name = "batchCode",value = "批次号"),
    })
    @PostMapping("/zplPrint")
    public Msg zplPrintBarCode(@RequestBody JSONObject jsonObject){
        String orderCode = jsonObject.getString("orderCode");
        Integer batchCode = jsonObject.getInteger("batchCode");
        Integer needBlank = jsonObject.getInteger("needBlank");
        ContractOrderInfo contractOrderInfo = contractOrderService.selectByOrderCode(orderCode);
        if (!contractOrderInfo.getStatus().equals(ContractStatus.Generated)) {
            return new Msg(ERROR_10004,"合同状态不为已生成,无法打印");
        }
        List<ProductCodeVo> printCodeVos = new ArrayList<>();
        List<ProductCodeInfo> productCodeInfos = productCodeService.selectByOrderCode(orderCode);
        for (ProductCodeInfo productCodeInfo : productCodeInfos){
            ProductCodeVo productCodeVo = BeanUtils.copy(productCodeInfo,ProductCodeVo.class);
            BigDecimal explosiveContent = new BigDecimal(productCodeVo.getExplosivecontent().replace("kg","").replace("g",""));
            Integer boxNumber = productCodeVo.getBoxnumber();
            if (productCodeVo.getExplosivecontent().contains("kg")){
                BigDecimal explosive = explosiveContent.multiply(new BigDecimal(1000)).divide(new BigDecimal(boxNumber),0, RoundingMode.HALF_UP);
                productCodeVo.setExplosivecontent(explosive + "g");
            } else {
                BigDecimal explosive = explosiveContent.divide(new BigDecimal(boxNumber),0, RoundingMode.HALF_UP);
                productCodeVo.setExplosivecontent(explosive + "g");
            }
            printCodeVos.addAll(FireworkDeal.getBatchProductCodeList(productCodeVo,needBlank));
        }
        // printCodeVos
        int length = printCodeVos.size();
        int pageSize = 1000;
        int quotient  = length / pageSize;
        int remainder = length % pageSize;
        int maxPageIndex = quotient;
        if (remainder > 0) maxPageIndex++;
        ProductCodePrint productPrint = new ProductCodePrint();
        for (int pageIndex = 0; pageIndex < maxPageIndex; pageIndex++) {
            ProductCodePrint productCodePrint = new ProductCodePrint();
            productCodePrint.setOrderCode(orderCode);
            productCodePrint.setBatchCode(pageIndex+1);
            if (pageIndex + 1 == maxPageIndex) {
                List<ProductCodeVo> productCodeVoList = printCodeVos.subList(pageIndex * pageSize, length);
                productCodePrint.setProductCodeVos(productCodeVoList);
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(i).getItemcode())) {
                        productCodePrint.setStartCode(productCodeVoList.get(i).getItemcode());
                        break;
                    }
                }
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(productCodeVoList.size()-1-i).getItemcode())) {
                        productCodePrint.setEndCode(productCodeVoList.get(productCodeVoList.size()-1-i).getItemcode());
                        break;
                    }
                }
            } else {
                List<ProductCodeVo> productCodeVoList = printCodeVos.subList(pageIndex * pageSize, (pageIndex + 1) * pageSize);
                productCodePrint.setProductCodeVos(productCodeVoList);
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(i).getItemcode())) {
                        productCodePrint.setStartCode(productCodeVoList.get(i).getItemcode());
                        break;
                    }
                }
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(productCodeVoList.size()-1-i).getItemcode())) {
                        productCodePrint.setEndCode(productCodeVoList.get(productCodeVoList.size()-1-i).getItemcode());
                        break;
                    }
                }
            }
            if (productCodePrint.getBatchCode().equals(batchCode)){
                productPrint = productCodePrint;
                break;
            }
        }
        String zpl;
        try {
            zpl = contractOrderService.generateZplString(productPrint,userService.getById(getUser().getId()));
        }catch (Exception e){
            return new Msg(ERROR_40001,"打印出错");
        }
        return success(zpl);
    }
    @ApiOperation(value = "拒绝生产",response = Msg.class)
    @PostMapping("/rejectProduct")
    public Msg rejectProduct(@RequestBody JSONObject jsonObject) throws Exception {
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        String operator = getUser().getUsername();
        Long id = jsonObject.getLong("id");
        ContractOrderInfo contractOrderInfo = contractOrderService.getById(id);
        if (!contractOrderInfo.getStatus().equals(ContractStatus.WAIT_CONFIRM)) {
            msg.setCode("999");
            msg.setMessage("合同状态不为待确认,无法拒绝生产");
            return msg;
        }
        contractOrderInfo.setStatus(ContractStatus.Refuse_Product);
        contractOrderInfo.setOpinion(jsonObject.getString("opinion"));
        contractOrderInfo.setModifiedby(operator);
        contractOrderInfo.setModifieddate(new Date());
        contractOrderService.updateById(contractOrderInfo);
        ContractLogInfo contractLogInfo = new ContractLogInfo();
        contractLogInfo.setOptlog("拒绝合同");
        contractLogInfo.setOperator(operator);
        contractLogInfo.setOrdercode(contractOrderInfo.getOrdercode());
        contractLogInfo.setOperatordate(new Date());
        contractLogService.save(contractLogInfo);
        return msg;
    }
    @ApiOperation(value = "生成条码",response = Msg.class)
    @PostMapping("produce")
    public Msg produce(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        Long id = jsonObject.getLong("id");
        ContractOrderInfo contractOrderInfo = contractOrderService.getById(id);
        if (!contractOrderInfo.getStatus().equals(ContractStatus.Confirm_Product)) {
            msg.setCode("999");
            msg.setMessage("合同状态不为确认生产,无法生成条码");
            return msg;
        }
        Date producedate = jsonObject.getDate("producedate");
        if (producedate == null){
            return new Msg(ErrorCode.ERROR_10002);
        }
        {
            //获取合同的产品信息
            List<ContractDetailInfo> contractDetailInfos = contractDetailService.getBaseMapper().selectList(
                    new LambdaQueryWrapper<ContractDetailInfo>()
                            .eq(ContractDetailInfo::getOrdercode, contractOrderInfo.getOrdercode()));
            for (ContractDetailInfo detail : contractDetailInfos) {
                String productCode = detail.getDirectioncode();
                //箱数
                Integer boxNum = detail.getNum();
                ProductInfo productInfo = productService.selectByDirection(productCode);
                //箱含量
                Integer numPerBox = productInfo.getBoxNumber();
                //查找单日合同产品总数
                int currentNum = boxNum * numPerBox;
                List<ContractDetailInfo> detailInfos = contractDetailService.selectAllDetailAtSpecificDate(productCode, producedate);
                int numAlready = detailInfos.stream().mapToInt(ContractDetailInfo::getNum).sum() * numPerBox;
                //情况1.这个情况应该不会出现
                if (numAlready >= 100000) {
                    msg.setCode("999");
                    msg.setMessage("产品:" + productInfo.getName() + ",指定日超过100000挂,数量为:" + numAlready);
                    return msg;
                }
                //情况2
                if (numAlready + currentNum >= 100000) {
                    msg.setCode("999");
                    msg.setMessage("产品:" + productInfo.getName() + "指定日挂数:" + numAlready + ",当前数量:" + currentNum + "总和超过100000");
                    return msg;
                }
            }
        }
        contractOrderInfo.setProducedate(producedate);
        contractOrderService.updateById(contractOrderInfo);
        return msg;
    }
    @ApiOperation(value = "产品导入解析返回",response = Msg.class)
    @PostMapping("/{enterprisenumber}/product2json")
    public Msg product2json(@PathVariable("enterprisenumber") String enterprisenumber, MultipartFile file) {
        List<Product2JsonVo> product2JsonVos = productService.transform2Json(enterprisenumber, file, getUser());
        return success(product2JsonVos);
    }
    /**
     * @Description: 查询供货或者购货单位信息
     * @author celin
     * @date 2021/5/26 9:33
     */
    @ApiOperation(value = "查询供货或者购货单位信息",response = Msg.class)
    @PostMapping("/contractUnitList")
    Msg supplyAndPurchaseUnitPage(@RequestBody FilterObject filter) {
        Integer pageIndex = filter.getPageIndex();
        Integer pageSize = filter.getPageSize();
        IPage page = contractUnitDetailService.selectSupplyAndPurchaseUnitPage(new Page<>(pageIndex,pageSize),filter.getFilter(),getUser());
        return success(page);
    }
    /**
     * @Description: 新增供货或者购货单位信息
     * @date 2021/5/26 9:47
     */
    @ApiOperation(value = "新增供货或者购货单位信息",response = Msg.class)
    @PostMapping("/addContractUnit")
    Msg addSupplyAndPurchaseUnit(@RequestBody ContractUnitDetail contractUnitDetail) {
        contractUnitDetailService.checkAdd(contractUnitDetail);
        contractUnitDetailService.addSupplyAndPurchaseUnit(contractUnitDetail,getUser());
        return success();
    }
    /**
     * @Description: 修改供货或者购货单位信息
     * @date 2021/5/26 9:47
     */
    @ApiOperation(value = "修改供货或者购货单位信息",response = Msg.class)
    @PostMapping("/contractUnit")
    Msg modSupplyAndPurchaseUnit(@RequestBody ContractUnitDetail contractUnitDetail) {
        contractUnitDetailService.checkAdd(contractUnitDetail);
        contractUnitDetailService.modSupplyAndPurchaseUnit(contractUnitDetail,getUser());
        return success();
    }
    /**
     * @Description: 删除供货或者购货单位信息
     * @date 2021/5/26 9:47
     */
    @ApiOperation(value = "删除供货或者购货单位信息",response = Msg.class)
    @PostMapping("/delContractUnit")
    Msg delSupplyAndPurchaseUnit(@RequestParam Long id) {
        contractUnitDetailService.delSupplyAndPurchaseUnit(id,getUser());
        return success();
    }
    @GetMapping("/replenishBox")
    public Msg replenishBoxPrint(@RequestParam String code){
        if (StringUtils.isBlank(code) || !FireworkDeal.is22Characters(code)){
            return new Msg(ERROR_10004.getCode(),ERROR_10004.getMsg()+":流向码格式不符,请输入包装箱码!");
        }
        ProductCodeInfo productCodeInfo = productCodeService.selectByOriginalCode(code);
        if (productCodeInfo == null){
            return new Msg(ERROR_50001.getCode(),ERROR_50001.getMsg()+":没有找到相应的产品信息!");
        }
        ProductCodeVo productCodeVo = BeanUtils.copy(productCodeInfo,ProductCodeVo.class);
        String start = productCodeInfo.getOriginalcode().substring(14,19);
        Integer end = Integer.parseInt(start)+productCodeInfo.getBoxnumber()-1;
        productCodeVo.setBoxrange("("+start+"-"+String.format("%05d", end)+")");
        productCodeVo.setCrc(productCodeInfo.getOrdercode().substring(productCodeInfo.getOrdercode().length()-8));
        return success(productCodeVo);
    }
    /** 打印日志插入 **/
    @PostMapping("/printLog")
    public Msg printLog(JSONArray array){
        UserInfo userInfo = userService.getById(getUser().getId());
        for (int i=0;i<array.size();i++){
            String dire = array.getString(i);
            ProductVo productVo = productService.selectVoByDirection(dire);
            ProductLocusInfo productLocusInfo = new ProductLocusInfo(dire,new Date(),
                    new Date(),userInfo.getCompany(),null,ProductLocusInfo.REPLENISH_PRINT_STATUS,
                    productVo.getBoxNumber().toString());
            productLocusService.insertProductLocus(productLocusInfo);
        }
        return success();
    }
    @ApiOperation(value = "退回电子标签",response = Msg.class)
    @PostMapping("/{ordercode}/returnTag")
    public Msg returnTag(@PathVariable("ordercode") String ordercode, MultipartFile file) {
        contractOrderService.returnTag(ordercode, file,getUser());
        List<ProductVo> productVoList = contractDetailService.selectByOrder(ordercode);
        return success(productVoList);
    }
    @ApiOperation(value = "外包装箱码使用插件打印",response = Msg.class)
    @PostMapping("/replenishBoxPrint")
    public Msg replenishBoxZplPrint(@RequestBody JSONObject jsonObject){
        String codes = jsonObject.getString("codes");
        UserInfo userInfo = userService.getById(getUser().getId());
        if (StringUtils.isBlank(codes)){
            return new Msg(ERROR_10004);
        }
        List<String>codeList = StringUtils.toList(codes);
        List<ProductCodeVo>productCodeVos = new ArrayList<>();
        for (String code : codeList){
            if (StringUtils.isBlank(code) || !FireworkDeal.is22Characters(code)){
                return new Msg(ERROR_10004.getCode(),ERROR_10004.getMsg()+":流向码格式不符,请输入包装箱码!");
            }
            ProductCodeInfo productCodeInfo = productCodeService.selectByOriginalCode(code);
            if (productCodeInfo == null){
                return new Msg(ERROR_50001.getCode(),ERROR_50001.getMsg()+":没有找到相应的产品信息!");
            }
            ProductCodeVo productCodeVo = BeanUtils.copy(productCodeInfo,ProductCodeVo.class);
            String start = productCodeInfo.getOriginalcode().substring(14,19);
            Integer end = Integer.parseInt(start)+productCodeInfo.getBoxnumber()-1;
            productCodeVo.setBoxrange("("+start+"-"+String.format("%05d", end)+")");
            productCodeVo.setCrc(productCodeInfo.getOrdercode().substring(productCodeInfo.getOrdercode().length()-8));
            productCodeVos.add(productCodeVo);
        }
        String zplString = contractOrderService.generateOuterTag(productCodeVos,userInfo);
        return success(zplString);
    }
    @ApiOperation(value = "内包装码使用插件打印",response = Msg.class)
    @PostMapping("/replenishInnerPrint")
    public Msg replenishInnerZplPrint(@RequestBody JSONObject jsonObject){
        String codes = jsonObject.getString("codes");
        if (StringUtils.isBlank(codes)){
            return new Msg(ERROR_10004);
        }
        List<String>codeList = StringUtils.toList(codes);
        List<ProductCodeVo>productCodeVos = new ArrayList<>();
        for (String code : codeList){
            if (StringUtils.isBlank(code) || !FireworkDeal.is19Characters(code)){
                return new Msg(ERROR_10004.getCode(),ERROR_10004.getMsg()+":流向码格式不符,请输入包装箱码!");
            }
            ProductInfo productInfo = productService.selectByDirection(code);
            DirectionDetail directionDetail = FireworkDeal.dealDirectionCode(code);
            int j = Integer.parseInt(directionDetail.getSerialNo())%productInfo.getBoxNumber();
            if (j == 0){
                j = productInfo.getBoxNumber();
            }
            int i = Integer.parseInt(directionDetail.getSerialNo()) - j + 1;
            String boxCode = directionDetail.getItemCode() + directionDetail.getDateCode()
                    + String.format("%05d",i)+ String.format("%03d",productInfo.getBoxNumber());
            ProductCodeInfo productCodeInfo = productCodeService.selectByOriginalCode(boxCode);
            if (productCodeInfo == null){
                return new Msg(ERROR_50001.getCode(),ERROR_50001.getMsg()+":没有找到相应的产品信息!");
            }
            ProductCodeVo productCodeVo = BeanUtils.copy(productCodeInfo,ProductCodeVo.class);
            productCodeVo.setItemcode(code);
            String start = productCodeInfo.getOriginalcode().substring(14,19);
            Integer end = Integer.parseInt(start)+productCodeInfo.getBoxnumber()-1;
            productCodeVo.setBoxrange("("+start+"-"+String.format("%05d", end)+")");
            productCodeVo.setCrc(productCodeInfo.getOrdercode().substring(productCodeInfo.getOrdercode().length()-8));
            productCodeVos.add(productCodeVo);
        }
        if (productCodeVos.size() % 2 == 1){
            productCodeVos.add(new ProductCodeVo());
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        String zplString = contractOrderService.generateInnerTag(productCodeVos,userInfo);
        return success(zplString);
    }
    @ApiOperation(value = "合同箱码获取批次信息",response = Msg.class)
    @PostMapping("/replenishBoxBatch")
    public Msg replenishBoxBatch(@RequestBody JSONObject jsonObject){
        String orderCode = jsonObject.getString("orderCode");
        ContractOrderInfo contractOrderInfo = contractOrderService.selectByOrderCode(orderCode);
        if (!contractOrderInfo.getStatus().equals(ContractStatus.Generated)) {
            return new Msg(ERROR_50002,"合同状态不为已生成,无法打印");
        }
        List<ProductCodeVo> printCodeVos = new ArrayList<>();
        List<ProductCodeInfo> productCodeInfos = productCodeService.selectByOrderCode(orderCode);
        int length = productCodeInfos.size();
        int pageSize = 1000;
        int quotient  = length / pageSize;
        int remainder = length % pageSize;
        int maxPageIndex = quotient;
        if (remainder > 0) maxPageIndex++;
        List<ProductCodePrint> splitPrintSize = new ArrayList<>();
        for (ProductCodeInfo productCodeInfo : productCodeInfos){
            ProductCodeVo productCodeVo = BeanUtils.copy(productCodeInfo,ProductCodeVo.class);
            BigDecimal explosiveContent = new BigDecimal(productCodeVo.getExplosivecontent().replace("kg","").replace("g",""));
            Integer boxNumber = productCodeVo.getBoxnumber();
            if (productCodeVo.getExplosivecontent().contains("kg")){
                BigDecimal explosive = explosiveContent.multiply(new BigDecimal(1000)).divide(new BigDecimal(boxNumber),0, RoundingMode.HALF_UP);
                productCodeVo.setExplosivecontent(explosive + "g");
            } else {
                BigDecimal explosive = explosiveContent.divide(new BigDecimal(boxNumber),0, RoundingMode.HALF_UP);
                productCodeVo.setExplosivecontent(explosive + "g");
            }
            printCodeVos.add(productCodeVo);
        }
        for (int pageIndex = 0; pageIndex < maxPageIndex; pageIndex++) {
            ProductCodePrint productCodePrint = new ProductCodePrint();
            productCodePrint.setOrderCode(orderCode);
            productCodePrint.setBatchCode(pageIndex+1);
            if (pageIndex + 1 == maxPageIndex) {
                List<ProductCodeVo> productCodeVoList = printCodeVos.subList(pageIndex * pageSize, length);
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(i).getOriginalcode())) {
                        productCodePrint.setStartCode(productCodeVoList.get(i).getOriginalcode());
                        break;
                    }
                }
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(productCodeVoList.size()-1-i).getOriginalcode())) {
                        productCodePrint.setEndCode(productCodeVoList.get(productCodeVoList.size()-1-i).getOriginalcode());
                        break;
                    }
                }
                splitPrintSize.add(productCodePrint);
            }
            else {
                List<ProductCodeVo> productCodeVoList = printCodeVos.subList(pageIndex * pageSize, (pageIndex + 1) * pageSize);
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(i).getOriginalcode())) {
                        productCodePrint.setStartCode(productCodeVoList.get(i).getOriginalcode());
                        break;
                    }
                }
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(productCodeVoList.size()-1-i).getOriginalcode())) {
                        productCodePrint.setEndCode(productCodeVoList.get(productCodeVoList.size()-1-i).getOriginalcode());
                        break;
                    }
                }
                splitPrintSize.add(productCodePrint);
            }
        }
        HashMap<String, Object> result = new HashMap<>();
        result.put("printInfo", splitPrintSize);
        return success(result);
    }
    @ApiOperation(value = "合同箱码根据批次打印",response = Msg.class)
    @PostMapping("/replenishBoxBatchPrint")
    public Msg replenishBoxBatchPrint(@RequestBody JSONObject jsonObject){
        String orderCode = jsonObject.getString("orderCode");
        Integer batchCode = jsonObject.getInteger("batchCode");
        UserInfo userInfo = userService.getById(getUser().getId());
        ContractOrderInfo contractOrderInfo = contractOrderService.selectByOrderCode(orderCode);
        if (!contractOrderInfo.getStatus().equals(ContractStatus.Generated)) {
            return new Msg(ERROR_50002,"合同状态不为已生成,无法打印");
        }
        List<ProductCodeVo> printCodeVos = new ArrayList<>();
        List<ProductCodeInfo> productCodeInfos = productCodeService.selectByOrderCode(orderCode);
        for (ProductCodeInfo productCodeInfo : productCodeInfos){
            ProductCodeVo productCodeVo = BeanUtils.copy(productCodeInfo,ProductCodeVo.class);
            String start = productCodeInfo.getOriginalcode().substring(14,19);
            Integer end = Integer.parseInt(start)+productCodeInfo.getBoxnumber()-1;
            productCodeVo.setBoxrange("("+start+"-"+String.format("%05d", end)+")");
            productCodeVo.setCrc(productCodeInfo.getOrdercode().substring(productCodeInfo.getOrdercode().length()-8));
            printCodeVos.add(productCodeVo);
        }
        // printCodeVos
        int length = printCodeVos.size();
        int pageSize = 1000;
        int quotient  = length / pageSize;
        int remainder = length % pageSize;
        int maxPageIndex = quotient;
        if (remainder > 0) maxPageIndex++;
        ProductCodePrint productPrint = new ProductCodePrint();
        for (int pageIndex = 0; pageIndex < maxPageIndex; pageIndex++) {
            ProductCodePrint productCodePrint = new ProductCodePrint();
            productCodePrint.setOrderCode(orderCode);
            productCodePrint.setBatchCode(pageIndex+1);
            if (pageIndex + 1 == maxPageIndex) {
                List<ProductCodeVo> productCodeVoList = printCodeVos.subList(pageIndex * pageSize, length);
                productCodePrint.setProductCodeVos(productCodeVoList);
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(i).getOriginalcode())) {
                        productCodePrint.setStartCode(productCodeVoList.get(i).getOriginalcode());
                        break;
                    }
                }
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(productCodeVoList.size()-1-i).getOriginalcode())) {
                        productCodePrint.setEndCode(productCodeVoList.get(productCodeVoList.size()-1-i).getOriginalcode());
                        break;
                    }
                }
            } else {
                List<ProductCodeVo> productCodeVoList = printCodeVos.subList(pageIndex * pageSize, (pageIndex + 1) * pageSize);
                productCodePrint.setProductCodeVos(productCodeVoList);
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(i).getOriginalcode())) {
                        productCodePrint.setStartCode(productCodeVoList.get(i).getOriginalcode());
                        break;
                    }
                }
                for (int i = 0; i< 4; i++) {
                    if (StringUtils.isNotBlank(productCodeVoList.get(productCodeVoList.size()-1-i).getOriginalcode())) {
                        productCodePrint.setEndCode(productCodeVoList.get(productCodeVoList.size()-1-i).getOriginalcode());
                        break;
                    }
                }
            }
            if (productCodePrint.getBatchCode().equals(batchCode)){
                productPrint = productCodePrint;
                break;
            }
        }
        String zpl;
        try {
            List<ProductCodeVo>productCodeVos = productPrint.getProductCodeVos();
            zpl = contractOrderService.generateOuterTag(productCodeVos, userInfo);
        }catch (Exception e){
            return new Msg(ERROR_40001,"生成标签出错");
        }
        return success(zpl);
    }
    @GetMapping("/getControlParams")
    public Msg getControlParams(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize, String sort, String order,
                                String enterprisename, String type) {
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize, sort, order);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(enterprisename)) {
            condition.put("enterprisename", enterprisename.trim());
        }
        if (StringUtils.isNotBlank(type)) {
            condition.put("type", type.trim());
        }
        Integer userType = getUser().getType();
        //非admin只能看自己的
        if (userType != 1) {
            condition.put("owner", getUser().getUsername());
        }
        pageInfo.setCondition(condition);
        controlPrintParamService.selectDataGrid(pageInfo);
        return success(pageInfo);
    }
    @PostMapping("/setControlParams")
    public Msg setControlParams(ControlPrintParam controlPrintParam){
        return success();
    }
    /**
     * @Description: 获取特定type配置
     * @date 2022/2/11 14:09
     */
    @GetMapping("/getOwnSelectType")
    public Msg getControlParams(@RequestParam Byte type) {
        ControlPrintParam res = controlPrintParamService.getOwnSelectType(type, getUser());
        return success(res);
    }
    /**
     * @Description: 新增配置方案
     * @date 2022/2/11 16:16
     */
    @PostMapping("/addControlParams")
    public Msg addControlParams(@RequestBody ControlPrintParam controlPrintParam){
        controlPrintParamService.addOrUpdateControlParams(controlPrintParam,getUser());
        return success();
    }
    /**
    * @Description: 更新配置方案
    * @date 2022/2/11 17:29
    */
    @PostMapping("/updateControlParams")
    public Msg updateControlParams(@RequestBody ControlPrintParam controlPrintParam){
        controlPrintParamService.updateControlParams(controlPrintParam,getUser());
        return success();
    }
}
src/main/java/com/gk/firework/Controller/DeliveryController.java
对比新文件
@@ -0,0 +1,469 @@
package com.gk.firework.Controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.*;
import com.gk.firework.Domain.Log.JsonParams;
import com.gk.firework.Domain.Utils.FilterObject;
import com.gk.firework.Domain.Utils.Msg;
import com.gk.firework.Domain.Utils.StringUtils;
import com.gk.firework.Domain.Vo.DirectionDetail;
import com.gk.firework.Domain.Vo.FireworkDeal;
import com.gk.firework.Domain.Vo.ProductVo;
import com.gk.firework.Service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import static com.gk.firework.Domain.Enum.ErrorCode.*;
import static com.gk.firework.Domain.Enum.ErrorCode.ERROR_10003;
/**
 * @author : jingjy
 * @date : 2021/4/1 10:21
 */
@Api(tags = "出库接口")
@RestController
@RequestMapping("/delivery")
public class DeliveryController extends BaseController {
    @Autowired
    private DeliveryOrderService deliveryOrderService;
    @Autowired
    private DeliveryDetailService deliveryDetailService;
    @Autowired
    private UserService userService;
    @Autowired
    private StockService stockService;
    @Autowired
    private ProductService productService;
    @Autowired
    private ProductLocusService productLocusService;
    @Autowired
    private WarnContentService warnContentService;
    /**
     * @param jsonArray 接收json数组格式为:[{"id":"用户ID","rfids":"出库流向码,以逗号进行拼接","time":"出库时间","type":"1或者2;1:正常出库;2:退货出库"}]
     * @return msg
     */
    @ApiOperation(value = "出库",notes = "接收json数组格式为:[{\"id\":\"用户ID\",\"rfids\":\"出库流向码,以逗号进行拼接\",\"time\":\"出库时间\",\"type\":\"1或者2;1:正常出库;2:退货出库\"}]")
    @PostMapping("/out")
    @JsonParams
    public Msg deliveryStock(@RequestBody JSONArray jsonArray){
        Msg msg = new Msg(true);
        if (jsonArray.isEmpty()){
            msg.setCode(ERROR_10001.getCode());
            msg.setMessage(ERROR_10001.getMsg()+":未收到出库信息!");
            return msg;
        }
        for (int i = 0; i < jsonArray.size(); i++) {
            JSONObject jsonObject = jsonArray.getJSONObject(i);
            String userId = jsonObject.getString("id");
            String directionCodeStr = jsonObject.getString("rfids");
            String datetime = jsonObject.getString("time");
            String type = jsonObject.getString("type");
            String cert = jsonObject.getString("cert");
            Date date;
            DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            try {
                date = dateFormat.parse(datetime);
            } catch (ParseException e) {
                msg.setCode(ERROR_10003.getCode());
                msg.setMessage(ERROR_10003.getMsg()+":日期类型错误!");
                return msg;
            }
            if (StringUtils.isBlank(directionCodeStr)){
                msg.setCode(ERROR_10001.getCode());
                msg.setMessage(ERROR_10001.getMsg()+":流向码不能为空");
                return msg;
            }
            boolean isUser = userService.checkUserById(userId);
            if (!isUser){
                msg.setCode(ERROR_50001.getCode());
                msg.setMessage(ERROR_50001.getMsg()+":未找到相关用户信息,不能出库!");
                return msg;
            }
            UserInfo userInfo = userService.getById(userId);
            List<String> directionCodes = StringUtils.toList(directionCodeStr);
            //判断是否存在同时间同操作人出库记录
            boolean exist = deliveryOrderService.isOrderExist(datetime,userInfo);
            if (exist){
                continue;
            }
            //出库单创建
            DeliveryOrderInfo deliveryOrderInfo;
            String auth = getAuth();
            auth = StringUtils.isBlank(auth) ? "NOAUTH" : auth;
            deliveryOrderInfo = deliveryOrderService.generateDeliveryOrder(type,date,userInfo,cert,auth);
            List<DeliveryDetailInfo>deliveryDetailInfos = deliveryDetailService.generateDeliveryDetail(deliveryOrderInfo,userInfo,directionCodes);
            deliveryOrderService.save(deliveryOrderInfo);
            deliveryDetailService.saveBatch(deliveryDetailInfos);
            //扣库存
            stockService.deliveryByDetail(date,deliveryDetailInfos,userInfo);
        }
        return msg;
    }
    @ApiOperation(value = "快速出库",response = Msg.class)
    @PostMapping("/deliveryQuick")
    @JsonParams
    public Msg deliveryQuick(@RequestBody JSONArray jsonArray){
        Msg msg = new Msg(true);
        if (jsonArray.size() > 0)
        {
            for (int i = 0; i < jsonArray.size(); i++) {
                JSONObject jsonObject = jsonArray.getJSONObject(i);
                String userId = jsonObject.getString("id");
                String directionCodeFirst = jsonObject.getString("rfidfirst");
                String directionCodeLast = jsonObject.getString("rfidlast");
                String datetime = jsonObject.getString("time");
                String transport = jsonObject.getString("cert");
                //type 1.常规出库; 2.退货出库
                String type = "1";
                Date date;
                DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                try {
                    date = dateFormat.parse(datetime);
                } catch (ParseException e) {
                    return new Msg(ERROR_10003,"出库日期类型错误");
                }
                if (!(FireworkDeal.is22Characters(directionCodeFirst) && FireworkDeal.is22Characters(directionCodeLast))){
                    return new Msg(ERROR_10004,"流向码首尾不符合规则,无法快速出库");
                }
                boolean isUser = userService.checkUserById(userId);
                if (!isUser){
                    return new Msg(ERROR_50001,"未找到相关用户信息,不能出库");
                }
                UserInfo userInfo = userService.getById(userId);
                //判断是否存在同时间同操作人入库记录
                boolean exist = deliveryOrderService.isOrderExist(datetime,userInfo);
                if (exist){ continue; }
                String auth = getAuth();
                auth = StringUtils.isBlank(auth) ? "NOAUTH" : auth;
                DeliveryOrderInfo orderInfo = deliveryOrderService.generateDeliveryOrder(type,date,userInfo,transport, auth);
                List<DeliveryDetailInfo>detailInfos = new ArrayList<>();
                List<ProductLocusInfo>locusInfos = new ArrayList<>();
                List<ProductVo> productVos = new ArrayList<>();
                DirectionDetail detailFirst = FireworkDeal.dealDirectionCode(directionCodeFirst);
                DirectionDetail detailLast = FireworkDeal.dealDirectionCode(directionCodeLast);
                if (!detailFirst.getItemCode().equals(detailLast.getItemCode())){
                    return new Msg(ERROR_10004,"首尾商品编码不一致,无法快速出库");
                }
                if (Integer.parseInt(detailFirst.getSerialNo()) > Integer.parseInt(detailLast.getSerialNo())){
                    return new Msg(ERROR_10004,"首位商品序号大于末位,无法快速出库");
                }
                ProductVo productVo = productService.selectVoByDirection(directionCodeFirst);
                if (productVo == null){
                    return new Msg(ERROR_50001,"未找到相关产品信息,不能出库");
                }
                Integer firstNo = Integer.parseInt(detailFirst.getSerialNo());
                Integer lastNo = Integer.parseInt(detailLast.getSerialNo());
                int perBoxNum = Integer.parseInt(detailFirst.getBoxNo());
                int boxNum = ((lastNo-firstNo)/perBoxNum)+1;
                int totalNum = 0;
                for (int j=1;j<= boxNum;j++){
                    String dire = detailFirst.getItemCode()+detailFirst.getDateCode()+ String.format("%05d", firstNo)+String.format("%03d", perBoxNum);
                    DeliveryDetailInfo detailInfo = new DeliveryDetailInfo();
                    detailInfo.setDeliverycode(orderInfo.getOrdercode());
                    detailInfo.setDirectioncode(dire);
                    detailInfo.setItemcode(productVo.getItemCode());
                    detailInfo.setItemname(productVo.getName());
                    detailInfo.setCreateat(new Date());
                    detailInfo.setCreateby(userInfo.getUsername());
                    detailInfo.setNum(perBoxNum);
                    detailInfos.add(detailInfo);
                    ProductLocusInfo productLocusInfo = new ProductLocusInfo(dire,new Date(),date, userInfo.getCompany(),
                            null,ProductLocusInfo.DELIVERY_STATUS,productVo.getBoxNumber().toString());
                    locusInfos.add(productLocusInfo);
                    firstNo+=perBoxNum;
                    totalNum += perBoxNum;
                }
                FireworkDeal.getProductVos(directionCodeFirst,detailFirst,detailLast,productVos,productVo);
                orderInfo.setBoxnum(totalNum);
                deliveryOrderService.save(orderInfo);
                deliveryDetailService.saveBatch(detailInfos);
                productLocusService.insertBatch(locusInfos);
                stockService.deliveryByDetail(date,detailInfos,userInfo);
            }
        }
        return msg;
    }
    /**
     * 退货出库
     */
    @PostMapping("/entryReturn")
    @ApiOperation(value = "退货出库", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "filter.code", type = "JSONObject",
                    value = " JSONObject{\"datetime\":\"时间\",\"data\":[{\"directionCode\":\"流向码\"},{\"directionCode\":\"流向码\"}]}"),
    })
    @JsonParams
    public Msg getProductListByCodes(@RequestBody JSONObject object) {
        JSONArray jsonArray = object.getJSONArray("data");
        String datetime = object.getString("datetime");
        Date date;
        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        try {
            date = dateFormat.parse(datetime);
        } catch (ParseException e) {
            return new Msg(ERROR_10003,"日期类型错误!");
        }
        //生成出库单号,类型,退货出库
        DeliveryOrderInfo deliveryOrderInfo;
        UserInfo userInfo = userService.getById(getUser().getId());
        String auth = getAuth();
        auth = StringUtils.isBlank(auth) ? "NOAUTH" : auth;
        deliveryOrderInfo = deliveryOrderService.generateDeliveryOrder(FireworkDeal.OTHER_DELIVERY,date,userInfo, null, auth);
        List<DeliveryDetailInfo>deliveryDetailInfos = new ArrayList<>();
        List<StockInfo>stockInfos = new ArrayList<>();
        for (int i = 0; i < jsonArray.size(); i++) {
            // 遍历 jsonArray 数组,把每一个对象转成 json 对象
            JSONObject jsonObject = jsonArray.getJSONObject(i);
            String directionCode = jsonObject.getString("directionCode");
            DirectionDetail directionDetail = FireworkDeal.dealDirectionCode(directionCode);
            ProductInfo productInfo = productService.selectByDirection(directionDetail.getItemCode());
            // 生成出库详情,库存OWNER设置为空
            DeliveryDetailInfo deliveryDetailInfo = new DeliveryDetailInfo();
            deliveryDetailInfo.setDirectioncode(directionCode);
            deliveryDetailInfo.setDeliverycode(deliveryOrderInfo.getOrdercode());
            deliveryDetailInfo.setItemcode(directionDetail.getItemCode());
            deliveryDetailInfo.setItemname(productInfo.getName());
            deliveryDetailInfo.setCreateat(new Date());
            deliveryDetailInfo.setCreateby(getUser().getUsername());
            deliveryDetailInfos.add(deliveryDetailInfo);
            StockInfo stockInfo = stockService.selectStockByDirection(directionCode);
            if (stockInfo == null){
                return new Msg(ERROR_50001,"库存信息未找到");
            }
            stockInfo.setOwner("");
            stockInfo.setModifiedby(userInfo.getUsername());
            stockInfo.setModifieddate(date);
            stockInfos.add(stockInfo);
        }
        deliveryOrderService.save(deliveryOrderInfo);
        deliveryDetailService.saveBatch(deliveryDetailInfos);
        stockService.updateStocks(stockInfos,userInfo);
        return success();
    }
    /**
    * @Description: 出库查询
    * @date 2021/4/15 12:05
    */
    @PostMapping("/outbound-query")
    @ApiOperation(value = "出库查询", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex", value = "当前页码", required = true),
            @ApiImplicitParam(name = "pageSize", value = "页大小", required = true),
            @ApiImplicitParam(name = "filter.province", value = "省"),
            @ApiImplicitParam(name = "filter.city", value = "市"),
            @ApiImplicitParam(name = "filter.district", value = "区"),
            @ApiImplicitParam(name = "filter.street", value = "街道"),
            @ApiImplicitParam(name = "filter.committee", value = "委员会"),
            @ApiImplicitParam(name = "filter.starttime", value = "开始时间"),
            @ApiImplicitParam(name = "filter.endtime", value = "结束时间"),
            @ApiImplicitParam(name = "filter.transportcert", value = "运输证号码"),
            @ApiImplicitParam(name = "filter.enterprisename", value = "入库企业名称"),
            @ApiImplicitParam(name = "filter.safetysupervision", value = "安全监管分类"),
            @ApiImplicitParam(name = "filter.code", value = "单号"),
    })
    Object getOutboundInfo(@RequestBody FilterObject jsonFilter) {
        Integer pageIndex = jsonFilter.getPageIndex();
        Integer pageSize = jsonFilter.getPageSize();
        IPage page =  deliveryOrderService.selectPage(new Page<>(pageIndex, pageSize), jsonFilter.getFilter(), getUser());
        return success(page);
    }
    @PostMapping("/stock/outbound-query")
    @ApiOperation(value = "出库查询", httpMethod = "POST")
    Object getStockOutboundInfo(@RequestBody FilterObject jsonFilter) {
        Integer pageIndex = jsonFilter.getPageIndex();
        Integer pageSize = jsonFilter.getPageSize();
        IPage page =  deliveryOrderService.selectStockPage(new Page<>(pageIndex, pageSize), jsonFilter.getFilter(), getUser());
        return success(page);
    }
    /**
    * @Description: 出库导出
    * @date 2021/4/19 17:24
    */
    /**
     * @Description: 出库查询
     * @date 2021/4/15 12:05
     */
    @PostMapping("/export/outbound")
    @ApiOperation(value = "出库查询", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex", value = "当前页码", required = true),
            @ApiImplicitParam(name = "pageSize", value = "页大小", required = true),
            @ApiImplicitParam(name = "filter.province", value = "省"),
            @ApiImplicitParam(name = "filter.city", value = "市"),
            @ApiImplicitParam(name = "filter.district", value = "区"),
            @ApiImplicitParam(name = "filter.street", value = "街道"),
            @ApiImplicitParam(name = "filter.committee", value = "委员会"),
            @ApiImplicitParam(name = "filter.starttime", value = "开始时间"),
            @ApiImplicitParam(name = "filter.endtime", value = "结束时间"),
            @ApiImplicitParam(name = "filter.transportcert", value = "运输证号码"),
            @ApiImplicitParam(name = "filter.enterprisename", value = "入库企业名称"),
    })
    Object exportOutbound(@RequestBody FilterObject jsonFilter) {
        List<DeliveryOrderInfo> list =  deliveryOrderService.selectExportList(jsonFilter.getFilter(), getUser());
        return success(list);
    }
    /**
     * @Description: 根据{出库单号}查询出库明细
     * @date 2021/4/15 12:05
     */
    @PostMapping("/outbound-detail")
    @ApiOperation(value = "出库单明细", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex", value = "当前页码", required = true),
            @ApiImplicitParam(name = "pageSize", value = "页大小", required = true),
            @ApiImplicitParam(name = "filter.code", value = "入库单号code"),
    })
    Object getOutboundDetail(@RequestBody FilterObject jsonFilter) {
        Integer pageIndex = jsonFilter.getPageIndex();
        Integer pageSize = jsonFilter.getPageSize();
        IPage page =  deliveryDetailService.selectDetailPage(new Page<>(pageIndex, pageSize), jsonFilter.getFilter());
        return success(page);
    }
    /**
     * @Description: 根据{出库单code}查询出库明细并导出
     * @date 2021/4/15 11:09
     */
    @GetMapping("/export/outbound-detail")
    @ApiOperation(value = "出库单明细导出", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "code", value = "出库单号code"),
    })
    Object getOutboundDetail(@RequestParam String code) {
        List<Map> detailExport = deliveryDetailService.selectDetailExport(code);
        return success(detailExport);
    }
    @GetMapping("/cert")
    @ApiOperation(value = "根据运输证查询出库明细", httpMethod = "GET")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "cert", value = "运输证号"),
    })
    Msg getDeliveryDetailByCert(@RequestParam String cert){
        if (StringUtils.isBlank(cert)){
            return new Msg(ERROR_10001.getCode(),ERROR_10001.getMsg());
        }
        Map<String,List>map = new HashMap<>();
        List<DeliveryOrderInfo> deliveryOrderInfos = deliveryOrderService.getDeliveryOrderByCert(cert);
        if (deliveryOrderInfos == null || deliveryOrderInfos.size() == 0){
            return new Msg(ERROR_50001.getCode(),ERROR_50001.getMsg()+":没有找到对应的出库记录!");
        }
        List<DeliveryDetailInfo>deliveryDetailInfoList = new ArrayList<>();
        for (DeliveryOrderInfo deliveryOrderInfo : deliveryOrderInfos){
            List<DeliveryDetailInfo>deliveryDetailInfos = deliveryDetailService.getDetailByCode(deliveryOrderInfo.getOrdercode());
            deliveryDetailInfoList.addAll(deliveryDetailInfos);
        }
        List<ProductVo>productVos = deliveryOrderService.getProductVosByCert(cert);
        map.put("detail",deliveryDetailInfoList);
        map.put("product",productVos);
        return success(map);
    }
    @ApiOperation(value = "批量退库")
    @PostMapping("/returnBatch")
    @JsonParams
    public List<Msg> returnBatch(@RequestBody JSONArray array) {
        List<Msg>msgList = new ArrayList<>();
        if (array.size() < 1) {
            return null;
        }
        for (int j = 0; j < array.size(); j++) {
            // 遍历 jsonArray 数组,把每一个对象转成 json 对象
            JSONObject object = array.getJSONObject(j);
            JSONArray jsonArray = object.getJSONArray("data");
            String datetime = object.getString("datetime");
            Date date;
            DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            try {
                date = dateFormat.parse(datetime);
            } catch (ParseException e) {
                msgList.add(new Msg(ERROR_10003, "日期类型错误!"));
                continue;
            }
            //生成出库单号,类型,退货出库
            DeliveryOrderInfo deliveryOrderInfo;
            UserInfo userInfo = userService.getById(getUser().getId());
            String auth = getAuth();
            auth = StringUtils.isBlank(auth) ? "NOAUTH" : auth;
            deliveryOrderInfo = deliveryOrderService.generateDeliveryOrder(FireworkDeal.OTHER_DELIVERY, date, userInfo, null, auth);
            List<DeliveryDetailInfo> deliveryDetailInfos = new ArrayList<>();
            List<StockInfo> stockInfos = new ArrayList<>();
            StringBuilder stringBuilder = new StringBuilder();
            boolean flag = false;
            for (int i = 0; i < jsonArray.size(); i++) {
                // 遍历 jsonArray 数组,把每一个对象转成 json 对象
                JSONObject jsonObject = jsonArray.getJSONObject(i);
                String directionCode = jsonObject.getString("directionCode");
                DirectionDetail directionDetail = FireworkDeal.dealDirectionCode(directionCode);
                ProductInfo productInfo = productService.selectByDirection(directionDetail.getItemCode());
                // 生成出库详情,库存OWNER设置为空
                DeliveryDetailInfo deliveryDetailInfo = new DeliveryDetailInfo();
                deliveryDetailInfo.setDirectioncode(directionCode);
                deliveryDetailInfo.setDeliverycode(deliveryOrderInfo.getOrdercode());
                deliveryDetailInfo.setItemcode(directionDetail.getItemCode());
                deliveryDetailInfo.setItemname(productInfo.getName());
                deliveryDetailInfo.setCreateat(new Date());
                deliveryDetailInfo.setCreateby(getUser().getUsername());
                deliveryDetailInfos.add(deliveryDetailInfo);
                StockInfo stockInfo = stockService.selectStockByDirection(directionCode);
                if (stockInfo == null) {
                    stringBuilder.append(directionCode).append("库存信息未找到");
                    flag = true;
                    continue;
                }
                stockInfo.setOwner("");
                stockInfos.add(stockInfo);
            }
            if (flag){
                msgList.add(new Msg(ERROR_50001,stringBuilder.toString()));
                continue;
            }
            deliveryOrderService.save(deliveryOrderInfo);
            deliveryDetailService.saveBatch(deliveryDetailInfos);
            stockService.updateStocks(stockInfos, getUser());
            msgList.add(new Msg(SUCCESS));
        }
        return msgList;
    }
}
src/main/java/com/gk/firework/Controller/DictionaryController.java
对比新文件
@@ -0,0 +1,333 @@
package com.gk.firework.Controller;
import com.alibaba.fastjson.JSONObject;
import com.gk.firework.Domain.*;
import com.gk.firework.Domain.Utils.*;
import com.gk.firework.Service.*;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.*;
@Api(tags = "数据字典接口")
@RestController
public class DictionaryController {
    @Autowired
    DictionaryTypeService dictionaryTypeService;
    @Autowired
    DictionaryItemService dictionaryItemService;
    @Autowired
    UserService userService;
    @Autowired
    RoleService roleService;
    @Autowired
    UserRolesService userRolesService;
    @Autowired
    RolePermissionsService rolePermissionsService;
    @Autowired
    ExcelExportService excelExportService;
    @Autowired
    DistrictService districtService;
    @Autowired
    UserRolesService userRolesInfoService;
    @GetMapping("/dictionary-types")
    @ApiOperation(value = "获取数据字典类型",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "name",value = "名称"),
    })
    public Msg getDictionaryTypeInfo(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize, String name){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(name)) {
            condition.put("name", name.trim());
        }
        pageInfo.setCondition(condition);
        dictionaryTypeService.selectDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @PostMapping("/adddictionary-types")
    @ApiOperation(value = "添加数据字典类型",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "code",value = "编码",required = true),
            @ApiImplicitParam(name = "text",value = "名称",required = true),
            @ApiImplicitParam(name = "description",value = "备注"),
            @ApiImplicitParam(name = "operator",value = "操作人"),
    })
    public Msg addDiactionaryTypeInfo(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        String code = jsonObject.getString("code");
        String text = jsonObject.getString("text");
        String operator = jsonObject.getString("operator");
        DictionaryTypeInfo dictionaryExistCode = dictionaryTypeService.selctByCode(code);
        if (dictionaryExistCode != null){
            msg.setCode("999");
            msg.setMessage("编码已存在");
            return msg;
        }
        DictionaryTypeInfo dictionaryExistText = dictionaryTypeService.selctByText(text);
        if (dictionaryExistText != null){
            msg.setCode("999");
            msg.setMessage("名称已存在");
            return msg;
        }
        DictionaryTypeInfo dictionaryTypeInfo = new DictionaryTypeInfo();
        dictionaryTypeInfo.setCode(code);
        dictionaryTypeInfo.setStatus((byte)1);
        dictionaryTypeInfo.setText(text);
        dictionaryTypeInfo.setCreatedby(operator);
        dictionaryTypeInfo.setCreateddate(new Date());
        dictionaryTypeInfo.setModifiedby(operator);
        dictionaryTypeInfo.setModifieddate(new Date());
        dictionaryTypeInfo.setDescription(jsonObject.getString("description"));
        dictionaryTypeService.save(dictionaryTypeInfo);
        return msg;
    }
    @PostMapping("/putdictionary-types")
    @ApiOperation(value = "修改字典类型",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "id",required = true),
            @ApiImplicitParam(name = "code",value = "编码",required = true),
            @ApiImplicitParam(name = "text",value = "名称",required = true),
            @ApiImplicitParam(name = "description",value = "备注"),
            @ApiImplicitParam(name = "operator",value = "操作人"),
    })
    public Msg putDiactionaryTypefo(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        Long id = jsonObject.getLong("id");
        String code = jsonObject.getString("code");
        String text = jsonObject.getString("text");
        String operator = jsonObject.getString("operator");
        List<DictionaryTypeInfo> dictionaryTypes = dictionaryTypeService.selectExistInfo(id,code,null);
        if (dictionaryTypes.size() > 0){
            msg.setCode("999");
            msg.setMessage("编码重复");
            return msg;
        }
        List<DictionaryTypeInfo> dictionaryTypeInfoList = dictionaryTypeService.selectExistInfo(id,null,text);
        if (dictionaryTypeInfoList.size() > 0){
            msg.setCode("999");
            msg.setMessage("名称重复");
            return msg;
        }
        DictionaryTypeInfo dictionaryTypeInfo = new DictionaryTypeInfo();
        dictionaryTypeInfo.setId(jsonObject.getLong("id"));
        dictionaryTypeInfo.setCode(code);
        dictionaryTypeInfo.setText(text);
        dictionaryTypeInfo.setModifiedby(operator);
        dictionaryTypeInfo.setModifieddate(new Date());
        dictionaryTypeInfo.setDescription(jsonObject.getString("description"));
        dictionaryTypeService.updateById(dictionaryTypeInfo);
        return msg;
    }
    @PostMapping("/deldictionary-types")
    @ApiOperation(value = "删除字典类型", notes = "删除字典类型", response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query",name = "id",value = "id",required = true),
            @ApiImplicitParam(paramType="body",name = "lastmodifiedby",value = "更新人"),
    })
    public Msg delDiactionaryTypeInfo(@ApiParam(value = "id,lastmodifiedby")
                             @RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        DictionaryTypeInfo dictionaryTypeInfo = new DictionaryTypeInfo();
        dictionaryTypeInfo.setId(jsonObject.getLong("id"));
        dictionaryTypeInfo.setModifiedby(jsonObject.getString("lastmodifiedby"));
        dictionaryTypeInfo.setModifieddate(new Date());
        dictionaryTypeInfo.setStatus((byte)0);
        dictionaryTypeService.updateById(dictionaryTypeInfo);
        return msg;
    }
    @GetMapping("/dictionary-items")
    @ApiOperation(value = "获取数据字典详情",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "name",value = "名称"),
            @ApiImplicitParam(name = "dictionaryTypeId",value = "字典类型id"),
    })
    public Msg getDiactionaryItemInfo(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize,
                                      String name,Long dictionaryTypeId){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(name)) {
            condition.put("name", name.trim());
        }
        if (dictionaryTypeId != null){
            condition.put("dictionaryTypeId",dictionaryTypeId);
        }
        pageInfo.setCondition(condition);
        dictionaryItemService.selectDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @GetMapping("/dictionaryAllItems")
    @ApiOperation(value = "获取数据字典详情",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "dictionaryType",value = "字典类型名称"),
    })
    public Msg getDiactionaryItemInfo(String dictionaryType){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        List<DictionaryItemInfo> dictionaryItems = dictionaryItemService.selectByType(dictionaryType);
        msg.setResult(dictionaryItems);
        return msg;
    }
    @PostMapping("/adddictionary-items")
    @ApiOperation(value = "添加数据字典详情",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "text",value = "字典标签",required = true),
            @ApiImplicitParam(name = "value",value = "字典值",required = true),
            @ApiImplicitParam(name = "description",value = "备注"),
            @ApiImplicitParam(name = "dictionaryTypeId",value = "类型id"),
            @ApiImplicitParam(name = "operator",value = "操作人"),
            @ApiImplicitParam(name = "sort",value = "序号"),
            @ApiImplicitParam(name = "status",value = "状态"),
    })
    public Msg addDiactionaryItemInfo(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        String value = jsonObject.getString("value");
        String text = jsonObject.getString("text");
        String operator = jsonObject.getString("operator");
        Long typeid = jsonObject.getLong("dictionaryTypeId");
        if (typeid == null){
            msg.setCode("999");
            msg.setMessage("未选择字典类型");
            return msg;
        }
        DictionaryItemInfo dictionaryExistCode = dictionaryItemService.selctByText(text);
        if (dictionaryExistCode != null){
            msg.setCode("999");
            msg.setMessage("字典标签已存在");
            return msg;
        }
        DictionaryItemInfo dictionaryExistText = dictionaryItemService.selctByValue(value);
        if (dictionaryExistText != null){
            msg.setCode("999");
            msg.setMessage("字典值已存在");
            return msg;
        }
        DictionaryItemInfo dictionaryItemInfo = new DictionaryItemInfo();
        dictionaryItemInfo.setTypeid(typeid);
        dictionaryItemInfo.setValue(value);
        dictionaryItemInfo.setStatus(jsonObject.getByte("status"));
        dictionaryItemInfo.setText(text);
        dictionaryItemInfo.setSort(jsonObject.getInteger("sort"));
        dictionaryItemInfo.setCreatedby(operator);
        dictionaryItemInfo.setCreateddate(new Date());
        dictionaryItemInfo.setModifiedby(operator);
        dictionaryItemInfo.setModifieddate(new Date());
        dictionaryItemInfo.setDescription(jsonObject.getString("description"));
        dictionaryItemService.save(dictionaryItemInfo);
        return msg;
    }
    @PostMapping("/putdictionary-items")
    @ApiOperation(value = "修改字典详情",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "id",required = true),
            @ApiImplicitParam(name = "text",value = "字典标签",required = true),
            @ApiImplicitParam(name = "value",value = "字典值",required = true),
            @ApiImplicitParam(name = "description",value = "备注"),
            @ApiImplicitParam(name = "operator",value = "操作人"),
            @ApiImplicitParam(name = "sort",value = "序号"),
            @ApiImplicitParam(name = "status",value = "状态"),
    })
    public Msg putDiactionaryItemfo(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        Long id = jsonObject.getLong("id");
        String value = jsonObject.getString("value");
        String text = jsonObject.getString("text");
        String operator = jsonObject.getString("operator");
        List<DictionaryTypeInfo> dictionaryTypes = dictionaryItemService.selectExistInfo(id,value,null);
        if (dictionaryTypes.size() > 0){
            msg.setCode("999");
            msg.setMessage("字典值重复");
            return msg;
        }
        List<DictionaryTypeInfo> dictionaryTypeInfoList = dictionaryItemService.selectExistInfo(id,null,text);
        if (dictionaryTypeInfoList.size() > 0){
            msg.setCode("999");
            msg.setMessage("字典标签重复");
            return msg;
        }
        DictionaryItemInfo dictionaryItemInfo = new DictionaryItemInfo();
        dictionaryItemInfo.setId(id);
        dictionaryItemInfo.setValue(value);
        dictionaryItemInfo.setStatus(jsonObject.getByte("status"));
        dictionaryItemInfo.setText(text);
        dictionaryItemInfo.setSort(jsonObject.getInteger("sort"));
        dictionaryItemInfo.setModifiedby(operator);
        dictionaryItemInfo.setModifieddate(new Date());
        dictionaryItemInfo.setDescription(jsonObject.getString("description"));
        dictionaryItemService.updateById(dictionaryItemInfo);
        return msg;
    }
    @PostMapping("/deldictionary-items")
    @ApiOperation(value = "删除字典详情", notes = "删除字典详情", response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query",name = "id",value = "id",required = true),
            @ApiImplicitParam(paramType="body",name = "lastmodifiedby",value = "更新人"),
    })
    public Msg delDiactionaryItemInfo(@ApiParam(value = "id,lastmodifiedby")
                                      @RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        DictionaryItemInfo dictionaryTypeInfo = new DictionaryItemInfo();
        dictionaryTypeInfo.setId(jsonObject.getLong("id"));
        dictionaryItemService.removeById(dictionaryTypeInfo);
        return msg;
    }
}
src/main/java/com/gk/firework/Controller/EnterpriseController.java
对比新文件
@@ -0,0 +1,1128 @@
package com.gk.firework.Controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.*;
import com.gk.firework.Domain.Enum.DocumentType;
import com.gk.firework.Domain.Enum.EnterpriseSafetySupervision;
import com.gk.firework.Domain.Enum.PersonnelCategory;
import com.gk.firework.Domain.Exception.BusinessException;
import com.gk.firework.Domain.Utils.*;
import com.gk.firework.Domain.Vo.*;
import com.gk.firework.Scheduls.Task.CheckEnterpriseTask;
import com.gk.firework.Service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.Map;
import java.util.List;
import java.util.ArrayList;
import java.util.List;
import static com.gk.firework.Domain.Enum.ErrorCode.ERROR_10001;
@Api(tags = "企业信息接口")
@RequestMapping("/enterprise")
@RestController
public class EnterpriseController extends BaseController {
    @Autowired
    private EnterpriseService enterpriseService;
    @Autowired
    private EnterpriseApplyService enterpriseApplyService;
    @Autowired
    private EnterpriseLicenseService enterpriseLicenseService;
    @Autowired
    private EnterpriseWarehouseService enterpriseWarehouseService;
    @Autowired
    private EnterpriseStandardizationService enterpriseStandardizationService;
    @Autowired
    private EnterprisePersonService enterprisePersonService;
    @Autowired
    private EnterpriseAnnualService enterpriseAnnualService;
    @Autowired
    private EnterpriseDocumentService enterpriseDocumentService;
    @Autowired
    private SecuritySupervisoryService securitySupervisoryService;
    @Autowired
    private EnterpriseFeedService enterpriseFeedService;
    @Autowired
    private UserService userService;
    /**
     * @Description: 企业基本信息
     * @date 2021/3/24 9:50
     */
    @PostMapping(value = "/list")
    @ApiOperation(value = "企业基本信息", notes = "分页查询", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex", value = "当前页面索引", required = true),
            @ApiImplicitParam(name = "pageSize", value = "页面个数", required = true),
            @ApiImplicitParam(name = "filter.safetysupervision", value = "安全监管分类", required = true),
            @ApiImplicitParam(name = "filter.economicIndustry", value = "国民经济行业分类", required = true),
            @ApiImplicitParam(name = "filter.enterprisename", value = "企业名称", required = true),
            @ApiImplicitParam(name = "filter.valid", value = "有效期(0,1)", required = true),
            @ApiImplicitParam(name = "filter.province", value = "省", required = true),
            @ApiImplicitParam(name = "filter.city", value = "市", required = true),
            @ApiImplicitParam(name = "filter.district", value = "区", required = true),
            @ApiImplicitParam(name = "filter.street", value = "街道", required = true),
            @ApiImplicitParam(name = "filter.committee", value = "委员会", required = true),
    })
    Object list(@RequestBody FilterObject enterpriseFilter) {
        Integer pageIndex = enterpriseFilter.getPageIndex();
        Integer pageSize = enterpriseFilter.getPageSize();
        IPage<Enterprise> iPage = enterpriseService.selectEnterprise(new Page<>(pageIndex, pageSize), enterpriseFilter.getFilter(), getUser());
        return success(iPage);
    }
    @PostMapping(value = "/parentList")
    @ApiOperation(value = "选择上级企业信息简单查询", notes = "分页查询", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex", value = "当前页面索引", required = true),
            @ApiImplicitParam(name = "pageSize", value = "页面个数", required = true),
            @ApiImplicitParam(name = "filter.province", value = "省", required = true),
            @ApiImplicitParam(name = "filter.city", value = "市", required = true),
            @ApiImplicitParam(name = "filter.district", value = "区", required = true),
            @ApiImplicitParam(name = "filter.street", value = "街道", required = true),
            @ApiImplicitParam(name = "filter.committee", value = "委员会", required = true),
            @ApiImplicitParam(name = "filter.enterprisename", value = "企业名称", required = true),
    })
    Object parentList(@RequestBody FilterObject enterpriseFilter) {
        Integer pageIndex = enterpriseFilter.getPageIndex();
        Integer pageSize = enterpriseFilter.getPageSize();
        IPage<Enterprise> iPage = enterpriseService.selectParentEnterprise(new Page<>(pageIndex, pageSize), enterpriseFilter.getFilter());
        return success(iPage);
    }
    @GetMapping(value = "/list-underSupervision")
    @ApiOperation(value = "监管部门下的所有企业", notes = "分页查询", httpMethod = "GET")
    Object enterpriseList(@RequestParam Integer type) {
        List<Enterprise> data = enterpriseService.selectListUnderSupervision(type,getUser());
        return success(data);
    }
    @GetMapping(value = "/applyList")
    @ApiOperation(value = "申请查询", notes = "分页查询", httpMethod = "GET")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex", value = "当前页面索引", required = true),
            @ApiImplicitParam(name = "pageSize", value = "页面个数", required = true),
    })
    Object applyList(EnterpriseApply enterpriseApplyFilter, Integer pageIndex, Integer pageSize) {
        UserInfo user = getUser();
        IPage<EnterpriseApply> iPage = enterpriseApplyService.selectEnterpriseApply(new Page<>(pageIndex, pageSize), enterpriseApplyFilter, user);
        return success(iPage);
    }
    @PostMapping(value = "/addApply")
    @ApiOperation(value = "修改", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "commitstatus", value = "提交状态(0,1) 0是删除,1是修改", required = true),
            @ApiImplicitParam(name = "parentid", value = "修改|删除单子的id ", required = true),
            @ApiImplicitParam(name = "safetysupervision", value = "安全监管分类(不可修改)"),
            @ApiImplicitParam(name = "economicindustry", value = "国民经济行业分类", required = true),
            @ApiImplicitParam(name = "enterprisenumber", value = "单位编号"),
            @ApiImplicitParam(name = "enterprisename", value = "企业名称"),
            @ApiImplicitParam(name = "enterpriseemail", value = "电子邮箱"),
            @ApiImplicitParam(name = "enterprisesize", value = "企业规模"),
            @ApiImplicitParam(name = "enterprisestatus", value = "企业状态"),
            @ApiImplicitParam(name = "department", value = "行政主管部门"),
            @ApiImplicitParam(name = "devicenumber", value = "设备编号"),
            @ApiImplicitParam(name = "officeaddress", value = "单位办公地址"),
            @ApiImplicitParam(name = "province", value = "省"),
            @ApiImplicitParam(name = "city", value = "市"),
            @ApiImplicitParam(name = "district", value = "区"),
            @ApiImplicitParam(name = "street", value = "街道"),
            @ApiImplicitParam(name = "committee", value = "委员会"),
            @ApiImplicitParam(name = "securitysupervisory", value = "治安主管单位"),
            @ApiImplicitParam(name = "officephone", value = "办公电话"),
            @ApiImplicitParam(name = "faxphone", value = "传真电话"),
            @ApiImplicitParam(name = "registeraddress", value = "单位注册地址"),
            @ApiImplicitParam(name = "registertype", value = "注册类型"),
            @ApiImplicitParam(name = "establishtime", value = "成立时间"),
            @ApiImplicitParam(name = "qqnumber", value = "qq号码"),
            @ApiImplicitParam(name = "postcode", value = "邮编"),
            @ApiImplicitParam(name = "roomnumber", value = "工房数量"),
            @ApiImplicitParam(name = "economictype", value = "国民经济类型"),
            @ApiImplicitParam(name = "productioncontent", value = "生产经营项目"),
            @ApiImplicitParam(name = "businessregisternumber", value = "工商注册号"),
            @ApiImplicitParam(name = "organizationstructurecode", value = "组织结构代码"),
            @ApiImplicitParam(name = "validstarttime", value = "有效期开始时间"),
            @ApiImplicitParam(name = "validendtime", value = "有效期结束时间"),
            @ApiImplicitParam(name = "employeenumber", value = "从业人数"),
            @ApiImplicitParam(name = "ispaysafetyinsurance", value = "是否缴纳安全责任险"),
            @ApiImplicitParam(name = "insurancecontractnumber", value = "保险合同号码(保单号) "),
            @ApiImplicitParam(name = "insureamount", value = "投保金额 "),
            @ApiImplicitParam(name = "insurestarttime", value = "投保有效期开始时间"),
            @ApiImplicitParam(name = "insureendtime", value = "投保有效期结束时间 "),
            @ApiImplicitParam(name = "ismajorhazard", value = "是否有重大危险源 "),
            @ApiImplicitParam(name = "isspecialequipment", value = "是否有特种设备 "),
            @ApiImplicitParam(name = "isoccupationalhealthinfo", value = "是否有职业卫生信息 "),
            @ApiImplicitParam(name = "isspecialpersonnel", value = "是否有特种人员 "),
            @ApiImplicitParam(name = "selfrecordingcycle", value = "自查记录周期 "),
            @ApiImplicitParam(name = "isparententerprise", value = "是否有上级企业 "),
            @ApiImplicitParam(name = "parententerpriseid", value = "上级企业id "),
            @ApiImplicitParam(name = "parententerprisename", value = "上级企业名称 "),
            @ApiImplicitParam(name = "infostatus", value = "信息状态 "),
            @ApiImplicitParam(name = "infoupdateby", value = "创建用户(前端cookie获取用户id)"),
            @ApiImplicitParam(name = "infocreatebyname", value = "信息创建人(前端cookie获取用户姓名)"),
            @ApiImplicitParam(name = "legalrepresentative", value = "法定代表人信息(json字符串)"),
            @ApiImplicitParam(name = "mainprincipal", value = "主要负责人(json字符串)"),
            @ApiImplicitParam(name = "securityofficer", value = "安全负责人(json字符串)"),
            @ApiImplicitParam(name = "informationofficer", value = "信息员(json字符串)"),
            @ApiImplicitParam(name = "enterpriselocation", value = "单位坐标"),
    })
    Object addApply(@RequestBody EnterpriseApply enterpriseApply) {
        Msg msg = new Msg();
        msg.setCode("200");
        try {
            enterpriseService.addApply(enterpriseApply, getUser());
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
        msg.setResult(enterpriseApply);
        return msg;
    }
    @PostMapping(value = "/addEnterprise")
    @ApiOperation(value = "新增企业信息", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "safetysupervision", value = "安全监管分类", required = true),
            @ApiImplicitParam(name = "economicindustry", value = "国民经济行业分类", required = true),
            @ApiImplicitParam(name = "enterprisenumber", value = "单位编号"),
            @ApiImplicitParam(name = "enterprisename", value = "企业名称"),
            @ApiImplicitParam(name = "enterpriseemail", value = "电子邮箱"),
            @ApiImplicitParam(name = "enterprisesize", value = "企业规模"),
            @ApiImplicitParam(name = "enterprisestatus", value = "企业状态"),
            @ApiImplicitParam(name = "department", value = "行政主管部门"),
            @ApiImplicitParam(name = "devicenumber", value = "设备编号"),
            @ApiImplicitParam(name = "officeaddress", value = "单位办公地址"),
            @ApiImplicitParam(name = "province", value = "省"),
            @ApiImplicitParam(name = "city", value = "市"),
            @ApiImplicitParam(name = "district", value = "区"),
            @ApiImplicitParam(name = "street", value = "街道"),
            @ApiImplicitParam(name = "committee", value = "委员会"),
            @ApiImplicitParam(name = "securitysupervisory", value = "治安主管单位"),
            @ApiImplicitParam(name = "officephone", value = "办公电话"),
            @ApiImplicitParam(name = "faxphone", value = "传真电话"),
            @ApiImplicitParam(name = "registeraddress", value = "单位注册地址"),
            @ApiImplicitParam(name = "registertype", value = "注册类型"),
            @ApiImplicitParam(name = "establishtime", value = "成立时间"),
            @ApiImplicitParam(name = "qqnumber", value = "qq号码"),
            @ApiImplicitParam(name = "postcode", value = "邮编"),
            @ApiImplicitParam(name = "roomnumber", value = "工房数量"),
            @ApiImplicitParam(name = "economictype", value = "国民经济类型"),
            @ApiImplicitParam(name = "productioncontent", value = "生产经营项目"),
            @ApiImplicitParam(name = "businessregisternumber", value = "工商注册号"),
            @ApiImplicitParam(name = "organizationstructurecode", value = "组织结构代码"),
            @ApiImplicitParam(name = "validstarttime", value = "有效期开始时间"),
            @ApiImplicitParam(name = "validendtime", value = "有效期结束时间"),
            @ApiImplicitParam(name = "employeenumber", value = "从业人数"),
            @ApiImplicitParam(name = "ispaysafetyinsurance", value = "是否缴纳安全责任险"),
            @ApiImplicitParam(name = "insurancecontractnumber", value = "保险合同号码(保单号) "),
            @ApiImplicitParam(name = "insureamount", value = "投保金额 "),
            @ApiImplicitParam(name = "insurestarttime", value = "投保有效期开始时间"),
            @ApiImplicitParam(name = "insureendtime", value = "投保有效期结束时间 "),
            @ApiImplicitParam(name = "ismajorhazard", value = "是否有重大危险源 "),
            @ApiImplicitParam(name = "isspecialequipment", value = "是否有特种设备 "),
            @ApiImplicitParam(name = "isoccupationalhealthinfo", value = "是否有职业卫生信息 "),
            @ApiImplicitParam(name = "isspecialpersonnel", value = "是否有特种人员 "),
            @ApiImplicitParam(name = "selfrecordingcycle", value = "自查记录周期 "),
            @ApiImplicitParam(name = "isparententerprise", value = "是否有上级企业 "),
            @ApiImplicitParam(name = "parententerpriseid", value = "上级企业id "),
            @ApiImplicitParam(name = "parententerprisename", value = "上级企业名称 "),
            @ApiImplicitParam(name = "infostatus", value = "信息状态 "),
            @ApiImplicitParam(name = "legalrepresentative", value = "法定代表人信息(json字符串)"),
            @ApiImplicitParam(name = "mainprincipal", value = "主要负责人(json字符串)"),
            @ApiImplicitParam(name = "securityofficer", value = "安全负责人(json字符串)"),
            @ApiImplicitParam(name = "informationofficer", value = "信息员(json字符串)"),
            @ApiImplicitParam(name = "enterpriselocation", value = "单位坐标"),
    })
    Object addEnterprise(@RequestBody Enterprise enterprise) {
        enterpriseService.checkAddEnterprise(enterprise, true);
        enterpriseService.addEnterprise(enterprise,getUser());
        return success();
    }
    @PostMapping(value = "/modEnterprise")
    @ApiOperation(value = "修改企业信息",httpMethod = "PUT")
    Object modEnterprise(@RequestBody Enterprise enterprise) {
        enterpriseService.checkModEnterprise(enterprise);
        enterpriseService.modEnterprise(enterprise,getUser());
        return success();
    }
    @PostMapping(value = "/delEnterprise")
    @ApiOperation(value = "删除企业信息",httpMethod = "DELETE")
    @ApiImplicitParam(name = "id",value = "企业id")
    Object delEnterprise(@RequestParam Long id) {
        enterpriseService.delEnterprise(id,getUser());
        return success();
    }
    @PostMapping(value = "/deactivateEnterprise")
    @ApiOperation(value = "停用企业信息",httpMethod = "POST")
    @ApiImplicitParam(name = "id",value = "企业id")
    Object deactivateEnterprise(@RequestParam Long id) {
        enterpriseService.deactivateEnterprise(id,null,getUser());
        return success();
    }
    @PostMapping(value = "/activateEnterprise")
    @ApiOperation(value = "启用企业信息",httpMethod = "POST")
    @ApiImplicitParam(name = "id",value = "企业id")
    Object activateEnterprise(@RequestParam Long id) {
        enterpriseService.activateEnterprise(id,null,getUser());
        return success();
    }
    /**
     * @Description: 许可证照信息
     * @date 2021/3/24 9:50
     */
    @PostMapping(value = "/addLicense")
    @ApiOperation(value = "新增许可证书",httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "许可证id(不传)"),
            @ApiImplicitParam(name = "licensenumber",value = "许可证编号",required = true),
            @ApiImplicitParam(name = "licensename",value = "许可证名称",required = true),
            @ApiImplicitParam(name = "authority",value = "发证机关"),
            @ApiImplicitParam(name = "ranges",value = "许可范围"),
            @ApiImplicitParam(name = "validstarttime",value = "有效开始时间"),
            @ApiImplicitParam(name = "validendtime",value = "有效结束时间"),
            @ApiImplicitParam(name = "imgids",value = "删除图片id的list"),
            @ApiImplicitParam(name = "file",value = "上传的文件"),
            @ApiImplicitParam(name = "enterpriseid",value = "企业信息id",required = true),
    })
    Object addEnterpriseLicense(EnterpriseLicenseVo enterpriseLicenseVo) {
        Msg msg = new Msg();
        msg.setCode("200");
        try {
            enterpriseLicenseService.checkEnterpriseLicense(enterpriseLicenseVo);
            enterpriseLicenseService.addEnterpriseLicense(enterpriseLicenseVo,getUser());
        } catch (BusinessException e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage(e.getMessage());
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage("发生错误,请联系管理员");
        }
        return msg;
    }
    @PostMapping(value = "/modLicense")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "许可证id(必传)", required = true),
            @ApiImplicitParam(name = "licensenumber", value = "许可证编号", required = true),
            @ApiImplicitParam(name = "licensename", value = "许可证名称", required = true),
            @ApiImplicitParam(name = "authority", value = "发证机关"),
            @ApiImplicitParam(name = "ranges", value = "许可范围"),
            @ApiImplicitParam(name = "validstarttime", value = "有效开始时间"),
            @ApiImplicitParam(name = "validendtime", value = "有效结束时间"),
            @ApiImplicitParam(name = "imgids", value = "删除图片id的list"),
            @ApiImplicitParam(name = "file", value = "上传的文件"),
            @ApiImplicitParam(name = "enterpriseid", value = "企业信息id", required = true),
    })
    @ApiOperation(value = "修改许可证书", httpMethod = "PUT")
    Object modEnterpriseLicense(EnterpriseLicenseVo enterpriseLicenseVo) {
        Msg msg = new Msg();
        msg.setCode("200");
        try {
            enterpriseLicenseService.checkEnterpriseLicense(enterpriseLicenseVo);
            enterpriseLicenseService.modEnterpriseLicense(enterpriseLicenseVo, getUser());
        } catch (BusinessException e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage(e.getMessage());
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage("发生错误,请联系管理员");
        }
        return msg;
    }
    @PostMapping(value = "/delLicense")
    @ApiOperation(value = "删除许可证书",httpMethod = "PUT")
    @ApiImplicitParam(name = "id", value = "许可证id", required = true)
    Object delEnterpriseLicense(@RequestParam Long id) {
        enterpriseLicenseService.delEnterpriseLicense(id,getUser());
        return success();
    }
    @GetMapping(value = "/licenseList")
    @ApiOperation(value = "获取企业信息的所有许可证",httpMethod = "GET")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "企业id", required = true),
            @ApiImplicitParam(name = "pageIndex",value = "当前页码",required = true),
            @ApiImplicitParam(name = "pageSize",value = "页面大小",required = true),
    })
    Object licenseList(@RequestParam Long id,
                       @RequestParam Integer pageIndex,
                       @RequestParam Integer pageSize) {
        IPage<EnterpriseLicense> iPage = enterpriseLicenseService.selectPage(id, new Page<>(pageIndex, pageSize));
        return success(iPage);
    }
    /**
    * @Description: 治安主管单位信息
    * @date 2021/3/24 11:02
    */
    @PostMapping(value = "/securitySupervisoryList")
    @ApiOperation(value = "治安主管单位信息获取",httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "治安主管单位名称"),
            @ApiImplicitParam(name = "pageIndex",value = "当前页码",required = true),
            @ApiImplicitParam(name = "pageSize",value = "页面大小",required = true),
    })
    Object securitySupervisoryList(@RequestBody(required = false) JSONObject filter,
                                   @RequestParam Integer pageIndex,
                                   @RequestParam Integer pageSize) {
        String name = null;
        if (filter != null)
            name = filter.getString("name");
        IPage iPage = securitySupervisoryService.selectPage(new Page<>(pageIndex, pageSize),name);
        return success(iPage);
    }
    /**
     * @Description: 存储库房
     * @date 2021/3/25 9:04
     */
    @GetMapping(value = "/enterpriseWarehouseList")
    @ApiOperation(value = "存储库房列表",httpMethod = "GET")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "企业id", required = true),
            @ApiImplicitParam(name = "pageIndex",value = "当前页码",required = true),
            @ApiImplicitParam(name = "pageSize",value = "页面大小",required = true),
    })
    Object enterpriseWarehouseList(@RequestParam Long id,
                                   @RequestParam Integer pageIndex,
                                   @RequestParam Integer pageSize) {
        IPage iPage = enterpriseWarehouseService.selectPage(new Page<>(pageIndex, pageSize), id);
        return success(iPage);
    }
    @PostMapping(value = "/addEnterpriseWarehouse")
    @ApiOperation(value = "新增库房信息",httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "库房id(不传)"),
            @ApiImplicitParam(name = "bulidingnumber",value = "栋号"),
            @ApiImplicitParam(name = "dangerlevel",value = "危险等级"),
            @ApiImplicitParam(name = "area",value = "面积(m2)"),
            @ApiImplicitParam(name = "limits",value = "限制人数"),
            @ApiImplicitParam(name = "safetyperson",value = "安全责任人"),
            @ApiImplicitParam(name = "imgids", value = "删除图片id的list"),
            @ApiImplicitParam(name = "holdinventory", value = "可容纳库存(箱)"),
            @ApiImplicitParam(name = "file", value = "上传的文件"),
            @ApiImplicitParam(name = "enterpriseid", value = "企业信息id", required = true),
    })
    Object addEnterpriseWarehouse(EnterpriseWarehouseVo enterpriseLicenseVo){
        Msg msg = new Msg();
        msg.setCode("200");
        try {
            enterpriseWarehouseService.checkEnterpriseWarehouse(enterpriseLicenseVo);
            enterpriseWarehouseService.addEnterpriseWarehouse(enterpriseLicenseVo,getUser());
        } catch (BusinessException e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage(e.getMessage());
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage("发生错误,请联系管理员");
        }
        return msg;
    }
    @PostMapping(value = "/modEnterpriseWarehouse")
    @ApiOperation(value = "修改库房信息", httpMethod = "PUT")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "库房id(必传)", required = true),
            @ApiImplicitParam(name = "bulidingnumber", value = "栋号"),
            @ApiImplicitParam(name = "dangerlevel", value = "危险等级"),
            @ApiImplicitParam(name = "area", value = "面积(m2)"),
            @ApiImplicitParam(name = "limits", value = "限制人数"),
            @ApiImplicitParam(name = "safetyperson", value = "安全责任人"),
            @ApiImplicitParam(name = "imgids", value = "删除图片id的list"),
            @ApiImplicitParam(name = "holdinventory", value = "可容纳库存(箱)"),
            @ApiImplicitParam(name = "file", value = "上传的文件"),
            @ApiImplicitParam(name = "enterpriseid", value = "企业信息id", required = true),
    })
    Object modEnterpriseWarehouse(EnterpriseWarehouseVo enterpriseLicenseVo) {
        Msg msg = new Msg();
        msg.setCode("200");
        try {
            enterpriseWarehouseService.checkEnterpriseWarehouse(enterpriseLicenseVo);
            enterpriseWarehouseService.modEnterpriseWarehouse(enterpriseLicenseVo, getUser());
        } catch (BusinessException e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage(e.getMessage());
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage("发生错误,请联系管理员");
        }
        return msg;
    }
    @PostMapping(value = "/delEnterpriseWarehouse")
    @ApiOperation(value = "删除库房信息",httpMethod = "DELETE")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "库房id必传", required = true),
    })
    Object delEnterpriseWarehouse(@RequestParam Long id) {
        enterpriseWarehouseService.delEnterpriseWarehouse(id,getUser());
        return success();
    }
    /**
     * @Description: 安全生产标准化
     * @date 2021/3/25 9:58
     */
    @GetMapping(value = "/enterpriseStandardizationList")
    @ApiOperation(value = "安全生产标准化信息", httpMethod = "GET")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "企业id必传", required = true),
            @ApiImplicitParam(name = "pageIndex", value = "当前页码", required = true),
            @ApiImplicitParam(name = "pageSize", value = "页面大小", required = true),
    })
    Object enterpriseStandardizationList(@RequestParam Long id) {
        EnterpriseStandardization one = enterpriseStandardizationService.getOne(id);
        return success(one);
    }
    @PostMapping(value = "/addEnterpriseStandardization")
    @ApiOperation(value = "新增安全生产标准化信息", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "安全生产标准化信息id(不传)"),
            @ApiImplicitParam(name = "level", value = "标准化级别"),
            @ApiImplicitParam(name = "licensenumber", value = "证书编号"),
            @ApiImplicitParam(name = "reviewunit", value = "评审单位"),
            @ApiImplicitParam(name = "licensingunit", value = "发牌单位"),
            @ApiImplicitParam(name = "score", value = "考核得分"),
            @ApiImplicitParam(name = "imgids", value = "删除图片id的list"),
            @ApiImplicitParam(name = "validstarttime", value = "有效开始时间"),
            @ApiImplicitParam(name = "validendtime", value = "validendtime"),
            @ApiImplicitParam(name = "imgids", value = "删除图片id的list"),
            @ApiImplicitParam(name = "file", value = "上传的文件"),
            @ApiImplicitParam(name = "enterpriseid", value = "企业id", required = true),
    })
    Object addEnterpriseStandardization(EnterpriseStandardizationVo enterpriseStandardizationVo) {
        Msg msg = new Msg();
        msg.setCode("200");
        try {
            enterpriseStandardizationService.checkEnterpriseStandardization(enterpriseStandardizationVo);
            enterpriseStandardizationService.addEnterpriseStandardization(enterpriseStandardizationVo, getUser());
        } catch (BusinessException e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage(e.getMessage());
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage("发生错误,请联系管理员");
        }
        return msg;
    }
    @PostMapping(value = "/modEnterpriseStandardization")
    @ApiOperation(value = "修改安全生产标准化信息",httpMethod = "PUT")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "安全生产标准化信息id(必传)",required = true),
            @ApiImplicitParam(name = "level", value = "标准化级别"),
            @ApiImplicitParam(name = "licensenumber", value = "证书编号"),
            @ApiImplicitParam(name = "reviewunit", value = "评审单位"),
            @ApiImplicitParam(name = "licensingunit", value = "发牌单位"),
            @ApiImplicitParam(name = "score", value = "考核得分"),
            @ApiImplicitParam(name = "imgids", value = "删除图片id的list"),
            @ApiImplicitParam(name = "validstarttime", value = "有效开始时间"),
            @ApiImplicitParam(name = "validendtime", value = "validendtime"),
            @ApiImplicitParam(name = "imgids", value = "删除图片id的list"),
            @ApiImplicitParam(name = "file", value = "上传的文件"),
            @ApiImplicitParam(name = "enterpriseid", value = "企业id", required = true),
    })
    Object modEnterpriseStandardization(EnterpriseStandardizationVo enterpriseStandardizationVo){
        Msg msg = new Msg();
        msg.setCode("200");
        try {
            enterpriseStandardizationService.checkEnterpriseStandardization(enterpriseStandardizationVo);
            enterpriseStandardizationService.modEnterpriseStandardization(enterpriseStandardizationVo,getUser());
        } catch (BusinessException e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage(e.getMessage());
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage("发生错误,请联系管理员");
        }
        return msg;
    }
    @PostMapping(value = "/delEnterpriseStandardization")
    @ApiOperation(value = "删除安全生产标准化信息",httpMethod = "DELETE")
    @ApiImplicitParam(name = "id", value = "安全生产标准化信息id(必传)", required = true)
    Object delEnterpriseStandardization(@RequestParam Long id){
        enterpriseStandardizationService.delEnterpriseStandardization(id,getUser());
        return success();
    }
    /**
     * @Description: 安全人员资格|特种人员资格
     * @date 2021/3/26 10:57
     */
    @GetMapping(value = "/enterprisePerson")
    @ApiOperation(value = "安全人员资格|特种人员资格信息查询", httpMethod = "GET")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "企业id(必传)", required = true),
            @ApiImplicitParam(name = "category", value = "人员种类(SECURITY,SPECIAL)", required = true),
            @ApiImplicitParam(name = "pageIndex", value = "当前页码", required = true),
            @ApiImplicitParam(name = "pageSize", value = "页面大小", required = true),
    })
    Object enterprisePersonList(@RequestParam Long id,
                                @RequestParam PersonnelCategory category,
                                @RequestParam Integer pageIndex,
                                @RequestParam Integer pageSize) {
        IPage page = enterprisePersonService.selectPage(new Page<>(pageIndex, pageSize), id, category);
        return success(page);
    }
    @PostMapping(value = "/addenterprisePerson")
    @ApiOperation(value = "新增人员", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "人员id(不传)"),
            @ApiImplicitParam(name = "name", value = "姓名", required = true),
            @ApiImplicitParam(name = "post", value = "职务", required = true),
            @ApiImplicitParam(name = "number", value = "证书编号", required = true),
            @ApiImplicitParam(name = "validstarttime", value = "有效开始时间"),
            @ApiImplicitParam(name = "validendtime", value = "有效结束时间"),
            @ApiImplicitParam(name = "memo", value = "备注"),
            @ApiImplicitParam(name = "isreview", value = "是否复检"),
            @ApiImplicitParam(name = "imgids", value = "删除图片id的list"),
            @ApiImplicitParam(name = "file", value = "上传的文件"),
            @ApiImplicitParam(name = "enterpriseid", value = "企业id", required = true),
    })
    Object addEnterprisePerson(EnterprisePersonVo enterprisePersonVo) {
            Msg msg = new Msg();
            msg.setCode("200");
        try {
            enterprisePersonService.checkEnterprisePerson(enterprisePersonVo);
            enterprisePersonService.addEnterprisePerson(enterprisePersonVo, getUser());
        } catch (BusinessException e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage(e.getMessage());
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage("发生错误,请联系管理员");
        }
        return msg;
    }
    @PostMapping(value = "/putenterprisePerson")
    @ApiOperation(value = "修改人员", httpMethod = "PUT")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "人员id(必传)", required = true),
            @ApiImplicitParam(name = "name", value = "姓名", required = true),
            @ApiImplicitParam(name = "post", value = "职务", required = true),
            @ApiImplicitParam(name = "number", value = "证书编号", required = true),
            @ApiImplicitParam(name = "validstarttime", value = "有效开始时间"),
            @ApiImplicitParam(name = "validendtime", value = "有效结束时间"),
            @ApiImplicitParam(name = "memo", value = "备注"),
            @ApiImplicitParam(name = "isreview", value = "是否复检"),
            @ApiImplicitParam(name = "imgids", value = "删除图片id的list"),
            @ApiImplicitParam(name = "file", value = "上传的文件"),
            @ApiImplicitParam(name = "enterpriseid", value = "企业id", required = true),
    })
    Object modEnterprisePerson(EnterprisePersonVo enterprisePersonVo) {
        Msg msg = new Msg();
        msg.setCode("200");
        try {
            enterprisePersonService.checkEnterprisePerson(enterprisePersonVo);
            enterprisePersonService.modEnterprisePerson(enterprisePersonVo, getUser());
        } catch (BusinessException e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage(e.getMessage());
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage("发生错误,请联系管理员");
        }
        return msg;
    }
    @PostMapping(value = "/delenterprisePerson")
    @ApiOperation(value = "删除人员", httpMethod = "DELETE")
    @ApiImplicitParam(name = "id", value = "id必传", required = true)
    Object delEnterprisePerson(@RequestParam Long id) {
        enterprisePersonService.delEnterprisePerson(id, getUser());
        return success();
    }
    /**
    * @Description: 年度库存
    * @date 2021/3/26 15:05
    */
    @GetMapping(value = "/annual")
    @ApiOperation(value = "年度库存", httpMethod = "GET")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "企业id必传", required = true),
            @ApiImplicitParam(name = "pageIndex", value = "当前页码", required = true),
            @ApiImplicitParam(name = "pageSize", value = "页面大小", required = true),
    })
    Object enterprisePersonList(@RequestParam Long id,
                                @RequestParam Integer pageIndex,
                                @RequestParam Integer pageSize) {
        IPage page = enterpriseAnnualService.selectPage(new Page<>(pageIndex, pageSize), id);
        return success(page);
    }
    @PostMapping(value = "/addannual")
    @ApiOperation(value = "新增年度库存", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "year", value = "年度", required = true),
            @ApiImplicitParam(name = "amount", value = "当前页码", required = true),
            @ApiImplicitParam(name = "type", value = "类别", required = true),
    })
    Object addEnterpriseAnnual(@RequestBody EnterpriseAnnual enterpriseAnnual) {
        enterpriseAnnualService.checkEnterpriseAnnual(enterpriseAnnual);
        enterpriseAnnualService.addEnterpriseAnnual(enterpriseAnnual,getUser());
        return success();
    }
    @PostMapping(value = "/putannual")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "年度库存id(必传)", required = true),
            @ApiImplicitParam(name = "year", value = "年度", required = true),
            @ApiImplicitParam(name = "amount", value = "当前页码", required = true),
            @ApiImplicitParam(name = "type", value = "类别", required = true),
    })
    @ApiOperation(value = "修改年度库存", httpMethod = "PUT")
    Object modEnterpriseAnnual(@RequestBody EnterpriseAnnual enterpriseAnnual) {
        enterpriseAnnualService.checkEnterpriseAnnual(enterpriseAnnual);
        enterpriseAnnualService.modEnterpriseAnnual(enterpriseAnnual,getUser());
        return success();
    }
    @PostMapping(value = "/delannual")
    @ApiOperation(value = "删除年度库存", httpMethod = "DELETE")
    @ApiImplicitParam(name = "id", value = "年度库存id(必传)", required = true)
    Object delEnterpriseAnnual(@RequestParam Long id) {
        enterpriseAnnualService.delEnterpriseAnnual(id,getUser());
        return success();
    }
    /**
    * @Description: 应急救援预案 | 流向信息管理承诺书
    * @author celin
    * @date 2021/3/26 19:08
    */
    @GetMapping(value = "/document")
    @ApiOperation(value = "预案|承诺书", httpMethod = "GET")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "企业id",required = true),
            @ApiImplicitParam(name = "type",value = "文件种类(RESCUE,FLOW)->救援和流向",required = true),
            @ApiImplicitParam(name = "pageIndex", value = "当前页码", required = true),
            @ApiImplicitParam(name = "pageSize", value = "页面大小", required = true),
    })
    Object documentList(@RequestParam Long id,
                        @RequestParam DocumentType type,
                                @RequestParam Integer pageIndex,
                                @RequestParam Integer pageSize) {
        IPage page = enterpriseDocumentService.selectPage(new Page<>(pageIndex, pageSize), id,type);
        return success(page);
    }
    @PostMapping(value = "/adddocument")
    @ApiOperation(value = "新增预案|承诺书", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "预案|承诺书id(不传)"),
            @ApiImplicitParam(name = "name",value = "文件种类(0,1)->救援和流向",required = true),
            @ApiImplicitParam(name = "memo",value = "备注"),
            @ApiImplicitParam(name = "ids", value = "删除文档id的list"),
            @ApiImplicitParam(name = "file", value = "上传的文件"),
            @ApiImplicitParam(name = "enterpriseid", value = "企业id", required = true),
    })
    Object addDocument( EnterpriseDocumentVo enterpriseDocumentVo) {
        Msg msg = new Msg();
        msg.setCode("200");
        try {
            enterpriseDocumentService.checkDocument(enterpriseDocumentVo,true);
            enterpriseDocumentService.addDocument(enterpriseDocumentVo,getUser());
        } catch (BusinessException e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage(e.getMessage());
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage("发生错误,请联系管理员");
        }
        return msg;
    }
    @PostMapping(value = "/putdocument")
    @ApiOperation(value = "修改预案|承诺书", httpMethod = "PUT")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "预案|承诺书id(必传)"),
            @ApiImplicitParam(name = "name",value = "文件种类(0,1)->救援和流向",required = true),
            @ApiImplicitParam(name = "memo",value = "备注"),
            @ApiImplicitParam(name = "ids", value = "删除文档id的list"),
            @ApiImplicitParam(name = "file", value = "上传的文件"),
            @ApiImplicitParam(name = "enterpriseid", value = "企业id", required = true),
    })
    Object modDocument(EnterpriseDocumentVo enterpriseDocumentVo) {
        Msg msg = new Msg();
        msg.setCode("200");
        try {
            enterpriseDocumentService.checkDocument(enterpriseDocumentVo,false);
            enterpriseDocumentService.modDocument(enterpriseDocumentVo,getUser());
        } catch (BusinessException e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage(e.getMessage());
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage("发生错误,请联系管理员");
        }
        return msg;
    }
    @PostMapping(value = "/deldocument")
    @ApiOperation(value = "删除预案|承诺书", httpMethod = "DELETE")
    @ApiImplicitParam(name = "id",value = "预案|承诺书id(必传)")
    Object delDocument(@RequestParam Long id) {
        enterpriseDocumentService.delDocument(id,getUser());
        return success();
    }
    @GetMapping(value = "/manufacturerTree")
    public List<Tree> getManufacturerTree() {
        List<Tree> trees = new ArrayList<>();
        if (getUser().getCompanyid() != null) {
            Enterprise enterprise = enterpriseService.selectEnterpriseByCompanyId(getUser().getCompanyid());
            if (enterprise == null || enterprise.getSafetysupervision().equals(EnterpriseSafetySupervision.PRODUCE.getMsg())) {
                Tree tree = new Tree();
                tree.setText(enterprise != null ? enterprise.getEnterprisename() : null);
                tree.setAttributes(enterprise != null ? enterprise.getEnterprisenumber() : null);
                trees.add(tree);
                return trees;
            }
        }
        List<Enterprise>enterprises = enterpriseService.selectProduceEnterprise();
        for (Enterprise enterprise :enterprises){
            Tree tree = new Tree();
            tree.setText(enterprise != null ? enterprise.getEnterprisename() : null);
            tree.setAttributes(enterprise != null ? enterprise.getEnterprisenumber() : null);
            trees.add(tree);
        }
        return trees;
    }
    /**
     * @Description: 根据企业单位编号获取企业信息和实名登记和自查自改和销售数据
     * @date 2021/4/14 8:16
     */
    @GetMapping(value = "/enterprise-detail")
    @ApiOperation(value = "根据企业单位编号获取企业信息和实名登记、自查自改和销售数据", httpMethod = "GET")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "enterpriseNumber",value = "企业单位编号"),
            @ApiImplicitParam(name = "days",value = "时间范围(往前推days天)"),
            @ApiImplicitParam(name = "starttime",value = "开始时间"),
            @ApiImplicitParam(name = "endtime",value = "结束时间"),
    })
    Object getEnterpriseDetail(@RequestParam String enterpriseNumber,@RequestParam(defaultValue = "90") Integer days,
                               String starttime, String endtime) {
        Map result = enterpriseService.getEnterpriseDetail(enterpriseNumber, days, starttime, endtime);
        return success(result);
    }
    @GetMapping(value = "/enterprise-saledetail")
    @ApiOperation(value = "根据企业单位编号时间流向码获取销售明细", httpMethod = "GET")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "enterpriseNumber",value = "企业单位编号"),
            @ApiImplicitParam(name = "itemcode",value = "产品编码"),
            @ApiImplicitParam(name = "starttime",value = "开始时间"),
            @ApiImplicitParam(name = "endtime",value = "结束时间"),
    })
    Object getEnterpriseSaleDetail(@RequestParam String enterpriseNumber,String itemcode,
                               String starttime, String endtime) {
        List<SaleOrderDetailInfo> result = enterpriseService.getEnterpriseSaleDetail(enterpriseNumber, itemcode, starttime, endtime);
        return success(result);
    }
    /**
     * @Description: 他人信息反馈,或者企业自检
     * @date 2021/5/11 15:16
     */
    @PostMapping(value = "/feedList")
    @ApiOperation(value = "他人信息反馈,或者企业自检", httpMethod = "GET")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "企业单位id"),
            @ApiImplicitParam(name = "pageIndex", value = "页码"),
            @ApiImplicitParam(name = "pageSize", value = "页大小")
    })
    Object feedList(@RequestParam Long id,
                    @RequestParam Integer pageIndex,
                    @RequestParam Integer pageSize) {
        IPage page = enterpriseFeedService.selectPages(new Page<>(pageIndex, pageSize), id, getUser());
        return success(page);
    }
    /**
     * @Description: 新增他人信息反馈,或者企业自检
     * @date 2021/5/11 15:16
     */
    @PostMapping(value = "/feed")
    @ApiOperation(value = "新增他人信息反馈,或者企业自检", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "enterpriseNumber", value = "企业单位编号"),
            @ApiImplicitParam(name = "days", value = "时间范围(往前推days天)"),
            @ApiImplicitParam(name = "enterpriseid", value = "企业id必传")
    })
    Object addFeed(EnterpriseFeedVo enterpriseFeedVo) {
        enterpriseFeedService.addFeed(enterpriseFeedVo, getUser());
        return success();
    }
    /**
    * @Description: 导入
    * @date 2021/5/13 18:47
    */
    @PostMapping(value = "/import/feed/{id}")
    @ApiOperation(value = "导入他人信息反馈,或者企业自检", httpMethod = "POST")
    Object importFeed(MultipartFile file,@PathVariable Long id) {
        enterpriseFeedService.importFeed(file, getUser(),id);
        return success();
    }
    /**
     * @Description: 导出单个企业
     * @date 2021/5/13 18:47
     */
    @PostMapping(value = "/exportOne/feed")
    @ApiOperation(value = "导出他人信息反馈,或者企业自检", httpMethod = "POST")
    @ApiImplicitParam(name = "id", value = "企业id")
    Object exportFeedById(@RequestParam Long id) {
        List<Map> list = enterpriseFeedService.exportFeedById(id);
        return success(list);
    }
    /**
     * @Description: 导出
     * @date 2021/5/13 18:47
     */
    @PostMapping(value = "/export/feed")
    @ApiOperation(value = "导出他人信息反馈,或者企业自检", httpMethod = "POST")
    Object exportFeed(@RequestBody FilterObject filterObject) {
        List<Map> list = enterpriseFeedService.exportFeed(filterObject.getFilter(), getUser());
        return success(list);
    }
    /**
    * @Description: 信息导出
    * @date 2021/4/16 17:18
    */
    /**
    * @Description: 企业信息导出
    * @date 2021/4/16 17:35
    */
    @PostMapping(value = "/export/enterprise")
    @ApiOperation(value = "企业基本信息导出", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "filter.safetysupervision", value = "安全监管分类", required = true),
            @ApiImplicitParam(name = "filter.economicIndustry", value = "国民经济行业分类", required = true),
            @ApiImplicitParam(name = "filter.enterprisename", value = "企业名称", required = true),
            @ApiImplicitParam(name = "filter.valid", value = "有效期(0,1)", required = true),
            @ApiImplicitParam(name = "filter.province", value = "省", required = true),
            @ApiImplicitParam(name = "filter.city", value = "市", required = true),
            @ApiImplicitParam(name = "filter.district", value = "区", required = true),
            @ApiImplicitParam(name = "filter.street", value = "街道", required = true),
            @ApiImplicitParam(name = "filter.committee", value = "委员会", required = true),
    })
    Object exportList(@RequestBody FilterObject enterpriseFilter) {
        List<EnterpriseExportVo> list = enterpriseService.selectExportEnterprise(enterpriseFilter.getFilter(), getUser());
        return success(list);
    }
    /**
    * @Description: 企业信息导入
    * @date 2021/4/19 8:52
    */
    @PostMapping(value = "/import/enterprise")
    @ApiOperation(value = "企业基本信息导入", httpMethod = "POST")
    @ApiImplicitParam(name = "file", value = "文件类型", required = true)
    Object importEnterprise(MultipartFile file) {
        Msg msg = new Msg();
        msg.setCode("200");
        BooleanReason blret = enterpriseService.importEnterprise(file, getUser());
        if(blret.getValue().equals(false))
        {
            msg.setCode("500");
            msg.setMessage(blret.getResultmsg());
            return msg;
        }
        return msg;
    }
    /**
     * @Description: 发送一个请求触发任务
     * @date 2021/4/19 8:52
     */
    @PostMapping(value = "/task/checkEnterprise")
    void checkEnterprise() {
        UserInfo userInfo = getUser();
        UserInfo user = userService.getById(userInfo.getId());
        new Thread(new CheckEnterpriseTask(user)).start();
    }
    /**
     * @Description: 获取未完善企业分页
     * @date 2021/8/4 8:40
     */
    @PostMapping(value = "/undoneList")
    @ApiOperation(value = "获取未完善企业分页", httpMethod = "POST")
    public Object undoneList(@RequestBody FilterObject filter) {
        Integer pageIndex = filter.getPageIndex();
        Integer pageSize = filter.getPageSize();
        IPage page = enterpriseService.selectUndoneList(new Page<>(pageIndex, pageSize), filter.getFilter(), getUser());
        return success(page);
    }
    /**
    * @Description: 导出未完善企业
    * @date 2021/8/4 14:05
    */
    @PostMapping(value = "/export/undoneList")
    @ApiOperation(value = "导出未完善企业", httpMethod = "POST")
    public Object exportUndoneList(@RequestBody FilterObject filter) {
        List<Enterprise> exportData= enterpriseService.selectExportUndoneList(filter.getFilter(), getUser());
        return success(exportData);
    }
     /**
      * @Description: 获取已过期的企业
      * @date 2021/11/12 16:00
      */
    @PostMapping(value = "/expiredList")
    @ApiOperation(value = "获取已过期的企业", httpMethod = "POST")
    public Object ExpiredList(@RequestBody FilterObject filter) {
        Integer pageIndex = filter.getPageIndex();
        Integer pageSize = filter.getPageSize();
        IPage page = enterpriseService.selectExpiredList(new Page<>(pageIndex, pageSize), filter.getFilter(), getUser());
        return success(page);
    }
    /**
    * @Description: 导出已经过期的企业
    * @date 2021/11/12 16:00
    */
    @PostMapping(value = "/export/expiredList")
    @ApiOperation(value = "导出已经过期的企业", httpMethod = "POST")
    public Object exportExpiredList(@RequestBody FilterObject filter) {
        List<Enterprise> exportData= enterpriseService.selectExportExpiredList(filter.getFilter(), getUser());
        return success(exportData);
    }
    /**
     * @Description: 导入丹灵单位代码   根据单位名称匹配丹灵单位代码
     * @date 2022/1/26 13:58
     */
    @PostMapping(value = "/import/dlcompanycode")
    @ApiOperation(value = "导入丹灵单位代码", httpMethod = "POST")
    public Msg importDlCompanyCode(MultipartFile file) {
        BooleanReason booleanReason = enterpriseService.importDlCompanyCode(file, getUser());
        return success(booleanReason);
    }
    /**
    * @Description: 导出表格,导出所有丹灵单位代码不为空的企业信息
    * @date 2022/1/26 15:21
    */
    @PostMapping(value = "/export/dlcompanycode")
    @ApiOperation(value = "导入丹灵单位代码", httpMethod = "POST")
    public Msg exportDlCompanyCode() {
        List<Enterprise> result = enterpriseService.exportDlCompanyCode();
        return success(result);
    }
      /**
     * @Description: 注销
     * @date 2022/2/23 0:57
     */
    @PostMapping(value = "/logout")
    public Msg logout(@RequestBody List<Long> ids) {
        enterpriseService.logout(ids,getUser());
        return success();
    }
    /**
     * @Description: 注销恢复成有效
     * @date 2022/2/23 0:57
     */
    @PostMapping(value = "/recoverLogin")
    public Msg recoverLogin(@RequestParam Long id) {
        enterpriseService.recoverLogin(id,getUser());
        return success();
    }
    /**
     * @Description: 注销恢复成有效
     * @date 2022/2/23 0:57
     */
    @PostMapping(value = "/recoverLoginBatch")
    public Msg recoverLoginBatch(@RequestBody List<Long> ids) {
        enterpriseService.recoverLoginBatch(ids,getUser());
        return success();
    }
}
src/main/java/com/gk/firework/Controller/EntryController.java
对比新文件
@@ -0,0 +1,237 @@
package com.gk.firework.Controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.EntryOrderInfo;
import com.gk.firework.Domain.Enum.ErrorCode;
import com.gk.firework.Domain.Log.JsonParams;
import com.gk.firework.Domain.SoldNoStockInfo;
import com.gk.firework.Domain.StockInfo;
import com.gk.firework.Domain.UserInfo;
import com.gk.firework.Domain.Utils.FilterObject;
import com.gk.firework.Domain.Utils.Msg;
import com.gk.firework.Domain.Utils.StringUtils;
import com.gk.firework.Domain.Vo.DirectionDetail;
import com.gk.firework.Domain.Vo.FireworkDeal;
import com.gk.firework.Domain.Vo.ProductVo;
import com.gk.firework.Service.EntryDetailService;
import com.gk.firework.Service.EntryService;
import com.gk.firework.Service.ProductService;
import com.gk.firework.Service.StockService;
import com.gk.firework.Service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
 * @author : jingjy
 * @date : 2021/4/9 16:17
 */
@Api(tags = "入库接口")
@RestController
@RequestMapping("/entry")
public class EntryController extends BaseController {
    @Autowired
    private ProductService productService;
    @Autowired
    private EntryService entryService;
    @Autowired
    private EntryDetailService entryDetailService;
    @Autowired
    private StockService stockService;
    @Autowired
    private SoldNoStockService soldNoStockService;
    @Autowired
    private UserService userService;
    @GetMapping(value = "/getEntryDetail/directionCode/{directionCode}")
    public Msg getEntryDetail(@PathVariable String directionCode){
        Msg msg = new Msg(true);
        if (FireworkDeal.isNotDirectionCode(directionCode)){
            msg.setCode(ErrorCode.ERROR_999.getCode());
            msg.setMessage("流向码不符合规则,请重新输入!");
            return msg;
        }
        List<ProductVo>productVoList = new ArrayList<>();
        if (FireworkDeal.is22Characters(directionCode)){
            DirectionDetail detail = FireworkDeal.dealDirectionCode(directionCode);
            ProductVo productVo = productService.selectVoByDirection(directionCode);
            if (productVo == null){
                msg.setCode(ErrorCode.ERROR_999.getCode());
                msg.setMessage("产品不存在,请重新输入!");
                return msg;
            }
            FireworkDeal.getProductVos(directionCode,detail,detail,productVoList,productVo);
        }else {
            ProductVo productVo = productService.selectVoByDirection(directionCode);
            if (productVo == null){
                msg.setCode(ErrorCode.ERROR_999.getCode());
                msg.setMessage("产品不存在,请重新输入!");
                return msg;
            }
            productVoList.add(productVo);
        }
        if (productVoList.size() == 0){
            msg.setCode(ErrorCode.ERROR_999.getCode());
            msg.setMessage("流向码:"+directionCode+"未找到相应入库信息!");
            return msg;
        }
        StringBuilder content = new StringBuilder();
        List<ProductVo>productVos = new ArrayList<>();
        for (ProductVo productVo1 : productVoList){
            StockInfo stockInfo = stockService.selectStockByDireAndUser(getUser().getCompanyid(),productVo1.getDirectionCode());
            if (stockInfo == null || stockInfo.getStatus().equals(StockInfo.STOCK_SOLD)){
                msg.setCode(ErrorCode.ERROR_999.getCode());
                content.append(productVo1.getDirectionCode()).append("  未入库或者已经销售了!");
            }else {
                productVos.add(productVo1);
            }
        }
        msg.setMessage(content.toString());
        msg.setResult(productVos);
        return msg;
    }
    @PostMapping("entryPatch")
    @JsonParams
    public Msg entryPatch(@RequestBody JSONArray jsonArray){
        Msg msg = new Msg(true);
        if (jsonArray.size() == 0){
            msg.setCode(ErrorCode.ERROR_999.getCode());
            msg.setMessage(ErrorCode.ERROR_999.getMsg());
            return msg;
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        String auth = getAuth();
        auth = StringUtils.isBlank(auth) ? "NOAUTH" : auth;
        List<SoldNoStockInfo>soldNoStockInfos = new ArrayList<>();
        for (int i = 0; i < jsonArray.size(); i++){
            JSONObject object = jsonArray.getJSONObject(i);
            String directionCode = object.getString("directioncode");
            SoldNoStockInfo soldNoStockInfo = soldNoStockService.selectSoldNoStockByDire(directionCode);
            if (soldNoStockInfo == null){
                msg.setCode(ErrorCode.ERROR_999.getCode());
                msg.setMessage(ErrorCode.ERROR_999.getMsg());
                return msg;
            }
            soldNoStockInfos.add(soldNoStockInfo);
        }
        entryService.entryPatch(soldNoStockInfos,userInfo,auth);
        return msg;
    }
    /**
     * @Description: 入库查询
     * @date 2021/4/14 16:35
     */
    @PostMapping("/inbound-query")
    @ApiOperation(value = "入库查询", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex", value = "当前页码", required = true),
            @ApiImplicitParam(name = "pageSize", value = "页大小", required = true),
            @ApiImplicitParam(name = "filter.province", value = "省"),
            @ApiImplicitParam(name = "filter.city", value = "市"),
            @ApiImplicitParam(name = "filter.district", value = "区"),
            @ApiImplicitParam(name = "filter.street", value = "街道"),
            @ApiImplicitParam(name = "filter.committee", value = "委员会"),
            @ApiImplicitParam(name = "filter.starttime", value = "开始时间"),
            @ApiImplicitParam(name = "filter.endtime", value = "结束时间"),
            @ApiImplicitParam(name = "filter.transportcert", value = "运输证号码"),
            @ApiImplicitParam(name = "filter.enterprisename", value = "入库企业名称"),
            @ApiImplicitParam(name = "filter.safetysupervision", value = "安全监管分类"),
            @ApiImplicitParam(name = "filter.type", value = "入库类型"),
            @ApiImplicitParam(name = "filter.code", value = "单号"),
    })
    Object getInboundInfo(@RequestBody FilterObject jsonFilter) {
        Integer pageIndex = jsonFilter.getPageIndex();
        Integer pageSize = jsonFilter.getPageSize();
        IPage page = entryService.selectPage(new Page<>(pageIndex, pageSize), jsonFilter.getFilter(), getUser());
        return success(page);
    }
    @PostMapping("/stock/inbound-query")
    @ApiOperation(value = "入库查询", httpMethod = "POST")
    Object getStockInboundInfo(@RequestBody FilterObject jsonFilter) {
        Integer pageIndex = jsonFilter.getPageIndex();
        Integer pageSize = jsonFilter.getPageSize();
        IPage page = entryService.selectStockPage(new Page<>(pageIndex, pageSize), jsonFilter.getFilter(), getUser());
        return success(page);
    }
    /**
    * @Description: 入库导出
    * @date 2021/4/19 17:11
    */
    @PostMapping("/export/inbound")
    @ApiOperation(value = "入库查询导出", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "filter.province", value = "省"),
            @ApiImplicitParam(name = "filter.city", value = "市"),
            @ApiImplicitParam(name = "filter.district", value = "区"),
            @ApiImplicitParam(name = "filter.street", value = "街道"),
            @ApiImplicitParam(name = "filter.committee", value = "委员会"),
            @ApiImplicitParam(name = "filter.starttime", value = "开始时间"),
            @ApiImplicitParam(name = "filter.endtime", value = "结束时间"),
            @ApiImplicitParam(name = "filter.transportcert", value = "运输证号码"),
            @ApiImplicitParam(name = "filter.enterprisename", value = "入库企业名称"),
    })
    Object exportInbound(@RequestBody FilterObject jsonFilter) {
        List<EntryOrderInfo> list = entryService.selectExportInBound(jsonFilter.getFilter(), getUser());
        return success(list);
    }
    /**
    * @Description: 根据{入库单code}查询入库明细
    * @date 2021/4/15 11:09
    */
    @PostMapping("/inbound-detail")
    @ApiOperation(value = "入库单明细", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex", value = "当前页码", required = true),
            @ApiImplicitParam(name = "pageSize", value = "页大小", required = true),
            @ApiImplicitParam(name = "filter.code", value = "入库单号code"),
    })
    Object getInboundDetail(@RequestBody FilterObject jsonFilter) {
        Integer pageIndex = jsonFilter.getPageIndex();
        Integer pageSize = jsonFilter.getPageSize();
        IPage page = entryService.selectDetailPage(new Page<>(pageIndex,pageSize),jsonFilter.getFilter());
        return success(page);
    }
    /**
     * @Description: 根据{入库单code}查询入库明细并导出
     * @date 2021/4/15 11:09
     */
    @GetMapping("/export/inbound-detail")
    @ApiOperation(value = "入库单明细导出", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "code", value = "入库单号code"),
    })
    Object getInboundDetail(@RequestParam String code) {
         List<Map> detailExport = entryDetailService.selectDetailExport(code);
        return success(detailExport);
    }
}
src/main/java/com/gk/firework/Controller/FlowController.java
对比新文件
@@ -0,0 +1,56 @@
package com.gk.firework.Controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.ProductInfo;
import com.gk.firework.Domain.ProductLocusInfo;
import com.gk.firework.Domain.Utils.FilterObject;
import com.gk.firework.Domain.Vo.PageInfoExtension;
import com.gk.firework.Domain.Vo.ProductLocusVo;
import com.gk.firework.Domain.Vo.ProductVo;
import com.gk.firework.Service.ProductLocusService;
import com.gk.firework.Service.StockService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Api(tags = "流向查询")
@RestController
@RequestMapping("/flow")
public class FlowController extends BaseController {
    @Autowired
    private ProductLocusService productLocusService;
    @Autowired
    private StockService stockService;
    /**
    * @Description: 根据流向码获取流向记录
    * @date 2021/4/14 16:03
    */
    @GetMapping("/direction")
    Object getFlow(@RequestParam String directionCode) {
        List<ProductLocusVo> flow = productLocusService.getFlow(directionCode);
        return success(flow);
    }
    /**
    * @Description: 22位查询箱内所有挂当前状态,19位查询单挂当前状态
    * @date 2021/11/5 16:10
    */
    @PostMapping("/direction/fire-status")
    Object getFireCurrentStatus(@RequestBody FilterObject filter){
        Integer pageIndex = filter.getPageIndex();
        Integer pageSize = filter.getPageSize();
        PageInfoExtension<ProductVo> page = stockService.selectCurrentFireStatus(pageIndex,pageSize, filter.getFilter(), getUser());
        return success(page);
    }
}
src/main/java/com/gk/firework/Controller/HiddenDangerController.java
对比新文件
@@ -0,0 +1,145 @@
package com.gk.firework.Controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.HiddenDangerCheckContent;
import com.gk.firework.Domain.HiddenDangerMenu;
import com.gk.firework.Domain.HiddenDangerReport;
import com.gk.firework.Domain.UserInfo;
import com.gk.firework.Domain.Utils.FilterObject;
import com.gk.firework.Domain.Vo.CheckReportVo;
import com.gk.firework.Domain.Vo.HiddenDangerTableRow;
import com.gk.firework.Service.HiddenDangerCheckService;
import com.gk.firework.Service.HiddenDangerMenuService;
import com.gk.firework.Service.HiddenDangerReportService;
import com.gk.firework.Service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
import java.util.Map;
@Api(tags = "隐患排查治理接口")
@RequestMapping("/hiddenDanger")
@RestController
public class HiddenDangerController extends BaseController {
    @Autowired
    private HiddenDangerMenuService hiddenDangerMenuService;
    @Autowired
    private HiddenDangerCheckService hiddenDangerCheckService;
    @Autowired
    private HiddenDangerReportService hiddenDangerReportService;
    @Autowired
    private UserService userService;
    @GetMapping(value = "/menu")
    @ApiOperation(value = "菜单",httpMethod="GET")
    Object menu() {
        List<HiddenDangerMenu> list = hiddenDangerMenuService.selectMenu();
        return success(list);
    }
    @GetMapping(value = "/checkList")
    @ApiOperation(value = "检查列表",httpMethod="GET")
    @ApiImplicitParams({
         @ApiImplicitParam(name = "id",value = "菜单id"),
         @ApiImplicitParam(name = "level",value = "菜单等级"),
    })
    Object checkList(@RequestParam Long id,@RequestParam String level) {
        List<HiddenDangerTableRow> list = hiddenDangerCheckService.selectRowList(id,level);
        return success(list);
    }
    @PostMapping(value = "/upload")
    @ApiOperation(value = "自检报告上传",httpMethod="POST")
    Object addCheck(MultipartFile file) {
        String url = hiddenDangerReportService.upload(file);
        return success(url);
    }
    @PostMapping(value = "/check")
    @ApiOperation(value = "新增自检",httpMethod="POST")
    @ApiImplicitParams({})
    Object addCheck(CheckReportVo checkReportVo) {
        UserInfo user = userService.getById(getUser().getId());
        hiddenDangerReportService.checkAdd(checkReportVo, user);
        hiddenDangerReportService.addCheck(checkReportVo, user);
        return success();
    }
    @PostMapping(value = "/report")
    @ApiOperation(value = "自检报告统计分页", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex", value = "当前页码"),
            @ApiImplicitParam(name = "pageSize", value = "页大小"),
            @ApiImplicitParam(name = "filter", value = "筛选条件"),
    })
    Object reportList(@RequestBody FilterObject reportFilter) {
        Integer pageIndex = reportFilter.getPageIndex();
        Integer pageSize = reportFilter.getPageSize();
        IPage page =  hiddenDangerReportService.reportList(new Page<>(pageIndex,pageSize),reportFilter.getFilter(),getUser());
        return success(page);
    }
    @GetMapping(value = "/report")
    @ApiOperation(value = "获取自检报告", httpMethod = "GET")
    @ApiImplicitParam(name = "code", value = "报告code")
    Object getReport(@RequestParam String code) {
        List<HiddenDangerTableRow> table = hiddenDangerReportService.getReport(code);
        return success(table);
    }
    @PostMapping(value = "/putreport")
    @ApiOperation(value = "修改自检", httpMethod = "PUT")
    @ApiImplicitParams({
    })
    Object modReport(CheckReportVo checkReportVo) {
        hiddenDangerReportService.checkMod(checkReportVo);
        hiddenDangerReportService.modReport(checkReportVo,getUser());
        return success();
    }
    @GetMapping(value = "/viewReport")
    @ApiOperation(value = "查看", httpMethod = "GET")
    @ApiImplicitParam(name = "code", value = "报告code")
    Object viewReport(@RequestParam String code) {
        List<HiddenDangerTableRow> table = hiddenDangerReportService.viewReport(code);
        return success(table);
    }
    @GetMapping(value = "/commit")
    @ApiOperation(value = "提交报告单", httpMethod = "GET")
    @ApiImplicitParam(name = "code", value = "报告code")
    Object commitReport(@RequestParam String code) {
        hiddenDangerReportService.checkCommit(code);
        hiddenDangerReportService.commitReport(code);
        return success();
    }
    @PostMapping("/export/report")
    @ApiOperation(value = "导出报告单", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex", value = "当前页码"),
            @ApiImplicitParam(name = "pageSize", value = "页大小"),
            @ApiImplicitParam(name = "filter", value = "筛选条件"),
    })
    Object exportReport(@RequestBody FilterObject filterObject) {
        List<Map> list = hiddenDangerReportService.selectExportReport(filterObject.getFilter(), getUser());
        return success(list);
    }
}
src/main/java/com/gk/firework/Controller/LicenseController.java
对比新文件
@@ -0,0 +1,611 @@
package com.gk.firework.Controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.*;
import com.gk.firework.Domain.Enum.ErrorCode;
import com.gk.firework.Domain.Enum.LicenseStatus;
import com.gk.firework.Domain.Enum.ProvinceCode;
import com.gk.firework.Domain.Exception.BusinessException;
import com.gk.firework.Domain.Utils.Base64Encrypt;
import com.gk.firework.Domain.Utils.Msg;
import com.gk.firework.Domain.Utils.PageInfo;
import com.gk.firework.Domain.Utils.StringUtils;
import com.gk.firework.Domain.Vo.LicenseVo;
import com.gk.firework.Service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.validation.BindingResult;
import org.springframework.validation.FieldError;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.*;
import java.util.stream.Collectors;
/**
 * @author : jingjy
 * @date : 2021/5/11 16:48
 */
@Api(tags = "许可证")
@RequestMapping("/license")
@RestController
public class LicenseController extends BaseController {
    private static final Byte ADD_OPTION = 1;
    private static final Byte EDIT_OPTION = 2;
    private static final Byte DEL_OPTION = 3;
    private static final Byte LICENSE_PF = 2;
    private static final Byte LICENSE_LS = 3;
    private static final int LICENSE_CODE_LENGTH = 16;
    /**
     * 未审核:0;等待审核:1;已审核:2;拒绝审核:3;
     **/
    private static final Byte STATUS_NOT_REVIEW = 0;
    private static final Byte STATUS_WAIT_REVIEW = 1;
    private static final Byte STATUS_REVIEWED = 2;
    private static final Byte STATUS_REJECT_REVIEW = 3;
    @Autowired
    private LicenseService licenseService;
    @Autowired
    private UserService userService;
    @Autowired
    private LicenseStorageService licenseStorageService;
    @Autowired
    private EnterpriseService enterpriseService;
    @Autowired
    private EnterpriseLicenseService enterpriseLicenseService;
    @ApiOperation(value = "许可证信息", notes = "分页查询", httpMethod = "GET")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex", value = "当前页面索引", required = true),
            @ApiImplicitParam(name = "pageSize", value = "页面个数", required = true),
            @ApiImplicitParam(name = "sort", value = "排序字段", required = true),
            @ApiImplicitParam(name = "order", value = "排序方法(ASC/DESC)", required = true),
            @ApiImplicitParam(name = "name", value = "单位名称"),
            @ApiImplicitParam(name = "type", value = "1.生产;2.批发;3.零售 (传String类型的数字)"),
            @ApiImplicitParam(name = "effectdate", value = "生效日期(传String类型日期)"),
            @ApiImplicitParam(name = "noeffectdate", value = "失效日期(传String类型日期)"),
            @ApiImplicitParam(name = "status", value = "状态(1.有效;2.注销)(传String类型的数字)"),
            @ApiImplicitParam(name = "issuingunit", value = "发证机关"),
            @ApiImplicitParam(name = "reviewer", value = "发证人"),
            @ApiImplicitParam(name = "province", value = "省"),
            @ApiImplicitParam(name = "city", value = "市"),
            @ApiImplicitParam(name = "district", value = "区"),
    })
    @GetMapping("/info")
    public Msg getLicenseInfo(@RequestParam(value = "name", required = false) String name,
                              @RequestParam(value = "type", required = false) String type,
                              @RequestParam(value = "effectdate", required = false) String effectdate,
                              @RequestParam(value = "noeffectdate", required = false) String noeffectdate,
                              @RequestParam(value = "status", required = false) String status,
                              @RequestParam(value = "issuingunit", required = false) String issuingunit,
                              @RequestParam(value = "reviewer", required = false) String reviewer,
                              @RequestParam(value = "province", required = false) String province,
                              @RequestParam(value = "city", required = false) String city,
                              @RequestParam(value = "district", required = false) String district,
                              @RequestParam(value = "starttime1", required = false)String starttime1,
                              @RequestParam(value = "endtime1", required = false) String  endtime1,
                              @RequestParam(value = "starttime2", required = false)String starttime2,
                              @RequestParam(value = "endtime2", required = false)String endtime2,
                              @RequestParam(value = "reviewstatus", required = false)Integer reviewstatus,
                              @RequestParam(value = "validstatus", required = false)Byte validstatus,
                              @RequestParam(value = "licensecode", required = false)String licensecode,
                              @RequestParam(defaultValue = "0") Integer pageIndex,
                              @RequestParam(defaultValue = "10") Integer pageSize,
                              String sort, String order) {
        Msg msg = new Msg(true);
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize, sort, order);
        Map<String, Object> condition = new HashMap<>(16);
        if (StringUtils.isNotBlank(type)) {
            condition.put("type", type);
        }
        if (StringUtils.isNotBlank(effectdate)) {
            condition.put("effectdate", effectdate);
        }
        if (StringUtils.isNotBlank(noeffectdate)) {
            condition.put("noeffectdate", noeffectdate);
        }
        if (StringUtils.isNotBlank(status)) {
            condition.put("status", status);
        }
        if (StringUtils.isNotBlank(issuingunit)) {
            condition.put("issuingunit", issuingunit);
        }
        if (StringUtils.isNotBlank(reviewer)) {
            condition.put("reviewer", reviewer);
        }
        condition.put("filterProvince", province);
        condition.put("filterCity", city);
        condition.put("filterDistrict", district);
        condition.put("starttime1", starttime1);
        condition.put("endtime1", endtime1);
        condition.put("starttime2", starttime2);
        condition.put("endtime2", endtime2);
        condition.put("licensestatus", LicenseStatus.parse(licensecode));
        condition.put("validstatus", validstatus);
        condition.put("reviewstatus", reviewstatus);
        UserInfo userInfo = userService.getById(getUser().getId());
        if (userInfo.getCompanyid() != null) {
            condition.put("name", userInfo.getCompany());
        } else if (userInfo.getType() == 3) {
            if (StringUtils.isNotBlank(name)) {
                condition.put("name", name);
            }
            if (StringUtils.isNotBlank(userInfo.getProvince())) {
                condition.put("province", userInfo.getProvince());
            }
            if (StringUtils.isNotBlank(userInfo.getCity())) {
                condition.put("city", userInfo.getCity());
            }
            if (StringUtils.isNotBlank(userInfo.getArea())) {
                condition.put("district", userInfo.getArea());
            }
        }else {
            if (StringUtils.isNotBlank(name)) {
                condition.put("name", name);
            }
        }
        pageInfo.setCondition(condition);
        licenseService.selectDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @GetMapping("/export")
    Msg exportLicense(@RequestParam(value = "name", required = false) String name,
                      @RequestParam(value = "type", required = false) String type,
                      @RequestParam(value = "status", required = false) String status,
                      @RequestParam(value = "issuingunit", required = false) String issuingunit,
                      @RequestParam(value = "reviewer", required = false) String reviewer,
                      @RequestParam(value = "province", required = false) String province,
                      @RequestParam(value = "city", required = false) String city,
                      @RequestParam(value = "district", required = false) String district,
                      @RequestParam(value = "starttime1", required = false) String starttime1,
                      @RequestParam(value = "endtime1", required = false) String endtime1,
                      @RequestParam(value = "starttime2", required = false) String starttime2,
                      @RequestParam(value = "endtime2", required = false) String endtime2,
                      @RequestParam(value = "reviewstatus", required = false) Integer reviewstatus,
                      String sort, String order) {
        Map<String,Object> condition = new HashMap<>();
        condition.put("type", type);
       condition.put("status", status);
       condition.put("issuingunit", issuingunit);
        condition.put("reviewer", reviewer);
        condition.put("filterProvince", province);
        condition.put("filterCity", city);
        condition.put("filterDistrict", district);
        condition.put("starttime1", starttime1);
        condition.put("endtime1", endtime1);
        condition.put("starttime2", starttime2);
        condition.put("endtime2", endtime2);
        condition.put("reviewstatus", reviewstatus);
        UserInfo userInfo = userService.getById(getUser().getId());
        if (userInfo.getCompanyid() != null) {
            condition.put("name", userInfo.getCompany());
        } else if (userInfo.getType() == 3) {
            if (StringUtils.isNotBlank(name)) {
                condition.put("name", name);
            }
            if (StringUtils.isNotBlank(userInfo.getProvince())) {
                condition.put("province", userInfo.getProvince());
            }
            if (StringUtils.isNotBlank(userInfo.getCity())) {
                condition.put("city", userInfo.getCity());
            }
            if (StringUtils.isNotBlank(userInfo.getArea())) {
                condition.put("district", userInfo.getArea());
            }
        }else {
            if (StringUtils.isNotBlank(name)) {
                condition.put("name", name);
            }
        }
        List<LicenseVo> licenseVos = licenseService.exportLicense(condition);
        return success(licenseVos);
    }
    @PostMapping("/addLicense")
    public Msg addLicense(@Validated @RequestBody LicenseVo licenseVo, BindingResult bindingResult) {
        Msg msg = new Msg(true);
        if (bindingResult.hasErrors()) {
            StringBuilder stringBuilder = new StringBuilder();
            for (String s : bindingResult.getFieldErrors().stream()
                    .map(FieldError::getDefaultMessage).collect(Collectors.toList())) {
                stringBuilder.append(s);
                stringBuilder.append(",");
            }
            msg.setCode("999");
            msg.setMessage(stringBuilder.toString());
            return msg;
        }
        Msg checkMsg = checkLicense(licenseVo, ADD_OPTION);
        if (!checkMsg.getCode().equals(ErrorCode.SUCCESS.getCode())) {
            return checkMsg;
        }
        LicenseInfo licenseInfo1 = licenseService.getLastOne();
        Integer sn = licenseInfo1.getSn();
        sn++;
        licenseVo.setSn(sn);
        String abbr = "";
        String typeCode = "";
        for (ProvinceCode code : ProvinceCode.values()) {
            if (licenseVo.getProvince().equals(code.getName())) {
                abbr = code.getAbbr();
            }
        }
        if (StringUtils.isBlank(abbr)) {
            msg.setCode("200");
            msg.setMessage("省份对应错误,生成许可证编号失败!");
            return msg;
        }
        if (licenseVo.getType().equals(LICENSE_PF)) {
            typeCode = "PF";
        } else if (licenseVo.getType().equals(LICENSE_LS)) {
            typeCode = "LS";
        }
        Calendar cal = Calendar.getInstance();
        int year = cal.get(Calendar.YEAR);
        String licenseCode = "(" + abbr + ")" + typeCode + "〔" + year + "〕" + String.format("%05d", sn);
        if (licenseCode.length() != LICENSE_CODE_LENGTH) {
            msg.setCode("999");
            msg.setMessage("错误,生成许可证编号失败!");
            return msg;
        }
        licenseVo.setLicensecode(licenseCode);
        JSONArray jsonArray = JSONArray.parseArray(licenseVo.getLicenseStorage());
        List<LicenseStorage> licenseStorageList = jsonArray.toJavaList(LicenseStorage.class);
        for (LicenseStorage licenseStorage : licenseStorageList) {
            licenseStorage.setLicensecode(licenseCode);
        }
        licenseStorageService.saveBatch(licenseStorageList);
        licenseVo.setCreatedat(new Date());
        licenseVo.setCreatedby(getUser().getUsername());
        licenseVo.setLicensestatus(LicenseStatus.NEW);
        licenseVo.setValidstatus((byte) 1);
        licenseService.save(licenseVo);
        return msg;
    }
    @PostMapping("/editLicense")
    public Msg editLicense(@Validated @RequestBody LicenseVo licenseVo, BindingResult bindingResult) {
        Msg msg = new Msg(true);
        if (bindingResult.hasErrors()) {
            StringBuilder stringBuilder = new StringBuilder();
            for (String s : bindingResult.getFieldErrors().stream()
                    .map(FieldError::getDefaultMessage).collect(Collectors.toList())) {
                stringBuilder.append(s);
                stringBuilder.append(",");
            }
            msg.setCode("999");
            msg.setMessage(stringBuilder.toString());
            return msg;
        }
        Msg checkMsg = checkLicense(licenseVo, EDIT_OPTION);
        //控制许可证相关信息是否更新在企业信息中
        boolean flag = false;
        if (!checkMsg.getCode().equals(ErrorCode.SUCCESS.getCode())) {
            return checkMsg;
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        JSONArray jsonArray = JSONArray.parseArray(licenseVo.getLicenseStorage());
        List<LicenseStorage> licenseStorages = jsonArray.toJavaList(LicenseStorage.class);
        for (LicenseStorage licenseStorage : licenseStorages) {
            licenseStorage.setLicensecode(licenseVo.getLicensecode());
        }
        LicenseInfo licenseInfo = licenseService.getLicenseById(licenseVo.getId());
        Byte reviewStatus = licenseVo.getReviewstatus();
        if (licenseInfo == null) {
            msg.setCode(ErrorCode.ERROR_999.getMsg());
            msg.setMessage("未找到对应的许可证信息,审核失败!");
            return msg;
        }
        if (licenseInfo.getReviewstatus().equals(STATUS_REVIEWED)){
            msg.setCode(ErrorCode.ERROR_999.getMsg());
            msg.setMessage("许可证信息已审核,无法修改!");
            return msg;
        }
        if (userInfo.getCompanyid() == null) {
            // 审核需要判断用户角色权限
            if (!reviewStatus.equals(STATUS_REVIEWED) && !reviewStatus.equals(STATUS_REJECT_REVIEW)) {
                msg.setCode(ErrorCode.ERROR_999.getMsg());
                msg.setMessage("权限错误,审核失败!");
                return msg;
            }
            if (licenseInfo.getReviewstatus().equals(STATUS_NOT_REVIEW) && !reviewStatus.equals(STATUS_WAIT_REVIEW)) {
                msg.setCode(ErrorCode.ERROR_999.getMsg());
                msg.setMessage("当前许可证未提交审核,操作失败!");
                return msg;
            }
            if (licenseInfo.getReviewstatus().equals(STATUS_WAIT_REVIEW)) {
                if (!reviewStatus.equals(STATUS_REVIEWED) && !reviewStatus.equals(STATUS_REJECT_REVIEW)) {
                    msg.setCode(ErrorCode.ERROR_999.getMsg());
                    msg.setMessage("当前许可证为待审核,操作失败!");
                    return msg;
                }
            }
            if (licenseInfo.getReviewstatus().equals(STATUS_REVIEWED)) {
                msg.setCode(ErrorCode.ERROR_999.getMsg());
                msg.setMessage("当前许可证已审核完毕,操作失败!");
                return msg;
            }
            //判断是否能够审核
            if (reviewStatus.equals(STATUS_REVIEWED)){
                if (!reviewStatus.equals(licenseInfo.getReviewstatus())) {
                    if (licenseVo.getEffectdate() == null || licenseVo.getNoeffectdate() == null) {
                        msg.setCode(ErrorCode.ERROR_999.getMsg());
                        msg.setMessage("有效期不能为空");
                        return msg;
                    }
                    if (StringUtils.isBlank(licenseVo.getIssuingunit()) || licenseVo.getIssuingdate() == null) {
                        msg.setCode(ErrorCode.ERROR_999.getMsg());
                        msg.setMessage("发证机关和发证日期不能为空");
                        return msg;
                    }
                }
                licenseVo.setReviewer(getUser().getUsername());
                licenseVo.setReviewat(new Date());
                flag = true;
            }
        }else{
            if (licenseInfo.getReviewstatus().equals(STATUS_WAIT_REVIEW)){
                msg.setCode(ErrorCode.ERROR_999.getMsg());
                msg.setMessage("许可证信息等待审核中,无法修改!");
                return msg;
            }
        }
        licenseStorageService.updateBatchById(licenseStorages);
        licenseVo.setModifiedat(new Date());
        licenseVo.setModifiedby(getUser().getUsername());
        licenseService.updateById(licenseVo);
        if (flag){
            Enterprise enterprise = enterpriseService.selectEnterpriseByName(licenseInfo.getName());
            enterprise.setValidstarttime(licenseVo.getEffectdate());
            enterprise.setValidendtime(licenseVo.getNoeffectdate());
            enterpriseService.updateById(enterprise);
            EnterpriseLicense enterpriseLicense = new EnterpriseLicense();
            if (licenseVo.getType().equals(LICENSE_PF)){
                enterpriseLicense.setLicensename("烟花爆竹经营(批发)许可证");
            }else if (licenseVo.getType().equals(LICENSE_LS)){
                enterpriseLicense.setLicensename("烟花爆竹经营(零售)许可证");
            }
            enterpriseLicense.setLicensenumber(licenseVo.getLicensecode());
            enterpriseLicense.setEnterpriseid(enterprise.getId());
            enterpriseLicense.setAuthority(licenseVo.getIssuingunit());
            enterpriseLicense.setRanges(licenseService.dealDealingRange(licenseVo.getDealingrange()).toString());
            enterpriseLicense.setValidendtime(licenseVo.getReviewat());
            enterpriseLicense.setValidstarttime(licenseVo.getEffectdate());
            enterpriseLicense.setValidflag(true);
            enterpriseLicense.setCreatetime(new Date());
            enterpriseLicense.setCreateby(getUser().getId());
            enterpriseLicense.setCreatebyname(getUser().getUsername());
            enterpriseLicenseService.save(enterpriseLicense);
            //issale = 1 修改 截止有效期
            List<UserInfo> userList = userService.selectByCompanyId(enterprise.getId(),0);
            if (userList.size() != 2) {
                throw new BusinessException("发生错误,请联系管理员");
            }
            for (UserInfo info : userList) {
                //修改许可证 同时修改issale=1的用户有效期
                if (info.getIssale() == (byte) 1) {
                    Date validendtime = enterprise.getValidendtime();
                    Calendar instance = Calendar.getInstance();
                    instance.setTime(validendtime);
                    instance.set(Calendar.HOUR_OF_DAY, 23);
                    instance.set(Calendar.MINUTE, 59);
                    instance.set(Calendar.SECOND, 59);
                    info.setExpiredate(instance.getTime());
                    userService.updateById(info);
                }
            }
        }
        return msg;
    }
    @ApiOperation(value = "许可证审核", httpMethod = "PUT")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "审核许可证ID", required = true),
            @ApiImplicitParam(name = "reviewstatus", value = "审核状态(0.未审核;1.等待审核;2.已审核;3.审核驳回) 数字类型", required = true),})
    @PostMapping("/review")
    private Msg reviewLicense(@RequestParam(value = "id") Long id,
                              @RequestParam(value = "reviewstatus") Byte reviewstatus) {
        Msg msg = new Msg(true);
        LicenseInfo licenseInfo = licenseService.getLicenseById(id);
        if (licenseInfo == null) {
            msg.setCode(ErrorCode.ERROR_999.getMsg());
            msg.setMessage("未找到对应的许可证信息,审核失败!");
            return msg;
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        if (userInfo.getCompanyid() == null) {
            if (!reviewstatus.equals(STATUS_NOT_REVIEW) || !reviewstatus.equals(STATUS_WAIT_REVIEW)) {
                msg.setCode(ErrorCode.ERROR_999.getMsg());
                msg.setMessage("权限错误,审核失败!");
                return msg;
            }
        }
        if (licenseInfo.getReviewstatus().equals(STATUS_NOT_REVIEW) && !reviewstatus.equals(STATUS_WAIT_REVIEW)) {
            msg.setCode(ErrorCode.ERROR_999.getMsg());
            msg.setMessage("当前许可证未提交审核,操作失败!");
            return msg;
        }
        if (licenseInfo.getReviewstatus().equals(STATUS_WAIT_REVIEW)) {
            if (!reviewstatus.equals(STATUS_REVIEWED) && !reviewstatus.equals(STATUS_REJECT_REVIEW)) {
                msg.setCode(ErrorCode.ERROR_999.getMsg());
                msg.setMessage("当前许可证为待审核,操作失败!");
                return msg;
            }
        }
        if (licenseInfo.getReviewstatus().equals(STATUS_REVIEWED)) {
            msg.setCode(ErrorCode.ERROR_999.getMsg());
            msg.setMessage("当前许可证已审核完毕,操作失败!");
            return msg;
        }
        licenseInfo.setReviewstatus(reviewstatus);
        licenseService.updateById(licenseInfo);
        return msg;
    }
    @ApiOperation(value = "许可证删除", httpMethod = "PUT")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "许可证ID", required = true)})
    @PostMapping("/delete")
    private Msg delLicense(@RequestParam(value = "id") Long id) {
        Msg msg = new Msg(true);
        LicenseInfo licenseInfo = licenseService.getLicenseById(id);
        if (licenseInfo == null) {
            msg.setCode(ErrorCode.ERROR_999.getMsg());
            msg.setMessage("未找到对应的许可证信息,审核失败!");
            return msg;
        }
        if (licenseInfo.getReviewstatus().equals(STATUS_REVIEWED)) {
            msg.setCode(ErrorCode.ERROR_999.getCode());
            msg.setMessage("当前许可证已审核完毕,无法删除!");
            return msg;
        }
        licenseInfo.setFlag((byte) 1);
        licenseService.updateById(licenseInfo);
        return msg;
    }
    @ApiOperation(value = "许可证驳回", httpMethod = "PUT")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "许可证ID", required = true)})
    @PostMapping("/reject")
    private Msg rejectLicense(@RequestBody JSONObject data) {
        licenseService.rejectLicense(data,getUser());
        return success();
    }
    private Msg checkLicense(LicenseVo licenseVo, Byte option) {
        Msg msg = new Msg(false);
        if (licenseVo == null) {
            msg.setMessage("操作失败:未找到对应的许可证信息");
            return msg;
        }
        if (option.equals(EDIT_OPTION)) {
            if (licenseVo.getId() == null) {
                msg.setMessage("操作失败:未找到对应的许可证信息");
                return msg;
            }
        }
        if (licenseVo.getType() == null) {
            msg.setMessage("类型不能为空");
            return msg;
        }
        if (licenseVo.getName() == null) {
            msg.setMessage("类别名称不能为空");
            return msg;
        }
        if (licenseVo.getCode() == null) {
            msg.setMessage("统一社会信用代码不能为空");
            return msg;
        }
        if (StringUtils.isBlank(licenseVo.getMainpersonname())
                || StringUtils.isBlank(licenseVo.getMainpersonidcardnum())
                || StringUtils.isBlank(licenseVo.getMainpersontel())) {
            msg.setMessage("主要负责人信息不能为空");
            return msg;
        }
        if (StringUtils.isBlank(licenseVo.getSafetypersonname())
                || StringUtils.isBlank(licenseVo.getSafetypersonidcardnum())
                || StringUtils.isBlank(licenseVo.getSafetypersontel())) {
            msg.setMessage("安全负责人信息不能为空");
            return msg;
        }
        if (StringUtils.isBlank(licenseVo.getProvince()) || StringUtils.isBlank(licenseVo.getCity())
                || StringUtils.isBlank(licenseVo.getDistrict()) || StringUtils.isBlank(licenseVo.getAddress())) {
            msg.setMessage("单位地址/注册地址不能为空");
            return msg;
        }
        if (licenseVo.getType().equals(LICENSE_PF) || licenseVo.getType().equals(LICENSE_LS)) {
            if (StringUtils.isBlank(licenseVo.getLicenseStorage())) {
                msg.setMessage("批发企业和生产企业仓库信息不能为空");
                return msg;
            }
        }
        msg.setCode("200");
        return msg;
    }
    @PostMapping("/delay")
    public Msg delay(@RequestBody JSONObject jso) {
        Long id = jso.getLong("id");
        String issuingunit = jso.getString("issuingunit");
        Date issuingdate = jso.getDate("issuingdate");
        Date validstarttime = jso.getDate("validstarttime");
        Date validendtime = jso.getDate("validendtime");
        licenseService.delayLicense(id, issuingunit, issuingdate, validstarttime, validendtime,getUser());
        return success();
    }
    @PostMapping("/mod")
    public Msg mod(@Validated @RequestBody LicenseVo licenseVo, BindingResult bindingResult) {
        //判断
        Msg msg = new Msg(true);
        if (bindingResult.hasErrors()) {
            StringBuilder stringBuilder = new StringBuilder();
            for (String s : bindingResult.getFieldErrors().stream()
                    .map(FieldError::getDefaultMessage).collect(Collectors.toList())) {
                stringBuilder.append(s);
                stringBuilder.append(",");
            }
            msg.setCode("999");
            msg.setMessage(stringBuilder.toString());
        }
        Msg checkMsg = checkLicense(licenseVo, EDIT_OPTION);
        if (!checkMsg.getCode().equals(ErrorCode.SUCCESS.getCode())) {
            return checkMsg;
        }
        licenseService.generateLicenseDetail(licenseVo);
        JSONArray jsonArray = JSONArray.parseArray(licenseVo.getLicenseStorage());
        List<LicenseStorage> licenseStorageList = jsonArray.toJavaList(LicenseStorage.class);
        for (LicenseStorage licenseStorage : licenseStorageList) {
            licenseStorage.setLicensecode(licenseVo.getLicensecode());
        }
        licenseService.modLicense(licenseVo, licenseStorageList, getUser());
        return success();
    }
}
src/main/java/com/gk/firework/Controller/LoginController.java
对比新文件
@@ -0,0 +1,442 @@
package com.gk.firework.Controller;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.gk.firework.Config.Oauth2.IRedisService;
import com.gk.firework.Config.Oauth2.OauthRole;
import com.gk.firework.Config.Oauth2.RedisKeyEnum;
import com.gk.firework.Domain.AuthorizationInfo;
import com.gk.firework.Domain.Log.JsonParams;
import com.gk.firework.Domain.Utils.CommonUtil;
import com.gk.firework.Domain.Utils.Msg;
import com.gk.firework.Domain.Utils.StringUtils;
import com.gk.firework.Domain.Vo.UserVo;
import com.gk.firework.Service.AuthorizationService;
import com.gk.firework.Service.EnterpriseService;
import com.gk.firework.Service.UserService;
import com.google.common.base.Strings;
import com.google.common.net.HttpHeaders;
import io.jsonwebtoken.Claims;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.collections4.map.SingletonMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletRequest;
import java.nio.charset.StandardCharsets;
import java.util.*;
@Api(tags = "登录登出接口")
@RequestMapping("/auth")
@RestController
public class LoginController {
    @Autowired
    IRedisService redisService;
    @Autowired
    UserService userService;
    @Autowired
    AuthorizationService authorizationService;
    @Autowired
    EnterpriseService enterpriseService;
    @Value("${host}")
    private String host;
    /**
     * login  produces = "application/json"
     *
     * @param jsonParam {"username":"用户名","password":"密码"}
     * @return User
     */
    @PostMapping("/login")
    @JsonParams
    @ApiOperation(value = "管理端登录授权", notes = "登录授权接口,获取token")
    public Msg login(@ApiParam(value = "username,password") @RequestParam String encryptStr) {
        String jsonStr = new String(Base64.getDecoder().decode(encryptStr), StandardCharsets.UTF_8);
        JSONObject jsonParam = JSON.parseObject(jsonStr);
        String username = jsonParam.getString("username");
        String password = jsonParam.getString("password");
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        try {
            //query user
            UserVo user = userService.selectUserVoByName(username);
            if (null == user) {
                msg.setCode("100");
                msg.setMessage("用户不存在");
                return msg;
            }
            if (user.getIssale() == 1) {
                msg.setCode("100");
                msg.setMessage("用户不存在");
                return msg;
            }
            if (StringUtils.isNotBlank(user.getCompanynumber()) && enterpriseService.isLogOut(user.getCompanynumber())) {
                msg.setCode("166");
                msg.setMessage("用户已注销");
                return msg;
            }
            // 疆外日期判断
            Date now = new Date();
            if (user.getDeadline() != null) {
                if (user.getDeadline().before(now)){
                    // 当前已经疆外用户已经超期使用 需要缴费
                    msg.setCode("200");
                    msg.setMessage("疆外用户已过期,请及时联系续期");
                    msg.setResult(new SingletonMap<>("deadline",user.getDeadline()));
                    return msg;
                }
            }
            //Call login interface
            String rs = HttpRequest.post( host + "/oauth/token")
                    .setConnectionTimeout(10000)
                    .setReadTimeout(10000)
                    .header("Authorization", "Basic dWFhLXNlcnZpY2U6MTIzNDU2")
                    .form(Dict.create()
                            .set("username", username)
                            .set("password", password)
                            .set("grant_type", "password")
                            .set("auth_type", "")
                    ).execute().body();
            Map map = JSON.parseObject(rs, Map.class);
            Object access_token = map.get("access_token");
            //Verify that the access_token is empty
            if (ObjectUtil.isNull(access_token)) {
                msg.setCode("103");
                msg.setMessage("密码不正确");
                return msg;
            }
            user.setToken("Bearer "+access_token);
            //add redis
            String token_key = StrUtil.format(RedisKeyEnum.AUTH_TOKEN.getKey(), map.get("jti"));
            redisService.set(token_key, user, 60L*60L*18L);
            user.setTokenexpired(60L*60L*18L);
            /** 登录成功刷新用户 */
            List<OauthRole> roleByUser = userService.selectRoleByUser(1);
            if (null != user.getType()&& user.getType() == 1){
                OauthRole oauthRole = new OauthRole("","超级管理员","super_admin","");
                roleByUser.add(oauthRole);
                user.setRoles(roleByUser);
            }else {
                roleByUser = userService.selectRoleByUser(user.getId().intValue());
                user.setRoles(roleByUser);
            }
            user.setPassword(null);
            msg.setResult(user);
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("102");
            msg.setMessage("登录失败请稍后重试");
        }
        return msg;
    }
    @PostMapping("/salelogin")
    @ApiOperation(value = "销售端登录授权", notes = "登录授权接口,获取token")
    public Msg Salelogin(@ApiParam(value = "username,password") @RequestBody JSONObject jsonParam) {
        String username = jsonParam.getString("username");
        String password = jsonParam.getString("password");
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        try {
            //query user
            UserVo user = userService.selectUserVoByName(username);
            if (null == user) {
                msg.setCode("100");
                msg.setMessage("用户不存在");
                return msg;
            }
            if (user.getIssale() == 0) {
                msg.setCode("100");
                msg.setMessage("用户不存在");
                return msg;
            }
            if (user.getStatus()!=null && user.getStatus() != 1){
                msg.setCode("100");
                msg.setMessage("用户已失效");
                return msg;
            }
            if (user.getExpiredate() != null && user.getExpiredate().getTime() < System.currentTimeMillis()){
                msg.setCode("100");
                msg.setMessage("用户已失效");
                return msg;
            }
            // 疆外日期判断
            Date now = new Date();
            if (user.getDeadline() != null) {
                if (user.getDeadline().before(now)) {
                    // 当前已经疆外用户已经超期使用 需要缴费
                    msg.setCode("166");
                    msg.setMessage("疆外用户已过期,请及时联系续期");
                    return msg;
                }
            }
            //Call login interface
            String rs = HttpRequest.post( host + "/oauth/token")
                    .setConnectionTimeout(10000)
                    .setReadTimeout(10000)
                    .header("Authorization", "Basic dWFhLXNlcnZpY2U6MTIzNDU2")
                    .form(Dict.create()
                            .set("username", username)
                            .set("password", password)
                            .set("grant_type", "password")
                            .set("auth_type", "")
                    ).execute().body();
            Map map = JSON.parseObject(rs, Map.class);
            Object access_token = map.get("access_token");
            //Verify that the access_token is empty
            if (ObjectUtil.isNull(access_token)) {
                msg.setCode("103");
                msg.setMessage("密码不正确");
                return msg;
            }
            user.setToken("Bearer "+access_token);
            //add redis
            String token_key = StrUtil.format(RedisKeyEnum.AUTH_TOKEN.getKey(), map.get("jti"));
            redisService.set(token_key, user, 60L*60L*18L);
            user.setTokenexpired(60L*60L*18L);
            user.setPassword(null);
            msg.setResult(user);
        } catch (Exception e) {
            msg.setCode("102");
            msg.setMessage("登录失败请稍后重试");
        }
        return msg;
    }
    @GetMapping("/verify")
    @ApiOperation(value = "登录验证", notes = "登录验证:flag【true 成功】,【false 失败】", response = Msg.class)
    public Msg verifyLogin(@ApiIgnore HttpServletRequest request) {
        Msg msg = new Msg();
        msg.setCode("200");
        UserVo userVo = new UserVo();
        String token = request.getHeader(HttpHeaders.AUTHORIZATION);
        //解析token
        Claims claims = CommonUtil.parseJWT(token);
        if (null != claims){
            String tokenKey = StrUtil.format(RedisKeyEnum.AUTH_TOKEN.getKey(), claims.getId());
            Object userInfo = redisService.get(tokenKey);
            if (null != userInfo){
                Map map = JSON.parseObject(userInfo.toString(), Map.class);
                userVo = userService.selectUserVoByName(map.get("username").toString());
                if (null == userVo) {
                    msg.setCode("100");
                    msg.setMessage("用户不存在");
                    return msg;
                }
                if (userVo.getIssale() == 1){
                    if (userVo.getStatus()!=null && userVo.getStatus() != 1){
                        msg.setCode("100");
                        msg.setMessage("用户已失效");
                        return msg;
                    }
                    if (userVo.getExpiredate() != null && userVo.getExpiredate().getTime() < System.currentTimeMillis()){
                        msg.setCode("100");
                        msg.setMessage("用户已失效");
                        return msg;
                    }
                    Object loginObj =  map.get("logintime");
                    Object authObj =  map.get("auth");
                    if (loginObj != null && authObj != null){
                        //通过auth查询授权码最后登录时间
                        AuthorizationInfo authInfo = authorizationService.selectByUser(userVo.getCompanynumber(),authObj.toString());
                        if (authInfo == null){
                            msg.setCode("100");
                            msg.setMessage("授权码无效");
                            return msg;
                        }
                        if (authInfo.getLasttime().getTime() > Long.parseLong(loginObj.toString())){
                            redisService.set(tokenKey, userInfo, 0L);
                            msg.setCode("100");
                            msg.setMessage("登录失效,请重新登录");
                            return msg;
                        }
                    }
                    userVo.setAuth(map.get("auth").toString());
                }
                else {
                    /** 登录成功刷新用户 */
                    List<OauthRole> roleByUser = userService.selectRoleByUser(1);
                    if (null != userVo.getType()&& userVo.getType() == 1){
                        OauthRole oauthRole = new OauthRole("","超级管理员","super_admin","");
                        roleByUser.add(oauthRole);
                        userVo.setRoles(roleByUser);
                    }else {
                        roleByUser = userService.selectRoleByUser(userVo.getId().intValue());
                        userVo.setRoles(roleByUser);
                    }
                }
                userVo.setToken(map.get("token").toString());
                userVo.setTokenexpired(60L*60L*18L);
                userVo.setPassword(null);
                //更新登录超时时间
                redisService.set(tokenKey, userInfo, 60L*60L*18L);
            }else {
                msg.setCode("100");
                msg.setMessage("登录失效,请重新登录");
                return msg;
            }
        }
        msg.setResult(userVo);
        return msg;
    }
    /**
     * logout
     *
     * @return
     */
    @PostMapping("/logout")
    @ApiOperation(value = "退出登录", notes = "退出登录接口", produces = "application/json", response = Msg.class)
    public Msg logout(@ApiIgnore HttpServletRequest request) {
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        /** 解析token */
        String header = request.getHeader(HttpHeaders.AUTHORIZATION);
        if (header != null && !header.equals("undefined")) {
            Claims claims = CommonUtil.parseJWT(header);
            Optional.ofNullable(claims).ifPresent(cl -> {
                String token_key = "auth:token:" + cl.getId();
                redisService.remove(token_key);
            });
        }
        return msg;
    }
    @PostMapping("/saleauthlogin")
    @JsonParams
    @ApiOperation(value = "销售端授权码登录授权", notes = "登录授权接口,获取token")
    public Msg SaleAuthlogin(@ApiParam(value = "username,password,authcode") @RequestParam String encryptStr) {
//        System.out.println("BASE64明文: "+encryptStr);
        String jsonStr = new String(Base64.getDecoder().decode(encryptStr), StandardCharsets.UTF_8);
//        System.out.println("解密后参数: "+jsonStr);
        JSONObject jsonParam = JSON.parseObject(jsonStr);
        String username = jsonParam.getString("username");
        String password = jsonParam.getString("password");
        String auth = jsonParam.getString("authcode");
//        System.out.println("name: "+username+" ,pwd: "+password+" ,auth:"+auth);
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        try {
            //query user
            UserVo user = userService.selectUserVoByName(username);
            if (null == user) {
                msg.setCode("100");
                msg.setMessage("用户不存在");
                return msg;
            }
            if (user.getIssale() == 0) {
                msg.setCode("100");
                msg.setMessage("用户不存在");
                return msg;
            }
            if (user.getStatus()!=null && user.getStatus() != 1){
                msg.setCode("100");
                msg.setMessage("用户已失效");
                return msg;
            }
            if (user.getExpiredate() == null ||(user.getExpiredate() != null && user.getExpiredate().getTime() < System.currentTimeMillis())){
                msg.setCode("100");
                msg.setMessage("用户已失效");
                return msg;
            }
            // 疆外日期判断
            Date now = new Date();
            if (user.getDeadline() != null) {
                if (user.getDeadline().before(now)) {
                    // 当前已经疆外用户已经超期使用 需要缴费
                    msg.setCode("166");
                    msg.setMessage("疆外用户已过期,请及时联系续期");
                    return msg;
                }
            }
            //验证auth是否存在
            AuthorizationInfo authInfo = authorizationService.selectByUser(user.getCompanynumber(),auth);
            if (authInfo == null){
                msg.setCode("100");
                msg.setMessage("授权码无效");
                return msg;
            }
            Date logintime = new Date();
            //Call login interface
            String rs = HttpRequest.post( host + "/oauth/token")
                    .setConnectionTimeout(10000)
                    .setReadTimeout(10000)
                    .header("Authorization", "Basic dWFhLXNlcnZpY2U6MTIzNDU2")
                    .form(Dict.create()
                            .set("username", username)
                            .set("password", password)
                            .set("auth", auth)
                            .set("grant_type", "password")
                            .set("auth_type", "")
                    )
                    .execute()
                    .body();
            Map map = JSON.parseObject(rs, Map.class);
            Object access_token = map.get("access_token");
            //Verify that the access_token is empty
            if (ObjectUtil.isNull(access_token)) {
                msg.setCode("103");
                msg.setMessage("密码不正确");
                return msg;
            }
            user.setToken("Bearer "+access_token);
            user.setAuth(auth);
            user.setLogintime(logintime.getTime());
            //add redis
            String token_key = StrUtil.format(RedisKeyEnum.AUTH_TOKEN.getKey(), map.get("jti"));
            redisService.set(token_key, user, 60L*60L*18L);
            user.setTokenexpired(60L*60L*18L);
            user.setPassword(null);
            msg.setResult(user);
            //更新auth最后登录时间
            authInfo.setLasttime(logintime);
            authorizationService.updateById(authInfo);
        } catch (Exception e) {
            msg.setCode("102");
            msg.setMessage("登录失败请稍后重试");
        }
        return msg;
    }
}
src/main/java/com/gk/firework/Controller/PatrolController.java
对比新文件
@@ -0,0 +1,593 @@
package com.gk.firework.Controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.*;
import com.gk.firework.Domain.Utils.*;
import com.gk.firework.Domain.Vo.EnterpriseVo;
import com.gk.firework.Domain.Vo.PatrolOrderVo;
import com.gk.firework.Service.*;
import com.sun.org.apache.xpath.internal.operations.Bool;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.support.StandardMultipartHttpServletRequest;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@Api(tags = "安全巡检接口")
@RestController
public class PatrolController extends BaseController{
    @Value("${patrolPath}")
    private String patrolPath; //配置文件配置的物理保存地址
    @Value("${patrolUrl}")
    private String patrolUrl; //配置文件配置的url
    @Autowired
    PatrolOrderService patrolOrderService;
    @Autowired
    PatrolDetailService patrolDetailService;
    @Autowired
    SelfCheckService selfCheckService;
    @Autowired
    EnterpriseService enterpriseService;
    @Autowired
    UserService userService;
    @Autowired
    ExcelExportService excelExportService;
    @GetMapping("/getEnterpriseVo")
    @ApiOperation(value = "根据企业编号获取巡检企业信息",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "enterprisenumber",value = "单位编号"),
    })
    public Msg getEnterpriseVo(EnterpriseVo enterpriseVo){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        EnterpriseVo enterprise = enterpriseService.selctSimpleByNumber(enterpriseVo.getEnterprisenumber());
        List<PatrolOrderVo> patrolOrderVos = patrolOrderService.selectListByEnterprise(enterprise.getEnterprisename(),getUser().getUsername());
        enterprise.setPatrolOrderVos(patrolOrderVos);
        if (enterprise != null) {
            msg.setResult(enterprise);
            return msg;
        }else {
            msg.setCode("999");
            msg.setMessage("未找到该企业");
            return msg;
        }
    }
    @GetMapping("/getSelfCheck")
    @ApiOperation(value = "根据企业类型获取检查内容",response = Msg.class)
    public Msg getSelfCheck(SelfCheckInfo selfCheck){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        List<SelfCheckInfo> selfChecks = selfCheckService.selctByType(selfCheck.getType());
        if (selfChecks.size() > 0) {
            msg.setResult(selfChecks);
            return msg;
        }else {
            msg.setCode("999");
            msg.setMessage("未找到该检查内容");
            return msg;
        }
    }
    @ApiOperation(value = "上传图片",notes = "上传图片")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query",name = "files",value = "文件"),
    })
    @PostMapping("/uploadPic")
    @ResponseBody
    public Msg uploadPic(StandardMultipartHttpServletRequest req){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        MultiValueMap<String, MultipartFile> multipartFiles = req.getMultiFileMap();
        MultipartFile  picFile = multipartFiles.get("files").get(0);
        if (null == picFile){
            msg.setCode("404");
            msg.setMessage("上传文件为空");
        }else {
            try {
                String picmame = UploadUtil.uploadFile(picFile,patrolPath);
                msg.setResult(patrolUrl+picmame);
            }catch (Exception e){
                e.printStackTrace();
                msg.setCode("500");
                msg.setMessage("上传失败");
            }
        }
        return msg;
    }
    @ApiOperation(value = "提交检查内容",notes = "提交检查内容")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "enterpriseId",value = "企业id"),
            @ApiImplicitParam(name = "userId",value = "用户id"),
            @ApiImplicitParam(name = "createdby",value = "用户名"),
            @ApiImplicitParam(name = "checkcontent",value = "检查内容"),
            @ApiImplicitParam(name = "content",value = "检查内容"),
            @ApiImplicitParam(name = "standard",value = "参考判断"),
            @ApiImplicitParam(name = "choose",value = "选项"),
            @ApiImplicitParam(name = "reason",value = "理由"),
            @ApiImplicitParam(name = "baforepath",value = "整改前图片"),
            @ApiImplicitParam(name = "ismend",value = "是否整改"),
    })
    @PostMapping("/submitPatrol")
    @ResponseBody
    public Msg submitPatrol(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        Long enterpriseId = jsonObject.getLong("enterpriseId");
        Long userId = jsonObject.getLong("userId");
        String createdby = jsonObject.getString("createdby");
        JSONArray jsonArray = jsonObject.getJSONArray("checkcontent");
        PatrolOrderInfo patrolOrderInfo = new PatrolOrderInfo();
        patrolOrderInfo.setUserid(userId);
        patrolOrderInfo.setCompanyid(enterpriseId);
        patrolOrderInfo.setCreatedby(createdby);
        patrolOrderInfo.setCreateddate(new Date());
        patrolOrderInfo.setModifiedby(createdby);
        patrolOrderInfo.setModifieddate(new Date());
        patrolOrderService.save(patrolOrderInfo);
        List<PatrolDetailInfo> patrolDetailInfoList = new ArrayList<>();
        Byte ismend = 1;
        for (int i = 0; i < jsonArray.size(); i++){
            JSONObject patrolDetail = jsonArray.getJSONObject(i);
            PatrolDetailInfo patrolDetailInfo = new PatrolDetailInfo();
            patrolDetailInfo.setOrderid(patrolOrderInfo.getId());
            patrolDetailInfo.setContent(patrolDetail.getString("content"));
            patrolDetailInfo.setStandard(patrolDetail.getString("standard"));
            patrolDetailInfo.setChoose(patrolDetail.getString("choose"));
            patrolDetailInfo.setReason(patrolDetail.getString("reason"));
            patrolDetailInfo.setBeforepath(patrolDetail.getString("baforepath"));
            patrolDetailInfo.setIsmend(patrolDetail.getByte("ismend"));
            patrolDetailInfo.setCreatedby(createdby);
            patrolDetailInfo.setCreateddate(new Date());
            patrolDetailInfo.setModifiedby(createdby);
            patrolDetailInfo.setModifieddate(new Date());
            if (patrolDetailInfo.getIsmend() == 0){
                ismend = 0;
            }
            patrolDetailInfoList.add(patrolDetailInfo);
        }
        patrolDetailService.saveBatch(patrolDetailInfoList);
        patrolOrderInfo.setIsmend(ismend);
        patrolOrderService.updateById(patrolOrderInfo);
        return msg;
    }
    @GetMapping("/selfCheck")
    @ApiOperation(value = "获取自定义检查内容",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "sort",value = "排序规则"),
            @ApiImplicitParam(name = "order",value = "排序字段"),
            @ApiImplicitParam(name = "type",value = "检查类型"),
            @ApiImplicitParam(name = "content",value = "检查内容"),
    })
    public Msg getSelfCheckList(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize, String sort, String order,
                            String type, String content){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(type)) {
            condition.put("type", type.trim());
        }
        if (StringUtils.isNotBlank(content)) {
            condition.put("content", content.trim());
        }
        pageInfo.setCondition(condition);
        selfCheckService.selectDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @PostMapping("/selfCheck")
    @ApiOperation(value = "添加自定义检查内容",response = Msg.class)
    public Msg addSelfCheckList(@RequestBody SelfCheckInfo selfCheckInfo){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        if (StringUtils.isBlank(selfCheckInfo.getType())){
            msg.setCode("999");
            msg.setMessage("检查类型不能为空");
            return msg;
        }else if (StringUtils.isBlank(selfCheckInfo.getContent())){
            msg.setCode("999");
            msg.setMessage("检查内容不能为空");
            return msg;
        }else if (StringUtils.isBlank(selfCheckInfo.getStandard())){
            msg.setCode("999");
            msg.setMessage("参考判断不能为空");
            return msg;
        }
        selfCheckInfo.setCreatedby(getUser().getUsername());
        selfCheckInfo.setModifiedby(getUser().getUsername());
        selfCheckInfo.setCreateddate(new Date());
        selfCheckInfo.setModifieddate(new Date());
        selfCheckInfo.setIsdel((byte)0);
        selfCheckService.save(selfCheckInfo);
        return msg;
    }
    @PostMapping("/putselfCheck")
    @ApiOperation(value = "修改自定义检查内容",response = Msg.class)
    public Msg editSelfCheckList(@RequestBody SelfCheckInfo selfCheckInfo){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        if (StringUtils.isBlank(selfCheckInfo.getType())){
            msg.setCode("999");
            msg.setMessage("检查类型不能为空");
            return msg;
        }else if (StringUtils.isBlank(selfCheckInfo.getContent())){
            msg.setCode("999");
            msg.setMessage("检查内容不能为空");
            return msg;
        }else if (StringUtils.isBlank(selfCheckInfo.getStandard())){
            msg.setCode("999");
            msg.setMessage("参考判断不能为空");
            return msg;
        }
        selfCheckInfo.setModifiedby(getUser().getUsername());
        selfCheckInfo.setModifieddate(new Date());
        selfCheckService.updateById(selfCheckInfo);
        return msg;
    }
    @PostMapping("/delselfCheck")
    @ApiOperation(value = "删除自定义检查内容",response = Msg.class)
    public Msg delSelfCheckList(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        Long id = jsonObject.getLong("id");
        SelfCheckInfo selfCheckInfo = selfCheckService.getById(id);
        if (selfCheckInfo != null){
            selfCheckInfo.setIsdel((byte)1);
            selfCheckInfo.setModifiedby(getUser().getUsername());
            selfCheckInfo.setModifieddate(new Date());
            selfCheckService.updateById(selfCheckInfo);
            return msg;
        }else {
            msg.setCode("999");
            msg.setMessage("未找到检查内容");
            return msg;
        }
    }
    @PostMapping("/selfChecks")
    @ApiOperation(value = "删除自定义检查内容",response = Msg.class)
    public Msg bashDelSelfCheckList(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        JSONArray ids = jsonObject.getJSONArray("ids");
        List<Long> idList = ids.toJavaList(Long.class);
        List<SelfCheckInfo> selfCheckInfoList = selfCheckService.selectByIds(idList);
        if (selfCheckInfoList != null && selfCheckInfoList.size() > 0){
            for (SelfCheckInfo selfCheckInfo : selfCheckInfoList) {
                selfCheckInfo.setIsdel((byte)1);
                selfCheckInfo.setModifiedby(getUser().getUsername());
                selfCheckInfo.setModifieddate(new Date());
                selfCheckService.updateById(selfCheckInfo);
            }
            return msg;
        }else {
            msg.setCode("999");
            msg.setMessage("未找到检查内容");
            return msg;
        }
    }
    @PostMapping("/importSelfCheck")
    @ApiOperation(value = "导入自定义检查内容",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "file",value = "文件",required = true),
    })
    public Msg addSelfCheckList(MultipartFile file){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        String filesave ="";
        try {
            SimpleDateFormat sdf = new SimpleDateFormat( "yyyyMMddHHmmssSSS" );
            if (file == null)
            {
                msg.setCode("404");
                msg.setMessage("未找到上传文件");
                return msg;
            }
            long size = file.getSize();
            if(0 == size)
            {
                msg.setCode("404");
                msg.setMessage("上传文件大小为空");
                return msg;
            }
            if(!FileOptUtils.isDirExists(patrolPath)){
                msg.setCode("500");
                msg.setMessage("发生错误或不为目录");
                return msg;
            }
            filesave = patrolPath + getUser().getUsername() + "_" + sdf.format(new Date()) +".xlsx";
            file.transferTo(new File(filesave));
            InputStream in = new FileInputStream(filesave);
            String name = file.getOriginalFilename();
            Boolean isExcel2007 = name.substring(name.lastIndexOf(".") + 1).endsWith("xlsx")? true:false;
            BooleanReason blret = excelExportService.imporSelfCheckExcel(in,getUser().getUsername(),isExcel2007);
            if(blret.getValue().equals(false))
            {
                msg.setCode("500");
                msg.setMessage(blret.getResultmsg());
                return msg;
            }
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("500");
            msg.setMessage("导入发生错误");
            return msg;
        }
        return msg;
    }
    @GetMapping("/patrolOrder")
    @ApiOperation(value = "获取安全巡检记录",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "sort",value = "排序规则"),
            @ApiImplicitParam(name = "order",value = "排序字段"),
            @ApiImplicitParam(name = "starttime",value = "开始时间"),
            @ApiImplicitParam(name = "endtime",value = "结束时间"),
            @ApiImplicitParam(name = "enterprisetype",value = "企业类型"),
            @ApiImplicitParam(name = "enterprisename",value = "企业名称"),
            @ApiImplicitParam(name = "checkname",value = "检查人"),
            @ApiImplicitParam(name = "ismend",value = "是否整改"),
            @ApiImplicitParam(name = "province",value = "省份"),
            @ApiImplicitParam(name = "city",value = "城市"),
            @ApiImplicitParam(name = "area",value = "区县"),
            @ApiImplicitParam(name = "town",value = "乡镇"),
            @ApiImplicitParam(name = "community",value = "社区"),
    })
    public Msg getPatrolOrderList(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize, String sort, String order,
                                String starttime, String endtime, String enterprisename, String checkname, String enterprisetype,
                                  String province, String city, String area, String town, String community, Byte ismend){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(starttime)) {
            condition.put("starttime", starttime.trim());
        }
        if (StringUtils.isNotBlank(endtime)) {
            condition.put("endtime", endtime.trim());
        }
        if (StringUtils.isNotBlank(enterprisename)) {
            condition.put("enterprisename", enterprisename.trim());
        }
        if (StringUtils.isNotBlank(checkname)) {
            condition.put("checkname", checkname.trim());
        }
        if (StringUtils.isNotBlank(enterprisetype)) {
            condition.put("enterprisetype", enterprisetype.trim());
        }
        if (ismend != null){
            condition.put("ismend",ismend);
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        if (userInfo.getCompanyid() != null){
            Enterprise enterprise = enterpriseService.getById(userInfo.getCompanyid());
            condition.put("enterprisename", enterprise.getEnterprisename());
        }else if (userInfo.getType() == 3){
            condition.put("province",userInfo.getProvince());
            condition.put("city",userInfo.getCity());
            condition.put("area",userInfo.getArea());
            condition.put("town",userInfo.getTown());
            condition.put("community",userInfo.getCommunity());
        }
        if (StringUtils.isNotBlank(province) && condition.get("province") == null) {
            condition.put("province", province.trim());
            if (StringUtils.isNotBlank(city)) {
                condition.put("city", city.trim());
            }
            if (StringUtils.isNotBlank(area)) {
                condition.put("area", area.trim());
            }
            if (StringUtils.isNotBlank(town)) {
                condition.put("town", town.trim());
            }
            if (StringUtils.isNotBlank(community)) {
                condition.put("community", community.trim());
            }
        }
        pageInfo.setCondition(condition);
        patrolOrderService.selectDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @GetMapping("/patrolDetail")
    @ApiOperation(value = "获取安全巡检明细",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "sort",value = "排序规则"),
            @ApiImplicitParam(name = "order",value = "排序字段"),
            @ApiImplicitParam(name = "orderid",value = "订单id"),
            @ApiImplicitParam(name = "ismend",value = "是否整改"),
    })
    public Msg getpatrolDetailList(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize, String sort, String order,
                                  Long orderid, Byte ismend){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (orderid != null) {
            condition.put("orderid", orderid);
        }
        if (ismend != null) {
            condition.put("ismend", ismend);
        }
        pageInfo.setCondition(condition);
        patrolDetailService.selectDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @PostMapping("/mendPatrol")
    @ApiOperation(value = "上报整改",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "单据id"),
            @ApiImplicitParam(name = "file",value = "整改后图片文件"),
            @ApiImplicitParam(name = "ismend",value = "是否整改"),
    })
    public Msg mendPatrol(Long id, MultipartFile file, Byte ismend) throws Exception {
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        if (id == null){
            msg.setCode("999");
            msg.setMessage("单据id不能为空");
            return msg;
        }
        PatrolDetailInfo patrolDetailInfo = patrolDetailService.getById(id);
        if (patrolDetailInfo == null){
            msg.setCode("999");
            msg.setMessage("未找到单据");
            return msg;
        }
        if (file != null){
            String origincontract = UploadUtil.uploadFile(file,patrolPath);
            patrolDetailInfo.setAfterpath(patrolUrl+origincontract);
        }
        if (ismend != null){
            patrolDetailInfo.setIsmend(ismend);
        }
        patrolDetailService.updateById(patrolDetailInfo);
        //查看所有detail 全为已整改 则修改order为已整改
        int isNotMend = patrolDetailService.selectIsNotMend(patrolDetailInfo.getOrderid());
        if (isNotMend == 0){
            PatrolOrderInfo patrolOrderInfo = patrolOrderService.getById(patrolDetailInfo.getOrderid());
            if (patrolOrderInfo != null){
                patrolOrderInfo.setIsmend((byte)1);
                patrolOrderService.updateById(patrolOrderInfo);
            }
        }
        return msg;
    }
    @PostMapping("/appMendPatrol")
    @ApiOperation(value = "APP上报整改",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "单据id"),
            @ApiImplicitParam(name = "afterpath",value = "整改后图片文件"),
            @ApiImplicitParam(name = "ismend",value = "是否整改"),
    })
    public Msg mendPatrol(Long id, String afterpath, Byte ismend) throws Exception {
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        if (id == null){
            msg.setCode("999");
            msg.setMessage("单据id不能为空");
            return msg;
        }
        PatrolDetailInfo patrolDetailInfo = patrolDetailService.getById(id);
        if (patrolDetailInfo == null){
            msg.setCode("999");
            msg.setMessage("未找到单据");
            return msg;
        }
        patrolDetailInfo.setAfterpath(afterpath);
        if (ismend != null){
            patrolDetailInfo.setIsmend(ismend);
        }
        patrolDetailService.updateById(patrolDetailInfo);
        //查看所有detail 全为已整改 则修改order为已整改
        int isNotMend = patrolDetailService.selectIsNotMend(patrolDetailInfo.getOrderid());
        if (isNotMend == 0){
            PatrolOrderInfo patrolOrderInfo = patrolOrderService.getById(patrolDetailInfo.getOrderid());
            if (patrolOrderInfo != null){
                patrolOrderInfo.setIsmend((byte)1);
                patrolOrderService.updateById(patrolOrderInfo);
            }
        }
        return msg;
    }
}
src/main/java/com/gk/firework/Controller/PermissionController.java
对比新文件
@@ -0,0 +1,147 @@
package com.gk.firework.Controller;
import com.alibaba.fastjson.JSONObject;
import com.gk.firework.Domain.PermissionInfo;
import com.gk.firework.Domain.Utils.Msg;
import com.gk.firework.Domain.Vo.Menu;
import com.gk.firework.Service.PermissionService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.List;
@Api(tags = "菜单接口")
@RestController
public class PermissionController {
    @Autowired
    PermissionService permissionService;
    @GetMapping("/permissions")
    @ApiOperation(value = "获取菜单数据", notes = "获取菜单数据", response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query",name = "userId",value = "用户id",required = true)})
    public Msg getPermission(@RequestParam String userId){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        List<Menu> menus = permissionService.selectByUserId(userId);
        msg.setResult(menus);
        return msg;
    }
    @PostMapping("/addpermissions")
    @ApiOperation(value = "添加菜单", notes = "添加菜单", response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query",name = "component",value = "接口路径"),
            @ApiImplicitParam(paramType="query",name = "icon",value = "图标"),
            @ApiImplicitParam(paramType="query",name = "level",value = "第几级菜单",required = true),
            @ApiImplicitParam(paramType="query",name = "name",value = "名称",required = true),
            @ApiImplicitParam(paramType="query",name = "parentidId",value = "父级id"),
            @ApiImplicitParam(paramType="query",name = "path",value = "路径"),
            @ApiImplicitParam(paramType="query",name = "sortorder",value = "排序",required = true),
            @ApiImplicitParam(paramType="query",name = "status",value = "状态",required = true),
            @ApiImplicitParam(paramType="query",name = "title",value = "标题"),
            @ApiImplicitParam(paramType="query",name = "type",value = "类型",required = true),
            @ApiImplicitParam(paramType="query",name = "operator",value = "操作人"),
    })
    public Msg addPermission(@ApiParam(value = "component,icon,level,name,parentidId,path,sortorder,status,title,type,operator")
            @RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PermissionInfo permissionInfo = new PermissionInfo();
        permissionInfo.setName(jsonObject.getString("name"));
        permissionInfo.setLevel(jsonObject.getInteger("level"));
        permissionInfo.setTitle(jsonObject.getString("title"));
        permissionInfo.setPath(jsonObject.getString("path"));
        permissionInfo.setComponent(jsonObject.getString("component"));
        permissionInfo.setIcon(jsonObject.getString("icon"));
        permissionInfo.setStatus(jsonObject.getInteger("status"));
        permissionInfo.setSortorder(jsonObject.getDouble("sortorder"));
        permissionInfo.setType(jsonObject.getInteger("type"));
        permissionInfo.setExpand(true);
        permissionInfo.setChecked(false);
        permissionInfo.setSelected(false);
        permissionInfo.setCreatedby(jsonObject.getString("operator"));
        permissionInfo.setCreateddate(new Date());
        permissionInfo.setLastmodifiedby(jsonObject.getString("operator"));
        permissionInfo.setLastmodifieddate(new Date());
        permissionInfo.setParentid(jsonObject.getInteger("parentid"));
        if (permissionInfo.getParentid() != null) {
            PermissionInfo parentPermission = permissionService.getById(permissionInfo.getParentid());
            permissionInfo.setLevel(parentPermission.getLevel()+1);
        }
        permissionService.save(permissionInfo);
        return msg;
    }
    @PostMapping("/putpermissions")
    @ApiOperation(value = "修改菜单", notes = "修改菜单", response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query",name = "id",value = "id",required = true),
            @ApiImplicitParam(paramType="body",name = "component",value = "接口路径"),
            @ApiImplicitParam(paramType="body",name = "icon",value = "图标"),
            @ApiImplicitParam(paramType="body",name = "level",value = "第几级菜单",required = true),
            @ApiImplicitParam(paramType="body",name = "name",value = "名称",required = true),
            @ApiImplicitParam(paramType="body",name = "parentidId",value = "父级id"),
            @ApiImplicitParam(paramType="body",name = "path",value = "路径"),
            @ApiImplicitParam(paramType="body",name = "sortorder",value = "排序",required = true),
            @ApiImplicitParam(paramType="body",name = "status",value = "状态",required = true),
            @ApiImplicitParam(paramType="body",name = "title",value = "标题"),
            @ApiImplicitParam(paramType="body",name = "type",value = "类型",required = true),
            @ApiImplicitParam(paramType="body",name = "operator",value = "操作人"),
    })
    public Msg editPermission(@ApiParam(value = "component,icon,level,name,parentidId,path,sortorder,status,title,type,operator")
                             @RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PermissionInfo permissionInfo = new PermissionInfo();
        permissionInfo.setId(jsonObject.getInteger("id"));
        permissionInfo.setName(jsonObject.getString("name"));
        permissionInfo.setLevel(jsonObject.getInteger("level"));
        permissionInfo.setTitle(jsonObject.getString("title"));
        permissionInfo.setPath(jsonObject.getString("path"));
        permissionInfo.setComponent(jsonObject.getString("component"));
        permissionInfo.setIcon(jsonObject.getString("icon"));
        permissionInfo.setStatus(jsonObject.getInteger("status"));
        permissionInfo.setSortorder(jsonObject.getDouble("sortorder"));
        permissionInfo.setType(jsonObject.getInteger("type"));
        permissionInfo.setExpand(true);
        permissionInfo.setChecked(false);
        permissionInfo.setSelected(false);
        permissionInfo.setCreatedby(jsonObject.getString("operator"));
        permissionInfo.setLastmodifiedby(jsonObject.getString("operator"));
        permissionInfo.setLastmodifieddate(new Date());
        permissionInfo.setParentid(jsonObject.getInteger("parentid"));
        permissionService.updateById(permissionInfo);
        return msg;
    }
    @PostMapping("/delpermissions")
    @ApiOperation(value = "删除菜单", notes = "删除菜单", response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query",name = "id",value = "id",required = true),
            @ApiImplicitParam(paramType="body",name = "operator",value = "操作人"),
    })
    public Msg delPermission(@ApiParam(value = "id,operator")
                              @RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PermissionInfo permissionInfo = permissionService.getById(jsonObject.getInteger("id"));
        permissionInfo.setStatus(0);
        permissionService.updateById(permissionInfo);
        return msg;
    }
}
src/main/java/com/gk/firework/Controller/ProductController.java
对比新文件
@@ -0,0 +1,879 @@
package com.gk.firework.Controller;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.*;
import com.gk.firework.Domain.Enum.Element;
import com.gk.firework.Domain.Enum.EnterpriseSafetySupervision;
import com.gk.firework.Domain.Enum.ErrorCode;
import com.gk.firework.Domain.Utils.*;
import com.gk.firework.Domain.Vo.DirectionDetail;
import com.gk.firework.Domain.Vo.FireworkDeal;
import com.gk.firework.Domain.Vo.ProductThresholdVo;
import com.gk.firework.Domain.Vo.ProductVo;
import com.gk.firework.Service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.BindingResult;
import org.springframework.validation.FieldError;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
/**
 * @author jingjy
 */
@Api(tags = "产品信息接口")
@RequestMapping("/product")
@RestController
public class ProductController extends BaseController {
    @Value("${productPath}")
    private String productPath; //配置文件配置的物理保存地址
    private ProductService productService;
    private StockService stockService;
    private UserService userService;
    private EnterpriseService enterpriseService;
    private ProductThresholdService productThresholdService;
    private ProductCategoryService productCategoryService;
    private ProductPriceService productPriceService;
    private ExcelExportService excelExportService;
    private static final Byte ADD_OPTION = 1;
    private static final Byte EDIT_OPTION = 2;
    private static final Byte DEL_OPTION = 3;
    @Autowired
    public ProductController(ProductService productService,StockService stockService, UserService userService,
                             EnterpriseService enterpriseService,ProductThresholdService productThresholdService,
                             ProductCategoryService productCategoryService,ProductPriceService productPriceService,
                             ExcelExportService excelExportService ) {
        this.productService = productService;
        this.stockService = stockService;
        this.userService = userService;
        this.enterpriseService = enterpriseService;
        this.productThresholdService = productThresholdService;
        this.productCategoryService = productCategoryService;
        this.productPriceService = productPriceService;
        this.excelExportService = excelExportService;
    }
    /**
     * 查询全部的产品信息
     *
     * @param name          产品名;
     * @param directionCode :流向码(十位);
     * @param manufacturer  :生产厂家
     * @return List<ProductInfo> 产品信息的集合
     */
    @GetMapping("/info")
    public Msg getProductInfo(@RequestParam(value = "name", required = false) String name,
                              @RequestParam(value = "directionCode", required = false) String directionCode,
                              @RequestParam(value = "manufacturer", required = false) String manufacturer,
                              @RequestParam(value = "type", required = false) String type,
                              @RequestParam(value = "secondaryType", required = false) String secondaryType,
                              @RequestParam(value = "isOld", required = false) String isOld,
                              @RequestParam(defaultValue = "0") Integer pageIndex,
                              @RequestParam(defaultValue = "10") Integer pageSize,
                              String sort, String order) {
        Msg msg = new Msg(true);
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        Map<String, Object> condition = new HashMap<>(4);
        if (StringUtils.isNotBlank(name)) {
            condition.put("name", name);
        }
        if (StringUtils.isNotBlank(directionCode)) {
            condition.put("directionCode", directionCode);
        }
        if (StringUtils.isNotBlank(manufacturer)) {
            condition.put("manufacturer", manufacturer);
        }
        if (StringUtils.isNotBlank(type)) {
            condition.put("type", type);
        }
        if (StringUtils.isNotBlank(secondaryType)) {
            condition.put("secondaryType", secondaryType);
        }
        if (StringUtils.isNotBlank(isOld)) {
            condition.put("isOld", isOld);
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        if (userInfo.getCompanyid() != null){
            Enterprise enterprise = enterpriseService.getById(userInfo.getCompanyid());
            if (enterprise.getSafetysupervision().equals(EnterpriseSafetySupervision.PRODUCE.getMsg())){
                condition.put("manufacturer", enterprise.getEnterprisename());
            }else {
                condition.put("companynumber", enterprise.getEnterprisenumber());
            }
        }
        pageInfo.setCondition(condition);
        productService.selectDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    /**
     * 查询全部的产品信息编码
     *
     * @return List<String> 产品编码的集合
     */
    @GetMapping("/codes")
    public Msg getProductCodes(){
        List<String>list = productService.getAllProductCodes();
        return success(list);
    }
    /**
     * 查询全部的产品信息
     *
     * @param name          产品名;
     * @param directionCode :流向码(十位);
     * @param manufacturer  :生产厂家
     * @return List<ProductInfo> 产品信息的集合
     */
    @GetMapping("/exportInfo")
    public Msg exportProduct(@RequestParam(value = "name", required = false) String name,
                              @RequestParam(value = "directionCode", required = false) String directionCode,
                              @RequestParam(value = "manufacturer", required = false) String manufacturer,
                              @RequestParam(value = "type", required = false) String type,
                              @RequestParam(value = "secondaryType", required = false) String secondaryType) {
        Msg msg = new Msg(true);
        Map<String, Object> condition = new HashMap<>(4);
        if (StringUtils.isNotBlank(name)) {
            condition.put("name", name);
        }
        if (StringUtils.isNotBlank(directionCode)) {
            condition.put("directionCode", directionCode);
        }
        if (StringUtils.isNotBlank(manufacturer)) {
            condition.put("manufacturer", manufacturer);
        }
        if (StringUtils.isNotBlank(type)) {
            condition.put("type", type);
        }
        if (StringUtils.isNotBlank(secondaryType)) {
            condition.put("secondaryType", secondaryType);
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        if (userInfo.getCompanyid() != null){
            Enterprise enterprise = enterpriseService.getById(userInfo.getCompanyid());
            if (enterprise.getSafetysupervision().equals(EnterpriseSafetySupervision.PRODUCE.getMsg())){
                condition.put("manufacturer", enterprise.getEnterprisename());
            }else {
                condition.put("companynumber", enterprise.getEnterprisenumber());
            }
        }
        List<ProductInfo> productInfos = productService.selectProductInfo(condition);
        msg.setResult(productInfos);
        return msg;
    }
    @PostMapping("/updatePrice")
    public Msg updatePrice( @RequestBody ProductInfo productInfo) {
        Msg msg = new Msg(true);
        if (productInfo == null || StringUtils.isBlank(productInfo.getDirectionCode())
                || productInfo.getDirectionCode().length() < FireworkDeal.DIRECTION_ITEM){
            msg.setCode("999");
            msg.setMessage("流向码异常,修改失败");
            return msg;
        }
        ProductInfo productInfoExist = productService.selectByDirection(productInfo.getDirectionCode());
        if (productInfoExist == null) {
            msg.setCode("999");
            msg.setMessage("产品信息流向码不存在,修改失败!");
            return msg;
        }
        String companynumber = "";
        UserInfo userInfo = userService.getById(getUser().getId());
        if (userInfo.getCompanyid() != null){
            Enterprise enterprise = enterpriseService.getById(userInfo.getCompanyid());
            if (!enterprise.getSafetysupervision().equals(EnterpriseSafetySupervision.PRODUCE.getMsg())){
                companynumber = enterprise.getEnterprisenumber();
            }
        }
        if (StringUtils.isBlank(companynumber)){
            msg.setCode("999");
            msg.setMessage("非经营企业无法修改价格!");
            return msg;
        }
        ProductPriceInfo productPriceInfo = productPriceService.selectByCode(companynumber,productInfo.getDirectionCode());
        if (productPriceInfo != null){
            productPriceInfo.setPrice(productInfo.getSalePrice());
            productPriceInfo.setUpdated(new Date());
            productPriceInfo.setUpdator(userInfo.getUsername());
            productPriceService.updateById(productPriceInfo);
        }else {
            ProductPriceInfo productPrice = new ProductPriceInfo();
            productPrice.setCompanynumber(companynumber);
            productPrice.setItemcode(productInfo.getDirectionCode());
            productPrice.setPrice(productInfo.getSalePrice());
            productPrice.setUpdated(new Date());
            productPrice.setUpdator(userInfo.getUsername());
            productPriceService.save(productPrice);
        }
        return msg;
    }
    @PostMapping("/importEditPrice")
    @ApiOperation(value = "导入修改价格",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "file",value = "文件",required = true),
    })
    public Msg addSelfCheckList(MultipartFile file){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        String filesave ="";
        try {
            SimpleDateFormat sdf = new SimpleDateFormat( "yyyyMMddHHmmssSSS" );
            if (file == null)
            {
                msg.setCode("404");
                msg.setMessage("未找到上传文件");
                return msg;
            }
            long size = file.getSize();
            if(0 == size)
            {
                msg.setCode("404");
                msg.setMessage("上传文件大小为空");
                return msg;
            }
            if(!FileOptUtils.isDirExists(productPath)){
                msg.setCode("500");
                msg.setMessage("发生错误或不为目录");
                return msg;
            }
            String companynumber = "";
            UserInfo userInfo = userService.getById(getUser().getId());
            if (userInfo.getCompanyid() != null){
                Enterprise enterprise = enterpriseService.getById(userInfo.getCompanyid());
                if (!enterprise.getSafetysupervision().equals(EnterpriseSafetySupervision.PRODUCE.getMsg())){
                    companynumber = enterprise.getEnterprisenumber();
                }
            }
            if (StringUtils.isBlank(companynumber)){
                msg.setCode("999");
                msg.setMessage("非经营企业无法修改价格!");
                return msg;
            }
            filesave = productPath + getUser().getUsername() + "_" + sdf.format(new Date()) +".xlsx";
            file.transferTo(new File(filesave));
            InputStream in = new FileInputStream(filesave);
            String name = file.getOriginalFilename();
            Boolean isExcel2007 = name.substring(name.lastIndexOf(".") + 1).endsWith("xlsx")? true:false;
            BooleanReason blret = excelExportService.imporEditPriceExcel(in,companynumber,getUser().getUsername(),isExcel2007);
            if(blret.getValue().equals(false))
            {
                msg.setCode("500");
                msg.setMessage(blret.getResultmsg());
                return msg;
            }
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("500");
            msg.setMessage("导入发生错误");
            return msg;
        }
        return msg;
    }
    @PostMapping("/add")
    public Msg addProduct(@Validated @RequestBody ProductInfo productInfo, BindingResult bindingResult) {
        if (bindingResult.hasErrors()) {
            StringBuilder stringBuilder = new StringBuilder();
            for (String s : bindingResult.getFieldErrors().stream()
                    .map(FieldError::getDefaultMessage).collect(Collectors.toList())) {
                stringBuilder.append(s).append(",");
            }
            return new Msg(ErrorCode.ERROR_10002,stringBuilder.toString());
        }
        if (StringUtils.isBlank(productInfo.getDirectionCode()) || productInfo.getDirectionCode().length() != 10){
            return new Msg(ErrorCode.ERROR_10004,"流向码格式错误,新增失败!");
        }
        List<ProductInfo> productInfosExist = productService.selectByProduct(productInfo);
        if (productInfosExist != null && productInfosExist.size() != 0) {
            return new Msg(ErrorCode.ERROR_50003,"新增产品信息流向码已存在,无法添加!");
        }
        Enterprise enterprise = enterpriseService.selectEnterpriseByNumber(productInfo.getManufacturer());
        if (enterprise == null || !enterprise.getSafetysupervision().equals(EnterpriseSafetySupervision.PRODUCE.getMsg())){
            return new Msg(ErrorCode.ERROR_50002,"企业信息不存在 或 该企业不为生产企业!");
        }
        Byte isOld = 1;
        productInfo.setCompanyNumber(enterprise.getEnterprisenumber());
        productInfo.setManufacturer(enterprise.getEnterprisename());
        productInfo.setCreatedDate(new Date());
        productInfo.setCreatedBy(getUser().getUsername());
        productInfo.setIsOld(isOld);
        Msg thresholdMsg = isFitThreshold(productInfo);
        if (!thresholdMsg.getCode().equals(ErrorCode.SUCCESS.getCode())){
            return thresholdMsg;
        }
        boolean i = productService.save(productInfo);
        if (!i) {
            return new Msg(ErrorCode.ERROR_40001,"新增失败,请重新新增!");
        }
        return success();
    }
    @PostMapping("/addNew")
    public Msg addNewProduct(@Validated @RequestBody ProductInfo productInfo, BindingResult bindingResult) {
        Msg msg = new Msg(true);
        if (bindingResult.hasErrors()) {
            StringBuilder stringBuilder = new StringBuilder();
            for (String s : bindingResult.getFieldErrors().stream()
                    .map(FieldError::getDefaultMessage).collect(Collectors.toList())) {
                stringBuilder.append(s);
                stringBuilder.append(",");
            }
            msg.setCode("999");
            msg.setMessage(stringBuilder.toString());
            return msg;
        }
        Enterprise enterprise = enterpriseService.selectEnterpriseByNumber(productInfo.getManufacturer());
        if (enterprise == null || !enterprise.getSafetysupervision().equals(EnterpriseSafetySupervision.PRODUCE.getMsg())){
            msg.setCode("999");
            msg.setMessage("企业信息不存在 或 该企业不为生产企业!");
            return msg;
        }
        //生成十位流向码
        String itemCode = "";
        ProductCategory productCategory = productCategoryService.selectCategoryByLevelAndName(productInfo.getLevel(),
                productInfo.getSecondaryType());
        if (productCategory == null || StringUtils.isBlank(productCategory.getBitcode())){
            msg.setCode("999");
            msg.setMessage("产品类别错误,新增失败!");
            return msg;
        }
        int explosiveContent = productInfo.getExplosiveContent().setScale(0,BigDecimal.ROUND_UP).intValue();
        String explosive = "FFF";
        if (explosiveContent <= 4095){
            explosive = String.format("%03x",explosiveContent);
        }
        String randomStr = Element.random(Element.class).getValue().toString()+Element.random(Element.class).getValue().toString()
                +Element.random(Element.class).getValue().toString()+Element.random(Element.class).getValue().toString();
        if (StringUtils.isBlank(enterprise.getTwobitcode())){
            msg.setCode("999");
            msg.setMessage("两位企业编码为空,请联系管理员添加!");
            return msg;
        }
        itemCode = productCategory.getBitcode() + explosive + enterprise.getTwobitcode() + randomStr;
        productInfo.setDirectionCode(itemCode.toUpperCase());
        List<ProductInfo> productInfosExist = productService.selectByProduct(productInfo);
        if (productInfosExist != null && productInfosExist.size() != 0) {
            msg.setCode("999");
            msg.setMessage("新增产品信息流向码已存在,无法添加!");
            return msg;
        }
        BigDecimal totalExplosive = new BigDecimal(productInfo.getSpecification()).
                multiply(productInfo.getExplosiveContent());
        Msg thresholdMsg = isFitThreshold(productInfo);
        if (!thresholdMsg.getCode().equals(ErrorCode.SUCCESS.getCode())){
            return thresholdMsg;
        }
        productInfo.setExplosiveContent(totalExplosive);
        productInfo.setCompanyNumber(enterprise.getEnterprisenumber());
        productInfo.setManufacturer(enterprise.getEnterprisename());
        productInfo.setCreatedDate(new Date());
        productInfo.setCreatedBy(getUser().getUsername());
        boolean i = productService.save(productInfo);
        if (!i) {
            msg.setCode("999");
            msg.setMessage("新增失败,请重新新增!");
            return msg;
        }
        return msg;
    }
    @PostMapping("/update")
    public Msg updateProduct( @RequestBody ProductInfo productInfo) {
        Msg msg = new Msg(true);
        if (productInfo == null || StringUtils.isBlank(productInfo.getDirectionCode())
                || productInfo.getDirectionCode().length() < FireworkDeal.DIRECTION_ITEM){
            msg.setCode("999");
            msg.setMessage("流向码异常,删除失败");
            return msg;
        }
        ProductInfo productInfoExist = productService.selectByDirection(productInfo.getDirectionCode());
        if (productInfoExist == null) {
            msg.setCode("999");
            msg.setMessage("产品信息流向码不存在,修改失败!");
            return msg;
        }
        ProductInfo productInfoNew = new ProductInfo();
        productInfoNew.setId(productInfoExist.getId());
        productInfoNew.setPurchasePrice(productInfo.getPurchasePrice());
        productInfoNew.setSalePrice(productInfo.getSalePrice());
        productInfoNew.setModifiedDate(new Date());
        productInfoNew.setModifiedBy(getUser().getUsername());
        boolean i = productService.updateById(productInfoNew);
        if (!i) {
            msg.setCode("999");
            msg.setMessage("修改失败,请重新修改!");
            return msg;
        }
        return msg;
    }
    @PostMapping("/delete")
    public Msg deleteProduct(@RequestBody ProductInfo productInfo) {
        if (productInfo == null || StringUtils.isBlank(productInfo.getDirectionCode())
                || productInfo.getDirectionCode().length() < FireworkDeal.DIRECTION_ITEM){
            return new Msg(ErrorCode.ERROR_10004,"流向码异常,删除失败");
        }
        ProductInfo productInfoExist = productService.selectByDirection(productInfo.getDirectionCode());
        if (productInfoExist == null) {
            return new Msg(ErrorCode.ERROR_50001,"产品信息流向码不存在,删除失败");
        }
        boolean flag = productService.isProductUsed(productInfoExist.getId());
        if (flag){
            return new Msg(ErrorCode.ERROR_999,"当前产品已经签订合同或已经入库,无法删除");
        }
        ProductInfo productInfoNew = new ProductInfo();
        productInfoNew.setId(productInfoExist.getId());
        productInfoNew.setModifiedDate(new Date());
        productInfoNew.setModifiedBy(getUser().getUsername());
        productInfoNew.setIsDel((byte) 1);
        boolean i = productService.updateById(productInfoNew);
        if (!i) {
            return new Msg(ErrorCode.ERROR_40001,"删除失败,请重新删除");
        }
        return success();
    }
    @GetMapping("/get")
    public Msg getProductByCode(@RequestParam(value = "directionCode") String directionCode) {
        Msg msg = new Msg(true);
        if (StringUtils.isBlank(directionCode)) {
            msg.setCode("999");
            msg.setMessage("流向码为空,无法查询相关信息!");
            return msg;
        }
        DirectionDetail directionDetail = FireworkDeal.dealDirectionCode(directionCode);
        if (directionDetail == null) {
            msg.setCode("999");
            msg.setMessage("流向码不符合规则,请重新输入!");
            return msg;
        }
        ProductInfo productInfo = new ProductInfo();
        productInfo.setDirectionCode(directionDetail.getItemCode());
        UserInfo userInfo = userService.getById(getUser().getId());
        if (userInfo.getCompanyid() != null){
            Enterprise enterprise = enterpriseService.getById(userInfo.getCompanyid());
            if (!enterprise.getSafetysupervision().equals(EnterpriseSafetySupervision.PRODUCE.getMsg())){
                productInfo.setCompanyNumber(enterprise.getEnterprisenumber());
            }
        }
        List<ProductInfo> productInfos = productService.selectByProduct(productInfo);
        if (productInfos == null || productInfos.size() == 0) {
            msg.setCode("999");
            msg.setMessage("未找到相应的产品信息!");
            return msg;
        }
        if (productInfos.size() > 1) {
            msg.setCode("999");
            msg.setMessage("错误:存在多个对应的产品信息!");
            return msg;
        }
        ProductVo productVo = BeanUtils.copy(productInfos.get(0), ProductVo.class);
        productVo.setDirectionCode(directionCode);
        productVo.setItemCode(directionDetail.getItemCode());
        productVo.setDateCode(directionDetail.getDateCode());
        productVo.setSerialNo(directionDetail.getSerialNo());
        List<ProductVo> productVos = new ArrayList<>();
        if (directionDetail.getBoxNo() != null) {
            productVo.setBoxNo(directionDetail.getBoxNo());
            FireworkDeal.getProductVos(directionCode, directionDetail, directionDetail, productVos, productVo);
        } else {
            productVos.add(productVo);
        }
        msg.setResult(productVos);
        return msg;
    }
    @GetMapping("/gets")
    public Msg getProductsByCodes(@RequestParam String directionCode,@RequestParam String endCode){
        Msg msg = new Msg(true);
        if (StringUtils.isBlank(directionCode)|| StringUtils.isBlank(endCode)) {
            msg.setCode("999");
            msg.setMessage("流向码为空,无法查询相关信息!");
            return msg;
        }
        if (directionCode.length()!= 19 || endCode.length() != 5) {
            msg.setCode("999");
            msg.setMessage("流向码不符合规则,请重新输入!");
            return msg;
        }
        /*DirectionDetail directionDetail = FireworkDeal.dealDirectionCode(directionCode);
        DirectionDetail directionDetail2 = FireworkDeal.dealDirectionCode(directionCode.substring(0,14)+endCode);*/
        List<ProductVo>productVos = new ArrayList<>();
        ProductVo productVo = productService.selectVoByDirection(directionCode);
        try {
            Integer first = Integer.parseInt(directionCode.substring(14,19));
            Integer last = Integer.parseInt(endCode);
            if (first > last){
                Integer temp = first;
                first = last;
                last = temp;
            }
            for (int i = first; i <= last; i++){
                ProductVo productVoCopy = BeanUtils.copy(productVo, ProductVo.class);
                productVoCopy.setDirectionCode(directionCode.substring(0, 14) + String.format("%05d", i));
                productVos.add(productVoCopy);
            }
        }catch (Exception e){
            msg.setCode("999");
            msg.setMessage("流向码不符合规则,请重新输入!");
            return msg;
        }
        return success(productVos);
    }
    @GetMapping("/getSingle")
    public Msg getSingleProductByCode(@RequestParam(value = "directionCode") String directionCode) {
        Msg msg = new Msg(true);
        if (StringUtils.isBlank(directionCode)) {
            msg.setCode("999");
            msg.setMessage("流向码为空,无法查询相关信息!");
            return msg;
        }
        DirectionDetail directionDetail = FireworkDeal.dealDirectionCode(directionCode);
        if (directionDetail == null) {
            msg.setCode("999");
            msg.setMessage("流向码不符合规则,请重新输入!");
            return msg;
        }
        ProductInfo productInfo = new ProductInfo();
        productInfo.setDirectionCode(directionDetail.getItemCode());
        List<ProductInfo> productInfos = productService.selectByProduct(productInfo);
        if (productInfos == null || productInfos.size() == 0) {
            msg.setCode("999");
            msg.setMessage("未找到相应的产品信息!");
            return msg;
        }
        if (productInfos.size() > 1) {
            msg.setCode("999");
            msg.setMessage("错误:存在多个对应的产品信息!");
            return msg;
        }
        ProductVo productVo = BeanUtils.copy(productInfos.get(0), ProductVo.class);
        productVo.setDirectionCode(directionCode);
        productVo.setItemCode(directionDetail.getItemCode());
        productVo.setDateCode(directionDetail.getDateCode());
        productVo.setSerialNo(directionDetail.getSerialNo());
        msg.setResult(productVo);
        return msg;
    }
    @PostMapping("/explain")
    public Msg getProductListByCodes(@RequestBody JSONObject object) {
        Msg msg = new Msg(true);
        JSONArray jsonArray = object.getJSONArray("data");
        String userName = object.getString("userName");
        List<ProductVo>productVos = new ArrayList<>();
        for (int i = 0; i < jsonArray.size(); i++) {
            // 遍历 jsonArray 数组,把每一个对象转成 json 对象
            JSONObject jsonObject = jsonArray.getJSONObject(i);
            String directionCode = jsonObject.getString("directionCode");
            DirectionDetail directionDetail = FireworkDeal.dealDirectionCode(directionCode);
            if (FireworkDeal.is22Characters(directionCode)){
                ProductVo productVo = productService.selectVoByDirection(directionCode);
                FireworkDeal.getProductVos(directionCode, directionDetail, directionDetail, productVos,productVo);
            }else if (FireworkDeal.is19Characters(directionCode)){
                ProductVo productVo = productService.selectVoByDirection(directionCode);
                productVos.add(productVo);
            }
        }
        UserInfo userInfo = userService.selectByUser(userName);
        if (userInfo == null){
            msg.setCode("999");
            msg.setMessage("未找到用户信息!");
            return msg;
        }
        //移除重复元素
        List<ProductVo> productVoList = ProductVo.removeListDuplicateObject(productVos);
        stockService.setProductEntryStatus(productVoList,userInfo);
        msg.setResult(productVoList);
        return msg;
    }
    @PostMapping("/removeDuplicate")
    public Msg removeDuplicateListElement(@RequestBody JSONArray array) {
        Msg msg = new Msg(true);
        List<ProductVo>productVos = new ArrayList<>();
        for (int i = 0; i < array.size(); i++) {
            // 遍历 jsonArray 数组,把每一个对象转成 json 对象
            JSONObject jsonObject = array.getJSONObject(i);
            String directionCode = jsonObject.getString("directionCode");
            DirectionDetail directionDetail = FireworkDeal.dealDirectionCode(directionCode);
            if (FireworkDeal.is22Characters(directionCode)){
                ProductVo productVo = productService.selectVoByDirection(directionCode);
                FireworkDeal.getProductVos(directionCode, directionDetail, directionDetail, productVos,productVo);
            }else if (FireworkDeal.is19Characters(directionCode)){
                ProductVo productVo = productService.selectVoByDirection(directionCode);
                productVos.add(productVo);
            }
        }
        //移除重复元素
        List<ProductVo> productVoList = ProductVo.removeListDuplicateObject(productVos);
        msg.setResult(productVoList);
        return msg;
    }
    @GetMapping(value = "getThreshold")
    public Msg getProductThreshold(){
        Msg msg = new Msg(true);
        ProductThresholdInfo productThresholdInfo = productThresholdService.getOne(new LambdaQueryWrapper<>());
        if (productThresholdInfo == null){
            msg.setCode(ErrorCode.ERROR_999.getCode());
            msg.setMessage("未找到产品阈值设置");
            return msg;
        }
        String levels = productThresholdInfo.getLevel();
        List<String>list = StringUtils.toList(levels);
        ProductThresholdVo productThresholdVo = BeanUtils.copy(productThresholdInfo, ProductThresholdVo.class);
        productThresholdVo.setLevels(list);
        msg.setResult(productThresholdVo);
        return msg;
    }
    @PostMapping(value = "setThreshold")
    public Msg setProductThreshold(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg(true);
        ProductThresholdInfo productThresholdInfo = productThresholdService.getOne(new LambdaQueryWrapper<>());
        String explosiveContent = jsonObject.getString("explosiveContent") == null?"1000":jsonObject.getString("explosiveContent");
        String boxNumber = jsonObject.getString("boxNumber") == null?"999":jsonObject.getString("boxNumber");
        String levels = jsonObject.getString("levels") == null?"":jsonObject.getString("levels");
        productThresholdInfo.setExplosivecontent(new BigDecimal(explosiveContent));
        productThresholdInfo.setBoxnumber(Integer.parseInt(boxNumber));
        productThresholdInfo.setLevel(levels);
        boolean i = productThresholdService.updateById(productThresholdInfo);
        return msg;
    }
    @GetMapping("/categorise")
    public Msg getProductCategories(@RequestParam("name")String name){
        Msg msg = new Msg(true);
        List<ProductCategory> categories = productCategoryService.selectAllOrByName(name);
        msg.setResult(categories);
        return msg;
    }
    @PostMapping("/addCategory")
    public Msg addCategory(@RequestBody ProductCategory category){
        Msg msg = new Msg(true);
        Msg checkMsg = checkCategory(category,ADD_OPTION);
        if(!checkMsg.getCode().equals(ErrorCode.SUCCESS.getCode())){
            return checkMsg;
        }
        productCategoryService.save(category);
        return msg;
    }
    @PostMapping("/editCategory")
    public Msg editCategory(@RequestBody ProductCategory category){
        Msg msg = new Msg(true);
        Msg checkMsg = checkCategory(category,EDIT_OPTION);
        if(!checkMsg.getCode().equals(ErrorCode.SUCCESS.getCode())){
            return checkMsg;
        }
        productCategoryService.updateById(category);
        return msg;
    }
    @PostMapping("/delCategory")
    public Msg deleteCategory(@RequestBody ProductCategory category){
        Msg msg = new Msg(true);
        Msg checkMsg = checkCategory(category,DEL_OPTION);
        if(!checkMsg.getCode().equals(ErrorCode.SUCCESS.getCode())){
            return checkMsg;
        }
        productCategoryService.removeById(category.getId());
        return msg;
    }
    @GetMapping("/majorTree")
    public List<Tree> majorTree(){
        List<Tree> trees = new ArrayList<>();
        byte type = 1;
        List<ProductCategory> categories = productCategoryService.selectCategoryByType(type);
        for (ProductCategory category :categories) {
            Tree tree = new Tree();
            tree.setText(category != null ? category.getName() : null);
            tree.setAttributes(category != null ? category.getName() : null);
            trees.add(tree);
        }
        return trees;
    }
    @GetMapping("/secondaryTree")
    public List<Tree> secondaryTree(@RequestParam("major")String major){
        List<Tree> trees = new ArrayList<>();
        if (StringUtils.isBlank(major)){
            return trees;
        }
        List<ProductCategory> categories = productCategoryService.selectCategoryByMajorType(major);
        for (ProductCategory category :categories) {
            Tree tree = new Tree();
            tree.setText(category != null ? category.getName() : null);
            tree.setAttributes(category != null ? category.getName() : null);
            trees.add(tree);
        }
        return trees;
    }
    @GetMapping("/permitLevelTree")
    public List<Tree> permitLevelTree(@RequestParam("secondary")String secondary){
        List<Tree> trees = new ArrayList<>();
        if (StringUtils.isBlank(secondary)){
            return trees;
        }
        ProductCategory productCategory = new ProductCategory();
        productCategory.setType((byte)2);
        productCategory.setName(secondary);
        List<ProductCategory> categories = productCategoryService.selectCategoryByTypeAndName(productCategory);
        if (categories == null ){
            return trees;
        }
        for (ProductCategory category : categories){
            Tree tree = new Tree();
            tree.setText(category.getLevel());
            tree.setAttributes(category.getLevel());
            trees.add(tree);
        }
        return trees;
    }
    private Msg checkCategory(ProductCategory category,Byte option){
        Msg msg = new Msg("999","");
        if (category == null){
            msg.setMessage("操作失败:未找到对应的类别信息");
            return msg;
        }
        if (category.getName() == null){
            msg.setMessage("类别名称不能未空");
            return msg;
        }
        if (category.getType() == null){
            msg.setMessage("类型不能未空");
            return msg;
        }
        if (category.getType() == 2 && StringUtils.isBlank(category.getParentname())){
            msg.setMessage("选择小类对应大类不能未空");
            return msg;
        }
        if (option.equals(ADD_OPTION)){
            List<ProductCategory> categoryExist = productCategoryService.selectCategoryByTypeAndName(category);
            if (categoryExist != null && categoryExist.size()>0){
                msg.setMessage("当前类别名称已存在");
                return msg;
            }
        }else {
            List<ProductCategory> categoryExist = productCategoryService.selectCategoryByTypeAndName(category);
            if (categoryExist == null || categoryExist.size() == 0){
                msg.setMessage("未找到当前类别名称");
                return msg;
            }
        }
        msg.setCode("200");
        return msg;
    }
    private Msg isFitThreshold(ProductInfo productInfo) {
        Msg msg = new Msg(ErrorCode.ERROR_999.getCode(),"");
        ProductThresholdInfo productThresholdInfo = productThresholdService.getOne(new LambdaQueryWrapper<>());
        if (productInfo.getExplosiveContent().compareTo(productThresholdInfo.getExplosivecontent()) > 0){
            msg.setMessage("含药量最大为:"+productThresholdInfo.getExplosivecontent()+",超过限制,录入失败!");
            return msg;
        }
        if (productInfo.getBoxNumber() > productThresholdInfo.getBoxnumber()){
            msg.setMessage("箱数最大为:"+productThresholdInfo.getBoxnumber()+"超过限制,录入失败!");
            return msg;
        }
        if (productThresholdInfo.getLevel().contains(productInfo.getLevel())){
            msg.setMessage("当前产品级别为限制录入级别,录入失败!");
            return msg;
        }
        msg.setCode(ErrorCode.SUCCESS.getCode());
        return msg;
    }
    @PostMapping("/import/old-system")
    public Msg importDataByExcel(MultipartFile file) {
        productService.importDataByExcel(file, getUser());
        return success();
    }
}
src/main/java/com/gk/firework/Controller/RegisterController.java
对比新文件
@@ -0,0 +1,258 @@
package com.gk.firework.Controller;
import com.alibaba.fastjson.JSONObject;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.*;
import com.gk.firework.Domain.Enum.EnterpriseSafetySupervision;
import com.gk.firework.Domain.Enum.ErrorCode;
import com.gk.firework.Domain.Utils.*;
import com.gk.firework.Domain.Utils.Properties;
import com.gk.firework.Domain.Vo.RegisterVo;
import com.gk.firework.Service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.validation.FieldError;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.*;
import java.util.stream.Collectors;
import static com.gk.firework.Domain.Enum.ErrorCode.ERROR_10001;
/**
 * @author : jingjy
 * @date : 2021/6/24 16:52
 */
@Api(tags = "注册信息")
@RequestMapping("/register")
@RestController
public class RegisterController extends BaseController {
    /** 未审核 **/
    private final Byte REVIEW_INCOMPLETE = 0;
    /** 审核通过 **/
    private final Byte REVIEW_APPROVE = 1;
    /** 审核拒绝 **/
    private final Byte REVIEW_REJECTION = 2;
    @Autowired
    private RegisterService registerService;
    @Autowired
    private EnterpriseResourceService enterpriseResourceService;
    @Autowired
    private EnterpriseService enterpriseService;
    @Autowired
    private UserService userService;
    @Autowired
    private BlackListService blackListService;
    @PostMapping("/add")
    public Msg addRegisterInfo(@Validated RegisterVo registerVo, BindingResult bindingResult){
        if (registerVo == null){
            return new Msg(ErrorCode.ERROR_10001);
        }
        if (bindingResult.hasErrors()) {
            StringBuilder stringBuilder = new StringBuilder();
            for (String s : bindingResult.getFieldErrors().stream()
                    .map(FieldError::getDefaultMessage).collect(Collectors.toList())) {
                stringBuilder.append(s);
                stringBuilder.append(",");
            }
            return new Msg(ErrorCode.ERROR_10002,stringBuilder.toString());
        }
        boolean isSupervision = false;
        for (EnterpriseSafetySupervision e : EnterpriseSafetySupervision.values()){
            if (registerVo.getType().equals(e.getMsg())){
                isSupervision = true;
            }
        }
        if (!isSupervision){
            return new Msg(ErrorCode.ERROR_10004,"企业类型无效");
        }
        if ((boolean)isEnterpriseNameExist(registerVo.getEnterprisename()).getResult()){
            return new Msg(ErrorCode.ERROR_10004,"企业名称已存在");
        }
        if ((boolean)isEnterpriseNumberExist(registerVo.getEnterprisenumber()).getResult()){
            return new Msg(ErrorCode.ERROR_10004,"企业编码已存在");
        }
        RegisterInfo registerInfo = BeanUtils.copy(registerVo,RegisterInfo.class);
        registerInfo.setCreatedat(new Date());
        registerService.save(registerInfo);
        Map<String,MultipartFile[]> map = new HashMap<>(8);
        map.put(RegisterVo.BUSINESS,registerVo.getBusinessLicense());
        map.put(RegisterVo.ID_CARD,registerVo.getIdCard());
        map.put(RegisterVo.LEGAL_PERSON,registerVo.getLegalPersonFile());
        map.put(RegisterVo.OPERATION,registerVo.getOperationQualification());
        map.put(RegisterVo.ESCORT_COMPANY,registerVo.getEscortCompany());
        map.put(RegisterVo.INSURANCE,registerVo.getInsurance());
        map.put(RegisterVo.PRODUCTION,registerVo.getSafetyProduction());
        Msg msg = uploadFiles(map,registerInfo);
        if (!msg.getCode().equals(ErrorCode.SUCCESS.getMsg())){
            return msg;
        }
        return success();
    }
    @ApiOperation(value = "注册信息审核", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "注册信息id",required = true),
            @ApiImplicitParam(name = "reviewResult",value = "审核结果(1.审核通过;2.审核驳回)",required = true),
            @ApiImplicitParam(name = "reviewContent",value = "审核意见"),
    })
    @PostMapping("/review")
    public Msg reviewRegister(@RequestBody JSONObject object){
        Long id = object.getLong("id");
        Byte reviewResult = object.getByte("reviewResult");
        String reviewContent = object.getString("reviewContent").trim();
        if (id == null || reviewResult == null){
            return new Msg(ErrorCode.ERROR_10001);
        }
        if (reviewResult.equals(REVIEW_INCOMPLETE)){
            return new Msg(ErrorCode.ERROR_10004);
        }else if (!(reviewResult.equals(REVIEW_REJECTION)||reviewResult.equals(REVIEW_APPROVE))){
            return new Msg(ErrorCode.ERROR_10004);
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        //普通用户
        int normalUser = 3;
        if (userInfo.getType() == normalUser){
            return new Msg(ErrorCode.ERROR_70001);
        }
        RegisterInfo registerInfo = registerService.getById(id);
        if (registerInfo == null){
            return new Msg(ErrorCode.ERROR_50001);
        }
        if ((boolean)isEnterpriseNameExist(registerInfo.getEnterprisename()).getResult()){
            return new Msg(ErrorCode.ERROR_10004,"企业名称已存在");
        }
        if ((boolean)isEnterpriseNumberExist(registerInfo.getEnterprisenumber()).getResult()){
            return new Msg(ErrorCode.ERROR_10004,"企业编码已存在");
        }
        registerInfo.setReviewresult(reviewResult);
        registerInfo.setReviewat(new Date());
        registerInfo.setReviewer(getUser().getId().toString());
        registerInfo.setReviewcontent(reviewContent);
        registerService.updateById(registerInfo);
        if (reviewResult.equals(REVIEW_APPROVE)){
            //创建企业账户
            enterpriseService.addEnterpriseByRegister(registerInfo,userInfo);
        }
        return success();
    }
    /**
     * @Description: 根据企业名称判断企业是否存在
     */
    @GetMapping("/isNameExist")
    @ApiOperation(value = "企业名称是否存在", httpMethod = "GET")
    @ApiImplicitParam(name = "enterpriseName", value = "企业名称", required = true)
    public Msg isEnterpriseNameExist(@RequestParam("enterpriseName")String enterpriseName){
        if (StringUtils.isBlank(enterpriseName.trim())){
            return new Msg(ERROR_10001);
        }
        boolean flag = true;
        Enterprise enterprise = enterpriseService.selectEnterpriseByName(enterpriseName);
        if (enterprise == null){
            flag = false;
            return success(flag);
        }
        BlackList blackList = blackListService.getByEnterprisenumber(enterprise.getEnterprisenumber());
        if (blackList != null) flag = false;
        return success(flag);
    }
    /**
     * @Description: 根据企业编码判断企业是否存在
     */
    @GetMapping("/isNumberExist")
    @ApiOperation(value = "企业编码是否存在", httpMethod = "GET")
    @ApiImplicitParam(name = "enterpriseNumber", value = "企业编码", required = true)
    public Msg isEnterpriseNumberExist(@RequestParam("enterpriseNumber")String enterpriseNumber){
        if (StringUtils.isBlank(enterpriseNumber.trim())){
            return new Msg(ERROR_10001);
        }
        boolean flag = true;
        Enterprise enterprise = enterpriseService.selectEnterpriseByNumber(enterpriseNumber);
        if (enterprise == null){
            flag = false;
        }
        return success(flag);
    }
    @GetMapping("/review")
    public Msg getWaitReviewData(@RequestParam(value = "name", required = false) String name,
                                  @RequestParam(value = "type", required = false) String type,
                                  @RequestParam(value = "reviewResult", required = false) Integer reviewResult,
                                  @RequestParam(defaultValue = "0") Integer pageIndex,
                                  @RequestParam(defaultValue = "10") Integer pageSize,
                                  String sort, String order){
        Msg msg = new Msg(true);
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        Map<String, Object> condition = new HashMap<>(4);
        if (StringUtils.isNotBlank(name)) {
            condition.put("name", name);
        }
        if (StringUtils.isNotBlank(type)) {
            condition.put("type", type);
        }
        if (reviewResult != null ){
            condition.put("reviewResult", reviewResult);
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        pageInfo.setCondition(condition);
        registerService.selectDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    private Msg uploadFiles(Map<String, MultipartFile[]> map, RegisterInfo registerInfo) {
        List<EnterpriseResource> adds = new ArrayList<>();
        try {
            for (Map.Entry<String, MultipartFile[]>entry : map.entrySet()){
                MultipartFile[] files = entry.getValue();
                if (files != null && files.length > 0) {
                    for (MultipartFile file : files) {
                        String name = UploadUtil.uploadFile(file, Properties.enterprisePath);
                        EnterpriseResource er = new EnterpriseResource();
                        er.setTabletype(entry.getKey());
                        er.setFilename(file.getOriginalFilename());
                        er.setUrl(Properties.enterprise + name);
                        er.setCreatetime(new Date());
                        er.setCreatebyname(registerInfo.getEnterprisename());
                        er.setBelongid(registerInfo.getId());
                        er.setValidflag(true);
                        adds.add(er);
                    }
                }
            }
            //执行
            enterpriseResourceService.saveBatch(adds);
            return success();
        } catch (Exception e) {
            return new Msg(ErrorCode.ERROR_40001,"文件上传失败");
        }
    }
}
src/main/java/com/gk/firework/Controller/RoleController.java
对比新文件
@@ -0,0 +1,183 @@
package com.gk.firework.Controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.gk.firework.Domain.DistrictInfo;
import com.gk.firework.Domain.RoleInfo;
import com.gk.firework.Domain.RolePermissionsInfo;
import com.gk.firework.Domain.UserInfo;
import com.gk.firework.Domain.Utils.*;
import com.gk.firework.Domain.Vo.Menu;
import com.gk.firework.Service.*;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.management.relation.Role;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.*;
@Api(tags = "角色管理数据接口")
@RestController
public class RoleController {
    @Autowired
    UserService userService;
    @Autowired
    RoleService roleService;
    @Autowired
    UserRolesService userRolesService;
    @Autowired
    RolePermissionsService rolePermissionsService;
    @Autowired
    ExcelExportService excelExportService;
    @GetMapping("/role")
    @ApiOperation(value = "获取角色数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name",value = "角色名"),
    })
    public Msg getRoleInfo(String name){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        List<RoleInfo> roleInfos = roleService.selectList(name);
        msg.setResult(roleInfos);
        return msg;
    }
    @GetMapping("/rolepermissions")
    @ApiOperation(value = "获取角色菜单数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "roleId",value = "角色id"),
    })
    public Msg getRolePermissions(String roleId){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        List<Menu> roleInfos = rolePermissionsService.selectMenuList(roleId);
        msg.setResult(roleInfos);
        return msg;
    }
    @PostMapping("/addrole")
    @ApiOperation(value = "添加角色数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name",value = "角色名",required = true),
            @ApiImplicitParam(name = "operator",value = "操作人"),
            @ApiImplicitParam(name = "btnaccess",value = "按钮权限"),
    })
    public Msg addRoleInfo(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        String name = jsonObject.getString("name");
        String operator = jsonObject.getString("operator");
        String btnaccess = jsonObject.getString("btnaccess");
        RoleInfo roleInfo = new RoleInfo();
        roleInfo.setName(name);
        RoleInfo roleInfoExist = roleService.selectRoleByName(roleInfo);
        if (roleInfoExist != null){
            msg.setCode("500");
            msg.setMessage("角色名重复");
            return msg;
        }else {
            roleInfo.setBtnaccess(btnaccess);
            roleInfo.setCreatedby(operator);
            roleInfo.setCreateddate(new Date());
            roleInfo.setLastmodifiedby(operator);
            roleInfo.setLastmodifieddate(new Date());
            roleInfo.setIsdel((byte)0);
            roleService.save(roleInfo);
            return msg;
        }
    }
    @PostMapping("/putrole")
    @ApiOperation(value = "修改角色数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "角色id",required = true),
            @ApiImplicitParam(name = "name",value = "角色名",required = true),
            @ApiImplicitParam(name = "btnaccess",value = "按钮权限"),
            @ApiImplicitParam(name = "operator",value = "操作人"),
    })
    public Msg putRoleInfo(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        String name = jsonObject.getString("name");
        String operator = jsonObject.getString("operator");
        String btnaccess = jsonObject.getString("btnaccess");
        Long id = jsonObject.getLong("id");
        List<RoleInfo> roleInfoExist = roleService.selectExistRole(id,name);
        if (roleInfoExist.size() > 0){
            msg.setCode("500");
            msg.setMessage("角色名重复");
            return msg;
        }else {
            RoleInfo roleInfo = new RoleInfo();
            roleInfo.setId(id);
            roleInfo.setName(name);
            roleInfo.setBtnaccess(btnaccess);
            roleInfo.setLastmodifiedby(operator);
            roleInfo.setLastmodifieddate(new Date());
            roleService.updateById(roleInfo);
            return msg;
        }
    }
    @PostMapping("/rolepermissions")
    @ApiOperation(value = "获取角色菜单数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "角色id"),
    })
    public Msg putRolePermissions(@ApiParam(value = "permissionIds,id")
                                      @RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        JSONArray permissionId = jsonObject.getJSONArray("permissionIds");
        Long roleid = jsonObject.getLong("id");
        rolePermissionsService.delRolePermissionByRoleId(roleid);
        for (int i = 0; i < permissionId.size(); i++) {
            RolePermissionsInfo rolePermissionsInfo = new RolePermissionsInfo();
            rolePermissionsInfo.setRoleid(roleid);
            rolePermissionsInfo.setPermissionid(Long.parseLong(permissionId.get(i).toString()));
            rolePermissionsService.save(rolePermissionsInfo);
        }
        return msg;
    }
    @PostMapping("/delrole")
    @ApiOperation(value = "删除角色数据", response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query",name = "id",value = "id",required = true),
            @ApiImplicitParam(paramType="body",name = "operator",value = "更新人"),
    })
    public Msg delRoleInfo(@ApiParam(value = "id,operator")
                             @RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        Long id = jsonObject.getLong("id");
        if (id == 1 || id == 2 || id == 3){
            msg.setCode("999");
            msg.setMessage("内置角色不允许删除");
            return msg;
        }
        RoleInfo roleInfo = new RoleInfo();
        roleInfo.setId(jsonObject.getLong("id"));
        roleInfo.setLastmodifiedby(jsonObject.getString("operator"));
        roleInfo.setLastmodifieddate(new Date());
        roleInfo.setIsdel((byte)1);
        roleService.updateById(roleInfo);
        return msg;
    }
}
src/main/java/com/gk/firework/Controller/SaleOrderController.java
对比新文件
@@ -0,0 +1,1016 @@
package com.gk.firework.Controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.*;
import com.gk.firework.Domain.BO.DirectionProductBO;
import com.gk.firework.Domain.BO.SaleOrderDetailInfoBO;
import com.gk.firework.Domain.DO.ProductDO;
import com.gk.firework.Domain.Exception.BusinessException;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gk.firework.Domain.Log.JsonParams;
import com.gk.firework.Domain.SaleOrderDetailInfo;
import com.gk.firework.Domain.Utils.*;
import com.gk.firework.Domain.Vo.*;
import com.gk.firework.Service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import static com.gk.firework.Domain.Enum.ErrorCode.*;
/**
 * @author : jingjy
 * @date : 2021/3/31 8:53
 */
@Api(tags = "订单信息")
@RequestMapping("/order")
@RestController
public class SaleOrderController extends BaseController {
    @Value("${productPath}")
    private String productPath; //配置文件配置的物理保存地址
    @Autowired
    private CustomerService customerService;
    @Autowired
    private UserService userService;
    @Autowired
    private SaleOrderService saleOrderService;
    @Autowired
    private SaleOrderDetailService saleOrderDetailService;
    @Autowired
    private ProductService productService;
    @Autowired
    private ProductPriceService productPriceService;
    @Autowired
    private StockService stockService;
    @Autowired
    private EntryService entryService;
    @Autowired
    private EntryDetailService entryDetailService;
    @Autowired
    private SoldNoStockService soldNoStockService;
    @Autowired
    private ExcelExportService excelExportService;
    @PostMapping("/create")
    @JsonParams
    public Msg createOrder(@RequestParam String encryptStr) {
        String jsonStr = new String(Base64.getDecoder().decode(encryptStr.replaceAll(" +","+")),
                StandardCharsets.UTF_8);
        JSONObject jsonObject = JSON.parseObject(jsonStr);
        Msg msg = new Msg(true);
        JSONObject customer = jsonObject.getJSONObject("customer");
        JSONObject order = jsonObject.getJSONObject("order");
        JSONArray detailObject = jsonObject.getJSONArray("detailInfos");
        String userId = jsonObject.getString("operator");
        Integer num = order.getInteger("boxNum");
        String total = order.getString("total");
        String pay = order.getString("pay");
        String change = order.getString("change");
        String type = jsonObject.getString("type");
        Date salesTime = new Date();
        if (customer == null || detailObject == null || detailObject.isEmpty()) {
            msg.setCode(ERROR_10001.getCode());
            msg.setMessage(ERROR_10001.getMsg());
            return msg;
        }
        if (userId == null) {
            msg.setCode(ERROR_10004.getCode());
            msg.setMessage(ERROR_10004.getMsg()+":用户信息错误");
            return msg;
        }
        UserInfo userInfo = userService.getById(userId);
        if (userInfo == null) {
            msg.setCode(ERROR_10004.getCode());
            msg.setMessage(ERROR_10004.getMsg()+":用户信息错误");
            return msg;
        }
        // 优化1 单独校验数据
//        List<String> directionCodes = new ArrayList<>(detailObject.size());
        Set<String> direction10Codes = new HashSet<>();
        for (int i = 0; i < detailObject.size(); i++) {
            JSONObject object = detailObject.getJSONObject(i);
            String directionCodeStr = object.getString("directionCode");
            if (FireworkDeal.isNotDirectionCode(directionCodeStr)) {
                msg.setCode(ERROR_10004.getCode());
                msg.setMessage(ERROR_10004.getMsg()+":流向码:" + directionCodeStr + "错误");
                return msg;
            }
//            directionCodes.add(directionCodeStr);
            // 10位码
            direction10Codes.add(directionCodeStr.substring(0, 10));
        }
        List<String> direction10CodesList = new ArrayList<>(direction10Codes);
        // 获取所有流向码的
        List<ProductDO> productDos = productService.selectDoByDirections(direction10CodesList);
        // 10位 -> 产品 映射
        Map<String, ProductDO> productDOMap = new HashMap<>(productDos.size());
        for (ProductDO p : productDos) {
            productDOMap.put(p.getDirectionCode(), p);
        }
        // 校验哪个产品不存在
        for (String directionCode : direction10CodesList) {
            if (!productDOMap.containsKey(directionCode)) {
                msg.setCode(ERROR_10004.getCode());
                msg.setMessage(ERROR_10004.getMsg()+":流向码:" + directionCode + "不存在");
                return msg;
            }
        }
        // 产品对应价格
        List<ProductPriceInfo> productPriceInfos = productPriceService.selectByCodes(userInfo.getCompanynumber(), direction10CodesList);
        // 10位 -> 产品价格 映射
        Map<String, BigDecimal> productPriceMap = new HashMap<>(productPriceInfos.size());
        for (ProductPriceInfo productPriceInfo : productPriceInfos) {
            BigDecimal price = BigDecimal.ZERO;
            if (productPriceInfo.getPrice() != null) {
                price = productPriceInfo.getPrice();
            }
            productPriceMap.put(productPriceInfo.getItemcode(), price);
        }
//        for (String directionCode : direction10CodesList) {
//            if (!productPriceMap.containsKey(directionCode)) {
//                msg.setCode(ERROR_10004.getCode());
//                msg.setMessage(ERROR_10004.getMsg()+":流向码:" + directionCode + "价格不存在");
//                return msg;
//            }
//        }
//        List<DirectionProductBO> directionProductBOS = new ArrayList<>(detailObject.size());
//        DirectionProductBO directionProductBO;
//        for (int i = 0; i < detailObject.size(); i++) {
//            directionProductBO = new DirectionProductBO();
//            JSONObject object = detailObject.getJSONObject(i);
//            String directionCodeStr = object.getString("directionCode");
//            directionProductBO.setDirectionCode(directionCodeStr);
//            directionProductBO.setItemCode(directionCodeStr.substring(0,10));
//            directionProductBO.setSlice(productDOMap.get(directionProductBO.getItemCode()).getSlice());
//            directionProductBOS.add(directionProductBO);
//        }
//        List<StockInfo> stockInfos = stockService.selectStockByDirectionsAndSlices(directionProductBOS);
//        Map<String, StockInfo> stockInfoMap = new HashMap<>();
        List<SaleOrderDetailInfoBO> detailInfoList = new ArrayList<>();
        for (int i = 0; i < detailObject.size(); i++) {
            // 遍历 jsonArray 数组,把每一个对象转成 json 对象
            JSONObject object = detailObject.getJSONObject(i);
            String directionCodeStr = object.getString("directionCode");
            ProductDO productDO = productDOMap.get(directionCodeStr.substring(0, 10));
            if (productDO == null || productDO.getSlice() == null) {
                msg.setCode(ERROR_10004.getCode());
                msg.setMessage(ERROR_10004.getMsg()+":流向码:" + directionCodeStr + "错误");
                return msg;
            }
            String slice = productDO.getSlice();
            ProductInfo productInfo = BeanUtils.copy(productDO, ProductInfo.class);
            // 需要分表查询暂不优化
            StockInfo stockInfo = stockService.selectStockByDirectionAndSlice(directionCodeStr, slice);
//            StockInfo stockInfo = stockService.selectStockByDirection(directionCodeStr);
            if (stockInfo == null) {
                msg.setCode(ERROR_50001.getCode());
                msg.setMessage(ERROR_50001.getMsg()+":流向码为:" + directionCodeStr + " 未入库,销售失败");
                return msg;
            }
            if (stockInfo.getStatus() != null && stockInfo.getStatus().equals(StockInfo.STOCK_SOLD)) {
                msg.setCode(ERROR_50002.getCode());
                msg.setMessage(ERROR_50002.getMsg()+":流向码为:" + directionCodeStr + " 已售出,销售失败");
                return msg;
            }
            if (FireworkDeal.is22Characters(directionCodeStr)){
                List<ProductVo>productVoList = new ArrayList<>();
                DirectionDetail directionDetail = FireworkDeal.dealDirectionCode(directionCodeStr);
                ProductVo productVo = BeanUtils.copy(productInfo, ProductVo.class);
                productVo.setDirectionCode(directionCodeStr);
                productVo.setItemCode(directionDetail.getItemCode());
                productVo.setDateCode(directionDetail.getDateCode());
                productVo.setSerialNo(directionDetail.getSerialNo());
                FireworkDeal.getProductVos(directionCodeStr,directionDetail,directionDetail,productVoList,productVo);
                for (ProductVo productVo1 : productVoList){
                    SaleOrderDetailInfoBO detailInfo = new SaleOrderDetailInfoBO();
                    detailInfo.setItemcode(productInfo.getDirectionCode());
                    detailInfo.setDirectioncode(productVo1.getDirectionCode());
                    detailInfo.setItemname(productVo1.getName());
                    detailInfo.setPrice(productPriceMap.get(detailInfo.getDirectioncode()));
                    if (detailInfo.getPrice() == null) {
                        detailInfo.setPrice(BigDecimal.ZERO);
                    }
                    detailInfo.setSpecification(productVo1.getSpecification());
                    detailInfo.setProductDO(productDOMap.get(detailInfo.getItemcode()));
                    detailInfoList.add(detailInfo);
                }
                num = productVoList.size();
            }else {
                SaleOrderDetailInfoBO detailInfo = new SaleOrderDetailInfoBO();
                detailInfo.setItemcode(productInfo.getDirectionCode());
                detailInfo.setDirectioncode(directionCodeStr);
                detailInfo.setItemname(productInfo.getName());
                detailInfo.setPrice(productPriceMap.get(detailInfo.getDirectioncode()));
                if (detailInfo.getPrice() == null) {
                    detailInfo.setPrice(BigDecimal.ZERO);
                }
                detailInfo.setProductDO(productDOMap.get(detailInfo.getItemcode()));
                detailInfo.setSpecification(productInfo.getSpecification());
                detailInfoList.add(detailInfo);
                num = 1;
            }
        }
        String idCardNum = customer.getString("idCardNumber");
        String workerName = customer.getString("workerName");
        if (StringUtils.isBlank(idCardNum) || StringUtils.isBlank(workerName)) {
            msg.setCode(ERROR_50001.getCode());
            msg.setMessage(ERROR_50001.getMsg()+":身份信息有误");
            return msg;
        }
        String auth = getAuth();
        auth = StringUtils.isBlank(auth) ? "NOAUTH" : auth;
        msg = saleOrderService.doSalesProcess(customer, num, idCardNum, userInfo, detailInfoList, type, salesTime, pay, total, change, auth);
        return msg;
    }
    @GetMapping(value = {"/get/idCardNum/{idCardNum}/pageIndex/{pageIndex}/pageSize/{pageSize}/directionCode/{directionCode}",
            "/get/idCardNum/{idCardNum}/pageIndex/{pageIndex}/pageSize/{pageSize}"})
    public Msg getOrderListByIdCardNum(@PathVariable String idCardNum,
                                       @PathVariable Integer pageIndex,
                                       @PathVariable Integer pageSize,
                                       String sort, String order,
                                       @PathVariable(required = false) String directionCode) {
        Msg msg = new Msg(true);
        if (StringUtils.isBlank(idCardNum)) {
            msg.setCode(ERROR_10001.getCode());
            msg.setMessage(ERROR_10001.getMsg()+":身份证号为空,查询失败!");
            return msg;
        }
        if (pageIndex == null){
            pageIndex = 0;
        }
        if (pageSize == null || pageSize == 0){
            pageSize = 10;
        }
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        Map<String, Object> condition = new HashMap<>(4);
        condition.put("idCardNum",idCardNum);
        if (StringUtils.isNotBlank(directionCode)) {
            condition.put("directionCode", directionCode);
        }
        pageInfo.setCondition(condition);
        saleOrderService.selectReturnDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @PostMapping("/saleDetailList")
    public Msg getSaleOneDetail(@RequestBody JSONObject jsonObject) {
        String directionCode = jsonObject.getString("directionCode");
        String userId = jsonObject.getString("userId");
        if (StringUtils.isBlank(userId)) {
            throw new BusinessException("操作员信息为空");
        }
        List<SaleDetailVo> details = saleOrderDetailService.getDetailList(directionCode);
        return success(details);
    }
    @PostMapping("/return2storage")
    @JsonParams
    public Msg returnProduct2(@RequestBody JSONObject jsonObject) {
        String userId = jsonObject.getString("userId");
        String directionCode = jsonObject.getString("directionCode");
        String auth = getAuth();
        auth = StringUtils.isBlank(auth) ? "NOAUTH" : auth;
        saleOrderDetailService.returnAndStorage(directionCode,userId,auth);
        return success();
    }
    @PostMapping("/return")
    @JsonParams
    public Msg returnProduct(@RequestBody JSONObject object) {
        Msg msg = new Msg(true);
        JSONArray directionCodes = object.getJSONArray("directionCodes");
        StringBuilder message = new StringBuilder();
        for (Object dire : directionCodes){
            if (dire == null){
                message.append("流向码:").append("为空退货失败!");
                continue;
            }
            String directionCode = dire.toString();
            if (StringUtils.isBlank(directionCode) || FireworkDeal.isNotDirectionCode(directionCode)) {
                message.append("流向码:").append(directionCode).append("不符合规则,退货失败!");
                continue;
            }
            UserInfo userInfo = userService.getById(getUser().getId());
            String auth = getAuth();
            auth = StringUtils.isBlank(auth) ? "NOAUTH" : auth;
            StockInfo stockInfo = stockService.selectStockByDirection(directionCode);
            if (stockInfo == null) {
                message.append("流向码:+").append(directionCode).append("库存状态异常,退货失败!");
                continue;
            }
            ProductInfo productInfo = productService.selectByDirection(directionCode.substring(0, 10));
            // 创建入库单,type为2,创建入库明细,修改stock
            EntryOrderInfo entryOrderInfo = entryService.generateEntryOrderInfo(EntryUtils.TH_ENTRY, userInfo, new Date(), "", auth);
            EntryDetailInfo entryDetailInfo = new EntryDetailInfo(entryOrderInfo.getCode(), directionCode, productInfo.getDirectionCode(),
                    productInfo.getName(), productInfo.getManufacturer(), new Date(),userInfo.getCompanynumber());
            entryOrderInfo.setNum(1);
            entryDetailInfo.setNum(1);
            SaleOrderDetailInfo detailInfo = saleOrderService.selectOrderByDirectionReturnflag(directionCode,(byte) 0, null);
            if (detailInfo == null){
                msg = new Msg(ERROR_50001,"没有找到销售订单详情或该商品已退货");
                break;
            }
            CustomerInfo customerInfo = customerService.getCustomerBySaleOrder(detailInfo.getOrdercode());
            Byte flag = 1;
            detailInfo.setReturnflag(flag);
            saleOrderDetailService.updateById(detailInfo);
            int i = stockService.doReturn(stockInfo,userInfo,customerInfo, new Date());
            if (i != 1){
                message.append("流向码:+").append(directionCode).append("库存更新失败!");
            }else {
                entryService.save(entryOrderInfo);
                entryDetailService.save(entryDetailInfo);
            }
        }
        if (StringUtils.isNotBlank(message)){
            msg.setCode(ERROR_999.getCode());
            msg.setMessage(message.toString());
        }
        return msg;
    }
    @PostMapping("/returnBatch")
    @JsonParams
    public List<Msg> returnBatch(@RequestBody JSONArray jsonArray){
        if (jsonArray.size() < 1){
            return null;
        }
        List<Msg>msgList = new ArrayList<>();
        for (int i =0 ; i<jsonArray.size(); i++){
            Msg msg = new Msg(true);
            JSONObject object = jsonArray.getJSONObject(i);
            String userId = object.getString("userId");
            String datetime = object.getString("datetime");
            String directionCode = object.getString("directionCode");
            Date date;
            DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            try {
                date = dateFormat.parse(datetime);
            } catch (ParseException e) {
                msg = new Msg(ERROR_10003, "日期类型错误!");
                msgList.add(msg);
                continue;
            }
            UserInfo userInfo = userService.getById(userId);
            String auth = getAuth();
            auth = StringUtils.isBlank(auth) ? "NOAUTH" : auth;
            EntryOrderInfo entryOrderInfo = entryService.generateEntryOrderInfo(EntryUtils.TH_ENTRY, userInfo, new Date(), "", auth);
            List<ProductVo>productVos = new ArrayList<>();
            if (StringUtils.isBlank(directionCode) || FireworkDeal.isNotDirectionCode(directionCode)) {
                msg = new Msg(ERROR_10004,"流向码无效");
                msgList.add(msg);
                continue;
            }
            ProductVo productVo = productService.selectVoByDirection(directionCode);
            if (FireworkDeal.is22Characters(directionCode)) {
                DirectionDetail directionDetail = FireworkDeal.dealDirectionCode(directionCode);
                FireworkDeal.getProductVos(directionCode,directionDetail,directionDetail,productVos,productVo);
            }else {
                productVos.add(productVo);
            }
            // 创建入库单,type为2,创建入库明细,修改stock
            EntryDetailInfo entryDetailInfo = new EntryDetailInfo(entryOrderInfo.getCode(), directionCode, productVo.getDirectionCode(),
                    productVo.getName(), productVo.getManufacturer(), new Date(),userInfo.getCompanynumber());
            entryOrderInfo.setNum(1);
            entryDetailInfo.setNum(1);
            //先行校验是否存在不能退货的商品
            boolean doReturnFlag = true;
            for (ProductVo productVo1 : productVos){
                StockInfo stockInfo = stockService.selectStockByDirection(productVo1.getDirectionCode());
                SaleOrderDetailInfo detailInfo = saleOrderService.selectOrderByDirectionReturnflag(productVo1.getDirectionCode(),(byte) 0,datetime);
                if (detailInfo == null || stockInfo == null){
                    doReturnFlag = false;
                    msg = new Msg(ERROR_50001,"没有找到销售订单详情或该商品已退货");
                    break;
                }
            }
            //如果不存在,进行退货操作
            if (doReturnFlag){
                for (ProductVo productVo1 : productVos){
                    StockInfo stockInfo = stockService.selectStockByDirection(productVo1.getDirectionCode());
                    SaleOrderDetailInfo detailInfo = saleOrderService.selectOrderByDirectionReturnflag(productVo1.getDirectionCode(),(byte) 0,datetime);
                    CustomerInfo customerInfo = customerService.getCustomerBySaleOrder(detailInfo.getOrdercode());
                    Byte flag = 1;
                    detailInfo.setReturnflag(flag);
                    saleOrderDetailService.updateById(detailInfo);
                    int j = stockService.doReturn(stockInfo,userInfo,customerInfo, date);
                    if (j == 0){
                        msg = new Msg(ERROR_40001,"退货失败");
                        break;
                    }
                }
                entryService.save(entryOrderInfo);
                entryDetailService.save(entryDetailInfo);
            }
            msgList.add(msg);
        }
        return msgList;
    }
    @PostMapping("/saleRecord1")
    @ApiOperation(value = "实名购买查询(按流向码查询)", httpMethod = "POST")
    @ApiImplicitParams({})
    Object saleInquiry1(@RequestBody FilterObject jsonFilter) {
        Integer pageIndex = jsonFilter.getPageIndex();
        Integer pageSize = jsonFilter.getPageSize();
        IPage page = saleOrderService.selectSaleRecord1(new Page<>(pageIndex, pageSize), jsonFilter.getFilter(),getUser());
        return success(page);
    }
    @PostMapping("/saleRecord2")
    @ApiOperation(value = "实名购买查询(按零售单位查询)", httpMethod = "POST")
    @ApiImplicitParams({})
    Object saleInquiry2(@RequestBody FilterObject jsonFilter) {
        Integer pageIndex = jsonFilter.getPageIndex();
        Integer pageSize = jsonFilter.getPageSize();
        IPage page = saleOrderService.selectSaleRecord2(new Page<>(pageIndex, pageSize), jsonFilter.getFilter(),getUser());
        return success(page);
    }
    @PostMapping("/saleRecord3")
    @ApiOperation(value = "销售汇总统计", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码",required = true),
            @ApiImplicitParam(name = "pageSize",value = "页大小",required = true),
            @ApiImplicitParam(name = "filter.itemcode",value = "流向码",required = true),
            @ApiImplicitParam(name = "filter.itemname",value = "产品名称",required = true),
            @ApiImplicitParam(name = "filter.province",value = "省",required = true),
            @ApiImplicitParam(name = "filter.city",value = "市",required = true),
            @ApiImplicitParam(name = "filter.district",value = "区",required = true),
            @ApiImplicitParam(name = "filter.street",value = "街道",required = true),
            @ApiImplicitParam(name = "filter.committee",value = "委员会",required = true),
            @ApiImplicitParam(name = "filter.starttime",value = "开始时间",required = true),
            @ApiImplicitParam(name = "filter.endtime",value = "结束时间",required = true),
            @ApiImplicitParam(name = "filter.safetysupervision",value = "监管分类",required = true),
            @ApiImplicitParam(name = "filter.enterprisename",value = "企业名称",required = true),
            @ApiImplicitParam(name = "filter.parententerprisename",value = "上级企业名称",required = true),
    })
    Object saleInquiry3(@RequestBody FilterObject jsonFilter) {
        Integer pageIndex = jsonFilter.getPageIndex();
        Integer pageSize = jsonFilter.getPageSize();
        PageInfoExtension<Map> page = saleOrderService.selectSaleRecord3(new Page<>(pageIndex, pageSize), jsonFilter.getFilter(),getUser());
        return success(page);
    }
    @PostMapping("/export/saleRecord3")
    @ApiOperation(value = "销售汇总统计导出", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码",required = true),
            @ApiImplicitParam(name = "pageSize",value = "页大小",required = true),
            @ApiImplicitParam(name = "filter.itemcode",value = "流向码",required = true),
            @ApiImplicitParam(name = "filter.itemname",value = "产品名称",required = true),
            @ApiImplicitParam(name = "filter.province",value = "省",required = true),
            @ApiImplicitParam(name = "filter.city",value = "市",required = true),
            @ApiImplicitParam(name = "filter.district",value = "区",required = true),
            @ApiImplicitParam(name = "filter.street",value = "街道",required = true),
            @ApiImplicitParam(name = "filter.committee",value = "委员会",required = true),
            @ApiImplicitParam(name = "filter.starttime",value = "开始时间",required = true),
            @ApiImplicitParam(name = "filter.endtime",value = "结束时间",required = true),
            @ApiImplicitParam(name = "filter.safetysupervision",value = "监管分类",required = true),
            @ApiImplicitParam(name = "filter.enterprisename",value = "企业名称",required = true),
            @ApiImplicitParam(name = "filter.parententerprisename",value = "上级企业名称",required = true),
    })
    Object exportSaleInquiry3(@RequestBody FilterObject jsonFilter) {
        List<Map> list = saleOrderService.selectExportSaleRecord3( jsonFilter.getFilter(),getUser());
        return success(list);
    }
    @PostMapping("/saleRecord4")
    @ApiOperation(value = "实名销售分析导出", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码",required = true),
            @ApiImplicitParam(name = "pageSize",value = "页大小",required = true),
            @ApiImplicitParam(name = "filter.starttime",value = "开始时间",required = true),
            @ApiImplicitParam(name = "filter.endtime",value = "结束时间",required = true),
            @ApiImplicitParam(name = "filter.enterprisename",value = "上级企业名称",required = true),
            @ApiImplicitParam(name = "filter.parententerprisename",value = "上级企业名称",required = true),
            @ApiImplicitParam(name = "filter.identify",value = "购买人身份证",required = true),
            @ApiImplicitParam(name = "filter.itemcode",value = "产品流向码",required = true),
    })
    Object saleInquiry4(@RequestBody FilterObject jsonFilter) {
        Integer pageIndex = jsonFilter.getPageIndex();
        Integer pageSize = jsonFilter.getPageSize();
        IPage page = saleOrderService.selectSaleRecord4(new Page<>(pageIndex, pageSize), jsonFilter.getFilter(),getUser());
        Msg result = success(page);
        String jsonStr = JSON.toJSONString(result);
        String base64Str = Base64.getEncoder().encodeToString(jsonStr.getBytes(StandardCharsets.UTF_8));
        return base64Str;
    }
    @PostMapping("/customer/upload/{idCard}")
    @ApiOperation(value = "补全customer照片信息", httpMethod = "POST")
    Msg customerUpload(@PathVariable String idCard, MultipartFile file) {
        customerService.uploadPhoto(idCard, file);
        return success();
    }
    @PostMapping("/export/saleRecord4")
    @ApiOperation(value = "实名销售分析", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "filter.starttime",value = "开始时间",required = true),
            @ApiImplicitParam(name = "filter.endtime",value = "结束时间",required = true),
            @ApiImplicitParam(name = "filter.enterprisename",value = "上级企业名称",required = true),
            @ApiImplicitParam(name = "filter.parententerprisename",value = "上级企业名称",required = true),
            @ApiImplicitParam(name = "filter.identify",value = "购买人身份证",required = true),
            @ApiImplicitParam(name = "filter.itemcode",value = "产品流向码",required = true),
    })
    Object exportSaleInquiry4(@RequestBody FilterObject jsonFilter) {
        List<Map> list = saleOrderService.selectExportSaleRecord4(jsonFilter.getFilter(), getUser());
        return success(list);
    }
    /**
    * @Description: 根据销售企业的单位编号和人员的身份证获取购买明细
    * @date 2021/4/14 12:38
    */
    @PostMapping("/getPurchaseDetailInUnit")
    @ApiOperation(value = "实名购买查询(按购买人查询)", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码",required = true),
            @ApiImplicitParam(name = "pageSize",value = "页大小",required = true),
            @ApiImplicitParam(name = "filter.starttime",value = "开始时间",required = true),
            @ApiImplicitParam(name = "filter.endtime",value = "结束时间",required = true),
            @ApiImplicitParam(name = "filter.identify",value = "省份证",required = true),
            @ApiImplicitParam(name = "filter.enterprisenumber",value = "企业单位编号",required = true),
    })
    Object getPurchaseDetailInUnit(@RequestBody FilterObject jsonFilter) {
        Integer pageIndex = jsonFilter.getPageIndex();
        Integer pageSize = jsonFilter.getPageSize();
        IPage page = saleOrderService.getPurchaseDetailInUnit(new Page<>(pageIndex, pageSize), jsonFilter.getFilter(),getUser());
        return success(page);
    }
    @GetMapping(value = {"/soldNoStock/directionCode/{directionCode}/pageIndex/{pageIndex}/pageSize/{pageSize}",
            "/soldNoStock/pageIndex/{pageIndex}/pageSize/{pageSize}"})
    public Msg getSoldNoStockInfo(@PathVariable Integer pageIndex,
                                  @PathVariable Integer pageSize,
                                  String sort, String order,
                                  @PathVariable(required = false) String directionCode) {
        Msg msg = new Msg(true);
        pageIndex = pageIndex == null? 10:pageIndex;
        pageSize = pageSize == null? 10:pageSize;
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize, sort, order);
        Map<String, Object> condition = new HashMap<>(4);
        if (StringUtils.isNotBlank(directionCode)) {
            condition.put("directionCode", directionCode);
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        if (userInfo.getCompanynumber() != null){
            condition.put("companyNumber",userInfo.getCompanynumber());
        }
        pageInfo.setCondition(condition);
        soldNoStockService.selectSoldNoStockDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @GetMapping(value = "/dailySaleReport")
    public Msg dailySaleReport(@RequestParam (value = "startDate")String startDate,
                               @RequestParam (value = "endDate")String endDate,
                               @RequestParam (value = "pageIndex")Integer pageIndex,
                               @RequestParam (value = "pageSize")Integer pageSize,
                               String sort, String order) {
        Msg msg = new Msg(true);
        if (StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)) {
            msg.setCode(ERROR_10001.getCode());
            msg.setMessage(ERROR_10001.getMsg()+":日期为空,查询失败!");
            return msg;
        }
        pageIndex = pageIndex == null ? 0 : pageIndex ;
        pageSize = pageSize == null ? 10 : pageSize ;
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        Map<String, Object> condition = new HashMap<>(4);
        UserInfo userInfo = userService.getById(getUser().getId());
        if (StringUtils.isNotBlank(userInfo.getCompanynumber())){
            condition.put("companynumber",userInfo.getCompanynumber());
        }
        condition.put("startDate",startDate);
        condition.put("endDate",endDate);
        pageInfo.setCondition(condition);
        PageInfoExtension pageInfoExtension = saleOrderService.selectDailySaleReport(pageInfo);
        msg.setResult(pageInfoExtension);
        return msg;
    }
    @GetMapping(value = "/info")
    public Msg getOrderInfo(@RequestParam (value = "startDate")String startDate,
                               @RequestParam (value = "endDate")String endDate,
                               @RequestParam (value = "code",required = false)String code,
                               @RequestParam (value = "pageIndex")Integer pageIndex,
                               @RequestParam (value = "pageSize")Integer pageSize,
                               String sort, String order) {
        Msg msg = new Msg(true);
        if (StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)) {
            msg.setCode(ERROR_10001.getCode());
            msg.setMessage(ERROR_10001.getMsg()+":日期为空,查询失败!");
            return msg;
        }
        pageIndex = pageIndex == null ? 0 : pageIndex ;
        pageSize = pageSize == null ? 10 : pageSize ;
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        Map<String, Object> condition = new HashMap<>(4);
        UserInfo userInfo = userService.getById(getUser().getId());
        if (StringUtils.isNotBlank(userInfo.getCompanynumber())){
            condition.put("companynumber",userInfo.getCompanynumber());
        }
        if (StringUtils.isNotBlank(code)){
            condition.put("code",code);
        }
        condition.put("startDate",startDate);
        condition.put("endDate",endDate);
        pageInfo.setCondition(condition);
        saleOrderService.selectOrderDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @GetMapping("/detail")
    public Msg getSaleDetailByCode(@RequestParam("code")String code){
        Msg msg = new Msg(true);
        List<SaleOrderDetailInfo>detailInfos = saleOrderDetailService.selectByOrderCode(code);
        msg.setResult(detailInfos);
        return msg;
    }
    @GetMapping("/serialNo")
    public Msg getSerialNo(){
        Msg msg = new Msg(true);
        UserInfo userInfo = userService.getById(getUser().getId());
        int countNum = saleOrderService.getDailySaleCount(userInfo);
        msg.setResult(countNum);
        return msg;
    }
    @ApiOperation(value = "销售汇总统计", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码",required = true),
            @ApiImplicitParam(name = "pageSize",value = "页大小",required = true),
            @ApiImplicitParam(name = "filter.province",value = "省",required = true),
            @ApiImplicitParam(name = "filter.city",value = "市",required = true),
            @ApiImplicitParam(name = "filter.district",value = "区",required = true),
            @ApiImplicitParam(name = "filter.street",value = "街道",required = true),
            @ApiImplicitParam(name = "filter.committee",value = "委员会",required = true),
            @ApiImplicitParam(name = "filter.starttime",value = "开始时间",required = true),
            @ApiImplicitParam(name = "filter.endtime",value = "结束时间",required = true),
            @ApiImplicitParam(name = "filter.safetysupervision",value = "监管分类",required = true),
            @ApiImplicitParam(name = "filter.enterprisename",value = "企业名称",required = true),
            @ApiImplicitParam(name = "filter.parententerprisename",value = "上级企业名称",required = true),
    })
    @PostMapping("/enterpriseESS")
    public Msg enterpriseEnterSellStore(@RequestBody FilterObject jsonFilter){
        Integer pageIndex = jsonFilter.getPageIndex();
        Integer pageSize = jsonFilter.getPageSize();
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize);
        UserInfo userInfo = userService.getById(getUser().getId());
        saleOrderService.selectEnterpriseEnterSellStoreDataGrid(pageInfo,jsonFilter.getFilter(),userInfo);
        return success(pageInfo);
    }
    @PostMapping("/enterpriseESSExport")
        public Msg enterpriseEnterSellStoreExport(@RequestBody FilterObject jsonFilter){
        UserInfo userInfo = userService.getById(getUser().getId());
        List<EnterpriseDataVo> enterpriseDataVos =saleOrderService.selectEnterpriseEnterSellStoreData(jsonFilter.getFilter(),userInfo);
        return success(enterpriseDataVos);
    }
    @PostMapping("/cityESS")
    public Msg cityEnterSellStore(@RequestBody FilterObject jsonFilter){
        Integer pageIndex = jsonFilter.getPageIndex();
        Integer pageSize = jsonFilter.getPageSize();
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize);
        saleOrderService.selectCityEnterSellStoreDataGrid(pageInfo,jsonFilter.getFilter());
        return success(pageInfo);
    }
    @PostMapping("/createBatch")
    @JsonParams
    public List<Msg> createOrderBatch(@RequestParam String encryptStr){
        String jsonStr = new String(Base64.getDecoder().decode(encryptStr), StandardCharsets.UTF_8);
        JSONArray jsonArray = JSON.parseArray(jsonStr);
        if (jsonArray.size() < 1){
            return null;
        }
        List<Msg>msgList = new ArrayList<>();
        for (int i = 0; i < jsonArray.size(); i++) {
            JSONObject jsonObject = jsonArray.getJSONObject(i);
//            Msg msg = dealOrderCreated(jsonObject);
            Msg msg = createOrder(Base64.getEncoder().encodeToString(jsonObject.toJSONString().getBytes(StandardCharsets.UTF_8)));
            msgList.add(msg);
        }
        return msgList;
    }
    private Msg dealOrderCreated(JSONObject jsonObject) {
        JSONObject customer = jsonObject.getJSONObject("customer");
        JSONObject order = jsonObject.getJSONObject("order");
        JSONArray detailObject = jsonObject.getJSONArray("detailInfos");
        String userId = jsonObject.getString("operator");
        Integer num = order.getInteger("boxNum");
        String total = order.getString("total");
        String pay = order.getString("pay");
        String change = order.getString("change");
        String type = jsonObject.getString("type");
        String time = jsonObject.getString("datetime");
        Date salesTime;
        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        try {
            salesTime = dateFormat.parse(time);
        } catch (ParseException e) {
            return new Msg(ERROR_10003,"出库日期类型错误");
        }
        if (customer == null || detailObject == null || detailObject.isEmpty()) {
            return new Msg(ERROR_10001);
        }
        boolean isUser = userService.checkUserById(userId);
        if (!isUser) {
            return new Msg(ERROR_20001);
        }
        UserInfo userInfo = userService.getById(userId);
        List<SaleOrderDetailInfo> detailInfoList = new ArrayList<>();
        for (int j = 0; j < detailObject.size(); j++) {
            // 遍历 jsonArray 数组,把每一个对象转成 json 对象
            JSONObject object = detailObject.getJSONObject(j);
            String directionCodeStr = object.getString("directionCode");
            if (FireworkDeal.isNotDirectionCode(directionCodeStr)) {
                return new Msg(ERROR_10004,"流向码:"+directionCodeStr+"错误");
            }
            if (!productService.hasProductByDire(directionCodeStr.substring(0, 10))) {
                return new Msg(ERROR_10004,"流向码:"+directionCodeStr+"错误");
            }
            ProductInfo productInfo = productService.selectByDirection(directionCodeStr.substring(0, 10));
            if (FireworkDeal.is22Characters(directionCodeStr)){
                List<ProductVo>productVoList = new ArrayList<>();
                DirectionDetail directionDetail = FireworkDeal.dealDirectionCode(directionCodeStr);
                ProductVo productVo = productService.selectVoByDirection(directionCodeStr);
                FireworkDeal.getProductVos(directionCodeStr,directionDetail,directionDetail,productVoList,productVo);
                for (ProductVo productVo1 : productVoList){
                    SaleOrderDetailInfo detailInfo = new SaleOrderDetailInfo(productInfo.getDirectionCode(), productVo1.getDirectionCode());
                    ProductPriceInfo productPriceInfo = productPriceService.selectByCode(userInfo.getCompanynumber(), productVo1.getName());
                    BigDecimal price = productPriceInfo == null ? new BigDecimal("0") : productPriceInfo.getPrice() == null ? BigDecimal.valueOf(0) : productPriceInfo.getPrice();
                    detailInfo.setPrice(price);
                    detailInfo.setItemname(productVo1.getName());
                    detailInfo.setSpecification(productVo1.getSpecification());
                    detailInfoList.add(detailInfo);
                }
                num = productVoList.size();
            }else {
                SaleOrderDetailInfo detailInfo = new SaleOrderDetailInfo(productInfo.getDirectionCode(), directionCodeStr);
                ProductPriceInfo productPriceInfo = productPriceService.selectByCode(userInfo.getCompanynumber(), productInfo.getName());
                BigDecimal price = productPriceInfo == null ? new BigDecimal("0") : productPriceInfo.getPrice() == null ? BigDecimal.valueOf(0) : productPriceInfo.getPrice();
                detailInfo.setPrice(price);
                detailInfo.setItemname(productInfo.getName());
                detailInfo.setSpecification(productInfo.getSpecification());
                detailInfoList.add(detailInfo);
                num = 1;
            }
        }
        String idCardNum = customer.getString("idCardNumber");
        String workerName = customer.getString("workerName");
        if (StringUtils.isBlank(idCardNum) || StringUtils.isBlank(workerName)) {
            return new Msg(ERROR_50001,"身份信息有误");
        }
        String auth = getAuth();
        auth = StringUtils.isBlank(auth) ? "NOAUTH" : auth;
        idCardNum = idCardNum.replaceAll("[\r\n]","").trim();
        //校验数据是否已上传
        CustomerInfo customerExist = customerService.getCustomerByIdCardNum(idCardNum);
        if (customerExist != null){
            SaleOrderInfo orderInfo = saleOrderService.isExist(customerExist.getId(),userInfo.getCompanynumber(),salesTime);
            if (orderInfo != null){
                return new Msg(SUCCESS,"数据已上传");
            }
        }
//        return saleOrderService.doSalesProcess(customer, num, idCardNum, userInfo, detailInfoList, type, salesTime, pay, total, change, auth);
        return null;
    }
    /**
     * @Description: 销售查询
     * @date 2021/11/10 9:32
     */
    @PostMapping("/salenum-query")
    @ApiOperation(value = "销售查询")
    Object getSaleNumInfo(@RequestBody FilterObject filter) {
        Integer pageIndex = filter.getPageIndex();
        Integer pageSize = filter.getPageSize();
        IPage page = saleOrderDetailService.selectSaleNumInfo(new Page<>(pageIndex, pageSize), filter.getFilter(), getUser());
        return success(page);
    }
    @PostMapping("/salenum-detail")
    @ApiOperation(value = "销售详情")
    Object getSaleNumInfoDetail(@RequestBody FilterObject filter) {
        Integer pageIndex = filter.getPageIndex();
        Integer pageSize = filter.getPageSize();
        IPage page = saleOrderDetailService.selectSaleNumInfoDetail(new Page<>(pageIndex, pageSize), filter.getFilter(), getUser());
        return success(page);
    }
    @GetMapping("/idcard-check")
    @ApiOperation(value = "身份证校验")
    Msg idcardCheck(@RequestParam String idcard) {
        boolean flag = IdCardUtil.strongVerifyIdNumber(idcard);
        return success(flag);
    }
    @PostMapping("/importSaleProduct")
    @ApiOperation(value = "导入销售流向码",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "file",value = "文件",required = true),
    })
    public Msg importSaleProduct(MultipartFile file){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        String filesave ="";
        try {
            SimpleDateFormat sdf = new SimpleDateFormat( "yyyyMMddHHmmssSSS" );
            if (file == null)
            {
                msg.setCode("404");
                msg.setMessage("未找到上传文件");
                return msg;
            }
            long size = file.getSize();
            if(0 == size)
            {
                msg.setCode("404");
                msg.setMessage("上传文件大小为空");
                return msg;
            }
            if(!FileOptUtils.isDirExists(productPath)){
                msg.setCode("500");
                msg.setMessage("发生错误或不为目录");
                return msg;
            }
            filesave = productPath + getUser().getUsername() + "_" + sdf.format(new Date()) +".xlsx";
            file.transferTo(new File(filesave));
            InputStream in = new FileInputStream(filesave);
            String name = file.getOriginalFilename();
            Boolean isExcel2007 = name.substring(name.lastIndexOf(".") + 1).endsWith("xlsx")? true:false;
            BooleanReason blret = excelExportService.imporSaleProductExcel(in,getUser().getUsername(),isExcel2007);
            if(blret.getValue().equals(false))
            {
                msg.setCode("500");
                msg.setMessage(blret.getResultmsg());
                return msg;
            }else {
                msg.setMessage(blret.getResultmsg());
            }
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("500");
            msg.setMessage("导入发生错误");
            return msg;
        }
        return msg;
    }
    @PostMapping("/importSaleOrder")
    @ApiOperation(value = "导入实名销售",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "file",value = "文件",required = true),
    })
    public Msg importSaleOrder(MultipartFile file){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        String filesave ="";
        try {
            SimpleDateFormat sdf = new SimpleDateFormat( "yyyyMMddHHmmssSSS" );
            if (file == null)
            {
                msg.setCode("404");
                msg.setMessage("未找到上传文件");
                return msg;
            }
            long size = file.getSize();
            if(0 == size)
            {
                msg.setCode("404");
                msg.setMessage("上传文件大小为空");
                return msg;
            }
            if(!FileOptUtils.isDirExists(productPath)){
                msg.setCode("500");
                msg.setMessage("发生错误或不为目录");
                return msg;
            }
            filesave = productPath + getUser().getUsername() + "_" + sdf.format(new Date()) +".xlsx";
            file.transferTo(new File(filesave));
            InputStream in = new FileInputStream(filesave);
            String name = file.getOriginalFilename();
            Boolean isExcel2007 = name.substring(name.lastIndexOf(".") + 1).endsWith("xlsx")? true:false;
            BooleanReason blret = excelExportService.imporSaleOrderExcel(in,getUser().getUsername(),isExcel2007);
            if(blret.getValue().equals(false))
            {
                msg.setCode("500");
                msg.setMessage(blret.getResultmsg());
                return msg;
            }else {
                msg.setMessage(blret.getResultmsg());
            }
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("500");
            msg.setMessage("导入发生错误");
            return msg;
        }
        return msg;
    }
}
src/main/java/com/gk/firework/Controller/SelfCheckReportController.java
对比新文件
@@ -0,0 +1,166 @@
package com.gk.firework.Controller;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.SelfCheckReport;
import com.gk.firework.Domain.Utils.JsonUtils;
import com.gk.firework.Domain.Utils.Msg;
import com.gk.firework.Domain.Vo.SelfCheckReportSearchVo;
import com.gk.firework.Domain.Vo.SelfCheckReportVo;
import com.gk.firework.Service.SelfCheckReportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Api(tags = "隐患自查情况报送接口")
@RequestMapping("/selfcheckreport")
@RestController
public class SelfCheckReportController extends BaseController {
    @Autowired
    private SelfCheckReportService selfCheckReportService;
    @ApiOperation(value = "创建新的报告",httpMethod="POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "yhlevel",value = "隐患等级,1-一般隐患,2-重大隐患",defaultValue = "1",required = true),
            @ApiImplicitParam(name = "status",value = "隐患状态,1-未整改,2-已整改",defaultValue = "1",required = true),
            @ApiImplicitParam(name = "price",value = "整改资金,单位(RMB元),支持小数点后2位(RMB分)",defaultValue = "0.00",required = true),
            @ApiImplicitParam(name = "chargeperson",value = "责任人名字",defaultValue = "",required = true),
            @ApiImplicitParam(name = "endtime",value = "整改期限,YY-MM-DD HH:MM:SS",required = true),
            @ApiImplicitParam(name = "yhdesc",value = "隐患描述",required = true),
            @ApiImplicitParam(name = "solution",value = "整改措施",required = true)
    })
    @PostMapping( "/new")
    public Object newReport(@RequestBody SelfCheckReportVo reportVo){
        Msg msg = new Msg();
        msg.setCode("400");
        Long companyId = getUser().getCompanyid();
        if(companyId > 0){
            reportVo.setEid(companyId);
            if(selfCheckReportService.createNewReport(reportVo) > 0){
                msg.setCode("200");
                msg.setResult(1);
            }else {
                msg.setCode("301");
                msg.setMessage("新增报送记录出错");
            }
        }else {
            msg.setCode("301");
            msg.setMessage("权限错误");
        }
        return msg;
    }
    @ApiOperation(value = "根据隐患ID查找报告",httpMethod="GET")
    @ApiImplicitParam(name = "id",value = "隐患ID",required = true,defaultValue = "0")
    @RequestMapping(value = "/find/one",method = RequestMethod.GET)
    public Object findById(@RequestParam(name = "id",required = true) Long id){
        Msg msg = new Msg();
        msg.setCode("400");
        SelfCheckReport report = selfCheckReportService.getSelfCheckReportById(id);
        if(report!=null){
            if(getUser().getCompanyid()==null || getUser().getCompanyid().longValue()<=0 || getUser().getCompanyid().equals(report.getEid())){
                msg.setResult(report);
                msg.setCode("200");
            }else {
                msg.setMessage("权限错误");
            }
        }else {
            msg.setMessage("未找到记录");
        }
        return msg;
    }
    @ApiOperation(value = "查找报告列表",httpMethod="POST",notes = "查询条件优先级别:企业ID查找 > 企业名称查找 > 省市区查找")
    @RequestMapping(value = "/find/list",method = RequestMethod.POST)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "eid",value = "企业ID",required = false),
            @ApiImplicitParam(name = "ename",value = "企业名称",required = false),
            @ApiImplicitParam(name = "status",value = "隐患状态,1-未整改,2-已整改",required = false,defaultValue = "0"),
            @ApiImplicitParam(name = "yhlevel",value = "隐患等级,1-一般隐患,2-重大隐患",required = false,defaultValue = "0"),
            @ApiImplicitParam(name = "startTime",value = "查询起始时间 YY-MM-DD HH:MM:SS",required = false),
            @ApiImplicitParam(name = "endTime",value = "查询截止时间 YY-MM-DD HH:MM:SS",required = false),
            @ApiImplicitParam(name = "province",value = "省份",required = false),
            @ApiImplicitParam(name = "city",value = "市",required = false),
            @ApiImplicitParam(name = "district",value = "区",required = false),
            @ApiImplicitParam(name = "street",value = "街道",required = false),
            @ApiImplicitParam(name = "committee",value = "居委会",required = false),
            @ApiImplicitParam(name = "page",value = "当前页码",required = true,defaultValue = "1"),
            @ApiImplicitParam(name = "pageSize",value = "每页条目数",required = true,defaultValue = "20")
    })
    public Object findList(@RequestBody SelfCheckReportSearchVo searchVo){
        Msg msg = new Msg();
        msg.setCode("400");
        //参数校验
        if(searchVo.getStartTime() != null && searchVo.getEndTime() != null){
            if(searchVo.getStartTime().after(searchVo.getEndTime()) ){
                msg.setMessage("时间区间错误");
                return msg;
            }
        }
        if(searchVo.getStatus() == null || searchVo.getStatus() <0 || searchVo.getStatus() >2) {
            searchVo.setStatus((byte)0);
        }
        if(searchVo.getYhlevel() == null ||searchVo.getYhlevel() <0 ||searchVo.getYhlevel() >2){
            searchVo.setYhlevel((byte)0);
        }
        //企业用户登录查自己
        if(getUser().getCompanyid()!= null && getUser().getCompanyid().longValue()>0){
            searchVo.setEid(getUser().getCompanyid());
        }
        List<SelfCheckReport> list = selfCheckReportService.findSelfCheckReportListWithAllCondition(searchVo);
        if(list!=null && list.size()>0){
            msg.setCode("200");
            msg.setResult(list);
            Map<String,Object> rs = new HashMap();
            rs.put("totalCount",searchVo.getTotalCount());
            rs.put("page",searchVo.getPage());
            rs.put("pageSize",searchVo.getPageSize());
            msg.setMessage(JsonUtils.toJson(rs));
        }else {
            msg.setCode("200");
            msg.setMessage("未找到结果");
        }
        return msg;
    }
    @ApiOperation(value = "更新报告",httpMethod="POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "隐患ID",required = true),
            @ApiImplicitParam(name = "yhlevel",value = "隐患等级,1-一般隐患,2-重大隐患",defaultValue = "1",required = false),
            @ApiImplicitParam(name = "status",value = "隐患状态,1-未整改,2-已整改",defaultValue = "1",required = false),
            @ApiImplicitParam(name = "price",value = "整改资金,单位(RMB元),支持小数点后2位(RMB分)",defaultValue = "0.00",required = false),
            @ApiImplicitParam(name = "chargeperson",value = "责任人名字",defaultValue = "",required = false),
            @ApiImplicitParam(name = "endtime",value = "整改期限,YY-MM-DD HH:MM:SS",required = false),
            @ApiImplicitParam(name = "yhdesc",value = "隐患描述",required = false),
            @ApiImplicitParam(name = "solution",value = "整改措施",required = false)
    })
    @PostMapping("/update")
    public Object updateReport(@RequestBody SelfCheckReportVo reportVo){
        Msg msg = new Msg();
        msg.setCode("400");
        if(getUser().getCompanyid()!=null && getUser().getCompanyid().longValue() != reportVo.getEid().longValue()){
            msg.setMessage("权限错误");
            return msg;
        }
        if(reportVo.getEid().longValue()>0 && reportVo.getId().longValue() >0){
            int updateResult = selfCheckReportService.updateSelfCheckReport(reportVo);
            if(updateResult > 0){
                msg.setCode("200");
            }else {
                msg.setMessage("参数错误");
            }
        }else {
            msg.setMessage("参数缺失");
        }
        return msg;
    }
}
src/main/java/com/gk/firework/Controller/StandardController.java
对比新文件
@@ -0,0 +1,540 @@
package com.gk.firework.Controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.*;
import com.gk.firework.Domain.Utils.FilterObject;
import com.gk.firework.Domain.Vo.StandardTemplate1Vo;
import com.gk.firework.Service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@Api(tags = "安全生产标准化管理")
@RequestMapping("/")
@RestController
public class StandardController extends BaseController {
    @Autowired
    private StandardTemplate1Service standardTemplate1Service;
    @Autowired
    private StandardLawListService standardLawListService;
    @Autowired
    private StandardEducationLegerService standardEducationLegerService;
    @Autowired
    private StandardGuardRollService standardGuardRollService;
    @Autowired
    private StandardDeviceToolsLegerService standardDeviceToolsLegerService;
    @Autowired
    private StandardProductLegerService standardProductLegerService;
    @Autowired
    private StandardHiddenDangerLegerService standardHiddenDangerLegerService;
    @Autowired
    private StandardSupplyMarketObjectService standardSupplyMarketObjectService;
    @Autowired
    private StandardConferenceRecordService standardConferenceRecordService;
    @Autowired
    private StandardRewardRecordService standardRewardRecordService;
    /**
     * @Description: 查询简单模板
     * @date 2021/4/29 13:59
     */
    @ApiOperation(value = "查询简单模板", notes = "分页查询", httpMethod = "POST")
    @PostMapping("/standardList")
    Object template1(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = standardTemplate1Service.selectPage(new Page<>(pageIndex, pageSize), filterObject.getFilter(),getUser());
        return success(page);
    }
    /**
     * @Description: 新增简单模板
     * @date 2021/4/29 15:42
     */
    @ApiOperation(value = "新增简单模板", httpMethod = "POST")
    @PostMapping("/addstandard")
    Object addStandard(StandardTemplate1Vo standardTemplate1Vo) {
        standardTemplate1Service.addStandard(standardTemplate1Vo,getUser());
        return success();
    }
    /**
    * @Description: 修改简单模板
    * @date 2021/4/30 16:13
    */
    @ApiOperation(value = "修改简单模板", httpMethod = "PUT")
    @PostMapping("/putstandard")
    Object modStandard(StandardTemplate1Vo standardTemplate1Vo) {
        standardTemplate1Service.modStandard(standardTemplate1Vo,getUser());
        return success();
    }
    /**
     * @Description: 删除简单模板
     * @date 2021/4/30 16:21
     */
    @ApiOperation(value = "删除简单模板", httpMethod = "DELETE")
    @PostMapping("/delstandard")
    Object delStandard(@RequestParam Long id) {
        standardTemplate1Service.delStandard(id, getUser());
        return success();
    }
    /**
    * @Description: 适用的法律法规清单
    * @date 2021/5/8 13:50
    */
    @ApiOperation(value = "查询适用的法律法规清单", notes = "分页查询", httpMethod = "POST")
    @PostMapping("/queryStandardLawList")
    Object queryStandardLawList(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = standardLawListService.selectPage(new Page<>(pageIndex, pageSize), filterObject.getFilter(),getUser());
        return success(page);
    }
    /**
     * @Description: 新增适用的法律法规清单
     * @date 2021/5/8 13:50
     */
    @ApiOperation(value = "新增适用的法律法规清单", httpMethod = "POST")
    @PostMapping("/addstandardLawList")
    Object addStandardLawList(StandardLawList standardLawList) {
        standardLawListService.addStandardLawList(standardLawList,getUser());
        return success();
    }
    /**
     * @Description: 修改适用的法律法规清单
     * @date 2021/5/8 13:50
     */
    @ApiOperation(value = "修改适用的法律法规清单", httpMethod = "PUT")
    @PostMapping("/putstandardLawList")
    Object modStandardLawList(StandardLawList standardLawList) {
        standardLawListService.modStandardLawList(standardLawList,getUser());
        return success();
    }
    /**
     * @Description: 删除适用的法律法规清单
     * @date 2021/5/8 13:50
     */
    @ApiOperation(value = "删除适用的法律法规清单", httpMethod = "DELETE")
    @PostMapping("/delstandardLawList")
    Object delStandardLawList(@RequestParam Long id) {
        standardLawListService.delStandardLawList(id,getUser());
        return success();
    }
    /**
    * @Description: 从业人员教育培训台账
    * @date 2021/5/8 16:29
    */
    @ApiOperation(value = "查询从业人员教育培训台账", notes = "分页查询", httpMethod = "POST")
    @PostMapping("/queryStandardEducationLeger")
    Object queryStandardEducationLeger(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = standardEducationLegerService.selectPage(new Page<>(pageIndex, pageSize), filterObject.getFilter(),getUser());
        return success(page);
    }
    /**
     * @Description: 新增从业人员教育培训台账
     * @date 2021/5/8 13:50
     */
    @ApiOperation(value = "新增从业人员教育培训台账", httpMethod = "POST")
    @PostMapping("/addstandardEducationLeger")
    Object addStandardEducationLeger(StandardEducationLeger standardEducationLeger) {
        standardEducationLegerService.addStandardEducationLeger(standardEducationLeger,getUser());
        return success();
    }
    /**
     * @Description: 修改从业人员教育培训台账
     * @date 2021/5/8 13:50
     */
    @ApiOperation(value = "修改从业人员教育培训台账", httpMethod = "PUT")
    @PostMapping("/putstandardEducationLeger")
    Object modStandardEducationLeger(StandardEducationLeger standardEducationLeger) {
        standardEducationLegerService.modStandardEducationLeger(standardEducationLeger,getUser());
        return success();
    }
    /**
     * @Description: 删除从业人员教育培训台账
     * @date 2021/5/8 13:50
     */
    @ApiOperation(value = "删除从业人员教育培训台账", httpMethod = "DELETE")
    @PostMapping("/delstandardEducationLeger")
    Object delStandardEducationLeger(@RequestParam Long id) {
        standardEducationLegerService.delStandardEducationLeger(id,getUser());
        return success();
    }
    /**
     * @Description: 查询保管员和守护员名册
     * @date 2021/5/8 16:29
     */
    @ApiOperation(value = "查询保管员和守护员名册", notes = "分页查询", httpMethod = "POST")
    @PostMapping("/queryStandardGuardRoll")
    Object queryStandardGuardRoll(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = standardGuardRollService.selectPage(new Page<>(pageIndex, pageSize), filterObject.getFilter(),getUser());
        return success(page);
    }
    /**
     * @Description: 新增保管员和守护员名册
     * @date 2021/5/8 13:50
     */
    @ApiOperation(value = "新增从业人员教育培训台账", httpMethod = "POST")
    @PostMapping("/addstandardGuardRoll")
    Object addStandardGuardRoll(@RequestBody StandardGuardRoll standardGuardRoll) {
        standardGuardRollService.addStandardGuardRoll(standardGuardRoll,getUser());
        return success();
    }
    /**
     * @Description: 修改保管员和守护员名册
     * @date 2021/5/8 13:50
     */
    @ApiOperation(value = "新增从业人员教育培训台账", httpMethod = "PUT")
    @PostMapping("/putstandardGuardRoll")
    Object modStandardGuardRoll(@RequestBody StandardGuardRoll standardGuardRoll) {
        standardGuardRollService.modStandardGuardRoll(standardGuardRoll,getUser());
        return success();
    }
    /**
     * @Description: 删除保管员和守护员名册
     * @date 2021/5/8 13:50
     */
    @ApiOperation(value = "删除从业人员教育培训台账", httpMethod = "DELETE")
    @PostMapping("/delstandardGuardRoll")
    Object delStandardGuardRoll(@RequestParam Long id) {
        standardGuardRollService.delStandardGuardRoll(id,getUser());
        return success();
    }
    /**
    * @Description: 安全设施设备、消防器材和运输工具台账
    * @date 2021/5/18 9:24
    */
    @ApiOperation(value = "查询安全设施设备、消防器材和运输工具台账", notes = "分页查询", httpMethod = "POST")
    @PostMapping("/queryDeviceToolsLeger")
    Object queryDeviceToolsLeger(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = standardDeviceToolsLegerService.selectPage(new Page<>(pageIndex, pageSize), filterObject.getFilter(),getUser());
        return success(page);
    }
    /**
     * @Description: 新增安全设施设备、消防器材和运输工具台账
     * @date 2021/5/18 9:24
     */
    @ApiOperation(value = "deviceToolsLeger", httpMethod = "POST")
    @PostMapping("/adddeviceToolsLeger")
    Object addDeviceToolsLeger(@RequestBody StandardDeviceToolsLeger standardDeviceToolsLeger) {
        standardDeviceToolsLegerService.addDeviceToolsLeger(standardDeviceToolsLeger,getUser());
        return success();
    }
    /**
     * @Description: 新增安全设施设备、消防器材和运输工具台账
     * @date 2021/5/18 9:24
     */
    @ApiOperation(value = "deviceToolsLeger", httpMethod = "PUT")
    @PostMapping("/putdeviceToolsLeger")
    Object modDeviceToolsLeger(@RequestBody StandardDeviceToolsLeger standardDeviceToolsLeger) {
        standardDeviceToolsLegerService.modDeviceToolsLeger(standardDeviceToolsLeger,getUser());
        return success();
    }
    /**
     * @Description: 删除安全设施设备、消防器材和运输工具台账
     * @date 2021/5/18 9:24
     */
    @ApiOperation(value = "deviceToolsLeger", httpMethod = "DELETE")
    @PostMapping("/deldeviceToolsLeger")
    Object modDeviceToolsLeger(@RequestParam Long id) {
        standardDeviceToolsLegerService.delDeviceToolsLeger(id,getUser());
        return success();
    }
    /**
     * @Description: 经营产品信息台账
     * @date 2021/5/18 9:24
     */
    @ApiOperation(value = "查询经营产品信息台账", notes = "分页查询", httpMethod = "POST")
    @PostMapping("/queryProductLeger")
    Object queryProductLeger(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = standardProductLegerService.selectPage(new Page<>(pageIndex, pageSize), filterObject.getFilter(),getUser());
        return success(page);
    }
    /**
     * @Description: 新增经营产品信息台账
     * @date 2021/5/18 9:24
     */
    @ApiOperation(value = "新增经营产品信息台账", httpMethod = "POST")
    @PostMapping("/addproductLeger")
    Object addProductLeger(@RequestBody StandardProductLeger standardProductLeger) {
        standardProductLegerService.addProductLeger(standardProductLeger,getUser());
        return success();
    }
    /**
     * @Description: 修改经营产品信息台账
     * @date 2021/5/18 9:24
     */
    @ApiOperation(value = "修改经营产品信息台账", httpMethod = "PUT")
    @PostMapping("/putproductLeger")
    Object modProductLeger(@RequestBody StandardProductLeger standardProductLeger) {
        standardProductLegerService.modProductLeger(standardProductLeger,getUser());
        return success();
    }
    /**
     * @Description: 删除经营产品信息台账
     * @date 2021/5/18 9:24
     */
    @ApiOperation(value = "删除经营产品信息台账", httpMethod = "DELETE")
    @PostMapping("/delproductLeger")
    Object delProductLeger(@RequestParam Long id) {
        standardProductLegerService.delProductLeger(id,getUser());
        return success();
    }
    /**
     * @Description: 隐患排查治理台账
     * @date 2021/5/18 9:24
     */
    @ApiOperation(value = "查询隐患排查治理台账", notes = "分页查询", httpMethod = "POST")
    @PostMapping("/queryHiddenDangerLeger")
    Object queryHiddenDangerLeger(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = standardHiddenDangerLegerService.selectPage(new Page<>(pageIndex, pageSize), filterObject.getFilter(),getUser());
        return success(page);
    }
    /**
     * @Description: 新增隐患排查治理台账
     * @date 2021/5/18 9:24
     */
    @ApiOperation(value = "新增隐患排查治理台账", notes = "分页查询", httpMethod = "POST")
    @PostMapping("/addhiddenDangerLeger")
    Object addHiddenDangerLeger(@RequestBody StandardHiddenDangerLeger standardHiddenDangerLeger) {
        standardHiddenDangerLegerService.addHiddenDangerLeger(standardHiddenDangerLeger, getUser());
        return success();
    }
    /**
     * @Description: 修改隐患排查治理台账
     * @date 2021/5/18 9:24
     */
    @ApiOperation(value = "修改隐患排查治理台账", httpMethod = "PUT")
    @PostMapping("/puthiddenDangerLeger")
    Object modHiddenDangerLeger(@RequestBody StandardHiddenDangerLeger standardHiddenDangerLeger) {
        standardHiddenDangerLegerService.modHiddenDangerLeger(standardHiddenDangerLeger, getUser());
        return success();
    }
    /**
     * @Description: 删除隐患排查治理台账
     * @date 2021/5/18 9:24
     */
    @ApiOperation(value = "删除隐患排查治理台账", httpMethod = "DELETE")
    @PostMapping("/delhiddenDangerLeger")
    Object delHiddenDangerLeger(@RequestParam Long id) {
        standardHiddenDangerLegerService.delHiddenDangerLeger(id, getUser());
        return success();
    }
    /**
    * @Description: 供销对象台账
    * @date 2021/5/21 10:30
    */
    @ApiOperation(value = "供销对象台账", notes = "分页查询", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "menu",value = "供|销的菜单名")
    })
    @PostMapping("/querySupplyMarketObject")
    Object querySupplyMarketObject(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = standardSupplyMarketObjectService.selectPage(new Page<>(pageIndex, pageSize), filterObject.getFilter(),getUser());
        return success(page);
    }
    /**
     * @Description: 新增供销对象台账
     * @date 2021/5/21 10:30
     */
    @ApiOperation(value = "新增供销对象台账",  httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "menu",value = "供|销的菜单名")
    })
    @PostMapping("/addsupplyMarketObject")
    Object addSupplyMarketObject(@RequestBody StandardSupplyMarketObject standardSupplyMarketObject) {
        standardSupplyMarketObjectService.addSupplyMarketObject(standardSupplyMarketObject, getUser());
        return success();
    }
    /**
     * @Description: 修改供销对象台账
     * @date 2021/5/21 10:30
     */
    @ApiOperation(value = "修改供销对象台账",httpMethod = "PUT")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "menu",value = "供|销的菜单名")
    })
    @PostMapping("/putsupplyMarketObject")
    Object modSupplyMarketObject(@RequestBody StandardSupplyMarketObject standardSupplyMarketObject) {
        standardSupplyMarketObjectService.modSupplyMarketObject(standardSupplyMarketObject, getUser());
        return success();
    }
    /**
     * @Description: 删除供销对象台账
     * @date 2021/5/21 10:30
     */
    @ApiOperation(value = "删除供销对象台账",httpMethod = "DELETE")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "供销对象台账id")
    })
    @PostMapping("/delsupplyMarketObject")
    Object delSupplyMarketObject(@RequestParam Long id) {
        standardSupplyMarketObjectService.delSupplyMarketObject(id, getUser());
        return success();
    }
    /**
    * @Description: 会议记录
    * @date 2021/5/21 14:04
    */
    @ApiOperation(value = "会议记录", notes = "分页查询", httpMethod = "POST")
    @PostMapping("/queryStandardConferenceRecord")
    Object queryStandardConferenceRecord(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = standardConferenceRecordService.selectPage(new Page<>(pageIndex, pageSize), filterObject.getFilter(),getUser());
        return success(page);
    }
    /**
     * @Description: 新增会议记录
     * @date 2021/5/21 10:30
     */
    @ApiOperation(value = "新增会议记录",  httpMethod = "POST")
    @PostMapping("/addstandardConferenceRecord")
    Object addStandardConferenceRecord(@RequestBody StandardConferenceRecord standardConferenceRecord) {
        standardConferenceRecordService.addStandardConferenceRecord(standardConferenceRecord, getUser());
        return success();
    }
    /**
     * @Description: 修改会议记录
     * @date 2021/5/21 10:30
     */
    @ApiOperation(value = "修改会议记录",  httpMethod = "PUT")
    @PostMapping("/putstandardConferenceRecord")
    Object modStandardConferenceRecord(@RequestBody StandardConferenceRecord standardConferenceRecord) {
        standardConferenceRecordService.modStandardConferenceRecord(standardConferenceRecord, getUser());
        return success();
    }
    /**
     * @Description: 删除会议记录
     * @date 2021/5/21 10:30
     */
    @ApiOperation(value = "删除会议记录",  httpMethod = "DELETE")
    @PostMapping("/delstandardConferenceRecord")
    Object delStandardConferenceRecord(@RequestParam Long id) {
        standardConferenceRecordService.delStandardConferenceRecord(id, getUser());
        return success();
    }
    /**
    * @Description: 奖惩记录
    * @date 2021/5/21 15:16
    */
    @ApiOperation(value = "奖惩记录", notes = "分页查询", httpMethod = "POST")
    @PostMapping("/queryRecordAndPunishmentRecord")
    Object queryRecordAndPunishmentRecord(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = standardRewardRecordService.selectPage(new Page<>(pageIndex, pageSize), filterObject.getFilter(),getUser());
        return success(page);
    }
    /**
     * @Description: 新增奖惩记录
     * @date 2021/5/21 15:16
     */
    @ApiOperation(value = "新增奖惩记录", httpMethod = "POST")
    @PostMapping("/addrecordAndPunishmentRecord")
    Object addRecordAndPunishmentRecord(@RequestBody StandardRewardRecord standardRewardRecord) {
        standardRewardRecordService.addRecordAndPunishmentRecord(standardRewardRecord,getUser());
        return success();
    }
    /**
     * @Description: 修改奖惩记录
     * @date 2021/5/21 15:16
     */
    @ApiOperation(value = "修改奖惩记录", httpMethod = "PUT")
    @PostMapping("/putrecordAndPunishmentRecord")
    Object modRecordAndPunishmentRecord(@RequestBody StandardRewardRecord standardRewardRecord) {
        standardRewardRecordService.modRecordAndPunishmentRecord(standardRewardRecord,getUser());
        return success();
    }
    /**
     * @Description: 删除奖惩记录
     * @date 2021/5/21 15:16
     */
    @ApiOperation(value = "删除奖惩记录", httpMethod = "DELETE")
    @PostMapping("/delrecordAndPunishmentRecord")
    Object modRecordAndPunishmentRecord(@RequestParam Long id) {
        standardRewardRecordService.delRecordAndPunishmentRecord(id,getUser());
        return success();
    }
}
src/main/java/com/gk/firework/Controller/StatisticsController.java
对比新文件
@@ -0,0 +1,452 @@
package com.gk.firework.Controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.Utils.FilterObject;
import com.gk.firework.Domain.Vo.PageInfoExtension;
import com.gk.firework.Service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Api(tags = "统计分析")
@RequestMapping("/statistics")
@RestController
public class StatisticsController extends BaseController {
    @Autowired
    private EnterpriseService enterpriseService;
    @Autowired
    private SaleOrderDetailService saleOrderDetailService;
    @Autowired
    private LicenseService licenseService;
    @Autowired
    private EntryDetailService entryDetailService;
    @Autowired
    private DeliveryDetailService deliveryDetailService;
    @Autowired
    private HistoryStockService historyStockService;
    /**
     * @Description: 经纬度查询
     * @date 2021/4/16 14:53
     */
    @GetMapping("/all-location")
    @ApiOperation(value = "企业所有信息经纬度查询 按城市查")
    Object getAllLocation(String city) {
        List<Map> allLocation = enterpriseService.getAllLocation(city);
        return success(allLocation);
    }
    /**
     * @Description: 零售点数量按区域统计
     * @date 2021/4/16 14:52
     */
    @GetMapping("/retail-statistics-area")
    @ApiOperation(value = "零售点数量按区域统计")
    Object getRetailStatisticsByArea() {
        List<Map> retailStatisticsByArea = enterpriseService.getRetailStatisticsByArea();
        return success(retailStatisticsByArea);
    }
    /**
     * @Description: 近n天销售数据统计图
     * @date 2021/4/16 16:21
     */
    @GetMapping("/sale-data-ndays")
    @ApiOperation(value = "近n天销售数据统计图")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "days", value = "时间天数(从现在往前推n天)")
    })
    Object getSaleDataInDays(@RequestParam(defaultValue = "10") Integer days) {
        List<Map> saleData = saleOrderDetailService.getSaleDataInDays(days);
        return success(saleData);
    }
    /**
     * @Description: 销售数量按地区统计 n天 默认90
     * @date 2021/4/16 16:21
     */
    @GetMapping("/sale-data-area-ndays")
    @ApiOperation(value = "销售数量按地区统计 n天 默认90")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "days", value = "时间天数(从现在往前推n天)")
    })
    Object getSaleDataAreaInDays(@RequestParam(defaultValue = "90") Integer days) {
        List<Map> saleData = saleOrderDetailService.getSaleDataAreaInDays(days);
        return success(saleData);
    }
    /**
     * @Description: 销售数量按品种统计 n天 默认90
     * @date 2021/4/16 17:03
     */
    @GetMapping("/sale-data-productType-ndays")
    @ApiOperation(value = "销售数量按品种统计 n天 默认90")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "days", value = "时间天数(从现在往前推n天)")
    })
    Object getSaleDataProductTypeInDays(@RequestParam(defaultValue = "90") Integer days) {
        List<Map> saleData = saleOrderDetailService.getSaleDataProductTypeInDays(days);
        return success(saleData);
    }
    /**
     * @Description: 销售量同年对比
     * @date 2021/4/22 14:52
     */
    @GetMapping("/sale-data-compare-in-year")
    @ApiOperation(value = "销售量同年对比")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "province", value = "省(默认新疆维吾尔自治区)"),
            @ApiImplicitParam(name = "city", value = "市"),
    })
    Object getSaleDataCompareInYear(@RequestParam(defaultValue = "新疆维吾尔自治区") String province, String city) {
        Map compareData = saleOrderDetailService.getSaleDataCompareInYear(province, city);
        return success(compareData);
    }
    /**
     * @Description: 进货量同年对比
     * @date 2021/4/22 14:52
     */
    @GetMapping("/inbound-compare-in-year")
    @ApiOperation(value = "进货量同年对比")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "province", value = "省(默认新疆维吾尔自治区)"),
            @ApiImplicitParam(name = "city", value = "市"),
    })
    Object getInboundCompareInYear(@RequestParam(defaultValue = "新疆维吾尔自治区") String province, String city) {
        Map compareData = saleOrderDetailService.getInboundCompareInYear(province, city);
        return success(compareData);
    }
    /**
     * @Description: 统计各城市某时间的销量、进货量(箱数)显示新疆15个地州市的统计信息
     * @date 2021/5/15 9:15
     */
    @PostMapping("/city-inbound-outbound")
    @ApiOperation(value = "统计各城市某时间的销量、进货量(箱数)显示新疆15个地州市的统计信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex", value = "页码"),
            @ApiImplicitParam(name = "pageSize", value = "页大小"),
            @ApiImplicitParam(name = "filter.starttime", value = "开始时间"),
            @ApiImplicitParam(name = "filter.endtime", value = "结束时间"),
    })
    Object getCityInAndOut(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        //可以手写分页,查总数可以只查15个市
        IPage page = saleOrderDetailService.getCityInAndOut(new Page<>(pageIndex, pageSize), filterObject.getFilter());
        return success(page);
    }
    @PostMapping("/export/city-inbound-outbound")
    Object exportCityAndOut(@RequestBody FilterObject filterObject) {
        List<Map> list = saleOrderDetailService.getCityInAndOutExport(filterObject.getFilter());
        return success(list);
    }
    /**
     * @Description: 地州市分类销售统计
     * @date 2022/1/29 18:04
     */
    @PostMapping("/city-type-sale")
    Object cityTypeSale(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = saleOrderDetailService.selectCityTypeSale(new Page<>(pageIndex, pageSize), filterObject.getFilter());
        return success(page);
    }
    /**
     * @Description: 导出地州市分类销售统计
     * @date 2022/1/29 18:04
     */
    @PostMapping("/export/city-type-sale")
    Object cityTypeSaleExport(@RequestBody FilterObject filterObject) {
        List<Map> list = saleOrderDetailService.selectCityTypeSaleExport(filterObject.getFilter());
        return success(list);
    }
    /**
     * @Description: 地州下的县区分类销售统计
     * @date 2022/1/29 18:04
     */
    @PostMapping("/district-type-sale")
    Object districtTypeSale(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = saleOrderDetailService.selectDistrictTypeSale(new Page<>(pageIndex, pageSize), filterObject.getFilter());
        return success(page);
    }
    /**
     * @Description: 导出地州市分类销售统计
     * @date 2022/1/29 18:04
     */
    @PostMapping("/export/district-type-sale")
    Object districtTypeSaleExport(@RequestBody FilterObject filterObject) {
        List<Map> list = saleOrderDetailService.selectDistrictTypeSaleExport(filterObject.getFilter());
        return success(list);
    }
    /**
     * @Description: 企业销售分类统计
     * @date 2022/1/29 13:02
     */
    @PostMapping("/enterprise-type-sale")
    Object enterpriseTypeSale(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = saleOrderDetailService.selectEnterpriseTypeSale(new Page<>(pageIndex, pageSize), filterObject.getFilter(), getUser());
        return success(page);
    }
    /**
     * @Description: 导出企业销售分类统计
     * @date 2022/1/29 15:15
     */
    @PostMapping("/export/enterprise-type-sale")
    Object exportEnterpriseTypeSale(@RequestBody FilterObject filterObject) {
        List<Map> res = saleOrderDetailService.selectExportEnterpriseTypeSale(filterObject.getFilter(), getUser());
        return success(res);
    }
    /**
     * @Description: 企业分类入库统计
     * @date 2022/1/29 15:19
     */
    @PostMapping("/enterprise-type-entry")
    Object enterpriseTypeEntry(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = entryDetailService.selectEnterpriseTypeEntry(new Page<>(pageIndex, pageSize), filterObject.getFilter(), getUser());
        return success(page);
    }
    /**
     * @Description: 导出企业分类入库统计
     * @date 2022/1/29 15:38
     */
    @PostMapping("/export/enterprise-type-entry")
    Object exportEnterpriseTypeEntry(@RequestBody FilterObject filterObject) {
        List<Map> res = entryDetailService.selectExportEnterpriseTypeEntry(filterObject.getFilter(), getUser());
        return success(res);
    }
    /**
     * @Description: 各地州分类入库统计
     * @date 2022/1/29 15:50
     */
    @PostMapping("/city-type-entry")
    Object cityTypeEntry(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = entryDetailService.selectCityTypeEntry(new Page<>(pageIndex, pageSize), filterObject.getFilter(), getUser());
        return success(page);
    }
    /**
     * @Description: 导出各地州分类入库统计
     * @date 2022/1/29 16:15
     */
    @PostMapping("/export/city-type-entry")
    Object exportCityTypeEntry(@RequestBody FilterObject filterObject) {
        List<Map> res = entryDetailService.selectExportCityTypeEntry(filterObject.getFilter(), getUser());
        return success(res);
    }
    /**
     * @Description: 企业分类出库统计
     * @date 2022/1/29 16:18
     */
    @PostMapping("/enterprise-type-delivery")
    Object enterpriseTypeDelivery(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = deliveryDetailService.selectEnterpriseTypeDelivery(new Page<>(pageIndex, pageSize), filterObject.getFilter(), getUser());
        return success(page);
    }
    /**
     * @Description: 导出企业分类出库统计
     * @date 2022/1/29 16:30
     */
    @PostMapping("/export/enterprise-type-delivery")
    Object exportEnterpriseTypeDelivery(@RequestBody FilterObject filterObject) {
        List<Map> res = deliveryDetailService.selectExportEnterpriseTypeDelivery(filterObject.getFilter(), getUser());
        return success(res);
    }
    /**
     * @Description: 各地州分类出库统计
     * @date 2022/1/29 16:35
     */
    @PostMapping("/city-type-delivery")
    Object cityTypeDelivery(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = deliveryDetailService.selectCityTypeDelivery(new Page<>(pageIndex, pageSize), filterObject.getFilter(), getUser());
        return success(page);
    }
    /**
     * @Description: 导出各地州分类出库统计
     * @date 2022/1/29 16:35
     */
    @PostMapping("/export/city-type-delivery")
    Object exportCityTypeDelivery(@RequestBody FilterObject filterObject) {
        List<Map> res = deliveryDetailService.selectExportCityTypeDelivery(filterObject.getFilter(), getUser());
        return success(res);
    }
    /**
     * @Description: 导出
     * @date 2022/1/29 16:39
     */
    @PostMapping("/city-inbound-outbound-detail")
    @ApiOperation(value = "显示市下各个企业的详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex", value = "页码"),
            @ApiImplicitParam(name = "pageSize", value = "页大小"),
            @ApiImplicitParam(name = "filter.starttime", value = "开始时间"),
            @ApiImplicitParam(name = "filter.endtime", value = "结束时间"),
            @ApiImplicitParam(name = "filter.safetysupervision", value = "企业类型"),
            @ApiImplicitParam(name = "filter.city", value = "市"),
    })
    Object getCityInAndOutDetail(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        //可以手写分页,查总数可以只查15个市
        IPage page = saleOrderDetailService.getCityInAndOutDetail(new Page<>(pageIndex, pageSize), filterObject.getFilter());
        return success(page);
    }
    /**
     * @Description: 标题数据 (零售店数量 今日销售数量 今年销售总量 今年购买人次)
     * @date 2021/4/25 9:44
     */
    @GetMapping("/title-data")
    @ApiOperation(value = "标题数据 (零售店数量 今日销售数量 今年销售总量 今年购买人次)")
    Object getTitleData() {
        Map data = saleOrderDetailService.getTitleData();
        return success(data);
    }
    /**
     * @Description: 性别统计购买
     * @date 2021/5/15 16:21
     */
    @PostMapping("/gender-sale")
    Object getGenderSale(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = saleOrderDetailService.getGenderSale(new Page<>(pageIndex, pageSize), filterObject.getFilter(), getUser());
        return success(page);
    }
    /**
     * @Description: 族别统计购买
     * @date 2021/5/15 16:39
     */
    @PostMapping("/race-sale")
    Object getRaceSale(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = saleOrderDetailService.getRaceSale(new Page<>(pageIndex, pageSize), filterObject.getFilter(), getUser());
        return success(page);
    }
    /**
     * @Description: 按年龄段
     * @date 2021/5/15 16:45
     */
    @PostMapping("/generation-sale")
    Object getGenerationSale(@RequestBody FilterObject filterObject) {
        List<Map> data = saleOrderDetailService.getGenerationSale(filterObject.getFilter(), getUser());
        return success(data);
    }
    /**
     * @Description: 证书分析
     * @date 2021/7/1 15:11
     */
    @PostMapping("/license")
    Object getLicenseStatistic(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = licenseService.selectLicenseStatistic(new Page<>(pageIndex, pageSize), filterObject.getFilter(), getUser());
        return success(page);
    }
    /**
     * @Description: 企业历史库存查询(年月日)
     * @date 2022/2/8 15:15
     */
    @PostMapping("/stock/history")
    Object getHistoryStock(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = historyStockService.selectHistoryStock(new Page<>(pageIndex, pageSize), filterObject.getFilter(), getUser());
        return success(page);
    }
    @PostMapping("/export/stock/history")
    Object getExportHistoryStock(@RequestBody FilterObject filterObject) {
        List<Map> result = historyStockService.selectExportHistoryStock(filterObject.getFilter(), getUser());
        return success(result);
    }
    /**
     * @Description: 各地州库存查询-staticstock
     * @date 2022/2/8 15:40
     */
    @PostMapping("/city-stock")
    Object getCityStock(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = historyStockService.selectCityStock(new Page<>(pageIndex, pageSize), filterObject.getFilter(), getUser());
        return success(page);
    }
    /**
     * @Description: 各地州历史库存查询(年月日)
     * @date 2022/2/8 16:06
     */
    @PostMapping("/history/city-stock")
    Object getHistoryCityStock(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = historyStockService.selectHistoryCityStock(new Page<>(pageIndex, pageSize), filterObject.getFilter(), getUser());
        return success(page);
    }
}
src/main/java/com/gk/firework/Controller/StockController.java
对比新文件
@@ -0,0 +1,904 @@
package com.gk.firework.Controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.*;
import com.gk.firework.Domain.Enum.ErrorCode;
import com.gk.firework.Domain.Extension.StockTotal;
import com.gk.firework.Domain.Log.JsonParams;
import com.gk.firework.Domain.Utils.BeanUtils;
import com.gk.firework.Domain.Utils.Msg;
import com.gk.firework.Domain.Utils.PageInfo;
import com.gk.firework.Domain.Utils.StringUtils;
import com.gk.firework.Domain.Vo.*;
import com.gk.firework.Service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import static com.gk.firework.Domain.Enum.ErrorCode.*;
/**
 * @author : jingjy
 * @date : 2021/3/19 11:06
 */
@Api(tags = "库存接口")
@RestController
@RequestMapping("/stock")
public class StockController extends BaseController {
    @Autowired
    private ProductService productService;
    @Autowired
    private UserService userService;
    @Autowired
    private EntryService entryService;
    @Autowired
    private EntryDetailService entryDetailService;
    @Autowired
    private StockService stockService;
    @Autowired
    private ProductLocusService productLocusService;
    @Autowired
    private EnterpriseService enterpriseService;
    @Autowired
    private StaticStockService staticStockService;
    @PostMapping("/entrySingle")
    @JsonParams
    public Msg entrySingle(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg(true);
        String userId = jsonObject.getString("id");
        String type = jsonObject.getString("type");
        String date = jsonObject.getString("time");
        String rfids = jsonObject.getString("rfids");
        String transport = jsonObject.getString("cert");
        UserInfo userInfo = userService.getById(userId);
        Date datetime;
        DateFormat dateFormat1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        try {
            datetime = dateFormat1.parse(date);
        } catch (ParseException e) {
            msg.setCode(ERROR_10003.getCode());
            msg.setMessage(ERROR_10003.getMsg()+":入库日期类型错误!");
            return msg;
        }
        String auth = getAuth();
        auth = StringUtils.isBlank(auth) ? "NOAUTH" : auth;
        EntryOrderInfo orderInfo = entryService.generateEntryOrderInfo(type,userInfo,datetime,transport, auth);
        if (StringUtils.isBlank(userId) || StringUtils.isBlank(rfids)){
            msg.setCode(ERROR_10001.getCode());
            msg.setMessage(ERROR_10001.getMsg()+":用户信息或者流向码为空,无法入库");
            return msg;
        }
        if (EntryUtils.RK_ENTRY.equals(type)){
            //一般入库
            List<String>directionCodes = StringUtils.toList(rfids);
            List<ProductVo> productVos = new ArrayList<>();
            List<EntryDetailInfo>detailInfos = new ArrayList<>();
            List<ProductLocusInfo>locusInfos = new ArrayList<>();
            //入库数量
            int entryNum = 0;
            for (String dire:directionCodes) {
                if (FireworkDeal.isNotDirectionCode(dire)){
                    msg.setCode(ERROR_10004.getCode());
                    msg.setMessage(ERROR_10004.getMsg()+":流向码:"+dire+" 不符合规则,无法识别!");
                    return msg;
                }
                DirectionDetail detail = FireworkDeal.dealDirectionCode(dire);
                if (productService.hasProductByDire(dire)){
                    msg.setCode(ERROR_50001.getMsg());
                    msg.setMessage(ERROR_50001.getMsg()+":流向码:"+dire+" 未找到相应产品信息!");
                    return msg;
                }
                ProductVo productVo = productService.selectVoByDirection(dire);
                EntryDetailInfo detailInfo = new EntryDetailInfo(orderInfo.getCode(),dire,productVo.getItemCode(),
                        productVo.getName(),productVo.getManufacturer(),new Date(),userInfo.getCompanynumber());
                if (detail.getLength() == FireworkDeal.DIRECTION_OUTSIDE){
                    ProductLocusInfo productLocusInfo = new ProductLocusInfo(dire,new Date(),datetime, userInfo.getCompany(),
                            null,ProductLocusInfo.ENTRY_STATUS,productVo.getBoxNumber().toString());
                    locusInfos.add(productLocusInfo);
                }
                detailInfos.add(detailInfo);
                if (detail.getBoxNo() == null){
                    entryNum += 1;
                }else {
                    entryNum += Integer.parseInt(detail.getBoxNo());
                }
                if (detail.getLength() == FireworkDeal.DIRECTION_OUTSIDE){
                    FireworkDeal.getProductVos(dire, detail, detail, productVos, productVo);
                }else if (detail.getLength() == FireworkDeal.DIRECTION_INSIDE){
                    ProductInfo productVo1 = productService.selectByDirection(dire);
                    productVo1.setDirectionCode(dire);
                    ProductVo productVo2 = BeanUtils.copy(productVo1,ProductVo.class);
                    FireworkDeal.setProductVosAttribute(productVo2);
                    productVos.add(productVo2);
                }
            }
            boolean flag = stockService.putInStorage(userInfo,productVos,datetime, type);
            if (flag){
                orderInfo.setNum(entryNum);
                entryService.save(orderInfo);
                entryDetailService.saveBatch(detailInfos);
                productLocusService.insertBatch(locusInfos);
            }else {
                msg.setCode(ERROR_40001.getCode());
                msg.setMessage(ERROR_40001.getMsg()+"库存入库失败");
                return msg;
            }
        }
        return msg;
    }
    @PostMapping("/entryBatch")
    @JsonParams
    public List<Msg> entryBatch(@RequestBody JSONArray jsonArray){
        List<Msg> msgList = new ArrayList<>();
        if (jsonArray.size() < 1){
            return null;
        }
        for (int i = 0; i < jsonArray.size(); i++) {
            JSONObject jsonObject = jsonArray.getJSONObject(i);
            msgList.add(entrySingle(jsonObject));
        }
        return msgList;
    }
    @ApiOperation(value = "通用入库",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "JSONArray",value = "json数组,json对象为:{id:'用户ID',rfids:'流向码',time:'入库时间',cert:'运输证',type:'入库类型'}"),
    })
    @PostMapping("/entry")
    @JsonParams
    public Msg entryStock(@RequestBody JSONArray jsonArray){
        if (jsonArray.size() > 0)
        {
            for (int i = 0; i < jsonArray.size(); i++) {
                // 遍历 jsonArray 数组,把每一个对象转成 json 对象
                JSONObject jsonObject = jsonArray.getJSONObject(i);
                String userId = jsonObject.getString("id");
                String directionCodeStr = jsonObject.getString("rfids");
                String datetime = jsonObject.getString("time");
                String transport = jsonObject.getString("cert");
                Date date;
                DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                try {
                    date = dateFormat.parse(datetime);
                } catch (ParseException e) {
                    return new Msg(ERROR_10003,"入库日期类型错误!");
                }
                //type 1.常规入库; 2.退货入库
                String type = jsonObject.getString("type");
                if (StringUtils.isBlank(type)){
                    return new Msg(ERROR_10001,"入库类型不能为空");
                }
                if (StringUtils.isBlank(directionCodeStr)){
                    return new Msg(ERROR_10001,"流向码不能为空");
                }
                boolean isUser = userService.checkUserById(userId);
                if (!isUser){
                    return new Msg(ERROR_50001,"未找到相关用户信息,不能入库!");
                }
                UserInfo userInfo = userService.getById(userId);
                //判断是否存在同时间同操作人入库记录
                boolean exist = entryService.isEntryExist(datetime,userInfo);
                if (exist){ continue; }
                String auth = getAuth();
                auth = StringUtils.isBlank(auth) ? "NOAUTH" : auth;
                List<String> directionCodes = StringUtils.toList(directionCodeStr);
                EntryOrderInfo orderInfo = entryService.generateEntryOrderInfo(type,userInfo,date,transport, auth);
                int boxNum = 0;
                List<EntryDetailInfo>detailInfos = new ArrayList<>();
                List<ProductLocusInfo>locusInfos = new ArrayList<>();
                List<ProductVo> productVos = new ArrayList<>();
                for (String dire:directionCodes) {
                    if (FireworkDeal.isNotDirectionCode(dire)){
                        return new Msg(ERROR_10004,"流向码:"+dire+" 不符合规则,无法识别!");
                    }
                    DirectionDetail detail = FireworkDeal.dealDirectionCode(dire);
                    if (productService.hasProductByDire(dire)){
                        return new Msg(ERROR_50001,":流向码:"+dire+" 未找到相应产品信息!");
                    }
                    ProductVo productVo = productService.selectVoByDirection(dire);
                    EntryDetailInfo detailInfo = new EntryDetailInfo(orderInfo.getCode(),dire,productVo.getItemCode(),
                            productVo.getName(),productVo.getManufacturer(),new Date(),userInfo.getCompanynumber());
                    if (detail.getLength() == FireworkDeal.DIRECTION_OUTSIDE){
                        ProductLocusInfo productLocusInfo = new ProductLocusInfo(dire,new Date(),date, userInfo.getCompany(),
                                null,ProductLocusInfo.ENTRY_STATUS,productVo.getBoxNumber().toString());
                        locusInfos.add(productLocusInfo);
                    }
                    if (detail.getLength() == FireworkDeal.DIRECTION_OUTSIDE){
                        FireworkDeal.getProductVos(dire, detail, detail, productVos, productVo);
                        detailInfo.setBoxcode(detail.getOriginalCode());
                        detailInfo.setNum(Integer.parseInt(detail.getBoxNo()));
                        boxNum += Integer.parseInt(detail.getBoxNo());
                    }else if (detail.getLength() == FireworkDeal.DIRECTION_INSIDE){
                        ProductInfo productVo1 = productService.selectByDirection(dire);
                        ProductVo productVo2 = BeanUtils.copy(productVo1,ProductVo.class);
                        productVo2.setItemCode(dire.substring(0,10));
                        productVo2.setDirectionCode(dire);
                        productVos.add(productVo2);
                        detailInfo.setNum(1);
                        boxNum +=1;
                    }
                    detailInfos.add(detailInfo);
                }
                orderInfo.setNum(boxNum);
                entryService.save(orderInfo);
                entryDetailService.saveBatch(detailInfos);
                productLocusService.insertBatch(locusInfos);
                boolean flag = stockService.putInStorage(userInfo,productVos,date,type);
            }
        }
        return success();
    }
    /**
     *
     * @param jsonArray [{"id":"用户ID","type":"快速入库填1","time":"时间","cert":"运输证编号","rfidfirst":"第一箱的流向码","rfidlast":"最后一箱的流向码"}]
     * @return msg
     */
    @ApiOperation(value = "快速入库",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "JSONArray",value = "json数组,json对象为:{\"id\":\"用户ID\",\"type\":\"快速入库填1\",\"time\":\"时间\",\"cert\":\"运输证编号\",\"rfidfirst\":\"第一箱的流向码\",\"rfidlast\":\"最后一箱的流向码\"}"),
    })
    @PostMapping("/entryQuick")
    @JsonParams
    public Msg entryQuick(@RequestBody JSONArray jsonArray){
        Msg msg = new Msg(true);
        if (jsonArray.size() > 0)
        {
            for (int i = 0; i < jsonArray.size(); i++) {
                // 遍历 jsonArray 数组,把每一个对象转成 json 对象
                JSONObject jsonObject = jsonArray.getJSONObject(i);
                String userId = jsonObject.getString("id");
                String directionCodeFirst = jsonObject.getString("rfidfirst");
                String directionCodeLast = jsonObject.getString("rfidlast");
                String datetime = jsonObject.getString("time");
                String transport = jsonObject.getString("cert");
                //type 1.常规入库; 2.退货入库
                String type = "1";
                Date date;
                DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                try {
                    date = dateFormat.parse(datetime);
                } catch (ParseException e) {
                    msg.setCode(ERROR_10003.getCode());
                    msg.setMessage(ERROR_10003.getMsg()+":入库日期类型错误!");
                    return msg;
                }
                if (!(FireworkDeal.is22Characters(directionCodeFirst) && FireworkDeal.is22Characters(directionCodeLast))){
                    msg.setCode(ERROR_10004.getCode());
                    msg.setMessage(ERROR_10004.getMsg()+":流向码首尾不符合规则,无法快速入库!");
                    return msg;
                }
                boolean isUser = userService.checkUserById(userId);
                if (!isUser){
                    msg.setCode(ERROR_50001.getCode());
                    msg.setMessage(ERROR_50001.getMsg()+":未找到相关用户信息,不能入库!");
                    return msg;
                }
                UserInfo userInfo = userService.getById(userId);
                //判断是否存在同时间同操作人入库记录
                boolean exist = entryService.isEntryExist(datetime,userInfo);
                if (exist){
                    continue;
                }
                String auth = getAuth();
                auth = StringUtils.isBlank(auth) ? "NOAUTH" : auth;
                EntryOrderInfo orderInfo = entryService.generateEntryOrderInfo(type,userInfo,date,transport, auth);
                List<EntryDetailInfo>detailInfos = new ArrayList<>();
                List<ProductLocusInfo>locusInfos = new ArrayList<>();
                List<ProductVo> productVos = new ArrayList<>();
                DirectionDetail detailFirst = FireworkDeal.dealDirectionCode(directionCodeFirst);
                DirectionDetail detailLast = FireworkDeal.dealDirectionCode(directionCodeLast);
                if (!detailFirst.getItemCode().equals(detailLast.getItemCode())){
                    msg.setCode(ERROR_10004.getCode());
                    msg.setMessage(ERROR_10004.getMsg()+":首尾商品编码不一致,无法快速入库");
                    return msg;
                }
                if (Integer.parseInt(detailFirst.getSerialNo()) > Integer.parseInt(detailLast.getSerialNo())){
                    msg.setCode(ERROR_10004.getCode());
                    msg.setMessage(ERROR_10004.getMsg()+":首位商品序号大于末位,无法快速入库");
                    return msg;
                }
                ProductVo productVo = productService.selectVoByDirection(directionCodeFirst);
                Integer firstNo = Integer.parseInt(detailFirst.getSerialNo());
                Integer lastNo = Integer.parseInt(detailLast.getSerialNo());
                int perBoxNum = Integer.parseInt(detailFirst.getBoxNo());
                int boxNum = ((lastNo-firstNo)/perBoxNum)+1;
                int totalNum = 0;
                for (int j=1;j<= boxNum;j++){
                    String dire = detailFirst.getItemCode()+detailFirst.getDateCode()+ String.format("%05d", firstNo)+String.format("%03d", perBoxNum);
                    EntryDetailInfo detailInfo = new EntryDetailInfo(orderInfo.getCode(),dire,productVo.getItemCode(),
                            productVo.getName(),productVo.getManufacturer(),new Date(),userInfo.getCompanynumber());
                    detailInfo.setNum(perBoxNum);
                    detailInfos.add(detailInfo);
                    ProductLocusInfo productLocusInfo = new ProductLocusInfo(dire,new Date(),date, userInfo.getCompany(),
                            null,ProductLocusInfo.ENTRY_STATUS,productVo.getBoxNumber().toString());
                    locusInfos.add(productLocusInfo);
                    firstNo+=perBoxNum;
                    totalNum += perBoxNum;
                }
                FireworkDeal.getProductVos(directionCodeFirst,detailFirst,detailLast,productVos,productVo);
                orderInfo.setNum(totalNum);
                entryService.save(orderInfo);
                entryDetailService.saveBatch(detailInfos);
                productLocusService.insertBatch(locusInfos);
                boolean flag = stockService.putInStorage(userInfo,productVos,date, type);
            }
        }
        return msg;
    }
    @GetMapping("/info")
    public Msg getList(@RequestParam(value = "name", required = false) String name,
                       @RequestParam(value = "directionCode", required = false) String directionCode,
                       @RequestParam(value = "manufacturer", required = false) String manufacturer,
                       @RequestParam(value = "type", required = false) String type,
                       @RequestParam(value = "secondaryType", required = false) String secondaryType,
                       @RequestParam(value = "beginDate") String beginDate,
                       @RequestParam(value = "endDate") String endDate,
                       @RequestParam(value = "owner")String owner,
                       @RequestParam(defaultValue = "0") Integer pageIndex,
                       @RequestParam(defaultValue = "10") Integer pageSize,
                       String sort, String order){
        Msg msg = new Msg(true);
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        Map<String, Object> condition = new HashMap<>(8);
        if (StringUtils.isNotBlank(name)) {
            condition.put("name", name);
        }
        if (StringUtils.isNotBlank(directionCode)) {
            condition.put("directionCode", directionCode);
        }
        if (StringUtils.isNotBlank(manufacturer)) {
            condition.put("manufacturer", manufacturer);
        }
        if (StringUtils.isNotBlank(type)) {
            condition.put("type", type);
        }
        if (StringUtils.isNotBlank(secondaryType)) {
            condition.put("secondaryType", secondaryType);
        }
//        if (getUser().getCompanyid() != null){
//            owner = getUser().getCompanyid().toString();
//        }
        condition.put("owner",owner);
        condition.put("beginDate",beginDate);
        condition.put("endDate",endDate);
        pageInfo.setCondition(condition);
        stockService.selectDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @GetMapping("/info-app")
    public Msg getList2() {
        PageInfo pageInfo = new PageInfo();
        Map<String, Object> condition = new HashMap<>();
        UserInfo user = getUser();
        UserInfo userInfo = userService.getById(user);
        condition.put("owner",userInfo.getCompanyid());
        pageInfo.setCondition(condition);
        PageInfoExtension<StockTotal> extension = stockService.selectDataGridExtensions(pageInfo);
        return success(extension);
    }
    @GetMapping("/enterpriseStock")
    public Msg getEnterpriseStockList(@RequestParam(value = "name", required = false) String name,
                                      @RequestParam(value = "province", required = false) String province,
                                      @RequestParam(value = "city", required = false) String city,
                                      @RequestParam(value = "area", required = false) String area,
                                      @RequestParam(value = "town", required = false) String town,
                                      @RequestParam(value = "community", required = false) String community,
                                      @RequestParam(value = "enterpriseType", required = false) String type,
                                      @RequestParam(defaultValue = "0") Integer pageIndex,
                                      @RequestParam(defaultValue = "10") Integer pageSize,
                                      String sort, String order){
        Msg msg = new Msg(true);
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        Map<String, Object> condition = new HashMap<>(16);
        if (StringUtils.isNotBlank(name)) {
            condition.put("name", name);
        }
        if (StringUtils.isNotBlank(type)) {
            condition.put("type", type);
        }
        if (StringUtils.isNotBlank(province)) {
            condition.put("province", province);
        }
        if (StringUtils.isNotBlank(city)) {
            condition.put("city", city);
        }
        if (StringUtils.isNotBlank(area)) {
            condition.put("district", area);
        }
        if (StringUtils.isNotBlank(town)) {
            condition.put("town", town);
        }
        if (StringUtils.isNotBlank(community)) {
            condition.put("community", community);
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        assert userInfo != null;
        if (userInfo.getCompanynumber() != null){
            condition.put("operator",userInfo.getCompanynumber());
            List<Enterprise> subs = enterpriseService.selectSubEnterprise(userInfo.getCompanyid());
            List<String> subList = subs.stream().map(Enterprise::getEnterprisenumber).collect(Collectors.toList());
            if (subList.size() > 0)
                condition.put("subList", subList);
        }
        //根据用户省市区权限添加/修改查询条件
        if (userInfo.getCompanyid() == null && userInfo.getType() == 3){
            boolean provinceNull = StringUtils.isBlank(userInfo.getProvince());
            boolean cityNull = !provinceNull && StringUtils.isBlank(userInfo.getCity()) ;
            boolean districtNull = !provinceNull && StringUtils.isNotBlank(userInfo.getCity())
                    && StringUtils.isBlank(userInfo.getArea());
            boolean streetNull = !provinceNull && StringUtils.isNotBlank(userInfo.getCity())
                    && StringUtils.isNotBlank(userInfo.getArea()) && StringUtils.isBlank(userInfo.getTown());
            boolean committeeNull = !provinceNull && StringUtils.isNotBlank(userInfo.getCity())
                    && StringUtils.isNotBlank(userInfo.getArea()) && StringUtils.isNotBlank(userInfo.getTown())
                    && StringUtils.isBlank(userInfo.getCommunity());
            if (cityNull){
                condition.put("province", userInfo.getProvince());
            }else if (districtNull){
                condition.put("province", userInfo.getProvince());
                condition.put("city", userInfo.getCity());
            }else if (streetNull){
                condition.put("province", userInfo.getProvince());
                condition.put("city", userInfo.getCity());
                condition.put("district", userInfo.getArea());
            }else if (committeeNull){
                condition.put("province", userInfo.getProvince());
                condition.put("city", userInfo.getCity());
                condition.put("district", userInfo.getArea());
                condition.put("street", userInfo.getTown());
            }else {
                condition.put("province", userInfo.getProvince());
                condition.put("city", userInfo.getCity());
                condition.put("district", userInfo.getArea());
                condition.put("street", userInfo.getTown());
                condition.put("committee", userInfo.getCommunity());
            }
        }
        pageInfo.setCondition(condition);
        condition.put("index",(pageIndex-1)*pageSize);
        condition.put("size",pageSize);
//        stockService.selectEnterpriseStockDataGrid(pageInfo);
//        Integer count = enterpriseService.getEnterpriseByLimitCount(condition);
//        limit #{condition.index},#{condition.size}
        List<StockVo>stockVos = stockService.selectEnterpriseStocks(condition);
        int index = (pageIndex-1)*pageSize;
        int count = stockVos.size();
        int size = index+pageSize;
        if (size > count){
            size = count;
        }
        //总计
        BigDecimal stockNum = new BigDecimal("0");
        BigDecimal firecracker = new BigDecimal("0");
        BigDecimal spray = new BigDecimal("0");
        BigDecimal rotation = new BigDecimal("0");
        BigDecimal bead = new BigDecimal("0");
        BigDecimal toy = new BigDecimal("0");
        BigDecimal combined = new BigDecimal("0");
        if (stockVos.size() > 0) {
            for (StockVo stockVo : stockVos) {
                stockNum = stockNum.add(stockVo.getStockNum());
                firecracker = firecracker.add(stockVo.getFirecracker());
                spray = spray.add(stockVo.getSpray());
                rotation = rotation.add(stockVo.getRotation());
                bead = bead.add(stockVo.getBead());
                toy = toy.add(stockVo.getToy());
                combined = combined.add(stockVo.getCombined());
            }
        }
        Map<String, Object> totalRow = new HashMap<>();
        totalRow.put("name", "总计");
        totalRow.put("stockNum", stockNum);
        totalRow.put("firecracker", firecracker);
        totalRow.put("spray", spray);
        totalRow.put("rotation", rotation);
        totalRow.put("bead", bead);
        totalRow.put("toy", toy);
        totalRow.put("combined", combined);
        pageInfo.setResult(stockVos.subList(index,size));
        pageInfo.setTotalCount((long) count);
        PageInfoExtension<Map> extension = new PageInfoExtension<>(pageInfo);
        extension.setExtension(totalRow);
        msg.setResult(extension);
        return msg;
    }
    @GetMapping("/enterpriseStaticStock")
    public Msg enterpriseStaticStock(@RequestParam(value = "name", required = false) String name,
                                      @RequestParam(value = "province", required = false) String province,
                                      @RequestParam(value = "city", required = false) String city,
                                      @RequestParam(value = "area", required = false) String area,
                                      @RequestParam(value = "town", required = false) String town,
                                      @RequestParam(value = "community", required = false) String community,
                                      @RequestParam(value = "enterpriseType", required = false) String type,
                                      @RequestParam(defaultValue = "0") Integer pageIndex,
                                      @RequestParam(defaultValue = "10") Integer pageSize,
                                      String sort, String order){
        Msg msg = new Msg(true);
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        Map<String, Object> condition = new HashMap<>(16);
        if (StringUtils.isNotBlank(name)) {
            condition.put("name", name);
        }
        if (StringUtils.isNotBlank(type)) {
            condition.put("type", type);
        }
        if (StringUtils.isNotBlank(province)) {
            condition.put("province", province);
        }
        if (StringUtils.isNotBlank(city)) {
            condition.put("city", city);
        }
        if (StringUtils.isNotBlank(area)) {
            condition.put("district", area);
        }
        if (StringUtils.isNotBlank(town)) {
            condition.put("town", town);
        }
        if (StringUtils.isNotBlank(community)) {
            condition.put("community", community);
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        assert userInfo != null;
        if (userInfo.getCompanynumber() != null){
            condition.put("operator",userInfo.getCompanynumber());
            List<Enterprise> subs = enterpriseService.selectSubEnterprise(userInfo.getCompanyid());
            List<String> subList = subs.stream().map(Enterprise::getEnterprisenumber).collect(Collectors.toList());
            if (subList.size() > 0)
                condition.put("subList", subList);
        }
        //根据用户省市区权限添加/修改查询条件
        if (userInfo.getCompanyid() == null && userInfo.getType() == 3){
            boolean provinceNull = StringUtils.isBlank(userInfo.getProvince());
            boolean cityNull = !provinceNull && StringUtils.isBlank(userInfo.getCity()) ;
            boolean districtNull = !provinceNull && StringUtils.isNotBlank(userInfo.getCity())
                    && StringUtils.isBlank(userInfo.getArea());
            boolean streetNull = !provinceNull && StringUtils.isNotBlank(userInfo.getCity())
                    && StringUtils.isNotBlank(userInfo.getArea()) && StringUtils.isBlank(userInfo.getTown());
            boolean committeeNull = !provinceNull && StringUtils.isNotBlank(userInfo.getCity())
                    && StringUtils.isNotBlank(userInfo.getArea()) && StringUtils.isNotBlank(userInfo.getTown())
                    && StringUtils.isBlank(userInfo.getCommunity());
            if (cityNull){
                condition.put("province", userInfo.getProvince());
            }else if (districtNull){
                condition.put("province", userInfo.getProvince());
                condition.put("city", userInfo.getCity());
            }else if (streetNull){
                condition.put("province", userInfo.getProvince());
                condition.put("city", userInfo.getCity());
                condition.put("district", userInfo.getArea());
            }else if (committeeNull){
                condition.put("province", userInfo.getProvince());
                condition.put("city", userInfo.getCity());
                condition.put("district", userInfo.getArea());
                condition.put("street", userInfo.getTown());
            }else {
                condition.put("province", userInfo.getProvince());
                condition.put("city", userInfo.getCity());
                condition.put("district", userInfo.getArea());
                condition.put("street", userInfo.getTown());
                condition.put("committee", userInfo.getCommunity());
            }
        }
        pageInfo.setCondition(condition);
        condition.put("index",(pageIndex-1)*pageSize);
        condition.put("size",pageSize);
        List<StaticStock>stocks = staticStockService.selectStaticStocks(condition);
        int index = (pageIndex-1)*pageSize;
        int count = stocks.size();
        int size = index+pageSize;
        if (size > count){
            size = count;
        }
        //总计
        BigDecimal stockNum = new BigDecimal("0");
        BigDecimal firecracker = new BigDecimal("0");
        BigDecimal spray = new BigDecimal("0");
        BigDecimal rotation = new BigDecimal("0");
        BigDecimal bead = new BigDecimal("0");
        BigDecimal toy = new BigDecimal("0");
        BigDecimal combined = new BigDecimal("0");
        if (stocks.size() > 0) {
            for (StaticStock stock : stocks) {
                stockNum = stockNum.add(stock.getStockNum());
                firecracker = firecracker.add(stock.getFirecracker());
                spray = spray.add(stock.getSpray());
                rotation = rotation.add(stock.getRotation());
                bead = bead.add(stock.getBead());
                toy = toy.add(stock.getToy());
                combined = combined.add(stock.getCombined());
            }
        }
        Map<String, Object> totalRow = new HashMap<>();
        totalRow.put("name", "总计");
        totalRow.put("stockNum", stockNum);
        totalRow.put("firecracker", firecracker);
        totalRow.put("spray", spray);
        totalRow.put("rotation", rotation);
        totalRow.put("bead", bead);
        totalRow.put("toy", toy);
        totalRow.put("combined", combined);
        pageInfo.setResult(stocks.subList(index,size));
        pageInfo.setTotalCount((long) count);
        PageInfoExtension<Map> extension = new PageInfoExtension<>(pageInfo);
        extension.setExtension(totalRow);
        msg.setResult(extension);
        return msg;
    }
    @GetMapping("/detail")
    public Msg getStockDetailByItemCode(
                                      @RequestParam(value = "itemCode") String itemCode,
                                      @RequestParam(value = "enterpriseNumber") String enterpriseNumber,
                                      @RequestParam(value = "directionCode",required = false) String directionCode,
                                      @RequestParam(defaultValue = "0") Integer pageIndex,
                                      @RequestParam(defaultValue = "10") Integer pageSize,
                                      String sort, String order){
        Msg msg = new Msg(true);
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        Map<String, Object> condition = new HashMap<>(16);
        condition.put("itemCode", itemCode);
        Enterprise enterprise = enterpriseService.selectEnterpriseByNumber(enterpriseNumber);
        if (enterprise == null){
            return new Msg(ERROR_50001);
        }
        condition.put("owner", enterprise.getId());
        if (StringUtils.isNotBlank(directionCode)) {
            condition.put("directionCode", directionCode);
        }
        pageInfo.setCondition(condition);
        stockService.selectStockDetailByItemCode(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @GetMapping("/enterpriseSale")
    public Msg getEnterpriseSaleList(@RequestParam(value = "name", required = false) String name,
                                      @RequestParam(value = "beginDate") String beginDate,
                                      @RequestParam(value = "endDate") String endDate,
                                      @RequestParam(value = "province", required = false) String province,
                                      @RequestParam(value = "city", required = false) String city,
                                      @RequestParam(value = "area", required = false) String area,
                                      @RequestParam(value = "town", required = false) String town,
                                      @RequestParam(value = "community", required = false) String community,
                                      @RequestParam(value = "enterpriseType", required = false) String type,
                                      @RequestParam(defaultValue = "0") Integer pageIndex,
                                      @RequestParam(defaultValue = "10") Integer pageSize,
                                      String sort, String order){
        Msg msg = new Msg(true);
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        Map<String, Object> condition = new HashMap<>(16);
        if (StringUtils.isNotBlank(name)) {
            condition.put("name", name);
        }
        if (StringUtils.isNotBlank(beginDate)) {
            condition.put("beginDate", beginDate);
        }
        if (StringUtils.isNotBlank(endDate)) {
            condition.put("endDate", endDate);
        }
        if (StringUtils.isNotBlank(type)) {
            condition.put("type", type);
        }
        if (StringUtils.isNotBlank(province)) {
            condition.put("province", province);
        }
        if (StringUtils.isNotBlank(city)) {
            condition.put("city", city);
        }
        if (StringUtils.isNotBlank(area)) {
            condition.put("district", area);
        }
        if (StringUtils.isNotBlank(town)) {
            condition.put("town", town);
        }
        if (StringUtils.isNotBlank(community)) {
            condition.put("community", community);
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        assert userInfo != null;
        if (userInfo.getCompanynumber() != null){
            condition.put("operator",userInfo.getCompanynumber());
            List<Enterprise> subs = enterpriseService.selectSubEnterprise(userInfo.getCompanyid());
            List<String> subList = subs.stream().map(Enterprise::getEnterprisenumber).collect(Collectors.toList());
            if (subList.size() > 0)
                condition.put("subList", subList);
        }
        //根据用户省市区权限添加/修改查询条件
        if (userInfo.getCompanyid() == null && userInfo.getType() == 3){
            boolean provinceNull = StringUtils.isBlank(userInfo.getProvince());
            boolean cityNull = !provinceNull && StringUtils.isBlank(userInfo.getCity()) ;
            boolean districtNull = !provinceNull && StringUtils.isNotBlank(userInfo.getCity())
                    && StringUtils.isBlank(userInfo.getArea());
            boolean streetNull = !provinceNull && StringUtils.isNotBlank(userInfo.getCity())
                    && StringUtils.isNotBlank(userInfo.getArea()) && StringUtils.isBlank(userInfo.getTown());
            boolean committeeNull = !provinceNull && StringUtils.isNotBlank(userInfo.getCity())
                    && StringUtils.isNotBlank(userInfo.getArea()) && StringUtils.isNotBlank(userInfo.getTown())
                    && StringUtils.isBlank(userInfo.getCommunity());
            if (cityNull){
                condition.put("province", userInfo.getProvince());
            }else if (districtNull){
                condition.put("province", userInfo.getProvince());
                condition.put("city", userInfo.getCity());
            }else if (streetNull){
                condition.put("province", userInfo.getProvince());
                condition.put("city", userInfo.getCity());
                condition.put("district", userInfo.getArea());
            }else if (committeeNull){
                condition.put("province", userInfo.getProvince());
                condition.put("city", userInfo.getCity());
                condition.put("district", userInfo.getArea());
                condition.put("street", userInfo.getTown());
            }else {
                condition.put("province", userInfo.getProvince());
                condition.put("city", userInfo.getCity());
                condition.put("district", userInfo.getArea());
                condition.put("street", userInfo.getTown());
                condition.put("committee", userInfo.getCommunity());
            }
        }
        pageInfo.setCondition(condition);
        PageInfoExtension<Map> extension = stockService.selectEnterpriseSaleDataGrid(pageInfo);
        msg.setResult(extension);
        return msg;
    }
    @GetMapping("/saleInfo")
    public Msg getSaleInfo(@RequestParam(value = "name", required = false) String name,
                           @RequestParam(value = "directionCode", required = false) String directionCode,
                           @RequestParam(value = "manufacturer", required = false) String manufacturer,
                           @RequestParam(value = "type", required = false) String type,
                           @RequestParam(value = "enterpriseNumber", required = false) String companyNumber,
                           @RequestParam(value = "beginDate") String beginDate,
                           @RequestParam(value = "endDate") String endDate,
                           @RequestParam(defaultValue = "0") Integer pageIndex,
                           @RequestParam(defaultValue = "10") Integer pageSize,
                           String sort, String order){
        Msg msg = new Msg(true);
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        Map<String, Object> condition = new HashMap<>(8);
        if (StringUtils.isNotBlank(name)) {
            condition.put("name", name);
        }
        if (StringUtils.isNotBlank(directionCode)) {
            condition.put("directionCode", directionCode);
        }
        if (StringUtils.isNotBlank(manufacturer)) {
            condition.put("manufacturer", manufacturer);
        }
        if (StringUtils.isNotBlank(type)) {
            condition.put("type", type);
        }
        if (StringUtils.isNotBlank(companyNumber)) {
            condition.put("companyNumber", companyNumber);
        }
        condition.put("beginDate",beginDate);
        condition.put("endDate",endDate);
        pageInfo.setCondition(condition);
        stockService.selectSaleDetailDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @PostMapping("/refreshStock")
    public Msg refreshStock(){
        Msg msg = new Msg(true);
        stockService.saveOrUpdateCurrentStock(getUser().getUsername());
        return msg;
    }
    @PostMapping("/clearStock")
    public Msg clearStock(@RequestBody JSONObject object){
        String owners = object.getString("owners");
        UserInfo userInfo = userService.getById(getUser().getId());
        if (userInfo.getType() != 1){
            return new Msg(ERROR_70001);
        }
        if (StringUtils.isBlank(owners)){
            return new Msg(ERROR_10001);
        }
        List<String> list = StringUtils.toList(owners);
        for (String owner : list){
            Enterprise enterprise = enterpriseService.getById(owner);
            if (enterprise == null){
                return new Msg(ERROR_50001);
            }
            boolean flag = stockService.clearStock(enterprise);
        }
        return success();
    }
    @PostMapping("/clearStockByItem")
    public Msg clearStockByItem(@RequestBody JSONObject object){
        String owner = object.getString("owner");
        String directionCodes = object.getString("directionCodes");
        UserInfo userInfo = userService.getById(getUser().getId());
        if (userInfo.getType() != 1){
            return new Msg(ERROR_70001);
        }
        if (StringUtils.isBlank(owner) || StringUtils.isBlank(directionCodes)){
            return new Msg(ERROR_10001);
        }
        List<String> list = StringUtils.toList(directionCodes);
        Enterprise enterprise = enterpriseService.getById(owner);
        if (enterprise == null){
            return new Msg(ERROR_50001);
        }
        boolean flag = stockService.clearStockByItems(enterprise,list);
        return success();
    }
}
src/main/java/com/gk/firework/Controller/TransportController.java
对比新文件
@@ -0,0 +1,559 @@
package com.gk.firework.Controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.*;
import com.gk.firework.Domain.Exception.BusinessException;
import com.gk.firework.Domain.Utils.FilterObject;
import com.gk.firework.Domain.Utils.Msg;
import com.gk.firework.Domain.Utils.Properties;
import com.gk.firework.Domain.Vo.Product2JsonVo;
import com.gk.firework.Domain.Vo.TransportArrivalVo;
import com.gk.firework.Domain.Vo.TransportCertVo;
import com.gk.firework.Service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.List;
import java.util.Map;
@Api(tags = "运输证管理")
@RequestMapping("/transport")
@RestController
public class TransportController extends BaseController {
    @Autowired
    private TransportCarrierService transportCarrierService;
    @Autowired
    private TransportPersonService transportPersonService;
    @Autowired
    private TransportCertificateService transportCertificateService;
    @Autowired
    private TransportCertService transportCertService;
    @Autowired
    private TransportCertificateFileService transportCertificateFileService;
    @Autowired
    private TransportCertificateArrivalRecordService transportCertificateArrivalRecordService;
    @Autowired
    private ProductService productService;
    /**
    * @Description: 承运人管理
    * @date 2021/3/30 11:04
    */
    @PostMapping("/carrierList")
    @ApiOperation(value = "承运人查询", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "页码",required = true),
            @ApiImplicitParam(name = "pageSize",value = "页面大小",required = true),
            @ApiImplicitParam(name = "filter",value = "过滤条件",required = true),
    })
    Object carrierList(@RequestBody FilterObject carrierFilter) {
        Integer pageIndex = carrierFilter.getPageIndex();
        Integer pageSize = carrierFilter.getPageSize();
        IPage page = transportCarrierService.selectPage(new Page<>(pageIndex,pageSize),carrierFilter.getFilter());
        return success(page);
    }
    @PostMapping("/addcarrier")
    @ApiOperation(value = "新增承运人", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "承运人id(不传)"),
            @ApiImplicitParam(name = "companyname",value = "单位名称"),
            @ApiImplicitParam(name = "number",value = "危险货物道路运输资质证号"),
            @ApiImplicitParam(name = "phone",value = "联系电话"),
            @ApiImplicitParam(name = "validtime",value = "有效时间"),
    })
    Object addCarrier(@RequestBody TransportCarrier transportCarrier) {
        transportCarrierService.checkCarrier(transportCarrier);
        transportCarrierService.addCarrier(transportCarrier,getUser());
        return success();
    }
    @PostMapping("/putcarrier")
    @ApiOperation(value = "修改承运人", httpMethod = "PUT")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "id",value = "承运人id(必传)",required = true),
        @ApiImplicitParam(name = "companyname",value = "单位名称"),
        @ApiImplicitParam(name = "number",value = "危险货物道路运输资质证号"),
        @ApiImplicitParam(name = "phone",value = "联系电话"),
        @ApiImplicitParam(name = "validtime",value = "有效时间"),
    })
    Object modCarrier(@RequestBody TransportCarrier transportCarrier) {
        transportCarrierService.checkCarrier(transportCarrier);
        transportCarrierService.modCarrier(transportCarrier,getUser());
        return success();
    }
    @PostMapping("/delcarrier")
    @ApiOperation(value = "删除承运人", httpMethod = "DELETE")
    @ApiImplicitParam(name = "id",value = "承运人id(必传)")
    Object delCarrier(@RequestParam Long id) {
        transportCarrierService.delCarrier(id,getUser());
        return success();
    }
    /**
     * @Description: 驾驶员|押运员管理
     * @date 2021/3/30 11:04
     */
    @PostMapping("/personList")
    @ApiOperation(value = "驾驶员|押运员查询", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "页码",required = true),
            @ApiImplicitParam(name = "pageSize",value = "页面大小",required = true),
            @ApiImplicitParam(name = "filter",value = "过滤条件",required = true),
    })
    Object personList(@RequestBody FilterObject carrierFilter) {
        Integer pageIndex = carrierFilter.getPageIndex();
        Integer pageSize = carrierFilter.getPageSize();
        IPage page = transportPersonService.selectPage(new Page<>(pageIndex,pageSize),carrierFilter.getFilter());
        return success(page);
    }
    @PostMapping("/addperson")
    @ApiOperation(value = "新增驾驶员|押运员", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "承运人id(不传)"),
            @ApiImplicitParam(name = "type", value = "类别", required = true),
            @ApiImplicitParam(name = "name", value = "姓名", required = true),
            @ApiImplicitParam(name = "phone", value = "电话", required = true),
            @ApiImplicitParam(name = "identify", value = "身份证号", required = true),
            @ApiImplicitParam(name = "certificate", value = "资格证", required = true),
            @ApiImplicitParam(name = "validtime", value = "有效期", required = true),
            @ApiImplicitParam(name = "belongid", value = "隶属承运人id", required = true),
            @ApiImplicitParam(name = "belongname", value = "隶属承运人name", required = true),
    })
    Object addPerson(@RequestBody TransportPerson transportPerson) {
        transportPersonService.checkPerson(transportPerson);
        transportPersonService.addPerson(transportPerson, getUser());
        return success();
    }
    @PostMapping("/putperson")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "驾驶员|押运员id(必传)", required = true),
            @ApiImplicitParam(name = "type", value = "类别", required = true),
            @ApiImplicitParam(name = "name", value = "姓名", required = true),
            @ApiImplicitParam(name = "identify", value = "身份证号", required = true),
            @ApiImplicitParam(name = "certificate", value = "资格证", required = true),
            @ApiImplicitParam(name = "validtime", value = "有效期", required = true),
            @ApiImplicitParam(name = "belongid", value = "隶属承运人id", required = true),
            @ApiImplicitParam(name = "belongname", value = "隶属承运人name", required = true),
            @ApiImplicitParam(name = "phone", value = "电话", required = true),
    })
    Object modPerson(@RequestBody TransportPerson transportPerson) {
        transportPersonService.modPerson(transportPerson, getUser());
        return success();
    }
    @PostMapping("/delperson")
    @ApiImplicitParam(name = "id", value = "驾驶员|押运员id(必传)", required = true)
    Object delPerson(@RequestParam Long id) {
        transportPersonService.delPerson(id, getUser());
        return success();
    }
    /**
    * @Description: 运输证
    * @date 2021/3/31 15:39
    */
    @PostMapping("/certificateList")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "页码",required = true),
            @ApiImplicitParam(name = "pageSize",value = "页面大小",required = true),
            @ApiImplicitParam(name = "filter.code", value = "运输证编码", required = true),
            @ApiImplicitParam(name = "filter.province", value = "省", required = true),
            @ApiImplicitParam(name = "filter.city", value = "市", required = true),
            @ApiImplicitParam(name = "filter.district", value = "区", required = true),
            @ApiImplicitParam(name = "filter.street", value = "街道", required = true),
            @ApiImplicitParam(name = "filter.committee", value = "委员会", required = true),
    })
    Object certificateList(@RequestBody FilterObject certificateFilter) {
        Integer pageIndex = certificateFilter.getPageIndex();
        Integer pageSize = certificateFilter.getPageSize();
        IPage page =  transportCertificateService.selectPages(new Page<>(pageIndex,pageSize), certificateFilter.getFilter(),getUser());
        return success(page);
    }
    /**
     * @Description: 新增运输证
     * @date 2021/3/31 17:58
     */
    @PostMapping("/upload")
    @ApiImplicitParam(name = "file", value = "上传文件", required = true)
    Object upload(MultipartFile[] file) {
        try {
            List<String> urls = transportCertificateFileService.uploadFiles(file);
            return success(urls);
        } catch (Exception e) {
            e.printStackTrace();
            Msg msg = new Msg();
            msg.setCode("400");
            msg.setMessage("上传失败");
            return msg;
        }
    }
    @PostMapping("/addcertificate")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "主键id(不传)",required = true),
            @ApiImplicitParam(name = "code",value = "运输编号(不传)",required = true),
            @ApiImplicitParam(name = "type",value = "运输证类型",required = true),
            @ApiImplicitParam(name = "contractcode",value = "电子合同编号",required = true),
            @ApiImplicitParam(name = "salecompanyid", value = "销售单位id", required = true),
            @ApiImplicitParam(name = "salecompanyname", value = "销售单位name", required = true),
            @ApiImplicitParam(name = "productionlicense", value = "生产经营许可证", required = true),
            @ApiImplicitParam(name = "contractnumber", value = "安全买卖合同编号", required = true),
            @ApiImplicitParam(name = "shippercompanyname", value = "托运人:单位名称 ", required = true),
            @ApiImplicitParam(name = "shipperaddress", value = "托运人:地址", required = true),
            @ApiImplicitParam(name = "shipperprincipalname", value = "运人:负责人姓名 ", required = true),
            @ApiImplicitParam(name = "shipperprincipalphone", value = "托运人:负责人电话", required = true),
            @ApiImplicitParam(name = "shippermanagername", value = "托运人:经办人姓名", required = true),
            @ApiImplicitParam(name = "shippermanageridentify", value = "托运人:经办人身份证号", required = true),
            @ApiImplicitParam(name = "shippermanagerphone", value = "托运人:经办人电话", required = true),
            @ApiImplicitParam(name = "receivercompanyname", value = "收货人:单位名称", required = true),
            @ApiImplicitParam(name = "receiveraddress", value = "收货人:地址", required = true),
            @ApiImplicitParam(name = "receiverprincipalname", value = "收货人:负责人姓名", required = true),
            @ApiImplicitParam(name = "receiverprincipalphone", value = "收货人:负责人电话", required = true),
            @ApiImplicitParam(name = "carrierid", value = "承运人id", required = true),
            @ApiImplicitParam(name = "carriercompanyname", value = "承运人单位名称", required = true),
            @ApiImplicitParam(name = "carrieraddress", value = "承运人:地址", required = true),
            @ApiImplicitParam(name = "carrierprincipalname", value = "承运人:负责人姓名", required = true),
            @ApiImplicitParam(name = "carrierprincipalphone", value = "承运人:负责人电话", required = true),
            @ApiImplicitParam(name = "carriernumber", value = "承运人:道路运输证号", required = true),
            @ApiImplicitParam(name = "carriercarnumber", value = "承运人:运输车辆牌号", required = true),
            @ApiImplicitParam(name = "carriervalidtime", value = "承运人:证件有效期", required = true),
            @ApiImplicitParam(name = "otherdeparture", value = "其他:起始地", required = true),
            @ApiImplicitParam(name = "otherdestination", value = "其他:到达地", required = true),
            @ApiImplicitParam(name = "othershipstarttime", value = "其他:运输起始时间", required = true),
            @ApiImplicitParam(name = "othershipendtime", value = "其他:运输截止时间", required = true),
            @ApiImplicitParam(name = "othermemo", value = "其他:备注", required = true),
            @ApiImplicitParam(name = "transportPerson", value = "押运人|驾驶员", required = true),
            @ApiImplicitParam(name = "transportProduct", value = "运输产品", required = true),
            @ApiImplicitParam(name = "transportApproach", value = "途径地", required = true),
            @ApiImplicitParam(name = "transportFile", value = "上传10文件", required = true),
    })
    Object addCertificateApply(@RequestBody TransportCertificate transportCertificate) {
        transportCertificateService.checkAddApply(transportCertificate);
        transportCertificateService.addCertificateApply(transportCertificate,getUser());
        return success();
    }
    @PostMapping("/putcertificate")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "主键id(不传)",required = true),
            @ApiImplicitParam(name = "type",value = "运输证类型",required = true),
            @ApiImplicitParam(name = "code",value = "运输编号(不传)",required = true),
            @ApiImplicitParam(name = "contractcode",value = "电子合同编号",required = true),
            @ApiImplicitParam(name = "salecompanyid", value = "销售单位id", required = true),
            @ApiImplicitParam(name = "salecompanyname", value = "销售单位name", required = true),
            @ApiImplicitParam(name = "productionlicense", value = "生产经营许可证", required = true),
            @ApiImplicitParam(name = "contractnumber", value = "安全买卖合同编号", required = true),
            @ApiImplicitParam(name = "shippercompanyname", value = "托运人:单位名称 ", required = true),
            @ApiImplicitParam(name = "shipperaddress", value = "托运人:地址", required = true),
            @ApiImplicitParam(name = "shipperprincipalname", value = "运人:负责人姓名 ", required = true),
            @ApiImplicitParam(name = "shipperprincipalphone", value = "托运人:负责人电话", required = true),
            @ApiImplicitParam(name = "shippermanagername", value = "托运人:经办人姓名", required = true),
            @ApiImplicitParam(name = "shippermanageridentify", value = "托运人:经办人身份证号", required = true),
            @ApiImplicitParam(name = "shippermanagerphone", value = "托运人:经办人电话", required = true),
            @ApiImplicitParam(name = "receivercompanyname", value = "收货人:单位名称", required = true),
            @ApiImplicitParam(name = "receiveraddress", value = "收货人:地址", required = true),
            @ApiImplicitParam(name = "receiverprincipalname", value = "收货人:负责人姓名", required = true),
            @ApiImplicitParam(name = "receiverprincipalphone", value = "收货人:负责人电话", required = true),
            @ApiImplicitParam(name = "carrierid", value = "承运人id", required = true),
            @ApiImplicitParam(name = "carriercompanyname", value = "承运人单位名称", required = true),
            @ApiImplicitParam(name = "carrieraddress", value = "承运人:地址", required = true),
            @ApiImplicitParam(name = "carrierprincipalname", value = "承运人:负责人姓名", required = true),
            @ApiImplicitParam(name = "carrierprincipalphone", value = "承运人:负责人电话", required = true),
            @ApiImplicitParam(name = "carriernumber", value = "承运人:道路运输证号", required = true),
            @ApiImplicitParam(name = "carriercarnumber", value = "承运人:运输车辆牌号", required = true),
            @ApiImplicitParam(name = "carriervalidtime", value = "承运人:证件有效期", required = true),
            @ApiImplicitParam(name = "otherdeparture", value = "其他:起始地", required = true),
            @ApiImplicitParam(name = "otherdestination", value = "其他:到达地", required = true),
            @ApiImplicitParam(name = "othershipstarttime", value = "其他:运输起始时间", required = true),
            @ApiImplicitParam(name = "othershipendtime", value = "其他:运输截止时间", required = true),
            @ApiImplicitParam(name = "othermemo", value = "其他:备注", required = true),
            @ApiImplicitParam(name = "transportPerson", value = "押运人|驾驶员", required = true),
            @ApiImplicitParam(name = "transportProduct", value = "运输产品", required = true),
            @ApiImplicitParam(name = "transportApproach", value = "途径地", required = true),
            @ApiImplicitParam(name = "transportFile", value = "上传10文件", required = true),
    })
    Object modCertificateApply(@RequestBody TransportCertificate transportCertificate) {
        transportCertificateService.checkAddApply(transportCertificate);
        transportCertificateService.modCertificateApply(transportCertificate,getUser());
        return success();
    }
    /**
    * @Description: 提交单子
    * @date 2021/5/11 16:08
    */
    @PostMapping("/submit")
    @ApiImplicitParam(name = "id", value = "单子", required = true)
    Object summitApply(@RequestParam Long id) {
        transportCertificateService.summitApply(id,getUser());
        return success();
    }
    /**
     * @Description: 监管部门审批单子
     * @date 2021/5/11 16:08
     */
    @PostMapping("/approve")
    @ApiImplicitParam(name = "id", value = "单子", required = true)
    Object approveApply(@RequestBody JSONObject approveInfo) {
        transportCertificateService.approveApply(approveInfo,getUser());
        return success();
    }
    /**
     * @Description: 监管部门拒绝单子
     * @date 2021/5/11 16:08
     */
    @PostMapping("/refuse")
    @ApiImplicitParam(name = "id", value = "单子", required = true)
    Object refuseApply(@RequestParam Long id) {
        transportCertificateService.refuseApply(id,getUser());
        return success();
    }
    /**
     * @Description: 导出运输许可证 三联
     * @date 2021/5/11 17:14
     */
    @GetMapping("/export/certificate")
    Object exportCertificate(HttpServletRequest request, HttpServletResponse response, @RequestParam Long id) throws IOException {
        String fileName = "烟花爆竹道路许可证.docx";
        String fileUrlOnServer = transportCertificateService.exportCertificate(id);
        return success(fileUrlOnServer);
//        response.setHeader("content-disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
//        response.setContentType("application/msword");
//        // 创建输出流
//        try (FileInputStream in = new FileInputStream(fileUrlOnServer); OutputStream out = response.getOutputStream()) {
//            // 缓存区
//            byte[] buffer = new byte[1024];
//            int len = 0;
//            // 循环将输入流中的内容读取到缓冲区中
//            while ((len = in.read(buffer)) > 0) {
//                out.write(buffer, 0, len);
//            }
//        }
    }
    /**
    * @Description: 导出运输许可证申请
    * @date 2021/5/13 14:00
    */
    @GetMapping("/export/certificateApply")
    Object exportCertificateApply( HttpServletResponse response, @RequestParam Long id) throws IOException {
        String fileName = "烟花爆竹道路许可证申请.docx";
        String fileUrlOnServer = transportCertificateService.exportCertificateApply(id);
        return success(fileUrlOnServer);
//        response.setHeader("content-disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
//        response.setContentType("application/msword");
//        // 创建输出流
//        try (FileInputStream in = new FileInputStream(fileUrlOnServer); OutputStream out = response.getOutputStream()) {
//            // 缓存区
//            byte[] buffer = new byte[1024];
//            int len = 0;
//            // 循环将输入流中的内容读取到缓冲区中
//            while ((len = in.read(buffer)) > 0) {
//                out.write(buffer, 0, len);
//            }
//        }
    }
    @PostMapping("/delcertificate")
    @ApiImplicitParam(name = "id", value = "运输证id", required = true)
    Object delCertificate(@RequestParam Long id) {
        transportCertificateService.delCertificate(id,getUser());
        return success();
    }
    /**
     * @Description: 运输证 改
     * @date 2021/3/31 15:39
     */
    @PostMapping("/certList")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "页码",required = true),
            @ApiImplicitParam(name = "pageSize",value = "页面大小",required = true),
            @ApiImplicitParam(name = "filter.code", value = "运输证编码", required = true),
            @ApiImplicitParam(name = "filter.province", value = "省", required = true),
            @ApiImplicitParam(name = "filter.city", value = "市", required = true),
            @ApiImplicitParam(name = "filter.district", value = "区", required = true),
            @ApiImplicitParam(name = "filter.street", value = "街道", required = true),
            @ApiImplicitParam(name = "filter.committee", value = "委员会", required = true),
    })
    Object transportCertList(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page =  transportCertService.selectPages(new Page<>(pageIndex,pageSize), filterObject.getFilter(),getUser());
        return success(page);
    }
    /**
     * @Description: 新增运输证
     * @date 2021/4/25 9:30
     */
    @PostMapping("/addcert")
    @ApiOperation("新增运输证")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "主键id(不传)",required = true),
            @ApiImplicitParam(name = "code",value = "运输编号(不传)",required = true),
            @ApiImplicitParam(name = "contractcode",value = "电子合同编号",required = true),
            @ApiImplicitParam(name = "receivercompanyname", value = "收货人:单位名称", required = true),
            @ApiImplicitParam(name = "receiveraddress", value = "收货人:地址", required = true),
            @ApiImplicitParam(name = "receiverprincipalname", value = "收货人:负责人姓名", required = true),
            @ApiImplicitParam(name = "receiverprincipalphone", value = "收货人:负责人电话", required = true),
            @ApiImplicitParam(name = "carnumber", value = "运输车辆牌号", required = true),
            @ApiImplicitParam(name = "transportPerson", value = "押运人|驾驶员", required = true),
            @ApiImplicitParam(name = "transportProduct", value = "运输产品", required = true),
            @ApiImplicitParam(name = "file", value = "上传文件", required = true),
    })
    Object addTransportCertificate(TransportCertVo transportCertVo) {
        Msg msg = new Msg();
        msg.setCode("200");
        try {
            transportCertService.addCert(transportCertVo, getUser());
        } catch (BusinessException e) {
            msg.setMessage(e.getMessage());
            msg.setCode("400");
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage("发生错误,请联系管理员");
        }
        return msg;
    }
    /**
     * @Description: 修改运输证
     * @date 2021/4/25 9:30
     */
    @PostMapping("/putcert")
    @ApiOperation("修改运输证")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "主键id(不传)",required = true),
            @ApiImplicitParam(name = "type",value = "运输证类型",required = true),
            @ApiImplicitParam(name = "code",value = "运输编号(不传)",required = true),
            @ApiImplicitParam(name = "contractcode",value = "电子合同编号",required = true),
            @ApiImplicitParam(name = "receivercompanyname", value = "收货人:单位名称", required = true),
            @ApiImplicitParam(name = "receiveraddress", value = "收货人:地址", required = true),
            @ApiImplicitParam(name = "receiverprincipalname", value = "收货人:负责人姓名", required = true),
            @ApiImplicitParam(name = "receiverprincipalphone", value = "收货人:负责人电话", required = true),
            @ApiImplicitParam(name = "carnumber", value = "运输车辆牌号", required = true),
            @ApiImplicitParam(name = "transportPerson", value = "押运人|驾驶员", required = true),
            @ApiImplicitParam(name = "transportProduct", value = "运输产品", required = true),
            @ApiImplicitParam(name = "file", value = "上传文件", required = true),
    })
    Object modCert( TransportCertVo transportCertVo) {
        Msg msg = new Msg();
        msg.setCode("200");
        try {
            transportCertService.modCert(transportCertVo,getUser());
        } catch (BusinessException e) {
            msg.setMessage(e.getMessage());
            msg.setCode("400");
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("400");
            msg.setMessage("发生错误,请联系管理员");
        }
        return msg;
    }
    @PostMapping("/delcert")
    @ApiOperation("删除运输证")
    Object delCert(@RequestParam Long id) {
        transportCertService.delCert(id,getUser());
        return success();
    }
    /**
    * @Description: 根据运输证编号获取运输证信息
    * @date 2021/5/14 18:41
    */
    @GetMapping("/getCertByCode")
    @ApiOperation("获取运输证信息")
    Object getCertByCode(@RequestParam String code) {
        TransportCertificate certificate = transportCertificateService.getByCode(code);
        return success(certificate);
    }
    /**
    * @Description: 根据单号修改产品到货数量
    * @date 2021/5/14 19:21
    */
    @PostMapping("/sendArrivalNum")
    @ApiOperation("获取运输证信息")
    Object sendArrivalNum(@RequestBody TransportArrivalVo transportArrivalVo) {
        transportCertificateService.modTransportProductArrivalNum(transportArrivalVo,getUser());
        return success();
    }
    /**
    * @Description: 查找到运输证到货数量
    * @date 2021/5/14 20:20
    */
    @GetMapping("/transportArrivalList")
    @ApiOperation("获取运输证信息")
    Object getTransportArrival(@RequestParam Integer pageIndex,@RequestParam Integer pageSize) {
        IPage page = transportCertificateArrivalRecordService.selectTransportArrivalPages(new Page<>(pageIndex,pageSize),getUser());
        return success(page);
    }
    /**
    * @Description: 获取运输证到货记录详情
    * @date 2021/5/14 20:38
    */
    @GetMapping("/getTransportArrivalDetail")
    @ApiOperation("获取运输证信息")
    Object getTransportArrivalDetail(@RequestParam String certificateCode) {
        List<TransportCertificateArrivalRecord>  list =  transportCertificateArrivalRecordService.getTransportArrivalDetail(certificateCode,getUser());
        return success(list);
    }
    /**
    * @Description: 上传的excel文件转换成json产品列表返回
    * @date 2021/5/25 10:19
    */
    @PostMapping("/product2json")
    public Msg product2json(MultipartFile file) {
        List<Product2JsonVo> product2JsonVos = productService.transform2JsonSimple(file, getUser());
        return success(product2JsonVos);
    }
}
src/main/java/com/gk/firework/Controller/UserController.java
对比新文件
@@ -0,0 +1,802 @@
package com.gk.firework.Controller;
import com.alibaba.fastjson.JSONObject;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.DTO.JiangWaiDeadlineReqDTO;
import com.gk.firework.Domain.DistrictInfo;
import com.gk.firework.Domain.Enterprise;
import com.gk.firework.Domain.Exception.BusinessException;
import com.gk.firework.Domain.UserInfo;
import com.gk.firework.Domain.UserRolesInfo;
import com.gk.firework.Domain.Utils.*;
import com.gk.firework.Service.*;
import io.swagger.annotations.*;
import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.*;
@Api(tags = "用户管理数据接口")
@RestController
public class UserController extends BaseController {
    @Autowired
    UserService userService;
    @Autowired
    RoleService roleService;
    @Autowired
    UserRolesService userRolesService;
    @Autowired
    RolePermissionsService rolePermissionsService;
    @Autowired
    ExcelExportService excelExportService;
    @Autowired
    DistrictService districtService;
    @Autowired
    UserRolesService userRolesInfoService;
    @Autowired
    EnterpriseService enterpriseService;
    @Autowired
    UserDeadlineService userDeadlineService;
    @Value("${filePath}")
    private String filePath; //配置文件配置的物理保存地址
    @GetMapping("/user")
    @ApiOperation(value = "获取用户数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "sort",value = "排序规则"),
            @ApiImplicitParam(name = "order",value = "排序字段"),
            @ApiImplicitParam(name = "username",value = "用户名"),
            @ApiImplicitParam(name = "company",value = "单位"),
            @ApiImplicitParam(name = "department",value = "部门"),
            @ApiImplicitParam(name = "job",value = "职务"),
            @ApiImplicitParam(name = "type",value = "用户类型"),
            @ApiImplicitParam(name = "province",value = "省份"),
            @ApiImplicitParam(name = "city",value = "城市"),
            @ApiImplicitParam(name = "area",value = "区县"),
            @ApiImplicitParam(name = "town",value = "乡镇"),
            @ApiImplicitParam(name = "community",value = "社区"),
    })
    public Msg getUserInfo(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize, String sort,String order,
                                    String username,String company, String department, String job,Byte type,
                           String province, String city, String area, String town, String community){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(username)) {
            condition.put("username", username.trim());
        }
        if (StringUtils.isNotBlank(company)) {
            condition.put("company", company.trim());
        }
        if (StringUtils.isNotBlank(department)) {
            condition.put("department", department.trim());
        }
        if (StringUtils.isNotBlank(job)){
            condition.put("job",job.trim());
        }
        if (type != null){
            condition.put("type",type);
        }
        if (StringUtils.isNotBlank(province)){
            condition.put("province",province.trim());
        }
        if (StringUtils.isNotBlank(city)){
            condition.put("city",city.trim());
        }
        if (StringUtils.isNotBlank(area)){
            condition.put("area",area.trim());
        }
        if (StringUtils.isNotBlank(town)){
            condition.put("town",town.trim());
        }
        if (StringUtils.isNotBlank(community)){
            condition.put("community",community.trim());
        }
        UserInfo userInfo = userService.selectByUser(getUser().getUsername());
        if (StringUtils.isNotBlank(userInfo.getCompanynumber())){
            condition.put("username", userInfo.getUsername());
        }else{
            condition.put("provinceSee", userInfo.getProvince());
            condition.put("citySee",userInfo.getCity());
            condition.put("areaSee",userInfo.getArea());
            condition.put("townSee",userInfo.getTown());
            condition.put("communitySee",userInfo.getCommunity());
        }
        condition.put("iscompany",(byte)0);
        condition.put("issale",(byte)0);
        pageInfo.setCondition(condition);
        userService.selectUserDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @PostMapping("/adduser")
    @ApiOperation(value = "添加用户数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "username",value = "用户名",required = true),
            @ApiImplicitParam(name = "password",value = "密码",required = true),
            @ApiImplicitParam(name = "type",value = "用户类型",required = true),
            @ApiImplicitParam(name = "email",value = "邮箱"),
            @ApiImplicitParam(name = "phone",value = "办公电话"),
            @ApiImplicitParam(name = "mobile",value = "手机号"),
            @ApiImplicitParam(name = "company",value = "单位"),
            @ApiImplicitParam(name = "department",value = "部门"),
            @ApiImplicitParam(name = "job",value = "职务"),
            @ApiImplicitParam(name = "createdby",value = "创建人"),
            @ApiImplicitParam(name = "province",value = "省份"),
            @ApiImplicitParam(name = "city",value = "城市"),
            @ApiImplicitParam(name = "area",value = "区县"),
            @ApiImplicitParam(name = "town",value = "乡镇"),
            @ApiImplicitParam(name = "community",value = "社区"),
    })
    public Msg addUserInfo(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        UserInfo userInfo = new UserInfo();
        userInfo.setUsername(jsonObject.getString("username"));
        String password = jsonObject.getString("password");
        String PW_PATTERN = "(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[~!@#$%^&*_.]).{8,}";
        if (!password.matches(PW_PATTERN)){
            msg.setCode("500");
            msg.setMessage("密码必须8位以上,并且包含大小写字母、数字、特殊符号三种以上");
            return msg;
        }else {
            userInfo.setPassword(Base64Encrypt.encode(password.getBytes()));
        }
        String mobile = jsonObject.getString("mobile");
        if (StringUtils.isNotBlank(mobile) && mobile.length() == 11){
            userInfo.setMobile(mobile);
        }else if (StringUtils.isNotBlank(mobile)){
            msg.setCode("500");
            msg.setMessage("手机号必须为11位数");
            return msg;
        }
        try {
            userInfo.setType(jsonObject.getInteger("type"));
        }catch (Exception e) {
            msg.setCode("500");
            msg.setMessage("用户类型必须为数字");
            return msg;
        }
        userInfo.setEmail(jsonObject.getString("email"));
        userInfo.setPhone(jsonObject.getString("phone"));
        userInfo.setCompany(jsonObject.getString("company"));
        userInfo.setDepartment(jsonObject.getString("department"));
        userInfo.setJob(jsonObject.getString("job"));
        userInfo.setCreatedby(jsonObject.getString("createdby"));
        userInfo.setCreateddate(new Date());
        userInfo.setLastmodifiedby(jsonObject.getString("createdby"));
        userInfo.setLastmodifieddate(new Date());
        userInfo.setProvince(jsonObject.getString("province"));
        userInfo.setCity(jsonObject.getString("city"));
        userInfo.setArea(jsonObject.getString("area"));
        userInfo.setTown(jsonObject.getString("town"));
        userInfo.setCommunity(jsonObject.getString("community"));
        userInfo.setCode(jsonObject.getString("code"));
        userInfo.setIsdel((byte)0);
        userInfo.setIssale((byte)0);
        UserInfo userInfoExist = userService.selectByUser(userInfo.getUsername());
        if (null != userInfoExist){
            msg.setCode("500");
            msg.setMessage("用户名重复");
            return msg;
        }else {
            userService.save(userInfo);
        }
        return msg;
    }
    @PostMapping("/importUser")
    @ApiOperation(value = "导入用户数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "file",value = "文件",required = true),
            @ApiImplicitParam(name = "operator",value = "操作人",required = true),
    })
    @ResponseBody
    public Msg importUser(String operator,MultipartFile file){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        String filesave ="";
        try {
            SimpleDateFormat sdf = new SimpleDateFormat( "yyyyMMddHHmmssSSS" );
            if (file == null)
            {
                msg.setCode("404");
                msg.setMessage("未找到上传文件");
                return msg;
            }
            long size = file.getSize();
            if(0 == size)
            {
                msg.setCode("404");
                msg.setMessage("上传文件大小为空");
                return msg;
            }
            if(!FileOptUtils.isDirExists(filePath)){
                msg.setCode("500");
                msg.setMessage("发生错误或不为目录");
                return msg;
            }
            filesave = filePath + operator + "_" + sdf.format(new Date()) +".xlsx";
            file.transferTo(new File(filesave));
            InputStream in = new FileInputStream(filesave);
            String name = file.getOriginalFilename();
            Boolean isExcel2007 = name.substring(name.lastIndexOf(".") + 1).endsWith("xlsx")? true:false;
            BooleanReason blret = excelExportService.importUserExcel(in,operator,isExcel2007);
            if(blret.getValue().equals(false))
            {
                msg.setCode("500");
                msg.setMessage(blret.getResultmsg());
                return msg;
            }
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("500");
            msg.setMessage("导入发生错误");
            return msg;
        }
        return msg;
    }
    @PostMapping("/importUserCode")
    @ApiOperation(value = "导入用户数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "file",value = "文件",required = true),
            @ApiImplicitParam(name = "operator",value = "操作人",required = true),
    })
    @ResponseBody
    public Msg importUserCode(String operator,MultipartFile file){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        String filesave ="";
        try {
            SimpleDateFormat sdf = new SimpleDateFormat( "yyyyMMddHHmmssSSS" );
            if (file == null)
            {
                msg.setCode("404");
                msg.setMessage("未找到上传文件");
                return msg;
            }
            long size = file.getSize();
            if(0 == size)
            {
                msg.setCode("404");
                msg.setMessage("上传文件大小为空");
                return msg;
            }
            if(!FileOptUtils.isDirExists(filePath)){
                msg.setCode("500");
                msg.setMessage("发生错误或不为目录");
                return msg;
            }
            filesave = filePath + operator + "_" + sdf.format(new Date()) +".xlsx";
            file.transferTo(new File(filesave));
            InputStream in = new FileInputStream(filesave);
            String name = file.getOriginalFilename();
            Boolean isExcel2007 = name.substring(name.lastIndexOf(".") + 1).endsWith("xlsx")? true:false;
            BooleanReason blret = excelExportService.importUserCodeExcel(in,operator,isExcel2007);
            if(blret.getValue().equals(false))
            {
                msg.setCode("500");
                msg.setMessage(blret.getResultmsg());
                return msg;
            }
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("500");
            msg.setMessage("导入发生错误");
            return msg;
        }
        return msg;
    }
    @PostMapping("/putuser")
    @ApiOperation(value = "修改用户数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "用户id",required = true),
            @ApiImplicitParam(name = "username",value = "用户名",required = true),
            @ApiImplicitParam(name = "password",value = "密码"),
            @ApiImplicitParam(name = "type",value = "用户类型",required = true),
            @ApiImplicitParam(name = "email",value = "邮箱"),
            @ApiImplicitParam(name = "phone",value = "办公电话"),
            @ApiImplicitParam(name = "mobile",value = "手机号"),
            @ApiImplicitParam(name = "company",value = "单位"),
            @ApiImplicitParam(name = "department",value = "部门"),
            @ApiImplicitParam(name = "job",value = "职务"),
            @ApiImplicitParam(name = "lastmodifiedby",value = "更新人"),
            @ApiImplicitParam(name = "province",value = "省份"),
            @ApiImplicitParam(name = "city",value = "城市"),
            @ApiImplicitParam(name = "area",value = "区县"),
            @ApiImplicitParam(name = "town",value = "乡镇"),
            @ApiImplicitParam(name = "community",value = "社区"),
    })
    public Msg putUserInfo(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        Long id = jsonObject.getLong("id");
        String username = jsonObject.getString("username");
        List<UserInfo> userList = userService.selectUserInfo(id,username);
        if (userList.size() > 0){
            msg.setCode("500");
            msg.setMessage("用户名重复");
            return msg;
        }
        UserInfo userInfo = new UserInfo();
        userInfo.setId(jsonObject.getLong("id"));
        userInfo.setUsername(jsonObject.getString("username"));
        String password = jsonObject.getString("password");
        String PW_PATTERN = "(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[~!@#$%^&*_.]).{8,}";
        if (StringUtils.isNotBlank(password)&& !password.matches(PW_PATTERN)){
            msg.setCode("500");
            msg.setMessage("密码必须8位以上,并且包含大小写字母、数字、特殊符号三种以上");
            return msg;
        }else if(StringUtils.isNotBlank(password)){
            userInfo.setPassword(Base64Encrypt.encode(password.getBytes()));
        }
        String mobile = jsonObject.getString("mobile");
        if (StringUtils.isNotBlank(mobile) && mobile.length() == 11){
            userInfo.setMobile(mobile);
        }else if (StringUtils.isNotBlank(mobile)){
            msg.setCode("500");
            msg.setMessage("手机号必须为11位数");
            return msg;
        }
        try {
            userInfo.setType(jsonObject.getInteger("type"));
        }catch (Exception e) {
            msg.setCode("500");
            msg.setMessage("用户类型必须为数字");
            return msg;
        }
        userInfo.setEmail(jsonObject.getString("email"));
        userInfo.setPhone(jsonObject.getString("phone"));
        userInfo.setCompany(jsonObject.getString("company"));
        userInfo.setDepartment(jsonObject.getString("department"));
        userInfo.setJob(jsonObject.getString("job"));
        userInfo.setCreatedby(jsonObject.getString("lastmodifiedby"));
        userInfo.setCreateddate(new Date());
        userInfo.setLastmodifiedby(jsonObject.getString("lastmodifiedby"));
        userInfo.setLastmodifieddate(new Date());
        userInfo.setProvince(jsonObject.getString("province"));
        userInfo.setCity(jsonObject.getString("city"));
        userInfo.setArea(jsonObject.getString("area"));
        userInfo.setTown(jsonObject.getString("town"));
        userInfo.setCommunity(jsonObject.getString("community"));
        userInfo.setCode(jsonObject.getString("code"));
        userService.updateById(userInfo);
        // 如果修改为新疆企业 会重置 截止日期
        String province = jsonObject.getString("province");
        // 不修改原代码 无论怎样 是新疆 就重置
        UserInfo company = userService.getById(userInfo.getId());
        if (company.getCompanyid() != null) {
            userService.updateDeadline2NullByComapnyId(company.getCompanyid());
        }
        return msg;
    }
    @PostMapping("/jiangWai/deadline/set")
    public Msg updateJinagWaiDeadline(@RequestBody JiangWaiDeadlineReqDTO reqDTO) {
        userService.updateDeadline(reqDTO,getUser());
        return success();
    }
    @PostMapping("/userroles")
    @ApiOperation(value = "修改用户角色",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "用户id",required = true),
            @ApiImplicitParam(name = "roles",value = "用户名",required = true),
    })
    public Msg updateUserRole(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        Long userid = jsonObject.getLong("id");
        String roles = jsonObject.getString("roles");
        if (StringUtils.isNotBlank(roles)){
            userRolesInfoService.deleteByUserId(userid);
            roles = roles.replace("[","").replace("]","");
            List<String> list = StringUtils.toList(roles);
            for (String role : list){
                UserRolesInfo userRolesInfo = new UserRolesInfo();
                userRolesInfo.setUserid(userid);
                userRolesInfo.setRoleid(Long.parseLong(role.trim()));
                userRolesInfoService.save(userRolesInfo);
            }
        }
        return msg;
    }
    @PostMapping("/deluser")
    @ApiOperation(value = "删除用户数据", notes = "删除用户数据", response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query",name = "id",value = "id",required = true),
            @ApiImplicitParam(paramType="body",name = "lastmodifiedby",value = "更新人"),
    })
    public Msg delUserInfo(@ApiParam(value = "id,lastmodifiedby")
                             @RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        UserInfo userInfo = new UserInfo();
        userInfo.setId(jsonObject.getLong("id"));
        userInfo.setLastmodifiedby(jsonObject.getString("lastmodifiedby"));
        userInfo.setLastmodifieddate(new Date());
        userInfo.setIsdel((byte)1);
        userService.updateById(userInfo);
        return msg;
    }
    @PostMapping("/importDistrict")
    @ApiOperation(value = "导入省市数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "file",value = "文件",required = true),
            @ApiImplicitParam(name = "operator",value = "操作人",required = true),
    })
    @ResponseBody
    public Msg importDistrict(String operator,MultipartFile file){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        String filesave ="";
        try {
            SimpleDateFormat sdf = new SimpleDateFormat( "yyyyMMddHHmmssSSS" );
            if (file == null)
            {
                msg.setCode("404");
                msg.setMessage("未找到上传文件");
                return msg;
            }
            long size = file.getSize();
            if(0 == size)
            {
                msg.setCode("404");
                msg.setMessage("上传文件大小为空");
                return msg;
            }
            if(!FileOptUtils.isDirExists(filePath)){
                msg.setCode("500");
                msg.setMessage("发生错误或不为目录");
                return msg;
            }
            filesave = filePath + operator + "_" + sdf.format(new Date()) +".xlsx";
            file.transferTo(new File(filesave));
            InputStream in = new FileInputStream(filesave);
            String name = file.getOriginalFilename();
            Boolean isExcel2007 = name.substring(name.lastIndexOf(".") + 1).endsWith("xlsx")? true:false;
            BooleanReason blret = excelExportService.importDistrictExcel(in,operator,isExcel2007);
            if(blret.getValue().equals(false))
            {
                msg.setCode("500");
                msg.setMessage(blret.getResultmsg());
                return msg;
            }
        } catch (Exception e) {
            e.printStackTrace();
            msg.setCode("500");
            msg.setMessage("导入发生错误");
            return msg;
        }
        return msg;
    }
    @GetMapping("/district")
    @ApiOperation(value = "获取省市区数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type",value = "类型"),
            @ApiImplicitParam(name = "parentname",value = "上级名称"),
            @ApiImplicitParam(name = "parenttype",value = "上级类型"),
    })
    public Msg getdistrictInfo(String type,String parentname,String parenttype){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        List<DistrictInfo> districtInfoList = new ArrayList<> ();
        if (parenttype.equals("0")){
            districtInfoList = districtService.selectDistrictInfo(type, parenttype);
        }else {
            districtInfoList = districtService.selectDistrictByName(type,parentname,parenttype);
        }
        msg.setResult(districtInfoList);
        return msg;
    }
    @GetMapping("/districtByName")
    @ApiOperation(value = "获取省市区数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "province",value = "省份"),
            @ApiImplicitParam(name = "city",value = "城市"),
            @ApiImplicitParam(name = "area",value = "区县"),
            @ApiImplicitParam(name = "town",value = "街道"),
            @ApiImplicitParam(name = "community",value = "社区"),
    })
    public Msg getDistrictByName(String province,String city,String area,String town,String community){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        if (StringUtils.isBlank(province)){
            List<DistrictInfo> provinceList = districtService.selectDistrictInfo("1", "0");
            Map<String,Object> map = new HashMap<> ();
            map.put("provinceList",provinceList);
            msg.setResult(map);
        }else if (StringUtils.isBlank(city)){
            List<DistrictInfo> provinceList = districtService.selectDistrictInfo("1", "0");
            DistrictInfo provinceInfo = districtService.selectInfoByName(province,(byte)1);
            List<DistrictInfo> cityList = districtService.selectDistrictInfo("2", provinceInfo.getCode());
            Map<String,Object> map = new HashMap<> ();
            map.put("provinceList",provinceList);
            map.put("cityList",cityList);
            msg.setResult(map);
        }else if (StringUtils.isBlank(area)){
            List<DistrictInfo> provinceList = districtService.selectDistrictInfo("1", "0");
            DistrictInfo provinceInfo = districtService.selectInfoByName(province,(byte)1);
            List<DistrictInfo> cityList = districtService.selectDistrictInfo("2", provinceInfo.getCode());
            DistrictInfo cityInfo = districtService.selectInfoByName(city,(byte)2);
            List<DistrictInfo> areaList = districtService.selectDistrictInfo("3", cityInfo.getCode());
            Map<String,Object> map = new HashMap<> ();
            map.put("provinceList",provinceList);
            map.put("cityList",cityList);
            map.put("areaList",areaList);
            msg.setResult(map);
        }else if (StringUtils.isBlank(town)){
            List<DistrictInfo> provinceList = districtService.selectDistrictInfo("1", "0");
            DistrictInfo provinceInfo = districtService.selectInfoByName(province,(byte)1);
            List<DistrictInfo> cityList = districtService.selectDistrictInfo("2", provinceInfo.getCode());
            DistrictInfo cityInfo = districtService.selectInfoByName(city,(byte)2);
            List<DistrictInfo> areaList = districtService.selectDistrictInfo("3", cityInfo.getCode());
            DistrictInfo areaInfo = districtService.selectInfoByName(area,(byte)3);
            List<DistrictInfo> townList = districtService.selectDistrictInfo("4", areaInfo.getCode());
            Map<String,Object> map = new HashMap<> ();
            map.put("provinceList",provinceList);
            map.put("cityList",cityList);
            map.put("areaList",areaList);
            map.put("townList",townList);
            msg.setResult(map);
        }else{
            List<DistrictInfo> provinceList = districtService.selectDistrictInfo("1", "0");
            DistrictInfo provinceInfo = districtService.selectInfoByName(province,(byte)1);
            List<DistrictInfo> cityList = districtService.selectDistrictInfo("2", provinceInfo.getCode());
            DistrictInfo cityInfo = districtService.selectInfoByName(city,(byte)2);
            List<DistrictInfo> areaList = districtService.selectDistrictInfo("3", cityInfo.getCode());
            DistrictInfo areaInfo = districtService.selectInfoByName(area,(byte)3);
            List<DistrictInfo> townList = districtService.selectDistrictInfo("4", areaInfo.getCode());
            DistrictInfo townInfo = districtService.selectInfoByName(town,(byte)4);
            List<DistrictInfo> communityList = districtService.selectDistrictInfo("5", townInfo.getCode());
            Map<String,Object> map = new HashMap<> ();
            map.put("provinceList",provinceList);
            map.put("cityList",cityList);
            map.put("areaList",areaList);
            map.put("townList",townList);
            map.put("communityList",communityList);
            msg.setResult(map);
        }
        return msg;
    }
    @GetMapping("/enterpriseUser")
    @ApiOperation(value = "获取企业用户数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "sort",value = "排序规则"),
            @ApiImplicitParam(name = "order",value = "排序字段"),
            @ApiImplicitParam(name = "username",value = "用户名"),
            @ApiImplicitParam(name = "company",value = "单位"),
            @ApiImplicitParam(name = "department",value = "部门"),
            @ApiImplicitParam(name = "job",value = "职务"),
            @ApiImplicitParam(name = "type",value = "用户类型"),
            @ApiImplicitParam(name = "province",value = "省份"),
            @ApiImplicitParam(name = "city",value = "城市"),
            @ApiImplicitParam(name = "area",value = "区县"),
            @ApiImplicitParam(name = "town",value = "乡镇"),
            @ApiImplicitParam(name = "community",value = "社区"),
    })
    public Msg getEnterpriseUserInfo(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize, String sort,String order,
                           String username,String company, String department, String job,Byte type, String province, String city, String area, String town, String community){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(username)) {
            condition.put("username", username.trim());
        }
        if (StringUtils.isNotBlank(company)) {
            condition.put("company", company.trim());
        }
        if (StringUtils.isNotBlank(department)) {
            condition.put("department", department.trim());
        }
        if (StringUtils.isNotBlank(job)){
            condition.put("job",job.trim());
        }
        if (type != null){
            condition.put("type",type);
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        if (userInfo.getCompanyid() != null){
            condition.put("companyid", userInfo.getCompanyid());
        }else if (userInfo.getType() == 3){
            condition.put("province",userInfo.getProvince());
            condition.put("city",userInfo.getCity());
            condition.put("area",userInfo.getArea());
            condition.put("town",userInfo.getTown());
            condition.put("community",userInfo.getCommunity());
        }
        if (StringUtils.isNotBlank(province) && condition.get("province") == null) {
            condition.put("province", province.trim());
            if (StringUtils.isNotBlank(city)) {
                condition.put("city", city.trim());
            }
            if (StringUtils.isNotBlank(area)) {
                condition.put("area", area.trim());
            }
            if (StringUtils.isNotBlank(town)) {
                condition.put("town", town.trim());
            }
            if (StringUtils.isNotBlank(community)) {
                condition.put("community", community.trim());
            }
        }
        condition.put("iscompany",(byte)1);
        condition.put("issale",(byte)0);
        pageInfo.setCondition(condition);
        userService.selectUserDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @GetMapping("/saleUser")
    @ApiOperation(value = "获取终端机用户数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "sort",value = "排序规则"),
            @ApiImplicitParam(name = "order",value = "排序字段"),
            @ApiImplicitParam(name = "username",value = "用户名"),
            @ApiImplicitParam(name = "company",value = "单位"),
            @ApiImplicitParam(name = "department",value = "部门"),
            @ApiImplicitParam(name = "job",value = "职务"),
            @ApiImplicitParam(name = "type",value = "用户类型"),
            @ApiImplicitParam(name = "province",value = "省份"),
            @ApiImplicitParam(name = "city",value = "城市"),
            @ApiImplicitParam(name = "area",value = "区县"),
            @ApiImplicitParam(name = "town",value = "乡镇"),
            @ApiImplicitParam(name = "community",value = "社区"),
    })
    public Msg getSaleUserInfo(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize, String sort,String order,
                                     String username,String company, String department, String job,Byte type, String province, String city, String area, String town, String community,
                               String safetySuperVision){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(username)) {
            condition.put("username", username.trim());
        }
        if (StringUtils.isNotBlank(company)) {
            condition.put("company", company.trim());
        }
        if (StringUtils.isNotBlank(department)) {
            condition.put("department", department.trim());
        }
        if (StringUtils.isNotBlank(job)){
            condition.put("job",job.trim());
        }
        if (type != null){
            condition.put("type",type);
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        if (userInfo.getCompanyid() != null){
            condition.put("companyid", userInfo.getCompanyid());
        }else if (userInfo.getType() == 3){
            condition.put("province",userInfo.getProvince());
            condition.put("city",userInfo.getCity());
            condition.put("area",userInfo.getArea());
            condition.put("town",userInfo.getTown());
            condition.put("community",userInfo.getCommunity());
        }
        if (StringUtils.isNotBlank(province) && condition.get("province") == null) {
            condition.put("province", province.trim());
            if (StringUtils.isNotBlank(city)) {
                condition.put("city", city.trim());
            }
            if (StringUtils.isNotBlank(area)) {
                condition.put("area", area.trim());
            }
            if (StringUtils.isNotBlank(town)) {
                condition.put("town", town.trim());
            }
            if (StringUtils.isNotBlank(community)) {
                condition.put("community", community.trim());
            }
        }
        condition.put("safetysupervision",safetySuperVision);
        condition.put("iscompany",(byte)1);
        condition.put("issale",(byte)1);
        pageInfo.setCondition(condition);
        userService.selectUserDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
}
src/main/java/com/gk/firework/Controller/WarningController.java
对比新文件
@@ -0,0 +1,577 @@
package com.gk.firework.Controller;
import com.alibaba.fastjson.JSONObject;
import com.gk.firework.Controller.Base.BaseController;
import com.gk.firework.Domain.*;
import com.gk.firework.Domain.Utils.Msg;
import com.gk.firework.Domain.Utils.PageInfo;
import com.gk.firework.Domain.Utils.StringUtils;
import com.gk.firework.Domain.Vo.NoEntryVo;
import com.gk.firework.Domain.Vo.WarnContentVo;
import com.gk.firework.Service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@Api(tags = "流向预警接口")
@RestController
public class WarningController extends BaseController {
    @Autowired
    WarningService warningService;
    @Autowired
    WarnContentService warnContentService;
    @Autowired
    UserService userService;
    @Autowired
    EnterpriseService enterpriseService;
    @Autowired
    SaleOrderDetailService saleOrderDetailService;
    @Autowired
    StockService stockService;
    private final String WARN_TYPE_ENTRY = "超期未入库";
    private final String WARN_TYPE_CERT = "运输证超期";
    @GetMapping("/warning")
    @ApiOperation(value = "获取报警阈值",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "sort",value = "排序规则"),
            @ApiImplicitParam(name = "order",value = "排序字段"),
            @ApiImplicitParam(name = "warntype",value = "警告类型"),
            @ApiImplicitParam(name = "enterprisetype",value = "企业类型"),
    })
    public Msg getWarningList(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "20") Integer pageSize, String sort, String order,
                                String warntype, String enterprisetype){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(warntype)) {
            condition.put("warntype", warntype.trim());
        }
        if (StringUtils.isNotBlank(enterprisetype)) {
            condition.put("enterprisetype", enterprisetype.trim());
        }
        pageInfo.setCondition(condition);
        warningService.selectDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @PostMapping("/warning")
    @ApiOperation(value = "修改报警阈值",response = Msg.class)
    public Msg editWarningInfo(@RequestBody WarningInfo warningInfo){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        if (warningInfo.getMinimum() == null){
            msg.setCode("999");
            msg.setMessage("预警值不能为空");
            return msg;
        }else if (warningInfo.getMaximum() == null){
            msg.setCode("999");
            msg.setMessage("报警值不能为空");
            return msg;
        }else if (warningInfo.getIssms() == null){
            msg.setCode("999");
            msg.setMessage("报警是否开启短信通知不能为空");
            return msg;
        }
        if (warningInfo.getWarntype().equals("购买超量") && warningInfo.getPeriod() == null){
            msg.setCode("999");
            msg.setMessage("计算周期不能为空");
            return msg;
        }
        warningInfo.setModifiedby(getUser().getUsername());
        warningInfo.setModifieddate(new Date());
        warningService.updateById(warningInfo);
        return msg;
    }
    @GetMapping("/stockWarning")
    @ApiOperation(value = "获取库存超量",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "sort",value = "排序规则"),
            @ApiImplicitParam(name = "order",value = "排序字段"),
            @ApiImplicitParam(name = "warnlevel",value = "警告级别"),
            @ApiImplicitParam(name = "enterprisetype",value = "企业类型"),
            @ApiImplicitParam(name = "enterprisename",value = "企业名称"),
            @ApiImplicitParam(name = "starttime",value = "开始时间"),
            @ApiImplicitParam(name = "endtime",value = "结束时间"),
            @ApiImplicitParam(name = "province",value = "省份"),
            @ApiImplicitParam(name = "city",value = "城市"),
            @ApiImplicitParam(name = "area",value = "区县"),
            @ApiImplicitParam(name = "town",value = "乡镇"),
            @ApiImplicitParam(name = "community",value = "社区"),
            @ApiImplicitParam(name = "ismend",value = "是否处理"),
    })
    public Msg getStockWarningList(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "20") Integer pageSize, String sort, String order,
                                String warnlevel, String enterprisetype, String enterprisename, String starttime, String endttime,
                                   String province, String city, String area, String town, String community, Byte ismend){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(warnlevel)) {
            condition.put("warnlevel", warnlevel.trim());
        }
        if (StringUtils.isNotBlank(enterprisetype)) {
            condition.put("enterprisetype", enterprisetype.trim());
        }
        if (StringUtils.isNotBlank(enterprisename)) {
            condition.put("enterprisename", enterprisetype.trim());
        }
        if (StringUtils.isNotBlank(starttime)) {
            condition.put("starttime", starttime.trim());
        }
        if (StringUtils.isNotBlank(endttime)) {
            condition.put("endttime", endttime.trim());
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        if (userInfo.getCompanyid() != null){
            Enterprise enterprise = enterpriseService.getById(userInfo.getCompanyid());
            condition.put("enterprisename", enterprise.getEnterprisename());
        }else if (userInfo.getType() == 3){
            condition.put("province",userInfo.getProvince());
            condition.put("city",userInfo.getCity());
            condition.put("area",userInfo.getArea());
            condition.put("town",userInfo.getTown());
            condition.put("community",userInfo.getCommunity());
        }
        if (StringUtils.isNotBlank(province) && condition.get("province") == null) {
            condition.put("province", province.trim());
            if (StringUtils.isNotBlank(city)) {
                condition.put("city", city.trim());
            }
            if (StringUtils.isNotBlank(area)) {
                condition.put("area", area.trim());
            }
            if (StringUtils.isNotBlank(town)) {
                condition.put("town", town.trim());
            }
            if (StringUtils.isNotBlank(community)){
                condition.put("community", community.trim());
            }
        }
        if (ismend != null){
            condition.put("ismend",ismend);
        }
        condition.put("warntype", "库存超量");
        pageInfo.setCondition(condition);
        warnContentService.selectStockDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @GetMapping("/purchaseWarning")
    @ApiOperation(value = "获取购买超量",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "sort",value = "排序规则"),
            @ApiImplicitParam(name = "order",value = "排序字段"),
            @ApiImplicitParam(name = "starttime",value = "开始时间"),
            @ApiImplicitParam(name = "endtime",value = "结束时间"),
            @ApiImplicitParam(name = "warnlevel",value = "警告级别"),
            @ApiImplicitParam(name = "customer",value = "购买人"),
            @ApiImplicitParam(name = "idcard",value = "身份证"),
            @ApiImplicitParam(name = "ismend",value = "是否处理"),
    })
    public Msg getPurchaseWarningList(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "20") Integer pageSize, String sort, String order,
                                   String warnlevel, String customer, String idcard, String starttime, String endtime, Byte ismend){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(warnlevel)) {
            condition.put("warnlevel", warnlevel.trim());
        }
        if (StringUtils.isNotBlank(customer)) {
            condition.put("customer", customer.trim());
        }
        if (StringUtils.isNotBlank(idcard)) {
            condition.put("idcard", idcard.trim());
        }
        if (StringUtils.isNotBlank(starttime)) {
            condition.put("starttime", starttime.trim());
        }
        if (StringUtils.isNotBlank(endtime)) {
            condition.put("endtime", endtime.trim());
        }
        if (ismend != null){
            condition.put("ismend",ismend);
        }
        condition.put("warntype", "购买超量");
        pageInfo.setCondition(condition);
        warnContentService.selectPurchaseDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @GetMapping("/purchaseDetail")
    @ApiOperation(value = "获取购买明细",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "warnid",value = "警告id"),
    })
    public Msg getPurchaseDetailList(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize, String sort, String order,
                                     Long warnid){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        WarnContentInfo warningContentInfo = warnContentService.getById(warnid);
        if (warningContentInfo != null && warningContentInfo.getCustomid() != null){
            //分页 datagrid  content添加周期 开始结束时间
            HashMap<String, Object> condition = new HashMap<String, Object>();
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            Date endtime = warningContentInfo.getCreateddate();
            Integer period = warningContentInfo.getPeriod();
            Calendar calendar = Calendar.getInstance();
            calendar.setTime(endtime);
            calendar.add(Calendar.DATE,-period);
            String starttime = sdf.format(calendar.getTime());
            condition.put("starttime", starttime);
            condition.put("endtime", sdf.format(warningContentInfo.getCreateddate()));
            condition.put("customid", warningContentInfo.getCustomid());
            pageInfo.setCondition(condition);
            saleOrderDetailService.selectByCustomId(pageInfo);
        }
        msg.setResult(pageInfo);
        return msg;
    }
    @GetMapping("/alarmList")
    @ApiOperation(value = "获取报警未处理的列表",response = Msg.class)
    public Msg getAlarmList(){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        List<WarnContentVo> warningContentInfos = warnContentService.selectIsNotMend();
        msg.setResult(warningContentInfos);
        return msg;
    }
    @GetMapping("/warningList")
    @ApiOperation(value = "获取报警预警列表",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "sort",value = "排序规则"),
            @ApiImplicitParam(name = "order",value = "排序字段"),
            @ApiImplicitParam(name = "warnlevel",value = "警告级别"),
            @ApiImplicitParam(name = "enterprisetype",value = "企业类型"),
            @ApiImplicitParam(name = "enterprisename",value = "企业名称"),
            @ApiImplicitParam(name = "starttime",value = "开始时间"),
            @ApiImplicitParam(name = "endtime",value = "结束时间"),
            @ApiImplicitParam(name = "customer",value = "购买人"),
            @ApiImplicitParam(name = "idcard",value = "身份证"),
            @ApiImplicitParam(name = "ismend",value = "是否处理"),
    })
    public Msg getWarningList(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "20") Integer pageSize, String sort, String order,
                              String warnlevel, String enterprisetype, String enterprisename, String starttime, String endttime, Byte ismend, String customer, String idcard
    ){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(warnlevel)) {
            condition.put("warnlevel", warnlevel.trim());
        }
        if (StringUtils.isNotBlank(enterprisetype)) {
            condition.put("enterprisetype", enterprisetype.trim());
        }
        if (StringUtils.isNotBlank(enterprisename)) {
            condition.put("enterprisename", enterprisetype.trim());
        }
        if (StringUtils.isNotBlank(starttime)) {
            condition.put("starttime", starttime.trim());
        }
        if (StringUtils.isNotBlank(endttime)) {
            condition.put("endttime", endttime.trim());
        }
        if (ismend != null){
            condition.put("ismend",ismend);
        }
        if (StringUtils.isNotBlank(customer)) {
            condition.put("customer", customer.trim());
        }
        if (StringUtils.isNotBlank(idcard)) {
            condition.put("idcard", idcard.trim());
        }
        pageInfo.setCondition(condition);
        warnContentService.selectWarningDataGrid(pageInfo);
        return msg;
    }
    @PostMapping("/mendAlarm")
    @ApiOperation(value = "处理报警信息",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "报警id"),
    })
    public Msg mendAlarm(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        Long id = jsonObject.getLong("id");
        WarnContentInfo warningContentInfo = warnContentService.getById(id);
        if (warningContentInfo != null){
            warningContentInfo.setIsmend((byte)1);
            warnContentService.updateById(warningContentInfo);
        }
        return msg;
    }
    @GetMapping("/entryWarning")
    @ApiOperation(value = "获取超期未入库",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "sort",value = "排序规则"),
            @ApiImplicitParam(name = "order",value = "排序字段"),
            @ApiImplicitParam(name = "warnlevel",value = "警告级别"),
            @ApiImplicitParam(name = "enterprisetype",value = "企业类型"),
            @ApiImplicitParam(name = "enterprisename",value = "企业名称"),
            @ApiImplicitParam(name = "starttime",value = "开始时间"),
            @ApiImplicitParam(name = "endtime",value = "结束时间"),
            @ApiImplicitParam(name = "province",value = "省份"),
            @ApiImplicitParam(name = "city",value = "城市"),
            @ApiImplicitParam(name = "area",value = "区县"),
            @ApiImplicitParam(name = "town",value = "乡镇"),
            @ApiImplicitParam(name = "community",value = "社区"),
            @ApiImplicitParam(name = "ismend",value = "是否处理"),
    })
    public Msg getEntryWarningList(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "20") Integer pageSize, String sort, String order,
                                   String warnlevel, String enterprisetype, String enterprisename, String starttime, String endttime,
                                   String province, String city, String area, String town, String community, Byte ismend){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(warnlevel)) {
            condition.put("warnlevel", warnlevel.trim());
        }
        if (StringUtils.isNotBlank(enterprisetype)) {
            condition.put("enterprisetype", enterprisetype.trim());
        }
        if (StringUtils.isNotBlank(enterprisename)) {
            condition.put("enterprisename", enterprisetype.trim());
        }
        if (StringUtils.isNotBlank(starttime)) {
            condition.put("starttime", starttime.trim());
        }
        if (StringUtils.isNotBlank(endttime)) {
            condition.put("endttime", endttime.trim());
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        if (userInfo.getCompanyid() != null){
            Enterprise enterprise = enterpriseService.getById(userInfo.getCompanyid());
            condition.put("enterprisename", enterprise.getEnterprisename());
        }else if (userInfo.getType() == 3){
            condition.put("province",userInfo.getProvince());
            condition.put("city",userInfo.getCity());
            condition.put("area",userInfo.getArea());
            condition.put("town",userInfo.getTown());
            condition.put("community",userInfo.getCommunity());
        }
        if (StringUtils.isNotBlank(province) && condition.get("province") == null) {
            condition.put("province", province.trim());
            if (StringUtils.isNotBlank(city)) {
                condition.put("city", city.trim());
            }
            if (StringUtils.isNotBlank(area)) {
                condition.put("area", area.trim());
            }
            if (StringUtils.isNotBlank(town)) {
                condition.put("town", town.trim());
            }
            if (StringUtils.isNotBlank(community)){
                condition.put("community", community.trim());
            }
        }
        if (ismend != null){
            condition.put("ismend",ismend);
        }
        condition.put("warntype", WARN_TYPE_ENTRY);
        pageInfo.setCondition(condition);
        warnContentService.selectStockDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @GetMapping("/entryDetail")
    @ApiOperation(value = "获取超期未入库明细",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "warnid",value = "警告id"),
    })
    public Msg getEntryDetailList(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize, String sort, String order,
                                     Long warnid){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        WarnContentInfo warningContentInfo = warnContentService.getById(warnid);
        if (warningContentInfo != null){
            //分页 datagrid  content添加周期 开始结束时间
            HashMap<String, Object> condition = new HashMap<String, Object>();
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            Date endtime = warningContentInfo.getCreateddate();
            Integer period = warningContentInfo.getPeriod();
            Calendar calendar = Calendar.getInstance();
            calendar.setTime(endtime);
            calendar.add(Calendar.DATE,-period);
            String starttime = sdf.format(calendar.getTime());
            condition.put("enterpriseid",warningContentInfo.getEnterpriseid());
            condition.put("starttime", starttime);
            pageInfo.setCondition(condition);
            stockService.selectNoEntryDetail(pageInfo);
        }
        msg.setResult(pageInfo);
        return msg;
    }
    @GetMapping("/certWarning")
    @ApiOperation(value = "获取运输证超期",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "sort",value = "排序规则"),
            @ApiImplicitParam(name = "order",value = "排序字段"),
            @ApiImplicitParam(name = "warnlevel",value = "警告级别"),
            @ApiImplicitParam(name = "enterprisetype",value = "企业类型"),
            @ApiImplicitParam(name = "enterprisename",value = "企业名称"),
            @ApiImplicitParam(name = "starttime",value = "开始时间"),
            @ApiImplicitParam(name = "endtime",value = "结束时间"),
            @ApiImplicitParam(name = "province",value = "省份"),
            @ApiImplicitParam(name = "city",value = "城市"),
            @ApiImplicitParam(name = "area",value = "区县"),
            @ApiImplicitParam(name = "town",value = "乡镇"),
            @ApiImplicitParam(name = "community",value = "社区"),
            @ApiImplicitParam(name = "ismend",value = "是否处理"),
    })
    public Msg getCertWarningList(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "20") Integer pageSize, String sort, String order,
                                   String warnlevel, String enterprisetype, String enterprisename, String starttime, String endttime,
                                   String province, String city, String area, String town, String community, Byte ismend){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(warnlevel)) {
            condition.put("warnlevel", warnlevel.trim());
        }
        if (StringUtils.isNotBlank(enterprisetype)) {
            condition.put("enterprisetype", enterprisetype.trim());
        }
        if (StringUtils.isNotBlank(enterprisename)) {
            condition.put("enterprisename", enterprisetype.trim());
        }
        if (StringUtils.isNotBlank(starttime)) {
            condition.put("starttime", starttime.trim());
        }
        if (StringUtils.isNotBlank(endttime)) {
            condition.put("endttime", endttime.trim());
        }
        UserInfo userInfo = userService.getById(getUser().getId());
        if (userInfo.getCompanyid() != null){
            Enterprise enterprise = enterpriseService.getById(userInfo.getCompanyid());
            condition.put("enterprisename", enterprise.getEnterprisename());
        }else if (userInfo.getType() == 3){
            condition.put("province",userInfo.getProvince());
            condition.put("city",userInfo.getCity());
            condition.put("area",userInfo.getArea());
            condition.put("town",userInfo.getTown());
            condition.put("community",userInfo.getCommunity());
        }
        if (StringUtils.isNotBlank(province) && condition.get("province") == null) {
            condition.put("province", province.trim());
            if (StringUtils.isNotBlank(city)) {
                condition.put("city", city.trim());
            }
            if (StringUtils.isNotBlank(area)) {
                condition.put("area", area.trim());
            }
            if (StringUtils.isNotBlank(town)) {
                condition.put("town", town.trim());
            }
            if (StringUtils.isNotBlank(community)){
                condition.put("community", community.trim());
            }
        }
        if (ismend != null){
            condition.put("ismend",ismend);
        }
        condition.put("warntype", WARN_TYPE_CERT);
        pageInfo.setCondition(condition);
        warnContentService.selectStockDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
}
src/main/java/com/gk/firework/Domain/AccessAssessApply.java
对比新文件
@@ -0,0 +1,336 @@
package com.gk.firework.Domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gk.firework.Domain.Enum.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.Serializable;
import java.util.Date;
@TableName("assessapply")
public class AccessAssessApply implements Serializable {
    private static final long serialVersionUID = 1L;
    /** 主键id  id **/
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 类型(2准入评定)  type **/
    private AssessType type;
    /** 单子编号  code **/
    private String code;
    /** 单子状态(待提交,待审批,审批通过,驳回)  status **/
    private AssessApplyStatus status;
    /** 提出人名称  requestor **/
    private String requestor;
    private Long requestorid;
    /** 单子提交时间  submittime **/
    private Date submittime;
    /** 审批人名称  approver **/
    private String approver;
    /** 审批时间  approvetime **/
    private Date approvetime;
    /** 审批备注  approvenote **/
    private String approvenote;
    /** 企业名  enterprisename **/
    private String enterprisename;
    /** 企业单位编号  enterprisenumber **/
    private String enterprisenumber;
    private PunishStatus punishstatus;
    /** 上传材料  path1 **/
    private String path1;
    /** 申诉材料  path2 **/
    private String path2;
    /** 处罚原因  punishmentreason **/
    private String punishmentreason;
    /** 处罚措施(吊销或者停用一段时间)  punishmentmeasure **/
    private AssessPunishment punishmentmeasure;
    /** 创建时间  createtime **/
    private Date createtime;
    /** 修改时间  modifytime **/
    private Date modifytime;
    /** 最后一次驳回的时间  lastrejecttime **/
    private Date lastrejecttime;
    private String lastrejectreason;
    private Date deadline;
    private String appealcontent;
    private Date appealtime;
    private AssessAppealStatus appealstatus;
    private String appealrejectreason;
    private String appealapprover;
    private Date appealapprovetime;
    @TableField(exist = false)
    private MultipartFile file;
    private boolean validflag;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public AssessType getType() {
        return type;
    }
    public void setType(AssessType type) {
        this.type = type;
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public AssessApplyStatus getStatus() {
        return status;
    }
    public void setStatus(AssessApplyStatus status) {
        this.status = status;
    }
    public String getRequestor() {
        return requestor;
    }
    public void setRequestor(String requestor) {
        this.requestor = requestor;
    }
    public Long getRequestorid() {
        return requestorid;
    }
    public void setRequestorid(Long requestorid) {
        this.requestorid = requestorid;
    }
    public Date getSubmittime() {
        return submittime;
    }
    public void setSubmittime(Date submittime) {
        this.submittime = submittime;
    }
    public String getApprover() {
        return approver;
    }
    public void setApprover(String approver) {
        this.approver = approver;
    }
    public Date getApprovetime() {
        return approvetime;
    }
    public void setApprovetime(Date approvetime) {
        this.approvetime = approvetime;
    }
    public String getApprovenote() {
        return approvenote;
    }
    public void setApprovenote(String approvenote) {
        this.approvenote = approvenote;
    }
    public String getEnterprisename() {
        return enterprisename;
    }
    public void setEnterprisename(String enterprisename) {
        this.enterprisename = enterprisename;
    }
    public String getEnterprisenumber() {
        return enterprisenumber;
    }
    public void setEnterprisenumber(String enterprisenumber) {
        this.enterprisenumber = enterprisenumber;
    }
    public PunishStatus getPunishstatus() {
        return punishstatus;
    }
    public void setPunishstatus(PunishStatus punishstatus) {
        this.punishstatus = punishstatus;
    }
    public String getPath1() {
        return path1;
    }
    public void setPath1(String path1) {
        this.path1 = path1;
    }
    public String getPath2() {
        return path2;
    }
    public void setPath2(String path2) {
        this.path2 = path2;
    }
    public String getPunishmentreason() {
        return punishmentreason;
    }
    public void setPunishmentreason(String punishmentreason) {
        this.punishmentreason = punishmentreason;
    }
    public AssessPunishment getPunishmentmeasure() {
        return punishmentmeasure;
    }
    public void setPunishmentmeasure(AssessPunishment punishmentmeasure) {
        this.punishmentmeasure = punishmentmeasure;
    }
    public Date getCreatetime() {
        return createtime;
    }
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }
    public Date getModifytime() {
        return modifytime;
    }
    public void setModifytime(Date modifytime) {
        this.modifytime = modifytime;
    }
    public Date getLastrejecttime() {
        return lastrejecttime;
    }
    public void setLastrejecttime(Date lastrejecttime) {
        this.lastrejecttime = lastrejecttime;
    }
    public String getLastrejectreason() {
        return lastrejectreason;
    }
    public void setLastrejectreason(String lastrejectreason) {
        this.lastrejectreason = lastrejectreason;
    }
    public Date getDeadline() {
        return deadline;
    }
    public void setDeadline(Date deadline) {
        this.deadline = deadline;
    }
    public String getAppealcontent() {
        return appealcontent;
    }
    public void setAppealcontent(String appealcontent) {
        this.appealcontent = appealcontent;
    }
    public Date getAppealtime() {
        return appealtime;
    }
    public void setAppealtime(Date appealtime) {
        this.appealtime = appealtime;
    }
    public AssessAppealStatus getAppealstatus() {
        return appealstatus;
    }
    public void setAppealstatus(AssessAppealStatus appealstatus) {
        this.appealstatus = appealstatus;
    }
    public MultipartFile getFile() {
        return file;
    }
    public void setFile(MultipartFile file) {
        this.file = file;
    }
    public boolean isValidflag() {
        return validflag;
    }
    public void setValidflag(boolean validflag) {
        this.validflag = validflag;
    }
    public String getAppealrejectreason() {
        return appealrejectreason;
    }
    public void setAppealrejectreason(String appealrejectreason) {
        this.appealrejectreason = appealrejectreason;
    }
    public String getAppealapprover() {
        return appealapprover;
    }
    public void setAppealapprover(String appealapprover) {
        this.appealapprover = appealapprover;
    }
    public Date getAppealapprovetime() {
        return appealapprovetime;
    }
    public void setAppealapprovetime(Date appealapprovetime) {
        this.appealapprovetime = appealapprovetime;
    }
}
src/main/java/com/gk/firework/Domain/AppFileInfo.java
对比新文件
@@ -0,0 +1,119 @@
package com.gk.firework.Domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
@TableName("appfile")
public class AppFileInfo implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 文件类型  filetype 仓储、监管**/
    private String filetype;
    /** 文件名称  filename **/
    private String filename;
    /** 文件链接  fileurl **/
    private String fileurl;
    /** 版本号  version **/
    private Integer version;
    /** 备注  remark **/
    private String remark;
    /** 创建时间  created **/
    private Date created;
    /** 更新时间  updated **/
    private Date updated;
    /**     id   **/
    public Long getId() {
        return id;
    }
    /**     id   **/
    public void setId(Long id) {
        this.id = id;
    }
    /**   文件类型  filetype   **/
    public String getFiletype() {
        return filetype;
    }
    /**   文件类型  filetype   **/
    public void setFiletype(String filetype) {
        this.filetype = filetype == null ? null : filetype.trim();
    }
    /**   文件名称  filename   **/
    public String getFilename() {
        return filename;
    }
    /**   文件名称  filename   **/
    public void setFilename(String filename) {
        this.filename = filename == null ? null : filename.trim();
    }
    /**   文件链接  fileurl   **/
    public String getFileurl() {
        return fileurl;
    }
    /**   文件链接  fileurl   **/
    public void setFileurl(String fileurl) {
        this.fileurl = fileurl == null ? null : fileurl.trim();
    }
    /**   版本号  version   **/
    public Integer getVersion() {
        return version;
    }
    /**   版本号  version   **/
    public void setVersion(Integer version) {
        this.version = version;
    }
    /**   备注  remark   **/
    public String getRemark() {
        return remark;
    }
    /**   备注  remark   **/
    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }
    /**   创建时间  created   **/
    public Date getCreated() {
        return created;
    }
    /**   创建时间  created   **/
    public void setCreated(Date created) {
        this.created = created;
    }
    /**   更新时间  updated   **/
    public Date getUpdated() {
        return updated;
    }
    /**   更新时间  updated   **/
    public void setUpdated(Date updated) {
        this.updated = updated;
    }
}
src/main/java/com/gk/firework/Domain/AssessApply.java
对比新文件
@@ -0,0 +1,287 @@
package com.gk.firework.Domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gk.firework.Domain.Enum.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.Serializable;
import java.util.Date;
@TableName("assessapply")
public class AssessApply implements Serializable {
    private static final long serialVersionUID = 1L;
    /** 主键id  id **/
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 类型(1销售评定,2准入评定)  type **/
    private AssessType type;
    /** 单子编号  code **/
    private String code;
    /** 单子状态(待提交,待审批,审批通过,驳回)  status **/
    private AssessApplyStatus status;
    /** 提出人名称  requestor **/
    private String requestor;
    private Long requestorid;
    /** 单子提交时间  submittime **/
    private Date submittime;
    /** 审批人名称  approver **/
    private String approver;
    /** 审批时间  approvetime **/
    private Date approvetime;
    /** 审批备注  approvenote **/
    private String approvenote;
    /** 企业名  enterprisename **/
    private String enterprisename;
    /** 企业单位编号  enterprisenumber **/
    private String enterprisenumber;
    private PunishStatus punishstatus;
    /** 上传材料  path1 **/
    private String path1;
    /** 处罚原因  punishmentreason **/
    private String punishmentreason;
    /** 处罚措施(吊销或者停用一段时间)  punishmentmeasure **/
    private AssessPunishment punishmentmeasure;
    /** 创建时间  createtime **/
    private Date createtime;
    /** 修改时间  modifytime **/
    private Date modifytime;
    /** 最后一次驳回的时间  lastrejecttime **/
    private Date lastrejecttime;
    private String lastrejectreason;
    @TableField(exist = false)
    private MultipartFile file;
    private boolean validflag;
    /**   主键id  id   **/
    public Long getId() {
        return id;
    }
    /**   主键id  id   **/
    public void setId(Long id) {
        this.id = id;
    }
    public AssessType getType() {
        return type;
    }
    public void setType(AssessType type) {
        this.type = type;
    }
    /**   单子编号  code   **/
    public String getCode() {
        return code;
    }
    /**   单子编号  code   **/
    public void setCode(String code) {
        this.code = code == null ? null : code.trim();
    }
    public AssessApplyStatus getStatus() {
        return status;
    }
    public void setStatus(AssessApplyStatus status) {
        this.status = status;
    }
    /**   提出人名称  requestor   **/
    public String getRequestor() {
        return requestor;
    }
    /**   提出人名称  requestor   **/
    public void setRequestor(String requestor) {
        this.requestor = requestor == null ? null : requestor.trim();
    }
    /**   单子提交时间  submittime   **/
    public Date getSubmittime() {
        return submittime;
    }
    /**   单子提交时间  submittime   **/
    public void setSubmittime(Date submittime) {
        this.submittime = submittime;
    }
    /**   审批人名称  approver   **/
    public String getApprover() {
        return approver;
    }
    /**   审批人名称  approver   **/
    public void setApprover(String approver) {
        this.approver = approver == null ? null : approver.trim();
    }
    /**   审批时间  approvetime   **/
    public Date getApprovetime() {
        return approvetime;
    }
    /**   审批时间  approvetime   **/
    public void setApprovetime(Date approvetime) {
        this.approvetime = approvetime;
    }
    /**   审批备注  approvenote   **/
    public String getApprovenote() {
        return approvenote;
    }
    /**   审批备注  approvenote   **/
    public void setApprovenote(String approvenote) {
        this.approvenote = approvenote == null ? null : approvenote.trim();
    }
    /**   企业名  enterprisename   **/
    public String getEnterprisename() {
        return enterprisename;
    }
    /**   企业名  enterprisename   **/
    public void setEnterprisename(String enterprisename) {
        this.enterprisename = enterprisename == null ? null : enterprisename.trim();
    }
    /**   企业单位编号  enterprisenumber   **/
    public String getEnterprisenumber() {
        return enterprisenumber;
    }
    /**   企业单位编号  enterprisenumber   **/
    public void setEnterprisenumber(String enterprisenumber) {
        this.enterprisenumber = enterprisenumber == null ? null : enterprisenumber.trim();
    }
    public PunishStatus getPunishstatus() {
        return punishstatus;
    }
    public void setPunishstatus(PunishStatus punishstatus) {
        this.punishstatus = punishstatus;
    }
    /**   上传材料  path1   **/
    public String getPath1() {
        return path1;
    }
    /**   上传材料  path1   **/
    public void setPath1(String path1) {
        this.path1 = path1 == null ? null : path1.trim();
    }
    /**   处罚原因  punishmentreason   **/
    public String getPunishmentreason() {
        return punishmentreason;
    }
    /**   处罚原因  punishmentreason   **/
    public void setPunishmentreason(String punishmentreason) {
        this.punishmentreason = punishmentreason == null ? null : punishmentreason.trim();
    }
    public AssessPunishment getPunishmentmeasure() {
        return punishmentmeasure;
    }
    public void setPunishmentmeasure(AssessPunishment punishmentmeasure) {
        this.punishmentmeasure = punishmentmeasure;
    }
    /**   创建时间  createtime   **/
    public Date getCreatetime() {
        return createtime;
    }
    /**   创建时间  createtime   **/
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }
    /**   修改时间  modifytime   **/
    public Date getModifytime() {
        return modifytime;
    }
    /**   修改时间  modifytime   **/
    public void setModifytime(Date modifytime) {
        this.modifytime = modifytime;
    }
    /**   最后一次驳回的时间  lastrejecttime   **/
    public Date getLastrejecttime() {
        return lastrejecttime;
    }
    /**   最后一次驳回的时间  lastrejecttime   **/
    public void setLastrejecttime(Date lastrejecttime) {
        this.lastrejecttime = lastrejecttime;
    }
    public MultipartFile getFile() {
        return file;
    }
    public void setFile(MultipartFile file) {
        this.file = file;
    }
    public boolean isValidflag() {
        return validflag;
    }
    public void setValidflag(boolean validflag) {
        this.validflag = validflag;
    }
    public Long getRequestorid() {
        return requestorid;
    }
    public void setRequestorid(Long requestorid) {
        this.requestorid = requestorid;
    }
    public String getLastrejectreason() {
        return lastrejectreason;
    }
    public void setLastrejectreason(String lastrejectreason) {
        this.lastrejectreason = lastrejectreason;
    }
}
src/main/java/com/gk/firework/Domain/AuthorizationInfo.java
对比新文件
@@ -0,0 +1,144 @@
package com.gk.firework.Domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
@TableName("authorization")
public class AuthorizationInfo {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 企业编号  enterprisenumber **/
    private String enterprisenumber;
    /** 授权码  authcode **/
    private String authcode;
    /** 授权码前三位(唯一确定一家企业)  authcodeprefix **/
    private String authcodeprefix;
    /** 合同编号  contractcode **/
    private String contractcode;
    /** 创建时间  createdat **/
    private Date createdat;
    /** 创建人  createdby **/
    private String createdby;
    /** 标记  flag 0标配  1无身份证阅读器  2无扫码枪 3全无**/
    private Byte flag;
    /** 最后使用时间  lasttime **/
    private Date lasttime;
    /** 是否使用(0.未启用;1.已启用)  status **/
    private Byte status;
    /**     id   **/
    public Long getId() {
        return id;
    }
    /**     id   **/
    public void setId(Long id) {
        this.id = id;
    }
    /**   企业编号  enterprisenumber   **/
    public String getEnterprisenumber() {
        return enterprisenumber;
    }
    /**   企业编号  enterprisenumber   **/
    public void setEnterprisenumber(String enterprisenumber) {
        this.enterprisenumber = enterprisenumber == null ? null : enterprisenumber.trim();
    }
    /**   授权码  authcode   **/
    public String getAuthcode() {
        return authcode;
    }
    /**   授权码  authcode   **/
    public void setAuthcode(String authcode) {
        this.authcode = authcode == null ? null : authcode.trim();
    }
    /**   授权码前三位(唯一确定一家企业)  authcodeprefix   **/
    public String getAuthcodeprefix() {
        return authcodeprefix;
    }
    /**   授权码前三位(唯一确定一家企业)  authcodeprefix   **/
    public void setAuthcodeprefix(String authcodeprefix) {
        this.authcodeprefix = authcodeprefix == null ? null : authcodeprefix.trim();
    }
    /**   合同编号  contractcode   **/
    public String getContractcode() {
        return contractcode;
    }
    /**   合同编号  contractcode   **/
    public void setContractcode(String contractcode) {
        this.contractcode = contractcode == null ? null : contractcode.trim();
    }
    /**   创建时间  createdat   **/
    public Date getCreatedat() {
        return createdat;
    }
    /**   创建时间  createdat   **/
    public void setCreatedat(Date createdat) {
        this.createdat = createdat;
    }
    /**   创建人  createdby   **/
    public String getCreatedby() {
        return createdby;
    }
    /**   创建人  createdby   **/
    public void setCreatedby(String createdby) {
        this.createdby = createdby == null ? null : createdby.trim();
    }
    /**   标记  flag   **/
    public Byte getFlag() {
        return flag;
    }
    /**   标记  flag   **/
    public void setFlag(Byte flag) {
        this.flag = flag;
    }
    /**   最后使用时间  lasttime   **/
    public Date getLasttime() {
        return lasttime;
    }
    /**   最后使用时间  lasttime   **/
    public void setLasttime(Date lasttime) {
        this.lasttime = lasttime;
    }
    /**   是否使用(0.未启用;1.已启用)  status   **/
    public Byte getStatus() {
        return status;
    }
    /**   是否使用(0.未启用;1.已启用)  status   **/
    public void setStatus(Byte status) {
        this.status = status;
    }
}
src/main/java/com/gk/firework/Domain/BO/DirectionProductBO.java
对比新文件
@@ -0,0 +1,39 @@
package com.gk.firework.Domain.BO;
import java.io.Serializable;
import java.math.BigDecimal;
public class DirectionProductBO implements Serializable {
    // 22|19 位码
    private String directionCode;
    // 产品10位码
    private String itemCode;
    // 分表后缀
    private String slice;
    public String getDirectionCode() {
        return directionCode;
    }
    public void setDirectionCode(String directionCode) {
        this.directionCode = directionCode;
    }
    public String getItemCode() {
        return itemCode;
    }
    public void setItemCode(String itemCode) {
        this.itemCode = itemCode;
    }
    public String getSlice() {
        return slice;
    }
    public void setSlice(String slice) {
        this.slice = slice;
    }
}
src/main/java/com/gk/firework/Domain/BO/ProductLocusInfoBO.java
对比新文件
@@ -0,0 +1,16 @@
package com.gk.firework.Domain.BO;
import com.gk.firework.Domain.ProductLocusInfo;
public class ProductLocusInfoBO extends ProductLocusInfo {
    private String slice;
    public String getSlice() {
        return slice;
    }
    public void setSlice(String slice) {
        this.slice = slice;
    }
}
src/main/java/com/gk/firework/Domain/BO/SaleOrderDetailInfoBO.java
对比新文件
@@ -0,0 +1,30 @@
package com.gk.firework.Domain.BO;
import com.gk.firework.Domain.DO.ProductDO;
import com.gk.firework.Domain.SaleOrderDetailInfo;
import com.gk.firework.Domain.SaleOrderInfo;
import com.gk.firework.Domain.StockInfo;
import org.apache.commons.math3.stat.descriptive.summary.Product;
public class SaleOrderDetailInfoBO extends SaleOrderDetailInfo {
    private ProductDO productDO;
    private StockInfo stockInfo;
    public ProductDO getProductDO() {
        return productDO;
    }
    public void setProductDO(ProductDO productDO) {
        this.productDO = productDO;
    }
    public StockInfo getStockInfo() {
        return stockInfo;
    }
    public void setStockInfo(StockInfo stockInfo) {
        this.stockInfo = stockInfo;
    }
}
src/main/java/com/gk/firework/Domain/BlackList.java
对比新文件
@@ -0,0 +1,130 @@
package com.gk.firework.Domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
@TableName("blacklist")
public class BlackList implements Serializable {
    private static final long serialVersionUID = 1L;
    /** 主键id  id **/
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 企业编号  enterprisenumber **/
    private String enterprisenumber;
    /** 企业名称  enterprisename **/
    private String enterprisename;
    /** 创建时间  createtime **/
    private Date createtime;
    /** 创建人姓名  createby **/
    private String createby;
    /** 创建人id createbyid **/
    private Long createbyid;
    /** 更新时间  modifytime **/
    private Date modifytime;
    /** 更信人  modifyby **/
    private String modifyby;
    /** 有效标识  validflag **/
    private Boolean validflag;
    /**   主键id  id   **/
    public Long getId() {
        return id;
    }
    /**   主键id  id   **/
    public void setId(Long id) {
        this.id = id;
    }
    /**   企业编号  enterprisenumber   **/
    public String getEnterprisenumber() {
        return enterprisenumber;
    }
    /**   企业编号  enterprisenumber   **/
    public void setEnterprisenumber(String enterprisenumber) {
        this.enterprisenumber = enterprisenumber == null ? null : enterprisenumber.trim();
    }
    /**   企业名称  enterprisename   **/
    public String getEnterprisename() {
        return enterprisename;
    }
    /**   企业名称  enterprisename   **/
    public void setEnterprisename(String enterprisename) {
        this.enterprisename = enterprisename == null ? null : enterprisename.trim();
    }
    /**   创建时间  createtime   **/
    public Date getCreatetime() {
        return createtime;
    }
    /**   创建时间  createtime   **/
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }
    /**   创建人姓名  createby   **/
    public String getCreateby() {
        return createby;
    }
    /**   创建人姓名  createby   **/
    public void setCreateby(String createby) {
        this.createby = createby == null ? null : createby.trim();
    }
    /**   更新时间  modifytime   **/
    public Date getModifytime() {
        return modifytime;
    }
    /**   更新时间  modifytime   **/
    public void setModifytime(Date modifytime) {
        this.modifytime = modifytime;
    }
    /**   更信人  modifyby   **/
    public String getModifyby() {
        return modifyby;
    }
    /**   更信人  modifyby   **/
    public void setModifyby(String modifyby) {
        this.modifyby = modifyby == null ? null : modifyby.trim();
    }
    /**   有效标识  validflag   **/
    public Boolean getValidflag() {
        return validflag;
    }
    /**   有效标识  validflag   **/
    public void setValidflag(Boolean validflag) {
        this.validflag = validflag;
    }
    public Long getCreatebyid() {
        return createbyid;
    }
    public void setCreatebyid(Long createbyid) {
        this.createbyid = createbyid;
    }
}
src/main/java/com/gk/firework/Domain/ContractDetailInfo.java
对比新文件
@@ -0,0 +1,102 @@
package com.gk.firework.Domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
@TableName("contractdetail")
public class ContractDetailInfo implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 合同单号  ordercode **/
    private String ordercode;
    /** 流向码(十位)  directioncode **/
    private String directioncode;
    /** 产品名(限制长度255)  name **/
    private String name;
    /** 订货数量  num **/
    private Integer num;
    /** 单箱进货价  price **/
    private BigDecimal price;
    private Integer changenum;
    /**     id   **/
    public Long getId() {
        return id;
    }
    /**     id   **/
    public void setId(Long id) {
        this.id = id;
    }
    /**   合同单号  ordercode   **/
    public String getOrdercode() {
        return ordercode;
    }
    /**   合同单号  ordercode   **/
    public void setOrdercode(String ordercode) {
        this.ordercode = ordercode == null ? null : ordercode.trim();
    }
    /**   流向码(十位)  directioncode   **/
    public String getDirectioncode() {
        return directioncode;
    }
    /**   流向码(十位)  directioncode   **/
    public void setDirectioncode(String directioncode) {
        this.directioncode = directioncode == null ? null : directioncode.trim();
    }
    /**   产品名(限制长度255)  name   **/
    public String getName() {
        return name;
    }
    /**   产品名(限制长度255)  name   **/
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }
    /**   订货数量  num   **/
    public Integer getNum() {
        return num;
    }
    /**   订货数量  num   **/
    public void setNum(Integer num) {
        this.num = num;
    }
    public BigDecimal getPrice() {
        return price;
    }
    public void setPrice(BigDecimal price) {
        this.price = price;
    }
    public Integer getChangenum() {
        return changenum;
    }
    public void setChangenum(Integer changenum) {
        this.changenum = changenum;
    }
}
src/main/java/com/gk/firework/Domain/ContractFile.java
对比新文件
@@ -0,0 +1,160 @@
package com.gk.firework.Domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
@TableName("contractfile")
public class ContractFile implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    /** 主键id  id **/
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 合同单号  ordercode **/
    private String ordercode;
    /** 文件名  filename **/
    private String filename;
    /** 地址  url **/
    private String url;
    /** 有效标识  validflag **/
    private Boolean validflag;
    /** 创建时间  createtime **/
    private Date createtime;
    /** 创建人id  createby **/
    private Long createby;
    /** 创建人name  createbyname **/
    private String createbyname;
    /** 更新时间  updatetime **/
    private Date updatetime;
    /** 更新人id  updateby **/
    private Long updateby;
    /** 更新人name  updatebyname **/
    private String updatebyname;
    /**   主键id  id   **/
    public Long getId() {
        return id;
    }
    /**   主键id  id   **/
    public void setId(Long id) {
        this.id = id;
    }
    /**   合同单号  ordercode   **/
    public String getOrdercode() {
        return ordercode;
    }
    /**   合同单号  ordercode   **/
    public void setOrdercode(String ordercode) {
        this.ordercode = ordercode == null ? null : ordercode.trim();
    }
    /**   文件名  filename   **/
    public String getFilename() {
        return filename;
    }
    /**   文件名  filename   **/
    public void setFilename(String filename) {
        this.filename = filename == null ? null : filename.trim();
    }
    /**   地址  url   **/
    public String getUrl() {
        return url;
    }
    /**   地址  url   **/
    public void setUrl(String url) {
        this.url = url == null ? null : url.trim();
    }
    /**   有效标识  validflag   **/
    public Boolean getValidflag() {
        return validflag;
    }
    /**   有效标识  validflag   **/
    public void setValidflag(Boolean validflag) {
        this.validflag = validflag;
    }
    /**   创建时间  createtime   **/
    public Date getCreatetime() {
        return createtime;
    }
    /**   创建时间  createtime   **/
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }
    /**   创建人id  createby   **/
    public Long getCreateby() {
        return createby;
    }
    /**   创建人id  createby   **/
    public void setCreateby(Long createby) {
        this.createby = createby;
    }
    /**   创建人name  createbyname   **/
    public String getCreatebyname() {
        return createbyname;
    }
    /**   创建人name  createbyname   **/
    public void setCreatebyname(String createbyname) {
        this.createbyname = createbyname == null ? null : createbyname.trim();
    }
    /**   更新时间  updatetime   **/
    public Date getUpdatetime() {
        return updatetime;
    }
    /**   更新时间  updatetime   **/
    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }
    /**   更新人id  updateby   **/
    public Long getUpdateby() {
        return updateby;
    }
    /**   更新人id  updateby   **/
    public void setUpdateby(Long updateby) {
        this.updateby = updateby;
    }
    /**   更新人name  updatebyname   **/
    public String getUpdatebyname() {
        return updatebyname;
    }
    /**   更新人name  updatebyname   **/
    public void setUpdatebyname(String updatebyname) {
        this.updatebyname = updatebyname == null ? null : updatebyname.trim();
    }
}
src/main/java/com/gk/firework/Domain/ContractLogInfo.java
对比新文件
@@ -0,0 +1,80 @@
package com.gk.firework.Domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
@TableName("contractlog")
public class ContractLogInfo implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 操作时间  operatordate **/
    private Date operatordate;
    /** 操作日志  optlog **/
    private String optlog;
    /** 操作人  operator **/
    private String operator;
    /** 合同单号  ordercode **/
    private String ordercode;
    /**     id   **/
    public Long getId() {
        return id;
    }
    /**     id   **/
    public void setId(Long id) {
        this.id = id;
    }
    /**   操作时间  operatordate   **/
    public Date getOperatordate() {
        return operatordate;
    }
    /**   操作时间  operatordate   **/
    public void setOperatordate(Date operatordate) {
        this.operatordate = operatordate;
    }
    /**   操作日志  optlog   **/
    public String getOptlog() {
        return optlog;
    }
    /**   操作日志  optlog   **/
    public void setOptlog(String optlog) {
        this.optlog = optlog == null ? null : optlog.trim();
    }
    /**   操作人  operator   **/
    public String getOperator() {
        return operator;
    }
    /**   操作人  operator   **/
    public void setOperator(String operator) {
        this.operator = operator == null ? null : operator.trim();
    }
    /**   合同单号  ordercode   **/
    public String getOrdercode() {
        return ordercode;
    }
    /**   合同单号  ordercode   **/
    public void setOrdercode(String ordercode) {
        this.ordercode = ordercode == null ? null : ordercode.trim();
    }
}
src/main/java/com/gk/firework/Domain/ContractOrderInfo.java
对比新文件
@@ -0,0 +1,696 @@
package com.gk.firework.Domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@ApiModel("合同订单类")
@TableName("contractorder")
public class ContractOrderInfo implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("合同订单id")
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 合同单号  ordercode **/
    @ApiModelProperty("合同单号")
    private String ordercode;
    /** 规律合同编号  regularcode **/
    @ApiModelProperty("规律合同编号")
    private String regularcode;
    /** 合同状态(待提交、待审核、待确认、已驳回、确认生产、拒绝生产)  status **/
    @ApiModelProperty("合同状态")
    private String status;
    @ApiModelProperty("标签退回状态")
    // 未退回,有退回
    private String returnstatus;
    /** 甲方(经营企业)  operator **/
    private String operator;
    /** 乙方(生产企业)  manufacturer **/
    private String manufacturer;
    /** 初始合同  origincontract **/
    private String origincontract;
    /** 确认合同  confirmcontract **/
    private String confirmcontract;
    /** 创建人  createdby **/
    private String createdby;
    /** 创建时间  createddate **/
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createddate;
    /** 更新人  modifiedby **/
    private String modifiedby;
    /** 生产条码时间  producedate **/
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date producedate;
    /** 更新时间  modifieddate **/
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifieddate;
    /** 是否删除  isdel  1删除 0未删**/
    private Byte isdel;
    /**审批意见**/
    private String comments;
    /**生产意见**/
    private String opinion;
    /**购买单位**/
    //企业编号 甲方
    private String purchaseenterprisenumber;
    //单位名称
    private String purchaseunitname;
    //单位地址
    private String purchaseunitaddress;
    //法定代表人
    private String purchaserepresentative;
    //法定代表人联系电话
    private String purchaserepresentativephone;
    //法定代表人电子邮箱
    private String purchaserepresentativeemail;
    //开户银行
    private String purchasebank;
    //许可证编号
    private String purchaselicensenumber;
    //邮政编码
    private String purchasezipcode;
    //委托代理人
    private String purchaseagent;
    //委托代理人联系电话
    private String purchaseagentphone;
    //委托代理人电子邮箱
    private String purchaseagentemail;
    //账户
    private String purchaseaccount;
    /**供货单位**/
    //企业编号 乙方
    private String supplyenterprisenumber;
    //单位名称
    private String supplyunitname;
    //单位地址
    private String supplyunitaddress;
    //法定代表人
    private String supplyrepresentative;
    //法定代表人联系电话
    private String supplyrepresentativephone;
    //法定代表人电子邮箱
    private String supplyrepresentativeemail;
    //开户银行
    private String supplybank;
    //许可证编号
    private String supplylicensenumber;
    //邮政编码
    private String supplyzipcode;
    //委托代理人
    private String supplyagent;
    //委托代理人联系电话
    private String supplyagentphone;
    //委托代理人电子邮箱
    private String supplyagentemail;
    //账户
    private String supplyaccount;
    //签订时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date signtime;
    //签订地点
    private String signlocation;
    //合同内容
    //合同内容:产品质量标准及要求
    private String qualitystandard;
    //合同内容:禁(限)用药物要求
    private String prohibiteddrug;
    //合同内容:产品包装标准及要求
    private String packingstandard;
    //合同内容:提(交)货时间和地点
    private String timeandlocation;
    //合同内容:运输方式及费用负担
    private String transportandcost;
    //合同内容:验收标准与方法
    private String acceptstandard;
    //合同内容:提出异议期限
    private String objectdeadline;
    //合同内容:结算方式与期限
    private String settlemethod;
    //合同内容:产品安全与质量责任
    private String productsafetyandquality;
    //合同内容:运输安全责任
    private String transportsafety;
    //合同内容:违约责任
    private String breakcontract;
    //合同内容:合同争议的解决方式:序号
    private String contractdisputesfelid;
    //合同内容:合同争议的解决方式:序号内容
    private String contractdisputesfelidcontent;
    //合同内容:其他约定事项
    private String otheragreedmatters;
    //合同有效期
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date validstarttime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date validendtime;
    @TableField(exist = false)
    private ContractFile  contractFile;
    /**     id   **/
    public Long getId() {
        return id;
    }
    /**     id   **/
    public void setId(Long id) {
        this.id = id;
    }
    /**   合同单号  ordercode   **/
    public String getOrdercode() {
        return ordercode;
    }
    /**   合同单号  ordercode   **/
    public void setOrdercode(String ordercode) {
        this.ordercode = ordercode == null ? null : ordercode.trim();
    }
    /**   合同状态(待提交、待审核、已通过、已拒绝)  status   **/
    public String getStatus() {
        return status;
    }
    /**   合同状态(待提交、待审核、已通过、已拒绝)  status   **/
    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }
    /**   甲方(经营企业)  operator   **/
    public String getOperator() {
        return operator;
    }
    /**   甲方(经营企业)  operator   **/
    public void setOperator(String operator) {
        this.operator = operator == null ? null : operator.trim();
    }
    /**   乙方(生产企业)  manufacturer   **/
    public String getManufacturer() {
        return manufacturer;
    }
    /**   乙方(生产企业)  manufacturer   **/
    public void setManufacturer(String manufacturer) {
        this.manufacturer = manufacturer == null ? null : manufacturer.trim();
    }
    /**   初始合同  origincontract   **/
    public String getOrigincontract() {
        return origincontract;
    }
    /**   初始合同  origincontract   **/
    public void setOrigincontract(String origincontract) {
        this.origincontract = origincontract == null ? null : origincontract.trim();
    }
    /**   确认合同  confirmcontract   **/
    public String getConfirmcontract() {
        return confirmcontract;
    }
    /**   确认合同  confirmcontract   **/
    public void setConfirmcontract(String confirmcontract) {
        this.confirmcontract = confirmcontract == null ? null : confirmcontract.trim();
    }
    /**   创建人  createdby   **/
    public String getCreatedby() {
        return createdby;
    }
    /**   创建人  createdby   **/
    public void setCreatedby(String createdby) {
        this.createdby = createdby == null ? null : createdby.trim();
    }
    /**   创建时间  createddate   **/
    public Date getCreateddate() {
        return createddate;
    }
    /**   创建时间  createddate   **/
    public void setCreateddate(Date createddate) {
        this.createddate = createddate;
    }
    /**   更新人  modifiedby   **/
    public String getModifiedby() {
        return modifiedby;
    }
    /**   更新人  modifiedby   **/
    public void setModifiedby(String modifiedby) {
        this.modifiedby = modifiedby == null ? null : modifiedby.trim();
    }
    /**   更新时间  modifieddate   **/
    public Date getModifieddate() {
        return modifieddate;
    }
    /**   更新时间  modifieddate   **/
    public void setModifieddate(Date modifieddate) {
        this.modifieddate = modifieddate;
    }
    public Byte getIsdel() {
        return isdel;
    }
    public void setIsdel(Byte isdel) {
        this.isdel = isdel;
    }
    public String getComments() {
        return comments;
    }
    public void setComments(String comments) {
        this.comments = comments;
    }
    public String getOpinion() {
        return opinion;
    }
    public void setOpinion(String opinion) {
        this.opinion = opinion;
    }
    public String getRegularcode() {
        return regularcode;
    }
    public void setRegularcode(String regularcode) {
        this.regularcode = regularcode;
    }
    public String getPurchaseunitname() {
        return purchaseunitname;
    }
    public void setPurchaseunitname(String purchaseunitname) {
        this.purchaseunitname = purchaseunitname;
    }
    public String getPurchaseunitaddress() {
        return purchaseunitaddress;
    }
    public void setPurchaseunitaddress(String purchaseunitaddress) {
        this.purchaseunitaddress = purchaseunitaddress;
    }
    public String getPurchaserepresentative() {
        return purchaserepresentative;
    }
    public void setPurchaserepresentative(String purchaserepresentative) {
        this.purchaserepresentative = purchaserepresentative;
    }
    public String getPurchaserepresentativephone() {
        return purchaserepresentativephone;
    }
    public void setPurchaserepresentativephone(String purchaserepresentativephone) {
        this.purchaserepresentativephone = purchaserepresentativephone;
    }
    public String getPurchasebank() {
        return purchasebank;
    }
    public void setPurchasebank(String purchasebank) {
        this.purchasebank = purchasebank;
    }
    public String getPurchaselicensenumber() {
        return purchaselicensenumber;
    }
    public void setPurchaselicensenumber(String purchaselicensenumber) {
        this.purchaselicensenumber = purchaselicensenumber;
    }
    public String getPurchasezipcode() {
        return purchasezipcode;
    }
    public void setPurchasezipcode(String purchasezipcode) {
        this.purchasezipcode = purchasezipcode;
    }
    public String getPurchaseagent() {
        return purchaseagent;
    }
    public void setPurchaseagent(String purchaseagent) {
        this.purchaseagent = purchaseagent;
    }
    public String getPurchaseagentphone() {
        return purchaseagentphone;
    }
    public void setPurchaseagentphone(String purchaseagentphone) {
        this.purchaseagentphone = purchaseagentphone;
    }
    public String getPurchaseagentemail() {
        return purchaseagentemail;
    }
    public void setPurchaseagentemail(String purchaseagentemail) {
        this.purchaseagentemail = purchaseagentemail;
    }
    public String getPurchaseaccount() {
        return purchaseaccount;
    }
    public void setPurchaseaccount(String purchaseaccount) {
        this.purchaseaccount = purchaseaccount;
    }
    public String getSupplyunitname() {
        return supplyunitname;
    }
    public void setSupplyunitname(String supplyunitname) {
        this.supplyunitname = supplyunitname;
    }
    public String getSupplyunitaddress() {
        return supplyunitaddress;
    }
    public void setSupplyunitaddress(String supplyunitaddress) {
        this.supplyunitaddress = supplyunitaddress;
    }
    public String getSupplyrepresentative() {
        return supplyrepresentative;
    }
    public void setSupplyrepresentative(String supplyrepresentative) {
        this.supplyrepresentative = supplyrepresentative;
    }
    public String getSupplyrepresentativephone() {
        return supplyrepresentativephone;
    }
    public void setSupplyrepresentativephone(String supplyrepresentativephone) {
        this.supplyrepresentativephone = supplyrepresentativephone;
    }
    public String getSupplybank() {
        return supplybank;
    }
    public void setSupplybank(String supplybank) {
        this.supplybank = supplybank;
    }
    public String getSupplylicensenumber() {
        return supplylicensenumber;
    }
    public void setSupplylicensenumber(String supplylicensenumber) {
        this.supplylicensenumber = supplylicensenumber;
    }
    public String getSupplyzipcode() {
        return supplyzipcode;
    }
    public void setSupplyzipcode(String supplyzipcode) {
        this.supplyzipcode = supplyzipcode;
    }
    public String getSupplyagent() {
        return supplyagent;
    }
    public void setSupplyagent(String supplyagent) {
        this.supplyagent = supplyagent;
    }
    public String getSupplyagentphone() {
        return supplyagentphone;
    }
    public void setSupplyagentphone(String supplyagentphone) {
        this.supplyagentphone = supplyagentphone;
    }
    public String getSupplyagentemail() {
        return supplyagentemail;
    }
    public void setSupplyagentemail(String supplyagentemail) {
        this.supplyagentemail = supplyagentemail;
    }
    public String getSupplyaccount() {
        return supplyaccount;
    }
    public void setSupplyaccount(String supplyaccount) {
        this.supplyaccount = supplyaccount;
    }
    public Date getSigntime() {
        return signtime;
    }
    public void setSigntime(Date signtime) {
        this.signtime = signtime;
    }
    public String getSignlocation() {
        return signlocation;
    }
    public void setSignlocation(String signlocation) {
        this.signlocation = signlocation;
    }
    public String getQualitystandard() {
        return qualitystandard;
    }
    public void setQualitystandard(String qualitystandard) {
        this.qualitystandard = qualitystandard;
    }
    public String getProhibiteddrug() {
        return prohibiteddrug;
    }
    public void setProhibiteddrug(String prohibiteddrug) {
        this.prohibiteddrug = prohibiteddrug;
    }
    public String getPackingstandard() {
        return packingstandard;
    }
    public void setPackingstandard(String packingstandard) {
        this.packingstandard = packingstandard;
    }
    public String getTimeandlocation() {
        return timeandlocation;
    }
    public void setTimeandlocation(String timeandlocation) {
        this.timeandlocation = timeandlocation;
    }
    public String getTransportandcost() {
        return transportandcost;
    }
    public void setTransportandcost(String transportandcost) {
        this.transportandcost = transportandcost;
    }
    public String getAcceptstandard() {
        return acceptstandard;
    }
    public void setAcceptstandard(String acceptstandard) {
        this.acceptstandard = acceptstandard;
    }
    public String getObjectdeadline() {
        return objectdeadline;
    }
    public void setObjectdeadline(String objectdeadline) {
        this.objectdeadline = objectdeadline;
    }
    public String getSettlemethod() {
        return settlemethod;
    }
    public void setSettlemethod(String settlemethod) {
        this.settlemethod = settlemethod;
    }
    public String getProductsafetyandquality() {
        return productsafetyandquality;
    }
    public void setProductsafetyandquality(String productsafetyandquality) {
        this.productsafetyandquality = productsafetyandquality;
    }
    public String getTransportsafety() {
        return transportsafety;
    }
    public void setTransportsafety(String transportsafety) {
        this.transportsafety = transportsafety;
    }
    public String getBreakcontract() {
        return breakcontract;
    }
    public void setBreakcontract(String breakcontract) {
        this.breakcontract = breakcontract;
    }
    public String getContractdisputesfelid() {
        return contractdisputesfelid;
    }
    public void setContractdisputesfelid(String contractdisputesfelid) {
        this.contractdisputesfelid = contractdisputesfelid;
    }
    public String getContractdisputesfelidcontent() {
        return contractdisputesfelidcontent;
    }
    public void setContractdisputesfelidcontent(String contractdisputesfelidcontent) {
        this.contractdisputesfelidcontent = contractdisputesfelidcontent;
    }
    public String getOtheragreedmatters() {
        return otheragreedmatters;
    }
    public void setOtheragreedmatters(String otheragreedmatters) {
        this.otheragreedmatters = otheragreedmatters;
    }
    public Date getValidstarttime() {
        return validstarttime;
    }
    public void setValidstarttime(Date validstarttime) {
        this.validstarttime = validstarttime;
    }
    public Date getValidendtime() {
        return validendtime;
    }
    public void setValidendtime(Date validendtime) {
        this.validendtime = validendtime;
    }
    public String getPurchaseenterprisenumber() {
        return purchaseenterprisenumber;
    }
    public void setPurchaseenterprisenumber(String purchaseenterprisenumber) {
        this.purchaseenterprisenumber = purchaseenterprisenumber;
    }
    public String getSupplyenterprisenumber() {
        return supplyenterprisenumber;
    }
    public void setSupplyenterprisenumber(String supplyenterprisenumber) {
        this.supplyenterprisenumber = supplyenterprisenumber;
    }
    public String getPurchaserepresentativeemail() {
        return purchaserepresentativeemail;
    }
    public void setPurchaserepresentativeemail(String purchaserepresentativeemail) {
        this.purchaserepresentativeemail = purchaserepresentativeemail;
    }
    public String getSupplyrepresentativeemail() {
        return supplyrepresentativeemail;
    }
    public void setSupplyrepresentativeemail(String supplyrepresentativeemail) {
        this.supplyrepresentativeemail = supplyrepresentativeemail;
    }
    public ContractFile getContractFile() {
        return contractFile;
    }
    public void setContractFile(ContractFile contractFile) {
        this.contractFile = contractFile;
    }
    public String getReturnstatus() {
        return returnstatus;
    }
    public void setReturnstatus(String returnstatus) {
        this.returnstatus = returnstatus;
    }
    public Date getProducedate() {
        return producedate;
    }
    public void setProducedate(Date producedate) {
        this.producedate = producedate;
    }
}
src/main/java/com/gk/firework/Domain/ContractUnitDetail.java
对比新文件
@@ -0,0 +1,294 @@
package com.gk.firework.Domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
@TableName("contractunitdetail")
public class ContractUnitDetail implements Serializable {
    private static final long serialVersionUID = 1L;
    /** 主键id  id **/
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 购买单位|供货单位(0|1)  type **/
    private Integer type;
    /** 单位:单位名称  unitname **/
    private String unitname;
    /** 单位:单位地址  unitaddress **/
    private String unitaddress;
    /** 单位:法定代表人  representative **/
    private String representative;
    /** 单位:法定代表人联系电话  representativephone **/
    private String representativephone;
    private String representativeemail;
    /** 单位:开户银行  bank **/
    private String bank;
    /** 单位:许可证编号  licensenumber **/
    private String licensenumber;
    /** 单位:邮政编码  zipcode **/
    private String zipcode;
    /** 单位:委托代理人  agent **/
    private String agent;
    /** 单位:委托代理人联系电话  agentphone **/
    private String agentphone;
    /** 单位:委托代理人电子邮箱  agentemail **/
    private String agentemail;
    /** 单位:账户  account **/
    private String account;
    /** 创建人id  createby **/
    private Long createby;
    /** 创建人name  createbyname **/
    private String createbyname;
    /** 创建时间  createtime **/
    private Date createtime;
    /** 更信人id  updateby **/
    private Long updateby;
    /** 更新时间  updatetime **/
    private Date updatetime;
    /** 更新人name  updatebyname **/
    private String updatebyname;
    /** 有效标识  validflag **/
    private Boolean validflag;
    private String enterprisenumber;
    /**   主键id  id   **/
    public Long getId() {
        return id;
    }
    /**   主键id  id   **/
    public void setId(Long id) {
        this.id = id;
    }
    /**   购买单位|供货单位(0|1)  type   **/
    public Integer getType() {
        return type;
    }
    public void setType(Integer type) {
        this.type = type;
    }
    /**   单位:单位名称  unitname   **/
    public String getUnitname() {
        return unitname;
    }
    /**   单位:单位名称  unitname   **/
    public void setUnitname(String unitname) {
        this.unitname = unitname == null ? null : unitname.trim();
    }
    /**   单位:单位地址  unitaddress   **/
    public String getUnitaddress() {
        return unitaddress;
    }
    /**   单位:单位地址  unitaddress   **/
    public void setUnitaddress(String unitaddress) {
        this.unitaddress = unitaddress == null ? null : unitaddress.trim();
    }
    /**   单位:法定代表人  representative   **/
    public String getRepresentative() {
        return representative;
    }
    /**   单位:法定代表人  representative   **/
    public void setRepresentative(String representative) {
        this.representative = representative == null ? null : representative.trim();
    }
    /**   单位:法定代表人联系电话  representativephone   **/
    public String getRepresentativephone() {
        return representativephone;
    }
    /**   单位:法定代表人联系电话  representativephone   **/
    public void setRepresentativephone(String representativephone) {
        this.representativephone = representativephone == null ? null : representativephone.trim();
    }
    /**   单位:开户银行  bank   **/
    public String getBank() {
        return bank;
    }
    /**   单位:开户银行  bank   **/
    public void setBank(String bank) {
        this.bank = bank == null ? null : bank.trim();
    }
    /**   单位:许可证编号  licensenumber   **/
    public String getLicensenumber() {
        return licensenumber;
    }
    /**   单位:许可证编号  licensenumber   **/
    public void setLicensenumber(String licensenumber) {
        this.licensenumber = licensenumber == null ? null : licensenumber.trim();
    }
    /**   单位:邮政编码  zipcode   **/
    public String getZipcode() {
        return zipcode;
    }
    /**   单位:邮政编码  zipcode   **/
    public void setZipcode(String zipcode) {
        this.zipcode = zipcode == null ? null : zipcode.trim();
    }
    /**   单位:委托代理人  agent   **/
    public String getAgent() {
        return agent;
    }
    /**   单位:委托代理人  agent   **/
    public void setAgent(String agent) {
        this.agent = agent == null ? null : agent.trim();
    }
    /**   单位:委托代理人联系电话  agentphone   **/
    public String getAgentphone() {
        return agentphone;
    }
    /**   单位:委托代理人联系电话  agentphone   **/
    public void setAgentphone(String agentphone) {
        this.agentphone = agentphone == null ? null : agentphone.trim();
    }
    /**   单位:委托代理人电子邮箱  agentemail   **/
    public String getAgentemail() {
        return agentemail;
    }
    /**   单位:委托代理人电子邮箱  agentemail   **/
    public void setAgentemail(String agentemail) {
        this.agentemail = agentemail == null ? null : agentemail.trim();
    }
    /**   单位:账户  account   **/
    public String getAccount() {
        return account;
    }
    /**   单位:账户  account   **/
    public void setAccount(String account) {
        this.account = account == null ? null : account.trim();
    }
    /**   创建人id  createby   **/
    public Long getCreateby() {
        return createby;
    }
    /**   创建人id  createby   **/
    public void setCreateby(Long createby) {
        this.createby = createby;
    }
    /**   创建人name  createbyname   **/
    public String getCreatebyname() {
        return createbyname;
    }
    /**   创建人name  createbyname   **/
    public void setCreatebyname(String createbyname) {
        this.createbyname = createbyname == null ? null : createbyname.trim();
    }
    /**   创建时间  createtime   **/
    public Date getCreatetime() {
        return createtime;
    }
    /**   创建时间  createtime   **/
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }
    /**   更信人id  updateby   **/
    public Long getUpdateby() {
        return updateby;
    }
    /**   更信人id  updateby   **/
    public void setUpdateby(Long updateby) {
        this.updateby = updateby;
    }
    /**   更新时间  updatetime   **/
    public Date getUpdatetime() {
        return updatetime;
    }
    /**   更新时间  updatetime   **/
    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }
    /**   更新人name  updatebyname   **/
    public String getUpdatebyname() {
        return updatebyname;
    }
    /**   更新人name  updatebyname   **/
    public void setUpdatebyname(String updatebyname) {
        this.updatebyname = updatebyname == null ? null : updatebyname.trim();
    }
    /**   有效标识  validflag   **/
    public Boolean getValidflag() {
        return validflag;
    }
    /**   有效标识  validflag   **/
    public void setValidflag(Boolean validflag) {
        this.validflag = validflag;
    }
    public String getRepresentativeemail() {
        return representativeemail;
    }
    public void setRepresentativeemail(String representativeemail) {
        this.representativeemail = representativeemail;
    }
    public String getEnterprisenumber() {
        return enterprisenumber;
    }
    public void setEnterprisenumber(String enterprisenumber) {
        this.enterprisenumber = enterprisenumber;
    }
}
src/main/java/com/gk/firework/Domain/ControlPrintParam.java
对比新文件
@@ -0,0 +1,424 @@
package com.gk.firework.Domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
@TableName(value = "controlprintparam",resultMap = "BaseResultMap")
public class ControlPrintParam implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    /**   id **/
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 归属设置  owner **/
    private String owner;
    /** 类型(1.内包装打印;2.外包装打印)  type **/
    private Byte type;
    /** 左标签X轴基准值  leftbasex **/
    @TableField(value = "leftbasex")
    private Integer leftBaseX;
    /** 右标签X轴基准值  rightbasex **/
    @TableField(value = "rightbasex")
    private Integer rightBaseX;
    /** 左标签二维码X轴值  leftqrx **/
    @TableField(value = "leftqrx")
    private Integer leftQrX;
    /** 右标签二维码X轴值  rightqrx **/
    @TableField(value = "rightqrx")
    private Integer rightQrX;
    /** 左标签边框基准值  leftframex **/
    @TableField(value = "leftframex")
    private Integer leftFrameX;
    /** 右标签边框基准值  rightframex **/
    @TableField(value = "rightframex")
    private Integer rightFrameX;
    /** 标签边框Y轴基准值  framey **/
    @TableField(value = "framey")
    private Integer frameY;
    /** 标签边框宽度  framewidth **/
    @TableField(value = "framewidth")
    private Integer frameWidth;
    /** 标签边框高度  frameheight **/
    @TableField(value = "frameheight")
    private Integer frameHeight;
    /** 标题与基准X值的偏移量  titlexoffset **/
    @TableField(value = "titleoffsetx")
    private Integer titleOffsetX;
    /** 标题Y轴值  titley **/
    @TableField(value = "titley")
    private Integer titleY;
    /** 条形码Y轴值  barcodey **/
    @TableField(value = "barcodey")
    private Integer barcodeY;
    /** 条形码宽度值  barcodewidth **/
    @TableField(value = "barcodewidth")
    private Integer barcodeWidth;
    /** 条形码宽度倍率  barcodewidthradio **/
    @TableField(value = "barcodewidthradio")
    private Integer barcodeWidthRadio;
    /** 条形码高度值  barcodeheight **/
    @TableField(value = "barcodeheight")
    private Integer barcodeHeight;
    /** 二维码标准值  qrcodemodel **/
    @TableField(value = "qrcodemodel")
    private Integer qrCodeModel;
    /** 二维码放大倍率  qrcodemagnification **/
    @TableField(value = "qrcodemagnification")
    private Integer qrCodeMagnification;
    /** 二维码X轴值  qrx **/
    @TableField(value = "qrx")
    private Integer qrX;
    /** 二维码Y轴值  qry **/
    @TableField(value = "qry")
    private Integer qrY;
    /** 字体大小1号  fontsize1 **/
    private Integer fontsize1;
    /** 字体大小2号  fontsize2 **/
    private Integer fontsize2;
    /** 字体大小3号  fontsize3 **/
    private Integer fontsize3;
    /** 条形码文字Y轴值  barcodetexty **/
    @TableField(value = "barcodetexty")
    private Integer barcodeTextY;
    /** 商品名称Y轴值  itemnamey **/
    @TableField(value = "itemnamey")
    private Integer itemNameY;
    /** 类型Y轴值  typey **/
    @TableField(value = "typey")
    private Integer typeY;
    /** 日期Y轴值  datey **/
    @TableField(value = "datey")
    private Integer dateY;
    /** 生产厂家Y轴值  manufacturery **/
    @TableField(value = "manufacturery")
    private Integer manufacturerY;
    /** 生产厂家Y轴值2  manufacturery2 **/
    @TableField(value = "manufacturery2")
    private Integer manufacturerY2;
    /** 总装药量Y轴值2  totaly **/
    @TableField(value = "totaly")
    private Integer totalY;
    private Integer darkness;
    /** 标记  flag **/
    private Byte flag;
    /** 扩展内容  content **/
    private String content;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Byte getType() {
        return type;
    }
    public void setType(Byte type) {
        this.type = type;
    }
    public String getOwner() {
        return owner;
    }
    public void setOwner(String owner) {
        this.owner = owner;
    }
    public Integer getLeftBaseX() {
        return leftBaseX;
    }
    public void setLeftBaseX(Integer leftBaseX) {
        this.leftBaseX = leftBaseX;
    }
    public Integer getRightBaseX() {
        return rightBaseX;
    }
    public void setRightBaseX(Integer rightBaseX) {
        this.rightBaseX = rightBaseX;
    }
    public Integer getLeftQrX() {
        return leftQrX;
    }
    public void setLeftQrX(Integer leftQrX) {
        this.leftQrX = leftQrX;
    }
    public Integer getRightQrX() {
        return rightQrX;
    }
    public void setRightQrX(Integer rightQrX) {
        this.rightQrX = rightQrX;
    }
    public Integer getLeftFrameX() {
        return leftFrameX;
    }
    public void setLeftFrameX(Integer leftFrameX) {
        this.leftFrameX = leftFrameX;
    }
    public Integer getFrameWidth() {
        return frameWidth;
    }
    public void setFrameWidth(Integer frameWidth) {
        this.frameWidth = frameWidth;
    }
    public Integer getFrameHeight() {
        return frameHeight;
    }
    public void setFrameHeight(Integer frameHeight) {
        this.frameHeight = frameHeight;
    }
    public Integer getRightFrameX() {
        return rightFrameX;
    }
    public void setRightFrameX(Integer rightFrameX) {
        this.rightFrameX = rightFrameX;
    }
    public Integer getFrameY() {
        return frameY;
    }
    public void setFrameY(Integer frameY) {
        this.frameY = frameY;
    }
    public Integer getTitleOffsetX() {
        return titleOffsetX;
    }
    public void setTitleOffsetX(Integer titleOffsetX) {
        this.titleOffsetX = titleOffsetX;
    }
    public Integer getTitleY() {
        return titleY;
    }
    public void setTitleY(Integer titleY) {
        this.titleY = titleY;
    }
    public Integer getBarcodeY() {
        return barcodeY;
    }
    public void setBarcodeY(Integer barcodeY) {
        this.barcodeY = barcodeY;
    }
    public Integer getBarcodeWidth() {
        return barcodeWidth;
    }
    public void setBarcodeWidth(Integer barcodeWidth) {
        this.barcodeWidth = barcodeWidth;
    }
    public Integer getBarcodeWidthRadio() {
        return barcodeWidthRadio;
    }
    public void setBarcodeWidthRadio(Integer barcodeWidthRadio) {
        this.barcodeWidthRadio = barcodeWidthRadio;
    }
    public Integer getBarcodeHeight() {
        return barcodeHeight;
    }
    public void setBarcodeHeight(Integer barcodeHeight) {
        this.barcodeHeight = barcodeHeight;
    }
    public Integer getQrCodeModel() {
        return qrCodeModel;
    }
    public void setQrCodeModel(Integer qrCodeModel) {
        this.qrCodeModel = qrCodeModel;
    }
    public Integer getQrCodeMagnification() {
        return qrCodeMagnification;
    }
    public void setQrCodeMagnification(Integer qrCodeMagnification) {
        this.qrCodeMagnification = qrCodeMagnification;
    }
    public Integer getQrX() {
        return qrX;
    }
    public void setQrX(Integer qrX) {
        this.qrX = qrX;
    }
    public Integer getQrY() {
        return qrY;
    }
    public void setQrY(Integer qrY) {
        this.qrY = qrY;
    }
    public Integer getFontsize1() {
        return fontsize1;
    }
    public void setFontsize1(Integer fontsize1) {
        this.fontsize1 = fontsize1;
    }
    public Integer getFontsize2() {
        return fontsize2;
    }
    public void setFontsize2(Integer fontsize2) {
        this.fontsize2 = fontsize2;
    }
    public Integer getFontsize3() {
        return fontsize3;
    }
    public void setFontsize3(Integer fontsize3) {
        this.fontsize3 = fontsize3;
    }
    public Integer getBarcodeTextY() {
        return barcodeTextY;
    }
    public void setBarcodeTextY(Integer barcodeTextY) {
        this.barcodeTextY = barcodeTextY;
    }
    public Integer getItemNameY() {
        return itemNameY;
    }
    public void setItemNameY(Integer itemNameY) {
        this.itemNameY = itemNameY;
    }
    public Integer getTypeY() {
        return typeY;
    }
    public void setTypeY(Integer typeY) {
        this.typeY = typeY;
    }
    public Integer getDateY() {
        return dateY;
    }
    public void setDateY(Integer dateY) {
        this.dateY = dateY;
    }
    public Integer getManufacturerY() {
        return manufacturerY;
    }
    public void setManufacturerY(Integer manufacturerY) {
        this.manufacturerY = manufacturerY;
    }
    public Integer getManufacturerY2() {
        return manufacturerY2;
    }
    public void setManufacturerY2(Integer manufacturerY2) {
        this.manufacturerY2 = manufacturerY2;
    }
    public Integer getTotalY() {
        return totalY;
    }
    public void setTotalY(Integer totalY) {
        this.totalY = totalY;
    }
    public Byte getFlag() {
        return flag;
    }
    public void setFlag(Byte flag) {
        this.flag = flag;
    }
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
    public Integer getDarkness() {
        return darkness;
    }
    public void setDarkness(Integer darkness) {
        this.darkness = darkness;
    }
}
src/main/java/com/gk/firework/Domain/CustomerInfo.java
对比新文件
@@ -0,0 +1,216 @@
package com.gk.firework.Domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
@TableName("customer")
public class CustomerInfo implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    public static final String GENDER_MALE = "男";
    public static final String GENDER_FEMALE = "女";
    /**   id **/
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 购买人  name **/
    private String name;
    /** 1.男性、2.女性  gender **/
    private Byte gender;
    /** 身份证号码  idcardnum **/
    private String idcardnum;
    /** 民族  nation **/
    private String nation;
    /** 出生年月日  bornday **/
    private Date bornday;
    /** 身份证住址  address **/
    private String address;
    /** 购买次数  frequency **/
    private Integer frequency;
    /** 购买单品数量  num **/
    private Integer num;
    /** 最近购买时间  lasttime **/
    private Date lasttime;
    /** 最近购买数量  lastnum **/
    private Integer lastnum;
    /** 创建时间  createddate **/
    private Date createddate;
    /** 更新时间  modifieddate **/
    private Date modifieddate;
    private String path;
    /**     id   **/
    public Long getId() {
        return id;
    }
    /**     id   **/
    public void setId(Long id) {
        this.id = id;
    }
    /**   购买人  name   **/
    public String getName() {
        return name;
    }
    /**   购买人  name   **/
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }
    /**   1.男性、2.女性  gender   **/
    public Byte getGender() {
        return gender;
    }
    /**   1.男性、2.女性  gender   **/
    public void setGender(Byte gender) {
        this.gender = gender;
    }
    /**   身份证号码  idcardnum   **/
    public String getIdcardnum() {
        return idcardnum;
    }
    /**   身份证号码  idcardnum   **/
    public void setIdcardnum(String idcardnum) {
        this.idcardnum = idcardnum == null ? null : idcardnum.trim();
    }
    /**   民族  nation   **/
    public String getNation() {
        return nation;
    }
    /**   民族  nation   **/
    public void setNation(String nation) {
        this.nation = nation == null ? null : nation.trim();
    }
    /**   出生年月日  bornday   **/
    public Date getBornday() {
        return bornday;
    }
    /**   出生年月日  bornday   **/
    public void setBornday(Date bornday) {
        this.bornday = bornday;
    }
    /**   身份证住址  address   **/
    public String getAddress() {
        return address;
    }
    /**   身份证住址  address   **/
    public void setAddress(String address) {
        this.address = address == null ? null : address.trim();
    }
    /**   购买次数  frequency   **/
    public Integer getFrequency() {
        return frequency;
    }
    /**   购买次数  frequency   **/
    public void setFrequency(Integer frequency) {
        this.frequency = frequency;
    }
    /**   购买单品数量  num   **/
    public Integer getNum() {
        return num;
    }
    /**   购买单品数量  num   **/
    public void setNum(Integer num) {
        this.num = num;
    }
    /**   最近购买时间  lasttime   **/
    public Date getLasttime() {
        return lasttime;
    }
    /**   最近购买时间  lasttime   **/
    public void setLasttime(Date lasttime) {
        this.lasttime = lasttime;
    }
    /**   最近购买数量  lastnum   **/
    public Integer getLastnum() {
        return lastnum;
    }
    /**   最近购买数量  lastnum   **/
    public void setLastnum(Integer lastnum) {
        this.lastnum = lastnum;
    }
    /**   创建时间  createddate   **/
    public Date getCreateddate() {
        return createddate;
    }
    /**   创建时间  createddate   **/
    public void setCreateddate(Date createddate) {
        this.createddate = createddate;
    }
    /**   更新时间  modifieddate   **/
    public Date getModifieddate() {
        return modifieddate;
    }
    /**   更新时间  modifieddate   **/
    public void setModifieddate(Date modifieddate) {
        this.modifieddate = modifieddate;
    }
    public CustomerInfo() {
    }
    public CustomerInfo(String name, String idCardNum) {
        this.name = name;
        this.idcardnum = idCardNum;
    }
    public CustomerInfo(String name, Byte gender, String idcardnum, String nation, Date bornday, String address) {
        this.name = name;
        this.gender = gender;
        this.idcardnum = idcardnum;
        this.nation = nation;
        this.bornday = bornday;
        this.address = address;
    }
    public String getPath() {
        return path;
    }
    public void setPath(String path) {
        this.path = path;
    }
}
src/main/java/com/gk/firework/Domain/DO/ProductDO.java
对比新文件
@@ -0,0 +1,20 @@
package com.gk.firework.Domain.DO;
import com.gk.firework.Domain.ProductInfo;
import java.math.BigDecimal;
public class ProductDO extends ProductInfo {
    // 获取分表
    private String slice;
    public String getSlice() {
        return slice;
    }
    public void setSlice(String slice) {
        this.slice = slice;
    }
}
src/main/java/com/gk/firework/Domain/DTO/JiangWaiDeadlineReqDTO.java
对比新文件
@@ -0,0 +1,30 @@
package com.gk.firework.Domain.DTO;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
public class JiangWaiDeadlineReqDTO implements Serializable {
    private Long uid;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date deadline;
    public Long getUid() {
        return uid;
    }
    public void setUid(Long uid) {
        this.uid = uid;
    }
    public Date getDeadline() {
        return deadline;
    }
    public void setDeadline(Date deadline) {
        this.deadline = deadline;
    }
}
src/main/java/com/gk/firework/Domain/DeliveryDetailInfo.java
对比新文件
@@ -0,0 +1,115 @@
package com.gk.firework.Domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
@TableName("deliverydetail")
public class DeliveryDetailInfo implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 出库单号  deliverycode **/
    private String deliverycode;
    /** 商品编码(10位)  itemcode **/
    private String itemcode;
    /** 商品名称  itemname **/
    private String itemname;
    /** 流向码(19位或22位)  directioncode **/
    private String directioncode;
    /** 创建时间  createat **/
    private Date createat;
    /** 创建人  createby **/
    private String createby;
    private Integer num;
    /**     id   **/
    public Long getId() {
        return id;
    }
    /**     id   **/
    public void setId(Long id) {
        this.id = id;
    }
    /**   出库单号  deliverycode   **/
    public String getDeliverycode() {
        return deliverycode;
    }
    /**   出库单号  deliverycode   **/
    public void setDeliverycode(String deliverycode) {
        this.deliverycode = deliverycode == null ? null : deliverycode.trim();
    }
    /**   商品编码(10位)  itemcode   **/
    public String getItemcode() {
        return itemcode;
    }
    /**   商品编码(10位)  itemcode   **/
    public void setItemcode(String itemcode) {
        this.itemcode = itemcode == null ? null : itemcode.trim();
    }
    /**   商品名称  itemname   **/
    public String getItemname() {
        return itemname;
    }
    /**   商品名称  itemname   **/
    public void setItemname(String itemname) {
        this.itemname = itemname == null ? null : itemname.trim();
    }
    /**   流向码(19位或22位)  directioncode   **/
    public String getDirectioncode() {
        return directioncode;
    }
    /**   流向码(19位或22位)  directioncode   **/
    public void setDirectioncode(String directioncode) {
        this.directioncode = directioncode == null ? null : directioncode.trim();
    }
    /**   创建时间  createat   **/
    public Date getCreateat() {
        return createat;
    }
    /**   创建时间  createat   **/
    public void setCreateat(Date createat) {
        this.createat = createat;
    }
    /**   创建人  createby   **/
    public String getCreateby() {
        return createby;
    }
    /**   创建人  createby   **/
    public void setCreateby(String createby) {
        this.createby = createby == null ? null : createby.trim();
    }
    public Integer getNum() {
        return num;
    }
    public void setNum(Integer num) {
        this.num = num;
    }
}
src/main/java/com/gk/firework/Domain/DeliveryOrderInfo.java
对比新文件
@@ -0,0 +1,151 @@
package com.gk.firework.Domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@TableName("deliveryorder")
public class DeliveryOrderInfo implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 出库单  ordercode **/
    private String ordercode;
    /** 创建时间  createat **/
    private Date createat;
    /** 创建人  createby **/
    private String createby;
    /** 操作员  operator **/
    private String operator;
    /** 操作时间  operatat **/
    private Date operatat;
    /** 店铺  shop **/
    private String shop;
    /** 箱数  boxnum **/
    private Integer boxnum;
    /** 运输证  transportcert **/
    private String transportcert;
    /** 箱数  出库方式(1.正常出库;2.退货出库) **/
    private Byte type;
    private String companynumber;
    /**     id   **/
    public Long getId() {
        return id;
    }
    /**     id   **/
    public void setId(Long id) {
        this.id = id;
    }
    /**   出库单  ordercode   **/
    public String getOrdercode() {
        return ordercode;
    }
    /**   出库单  ordercode   **/
    public void setOrdercode(String ordercode) {
        this.ordercode = ordercode == null ? null : ordercode.trim();
    }
    /**   创建时间  createat   **/
    public Date getCreateat() {
        return createat;
    }
    /**   创建时间  createat   **/
    public void setCreateat(Date createat) {
        this.createat = createat;
    }
    /**   创建人  createby   **/
    public String getCreateby() {
        return createby;
    }
    /**   创建人  createby   **/
    public void setCreateby(String createby) {
        this.createby = createby == null ? null : createby.trim();
    }
    /**   操作员  operator   **/
    public String getOperator() {
        return operator;
    }
    /**   操作员  operator   **/
    public void setOperator(String operator) {
        this.operator = operator == null ? null : operator.trim();
    }
    /**   操作时间  operatat   **/
    public Date getOperatat() {
        return operatat;
    }
    /**   操作时间  operatat   **/
    public void setOperatat(Date operatat) {
        this.operatat = operatat;
    }
    /**   店铺  shop   **/
    public String getShop() {
        return shop;
    }
    /**   店铺  shop   **/
    public void setShop(String shop) {
        this.shop = shop == null ? null : shop.trim();
    }
    /**   箱数  boxnum   **/
    public Integer getBoxnum() {
        return boxnum;
    }
    /**   箱数  boxnum   **/
    public void setBoxnum(Integer boxnum) {
        this.boxnum = boxnum;
    }
    public Byte getType() {
        return type;
    }
    public void setType(Byte type) {
        this.type = type;
    }
    public String getCompanynumber() {
        return companynumber;
    }
    public void setCompanynumber(String companynumber) {
        this.companynumber = companynumber;
    }
    public String getTransportcert() {
        return transportcert;
    }
    public void setTransportcert(String transportcert) {
        this.transportcert = transportcert;
    }
}
src/main/java/com/gk/firework/Domain/DictionaryItemInfo.java
对比新文件
@@ -0,0 +1,158 @@
package com.gk.firework.Domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
@TableName("dictionaryitem")
public class DictionaryItemInfo implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 序号  sort **/
    private Integer sort;
    /** 是否使用1使用  0禁用  status **/
    private Byte status;
    /** 字典标签  text **/
    private String text;
    /** 字典值  value **/
    private String value;
    /** 创建人  createdby **/
    private String createdby;
    /** 创建时间  createddate **/
    private Date createddate;
    /** 更新人  modifiedby **/
    private String modifiedby;
    /** 更新时间  modifieddate **/
    private Date modifieddate;
    /** 备注  description **/
    private String description;
    /** 字典类型id  typeid **/
    private Long typeid;
    /**     id   **/
    public Long getId() {
        return id;
    }
    /**     id   **/
    public void setId(Long id) {
        this.id = id;
    }
    /**   序号  sort   **/
    public Integer getSort() {
        return sort;
    }
    /**   序号  sort   **/
    public void setSort(Integer sort) {
        this.sort = sort;
    }
    /**   是否使用1使用  0禁用  status   **/
    public Byte getStatus() {
        return status;
    }
    /**   是否使用1使用  0禁用  status   **/
    public void setStatus(Byte status) {
        this.status = status;
    }
    /**   字典标签  text   **/
    public String getText() {
        return text;
    }
    /**   字典标签  text   **/
    public void setText(String text) {
        this.text = text == null ? null : text.trim();
    }
    /**   字典值  value   **/
    public String getValue() {
        return value;
    }
    /**   字典值  value   **/
    public void setValue(String value) {
        this.value = value == null ? null : value.trim();
    }
    /**   创建人  createdby   **/
    public String getCreatedby() {
        return createdby;
    }
    /**   创建人  createdby   **/
    public void setCreatedby(String createdby) {
        this.createdby = createdby == null ? null : createdby.trim();
    }
    /**   创建时间  createddate   **/
    public Date getCreateddate() {
        return createddate;
    }
    /**   创建时间  createddate   **/
    public void setCreateddate(Date createddate) {
        this.createddate = createddate;
    }
    /**   更新人  modifiedby   **/
    public String getModifiedby() {
        return modifiedby;
    }
    /**   更新人  modifiedby   **/
    public void setModifiedby(String modifiedby) {
        this.modifiedby = modifiedby == null ? null : modifiedby.trim();
    }
    /**   更新时间  modifieddate   **/
    public Date getModifieddate() {
        return modifieddate;
    }
    /**   更新时间  modifieddate   **/
    public void setModifieddate(Date modifieddate) {
        this.modifieddate = modifieddate;
    }
    /**   备注  description   **/
    public String getDescription() {
        return description;
    }
    /**   备注  description   **/
    public void setDescription(String description) {
        this.description = description == null ? null : description.trim();
    }
    /**   字典类型id  typeid   **/
    public Long getTypeid() {
        return typeid;
    }
    /**   字典类型id  typeid   **/
    public void setTypeid(Long typeid) {
        this.typeid = typeid;
    }
}
src/main/java/com/gk/firework/Domain/DictionaryTypeInfo.java
对比新文件
@@ -0,0 +1,132 @@
package com.gk.firework.Domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
@TableName("dictionarytype")
public class DictionaryTypeInfo implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 编码  code **/
    private String code;
    /** 状态1使用 0禁用  status **/
    private Byte status;
    /** 类型名称  text **/
    private String text;
    /** 创建人  createdby **/
    private String createdby;
    /** 创建时间  createddate **/
    private Date createddate;
    /** 更新人  modifiedby **/
    private String modifiedby;
    /** 更新时间  modifieddate **/
    private Date modifieddate;
    /** 备注  description **/
    private String description;
    /**     id   **/
    public Long getId() {
        return id;
    }
    /**     id   **/
    public void setId(Long id) {
        this.id = id;
    }
    /**   编码  code   **/
    public String getCode() {
        return code;
    }
    /**   编码  code   **/
    public void setCode(String code) {
        this.code = code == null ? null : code.trim();
    }
    /**   状态1使用 0禁用  status   **/
    public Byte getStatus() {
        return status;
    }
    /**   状态1使用 0禁用  status   **/
    public void setStatus(Byte status) {
        this.status = status;
    }
    /**   类型名称  text   **/
    public String getText() {
        return text;
    }
    /**   类型名称  text   **/
    public void setText(String text) {
        this.text = text == null ? null : text.trim();
    }
    /**   创建人  createdby   **/
    public String getCreatedby() {
        return createdby;
    }
    /**   创建人  createdby   **/
    public void setCreatedby(String createdby) {
        this.createdby = createdby == null ? null : createdby.trim();
    }
    /**   创建时间  createddate   **/
    public Date getCreateddate() {
        return createddate;
    }
    /**   创建时间  createddate   **/
    public void setCreateddate(Date createddate) {
        this.createddate = createddate;
    }
    /**   更新人  modifiedby   **/
    public String getModifiedby() {
        return modifiedby;
    }
    /**   更新人  modifiedby   **/
    public void setModifiedby(String modifiedby) {
        this.modifiedby = modifiedby == null ? null : modifiedby.trim();
    }
    /**   更新时间  modifieddate   **/
    public Date getModifieddate() {
        return modifieddate;
    }
    /**   更新时间  modifieddate   **/
    public void setModifieddate(Date modifieddate) {
        this.modifieddate = modifieddate;
    }
    /**   备注  description   **/
    public String getDescription() {
        return description;
    }
    /**   备注  description   **/
    public void setDescription(String description) {
        this.description = description == null ? null : description.trim();
    }
}
src/main/java/com/gk/firework/Domain/DistrictInfo.java
对比新文件
@@ -0,0 +1,80 @@
package com.gk.firework.Domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
@TableName("district")
public class DistrictInfo implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    private Long id;
    /**   code **/
    private String code;
    /**   name **/
    private String name;
    /**   parentcode **/
    private String parentcode;
    /** 1省份2城市3区县4乡镇5居委会  type **/
    private Byte type;
    /**     id   **/
    public Long getId() {
        return id;
    }
    /**     id   **/
    public void setId(Long id) {
        this.id = id;
    }
    /**     code   **/
    public String getCode() {
        return code;
    }
    /**     code   **/
    public void setCode(String code) {
        this.code = code == null ? null : code.trim();
    }
    /**     name   **/
    public String getName() {
        return name;
    }
    /**     name   **/
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }
    /**     parentcode   **/
    public String getParentcode() {
        return parentcode;
    }
    /**     parentcode   **/
    public void setParentcode(String parentcode) {
        this.parentcode = parentcode == null ? null : parentcode.trim();
    }
    /**   1省份2城市3区县4乡镇5居委会  type   **/
    public Byte getType() {
        return type;
    }
    /**   1省份2城市3区县4乡镇5居委会  type   **/
    public void setType(Byte type) {
        this.type = type;
    }
}
src/main/java/com/gk/firework/Domain/Enterprise.java
对比新文件
@@ -0,0 +1,870 @@
package com.gk.firework.Domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gk.firework.Domain.Enum.*;
import com.gk.firework.Domain.Utils.Constants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.data.annotation.Transient;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@ApiModel("企业信息类")
@TableName("enterprise")
public class Enterprise implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    /** 主键id  id **/
    private Long id;
    /** 安全监管分类  safetysupervision **/
    @ApiModelProperty("安全监管分类")
    private String safetysupervision;
    /** 国民经济行业分类  economicindustry **/
    @ApiModelProperty("国民经济行业分类")
    private String economicindustry;
    /** 单位编号  enterprisenumber **/
    @ApiModelProperty("单位编号")
    private String enterprisenumber;
    /** 企业名称  enterprisename **/
    @ApiModelProperty("企业名称")
    private String enterprisename;
    /** 电子邮箱  enterpriseemail **/
    private String enterpriseemail;
    /** 企业规模  enterprisesize **/
    private EnterpriseSize enterprisesize;
    /** 企业状态  enterprisestatus **/
    private EnterpriseStatus enterprisestatus;
    /** 行政主管部门  department **/
    @ApiModelProperty("行政主管部门")
    private String department;
    /** 设备编号  devicenumber **/
    private String devicenumber;
    /** 单位办公地址  officeaddress **/
    @ApiModelProperty("单位办公地址")
    private String officeaddress;
    /** 所属区域:省  province **/
    private String province;
    /** 所属区域:市  city **/
    private String city;
    /** 所属区域:区  district **/
    private String district;
    /** 所属区域:街道  street **/
    private String street;
    /** 所属区域:委员会  committee **/
    private String committee;
    /** 治安主管单位  securitysupervisory **/
    @ApiModelProperty("治安主管单位")
    private String securitysupervisory;
    /** 办公电话  officephone **/
    @ApiModelProperty("办公电话")
    private String officephone;
    /** 传真电话  faxphone **/
    private String faxphone;
    /** 单位注册地址  registeraddress **/
    private String registeraddress;
    /** 注册类型  registertype **/
    private String registertype;
    /** 成立时间  establishtime **/
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    private Date establishtime;
    /** qq号码  qqnumber **/
    private String qqnumber;
    /** 邮编  postcode **/
    private String postcode;
    /** 工房数量  roomnumber **/
    private Integer roomnumber;
    /** 国民经济类型  economictype **/
    private String economictype;
    /** 生产经营项目  productioncontent **/
    private String productioncontent;
    /** 工商注册号  businessregisternumber **/
    private String businessregisternumber;
    /** 组织结构代码  organizationstructurecode **/
    private String organizationstructurecode;
    /** 有效期开始时间  validstarttime **/
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    private Date validstarttime;
    /** 有效期结束时间  validendtime **/
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    private Date validendtime;
    @ApiModelProperty("专职安全生产管理人员及仓库守护、保管人员数量")
    private Integer personnumber;
    /** 从业人数  employeenumber **/
    private Integer employeenumber;
    /** 是否缴纳安全责任险  ispaysafetyinsurance **/
    private Boolean ispaysafetyinsurance;
    /** 保险合同号码(保单号)  insurancecontractnumber **/
    private String insurancecontractnumber;
    /** 投保金额  insureamount **/
    private BigDecimal insureamount;
    /** 投保有效期开始时间  insurestarttime **/
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    private Date insurestarttime;
    /** 投保有效期结束时间  insureendtime **/
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    private Date insureendtime;
    /** 保险公司名称  insurancecompany **/
    private String insurancecompany;
    /** 是否有重大危险源  ismajorhazard **/
    private Boolean ismajorhazard;
    /** 是否有特种设备  isspecialequipment **/
    private Boolean isspecialequipment;
    /** 是否有职业卫生信息  isoccupationalhealthinfo **/
    private Boolean isoccupationalhealthinfo;
    /** 是否有特种人员  isspecialpersonnel **/
    private Boolean isspecialpersonnel;
    /** 自查记录周期  selfrecordingcycle **/
    private String selfrecordingcycle;
    /** 是否有上级企业  isparententerprise **/
    private Boolean isparententerprise;
    /** 上级企业id  parententerpriseid **/
    private Long parententerpriseid;
    /** 上级企业名称  parententerprisename **/
    private String parententerprisename;
    /** 信息创建时间  infocreatetime **/
    private Date infocreatetime;
    /** 信息更新时间  infoupdatetime **/
    private Date infoupdatetime;
    /** 更新用户  infoupdateby **/
    private Long infoupdateby;
    /** 创建用户  infocreateby **/
    private Long infocreateby;
    private String twobitcode;
    /** 法定代表人信息  legalrepresentative **/
    /** 主要负责人  mainprincipal **/
    /** 安全负责人  securityofficer **/
    /** 信息员  informationofficer **/
    @TableField(exist = false)
    private EnterpriseStaff  legalrepresentative;
    @TableField(exist = false)
    private EnterpriseStaff  mainprincipal;
    @TableField(exist = false)
    private EnterpriseStaff  securityofficer;
    @TableField(exist = false)
    private EnterpriseStaff  informationofficer;
    /** 有效标识  validflag **/
    private Boolean validflag;
    /** 单位坐标  enterpriselocation **/
    private String longitude;
    private String latitude;
    /** 信息创建人  infocreatebyname **/
    private String infocreatebyname;
    /** 信息更信人  infoupdatebyname **/
    private String infoupdatebyname;
    /** 分表标识  divideflag **/
    private Byte divideflag;
    @Transient
    @TableField(exist = false)
    private String password;
    @ApiModelProperty("丹灵单位编号")
    private String dlcompanycode;
    @ApiModelProperty("设备id")
    private String deviceid;
    @ApiModelProperty("是否注销")
    private Boolean loginvalidflag;
    /**   主键id  id   **/
    public Long getId() {
        return id;
    }
    /**   主键id  id   **/
    public void setId(Long id) {
        this.id = id;
    }
    public String getSafetysupervision() {
        return safetysupervision;
    }
    public void setSafetysupervision(String safetysupervision) {
        this.safetysupervision = safetysupervision;
    }
    public String getEconomicindustry() {
        return economicindustry;
    }
    public void setEconomicindustry(String economicindustry) {
        this.economicindustry = economicindustry;
    }
    /**   单位编号  enterprisenumber   **/
    public String getEnterprisenumber() {
        return enterprisenumber;
    }
    /**   单位编号  enterprisenumber   **/
    public void setEnterprisenumber(String enterprisenumber) {
        this.enterprisenumber = enterprisenumber == null ? null : enterprisenumber.trim();
    }
    /**   企业名称  enterprisename   **/
    public String getEnterprisename() {
        return enterprisename;
    }
    /**   企业名称  enterprisename   **/
    public void setEnterprisename(String enterprisename) {
        this.enterprisename = enterprisename == null ? null : enterprisename.trim();
    }
    /**   电子邮箱  enterpriseemail   **/
    public String getEnterpriseemail() {
        return enterpriseemail;
    }
    /**   电子邮箱  enterpriseemail   **/
    public void setEnterpriseemail(String enterpriseemail) {
        this.enterpriseemail = enterpriseemail == null ? null : enterpriseemail.trim();
    }
    /**   企业规模  enterprisesize   **/
    public EnterpriseSize getEnterprisesize() {
        return enterprisesize;
    }
    /**   企业规模  enterprisesize   **/
    public void setEnterprisesize(EnterpriseSize enterprisesize) {
        this.enterprisesize = enterprisesize;
    }
    /**   企业状态  enterprisestatus   **/
    public EnterpriseStatus getEnterprisestatus() {
        return enterprisestatus;
    }
    public void setEnterprisestatus(EnterpriseStatus enterprisestatus) {
        this.enterprisestatus = enterprisestatus;
    }
    /**   行政主管部门  department   **/
    public String getDepartment() {
        return department;
    }
    /**   行政主管部门  department   **/
    public void setDepartment(String department) {
        this.department = department == null ? null : department.trim();
    }
    /**   设备编号  devicenumber   **/
    public String getDevicenumber() {
        return devicenumber;
    }
    /**   设备编号  devicenumber   **/
    public void setDevicenumber(String devicenumber) {
        this.devicenumber = devicenumber == null ? null : devicenumber.trim();
    }
    /**   单位办公地址  officeaddress   **/
    public String getOfficeaddress() {
        return officeaddress;
    }
    /**   单位办公地址  officeaddress   **/
    public void setOfficeaddress(String officeaddress) {
        this.officeaddress = officeaddress == null ? null : officeaddress.trim();
    }
    /**   所属区域:省  province   **/
    public String getProvince() {
        return province;
    }
    /**   所属区域:省  province   **/
    public void setProvince(String province) {
        this.province = province == null ? null : province.trim();
    }
    /**   所属区域:市  city   **/
    public String getCity() {
        return city;
    }
    /**   所属区域:市  city   **/
    public void setCity(String city) {
        this.city = city == null ? null : city.trim();
    }
    /**   所属区域:区  district   **/
    public String getDistrict() {
        return district;
    }
    /**   所属区域:区  district   **/
    public void setDistrict(String district) {
        this.district = district == null ? null : district.trim();
    }
    /**   所属区域:街道  street   **/
    public String getStreet() {
        return street;
    }
    /**   所属区域:街道  street   **/
    public void setStreet(String street) {
        this.street = street == null ? null : street.trim();
    }
    /**   所属区域:委员会  committee   **/
    public String getCommittee() {
        return committee;
    }
    /**   所属区域:委员会  committee   **/
    public void setCommittee(String committee) {
        this.committee = committee == null ? null : committee.trim();
    }
    /**   治安主管单位  securitysupervisory   **/
    public String getSecuritysupervisory() {
        return securitysupervisory;
    }
    /**   治安主管单位  securitysupervisory   **/
    public void setSecuritysupervisory(String securitysupervisory) {
        this.securitysupervisory = securitysupervisory == null ? null : securitysupervisory.trim();
    }
    /**   办公电话  officephone   **/
    public String getOfficephone() {
        return officephone;
    }
    /**   办公电话  officephone   **/
    public void setOfficephone(String officephone) {
        this.officephone = officephone == null ? null : officephone.trim();
    }
    /**   传真电话  faxphone   **/
    public String getFaxphone() {
        return faxphone;
    }
    /**   传真电话  faxphone   **/
    public void setFaxphone(String faxphone) {
        this.faxphone = faxphone == null ? null : faxphone.trim();
    }
    /**   单位注册地址  registeraddress   **/
    public String getRegisteraddress() {
        return registeraddress;
    }
    /**   单位注册地址  registeraddress   **/
    public void setRegisteraddress(String registeraddress) {
        this.registeraddress = registeraddress == null ? null : registeraddress.trim();
    }
    /**   注册类型  registertype   **/
    public String getRegistertype() {
        return registertype;
    }
    /**   注册类型  registertype   **/
    public void setRegistertype(String registertype) {
        this.registertype = registertype == null ? null : registertype.trim();
    }
    /**   成立时间  establishtime   **/
    public Date getEstablishtime() {
        return establishtime;
    }
    /**   成立时间  establishtime   **/
    public void setEstablishtime(Date establishtime) {
        this.establishtime = establishtime;
    }
    /**   qq号码  qqnumber   **/
    public String getQqnumber() {
        return qqnumber;
    }
    /**   qq号码  qqnumber   **/
    public void setQqnumber(String qqnumber) {
        this.qqnumber = qqnumber == null ? null : qqnumber.trim();
    }
    /**   邮编  postcode   **/
    public String getPostcode() {
        return postcode;
    }
    /**   邮编  postcode   **/
    public void setPostcode(String postcode) {
        this.postcode = postcode == null ? null : postcode.trim();
    }
    /**   工房数量  roomnumber   **/
    public Integer getRoomnumber() {
        return roomnumber;
    }
    /**   工房数量  roomnumber   **/
    public void setRoomnumber(Integer roomnumber) {
        this.roomnumber = roomnumber;
    }
    /**   国民经济类型  economictype   **/
    public String getEconomictype() {
        return economictype;
    }
    /**   国民经济类型  economictype   **/
    public void setEconomictype(String economictype) {
        this.economictype = economictype == null ? null : economictype.trim();
    }
    /**   生产经营项目  productioncontent   **/
    public String getProductioncontent() {
        return productioncontent;
    }
    /**   生产经营项目  productioncontent   **/
    public void setProductioncontent(String productioncontent) {
        this.productioncontent = productioncontent == null ? null : productioncontent.trim();
    }
    /**   工商注册号  businessregisternumber   **/
    public String getBusinessregisternumber() {
        return businessregisternumber;
    }
    /**   工商注册号  businessregisternumber   **/
    public void setBusinessregisternumber(String businessregisternumber) {
        this.businessregisternumber = businessregisternumber == null ? null : businessregisternumber.trim();
    }
    /**   组织结构代码  organizationstructurecode   **/
    public String getOrganizationstructurecode() {
        return organizationstructurecode;
    }
    /**   组织结构代码  organizationstructurecode   **/
    public void setOrganizationstructurecode(String organizationstructurecode) {
        this.organizationstructurecode = organizationstructurecode == null ? null : organizationstructurecode.trim();
    }
    /**   有效期开始时间  validstarttime   **/
    public Date getValidstarttime() {
        return validstarttime;
    }
    /**   有效期开始时间  validstarttime   **/
    public void setValidstarttime(Date validstarttime) {
        this.validstarttime = validstarttime;
    }
    /**   有效期结束时间  validendtime   **/
    public Date getValidendtime() {
        return validendtime;
    }
    /**   有效期结束时间  validendtime   **/
    public void setValidendtime(Date validendtime) {
        this.validendtime = validendtime;
    }
    /**   从业人数  employeenumber   **/
    public Integer getEmployeenumber() {
        return employeenumber;
    }
    /**   从业人数  employeenumber   **/
    public void setEmployeenumber(Integer employeenumber) {
        this.employeenumber = employeenumber;
    }
    /**   是否缴纳安全责任险  ispaysafetyinsurance   **/
    public Boolean getIspaysafetyinsurance() {
        return ispaysafetyinsurance;
    }
    /**   是否缴纳安全责任险  ispaysafetyinsurance   **/
    public void setIspaysafetyinsurance(Boolean ispaysafetyinsurance) {
        this.ispaysafetyinsurance = ispaysafetyinsurance;
    }
    /**   保险合同号码(保单号)  insurancecontractnumber   **/
    public String getInsurancecontractnumber() {
        return insurancecontractnumber;
    }
    /**   保险合同号码(保单号)  insurancecontractnumber   **/
    public void setInsurancecontractnumber(String insurancecontractnumber) {
        this.insurancecontractnumber = insurancecontractnumber == null ? null : insurancecontractnumber.trim();
    }
    /**   投保金额  insureamount   **/
    public BigDecimal getInsureamount() {
        return insureamount;
    }
    /**   投保金额  insureamount   **/
    public void setInsureamount(BigDecimal insureamount) {
        this.insureamount = insureamount;
    }
    /**   投保有效期开始时间  insurestarttime   **/
    public Date getInsurestarttime() {
        return insurestarttime;
    }
    /**   投保有效期开始时间  insurestarttime   **/
    public void setInsurestarttime(Date insurestarttime) {
        this.insurestarttime = insurestarttime;
    }
    /**   投保有效期结束时间  insureendtime   **/
    public Date getInsureendtime() {
        return insureendtime;
    }
    /**   投保有效期结束时间  insureendtime   **/
    public void setInsureendtime(Date insureendtime) {
        this.insureendtime = insureendtime;
    }
    /**   是否有重大危险源  ismajorhazard   **/
    public Boolean getIsmajorhazard() {
        return ismajorhazard;
    }
    /**   是否有重大危险源  ismajorhazard   **/
    public void setIsmajorhazard(Boolean ismajorhazard) {
        this.ismajorhazard = ismajorhazard;
    }
    /**   是否有特种设备  isspecialequipment   **/
    public Boolean getIsspecialequipment() {
        return isspecialequipment;
    }
    /**   是否有特种设备  isspecialequipment   **/
    public void setIsspecialequipment(Boolean isspecialequipment) {
        this.isspecialequipment = isspecialequipment;
    }
    /**   是否有职业卫生信息  isoccupationalhealthinfo   **/
    public Boolean getIsoccupationalhealthinfo() {
        return isoccupationalhealthinfo;
    }
    /**   是否有职业卫生信息  isoccupationalhealthinfo   **/
    public void setIsoccupationalhealthinfo(Boolean isoccupationalhealthinfo) {
        this.isoccupationalhealthinfo = isoccupationalhealthinfo;
    }
    /**   是否有特种人员  isspecialpersonnel   **/
    public Boolean getIsspecialpersonnel() {
        return isspecialpersonnel;
    }
    /**   是否有特种人员  isspecialpersonnel   **/
    public void setIsspecialpersonnel(Boolean isspecialpersonnel) {
        this.isspecialpersonnel = isspecialpersonnel;
    }
    public String getSelfrecordingcycle() {
        return selfrecordingcycle;
    }
    public void setSelfrecordingcycle(String selfrecordingcycle) {
        this.selfrecordingcycle = selfrecordingcycle;
    }
    /**   是否有上级企业  isparententerprise   **/
    public Boolean getIsparententerprise() {
        return isparententerprise;
    }
    /**   是否有上级企业  isparententerprise   **/
    public void setIsparententerprise(Boolean isparententerprise) {
        this.isparententerprise = isparententerprise;
    }
    /**   上级企业id  parententerpriseid   **/
    public Long getParententerpriseid() {
        return parententerpriseid;
    }
    /**   上级企业id  parententerpriseid   **/
    public void setParententerpriseid(Long parententerpriseid) {
        this.parententerpriseid = parententerpriseid;
    }
    /**   上级企业名称  parententerprisename   **/
    public String getParententerprisename() {
        return parententerprisename;
    }
    /**   上级企业名称  parententerprisename   **/
    public void setParententerprisename(String parententerprisename) {
        this.parententerprisename = parententerprisename == null ? null : parententerprisename.trim();
    }
    /**   信息创建时间  infocreatetime   **/
    public Date getInfocreatetime() {
        return infocreatetime;
    }
    /**   信息创建时间  infocreatetime   **/
    public void setInfocreatetime(Date infocreatetime) {
        this.infocreatetime = infocreatetime;
    }
    /**   信息更新时间  infoupdatetime   **/
    public Date getInfoupdatetime() {
        return infoupdatetime;
    }
    /**   信息更新时间  infoupdatetime   **/
    public void setInfoupdatetime(Date infoupdatetime) {
        this.infoupdatetime = infoupdatetime;
    }
    /**   更新用户  infoupdateby   **/
    public Long getInfoupdateby() {
        return infoupdateby;
    }
    /**   更新用户  infoupdateby   **/
    public void setInfoupdateby(Long infoupdateby) {
        this.infoupdateby = infoupdateby;
    }
    /**   创建用户  infocreateby   **/
    public Long getInfocreateby() {
        return infocreateby;
    }
    /**   创建用户  infocreateby   **/
    public void setInfocreateby(Long infocreateby) {
        this.infocreateby = infocreateby;
    }
    public EnterpriseStaff getLegalrepresentative() {
        return legalrepresentative == null? new EnterpriseStaff():legalrepresentative ;
    }
    public void setLegalrepresentative(EnterpriseStaff legalrepresentative) {
        this.legalrepresentative = legalrepresentative;
    }
    public EnterpriseStaff getMainprincipal() {
        return  mainprincipal == null?new EnterpriseStaff():mainprincipal;
    }
    public void setMainprincipal(EnterpriseStaff mainprincipal) {
        this.mainprincipal = mainprincipal;
    }
    public EnterpriseStaff getSecurityofficer() {
        return securityofficer == null?new EnterpriseStaff():securityofficer;
    }
    public void setSecurityofficer(EnterpriseStaff securityofficer) {
        this.securityofficer = securityofficer;
    }
    public EnterpriseStaff getInformationofficer() {
        return informationofficer == null?new EnterpriseStaff():informationofficer;
    }
    public void setInformationofficer(EnterpriseStaff informationofficer) {
        this.informationofficer = informationofficer;
    }
    /**   有效标识  validflag   **/
    public Boolean getValidflag() {
        return validflag;
    }
    /**   有效标识  validflag   **/
    public void setValidflag(Boolean validflag) {
        this.validflag = validflag;
    }
    /**   信息创建人  infocreatebyname   **/
    public String getInfocreatebyname() {
        return infocreatebyname;
    }
    /**   信息创建人  infocreatebyname   **/
    public void setInfocreatebyname(String infocreatebyname) {
        this.infocreatebyname = infocreatebyname == null ? null : infocreatebyname.trim();
    }
    /**   信息更信人  infoupdatebyname   **/
    public String getInfoupdatebyname() {
        return infoupdatebyname;
    }
    /**   信息更信人  infoupdatebyname   **/
    public void setInfoupdatebyname(String infoupdatebyname) {
        this.infoupdatebyname = infoupdatebyname == null ? null : infoupdatebyname.trim();
    }
    /**   分表标识  divideflag   **/
    public Byte getDivideflag() {
        return divideflag;
    }
    /**   分表标识  divideflag   **/
    public void setDivideflag(Byte divideflag) {
        this.divideflag = divideflag;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public String getLongitude() {
        return longitude;
    }
    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }
    public String getLatitude() {
        return latitude;
    }
    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }
    public String getTwobitcode() {
        return twobitcode;
    }
    public void setTwobitcode(String twobitcode) {
        this.twobitcode = twobitcode;
    }
    public String getInsurancecompany() {
        return insurancecompany;
    }
    public void setInsurancecompany(String insurancecompany) {
        this.insurancecompany = insurancecompany;
    }
    public Integer getPersonnumber() {
        return personnumber;
    }
    public void setPersonnumber(Integer personnumber) {
        this.personnumber = personnumber;
    }
    public String getDlcompanycode() {
        return dlcompanycode;
    }
    public void setDlcompanycode(String dlcompanycode) {
        this.dlcompanycode = dlcompanycode;
    }
    public String getDeviceid() {
        return deviceid;
    }
    public void setDeviceid(String deviceid) {
        this.deviceid = deviceid;
    }
    public Boolean getLoginvalidflag() {
        return loginvalidflag;
    }
    public void setLoginvalidflag(Boolean loginvalidflag) {
        this.loginvalidflag = loginvalidflag;
    }
}
在上述文件截断后对比
src/main/java/com/gk/firework/Domain/EnterpriseAnnual.java src/main/java/com/gk/firework/Domain/EnterpriseApply.java src/main/java/com/gk/firework/Domain/EnterpriseDocument.java src/main/java/com/gk/firework/Domain/EnterpriseFeed.java src/main/java/com/gk/firework/Domain/EnterpriseLicense.java src/main/java/com/gk/firework/Domain/EnterprisePerson.java src/main/java/com/gk/firework/Domain/EnterpriseResource.java src/main/java/com/gk/firework/Domain/EnterpriseStaff.java src/main/java/com/gk/firework/Domain/EnterpriseStandardization.java src/main/java/com/gk/firework/Domain/EnterpriseWarehouse.java src/main/java/com/gk/firework/Domain/EntryDetailInfo.java src/main/java/com/gk/firework/Domain/EntryOrderInfo.java src/main/java/com/gk/firework/Domain/Enum/ApplyStatus.java src/main/java/com/gk/firework/Domain/Enum/AssessAppealStatus.java src/main/java/com/gk/firework/Domain/Enum/AssessApplyStatus.java src/main/java/com/gk/firework/Domain/Enum/AssessPunishment.java src/main/java/com/gk/firework/Domain/Enum/AssessType.java src/main/java/com/gk/firework/Domain/Enum/CertificatePersonType.java src/main/java/com/gk/firework/Domain/Enum/CertificateStatus.java src/main/java/com/gk/firework/Domain/Enum/CommitStatus.java src/main/java/com/gk/firework/Domain/Enum/DocumentType.java src/main/java/com/gk/firework/Domain/Enum/Element.java src/main/java/com/gk/firework/Domain/Enum/EnterpriseSafetySupervision.java src/main/java/com/gk/firework/Domain/Enum/EnterpriseSize.java src/main/java/com/gk/firework/Domain/Enum/EnterpriseStatus.java src/main/java/com/gk/firework/Domain/Enum/ErrorCode.java src/main/java/com/gk/firework/Domain/Enum/HiddenDangerReportStatus.java src/main/java/com/gk/firework/Domain/Enum/LicenseStatus.java src/main/java/com/gk/firework/Domain/Enum/MsgContentType.java src/main/java/com/gk/firework/Domain/Enum/MsgType.java src/main/java/com/gk/firework/Domain/Enum/PersonnelCategory.java src/main/java/com/gk/firework/Domain/Enum/ProvinceCode.java src/main/java/com/gk/firework/Domain/Enum/PunishStatus.java src/main/java/com/gk/firework/Domain/Exception/BusinessException.java src/main/java/com/gk/firework/Domain/Exception/Handler/CustomExceptionHandler.java src/main/java/com/gk/firework/Domain/Extension/StockTotal.java src/main/java/com/gk/firework/Domain/HelpDocInfo.java src/main/java/com/gk/firework/Domain/HiddenDangerCheckContent.java src/main/java/com/gk/firework/Domain/HiddenDangerCheckCriteria.java src/main/java/com/gk/firework/Domain/HiddenDangerCheckResult.java src/main/java/com/gk/firework/Domain/HiddenDangerCheckType.java src/main/java/com/gk/firework/Domain/HiddenDangerMenu.java src/main/java/com/gk/firework/Domain/HiddenDangerReport.java src/main/java/com/gk/firework/Domain/HiddenDangerReportDetail.java src/main/java/com/gk/firework/Domain/HistoryStock.java src/main/java/com/gk/firework/Domain/LicenseInfo.java src/main/java/com/gk/firework/Domain/LicenseStorage.java src/main/java/com/gk/firework/Domain/Log/JsonParams.java src/main/java/com/gk/firework/Domain/PatrolDetailInfo.java src/main/java/com/gk/firework/Domain/PatrolOrderInfo.java src/main/java/com/gk/firework/Domain/PermissionInfo.java src/main/java/com/gk/firework/Domain/ProductCategory.java src/main/java/com/gk/firework/Domain/ProductCodeInfo.java src/main/java/com/gk/firework/Domain/ProductInfo.java src/main/java/com/gk/firework/Domain/ProductLocusInfo.java src/main/java/com/gk/firework/Domain/ProductPriceInfo.java src/main/java/com/gk/firework/Domain/ProductThresholdInfo.java src/main/java/com/gk/firework/Domain/RegisterInfo.java src/main/java/com/gk/firework/Domain/RoleInfo.java src/main/java/com/gk/firework/Domain/RolePermissionsInfo.java src/main/java/com/gk/firework/Domain/SaleOrderDetailInfo.java src/main/java/com/gk/firework/Domain/SaleOrderInfo.java src/main/java/com/gk/firework/Domain/SaleProductInfo.java src/main/java/com/gk/firework/Domain/SecuritySupervisory.java src/main/java/com/gk/firework/Domain/SelfCheckInfo.java src/main/java/com/gk/firework/Domain/SelfCheckReport.java src/main/java/com/gk/firework/Domain/SmsLogInfo.java src/main/java/com/gk/firework/Domain/SoldNoStockInfo.java src/main/java/com/gk/firework/Domain/StandardConferenceRecord.java src/main/java/com/gk/firework/Domain/StandardDeviceToolsLeger.java src/main/java/com/gk/firework/Domain/StandardEducationLeger.java src/main/java/com/gk/firework/Domain/StandardEquipmentLeger.java src/main/java/com/gk/firework/Domain/StandardGuardRoll.java src/main/java/com/gk/firework/Domain/StandardHiddenDangerLeger.java src/main/java/com/gk/firework/Domain/StandardLawList.java src/main/java/com/gk/firework/Domain/StandardProductLeger.java src/main/java/com/gk/firework/Domain/StandardRewardRecord.java src/main/java/com/gk/firework/Domain/StandardSupplyMarketObject.java src/main/java/com/gk/firework/Domain/StandardTemplate1.java src/main/java/com/gk/firework/Domain/StaticStock.java src/main/java/com/gk/firework/Domain/StockInfo.java src/main/java/com/gk/firework/Domain/TransportCarrier.java src/main/java/com/gk/firework/Domain/TransportCert.java src/main/java/com/gk/firework/Domain/TransportCertFile.java src/main/java/com/gk/firework/Domain/TransportCertProduct.java src/main/java/com/gk/firework/Domain/TransportCertificate.java src/main/java/com/gk/firework/Domain/TransportCertificateApproach.java src/main/java/com/gk/firework/Domain/TransportCertificateArrivalRecord.java src/main/java/com/gk/firework/Domain/TransportCertificateFile.java src/main/java/com/gk/firework/Domain/TransportCertificatePerson.java src/main/java/com/gk/firework/Domain/TransportCertificateProduct.java src/main/java/com/gk/firework/Domain/TransportPerson.java src/main/java/com/gk/firework/Domain/UserDeadlineOperationLog.java src/main/java/com/gk/firework/Domain/UserInfo.java src/main/java/com/gk/firework/Domain/UserRolesInfo.java src/main/java/com/gk/firework/Domain/Utils/Base64Encrypt.java src/main/java/com/gk/firework/Domain/Utils/BeanProperty.java src/main/java/com/gk/firework/Domain/Utils/BeanUtils.java src/main/java/com/gk/firework/Domain/Utils/BooleanReason.java src/main/java/com/gk/firework/Domain/Utils/CommonUtil.java src/main/java/com/gk/firework/Domain/Utils/ConfigUtil.java src/main/java/com/gk/firework/Domain/Utils/Constants.java src/main/java/com/gk/firework/Domain/Utils/DateUtils.java src/main/java/com/gk/firework/Domain/Utils/DigestUtils.java src/main/java/com/gk/firework/Domain/Utils/DivideFlagUtil.java src/main/java/com/gk/firework/Domain/Utils/ExcelProperty.java src/main/java/com/gk/firework/Domain/Utils/FileOptUtils.java src/main/java/com/gk/firework/Domain/Utils/FilterObject.java src/main/java/com/gk/firework/Domain/Utils/HexUtil.java src/main/java/com/gk/firework/Domain/Utils/HttpUtils.java src/main/java/com/gk/firework/Domain/Utils/IdCardUtil.java src/main/java/com/gk/firework/Domain/Utils/JacksonObjectMapper.java src/main/java/com/gk/firework/Domain/Utils/JaxbUtils.java src/main/java/com/gk/firework/Domain/Utils/JsonUtils.java src/main/java/com/gk/firework/Domain/Utils/MatrixToImageWriter.java src/main/java/com/gk/firework/Domain/Utils/Message.java src/main/java/com/gk/firework/Domain/Utils/Msg.java src/main/java/com/gk/firework/Domain/Utils/PageInfo.java src/main/java/com/gk/firework/Domain/Utils/Properties.java src/main/java/com/gk/firework/Domain/Utils/QRCode.java src/main/java/com/gk/firework/Domain/Utils/Result.java src/main/java/com/gk/firework/Domain/Utils/SignUtils.java src/main/java/com/gk/firework/Domain/Utils/SpringBeanUtil.java src/main/java/com/gk/firework/Domain/Utils/StringUtils.java src/main/java/com/gk/firework/Domain/Utils/Tree.java src/main/java/com/gk/firework/Domain/Utils/UploadUtil.java src/main/java/com/gk/firework/Domain/Utils/WebSocketClientManager.java src/main/java/com/gk/firework/Domain/Utils/WebUtils.java src/main/java/com/gk/firework/Domain/Utils/WordTemplate.java src/main/java/com/gk/firework/Domain/Vo/AppFileVo.java src/main/java/com/gk/firework/Domain/Vo/ApprovalVo.java src/main/java/com/gk/firework/Domain/Vo/AssessApplyAppealVo.java src/main/java/com/gk/firework/Domain/Vo/CheckReportVo.java src/main/java/com/gk/firework/Domain/Vo/CityDataVo.java src/main/java/com/gk/firework/Domain/Vo/ContractOrderVo.java src/main/java/com/gk/firework/Domain/Vo/ContractStatus.java src/main/java/com/gk/firework/Domain/Vo/DailySaleReport.java src/main/java/com/gk/firework/Domain/Vo/DealingRangeVo.java src/main/java/com/gk/firework/Domain/Vo/DeliveryOrderInfoVo.java src/main/java/com/gk/firework/Domain/Vo/DirectionDetail.java src/main/java/com/gk/firework/Domain/Vo/EnterpriseDataVo.java src/main/java/com/gk/firework/Domain/Vo/EnterpriseDocumentVo.java src/main/java/com/gk/firework/Domain/Vo/EnterpriseExportVo.java src/main/java/com/gk/firework/Domain/Vo/EnterpriseFeedVo.java src/main/java/com/gk/firework/Domain/Vo/EnterpriseLicenseVo.java src/main/java/com/gk/firework/Domain/Vo/EnterprisePersonVo.java src/main/java/com/gk/firework/Domain/Vo/EnterpriseStandardizationVo.java src/main/java/com/gk/firework/Domain/Vo/EnterpriseVo.java src/main/java/com/gk/firework/Domain/Vo/EnterpriseWarehouseVo.java src/main/java/com/gk/firework/Domain/Vo/EntryOrderInfoVo.java src/main/java/com/gk/firework/Domain/Vo/EntryUtils.java src/main/java/com/gk/firework/Domain/Vo/FireworkDeal.java src/main/java/com/gk/firework/Domain/Vo/GenerateCode.java src/main/java/com/gk/firework/Domain/Vo/HelpDocVo.java src/main/java/com/gk/firework/Domain/Vo/HiddenDangerTableRow.java src/main/java/com/gk/firework/Domain/Vo/LicenseVo.java src/main/java/com/gk/firework/Domain/Vo/Menu.java src/main/java/com/gk/firework/Domain/Vo/NoEntryVo.java src/main/java/com/gk/firework/Domain/Vo/PageInfoExtension.java src/main/java/com/gk/firework/Domain/Vo/PatrolOrderVo.java src/main/java/com/gk/firework/Domain/Vo/Product2JsonVo.java src/main/java/com/gk/firework/Domain/Vo/ProductCodePrint.java src/main/java/com/gk/firework/Domain/Vo/ProductCodeVo.java src/main/java/com/gk/firework/Domain/Vo/ProductLocusVo.java src/main/java/com/gk/firework/Domain/Vo/ProductThresholdVo.java src/main/java/com/gk/firework/Domain/Vo/ProductVo.java src/main/java/com/gk/firework/Domain/Vo/RegisterVo.java src/main/java/com/gk/firework/Domain/Vo/SaleDetailVo.java src/main/java/com/gk/firework/Domain/Vo/SaleNumVo.java src/main/java/com/gk/firework/Domain/Vo/SaleOrderVo.java src/main/java/com/gk/firework/Domain/Vo/SelfCheckReportSearchVo.java src/main/java/com/gk/firework/Domain/Vo/SelfCheckReportVo.java src/main/java/com/gk/firework/Domain/Vo/SortData.java src/main/java/com/gk/firework/Domain/Vo/SortTime.java src/main/java/com/gk/firework/Domain/Vo/StandardTemplate1Vo.java src/main/java/com/gk/firework/Domain/Vo/StockVo.java src/main/java/com/gk/firework/Domain/Vo/TransportArrivalSum.java src/main/java/com/gk/firework/Domain/Vo/TransportArrivalVo.java src/main/java/com/gk/firework/Domain/Vo/TransportCertVo.java src/main/java/com/gk/firework/Domain/Vo/UserVo.java src/main/java/com/gk/firework/Domain/Vo/WarnContentVo.java src/main/java/com/gk/firework/Domain/Vo/ZplUtil.java src/main/java/com/gk/firework/Domain/WarnContentInfo.java src/main/java/com/gk/firework/Domain/WarningInfo.java src/main/java/com/gk/firework/FireworkApplication.java src/main/java/com/gk/firework/Mapper/AccessAssessApplyMapper.java src/main/java/com/gk/firework/Mapper/AppFileInfoMapper.java src/main/java/com/gk/firework/Mapper/AssessApplyMapper.java src/main/java/com/gk/firework/Mapper/AuthorizationInfoMapper.java src/main/java/com/gk/firework/Mapper/BlackListMapper.java src/main/java/com/gk/firework/Mapper/ContractDetailInfoMapper.java src/main/java/com/gk/firework/Mapper/ContractFileMapper.java src/main/java/com/gk/firework/Mapper/ContractLogInfoMapper.java src/main/java/com/gk/firework/Mapper/ContractOrderInfoMapper.java src/main/java/com/gk/firework/Mapper/ContractUnitDetailMapper.java src/main/java/com/gk/firework/Mapper/ControlPrintParamMapper.java src/main/java/com/gk/firework/Mapper/CustomerInfoMapper.java src/main/java/com/gk/firework/Mapper/DeliveryDetailInfoMapper.java src/main/java/com/gk/firework/Mapper/DeliveryOrderInfoMapper.java src/main/java/com/gk/firework/Mapper/DictionaryItemInfoMapper.java src/main/java/com/gk/firework/Mapper/DictionaryTypeInfoMapper.java src/main/java/com/gk/firework/Mapper/DistrictInfoMapper.java src/main/java/com/gk/firework/Mapper/EnterpriseAnnualMapper.java src/main/java/com/gk/firework/Mapper/EnterpriseApplyMapper.java src/main/java/com/gk/firework/Mapper/EnterpriseDocumentMapper.java src/main/java/com/gk/firework/Mapper/EnterpriseFeedMapper.java src/main/java/com/gk/firework/Mapper/EnterpriseLicenseMapper.java src/main/java/com/gk/firework/Mapper/EnterpriseMapper.java src/main/java/com/gk/firework/Mapper/EnterprisePersonMapper.java src/main/java/com/gk/firework/Mapper/EnterpriseResourceMapper.java src/main/java/com/gk/firework/Mapper/EnterpriseStaffMapper.java src/main/java/com/gk/firework/Mapper/EnterpriseStandardizationMapper.java src/main/java/com/gk/firework/Mapper/EnterpriseWarehouseMapper.java src/main/java/com/gk/firework/Mapper/EntryDetailInfoMapper.java src/main/java/com/gk/firework/Mapper/EntryOrderInfoMapper.java src/main/java/com/gk/firework/Mapper/HelpDocInfoMapper.java src/main/java/com/gk/firework/Mapper/HiddenDangerCheckContentMapper.java src/main/java/com/gk/firework/Mapper/HiddenDangerCheckCriteriaMapper.java src/main/java/com/gk/firework/Mapper/HiddenDangerCheckResultMapper.java src/main/java/com/gk/firework/Mapper/HiddenDangerCheckTypeMapper.java src/main/java/com/gk/firework/Mapper/HiddenDangerMenuMapper.java src/main/java/com/gk/firework/Mapper/HiddenDangerReportDetailMapper.java src/main/java/com/gk/firework/Mapper/HiddenDangerReportMapper.java src/main/java/com/gk/firework/Mapper/HistoryStockMapper.java src/main/java/com/gk/firework/Mapper/LicenseInfoMapper.java src/main/java/com/gk/firework/Mapper/LicenseStorageMapper.java src/main/java/com/gk/firework/Mapper/PatrolDetailInfoMapper.java src/main/java/com/gk/firework/Mapper/PatrolOrderInfoMapper.java src/main/java/com/gk/firework/Mapper/PermissionInfoMapper.java src/main/java/com/gk/firework/Mapper/ProductCategoryMapper.java src/main/java/com/gk/firework/Mapper/ProductCodeInfoMapper.java src/main/java/com/gk/firework/Mapper/ProductInfoMapper.java src/main/java/com/gk/firework/Mapper/ProductLocusInfoMapper.java src/main/java/com/gk/firework/Mapper/ProductPriceInfoMapper.java src/main/java/com/gk/firework/Mapper/ProductThresholdInfoMapper.java src/main/java/com/gk/firework/Mapper/RegisterInfoMapper.java src/main/java/com/gk/firework/Mapper/RoleInfoMapper.java src/main/java/com/gk/firework/Mapper/RolePermissionsInfoMapper.java src/main/java/com/gk/firework/Mapper/SaleOrderDetailInfoMapper.java src/main/java/com/gk/firework/Mapper/SaleOrderInfoMapper.java src/main/java/com/gk/firework/Mapper/SaleProductInfoMapper.java src/main/java/com/gk/firework/Mapper/SecuritySupervisoryMapper.java src/main/java/com/gk/firework/Mapper/SelfCheckInfoMapper.java src/main/java/com/gk/firework/Mapper/SelfCheckReportMapper.java src/main/java/com/gk/firework/Mapper/SmsLogInfoMapper.java src/main/java/com/gk/firework/Mapper/SoldNoStockInfoMapper.java src/main/java/com/gk/firework/Mapper/StandDeviceToolsLegerMapper.java src/main/java/com/gk/firework/Mapper/StandHiddenDangerLegerMapper.java src/main/java/com/gk/firework/Mapper/StandProductLegerMapper.java src/main/java/com/gk/firework/Mapper/StandardConferenceRecordMapper.java src/main/java/com/gk/firework/Mapper/StandardEducationLegerMapper.java src/main/java/com/gk/firework/Mapper/StandardEquipmentLegerMapper.java src/main/java/com/gk/firework/Mapper/StandardGuardRollMapper.java src/main/java/com/gk/firework/Mapper/StandardLawListMapper.java src/main/java/com/gk/firework/Mapper/StandardRewardRecordMapper.java src/main/java/com/gk/firework/Mapper/StandardSupplyMarketObjectMapper.java src/main/java/com/gk/firework/Mapper/StandardTemplate1Mapper.java src/main/java/com/gk/firework/Mapper/StaticStockMapper.java src/main/java/com/gk/firework/Mapper/StockInfoMapper.java src/main/java/com/gk/firework/Mapper/TransportCarrierMapper.java src/main/java/com/gk/firework/Mapper/TransportCertFileMapper.java src/main/java/com/gk/firework/Mapper/TransportCertMapper.java src/main/java/com/gk/firework/Mapper/TransportCertProductMapper.java src/main/java/com/gk/firework/Mapper/TransportCertificateApproachMapper.java src/main/java/com/gk/firework/Mapper/TransportCertificateArrivalRecordMapper.java src/main/java/com/gk/firework/Mapper/TransportCertificateFileMapper.java src/main/java/com/gk/firework/Mapper/TransportCertificateMapper.java src/main/java/com/gk/firework/Mapper/TransportCertificatePersonMapper.java src/main/java/com/gk/firework/Mapper/TransportCertificateProductMapper.java src/main/java/com/gk/firework/Mapper/TransportPersonMapper.java src/main/java/com/gk/firework/Mapper/UserDeadlineLogMapper.java src/main/java/com/gk/firework/Mapper/UserInfoMapper.java src/main/java/com/gk/firework/Mapper/UserRolesInfoMapper.java src/main/java/com/gk/firework/Mapper/WarnContentInfoMapper.java src/main/java/com/gk/firework/Mapper/WarningInfoMapper.java src/main/java/com/gk/firework/Mapper/mybatis/AccessAssessApplyMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/AppFileInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/AssessApplyMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/AuthorizationInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/BlackListMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/ContractDetailInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/ContractFileMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/ContractLogInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/ContractOrderInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/ContractUnitDetailMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/ControlPrintParamMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/CustomerInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/DeliveryDetailInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/DeliveryOrderInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/DictionaryItemInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/DictionaryTypeInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/DistrictInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseAnnualMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseApplyMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseDocumentMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseFeedMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseLicenseMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/EnterprisePersonMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseResourceMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseStaffMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseStandardizationMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/EnterpriseWarehouseMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/EntryDetailInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/EntryOrderInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/HelpDocInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/HiddenDangerCheckContentMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/HiddenDangerCheckCriteriaMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/HiddenDangerCheckResultMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/HiddenDangerCheckTypeMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/HiddenDangerMenuMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/HiddenDangerReportDetailMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/HiddenDangerReportMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/HistoryStockMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/LicenseInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/LicenseStorageMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/PatrolDetailInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/PatrolOrderInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/PermissionInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/ProductCategoryMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/ProductCodeInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/ProductInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/ProductLocusInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/ProductPriceInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/ProductThresholdInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/RegisterInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/RoleInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/RolePermissionsInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/SaleOrderDetailInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/SaleOrderInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/SaleProductInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/SecuritySupervisoryMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/SelfCheckInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/SelfCheckReportMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/SmsLogInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/SoldNoStockInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/StandDeviceToolsLegerMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/StandHiddenDangerLegerMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/StandProductLegerMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/StandardConferenceRecordMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/StandardEducationLegerMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/StandardEquipmentLegerMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/StandardGuardRollMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/StandardLawListMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/StandardRewardRecordMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/StandardSupplyMarketObjectMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/StandardTemplate1Mapper.xml src/main/java/com/gk/firework/Mapper/mybatis/StaticStockMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/StockInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/TransportCarrierMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/TransportCertFileMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/TransportCertMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/TransportCertProductMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/TransportCertificateApproachMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/TransportCertificateArrivalRecordMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/TransportCertificateFileMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/TransportCertificateMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/TransportCertificatePersonMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/TransportCertificateProductMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/TransportPersonMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/UserDeadlineLog.xml src/main/java/com/gk/firework/Mapper/mybatis/UserInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/UserRolesInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/WarnContentInfoMapper.xml src/main/java/com/gk/firework/Mapper/mybatis/WarningInfoMapper.xml src/main/java/com/gk/firework/Scheduls/AssessTask/EnforcePunishmentTask.java src/main/java/com/gk/firework/Scheduls/AssessTask/RecoverFromPunishmentTask.java src/main/java/com/gk/firework/Scheduls/DL/DeviceIdRobot.java src/main/java/com/gk/firework/Scheduls/DL/ReportOrderTask.java src/main/java/com/gk/firework/Scheduls/DealSoldNoStock/DealSoldNoStock.java src/main/java/com/gk/firework/Scheduls/GenerateCode/GenerateCodeTask.java src/main/java/com/gk/firework/Scheduls/ReportTask/AsyncGetStockTask.java src/main/java/com/gk/firework/Scheduls/ReportTask/HistoryStockRobot.java src/main/java/com/gk/firework/Scheduls/Task/CheckEnterpriseTask.java src/main/java/com/gk/firework/Scheduls/Test.java src/main/java/com/gk/firework/Scheduls/WarningTask/MessageSendTask.java src/main/java/com/gk/firework/Scheduls/WarningTask/NoEntryWarnTask.java src/main/java/com/gk/firework/Scheduls/WarningTask/PurchaseWarnTask.java src/main/java/com/gk/firework/Scheduls/WarningTask/StockWarnTask.java src/main/java/com/gk/firework/Scheduls/WarningTask/TransportWarnTask.java src/main/java/com/gk/firework/Service/AccessAssessApplyService.java src/main/java/com/gk/firework/Service/AppFileService.java src/main/java/com/gk/firework/Service/AssessApplyService.java src/main/java/com/gk/firework/Service/AuthorizationService.java src/main/java/com/gk/firework/Service/BlackListService.java src/main/java/com/gk/firework/Service/ContractDetailService.java src/main/java/com/gk/firework/Service/ContractFileService.java src/main/java/com/gk/firework/Service/ContractLogService.java src/main/java/com/gk/firework/Service/ContractOrderService.java src/main/java/com/gk/firework/Service/ContractUnitDetailService.java src/main/java/com/gk/firework/Service/ControlPrintParamService.java src/main/java/com/gk/firework/Service/CustomerService.java src/main/java/com/gk/firework/Service/DeliveryDetailService.java src/main/java/com/gk/firework/Service/DeliveryOrderService.java src/main/java/com/gk/firework/Service/DictionaryItemService.java src/main/java/com/gk/firework/Service/DictionaryTypeService.java src/main/java/com/gk/firework/Service/DistrictService.java src/main/java/com/gk/firework/Service/EnterpriseAnnualService.java src/main/java/com/gk/firework/Service/EnterpriseApplyService.java src/main/java/com/gk/firework/Service/EnterpriseDocumentService.java src/main/java/com/gk/firework/Service/EnterpriseFeedService.java src/main/java/com/gk/firework/Service/EnterpriseLicenseService.java src/main/java/com/gk/firework/Service/EnterprisePersonService.java src/main/java/com/gk/firework/Service/EnterpriseResourceService.java src/main/java/com/gk/firework/Service/EnterpriseService.java src/main/java/com/gk/firework/Service/EnterpriseStaffService.java src/main/java/com/gk/firework/Service/EnterpriseStandardizationService.java src/main/java/com/gk/firework/Service/EnterpriseWarehouseService.java src/main/java/com/gk/firework/Service/EntryDetailService.java src/main/java/com/gk/firework/Service/EntryService.java src/main/java/com/gk/firework/Service/ExcelExportService.java src/main/java/com/gk/firework/Service/HelpDocService.java src/main/java/com/gk/firework/Service/HiddenDangerCheckService.java src/main/java/com/gk/firework/Service/HiddenDangerMenuService.java src/main/java/com/gk/firework/Service/HiddenDangerReportDetailService.java src/main/java/com/gk/firework/Service/HiddenDangerReportService.java src/main/java/com/gk/firework/Service/HistoryStockService.java src/main/java/com/gk/firework/Service/LicenseService.java src/main/java/com/gk/firework/Service/LicenseStorageService.java src/main/java/com/gk/firework/Service/PatrolDetailService.java src/main/java/com/gk/firework/Service/PatrolOrderService.java src/main/java/com/gk/firework/Service/PermissionService.java src/main/java/com/gk/firework/Service/ProductCategoryService.java src/main/java/com/gk/firework/Service/ProductCodeService.java src/main/java/com/gk/firework/Service/ProductLocusService.java src/main/java/com/gk/firework/Service/ProductPriceService.java src/main/java/com/gk/firework/Service/ProductService.java src/main/java/com/gk/firework/Service/ProductThresholdService.java src/main/java/com/gk/firework/Service/RegisterService.java src/main/java/com/gk/firework/Service/RolePermissionsService.java src/main/java/com/gk/firework/Service/RoleService.java src/main/java/com/gk/firework/Service/SaleOrderDetailService.java src/main/java/com/gk/firework/Service/SaleOrderService.java src/main/java/com/gk/firework/Service/SaleProductService.java src/main/java/com/gk/firework/Service/SecuritySupervisoryService.java src/main/java/com/gk/firework/Service/SelfCheckReportService.java src/main/java/com/gk/firework/Service/SelfCheckService.java src/main/java/com/gk/firework/Service/ServiceImpl/AccessAssessApplyServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/AppFileServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/AssessApplyServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/AuthorizationServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/BlackListServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/ContractDetailServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/ContractFileServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/ContractLogServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/ContractOrderServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/ContractUnitDetailServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/ControlPrintParamServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/CustomerServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/DeliveryDetailServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/DeliveryOrderServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/DictionaryItemServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/DictionaryTypeServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/DistrictServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseAnnualServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseApplyServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseDocumentServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseFeedServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseLicenseServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/EnterprisePersonServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseResourceServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseStaffServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseStandardizationServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/EnterpriseWarehouseServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/EntryDetailServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/EntryServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/ExcelExportServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/HelpDocServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/HiddenDangerCheckServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/HiddenDangerMenuServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/HiddenDangerReportDetailServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/HiddenDangerReportServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/HistoryStockServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/LicenseServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/LicenseStorageServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/PatrolDetailServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/PatrolOrderServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/PermissionServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/ProductCategoryServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/ProductCodeServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/ProductLocusServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/ProductPriceServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/ProductServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/ProductThresholdServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/RegisterServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/RolePermissionsServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/RoleServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/SaleOrderDetailServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/SaleOrderServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/SaleProductServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/SecuritySupervisoryServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/SelfCheckReportServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/SelfCheckServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/SmsLogServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/SoldNoStockServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/StandardConferenceRecordServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/StandardDeviceToolsLegerServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/StandardEducationLegerServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/StandardGuardRollServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/StandardHiddenDangerLegerServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/StandardLawListServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/StandardProductLegerServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/StandardRewardRecordServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/StandardSupplyMarketObjectServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/StandardTemplate1ServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/StaticStockServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/StockServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/TransportCarrierServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/TransportCertFileServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/TransportCertProductServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/TransportCertServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/TransportCertificateApproachServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/TransportCertificateArrivalRecordServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/TransportCertificateFileServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/TransportCertificatePersonServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/TransportCertificateProductSeriveImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/TransportCertificateServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/TransportPersonServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/UserDeadlineServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/UserRolesServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/UserServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/WarnContentServiceImpl.java src/main/java/com/gk/firework/Service/ServiceImpl/WarningServiceImpl.java src/main/java/com/gk/firework/Service/SmsLogService.java src/main/java/com/gk/firework/Service/SoldNoStockService.java src/main/java/com/gk/firework/Service/StandardConferenceRecordService.java src/main/java/com/gk/firework/Service/StandardDeviceToolsLegerService.java src/main/java/com/gk/firework/Service/StandardEducationLegerService.java src/main/java/com/gk/firework/Service/StandardGuardRollService.java src/main/java/com/gk/firework/Service/StandardHiddenDangerLegerService.java src/main/java/com/gk/firework/Service/StandardLawListService.java src/main/java/com/gk/firework/Service/StandardProductLegerService.java src/main/java/com/gk/firework/Service/StandardRewardRecordService.java src/main/java/com/gk/firework/Service/StandardSupplyMarketObjectService.java src/main/java/com/gk/firework/Service/StandardTemplate1Service.java src/main/java/com/gk/firework/Service/StaticStockService.java src/main/java/com/gk/firework/Service/StockService.java src/main/java/com/gk/firework/Service/TransportCarrierService.java src/main/java/com/gk/firework/Service/TransportCertFileService.java src/main/java/com/gk/firework/Service/TransportCertProductService.java src/main/java/com/gk/firework/Service/TransportCertService.java src/main/java/com/gk/firework/Service/TransportCertificateApproachService.java src/main/java/com/gk/firework/Service/TransportCertificateArrivalRecordService.java src/main/java/com/gk/firework/Service/TransportCertificateFileService.java src/main/java/com/gk/firework/Service/TransportCertificatePersonService.java src/main/java/com/gk/firework/Service/TransportCertificateProductService.java src/main/java/com/gk/firework/Service/TransportCertificateService.java src/main/java/com/gk/firework/Service/TransportPersonService.java src/main/java/com/gk/firework/Service/UserDeadlineService.java src/main/java/com/gk/firework/Service/UserRolesService.java src/main/java/com/gk/firework/Service/UserService.java src/main/java/com/gk/firework/Service/WarnContentService.java src/main/java/com/gk/firework/Service/WarningService.java src/main/resources/application-aliyun-prod.yml src/main/resources/application-aliyun-test.yml src/main/resources/application-dev.yml src/main/resources/application-gkhyprov.yml src/main/resources/application-prod.yml src/main/resources/application-sznmsprov.yml src/main/resources/application-test.yml src/main/resources/application-testOnline.yml src/main/resources/application-xj8103prov.yml src/main/resources/application-xj8104prov.yml src/main/resources/application-xj8105prov.yml src/main/resources/application-xjbackprov.yml src/main/resources/application-xjprov.yml src/main/resources/application-xjzwprov.yml src/main/resources/application.yml src/main/resources/cert/keystorePass-cn.txt src/main/resources/cert/keystorePass.txt src/main/resources/cert/sinanoaq.cn.jks src/main/resources/cert/sinanoaq.com.jks src/main/resources/error.setting src/main/resources/log4j.properties src/main/resources/printTemplate/certificatelicense.docx src/main/resources/printTemplate/certificatelicenseapply.docx