jiazx0107@163.com
2023-05-17 620eab6cca2bc9ef9ea6d3067a0a5ba1deadbd1c
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
package com.ld.igds.grain;
 
import com.ld.igds.constant.DepotType;
import com.ld.igds.grain.dto.GrainParam;
import com.ld.igds.grain.dto.PrintModeData;
 
 
/**
 * 粮情打印模板后台设计,当前为模板设计入口
 *
 * @author jiazx
 */
public class GrainPrintBuilder {
 
    /**
     * 获取打印模板
     *
     * @param param
     * @return
     */
    public static PrintModeData buildPrintModel(GrainParam param) {
        String depotType = param.getDepotType();
        //平方仓
        if (DepotType.TYPE_01.getCode().equals(depotType)) {
            //横向通风
            if ("5013".equals(param.getCompanyId())) {
               return GrainPrintBuilderLay01.buildModel(param);
            }
            return GrainPrintBuilder01.buildModel(param);
        }
        //筒仓
        if (DepotType.TYPE_02.getCode().equals(depotType)) {
           return GrainPrintBuilder04.buildModel(param);
        }
 
        //油罐仓
        if (DepotType.TYPE_03.getCode().equals(depotType)) {
            return GrainPrintBuilder03.buildModel(param);
        }
 
        //立同仓
        if (DepotType.TYPE_04.getCode().equals(depotType)) {
            return GrainPrintBuilder04.buildModel(param);
        }
        //平方仓
        return GrainPrintBuilder01.buildModel(param);
    }
}