Browse Source

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

# Conflicts:
#	blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java
training
pref_mail@163.com 1 year ago
parent
commit
0b975e1d6a
  1. 1
      blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java
  2. 32
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListBaseVO.java
  3. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionParcelListController.java
  4. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java
  5. 17
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  6. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java
  7. 22
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  8. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionStockArticleWrapper.java

1
blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java

@ -27,6 +27,7 @@ public class DictBizConstant {
public static final String STOCK_ALLOCATION = "stock_assign_status";//包件上架状态
public static final String CERTIFICATE_TYPE = "certificate_type";//证件类型
public static final String DELIVERY_COST = "delivery_cost";//证件类型
public static final String ORDER_RECEIVE_STATUS = "order_receive_status";//包间上架状态
public static final String LOGPM_UNIT = "logpm_unit";//包件上架状态

32
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListBaseVO.java

@ -0,0 +1,32 @@
package com.logpm.distribution.vo;
import lombok.Data;
/**
* @program: LogisticsPlatform-Service
* @description:
* @author: cyz
* @create: 2023-08-15 16:12
**/
@Data
public class DistributionParcelListBaseVO {
private String waybillNumber;
private String frozenQuantity;
private String signinQuantity;
private String deliveryQuantity;
private String handQuantity;
private String sendWarehouseName;
private String factoryTrain;
private String trainNumber;
private String dealerCode;
private String dealerName;
private String typeService;
private String typeServiceName;
private String brand;
private String warehouse;
private String mallName;
private String orderCode;
private String serviceNumber;
}

13
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionParcelListController.java

@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.logpm.basic.entity.BasicMaterialEntity;
import com.logpm.basic.feign.IBasicMaterialClient;
import com.logpm.distribution.dto.DistributionParcelListDTO;
import com.logpm.distribution.vo.DistributionParcelListBaseVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -107,6 +108,18 @@ public class DistributionParcelListController extends BladeController {
return R.data(pages);
}
/**
* 在库订单包件清单
*/
@GetMapping("/stockDataBase")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distributionParcelList")
public R<List<DistributionParcelListBaseVO>> getStockDataBase(@ApiIgnore @RequestParam Map<String, Object> distributionParcelList, Query query) {
List<DistributionParcelListBaseVO> pages = distributionParcelListService.getStockDataBase(distributionParcelList);
return R.data(pages);
}
/**
* 在库订单包件清单 自定义分页
*/

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java

@ -18,6 +18,7 @@ package com.logpm.distribution.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.vo.DistributionParcelListBaseVO;
import com.logpm.distribution.vo.DistributionParcelListVO;
import com.logpm.distribution.excel.DistributionParcelListExcel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -70,4 +71,6 @@ public interface DistributionParcelListMapper extends BaseMapper<DistributionPar
* @return
*/
Page<DistributionParcelListEntity> getPageVOList(Page<DistributionParcelListVO> objectPage, Long id);
List<DistributionParcelListBaseVO> getStockDataBase(@Param("param") DistributionParcelListEntity parcelListEntity);
}

17
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml

@ -38,7 +38,22 @@
<select id="selectDistributionParcelListPage" resultMap="distributionParcelListResultMap">
select * from logpm_distribution_parcel_list where is_deleted = 0
</select>
<select id="getStockDataBase" resultType="com.logpm.distribution.vo.DistributionParcelListBaseVO">
select ldsa.waybill_number waybillNumber,ldsa.service_number serviceNumber,ldsa.order_code orderCode,ldsa.mall_name mallName,ldsa.warehouse ,ldsa.brand ,
ldsa.type_service typeService,ldsa.dealer_name dealerName,ldsa.dealer_code dealerCode,ldsa.train_number trainNumber,
ldsa.factory_train factoryTrain,ldsa.send_warehouse_name sendWarehouseName,ldsa.hand_quantity handQuantity,ldsa.delivery_quantity deliveryQuantity,
ldsa.signin_quantity signinQuantity,(
select count(*)
from logpm_distribution_parcel_list
where stock_article_id = #{param.stockArticleId} and order_package_freeze_status = '20'
) frozenQuantity
from logpm_distribution_stock_article ldsa
where ldsa.is_deleted = '0' and ldsa.order_code in (
select DISTINCT ldpl.order_code
from logpm_distribution_parcel_list ldpl
where ldpl.stock_article_id = #{param.stockArticleId} and ldpl.is_deleted = '0'
)
</select>
<select id="exportDistributionParcelList" resultType="com.logpm.distribution.excel.DistributionParcelListExcel">
SELECT * FROM logpm_distribution_parcel_list ${ew.customSqlSegment}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java

@ -18,6 +18,7 @@ package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.vo.DistributionParcelListBaseVO;
import com.logpm.distribution.vo.DistributionParcelListVO;
import com.logpm.distribution.excel.DistributionParcelListExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -75,4 +76,5 @@ public interface IDistributionParcelListService extends BaseService<Distribution
*/
void updateOrderStatus(String orderPackageCode,String type);
List<DistributionParcelListBaseVO> getStockDataBase(Map<String, Object> distributionParcelList);
}

22
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java

@ -16,15 +16,20 @@
*/
package com.logpm.distribution.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.excel.DistributionParcelListExcel;
import com.logpm.distribution.mapper.DistributionParcelListMapper;
import com.logpm.distribution.service.IDistributionParcelListService;
import com.logpm.distribution.vo.DistributionParcelListBaseVO;
import com.logpm.distribution.vo.DistributionParcelListVO;
import com.logpm.distribution.vo.PackageStockupVO;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.system.cache.DictBizCache;
import org.springframework.stereotype.Service;
import java.util.List;
@ -101,4 +106,21 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
}
/**
*
* @param distributionParcelList
* @return
*/
@Override
public List<DistributionParcelListBaseVO> getStockDataBase(Map<String, Object> distributionParcelList) {
DistributionParcelListEntity parcelListEntity = JSONObject.parseObject(JSONObject.toJSONString(distributionParcelList), DistributionParcelListEntity.class);
List<DistributionParcelListBaseVO> stockDataBase = baseMapper.getStockDataBase(parcelListEntity);
stockDataBase.forEach( i ->{
if(StringUtils.isNotBlank(i.getTypeService())){
i.setTypeServiceName(DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE,i.getTypeService()));
}
});
return stockDataBase;
}
}

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionStockArticleWrapper.java

@ -56,6 +56,7 @@ public class DistributionStockArticleWrapper extends BaseEntityWrapper<Distribut
distributionStockupVO.setReservationStatusName(DictBizCache.getValue(DictBizConstant.ORDER_RESERVATION_STATUS,entity.getReservationStatus()));
distributionStockupVO.setStockupStatusName(DictBizCache.getValue(DictBizConstant.STOCKUP_STATUS,entity.getStockupStatus()));
distributionStockupVO.setCreateUserName(userCliient.userInfoById(distributionStockupVO.getCreateUser()).getData().getName());
distributionStockupVO.setOrderReceiveStatusName(DictBizCache.getValue(DictBizConstant.ORDER_RECEIVE_STATUS,entity.getOrderReceiveStatus()));
return distributionStockupVO;
}

Loading…
Cancel
Save