From 07dcca3be250eeedc64bdc8171fe23e45b77dd28 Mon Sep 17 00:00:00 2001
From: shicf <shi_chongfu@163.com>
Date: 星期四, 24 四月 2025 11:03:19 +0800
Subject: [PATCH] app自动升级
---
src/main/java/com/product/mobile/core/service/SignInService.java | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/product/mobile/core/service/SignInService.java b/src/main/java/com/product/mobile/core/service/SignInService.java
index a0f8ecb..05c9c4c 100644
--- a/src/main/java/com/product/mobile/core/service/SignInService.java
+++ b/src/main/java/com/product/mobile/core/service/SignInService.java
@@ -79,7 +79,7 @@
t=4;
rule=config.getString("afternoon_work_off");
}else {//涓婄彮
- if(check(record,"1")) {
+ if(check(record,1)!=null) {
throw new BaseException(MobileCoreCode.SIGN_IN_REPEAT_FAIL);
}
fse.setValue("punch_type","1");
@@ -101,14 +101,14 @@
}else {//涓婄彮
//涓婄彮鍗★紝姣斾笂鍗堜笅鐝棭锛岃涓婂崍涓婄彮鍗�
if(dataCompareTo(fse.getDate("punch_time"),config.getDate("morning_work_off")) ) {
- if(check(record,"1")) {
+ if(check(record,1)!=null) {
throw new BaseException(MobileCoreCode.SIGN_IN_REPEAT_FAIL);
}
fse.setValue("punch_type","1");
t=1;
rule=config.getString("morning_work");
}else {//璁颁笅鍗堜笂鐝崱
- if(check(record,"3")) {
+ if(check(record,3)!=null) {
throw new BaseException(MobileCoreCode.SIGN_IN_REPEAT_FAIL);
}
fse.setValue("punch_type","3");
@@ -124,6 +124,14 @@
rule=rule.substring(10);
rule=DateUtil.formatDate(new Date())+rule;
}
+ if(t%2==0) {
+ ///濡備笅鏄笅鐝崱锛屽苟涓斿綋澶╁凡缁忔墦杩囦簡锛屽彧鏄幓淇敼鏈�鍚庢墦鍗℃椂闂达紝涓嶆槸鏂板涓�鏉℃墦鍗¤褰�
+ String uuid=check(record,t);
+ if(uuid!=null) {
+ fse.setValue("uuid", uuid);
+ }
+ }
+
long resutl=signinResult(DateUtil.parse(rule),fse.getDate("punch_time"),t);
if(resutl>0) {
fse.setValue("sign_in_result", 0);//杩熷埌
@@ -158,13 +166,13 @@
}
//涓婄彮鏃堕棿涓嶈兘閲嶅鎵撳崱
- private boolean check(DataTableEntity record,String type) {
+ private String check(DataTableEntity record,int type) {
for(int i=0;i<record.getRows();i++) {
- if(type.equals( record.getFieldSetEntity(i).getString("punch_type"))) {
- return true;
+ if(type==record.getFieldSetEntity(i).getInteger("punch_type").intValue()) {
+ return record.getFieldSetEntity(i).getString("uuid");
}
}
- return false;
+ return null;
}
/**
--
Gitblit v1.9.2