Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0c98628d03 | |||
| 4c658628be | |||
| e0a34dbb9c | |||
| 45cd64b284 | |||
| 9cf8e0a47f | |||
| 49e4b473c6 | |||
| 1a06ab6807 | |||
| 615eec3b7a | |||
| fdc23e4326 | |||
| 0c0cb8607e | |||
| 7a2506ff98 | |||
| b782e398fd | |||
| f789b3b255 | |||
| 25d326e4a7 | |||
| 1d94c923bd |
8
DockerFile
Normal file
8
DockerFile
Normal file
@@ -0,0 +1,8 @@
|
||||
FROM openjdk:8-jre
|
||||
LABEL name="hoperun-custom-sign"
|
||||
MAINTAINER li@2ha.me
|
||||
WORKDIR /
|
||||
ADD target/hoperun-sign-1.0-SNAPSHOT.jar app.jar
|
||||
EXPOSE 8982
|
||||
ENTRYPOINT ["java", "-jar"]
|
||||
CMD ["app.jar"]
|
||||
5
pom.xml
5
pom.xml
@@ -21,7 +21,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<kotlin.code.style>official</kotlin.code.style>
|
||||
<kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
|
||||
<kotlin.version>1.7.22</kotlin.version>
|
||||
<kotlin.version>2.0.20</kotlin.version>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
@@ -34,7 +34,7 @@
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
<outputDirectory>./target</outputDirectory>
|
||||
<classifier>executable</classifier>
|
||||
<!-- <classifier>executable</classifier>-->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
@@ -89,6 +89,7 @@
|
||||
<jvmTarget>1.8</jvmTarget>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
309
settings.xml
Normal file
309
settings.xml
Normal file
@@ -0,0 +1,309 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<!--
|
||||
| This is the configuration file for Maven. It can be specified at two levels:
|
||||
|
|
||||
| 1. User Level. This settings.xml file provides configuration for a single user,
|
||||
| and is normally provided in ${user.home}/.m2/settings.xml.
|
||||
|
|
||||
| NOTE: This location can be overridden with the CLI option:
|
||||
|
|
||||
| -s /path/to/user/settings.xml
|
||||
|
|
||||
| 2. Global Level. This settings.xml file provides configuration for all Maven
|
||||
| users on a machine (assuming they're all using the same Maven
|
||||
| installation). It's normally provided in
|
||||
| ${maven.conf}/settings.xml.
|
||||
|
|
||||
| NOTE: This location can be overridden with the CLI option:
|
||||
|
|
||||
| -gs /path/to/global/settings.xml
|
||||
|
|
||||
| The sections in this sample file are intended to give you a running start at
|
||||
| getting the most out of your Maven installation. Where appropriate, the default
|
||||
| values (values used when the setting is not specified) are provided.
|
||||
|
|
||||
|-->
|
||||
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">
|
||||
<!-- localRepository
|
||||
| The path to the local repository maven will use to store artifacts.
|
||||
|
|
||||
| Default: ${user.home}/.m2/repository
|
||||
<localRepository>/path/to/local/repo</localRepository>
|
||||
-->
|
||||
|
||||
<!-- interactiveMode
|
||||
| This will determine whether maven prompts you when it needs input. If set to false,
|
||||
| maven will use a sensible default value, perhaps based on some other setting, for
|
||||
| the parameter in question.
|
||||
|
|
||||
| Default: true
|
||||
<interactiveMode>true</interactiveMode>
|
||||
-->
|
||||
|
||||
<!-- offline
|
||||
| Determines whether maven should attempt to connect to the network when executing a build.
|
||||
| This will have an effect on artifact downloads, artifact deployment, and others.
|
||||
|
|
||||
| Default: false
|
||||
<offline>false</offline>
|
||||
-->
|
||||
|
||||
<!-- pluginGroups
|
||||
| This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
|
||||
| when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
|
||||
| "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
|
||||
|-->
|
||||
<pluginGroups>
|
||||
<!-- pluginGroup
|
||||
| Specifies a further group identifier to use for plugin lookup.
|
||||
<pluginGroup>com.your.plugins</pluginGroup>
|
||||
-->
|
||||
</pluginGroups>
|
||||
|
||||
<!-- TODO Since when can proxies be selected as depicted? -->
|
||||
<!-- proxies
|
||||
| This is a list of proxies which can be used on this machine to connect to the network.
|
||||
| Unless otherwise specified (by system property or command-line switch), the first proxy
|
||||
| specification in this list marked as active will be used.
|
||||
|-->
|
||||
<proxies>
|
||||
<!-- proxy
|
||||
| Specification for one proxy, to be used in connecting to the network.
|
||||
|
|
||||
<proxy>
|
||||
<id>optional</id>
|
||||
<active>true</active>
|
||||
<protocol>http</protocol>
|
||||
<username>proxyuser</username>
|
||||
<password>proxypass</password>
|
||||
<host>proxy.host.net</host>
|
||||
<port>80</port>
|
||||
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
|
||||
</proxy>
|
||||
-->
|
||||
</proxies>
|
||||
|
||||
<!-- servers
|
||||
| This is a list of authentication profiles, keyed by the server-id used within the system.
|
||||
| Authentication profiles can be used whenever maven must make a connection to a remote server.
|
||||
|-->
|
||||
<servers>
|
||||
<!-- server
|
||||
| Specifies the authentication information to use when connecting to a particular server, identified by
|
||||
| a unique name within the system (referred to by the 'id' attribute below).
|
||||
|
|
||||
| NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are
|
||||
| used together.
|
||||
|
|
||||
<server>
|
||||
<id>deploymentRepo</id>
|
||||
<username>repouser</username>
|
||||
<password>repopwd</password>
|
||||
</server>
|
||||
-->
|
||||
|
||||
<!-- Another sample, using keys to authenticate.
|
||||
<server>
|
||||
<id>siteServer</id>
|
||||
<privateKey>/path/to/private/key</privateKey>
|
||||
<passphrase>optional; leave empty if not used.</passphrase>
|
||||
</server>
|
||||
-->
|
||||
<server>
|
||||
<id>2ha</id>
|
||||
<username>jimlee</username>
|
||||
<password>wysnih-dybbyQ-0rigti</password>
|
||||
</server>
|
||||
<server>
|
||||
<id>maven-releases</id>
|
||||
<username>jimlee</username>
|
||||
<password>wysnih-dybbyQ-0rigti</password>
|
||||
</server>
|
||||
<server>
|
||||
<id>maven-snapshots</id>
|
||||
<username>jimlee</username>
|
||||
<password>wysnih-dybbyQ-0rigti</password>
|
||||
</server>
|
||||
</servers>
|
||||
|
||||
<!-- mirrors
|
||||
| This is a list of mirrors to be used in downloading artifacts from remote repositories.
|
||||
|
|
||||
| It works like this: a POM may declare a repository to use in resolving certain artifacts.
|
||||
| However, this repository may have problems with heavy traffic at times, so people have mirrored
|
||||
| it to several places.
|
||||
|
|
||||
| That repository definition will have a unique id, so we can create a mirror reference for that
|
||||
| repository, to be used as an alternate download site. The mirror site will be the preferred
|
||||
| server for that repository.
|
||||
|-->
|
||||
<mirrors>
|
||||
<!-- mirror
|
||||
| Specifies a repository mirror site to use instead of a given repository. The repository that
|
||||
| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
|
||||
| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
|
||||
|
|
||||
<mirror>
|
||||
<id>mirrorId</id>
|
||||
<mirrorOf>repositoryId</mirrorOf>
|
||||
<name>Human Readable Name for this Mirror.</name>
|
||||
<url>http://my.repository.com/repo/path</url>
|
||||
</mirror>
|
||||
-->
|
||||
<mirror>
|
||||
<id>mirror-all</id>
|
||||
<mirrorOf>*</mirrorOf>
|
||||
<name>2ha mirror</name>
|
||||
<url>https://2ha.me:18082/repository/maven-public/</url>
|
||||
</mirror>
|
||||
</mirrors>
|
||||
|
||||
<!-- profiles
|
||||
| This is a list of profiles which can be activated in a variety of ways, and which can modify
|
||||
| the build process. Profiles provided in the settings.xml are intended to provide local machine-
|
||||
| specific paths and repository locations which allow the build to work in the local environment.
|
||||
|
|
||||
| For example, if you have an integration testing plugin - like cactus - that needs to know where
|
||||
| your Tomcat instance is installed, you can provide a variable here such that the variable is
|
||||
| dereferenced during the build process to configure the cactus plugin.
|
||||
|
|
||||
| As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
|
||||
| section of this document (settings.xml) - will be discussed later. Another way essentially
|
||||
| relies on the detection of a property, either matching a particular value for the property,
|
||||
| or merely testing its existence. Profiles can also be activated by JDK version prefix, where a
|
||||
| value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
|
||||
| Finally, the list of active profiles can be specified directly from the command line.
|
||||
|
|
||||
| NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
|
||||
| repositories, plugin repositories, and free-form properties to be used as configuration
|
||||
| variables for plugins in the POM.
|
||||
|
|
||||
|-->
|
||||
<profiles>
|
||||
<!-- profile
|
||||
| Specifies a set of introductions to the build process, to be activated using one or more of the
|
||||
| mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
|
||||
| or the command line, profiles have to have an ID that is unique.
|
||||
|
|
||||
| An encouraged best practice for profile identification is to use a consistent naming convention
|
||||
| for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
|
||||
| This will make it more intuitive to understand what the set of introduced profiles is attempting
|
||||
| to accomplish, particularly when you only have a list of profile id's for debug.
|
||||
|
|
||||
| This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
|
||||
<profile>
|
||||
<id>jdk-1.4</id>
|
||||
|
||||
<activation>
|
||||
<jdk>1.4</jdk>
|
||||
</activation>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jdk14</id>
|
||||
<name>Repository for JDK 1.4 builds</name>
|
||||
<url>http://www.myhost.com/maven/jdk14</url>
|
||||
<layout>default</layout>
|
||||
<snapshotPolicy>always</snapshotPolicy>
|
||||
</repository>
|
||||
</repositories>
|
||||
</profile>
|
||||
-->
|
||||
|
||||
<!--
|
||||
| Here is another profile, activated by the property 'target-env' with a value of 'dev', which
|
||||
| provides a specific path to the Tomcat instance. To use this, your plugin configuration might
|
||||
| hypothetically look like:
|
||||
|
|
||||
| ...
|
||||
| <plugin>
|
||||
| <groupId>org.myco.myplugins</groupId>
|
||||
| <artifactId>myplugin</artifactId>
|
||||
|
|
||||
| <configuration>
|
||||
| <tomcatLocation>${tomcatPath}</tomcatLocation>
|
||||
| </configuration>
|
||||
| </plugin>
|
||||
| ...
|
||||
|
|
||||
| NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
|
||||
| anything, you could just leave off the <value/> inside the activation-property.
|
||||
|
|
||||
<profile>
|
||||
<id>env-dev</id>
|
||||
|
||||
<activation>
|
||||
<property>
|
||||
<name>target-env</name>
|
||||
<value>dev</value>
|
||||
</property>
|
||||
</activation>
|
||||
|
||||
<properties>
|
||||
<tomcatPath>/path/to/tomcat/instance</tomcatPath>
|
||||
</properties>
|
||||
</profile>
|
||||
-->
|
||||
<profile>
|
||||
<id>jimlee-dev</id>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>2ha</id>
|
||||
<name>2ha.me nexus private</name>
|
||||
<url>https://2ha.me:18082/repository/maven-public/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>maven-releases</id>
|
||||
<name>Nexus Release Repository</name>
|
||||
<url>https://2ha.me:18082/repository/private/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>maven-snapshots</id>
|
||||
<name>Nexus Snapshot Repository</name>
|
||||
<url>https://2ha.me:18082/repository/private/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<!-- activeProfiles
|
||||
| List of profiles that are active for all builds.
|
||||
|
|
||||
<activeProfiles>
|
||||
<activeProfile>alwaysActiveProfile</activeProfile>
|
||||
<activeProfile>anotherAlwaysActiveProfile</activeProfile>
|
||||
</activeProfiles>
|
||||
-->
|
||||
<activeProfiles>
|
||||
<activeProfile>jimlee-dev</activeProfile>
|
||||
</activeProfiles>
|
||||
</settings>
|
||||
@@ -15,19 +15,28 @@ import java.util.*
|
||||
* 启动入口
|
||||
**/
|
||||
@SpringBootApplication
|
||||
open class DakaApplication {
|
||||
}
|
||||
open class DakaApplication
|
||||
|
||||
val <T : Any> T.logger: Logger
|
||||
get() = LoggerFactory.getLogger(this::class.java)
|
||||
|
||||
val holidays: List<String> = listOf(
|
||||
"2023-04-05",
|
||||
"2023-04-29", "2023-04-30", "2023-05-01", "2023-05-01", "2023-05-03",
|
||||
"2023-06-22", "2023-06-23", "2023-06-24",
|
||||
"2023-09-29", "2023-09-30", "2023-10-01", "2023-10-02", "2023-10-03", "2023-10-04", "2023-10-05", "2023-10-06")
|
||||
// 元旦
|
||||
"2025-01-01",
|
||||
// 春节
|
||||
"2025-01-28", "2025-01-29", "2025-01-30", "2025-01-31", "2025-02-01", "2025-02-02", "2025-02-03", "2025-02-04",
|
||||
// 清明
|
||||
"2025-04-04", "2025-04-05", "2025-04-06",
|
||||
// 劳动节
|
||||
"2025-05-01", "2025-05-02", "2025-05-05", "2025-05-04", "2025-05-05",
|
||||
// 端午节
|
||||
"2025-05-31", "2025-06-01", "2025-06-02",
|
||||
// 中秋
|
||||
// 国庆
|
||||
"2025-10-01", "2025-10-02", "2025-10-03", "2025-10-04", "2025-10-05", "2025-10-06", "2025-10-07", "2025-10-08")
|
||||
|
||||
val workdays: List<String> = listOf("2023-04-23", "2023-05-06", "2023-06-25", "2023-10-07", "2023-10-08")
|
||||
// 周末要上班的日期
|
||||
val workdays: List<String> = listOf("2025-01-26", "2025-02-08", "2025-04-27", "2025-10-11", "2025-09-28", "2025-10-12")
|
||||
|
||||
private val logger = LoggerFactory.getLogger("APPLICATION-STARTER")
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
@@ -163,6 +163,17 @@ class HoperunSignController {
|
||||
monthAttLog.autoDakaBeginTime = autoDaka.beginTime
|
||||
monthAttLog.autoDakaEndTime = autoDaka.endTime
|
||||
}
|
||||
monthAttResult.forEach {
|
||||
it.actual_area_begin =
|
||||
if (!it.actual_area_begin.isNullOrBlank()) {
|
||||
if (it.actual_area_begin == "buqianka") "补签卡" else
|
||||
area_regex.find(it.actual_area_begin!!)?.groups?.get(0)?.value
|
||||
} else null
|
||||
it.actual_area_end = if (!it.actual_area_end.isNullOrBlank()) {
|
||||
if (it.actual_area_end == "buqianka") "补签卡" else
|
||||
area_regex.find(it.actual_area_end!!)?.groups?.get(0)?.value
|
||||
} else null
|
||||
}
|
||||
return monthAttResult
|
||||
}
|
||||
|
||||
@@ -252,6 +263,8 @@ class HoperunSignController {
|
||||
|
||||
|
||||
private fun setUserConfig(employeeNo: String) {
|
||||
if (userConfigMap[employeeNo] != null
|
||||
&& userConfigMap[employeeNo]!!.timeout > System.currentTimeMillis()) return
|
||||
// 获取deviceua
|
||||
val loginRequest = Request.Builder()
|
||||
.url("http://pom.hoperun.com:8187/attp/login/login.do")
|
||||
@@ -300,7 +313,8 @@ class HoperunSignController {
|
||||
val username: String = lastDakaInfo.getString("staff_name")
|
||||
userConfig.username = username
|
||||
if (userConfig.device == null) {
|
||||
if (lastDakaInfo.getString("actual_area_end") != null) {
|
||||
if (lastDakaInfo.getString("actual_area_end") != null
|
||||
&& lastDakaInfo.getString("actual_area_end") != "buqianka") {
|
||||
val area: String = lastDakaInfo.getString("actual_area_end")
|
||||
userConfig.device = area.substring(area.lastIndexOf("Qing") + 13)
|
||||
} else if (lastDakaInfo.getString("actual_area_begin") != null) {
|
||||
@@ -371,6 +385,8 @@ class WebResult<T> protected constructor() : java.io.Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
val area_regex = Regex(".*[\\u4e00-\\u9fa5]|[0-9][\\u4e00-\\u9fa5]")
|
||||
|
||||
data class MonthAttLog(
|
||||
var area_id: String? = null,
|
||||
var area_id_begin: String? = null,
|
||||
@@ -387,6 +403,8 @@ data class MonthAttLog(
|
||||
var yearmonth: String? = null,
|
||||
var autoDakaBeginTime: String? = null,
|
||||
var autoDakaEndTime: String? = null,
|
||||
var actual_area_begin: String? = null,
|
||||
var actual_area_end: String? = null
|
||||
)
|
||||
|
||||
data class HoperunDakaRequest(
|
||||
|
||||
@@ -32,7 +32,7 @@ import java.util.*
|
||||
|
||||
const val DAKA_URL = "http://pom.hoperun.com:8187/attm/attence/recordAttendance"
|
||||
const val MONTH_ATT_URL = "http://pom.hoperun.com:8187/attm/calendar/monthAtt"
|
||||
val DEFAULT_ZONE = ZoneOffset.of("+8")
|
||||
val DEFAULT_ZONE: ZoneOffset = ZoneOffset.of("+8")
|
||||
|
||||
val client = OkHttpClient()
|
||||
.newBuilder()
|
||||
|
||||
@@ -15,7 +15,7 @@ object HoperunUserConfig {
|
||||
)
|
||||
|
||||
val userConfigMap: MutableMap<String, UserConfig> = HashMap()
|
||||
var address: String = "浙江省杭州市西湖区转塘街道凌家桥路飞天园区"
|
||||
var address: String = "浙江省杭州市西湖区飞天园区1号楼"
|
||||
var longitueHead: String = "120.085"
|
||||
var latitudeHead: String = "30.138"
|
||||
var longitueShort: String = "120.0845715522375"
|
||||
@@ -62,5 +62,6 @@ data class UserConfig(
|
||||
var project_id: String? = null,
|
||||
var projectname: String? = null,
|
||||
var projectcode: String? = null,
|
||||
var autoDaka: Boolean = false
|
||||
var autoDaka: Boolean = false,
|
||||
val timeout: Long = System.currentTimeMillis() + 1000 * 60 * 30
|
||||
)
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.pomelotea.hoperun.sign.config
|
||||
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.web.servlet.config.annotation.CorsRegistry
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jimlee
|
||||
* @create 2024/11/1 13:15
|
||||
*/
|
||||
@Configuration
|
||||
open class CorsConfig : WebMvcConfigurer {
|
||||
override fun addCorsMappings(registry: CorsRegistry) {
|
||||
registry.addMapping("/**")
|
||||
.allowedMethods("*")
|
||||
.allowedHeaders("*")
|
||||
.allowedOriginPatterns("*")
|
||||
.allowCredentials(true)
|
||||
.maxAge(3600)
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ class AutoDakaScheduler {
|
||||
val logger: Logger = LoggerFactory.getLogger("DAKA-SHCEDULER")
|
||||
}
|
||||
|
||||
fun addAutoDakaScheduled(dakaDate: String = getNowDateyyyy_MM_dd()) {
|
||||
private fun addAutoDakaScheduled(dakaDate: String = getNowDateyyyy_MM_dd()) {
|
||||
// 调休的工作日
|
||||
if (isNeedDaka(dakaDate)) {
|
||||
HoperunUserConfig.userConfigMap.forEach { (_, v) ->
|
||||
@@ -45,8 +45,8 @@ class AutoDakaScheduler {
|
||||
if (daka == null) {
|
||||
daka = generateDakaInfo(v, dakaDate)
|
||||
dakaQueue.add(daka)
|
||||
logger.info("添加打卡任务: ${v.username}, $daka")
|
||||
}
|
||||
logger.info("${v.username},${daka.toCsv()}")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,9 +89,9 @@ class AutoDakaScheduler {
|
||||
try {
|
||||
logger.info("[EXECUTE]BEGIN:${daka.employeeNo}:DATE:${daka.dakaDate}:TIME:${daka.beginTime}")
|
||||
// 模拟重新登录打卡
|
||||
logger.info("${daka.employeeNo}OLD-JSESSIONID: ${sessionMap[daka.employeeNo]}")
|
||||
logger.info("${daka.employeeNo}-OLD-JSESSIONID: ${sessionMap[daka.employeeNo]}")
|
||||
resetJSessionId(employeeNo = daka.employeeNo)
|
||||
logger.info("${daka.employeeNo}NEW-JSESSIONID: ${sessionMap[daka.employeeNo]}")
|
||||
logger.info("${daka.employeeNo}-NEW-JSESSIONID: ${sessionMap[daka.employeeNo]}")
|
||||
val resp: DakaResponse =
|
||||
beginTime(employeeNo = daka.employeeNo, date = daka.dakaDate, time = daka.beginTime)
|
||||
if (resp.result != "success") {
|
||||
@@ -110,9 +110,9 @@ class AutoDakaScheduler {
|
||||
try {
|
||||
logger.info("[EXECUTE]END:${daka.employeeNo}:DATE:${daka.dakaDate}:TIME:${daka.endTime}")
|
||||
// 模拟重新登录打卡
|
||||
logger.info("${daka.employeeNo}OLD-JSESSIONID: ${sessionMap[daka.employeeNo]}")
|
||||
logger.info("${daka.employeeNo}-OLD-JSESSIONID: ${sessionMap[daka.employeeNo]}")
|
||||
resetJSessionId(employeeNo = daka.employeeNo)
|
||||
logger.info("${daka.employeeNo}NEW-JSESSIONID: ${sessionMap[daka.employeeNo]}")
|
||||
logger.info("${daka.employeeNo}-NEW-JSESSIONID: ${sessionMap[daka.employeeNo]}")
|
||||
val resp: DakaResponse = endTime(employeeNo = daka.employeeNo, date = daka.dakaDate, time = daka.endTime)
|
||||
if (resp.result != "success") {
|
||||
logger.error("打下班卡失败")
|
||||
@@ -137,10 +137,13 @@ class AutoDakaScheduler {
|
||||
schedulerThreadPool as ScheduledThreadPoolExecutor
|
||||
val queue = schedulerThreadPool.queue
|
||||
logger.info("任务队列数量: ${queue.size}")
|
||||
dakaQueue.forEach {
|
||||
logger.info(it.toString())
|
||||
}
|
||||
}
|
||||
|
||||
private fun getRandomEndTime(): String {
|
||||
val hourArray = intArrayOf(18, 19, 20, 21, 22, 23, 19, 20, 20, 19, 18, 20)
|
||||
val hourArray = intArrayOf(18, 19, 20, 19, 19, 20, 19, 20, 20, 19, 18, 20)
|
||||
val randomHour = hourArray[Math.round(Math.random() * 9).toInt()]
|
||||
val randomMinute = if (randomHour == 18) {
|
||||
30 + Random().nextInt(19)
|
||||
@@ -167,4 +170,8 @@ data class Daka(
|
||||
fun toCsv(): String {
|
||||
return "$employeeNo,$dakaDate,$beginTime,$endTime,$added"
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "工号: $employeeNo, 日期: $dakaDate, 上班卡: $beginTime, 下班卡: $endTime, 定时开关: $added"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
server:
|
||||
port: 8082
|
||||
port: 8982
|
||||
|
||||
hoperun:
|
||||
address: "浙江省杭州市西湖区转塘街道凌家桥路飞天园区120"
|
||||
|
||||
@@ -89,12 +89,14 @@
|
||||
<!-- scheduler logger -->
|
||||
<logger name="DAKA-SHCEDULER" level="${logging.level}">
|
||||
<appender-ref ref="SCHEDULER-APPENDER"/>
|
||||
<appender-ref ref="STDOUT" />
|
||||
</logger>
|
||||
|
||||
<!-- application logger -->
|
||||
<logger name="com.pomelotea.hoperun.sign" level="${logging.level}" additivity="false">
|
||||
<appender-ref ref="ROOT-APPENDER"/>
|
||||
<appender-ref ref="ERROR-APPENDER"/>
|
||||
<appender-ref ref="STDOUT" />
|
||||
</logger>
|
||||
|
||||
|
||||
|
||||
56
src/main/resources/static/error.html
Normal file
56
src/main/resources/static/error.html
Normal file
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<title>404 Not Found</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<style>
|
||||
body {
|
||||
color: #A1A2AF;
|
||||
font-family: "Microsoft YaHei", "Segoe UI", "Lucida Grande", Helvetica,
|
||||
Arial, sans-serif;
|
||||
}
|
||||
.layout {
|
||||
width: 1190px;
|
||||
margin: 150px auto;
|
||||
}
|
||||
.err {
|
||||
position: relative;
|
||||
width: 568px;
|
||||
height: 306px;
|
||||
margin: 100px auto 40px;
|
||||
background: url("/img/airplane-404page.jpg") no-repeat 21px 18px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.err_text {
|
||||
position: absolute;
|
||||
top: 246px;
|
||||
left: 239px;
|
||||
}
|
||||
.err_back {
|
||||
position: absolute;
|
||||
top: 257px;
|
||||
left: 353px;
|
||||
width: 154px;
|
||||
height: 38px;
|
||||
text-indent: -999px;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layout">
|
||||
<div class="main">
|
||||
<div class="err">
|
||||
<p class="err_text">
|
||||
非常抱歉,您访
|
||||
<br>
|
||||
问的页面不存在
|
||||
</p>
|
||||
<a href="/index.html" class="err_back">返回首页</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
src/main/resources/static/favicon.ico
Normal file
BIN
src/main/resources/static/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@@ -1,4 +1,4 @@
|
||||
x<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="ico_checkon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
||||
y="0px" viewBox="0 0 42 42" style="enable-background:new 0 0 42 42;" xml:space="preserve">
|
||||
|
||||
|
Before Width: | Height: | Size: 665 B After Width: | Height: | Size: 664 B |
@@ -1,131 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>打卡</title>
|
||||
<link rel="stylesheet" href="./normalize.min.css">
|
||||
<link rel="stylesheet" href="./style.css">
|
||||
</head>
|
||||
<body class="dark-mode"><!--partial:index.partial.html-->
|
||||
<div class="job">
|
||||
<div class="header">
|
||||
<div class="logo">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
||||
<path xmlns="http://www.w3.org/2000/svg"
|
||||
d="M512 503.5H381.7a48 48 0 01-45.3-32.1L265 268.1l-9-25.5 2.7-124.6L338.2 8.5l23.5 67.1L512 503.5z"
|
||||
fill="#0473ff" data-original="#28b446"/>
|
||||
<path xmlns="http://www.w3.org/2000/svg" fill="#0473ff" data-original="#219b38"
|
||||
d="M361.7 75.6L265 268.1l-9-25.5 2.7-124.6L338.2 8.5z"/>
|
||||
<path xmlns="http://www.w3.org/2000/svg"
|
||||
d="M338.2 8.5l-82.2 234-80.4 228.9a48 48 0 01-45.3 32.1H0l173.8-495h164.4z" fill="#0473ff"
|
||||
data-original="#518ef8"/>
|
||||
</svg>
|
||||
打卡
|
||||
</div>
|
||||
<div class="user-settings">
|
||||
<div class="dark-light">
|
||||
<svg viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5" fill="none" stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<img class="user-profile" id="user-head" src="img/tx.png" alt="">
|
||||
<div id="user-div">
|
||||
<div id="username">未登陆</div>
|
||||
<span id="login-span">
|
||||
<div class="alert-inline">
|
||||
<div>
|
||||
<input class="login-input" id="employee-number" type="text" placeholder="输入工号">
|
||||
</div>
|
||||
<!--<div>
|
||||
<input class="login-input" style="width: 280px" id="jsessionId" type="text" placeholder="输入SESSIONID">
|
||||
</div>-->
|
||||
<div>
|
||||
<div id="autodaka">自动打卡开关</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="toggle toggle--switch">
|
||||
<input type="checkbox" id="toggle--switch" class="toggle--checkbox">
|
||||
<label class="toggle--btn" for="toggle--switch"><span class="toggle--feature" data-label-on="on" data-label-off="off"></span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="random-buttons" id="login">登陆</button>
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
<div id="logout-div" style="display: none">
|
||||
<button class="random-buttons" id="logout">登出</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialog" style="display: none">
|
||||
<div class="alert">
|
||||
<div class="job-card-title" id="sign-date"><span style="font-size: 24px"></span></div>
|
||||
<div class="alert-inline">
|
||||
<div><input id="sign-begin-time" type="text" placeholder="输入上班时间"></div>
|
||||
<div>
|
||||
<button class="random-buttons" id="sign-begin-random">随机</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert-inline">
|
||||
<div><input id="sign-end-time" type="text" placeholder="输入下班时间"></div>
|
||||
<div>
|
||||
<button class="random-buttons" id="sign-end-random">随机</button>
|
||||
</div>
|
||||
</div>
|
||||
<button class="search-buttons card-buttons begin-buttons" id="save-sign">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="userinfo_dialog" style="display: none">
|
||||
<div class="alert">
|
||||
<div class="job-card-title"><span style="font-size: 24px">打卡信息</span></div>
|
||||
<div class="alert-inline">
|
||||
<div>
|
||||
<label for="_user_input">用 户 名 : </label>
|
||||
<input id="_user_input" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert-inline">
|
||||
<div>
|
||||
<label for="_project_id_input">项 目 I D: </label>
|
||||
<input id="_project_id_input" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert-inline">
|
||||
<div>
|
||||
<label for="_project_name_input">项目名称: </label>
|
||||
<input id="_project_name_input" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert-inline">
|
||||
<div>
|
||||
<label for="_area_input">打卡地区: </label>
|
||||
<input id="_area_input" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert-inline">
|
||||
<div>
|
||||
<label for="_device_input">设备信息: </label>
|
||||
<input id="_device_input" readonly="readonly" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrapper">
|
||||
<div class="main-container">
|
||||
<div class="searched-jobs">
|
||||
<div class="searched-bar">
|
||||
<div class="searched-show">打卡记录</div>
|
||||
<!--<button class="search-button">餐补<span class="canbu-span"></span></button>--></div>
|
||||
<div class="job-cards"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="./coco-message.js"></script>
|
||||
<script src="./jquery.min.js"></script>
|
||||
<script src="./script.js"></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +1 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>打卡</title><link rel="stylesheet"href="./normalize.min.css"><link rel="stylesheet"href="./style.css"></head><body class="dark-mode"><!--partial:index.partial.html--><div class="job"><div class="header"><div class="logo"><svg xmlns="http://www.w3.org/2000/svg"viewBox="0 0 512 512"><path xmlns="http://www.w3.org/2000/svg"d="M512 503.5H381.7a48 48 0 01-45.3-32.1L265 268.1l-9-25.5 2.7-124.6L338.2 8.5l23.5 67.1L512 503.5z"fill="#0473ff"data-original="#28b446"/><path xmlns="http://www.w3.org/2000/svg"fill="#0473ff"data-original="#219b38"d="M361.7 75.6L265 268.1l-9-25.5 2.7-124.6L338.2 8.5z"/><path xmlns="http://www.w3.org/2000/svg"d="M338.2 8.5l-82.2 234-80.4 228.9a48 48 0 01-45.3 32.1H0l173.8-495h164.4z"fill="#0473ff"data-original="#518ef8"/></svg>打卡</div><div class="user-settings"><div class="dark-light"><svg viewBox="0 0 24 24"stroke="currentColor"stroke-width="1.5"fill="none"stroke-linecap="round"stroke-linejoin="round"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path></svg></div><img class="user-profile"id="user-head"src="img/tx.png"alt=""><div id="user-div"><div id="username">未登陆</div><span id="login-span"><div class="alert-inline"><div><input class="login-input"id="employee-number"type="text"placeholder="输入工号"></div><!--<div><input class="login-input"style="width: 280px"id="jsessionId"type="text"placeholder="输入SESSIONID"></div>--><div><div id="autodaka">自动打卡开关</div></div><div><div class="toggle toggle--switch"><input type="checkbox"id="toggle--switch"class="toggle--checkbox"><label class="toggle--btn"for="toggle--switch"><span class="toggle--feature"data-label-on="on"data-label-off="off"></span></label></div></div><div><button class="random-buttons"id="login">登陆</button></div></div></span><div id="logout-div"style="display: none"><button class="random-buttons"id="logout">登出</button></div></div></div></div><div class="dialog"style="display: none"><div class="alert"><div class="job-card-title"id="sign-date"><span style="font-size: 24px"></span></div><div class="alert-inline"><div><input id="sign-begin-time"type="text"placeholder="输入上班时间"></div><div><button class="random-buttons"id="sign-begin-random">随机</button></div></div><div class="alert-inline"><div><input id="sign-end-time"type="text"placeholder="输入下班时间"></div><div><button class="random-buttons"id="sign-end-random">随机</button></div></div><button class="search-buttons card-buttons begin-buttons"id="save-sign">保存</button></div></div><div class="userinfo_dialog"style="display: none"><div class="alert"><div class="job-card-title"><span style="font-size: 24px">打卡信息</span></div><div class="alert-inline"><div><label for="_user_input">用户名:</label><input id="_user_input"readonly="readonly"type="text"></div></div><div class="alert-inline"><div><label for="_project_id_input">项目I D:</label><input id="_project_id_input"readonly="readonly"type="text"></div></div><div class="alert-inline"><div><label for="_project_name_input">项目名称:</label><input id="_project_name_input"readonly="readonly"type="text"></div></div><div class="alert-inline"><div><label for="_area_input">打卡地区:</label><input id="_area_input"readonly="readonly"type="text"></div></div><div class="alert-inline"><div><label for="_device_input">设备信息:</label><input id="_device_input"readonly="readonly"type="text"></div></div></div></div><div class="wrapper"><div class="main-container"><div class="searched-jobs"><div class="searched-bar"><div class="searched-show">打卡记录</div><!--<button class="search-button">餐补<span class="canbu-span"></span></button>--></div><div class="job-cards"></div></div></div></div><script src="./coco-message.js"></script><script src="./jquery.min.js"></script><script src="./script.js"></script></div></body></html>
|
||||
<!DOCTYPE html><html lang="zh"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1" /><title>打卡</title><link rel="stylesheet"href="./normalize.min.css"><link rel="stylesheet"href="./style.css"></head><body class="dark-mode"><!--partial:index.partial.html--><div class="job"><div class="header"><div class="logo"><svg xmlns="http://www.w3.org/2000/svg"viewBox="0 0 512 512"><path xmlns="http://www.w3.org/2000/svg"d="M512 503.5H381.7a48 48 0 01-45.3-32.1L265 268.1l-9-25.5 2.7-124.6L338.2 8.5l23.5 67.1L512 503.5z"fill="#0473ff"data-original="#28b446"/><path xmlns="http://www.w3.org/2000/svg"fill="#0473ff"data-original="#219b38"d="M361.7 75.6L265 268.1l-9-25.5 2.7-124.6L338.2 8.5z"/><path xmlns="http://www.w3.org/2000/svg"d="M338.2 8.5l-82.2 234-80.4 228.9a48 48 0 01-45.3 32.1H0l173.8-495h164.4z"fill="#0473ff"data-original="#518ef8"/></svg>打卡</div><div class="user-settings"><div class="dark-light"><svg viewBox="0 0 24 24"stroke="currentColor"stroke-width="1.5"fill="none"stroke-linecap="round"stroke-linejoin="round"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path></svg></div><img class="user-profile"id="user-head"src="img/tx.png"alt=""><div id="user-div"><div id="username">未登陆</div><span id="login-span"><div class="alert-inline"><div><input class="login-input"id="employee-number"type="text"placeholder="输入工号"></div><!--<div><input class="login-input"style="width: 280px"id="jsessionId"type="text"placeholder="输入SESSIONID"></div>--><div><div id="autodaka">自动打卡开关</div></div><div><div class="toggle toggle--switch"><input type="checkbox"id="toggle--switch"class="toggle--checkbox"><label class="toggle--btn"for="toggle--switch"><span class="toggle--feature"data-label-on="on"data-label-off="off"></span></label></div></div><div><button class="random-buttons"id="login">登陆</button></div></div></span><div id="logout-div"style="display: none"><button class="random-buttons"id="logout">登出</button></div></div></div></div><div class="dialog rainbow"style="display: none"><div class="alert"><div class="job-card-title"id="sign-date"><span style="font-size: 24px"></span></div><div class="alert-inline"><div><input id="sign-begin-time"type="text"placeholder="输入上班时间"></div><div><button class="random-buttons"id="sign-begin-random">随机</button></div></div><div class="alert-inline"><div><input id="sign-end-time"type="text"placeholder="输入下班时间"></div><div><button class="random-buttons"id="sign-end-random">随机</button></div></div><button class="search-buttons card-buttons begin-buttons"id="save-sign">保存</button></div></div><div class="userinfo_dialog rainbow"style="display: none"><div class="alert"><div class="job-card-title"><span style="font-size: 24px">打卡信息</span></div><div class="alert-inline"><div><label for="_user_input">用户名:</label><input id="_user_input"readonly="readonly"type="text"></div></div><div class="alert-inline"><div><label for="_project_id_input">项目I D:</label><input id="_project_id_input"readonly="readonly"type="text"></div></div><div class="alert-inline"><div><label for="_project_name_input">项目名称:</label><input id="_project_name_input"readonly="readonly"type="text"></div></div><div class="alert-inline"><div><label for="_area_input">打卡地区:</label><input id="_area_input"readonly="readonly"type="text"></div></div><div class="alert-inline"><div><label for="_device_input">设备信息:</label><input id="_device_input"readonly="readonly"type="text"></div></div></div></div><div class="wrapper"><div class="main-container"><div class="searched-jobs"><div class="searched-bar"><div class="searched-show">打卡记录</div><!--<button class="search-button">餐补<span class="canbu-span"></span></button>--></div><div class="job-cards"></div></div></div></div><script src="./coco-message.js"></script><script src="./jquery.min.js"></script><script src="./script.js"></script></div></body></html>
|
||||
|
||||
@@ -105,7 +105,15 @@ function loadDakaList() {
|
||||
dateBeginTimeMap[signlog.yearmonth] = (signlog.begin_time == null ? "未打卡" : signlog.begin_time.substr(11, 5));
|
||||
dateEndTimeMap[signlog.yearmonth] = (signlog.end_time == null ? "未打卡" : signlog.end_time.substr(11, 5));
|
||||
index++;
|
||||
$('.job-cards').append('<div class="job-card">' +
|
||||
let beginWarn = (signlog.begin_time != null && signlog.begin_time.substr(11, 5) > '09:30')
|
||||
let endWarn = (signlog.end_time != null && signlog.end_time.substr(11, 5) < '18:30')
|
||||
let buqianWarn = (signlog.actual_area_begin === '补签卡' || signlog.actual_area_end === '补签卡')
|
||||
let weidakaWarn = (signlog.begin_time == null || signlog.end_time == null)
|
||||
|
||||
$('.job-cards').append('<div class="job-card ' +
|
||||
(beginWarn || endWarn || weidakaWarn || buqianWarn ? 'rainbow' : '') + '" '+
|
||||
// (beginWarn || endWarn || weidakaWarn || buqianWarn ? 'style="border: 8px; border-color: #ff8611; border-radius: 8px; border-style: solid;"' : "") +
|
||||
'>' +
|
||||
'<div class="job-card-title">' + (nowDate === signlog.yearmonth ? "今天" : signlog.yearmonth) + '</div>' +
|
||||
'<div class="job-card-subtitle">' +
|
||||
signlog.area_id +
|
||||
@@ -113,15 +121,23 @@ function loadDakaList() {
|
||||
'<div class="job-detail-buttons">' +
|
||||
'<button class="search-buttons detail-button">' + (signlog.begin_time == null ? "未打卡" : signlog.begin_time.substr(11, 5)) + '</button>' +
|
||||
'<button class="search-buttons detail-button">' + (signlog.end_time == null ? "未打卡" : signlog.end_time.substr(11, 5)) + '</button>' +
|
||||
(signlog.autoDakaBeginTime == null ? "" : '<br><button class="search-buttons detail-button">定时上班卡时间: ' + signlog.autoDakaBeginTime + '</button>') +
|
||||
(signlog.autoDakaEndTime == null ? "" : '<button class="search-buttons detail-button">定时下班卡时间: ' + signlog.autoDakaEndTime + '</button>') +
|
||||
(signlog.end_time != null && signlog.end_time.substr(11, 5) > "21:00" ? '<button class="search-buttons detail-button">餐补</button>' : '') +
|
||||
(signlog.autoDakaBeginTime == null ? "" : '<button class="search-buttons detail-button" style="font-size: 10px">定时上班卡时间: ' + signlog.autoDakaBeginTime + '</button>') +
|
||||
(signlog.autoDakaEndTime == null ? "" : '<button class="search-buttons detail-button" style="font-size: 10px">定时下班卡时间: ' + signlog.autoDakaEndTime + '</button>') +
|
||||
// (signlog.end_time != null && signlog.end_time.substr(11, 5) > "21:00" ? '<button class="search-buttons detail-button">餐补</button>' : '') +
|
||||
'</div>' +
|
||||
(index <= 3 ? '<div class="job-card-buttons">' +
|
||||
'<button class="search-buttons card-buttons daka-buttons"' +
|
||||
'">打卡</button>' +
|
||||
'<button class="search-buttons card-buttons auto-daka-buttons">自动补卡</button>' +
|
||||
'</div>' : '') +
|
||||
(index > 3 ?
|
||||
'<div class="job-card-subtitle">' +
|
||||
signlog.actual_area_begin +
|
||||
'</div>' +
|
||||
(signlog.actual_area_begin !== signlog.actual_area_end ? '<div class="job-card-subtitle">' +
|
||||
signlog.actual_area_end +
|
||||
'</div>' : '')
|
||||
: '') +
|
||||
'</div>'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
--border-color: #d8d8d8;
|
||||
--alert-bg-color: #e8f2ff;
|
||||
--subtitle-color: #83838e;
|
||||
--subtext-color: #d5d5d5;
|
||||
--inactive-color: #f0f0f0;
|
||||
--placeholder-color: #9b9ba5;
|
||||
--time-button: #fc5757;
|
||||
@@ -95,7 +96,7 @@ body {
|
||||
}
|
||||
.dark-mode .detail-button {
|
||||
background-color: var(--inactive-color);
|
||||
color: var(--subtitle-color);
|
||||
color: var(--subtext-color);
|
||||
}
|
||||
|
||||
.job {
|
||||
@@ -188,6 +189,7 @@ body {
|
||||
}
|
||||
|
||||
.user-profile {
|
||||
display: none;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
@@ -208,6 +210,7 @@ body {
|
||||
scroll-behavior: smooth;
|
||||
padding: 30px 40px;
|
||||
overflow: auto;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
.search-menu {
|
||||
@@ -361,6 +364,10 @@ body {
|
||||
margin-left: -100px;
|
||||
margin-top: -100px;
|
||||
position: absolute;
|
||||
box-shadow: 0px 2px 4px hsl(0 0% 0% / 25%);
|
||||
animation: border-angle-rotate 2s infinite linear;
|
||||
border: 0.5rem solid transparent;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.userinfo_dialog {
|
||||
@@ -368,11 +375,15 @@ body {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
z-index: 101;
|
||||
left: 33%;
|
||||
left: 50%;
|
||||
top: 40%;
|
||||
margin-left: -100px;
|
||||
margin-top: -100px;
|
||||
position: absolute;
|
||||
margin: auto 0;
|
||||
transform: translate(-50%, -50%);
|
||||
box-shadow: 0px 2px 4px hsl(0 0% 0% / 25%);
|
||||
animation: border-angle-rotate 2s infinite linear;
|
||||
border: 0.5rem solid transparent;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.userinfo_dialog > div > .alert-inline {
|
||||
@@ -388,12 +399,13 @@ body {
|
||||
}
|
||||
|
||||
body > div > div.userinfo_dialog > div > div > div {
|
||||
display: inline-flex;
|
||||
display: inline-grid;
|
||||
grid-template-columns: 20% 80%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#username {
|
||||
padding: 11px;
|
||||
padding: 13px;
|
||||
}
|
||||
|
||||
|
||||
@@ -436,8 +448,12 @@ body > div > div.userinfo_dialog > div > div > div {
|
||||
color: var(--body-color)
|
||||
}
|
||||
|
||||
#username {
|
||||
/*width: 64px;*/
|
||||
}
|
||||
|
||||
body > div > div.userinfo_dialog > div > div > div input {
|
||||
width: 85%;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
display: block;
|
||||
border-radius: 8px 8px 8px 8px;
|
||||
@@ -467,7 +483,7 @@ body > div > div.userinfo_dialog > div > div > div input {
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
margin-top: 14px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.job-wrapper {
|
||||
@@ -595,37 +611,92 @@ body > div > div.userinfo_dialog > div > div > div input {
|
||||
|
||||
.job-cards {
|
||||
padding-top: 20px;
|
||||
padding-right: 80px;
|
||||
/*padding-right: 80px;*/
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
grid-template-columns: repeat(6, 1fr);
|
||||
grid-column-gap: 25px;
|
||||
grid-row-gap: 25px;
|
||||
-webkit-animation: slideY .6s both;
|
||||
animation: slideY .6s both;
|
||||
}
|
||||
@media screen and (max-width: 1212px) {
|
||||
|
||||
@media screen and (max-width: 480px) {
|
||||
.job-cards {
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
|
||||
#autodaka {
|
||||
display: none;
|
||||
}
|
||||
@media screen and (max-width: 930px) {
|
||||
|
||||
#user-head {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.userinfo_dialog {
|
||||
width: 88% !important;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
padding: 0 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1080px) {
|
||||
.job-cards {
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
|
||||
.userinfo_dialog {
|
||||
width: 60%;
|
||||
}
|
||||
}
|
||||
|
||||
@property --border-angle {
|
||||
syntax: "<angle>";
|
||||
initial-value: 0deg;
|
||||
inherits: false;
|
||||
}
|
||||
|
||||
|
||||
@keyframes border-angle-rotate {
|
||||
from { --border-angle: 0deg; }
|
||||
to { --border-angle: 360deg; }
|
||||
}
|
||||
|
||||
.rainbow {
|
||||
background: linear-gradient(var(--header-bg-color), var(--header-bg-color)) padding-box,
|
||||
conic-gradient(
|
||||
from var(--border-angle),
|
||||
oklch(100% 100% 0deg),
|
||||
oklch(100% 100% 45deg),
|
||||
oklch(100% 100% 90deg),
|
||||
oklch(100% 100% 135deg),
|
||||
oklch(100% 100% 180deg),
|
||||
oklch(100% 100% 225deg),
|
||||
oklch(100% 100% 270deg),
|
||||
oklch(100% 100% 315deg),
|
||||
oklch(100% 100% 360deg)
|
||||
)
|
||||
border-box;
|
||||
}
|
||||
|
||||
.job-card {
|
||||
padding: 20px 16px;
|
||||
background-color: var(--header-bg-color);
|
||||
border-radius: 8px;
|
||||
border-radius: 16px;
|
||||
cursor: pointer;
|
||||
-webkit-transition: .2s;
|
||||
transition: .2s;
|
||||
box-shadow: 0px 2px 4px hsl(0 0% 0% / 25%);
|
||||
animation: border-angle-rotate 2s infinite linear;
|
||||
border: 0.5rem solid transparent;
|
||||
}
|
||||
.job-card:hover {
|
||||
-webkit-transform: scale(1.02);
|
||||
transform: scale(1.02);
|
||||
}
|
||||
|
||||
.job-card svg {
|
||||
width: 46px;
|
||||
padding: 10px;
|
||||
@@ -690,19 +761,29 @@ body > div > div.userinfo_dialog > div > div > div input {
|
||||
padding: 6px 8px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.detail-button + .detail-button {
|
||||
margin-left: 4px;
|
||||
/*.detail-button + .detail-button {*/
|
||||
/* margin-left: 4px;*/
|
||||
/*}*/
|
||||
|
||||
.job-detail-buttons {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-column-gap: 10px;
|
||||
grid-row-gap: 4px;
|
||||
}
|
||||
|
||||
.job-card-buttons {
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-column-gap: 10px;
|
||||
grid-row-gap: 25px;
|
||||
-webkit-box-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: justify;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
margin-top: 4px;
|
||||
flex-flow: column;
|
||||
}
|
||||
#logout-div .random-buttons {
|
||||
border-radius: 8px;
|
||||
@@ -715,14 +796,15 @@ body > div > div.userinfo_dialog > div > div > div input {
|
||||
.card-buttons,
|
||||
.card-buttons-msg {
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
min-width: 46%;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.card-buttons {
|
||||
margin-right: 12px;
|
||||
}
|
||||
/*.card-buttons {*/
|
||||
/* margin-right: 4%;*/
|
||||
/* margin-left: 4%;*/
|
||||
/*}*/
|
||||
.card-buttons-msg {
|
||||
background-color: var(--inactive-color);
|
||||
color: var(--subtitle-color);
|
||||
@@ -1287,3 +1369,7 @@ h1 + .headingOuter {
|
||||
.toggle--switch .toggle--checkbox:checked + .toggle--btn .toggle--feature:after {
|
||||
right: -60%;
|
||||
}
|
||||
|
||||
.coco-msg-stage {
|
||||
top: 80px !important;
|
||||
}
|
||||
38
src/test/kotlin/Test.kt
Normal file
38
src/test/kotlin/Test.kt
Normal file
@@ -0,0 +1,38 @@
|
||||
import java.util.*
|
||||
|
||||
|
||||
fun main() {
|
||||
|
||||
var ti = TreeNode(2)
|
||||
var v = ti.`val`
|
||||
|
||||
ti.right = TreeNode(4)
|
||||
ti.left = TreeNode(3)
|
||||
|
||||
ti.left!!.left = TreeNode(1)
|
||||
|
||||
println(inorderTraversal(ti))
|
||||
}
|
||||
|
||||
fun inorderTraversal(root: TreeNode?): List<Int> {
|
||||
var copyroot = root
|
||||
val list: MutableList<Int> = ArrayList()
|
||||
val stack = Stack<TreeNode>()
|
||||
while (copyroot != null || !stack.isEmpty()) {
|
||||
while (copyroot != null) {
|
||||
stack.push(copyroot)
|
||||
copyroot = copyroot.left
|
||||
}
|
||||
copyroot = stack.pop()
|
||||
list.add(copyroot.`val`)
|
||||
copyroot = copyroot.right
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
|
||||
|
||||
class TreeNode(var `val`: Int) {
|
||||
var left: TreeNode? = null
|
||||
var right: TreeNode? = null
|
||||
}
|
||||
Reference in New Issue
Block a user