正在显示
30 个修改的文件
包含
877 行增加
和
6 行删除
@@ -3,11 +3,11 @@ | @@ -3,11 +3,11 @@ | ||
3 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | 3 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
4 | <modelVersion>4.0.0</modelVersion> | 4 | <modelVersion>4.0.0</modelVersion> |
5 | <parent> | 5 | <parent> |
6 | - <groupId>org.springframework.boot</groupId> | ||
7 | - <artifactId>spring-boot-starter-parent</artifactId> | ||
8 | - <version>2.1.7.RELEASE</version> | ||
9 | - <relativePath/> <!-- lookup parent from repository --> | ||
10 | - </parent> | 6 | + <groupId>org.springframework.boot</groupId> |
7 | + <artifactId>spring-boot-starter-parent</artifactId> | ||
8 | + <version>2.1.7.RELEASE</version> | ||
9 | + <relativePath/> <!-- lookup parent from repository --> | ||
10 | + </parent> | ||
11 | <groupId>com.sunyo</groupId> | 11 | <groupId>com.sunyo</groupId> |
12 | <artifactId>cgoasm_provide</artifactId> | 12 | <artifactId>cgoasm_provide</artifactId> |
13 | <version>0.0.1-SNAPSHOT</version> | 13 | <version>0.0.1-SNAPSHOT</version> |
@@ -7,6 +7,9 @@ import org.springframework.cloud.netflix.eureka.EnableEurekaClient; | @@ -7,6 +7,9 @@ import org.springframework.cloud.netflix.eureka.EnableEurekaClient; | ||
7 | import org.springframework.cloud.openfeign.EnableFeignClients; | 7 | import org.springframework.cloud.openfeign.EnableFeignClients; |
8 | import org.springframework.transaction.annotation.EnableTransactionManagement; | 8 | import org.springframework.transaction.annotation.EnableTransactionManagement; |
9 | 9 | ||
10 | +/** | ||
11 | + * @author 子诚 | ||
12 | + */ | ||
10 | @SpringBootApplication | 13 | @SpringBootApplication |
11 | @MapperScan("com.sunyo.wlpt.cgoasm.provide.mapper") | 14 | @MapperScan("com.sunyo.wlpt.cgoasm.provide.mapper") |
12 | @EnableFeignClients | 15 | @EnableFeignClients |
1 | +package com.sunyo.wlpt.cgoasm.provide.common; | ||
2 | + | ||
3 | +import com.fasterxml.jackson.annotation.JsonFormat; | ||
4 | +import lombok.AllArgsConstructor; | ||
5 | +import lombok.Data; | ||
6 | +import lombok.NoArgsConstructor; | ||
7 | + | ||
8 | +import java.io.Serializable; | ||
9 | +import java.util.Date; | ||
10 | + | ||
11 | +/** | ||
12 | + * @author 子诚 | ||
13 | + * Description:实体类:新舱单——理货信息.最终返回结果类 | ||
14 | + * 时间:2020/5/20 10:40 | ||
15 | + */ | ||
16 | +@Data | ||
17 | +@AllArgsConstructor | ||
18 | +@NoArgsConstructor | ||
19 | +public class ResultExitData implements Serializable { | ||
20 | + | ||
21 | + private static final long serialVersionUID = -260680809813827352L; | ||
22 | + | ||
23 | + /** | ||
24 | + * 1.id | ||
25 | + */ | ||
26 | + private String autoId; | ||
27 | + | ||
28 | + /** | ||
29 | + * 2.运单号 | ||
30 | + */ | ||
31 | + private String waybillNoMaster; | ||
32 | + | ||
33 | + /** | ||
34 | + * 3.航班号 | ||
35 | + */ | ||
36 | + private String flightNo; | ||
37 | + | ||
38 | + /** | ||
39 | + * 4.航班日期 | ||
40 | + */ | ||
41 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | ||
42 | + private Date flightDate; | ||
43 | + | ||
44 | + /** | ||
45 | + * 5.航段 | ||
46 | + */ | ||
47 | + private String segment; | ||
48 | + | ||
49 | + /** | ||
50 | + * 6.航班起始站 | ||
51 | + */ | ||
52 | + private String originatingStation; | ||
53 | + | ||
54 | + /** | ||
55 | + * 7.航班目的站 | ||
56 | + */ | ||
57 | + private String destinationStation; | ||
58 | + | ||
59 | + /** | ||
60 | + * 8.理货件数 | ||
61 | + */ | ||
62 | + private String tallyTotalPiece; | ||
63 | + | ||
64 | + /** | ||
65 | + * 9.理货重量 | ||
66 | + */ | ||
67 | + private String tallyTotalWeight; | ||
68 | + | ||
69 | + /** | ||
70 | + * 10.承运人二字码 | ||
71 | + */ | ||
72 | + private String carrier; | ||
73 | + | ||
74 | + /** | ||
75 | + * 11.发货人名称 | ||
76 | + */ | ||
77 | + private String shipperName; | ||
78 | + | ||
79 | + /** | ||
80 | + * 12.收货人名称 | ||
81 | + */ | ||
82 | + private String consigneeName; | ||
83 | + | ||
84 | + /** | ||
85 | + * 13.货物目的站 | ||
86 | + */ | ||
87 | + private String aimStation; | ||
88 | + /** | ||
89 | + * 14.国家代码 | ||
90 | + */ | ||
91 | + private String country; | ||
92 | + | ||
93 | + /** | ||
94 | + * 15.航班目的区域,中文描述,所属洲 | ||
95 | + */ | ||
96 | + private String areaDescChn; | ||
97 | + | ||
98 | + /** | ||
99 | + * 16.代理人全称 | ||
100 | + */ | ||
101 | + private String fullName; | ||
102 | + | ||
103 | + /** | ||
104 | + * 17.货主类型 | ||
105 | + * 111 = 发货代理 | ||
106 | + * 222 = 订舱代理 | ||
107 | + * 333 = 操作代理/结算代理 | ||
108 | + */ | ||
109 | + private String theShipperType; | ||
110 | + | ||
111 | + /** | ||
112 | + * 18.品名 | ||
113 | + */ | ||
114 | + private String sdCargoName; | ||
115 | + | ||
116 | + /** | ||
117 | + * 19.二级类名称 | ||
118 | + */ | ||
119 | + private String twoTypeName; | ||
120 | + | ||
121 | + /** | ||
122 | + * 20.一级类名称 | ||
123 | + */ | ||
124 | + private String typeName; | ||
125 | +} |
1 | +package com.sunyo.wlpt.cgoasm.provide.controller; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.cgoasm.provide.common.ResultExitData; | ||
4 | +import com.sunyo.wlpt.cgoasm.provide.domain.*; | ||
5 | +import com.sunyo.wlpt.cgoasm.provide.service.*; | ||
6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
7 | +import org.springframework.web.bind.annotation.*; | ||
8 | + | ||
9 | +import javax.annotation.Resource; | ||
10 | +import java.util.List; | ||
11 | + | ||
12 | +/** | ||
13 | + * @author 子诚 | ||
14 | + * Description:获取 代理人服务 的相关信息 | ||
15 | + * 时间:2020/5/21 14:39 | ||
16 | + */ | ||
17 | +@CrossOrigin | ||
18 | +@RequestMapping("cgoasm") | ||
19 | +@RestController | ||
20 | +public class CgoAsmController { | ||
21 | + | ||
22 | + @Resource | ||
23 | + private HzWaybillInfoService hzWaybillInfoService; | ||
24 | + | ||
25 | + @Resource | ||
26 | + private HzShipperInformationService hzShipperInformationService; | ||
27 | + | ||
28 | + @Resource | ||
29 | + private SdCargoNameService sdCargoNameService; | ||
30 | + | ||
31 | + @Resource | ||
32 | + private SdTwoTypeService sdTwoTypeService; | ||
33 | + | ||
34 | + @Resource | ||
35 | + private SdBigTypeService sdBigTypeService; | ||
36 | + | ||
37 | + /** | ||
38 | + * 根据运单号,获取,代理人服务中的相关数据 | ||
39 | + * | ||
40 | + * @param resultList {@link ResultExitData} | ||
41 | + * @return | ||
42 | + */ | ||
43 | + @PutMapping("/getInfo") | ||
44 | + public List<ResultExitData> getInfo(@RequestBody List<ResultExitData> resultList) { | ||
45 | + System.out.println("开始调用代理人服务"); | ||
46 | + System.out.println("长度为" + resultList.size()); | ||
47 | + for (int i = 0, resultSize = resultList.size(); i < resultSize; i++) { | ||
48 | + ResultExitData result = resultList.get(i); | ||
49 | + System.out.println(i + "运单号" + result.getWaybillNoMaster()); | ||
50 | + /** | ||
51 | + * 2.根据运单号,获取品名,二级品类,一级品类 | ||
52 | + */ | ||
53 | + System.out.println(i + "品名"); | ||
54 | + List<SdCargoName> sd = sdCargoNameService.getSdCargoName(result.getWaybillNoMaster()); | ||
55 | + if (sd != null && sd.size() > 0) { | ||
56 | + // 品名 | ||
57 | + result.setSdCargoName(sd.get(0).getSdCargoName()); | ||
58 | + System.out.println(i + "二级品类"); | ||
59 | + List<SdTwoType> twoType = sdTwoTypeService.getSdTwoTypeInfo(sd.get(0).getSdCargoName()); | ||
60 | + if (twoType != null && twoType.size() > 0) { | ||
61 | + // 二级品类名称 | ||
62 | + result.setTwoTypeName(twoType.get(0).getTwoTypeName()); | ||
63 | + System.out.println(i + "一级品类"); | ||
64 | + List<SdBigType> big = sdBigTypeService.getSdBigTypeInfo(twoType.get(0).getBigTypeId()); | ||
65 | + if (big != null && big.size() > 0) { | ||
66 | + // 一级品类 | ||
67 | + result.setTypeName(big.get(0).getTypeName()); | ||
68 | + } | ||
69 | + } | ||
70 | + } | ||
71 | + /** | ||
72 | + * 1.根据运单号,获取货主信息表ID,最终获取:代理人名称,代理人类型 | ||
73 | + */ | ||
74 | + List<HzWaybillInfo> hz = hzWaybillInfoService.getHzWaybillInfo(result.getWaybillNoMaster()); | ||
75 | + if (hz != null && hz.size() > 0) { | ||
76 | + HzShipperInformation hzInfo = hzShipperInformationService.getHzInfo(hz.get(0).getHzInforId()); | ||
77 | + //设置代理人名称 | ||
78 | + result.setFullName(hzInfo.getFullName()); | ||
79 | + //设置代理人类型 | ||
80 | + result.setTheShipperType(hzInfo.getTheShipperType()); | ||
81 | + } | ||
82 | + } | ||
83 | + return resultList; | ||
84 | + } | ||
85 | +} |
1 | +package com.sunyo.wlpt.cgoasm.provide.domain; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.math.BigDecimal; | ||
5 | + | ||
6 | +import lombok.AllArgsConstructor; | ||
7 | +import lombok.Data; | ||
8 | +import lombok.NoArgsConstructor; | ||
9 | + | ||
10 | +/** | ||
11 | + * @author 子诚 | ||
12 | + * Description:代理人货主信息表 | ||
13 | + * 时间:2020/5/21 12:04 | ||
14 | + */ | ||
15 | +@Data | ||
16 | +@AllArgsConstructor | ||
17 | +@NoArgsConstructor | ||
18 | +public class HzShipperInformation implements Serializable { | ||
19 | + | ||
20 | + private static final long serialVersionUID = -5945024810650089134L; | ||
21 | + | ||
22 | + /** | ||
23 | + * 代理人货主信息表 | ||
24 | + */ | ||
25 | + private BigDecimal id; | ||
26 | + | ||
27 | + /** | ||
28 | + * 代理人三字码简称 | ||
29 | + */ | ||
30 | + private String forShort; | ||
31 | + | ||
32 | + /** | ||
33 | + * 代理人全称 | ||
34 | + */ | ||
35 | + private String fullName; | ||
36 | + | ||
37 | + /** | ||
38 | + * 货主类型 | ||
39 | + * 111 = 发货代理 | ||
40 | + * 222 = 订舱代理 | ||
41 | + * 333 = 操作代理/结算代理 | ||
42 | + */ | ||
43 | + private String theShipperType; | ||
44 | + | ||
45 | +} |
1 | +package com.sunyo.wlpt.cgoasm.provide.domain; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +import lombok.AllArgsConstructor; | ||
6 | +import lombok.Data; | ||
7 | +import lombok.NoArgsConstructor; | ||
8 | + | ||
9 | +/** | ||
10 | + * @author 子诚 | ||
11 | + * Description:代理人——预配货主信息关系表 | ||
12 | + * 时间:2020/5/21 11:56 | ||
13 | + */ | ||
14 | +@Data | ||
15 | +@AllArgsConstructor | ||
16 | +@NoArgsConstructor | ||
17 | +public class HzWaybillInfo implements Serializable { | ||
18 | + | ||
19 | + private static final long serialVersionUID = 366306104328586736L; | ||
20 | + | ||
21 | + /** | ||
22 | + * 预配运单号 | ||
23 | + */ | ||
24 | + private String waybillId; | ||
25 | + | ||
26 | + /** | ||
27 | + * 货主信息表ID | ||
28 | + */ | ||
29 | + private String hzInforId; | ||
30 | + | ||
31 | +} |
1 | +package com.sunyo.wlpt.cgoasm.provide.domain; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.math.BigDecimal; | ||
5 | + | ||
6 | +import lombok.AllArgsConstructor; | ||
7 | +import lombok.Data; | ||
8 | +import lombok.NoArgsConstructor; | ||
9 | + | ||
10 | +/** | ||
11 | + * @author 子诚 | ||
12 | + * Description:代理人一级分类表 | ||
13 | + * 时间:2020/5/21 14:19 | ||
14 | + */ | ||
15 | +@Data | ||
16 | +@AllArgsConstructor | ||
17 | +@NoArgsConstructor | ||
18 | +public class SdBigType implements Serializable { | ||
19 | + | ||
20 | + private static final long serialVersionUID = 6232806925901558585L; | ||
21 | + | ||
22 | + /** | ||
23 | + * 所属大类ID | ||
24 | + */ | ||
25 | + private BigDecimal id; | ||
26 | + | ||
27 | + /** | ||
28 | + * 一级类名称 | ||
29 | + */ | ||
30 | + private String typeName; | ||
31 | + | ||
32 | +} |
1 | +package com.sunyo.wlpt.cgoasm.provide.domain; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +import lombok.AllArgsConstructor; | ||
6 | +import lombok.Data; | ||
7 | +import lombok.NoArgsConstructor; | ||
8 | + | ||
9 | +/** | ||
10 | + * @author 子诚 | ||
11 | + * Description:代理人——安检品名表 | ||
12 | + * 时间:2020/5/21 14:13 | ||
13 | + */ | ||
14 | +@Data | ||
15 | +@AllArgsConstructor | ||
16 | +@NoArgsConstructor | ||
17 | +public class SdCargoName implements Serializable { | ||
18 | + | ||
19 | + private static final long serialVersionUID = 2990223703718832899L; | ||
20 | + | ||
21 | + /** | ||
22 | + * 运单号 | ||
23 | + */ | ||
24 | + private String sdWaybill; | ||
25 | + | ||
26 | + /** | ||
27 | + * 品名 | ||
28 | + */ | ||
29 | + private String sdCargoName; | ||
30 | + | ||
31 | +} |
1 | +package com.sunyo.wlpt.cgoasm.provide.domain; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.math.BigDecimal; | ||
5 | + | ||
6 | +import lombok.AllArgsConstructor; | ||
7 | +import lombok.Data; | ||
8 | +import lombok.NoArgsConstructor; | ||
9 | + | ||
10 | +/** | ||
11 | + * @author 子诚 | ||
12 | + * Description:代理人——二级分类表 | ||
13 | + * 时间:2020/5/21 14:17 | ||
14 | + */ | ||
15 | +@Data | ||
16 | +@AllArgsConstructor | ||
17 | +@NoArgsConstructor | ||
18 | +public class SdTwoType implements Serializable { | ||
19 | + | ||
20 | + private static final long serialVersionUID = -2679111453569335424L; | ||
21 | + | ||
22 | + /** | ||
23 | + * 品名 | ||
24 | + */ | ||
25 | + private String cargoName; | ||
26 | + | ||
27 | + /** | ||
28 | + * 二级类名称 | ||
29 | + */ | ||
30 | + private String twoTypeName; | ||
31 | + | ||
32 | + /** | ||
33 | + * 所属大类 | ||
34 | + */ | ||
35 | + private BigDecimal bigTypeId; | ||
36 | + | ||
37 | + | ||
38 | +} |
1 | +package com.sunyo.wlpt.cgoasm.provide.mapper; | ||
2 | + | ||
3 | + | ||
4 | +import com.sunyo.wlpt.cgoasm.provide.domain.HzShipperInformation; | ||
5 | +import org.apache.ibatis.annotations.Mapper; | ||
6 | + | ||
7 | +/** | ||
8 | + * @author 子诚 | ||
9 | + * Description: | ||
10 | + * 时间:2020/5/21 12:04 | ||
11 | + */ | ||
12 | +@Mapper | ||
13 | +public interface HzShipperInformationMapper { | ||
14 | + /** | ||
15 | + * 获取代理人货主信息表的相关信息 | ||
16 | + * | ||
17 | + * @param hzInforId 货主信息表ID | ||
18 | + * @return {@link HzShipperInformation} | ||
19 | + */ | ||
20 | + HzShipperInformation getHzInfo(String hzInforId); | ||
21 | +} |
1 | +package com.sunyo.wlpt.cgoasm.provide.mapper; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.cgoasm.provide.domain.HzWaybillInfo; | ||
4 | +import org.apache.ibatis.annotations.Mapper; | ||
5 | +import org.springframework.stereotype.Repository; | ||
6 | + | ||
7 | +import java.math.BigDecimal; | ||
8 | +import java.util.List; | ||
9 | + | ||
10 | +/** | ||
11 | + * @author 子诚 | ||
12 | + * Description: | ||
13 | + * 时间:2020/5/21 11:56 | ||
14 | + */ | ||
15 | +@Mapper | ||
16 | +@Repository | ||
17 | +public interface HzWaybillInfoMapper { | ||
18 | + /** | ||
19 | + * 获取 代理人——预配货主信息关系表 中的相关信息 | ||
20 | + * | ||
21 | + * @param waybillNoMaster 主单号 | ||
22 | + * @return {@link HzWaybillInfo} | ||
23 | + */ | ||
24 | + List<HzWaybillInfo> getHzWaybillInfo(String waybillNoMaster); | ||
25 | +} |
1 | +package com.sunyo.wlpt.cgoasm.provide.mapper; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.cgoasm.provide.domain.SdBigType; | ||
4 | +import org.apache.ibatis.annotations.Mapper; | ||
5 | + | ||
6 | +import java.math.BigDecimal; | ||
7 | +import java.util.List; | ||
8 | + | ||
9 | +/** | ||
10 | + * @author 子诚 | ||
11 | + * Description: | ||
12 | + * 时间:2020/5/21 14:19 | ||
13 | + */ | ||
14 | +@Mapper | ||
15 | +public interface SdBigTypeMapper { | ||
16 | + /** | ||
17 | + * 查询一级品类 | ||
18 | + * | ||
19 | + * @param bigTypeId 所属大类id | ||
20 | + * @return | ||
21 | + */ | ||
22 | + List<SdBigType> getSdBigTypeInfo(BigDecimal bigTypeId); | ||
23 | +} |
1 | +package com.sunyo.wlpt.cgoasm.provide.mapper; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.cgoasm.provide.domain.SdCargoName; | ||
4 | +import org.apache.ibatis.annotations.Mapper; | ||
5 | + | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author 子诚 | ||
10 | + * Description: | ||
11 | + * 时间:2020/5/21 14:13 | ||
12 | + */ | ||
13 | +@Mapper | ||
14 | +public interface SdCargoNameMapper { | ||
15 | + /** | ||
16 | + * 根据运单号,获取品名和品类 | ||
17 | + * | ||
18 | + * @param waybillNoMaster 运单号 | ||
19 | + * @return | ||
20 | + */ | ||
21 | + List<SdCargoName> getSdCargoName(String waybillNoMaster); | ||
22 | +} |
1 | +package com.sunyo.wlpt.cgoasm.provide.mapper; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.cgoasm.provide.domain.SdTwoType; | ||
4 | +import org.apache.ibatis.annotations.Mapper; | ||
5 | + | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author 子诚 | ||
10 | + * Description: | ||
11 | + * 时间:2020/5/21 14:17 | ||
12 | + */ | ||
13 | +@Mapper | ||
14 | +public interface SdTwoTypeMapper { | ||
15 | + /** | ||
16 | + * 根据品名,查询二级品类 | ||
17 | + * | ||
18 | + * @param sdCargoName 品名 | ||
19 | + * @return | ||
20 | + */ | ||
21 | + List<SdTwoType> getSdTwoTypeInfo(String sdCargoName); | ||
22 | +} |
1 | +package com.sunyo.wlpt.cgoasm.provide.service; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.cgoasm.provide.domain.HzShipperInformation; | ||
4 | + | ||
5 | +/** | ||
6 | + * @author 子诚 | ||
7 | + * Description: | ||
8 | + * 时间:2020/5/21 12:04 | ||
9 | + */ | ||
10 | +public interface HzShipperInformationService { | ||
11 | + | ||
12 | + /** | ||
13 | + * 获取代理人货主信息表的相关信息 | ||
14 | + * | ||
15 | + * @param hzInforId 货主信息表ID | ||
16 | + * @return {@link HzShipperInformation} | ||
17 | + */ | ||
18 | + HzShipperInformation getHzInfo(String hzInforId); | ||
19 | +} |
1 | +package com.sunyo.wlpt.cgoasm.provide.service; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.cgoasm.provide.domain.HzWaybillInfo; | ||
4 | + | ||
5 | +import java.math.BigDecimal; | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | + | ||
9 | +/** | ||
10 | + * @author 子诚 | ||
11 | + * Description: | ||
12 | + * 时间:2020/5/21 11:52 | ||
13 | + */ | ||
14 | +public interface HzWaybillInfoService { | ||
15 | + | ||
16 | + /** | ||
17 | + * 获取 代理人——预配货主信息关系表 中的相关信息 | ||
18 | + * | ||
19 | + * @param waybillNoMaster 主单号 | ||
20 | + * @return {@link HzWaybillInfo} | ||
21 | + */ | ||
22 | + List<HzWaybillInfo> getHzWaybillInfo(String waybillNoMaster); | ||
23 | +} | ||
24 | + | ||
25 | + |
1 | +package com.sunyo.wlpt.cgoasm.provide.service; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.cgoasm.provide.domain.SdBigType; | ||
4 | + | ||
5 | +import java.math.BigDecimal; | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author 子诚 | ||
10 | + * Description: | ||
11 | + * 时间:2020/5/21 14:19 | ||
12 | + */ | ||
13 | +public interface SdBigTypeService { | ||
14 | + | ||
15 | + /** | ||
16 | + * 查询一级品类 | ||
17 | + * | ||
18 | + * @param bigTypeId 所属大类id | ||
19 | + * @return | ||
20 | + */ | ||
21 | + List<SdBigType> getSdBigTypeInfo(BigDecimal bigTypeId); | ||
22 | +} |
1 | +package com.sunyo.wlpt.cgoasm.provide.service; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.cgoasm.provide.domain.SdCargoName; | ||
4 | + | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +/** | ||
8 | + * @author 子诚 | ||
9 | + * Description: | ||
10 | + * 时间:2020/5/21 14:13 | ||
11 | + */ | ||
12 | +public interface SdCargoNameService { | ||
13 | + | ||
14 | + /** | ||
15 | + * 根据运单号,获取品名和品类 | ||
16 | + * | ||
17 | + * @param waybillNoMaster 运单号 | ||
18 | + * @return | ||
19 | + */ | ||
20 | + List<SdCargoName> getSdCargoName(String waybillNoMaster); | ||
21 | +} |
1 | +package com.sunyo.wlpt.cgoasm.provide.service; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.cgoasm.provide.domain.SdTwoType; | ||
4 | + | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +/** | ||
8 | + * @author 子诚 | ||
9 | + * Description: | ||
10 | + * 时间:2020/5/21 14:16 | ||
11 | + */ | ||
12 | +public interface SdTwoTypeService { | ||
13 | + | ||
14 | + /** | ||
15 | + * 根据品名,查询二级品类 | ||
16 | + * | ||
17 | + * @param sdCargoName 品名 | ||
18 | + * @return | ||
19 | + */ | ||
20 | + List<SdTwoType> getSdTwoTypeInfo(String sdCargoName); | ||
21 | +} | ||
22 | + |
src/main/java/com/sunyo/wlpt/cgoasm/provide/service/impl/HzShipperInformationServiceImpl.java
0 → 100644
1 | +package com.sunyo.wlpt.cgoasm.provide.service.impl; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.cgoasm.provide.domain.HzShipperInformation; | ||
4 | +import org.springframework.stereotype.Service; | ||
5 | + | ||
6 | +import javax.annotation.Resource; | ||
7 | + | ||
8 | +import com.sunyo.wlpt.cgoasm.provide.mapper.HzShipperInformationMapper; | ||
9 | +import com.sunyo.wlpt.cgoasm.provide.service.HzShipperInformationService; | ||
10 | + | ||
11 | +/** | ||
12 | + * @author 子诚 | ||
13 | + * Description: | ||
14 | + * 时间:2020/5/21 12:04 | ||
15 | + */ | ||
16 | +@Service | ||
17 | +public class HzShipperInformationServiceImpl implements HzShipperInformationService { | ||
18 | + | ||
19 | + @Resource | ||
20 | + private HzShipperInformationMapper hzShipperInformationMapper; | ||
21 | + | ||
22 | + @Override | ||
23 | + public HzShipperInformation getHzInfo(String hzInforId) { | ||
24 | + return hzShipperInformationMapper.getHzInfo(hzInforId); | ||
25 | + } | ||
26 | +} |
1 | +package com.sunyo.wlpt.cgoasm.provide.service.impl; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.cgoasm.provide.domain.HzWaybillInfo; | ||
4 | +import com.sunyo.wlpt.cgoasm.provide.mapper.HzWaybillInfoMapper; | ||
5 | +import org.springframework.stereotype.Service; | ||
6 | + | ||
7 | +import javax.annotation.Resource; | ||
8 | + | ||
9 | +import com.sunyo.wlpt.cgoasm.provide.service.HzWaybillInfoService; | ||
10 | + | ||
11 | +import java.util.List; | ||
12 | + | ||
13 | +/** | ||
14 | + * @author 子诚 | ||
15 | + * Description: | ||
16 | + * 时间:2020/5/21 11:52 | ||
17 | + */ | ||
18 | +@Service | ||
19 | +public class HzWaybillInfoServiceImpl implements HzWaybillInfoService { | ||
20 | + | ||
21 | + @Resource | ||
22 | + private HzWaybillInfoMapper hzWaybillInfoMapper; | ||
23 | + | ||
24 | + | ||
25 | + @Override | ||
26 | + public List<HzWaybillInfo> getHzWaybillInfo(String waybillNoMaster) { | ||
27 | + return hzWaybillInfoMapper.getHzWaybillInfo(waybillNoMaster); | ||
28 | + } | ||
29 | +} | ||
30 | + | ||
31 | + |
1 | +package com.sunyo.wlpt.cgoasm.provide.service.impl; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.cgoasm.provide.domain.SdBigType; | ||
4 | +import org.springframework.stereotype.Service; | ||
5 | + | ||
6 | +import javax.annotation.Resource; | ||
7 | + | ||
8 | +import com.sunyo.wlpt.cgoasm.provide.mapper.SdBigTypeMapper; | ||
9 | +import com.sunyo.wlpt.cgoasm.provide.service.SdBigTypeService; | ||
10 | + | ||
11 | +import java.math.BigDecimal; | ||
12 | +import java.util.List; | ||
13 | + | ||
14 | +/** | ||
15 | + * @author 子诚 | ||
16 | + * Description: | ||
17 | + * 时间:2020/5/21 14:19 | ||
18 | + */ | ||
19 | +@Service | ||
20 | +public class SdBigTypeServiceImpl implements SdBigTypeService { | ||
21 | + | ||
22 | + @Resource | ||
23 | + private SdBigTypeMapper sdBigTypeMapper; | ||
24 | + | ||
25 | + @Override | ||
26 | + public List<SdBigType> getSdBigTypeInfo(BigDecimal bigTypeId) { | ||
27 | + return sdBigTypeMapper.getSdBigTypeInfo(bigTypeId); | ||
28 | + } | ||
29 | +} |
1 | +package com.sunyo.wlpt.cgoasm.provide.service.impl; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.cgoasm.provide.domain.SdCargoName; | ||
4 | +import org.springframework.stereotype.Service; | ||
5 | + | ||
6 | +import javax.annotation.Resource; | ||
7 | + | ||
8 | +import com.sunyo.wlpt.cgoasm.provide.mapper.SdCargoNameMapper; | ||
9 | +import com.sunyo.wlpt.cgoasm.provide.service.SdCargoNameService; | ||
10 | + | ||
11 | +import java.util.List; | ||
12 | + | ||
13 | +/** | ||
14 | + * @author 子诚 | ||
15 | + * Description: | ||
16 | + * 时间:2020/5/21 14:13 | ||
17 | + */ | ||
18 | +@Service | ||
19 | +public class SdCargoNameServiceImpl implements SdCargoNameService { | ||
20 | + | ||
21 | + @Resource | ||
22 | + private SdCargoNameMapper sdCargoNameMapper; | ||
23 | + | ||
24 | + @Override | ||
25 | + public List<SdCargoName> getSdCargoName(String waybillNoMaster) { | ||
26 | + return sdCargoNameMapper.getSdCargoName(waybillNoMaster); | ||
27 | + } | ||
28 | +} |
1 | +package com.sunyo.wlpt.cgoasm.provide.service.impl; | ||
2 | + | ||
3 | + | ||
4 | +import javax.annotation.Resource; | ||
5 | + | ||
6 | +import com.sunyo.wlpt.cgoasm.provide.domain.SdTwoType; | ||
7 | +import com.sunyo.wlpt.cgoasm.provide.mapper.SdTwoTypeMapper; | ||
8 | +import com.sunyo.wlpt.cgoasm.provide.service.SdTwoTypeService; | ||
9 | +import org.springframework.stereotype.Service; | ||
10 | + | ||
11 | +import java.util.List; | ||
12 | + | ||
13 | +/** | ||
14 | + * @author 子诚 | ||
15 | + * Description: | ||
16 | + * 时间:2020/5/21 14:16 | ||
17 | + */ | ||
18 | +@Service | ||
19 | +public class SdTwoTypeServiceImpl implements SdTwoTypeService { | ||
20 | + | ||
21 | + @Resource | ||
22 | + private SdTwoTypeMapper sdTwoTypeMapper; | ||
23 | + | ||
24 | + @Override | ||
25 | + public List<SdTwoType> getSdTwoTypeInfo(String sdCargoName) { | ||
26 | + return sdTwoTypeMapper.getSdTwoTypeInfo(sdCargoName); | ||
27 | + } | ||
28 | +} | ||
29 | + |
@@ -9,7 +9,7 @@ spring: | @@ -9,7 +9,7 @@ spring: | ||
9 | type: com.alibaba.druid.pool.DruidDataSource | 9 | type: com.alibaba.druid.pool.DruidDataSource |
10 | driver-class-name: oracle.jdbc.OracleDriver | 10 | driver-class-name: oracle.jdbc.OracleDriver |
11 | url: jdbc:oracle:thin:@192.168.1.253:1522:ORCLL | 11 | url: jdbc:oracle:thin:@192.168.1.253:1522:ORCLL |
12 | - username: CGONMS | 12 | + username: CGOASM |
13 | password: vmvnv1v2 | 13 | password: vmvnv1v2 |
14 | profiles: | 14 | profiles: |
15 | active: dev | 15 | active: dev |
@@ -63,6 +63,11 @@ eureka: | @@ -63,6 +63,11 @@ eureka: | ||
63 | feign: | 63 | feign: |
64 | hystrix: | 64 | hystrix: |
65 | enabled: true | 65 | enabled: true |
66 | + client: | ||
67 | + config: | ||
68 | + default: | ||
69 | + connectTimeout: 120000 # feign 的超时设置 | ||
70 | + readTimeout: 120000 | ||
66 | # boot admin | 71 | # boot admin |
67 | management: | 72 | management: |
68 | endpoints: | 73 | endpoints: |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
3 | +<mapper namespace="com.sunyo.wlpt.cgoasm.provide.mapper.HzShipperInformationMapper"> | ||
4 | + <resultMap id="BaseResultMap" type="com.sunyo.wlpt.cgoasm.provide.domain.HzShipperInformation"> | ||
5 | + <!--@mbg.generated--> | ||
6 | + <!--@Table HZ_SHIPPER_INFORMATION--> | ||
7 | + <id column="ID" jdbcType="DECIMAL" property="id"/> | ||
8 | + <result column="FOR_SHORT" jdbcType="VARCHAR" property="forShort"/> | ||
9 | + <result column="FULL_NAME" jdbcType="VARCHAR" property="fullName"/> | ||
10 | + <result column="THE_SHIPPER_TYPE" jdbcType="VARCHAR" property="theShipperType"/> | ||
11 | + </resultMap> | ||
12 | + <sql id="Base_Column_List"> | ||
13 | + <!--@mbg.generated--> | ||
14 | + ID, FOR_SHORT, FULL_NAME, THE_SHIPPER_TYPE | ||
15 | + </sql> | ||
16 | + <select id="getHzInfo" parameterType="java.lang.String" | ||
17 | + resultMap="BaseResultMap"> | ||
18 | + select | ||
19 | + <include refid="Base_Column_List"/> | ||
20 | + from HZ_SHIPPER_INFORMATION | ||
21 | + where ID = #{hzInforId,jdbcType=VARCHAR} | ||
22 | + </select> | ||
23 | +</mapper> |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
3 | +<mapper namespace="com.sunyo.wlpt.cgoasm.provide.mapper.HzWaybillInfoMapper"> | ||
4 | + <resultMap id="BaseResultMap" type="com.sunyo.wlpt.cgoasm.provide.domain.HzWaybillInfo"> | ||
5 | + <!--@mbg.generated--> | ||
6 | + <!--@Table HZ_WAYBILL_INFO--> | ||
7 | + <result column="WAYBILL_ID" jdbcType="VARCHAR" property="waybillId"/> | ||
8 | + <result column="HZINFOR_ID" jdbcType="VARCHAR" property="hzInforId"/> | ||
9 | + </resultMap> | ||
10 | + <sql id="Base_Column_List"> | ||
11 | + <!--@mbg.generated--> | ||
12 | + WAYBILL_ID, HZINFOR_ID | ||
13 | + </sql> | ||
14 | + | ||
15 | + <select id="getHzWaybillInfo" parameterType="java.lang.String" | ||
16 | + resultMap="BaseResultMap"> | ||
17 | + select | ||
18 | + <include refid="Base_Column_List"/> | ||
19 | + from HZ_WAYBILL_INFO | ||
20 | + where WAYBILL_ID = #{waybillNoMaster,jdbcType=VARCHAR} | ||
21 | + </select> | ||
22 | +</mapper> |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
3 | +<mapper namespace="com.sunyo.wlpt.cgoasm.provide.mapper.SdBigTypeMapper"> | ||
4 | + <resultMap id="BaseResultMap" type="com.sunyo.wlpt.cgoasm.provide.domain.SdBigType"> | ||
5 | + <!--@mbg.generated--> | ||
6 | + <!--@Table SD_BIG_TYPE--> | ||
7 | + <id column="ID" jdbcType="DECIMAL" property="id" /> | ||
8 | + <result column="TYPE_NAME" jdbcType="VARCHAR" property="typeName" /> | ||
9 | + </resultMap> | ||
10 | + <sql id="Base_Column_List"> | ||
11 | + <!--@mbg.generated--> | ||
12 | + ID, TYPE_NAME | ||
13 | + </sql> | ||
14 | + <select id="getSdBigTypeInfo" parameterType="java.math.BigDecimal" resultMap="BaseResultMap"> | ||
15 | + select | ||
16 | + <include refid="Base_Column_List"/> | ||
17 | + from SD_BIG_TYPE | ||
18 | + where ID = #{bigTypeId,jdbcType=DECIMAL} | ||
19 | + </select> | ||
20 | +</mapper> |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
3 | +<mapper namespace="com.sunyo.wlpt.cgoasm.provide.mapper.SdCargoNameMapper"> | ||
4 | + <resultMap id="BaseResultMap" type="com.sunyo.wlpt.cgoasm.provide.domain.SdCargoName"> | ||
5 | + <!--@mbg.generated--> | ||
6 | + <!--@Table SD_CARGO_NAME--> | ||
7 | + <result column="SD_WAYBILL" jdbcType="VARCHAR" property="sdWaybill"/> | ||
8 | + <result column="SD_CARGO_NAME" jdbcType="VARCHAR" property="sdCargoName"/> | ||
9 | + | ||
10 | + </resultMap> | ||
11 | + <sql id="Base_Column_List"> | ||
12 | + <!--@mbg.generated--> | ||
13 | + SD_WAYBILL, SD_CARGO_NAME | ||
14 | + </sql> | ||
15 | + <select id="getSdCargoName" parameterType="java.lang.String" | ||
16 | + resultMap="BaseResultMap"> | ||
17 | + select | ||
18 | + <include refid="Base_Column_List"/> | ||
19 | + from | ||
20 | + SD_CARGO_NAME | ||
21 | + where | ||
22 | + SD_WAYBILL=#{waybillNoMaster,jdbcType=VARCHAR} | ||
23 | + | ||
24 | + </select> | ||
25 | +</mapper> |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
3 | +<mapper namespace="com.sunyo.wlpt.cgoasm.provide.mapper.SdTwoTypeMapper"> | ||
4 | + <resultMap id="BaseResultMap" type="com.sunyo.wlpt.cgoasm.provide.domain.SdTwoType"> | ||
5 | + <!--@mbg.generated--> | ||
6 | + <!--@Table SD_TWO_TYPE--> | ||
7 | + <result column="TWO_TYPE_NAME" jdbcType="VARCHAR" property="twoTypeName"/> | ||
8 | + <result column="BIG_TYPE_ID" jdbcType="DECIMAL" property="bigTypeId"/> | ||
9 | + <result column="CARGO_NAME" jdbcType="VARCHAR" property="cargoName"/> | ||
10 | + </resultMap> | ||
11 | + <sql id="Base_Column_List"> | ||
12 | + <!--@mbg.generated--> | ||
13 | + TWO_TYPE_NAME, BIG_TYPE_ID, CARGO_NAME | ||
14 | + </sql> | ||
15 | + <select id="getSdTwoTypeInfo" parameterType="java.lang.String" resultMap="BaseResultMap"> | ||
16 | + select | ||
17 | + <include refid="Base_Column_List"/> | ||
18 | + from SD_TWO_TYPE | ||
19 | + where CARGO_NAME = #{sdCargoName,jdbcType=VARCHAR} | ||
20 | + </select> | ||
21 | +</mapper> |
-
请 注册 或 登录 后发表评论