Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-api-boot-master
Commits
818e3f4f
Commit
818e3f4f
authored
Feb 15, 2025
by
Smile
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
集运基础功能代码提交
parent
55e8ef3f
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
957 additions
and
0 deletions
+957
-0
ConsConvert.java
.../iocoder/yudao/module/order/convert/cons/ConsConvert.java
+55
-0
ConsDO.java
...ocoder/yudao/module/order/dal/dataobject/cons/ConsDO.java
+145
-0
ConsMapper.java
...iocoder/yudao/module/order/dal/mysql/cons/ConsMapper.java
+86
-0
ConsService.java
.../iocoder/yudao/module/order/service/cons/ConsService.java
+68
-0
ConsServiceImpl.java
...oder/yudao/module/order/service/cons/ConsServiceImpl.java
+92
-0
ConsBackVO.java
...ava/cn/iocoder/yudao/module/order/vo/cons/ConsBackVO.java
+150
-0
ConsBaseVO.java
...ava/cn/iocoder/yudao/module/order/vo/cons/ConsBaseVO.java
+109
-0
ConsCreateReqVO.java
...n/iocoder/yudao/module/order/vo/cons/ConsCreateReqVO.java
+12
-0
ConsQueryVO.java
...va/cn/iocoder/yudao/module/order/vo/cons/ConsQueryVO.java
+124
-0
ConsUpdateReqVO.java
...n/iocoder/yudao/module/order/vo/cons/ConsUpdateReqVO.java
+18
-0
ConsController.java
...ao/module/order/controller/admin/cons/ConsController.java
+98
-0
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/convert/cons/ConsConvert.java
0 → 100644
View file @
818e3f4f
package
cn
.
iocoder
.
yudao
.
module
.
order
.
convert
.
cons
;
import
java.util.*
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.module.order.dal.dataobject.cons.ConsDO
;
import
cn.iocoder.yudao.module.order.vo.cons.ConsBackVO
;
import
cn.iocoder.yudao.module.order.vo.cons.ConsCreateReqVO
;
import
cn.iocoder.yudao.module.order.vo.cons.ConsUpdateReqVO
;
import
org.mapstruct.Mapper
;
import
org.mapstruct.factory.Mappers
;
/**
* 集运包裹主 Convert
* @author 系统管理员
*/
@Mapper
public
interface
ConsConvert
{
/*****转换MapStruct*****/
ConsConvert
INSTANCE
=
Mappers
.
getMapper
(
ConsConvert
.
class
);
/***
* 创建VO转实体
* @param bean
* @return
*/
ConsDO
convert
(
ConsCreateReqVO
bean
);
/***
* 修改VO转实体
* @param bean
* @return
*/
ConsDO
convert
(
ConsUpdateReqVO
bean
);
/***
* 实体转返回VO
* @param bean
* @return
*/
ConsBackVO
convert
(
ConsDO
bean
);
/***
* 实体列表转返回VO列表
* @param list
* @return
*/
List
<
ConsBackVO
>
convertList
(
List
<
ConsDO
>
list
);
/***
* 实体分页转返回分页
* @param page
* @return
*/
PageResult
<
ConsBackVO
>
convertPage
(
PageResult
<
ConsDO
>
page
);
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/dal/dataobject/cons/ConsDO.java
0 → 100644
View file @
818e3f4f
package
cn
.
iocoder
.
yudao
.
module
.
order
.
dal
.
dataobject
.
cons
;
import
lombok.*
;
import
java.util.*
;
import
com.baomidou.mybatisplus.annotation.*
;
import
cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO
;
/**
* 集运包裹主 DO
*
* @author 系统管理员
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName
(
"ecw_cons"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@ToString
(
callSuper
=
true
)
public
class
ConsDO
extends
BaseDO
{
/**
*
*/
@TableId
private
Long
id
;
/**
*
*/
private
Long
customerId
;
/**
* 客户编号
*/
private
String
customerNumber
;
/**
* 运输方式,来自字典的值
*/
private
Integer
transportId
;
/**
* 订单ID,关联订单表
*/
private
Long
orderId
;
/**
* 平台ID,关联平台表数据,为后面系统对接预留字段
*/
private
Long
platformId
;
/**
* 平台订单号
*/
private
String
platformOrderSn
;
/**
* 是否需要验货,0否,1是
*/
private
Integer
needInspect
;
/**
* 包裹状态,来自字典表,cons_status
*/
private
Integer
status
;
/**
* 快递公司ID,对应快递公司表
*/
private
Long
expressId
;
/**
* 快递单号
*/
private
String
expressNo
;
/**
* 仓库ID
*/
private
Long
wareId
;
/**
* 货值
*/
private
java
.
math
.
BigDecimal
worth
;
/**
* 货值单位,默认为3,人民币
*/
private
Integer
worthCurrency
;
/**
* 库域ID,关联ecw_warehouse_area表
*/
private
Long
areaId
;
/**
* 预计到仓时间
*/
private
Date
watEtime
;
/**
* 仓位ID,关联ecw_warehouse_area_position
*/
private
Long
positionId
;
/**
*
*/
private
Date
watTime
;
/**
* 线路ID
*/
private
Long
warehouseLineId
;
/**
* 是否被签收,0未签收,1已签收
*/
private
Boolean
signed
;
/**
* 签收时间
*/
private
Date
signedTime
;
/**
* 签收备注
*/
private
String
signedRemarks
;
/**
* 数量
*/
private
Integer
sumQuantity
;
/**
* 区分包裹是由谁创建的,关联字典表 cons_op_source,可区分为后台创建、客户web端、客户app端、客户H5端、仓库创建及其他,默认为1 客户app端
*/
private
Integer
opSource
;
/**
* 备注
*/
private
String
remarks
;
/**
* 签收人
*/
private
Long
signer
;
/**
* 目的城市ID,关联ecw_region表ID
*/
private
Long
consigneeCityId
;
/**
* 目的国ID,关联ecw_region表ID
*/
private
Long
consigneeCountryId
;
/**
* 目的仓ID,关联ecw_warehouse表ID
*/
private
Long
consigneeWarehouseId
;
/**
*
*/
private
String
consigneeAddress
;
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/dal/mysql/cons/ConsMapper.java
0 → 100644
View file @
818e3f4f
package
cn
.
iocoder
.
yudao
.
module
.
order
.
dal
.
mysql
.
cons
;
import
java.util.*
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQuery
;
import
cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.cons.ConsDO
;
import
cn.iocoder.yudao.module.order.vo.cons.ConsBackVO
;
import
cn.iocoder.yudao.module.order.vo.cons.ConsQueryVO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* 集运包裹主 Mapper
* @author 系统管理员
*/
@Mapper
public
interface
ConsMapper
extends
AbstractMapper
<
ConsDO
>
{
@Override
default
PageResult
<
ConsDO
>
selectPage
(
PageVO
page
,
Object
object
)
{
if
(
object
instanceof
ConsQueryVO
)
{
ConsQueryVO
vo
=
(
ConsQueryVO
)
object
;
return
selectPage
(
page
,
new
LambdaQuery
<
ConsDO
>()
.
eqIfPresent
(
ConsDO:
:
getCustomerId
,
vo
.
getCustomerId
())
.
eqIfPresent
(
ConsDO:
:
getCustomerNumber
,
vo
.
getCustomerNumber
())
.
eqIfPresent
(
ConsDO:
:
getTransportId
,
vo
.
getTransportId
())
.
eqIfPresent
(
ConsDO:
:
getOrderId
,
vo
.
getOrderId
())
.
eqIfPresent
(
ConsDO:
:
getPlatformId
,
vo
.
getPlatformId
())
.
eqIfPresent
(
ConsDO:
:
getPlatformOrderSn
,
vo
.
getPlatformOrderSn
())
.
eqIfPresent
(
ConsDO:
:
getStatus
,
vo
.
getStatus
())
.
eqIfPresent
(
ConsDO:
:
getExpressId
,
vo
.
getExpressId
())
.
eqIfPresent
(
ConsDO:
:
getExpressNo
,
vo
.
getExpressNo
())
.
eqIfPresent
(
ConsDO:
:
getWareId
,
vo
.
getWareId
())
.
eqIfPresent
(
ConsDO:
:
getWorth
,
vo
.
getWorth
())
.
eqIfPresent
(
ConsDO:
:
getWorthCurrency
,
vo
.
getWorthCurrency
())
.
betweenIfPresent
(
ConsDO:
:
getWatEtime
,
vo
.
getBeginWatEtime
(),
vo
.
getEndWatEtime
())
.
betweenIfPresent
(
ConsDO:
:
getWatTime
,
vo
.
getBeginWatTime
(),
vo
.
getEndWatTime
())
.
eqIfPresent
(
ConsDO:
:
getSigned
,
vo
.
getSigned
())
.
betweenIfPresent
(
ConsDO:
:
getSignedTime
,
vo
.
getBeginSignedTime
(),
vo
.
getEndSignedTime
())
.
eqIfPresent
(
ConsDO:
:
getSignedRemarks
,
vo
.
getSignedRemarks
())
.
eqIfPresent
(
ConsDO:
:
getSumQuantity
,
vo
.
getSumQuantity
())
.
eqIfPresent
(
ConsDO:
:
getOpSource
,
vo
.
getOpSource
())
.
eqIfPresent
(
ConsDO:
:
getRemarks
,
vo
.
getRemarks
())
.
betweenIfPresent
(
ConsDO:
:
getCreateTime
,
vo
.
getBeginCreateTime
(),
vo
.
getEndCreateTime
())
.
orderByDesc
(
ConsDO:
:
getId
));
}
return
null
;
}
@Override
default
List
<
ConsDO
>
selectList
(
Object
object
)
{
if
(
object
instanceof
ConsQueryVO
)
{
ConsQueryVO
vo
=
(
ConsQueryVO
)
object
;
return
selectList
(
new
LambdaQuery
<
ConsDO
>()
.
eqIfPresent
(
ConsDO:
:
getCustomerId
,
vo
.
getCustomerId
())
.
eqIfPresent
(
ConsDO:
:
getCustomerNumber
,
vo
.
getCustomerNumber
())
.
eqIfPresent
(
ConsDO:
:
getTransportId
,
vo
.
getTransportId
())
.
eqIfPresent
(
ConsDO:
:
getOrderId
,
vo
.
getOrderId
())
.
eqIfPresent
(
ConsDO:
:
getPlatformId
,
vo
.
getPlatformId
())
.
eqIfPresent
(
ConsDO:
:
getPlatformOrderSn
,
vo
.
getPlatformOrderSn
())
.
eqIfPresent
(
ConsDO:
:
getStatus
,
vo
.
getStatus
())
.
eqIfPresent
(
ConsDO:
:
getExpressId
,
vo
.
getExpressId
())
.
eqIfPresent
(
ConsDO:
:
getExpressNo
,
vo
.
getExpressNo
())
.
eqIfPresent
(
ConsDO:
:
getWareId
,
vo
.
getWareId
())
.
eqIfPresent
(
ConsDO:
:
getWorth
,
vo
.
getWorth
())
.
eqIfPresent
(
ConsDO:
:
getWorthCurrency
,
vo
.
getWorthCurrency
())
.
betweenIfPresent
(
ConsDO:
:
getWatEtime
,
vo
.
getBeginWatEtime
(),
vo
.
getEndWatEtime
())
.
betweenIfPresent
(
ConsDO:
:
getWatTime
,
vo
.
getBeginWatTime
(),
vo
.
getEndWatTime
())
.
eqIfPresent
(
ConsDO:
:
getSigned
,
vo
.
getSigned
())
.
betweenIfPresent
(
ConsDO:
:
getSignedTime
,
vo
.
getBeginSignedTime
(),
vo
.
getEndSignedTime
())
.
eqIfPresent
(
ConsDO:
:
getSignedRemarks
,
vo
.
getSignedRemarks
())
.
eqIfPresent
(
ConsDO:
:
getSumQuantity
,
vo
.
getSumQuantity
())
.
eqIfPresent
(
ConsDO:
:
getOpSource
,
vo
.
getOpSource
())
.
eqIfPresent
(
ConsDO:
:
getRemarks
,
vo
.
getRemarks
())
.
betweenIfPresent
(
ConsDO:
:
getCreateTime
,
vo
.
getBeginCreateTime
(),
vo
.
getEndCreateTime
())
.
orderByDesc
(
ConsDO:
:
getId
));
}
return
null
;
}
List
<
ConsBackVO
>
myConsPageList
(
@Param
(
"start"
)
int
start
,
@Param
(
"size"
)
int
size
,
@Param
(
"query"
)
ConsQueryVO
query
);
Long
myConsCount
(
@Param
(
"query"
)
ConsQueryVO
query
);
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/cons/ConsService.java
0 → 100644
View file @
818e3f4f
package
cn
.
iocoder
.
yudao
.
module
.
order
.
service
.
cons
;
import
java.util.*
;
import
javax.validation.*
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.mybatis.core.service.IService
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.module.order.dal.dataobject.cons.ConsDO
;
import
cn.iocoder.yudao.module.order.vo.cons.ConsBackVO
;
import
cn.iocoder.yudao.module.order.vo.cons.ConsCreateReqVO
;
import
cn.iocoder.yudao.module.order.vo.cons.ConsQueryVO
;
import
cn.iocoder.yudao.module.order.vo.cons.ConsUpdateReqVO
;
/**
* 集运包裹主 Service 接口
*
* @author 系统管理员
*/
public
interface
ConsService
extends
IService
<
ConsDO
>
{
/**
* 创建集运包裹主
* @param createReqVO 创建信息
* @return 编号
*/
Long
createCons
(
@Valid
ConsCreateReqVO
createReqVO
);
/**
* 更新集运包裹主
* @param updateReqVO 更新信息
*/
void
updateCons
(
@Valid
ConsUpdateReqVO
updateReqVO
);
/**
* 删除集运包裹主
* @param id 编号
*/
void
deleteCons
(
Long
id
);
/**
* 获得集运包裹主
* @param id 编号
* @return 集运包裹主
*/
ConsDO
getCons
(
Long
id
);
/**
* 获得集运包裹主列表
* @param ids 编号
* @return 集运包裹主列表
*/
List
<
ConsDO
>
getConsList
(
Collection
<
Long
>
ids
);
/**
* 获得集运包裹主分页
* @param page 分页查询
* @param query 查询
* @return 集运包裹主分页
*/
PageResult
<
ConsBackVO
>
getConsPage
(
ConsQueryVO
query
,
PageVO
page
);
/**
* 获得集运包裹主列表, 用于 Excel 导出
* @param query 查询
* @return 集运包裹主列表
*/
List
<
ConsDO
>
getConsList
(
ConsQueryVO
query
);
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/cons/ConsServiceImpl.java
0 → 100644
View file @
818e3f4f
package
cn
.
iocoder
.
yudao
.
module
.
order
.
service
.
cons
;
import
java.util.*
;
import
javax.annotation.Resource
;
import
cn.iocoder.yudao.framework.i18n.core.I18nMessage
;
import
cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils
;
import
cn.iocoder.yudao.module.order.convert.cons.ConsConvert
;
import
cn.iocoder.yudao.module.order.dal.dataobject.cons.ConsDO
;
import
cn.iocoder.yudao.module.order.dal.mysql.cons.ConsMapper
;
import
cn.iocoder.yudao.module.order.vo.cons.ConsBackVO
;
import
cn.iocoder.yudao.module.order.vo.cons.ConsCreateReqVO
;
import
cn.iocoder.yudao.module.order.vo.cons.ConsQueryVO
;
import
cn.iocoder.yudao.module.order.vo.cons.ConsUpdateReqVO
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.springframework.stereotype.Service
;
import
org.springframework.validation.annotation.Validated
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.mybatis.core.service.AbstractService
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
util
.
ServiceExceptionUtil
.
exception
;
/**
* 集运包裹主 Service 实现类
*
* @author 系统管理员
*/
@Service
@Validated
public
class
ConsServiceImpl
extends
AbstractService
<
ConsMapper
,
ConsDO
>
implements
ConsService
{
@Resource
private
ConsMapper
consMapper
;
@Override
public
Long
createCons
(
ConsCreateReqVO
createReqVO
)
{
// 插入
ConsDO
cons
=
ConsConvert
.
INSTANCE
.
convert
(
createReqVO
);
consMapper
.
insert
(
cons
);
// 返回
return
cons
.
getId
();
}
@Override
public
void
updateCons
(
ConsUpdateReqVO
updateReqVO
)
{
// 校验存在
this
.
validateConsExists
(
updateReqVO
.
getId
());
// 更新
ConsDO
updateObj
=
ConsConvert
.
INSTANCE
.
convert
(
updateReqVO
);
consMapper
.
updateById
(
updateObj
);
}
@Override
public
void
deleteCons
(
Long
id
)
{
// 校验存在
this
.
validateConsExists
(
id
);
// 删除
consMapper
.
deleteById
(
id
);
}
private
void
validateConsExists
(
Long
id
)
{
if
(
consMapper
.
selectById
(
id
)
==
null
)
{
throw
exception
(
30004
,
"包裹不存在"
);
}
}
@Override
public
ConsDO
getCons
(
Long
id
)
{
return
consMapper
.
selectById
(
id
);
}
@Override
public
List
<
ConsDO
>
getConsList
(
Collection
<
Long
>
ids
)
{
return
consMapper
.
selectBatchIds
(
ids
);
}
@Override
public
PageResult
<
ConsBackVO
>
getConsPage
(
ConsQueryVO
query
,
PageVO
page
)
{
IPage
<
ConsBackVO
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
long
total
=
consMapper
.
myConsCount
(
query
);
log
.
warn
(
I18nMessage
.
getLang
().
toString
());
int
start
=
(
page
.
getPage
()
-
1
)
*
page
.
getRows
();
int
size
=
page
.
getRows
();
List
<
ConsBackVO
>
consBackVOS
=
consMapper
.
myConsPageList
(
start
,
size
,
query
);
return
new
PageResult
<>(
consBackVOS
,
total
,
mpPage
.
getSize
(),
page
.
getPage
(),
(
total
+
mpPage
.
getSize
()
-
1
)
/
mpPage
.
getSize
());
}
@Override
public
List
<
ConsDO
>
getConsList
(
ConsQueryVO
query
)
{
return
consMapper
.
selectList
(
query
);
}
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/vo/cons/ConsBackVO.java
0 → 100644
View file @
818e3f4f
package
cn
.
iocoder
.
yudao
.
module
.
order
.
vo
.
cons
;
import
lombok.*
;
import
java.util.*
;
import
io.swagger.annotations.*
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
/**
* 集运包裹主 Response VO
* @author 系统管理员
*/
@Data
@ApiModel
(
"管理后台 - 集运包裹主 Response VO"
)
public
class
ConsBackVO
{
@ExcelProperty
(
""
)
@ApiModelProperty
(
value
=
""
,
required
=
true
)
private
Long
id
;
@ExcelProperty
(
""
)
@ApiModelProperty
(
value
=
""
)
private
Long
customerId
;
@ExcelProperty
(
"客户编号"
)
@ApiModelProperty
(
value
=
"客户编号"
)
private
String
customerNumber
;
@ExcelProperty
(
"客户名称"
)
@ApiModelProperty
(
value
=
"客户名称"
)
private
String
customerName
;
@ExcelProperty
(
"运输方式,来自字典的值"
)
@ApiModelProperty
(
value
=
"运输方式,来自字典的值"
)
private
Integer
transportId
;
@ExcelProperty
(
"订单ID,关联订单表"
)
@ApiModelProperty
(
value
=
"订单ID,关联订单表"
)
private
Long
orderId
;
@ExcelProperty
(
"平台ID,关联平台表数据,为后面系统对接预留字段"
)
@ApiModelProperty
(
value
=
"平台ID,关联平台表数据,为后面系统对接预留字段"
)
private
Long
platformId
;
@ExcelProperty
(
"平台订单号"
)
@ApiModelProperty
(
value
=
"平台订单号"
)
private
String
platformOrderSn
;
@ExcelProperty
(
"是否需要验货,0否,1是"
)
@ApiModelProperty
(
value
=
"是否需要验货,0否,1是"
)
private
Integer
needInspect
;
@ExcelProperty
(
"包裹状态,来自字典表,cons_status"
)
@ApiModelProperty
(
value
=
"包裹状态,来自字典表,cons_status"
)
private
Integer
status
;
@ExcelProperty
(
"快递公司ID,对应快递公司表"
)
@ApiModelProperty
(
value
=
"快递公司ID,对应快递公司表"
)
private
Long
expressId
;
@ExcelProperty
(
"快递单号"
)
@ApiModelProperty
(
value
=
"快递单号"
)
private
String
expressNo
;
@ExcelProperty
(
"仓库ID"
)
@ApiModelProperty
(
value
=
"仓库ID"
)
private
Long
wareId
;
@ExcelProperty
(
"货值"
)
@ApiModelProperty
(
value
=
"货值"
)
private
java
.
math
.
BigDecimal
worth
;
@ExcelProperty
(
"货值单位,默认为3,人民币"
)
@ApiModelProperty
(
value
=
"货值单位,默认为3,人民币"
)
private
Integer
worthCurrency
;
@ExcelProperty
(
"库域ID,关联ecw_warehouse_area表"
)
@ApiModelProperty
(
value
=
"库域ID,关联ecw_warehouse_area表"
)
private
Long
areaId
;
@ExcelProperty
(
"预计到仓时间"
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"预计到仓时间"
)
private
Date
watEtime
;
@ExcelProperty
(
"仓位ID,关联ecw_warehouse_area_position"
)
@ApiModelProperty
(
value
=
"仓位ID,关联ecw_warehouse_area_position"
)
private
Long
positionId
;
@ExcelProperty
(
""
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
""
)
private
Date
watTime
;
@ExcelProperty
(
"线路ID"
)
@ApiModelProperty
(
value
=
"线路ID"
)
private
Long
warehouseLineId
;
@ExcelProperty
(
"是否被签收,0未签收,1已签收"
)
@ApiModelProperty
(
value
=
"是否被签收,0未签收,1已签收"
,
required
=
true
)
private
Boolean
signed
;
@ExcelProperty
(
"签收时间"
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"签收时间"
)
private
Date
signedTime
;
@ExcelProperty
(
"签收备注"
)
@ApiModelProperty
(
value
=
"签收备注"
)
private
String
signedRemarks
;
@ExcelProperty
(
"数量"
)
@ApiModelProperty
(
value
=
"数量"
)
private
Integer
sumQuantity
;
@ExcelProperty
(
"区分包裹是由谁创建的,关联字典表 cons_op_source,可区分为后台创建、客户web端、客户app端、客户H5端、仓库创建及其他,默认为1 客户app端"
)
@ApiModelProperty
(
value
=
"区分包裹是由谁创建的,关联字典表 cons_op_source,可区分为后台创建、客户web端、客户app端、客户H5端、仓库创建及其他,默认为1 客户app端"
)
private
Integer
opSource
;
@ExcelProperty
(
"备注"
)
@ApiModelProperty
(
value
=
"备注"
)
private
String
remarks
;
@ExcelProperty
(
"签收人"
)
@ApiModelProperty
(
value
=
"签收人"
)
private
Long
signer
;
@ExcelProperty
(
""
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
""
)
private
Date
createTime
;
@ExcelProperty
(
"目的城市ID,关联ecw_region表ID"
)
@ApiModelProperty
(
value
=
"目的城市ID,关联ecw_region表ID"
)
private
Long
consigneeCityId
;
@ExcelProperty
(
"目的国ID,关联ecw_region表ID"
)
@ApiModelProperty
(
value
=
"目的国ID,关联ecw_region表ID"
)
private
Long
consigneeCountryId
;
@ExcelProperty
(
"目的仓ID,关联ecw_warehouse表ID"
)
@ApiModelProperty
(
value
=
"目的仓ID,关联ecw_warehouse表ID"
)
private
Long
consigneeWarehouseId
;
@ExcelProperty
(
""
)
@ApiModelProperty
(
value
=
""
)
private
String
consigneeAddress
;
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/vo/cons/ConsBaseVO.java
0 → 100644
View file @
818e3f4f
package
cn
.
iocoder
.
yudao
.
module
.
order
.
vo
.
cons
;
import
lombok.*
;
import
java.util.*
;
import
io.swagger.annotations.*
;
import
javax.validation.constraints.*
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
/**
* 集运包裹主 Base VO,提供给添加、修改、详细的子 VO 使用
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
*/
@Data
public
class
ConsBaseVO
{
@ApiModelProperty
(
value
=
""
)
private
Long
customerId
;
@ApiModelProperty
(
value
=
"客户编号"
)
private
String
customerNumber
;
@ApiModelProperty
(
value
=
"运输方式,来自字典的值"
)
private
Integer
transportId
;
@ApiModelProperty
(
value
=
"订单ID,关联订单表"
)
private
Long
orderId
;
@ApiModelProperty
(
value
=
"平台ID,关联平台表数据,为后面系统对接预留字段"
)
private
Long
platformId
;
@ApiModelProperty
(
value
=
"平台订单号"
)
private
String
platformOrderSn
;
@ApiModelProperty
(
value
=
"是否需要验货,0否,1是"
)
private
Integer
needInspect
;
@ApiModelProperty
(
value
=
"包裹状态,来自字典表,cons_status"
)
private
Integer
status
;
@ApiModelProperty
(
value
=
"快递公司ID,对应快递公司表"
)
private
Long
expressId
;
@ApiModelProperty
(
value
=
"快递单号"
)
private
String
expressNo
;
@ApiModelProperty
(
value
=
"仓库ID"
)
private
Long
wareId
;
@ApiModelProperty
(
value
=
"货值"
)
private
java
.
math
.
BigDecimal
worth
;
@ApiModelProperty
(
value
=
"货值单位,默认为3,人民币"
)
private
Integer
worthCurrency
;
@ApiModelProperty
(
value
=
"库域ID,关联ecw_warehouse_area表"
)
private
Long
areaId
;
@ApiModelProperty
(
value
=
"预计到仓时间"
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
private
Date
watEtime
;
@ApiModelProperty
(
value
=
"仓位ID,关联ecw_warehouse_area_position"
)
private
Long
positionId
;
@ApiModelProperty
(
value
=
""
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
private
Date
watTime
;
@ApiModelProperty
(
value
=
"线路ID"
)
private
Long
warehouseLineId
;
@ApiModelProperty
(
value
=
"是否被签收,0未签收,1已签收"
,
required
=
true
)
@NotNull
(
message
=
"是否被签收,0未签收,1已签收不能为空"
)
private
Boolean
signed
;
@ApiModelProperty
(
value
=
"签收时间"
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
private
Date
signedTime
;
@ApiModelProperty
(
value
=
"签收备注"
)
private
String
signedRemarks
;
@ApiModelProperty
(
value
=
"数量"
)
private
Integer
sumQuantity
;
@ApiModelProperty
(
value
=
"区分包裹是由谁创建的,关联字典表 cons_op_source,可区分为后台创建、客户web端、客户app端、客户H5端、仓库创建及其他,默认为1 客户app端"
)
private
Integer
opSource
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remarks
;
@ApiModelProperty
(
value
=
"签收人"
)
private
Long
signer
;
@ApiModelProperty
(
value
=
"目的城市ID,关联ecw_region表ID"
)
private
Long
consigneeCityId
;
@ApiModelProperty
(
value
=
"目的国ID,关联ecw_region表ID"
)
private
Long
consigneeCountryId
;
@ApiModelProperty
(
value
=
"目的仓ID,关联ecw_warehouse表ID"
)
private
Long
consigneeWarehouseId
;
@ApiModelProperty
(
value
=
""
)
private
String
consigneeAddress
;
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/vo/cons/ConsCreateReqVO.java
0 → 100644
View file @
818e3f4f
package
cn
.
iocoder
.
yudao
.
module
.
order
.
vo
.
cons
;
import
lombok.*
;
import
io.swagger.annotations.*
;
@Data
@ToString
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
"管理后台 - 集运包裹主创建 Request VO"
)
public
class
ConsCreateReqVO
extends
ConsBaseVO
{
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/vo/cons/ConsQueryVO.java
0 → 100644
View file @
818e3f4f
package
cn
.
iocoder
.
yudao
.
module
.
order
.
vo
.
cons
;
import
lombok.*
;
import
java.util.*
;
import
io.swagger.annotations.*
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
@Data
@ApiModel
(
"管理后台 - 集运包裹主查询 VO"
)
public
class
ConsQueryVO
{
@ApiModelProperty
(
value
=
""
)
private
Long
customerId
;
@ApiModelProperty
(
value
=
"客户编号"
)
private
String
customerNumber
;
@ApiModelProperty
(
value
=
"运输方式,来自字典的值"
)
private
Integer
transportId
;
@ApiModelProperty
(
value
=
"订单ID,关联订单表"
)
private
Long
orderId
;
@ApiModelProperty
(
value
=
"平台ID,关联平台表数据,为后面系统对接预留字段"
)
private
Long
platformId
;
@ApiModelProperty
(
value
=
"平台订单号"
)
private
String
platformOrderSn
;
@ApiModelProperty
(
value
=
"是否需要验货,0否,1是"
)
private
Integer
needInspect
;
@ApiModelProperty
(
value
=
"包裹状态,来自字典表,cons_status"
)
private
Integer
status
;
@ApiModelProperty
(
value
=
"快递公司ID,对应快递公司表"
)
private
Long
expressId
;
@ApiModelProperty
(
value
=
"快递单号"
)
private
String
expressNo
;
@ApiModelProperty
(
value
=
"仓库ID"
)
private
Long
wareId
;
@ApiModelProperty
(
value
=
"货值"
)
private
java
.
math
.
BigDecimal
worth
;
@ApiModelProperty
(
value
=
"货值单位,默认为3,人民币"
)
private
Integer
worthCurrency
;
@ApiModelProperty
(
value
=
"库域ID,关联ecw_warehouse_area表"
)
private
Long
areaId
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"开始预计到仓时间"
)
private
Date
beginWatEtime
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"结束预计到仓时间"
)
private
Date
endWatEtime
;
@ApiModelProperty
(
value
=
"仓位ID,关联ecw_warehouse_area_position"
)
private
Long
positionId
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"开始"
)
private
Date
beginWatTime
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"结束"
)
private
Date
endWatTime
;
@ApiModelProperty
(
value
=
"线路ID"
)
private
Long
warehouseLineId
;
@ApiModelProperty
(
value
=
"是否被签收,0未签收,1已签收"
)
private
Boolean
signed
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"开始签收时间"
)
private
Date
beginSignedTime
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"结束签收时间"
)
private
Date
endSignedTime
;
@ApiModelProperty
(
value
=
"签收备注"
)
private
String
signedRemarks
;
@ApiModelProperty
(
value
=
"数量"
)
private
Integer
sumQuantity
;
@ApiModelProperty
(
value
=
"区分包裹是由谁创建的,关联字典表 cons_op_source,可区分为后台创建、客户web端、客户app端、客户H5端、仓库创建及其他,默认为1 客户app端"
)
private
Integer
opSource
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remarks
;
@ApiModelProperty
(
value
=
"签收人"
)
private
Long
signer
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"开始"
)
private
Date
beginCreateTime
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"结束"
)
private
Date
endCreateTime
;
@ApiModelProperty
(
value
=
"目的城市ID,关联ecw_region表ID"
)
private
Long
consigneeCityId
;
@ApiModelProperty
(
value
=
"目的国ID,关联ecw_region表ID"
)
private
Long
consigneeCountryId
;
@ApiModelProperty
(
value
=
"目的仓ID,关联ecw_warehouse表ID"
)
private
Long
consigneeWarehouseId
;
@ApiModelProperty
(
value
=
""
)
private
String
consigneeAddress
;
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/vo/cons/ConsUpdateReqVO.java
0 → 100644
View file @
818e3f4f
package
cn
.
iocoder
.
yudao
.
module
.
order
.
vo
.
cons
;
import
lombok.*
;
import
java.util.*
;
import
io.swagger.annotations.*
;
import
javax.validation.constraints.*
;
@ApiModel
(
"管理后台 - 集运包裹主更新 Request VO"
)
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ToString
(
callSuper
=
true
)
public
class
ConsUpdateReqVO
extends
ConsBaseVO
{
@ApiModelProperty
(
value
=
""
,
required
=
true
)
@NotNull
(
message
=
"不能为空"
)
private
Long
id
;
}
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/admin/cons/ConsController.java
0 → 100644
View file @
818e3f4f
package
cn
.
iocoder
.
yudao
.
module
.
order
.
controller
.
admin
.
cons
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.module.order.convert.cons.ConsConvert
;
import
cn.iocoder.yudao.module.order.dal.dataobject.cons.ConsDO
;
import
cn.iocoder.yudao.module.order.service.cons.ConsService
;
import
cn.iocoder.yudao.module.order.vo.cons.ConsBackVO
;
import
cn.iocoder.yudao.module.order.vo.cons.ConsCreateReqVO
;
import
cn.iocoder.yudao.module.order.vo.cons.ConsQueryVO
;
import
cn.iocoder.yudao.module.order.vo.cons.ConsUpdateReqVO
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
io.swagger.annotations.*
;
import
javax.validation.*
;
import
javax.servlet.http.*
;
import
java.util.*
;
import
java.io.IOException
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
cn.iocoder.yudao.framework.excel.util.ExcelUtils
;
import
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
operatelog
.
core
.
enums
.
OperateTypeEnum
.*;
@Validated
@RestController
@Api
(
tags
=
"管理后台 - 集运包裹主"
)
@RequestMapping
(
"/ecw/cons"
)
public
class
ConsController
{
@Resource
private
ConsService
consService
;
@PostMapping
(
"/create"
)
@ApiOperation
(
"创建集运包裹主"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:cons:create')"
)
public
CommonResult
<
Long
>
createCons
(
@Valid
@RequestBody
ConsCreateReqVO
createReqVO
)
{
return
success
(
consService
.
createCons
(
createReqVO
));
}
@PutMapping
(
"/update"
)
@ApiOperation
(
"更新集运包裹主"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:cons:update')"
)
public
CommonResult
<
Boolean
>
updateCons
(
@Valid
@RequestBody
ConsUpdateReqVO
updateReqVO
)
{
consService
.
updateCons
(
updateReqVO
);
return
success
(
true
);
}
@DeleteMapping
(
"/delete"
)
@ApiOperation
(
"删除集运包裹主"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
@PreAuthorize
(
"@ss.hasPermission('ecw:cons:delete')"
)
public
CommonResult
<
Boolean
>
deleteCons
(
@RequestParam
(
"id"
)
Long
id
)
{
consService
.
deleteCons
(
id
);
return
success
(
true
);
}
@GetMapping
(
"/get"
)
@ApiOperation
(
"获得集运包裹主"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
@PreAuthorize
(
"@ss.hasPermission('ecw:cons:query')"
)
public
CommonResult
<
ConsBackVO
>
getCons
(
@RequestParam
(
"id"
)
Long
id
)
{
ConsDO
cons
=
consService
.
getCons
(
id
);
return
success
(
ConsConvert
.
INSTANCE
.
convert
(
cons
));
}
@GetMapping
(
"/list"
)
@ApiOperation
(
"获得集运包裹主列表"
)
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"编号列表"
,
required
=
true
,
example
=
"1024,2048"
,
dataTypeClass
=
List
.
class
)
@PreAuthorize
(
"@ss.hasPermission('ecw:cons:query')"
)
public
CommonResult
<
List
<
ConsBackVO
>>
getConsList
(
@RequestParam
(
"ids"
)
Collection
<
Long
>
ids
)
{
List
<
ConsDO
>
list
=
consService
.
getConsList
(
ids
);
return
success
(
ConsConvert
.
INSTANCE
.
convertList
(
list
));
}
@GetMapping
(
"/page"
)
@ApiOperation
(
"获得集运包裹主分页"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:cons:query')"
)
public
CommonResult
<
PageResult
<
ConsBackVO
>>
getConsPage
(
@Valid
ConsQueryVO
query
,
PageVO
page
)
{
PageResult
<
ConsBackVO
>
pageResult
=
consService
.
getConsPage
(
query
,
page
);
return
success
(
pageResult
);
}
@GetMapping
(
"/export-excel"
)
@ApiOperation
(
"导出集运包裹主 Excel"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:cons:export')"
)
@OperateLog
(
type
=
EXPORT
)
public
void
exportConsExcel
(
@Valid
ConsQueryVO
query
,
HttpServletResponse
response
)
throws
IOException
{
List
<
ConsDO
>
list
=
consService
.
getConsList
(
query
);
// 导出 Excel
List
<
ConsBackVO
>
datas
=
ConsConvert
.
INSTANCE
.
convertList
(
list
);
ExcelUtils
.
write
(
response
,
"集运包裹主.xls"
,
"数据"
,
ConsBackVO
.
class
,
datas
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment