Browse Source

Merge branch 'dev' into pre-production

newStockUp
zhenghaoyu 2 years ago
parent
commit
f0db75d99e
  1. 4
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DisStockListVO.java
  2. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/PackageStockupVO.java
  3. 122
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationSheetThree.java
  4. 69
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationSheetTwo.java
  5. 6
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAreaMapper.java
  6. 93
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAreaMapper.xml
  7. 25
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsAreaServiceImpl.java
  8. 68
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java
  9. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/wrapper/WarehouseGoodsAreaWrapper.java
  10. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  11. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistrilbutionBillLadingController.java
  12. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java
  13. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  14. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  15. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml
  16. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java
  17. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java
  18. 93
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DisStockListDetailServiceImpl.java
  19. 26
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  20. 17
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  21. 10
      blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java
  22. 29
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseUpdownTypeApiController.java
  23. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/UpdownTypeDTO.java
  24. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

4
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DisStockListVO.java

@ -15,7 +15,7 @@ public class DisStockListVO {
private String cargoUnit; //单位
private String stockPackageCode; //包条码
private String brandName; //品牌
private String stockListId; //库存品ID
private String reservationId; //预约ID
private Long stockListId; //库存品ID
private Long reservationId; //预约ID
}

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/PackageStockupVO.java

@ -23,6 +23,8 @@ public class PackageStockupVO implements Serializable {
private String scaned;//备货
private String materialName;//物料名称
private String trayCode;//托盘名称
private String allocationTitle;//货位名称
private Long scanId;//扫码记录id

122
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationSheetThree.java

@ -0,0 +1,122 @@
package com.logpm.basicdata.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.io.Serializable;
/**
* 车辆照片信息表 Excel实体类
*
* @author lmy
* @since 2023-09-11
*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class BasicdatavisualizationSheetThree implements Serializable {
/**
* 订单自编号
*/
@ColumnWidth(30)
@ExcelProperty("订单自编号")
private String orderCode;
/**
* 包条码
*/
@ColumnWidth(40)
@ExcelProperty("包条码")
private String orderPackageCode;
/**
* 物料编码
*/
@ColumnWidth(30)
@ExcelProperty("物料编码")
private String materialCode;
/**
* 物料名称
*/
@ColumnWidth(30)
@ExcelProperty("物料名称")
private String materialName;
/**
* 托盘码
*/
@ColumnWidth(30)
@ExcelProperty("托盘码")
private String trayCode;
/**
* 库位号
*/
@ColumnWidth(40)
@ExcelProperty("库位号")
private String positionInfo;
/**
* 一级品类
*/
@ColumnWidth(40)
@ExcelProperty("一级品类")
private String firsts;
/**
* 一级品类编码
*/
@ColumnWidth(40)
@ExcelProperty("一级品类编码")
private String firstsCode;
/**
* 二级品类
*/
@ColumnWidth(40)
@ExcelProperty("二级品类")
private String second;
/**
* 二级品类编码
*/
@ColumnWidth(40)
@ExcelProperty("二级品类编码")
private String secondCode;
/**
* 三级品类
*/
@ColumnWidth(30)
@ExcelProperty("三级品类")
private String thirdProduct;
/**
* 三级品类编码
*/
@ColumnWidth(30)
@ExcelProperty("三级品类编码")
private String thirdCode;
/**
* 上架时间
*/
@ColumnWidth(20)
@ExcelProperty("上架时间")
private String createTime;
/**
* 上架人
*/
@ColumnWidth(20)
@ExcelProperty("上架人")
private String createUser;
}

69
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationSheetTwo.java

@ -0,0 +1,69 @@
package com.logpm.basicdata.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.io.Serializable;
/**
* 车辆照片信息表 Excel实体类
*
* @author lmy
* @since 2023-09-11
*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class BasicdatavisualizationSheetTwo implements Serializable {
/**
* 库位号
*/
@ColumnWidth(40)
@ExcelProperty("库位号")
private String positionInfo;
/**
* 一级品类
*/
@ColumnWidth(40)
@ExcelProperty("一级品类")
private String firsts;
/**
* 二级品类
*/
@ColumnWidth(40)
@ExcelProperty("二级品类")
private String second;
/**
* 三级品类
*/
@ColumnWidth(30)
@ExcelProperty("三级品类")
private String thirdProduct;
/**
* 订单自编号
*/
@ColumnWidth(30)
@ExcelProperty("订单自编号")
private String orderCode;
/**
* 物料名称
*/
@ColumnWidth(30)
@ExcelProperty("物料名称")
private String materialName;
/**
* 数量
*/
@ColumnWidth(20)
@ExcelProperty("数量")
private String num;
}

6
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAreaMapper.java

@ -21,6 +21,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.entity.BasicdataGoodsAreaEntity;
import com.logpm.basicdata.excel.BasicdataGoodsAreaexportExcel;
import com.logpm.basicdata.excel.BasicdatavisualizationSheetOne;
import com.logpm.basicdata.excel.BasicdatavisualizationSheetThree;
import com.logpm.basicdata.excel.BasicdatavisualizationSheetTwo;
import com.logpm.basicdata.vo.BasicdataGoodsAreaVO;
import com.logpm.basicdata.vo.BasicdataNodeVO;
import org.apache.ibatis.annotations.Param;
@ -74,4 +76,8 @@ public interface BasicdataGoodsAreaMapper extends BaseMapper<BasicdataGoodsAreaE
List<BasicdatavisualizationSheetOne> exportWarehouseByorderId(@Param("areaId") Long areaId);
void sqlMode();
List<BasicdatavisualizationSheetTwo> exportWarehouseByallocation(@Param("areaId") Long areaId);
List<BasicdatavisualizationSheetThree> exportWarehouseByStrip(@Param("areaId") Long areaId);
}

