Browse Source

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

single_db
pref_mail@163.com 1 year ago
parent
commit
22cd46ea16
  1. 2
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesCompletionRecipientEntity.java
  2. 2
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesCompletionRecordEntity.java
  3. 22
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadOrderInfoVO.java
  4. 14
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadWaybillInfoVO.java
  5. 3
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillDetailClient.java
  6. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  7. 7
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  8. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.java
  9. 41
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml
  10. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsOrderService.java
  11. 34
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  12. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsOrderEntityServiceImpl.java
  13. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillDetailClient.java
  14. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWayBillDetailService.java
  15. 7
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWayBillDetailServiceImpl.java

2
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesCompletionRecipientEntity.java

@ -100,6 +100,6 @@ public class AftersalesCompletionRecipientEntity extends TenantEntity {
* 说明
*/
@ApiModelProperty(value = "说明")
private String explain;
private String explains;
}

2
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesCompletionRecordEntity.java

@ -76,7 +76,7 @@ public class AftersalesCompletionRecordEntity extends TenantEntity {
* 说明
*/
@ApiModelProperty(value = "说明")
private String explain;
private String explains;
/**
* 财务是否处理 1是 2
*/

22
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadOrderInfoVO.java

@ -0,0 +1,22 @@
package com.logpm.trunkline.vo;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
@Data
public class CarsLoadOrderInfoVO implements Serializable {
private String orderCode;
private Integer orderNum;
private Integer planNum;
private Integer loadingNum;
private Integer unloadNum;
private BigDecimal unloadIncome;
private BigDecimal orderLineCost;
private BigDecimal weight;
private BigDecimal volume;
private BigDecimal orderFreight;
}

14
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadWaybillInfoVO.java

@ -4,13 +4,14 @@ import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Data
public class CarsLoadWaybillInfoVO implements Serializable {
private String waybillNo;
private String orderCode;
private Date createTime;
private String destination;
private String destinationWarehouseName;
@ -19,19 +20,10 @@ public class CarsLoadWaybillInfoVO implements Serializable {
private String consignee;
private String consigneeName;
private Integer waybillNum;
private Integer orderNum;
private Integer planNum;
private Integer loadingNum;
private Integer unloadNum;
private BigDecimal unloadIncome;
private BigDecimal orderLineCost;
private String openPrice;
private String goodsName;
private BigDecimal weight;
private BigDecimal volume;
private String remark;
private BigDecimal totalFreight;
private BigDecimal orderFreight;
private BigDecimal deliveryFee;
private BigDecimal pickupFee;
private BigDecimal warehouseManagementFee;
@ -41,6 +33,6 @@ public class CarsLoadWaybillInfoVO implements Serializable {
private BigDecimal insuranceFee;
private BigDecimal totalFee;
List<CarsLoadOrderInfoVO> carsLoadOrderInfoList = new ArrayList<>();
}

3
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseWaybillDetailClient.java

@ -50,4 +50,7 @@ public interface IWarehouseWaybillDetailClient {
@GetMapping(API_PREFIX+"/findByWaybillId")
List<WarehouseWayBillDetail> findByWaybillId(@RequestParam Long waybillId);
@GetMapping(API_PREFIX+"/findListByWaybillNo")
List<WarehouseWayBillDetail> findListByWaybillNo(@RequestParam String waybillNo);
}

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

@ -156,7 +156,7 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
las.work_order_status workOrderStatus
from logpm_aftersales_settlement las
<where>
lap.processing_status = '4' and lap.is_deleted = 0
las.processing_status = '4' and las.is_deleted = 0
<if test="param.businessId != null "> and las.business_id = #{param.businessId }</if>
<if test="param.businessName != null and param.businessName != '' "> and las.business_name = #{param.businessName }</if>
<if test="param.workOrderNumber != null and param.workOrderNumber != '' "> and las.work_order_number = #{param.workOrderNumber }</if>

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

@ -389,6 +389,10 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
if(ObjectUtils.isNull(v.getCompletionRecordEntities()) ){
throw new ServiceException("赔款方数据不能为空");
}
AftersalesWorkOrderEntity workOrderEntity1 = baseMapper.selectById(v.getId());
if(workOrderEntity1.getWorkOrderStatus().equals(WorkOrderStatusConstant.yiwanjei.getValue())){
throw new ServiceException(" 包含已完结的异常工单!");
}
//添加赔付方信息
completionRecordService.saveBatch(v.getCompletionRecordEntities());
//添加受款方信息,可以为空
@ -1003,6 +1007,9 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
if(byId.getWorkOrderStatus().equals(WorkOrderStatusConstant.yichuli.getValue())){
throw new ServiceException("当前异常工单已处理!");
}
if(byId.getWorkOrderStatus().equals(WorkOrderStatusConstant.yiwanjei.getValue())){
throw new ServiceException("当前异常工单已完结!!");
}
AftersalesProcessingResultsDTO aftersalesProcessingResultsDTO = aftersalesWorkOrder.getAftersalesProcessingResultsDTO();
aftersalesProcessingResultsService.ownSaveOrUpdate(aftersalesProcessingResultsDTO);
//添加完结数据

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.java

@ -29,4 +29,6 @@ public interface TrunklineCarsOrderMapper extends BaseMapper<TrunklineCarsOrderE
List<String> findUseOrderWaybilllList(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId);
List<CarsLoadWaybillInfoVO> findWaybillOrderByloadId(@Param("loadId") Long loadId);
List<CarsLoadOrderInfoVO> findCarsLoadOrderInfoList(@Param("loadId") Long loadId, @Param("waybillNo") String waybillNo);
}

41
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml

@ -102,6 +102,47 @@
</select>
<select id="findWaybillOrderByloadId" resultType="com.logpm.trunkline.vo.CarsLoadWaybillInfoVO">
select t.waybill_no waybillNo,
wb.create_time createTime,
wb.destination destination,
wb.destination_warehouse_name destinationWarehouseName,
wb.shipper shipper,
wb.shipper_name shipperName,
wb.consignee consignee,
wb.consignee_name consigneeName,
wb.total_count waybillNum,
wb.remark remark,
wb.total_freight totalFreight,
wb.delivery_fee deliveryFee,
wb.pickup_fee pickupFee,
wb.warehouse_management_fee warehouseManagementFee,
wb.storage_fee storageFee,
wb.handling_fee handlingFee,
wb.other_fee otherFee,
wb.insurance_fee insuranceFee,
wb.total_freight+wb.delivery_fee+wb.pickup_fee+wb.warehouse_management_fee+wb.storage_fee+wb.handling_fee+wb.other_fee+wb.insurance_fee totalFee
from (select waybill_no
from logpm_trunkline_cars_order
where load_id = #{loadId}
group by waybill_no) t
left join logpm_warehouse_waybill wb on t.waybill_no = wb.waybill_no
</select>
<select id="findCarsLoadOrderInfoList" resultType="com.logpm.trunkline.vo.CarsLoadOrderInfoVO">
select ltco.order_code orderCode,
ltco.plan_num planNum,
ltco.real_num loadingNum,
lww.total_freight orderFreight,
IFNULL(ltco.unload_num,0) unloadNum,
IFNULL(lww.total_freight/lww.total_count*ltco.unload_num,0) unloadIncome,
IFNULL(lww.total_freight/lww.total_count*ltco.plan_num,0) orderLineCost,
sum(ltwo.total_number) orderNum
from logpm_trunkline_cars_order ltco
left join logpm_trunkline_waybill_order ltwo on ltwo.order_code = ltco.order_code and ltwo.waybill_no = ltco.waybill_no
left join logpm_warehouse_waybill lww on lww.waybill_no = ltwo.waybill_no
where ltco.load_id = #{loadId}
and ltco.waybill_no = #{waybillNo}
group by ltco.order_code
</select>

1
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsOrderService.java

@ -27,4 +27,5 @@ public interface ITrunklineCarsOrderService extends BaseService<TrunklineCarsOrd
List<CarsLoadWaybillInfoVO> findWaybillOrderByloadId(Long loadId);
List<CarsLoadOrderInfoVO> findCarsLoadOrderInfoList(Long loadId, String waybillNo);
}

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

@ -22,10 +22,12 @@ import com.logpm.trunkline.entity.TrunklineCarsOrderEntity;
import com.logpm.trunkline.mapper.TrunklineCarsLoadMapper;
import com.logpm.trunkline.service.*;
import com.logpm.trunkline.vo.*;
import com.logpm.warehouse.entity.WarehouseWayBillDetail;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseTrayTypeClient;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import com.logpm.warehouse.feign.IWarehouseWaybillDetailClient;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringEscapeUtils;
@ -68,6 +70,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
private final ITrunklineAdvanceDetailService trunklineAdvanceDetailService;
private final ITrunklineWaybillOrderService trunklineWaybillOrderService;
private final IBasicdataCodeClient codeClient;
private final IWarehouseWaybillDetailClient warehouseWaybillDetailClient;
@Override
public IPage<TrunklineCarsLoadVO> loadCarsPageList(LoadCarsDTO loadCarsDTO) {
@ -1913,9 +1916,36 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trunklineCarsLoadVO.setCarsLoadLineList(loadLineList);
List<CarsLoadWaybillInfoVO> carsLoadWaybillInfoList = trunklineCarsOrderService.findWaybillOrderByloadId(loadId);
// trunklineCarsOrderService.find
for (CarsLoadWaybillInfoVO carsLoadWaybillInfoVO : carsLoadWaybillInfoList) {
String waybillNo = carsLoadWaybillInfoVO.getWaybillNo();
List<WarehouseWayBillDetail> wayBillDetails = warehouseWaybillDetailClient.findListByWaybillNo(waybillNo);
String openPrice = null;
String productNames = null;
for (WarehouseWayBillDetail wayBillDetail : wayBillDetails) {
String productName = wayBillDetail.getProductName();
Integer num = wayBillDetail.getNum();
BigDecimal price = wayBillDetail.getPrice();
if(StringUtil.isBlank(openPrice)){
openPrice = price.toPlainString();
}else{
openPrice = openPrice + "," +price.toPlainString();
}
if(StringUtil.isBlank(productNames)){
productNames = productName+"("+num+")";
}else{
productNames = productNames + "," + productName+"("+num+")";
}
}
carsLoadWaybillInfoVO.setOpenPrice(openPrice);
carsLoadWaybillInfoVO.setGoodsName(productNames);
List<CarsLoadOrderInfoVO> carsLoadOrderInfoList = trunklineCarsOrderService.findCarsLoadOrderInfoList(loadId,waybillNo);
return null;
carsLoadWaybillInfoVO.setCarsLoadOrderInfoList(carsLoadOrderInfoList);
}
return R.data(carsLoadWaybillInfoList);
}
@Override

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsOrderEntityServiceImpl.java

@ -62,4 +62,9 @@ public class TrunklineCarsOrderEntityServiceImpl extends BaseServiceImpl<Trunkli
return baseMapper.findWaybillOrderByloadId(loadId);
}
@Override
public List<CarsLoadOrderInfoVO> findCarsLoadOrderInfoList(Long loadId, String waybillNo) {
return baseMapper.findCarsLoadOrderInfoList(loadId,waybillNo);
}
}

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseWaybillDetailClient.java

