From e7c45e6c5ae62cb0718e12f30ee8f3181ed997a2 Mon Sep 17 00:00:00 2001 From: user Date: Wed, 18 Jul 2018 17:02:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=94=B3=E8=AF=B7=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=9F=E6=88=90=E9=A1=B9=E7=9B=AE=E7=BC=96?= =?UTF-8?q?=E5=8F=B7=E7=9A=84=E6=96=B9=E6=B3=95=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src_core/com/tenwa/util/SerialNumberUtil.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src_core/com/tenwa/util/SerialNumberUtil.java b/src_core/com/tenwa/util/SerialNumberUtil.java index 3996a22f3..3166a6545 100644 --- a/src_core/com/tenwa/util/SerialNumberUtil.java +++ b/src_core/com/tenwa/util/SerialNumberUtil.java @@ -120,11 +120,19 @@ public class SerialNumberUtil { } public static synchronized String getProjectSerialNumber1(String orgId,JBOTransaction tx) throws Exception{ - return SerialNumberUtil.getSerialNumber("A{year}{maxOrderNumber}",7,null, "项目编号"+orgId, null, tx); + String currentDateTime = DateAssistant.getToday(); + String currentYear = currentDateTime.substring(0,4); + String currentMonth = currentDateTime.substring(5,7); + String currentDay = currentDateTime.substring(8,10); + return SerialNumberUtil.getSerialNumber("A"+currentYear+currentMonth+currentDay+"{maxOrderNumber}",4,null, "项目编号"+orgId, null, tx); } public static synchronized String getProjectSerialNumber2(String orgId,JBOTransaction tx) throws Exception{ - return SerialNumberUtil.getSerialNumber("T{year}{maxOrderNumber}",7,null, "项目编号"+orgId, null, tx); + String currentDateTime = DateAssistant.getToday(); + String currentYear = currentDateTime.substring(0,4); + String currentMonth = currentDateTime.substring(5,7); + String currentDay = currentDateTime.substring(8,10); + return SerialNumberUtil.getSerialNumber("T"+currentYear+currentMonth+currentDay+"{maxOrderNumber}",4,null, "项目编号"+orgId, null, tx); } public static String getContractSerialNaumber(String dept,String area_code,JBOTransaction tx) throws Exception {