Commit 5680fecb authored by lanbaoming's avatar lanbaoming

2024-06-05

parent 96e27c3b
...@@ -18,13 +18,15 @@ public class BpmOrderRevokeSplitOrderResultListener extends BpmProcessInstanceRe ...@@ -18,13 +18,15 @@ public class BpmOrderRevokeSplitOrderResultListener extends BpmProcessInstanceRe
OrderSplitService orderSplitService; OrderSplitService orderSplitService;
@Override @Override
protected String getProcessDefinitionKey() { protected String getProcessDefinitionKey() {
return WorkFlowEmus.REVOKE_SPLIT_ORDER.getKey(); return WorkFlowEmus.REVOKE_SPLIT_ORDER.getKey();
} }
@Override @Override
protected void onEvent(BpmProcessInstanceResultEvent event) { protected void onEvent(BpmProcessInstanceResultEvent event) {
log.info("-------------------撤销拆单审核回调-------------------------{},{}", event.getBusinessKey(), event.getResult()); log.info("-------------------撤销拆单审核回调-------------------------{},{}", event.getBusinessKey(), event.getResult());
orderSplitService.revokeSplitApplyCallback(event.getBusinessKey(), event.getResult()); orderSplitService.revokeSplitApplyCallback(event.getBusinessKey(),
event.getResult());
} }
} }
...@@ -46,6 +46,7 @@ public interface OrderMutualMapper extends AbstractMapper<OrderMutualDO> { ...@@ -46,6 +46,7 @@ public interface OrderMutualMapper extends AbstractMapper<OrderMutualDO> {
return null; return null;
} }
/* lanbm 2024-06-05 修改BUG
@Select("update ecw_order_mutual set deleted=0 where creator=#{query.creator} and create_time=#{query.createTime} " + @Select("update ecw_order_mutual set deleted=0 where creator=#{query.creator} and create_time=#{query.createTime} " +
"and updater=#{query.updater} and update_time=#{query.updateTime} and mutual_order_id=#{query.mutualOrderId}") "and updater=#{query.updater} and update_time=#{query.updateTime} and mutual_order_id=#{query.mutualOrderId}")
void updateMutualBackByRelatId(OrderMutualDO item); void updateMutualBackByRelatId(OrderMutualDO item);
...@@ -53,4 +54,13 @@ public interface OrderMutualMapper extends AbstractMapper<OrderMutualDO> { ...@@ -53,4 +54,13 @@ public interface OrderMutualMapper extends AbstractMapper<OrderMutualDO> {
@Select("update ecw_order_mutual set deleted=0 where creator=#{query.creator} and create_time=#{query.createTime} " + @Select("update ecw_order_mutual set deleted=0 where creator=#{query.creator} and create_time=#{query.createTime} " +
"and updater=#{query.updater} and update_time=#{query.updateTime} and order_id=#{query.orderId}") "and updater=#{query.updater} and update_time=#{query.updateTime} and order_id=#{query.orderId}")
void updateMutualBackByOrderId(OrderMutualDO item); void updateMutualBackByOrderId(OrderMutualDO item);
*/
@Select("update ecw_order_mutual set deleted=0 where creator=#{creator} and create_time=#{createTime} " +
"and updater=#{updater} and update_time=#{updateTime} and mutual_order_id=#{mutualOrderId}")
void updateMutualBackByRelatId(OrderMutualDO item);
@Select("update ecw_order_mutual set deleted=0 where creator=#{creator} and create_time=#{createTime} " +
"and updater=#{updater} and update_time=#{updateTime} and order_id=#{orderId}")
void updateMutualBackByOrderId(OrderMutualDO item);
} }
...@@ -97,9 +97,11 @@ public class OrderMutualServiceImpl extends AbstractService<OrderMutualMapper, O ...@@ -97,9 +97,11 @@ public class OrderMutualServiceImpl extends AbstractService<OrderMutualMapper, O
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void dealMutualByOrderId(Long orderId,List<Long> splitOrderIds,int type) { public void dealMutualByOrderId(Long orderId,
List<Long> splitOrderIds,int type) {
if (type == 1) { if (type == 1) {
List<OrderMutualDO> orderMutualDOS = mutualMapper.selectList(new LambdaQueryWrapperX<OrderMutualDO>() List<OrderMutualDO> orderMutualDOS =
mutualMapper.selectList(new LambdaQueryWrapperX<OrderMutualDO>()
.and(i -> i.eq(OrderMutualDO::getMutualOrderId, orderId) .and(i -> i.eq(OrderMutualDO::getMutualOrderId, orderId)
.or() .or()
.eq(OrderMutualDO::getOrderId, orderId) .eq(OrderMutualDO::getOrderId, orderId)
...@@ -125,8 +127,15 @@ public class OrderMutualServiceImpl extends AbstractService<OrderMutualMapper, O ...@@ -125,8 +127,15 @@ public class OrderMutualServiceImpl extends AbstractService<OrderMutualMapper, O
} else if (type == 2) { } else if (type == 2) {
if (CollectionUtil.isNotEmpty(splitOrderIds)) { if (CollectionUtil.isNotEmpty(splitOrderIds)) {
//删除拆单后的关联订单,不管后面有没有新增关联,都删除才对 //删除拆单后的关联订单,不管后面有没有新增关联,都删除才对
List<OrderMutualDO> orderGuanlianDOS = mutualMapper.selectList(new LambdaQueryWrapperX<OrderMutualDO>().and(i -> i.in(OrderMutualDO::getOrderId, splitOrderIds).or().in(OrderMutualDO::getMutualOrderId, splitOrderIds))); List<OrderMutualDO> orderGuanlianDOS =
mutualMapper.selectList(
new LambdaQueryWrapperX<OrderMutualDO>().
and(i -> i.in(OrderMutualDO::getOrderId,
splitOrderIds).or().
in(OrderMutualDO::getMutualOrderId,
splitOrderIds)));
orderGuanlianDOS.stream().forEach(item -> { orderGuanlianDOS.stream().forEach(item -> {
if (splitOrderIds.contains(item.getOrderId())) { if (splitOrderIds.contains(item.getOrderId())) {
mutualMapper.updateMutualBackByRelatId(item); mutualMapper.updateMutualBackByRelatId(item);
} else if (splitOrderIds.contains(item.getMutualOrderId())) { } else if (splitOrderIds.contains(item.getMutualOrderId())) {
......
...@@ -1124,7 +1124,8 @@ public class OrderQueryServiceImpl implements OrderQueryService { ...@@ -1124,7 +1124,8 @@ public class OrderQueryServiceImpl implements OrderQueryService {
log.warn(I18nMessage.getLang().toString()); log.warn(I18nMessage.getLang().toString());
int start = (page.getPage() - 1) * page.getRows(); int start = (page.getPage() - 1) * page.getRows();
int size = page.getRows(); int size = page.getRows();
List<OrderBackPageVO> list = orderMapper.adminCargoControlOrderList(start, size, query); List<OrderBackPageVO> list =
orderMapper.adminCargoControlOrderList(start, size, query);
return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize()); return new PageResult<>(list, total, mpPage.getSize(), page.getPage(), (total + mpPage.getSize() - 1) / mpPage.getSize());
} }
......
...@@ -6069,11 +6069,15 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -6069,11 +6069,15 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
} }
@Override @Override
public void deleteOrderByParentOrderId(Long parentOrderId, List<OrderBackInfoDto> orderBackInfoDtoList) { public void deleteOrderByParentOrderId(Long parentOrderId,
List<OrderBackInfoDto> orderBackInfoDtoList) {
// 置空母订单的拆单时间 // 置空母订单的拆单时间
this.update(new LambdaUpdateWrapper<OrderDO>().set(OrderDO::getSplitTime, null).eq(OrderDO::getOrderId, parentOrderId)); this.update(new LambdaUpdateWrapper<OrderDO>().set(OrderDO::getSplitTime,
null).eq(OrderDO::getOrderId, parentOrderId));
// 查询相关子订单信息,并且删除子订单相关的记录,避免重新撤销拆单后再次拆单的数据重复 // 查询相关子订单信息,并且删除子订单相关的记录,避免重新撤销拆单后再次拆单的数据重复
List<OrderDO> orderDOList = orderMapper.selectList(new LambdaQueryWrapper<OrderDO>().eq(OrderDO::getParentOrderId, parentOrderId)); List<OrderDO> orderDOList =
orderMapper.selectList(new LambdaQueryWrapper<OrderDO>().eq(OrderDO::getParentOrderId, parentOrderId));
if (CollectionUtil.isNotEmpty(orderBackInfoDtoList)) { if (CollectionUtil.isNotEmpty(orderBackInfoDtoList)) {
List<Long> orderIds = new ArrayList<>(); List<Long> orderIds = new ArrayList<>();
for (OrderBackInfoDto splitOrder : orderBackInfoDtoList) { for (OrderBackInfoDto splitOrder : orderBackInfoDtoList) {
...@@ -6103,7 +6107,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -6103,7 +6107,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// 处理关联关系 // 处理关联关系
orderGuanlianService.dealGuanlianByOrderId(parentOrderId, orderIds, 2); orderGuanlianService.dealGuanlianByOrderId(parentOrderId, orderIds, 2);
// 处理互斥关系 // 处理互斥关系
orderMutualService.dealMutualByOrderId(parentOrderId, orderIds, 2); orderMutualService.dealMutualByOrderId(parentOrderId,
orderIds, 2);
// 物理删除订单 ,在所有业务执行完成后进行删除 // 物理删除订单 ,在所有业务执行完成后进行删除
orderMapper.remove(orderIds); orderMapper.remove(orderIds);
} }
......
...@@ -270,7 +270,8 @@ public class OrderCargoControlPickServiceImpl extends AbstractService<OrderCargo ...@@ -270,7 +270,8 @@ public class OrderCargoControlPickServiceImpl extends AbstractService<OrderCargo
// 修改订单控货状态 // 修改订单控货状态
String msg = ""; String msg = "";
if (Objects.equals(orderCargoControlPick.getControlNum(), orderCargoControlPick.getPickNum())) { if (Objects.equals(orderCargoControlPick.getControlNum(),
orderCargoControlPick.getPickNum())) {
// 已放完货 // 已放完货
orderDO.setCargoControlStatus(1); orderDO.setCargoControlStatus(1);
msg = String.format("订单放货%s箱, 放货方式:%s, 已放完货, 收货人姓名%s,电话+%s", orderCargoControlPick.getPickNum(), isPasswordPick ? "密码放货" : "验证码放货", msg = String.format("订单放货%s箱, 放货方式:%s, 已放完货, 收货人姓名%s,电话+%s", orderCargoControlPick.getPickNum(), isPasswordPick ? "密码放货" : "验证码放货",
......
...@@ -1475,17 +1475,23 @@ public class OrderSplitServiceImpl extends AbstractService<OrderSplitMapper, Ord ...@@ -1475,17 +1475,23 @@ public class OrderSplitServiceImpl extends AbstractService<OrderSplitMapper, Ord
@Override @Override
public void revokeSplitApplyCallback(String approvalId, Integer result) { public void revokeSplitApplyCallback(String approvalId, Integer result) {
OrderApprovalDO orderApprovalDO = orderApprovalService.getById(approvalId); OrderApprovalDO orderApprovalDO =
orderApprovalService.getById(approvalId);
//detail转对象 //detail转对象
OrderSplitRevokeApplyDetailDto orderSplitRevokeApplyDetailDto = JSON.parseObject(orderApprovalDO.getDetails(), OrderSplitRevokeApplyDetailDto.class); OrderSplitRevokeApplyDetailDto orderSplitRevokeApplyDetailDto =
JSON.parseObject(orderApprovalDO.getDetails(),
OrderSplitRevokeApplyDetailDto.class);
OrderBackInfoDto parentOrder = orderSplitRevokeApplyDetailDto.getParentOrder(); OrderBackInfoDto parentOrder =
orderSplitRevokeApplyDetailDto.getParentOrder();
List<OrderBackInfoDto> childrenOrderList = orderSplitRevokeApplyDetailDto.getChildrenOrderList(); List<OrderBackInfoDto> childrenOrderList =
orderSplitRevokeApplyDetailDto.getChildrenOrderList();
//更新审核单状态 //更新审核单状态
orderApprovalService.callbackUpdate(orderApprovalDO, orderApprovalDO.getFormId(), result); orderApprovalService.callbackUpdate(orderApprovalDO,
orderApprovalDO.getFormId(), result);
String processingResults = orderApprovalDO.getProcessingResults(); String processingResults = orderApprovalDO.getProcessingResults();
if (ApprovalResultStatusEnum.reject.getValue().equals(result)) { if (ApprovalResultStatusEnum.reject.getValue().equals(result)) {
...@@ -1517,20 +1523,30 @@ public class OrderSplitServiceImpl extends AbstractService<OrderSplitMapper, Ord ...@@ -1517,20 +1523,30 @@ public class OrderSplitServiceImpl extends AbstractService<OrderSplitMapper, Ord
} else if (ApprovalResultStatusEnum.pass.getValue().equals(result)) { } else if (ApprovalResultStatusEnum.pass.getValue().equals(result)) {
OrderDO orderDO = orderService.getById(parentOrder.getOrderId()); OrderDO orderDO = orderService.getById(parentOrder.getOrderId());
// 记录撤销拆单成功的动态日志 // 记录撤销拆单成功的动态日志
orderBusinessService.addOrderTimeLog(orderDO.getStatus(), orderDO, 10); orderBusinessService.addOrderTimeLog(orderDO.getStatus(),
orderDO, 10);
// 所有子订单的订单id // 所有子订单的订单id
// List<Long> orderIds = childrenOrderList.stream().map(OrderBackInfoDto::getOrderId).collect(Collectors.toList()); // List<Long> orderIds = childrenOrderList.stream().map(OrderBackInfoDto::getOrderId).collect(Collectors.toList());
// 校验标签箱号范围值 // 校验标签箱号范围值
// this.checkLabel(orderDO, orderIds); // this.checkLabel(orderDO, orderIds);
// 补全原单的标签箱号记录 // 补全原单的标签箱号记录
orderLabelService.updateRevokeSplitOrderLabel(orderDO, childrenOrderList); orderLabelService.updateRevokeSplitOrderLabel(orderDO,
childrenOrderList);
//更新订单状态 入仓-撤销拆单-已通过 ,注:避免原单是出货阶段进行的拆单,撤销拆单需要重置出货状态,出货阶段是不允许撤销拆单的 //更新订单状态 入仓-撤销拆单-已通过 ,注:避免原单是出货阶段进行的拆单,撤销拆单需要重置出货状态,出货阶段是不允许撤销拆单的
orderService.updateStatus(parentOrder.getOrderId(), null, OrderStatusEnum.IN_WAREHOUSE.getValue(), null, OrderWarehouseInStatusEnum.warehouse_finished.getValue(), 0, orderService.updateStatus(parentOrder.getOrderId(),
0, OrderApprovalTypeResultEnum.typeAndResultOf(orderApprovalDO.getType(), result).getDesc(), null, false); null, OrderStatusEnum.IN_WAREHOUSE.getValue(),
null,
OrderWarehouseInStatusEnum.warehouse_finished.getValue(),
0,
0,
OrderApprovalTypeResultEnum.typeAndResultOf(orderApprovalDO.getType(),
result).getDesc(),
null,
false);
// 撤销拆单将母订单的动态重置 // 撤销拆单将母订单的动态重置
if (parentOrder.getTransportId() == 1){ if (parentOrder.getTransportId() == 1) {
orderTimeService.preReverseReviewDeleteOrderTime(parentOrder.getOrderId()); orderTimeService.preReverseReviewDeleteOrderTime(parentOrder.getOrderId());
}else if (parentOrder.getTransportId() == 3){ } else if (parentOrder.getTransportId() == 3) {
orderTimeService.sortingReverseReviewDeleteOrderTime(parentOrder.getOrderId()); orderTimeService.sortingReverseReviewDeleteOrderTime(parentOrder.getOrderId());
} }
//纪录仓库操作 //纪录仓库操作
...@@ -1547,7 +1563,8 @@ public class OrderSplitServiceImpl extends AbstractService<OrderSplitMapper, Ord ...@@ -1547,7 +1563,8 @@ public class OrderSplitServiceImpl extends AbstractService<OrderSplitMapper, Ord
splitItemMapper.deleteByOrderId(parentOrder.getOrderId()); splitItemMapper.deleteByOrderId(parentOrder.getOrderId());
splitMapper.deleteByOrderId(parentOrder.getOrderId()); splitMapper.deleteByOrderId(parentOrder.getOrderId());
// 删除已撤销的拆单 // 删除已撤销的拆单
orderService.deleteOrderByParentOrderId(parentOrder.getOrderId(), childrenOrderList); orderService.deleteOrderByParentOrderId(parentOrder.getOrderId(),
childrenOrderList);
} }
} }
......
...@@ -86,11 +86,15 @@ public class OrderCargoControlController { ...@@ -86,11 +86,15 @@ public class OrderCargoControlController {
// } // }
/*
控货订单列表 lanbm 2024-06-05 添加注释
*/
@GetMapping("/cargo/control/order") @GetMapping("/cargo/control/order")
@ApiOperation("获得控货订单列表查询订单分页") @ApiOperation("获得控货订单列表查询订单分页")
public CommonResult<PageResult<OrderBackPageVO>> cargoControlOrderPage(OrderQueryVO query, PageVO page) { public CommonResult<PageResult<OrderBackPageVO>> cargoControlOrderPage(OrderQueryVO query, PageVO page) {
query.setUserType(UserTypeEnum.ADMIN.getValue()); query.setUserType(UserTypeEnum.ADMIN.getValue());
PageResult<OrderBackPageVO> pageResult = orderCargoControlService.orderPage(query, page); PageResult<OrderBackPageVO> pageResult =
orderCargoControlService.orderPage(query, page);
return success(pageResult); return success(pageResult);
} }
......
...@@ -183,7 +183,7 @@ public class BoxController { ...@@ -183,7 +183,7 @@ public class BoxController {
@GetMapping("/page") @GetMapping("/page")
@ApiOperation("获得出货分页, use this") @ApiOperation("获得出货分页, use this")
// @PreAuthorize("@ss.hasPermission({'shipment:box:query', 'shipment:box:query:air'})") //@PreAuthorize("@ss.hasPermission({'shipment:box:query', 'shipment:box:query:air'})")
public CommonResult<PageResult<BoxBackVO>> getBoxPage(@Valid BoxQueryVO query, PageVO page) { public CommonResult<PageResult<BoxBackVO>> getBoxPage(@Valid BoxQueryVO query, PageVO page) {
//lanbm 2024-05-13 处理问题添加注释 //lanbm 2024-05-13 处理问题添加注释
return success(boxService.getBoxPage(query, page)); return success(boxService.getBoxPage(query, page));
......
...@@ -313,10 +313,17 @@ public class BoxPreloadGoodsController { ...@@ -313,10 +313,17 @@ public class BoxPreloadGoodsController {
return success(""); return success("");
} }
/*
海运已装单下载 lanbm 2024-06-05 修改模板
添加注释
*/
@GetMapping("/downloadLoadGoodsList") @GetMapping("/downloadLoadGoodsList")
@ApiOperation("下载已装单") @ApiOperation("下载已装单")
@ApiImplicitParam(name = "shipmentId", value = "出货单ID", required = true, example = "20", dataTypeClass = Long.class) @ApiImplicitParam(name = "shipmentId", value = "出货单ID", required = true, example = "20", dataTypeClass = Long.class)
public CommonResult<String> downloadLoadGoodsList(@RequestParam("shipmentId") Long shipmentId, HttpServletResponse response) throws Exception { public CommonResult<String> downloadLoadGoodsList(
@RequestParam("shipmentId") Long shipmentId,
HttpServletResponse response) throws Exception {
BoxDO box = boxService.getBox(shipmentId); BoxDO box = boxService.getBox(shipmentId);
FileMakeReqDTO reqDTO = new FileMakeReqDTO(); FileMakeReqDTO reqDTO = new FileMakeReqDTO();
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
......
package cn.iocoder.yudao.module.wealth.vo.receiptItem; package cn.iocoder.yudao.module.wealth.vo.receiptItem;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*; import lombok.*;
import java.util.*; import java.util.*;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/** /**
...@@ -52,7 +55,7 @@ public class ReceiptItemBackVO { ...@@ -52,7 +55,7 @@ public class ReceiptItemBackVO {
private Long currencyId; private Long currencyId;
@ExcelProperty("创建时间") @ExcelProperty("创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
private Date createTime; private Date createTime;
...@@ -61,7 +64,7 @@ public class ReceiptItemBackVO { ...@@ -61,7 +64,7 @@ public class ReceiptItemBackVO {
private String rate; private String rate;
@ExcelProperty("实收日期") @ExcelProperty("实收日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
@ApiModelProperty(value = "实收日期") @ApiModelProperty(value = "实收日期")
private Date amountDate; private Date amountDate;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment