Browse Source

Merge remote-tracking branch 'origin/dev' into dev

fix-sign
zhaoqiaobo 5 months ago
parent
commit
7adda617d6
  1. 4
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesWorkOrderVO.java
  2. 30
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/WarehouseParcelListEntity.java
  3. 7
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/WarehouseParcelListVO.java
  4. 2
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseWaybillVO.java
  5. 137
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  6. 15
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java
  7. 9
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.java
  8. 106
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  9. 12
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java
  10. 118
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  11. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTrayMapper.xml
  12. 12
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/wrapper/WarehouseParcelListWrapper.java
  13. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  14. 107
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  15. 18
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  16. 6
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

4
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesWorkOrderVO.java

@ -36,6 +36,10 @@ public class AftersalesWorkOrderVO extends AftersalesWorkOrderEntity {
* 工单名称 * 工单名称
*/ */
private String workOrderTypeName; private String workOrderTypeName;
/**
* 工单名称
*/
private String workOrderStatusName;
/** /**
* 提货名称 * 提货名称

30
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/WarehouseParcelListEntity.java

@ -46,36 +46,8 @@ import java.util.Date;
* @since 2023-06-13 * @since 2023-06-13
*/ */
@Data @Data
@TableName("logpm_warehouse_parcel_list") public class WarehouseParcelListEntity {
@ApiModel(value = "WarehouseParcelList对象", description = "在库订单包件清单")
@EqualsAndHashCode(callSuper = true)
public class WarehouseParcelListEntity extends TenantEntity {
/**
* 预留1
*/
@ApiModelProperty(value = "预留1")
private String reserve1;
/**
* 预留2
*/
@ApiModelProperty(value = "预留2")
private String reserve2;
/**
* 预留3
*/
@ApiModelProperty(value = "预留3")
private String reserve3;
/**
* 预留4
*/
@ApiModelProperty(value = "预留4")
private String reserve4;
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
/** /**
* 订单自编号 * 订单自编号
*/ */

7
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/WarehouseParcelListVO.java

@ -104,4 +104,11 @@ public class WarehouseParcelListVO extends WarehouseParcelListEntity {
*/ */
private String positionCode; private String positionCode;
/**
* 是否窜货 0否 1是
*/
private Integer isFleeing;
} }

2
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseWaybillVO.java

@ -54,4 +54,6 @@ public class WarehouseWaybillVO extends WarehouseWaybillEntity {
private BigDecimal totalFee; private BigDecimal totalFee;
private String chargeTypes; private String chargeTypes;
private Integer zeroEditStatus;
} }

137
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java

@ -16,14 +16,19 @@
*/ */
package com.logpm.aftersales.controller; package com.logpm.aftersales.controller;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.aftersales.dto.AftersalesWorkOrderDTO; import com.logpm.aftersales.dto.AftersalesWorkOrderDTO;
import com.logpm.aftersales.dto.AftersalesWorkOrderListExcelDTO; import com.logpm.aftersales.dto.AftersalesWorkOrderListExcelDTO;
import com.logpm.aftersales.entity.AftersalesAppealEntity; import com.logpm.aftersales.entity.*;
import com.logpm.aftersales.entity.AftersalesSettlementEntity;
import com.logpm.aftersales.excel.AftersalesWorkOrderImporter; import com.logpm.aftersales.excel.AftersalesWorkOrderImporter;
import com.logpm.aftersales.service.IAftersaleSurveyRecordService;
import com.logpm.aftersales.service.IAftersalesCompletionRecordService; import com.logpm.aftersales.service.IAftersalesCompletionRecordService;
import com.logpm.aftersales.service.IAftersalesPersonResponsibleService;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -31,6 +36,8 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import javax.servlet.ServletOutputStream;
import javax.validation.Valid; import javax.validation.Valid;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -43,7 +50,6 @@ import org.springblade.core.tool.utils.Func;
import org.springblade.system.entity.User; import org.springblade.system.entity.User;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.aftersales.entity.AftersalesWorkOrderEntity;
import com.logpm.aftersales.vo.AftersalesWorkOrderVO; import com.logpm.aftersales.vo.AftersalesWorkOrderVO;
import com.logpm.aftersales.excel.AftersalesWorkOrderExcel; import com.logpm.aftersales.excel.AftersalesWorkOrderExcel;
import com.logpm.aftersales.wrapper.AftersalesWorkOrderWrapper; import com.logpm.aftersales.wrapper.AftersalesWorkOrderWrapper;
@ -54,7 +60,11 @@ import org.springblade.core.excel.util.ExcelUtil;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import springfox.documentation.annotations.ApiIgnore; import springfox.documentation.annotations.ApiIgnore;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
/** /**
@ -73,6 +83,8 @@ public class AftersalesWorkOrderController extends BladeController {
private final IAftersalesWorkOrderService aftersalesWorkOrderService; private final IAftersalesWorkOrderService aftersalesWorkOrderService;
private final IBasicdataWarehouseClient warehouseClient; private final IBasicdataWarehouseClient warehouseClient;
private final IAftersalesCompletionRecordService aftersalesCompletionRecordService; private final IAftersalesCompletionRecordService aftersalesCompletionRecordService;
private final IAftersalesPersonResponsibleService aftersalesPersonResponsibleService;
private final IAftersaleSurveyRecordService aftersaleSurveyRecordService;
/** /**
* 客服异常工单 详情 * 客服异常工单 详情
@ -719,6 +731,125 @@ public class AftersalesWorkOrderController extends BladeController {
/**
* 导出数据
*
*/
@GetMapping("/exportWorkOrder1")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入aftersalesWorkOrder")
public void newExportWorkOrder(@ApiIgnore @RequestParam Map<String, Object> aftersalesWorkOrder, BladeUser bladeUser, HttpServletResponse response) {
List<List<String>> basicTitle = aftersalesWorkOrderService.basicTitleBuild();
//查询数据
List<AftersalesWorkOrderVO> exportData = aftersalesWorkOrderService.getBasicExportData(aftersalesWorkOrder);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if (!exportData.isEmpty()) {
List<List<String>> dataList = new ArrayList<>();
for (AftersalesWorkOrderVO exportDatum : exportData) {
List<String> data = new ArrayList<>();
data.add(0,exportDatum.getWorkOrderTypeName());
data.add(1,exportDatum.getDiscoveryNodeName());
data.add(2,exportDatum.getWarehouseName());
data.add(3,exportDatum.getWorkOrderNumber());
data.add(4,exportDatum.getWaybillNumber());
data.add(5,exportDatum.getOrderCode());
data.add(6,exportDatum.getPackageCode());
data.add(7,exportDatum.getBrandName());
data.add(8,exportDatum.getWaybillMall());
data.add(9,exportDatum.getFirst());
data.add(10,exportDatum.getWorkOrderStatusName());
data.add(11,exportDatum.getBusinessName());
data.add(12,sdf.format(exportDatum.getCreateTime()));
data.add(13,sdf.format(exportDatum.getEndCreateTime()));
data.add(14,Objects.isNull(exportDatum.getUpdateTime())?"":sdf.format(exportDatum.getUpdateTime()));
data.add(15,null);
data.add(16,null);
//查询此工单是否存在有责任方如果存在有责任方完善表头
List<AftersalesPersonResponsibleEntity> entityList = aftersalesPersonResponsibleService.list(Wrappers.<AftersalesPersonResponsibleEntity>query().lambda()
.eq(AftersalesPersonResponsibleEntity::getWordOrderId, exportDatum.getId())
.eq(AftersalesPersonResponsibleEntity::getTypesOf, "1")
);
if (!entityList.isEmpty()) {
handleResponsibility(basicTitle,entityList,data);
}
dataList.add(data);
}
ServletOutputStream os = null;
try {
os = response.getOutputStream();
ExcelWriter excelWriter = EasyExcel.write(os).build();
WriteSheet sheet = EasyExcel.writerSheet()
// 这里放入动态头
.head(basicTitle)
// 当然这里数据也可以用 List<List<String>> 去传入
.build();
excelWriter.write(dataList,sheet);
excelWriter.finish();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
private void handleResponsibility(List<List<String>> basicTitle, List<AftersalesPersonResponsibleEntity> entityList, List<String> data) {
Long wordOrderId = entityList.get(0).getWordOrderId();
//查询最新消息
List<AftersaleSurveyRecordEntity> recordEntities = aftersaleSurveyRecordService.list(Wrappers.<AftersaleSurveyRecordEntity>query().lambda()
.eq(AftersaleSurveyRecordEntity::getWorkOrderId, wordOrderId)
.orderByDesc(AftersaleSurveyRecordEntity::getCreateTime)
);
if (!recordEntities.isEmpty()) {
if (!basicTitle.contains(Arrays.asList("最新消息回复内容")) ){
List<String> head5 = new ArrayList<>(Arrays.asList("最新消息回复内容"));
basicTitle.add(basicTitle.size(),head5);
basicTitle.add(head5);
}
data.add(recordEntities.get(0).getContent());
}
int aa = 0;
Map<Long, List<AftersalesPersonResponsibleEntity>> listMap = entityList.stream().collect(Collectors.groupingBy(AftersalesPersonResponsibleEntity::getWordOrderId));
for (Long l : listMap.keySet()) {
List<AftersalesPersonResponsibleEntity> aftersalesPersonResponsibleEntities = listMap.get(l);
aa = Math.max(aa, aftersalesPersonResponsibleEntities.size());
}
for (int i = 0; i < aa; i++) {
if (!basicTitle.contains(Arrays.asList("责任方"+(i+1)))) {
List<String> head1 = new ArrayList<>(Arrays.asList("责任方"+(i+1)));
basicTitle.add(basicTitle.size(),head1);
}
if (!basicTitle.contains(Arrays.asList("责任人"+(i+1)))) {
List<String> head2 = new ArrayList<>(Arrays.asList("责任人"+(i+1)));
basicTitle.add(basicTitle.size(),head2);
}
if (!basicTitle.contains(Arrays.asList("三方责任人"+(i+1)))) {
List<String> head3 = new ArrayList<>(Arrays.asList("三方责任人"+(i+1)));
basicTitle.add(basicTitle.size(),head3);
}
if (!basicTitle.contains(Arrays.asList("金额"+(i+1)))) {
List<String> head4 = new ArrayList<>(Arrays.asList("金额"+(i+1)));
basicTitle.add(basicTitle.size(),head4);
}
}
for (int i = 0; i < entityList.size(); i++) {
data.add(entityList.get(i).getBusinessName());
data.add(entityList.get(i).getPersonResponsibleName());
data.add(entityList.get(i).getTripartite());
data.add(entityList.get(i).getResponsibilityRatio());
}
}
@GetMapping("/exportAllWorkOrder") @GetMapping("/exportAllWorkOrder")
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入aftersalesWorkOrder") @ApiOperation(value = "导出数据", notes = "传入aftersalesWorkOrder")

15
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java

@ -56,6 +56,14 @@ public class AftersalesWorkOrderExcel implements Serializable {
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("发现节点") @ExcelProperty("发现节点")
private String discoveryNodeName; private String discoveryNodeName;
/**
* 工单发起仓
*/
@ColumnWidth(20)
@ExcelProperty("工单发起仓")
private String warehouseName;
@ExcelIgnore //发现节点 @ExcelIgnore //发现节点
private String discoveryNode; private String discoveryNode;
/** /**
@ -83,6 +91,13 @@ public class AftersalesWorkOrderExcel implements Serializable {
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("订单自编号") @ExcelProperty("订单自编号")
private String orderCode; private String orderCode;
/**
* 订单自编号
*/
@ColumnWidth(20)
@ExcelProperty("包条码")
private String packageCode;
/** /**
* 一级品类 * 一级品类
*/ */

9
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.java

@ -29,6 +29,7 @@ import org.apache.ibatis.annotations.Param;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 客服异常工单 Mapper 接口 * 客服异常工单 Mapper 接口
@ -117,4 +118,12 @@ public interface AftersalesWorkOrderMapper extends BaseMapper<AftersalesWorkOrde
* @return * @return
*/ */
List<AftersalesWorkOrderExcel> exportAllListOwn(@Param("param")AftersalesWorkOrderEntity workOrderEntity,@Param("ids")List<Long> ids); List<AftersalesWorkOrderExcel> exportAllListOwn(@Param("param")AftersalesWorkOrderEntity workOrderEntity,@Param("ids")List<Long> ids);
/**
* 查询导出基础部分数据
* @param workOrderDTO
* @param ids
* @return
*/
List<AftersalesWorkOrderVO> getBasicExportData(@Param("param") AftersalesWorkOrderDTO workOrderDTO, List<Long> ids);
} }

106
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml

@ -1041,6 +1041,112 @@
group by lawo.id group by lawo.id
ORDER BY lawo.create_time DESC ORDER BY lawo.create_time DESC
</select> </select>
<select id="getBasicExportData" resultType="com.logpm.aftersales.vo.AftersalesWorkOrderVO">
SELECT DISTINCT
lawo.id,
CASE
lawo.work_order_type
WHEN 1 THEN
'货损'
WHEN 2 THEN
'少货'
WHEN 3 THEN
'窜货'
WHEN 4 THEN
'加急'
WHEN 5 THEN
'其他' ELSE '未知类型'
END workOrderTypeName,
CASE
lawo.discovery_node
WHEN 1 THEN
'提货环节'
WHEN 2 THEN
'发货环节'
WHEN 3 THEN
'干线卸车环节'
WHEN 4 THEN
'库内作业环节'
WHEN 5 THEN
'配送装车环节'
WHEN 6 THEN
'配送签收环节'
WHEN 7 THEN
'安装环节'
WHEN 7 THEN
'其他' ELSE '未知节点'
END discoveryNodeName,
lawo.work_order_number,
t.waybill_number AS waybillNumber,
t.order_code AS orderCode,
t.package_code AS packageCode,
t.brand_name AS brandName,
lawo.waybill_mall,
t.`first` AS `first`,
CASE
lawo.work_order_status
WHEN '10' THEN '待处理'
WHEN '20' THEN '处理中'
WHEN '30' THEN '已处理'
WHEN '40' THEN '待审核'
WHEN '50' THEN '已审核'
WHEN '60' THEN '超时未处理'
WHEN '70' THEN '客服介入中'
WHEN '80' THEN '仲裁中'
WHEN '90' THEN '理赔金额未出'
WHEN '21' THEN '处理结果已提交'
WHEN '100' THEN '申述中'
WHEN '110' THEN '已结束' ELSE '未知状态'
END workOrderStatusName,
lawo.processed_by,
GROUP_CONCAT(DISTINCT laprr.business_name) AS businessName,
lawo.create_time,
(lawo.create_time + INTERVAL 2 DAY) AS endCreateTime,
lawo.update_time,
GROUP_CONCAT(DISTINCT lapr.result_type) AS resultTypes,
IFNULL( sum( lapr.money ), 0 ) AS totalAmountNum,
lawo.ceator,
IF(lawo.work_order_status = '80',lawo.update_time,'') AS '完结时间',
IF(lawo.work_order_status = '100','是','否') AS '是否申述',
lawo.process_number,
IF(lawo.work_order_status = '100',(SELECT CASE types_of
WHEN 0 THEN '待处理'
WHEN 1 THEN '成立'
WHEN 2 THEN '驳回'
WHEN 3 THEN '取消'
ELSE
'未知审核状态'
END aaa
FROM logpm_aftersales_appeal WHERE word_order_id = lawo.id AND is_deleted = 0 AND types_of != 3 ORDER BY create_time DESC LIMIT 1),'未申述') AS '申述状态'
FROM
logpm_aftersales_work_order lawo
LEFT JOIN logpm_aftersales_processor lap ON lawo.id = lap.work_order_id
AND lap.types_of = '2'
AND lap.conditions IN ( 1, 2 )
LEFT JOIN logpm_aftersales_completion_record lacr ON lacr.work_order_id = lawo.id
AND lacr.is_deleted = '0'
LEFT JOIN (SELECT
a.id,
group_concat( DISTINCT b.`first` SEPARATOR ',' ) AS `first`,
group_concat( DISTINCT b.secondary SEPARATOR ',' ) AS secondary,
group_concat( DISTINCT b.brand_name SEPARATOR ',' ) AS brand_name,
group_concat( DISTINCT b.package_code SEPARATOR ',' ) AS package_code,
group_concat( DISTINCT b.order_code SEPARATOR ',' ) AS order_code,
group_concat( DISTINCT b.waybill_number SEPARATOR ',' ) AS waybill_number
FROM
logpm_aftersales_work_order AS a
LEFT JOIN logpm_aftersales_abnormal_package AS b ON a.id = b.work_order_id
WHERE
a.is_deleted = 0
AND b.is_deleted = 0
GROUP BY
a.id) AS t ON t.id = lawo.id
LEFT JOIN logpm_aftersales_processing_results AS lapr ON lapr.work_order_id = lawo.id AND lapr.is_deleted = 0
LEFT JOIN logpm_aftersales_person_responsible AS laprr ON laprr.word_order_id = lawo.id
group by lawo.id
ORDER BY lawo.create_time DESC
</select>
<update id="updateFinanceTime"> <update id="updateFinanceTime">

12
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java

@ -307,4 +307,16 @@ public interface IAftersalesWorkOrderService extends BaseService<AftersalesWorkO
*/ */
List<AftersalesWorkOrderExcel> exportWorkOrder(Map<String, Object> aftersalesWorkOrder); List<AftersalesWorkOrderExcel> exportWorkOrder(Map<String, Object> aftersalesWorkOrder);
/**
* 构建导出基础字段
* @return
*/
List<List<String>> basicTitleBuild();
/**
* 查询导出基础数据
* @param aftersalesWorkOrder
* @return
*/
List<AftersalesWorkOrderVO> getBasicExportData(Map<String, Object> aftersalesWorkOrder);
} }

118
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

@ -368,6 +368,16 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
} }
} }
baseMapper.insert(aftersalesWorkOrder); baseMapper.insert(aftersalesWorkOrder);
//保存一个自己的处理方数据
AftersalesProcessorEntity aftersalesProcessorEntity = new AftersalesProcessorEntity();
aftersalesProcessorEntity.setConditions("1");
aftersalesProcessorEntity.setTypesOf("3");
aftersalesProcessorEntity.setBusinessId(myCurrentWarehouse.getId());
aftersalesProcessorEntity.setBusinessName(myCurrentWarehouse.getName());
aftersalesProcessorEntity.setWarehouseId(myCurrentWarehouse.getId());
aftersalesProcessorEntity.setWorkOrderId(aftersalesWorkOrder.getId());
aftersalesProcessorEntity.setProcessingStatus("5");
aftersalesProcessorService.save(aftersalesProcessorEntity);
} else { } else {
//修改 //修改
// if (ObjectUtil.isNotNull(aftersalesWorkOrder.getUnPpackageEntityList())) { // if (ObjectUtil.isNotNull(aftersalesWorkOrder.getUnPpackageEntityList())) {
@ -1305,6 +1315,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
// List<AftersalesProcessorVO> processorVOS = new ArrayList<>(); // List<AftersalesProcessorVO> processorVOS = new ArrayList<>();
List<AftersalesProcessorEntity> list = aftersalesProcessorService.list(Wrappers.<AftersalesProcessorEntity>query().lambda() List<AftersalesProcessorEntity> list = aftersalesProcessorService.list(Wrappers.<AftersalesProcessorEntity>query().lambda()
.eq(AftersalesProcessorEntity::getWorkOrderId, aftersalesWorkOrder.getId()) .eq(AftersalesProcessorEntity::getWorkOrderId, aftersalesWorkOrder.getId())
.ne(AftersalesProcessorEntity::getTypesOf, "3")
.apply("conditions in (1,2)") .apply("conditions in (1,2)")
); );
//需要待回复的处理方 //需要待回复的处理方
@ -2642,6 +2653,113 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
} }
@Override
public List<List<String>> basicTitleBuild() {
List<List<String>> title = new ArrayList<>();
List<String> head0 = new ArrayList<>(Arrays.asList("异常类型"));
title.add(0,head0);
List<String> head1 = new ArrayList<>(Arrays.asList("发现节点"));
title.add(1,head1);
List<String> head2 = new ArrayList<>(Arrays.asList("工单创建仓"));
title.add(2,head2);
List<String> head3 = new ArrayList<>(Arrays.asList("工单号"));
title.add(3,head3);
List<String> head4 = new ArrayList<>(Arrays.asList("运单号"));
title.add(4,head4);
List<String> head5 = new ArrayList<>(Arrays.asList("订单自编号"));
title.add(5,head5);
List<String> head6 = new ArrayList<>(Arrays.asList("包条码"));
title.add(6,head6);
List<String> head7 = new ArrayList<>(Arrays.asList("品牌"));
title.add(7,head7);
List<String> head8 = new ArrayList<>(Arrays.asList("运单商场"));
title.add(8,head8);
List<String> head9= new ArrayList<>(Arrays.asList("一级品类"));
title.add(9,head9);
List<String> head10 = new ArrayList<>(Arrays.asList("工单状态"));
title.add(10,head10);
List<String> head11 = new ArrayList<>(Arrays.asList("工单处理方"));
title.add(11,head11);
List<String> head12 = new ArrayList<>(Arrays.asList("工单创建时间"));
title.add(12,head12);
List<String> head13= new ArrayList<>(Arrays.asList("工单最晚处理时间"));
title.add(13,head13);
List<String> head14= new ArrayList<>(Arrays.asList("工单最新处理时间"));
title.add(14,head14);
List<String> head15= new ArrayList<>(Arrays.asList("是否超时"));
title.add(15,head15);
List<String> head16= new ArrayList<>(Arrays.asList("营业部处理客服"));
title.add(16,head16);
return title;
}
@Override
public List<AftersalesWorkOrderVO> getBasicExportData(Map<String, Object> aftersalesWorkOrder) {
String o = (String) aftersalesWorkOrder.get("ids");
List<Long> ids = null;
if (!Objects.isNull(o)) {
ids = Func.toLongList((String) aftersalesWorkOrder.get("ids"));
}
//查询用户角色信息
BladeUser user = AuthUtil.getUser();
String roleName = user.getRoleName();
//查询客服岗位
List<DictBiz> warehouseType = DictBizCache.getList("after_sales_visits");
if (warehouseType.isEmpty()) {
throw new ServiceException("注意,注意!售后访问字典未配置!请配置!");
}
List<String> roleList = Arrays.asList(user.getRoleName().split(","));
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (!roleList.isEmpty()) {
Optional<DictBiz> matchingDictBiz = warehouseType.stream()
.filter(i -> roleList.contains(i.getDictValue()))
.findFirst();
Object workOrderStatus = aftersalesWorkOrder.get("workOrderStatus");
if (matchingDictBiz.isPresent()) {
String dictValue = matchingDictBiz.get().getDictKey();
switch (dictValue) {
case "1": // 客服经理
updateWorkOrderForManager(aftersalesWorkOrder, workOrderStatus);
break;
case "2": // 营业部客服
if (Objects.isNull(myCurrentWarehouse)){
//营业部客服未选择仓库进行作业
throw new ServiceException("请选择仓库");
}
updateWorkOrderForSales(aftersalesWorkOrder, workOrderStatus);
break;
case "3": // 职能客服
updateWorkOrderForFunctional(aftersalesWorkOrder, workOrderStatus, user.getUserId());
break;
}
} else {
updateWorkOrderForOthers(aftersalesWorkOrder, workOrderStatus);
}
}else {
throw new CustomerException("当前登录人无工单操作权限!!!");
}
AftersalesWorkOrderDTO workOrderDTO = JSONObject.parseObject(JSONObject.toJSONString(aftersalesWorkOrder), AftersalesWorkOrderDTO.class);
List<AftersalesWorkOrderVO> exportData = baseMapper.getBasicExportData(workOrderDTO,ids);
return exportData;
}
/** /**
* 判断是否是客服角色 * 判断是否是客服角色
* @param user * @param user

5
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTrayMapper.xml

@ -116,7 +116,8 @@
lwga.column_num columnNum, lwga.column_num columnNum,
lwga.layer_num layerNum, lwga.layer_num layerNum,
lwtg.create_time operateTime, lwtg.create_time operateTime,
lwtg.create_user operateUser lwtg.create_user operateUser,
lwtg.is_fleeing isFleeing
FROM FROM
logpm_warehouse_tray_goods lwtg logpm_warehouse_tray_goods lwtg
JOIN logpm_distribution_parcel_list ldpl ON lwtg.association_id = ldpl.id JOIN logpm_distribution_parcel_list ldpl ON lwtg.association_id = ldpl.id
@ -169,6 +170,7 @@
and ldpl.brand_name like concat('%',#{param.brandName},'%') and ldpl.brand_name like concat('%',#{param.brandName},'%')
</if> </if>
</where> </where>
order by lwtg.create_time desc
</select> </select>
<select id="selectInventoryList" resultType="com.logpm.basicdata.vo.WarehouseStockListVO"> <select id="selectInventoryList" resultType="com.logpm.basicdata.vo.WarehouseStockListVO">
SELECT SELECT
@ -318,6 +320,7 @@
and ldpl.waybill_number like concat('%',#{param.waybillNumber},'%') and ldpl.waybill_number like concat('%',#{param.waybillNumber},'%')
</if> </if>
</where> </where>
order by lwtgl.create_time desc
</select> </select>
<select id="selectinventoryListhistory" resultType="com.logpm.basicdata.vo.WarehouseStockListVO"> <select id="selectinventoryListhistory" resultType="com.logpm.basicdata.vo.WarehouseStockListVO">
SELECT SELECT

12
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/wrapper/WarehouseParcelListWrapper.java

@ -40,12 +40,12 @@ public class WarehouseParcelListWrapper extends BaseEntityWrapper<WarehouseParce
public WarehouseParcelListVO entityVO(WarehouseParcelListVO warehouseParcelListVO) { public WarehouseParcelListVO entityVO(WarehouseParcelListVO warehouseParcelListVO) {
if (null != warehouseParcelListVO.getOperateUser()){ if (null != warehouseParcelListVO.getOperateUser()){
warehouseParcelListVO.setOperateUserName(userClient.userInfoById(warehouseParcelListVO.getOperateUser()).getData().getName());} warehouseParcelListVO.setOperateUserName(userClient.userInfoById(warehouseParcelListVO.getOperateUser()).getData().getName());}
warehouseParcelListVO.setOrderPackageStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_STATUS, warehouseParcelListVO.getOrderPackageStatus())); // warehouseParcelListVO.setOrderPackageStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_STATUS, warehouseParcelListVO.getOrderPackageStatus()));
warehouseParcelListVO.setOrderPackageFreezeStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_FREEZE_STATUS, warehouseParcelListVO.getOrderPackageFreezeStatus())); // warehouseParcelListVO.setOrderPackageFreezeStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_FREEZE_STATUS, warehouseParcelListVO.getOrderPackageFreezeStatus()));
warehouseParcelListVO.setOrderPackageGroundingStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_GROUNDING_STATUS, warehouseParcelListVO.getOrderPackageGroundingStatus())); // warehouseParcelListVO.setOrderPackageGroundingStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_GROUNDING_STATUS, warehouseParcelListVO.getOrderPackageGroundingStatus()));
warehouseParcelListVO.setOrderPackageStockupStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_STOCKUP_STATUS, warehouseParcelListVO.getOrderPackageStockupStatus())); // warehouseParcelListVO.setOrderPackageStockupStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_STOCKUP_STATUS, warehouseParcelListVO.getOrderPackageStockupStatus()));
warehouseParcelListVO.setOrderPackageReservationStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_RESERVATION_STATUS, warehouseParcelListVO.getOrderPackageReservationStatus())); // warehouseParcelListVO.setOrderPackageReservationStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_RESERVATION_STATUS, warehouseParcelListVO.getOrderPackageReservationStatus()));
warehouseParcelListVO.setOrderPackageLoadingStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_LOADING_STATUS, warehouseParcelListVO.getOrderPackageLoadingStatus())); // warehouseParcelListVO.setOrderPackageLoadingStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_LOADING_STATUS, warehouseParcelListVO.getOrderPackageLoadingStatus()));
return warehouseParcelListVO; return warehouseParcelListVO;
} }

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -3290,6 +3290,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
List<Long> ids = parcelListEntities.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList()); List<Long> ids = parcelListEntities.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList());
List<DistributionLoadscanAbnormalEntity> abnormalEntities = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda() List<DistributionLoadscanAbnormalEntity> abnormalEntities = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda()
.in(DistributionLoadscanAbnormalEntity::getPackageId, ids) .in(DistributionLoadscanAbnormalEntity::getPackageId, ids)
.eq(DistributionLoadscanAbnormalEntity::getAuditingStatus, "2")
); );
if (!abnormalEntities.isEmpty()) { if (!abnormalEntities.isEmpty()) {
//判断此包件的异常是否是当前扫描车次和客户 //判断此包件的异常是否是当前扫描车次和客户

107
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -2280,19 +2280,18 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
Map<String, ImportStandardOuPaiDTO> importStandardOuPaiDTOMap = importStandardOuPaiDTOS.stream().collect(Collectors.toMap(ImportStandardOuPaiDTO::getOrderPackageCode, Function.identity(), (a, b) -> a)); Map<String, ImportStandardOuPaiDTO> importStandardOuPaiDTOMap = importStandardOuPaiDTOS.stream().collect(Collectors.toMap(ImportStandardOuPaiDTO::getOrderPackageCode, Function.identity(), (a, b) -> a));
List<TrunklineAdvanceDetailEntity> hasAdvanceDetailList = advanceDetailService.findListByOrderPackageCodeList(hasOrderPackageCodeList); List<TrunklineAdvanceDetailEntity> hasAdvanceDetailList = advanceDetailService.findListByOrderPackageCodeList(hasOrderPackageCodeList);
hasAdvanceDetailList.forEach(advanceDetailEntity -> { hasAdvanceDetailList.forEach(advanceDetailEntity -> {
Long waybillId = advanceDetailEntity.getWaybillId();
if (Objects.isNull(waybillId)) { ImportStandardOuPaiDTO importStandardOuPaiDTO = importStandardOuPaiDTOMap.get(advanceDetailEntity.getOrderPackageCode());
ImportStandardOuPaiDTO importStandardOuPaiDTO = importStandardOuPaiDTOMap.get(advanceDetailEntity.getOrderPackageCode()); TrunklineAdvanceDetailEntity updateMaterialEntity = new TrunklineAdvanceDetailEntity();
TrunklineAdvanceDetailEntity updateMaterialEntity = new TrunklineAdvanceDetailEntity(); updateMaterialEntity.setId(advanceDetailEntity.getId());
updateMaterialEntity.setId(advanceDetailEntity.getId()); updateMaterialEntity.setOrderPackageCode(advanceDetailEntity.getOrderPackageCode());
updateMaterialEntity.setOrderPackageCode(advanceDetailEntity.getOrderPackageCode()); updateMaterialEntity.setMaterialCode(importStandardOuPaiDTO.getMaterialCode());
updateMaterialEntity.setMaterialCode(importStandardOuPaiDTO.getMaterialCode()); updateMaterialEntity.setMaterialName(importStandardOuPaiDTO.getMaterialName());
updateMaterialEntity.setMaterialName(importStandardOuPaiDTO.getMaterialName()); updateMaterialEntity.setFirstPackName(importStandardOuPaiDTO.getFirstsName());
updateMaterialEntity.setFirstPackName(importStandardOuPaiDTO.getFirstsName()); updateMaterialEntity.setSecondPackName(importStandardOuPaiDTO.getSencodsName());
updateMaterialEntity.setSecondPackName(importStandardOuPaiDTO.getSencodsName()); updateMaterialEntity.setThirdPackName(importStandardOuPaiDTO.getThirdsName());
updateMaterialEntity.setThirdPackName(importStandardOuPaiDTO.getThirdsName()); updateMaterialList.add(updateMaterialEntity);
updateMaterialList.add(updateMaterialEntity);
}
}); });
if (CollUtil.isNotEmpty(updateMaterialList)) { if (CollUtil.isNotEmpty(updateMaterialList)) {
@ -2628,6 +2627,8 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
return R.fail(405, "运单信息不存在"); return R.fail(405, "运单信息不存在");
} }
String waybillNo = waybillEntity.getWaybillNo();
if (isEdit.equals(1)) { if (isEdit.equals(1)) {
Integer abolishStatus = waybillEntity.getAbolishStatus(); Integer abolishStatus = waybillEntity.getAbolishStatus();
if (abolishStatus.equals(1)) { if (abolishStatus.equals(1)) {
@ -2645,7 +2646,37 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
Integer zeroEditStatus = 1;
Integer waybillType = waybillEntity.getWaybillType();
Long departureWarehouseId = waybillEntity.getDepartureWarehouseId();
Long destinationWarehouseId = waybillEntity.getDestinationWarehouseId();
if (waybillType.equals(2)) {
//零担改单限制
Integer totalCount = waybillEntity.getTotalCount();
DistributionStockArticleEntity endStockArticleEntity = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(waybillNo, destinationWarehouseId);
if (Objects.isNull(endStockArticleEntity)) {
DistributionStockArticleEntity startStockArticleEntity = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(waybillNo, departureWarehouseId);
if (Objects.isNull(startStockArticleEntity)) {
zeroEditStatus = 1;
}
Integer handQuantity = startStockArticleEntity.getHandQuantity();
if (!NumberUtil.equals(handQuantity, totalCount)) {
zeroEditStatus = 0;
}
}else{
Integer incomingQuantity = endStockArticleEntity.getIncomingNum();
if(!NumberUtil.equals(incomingQuantity,totalCount)){
zeroEditStatus = 0;
}
}
}
warehouseWaybillVO.setZeroEditStatus(zeroEditStatus);
map.put("warehouseWaybill", warehouseWaybillVO); map.put("warehouseWaybill", warehouseWaybillVO);
map.put("zeroEditStatus", zeroEditStatus);
map.put("payTypeList", DictBizCache.getList(DictBizConstant.OPEN_ORDER_PAY_TYPE)); map.put("payTypeList", DictBizCache.getList(DictBizConstant.OPEN_ORDER_PAY_TYPE));
map.put("payWayList", DictBizCache.getList(DictBizConstant.OPEN_ORDER_PAY_WAY)); map.put("payWayList", DictBizCache.getList(DictBizConstant.OPEN_ORDER_PAY_WAY));
map.put("deliveryWayList", DictBizCache.getList(DictBizConstant.OPEN_ORDER_DELIVERY_WAY)); map.put("deliveryWayList", DictBizCache.getList(DictBizConstant.OPEN_ORDER_DELIVERY_WAY));
@ -2687,33 +2718,35 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
} }
Integer waybillType = waybillEntity.getWaybillType(); Integer waybillType = waybillEntity.getWaybillType();
if (waybillType.equals(2)) { Long departureWarehouseId = waybillEntity.getDepartureWarehouseId();
//零担改单限制 Long destinationWarehouseId = waybillEntity.getDestinationWarehouseId();
Long departureWarehouseId = waybillEntity.getDepartureWarehouseId(); if(warehouseId.equals(departureWarehouseId) || warehouseId.equals(destinationWarehouseId)){
Long destinationWarehouseId = waybillEntity.getDestinationWarehouseId(); if (waybillType.equals(2)) {
Integer totalCount = waybillEntity.getTotalCount(); //零担改单限制
DistributionStockArticleEntity endStockArticleEntity = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(waybillNo, destinationWarehouseId);
if (Objects.isNull(endStockArticleEntity)) { Integer totalCount = waybillEntity.getTotalCount();
DistributionStockArticleEntity startStockArticleEntity = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(waybillNo, departureWarehouseId); DistributionStockArticleEntity endStockArticleEntity = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(waybillNo, destinationWarehouseId);
if (Objects.isNull(startStockArticleEntity)) { if (Objects.isNull(endStockArticleEntity)) {
log.warn("#############updateWaybill: 订单信息不存在! waybillId={}", waybillId); DistributionStockArticleEntity startStockArticleEntity = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(waybillNo, departureWarehouseId);
return R.fail(405, "订单信息不存在!"); if (Objects.isNull(startStockArticleEntity)) {
} log.warn("#############updateWaybill: 订单信息不存在! waybillId={}", waybillId);
Integer handQuantity = startStockArticleEntity.getHandQuantity(); return R.fail(405, "订单信息不存在!");
if (!NumberUtil.equals(handQuantity, totalCount)) { }
log.warn("#############updateWaybill: 始发仓数据已发运 waybillId={}", waybillId); Integer handQuantity = startStockArticleEntity.getHandQuantity();
return R.fail(405, "始发仓数据已发运"); if (!NumberUtil.equals(handQuantity, totalCount)) {
} log.warn("#############updateWaybill: 始发仓数据已发运 waybillId={}", waybillId);
}else{ return R.fail(405, "始发仓数据已发运");
Integer incomingQuantity = endStockArticleEntity.getIncomingNum(); }
if(!NumberUtil.equals(incomingQuantity,totalCount)){ }else{
log.warn("#############updateWaybill: 目的仓数据还未完全到达 waybillId={}", waybillId); Integer incomingQuantity = endStockArticleEntity.getIncomingNum();
return R.fail(405, "目的仓数据还未完全到达"); if(!NumberUtil.equals(incomingQuantity,totalCount)){
log.warn("#############updateWaybill: 目的仓数据还未完全到达 waybillId={}", waybillId);
return R.fail(405, "目的仓数据还未完全到达");
}
} }
} }
} }
// //验证运单是否有配送任务 // //验证运单是否有配送任务
// //查询运单下所有订单号 // //查询运单下所有订单号
// List<String> orderCodes = distributionParcelListClient.findOrderCodeByWaybillId(waybillId); // List<String> orderCodes = distributionParcelListClient.findOrderCodeByWaybillId(waybillId);
@ -2747,8 +2780,6 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
String consigneeName = waybillEntity.getConsigneeName(); String consigneeName = waybillEntity.getConsigneeName();
String consigneeAddress = waybillEntity.getConsigneeAddress(); String consigneeAddress = waybillEntity.getConsigneeAddress();
String consigneeMobile = waybillEntity.getConsigneeMobile(); String consigneeMobile = waybillEntity.getConsigneeMobile();
Long departureWarehouseId = waybillEntity.getDepartureWarehouseId();
Long destinationWarehouseId = waybillEntity.getDestinationWarehouseId();
String departureWarehouseName = waybillEntity.getDepartureWarehouseName(); String departureWarehouseName = waybillEntity.getDepartureWarehouseName();
String destinationWarehouseName = waybillEntity.getDestinationWarehouseName(); String destinationWarehouseName = waybillEntity.getDestinationWarehouseName();
Integer totalCount = waybillEntity.getTotalCount(); Integer totalCount = waybillEntity.getTotalCount();

18
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -1668,7 +1668,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String orderCode = carsOrderEntity.getOrderCode(); String orderCode = carsOrderEntity.getOrderCode();
String waybillNo = carsOrderEntity.getWaybillNo(); String waybillNo = carsOrderEntity.getWaybillNo();
Integer carsOrderRealLoadingNum = scanList.stream().filter(scan -> !Objects.isNull(scan.getWarehouseId()) && NumberUtil.equals(nodeId,scan.getWarehouseId()) && StringUtil.equals(orderCode,scan.getOrderCode()) && StringUtil.equals(waybillNo,scan.getWaybillNo())).mapToInt(TrunklineCarsLoadScanEntity::getNum).sum(); Integer carsOrderRealLoadingNum = scanList.stream().filter(scan -> !Objects.isNull(scan.getWarehouseId()) && NumberUtil.equals(nodeId,scan.getWarehouseId()) && StringUtil.equals(orderCode,scan.getOrderCode()) && StringUtil.equals(waybillNo,scan.getWaybillNo())).mapToInt(TrunklineCarsLoadScanEntity::getNum).sum();
Integer carsOrderRealUnloadingNum = scanList.stream().filter(scan -> !Objects.isNull(scan.getScanStatus()) && !scan.getScanStatus().equals("1") && !Objects.isNull(scan.getUnloadNodeId()) && StringUtil.equals(orderCode,scan.getOrderCode()) && StringUtil.equals(waybillNo,scan.getWaybillNo())).mapToInt(TrunklineCarsLoadScanEntity::getUnloadNum).sum(); Integer carsOrderRealUnloadingNum = scanList.stream().filter(scan -> !Objects.isNull(scan.getScanStatus()) && !scan.getScanStatus().equals("1") && StringUtil.equals(orderCode,scan.getOrderCode()) && StringUtil.equals(waybillNo,scan.getWaybillNo())).mapToInt(TrunklineCarsLoadScanEntity::getUnloadNum).sum();
Integer carsOrderRealSignNum = scanList.stream().filter(scan -> !Objects.isNull(scan.getScanStatus()) && scan.getScanStatus().equals("3") && StringUtil.equals(orderCode,scan.getOrderCode()) && StringUtil.equals(waybillNo,scan.getWaybillNo())).mapToInt(TrunklineCarsLoadScanEntity::getUnloadNum).sum(); Integer carsOrderRealSignNum = scanList.stream().filter(scan -> !Objects.isNull(scan.getScanStatus()) && scan.getScanStatus().equals("3") && StringUtil.equals(orderCode,scan.getOrderCode()) && StringUtil.equals(waybillNo,scan.getWaybillNo())).mapToInt(TrunklineCarsLoadScanEntity::getUnloadNum).sum();
carsOrderEntity.setRealNum(carsOrderRealLoadingNum); carsOrderEntity.setRealNum(carsOrderRealLoadingNum);
carsOrderEntity.setUnloadNum(carsOrderRealUnloadingNum); carsOrderEntity.setUnloadNum(carsOrderRealUnloadingNum);
@ -4933,7 +4933,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
noWaybillNoTrunklineCarsLoadScanMapByOrderCode.keySet().forEach(orderCode -> { noWaybillNoTrunklineCarsLoadScanMapByOrderCode.keySet().forEach(orderCode -> {
List<TrunklineCarsLoadScanVO> trunklineCarsLoadScanVOS = noWaybillNoTrunklineCarsLoadScanMapByOrderCode.get(orderCode); List<TrunklineCarsLoadScanVO> trunklineCarsLoadScanVOS = noWaybillNoTrunklineCarsLoadScanMapByOrderCode.get(orderCode);
//把trunklineCarsLoadScanVOS中所有元素的num加起来,如果num为空则用0代替 //把trunklineCarsLoadScanVOS中所有元素的num加起来,如果num为空则用0代替
Integer loadingNum = trunklineCarsLoadScanVOS.stream().map(TrunklineCarsLoadScanVO::getNum).reduce(0, Integer::sum); Integer loadingNum = trunklineCarsLoadScanVOS.stream().filter(t-> Objects.isNull(t.getWarehouseId())).map(TrunklineCarsLoadScanVO::getNum).reduce(0, Integer::sum);
Integer unloadNum = trunklineCarsLoadScanVOS.stream().map(TrunklineCarsLoadScanVO::getUnloadNum).reduce(0, Integer::sum); Integer unloadNum = trunklineCarsLoadScanVOS.stream().map(TrunklineCarsLoadScanVO::getUnloadNum).reduce(0, Integer::sum);
Integer signNum = trunklineCarsLoadScanVOS.stream().filter(t-> t.getScanStatus().equals("3")).map(TrunklineCarsLoadScanVO::getUnloadNum).reduce(0, Integer::sum); Integer signNum = trunklineCarsLoadScanVOS.stream().filter(t-> t.getScanStatus().equals("3")).map(TrunklineCarsLoadScanVO::getUnloadNum).reduce(0, Integer::sum);
@ -7542,6 +7542,20 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return R.fail(405, "配载计划不存在"); return R.fail(405, "配载计划不存在");
} }
TrunklineCarsLoadScanEntity signCarsLoadScanEntity = trunklineCarsLoadScanService.findEntityByLoadIdAndOrderPackageCodeAndScanStatus(loadId, orderPackageCode,"3");
if(!Objects.isNull(signCarsLoadScanEntity)){
log.warn("##############signScanPackageCode: 包件已签收 loadId={} orderPackageCode={}", loadId,orderPackageCode);
return R.fail(405, "包件已签收");
}
DistributionParcelListEntity orderPackageEntity = distributionParcelListClient.findOrderPackageCodeAndStatus(orderPackageCode, "70");
if(!Objects.isNull(orderPackageEntity)){
log.warn("##############signScanPackageCode: 包件已签收 loadId={} orderPackageCode={}", loadId,orderPackageCode);
return R.fail(405, "包件已签收");
}
String carsNo = carsLoadEntity.getCarsNo(); String carsNo = carsLoadEntity.getCarsNo();
Long waybillId = null; Long waybillId = null;

6
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

@ -1200,7 +1200,11 @@
IFNULL(lww.cost_num,0) costNum IFNULL(lww.cost_num,0) costNum
from logpm_warehouse_waybill lww from logpm_warehouse_waybill lww
left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = lww.id left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = lww.id
where lww.waybill_no in where lww.abolish_status = 0
and lww.freeze_status = 0
and lww.is_deleted = 0
and lwwd.is_deleted = 0
and lww.waybill_no in
<foreach collection="waybillNos" item="item" separator="," open="(" close=")"> <foreach collection="waybillNos" item="item" separator="," open="(" close=")">
#{item} #{item}
</foreach> </foreach>

Loading…
Cancel
Save