Administrator
2023-04-19 40ec16bbb7c9d23df625aa31ae42ac36e901749d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.mandi.fendan.util;
 
import java.util.HashMap;
import java.util.Map;
 
import javax.annotation.Resource;
 
import org.springframework.stereotype.Service;
 
import com.mandi.dao.common.ObjectResult;
import com.mandi.fendan.mapper.Fd_BsheetMapper;
 
/**
 * 编号生成器
 * 使用redis并发性更好
 *
 */
@Service
public class PrefixUtil {
    
    private static Map<String, String> lockMap=new HashMap<String, String>();
    
    @Resource
    private Fd_BsheetMapper fbper;
    
    
    //获取销售业务单编号
    public static  ObjectResult<String> getPrex(){
        
        
        //查找业务单号
            
        synchronized (lockMap) {
            
            //fbper表查找当前最大的序号
        }
        
        return null;
    }
 
}