93
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataGoodsAreaMapper.xml

@ -174,25 +174,86 @@
</select>
<select id="exportWarehouseByorderId" resultType="com.logpm.basicdata.excel.BasicdatavisualizationSheetOne">
SELECT orderCode,
materialName,
materialCode,
GROUP_CONCAT(positionInfo SEPARATOR '/') positionInfo,
sum(num) num
materialName,
materialCode,
GROUP_CONCAT(positionInfo SEPARATOR '/') positionInfo,
sum(num) num
FROM (
SELECT ldsa.order_code orderCode,
GROUP_CONCAT(ldpl.material_name SEPARATOR '、') materialName,
GROUP_CONCAT(ldpl.material_code SEPARATOR '、') materialCode,
CONCAT(lwug.position_code, '(', SUM(lwug.num), ')') positionInfo,
SUM(lwug.num) num
FROM logpm_distribution_stock_article ldsa
JOIN logpm_distribution_parcel_list ldpl ON ldpl.stock_article_id = ldsa.id
JOIN logpm_warehouse_updown_goods lwug ON lwug.association_id = ldpl.id
GROUP BY ldsa.order_code,
lwug.position_code
) AS subquery
SELECT ldsa.order_code orderCode,
GROUP_CONCAT(ldpl.material_name SEPARATOR '、') materialName,
GROUP_CONCAT(ldpl.material_code SEPARATOR '、') materialCode,
CONCAT(lwug.position_code, '(', SUM(lwug.num), ')') positionInfo,
SUM(lwug.num) num
FROM logpm_distribution_stock_article ldsa
JOIN logpm_distribution_parcel_list ldpl ON ldpl.stock_article_id = ldsa.id
JOIN logpm_warehouse_updown_goods lwug ON lwug.association_id = ldpl.id
<where>
ldsa.warehouse_id =#{areaId}
</where>
GROUP BY ldsa.order_code,
lwug.position_code
) AS subquery
GROUP BY orderCode
</select>
<select id="sqlMode">
SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
SET
sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
</select>
<select id="exportWarehouseByallocation" resultType="com.logpm.basicdata.excel.BasicdatavisualizationSheetTwo">
SELECT positionInfo,
GROUP_CONCAT(DISTINCT firsts SEPARATOR '、') firsts,
GROUP_CONCAT(DISTINCT SECOND SEPARATOR '、') SECOND,
GROUP_CONCAT(DISTINCT thirdProduct SEPARATOR '、') thirdProduct,
GROUP_CONCAT(DISTINCT orderCode SEPARATOR '、') orderCode,
GROUP_CONCAT(DISTINCT materialName SEPARATOR '、') materialName,
SUM(num) num
FROM (
SELECT lwug.position_code AS positionInfo,
CONCAT(ldpl.firsts, '(', SUM(lwug.num), ')') AS firsts,
CONCAT(ldpl.SECOND, '(', SUM(lwug.num), ')') AS SECOND,
CONCAT(ldpl.third_product, '(', SUM(lwug.num), ')') AS thirdProduct,
CONCAT(ldpl.order_code, '(', SUM(lwug.num), ')') AS orderCode,
CONCAT(ldpl.material_name, '(', SUM(lwug.num), ')') AS materialName,
SUM(lwug.num) AS num
FROM
logpm_warehouse_updown_goods lwug
JOIN logpm_distribution_parcel_list ldpl
ON lwug.association_id = ldpl.id
<where>
ldpl.warehouse_id =#{areaId}
</where>
GROUP BY
lwug.position_code,
ldpl.firsts,
ldpl.SECOND,
ldpl.third_product,
ldpl.order_code,
ldpl.material_name
) AS subquery
GROUP BY positionInfo
</select>
<select id="exportWarehouseByStrip" resultType="com.logpm.basicdata.excel.BasicdatavisualizationSheetThree">
SELECT
ldpl.order_code orderCode,
ldpl.order_package_code orderPackageCode,
ldpl.material_code materialCode,
ldpl.material_name materialName,
lwtg.tray_code trayCode,
lwug.position_code positionInfo,
ldpl.firsts firsts,
ldpl.firsts_code firstsCode,
ldpl.second second,
ldpl.second_code secondCode,
ldpl.third_product thirdProduct,
ldpl.third_code thirdCode,
lwug.create_user createUser,
lwug.create_time createTime
FROM
logpm_warehouse_updown_goods lwug
JOIN logpm_distribution_parcel_list ldpl ON lwug.association_id = ldpl.id
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id
<where>
ldpl.warehouse_id =#{areaId}
</where>
</select>
</mapper>

25
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataGoodsAreaServiceImpl.java

