Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wei.zhou
/
iClear-api
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
wei.zhou
2021-06-22 13:44:20 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
546cb79da7b0fa25a34107dedc07a62809520896
546cb79d
1 parent
38b29a83
提交代码
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
783 deletions
src/main/java/com/erry/iclear/dateInterface/api/CustomsDataInterface.java
src/main/java/com/erry/iclear/dateInterface/entity/ChmConsignment.java
src/main/java/com/erry/iclear/dateInterface/service/ChmConsignmentService.java
src/test/java/com/erry/iclear/dateInterface/ChmConsignmentServiceTest.java
src/main/java/com/erry/iclear/dateInterface/api/CustomsDataInterface.java
View file @
546cb79
...
...
@@ -110,8 +110,9 @@ public class CustomsDataInterface {
//4、保存运单到iclear中
sw
.
start
(
"processChmConsignment"
);
//if(result.getSuccess()){
//TODO 等待校验逻辑完善后,由result.getSuccess() 判断
if
(
true
){
chmConsignmentService
.
processChmConsignment
(
mawb
,
timeStamp
);
chmConsignmentService
.
processChmConsignment
(
mawb
,
timeStamp
,
appId
);
}
sw
.
stop
();
...
...
src/main/java/com/erry/iclear/dateInterface/entity/ChmConsignment.java
View file @
546cb79
...
...
@@ -14,6 +14,7 @@ import java.util.List;
/**
* 运单表
* Created by Erry 2019/5/30.
*
* @author Administrator
*/
@Entity
...
...
@@ -31,29 +32,18 @@ public class ChmConsignment implements Serializable {
@Column
(
name
=
"ID"
)
private
Long
id
;
/**
* 报关单类型ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"DECLARED_DOC_TYPE_ID"
)
private
DictionaryEntries
declaredDocTypeDic
;
/**
*
乐观锁
*
运单号
*/
// @Version
// @Column(name = "VERSION", columnDefinition = "INTEGER", length = 8)
// private Integer version;
@Column
(
name
=
"CONSIGNMENT_CODE"
)
private
String
consignmentCode
;
/**
*
报关单类型
*
总运单号
*/
@Column
(
name
=
"DECLARED_DOC_TYPE"
)
private
String
declaredDocType
;
@Column
(
name
=
"CONSIGNMENT_HEAD_CODE"
)
private
String
consignmentHeadCode
;
/**
* 申报单位
...
...
@@ -69,7 +59,6 @@ public class ChmConsignment implements Serializable {
private
String
contractCode
;
/**
* 征免性质ID
*/
...
...
@@ -84,8 +73,6 @@ public class ChmConsignment implements Serializable {
private
String
taxNature
;
/**
* 指运港ID
*/
...
...
@@ -153,7 +140,6 @@ public class ChmConsignment implements Serializable {
private
String
recordCode
;
/**
* 净重(公斤)
*/
...
...
@@ -195,12 +181,9 @@ public class ChmConsignment implements Serializable {
private
String
enteringNo
;
/**
* 监管方式ID
*/
// @JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"TRADE_MODE_ID"
)
private
DictionaryEntries
tradeModeDic
;
...
...
@@ -212,18 +195,12 @@ public class ChmConsignment implements Serializable {
private
String
tradeMode
;
/**
* 境内发货人编码
*/
@Column
(
name
=
"TRADE_CO_SCC"
)
private
String
tradeCoSCC
;
/**
* 境内发货人(经营单位编码)
*/
@Column
(
name
=
"OPERATE_UNIT_CODE"
)
private
String
operateUnitCode
;
/**
* 境内发货人(经营单位名称)
...
...
@@ -247,7 +224,6 @@ public class ChmConsignment implements Serializable {
/**
* 成交方式ID
*/
// @JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"DEAL_MODE_ID"
)
private
DictionaryEntries
dealModeDic
;
...
...
@@ -272,30 +248,6 @@ public class ChmConsignment implements Serializable {
@Column
(
name
=
"PACKAGE_TYPE"
)
private
String
packageType
;
/**
* 报关形式类型ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"DECLARED_FORM_TYPE_ID"
)
private
DictionaryEntries
declaredFromTypeDic
;
/**
* 报关形式类型
*/
@Column
(
name
=
"DECLARED_FORM_TYPE"
)
private
String
declaredFromType
;
/**
* 生产核销单位编码
*/
@Column
(
name
=
"OWNER_CODE_SCC"
)
private
String
ownerCodeScc
;
/**
* 贸易国(地区)ID
*/
...
...
@@ -309,155 +261,15 @@ public class ChmConsignment implements Serializable {
@Column
(
name
=
"TRADE_AREA_CODE"
)
private
String
tradeAreaCode
;
//------------------------------------------------------------------------------------
/**
* 出境口岸ID
*/
// @JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"EXIT_PORT_ID"
)
private
DictionaryEntries
exitPortDic
;
//author : wy on 2021/01/12 新增“fedEx账户”
@Column
(
name
=
"FEDEXACCOUNT"
)
private
String
fedExAccount
;
/**
* 出境口岸
*/
// @Pattern(regexp = "[A-Z][a-z][0-9]")
// private String passWord;
@Column
(
name
=
"EXIT_PORT"
)
private
String
exitPort
;
/**
* 出境关别代码
*/
@Column
(
name
=
"EXIT_CUS_CODE"
)
private
String
exitCusCode
;
/**
* 出境关别ID
*/
// @JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"EXIT_CUS_ID"
)
private
DictionaryEntries
exitCusDic
;
/**
* 出境关别
*/
@Column
(
name
=
"EXIT_CUS"
)
private
String
exitCus
;
/**
* 海关编号
*/
@Column
(
name
=
"CUSTOMS_NO"
)
private
String
customsNo
;
/**
* 出口日期
*/
@Column
(
name
=
"IMPORT_DATE"
)
private
Date
importDate
;
/**
* 申报日期
*/
@Column
(
name
=
"CUSTOMS_DATE"
)
private
Date
customsDate
;
/**
* 生产核销位海关编码
*/
@Column
(
name
=
"OWNER_CODE"
)
private
String
ownerCode
;
/**
* 生产核销单位
*/
@Column
(
name
=
"OWNER_NAME"
)
private
String
ownerName
;
/**
* 运单号
*/
@Column
(
name
=
"CONSIGNMENT_CODE"
)
private
String
consignmentCode
;
/**
* 总运单号
*/
@Column
(
name
=
"CONSIGNMENT_HEAD_CODE"
)
private
String
consignmentHeadCode
;
/**
* 报关转关类型ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"DECLARED_TYPE_ID"
)
private
DictionaryEntries
declaredTypeDic
;
/**
* 报关转关类型
*/
@Column
(
name
=
"DECLARED_TYPE"
)
private
String
declaredType
;
/**
* 许可证号
*/
@Column
(
name
=
"LICENSE_CODE"
)
private
String
licenseCode
;
/**
* 抵运国(地区)ID
*/
// @JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"FROM_COUNTRY_ID"
)
private
DictionaryEntries
fromCountryDic
;
...
...
@@ -468,45 +280,6 @@ public class ChmConsignment implements Serializable {
@Column
(
name
=
"FROM_COUNTRY"
)
private
String
fromCountry
;
/**
* 随附单据及编号
*/
@Column
(
name
=
"SLIP"
)
private
String
slip
;
/**
* 特殊关系确认
*/
@Column
(
name
=
"PROMISE_ITMES1"
)
private
String
promiseItmes1
;
;
/**
* 价格影响确认
*/
@Column
(
name
=
"PROMISE_ITMES2"
)
private
String
promiseItmes2
;
/**
* 支付特许权使用费确认
*/
@Column
(
name
=
"PROMISE_ITMES3"
)
private
String
promiseItmes3
;
/**
* 境外收货人
*/
...
...
@@ -519,11 +292,6 @@ public class ChmConsignment implements Serializable {
@Column
(
name
=
"OVERSEAS_CONSIGNOR_CODE"
)
private
String
overseasConsignorCode
;
/**
* 运输工具名称及航次号
*/
@Column
(
name
=
"FLIGHT_CLASS_NO"
)
private
String
flightClassNo
;
/**
* 标记唛码及备注 (标记唛码)
...
...
@@ -532,179 +300,11 @@ public class ChmConsignment implements Serializable {
private
String
declaredRemark
;
/**
* 标记唛码及备注 (备注)
*/
@Column
(
name
=
"REMARK_MARK"
)
private
String
remarkMark
;
/**
* 报关员证号
*/
@Column
(
name
=
"DECLARED_CODE"
)
private
String
declaredCode
;
/**
* 电话
*/
@Column
(
name
=
"TELEPHONE"
)
private
String
telephone
;
/**
* 运单类型ID
*/
// @JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"CONS_TYPE_ID"
)
private
DictionaryEntries
consTypeDic
;
/**
* 运单类型
*/
@Column
(
name
=
"CONS_TYPE"
)
private
String
consType
;
/**
* 发件人姓名
*/
@Column
(
name
=
"SENDER"
)
private
String
sender
;
/**
* 企业代码
*/
@Column
(
name
=
"ENTERPRISE_CODE"
)
private
String
enterpriseCode
;
/**
* 纳税单位
*/
@Column
(
name
=
"TAX_UNIT"
)
private
String
taxUnit
;
/**
* 运单图片打印状态ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"PRINT_STATUS_ID"
)
private
DictionaryEntries
printStatusDic
;
/**
* 运单图片打印状态
*/
@Column
(
name
=
"PRINT_STATUS"
)
private
String
printStatus
;
/**
* 委托书是否盖章ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"IS_STAMP_ID"
)
private
DictionaryEntries
stampDic
;
/**
* 委托书是否盖章
*/
@Column
(
name
=
"IS_STAMP"
)
private
String
stamp
;
/**
* 上传文件状态ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"UP_FILE_STATUS_ID"
)
private
DictionaryEntries
upFileStatusDic
;
/**
* 上传文件状态
*/
@Column
(
name
=
"UP_FILE_STATUS"
)
private
String
upFileStatus
;
/**
* 上传文件时间
*/
@Column
(
name
=
"UP_FILE_TIME"
)
private
Date
upFileTime
;
/**
* 上传文件人员ID
*/
// @JsonIgnore
// @ManyToOne(targetEntity = SysUser.class)
// @JoinColumn(name = "UP_FILE_USER_ID")
// private SysUser upFileUserDic;
/**
* 上传文件人员
*/
@Column
(
name
=
"UP_FILE_USER"
)
private
String
upFileUser
;
/**
* 图片任务状态ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"TASK_STATUS_ID"
)
private
DictionaryEntries
taskStatusDic
;
/**
* 图片任务状态
*/
@Column
(
name
=
"TASK_STATUS"
)
private
String
taskStatus
;
/**
* 图片合成时间
*/
@Column
(
name
=
"PDF_TIME"
)
private
Date
pdfTime
;
/**
* 海关帐号
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"PRINT_NO_ID"
)
private
DictionaryEntries
printNoDic
;
/**
* 海关帐号
*/
@Column
(
name
=
"PRINT_NO"
)
private
String
printNo
;
/**
* 海关帐号 变更记录
*/
@Column
(
name
=
"PRINT_NO_MSG"
)
private
String
printNoMsg
;
/**
* 最后一次打印时间
*/
@Column
(
name
=
"PRINT_TIME"
)
private
Date
printTime
;
/**
* 运单创建时间
*/
@Column
(
name
=
"CREATE_TIME"
)
private
Date
createTime
;
/**
* 运单创建人ID
*/
// @JsonIgnore
// @ManyToOne(targetEntity = SysUser.class)
// @JoinColumn(name = "CREATOR_ID")
// private SysUser creatorId;
/**
* 运单创建人
...
...
@@ -718,19 +318,6 @@ public class ChmConsignment implements Serializable {
@Column
(
name
=
"UPDATE_TIME"
)
private
Date
updateTime
;
/**
* 运单更新人ID
*/
// @JsonIgnore
// @ManyToOne(targetEntity = SysUser.class)
// @JoinColumn(name = "UPDATE_USER_ID")
// private SysUser updateUser;
/**
* 运单更新人
*/
@Column
(
name
=
"UPDATE_USER"
)
private
String
updateUserName
;
/**
* 运单状态ID
...
...
@@ -746,244 +333,8 @@ public class ChmConsignment implements Serializable {
@Column
(
name
=
"CONS_STATUS"
)
private
String
consStatus
;
/**
* OSPR状态ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"OSPR_STATUS_ID"
)
private
DictionaryEntries
osprStatusDic
;
/**
* OSPR状态
*/
@Column
(
name
=
"OSPR_STATUS"
)
private
String
osprStatus
;
/**
* 申报口岸
*/
@Column
(
name
=
"DECLARED_PORT"
)
private
String
declaredPort
;
/**
* 站点
*/
// @JsonIgnore
// @ManyToOne(targetEntity = Organization.class)
// @JoinColumn(name = "STATION_ID")
// private Organization station;
/**
* 站点名称
*/
@Column
(
name
=
"STATION_NAME"
)
private
String
stationName
;
/**
* 口岸
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"PORT_ID"
)
private
DictionaryEntries
port
;
/**
* 口岸名称
*/
@Column
(
name
=
"PORT_NAME"
)
private
String
portName
;
/**
* 航班日期
*/
@DateTimeFormat
(
pattern
=
"yyy-MM-dd"
)
@Column
(
name
=
"FLIIGHT_DATE"
)
private
Date
flightDate
;
/**
* 航班号
*/
@Column
(
name
=
"FLIIGHT_NO"
)
private
String
flightNo
;
/**
* 航线
*/
@Column
(
name
=
"ROUTE"
)
private
String
route
;
/**
* 速递员
*/
@Column
(
name
=
"COURIER"
)
private
String
courier
;
/**
* 备注
*/
@Column
(
name
=
"REMARK"
)
private
String
remark
;
/**
* 是否启用报关单
*/
@Column
(
name
=
"ENABLE_DECLARATION"
)
private
String
enableDeclaration
;
/**
* 图片是否已上传
*/
@Column
(
name
=
"PIC_UPLOADED"
)
private
Boolean
picUploaded
;
/**
* 图片最后上传时间
*/
@Column
(
name
=
"PIC_UPLOAD_TIME"
)
private
Date
picUploadTime
;
/**
* 图片最后上传人
*/
// @JsonIgnore
// @ManyToOne(targetEntity = SysUser.class)
// @JoinColumn(name = "PIC_UPLOAD_USER_ID")
// private SysUser picUploadUser;
/**
* 创建渠道
*/
@Column
(
name
=
"CREATING_CHANNELS"
)
private
String
creatingChannels
;
/**
* 货品名称
*/
@Column
(
name
=
"SKUNAME"
)
private
String
skuName
;
/**
* 是否导出
*/
@Column
(
name
=
"IS_EXPORT"
)
private
String
export
;
/**
* 联系人
*/
@Column
(
name
=
"CONTACTS"
)
private
String
contacts
;
/**
* 联系方式
*/
@Column
(
name
=
"CONTACT_INFORMATION"
)
private
String
contactInformation
;
/**
* 取件城市
* author: wy on 2021/01/26 新增字段
*/
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"PICKUP_CITY"
)
private
DictionaryEntries
pickUpCity
;
/**
* 取件城市名称
*/
@Column
(
name
=
"PICKUPCITY_NAME"
)
private
String
pickUpCityName
;
/**
* 反填标志(DM002是否反填,航班号,航班日期)
* author: wy on 2021/02/03
*/
@Column
(
name
=
"ISRETURNDATA"
)
private
Boolean
isReturnData
;
/**
* 审批备注(审批不通过)
*/
@Column
(
name
=
"REJECT_REMARK"
)
private
String
rejectRemark
;
/**
* 是否需要站点协助 站点协助(审批不通过)
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"SITE_ASSISTANCE_ID"
)
private
DictionaryEntries
siteAssistanceDic
;
/**
* 取件日期
*/
@Column
(
name
=
"PICK_UP_DATE"
)
private
Date
pickUpDate
;
/**
* 海关回执
*/
@Column
(
name
=
"CUSTOMS_RECEIPT"
)
private
String
customsReceipt
;
/**
* 海关回执时间
*/
@Column
(
name
=
"CUSTOMS_RECEIPT_TIME"
)
private
Date
customsReceiptTime
;
/**
* remark运单备注信息
*/
@Column
(
name
=
"DM_REMARK"
)
private
String
dmRemark
;
/**
* 扫描代码ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"SCAN_CODE_ID"
)
private
DictionaryEntries
scanCodeDic
;
/**
* 扫描代码
*/
@Column
(
name
=
"SCAN_CODE"
)
private
String
scanCode
;
/**
* 扫描状态日期
*/
@Column
(
name
=
"SCAN_STATUS_TIME"
)
private
Date
scanStatusTime
;
/**
* 是否PPE
*/
@Column
(
name
=
"IS_PPE"
)
private
String
ppe
;
/**
* 运单录入的类型
*/
@Column
(
name
=
"CHMCONSIGMENT_TYPE"
)
private
String
chmConsigmentType
;
/**
* 是否是同一批批量导入的运单
*/
@Column
(
name
=
"IS_BATCH_IMPORT"
)
private
String
isBatchimport
;
@OneToMany
(
mappedBy
=
"chmConsignment"
,
cascade
=
CascadeType
.
ALL
)
@OneToMany
(
mappedBy
=
"chmConsignment"
,
cascade
=
CascadeType
.
ALL
)
private
List
<
ChmConsignmentDetail
>
chmConsignmentDetailList
;
...
...
@@ -991,20 +342,9 @@ public class ChmConsignment implements Serializable {
public
String
toString
()
{
return
"ChmConsignment{"
+
"id="
+
id
+
//", version=" + version +
", exitPortDic="
+
exitPortDic
+
", exitPort='"
+
exitPort
+
'\''
+
", exitCusCode='"
+
exitCusCode
+
'\''
+
", exitCusDic="
+
exitCusDic
+
", exitCus='"
+
exitCus
+
'\''
+
", enteringNo='"
+
enteringNo
+
'\''
+
", customsNo='"
+
customsNo
+
'\''
+
", recordCode='"
+
recordCode
+
'\''
+
", importDate="
+
importDate
+
", customsDate="
+
customsDate
+
", ownerCodeScc='"
+
ownerCodeScc
+
'\''
+
", ownerCode='"
+
ownerCode
+
'\''
+
", ownerName='"
+
ownerName
+
'\''
+
", vehicleWay="
+
vehicleWay
+
", vehicleWayCode='"
+
vehicleWayCode
+
'\''
+
", consignmentCode='"
+
consignmentCode
+
'\''
+
...
...
@@ -1017,13 +357,6 @@ public class ChmConsignment implements Serializable {
", dealMode='"
+
dealMode
+
'\''
+
", packageTypeDic="
+
packageTypeDic
+
", packageType='"
+
packageType
+
'\''
+
", declaredDocTypeDic="
+
declaredDocTypeDic
+
", declaredDocType='"
+
declaredDocType
+
'\''
+
", declaredTypeDic="
+
declaredTypeDic
+
", declaredType='"
+
declaredType
+
'\''
+
", declaredFromTypeDic="
+
declaredFromTypeDic
+
", declaredFromType='"
+
declaredFromType
+
'\''
+
", licenseCode='"
+
licenseCode
+
'\''
+
", fromCountryDic="
+
fromCountryDic
+
", fromCountry='"
+
fromCountry
+
'\''
+
", throughStopPortDic="
+
throughStopPortDic
+
...
...
@@ -1043,116 +376,17 @@ public class ChmConsignment implements Serializable {
", counts="
+
counts
+
", grossWeight="
+
grossWeight
+
", netWeight="
+
netWeight
+
", slip='"
+
slip
+
'\''
+
", promiseItmes1='"
+
promiseItmes1
+
'\''
+
", promiseItmes2='"
+
promiseItmes2
+
'\''
+
", promiseItmes3='"
+
promiseItmes3
+
'\''
+
", tradeCoSCC='"
+
tradeCoSCC
+
'\''
+
", operateUnitCode='"
+
operateUnitCode
+
'\''
+
", operateUnitName='"
+
operateUnitName
+
'\''
+
", overseasConsignorFnCname='"
+
overseasConsignorFnCname
+
'\''
+
", overseasConsignorCode='"
+
overseasConsignorCode
+
'\''
+
", flightClassNo='"
+
flightClassNo
+
'\''
+
", declaredRemark='"
+
declaredRemark
+
'\''
+
", remarkMark='"
+
remarkMark
+
'\''
+
", declaredCode='"
+
declaredCode
+
'\''
+
", declaredUnitName='"
+
declaredUnitName
+
'\''
+
", telephone='"
+
telephone
+
'\''
+
", consTypeDic="
+
consTypeDic
+
", consType='"
+
consType
+
'\''
+
", sender='"
+
sender
+
'\''
+
", enterpriseCode='"
+
enterpriseCode
+
'\''
+
", taxUnit='"
+
taxUnit
+
'\''
+
", printStatusDic="
+
printStatusDic
+
", printStatus='"
+
printStatus
+
'\''
+
", stampDic="
+
stampDic
+
", stamp='"
+
stamp
+
'\''
+
", upFileStatusDic="
+
upFileStatusDic
+
", upFileStatus='"
+
upFileStatus
+
'\''
+
", upFileTime="
+
upFileTime
+
//", upFileUserDic=" + upFileUserDic +
", upFileUser='"
+
upFileUser
+
'\''
+
", taskStatusDic="
+
taskStatusDic
+
", taskStatus='"
+
taskStatus
+
'\''
+
", pdfTime="
+
pdfTime
+
", printNoDic="
+
printNoDic
+
", printNo='"
+
printNo
+
'\''
+
", printNoMsg='"
+
printNoMsg
+
'\''
+
", printTime="
+
printTime
+
", createTime="
+
createTime
+
//", creatorId=" + creatorId +
", creator='"
+
creator
+
'\''
+
", updateTime="
+
updateTime
+
//", updateUser=" + updateUser +
", updateUserName='"
+
updateUserName
+
'\''
+
", consStatusDic="
+
consStatusDic
+
", consStatus='"
+
consStatus
+
'\''
+
", osprStatusDic="
+
osprStatusDic
+
", osprStatus='"
+
osprStatus
+
'\''
+
", declaredPort='"
+
declaredPort
+
'\''
+
//", station=" + station +
", stationName='"
+
stationName
+
'\''
+
", flightDate="
+
flightDate
+
", flightNo='"
+
flightNo
+
'\''
+
", route='"
+
route
+
'\''
+
", courier='"
+
courier
+
'\''
+
", remark='"
+
remark
+
'\''
+
", enableDeclaration='"
+
enableDeclaration
+
'\''
+
", picUploaded="
+
picUploaded
+
", picUploadTime="
+
picUploadTime
+
//", picUploadUser=" + picUploadUser +
", creatingChannels='"
+
creatingChannels
+
'\''
+
", skuName='"
+
skuName
+
'\''
+
", export='"
+
export
+
'\''
+
", contacts='"
+
contacts
+
'\''
+
", contactInformation='"
+
contactInformation
+
'\''
+
", rejectRemark='"
+
rejectRemark
+
'\''
+
", siteAssistanceDic="
+
siteAssistanceDic
+
", pickUpDate="
+
pickUpDate
+
", customsReceipt='"
+
customsReceipt
+
'\''
+
", customsReceiptTime="
+
customsReceiptTime
+
", dmRemark='"
+
dmRemark
+
'\''
+
", scanCodeDic="
+
scanCodeDic
+
", scanCode='"
+
scanCode
+
'\''
+
", scanStatusTime="
+
scanStatusTime
+
", ppe='"
+
ppe
+
'\''
+
", chmConsigmentType='"
+
chmConsigmentType
+
'\''
+
", isBatchimport='"
+
isBatchimport
+
'\''
+
// ", exitPortDicId=" + exitPortDicId +
// ", exitPortDicName='" + exitPortDicName + '\'' +
// ", exitCusDicId=" + exitCusDicId +
// ", exitCusDicName='" + exitCusDicName + '\'' +
// ", vehicleWayId=" + vehicleWayId +
// ", vehicleWayName='" + vehicleWayName + '\'' +
// ", tradeModeDicId=" + tradeModeDicId +
// ", tradeModeDicName='" + tradeModeDicName + '\'' +
// ", taxNatureDicId=" + taxNatureDicId +
// ", taxNatureDicName='" + taxNatureDicName + '\'' +
// ", dealModeDicId=" + dealModeDicId +
// ", dealModeDicName='" + dealModeDicName + '\'' +
// ", packageTypeDicId=" + packageTypeDicId +
// ", packageTypeDicName='" + packageTypeDicName + '\'' +
// ", consTypeDicId=" + consTypeDicId +
// ", consTypeDicName='" + consTypeDicName + '\'' +
// ", fromCountryDicId=" + fromCountryDicId +
// ", fromCountryDicName='" + fromCountryDicName + '\'' +
// ", tradeAreaCodeDicId=" + tradeAreaCodeDicId +
// ", tradeAreaCodeDicName='" + tradeAreaCodeDicName + '\'' +
// ", transCurrencyDicId=" + transCurrencyDicId +
// ", transCurrencyDicName='" + transCurrencyDicName + '\'' +
// ", insuranceCostCurrencyDicId=" + insuranceCostCurrencyDicId +
// ", insuranceCostCurrencyDicName='" + insuranceCostCurrencyDicName + '\'' +
// ", otherCurrencyDicId=" + otherCurrencyDicId +
// ", otherCurrencyDicName='" + otherCurrencyDicName + '\'' +
// ", throughStopPortDicId=" + throughStopPortDicId +
// ", throughStopPortDicName='" + throughStopPortDicName + '\'' +
// ", consStatusDicCode='" + consStatusDicCode + '\'' +
// ", siteAssistanceDicName='" + siteAssistanceDicName + '\'' +
// ", stampDicCode='" + stampDicCode + '\'' +
", pickUpCity='"
+
pickUpCity
+
'\''
+
", pickUpCityName='"
+
pickUpCityName
+
'\''
+
", isReturnData='"
+
isReturnData
+
'\''
+
", fedExAccount='"
+
fedExAccount
+
'\''
+
'}'
;
}
}
...
...
src/main/java/com/erry/iclear/dateInterface/service/ChmConsignmentService.java
View file @
546cb79
...
...
@@ -39,7 +39,7 @@ public class ChmConsignmentService {
* 转换主单
* @return
*/
public
ChmConsignment
convertToChmConsignment
(
Mawb
mawb
,
Date
pushTime
){
public
ChmConsignment
convertToChmConsignment
(
Mawb
mawb
,
Date
pushTime
,
String
creator
){
ChmConsignment
result
=
new
ChmConsignment
();
try
{
//进出口标志:固定值 E
...
...
@@ -103,8 +103,8 @@ public class ChmConsignmentService {
result
.
setNetWeight
(
mawb
.
getNetWt
());
//杂费币制
DictionaryEntries
otherDictionaryEntries
=
Constant
.
dictionaryEntriesCache
.
get
(
Constant
.
CURRENCY_SYSTEM
+
mawb
.
getOtherCurr
());
result
.
set
InsuranceCost
CurrencyDic
(
otherDictionaryEntries
);
result
.
set
InsuranceCost
Currency
(
otherDictionaryEntries
.
getChineseName
());
result
.
set
Other
CurrencyDic
(
otherDictionaryEntries
);
result
.
set
Other
Currency
(
otherDictionaryEntries
.
getChineseName
());
//杂费/率
result
.
setOtherCost
(
mawb
.
getOtherRate
());
//杂费标志
...
...
@@ -136,7 +136,7 @@ public class ChmConsignmentService {
//境内收发货人名称
result
.
setOperateUnitName
(
mawb
.
getTradeName
());
//
TODO
成交方式
//成交方式
DictionaryEntries
dealModeDictionaryEntries
=
Constant
.
dictionaryEntriesCache
.
get
(
Constant
.
CLINCH_TYPE
+
mawb
.
getTransMode
());
result
.
setDealModeDic
(
dealModeDictionaryEntries
);
result
.
setDealMode
(
dealModeDictionaryEntries
.
getChineseName
());
...
...
@@ -177,7 +177,7 @@ public class ChmConsignmentService {
//推送时间作为创建时间,可以用来校验数据的有序性,如果新的推送时间小于已有的创建时间,就不更新数据
result
.
setCreateTime
(
new
Date
());
result
.
setUpdateTime
(
pushTime
);
result
.
setCreator
(
creator
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
...
...
@@ -244,11 +244,11 @@ public class ChmConsignmentService {
* @param mawb
* @param timeStamp
*/
public
void
processChmConsignment
(
Mawb
mawb
,
String
timeStamp
)
{
public
void
processChmConsignment
(
Mawb
mawb
,
String
timeStamp
,
String
creator
)
{
try
{
Date
pushTime
=
DateUtils
.
timeStampToDate
(
Long
.
valueOf
(
timeStamp
));
ChmConsignment
chmConsignment
=
this
.
convertToChmConsignment
(
mawb
,
pushTime
);
ChmConsignment
chmConsignment
=
this
.
convertToChmConsignment
(
mawb
,
pushTime
,
creator
);
List
<
ChmConsignmentDetail
>
chmConsignmentDetailList
=
new
ArrayList
<>();
mawb
.
getMawbDetailList
().
forEach
(
detail
->{
chmConsignmentDetailList
.
add
(
chmConsignmentDetailService
.
convertToChmConsignmentDetail
(
detail
,
chmConsignment
));
...
...
src/test/java/com/erry/iclear/dateInterface/ChmConsignmentServiceTest.java
View file @
546cb79
...
...
@@ -23,7 +23,7 @@ public class ChmConsignmentServiceTest extends IClearApiApplicationTests {
try
{
Mawb
mawb
=
this
.
createNewMawb
();
String
timeStamp
=
String
.
valueOf
(
new
Date
().
getTime
());
chmConsignmentService
.
processChmConsignment
(
mawb
,
timeStamp
);
chmConsignmentService
.
processChmConsignment
(
mawb
,
timeStamp
,
"CTM"
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
...
...
Please
register
or
login
to post a comment