|
@@ -3,16 +3,13 @@
|
|
|
*/
|
|
|
package com.jeeplus.modules.serialnum.service;
|
|
|
|
|
|
-import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.regex.Matcher;
|
|
|
-import java.util.regex.Pattern;
|
|
|
-
|
|
|
+import com.jeeplus.common.persistence.Page;
|
|
|
+import com.jeeplus.common.service.CrudService;
|
|
|
import com.jeeplus.common.utils.DateUtils;
|
|
|
import com.jeeplus.common.utils.IdGen;
|
|
|
import com.jeeplus.common.utils.StringUtils;
|
|
|
+import com.jeeplus.modules.serialnum.dao.SerialNumTplDao;
|
|
|
+import com.jeeplus.modules.serialnum.entity.SerialNumTpl;
|
|
|
import com.jeeplus.modules.serialnum.exception.SerialGenException;
|
|
|
import com.jeeplus.modules.sys.entity.Office;
|
|
|
import com.jeeplus.modules.sys.entity.User;
|
|
@@ -23,10 +20,10 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
-import com.jeeplus.common.persistence.Page;
|
|
|
-import com.jeeplus.common.service.CrudService;
|
|
|
-import com.jeeplus.modules.serialnum.entity.SerialNumTpl;
|
|
|
-import com.jeeplus.modules.serialnum.dao.SerialNumTplDao;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* 编号模板Service
|
|
@@ -137,6 +134,14 @@ public class SerialNumTplService extends CrudService<SerialNumTplDao, SerialNumT
|
|
|
String branchShortname = UserUtils.getSysParam("branch_shortname", UserUtils.getUser());
|
|
|
map.put("brspnm", StringUtils.isBlank(branchShortname)?"":branchShortname);
|
|
|
map.put("year",year);
|
|
|
+ Integer month = new Date().getMonth()+1;
|
|
|
+ String monthStr = null;
|
|
|
+ if (month<10){
|
|
|
+ monthStr = "0"+month;
|
|
|
+ }else{
|
|
|
+ monthStr = month.toString();
|
|
|
+ }
|
|
|
+ map.put("month",monthStr);
|
|
|
map.put("serialNum",sb.toString());
|
|
|
String serNum = StringUtils.renderString(serialTpl, map);
|
|
|
return serNum;
|