@ -24,4 +24,9 @@ public class WarehouseWaybillDetailClient implements IWarehouseWaybillDetailClie
public List<WarehouseWayBillDetail> findByWaybillId(Long waybillId) {
return warehouseWayBillDetailService.findByWaybillId(waybillId);
}
@Override
public List<WarehouseWayBillDetail> findListByWaybillNo(String waybillNo) {
return warehouseWayBillDetailService.findListByWaybillNo(waybillNo);
}
}

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWayBillDetailService.java

@ -16,4 +16,6 @@ public interface IWarehouseWayBillDetailService {
WarehouseWayBillDetail findByWaybillIdAndGoodsName(Long waybillId, String goodsName);
void addList(List<WarehouseWayBillDetail> ls);
List<WarehouseWayBillDetail> findListByWaybillNo(String waybillNo);
}

7
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWayBillDetailServiceImpl.java

@ -52,4 +52,11 @@ public class WarehouseWayBillDetailServiceImpl implements IWarehouseWayBillDetai
save(warehouseWayBillDetail);
}
}
@Override
public List<WarehouseWayBillDetail> findListByWaybillNo(String waybillNo) {
QueryWrapper<WarehouseWayBillDetail> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("waybill_no",waybillNo);
return warehouseWayBillDetailMapper.selectList(queryWrapper);
}
}

Loading…
Cancel
Save