Jiaqi.xu

BASF申报接口

...@@ -2,11 +2,15 @@ package com.erry.iclear.dateInterface.api; ...@@ -2,11 +2,15 @@ package com.erry.iclear.dateInterface.api;
2 2
3 import com.erry.iclear.dateInterface.api.request.BasfMawb; 3 import com.erry.iclear.dateInterface.api.request.BasfMawb;
4 import com.erry.iclear.dateInterface.api.request.Basfc; 4 import com.erry.iclear.dateInterface.api.request.Basfc;
5 +import com.erry.iclear.dateInterface.api.request.ConsignmentCode;
5 import com.erry.iclear.dateInterface.api.response.ResultRS; 6 import com.erry.iclear.dateInterface.api.response.ResultRS;
7 +import com.erry.iclear.dateInterface.entity.DeclaredInfo;
6 import com.erry.iclear.dateInterface.entity.IClearApiLog; 8 import com.erry.iclear.dateInterface.entity.IClearApiLog;
7 import com.erry.iclear.dateInterface.service.BasfService; 9 import com.erry.iclear.dateInterface.service.BasfService;
8 import com.erry.iclear.dateInterface.service.ChmConsignmentService; 10 import com.erry.iclear.dateInterface.service.ChmConsignmentService;
11 +import com.erry.iclear.dateInterface.service.DeclaredInfoService;
9 import com.erry.iclear.dateInterface.service.IClearApiLogService; 12 import com.erry.iclear.dateInterface.service.IClearApiLogService;
13 +import com.erry.iclear.dateInterface.util.StringUtil;
10 import com.google.gson.Gson; 14 import com.google.gson.Gson;
11 import io.swagger.annotations.ApiOperation; 15 import io.swagger.annotations.ApiOperation;
12 import lombok.extern.slf4j.Slf4j; 16 import lombok.extern.slf4j.Slf4j;
...@@ -17,6 +21,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -17,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
17 21
18 import javax.servlet.http.HttpServletRequest; 22 import javax.servlet.http.HttpServletRequest;
19 import java.util.Date; 23 import java.util.Date;
24 +import java.util.List;
20 import java.util.Objects; 25 import java.util.Objects;
21 26
22 @RestController 27 @RestController
...@@ -34,6 +39,9 @@ public class BasfDataInterface { ...@@ -34,6 +39,9 @@ public class BasfDataInterface {
34 @Autowired 39 @Autowired
35 private IClearApiLogService iClearApiLogService; 40 private IClearApiLogService iClearApiLogService;
36 41
42 + @Autowired
43 + private DeclaredInfoService declaredInfoService;
44 +
37 @ApiOperation(value = "BASF推送运单数据", httpMethod = "POST", notes = "ex: http://192.168.1.75:8080/customs/sendMawbBasf") 45 @ApiOperation(value = "BASF推送运单数据", httpMethod = "POST", notes = "ex: http://192.168.1.75:8080/customs/sendMawbBasf")
38 @PostMapping("/sendMawbBasf") 46 @PostMapping("/sendMawbBasf")
39 @ResponseBody 47 @ResponseBody
...@@ -122,4 +130,51 @@ public class BasfDataInterface { ...@@ -122,4 +130,51 @@ public class BasfDataInterface {
122 result.setCode("0"); 130 result.setCode("0");
123 return result; 131 return result;
124 } 132 }
133 +
134 + @ApiOperation(value = "BASF获取申报信息", httpMethod = "POST", notes = "ex: http://192.168.1.75:8080/customs/selectDecListBasf")
135 + @PostMapping("/selectDecListBasf")
136 + @ResponseBody
137 + public ResultRS selectDecListBasf(HttpServletRequest request
138 + , @Validated @RequestBody ConsignmentCode consignmentCode) {
139 + log.info("接收到请求数据consignmentCode:"+consignmentCode.getConsignmentCode()+" data:" + gson.toJson(consignmentCode));
140 + ResultRS result = new ResultRS(Boolean.FALSE,"","");
141 + //获取请求的运单号
142 + String[] splitConsignment = StringUtil.split(consignmentCode.getConsignmentCode(),",");
143 + if(splitConsignment.length > 20){
144 + result.setCode("30001");
145 + result.setMsg("请求信息不能大于20条运单");
146 + return result;
147 + }
148 + if(splitConsignment.length<1){
149 + result.setCode("-7");
150 + result.setMsg("请求信息不能为空");
151 + return result;
152 + }
153 + StopWatch sw = new StopWatch("receice mawbBasf");
154 + sw.start("save log");
155 +
156 + String appId=(String) request.getHeader("Appid");
157 + String appKey=(String) request.getHeader("Appkey");
158 + String timeStamp=(String) request.getHeader("TimeStamp");
159 + //记录请求的运单
160 + IClearApiLog saveIClearApiLogResult = iClearApiLogService.saveIClearApiLog(iClearApiLogService.convertToIClearApiLogCselect(consignmentCode.getConsignmentCode(),appId,appKey,new Date(Long.valueOf(timeStamp))));
161 + //日志的ID放入到回执日志中对应
162 + saveIClearApiLogResult.getMsgId();
163 +
164 + //查询请求需要得运单申报信息
165 + List<DeclaredInfo> declaredInfos = declaredInfoService.selectDeclaredInfo(splitConsignment);
166 + if(declaredInfos.size()>0){
167 + for (int i= 0;i<declaredInfos.size();i++){
168 +
169 + }
170 + }
171 + //返回申报数据
172 + //更新记录的请求信息
173 + //记录返回得申报数据记录
174 +
175 + //6、return result
176 + result.setSuccess(Boolean.TRUE);
177 + result.setCode("0");
178 + return result;
179 + }
125 } 180 }
......
1 +package com.erry.iclear.dateInterface.api.request;
2 +
3 +import java.io.Serializable;
4 +import java.util.List;
5 +
6 +/**
7 + * 运单集合 2021年11月4日 xjq
8 + */
9 +public class ConsignmentCode implements Serializable {
10 +
11 + private String consignmentCode;
12 +
13 + public String getConsignmentCode() {
14 + return consignmentCode;
15 + }
16 +
17 + public void setConsignmentCode(String consignmentCode) {
18 + this.consignmentCode = consignmentCode;
19 + }
20 +}
1 +package com.erry.iclear.dateInterface.common;
2 +
3 +import java.io.Serializable;
4 +
5 +/**
6 + * Created by liyang on 2017/4/22.
7 + */
8 +public class BaseModel implements Serializable {
9 +
10 + private static final long serilalVersionUID = 1L;
11 +
12 + private Long id;
13 +
14 + public BaseModel() {
15 + }
16 +
17 + public Long getId() {
18 + return id;
19 + }
20 +
21 + public void setId(Long id) {
22 + this.id = id;
23 + }
24 +
25 +
26 +}
1 +package com.erry.iclear.dateInterface.common;
2 +
3 +import com.fasterxml.jackson.core.JsonGenerator;
4 +import com.fasterxml.jackson.core.JsonProcessingException;
5 +import com.fasterxml.jackson.databind.JsonSerializer;
6 +import com.fasterxml.jackson.databind.SerializerProvider;
7 +
8 +import java.io.IOException;
9 +import java.text.SimpleDateFormat;
10 +import java.util.Date;
11 +
12 +public class JsonDateTimeSerializer extends JsonSerializer<Date> {
13 +
14 + private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
15 +
16 + @Override
17 + public void serialize(Date date, JsonGenerator gen, SerializerProvider provider)
18 + throws IOException, JsonProcessingException {
19 +
20 + String formattedDate = dateFormat.format(date);
21 +
22 + gen.writeString(formattedDate);
23 + }
24 +}
1 +package com.erry.iclear.dateInterface.entity;
2 +
3 +import com.erry.iclear.dateInterface.common.BaseModel;
4 +import com.fasterxml.jackson.annotation.JsonIgnore;
5 +
6 +import javax.persistence.*;
7 +import java.math.BigDecimal;
8 +import java.util.Date;
9 +
10 +/**
11 + * 申报信息日志表
12 + * MT 2020年2月18日11:39:32
13 + */
14 +@Entity
15 +@Table(name = "T_DECLARED_INFO")
16 +public class DeclaredInfo extends BaseModel {
17 +
18 + private static final long serialVersionUID = 2693103610036977383L;
19 +
20 + /**
21 + * 申报信息日志表,自动增加
22 + */
23 + @Id
24 + @GeneratedValue
25 + @Column(name = "ID")
26 + private Long id;
27 +
28 + /**
29 + * 运单号
30 + */
31 + @Column(name = "CONSIGNMENT_CODE")
32 + private String consignmentCode;
33 +
34 + /**
35 + * 运单类型ID
36 + */
37 + @JsonIgnore
38 + @ManyToOne(targetEntity = DictionaryEntries.class)
39 + @JoinColumn(name = "CONS_TYPE_ID")
40 + private DictionaryEntries consTypeDic;
41 +
42 + /**
43 + * 运单类型
44 + */
45 + @Column(name = "CONS_TYPE")
46 + private String consType;
47 +
48 + /**
49 + * 发件人(生产核销单位)名称
50 + */
51 + @Column(name = "SENDER")
52 + private String sender;
53 +
54 + /**
55 + * 经营单位(境内发货人)
56 + */
57 + @Column(name = "OPERATE_UNIT_NAME")
58 + private String operateUnitName;
59 +
60 + /**
61 + * 经营单位(境内发货人)海关编码
62 + */
63 + @Column(name = "OPERATE_UNIT_CODE")
64 + private String operateUnitCode;
65 +
66 + /**
67 + * 境内发货人统一信用代码
68 + */
69 + @Column(name = "TRADE_CO_SCC")
70 + private String tradeCoSCC;
71 +
72 + /**
73 + * 发件人 海关编码
74 + */
75 + @Column(name = "OWNER_CODE")
76 + private String ownerCode;
77 +
78 + /**
79 + * 发件人 统一信用代码
80 + */
81 + @Column(name = "OWNER_CODE_SCC")
82 + private String ownerCodeScc;
83 +
84 + /**
85 + * 商品编号
86 + */
87 + @Column(name = "SKU_CODE")
88 + private String skuCode;
89 +
90 + /**
91 + * 商品名称
92 + */
93 + @Column(name = "SKUNAME")
94 + private String skuName;
95 +
96 + /**
97 + * 规格型号
98 + */
99 + @Column(name = "MODEL")
100 + private String model;
101 +
102 + /**
103 + * 成交数量
104 + */
105 + @Column(name = "KNOCKDOWN_NUMBER")
106 + private BigDecimal knockdownNumber;
107 +
108 + /**
109 + * 成交单位ID
110 + */
111 + @JsonIgnore
112 + @ManyToOne(targetEntity = DictionaryEntries.class)
113 + @JoinColumn(name = "KNOCKDOWN_UNIT_ID")
114 + private DictionaryEntries knockdownUnitDic;
115 +
116 + /**
117 + * 成交单位
118 + */
119 + @Column(name = "KNOCKDOWN_UNIT")
120 + private String knockdownUnit;
121 +
122 + /**
123 + * 第一(法定)数量
124 + */
125 + @Column(name = "QTY_LEGAL_FIRST")
126 + private BigDecimal qtyLegalFirst;
127 +
128 + /**
129 + * 第一(法定)计量单位ID
130 + */
131 + @JsonIgnore
132 + @ManyToOne(targetEntity = DictionaryEntries.class)
133 + @JoinColumn(name = "UNIT_LEGAL_FIRST_ID")
134 + private DictionaryEntries unitLegalFirstDic;
135 +
136 + /**
137 + * 第一(法定)计量单位
138 + */
139 + @Column(name = "UNIT_LEGAL_FIRST")
140 + private String unitLegalFirst;
141 +
142 + /**
143 + * 第二(法定)数量
144 + */
145 + @Column(name = "QTY_LEGAL_SECOND")
146 + private BigDecimal qtyLegalSecond;
147 +
148 + /**
149 + * 第二(法定)计量单位ID
150 + */
151 + @JsonIgnore
152 + @ManyToOne(targetEntity = DictionaryEntries.class)
153 + @JoinColumn(name = "UNIT_LEGAL_SECOND_ID")
154 + private DictionaryEntries unitLegalSecondDic;
155 +
156 + /**
157 + * 第二(法定)计量单位
158 + */
159 + @Column(name = "UNIT_LEGAL_SECOND")
160 + private String unitLegalSecond;
161 +
162 + /**
163 + * 申报金额
164 + */
165 + @Column(name = "DECLARED_AMOUNT")
166 + private BigDecimal declaredAmount;
167 +
168 + /**
169 + * 币制ID
170 + */
171 + @JsonIgnore
172 + @ManyToOne(targetEntity = DictionaryEntries.class)
173 + @JoinColumn(name = "CURRENCY_ID")
174 + private DictionaryEntries currencyDic;
175 +
176 + /**
177 + * 币制
178 + */
179 + @Column(name = "CURRENCY")
180 + private String currency;
181 +
182 + /**
183 + * 申报重量
184 + */
185 + @Column(name = "DECLARED_WEIGHT")
186 + private BigDecimal declaredWeight;
187 +
188 + /**
189 + * 创建时间
190 + */
191 + @Column(name = "CREATE_TIME")
192 + private Date createTime;
193 +
194 + /**
195 + * 创建人ID
196 + */
197 + @JsonIgnore
198 + @ManyToOne(targetEntity = SysUser.class)
199 + @JoinColumn(name = "CREATOR_ID")
200 + private SysUser creatorId;
201 +
202 + /**
203 + * 创建人
204 + */
205 + @Column(name = "CREATOR")
206 + private String creator;
207 +
208 + /**
209 + * “是否匹配”(是,否)
210 + */
211 + @Column(name = "MATCHING")
212 + private String matching;
213 +
214 + /**
215 + * 运单ID
216 + */
217 + @JsonIgnore
218 + @ManyToOne(targetEntity = ChmConsignment.class)
219 + @JoinColumn(name = "CONSIGNMENT_ID")
220 + private ChmConsignment chmConsignment;
221 +
222 + /**
223 + * TASK日志表ID
224 + */
225 + @JsonIgnore
226 + @ManyToOne(targetEntity = TaskInfo.class)
227 + @JoinColumn(name = "TASK_ID")
228 + private TaskInfo taskInfo;
229 +
230 + @Transient
231 + private Long consignmentId;
232 + @Transient
233 + private Long consTypeDicId;
234 + /**
235 + * 发件人(生产核销单位)名称
236 + */
237 + @Transient
238 + private String ownerName;
239 + /**
240 + * 申报金额
241 + */
242 + @Transient
243 + private BigDecimal amount;
244 +
245 + /**
246 + * 回填品名
247 + */
248 + @Column(name = "BACKFILL_NAME")
249 + private String backfillName;
250 +
251 + public BigDecimal getAmount(){
252 + return this.declaredAmount;
253 + }
254 +
255 + public String getOwnerName(){
256 + return this.sender;
257 + }
258 +
259 + public Long getConsTypeDicId() {
260 + if (this.consTypeDic == null) {
261 + return null;
262 + } else {
263 + return this.consTypeDic.getId();
264 + }
265 + }
266 +
267 + public Long getConsignmentId() {
268 + if (this.chmConsignment == null) {
269 + return null;
270 + } else {
271 + return this.chmConsignment.getId();
272 + }
273 + }
274 +
275 + @Override
276 + public Long getId() {
277 + return id;
278 + }
279 +
280 + @Override
281 + public void setId(Long id) {
282 + this.id = id;
283 + }
284 +
285 + public String getConsignmentCode() {
286 + return consignmentCode;
287 + }
288 +
289 + public void setConsignmentCode(String consignmentCode) {
290 + this.consignmentCode = consignmentCode;
291 + }
292 +
293 + public DictionaryEntries getConsTypeDic() {
294 + return consTypeDic;
295 + }
296 +
297 + public void setConsTypeDic(DictionaryEntries consTypeDic) {
298 + this.consTypeDic = consTypeDic;
299 + }
300 +
301 + public String getConsType() {
302 + return consType;
303 + }
304 +
305 + public void setConsType(String consType) {
306 + this.consType = consType;
307 + }
308 +
309 + public String getSender() {
310 + return sender;
311 + }
312 +
313 + public void setSender(String sender) {
314 + this.sender = sender;
315 + }
316 +
317 + public String getOperateUnitName() {
318 + return operateUnitName;
319 + }
320 +
321 + public void setOperateUnitName(String operateUnitName) {
322 + this.operateUnitName = operateUnitName;
323 + }
324 +
325 + public String getOperateUnitCode() {
326 + return operateUnitCode;
327 + }
328 +
329 + public void setOperateUnitCode(String operateUnitCode) {
330 + this.operateUnitCode = operateUnitCode;
331 + }
332 +
333 + public String getSkuCode() {
334 + return skuCode;
335 + }
336 +
337 + public void setSkuCode(String skuCode) {
338 + this.skuCode = skuCode;
339 + }
340 +
341 + public String getSkuName() {
342 + return skuName;
343 + }
344 +
345 + public void setSkuName(String skuName) {
346 + this.skuName = skuName;
347 + }
348 +
349 + public String getModel() {
350 + return model;
351 + }
352 +
353 + public void setModel(String model) {
354 + this.model = model;
355 + }
356 +
357 + public BigDecimal getKnockdownNumber() {
358 + return knockdownNumber;
359 + }
360 +
361 + public void setKnockdownNumber(BigDecimal knockdownNumber) {
362 + this.knockdownNumber = knockdownNumber;
363 + }
364 +
365 + public DictionaryEntries getKnockdownUnitDic() {
366 + return knockdownUnitDic;
367 + }
368 +
369 + public void setKnockdownUnitDic(DictionaryEntries knockdownUnitDic) {
370 + this.knockdownUnitDic = knockdownUnitDic;
371 + }
372 +
373 + public String getKnockdownUnit() {
374 + return knockdownUnit;
375 + }
376 +
377 + public void setKnockdownUnit(String knockdownUnit) {
378 + this.knockdownUnit = knockdownUnit;
379 + }
380 +
381 + public BigDecimal getQtyLegalFirst() {
382 + return qtyLegalFirst;
383 + }
384 +
385 + public void setQtyLegalFirst(BigDecimal qtyLegalFirst) {
386 + this.qtyLegalFirst = qtyLegalFirst;
387 + }
388 +
389 + public DictionaryEntries getUnitLegalFirstDic() {
390 + return unitLegalFirstDic;
391 + }
392 +
393 + public void setUnitLegalFirstDic(DictionaryEntries unitLegalFirstDic) {
394 + this.unitLegalFirstDic = unitLegalFirstDic;
395 + }
396 +
397 + public String getUnitLegalFirst() {
398 + return unitLegalFirst;
399 + }
400 +
401 + public void setUnitLegalFirst(String unitLegalFirst) {
402 + this.unitLegalFirst = unitLegalFirst;
403 + }
404 +
405 + public BigDecimal getQtyLegalSecond() {
406 + return qtyLegalSecond;
407 + }
408 +
409 + public void setQtyLegalSecond(BigDecimal qtyLegalSecond) {
410 + this.qtyLegalSecond = qtyLegalSecond;
411 + }
412 +
413 + public DictionaryEntries getUnitLegalSecondDic() {
414 + return unitLegalSecondDic;
415 + }
416 +
417 + public void setUnitLegalSecondDic(DictionaryEntries unitLegalSecondDic) {
418 + this.unitLegalSecondDic = unitLegalSecondDic;
419 + }
420 +
421 + public String getUnitLegalSecond() {
422 + return unitLegalSecond;
423 + }
424 +
425 + public void setUnitLegalSecond(String unitLegalSecond) {
426 + this.unitLegalSecond = unitLegalSecond;
427 + }
428 +
429 + public BigDecimal getDeclaredAmount() {
430 + return declaredAmount;
431 + }
432 +
433 + public void setDeclaredAmount(BigDecimal declaredAmount) {
434 + this.declaredAmount = declaredAmount;
435 + }
436 +
437 + public DictionaryEntries getCurrencyDic() {
438 + return currencyDic;
439 + }
440 +
441 + public void setCurrencyDic(DictionaryEntries currencyDic) {
442 + this.currencyDic = currencyDic;
443 + }
444 +
445 + public String getCurrency() {
446 + return currency;
447 + }
448 +
449 + public void setCurrency(String currency) {
450 + this.currency = currency;
451 + }
452 +
453 + public BigDecimal getDeclaredWeight() {
454 + return declaredWeight;
455 + }
456 +
457 + public void setDeclaredWeight(BigDecimal declaredWeight) {
458 + this.declaredWeight = declaredWeight;
459 + }
460 +
461 + public Date getCreateTime() {
462 + return createTime;
463 + }
464 +
465 + public void setCreateTime(Date createTime) {
466 + this.createTime = createTime;
467 + }
468 +
469 + public SysUser getCreatorId() {
470 + return creatorId;
471 + }
472 +
473 + public void setCreatorId(SysUser creatorId) {
474 + this.creatorId = creatorId;
475 + }
476 +
477 + public String getCreator() {
478 + return creator;
479 + }
480 +
481 + public void setCreator(String creator) {
482 + this.creator = creator;
483 + }
484 +
485 + public String getMatching() {
486 + return matching;
487 + }
488 +
489 + public void setMatching(String matching) {
490 + this.matching = matching;
491 + }
492 +
493 + public ChmConsignment getChmConsignment() {
494 + return chmConsignment;
495 + }
496 +
497 + public void setChmConsignment(ChmConsignment chmConsignment) {
498 + this.chmConsignment = chmConsignment;
499 + }
500 +
501 + public TaskInfo getTaskInfo() {
502 + return taskInfo;
503 + }
504 +
505 + public void setTaskInfo(TaskInfo taskInfo) {
506 + this.taskInfo = taskInfo;
507 + }
508 +
509 + public String getBackfillName() {
510 + return backfillName;
511 + }
512 +
513 + public void setBackfillName(String backfillName) {
514 + this.backfillName = backfillName;
515 + }
516 +
517 + public String getTradeCoSCC() {
518 + return tradeCoSCC;
519 + }
520 +
521 + public void setTradeCoSCC(String tradeCoSCC) {
522 + this.tradeCoSCC = tradeCoSCC;
523 + }
524 +
525 + public String getOwnerCode() {
526 + return ownerCode;
527 + }
528 +
529 + public void setOwnerCode(String ownerCode) {
530 + this.ownerCode = ownerCode;
531 + }
532 +
533 + public String getOwnerCodeScc() {
534 + return ownerCodeScc;
535 + }
536 +
537 + public void setOwnerCodeScc(String ownerCodeScc) {
538 + this.ownerCodeScc = ownerCodeScc;
539 + }
540 +}
1 +package com.erry.iclear.dateInterface.entity;
2 +
3 +import com.erry.iclear.dateInterface.common.BaseModel;
4 +import com.fasterxml.jackson.annotation.JsonIgnore;
5 +
6 +import javax.persistence.*;
7 +import java.util.Date;
8 +import java.util.Objects;
9 +
10 +/**
11 + * 组织结构表
12 + *
13 + * @author Created by Erry 2019/7/1.
14 + */
15 +@Entity
16 +@Table(name = "T_AU_ORGANIZATION")
17 +public class Organization extends BaseModel {
18 +
19 + private static final long serialVersionUID = 2693103610036977383L;
20 +
21 + /**
22 + * 表ID,自动增加
23 + */
24 + @Id
25 + @GeneratedValue
26 + @Column(name = "ID")
27 + private Long id;
28 +
29 +// @Version
30 +// @Column(name = "VERSION")
31 +// private Integer version;
32 +
33 +
34 + /**
35 + * 编码
36 + */
37 + @Column(name = "CODE")
38 + private String code;
39 +
40 + /**
41 + * 名称
42 + */
43 + @Column(name = "NAME")
44 + private String name;
45 +
46 + /**
47 + * 组织架构类型 (和用户类型、角色类型对应的是同一个数据字典)
48 + * <p>
49 + * 客户
50 + * 速递员
51 + * 站点
52 + * RDE
53 + * 口岸
54 + * 总部
55 + */
56 + @JsonIgnore
57 + @ManyToOne(targetEntity = DictionaryEntries.class)
58 + @JoinColumn(name = "TYPE_ID")
59 + private DictionaryEntries type;
60 +
61 + /**
62 + * 上级组织
63 + */
64 + @JsonIgnore
65 + @ManyToOne(targetEntity = Organization.class)
66 + @JoinColumn(name = "PARENT_ID")
67 + private Organization parent;
68 +
69 + /**
70 + * 级别
71 + */
72 + @Column(name = "LEVEL")
73 + private Long LEVEL;
74 +
75 + /**
76 + * 创建人
77 + */
78 + @JsonIgnore
79 + @ManyToOne(targetEntity = SysUser.class)
80 + @JoinColumn(name = "CREATE_USER_ID")
81 + private SysUser createUser;
82 +
83 + /**
84 + * 创建时间
85 + */
86 + @Column(name = "CREATE_TIME")
87 + private Date createTime;
88 +
89 + /**
90 + * 最后修改人
91 + */
92 + @JsonIgnore
93 + @ManyToOne(targetEntity = SysUser.class)
94 + @JoinColumn(name = "LAST_MODIFY_USER_ID")
95 + private SysUser lastModifyUser;
96 +
97 + /**
98 + * 最后修改时间
99 + */
100 + @Column(name = "LAST_MODIFY_TIME")
101 + private Date lastModifyTime;
102 +
103 +
104 + @Override
105 + public Long getId() {
106 + return id;
107 + }
108 +
109 + @Override
110 + public void setId(Long id) {
111 + this.id = id;
112 + }
113 +
114 + public String getCode() {
115 + return code;
116 + }
117 +
118 + public void setCode(String code) {
119 + this.code = code;
120 + }
121 +
122 + public String getName() {
123 + return name;
124 + }
125 +
126 + public void setName(String name) {
127 + this.name = name;
128 + }
129 +
130 + public DictionaryEntries getType() {
131 + return type;
132 + }
133 +
134 + public void setType(DictionaryEntries type) {
135 + this.type = type;
136 + }
137 +
138 +
139 + public Organization getParent() {
140 + return parent;
141 + }
142 +
143 + public void setParent(Organization parent) {
144 + this.parent = parent;
145 + }
146 +
147 + public Long getLEVEL() {
148 + return LEVEL;
149 + }
150 +
151 + public void setLEVEL(Long LEVEL) {
152 + this.LEVEL = LEVEL;
153 + }
154 +
155 +
156 + public Date getCreateTime() {
157 + return createTime;
158 + }
159 +
160 + public void setCreateTime(Date createTime) {
161 + this.createTime = createTime;
162 + }
163 +
164 + public SysUser getCreateUser() {
165 + return createUser;
166 + }
167 +
168 + public void setCreateUser(SysUser createUser) {
169 + this.createUser = createUser;
170 + }
171 +
172 + public SysUser getLastModifyUser() {
173 + return lastModifyUser;
174 + }
175 +
176 + public void setLastModifyUser(SysUser lastModifyUser) {
177 + this.lastModifyUser = lastModifyUser;
178 + }
179 +
180 + public Date getLastModifyTime() {
181 + return lastModifyTime;
182 + }
183 +
184 + public void setLastModifyTime(Date lastModifyTime) {
185 + this.lastModifyTime = lastModifyTime;
186 + }
187 +
188 + @Override
189 + public boolean equals(Object o) {
190 + if (this == o) {
191 + return true;
192 + }
193 + if (o == null || getClass() != o.getClass()) {
194 + return false;
195 + }
196 + Organization that = (Organization) o;
197 + return Objects.equals(id, that.id) &&
198 + Objects.equals(code, that.code) &&
199 + Objects.equals(name, that.name) &&
200 + Objects.equals(type, that.type) &&
201 + Objects.equals(parent, that.parent) &&
202 + Objects.equals(LEVEL, that.LEVEL) &&
203 + Objects.equals(createUser, that.createUser) &&
204 + Objects.equals(createTime, that.createTime) &&
205 + Objects.equals(lastModifyUser, that.lastModifyUser) &&
206 + Objects.equals(lastModifyTime, that.lastModifyTime);
207 + }
208 +
209 + @Override
210 + public int hashCode() {
211 + return Objects.hash(id, code, name, type, parent, LEVEL, createUser, createTime, lastModifyUser, lastModifyTime);
212 + }
213 +
214 + @Override
215 + public String toString() {
216 + return "Organization{" +
217 + "id=" + id +
218 + ", code='" + code + '\'' +
219 + ", name='" + name + '\'' +
220 + ", type=" + type +
221 + ", parent=" + parent +
222 + ", LEVEL=" + LEVEL +
223 + ", createUser=" + createUser +
224 + ", createTime=" + createTime +
225 + ", lastModifyUser=" + lastModifyUser +
226 + ", lastModifyTime=" + lastModifyTime +
227 + '}';
228 + }
229 +}
1 +package com.erry.iclear.dateInterface.entity;
2 +
3 +import com.erry.iclear.dateInterface.common.BaseModel;
4 +import com.erry.iclear.dateInterface.common.JsonDateTimeSerializer;
5 +import com.fasterxml.jackson.databind.annotation.JsonSerialize;
6 +import org.springframework.format.annotation.DateTimeFormat;
7 +
8 +import javax.persistence.*;
9 +import java.util.Date;
10 +
11 +/**
12 + * Created by liyang on 2017/2/21.
13 + */
14 +@Entity
15 +@Table(name = "T_AU_USER")
16 +public class SysUser extends BaseModel {
17 +
18 + private static final long serialVersionUID = 1L;
19 +
20 + @Id
21 + @GeneratedValue
22 + @Column(name = "ID")
23 + private Long id;
24 +
25 + @Column(name = "LOGIN_NAME")
26 + private String loginName;
27 +
28 + @Column(name = "USERNAME")
29 + private String userName;
30 +
31 + @Column(name = "PASSWORD")
32 + private String password;
33 +
34 + @Column(name = "PASSWORD1")
35 + private String password1;
36 +
37 + @Column(name = "PASSWORD2")
38 + private String password2;
39 +
40 + @Column(name = "PASSWORD3")
41 + private String password3;
42 +
43 + @Column(name = "PASSWORD4")
44 + private String password4;
45 +
46 + @Column(name = "PHONE")
47 + private String phone;
48 +
49 + @Column(name = "EMAIL")
50 + private String email;
51 + //author:wy on 2021/01/07 新增字段
52 + //fedEx账户
53 + @Column(name = "FEDEXACCOUNT")
54 + private String fedExAccount;
55 +
56 + /**
57 + * 员工号
58 + */
59 + @Column(name = "EMPLOYEE_NUMBER")
60 + private String employeeNumber;
61 +
62 + /**
63 + * 公司名称
64 + */
65 + @Column(name = "COMPANY_NAME")
66 + private String companyName;
67 +
68 + /**
69 + * 公司10位海关编码
70 + */
71 +
72 + @Column(name = "COMPANY_CUSTOMS_CODE")
73 + private String companyCustomsCode;
74 +
75 + /**
76 + * 18位信用证代码
77 + */
78 + @Column(name = "LETTER_CREDIT_CODE")
79 + private String letterCreditCode;
80 +
81 + @Column(name = "IS_VALID")
82 + private Boolean valid;
83 +
84 + @Column(name = "VISIBLE")
85 + private Boolean visible = true;
86 +
87 + @Column(name = "PWD_LAST_UPD_TIME")
88 + @Temporal(TemporalType.TIMESTAMP)
89 + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
90 + @JsonSerialize(using = JsonDateTimeSerializer.class)
91 + private Date pwdLastUpdTime;
92 +
93 + @Column(name = "CREATE_TIME")
94 + @Temporal(TemporalType.TIMESTAMP)
95 + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
96 + @JsonSerialize(using = JsonDateTimeSerializer.class)
97 + private Date createTime;
98 +
99 + @Column(name = "UPDATE_TIME")
100 + @Temporal(TemporalType.TIMESTAMP)
101 + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
102 + @JsonSerialize(using = JsonDateTimeSerializer.class)
103 + private Date updateTime;
104 +
105 + @Column(name = "REMARK")
106 + private String remark;
107 +
108 + // @JsonIgnore
109 + @ManyToOne(targetEntity = SysUser.class)
110 + @JoinColumn(name = "REPORT_TO")
111 + private SysUser reportTo;
112 +
113 + @Column(name = "CHANGE_PASSWORD")
114 + private Integer changePassword = 0; //是否已修改过密码
115 +
116 + /**
117 + * 用户类型 (和组织架构类型、角色类型对应的是同一个数据字典)
118 + *
119 + * 客户
120 + * 速递员
121 + * 站点
122 + * RDE
123 + * 口岸
124 + * 总部
125 + */
126 + // @JsonIgnore
127 + @ManyToOne(targetEntity = DictionaryEntries.class)
128 + @JoinColumn(name = "TYPE_ID")
129 + private DictionaryEntries type;
130 +
131 + //用户类型名称
132 + @Column(name = "TYPE_NAME")
133 + private String typeName;
134 +
135 + /**
136 + * 所属组织
137 + */
138 + // @JsonIgnore
139 + @ManyToOne(targetEntity = Organization.class)
140 + @JoinColumn(name = "ORG_ID")
141 + private Organization organization;
142 +
143 + //组织名称
144 + @Column(name = "ORG_NAME")
145 + private String organizationName;
146 +
147 + /**
148 + * 初始化发件人标志
149 + */
150 + @Column(name = "INIT_OWNER_NAME")
151 + private Long initOwnerName;
152 +
153 + /**
154 + * 是否走同账号不能二次登陆
155 + */
156 + @Column(name = "VALIDATE_LOGON")
157 + private Long validateLogon;
158 +
159 + @Column(name = "CONS_DISTRIBUTION")
160 + private String consDistribution;
161 +
162 + @Transient
163 + private Long typeId;
164 +
165 + @Transient
166 + private String typeCode;
167 +
168 + @Transient
169 + private String reportToId;
170 +
171 + @Transient
172 + private String reportToName;
173 +
174 + @Transient
175 + private Long orgId;
176 +
177 + @Transient
178 + private Long roleId;
179 +
180 + @Transient
181 + private Long roleName;
182 +
183 + @Transient
184 + private boolean ssoLogin = false;
185 +
186 + @Override
187 + public Long getId() {
188 + return id;
189 + }
190 +
191 + @Override
192 + public void setId(Long id) {
193 + this.id = id;
194 + }
195 +
196 + public String getConsDistribution() {
197 + return consDistribution;
198 + }
199 +
200 + public void setConsDistribution(String consDistribution) {
201 + this.consDistribution = consDistribution;
202 + }
203 +
204 + public Long getRoleId() {
205 + return roleId;
206 + }
207 +
208 + public void setRoleId(Long roleId) {
209 + this.roleId = roleId;
210 + }
211 +
212 + public Long getRoleName() {
213 + return roleName;
214 + }
215 +
216 + public void setRoleName(Long roleName) {
217 + this.roleName = roleName;
218 + }
219 +
220 + public void setTypeId(Long typeId) {
221 + this.typeId = typeId;
222 + }
223 +
224 + public String getLoginName() {
225 + return loginName;
226 + }
227 +
228 + public void setLoginName(String loginName) {
229 + this.loginName = loginName;
230 + }
231 +
232 + public String getUserName() {
233 + return userName;
234 + }
235 +
236 + public void setUserName(String userName) {
237 + this.userName = userName;
238 + }
239 +
240 + public String getPassword() {
241 + return password;
242 + }
243 +
244 + public void setPassword(String password) {
245 + this.password = password;
246 + }
247 +
248 + public String getPassword1() {
249 + return password1;
250 + }
251 +
252 + public void setPassword1(String password1) {
253 + this.password1 = password1;
254 + }
255 +
256 + public String getPassword2() {
257 + return password2;
258 + }
259 +
260 + public void setPassword2(String password2) {
261 + this.password2 = password2;
262 + }
263 +
264 + public String getPassword3() {
265 + return password3;
266 + }
267 +
268 + public void setPassword3(String password3) {
269 + this.password3 = password3;
270 + }
271 +
272 + public String getPassword4() {
273 + return password4;
274 + }
275 +
276 + public void setPassword4(String password4) {
277 + this.password4 = password4;
278 + }
279 +
280 + public String getPhone() {
281 + return phone;
282 + }
283 +
284 + public void setPhone(String phone) {
285 + this.phone = phone;
286 + }
287 +
288 + public String getEmail() {
289 + return email;
290 + }
291 +
292 + public void setEmail(String email) {
293 + this.email = email;
294 + }
295 +
296 + public String getEmployeeNumber() {
297 + return employeeNumber;
298 + }
299 +
300 + public void setEmployeeNumber(String employeeNumber) {
301 + this.employeeNumber = employeeNumber;
302 + }
303 +
304 + public String getCompanyName() {
305 + return companyName;
306 + }
307 +
308 + public void setCompanyName(String companyName) {
309 + this.companyName = companyName;
310 + }
311 +
312 + public String getCompanyCustomsCode() {
313 + return companyCustomsCode;
314 + }
315 +
316 + public void setCompanyCustomsCode(String companyCustomsCode) {
317 + this.companyCustomsCode = companyCustomsCode;
318 + }
319 +
320 + public String getLetterCreditCode() {
321 + return letterCreditCode;
322 + }
323 +
324 + public void setLetterCreditCode(String letterCreditCode) {
325 + this.letterCreditCode = letterCreditCode;
326 + }
327 +
328 + public Boolean getValid() {
329 + return valid;
330 + }
331 +
332 + public void setValid(Boolean valid) {
333 + this.valid = valid;
334 + }
335 +
336 + public Boolean getVisible() {
337 + return visible;
338 + }
339 +
340 + public void setVisible(Boolean visible) {
341 + this.visible = visible;
342 + }
343 +
344 + public Date getPwdLastUpdTime() {
345 + return pwdLastUpdTime;
346 + }
347 +
348 + public void setPwdLastUpdTime(Date pwdLastUpdTime) {
349 + this.pwdLastUpdTime = pwdLastUpdTime;
350 + }
351 +
352 + public Date getCreateTime() {
353 + return createTime;
354 + }
355 +
356 + public void setCreateTime(Date createTime) {
357 + this.createTime = createTime;
358 + }
359 +
360 + public Date getUpdateTime() {
361 + return updateTime;
362 + }
363 +
364 + public void setUpdateTime(Date updateTime) {
365 + this.updateTime = updateTime;
366 + }
367 +
368 + public String getRemark() {
369 + return remark;
370 + }
371 +
372 + public void setRemark(String remark) {
373 + this.remark = remark;
374 + }
375 +
376 + public SysUser getReportTo() {
377 + return reportTo;
378 + }
379 +
380 + public void setReportTo(SysUser reportTo) {
381 + this.reportTo = reportTo;
382 + }
383 +
384 + public String getReportToName() {
385 + if (this.reportTo != null) {
386 + return this.getReportTo().getLoginName() + " - " + this.getReportTo().getUserName();
387 + } else {
388 + return "";
389 + }
390 + }
391 +
392 + public Long getReportToId() {
393 + if (this.reportTo != null) {
394 + return this.getReportTo().getId();
395 + } else {
396 + return null;
397 + }
398 + }
399 +
400 + public Integer getChangePassword() {
401 + return changePassword;
402 + }
403 +
404 + public void setChangePassword(Integer changePassword) {
405 + this.changePassword = changePassword;
406 + }
407 +
408 + public DictionaryEntries getType() {
409 + return type;
410 + }
411 +
412 + public void setType(DictionaryEntries type) {
413 + this.type = type;
414 + }
415 +
416 + public Long getTypeId() {
417 + if (this.type == null) {
418 + return null;
419 + } else {
420 + return this.type.getId();
421 + }
422 + }
423 +
424 + public String getTypeCode() {
425 + if (this.type == null) {
426 + return null;
427 + } else {
428 + return this.type.getCode();
429 + }
430 + }
431 +
432 + public Organization getOrganization() {
433 + return organization;
434 + }
435 +
436 + public void setOrganization(Organization organization) {
437 + this.organization = organization;
438 + }
439 +
440 + public String getOrganizationName() {
441 + return organizationName;
442 + }
443 +
444 + public void setOrganizationName(String organizationName) {
445 + this.organizationName = organizationName;
446 + }
447 +
448 + public Long getOrgId() {
449 + if (this.organization == null) {
450 + return null;
451 + }
452 + return organization.getId();
453 + }
454 +
455 + public String getTypeName() {
456 + return typeName;
457 + }
458 +
459 + public void setTypeName(String typeName) {
460 + this.typeName = typeName;
461 + }
462 +
463 + public Long getInitOwnerName() {
464 + return initOwnerName;
465 + }
466 +
467 + public void setInitOwnerName(Long initOwnerName) {
468 + this.initOwnerName = initOwnerName;
469 + }
470 +
471 + public Long getValidateLogon() {
472 + return validateLogon;
473 + }
474 +
475 + public void setValidateLogon(Long validateLogon) {
476 + this.validateLogon = validateLogon;
477 + }
478 +
479 + public String getFedExAccount() {
480 + return fedExAccount;
481 + }
482 +
483 + public void setFedExAccount(String fedExAccount) {
484 + this.fedExAccount = fedExAccount;
485 + }
486 +
487 + public boolean isSsoLogin() {
488 + return ssoLogin;
489 + }
490 +
491 + public void setSsoLogin(boolean ssoLogin) {
492 + this.ssoLogin = ssoLogin;
493 + }
494 +}
495 +
1 +package com.erry.iclear.dateInterface.entity;
2 +
3 +import com.erry.iclear.dateInterface.common.BaseModel;
4 +import com.fasterxml.jackson.annotation.JsonIgnore;
5 +
6 +import javax.persistence.*;
7 +import java.util.Date;
8 +
9 +/**
10 + * 任务表
11 + * mt 2019年12月16日16:20:27
12 + */
13 +@Entity
14 +@Table(name = "T_TASK_INFO")
15 +public class TaskInfo extends BaseModel {
16 +
17 + private static final long serialVersionUID = 2693103610036977383L;
18 +
19 + /**
20 + * 任务表ID,自动增加
21 + */
22 + @Id
23 + @GeneratedValue
24 + @Column(name = "ID")
25 + private Long id;
26 +
27 + /**
28 + * 运单ID
29 + */
30 + @JsonIgnore
31 + @ManyToOne(targetEntity = ChmConsignment.class)
32 + @JoinColumn(name = "CONSIGNMENT_ID")
33 + private ChmConsignment chmConsignment;
34 +
35 + /**
36 + * 运单号
37 + */
38 + @Column(name = "AWB_NUMBER")
39 + private String awbNumber;
40 +
41 +
42 + /**
43 + * 站点名称
44 + */
45 + @Column(name = "STATION_NAME")
46 + private String stationName;
47 +
48 + /**
49 + * 取件日期(生成站点代码的时间)
50 + */
51 + @Column(name = "PICKUP_DATE")
52 + private Date pickupDate;
53 +
54 +
55 + /**
56 + * 运单类型
57 + */
58 + @Column(name = "EXPORT_CATEGORY")
59 + private String exportCategory;
60 +
61 + /**
62 + * 总单号
63 + */
64 + @Column(name = "MAWB")
65 + private String mawb;
66 +
67 + /**
68 + * 航班日期
69 + */
70 + @Column(name = "FLIGHT_DATE")
71 + private Date flightDate;
72 +
73 + /**
74 + * 航班号
75 + */
76 + @Column(name = "FLIGHT_NBR")
77 + private String flightNBR;
78 +
79 + /**
80 + * 口岸
81 + */
82 + @Column(name = "PORT")
83 + private String port;
84 +
85 + /**
86 + * 文件种类ID
87 + */
88 + @JsonIgnore
89 + @ManyToOne(targetEntity = DictionaryEntries.class)
90 + @JoinColumn(name = "FILE_TYPE_ID")
91 + private DictionaryEntries fileTypeDic;
92 +
93 + /**
94 + * 文件种类(EXP001 推送货物信息 DM002接收航班信息 DM003接收回执信息)
95 + */
96 + @Column(name = "FILE_TYPE")
97 + private String fileType;
98 +
99 + /**
100 + * 触发功能点ID
101 + */
102 + @JsonIgnore
103 + @ManyToOne(targetEntity = DictionaryEntries.class)
104 + @JoinColumn(name = "OPERATION_ID")
105 + private DictionaryEntries operationDic;
106 +
107 + /**
108 + * 触发功能点(1 速递员扫描 2、站点创建)
109 + */
110 + @Column(name = "OPERATION")
111 + private String operation;
112 +
113 + /**
114 + * 创建时间(运单)
115 + */
116 + @Column(name = "CREATE_TIME")
117 + private Date createTime;
118 +
119 +
120 + /**
121 + * 运单创建人
122 + */
123 + @Column(name = "CREATOR")
124 + private String creator;
125 +
126 + /**
127 + * 推送时间
128 + */
129 + @Column(name = "PUSH_TIME")
130 + private Date pushTime;
131 +
132 +
133 + /**
134 + * 推送人
135 + */
136 + @Column(name = "PUSH_USER")
137 + private String pushUserName;
138 +
139 + /**
140 + * 接收时间
141 + */
142 + @Column(name = "RECEIVE_TIME")
143 + private Date receiveTime;
144 +
145 + /**
146 + * DM发送时间
147 + */
148 + @Column(name = "DM_SEND_TIME")
149 + private Date dmSendTime;
150 +
151 + /**
152 + * 海关回执
153 + */
154 + @Column(name = "CUSTOMS_RECEIPT")
155 + private String customsReceipt;
156 +
157 + /**
158 + * 海关回执时间
159 + */
160 + @Column(name = "CUSTOMS_RECEIPT_TIME")
161 + private Date customsReceiptTime;
162 +
163 + /**
164 + * 任务完成标志ID
165 + */
166 + @JsonIgnore
167 + @ManyToOne(targetEntity = DictionaryEntries.class)
168 + @JoinColumn(name = "TASK_STATUS_ID")
169 + private DictionaryEntries taskStatisDic;
170 +
171 + /**
172 + * 任务完成标志(0待发送 1已发送 2发送失败 3接收成功 4接受失败)
173 + */
174 + @Column(name = "TASK_STATUS")
175 + private String taskStatus;
176 +
177 + /**
178 + * 失败原因
179 + */
180 + @Column(name = "REMARK")
181 + private String remark;
182 +
183 + /**
184 + * 扫描代码ID
185 + */
186 + @JsonIgnore
187 + @ManyToOne(targetEntity = DictionaryEntries.class)
188 + @JoinColumn(name = "SCAN_CODE_ID")
189 + private DictionaryEntries scanCodeDic;
190 +
191 + /**
192 + * 扫描代码
193 + */
194 + @Column(name = "SCAN_CODE")
195 + private String scanCode;
196 +
197 + /**
198 + * 扫描状态日期
199 + */
200 + @Column(name = "SCAN_STATUS_TIME")
201 + private Date scanStatusTime;
202 +
203 + /**
204 + * 文件名
205 + */
206 + @Column(name = "FILE_NAME")
207 + private String fileName;
208 +
209 + @Override
210 + public Long getId() {
211 + return id;
212 + }
213 +
214 + @Override
215 + public void setId(Long id) {
216 + this.id = id;
217 + }
218 +
219 + public ChmConsignment getChmConsignment() {
220 + return chmConsignment;
221 + }
222 +
223 + public void setChmConsignment(ChmConsignment chmConsignment) {
224 + this.chmConsignment = chmConsignment;
225 + }
226 +
227 + public String getAwbNumber() {
228 + return awbNumber;
229 + }
230 +
231 + public void setAwbNumber(String awbNumber) {
232 + this.awbNumber = awbNumber;
233 + }
234 +
235 + public String getStationName() {
236 + return stationName;
237 + }
238 +
239 + public void setStationName(String stationName) {
240 + this.stationName = stationName;
241 + }
242 +
243 + public Date getPickupDate() {
244 + return pickupDate;
245 + }
246 +
247 + public void setPickupDate(Date pickupDate) {
248 + this.pickupDate = pickupDate;
249 + }
250 +
251 +
252 + public String getExportCategory() {
253 + return exportCategory;
254 + }
255 +
256 + public void setExportCategory(String exportCategory) {
257 + this.exportCategory = exportCategory;
258 + }
259 +
260 + public String getMawb() {
261 + return mawb;
262 + }
263 +
264 + public void setMawb(String mawb) {
265 + this.mawb = mawb;
266 + }
267 +
268 + public Date getFlightDate() {
269 + return flightDate;
270 + }
271 +
272 + public void setFlightDate(Date flightDate) {
273 + this.flightDate = flightDate;
274 + }
275 +
276 + public String getFlightNBR() {
277 + return flightNBR;
278 + }
279 +
280 + public void setFlightNBR(String flightNBR) {
281 + this.flightNBR = flightNBR;
282 + }
283 +
284 + public String getPort() {
285 + return port;
286 + }
287 +
288 + public void setPort(String port) {
289 + this.port = port;
290 + }
291 +
292 + public DictionaryEntries getFileTypeDic() {
293 + return fileTypeDic;
294 + }
295 +
296 + public void setFileTypeDic(DictionaryEntries fileTypeDic) {
297 + this.fileTypeDic = fileTypeDic;
298 + }
299 +
300 + public String getFileType() {
301 + return fileType;
302 + }
303 +
304 + public void setFileType(String fileType) {
305 + this.fileType = fileType;
306 + }
307 +
308 + public DictionaryEntries getOperationDic() {
309 + return operationDic;
310 + }
311 +
312 + public void setOperationDic(DictionaryEntries operationDic) {
313 + this.operationDic = operationDic;
314 + }
315 +
316 + public String getOperation() {
317 + return operation;
318 + }
319 +
320 + public void setOperation(String operation) {
321 + this.operation = operation;
322 + }
323 +
324 + public Date getCreateTime() {
325 + return createTime;
326 + }
327 +
328 + public void setCreateTime(Date createTime) {
329 + this.createTime = createTime;
330 + }
331 +
332 +
333 + public String getCreator() {
334 + return creator;
335 + }
336 +
337 + public void setCreator(String creator) {
338 + this.creator = creator;
339 + }
340 +
341 + public Date getPushTime() {
342 + return pushTime;
343 + }
344 +
345 + public void setPushTime(Date pushTime) {
346 + this.pushTime = pushTime;
347 + }
348 +
349 +
350 + public String getPushUserName() {
351 + return pushUserName;
352 + }
353 +
354 + public void setPushUserName(String pushUserName) {
355 + this.pushUserName = pushUserName;
356 + }
357 +
358 + public Date getReceiveTime() {
359 + return receiveTime;
360 + }
361 +
362 + public void setReceiveTime(Date receiveTime) {
363 + this.receiveTime = receiveTime;
364 + }
365 +
366 + public Date getDmSendTime() {
367 + return dmSendTime;
368 + }
369 +
370 + public void setDmSendTime(Date dmSendTime) {
371 + this.dmSendTime = dmSendTime;
372 + }
373 +
374 + public String getCustomsReceipt() {
375 + return customsReceipt;
376 + }
377 +
378 + public void setCustomsReceipt(String customsReceipt) {
379 + this.customsReceipt = customsReceipt;
380 + }
381 +
382 + public Date getCustomsReceiptTime() {
383 + return customsReceiptTime;
384 + }
385 +
386 + public void setCustomsReceiptTime(Date customsReceiptTime) {
387 + this.customsReceiptTime = customsReceiptTime;
388 + }
389 +
390 + public DictionaryEntries getTaskStatisDic() {
391 + return taskStatisDic;
392 + }
393 +
394 + public void setTaskStatisDic(DictionaryEntries taskStatisDic) {
395 + this.taskStatisDic = taskStatisDic;
396 + }
397 +
398 + public String getTaskStatus() {
399 + return taskStatus;
400 + }
401 +
402 + public void setTaskStatus(String taskStatus) {
403 + this.taskStatus = taskStatus;
404 + }
405 +
406 + public String getRemark() {
407 + return remark;
408 + }
409 +
410 + public void setRemark(String remark) {
411 + this.remark = remark;
412 + }
413 +
414 + public DictionaryEntries getScanCodeDic() {
415 + return scanCodeDic;
416 + }
417 +
418 + public void setScanCodeDic(DictionaryEntries scanCodeDic) {
419 + this.scanCodeDic = scanCodeDic;
420 + }
421 +
422 + public String getScanCode() {
423 + return scanCode;
424 + }
425 +
426 + public void setScanCode(String scanCode) {
427 + this.scanCode = scanCode;
428 + }
429 +
430 + public Date getScanStatusTime() {
431 + return scanStatusTime;
432 + }
433 +
434 + public void setScanStatusTime(Date scanStatusTime) {
435 + this.scanStatusTime = scanStatusTime;
436 + }
437 +
438 + public String getFileName() {
439 + return fileName;
440 + }
441 +
442 + public void setFileName(String fileName) {
443 + this.fileName = fileName;
444 + }
445 +
446 + @Override
447 + public String toString() {
448 + return "TaskInfo{" +
449 + "id=" + id +
450 + ", chmConsignment=" + chmConsignment +
451 + ", awbNumber='" + awbNumber + '\'' +
452 + ", stationName='" + stationName + '\'' +
453 + ", pickupDate=" + pickupDate +
454 + ", exportCategory='" + exportCategory + '\'' +
455 + ", mawb='" + mawb + '\'' +
456 + ", flightDate=" + flightDate +
457 + ", flightNBR='" + flightNBR + '\'' +
458 + ", port='" + port + '\'' +
459 + ", fileTypeDic=" + fileTypeDic +
460 + ", fileType='" + fileType + '\'' +
461 + ", operationDic=" + operationDic +
462 + ", operation='" + operation + '\'' +
463 + ", createTime=" + createTime +
464 + ", creator='" + creator + '\'' +
465 + ", pushTime=" + pushTime +
466 + ", pushUserName='" + pushUserName + '\'' +
467 + ", receiveTime=" + receiveTime +
468 + ", dmSendTime=" + dmSendTime +
469 + ", customsReceipt='" + customsReceipt + '\'' +
470 + ", customsReceiptTime=" + customsReceiptTime +
471 + ", taskStatisDic=" + taskStatisDic +
472 + ", taskStatus='" + taskStatus + '\'' +
473 + ", remark='" + remark + '\'' +
474 + ", scanCodeDic=" + scanCodeDic +
475 + ", scanCode='" + scanCode + '\'' +
476 + ", scanStatusTime=" + scanStatusTime +
477 + ", fileName='" + fileName + '\'' +
478 + '}';
479 + }
480 +}
481 +
1 +package com.erry.iclear.dateInterface.repository;
2 +
3 +import com.erry.iclear.dateInterface.entity.DeclaredInfo;
4 +import org.springframework.data.jpa.repository.JpaRepository;
5 +import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
6 +import org.springframework.data.jpa.repository.Query;
7 +import org.springframework.stereotype.Repository;
8 +import org.springframework.transaction.annotation.Transactional;
9 +
10 +import java.util.List;
11 +
12 +/**
13 + * xjq 2021年11月5日
14 + */
15 +@Repository
16 +@Transactional(rollbackFor = Exception.class)
17 +public interface DeclaredInfoRepository extends JpaRepository<DeclaredInfo, Integer>, JpaSpecificationExecutor<DeclaredInfo> {
18 +
19 + /**
20 + * 根据运单号在申报数据表中查询数据
21 + * @return
22 + */
23 + @Query(nativeQuery = true, value = "select * from T_DECLARED_INFO where CONSIGNMENT_ID IN (SELECT * FROM T_CHM_CONSIGNMENT WHERE T_CHM_CONSIGNMENT.CONSIGNMENT_CODE IN ?1)")
24 + public List<DeclaredInfo> getDeclaredInfoByAll(List<String> consignmentCodeList);
25 +}
1 +package com.erry.iclear.dateInterface.service;
2 +
3 +import com.erry.iclear.dateInterface.entity.DeclaredInfo;
4 +import com.erry.iclear.dateInterface.repository.DeclaredInfoRepository;
5 +import lombok.extern.slf4j.Slf4j;
6 +import org.springframework.beans.factory.annotation.Autowired;
7 +import org.springframework.stereotype.Service;
8 +
9 +import javax.transaction.Transactional;
10 +import java.util.ArrayList;
11 +import java.util.List;
12 +
13 +/**
14 + * xjq 2021年11月5日
15 + */
16 +@Service
17 +@Slf4j
18 +@Transactional(rollbackOn = Exception.class)
19 +public class DeclaredInfoService {
20 +
21 + @Autowired
22 + private DeclaredInfoRepository declaredInfoRepository;
23 +
24 + public List<DeclaredInfo> selectDeclaredInfo(String[] consignmentCode){
25 + List<DeclaredInfo> DeclaredInfo = new ArrayList<>();
26 + List consignmentCodeList = new ArrayList();
27 + if(consignmentCode.length>0){
28 + for(int i = 0; i < consignmentCode.length; i++){
29 + consignmentCodeList.add(consignmentCode[i]);
30 + }
31 + }
32 + DeclaredInfo = declaredInfoRepository.getDeclaredInfoByAll(consignmentCodeList);
33 + return DeclaredInfo;
34 + }
35 +
36 +}
...@@ -83,6 +83,29 @@ public class IClearApiLogService { ...@@ -83,6 +83,29 @@ public class IClearApiLogService {
83 return result; 83 return result;
84 } 84 }
85 85
86 + /**
87 + * BASF请求申报数据-添加日志 2021年11月3日 xjq
88 + * @return
89 + */
90 + public IClearApiLog convertToIClearApiLogCselect(String basfc, String appId, String appKey, Date pushTime){
91 + IClearApiLog result = new IClearApiLog();
92 + try{
93 + result.setMsgType(Constant.MSG_TYPE_C);
94 + result.setAppId(appId);
95 + result.setAppKey(appKey);
96 + result.setCreateTime(new Date());
97 + result.setPushTime(pushTime);
98 + result.setReceiveResult(null);
99 + result.setResponseTime(null);
100 + result.setSpendTime(null);
101 + result.setSendTimes(1);
102 + result.setBillNo(basfc);
103 + }catch (Exception e){
104 + log.error("convertToIClearApiLog() error:"+e.getMessage());
105 + }
106 + return result;
107 + }
108 +
86 109
87 public void updateIClearApiLog(IClearApiLog iClearApiLog){ 110 public void updateIClearApiLog(IClearApiLog iClearApiLog){
88 try{ 111 try{
......