Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
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
Jiaqi.xu
2021-11-08 09:38:42 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5cacc6f6ee39de2c8160d457b255c58c53dc9404
5cacc6f6
1 parent
b1f5e364
BASF申报接口
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1954 additions
and
0 deletions
src/main/java/com/erry/iclear/dateInterface/api/BasfDataInterface.java
src/main/java/com/erry/iclear/dateInterface/api/request/ConsignmentCode.java
src/main/java/com/erry/iclear/dateInterface/common/BaseModel.java
src/main/java/com/erry/iclear/dateInterface/common/JsonDateTimeSerializer.java
src/main/java/com/erry/iclear/dateInterface/entity/DeclaredInfo.java
src/main/java/com/erry/iclear/dateInterface/entity/Organization.java
src/main/java/com/erry/iclear/dateInterface/entity/SysUser.java
src/main/java/com/erry/iclear/dateInterface/entity/TaskInfo.java
src/main/java/com/erry/iclear/dateInterface/repository/DeclaredInfoRepository.java
src/main/java/com/erry/iclear/dateInterface/service/DeclaredInfoService.java
src/main/java/com/erry/iclear/dateInterface/service/IClearApiLogService.java
src/main/java/com/erry/iclear/dateInterface/api/BasfDataInterface.java
View file @
5cacc6f
...
...
@@ -2,11 +2,15 @@ package com.erry.iclear.dateInterface.api;
import
com.erry.iclear.dateInterface.api.request.BasfMawb
;
import
com.erry.iclear.dateInterface.api.request.Basfc
;
import
com.erry.iclear.dateInterface.api.request.ConsignmentCode
;
import
com.erry.iclear.dateInterface.api.response.ResultRS
;
import
com.erry.iclear.dateInterface.entity.DeclaredInfo
;
import
com.erry.iclear.dateInterface.entity.IClearApiLog
;
import
com.erry.iclear.dateInterface.service.BasfService
;
import
com.erry.iclear.dateInterface.service.ChmConsignmentService
;
import
com.erry.iclear.dateInterface.service.DeclaredInfoService
;
import
com.erry.iclear.dateInterface.service.IClearApiLogService
;
import
com.erry.iclear.dateInterface.util.StringUtil
;
import
com.google.gson.Gson
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -17,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
@RestController
...
...
@@ -34,6 +39,9 @@ public class BasfDataInterface {
@Autowired
private
IClearApiLogService
iClearApiLogService
;
@Autowired
private
DeclaredInfoService
declaredInfoService
;
@ApiOperation
(
value
=
"BASF推送运单数据"
,
httpMethod
=
"POST"
,
notes
=
"ex: http://192.168.1.75:8080/customs/sendMawbBasf"
)
@PostMapping
(
"/sendMawbBasf"
)
@ResponseBody
...
...
@@ -122,4 +130,51 @@ public class BasfDataInterface {
result
.
setCode
(
"0"
);
return
result
;
}
@ApiOperation
(
value
=
"BASF获取申报信息"
,
httpMethod
=
"POST"
,
notes
=
"ex: http://192.168.1.75:8080/customs/selectDecListBasf"
)
@PostMapping
(
"/selectDecListBasf"
)
@ResponseBody
public
ResultRS
selectDecListBasf
(
HttpServletRequest
request
,
@Validated
@RequestBody
ConsignmentCode
consignmentCode
)
{
log
.
info
(
"接收到请求数据consignmentCode:"
+
consignmentCode
.
getConsignmentCode
()+
" data:"
+
gson
.
toJson
(
consignmentCode
));
ResultRS
result
=
new
ResultRS
(
Boolean
.
FALSE
,
""
,
""
);
//获取请求的运单号
String
[]
splitConsignment
=
StringUtil
.
split
(
consignmentCode
.
getConsignmentCode
(),
","
);
if
(
splitConsignment
.
length
>
20
){
result
.
setCode
(
"30001"
);
result
.
setMsg
(
"请求信息不能大于20条运单"
);
return
result
;
}
if
(
splitConsignment
.
length
<
1
){
result
.
setCode
(
"-7"
);
result
.
setMsg
(
"请求信息不能为空"
);
return
result
;
}
StopWatch
sw
=
new
StopWatch
(
"receice mawbBasf"
);
sw
.
start
(
"save log"
);
String
appId
=(
String
)
request
.
getHeader
(
"Appid"
);
String
appKey
=(
String
)
request
.
getHeader
(
"Appkey"
);
String
timeStamp
=(
String
)
request
.
getHeader
(
"TimeStamp"
);
//记录请求的运单
IClearApiLog
saveIClearApiLogResult
=
iClearApiLogService
.
saveIClearApiLog
(
iClearApiLogService
.
convertToIClearApiLogCselect
(
consignmentCode
.
getConsignmentCode
(),
appId
,
appKey
,
new
Date
(
Long
.
valueOf
(
timeStamp
))));
//日志的ID放入到回执日志中对应
saveIClearApiLogResult
.
getMsgId
();
//查询请求需要得运单申报信息
List
<
DeclaredInfo
>
declaredInfos
=
declaredInfoService
.
selectDeclaredInfo
(
splitConsignment
);
if
(
declaredInfos
.
size
()>
0
){
for
(
int
i
=
0
;
i
<
declaredInfos
.
size
();
i
++){
}
}
//返回申报数据
//更新记录的请求信息
//记录返回得申报数据记录
//6、return result
result
.
setSuccess
(
Boolean
.
TRUE
);
result
.
setCode
(
"0"
);
return
result
;
}
}
...
...
src/main/java/com/erry/iclear/dateInterface/api/request/ConsignmentCode.java
0 → 100644
View file @
5cacc6f
package
com
.
erry
.
iclear
.
dateInterface
.
api
.
request
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 运单集合 2021年11月4日 xjq
*/
public
class
ConsignmentCode
implements
Serializable
{
private
String
consignmentCode
;
public
String
getConsignmentCode
()
{
return
consignmentCode
;
}
public
void
setConsignmentCode
(
String
consignmentCode
)
{
this
.
consignmentCode
=
consignmentCode
;
}
}
src/main/java/com/erry/iclear/dateInterface/common/BaseModel.java
0 → 100644
View file @
5cacc6f
package
com
.
erry
.
iclear
.
dateInterface
.
common
;
import
java.io.Serializable
;
/**
* Created by liyang on 2017/4/22.
*/
public
class
BaseModel
implements
Serializable
{
private
static
final
long
serilalVersionUID
=
1L
;
private
Long
id
;
public
BaseModel
()
{
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
}
src/main/java/com/erry/iclear/dateInterface/common/JsonDateTimeSerializer.java
0 → 100644
View file @
5cacc6f
package
com
.
erry
.
iclear
.
dateInterface
.
common
;
import
com.fasterxml.jackson.core.JsonGenerator
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.JsonSerializer
;
import
com.fasterxml.jackson.databind.SerializerProvider
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
public
class
JsonDateTimeSerializer
extends
JsonSerializer
<
Date
>
{
private
static
final
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
@Override
public
void
serialize
(
Date
date
,
JsonGenerator
gen
,
SerializerProvider
provider
)
throws
IOException
,
JsonProcessingException
{
String
formattedDate
=
dateFormat
.
format
(
date
);
gen
.
writeString
(
formattedDate
);
}
}
src/main/java/com/erry/iclear/dateInterface/entity/DeclaredInfo.java
0 → 100644
View file @
5cacc6f
package
com
.
erry
.
iclear
.
dateInterface
.
entity
;
import
com.erry.iclear.dateInterface.common.BaseModel
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
javax.persistence.*
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 申报信息日志表
* MT 2020年2月18日11:39:32
*/
@Entity
@Table
(
name
=
"T_DECLARED_INFO"
)
public
class
DeclaredInfo
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
2693103610036977383L
;
/**
* 申报信息日志表,自动增加
*/
@Id
@GeneratedValue
@Column
(
name
=
"ID"
)
private
Long
id
;
/**
* 运单号
*/
@Column
(
name
=
"CONSIGNMENT_CODE"
)
private
String
consignmentCode
;
/**
* 运单类型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
=
"OPERATE_UNIT_NAME"
)
private
String
operateUnitName
;
/**
* 经营单位(境内发货人)海关编码
*/
@Column
(
name
=
"OPERATE_UNIT_CODE"
)
private
String
operateUnitCode
;
/**
* 境内发货人统一信用代码
*/
@Column
(
name
=
"TRADE_CO_SCC"
)
private
String
tradeCoSCC
;
/**
* 发件人 海关编码
*/
@Column
(
name
=
"OWNER_CODE"
)
private
String
ownerCode
;
/**
* 发件人 统一信用代码
*/
@Column
(
name
=
"OWNER_CODE_SCC"
)
private
String
ownerCodeScc
;
/**
* 商品编号
*/
@Column
(
name
=
"SKU_CODE"
)
private
String
skuCode
;
/**
* 商品名称
*/
@Column
(
name
=
"SKUNAME"
)
private
String
skuName
;
/**
* 规格型号
*/
@Column
(
name
=
"MODEL"
)
private
String
model
;
/**
* 成交数量
*/
@Column
(
name
=
"KNOCKDOWN_NUMBER"
)
private
BigDecimal
knockdownNumber
;
/**
* 成交单位ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"KNOCKDOWN_UNIT_ID"
)
private
DictionaryEntries
knockdownUnitDic
;
/**
* 成交单位
*/
@Column
(
name
=
"KNOCKDOWN_UNIT"
)
private
String
knockdownUnit
;
/**
* 第一(法定)数量
*/
@Column
(
name
=
"QTY_LEGAL_FIRST"
)
private
BigDecimal
qtyLegalFirst
;
/**
* 第一(法定)计量单位ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"UNIT_LEGAL_FIRST_ID"
)
private
DictionaryEntries
unitLegalFirstDic
;
/**
* 第一(法定)计量单位
*/
@Column
(
name
=
"UNIT_LEGAL_FIRST"
)
private
String
unitLegalFirst
;
/**
* 第二(法定)数量
*/
@Column
(
name
=
"QTY_LEGAL_SECOND"
)
private
BigDecimal
qtyLegalSecond
;
/**
* 第二(法定)计量单位ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"UNIT_LEGAL_SECOND_ID"
)
private
DictionaryEntries
unitLegalSecondDic
;
/**
* 第二(法定)计量单位
*/
@Column
(
name
=
"UNIT_LEGAL_SECOND"
)
private
String
unitLegalSecond
;
/**
* 申报金额
*/
@Column
(
name
=
"DECLARED_AMOUNT"
)
private
BigDecimal
declaredAmount
;
/**
* 币制ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"CURRENCY_ID"
)
private
DictionaryEntries
currencyDic
;
/**
* 币制
*/
@Column
(
name
=
"CURRENCY"
)
private
String
currency
;
/**
* 申报重量
*/
@Column
(
name
=
"DECLARED_WEIGHT"
)
private
BigDecimal
declaredWeight
;
/**
* 创建时间
*/
@Column
(
name
=
"CREATE_TIME"
)
private
Date
createTime
;
/**
* 创建人ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
SysUser
.
class
)
@JoinColumn
(
name
=
"CREATOR_ID"
)
private
SysUser
creatorId
;
/**
* 创建人
*/
@Column
(
name
=
"CREATOR"
)
private
String
creator
;
/**
* “是否匹配”(是,否)
*/
@Column
(
name
=
"MATCHING"
)
private
String
matching
;
/**
* 运单ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
ChmConsignment
.
class
)
@JoinColumn
(
name
=
"CONSIGNMENT_ID"
)
private
ChmConsignment
chmConsignment
;
/**
* TASK日志表ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
TaskInfo
.
class
)
@JoinColumn
(
name
=
"TASK_ID"
)
private
TaskInfo
taskInfo
;
@Transient
private
Long
consignmentId
;
@Transient
private
Long
consTypeDicId
;
/**
* 发件人(生产核销单位)名称
*/
@Transient
private
String
ownerName
;
/**
* 申报金额
*/
@Transient
private
BigDecimal
amount
;
/**
* 回填品名
*/
@Column
(
name
=
"BACKFILL_NAME"
)
private
String
backfillName
;
public
BigDecimal
getAmount
(){
return
this
.
declaredAmount
;
}
public
String
getOwnerName
(){
return
this
.
sender
;
}
public
Long
getConsTypeDicId
()
{
if
(
this
.
consTypeDic
==
null
)
{
return
null
;
}
else
{
return
this
.
consTypeDic
.
getId
();
}
}
public
Long
getConsignmentId
()
{
if
(
this
.
chmConsignment
==
null
)
{
return
null
;
}
else
{
return
this
.
chmConsignment
.
getId
();
}
}
@Override
public
Long
getId
()
{
return
id
;
}
@Override
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getConsignmentCode
()
{
return
consignmentCode
;
}
public
void
setConsignmentCode
(
String
consignmentCode
)
{
this
.
consignmentCode
=
consignmentCode
;
}
public
DictionaryEntries
getConsTypeDic
()
{
return
consTypeDic
;
}
public
void
setConsTypeDic
(
DictionaryEntries
consTypeDic
)
{
this
.
consTypeDic
=
consTypeDic
;
}
public
String
getConsType
()
{
return
consType
;
}
public
void
setConsType
(
String
consType
)
{
this
.
consType
=
consType
;
}
public
String
getSender
()
{
return
sender
;
}
public
void
setSender
(
String
sender
)
{
this
.
sender
=
sender
;
}
public
String
getOperateUnitName
()
{
return
operateUnitName
;
}
public
void
setOperateUnitName
(
String
operateUnitName
)
{
this
.
operateUnitName
=
operateUnitName
;
}
public
String
getOperateUnitCode
()
{
return
operateUnitCode
;
}
public
void
setOperateUnitCode
(
String
operateUnitCode
)
{
this
.
operateUnitCode
=
operateUnitCode
;
}
public
String
getSkuCode
()
{
return
skuCode
;
}
public
void
setSkuCode
(
String
skuCode
)
{
this
.
skuCode
=
skuCode
;
}
public
String
getSkuName
()
{
return
skuName
;
}
public
void
setSkuName
(
String
skuName
)
{
this
.
skuName
=
skuName
;
}
public
String
getModel
()
{
return
model
;
}
public
void
setModel
(
String
model
)
{
this
.
model
=
model
;
}
public
BigDecimal
getKnockdownNumber
()
{
return
knockdownNumber
;
}
public
void
setKnockdownNumber
(
BigDecimal
knockdownNumber
)
{
this
.
knockdownNumber
=
knockdownNumber
;
}
public
DictionaryEntries
getKnockdownUnitDic
()
{
return
knockdownUnitDic
;
}
public
void
setKnockdownUnitDic
(
DictionaryEntries
knockdownUnitDic
)
{
this
.
knockdownUnitDic
=
knockdownUnitDic
;
}
public
String
getKnockdownUnit
()
{
return
knockdownUnit
;
}
public
void
setKnockdownUnit
(
String
knockdownUnit
)
{
this
.
knockdownUnit
=
knockdownUnit
;
}
public
BigDecimal
getQtyLegalFirst
()
{
return
qtyLegalFirst
;
}
public
void
setQtyLegalFirst
(
BigDecimal
qtyLegalFirst
)
{
this
.
qtyLegalFirst
=
qtyLegalFirst
;
}
public
DictionaryEntries
getUnitLegalFirstDic
()
{
return
unitLegalFirstDic
;
}
public
void
setUnitLegalFirstDic
(
DictionaryEntries
unitLegalFirstDic
)
{
this
.
unitLegalFirstDic
=
unitLegalFirstDic
;
}
public
String
getUnitLegalFirst
()
{
return
unitLegalFirst
;
}
public
void
setUnitLegalFirst
(
String
unitLegalFirst
)
{
this
.
unitLegalFirst
=
unitLegalFirst
;
}
public
BigDecimal
getQtyLegalSecond
()
{
return
qtyLegalSecond
;
}
public
void
setQtyLegalSecond
(
BigDecimal
qtyLegalSecond
)
{
this
.
qtyLegalSecond
=
qtyLegalSecond
;
}
public
DictionaryEntries
getUnitLegalSecondDic
()
{
return
unitLegalSecondDic
;
}
public
void
setUnitLegalSecondDic
(
DictionaryEntries
unitLegalSecondDic
)
{
this
.
unitLegalSecondDic
=
unitLegalSecondDic
;
}
public
String
getUnitLegalSecond
()
{
return
unitLegalSecond
;
}
public
void
setUnitLegalSecond
(
String
unitLegalSecond
)
{
this
.
unitLegalSecond
=
unitLegalSecond
;
}
public
BigDecimal
getDeclaredAmount
()
{
return
declaredAmount
;
}
public
void
setDeclaredAmount
(
BigDecimal
declaredAmount
)
{
this
.
declaredAmount
=
declaredAmount
;
}
public
DictionaryEntries
getCurrencyDic
()
{
return
currencyDic
;
}
public
void
setCurrencyDic
(
DictionaryEntries
currencyDic
)
{
this
.
currencyDic
=
currencyDic
;
}
public
String
getCurrency
()
{
return
currency
;
}
public
void
setCurrency
(
String
currency
)
{
this
.
currency
=
currency
;
}
public
BigDecimal
getDeclaredWeight
()
{
return
declaredWeight
;
}
public
void
setDeclaredWeight
(
BigDecimal
declaredWeight
)
{
this
.
declaredWeight
=
declaredWeight
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
SysUser
getCreatorId
()
{
return
creatorId
;
}
public
void
setCreatorId
(
SysUser
creatorId
)
{
this
.
creatorId
=
creatorId
;
}
public
String
getCreator
()
{
return
creator
;
}
public
void
setCreator
(
String
creator
)
{
this
.
creator
=
creator
;
}
public
String
getMatching
()
{
return
matching
;
}
public
void
setMatching
(
String
matching
)
{
this
.
matching
=
matching
;
}
public
ChmConsignment
getChmConsignment
()
{
return
chmConsignment
;
}
public
void
setChmConsignment
(
ChmConsignment
chmConsignment
)
{
this
.
chmConsignment
=
chmConsignment
;
}
public
TaskInfo
getTaskInfo
()
{
return
taskInfo
;
}
public
void
setTaskInfo
(
TaskInfo
taskInfo
)
{
this
.
taskInfo
=
taskInfo
;
}
public
String
getBackfillName
()
{
return
backfillName
;
}
public
void
setBackfillName
(
String
backfillName
)
{
this
.
backfillName
=
backfillName
;
}
public
String
getTradeCoSCC
()
{
return
tradeCoSCC
;
}
public
void
setTradeCoSCC
(
String
tradeCoSCC
)
{
this
.
tradeCoSCC
=
tradeCoSCC
;
}
public
String
getOwnerCode
()
{
return
ownerCode
;
}
public
void
setOwnerCode
(
String
ownerCode
)
{
this
.
ownerCode
=
ownerCode
;
}
public
String
getOwnerCodeScc
()
{
return
ownerCodeScc
;
}
public
void
setOwnerCodeScc
(
String
ownerCodeScc
)
{
this
.
ownerCodeScc
=
ownerCodeScc
;
}
}
src/main/java/com/erry/iclear/dateInterface/entity/Organization.java
0 → 100644
View file @
5cacc6f
package
com
.
erry
.
iclear
.
dateInterface
.
entity
;
import
com.erry.iclear.dateInterface.common.BaseModel
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
javax.persistence.*
;
import
java.util.Date
;
import
java.util.Objects
;
/**
* 组织结构表
*
* @author Created by Erry 2019/7/1.
*/
@Entity
@Table
(
name
=
"T_AU_ORGANIZATION"
)
public
class
Organization
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
2693103610036977383L
;
/**
* 表ID,自动增加
*/
@Id
@GeneratedValue
@Column
(
name
=
"ID"
)
private
Long
id
;
// @Version
// @Column(name = "VERSION")
// private Integer version;
/**
* 编码
*/
@Column
(
name
=
"CODE"
)
private
String
code
;
/**
* 名称
*/
@Column
(
name
=
"NAME"
)
private
String
name
;
/**
* 组织架构类型 (和用户类型、角色类型对应的是同一个数据字典)
* <p>
* 客户
* 速递员
* 站点
* RDE
* 口岸
* 总部
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"TYPE_ID"
)
private
DictionaryEntries
type
;
/**
* 上级组织
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
Organization
.
class
)
@JoinColumn
(
name
=
"PARENT_ID"
)
private
Organization
parent
;
/**
* 级别
*/
@Column
(
name
=
"LEVEL"
)
private
Long
LEVEL
;
/**
* 创建人
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
SysUser
.
class
)
@JoinColumn
(
name
=
"CREATE_USER_ID"
)
private
SysUser
createUser
;
/**
* 创建时间
*/
@Column
(
name
=
"CREATE_TIME"
)
private
Date
createTime
;
/**
* 最后修改人
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
SysUser
.
class
)
@JoinColumn
(
name
=
"LAST_MODIFY_USER_ID"
)
private
SysUser
lastModifyUser
;
/**
* 最后修改时间
*/
@Column
(
name
=
"LAST_MODIFY_TIME"
)
private
Date
lastModifyTime
;
@Override
public
Long
getId
()
{
return
id
;
}
@Override
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
DictionaryEntries
getType
()
{
return
type
;
}
public
void
setType
(
DictionaryEntries
type
)
{
this
.
type
=
type
;
}
public
Organization
getParent
()
{
return
parent
;
}
public
void
setParent
(
Organization
parent
)
{
this
.
parent
=
parent
;
}
public
Long
getLEVEL
()
{
return
LEVEL
;
}
public
void
setLEVEL
(
Long
LEVEL
)
{
this
.
LEVEL
=
LEVEL
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
SysUser
getCreateUser
()
{
return
createUser
;
}
public
void
setCreateUser
(
SysUser
createUser
)
{
this
.
createUser
=
createUser
;
}
public
SysUser
getLastModifyUser
()
{
return
lastModifyUser
;
}
public
void
setLastModifyUser
(
SysUser
lastModifyUser
)
{
this
.
lastModifyUser
=
lastModifyUser
;
}
public
Date
getLastModifyTime
()
{
return
lastModifyTime
;
}
public
void
setLastModifyTime
(
Date
lastModifyTime
)
{
this
.
lastModifyTime
=
lastModifyTime
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
{
return
true
;
}
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
{
return
false
;
}
Organization
that
=
(
Organization
)
o
;
return
Objects
.
equals
(
id
,
that
.
id
)
&&
Objects
.
equals
(
code
,
that
.
code
)
&&
Objects
.
equals
(
name
,
that
.
name
)
&&
Objects
.
equals
(
type
,
that
.
type
)
&&
Objects
.
equals
(
parent
,
that
.
parent
)
&&
Objects
.
equals
(
LEVEL
,
that
.
LEVEL
)
&&
Objects
.
equals
(
createUser
,
that
.
createUser
)
&&
Objects
.
equals
(
createTime
,
that
.
createTime
)
&&
Objects
.
equals
(
lastModifyUser
,
that
.
lastModifyUser
)
&&
Objects
.
equals
(
lastModifyTime
,
that
.
lastModifyTime
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
id
,
code
,
name
,
type
,
parent
,
LEVEL
,
createUser
,
createTime
,
lastModifyUser
,
lastModifyTime
);
}
@Override
public
String
toString
()
{
return
"Organization{"
+
"id="
+
id
+
", code='"
+
code
+
'\''
+
", name='"
+
name
+
'\''
+
", type="
+
type
+
", parent="
+
parent
+
", LEVEL="
+
LEVEL
+
", createUser="
+
createUser
+
", createTime="
+
createTime
+
", lastModifyUser="
+
lastModifyUser
+
", lastModifyTime="
+
lastModifyTime
+
'}'
;
}
}
src/main/java/com/erry/iclear/dateInterface/entity/SysUser.java
0 → 100644
View file @
5cacc6f
package
com
.
erry
.
iclear
.
dateInterface
.
entity
;
import
com.erry.iclear.dateInterface.common.BaseModel
;
import
com.erry.iclear.dateInterface.common.JsonDateTimeSerializer
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.persistence.*
;
import
java.util.Date
;
/**
* Created by liyang on 2017/2/21.
*/
@Entity
@Table
(
name
=
"T_AU_USER"
)
public
class
SysUser
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@Id
@GeneratedValue
@Column
(
name
=
"ID"
)
private
Long
id
;
@Column
(
name
=
"LOGIN_NAME"
)
private
String
loginName
;
@Column
(
name
=
"USERNAME"
)
private
String
userName
;
@Column
(
name
=
"PASSWORD"
)
private
String
password
;
@Column
(
name
=
"PASSWORD1"
)
private
String
password1
;
@Column
(
name
=
"PASSWORD2"
)
private
String
password2
;
@Column
(
name
=
"PASSWORD3"
)
private
String
password3
;
@Column
(
name
=
"PASSWORD4"
)
private
String
password4
;
@Column
(
name
=
"PHONE"
)
private
String
phone
;
@Column
(
name
=
"EMAIL"
)
private
String
email
;
//author:wy on 2021/01/07 新增字段
//fedEx账户
@Column
(
name
=
"FEDEXACCOUNT"
)
private
String
fedExAccount
;
/**
* 员工号
*/
@Column
(
name
=
"EMPLOYEE_NUMBER"
)
private
String
employeeNumber
;
/**
* 公司名称
*/
@Column
(
name
=
"COMPANY_NAME"
)
private
String
companyName
;
/**
* 公司10位海关编码
*/
@Column
(
name
=
"COMPANY_CUSTOMS_CODE"
)
private
String
companyCustomsCode
;
/**
* 18位信用证代码
*/
@Column
(
name
=
"LETTER_CREDIT_CODE"
)
private
String
letterCreditCode
;
@Column
(
name
=
"IS_VALID"
)
private
Boolean
valid
;
@Column
(
name
=
"VISIBLE"
)
private
Boolean
visible
=
true
;
@Column
(
name
=
"PWD_LAST_UPD_TIME"
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonSerialize
(
using
=
JsonDateTimeSerializer
.
class
)
private
Date
pwdLastUpdTime
;
@Column
(
name
=
"CREATE_TIME"
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonSerialize
(
using
=
JsonDateTimeSerializer
.
class
)
private
Date
createTime
;
@Column
(
name
=
"UPDATE_TIME"
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonSerialize
(
using
=
JsonDateTimeSerializer
.
class
)
private
Date
updateTime
;
@Column
(
name
=
"REMARK"
)
private
String
remark
;
// @JsonIgnore
@ManyToOne
(
targetEntity
=
SysUser
.
class
)
@JoinColumn
(
name
=
"REPORT_TO"
)
private
SysUser
reportTo
;
@Column
(
name
=
"CHANGE_PASSWORD"
)
private
Integer
changePassword
=
0
;
//是否已修改过密码
/**
* 用户类型 (和组织架构类型、角色类型对应的是同一个数据字典)
*
* 客户
* 速递员
* 站点
* RDE
* 口岸
* 总部
*/
// @JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"TYPE_ID"
)
private
DictionaryEntries
type
;
//用户类型名称
@Column
(
name
=
"TYPE_NAME"
)
private
String
typeName
;
/**
* 所属组织
*/
// @JsonIgnore
@ManyToOne
(
targetEntity
=
Organization
.
class
)
@JoinColumn
(
name
=
"ORG_ID"
)
private
Organization
organization
;
//组织名称
@Column
(
name
=
"ORG_NAME"
)
private
String
organizationName
;
/**
* 初始化发件人标志
*/
@Column
(
name
=
"INIT_OWNER_NAME"
)
private
Long
initOwnerName
;
/**
* 是否走同账号不能二次登陆
*/
@Column
(
name
=
"VALIDATE_LOGON"
)
private
Long
validateLogon
;
@Column
(
name
=
"CONS_DISTRIBUTION"
)
private
String
consDistribution
;
@Transient
private
Long
typeId
;
@Transient
private
String
typeCode
;
@Transient
private
String
reportToId
;
@Transient
private
String
reportToName
;
@Transient
private
Long
orgId
;
@Transient
private
Long
roleId
;
@Transient
private
Long
roleName
;
@Transient
private
boolean
ssoLogin
=
false
;
@Override
public
Long
getId
()
{
return
id
;
}
@Override
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getConsDistribution
()
{
return
consDistribution
;
}
public
void
setConsDistribution
(
String
consDistribution
)
{
this
.
consDistribution
=
consDistribution
;
}
public
Long
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
Long
roleId
)
{
this
.
roleId
=
roleId
;
}
public
Long
getRoleName
()
{
return
roleName
;
}
public
void
setRoleName
(
Long
roleName
)
{
this
.
roleName
=
roleName
;
}
public
void
setTypeId
(
Long
typeId
)
{
this
.
typeId
=
typeId
;
}
public
String
getLoginName
()
{
return
loginName
;
}
public
void
setLoginName
(
String
loginName
)
{
this
.
loginName
=
loginName
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
public
String
getPassword1
()
{
return
password1
;
}
public
void
setPassword1
(
String
password1
)
{
this
.
password1
=
password1
;
}
public
String
getPassword2
()
{
return
password2
;
}
public
void
setPassword2
(
String
password2
)
{
this
.
password2
=
password2
;
}
public
String
getPassword3
()
{
return
password3
;
}
public
void
setPassword3
(
String
password3
)
{
this
.
password3
=
password3
;
}
public
String
getPassword4
()
{
return
password4
;
}
public
void
setPassword4
(
String
password4
)
{
this
.
password4
=
password4
;
}
public
String
getPhone
()
{
return
phone
;
}
public
void
setPhone
(
String
phone
)
{
this
.
phone
=
phone
;
}
public
String
getEmail
()
{
return
email
;
}
public
void
setEmail
(
String
email
)
{
this
.
email
=
email
;
}
public
String
getEmployeeNumber
()
{
return
employeeNumber
;
}
public
void
setEmployeeNumber
(
String
employeeNumber
)
{
this
.
employeeNumber
=
employeeNumber
;
}
public
String
getCompanyName
()
{
return
companyName
;
}
public
void
setCompanyName
(
String
companyName
)
{
this
.
companyName
=
companyName
;
}
public
String
getCompanyCustomsCode
()
{
return
companyCustomsCode
;
}
public
void
setCompanyCustomsCode
(
String
companyCustomsCode
)
{
this
.
companyCustomsCode
=
companyCustomsCode
;
}
public
String
getLetterCreditCode
()
{
return
letterCreditCode
;
}
public
void
setLetterCreditCode
(
String
letterCreditCode
)
{
this
.
letterCreditCode
=
letterCreditCode
;
}
public
Boolean
getValid
()
{
return
valid
;
}
public
void
setValid
(
Boolean
valid
)
{
this
.
valid
=
valid
;
}
public
Boolean
getVisible
()
{
return
visible
;
}
public
void
setVisible
(
Boolean
visible
)
{
this
.
visible
=
visible
;
}
public
Date
getPwdLastUpdTime
()
{
return
pwdLastUpdTime
;
}
public
void
setPwdLastUpdTime
(
Date
pwdLastUpdTime
)
{
this
.
pwdLastUpdTime
=
pwdLastUpdTime
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
SysUser
getReportTo
()
{
return
reportTo
;
}
public
void
setReportTo
(
SysUser
reportTo
)
{
this
.
reportTo
=
reportTo
;
}
public
String
getReportToName
()
{
if
(
this
.
reportTo
!=
null
)
{
return
this
.
getReportTo
().
getLoginName
()
+
" - "
+
this
.
getReportTo
().
getUserName
();
}
else
{
return
""
;
}
}
public
Long
getReportToId
()
{
if
(
this
.
reportTo
!=
null
)
{
return
this
.
getReportTo
().
getId
();
}
else
{
return
null
;
}
}
public
Integer
getChangePassword
()
{
return
changePassword
;
}
public
void
setChangePassword
(
Integer
changePassword
)
{
this
.
changePassword
=
changePassword
;
}
public
DictionaryEntries
getType
()
{
return
type
;
}
public
void
setType
(
DictionaryEntries
type
)
{
this
.
type
=
type
;
}
public
Long
getTypeId
()
{
if
(
this
.
type
==
null
)
{
return
null
;
}
else
{
return
this
.
type
.
getId
();
}
}
public
String
getTypeCode
()
{
if
(
this
.
type
==
null
)
{
return
null
;
}
else
{
return
this
.
type
.
getCode
();
}
}
public
Organization
getOrganization
()
{
return
organization
;
}
public
void
setOrganization
(
Organization
organization
)
{
this
.
organization
=
organization
;
}
public
String
getOrganizationName
()
{
return
organizationName
;
}
public
void
setOrganizationName
(
String
organizationName
)
{
this
.
organizationName
=
organizationName
;
}
public
Long
getOrgId
()
{
if
(
this
.
organization
==
null
)
{
return
null
;
}
return
organization
.
getId
();
}
public
String
getTypeName
()
{
return
typeName
;
}
public
void
setTypeName
(
String
typeName
)
{
this
.
typeName
=
typeName
;
}
public
Long
getInitOwnerName
()
{
return
initOwnerName
;
}
public
void
setInitOwnerName
(
Long
initOwnerName
)
{
this
.
initOwnerName
=
initOwnerName
;
}
public
Long
getValidateLogon
()
{
return
validateLogon
;
}
public
void
setValidateLogon
(
Long
validateLogon
)
{
this
.
validateLogon
=
validateLogon
;
}
public
String
getFedExAccount
()
{
return
fedExAccount
;
}
public
void
setFedExAccount
(
String
fedExAccount
)
{
this
.
fedExAccount
=
fedExAccount
;
}
public
boolean
isSsoLogin
()
{
return
ssoLogin
;
}
public
void
setSsoLogin
(
boolean
ssoLogin
)
{
this
.
ssoLogin
=
ssoLogin
;
}
}
src/main/java/com/erry/iclear/dateInterface/entity/TaskInfo.java
0 → 100644
View file @
5cacc6f
package
com
.
erry
.
iclear
.
dateInterface
.
entity
;
import
com.erry.iclear.dateInterface.common.BaseModel
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
javax.persistence.*
;
import
java.util.Date
;
/**
* 任务表
* mt 2019年12月16日16:20:27
*/
@Entity
@Table
(
name
=
"T_TASK_INFO"
)
public
class
TaskInfo
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
2693103610036977383L
;
/**
* 任务表ID,自动增加
*/
@Id
@GeneratedValue
@Column
(
name
=
"ID"
)
private
Long
id
;
/**
* 运单ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
ChmConsignment
.
class
)
@JoinColumn
(
name
=
"CONSIGNMENT_ID"
)
private
ChmConsignment
chmConsignment
;
/**
* 运单号
*/
@Column
(
name
=
"AWB_NUMBER"
)
private
String
awbNumber
;
/**
* 站点名称
*/
@Column
(
name
=
"STATION_NAME"
)
private
String
stationName
;
/**
* 取件日期(生成站点代码的时间)
*/
@Column
(
name
=
"PICKUP_DATE"
)
private
Date
pickupDate
;
/**
* 运单类型
*/
@Column
(
name
=
"EXPORT_CATEGORY"
)
private
String
exportCategory
;
/**
* 总单号
*/
@Column
(
name
=
"MAWB"
)
private
String
mawb
;
/**
* 航班日期
*/
@Column
(
name
=
"FLIGHT_DATE"
)
private
Date
flightDate
;
/**
* 航班号
*/
@Column
(
name
=
"FLIGHT_NBR"
)
private
String
flightNBR
;
/**
* 口岸
*/
@Column
(
name
=
"PORT"
)
private
String
port
;
/**
* 文件种类ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"FILE_TYPE_ID"
)
private
DictionaryEntries
fileTypeDic
;
/**
* 文件种类(EXP001 推送货物信息 DM002接收航班信息 DM003接收回执信息)
*/
@Column
(
name
=
"FILE_TYPE"
)
private
String
fileType
;
/**
* 触发功能点ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"OPERATION_ID"
)
private
DictionaryEntries
operationDic
;
/**
* 触发功能点(1 速递员扫描 2、站点创建)
*/
@Column
(
name
=
"OPERATION"
)
private
String
operation
;
/**
* 创建时间(运单)
*/
@Column
(
name
=
"CREATE_TIME"
)
private
Date
createTime
;
/**
* 运单创建人
*/
@Column
(
name
=
"CREATOR"
)
private
String
creator
;
/**
* 推送时间
*/
@Column
(
name
=
"PUSH_TIME"
)
private
Date
pushTime
;
/**
* 推送人
*/
@Column
(
name
=
"PUSH_USER"
)
private
String
pushUserName
;
/**
* 接收时间
*/
@Column
(
name
=
"RECEIVE_TIME"
)
private
Date
receiveTime
;
/**
* DM发送时间
*/
@Column
(
name
=
"DM_SEND_TIME"
)
private
Date
dmSendTime
;
/**
* 海关回执
*/
@Column
(
name
=
"CUSTOMS_RECEIPT"
)
private
String
customsReceipt
;
/**
* 海关回执时间
*/
@Column
(
name
=
"CUSTOMS_RECEIPT_TIME"
)
private
Date
customsReceiptTime
;
/**
* 任务完成标志ID
*/
@JsonIgnore
@ManyToOne
(
targetEntity
=
DictionaryEntries
.
class
)
@JoinColumn
(
name
=
"TASK_STATUS_ID"
)
private
DictionaryEntries
taskStatisDic
;
/**
* 任务完成标志(0待发送 1已发送 2发送失败 3接收成功 4接受失败)
*/
@Column
(
name
=
"TASK_STATUS"
)
private
String
taskStatus
;
/**
* 失败原因
*/
@Column
(
name
=
"REMARK"
)
private
String
remark
;
/**
* 扫描代码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
;
/**
* 文件名
*/
@Column
(
name
=
"FILE_NAME"
)
private
String
fileName
;
@Override
public
Long
getId
()
{
return
id
;
}
@Override
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
ChmConsignment
getChmConsignment
()
{
return
chmConsignment
;
}
public
void
setChmConsignment
(
ChmConsignment
chmConsignment
)
{
this
.
chmConsignment
=
chmConsignment
;
}
public
String
getAwbNumber
()
{
return
awbNumber
;
}
public
void
setAwbNumber
(
String
awbNumber
)
{
this
.
awbNumber
=
awbNumber
;
}
public
String
getStationName
()
{
return
stationName
;
}
public
void
setStationName
(
String
stationName
)
{
this
.
stationName
=
stationName
;
}
public
Date
getPickupDate
()
{
return
pickupDate
;
}
public
void
setPickupDate
(
Date
pickupDate
)
{
this
.
pickupDate
=
pickupDate
;
}
public
String
getExportCategory
()
{
return
exportCategory
;
}
public
void
setExportCategory
(
String
exportCategory
)
{
this
.
exportCategory
=
exportCategory
;
}
public
String
getMawb
()
{
return
mawb
;
}
public
void
setMawb
(
String
mawb
)
{
this
.
mawb
=
mawb
;
}
public
Date
getFlightDate
()
{
return
flightDate
;
}
public
void
setFlightDate
(
Date
flightDate
)
{
this
.
flightDate
=
flightDate
;
}
public
String
getFlightNBR
()
{
return
flightNBR
;
}
public
void
setFlightNBR
(
String
flightNBR
)
{
this
.
flightNBR
=
flightNBR
;
}
public
String
getPort
()
{
return
port
;
}
public
void
setPort
(
String
port
)
{
this
.
port
=
port
;
}
public
DictionaryEntries
getFileTypeDic
()
{
return
fileTypeDic
;
}
public
void
setFileTypeDic
(
DictionaryEntries
fileTypeDic
)
{
this
.
fileTypeDic
=
fileTypeDic
;
}
public
String
getFileType
()
{
return
fileType
;
}
public
void
setFileType
(
String
fileType
)
{
this
.
fileType
=
fileType
;
}
public
DictionaryEntries
getOperationDic
()
{
return
operationDic
;
}
public
void
setOperationDic
(
DictionaryEntries
operationDic
)
{
this
.
operationDic
=
operationDic
;
}
public
String
getOperation
()
{
return
operation
;
}
public
void
setOperation
(
String
operation
)
{
this
.
operation
=
operation
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getCreator
()
{
return
creator
;
}
public
void
setCreator
(
String
creator
)
{
this
.
creator
=
creator
;
}
public
Date
getPushTime
()
{
return
pushTime
;
}
public
void
setPushTime
(
Date
pushTime
)
{
this
.
pushTime
=
pushTime
;
}
public
String
getPushUserName
()
{
return
pushUserName
;
}
public
void
setPushUserName
(
String
pushUserName
)
{
this
.
pushUserName
=
pushUserName
;
}
public
Date
getReceiveTime
()
{
return
receiveTime
;
}
public
void
setReceiveTime
(
Date
receiveTime
)
{
this
.
receiveTime
=
receiveTime
;
}
public
Date
getDmSendTime
()
{
return
dmSendTime
;
}
public
void
setDmSendTime
(
Date
dmSendTime
)
{
this
.
dmSendTime
=
dmSendTime
;
}
public
String
getCustomsReceipt
()
{
return
customsReceipt
;
}
public
void
setCustomsReceipt
(
String
customsReceipt
)
{
this
.
customsReceipt
=
customsReceipt
;
}
public
Date
getCustomsReceiptTime
()
{
return
customsReceiptTime
;
}
public
void
setCustomsReceiptTime
(
Date
customsReceiptTime
)
{
this
.
customsReceiptTime
=
customsReceiptTime
;
}
public
DictionaryEntries
getTaskStatisDic
()
{
return
taskStatisDic
;
}
public
void
setTaskStatisDic
(
DictionaryEntries
taskStatisDic
)
{
this
.
taskStatisDic
=
taskStatisDic
;
}
public
String
getTaskStatus
()
{
return
taskStatus
;
}
public
void
setTaskStatus
(
String
taskStatus
)
{
this
.
taskStatus
=
taskStatus
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
DictionaryEntries
getScanCodeDic
()
{
return
scanCodeDic
;
}
public
void
setScanCodeDic
(
DictionaryEntries
scanCodeDic
)
{
this
.
scanCodeDic
=
scanCodeDic
;
}
public
String
getScanCode
()
{
return
scanCode
;
}
public
void
setScanCode
(
String
scanCode
)
{
this
.
scanCode
=
scanCode
;
}
public
Date
getScanStatusTime
()
{
return
scanStatusTime
;
}
public
void
setScanStatusTime
(
Date
scanStatusTime
)
{
this
.
scanStatusTime
=
scanStatusTime
;
}
public
String
getFileName
()
{
return
fileName
;
}
public
void
setFileName
(
String
fileName
)
{
this
.
fileName
=
fileName
;
}
@Override
public
String
toString
()
{
return
"TaskInfo{"
+
"id="
+
id
+
", chmConsignment="
+
chmConsignment
+
", awbNumber='"
+
awbNumber
+
'\''
+
", stationName='"
+
stationName
+
'\''
+
", pickupDate="
+
pickupDate
+
", exportCategory='"
+
exportCategory
+
'\''
+
", mawb='"
+
mawb
+
'\''
+
", flightDate="
+
flightDate
+
", flightNBR='"
+
flightNBR
+
'\''
+
", port='"
+
port
+
'\''
+
", fileTypeDic="
+
fileTypeDic
+
", fileType='"
+
fileType
+
'\''
+
", operationDic="
+
operationDic
+
", operation='"
+
operation
+
'\''
+
", createTime="
+
createTime
+
", creator='"
+
creator
+
'\''
+
", pushTime="
+
pushTime
+
", pushUserName='"
+
pushUserName
+
'\''
+
", receiveTime="
+
receiveTime
+
", dmSendTime="
+
dmSendTime
+
", customsReceipt='"
+
customsReceipt
+
'\''
+
", customsReceiptTime="
+
customsReceiptTime
+
", taskStatisDic="
+
taskStatisDic
+
", taskStatus='"
+
taskStatus
+
'\''
+
", remark='"
+
remark
+
'\''
+
", scanCodeDic="
+
scanCodeDic
+
", scanCode='"
+
scanCode
+
'\''
+
", scanStatusTime="
+
scanStatusTime
+
", fileName='"
+
fileName
+
'\''
+
'}'
;
}
}
src/main/java/com/erry/iclear/dateInterface/repository/DeclaredInfoRepository.java
0 → 100644
View file @
5cacc6f
package
com
.
erry
.
iclear
.
dateInterface
.
repository
;
import
com.erry.iclear.dateInterface.entity.DeclaredInfo
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
/**
* xjq 2021年11月5日
*/
@Repository
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
interface
DeclaredInfoRepository
extends
JpaRepository
<
DeclaredInfo
,
Integer
>,
JpaSpecificationExecutor
<
DeclaredInfo
>
{
/**
* 根据运单号在申报数据表中查询数据
* @return
*/
@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)"
)
public
List
<
DeclaredInfo
>
getDeclaredInfoByAll
(
List
<
String
>
consignmentCodeList
);
}
src/main/java/com/erry/iclear/dateInterface/service/DeclaredInfoService.java
0 → 100644
View file @
5cacc6f
package
com
.
erry
.
iclear
.
dateInterface
.
service
;
import
com.erry.iclear.dateInterface.entity.DeclaredInfo
;
import
com.erry.iclear.dateInterface.repository.DeclaredInfoRepository
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.transaction.Transactional
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* xjq 2021年11月5日
*/
@Service
@Slf4j
@Transactional
(
rollbackOn
=
Exception
.
class
)
public
class
DeclaredInfoService
{
@Autowired
private
DeclaredInfoRepository
declaredInfoRepository
;
public
List
<
DeclaredInfo
>
selectDeclaredInfo
(
String
[]
consignmentCode
){
List
<
DeclaredInfo
>
DeclaredInfo
=
new
ArrayList
<>();
List
consignmentCodeList
=
new
ArrayList
();
if
(
consignmentCode
.
length
>
0
){
for
(
int
i
=
0
;
i
<
consignmentCode
.
length
;
i
++){
consignmentCodeList
.
add
(
consignmentCode
[
i
]);
}
}
DeclaredInfo
=
declaredInfoRepository
.
getDeclaredInfoByAll
(
consignmentCodeList
);
return
DeclaredInfo
;
}
}
src/main/java/com/erry/iclear/dateInterface/service/IClearApiLogService.java
View file @
5cacc6f
...
...
@@ -83,6 +83,29 @@ public class IClearApiLogService {
return
result
;
}
/**
* BASF请求申报数据-添加日志 2021年11月3日 xjq
* @return
*/
public
IClearApiLog
convertToIClearApiLogCselect
(
String
basfc
,
String
appId
,
String
appKey
,
Date
pushTime
){
IClearApiLog
result
=
new
IClearApiLog
();
try
{
result
.
setMsgType
(
Constant
.
MSG_TYPE_C
);
result
.
setAppId
(
appId
);
result
.
setAppKey
(
appKey
);
result
.
setCreateTime
(
new
Date
());
result
.
setPushTime
(
pushTime
);
result
.
setReceiveResult
(
null
);
result
.
setResponseTime
(
null
);
result
.
setSpendTime
(
null
);
result
.
setSendTimes
(
1
);
result
.
setBillNo
(
basfc
);
}
catch
(
Exception
e
){
log
.
error
(
"convertToIClearApiLog() error:"
+
e
.
getMessage
());
}
return
result
;
}
public
void
updateIClearApiLog
(
IClearApiLog
iClearApiLog
){
try
{
...
...
Please
register
or
login
to post a comment