@ -29,10 +29,7 @@ import com.logpm.basicdata.entity.BasicdataGoodsAllocationEntity;
import com.logpm.basicdata.entity.BasicdataGoodsAreaEntity;
import com.logpm.basicdata.entity.BasicdataGoodsShelfEntity;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.excel.BasicdataGoodsAreaExcel;
import com.logpm.basicdata.excel.BasicdataGoodsAreaexportExcel;
import com.logpm.basicdata.excel.BasicdatavisualizationSheetOne;
import com.logpm.basicdata.excel.GoodsAreaSheetInfoBean;
import com.logpm.basicdata.excel.*;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.basicdata.mapper.BasicdataGoodsAllocationMapper;
import com.logpm.basicdata.mapper.BasicdataGoodsAreaMapper;
@ -52,6 +49,8 @@ import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.SpringUtil;
import org.springblade.system.feign.IUserClient;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -91,6 +90,8 @@ public class BasicdataGoodsAreaServiceImpl extends BaseServiceImpl<BasicdataGood
private final IBasicdataWarehouseClient basicdataWarehouseClient;
private final IUserClient userClient;
@Override
public IPage<BasicdataGoodsAreaVO> selectWarehouseGoodsAreaPage(IPage<BasicdataGoodsAreaVO> page, BasicdataGoodsAreaVO basicdataGoodsAreaVO) {
@ -324,10 +325,15 @@ public class BasicdataGoodsAreaServiceImpl extends BaseServiceImpl<BasicdataGood
baseMapper.sqlMode();
//sheetOne
List<BasicdatavisualizationSheetOne> basicdatavisualizationSheetOnes = baseMapper.exportWarehouseByorderId(areaId);
log.info("warehouseGoodsAreaList>>>>>>>>>>>{}",basicdatavisualizationSheetOnes);
//warehouseGoodsAreaList.forEach(warehouseGoodsArea -> {
// warehouseGoodsArea.setTypeName(DictCache.getValue(DictEnum.YES_NO, WarehouseGoodsArea.getType()));
//});
//sheetTwo
List<BasicdatavisualizationSheetTwo> basicdatavisualizationSheetTwos = baseMapper.exportWarehouseByallocation(areaId);
//sheetThree
List<BasicdatavisualizationSheetThree> basicdatavisualizationSheetThrees = baseMapper.exportWarehouseByStrip(areaId);
//转换上架人
for (BasicdatavisualizationSheetThree basicdatavisualizationSheetThree : basicdatavisualizationSheetThrees) {
basicdatavisualizationSheetThree.setCreateUser(userClient.userInfoById(Long.valueOf(basicdatavisualizationSheetThree.getCreateUser())).getData().getName());
}
try {
String fileName = "仓库数据" + DateUtil.time();
response.setContentType("application/vnd.ms-excel");
@ -337,7 +343,8 @@ public class BasicdataGoodsAreaServiceImpl extends BaseServiceImpl<BasicdataGood
// 构造各个sheet页相关信息
List<GoodsAreaSheetInfoBean> goodsAreaSheetInfoBeans = new LinkedList<>();
goodsAreaSheetInfoBeans.add(new GoodsAreaSheetInfoBean("订单自编号维度",BasicdatavisualizationSheetOne.class,basicdatavisualizationSheetOnes));
//goodsAreaSheetInfoBeans.add(new GoodsAreaSheetInfoBean("货区数据表sheet2",BasicdataGoodsAreaexportExcel.class,warehouseGoodsAreaList));
goodsAreaSheetInfoBeans.add(new GoodsAreaSheetInfoBean("货位维度",BasicdatavisualizationSheetTwo.class,basicdatavisualizationSheetTwos));
goodsAreaSheetInfoBeans.add(new GoodsAreaSheetInfoBean("包条维度",BasicdatavisualizationSheetThree.class,basicdatavisualizationSheetThrees));
// EasyExcel.write(response.getOutputStream(), BasicdataGoodsAreaexportExcel.class).sheet("货区数据表").doWrite(warehouseGoodsAreaList);
ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).build();

68
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java

@ -45,9 +45,7 @@ import org.springblade.system.feign.IDeptClient;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.*;
/**
* 仓库 服务实现类
@ -164,28 +162,31 @@ public class BasicdataWarehouseServiceImpl extends BaseServiceImpl<BasicdataWare
@Override
public List<BasicdataWarehouseEntity> getMyWarehouseList() {
Set<Long> deptIds = new HashSet<>();
// 获取当前登陆人
BladeUser user = AuthUtil.getUser();
//查询出部门表
String deptId = user.getDeptId();
List<Dept> userDeptNode = deptClient.getUserDeptNode(Long.parseLong(deptId));
String[] split = deptId.split(",");
for (String s : split) {
List<Dept> userDeptNode = deptClient.getUserDeptNode(Long.parseLong(s));
if (Func.isEmpty(userDeptNode)) {
continue;
} else {
userDeptNode.forEach(u -> {
deptIds.add(u.getId());
});
}
}
List<Long> deptIds = new ArrayList<>();
if (Func.isEmpty(userDeptNode)) {
log.error("userDeptNode用户部门信息有误+{" + userDeptNode + "}");
return null;
} else {
userDeptNode.forEach(u -> {
deptIds.add(u.getId());
});
}
List<BasicdataWarehouseEntity> warehouseEntityList = baseMapper.selectList(Wrappers.<BasicdataWarehouseEntity>query().lambda().in(BasicdataWarehouseEntity::getDepartment, deptIds));
// String json = redis.get(CacheNames.tenantKeyObj(user.getTenantId(), CacheNames.USER_WAREHOUSE_KEY, user.getUserId()));
if (warehouseEntityList.size() <= 1) {
redis.setEx(CacheNames.tenantKeyObj(user.getTenantId(), CacheNames.USER_WAREHOUSE_KEY, user.getUserId()), warehouseEntityList.get(0), 30 * 24 * 60 * 60L);
}
// if (warehouseEntityList.size() <= 1) {
// redis.setEx(CacheNames.tenantKeyObj(user.getTenantId(), CacheNames.USER_WAREHOUSE_KEY, user.getUserId()), warehouseEntityList.get(0), 30 * 24 * 60 * 60L);
// }
return warehouseEntityList;
}
@ -193,18 +194,31 @@ public class BasicdataWarehouseServiceImpl extends BaseServiceImpl<BasicdataWare
public BasicdataWarehouseEntity getMyWarehouseList(String deptId, String tenantId, Long userId) {
//查询出部门表
List<Dept> userDeptNode = deptClient.getUserDeptNode(Long.parseLong(deptId));
// List<Dept> userDeptNode = deptClient.getUserDeptNode(Long.parseLong(deptId));
Set<Long> deptIds = new HashSet<>();
// String deptId = user.getDeptId();
String[] split = deptId.split(",");
for (String s : split) {
List<Dept> userDeptNode = deptClient.getUserDeptNode(Long.parseLong(s));
if (Func.isEmpty(userDeptNode)) {
continue;
} else {
userDeptNode.forEach(u -> {
deptIds.add(u.getId());
});
}
}
List<Long> deptIds = new ArrayList<>();
if (Func.isEmpty(userDeptNode)) {
log.error("userDeptNode用户部门信息有误+{" + userDeptNode + "}");
return null;
} else {
userDeptNode.forEach(u -> {
deptIds.add(u.getId());
});
}
// if (Func.isEmpty(userDeptNode)) {
// log.error("userDeptNode用户部门信息有误+{" + userDeptNode + "}");
// return null;
// } else {
// userDeptNode.forEach(u -> {
// deptIds.add(u.getId());
// });
// }
BasicdataWarehouseEntity warehouseEntity = null;
List<BasicdataWarehouseEntity> warehouseEntityList = baseMapper.selectList(Wrappers.<BasicdataWarehouseEntity>query().lambda().in(BasicdataWarehouseEntity::getDepartment, deptIds));
// String json = redis.get(CacheNames.tenantKeyObj(user.getTenantId(), CacheNames.USER_WAREHOUSE_KEY, user.getUserId()));

5
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/wrapper/WarehouseGoodsAreaWrapper.java

@ -17,6 +17,7 @@
package com.logpm.basicdata.wrapper;
import com.logpm.basicdata.vo.BasicdataGoodsAreaVO;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
@ -33,6 +34,7 @@ import java.util.Objects;
* @since 2023-08-08
*/
@Slf4j
public class WarehouseGoodsAreaWrapper extends BaseEntityWrapper<BasicdataGoodsAreaVO, BasicdataGoodsAreaVO> {
IUserClient userCliient = SpringUtil.getBean(IUserClient.class);
public static WarehouseGoodsAreaWrapper build() {
@ -42,7 +44,10 @@ public class WarehouseGoodsAreaWrapper extends BaseEntityWrapper<BasicdataGoodsA
@Override
public BasicdataGoodsAreaVO entityVO(BasicdataGoodsAreaVO warehouseWaybill) {
BasicdataGoodsAreaVO basicdataGoodsAreaVO = Objects.requireNonNull(BeanUtil.copy(warehouseWaybill, BasicdataGoodsAreaVO.class));
log.info("##############basicdataGoodsAreaVO={}",basicdataGoodsAreaVO);
log.info("##############userCliient={}",userCliient);
basicdataGoodsAreaVO.setCreateUserName(userCliient.userInfoById(basicdataGoodsAreaVO.getCreateUser()).getData().getName());
basicdataGoodsAreaVO.setAreaTypeName(DictBizCache.getValue(DictBizConstant.AREA_TYPE,basicdataGoodsAreaVO.getAreaType()));
return basicdataGoodsAreaVO;
}

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java

@ -250,7 +250,7 @@ public class DistributionStockupAppController extends BladeController {
Long stockupId = stockupDTO.getStockupId();//备货任务Id
Integer orderStatus = stockupDTO.getOrderStatus();//1 客户订单 2库存品
// String allocation = stockupDTO.getAllocation();
Long allocationId = stockupDTO.getAllocationId(); //货位
Long trayId = stockupDTO.getTrayId(); //托盘Id
if (ObjectUtils.isNull(stockupId)) {
@ -274,7 +274,7 @@ public class DistributionStockupAppController extends BladeController {
DistributionStockupOrderInfoVO infoVO = distributionStockupService.selectOrderInfoSelf(reservationId,stockArticleId,stockupId,trayId);
return R.data(infoVO);
} else {
DistributionStockupOrderInfoVO infoVO = distributionStockupService.selectOrderInfo(reservationId, stockArticleId, stockupId, trayId);
DistributionStockupOrderInfoVO infoVO = distributionStockupService.selectOrderInfo(reservationId, stockArticleId, stockupId, trayId,allocationId);
return R.data(infoVO);
}

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistrilbutionBillLadingController.java

@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.logpm.distribution.dto.DistrilbutionBillLadingDTO;
import com.logpm.distribution.entity.DistrilbutionBillLadingEntity;
import com.logpm.distribution.excel.DistrilbutionBillLadingExcel;
@ -32,6 +33,7 @@ import com.logpm.distribution.wrapper.DistrilbutionBillLadingWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import kotlin.Suppress;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.DictBizConstant;
@ -251,7 +253,7 @@ public class DistrilbutionBillLadingController extends BladeController {
* 提货单 新增或修改
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperationSupport(order = 1)
@ApiOperation(value = "新增或修改", notes = "传入distrilbutionBillLading")
public R submit(@Valid @RequestBody DistrilbutionBillLadingDTO distrilbutionBillLading) {
return R.status(distrilbutionBillLadingService.ownSaveOrUpdate(distrilbutionBillLading));

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java

@ -29,6 +29,7 @@ public class StockupDTO implements Serializable {
private String descriptionGoods;//物料名称
private String allocation;//库位信息
private Long allocationId;//库位信息ID
private String pallet;//托盘

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

@ -195,10 +195,12 @@
and CONCAT(ldpl.cargo_title,'-',ldpl.shelf_title,'-',ldpl.goods_allocation) = #{allocation}
and ldpl.pallet = #{pallet}
and ldr.is_deleted = 0 -->
select ldpl.order_code orderCode,ldpl.order_package_code packageBarCode, 1 goodsType,ldrp.parce_list_id parceListId,ldpl.material_name materialName
select ldpl.order_code orderCode,ldpl.order_package_code packageBarCode, 1 goodsType,ldrp.parce_list_id parceListId,ldpl.material_name materialName,
lwug.allocation_title allocationTitle,lwtg.tray_code trayCode
from logpm_distribution_reservation_package ldrp
LEFT JOIN logpm_distribution_parcel_list ldpl on ldrp.parce_list_id = ldpl.id
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id =ldrp.parce_list_id and lwtg.association_type = '3'
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id =ldrp.parce_list_id and lwug.association_type = '3'
<where>
ldrp.reservation_id = #{reservationId} and ldrp.stock_article_id = #{stockArticleId} and ldrp.packet_bar_status in (1,3)
<if test="trayId != null and trayId != ''"> and lwtg.tray_id = #{trayId}</if>

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml

@ -85,7 +85,7 @@
</select>
<select id="getInventoryOwnSelf" resultType="com.logpm.distribution.vo.DistributionStockupVO">
select DISTINCT ldsii.sku,ldsii.cargo_unit cargoUnit,lds.stockup_status stockupStatus,lds.stockup_date stockupDate,lds.stockup_area stockupArea,ldsii.description_goods descriptionGoods
,lddd.quantity reservationNum,ldsii.order_code orderCode,lddd.stock_list_id stockListId,lddd.bill_lading_id billLadingId,
,lddd.quantity reservationNum,ldsii.order_code orderCode,lddd.stock_list_id stockListId,lddd.bill_lading_id billLadingId,lddd.id stocklist,
(
select GROUP_CONCAT(DISTINCT tray_code)
from logpm_warehouse_tray_goods
@ -162,19 +162,21 @@
where ds.id = lds.id
) customer,
(
select GROUP_CONCAT(DISTINCT IFNULL( ldpl.goods_allocation , '') SEPARATOR ',')
select GROUP_CONCAT(DISTINCT lwug.position_code )
from logpm_distribution_stockup ds
LEFT JOIN logpm_distribution_stockup_info ldsi on ds.id = ldsi.stockup_id
LEFT JOIN logpm_distribution_reservation_package ldrp on ldrp.reservation_id = ldsi.reservation_id and ldrp.packet_bar_status in (1,3)
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.id = ldrp.parce_list_id
LEFT JOIN logpm_warehouse_updown_goods lwug on ldpl.id = lwug.association_id
where ds.id = lds.id
) warehouseArea ,
(
select GROUP_CONCAT(DISTINCT IFNULL( ldpl.pallet , '') SEPARATOR ',')
select GROUP_CONCAT(DISTINCT lwtg.tray_code)
from logpm_distribution_stockup ds
LEFT JOIN logpm_distribution_stockup_info ldsi on ds.id = ldsi.stockup_id
LEFT JOIN logpm_distribution_reservation_package ldrp on ldrp.reservation_id = ldsi.reservation_id and ldrp.packet_bar_status in (1,3)
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.id = ldrp.parce_list_id
LEFT JOIN logpm_warehouse_tray_goods lwtg on ldpl.id = lwtg.association_id
where ds.id = lds.id
) trays,
(

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml

@ -90,7 +90,7 @@
</where>
</select>
<select id="selectDistrilbutionBillSelf" resultType="com.logpm.distribution.vo.DistributionStockupOrderListVO">
select DISTINCT CONCAT(lwug.area_title,'-',lwug.shelf_title,'-',lwug.allocation_title ) allocation , lwtg.tray_code pallet,lwug.area_id areaId,
select DISTINCT CONCAT( lwug.position_code ) allocation , lwtg.tray_code pallet,lwug.area_id areaId,
lwug.shelf_id shelfId,lwug.allocation_id allocationId,lwtg.tray_id trayId,ldpl.order_code orderCode,ldpl.stock_article_id stockArticleId ,
(
select COUNT(id)

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

@ -18,7 +18,6 @@ package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.excel.DistributionParcelListExcel;
import com.logpm.distribution.vo.DistributionParcelListBaseVO;
@ -56,7 +55,7 @@ public interface IDistributionParcelListService extends BaseService<Distribution
boolean submitNumByOrderIdAndName(Long articleId, String productName, Integer num);
List<PackageStockupVO> selectOrderInfoList(Long reservationId, Long stockArticleId, Long allocation,Long trayId);
List<PackageStockupVO> selectOrderInfoList(Long reservationId, Long stockArticleId, Long stockupId,Long trayId);
List<String> selectWarehouseAreaByReservationId(Long reservationId);

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java

@ -72,14 +72,16 @@ public interface IDistributionStockupService extends BaseService<DistributionSto
/**
* 查询已经备货的列表
*
* @param typeService
* @param reservationId
* @param stockArticleId
* @param stockupId
* @param trayId
* @param typeService
* @param allocation
* @return
*/
DistributionStockupOrderInfoVO selectOrderInfo(Long reservationId, Long stockArticleId, Long stockupId,Long trayId);
DistributionStockupOrderInfoVO selectOrderInfo(Long reservationId, Long stockArticleId, Long stockupId,Long trayId,Long allocation);
/**
* 自提备货客户包件数据查询

93
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DisStockListDetailServiceImpl.java

@ -25,20 +25,21 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.basic.entity.BasicPrintTemplateEntity;
import com.logpm.basic.feign.IBasicPrintTemplateClient;
import com.logpm.distribution.entity.DisStockListDetailEntity;
import com.logpm.distribution.entity.DistributionReservationStocklistEntity;
import com.logpm.distribution.entity.DistributionStockListEntity;
import com.logpm.distribution.entity.*;
import com.logpm.distribution.excel.DisStockListDetailExcel;
import com.logpm.distribution.mapper.DisStockListDetailMapper;
import com.logpm.distribution.service.IDisStockListDetailService;
import com.logpm.distribution.service.IDistributionReservationStocklistService;
import com.logpm.distribution.service.IDistributionStockListService;
import com.logpm.distribution.mapper.DistributionDeliveryDetailsMapper;
import com.logpm.distribution.mapper.DistributionReservationMapper;
import com.logpm.distribution.mapper.DistrilbutionBillStockMapper;
import com.logpm.distribution.service.*;
import com.logpm.distribution.vo.DisStockListDetailVO;
import com.logpm.distribution.vo.DisStockListVO;
import com.logpm.distribution.vo.DistributionStockArticleQRCodeVO;
import com.logpm.distribution.vo.OrderPackgeCodeDataVO;
import lombok.AllArgsConstructor;
import org.springblade.common.constant.DistributionTypeConstant;
import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant;
import org.springblade.common.constant.stockup.StockupStatusConstant;
import org.springblade.common.utils.QRCodeUtil;
import org.springblade.common.utils.TemplateUtil;
import org.springblade.core.log.exception.ServiceException;
@ -62,7 +63,12 @@ import java.util.Map;
public class DisStockListDetailServiceImpl extends BaseServiceImpl<DisStockListDetailMapper, DisStockListDetailEntity> implements IDisStockListDetailService {
private final IDistributionStockListService distributionStockListService ;
private final IDistributionStockArticleService distributionStockArticleService ;
private final IDistributionStockupInfoService distributionStockupInfoService ;
private final IDistributionReservationStocklistService distributionReservationStocklistService ;
private final DistributionReservationMapper distributionReservationService ;
private final DistrilbutionBillStockMapper distrilbutionBillStockService ;
private final DistributionDeliveryDetailsMapper distributionDeliveryDetailsMapper ;
private final IBasicPrintTemplateClient basicPrintTemplateClient;
@ -109,8 +115,8 @@ public class DisStockListDetailServiceImpl extends BaseServiceImpl<DisStockListD
disStockListVO.setOrderCode(byId.getOrderCode());
disStockListVO.setDescriptionGoods(byId.getDescriptionGoods());
disStockListVO.setBrandName(byId.getBrandName());
disStockListVO.setStockListId(disStockListVO.getStockListId());
disStockListVO.setReservationId(disStockListVO.getReservationId());
disStockListVO.setStockListId(dis.getStockListId());
disStockListVO.setReservationId(dis.getReservationId());
list.add(disStockListVO);
}
);
@ -145,6 +151,26 @@ public class DisStockListDetailServiceImpl extends BaseServiceImpl<DisStockListD
log.error("参数异常:+{" + qrCode + "}");
throw new ServiceException("服务器正忙!!!");
}
String reservationId = (String) disStockListDetail.get("reservationId");//预约ID
DistributionStockupInfoEntity one = distributionStockupInfoService.getOne(Wrappers.<DistributionStockupInfoEntity>query().lambda()
.eq(DistributionStockupInfoEntity::getReservationId, reservationId)
);
if(one.getStockUpType().equals(DistributionTypeConstant.ziti.getValue())){
//自提
List<DistrilbutionBillStockEntity> list = distrilbutionBillStockService.selectList(Wrappers.<DistrilbutionBillStockEntity>query().lambda()
.eq(DistrilbutionBillStockEntity::getBillLadingId, reservationId)
);
if(list.size() > 0){
DistributionStockArticleEntity byId = distributionStockArticleService.getById(list.get(0).getStockArticleId());
disStockListDetail.put("userName",byId.getConsigneePerson());
disStockListDetail.put("userNameDetail",byId.getCustomerAddress());
}
}else{
//商,市
DistributionReservationEntity byId = distributionReservationService.selectById(reservationId);
disStockListDetail.put("userName",byId.getConsignee());
disStockListDetail.put("userNameDetail",byId.getDeliveryAddress());
}
//单个
String filename = QRCodeUtil.createCodeToFile(qrCode);
disStockListDetail.put("img", QRCodeUtil.getEmpAutograph(filename));
@ -189,17 +215,31 @@ public class DisStockListDetailServiceImpl extends BaseServiceImpl<DisStockListD
if(ObjectUtils.isNull(idArrays)){
throw new ServiceException("参数错误");
}
//判断服务类型
for (String id : idArrays) {
DistributionReservationStocklistEntity byId = distributionReservationStocklistService.getById(id);
List<DisStockListDetailEntity> disStockLists = baseMapper.selectList(Wrappers.<DisStockListDetailEntity>query().lambda()
.eq(DisStockListDetailEntity::getStockListId, byId.getStocklistId())
.eq(DisStockListDetailEntity::getReservationId, byId.getReservationId())
.apply("stock_package_status in (1,3)")
);
disStockLists.forEach(i ->{
data.add(fuzhi(String.valueOf( i.getId())));
});
if(ObjectUtils.isNotNull(byId)){
//商 市
List<DisStockListDetailEntity> disStockLists = baseMapper.selectList(Wrappers.<DisStockListDetailEntity>query().lambda()
.eq(DisStockListDetailEntity::getStockListId, byId.getStocklistId())
.eq(DisStockListDetailEntity::getReservationId, byId.getReservationId())
.apply("stock_package_status in (1,3)")
);
disStockLists.forEach(i ->{
data.add(fuzhi(String.valueOf( i.getId())));
});
}else{
//自
DistributionDeliveryDetailsEntity deliveryDetails = distributionDeliveryDetailsMapper.selectById(id);
List<DisStockListDetailEntity> disStockLists = baseMapper.selectList(Wrappers.<DisStockListDetailEntity>query().lambda()
.eq(DisStockListDetailEntity::getStockListId, deliveryDetails.getStockListId())
.eq(DisStockListDetailEntity::getReservationId, deliveryDetails.getBillLadingId())
.apply("stock_package_status in (1,3)")
);
disStockLists.forEach(i ->{
data.add(fuzhi(String.valueOf( i.getId())));
});
}
}
orderPackgeCodeDataVO.setDataList(data);
return orderPackgeCodeDataVO;
@ -231,6 +271,25 @@ public class DisStockListDetailServiceImpl extends BaseServiceImpl<DisStockListD
Map<String, Object> map = JSONObject.parseObject(JSONObject.toJSONString(disStockListVO), Map.class);
String fileTypeName = QRCodeUtil.createCodeToFile(dis.getStockPackageCode());
map.put("img", QRCodeUtil.getEmpAutograph(fileTypeName));
DistributionStockupInfoEntity one = distributionStockupInfoService.getOne(Wrappers.<DistributionStockupInfoEntity>query().lambda()
.eq(DistributionStockupInfoEntity::getReservationId, dis.getReservationId())
);
if(one.getStockUpType().equals(DistributionTypeConstant.ziti.getValue())){
//自提
List<DistrilbutionBillStockEntity> list = distrilbutionBillStockService.selectList(Wrappers.<DistrilbutionBillStockEntity>query().lambda()
.eq(DistrilbutionBillStockEntity::getBillLadingId, dis.getReservationId())
);
if(list.size() > 0){
DistributionStockArticleEntity byIds = distributionStockArticleService.getById(list.get(0).getStockArticleId());
map.put("userName",byIds.getConsigneePerson());
map.put("userNameDetail",byIds.getCustomerAddress());
}
}else{
//商,市
DistributionReservationEntity byIdsr = distributionReservationService.selectById(dis.getReservationId());
map.put("userName",byIdsr.getConsignee());
map.put("userNameDetail",byIdsr.getDeliveryAddress());
}
return map;
}

26
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -32,21 +32,21 @@ import com.logpm.distribution.dto.*;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO;
import com.logpm.distribution.entity.*;
import com.logpm.distribution.excel.DisStockListDetailExcel;
import com.logpm.distribution.excel.DistributionDeliveryListExcel;
import com.logpm.distribution.mapper.*;
import com.logpm.distribution.service.*;
import com.logpm.distribution.vo.*;
import com.logpm.distribution.vo.app.*;
import com.logpm.distribution.wrapper.*;
import com.logpm.distribution.wrapper.DistributionDeliveryListWrapper;
import com.logpm.distribution.wrapper.DistributionParcelListWrapper;
import com.logpm.distribution.wrapper.DistributionReservationWrapper;
import com.logpm.distribution.wrapper.DistributionStockArticleWrapper;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang.StringUtils;
import org.jetbrains.annotations.NotNull;
import org.springblade.common.constant.DistributionTypeConstant;
import org.springblade.common.constant.Inventory.InventoryLoadingStatusConstant;
import org.springblade.common.constant.Inventory.InventoryPackageStatusConstant;
import org.springblade.common.constant.Inventory.InventorySigningStatusConstant;
import org.springblade.common.constant.delivery.DeliveryLoadingStatusConstant;
import org.springblade.common.constant.delivery.DeliveryStatusConstant;
import org.springblade.common.constant.loading.LoadingIsInsertConstant;
@ -68,6 +68,7 @@ import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.system.cache.DictBizCache;
import org.springblade.system.feign.IDictBizClient;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@ -1569,15 +1570,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//判断当前登录人是否为司机
List<DistributionAppDeliveryListVO> distributionAppDeliveryListVOS = new ArrayList<>();
boolean delivery = false;
if (roleId.contains(",")) {
String[] split = roleId.split(",");
for (int i = 0; i < split.length; i++) {
R<String> value = dictBizClient.getValue("role_class", split[i]);
if (value.getData().trim().equals("delivery_driver")) {
delivery = true;
}
}
}
String value1 = DictBizCache.getValue("role_class", "delivery_driver");
if(roleId.contains(value1)) delivery = true;
// R<String> value = dictBizClient.getValue("role_class", roleId);
if (delivery) {
//查询当前登录人的配送任务
@ -2979,6 +2975,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
);
}
//修改主表状态
distributionDeliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.peisongzhong.getValue());
baseMapper.updateById(distributionDeliveryListEntity);
return R.status(b);
}

17
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -40,7 +40,6 @@ import com.logpm.warehouse.feign.IWarehouseTaryAllocationClient;
import com.logpm.warehouse.feign.IWarehouseTrayGoodsClient;
import org.springblade.common.constant.CodeDesEnum;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.order.OrderStockupStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStockupStatusConstant;
import org.springblade.common.constant.stocklist.StockLockingStatusConstant;
import org.springblade.common.constant.stocklist.StockSignfoStatusConstant;
@ -505,7 +504,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
}
@Override
public DistributionStockupOrderInfoVO selectOrderInfo(Long reservationId, Long stockArticleId, Long stockupId, Long trayId) {
public DistributionStockupOrderInfoVO selectOrderInfo(Long reservationId, Long stockArticleId, Long stockupId, Long trayId, Long allocation) {
//查询客户信息
DistributionReservationEntity reservationEntity = distributionReservationService.getById(reservationId); //预约信息
//通过订单id和预约id,托盘信息查询对应的包件列表
@ -513,16 +512,24 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
int size = list.size(); //数量
Integer scanNum = 0;
DistributionStockupEntity byId = distributionStockupService.selectById(stockupId);
String allocationTitle = null;
String trayCode = null;
for (PackageStockupVO vo : list) {
List<DistributionStockEntity> list1 = distributionStockService.list(Wrappers.<DistributionStockEntity>query().lambda()
.eq(DistributionStockEntity::getCoding, vo.getPackageBarCode())
.eq(DistributionStockEntity::getParcelListId, vo.getParceListId())
);
allocationTitle = vo.getAllocationTitle();
trayCode = vo.getTrayCode();
if (list1.size() > 0) {
scanNum++; //已扫的数量
vo.setScanId(list1.get(0).getId());
vo.setIsScanStr("1");
vo.setIsScan(1);
vo.setIsScanStr("是");
}else{
vo.setIsScan(2);
vo.setIsScanStr("否");
}
//查询包件下面有没有具体的包件详情
@ -539,8 +546,8 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
vo.setPlanNum(size); //计划件数
vo.setScanNum(scanNum); //备货件数
vo.setStockupArea(byId.getStockupArea()); //备货区
// vo.setWarehouseArea(stockupId); //库位
// vo.setTrays(pallet); //托盘
vo.setWarehouseArea(allocationTitle); //库位
vo.setTrays(trayCode); //托盘
vo.setPackageList(list); //
return vo;
}

10
blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java

@ -484,6 +484,8 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
distributionStockArticleEntity.setOrderStatus(OrderStatusConstant.bufenruku.getValue());
distributionStockArticleEntity.setOrderReceiveStatus(OrderReceiveStatusConstant.bufenshouhuo.getValue());
distributionStockArticleEntity.setWarehouseEntryTime(date);
id = distributionStockArticleClient.addData(distributionStockArticleEntity);
distributionStockArticleEntity.setId(id);
if (id == 0) {
@ -571,7 +573,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
*/
private void saveOrderPackage(String unitNo, DistributionStockArticleEntity distributionStockArticleEntity, BasicdataWarehouseEntity basicdataWarehouseEntity, String waybillNo) {
DistributionParcelListEntityVO vo = advanceDetailClient.getByUnitNo(unitNo);
WarehouseWaybillEntity warehouseWaybill = warehouseWaybillClient.findByWaybillNo(waybillNo);
// WarehouseWaybillEntity warehouseWaybill = warehouseWaybillClient.findByWaybillNo(waybillNo);
DistributionParcelListEntity entity = new DistributionParcelListEntity();
BeanUtil.copyProperties(vo, entity);
@ -588,9 +590,9 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
entity.setOrderCode(distributionStockArticleEntity.getOrderCode());
entity.setServiceNumber(distributionStockArticleEntity.getServiceNumber());
entity.setWaybillNumber(waybillNo);
if(ObjectUtil.isNotEmpty(warehouseWaybill)){
entity.setWarehouseId(warehouseWaybill.getId());
}
// if(ObjectUtil.isNotEmpty(warehouseWaybill)){
// entity.setWarehouseId(warehouseWaybill.getId());
// }
// 增加 进销商 名称 编码 发站仓

29
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseUpdownTypeApiController.java

@ -104,6 +104,35 @@ public class WarehouseUpdownTypeApiController {
}
}
// @ResponseBody
// @PostMapping("/orderUpshelfDetail")
// @ApiOperationSupport(order = 1)
// @ApiOperation(value = "已上架订单详情", notes = "传入trayTypeDTO")
// public R upShelfScanAllocation(@RequestBody UpdownTypeDTO updownTypeDTO ) {
// String method = "###########orderUpshelfDetail: ";
// log.info(method + "已上架订单详情 updownTypeDTO={}", updownTypeDTO);
// String orderCode = updownTypeDTO.getOrderCode();
// try{
//
// if(StringUtil.isBlank(orderCode)){
// log.warn(method+"订单编码不能为空 orderCode={}",orderCode);
// return R.fail(403,"订单编码不能为空");
// }
//
// //查询该库位的货物信息
// PositionVO upShelfAllocationVO = warehouseUpdownTypeService.upShelfScanAllocation(allocationId,myCurrentWarehouse.getId());
// return R.data(upShelfAllocationVO);
// }catch (CustomerException e){
// log.warn(e.message);
// return R.fail(e.code,e.message);
// }catch (Exception e){
// log.error(method+"系统异常,联系管理员",e);
// return R.fail(500,"系统异常,联系管理员");
// }
//
// }
@ResponseBody
@PostMapping("/upShelfOrder")
@ApiOperationSupport(order = 1)

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

@ -51,4 +51,6 @@ public class UpdownTypeDTO implements Serializable {
@ApiModelProperty(name = "托盘码列表",notes = "托盘码列表")
private List<String> trayCodes;//托盘码s
private String orderCode;//订单号
}

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

@ -368,7 +368,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
String orderCode = parcelListEntity.getOrderCode();//订单自编码
Long wid = parcelListEntity.getWarehouseId();
if(!wid.equals(warehouseId)){
log.warn("##############orderScanOrderPackageCode: 包件不在当前仓 orderPackageCode={} wid={}",orderPackageCode,wid);
log.warn("##############orderScanOrderPackageCode: 包件不在当前仓 orderPackageCode={} wid={} warehouseId={}",orderPackageCode,wid,warehouseId);
return R.fail(403,"包件不在当前仓");
}

Loading…
Cancel
Save