From f16ee221c1384160c96a5907791d07e4f6126c4c Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期五, 24 四月 2026 10:48:17 +0800
Subject: [PATCH] 获取捐献进程进度统计
---
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/BaseOnlyvalueServiceImpl.java | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/BaseOnlyvalueServiceImpl.java b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/BaseOnlyvalueServiceImpl.java
index a87095f..56c77ad 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/BaseOnlyvalueServiceImpl.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/BaseOnlyvalueServiceImpl.java
@@ -8,10 +8,12 @@
import com.ruoyi.project.domain.BaseOnlyvalue;
import com.ruoyi.project.mapper.BaseOnlyvalueMapper;
import com.ruoyi.project.service.IBaseOnlyvalueService;
+import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
+import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.List;
@@ -101,4 +103,39 @@
}
+ /**
+ * 鑾峰彇搴忓垪鍙�
+ *
+ * @param businessType
+ * @return
+ */
+ @Override
+ public String getSequence(String businessType, String orgId) {
+ LocalDate currentDate = LocalDate.now();
+ int year = currentDate.getYear();
+ String month = currentDate.getMonthValue()+"";
+ if(month.length()==1)
+ month="0"+month;
+ if(ObjectUtils.isEmpty(orgId)){
+ orgId="";
+ }
+ //閫氳繃骞存湀鏃ユ湡鍘绘煡璇㈣鏈堜唤鏄惁瀛樺湪
+ String data =year + month+orgId;
+ BaseOnlyvalue baseOnlyvalue = new BaseOnlyvalue();
+ baseOnlyvalue.setBusinesstype(businessType);
+
+ List<BaseOnlyvalue> baseOnlyvalues = queryList(baseOnlyvalue);
+ if(baseOnlyvalues.size()==0){
+ baseOnlyvalue.setAppentvalue(businessType);
+ baseOnlyvalue.setCurrentvalue(1L);
+ baseOnlyvalue.setBusinesstype(businessType);
+ save(baseOnlyvalue);
+ }else {
+ baseOnlyvalue= baseOnlyvalues.get(0);
+ baseOnlyvalue.setCurrentvalue(baseOnlyvalue.getCurrentvalue()+1);
+ updateById(baseOnlyvalue);
+ }
+ return baseOnlyvalue.getAppentvalue() + data + baseOnlyvalue.getCurrentvalue();
+ }
+
}
--
Gitblit v1.9.3