forked from gzzfw/backEnd/gz-dyh

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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package cn.huge.module.common.controller;
 
import cn.huge.base.common.utils.ReturnFailUtils;
import cn.huge.base.common.utils.ReturnSucUtils;
import cn.huge.module.common.utils.CaseIdUtils;
import cn.huge.module.common.utils.CommonIdUtils;
import cn.huge.module.common.utils.JudicIdUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import javax.servlet.http.HttpServletRequest;
 
/**
 * @title: 公共参数-id工具接口api
 * @description: 公共参数-id工具接口api
 * @company: hugeinfo
 * @author: liyj
 * @time: 2022-04-29 10:12:39
 * @version: 1.0.0
 */
@Slf4j
@RestController
@RequestMapping("/common/api/idUtils")
public class IdUtilsController {
 
    @Autowired(required = false)
    private HttpServletRequest request;
 
 
    /**
     * 案件id-获取时间Id,后四位常量
     * @url {ctx}/common/api/idUtils/getCaseNewTimeId
     * @return Object
     */
    @GetMapping("/getCaseNewTimeId")
    public Object getCaseNewTimeId() {
        try {
            return ReturnSucUtils.getRepInfo(CaseIdUtils.getNewTimeId());
        } catch (Exception e) {
            return ReturnFailUtils.getRepInfo();
        }
    }
 
 
    /**
     * 司法确认id-获取时间Id,后四位常量
     * @url {ctx}/common/api/idUtils/getJudicNewTimeId
     * @return Object
     */
    @GetMapping("/getJudicNewTimeId")
    public Object getJudicNewTimeId() {
        try {
            return ReturnSucUtils.getRepInfo(JudicIdUtils.getNewTimeId());
        } catch (Exception e) {
            return ReturnFailUtils.getRepInfo();
        }
    }
 
 
    /**
     * 公共id-获取时间Id,后四位常量
     * @url {ctx}/common/api/idUtils/getNewTimeId
     * @return Object
     */
    @GetMapping("/getNewTimeId")
    public Object getNewTimeId() {
        try {
            return ReturnSucUtils.getRepInfo(CommonIdUtils.getNewTimeId());
        } catch (Exception e) {
            return ReturnFailUtils.getRepInfo();
        }
    }
 
}