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 {