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
53d520e3
Commit
53d520e3
authored
Nov 23, 2024
by
Smile
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:空运出货-取消审批
parent
9452b7e6
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
108 additions
and
7 deletions
+108
-7
OrderApprovalTypeResultEnum.java
...yudao/module/order/enums/OrderApprovalTypeResultEnum.java
+2
-0
AirShipmentStatusEnum.java
...er/yudao/module/shipment/enums/AirShipmentStatusEnum.java
+2
-1
BoxAirShipmentService.java
...hipment/service/boxAirShipment/BoxAirShipmentService.java
+6
-0
BoxAirShipmentServiceImpl.java
...ent/service/boxAirShipment/BoxAirShipmentServiceImpl.java
+80
-5
BoxAirShipmentUpdateReqVO.java
...shipment/vo/boxAirShipment/BoxAirShipmentUpdateReqVO.java
+4
-0
BoxAirShipmentController.java
...e/shipment/controller/admin/BoxAirShipmentController.java
+9
-0
messages_en.properties
yudao-server/src/main/resources/i18n/messages_en.properties
+3
-1
messages_zh.properties
yudao-server/src/main/resources/i18n/messages_zh.properties
+2
-0
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/enums/OrderApprovalTypeResultEnum.java
View file @
53d520e3
...
...
@@ -189,12 +189,14 @@ public enum OrderApprovalTypeResultEnum implements IntArrayValuable {
shipment_pass
(
54
,
2
,
"air.shipment.pass"
),
shipment_reject
(
54
,
3
,
"air.shipment.reject"
),
shipment_cancel
(
54
,
4
,
"air.shipment.cancel"
),
shipment_noAudit
(
54
,
5
,
"air.shipment.noAudit"
),
//出货反审
shipment_back_processing
(
55
,
1
,
"air.shipment.back.processing"
),
shipment_back_pass
(
55
,
2
,
"air.shipment.back.pass"
),
shipment_back_reject
(
55
,
3
,
"air.shipment.back.reject"
),
shipment_back_cancel
(
55
,
4
,
"air.shipment.back.cancel"
),
shipment_back_recall
(
55
,
5
,
"air.shipment.back.recall"
),
//撤销清关
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/enums/AirShipmentStatusEnum.java
View file @
53d520e3
...
...
@@ -12,7 +12,8 @@ public enum AirShipmentStatusEnum {
SHIPMENT_BACK_APPROVAL_ING
(
176
,
"出货反审中"
,
"SHIPMENT back approvaling"
),
SHIPMENT_BACK_APPROVAL_SUCCESS
(
177
,
"出货反审成功"
,
"SHIPMENT back approval success"
),
SHIPMENT_BACK_APPROVAL_FAIL
(
178
,
"出货反审失败"
,
"SHIPMENT back approval fail"
)
SHIPMENT_BACK_APPROVAL_FAIL
(
178
,
"出货反审失败"
,
"SHIPMENT back approval fail"
),
SHIPMENT_BACK_RECALL_SUCCESS
(
179
,
"出货撤回成功"
,
"SHIPMENT recall success"
),
;
AirShipmentStatusEnum
(
int
status
,
String
text
,
String
textEn
)
{
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/boxAirShipment/BoxAirShipmentService.java
View file @
53d520e3
...
...
@@ -28,6 +28,12 @@ public interface BoxAirShipmentService extends IService<BoxAirShipmentDO> {
*/
void
updateBoxAirShipment
(
@Valid
BoxAirShipmentUpdateReqVO
updateReqVO
);
/**
* 撤回空运出货
* @param updateReqVO 更新信息
*/
void
recallBoxAirShipment
(
@Valid
BoxAirShipmentUpdateReqVO
updateReqVO
);
/**
* 删除空运出货
* @param id 编号
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/boxAirShipment/BoxAirShipmentServiceImpl.java
View file @
53d520e3
...
...
@@ -7,6 +7,8 @@ import javax.annotation.Resource;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.module.bpm.enums.BpmProcessInstanceResultEnum
;
import
cn.iocoder.yudao.module.order.enums.OrderApprovalTypeResultEnum
;
import
cn.iocoder.yudao.module.order.enums.OrderStatusEnum
;
import
cn.iocoder.yudao.module.shipment.convert.BoxAirShipmentConvert
;
import
cn.iocoder.yudao.module.shipment.dal.dataobject.BoxAirShipmentDO
;
import
cn.iocoder.yudao.module.shipment.dal.dataobject.BoxApprovalDO
;
...
...
@@ -18,7 +20,6 @@ import cn.iocoder.yudao.module.shipment.service.boxApproval.BoxApprovalService;
import
cn.iocoder.yudao.module.shipment.service.boxOpLog.BoxOpLogService
;
import
cn.iocoder.yudao.module.shipment.vo.boxAirShipment.*
;
import
cn.iocoder.yudao.module.shipment.vo.boxApproval.BoxApprovalCreateReqVO
;
import
io.swagger.annotations.ApiModelProperty
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.validation.annotation.Validated
;
...
...
@@ -26,6 +27,7 @@ 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
;
import
static
cn
.
iocoder
.
yudao
.
module
.
order
.
enums
.
TargetLogEnum
.
WITHDRAWAL
;
import
static
cn
.
iocoder
.
yudao
.
module
.
shipment
.
enums
.
ErrorCodeConstants
.*;
/**
...
...
@@ -59,7 +61,7 @@ public class BoxAirShipmentServiceImpl extends AbstractService<BoxAirShipmentMap
BoxAirShipmentDO
boxAirShipment
=
BoxAirShipmentConvert
.
INSTANCE
.
convert
(
createReqVO
);
boxAirShipmentMapper
.
insert
(
boxAirShipment
);
// 返回
commitUpdate
(
createReqVO
.
getOperateType
(),
createReqVO
.
getShipmentId
()
,
createReqVO
.
getCopyUserId
()
);
commitUpdate
(
createReqVO
.
getOperateType
(),
createReqVO
.
getShipmentId
());
return
boxAirShipment
.
getId
();
}
...
...
@@ -69,11 +71,19 @@ public class BoxAirShipmentServiceImpl extends AbstractService<BoxAirShipmentMap
this
.
validateBoxAirShipmentExists
(
updateReqVO
.
getId
());
// 更新
BoxAirShipmentDO
updateObj
=
BoxAirShipmentConvert
.
INSTANCE
.
convert
(
updateReqVO
);
commitUpdate
(
updateReqVO
.
getOperateType
(),
updateReqVO
.
getShipmentId
()
,
updateReqVO
.
getCopyUserId
()
);
commitUpdate
(
updateReqVO
.
getOperateType
(),
updateReqVO
.
getShipmentId
());
boxAirShipmentMapper
.
updateById
(
updateObj
);
}
private
void
commitUpdate
(
Integer
operateType
,
Long
shipmentId
,
String
[]
copyUserId
)
{
@Override
public
void
recallBoxAirShipment
(
BoxAirShipmentUpdateReqVO
updateReqVO
)
{
// 校验存在
this
.
validateBoxAirShipmentExists
(
updateReqVO
.
getId
());
// 撤回
commitRecall
(
updateReqVO
.
getShipmentId
(),
updateReqVO
.
getRemark
());
}
private
void
commitUpdate
(
Integer
operateType
,
Long
shipmentId
)
{
BoxDO
boxDO
=
boxService
.
getBox
(
shipmentId
);
if
(
boxDO
==
null
)
{
throw
exception
(
BOX_NOT_EXISTS
);
...
...
@@ -83,12 +93,77 @@ public class BoxAirShipmentServiceImpl extends AbstractService<BoxAirShipmentMap
AirShipmentStatusEnum
shipment
=
AirShipmentStatusEnum
.
SHIPMENT
;
if
(
airShipmentStatus
!=
shipment
.
getStatus
())
{
createApproval
(
shipmentId
,
copyUserId
);
//出货审核
//createApproval(shipmentId, copyUserId);
createBoxShipment
(
boxDO
,
shipmentId
);
}
}
boxService
.
updateById
(
boxDO
);
}
private
void
commitRecall
(
Long
shipmentId
,
String
remark
)
{
BoxDO
boxDO
=
boxService
.
getBox
(
shipmentId
);
if
(
boxDO
==
null
)
{
throw
exception
(
BOX_NOT_EXISTS
);
}
int
airShipmentStatus
=
boxDO
.
getAirShipmentStatus
();
AirShipmentStatusEnum
shipment
=
AirShipmentStatusEnum
.
SHIPMENT
;
if
(
airShipmentStatus
==
shipment
.
getStatus
())
{
recallBoxShipment
(
boxDO
,
shipmentId
,
remark
);
}
}
//撤回空运出货
private
void
recallBoxShipment
(
BoxDO
boxDO
,
Long
shipmentId
,
String
remark
)
{
//返回成功,修改为预装中的状态
boxDO
.
setSlStatus
(
SlStatueEnum
.
NO_SETTLEMENT
.
getSlStatus
());
boxDO
.
setToWarehouseStatus
(
TWStatusEnum
.
NO_TO_WAREHOUSE
.
getTwStatus
());
boxDO
.
setClStatus
(
ClStatueEnum
.
NO_CLEARANCE
.
getClStatus
());
boxDO
.
setSapStatus
(
SapStatueEnum
.
NO_ARRIVE
.
getSapStatus
());
boxDO
.
setCdStatus
(
CdStatueEnum
.
NO_CLEARANCE_DOCUMENTS
.
getCdStatus
());
boxDO
.
setFlyStatus
(
FlyStatueEnum
.
NO_FLYING
.
getDtStatus
());
boxDO
.
setBlStatus
(
BlStatueEnum
.
NO_LADING_BILL
.
getBlStatus
());
boxDO
.
setDcStatus
(
DcStatueEnum
.
UNCUSTOMED
.
getDcStatus
());
boxDO
.
setCheckoutStatus
(
AirCheckoutStatusEnum
.
UNCHECKOUT
.
getStatus
());
boxDO
.
setAirShipmentStatus
(
AirShipmentStatusEnum
.
UNSHIPMENT
.
getStatus
());
boxDO
.
setShipmentStatusAir
(
BoxAirStatusEnum
.
TALLY_COMPLETE
.
getStatus
());
String
remarkResult
=
remark
!=
null
&&
!
remark
.
isEmpty
()
?
String
.
format
(
" 备注【%s】"
,
remark
)
:
""
;
String
text
=
AirShipmentStatusEnum
.
SHIPMENT_BACK_RECALL_SUCCESS
.
getText
()
+
remarkResult
;;
String
textEn
=
AirShipmentStatusEnum
.
SHIPMENT_BACK_RECALL_SUCCESS
.
getTextEn
()
+
remarkResult
;
//添加操作日志
boxOpLogService
.
createBoxOpLog
(
boxDO
.
getId
(),
AirShipmentStatusEnum
.
SHIPMENT_BACK_RECALL_SUCCESS
.
getStatus
(),
text
,
textEn
);
//反审后修改订单为出货状态
boxService
.
updateOrderStatusByShipmentIdAndTransportType
(
shipmentId
,
OrderStatusEnum
.
SHIPMENT
.
getValue
(),
null
,
BoxAirStatusEnum
.
TALLY_COMPLETE
.
getStatus
(),
0
,
OrderApprovalTypeResultEnum
.
typeAndResultOf
(
OrderApprovalTypeResultEnum
.
shipment_back_recall
.
getType
(),
5
).
getDesc
(),
Integer
.
parseInt
(
boxDO
.
getTransportType
()));
//反审后清除订单表的提单号
// boxService.clearOrderTidanNo(shipmentId, false);
//业绩变更
boxService
.
addTargetLog
(
shipmentId
,
WITHDRAWAL
,
new
Date
());
//删除已到港订单
boxService
.
deleteArrivalOrderByShipment
(
shipmentId
);
//删除已清关订单
boxService
.
deleteClearanceOrderByShipment
(
shipmentId
);
boxService
.
updateById
(
boxDO
);
}
//去掉审核直接出货
private
void
createBoxShipment
(
BoxDO
boxDO
,
Long
shipmentId
)
{
boxDO
.
setAirShipmentStatus
(
AirShipmentStatusEnum
.
SHIPMENT
.
getStatus
());
//修改为出货审核后生成提单号
//boxService.generateBillLadingNo(shipmentId, true, false);
//修改订单状态
boxService
.
updateOrderStatusByShipmentIdAndTransportType
(
shipmentId
,
OrderStatusEnum
.
SHIPMENT
.
getValue
(),
null
,
BoxAirStatusEnum
.
AIR_SHIPPED
.
getStatus
(),
0
,
OrderApprovalTypeResultEnum
.
typeAndResultOf
(
OrderApprovalTypeResultEnum
.
shipment_noAudit
.
getType
(),
5
).
getDesc
(),
Integer
.
parseInt
(
boxDO
.
getTransportType
()));
boxService
.
addOrderLogByShipmentId
(
shipmentId
,
OrderShipmentLog
.
AIR_OUT_SHIPMENT
,
""
);
}
private
void
createApproval
(
Long
shipmentId
,
String
[]
copyUserId
)
{
BoxApprovalCreateReqVO
boxApprovalCreateReqVO
=
new
BoxApprovalCreateReqVO
();
boxApprovalCreateReqVO
.
setShipmentId
(
shipmentId
);
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/vo/boxAirShipment/BoxAirShipmentUpdateReqVO.java
View file @
53d520e3
...
...
@@ -21,4 +21,8 @@ public class BoxAirShipmentUpdateReqVO extends BoxAirShipmentBaseVO {
@ApiModelProperty
(
value
=
"抄送人userId"
)
String
[]
copyUserId
;
@ApiModelProperty
(
value
=
"备注"
)
String
remark
;
}
yudao-module-shipment/yudao-module-shipment-rest/src/main/java/cn/iocoder/yudao/module/shipment/controller/admin/BoxAirShipmentController.java
View file @
53d520e3
...
...
@@ -49,6 +49,15 @@ public class BoxAirShipmentController {
return
success
(
true
);
}
@PutMapping
(
"/recall"
)
@ApiOperation
(
"撤回空运出货"
)
@Idempotent
(
timeout
=
5
)
//@PreAuthorize("@ss.hasPermission('ecw:box-air-shipment:update')")
public
CommonResult
<
Boolean
>
recallBoxAirShipment
(
@Valid
@RequestBody
BoxAirShipmentUpdateReqVO
updateReqVO
)
{
boxAirShipmentService
.
recallBoxAirShipment
(
updateReqVO
);
return
success
(
true
);
}
@DeleteMapping
(
"/delete"
)
@ApiOperation
(
"删除空运出货"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
...
...
yudao-server/src/main/resources/i18n/messages_en.properties
View file @
53d520e3
...
...
@@ -928,6 +928,7 @@ air.shipment.processing=air shipment processing
air.shipment.pass
=
air shipment pass
air.shipment.reject
=
air shipment reject
air.shipment.cancel
=
air shipment cancel
air.shipment.noAudit
=
\u
5DF2
\u
51FA
\u
8D27
order.status.not.same
=
order status not same
box.approval.exist
=
There is a process in the approval process for shipment
...
...
@@ -935,6 +936,7 @@ air.shipment.back.processing=air shipment back processing
air.shipment.back.pass
=
air shipment back pass
air.shipment.back.reject
=
air shipment back reject
air.shipment.back.cancel
=
air shipment back cancel
air.shipment.back.recall
=
\u
51FA
\u
8D27
\u
64A4
\u
56DE
shipment.air.status.wait.settled
=
wait settled
shipment.air.status.settling
=
settling
...
...
yudao-server/src/main/resources/i18n/messages_zh.properties
View file @
53d520e3
...
...
@@ -930,6 +930,7 @@ air.shipment.processing=\u51FA\u8D27\u5BA1\u6838\u4E2D
air.shipment.pass
=
\u
51FA
\u
8D27
\u
5BA1
\u6838\u
901A
\u
8FC7
air.shipment.reject
=
\u
51FA
\u
8D27
\u
5BA1
\u6838\u5931\u
8D25
air.shipment.cancel
=
\u
51FA
\u
8D27
\u
5BA1
\u6838\u
53D6
\u
6D88
air.shipment.noAudit
=
\u
5DF2
\u
51FA
\u
8D27
consignee.phone.is.not.china
=
\u6536\u
8D27
\u
4EBA
\u
624B
\u
673A
\u
53F7
\u7801\u
4E0D
\u
80FD
\u
662F
\u
4E2D
\u
56FD
\u
53F7
\u7801
order.no.or.bill.lading.no.not.null
=
\u
8BA2
\u5355\u
53F7
\u6216\u
63D0
\u5355\u
53F7
\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
order.status.not.same
=
\u
8BA2
\u5355\u
72B6
\u6001\u
4E0D
\u
4E00
\u
81F4
...
...
@@ -938,6 +939,7 @@ box.approval.exist=\u51FA\u8D27\u5B58\u5728\u5BA1\u6279\u4E2D\u7684\u6D41\u7A0B
air.shipment.back.processing
=
\u
51FA
\u
8D27
\u
53CD
\u
5BA1
\u
4E2D
air.shipment.back.pass
=
\u
51FA
\u
8D27
\u
53CD
\u
5BA1
\u
901A
\u
8FC7
air.shipment.back.recall
=
\u
51FA
\u
8D27
\u
64A4
\u
56DE
air.shipment.back.reject
=
\u
51FA
\u
8D27
\u
53CD
\u
5BA1
\u5931\u
8D25
air.shipment.back.cancel
=
\u
51FA
\u
8D27
\u
53CD
\u
5BA1
\u
53D6
\u
6D88
shipment.air.status.wait.settled
=
\u
5F85
\u
7ED3
\u
7B97
...
...
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