Browse Source

Merge branch 'dev' into pre-production

newStockUp
pref_mail@163.com 2 years ago
parent
commit
494170fd57
  1. 4
      blade-biz-common/src/main/java/org/springblade/common/constant/CommonConstant.java
  2. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSignforEntity.java
  3. 20
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/print/PrintPreviewVO.java
  4. 38
      blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/oupai/entity/OpSignPictureEntity.java
  5. 1
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/ReCheckTrayListVO.java
  6. 40
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  7. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java
  8. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  9. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java
  10. 143
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  11. 9
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/mapper/OpSignPictureMapper.java
  12. 5
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/mapper/OpSignPictureMapper.xml
  13. 30
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/receiver/OpSignDataHandler.java
  14. 8
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/IOpSignPictureService.java
  15. 20
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OpSignPictureServiceImpl.java
  16. 2
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java
  17. 6
      blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java
  18. 10
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.xml
  19. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayGoodsMapper.xml
  20. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseTrayGoodsLogService.java
  21. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseGoodsAllocationServiceImpl.java
  22. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayGoodsLogServiceImpl.java
  23. 63
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java
  24. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownGoodsLogServiceImpl.java
  25. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownGoodsServiceImpl.java
  26. 35
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

4
blade-biz-common/src/main/java/org/springblade/common/constant/CommonConstant.java

@ -53,14 +53,14 @@ public interface CommonConstant {
// /**
// * 默认缓存文件地址
// */
// String SYSTEMFILEPATH ="/home/java_works/logpm_temp_file/";
String SYSTEMFILEPATH ="/home/java_works/logpm_temp_file/";
/**
* 默认缓存文件地址
*/
String SYSTEMFILEPATH ="F:/logs/";
// String SYSTEMFILEPATH ="F:/logs/";

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionSignforEntity.java

@ -24,7 +24,7 @@ import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
* 签收管理 实体类
* 配送关联预约表--签收 实体类
*
* @author lmy
* @since 2023-06-13

20
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/print/PrintPreviewVO.java

@ -0,0 +1,20 @@
package com.logpm.distribution.vo.print;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
import java.util.Map;
@Data
public class PrintPreviewVO {
@ApiModelProperty(value = "模板ID")
private Long templateId;
@ApiModelProperty(value = "模板内容")
private String templateHtml;
@ApiModelProperty(value = "模板填充内容")
private List<Map> dataList;
}

38
blade-service-api/logpm-factory-api/src/main/java/com/logpm/factory/oupai/entity/OpSignPictureEntity.java

@ -0,0 +1,38 @@
package com.logpm.factory.oupai.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
@Data
@TableName("op_sign_picture")
@ApiModel(value = "OpSignPicture对象", description = "欧派工厂签收图片")
@EqualsAndHashCode(callSuper = true)
public class OpSignPictureEntity extends BaseEntity {
/** 预留1 */
@ApiModelProperty(name = "预留1",notes = "")
private String reserve1 ;
/** 预留2 */
@ApiModelProperty(name = "预留2",notes = "")
private String reserve2 ;
/** 预留3 */
@ApiModelProperty(name = "预留3",notes = "")
private String reserve3 ;
/** 预留4 */
@ApiModelProperty(name = "预留4",notes = "")
private String reserve4 ;
/** 预留5 */
@ApiModelProperty(name = "预留5",notes = "")
private String reserve5 ;
private Long signBillId;//签收单id
private String signBillCode;//签收单号
private String oid;
private String fileUrl;//图片地址
}

1
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/ReCheckTrayListVO.java

@ -9,6 +9,7 @@ public class ReCheckTrayListVO implements Serializable {
private String orderCode;//订单自编码
private String code;//码值
private String waybillNumber;//运单号
private Integer goodsType;//物品类型 1包件 2零担 3库存品
private Integer num;//数量
private Long marketId;//商场id

40
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java

@ -27,6 +27,7 @@ import com.logpm.distribution.excel.DistributionDeliveryListExcel;
import com.logpm.distribution.service.IDistributionDeliveryInfoService;
import com.logpm.distribution.service.IDistributionDeliveryListService;
import com.logpm.distribution.vo.*;
import com.logpm.distribution.vo.print.PrintPreviewVO;
import com.logpm.distribution.wrapper.DistributionDeliveryListWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -146,16 +147,11 @@ public class DistributionDeliveryListController extends BladeController {
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distributionDeliveryList")
public R<DistributionstatisticsnmbVO> statistics(DistributionDeliveryListDTO distributionDeliveryList) {
DistributionstatisticsnmbVO distributionstatisticsnmbVO = distributionDeliveryListService.getNubTotal(distributionDeliveryList);
DistributionstatisticsnmbVO distributionstatisticsnmbVO = distributionDeliveryListService.getNubTotal(distributionDeliveryList);
return R.data(distributionstatisticsnmbVO);
}
// /**
// * 配送管理 装车扫描(单件装车)
// */
@ -167,9 +163,6 @@ public class DistributionDeliveryListController extends BladeController {
// }
/**
* 配送管理 点击发车
*/
@ -177,7 +170,7 @@ public class DistributionDeliveryListController extends BladeController {
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distributionDeliveryList")
public R<Boolean> start(@Valid @RequestBody DistributionDeliveryListDTO distributionDeliveryList) {
Boolean i = distributionDeliveryListService.start(distributionDeliveryList);
Boolean i = distributionDeliveryListService.start(distributionDeliveryList);
return R.data(i);
}
@ -255,7 +248,7 @@ public class DistributionDeliveryListController extends BladeController {
@PostMapping("/oneloading")
@ApiOperationSupport(order = 11)
public R oneloading(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
R msg = distributionDeliveryListService.oneloading(distrilbutionloadingscanDTO);
R msg = distributionDeliveryListService.oneloading(distrilbutionloadingscanDTO);
return msg;
}
@ -313,7 +306,7 @@ public class DistributionDeliveryListController extends BladeController {
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "customArgs")
public R<?> selectStockArticleAtlasInfo(@RequestParam Long id) {
DistributionOrderInfoVO atlasInfo= distributionDeliveryListService.getStockArticleAtlasInfo(id);
DistributionOrderInfoVO atlasInfo = distributionDeliveryListService.getStockArticleAtlasInfo(id);
return R.data(atlasInfo);
}
@ -323,10 +316,11 @@ public class DistributionDeliveryListController extends BladeController {
@GetMapping("/selectDiscussStockArticleInfoList")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "customArgs")
public R<IPage<DistributionStockArticleVO>> selectDiscussStockArticleInfoList(@ApiIgnore @RequestParam Map<String, Object> params, Query query,@ApiIgnore @RequestParam Long deliveryListId ) {
IPage<DistributionStockArticleVO> distributionStockArticle = distributionDeliveryListService.selectDiscussStockArticleInfoList(params,query,deliveryListId);
public R<IPage<DistributionStockArticleVO>> selectDiscussStockArticleInfoList(@ApiIgnore @RequestParam Map<String, Object> params, Query query, @ApiIgnore @RequestParam Long deliveryListId) {
IPage<DistributionStockArticleVO> distributionStockArticle = distributionDeliveryListService.selectDiscussStockArticleInfoList(params, query, deliveryListId);
return R.data(distributionStockArticle);
}
/**
* 修改市配配送计划
*/
@ -344,9 +338,25 @@ public class DistributionDeliveryListController extends BladeController {
@PostMapping("/cancelMarketDeliveryListTask")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "customArgs")
public R<?> cancelDeliveryListTask(@RequestBody Map<String,Object> distributionDeliveryListDTO) {
public R<?> cancelDeliveryListTask(@RequestBody Map<String, Object> distributionDeliveryListDTO) {
R<?> result = distributionDeliveryListService.cancelMarketDeliveryListTask(distributionDeliveryListDTO);
return result;
}
@PostMapping("/printBatch")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "批量打印", notes = "ids")
public R<PrintPreviewVO> printBatch(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
try {
PrintPreviewVO printPreviewVOS = distributionDeliveryListService.printBatch(ids);
return R.data(printPreviewVOS);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java

@ -196,4 +196,11 @@ public interface DistributionReservationMapper extends BaseMapper<DistributionRe
* @return
*/
DistributionStockupEntity selectStockup(@Param("reservationId")Long id);
/**
* 根基配送ID 查询预约单信息
* @param id
* @return
*/
List<DistributionReservationEntity> findByDeliveryId(@Param("id")Long id);
}

13
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml

@ -31,8 +31,8 @@
<result column="reservation_status" property="reservationStatus"/>
<result column="order_source" property="orderSource"/>
<result column="stockup_status" property="stockupStatus"/>
<result column="goods_shelf_id" property="goodsAreaId"/>
<result column="goods_shelf_name" property="goodsAreaName"/>
<!-- <result column="goods_shelf_id" property="goodsAreaId"/>-->
<!-- <result column="goods_shelf_name" property="goodsAreaName"/>-->
<result column="reservation_num" property="reservationNum"/>
<result column="reservation_code" property="reservationCode"/>
<result column="period_of_time" property="periodOfTime"/>
@ -877,4 +877,13 @@
ldsi.reservation_id = #{reservationId}
</select>
<select id="findByDeliveryId"
resultMap="reservationResultMap">
select ldr.* from logpm_distribution_reservation ldr LEFT JOIN logpm_distribution_signfor lds on lds.reservation_id=ldr.id where lds.delivery_id=#{id}
</select>
</mapper>

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java

@ -29,6 +29,7 @@ import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.excel.DistributionDeliveryListExcel;
import com.logpm.distribution.vo.*;
import com.logpm.distribution.vo.app.*;
import com.logpm.distribution.vo.print.PrintPreviewVO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
@ -218,4 +219,11 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
* @return
*/
List<DistributionReservationStocklistVO> selectDistributionDeliveryinventory(IPage<Object> page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO);
/**
* 生成配送的打印模型
* @param ids
* @return
*/
PrintPreviewVO printBatch(String ids) throws Exception;
}

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

@ -16,6 +16,7 @@
*/
package com.logpm.distribution.service.impl;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -23,6 +24,8 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
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.basicdata.entity.BasicdataDriverArteryEntity;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataDriverArteryClient;
@ -37,6 +40,7 @@ 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.vo.print.PrintPreviewVO;
import com.logpm.distribution.wrapper.DistributionDeliveryListWrapper;
import com.logpm.distribution.wrapper.DistributionParcelListWrapper;
import com.logpm.distribution.wrapper.DistributionReservationWrapper;
@ -55,11 +59,14 @@ import org.springblade.common.constant.order.OrderStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageLoadingStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageReservationStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant;
import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant;
import org.springblade.common.constant.reservation.*;
import org.springblade.common.constant.stockup.StockAssignStatusConstant;
import org.springblade.common.constant.stockup.StockupStatusConstant;
import org.springblade.common.serviceConstant.ServiceConstant;
import org.springblade.common.utils.CommonUtil;
import org.springblade.common.utils.TemplateUtil;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
@ -68,6 +75,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.core.tool.utils.ObjectUtil;
import org.springblade.system.cache.DictBizCache;
import org.springblade.system.feign.IDictBizClient;
import org.springframework.beans.BeanUtils;
@ -93,6 +101,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
private final DistributionDeliveryInfoMapper distributionDeliveryInfoMapper;
private final DistributionReservationMapper distributionReservationMapper;
private final IDistributionReservationStockarticleService distributionReservationStockarticleService;
private final IDistributionReservationStocklistService distributionReservationStocklistService;
private final IDistributionReservationPackageService distributionReservationPackageService;
private final DistributionReservationPackageMapper distributionReservationPackageMapper;
private final DistributionParcelListMapper distributionParcelListMapper;
@ -125,6 +134,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
private final IBasicdataWarehouseClient warehouseClient;
private final IDisStockListDetailService disStockListDetailService;
private final DistributionStockListMapper distributionStockListMapper;
private final IBasicPrintTemplateClient basicPrintTemplateClient;
@Override
public IPage<DistributionDeliveryListEntity> selectDistributionDeliveryListPage(IPage<DistributionDeliveryListEntity> page, DistributionDeliveryListDTO distributionDeliveryList) {
@ -1570,7 +1580,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<DistributionAppDeliveryListVO> distributionAppDeliveryListVOS = new ArrayList<>();
boolean delivery = false;
String value1 = DictBizCache.getValue("role_class", "delivery_driver");
if(roleId.contains(value1)) delivery = true;
if (roleId.contains(value1)) delivery = true;
// R<String> value = dictBizClient.getValue("role_class", roleId);
@ -2112,9 +2122,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//查询出这个订单下的包件信息
// List<DistributionReservationPackageEntity> oldPackageList = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationEntity.getId(), reservationStockarticleEntities.get(0).getStockArticleId());
Map<Long, List<DistributionReservationPackageEntity>> oldPackageList = distributionReservationPackageMapper.selectList(Wrappers.<DistributionReservationPackageEntity>query().lambda()
.eq(DistributionReservationPackageEntity::getReservationId, reservationEntity.getId())
.eq(DistributionReservationPackageEntity::getStockArticleId, s.getId())
.ne(DistributionReservationPackageEntity::getPacketBarStatus, ReservationPackageStatusConstant.quxiao.getValue()))
.eq(DistributionReservationPackageEntity::getReservationId, reservationEntity.getId())
.eq(DistributionReservationPackageEntity::getStockArticleId, s.getId())
.ne(DistributionReservationPackageEntity::getPacketBarStatus, ReservationPackageStatusConstant.quxiao.getValue()))
.stream().collect(Collectors.groupingBy(DistributionReservationPackageEntity::getParceListId));
//查看订单包件是否发生变化
List<DistributionParcelListEntity> packageListInfo = s.getPackageListInfo();
@ -3127,4 +3137,129 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// });
return distributionStockListEntities;
}
@Override
public PrintPreviewVO printBatch(String ids) throws Exception {
PrintPreviewVO printPreviewVO = new PrintPreviewVO();
List<Map> data = new ArrayList<>();
BasicPrintTemplateEntity template = basicPrintTemplateClient.getPrintTemplate(PrintTemplateStatusConstant.daiqueren_1.getValue());
if (ObjectUtil.isEmpty(template)) {
throw new ServiceException("模板内容未找到");
}
String html = TemplateUtil.getTemplateByUrl(template.getTemplateUrl());
printPreviewVO.setTemplateHtml(html);
printPreviewVO.setTemplateId(template.getId());
String[] idArray = ids.split(",");
if (ObjectUtils.isNull(idArray)) {
throw new ServiceException("参数错误");
}
for (String id : idArray) {
// 获取需要的数据
Map<String, Object> map = new HashMap<>();
DistributionDeliveryListEntity byId = this.getById(id);
//查询这个配送下面的预约单
List<DistributionReservationEntity> distributionReservationEntityList = distributionReservationMapper.findByDeliveryId(byId.getId());
for (DistributionReservationEntity distributionReservationEntity : distributionReservationEntityList) {
map.put("配送单号", distributionReservationEntity.getReservationCode());
// todo 商场电话是否需要查询商场信息得到电话
map.put("商场电话", distributionReservationEntity.getReservationCode());
map.put("送货日期", DateUtil.format(distributionReservationEntity.getReservationDate(), "yyyy-MM-dd") + " 全天");
map.put("客户名称", distributionReservationEntity.getConsignee());
map.put("客户电话", distributionReservationEntity.getDeliveryPhone());
map.put("送货地址", distributionReservationEntity.getDeliveryAddress());
// 通过预约单查询预约下面的订单 --1 或者 库存品 --2
List<Map<String,Object>> spaclOrderList = buildSpaclOrders(distributionReservationEntity, 1);
map.put("定制品集合", spaclOrderList);
map.put("备注", distributionReservationEntity.getRemarks());
}
map.put("送货司机", byId.getTrainNumber() + "/" + byId.getDriverName());
data.add(map);
}
return printPreviewVO;
}
/**
* 构建预约单下面的订单信息
*
* @param id 预约单ID
* @param i 构建类型 1 表示订单 2 表示库存品
* @return List
*/
private List<Map<String,Object>> buildSpaclOrders(DistributionReservationEntity distributionReservationEntity, int i) {
List<DistributionReservationStocklistEntity> distributionReservationStocklistEntities;
List<DistributionReservationStockarticleEntity> distributionReservationStockarticleEntityList;
List<Map<String,Object>> result = new ArrayList<>();
switch (i) {
case 1:
// 订单
distributionReservationStockarticleEntityList = distributionReservationStockarticleService.lambdaQuery().eq(DistributionReservationStockarticleEntity::getReservationId, distributionReservationEntity.getId()).list();
// 取值
for (DistributionReservationStockarticleEntity distributionReservationStockarticleEntity : distributionReservationStockarticleEntityList) {
Map<String,Object> temp = new HashMap<>();
DistributionStockArticleEntity distributionStockArticleEntity = distributionStockArticleMapper.selectById(distributionReservationStockarticleEntity.getStockArticleId());
temp.put("合同号",distributionStockArticleEntity.getOrderCode());
temp.put("产品名称",distributionStockArticleEntity.getDescriptionGoods());
//todo 单位是否需要查询物料表
temp.put("单位","件");
temp.put("数量",distributionReservationStockarticleEntity.getReservationNum());
temp.put("备货区",null);
//todo 这里还没完成
result.add(temp);
}
break;
case 2:
distributionReservationStocklistEntities = distributionReservationStocklistService.lambdaQuery().eq(DistributionReservationStocklistEntity::getReservationId, distributionReservationEntity.getId()).list();
break;
default:
}
return result;
}
}

9
blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/mapper/OpSignPictureMapper.java

@ -0,0 +1,9 @@
package com.logpm.factory.oupai.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logpm.factory.oupai.entity.OpSignPictureEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface OpSignPictureMapper extends BaseMapper<OpSignPictureEntity> {
}

5
blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/mapper/OpSignPictureMapper.xml

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.factory.oupai.mapper.OpSignPictureMapper">
</mapper>

30
blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/receiver/OpSignDataHandler.java

@ -2,13 +2,11 @@ package com.logpm.factory.oupai.receiver;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.logpm.factory.oupai.entity.OpOrderStatusLogEntity;
import com.logpm.factory.oupai.entity.OpOutGoingOrderEntity;
import com.logpm.factory.oupai.entity.OpSignBillEntity;
import com.logpm.factory.oupai.entity.OpSignPackageEntity;
import com.logpm.factory.oupai.entity.*;
import com.logpm.factory.oupai.service.IOpOutGoingOrderService;
import com.logpm.factory.oupai.service.IOpSignBillService;
import com.logpm.factory.oupai.service.IOpSignPackageService;
import com.logpm.factory.oupai.service.IOpSignPictureService;
import com.rabbitmq.client.Channel;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.RabbitConstant;
@ -41,6 +39,8 @@ public class OpSignDataHandler {
private IOpSignBillService opSignBillService;
@Autowired
private IOpSignPackageService opSignPackageService;
@Autowired
private IOpSignPictureService opSignPictureService;
@RabbitHandler
@ -66,6 +66,7 @@ public class OpSignDataHandler {
String outGoingOrderCode = outGoingOrder.getString("Code");
JSONObject store = valueObject.getJSONObject("Store");
JSONArray packages = valueObject.getJSONArray("Packages");
JSONArray signPictures = valueObject.getJSONArray("SignPictures");
String status = outGoingOrder.getString("Status");
//先查询是否已经有数据存在系统中
OpOutGoingOrderEntity opOutGoingOrderEntity = opOutGoingOrderService.getEntityByCode(outGoingOrderCode);
@ -193,6 +194,27 @@ public class OpSignDataHandler {
signBillId = signBillEntity.getId();
}
// 保存签收图片
for (int t = 0; t < signPictures.size(); t++) {
JSONObject signPicturesJSONObject = signPictures.getJSONObject(t);
String oid = signPicturesJSONObject.getString("Oid");
//先判断库中是否已经存在
OpSignPictureEntity signPictureEntity = opSignPictureService.findEntityByOid(oid);
if(Objects.isNull(signPictureEntity)){
JSONObject data = signPicturesJSONObject.getJSONObject("Data");
signPictureEntity = new OpSignPictureEntity();
signPictureEntity.setSignBillId(signBillId);
signPictureEntity.setSignBillCode(signBillEntity.getCode());
signPictureEntity.setOid(oid);
if(!Objects.isNull(data)){
signPictureEntity.setFileUrl(data.getString("FileUrl"));
}
opSignPictureService.save(signPictureEntity);
}
}
//存入包件数据
for (int j = 0; j < packages.size(); j++) {
JSONObject packagesJSONObject = packages.getJSONObject(j);

8
blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/IOpSignPictureService.java

@ -0,0 +1,8 @@
package com.logpm.factory.oupai.service;
import com.logpm.factory.oupai.entity.OpSignPictureEntity;
import org.springblade.core.mp.base.BaseService;
public interface IOpSignPictureService extends BaseService<OpSignPictureEntity> {
OpSignPictureEntity findEntityByOid(String oid);
}

20
blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OpSignPictureServiceImpl.java

@ -0,0 +1,20 @@
package com.logpm.factory.oupai.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.factory.oupai.entity.OpSignPictureEntity;
import com.logpm.factory.oupai.mapper.OpSignPictureMapper;
import com.logpm.factory.oupai.service.IOpSignPictureService;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
@Service
@AllArgsConstructor
public class OpSignPictureServiceImpl extends BaseServiceImpl<OpSignPictureMapper, OpSignPictureEntity> implements IOpSignPictureService {
@Override
public OpSignPictureEntity findEntityByOid(String oid) {
QueryWrapper<OpSignPictureEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("oid",oid);
return baseMapper.selectOne(queryWrapper);
}
}

2
blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java

@ -138,7 +138,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService {
String url = ouPaiProperties.getUri() + "tims_odata_api/api/odata/SignBill?$filter=Code eq '" + orderCode + "'" +
"&$expand=OutGoingOrder($expand=Warehouse&$expand=Truck)" +
"&$expand=Store($select=Code,Name;$expand=Shop($select=Code,Name))" +
"&$expand=Packages($select=Code,PackageStatus,IsInventory)";
"&$expand=Packages($select=Code,PackageStatus,IsInventory)&$expand=SignPictures($expand=Data($select=FileUrl))";
handleSignBillData(url, event);
return orderCode;

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

@ -495,7 +495,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
}
//保存包件信息
saveOrderPackage(unitNo, distributionStockArticleEntity, basicdataWarehouseEntity, waybillNoNum);
saveOrderPackage(unitNo, distributionStockArticleEntity, basicdataWarehouseEntity, waybillNoNum,operationTime);
String waybillNumber = distributionStockArticleEntity.getWaybillNumber();
if(!waybillNumber.contains(waybillNoNum)){
@ -571,7 +571,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
* @param distributionStockArticleEntity 订单对象
* @param basicdataWarehouseEntity 仓库对象
*/
private void saveOrderPackage(String unitNo, DistributionStockArticleEntity distributionStockArticleEntity, BasicdataWarehouseEntity basicdataWarehouseEntity, String waybillNo) {
private void saveOrderPackage(String unitNo, DistributionStockArticleEntity distributionStockArticleEntity, BasicdataWarehouseEntity basicdataWarehouseEntity, String waybillNo,String operationTime) {
DistributionParcelListEntityVO vo = advanceDetailClient.getByUnitNo(unitNo);
// WarehouseWaybillEntity warehouseWaybill = warehouseWaybillClient.findByWaybillNo(waybillNo);
@ -606,7 +606,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
//进销售
entity.setDealerCode(distributionStockArticleEntity.getDealerCode());
entity.setDealerName(distributionStockArticleEntity.getDealerName());
entity.setWarehouseEntryTimeEnd(distributionStockArticleEntity.getWarehouseEntryTime());
entity.setWarehouseEntryTimeEnd(CommonUtil.StringToDate(operationTime));
// 绑定部门--仓库
if (!Objects.isNull(basicdataWarehouseEntity)) {

10
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseGoodsAllocationMapper.xml

@ -19,10 +19,10 @@
FROM logpm_warehouse_goods_allocation ${ew.customSqlSegment}
</select>
<select id="selectnum" resultType="com.logpm.warehouse.vo.WarehouseGoodsAllocationVO">
SELECT COALESCE(SUM(CASE WHEN association_type = '1' THEN 1 END), 0) orderNum,
COALESCE(SUM(CASE WHEN association_type = '2' THEN 1 END), 0) lessNum,
COALESCE(SUM(CASE WHEN association_type = '3' THEN 1 END), 0) packageNum,
COALESCE(SUM(CASE WHEN association_type = '4' THEN 1 END), 0) inventoryNum
SELECT COALESCE(SUM(CASE WHEN association_type = '1' THEN num END), 0) orderNum,
COALESCE(SUM(CASE WHEN association_type = '2' THEN num END), 0) lessNum,
COALESCE(SUM(CASE WHEN association_type = '3' THEN num END), 0) packageNum,
COALESCE(SUM(CASE WHEN association_type = '4' THEN num END), 0) inventoryNum
FROM logpm_warehouse_updown_goods
where allocation_id = #{id}
and is_deleted = 0
@ -238,7 +238,7 @@
left JOIN logpm_warehouse_updown_goods lwug ON ldsl.material_id = lwug.association_id
left join logpm_basicdata_material lbm on lbm.id =ldsl.material_id
<where>
lwug.association_id is null and ldsl.is_deleted = 0
(ldsl.quantity_stock > lwug.num or lwug.association_id is null) and ldsl.is_deleted = 0
<if test="param.orderCode!=null and param.orderCode !=''">
and ldpl.order_code like concat('%',#{param.orderCode},'%')
</if>

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayGoodsMapper.xml

@ -184,6 +184,7 @@
<select id="getReCheckZeroByTrayTypeId" resultType="com.logpm.warehouse.vo.ReCheckTrayListVO">
select ldsa.order_code orderCode,
ldsa.waybill_number waybillNumber,
2 goodsType,
lwtg.num num,
lwtg.is_fleeing isFleeing,

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

@ -16,5 +16,5 @@ public interface IWarehouseTrayGoodsLogService extends BaseService<WarehouseTray
void saveLogStock(Long materialId,Long marketId, WarehouseTrayTypeEntity trayTypeEntity,String incomingBatch,String materialCode,Integer num, String bindingType, String remark, String palletizingType);
void saveLogByTrayGoodsList(List<WarehouseTrayGoodsEntity> sourceTrayGoodsList, String bindingType, String remark, String palletizingType);
void saveLogByTrayGoodsList(List<WarehouseTrayGoodsEntity> sourceTrayGoodsList, String bindingType, String remark, String palletizingType,Long warehouseId);
}

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseGoodsAllocationServiceImpl.java

@ -207,11 +207,12 @@ public class WarehouseGoodsAllocationServiceImpl extends BaseServiceImpl<Warehou
for (WarehouseStockListZationVO warehouseStockListZationVO : list) {
Integer quantityStock = warehouseStockListZationVO.getQuantityStock();
Long id = warehouseStockListZationVO.getId();
log.info("传入id>>>>>>>>>>>>{}",id);
//查询库位数量
Integer num1 = warehouseUpdownGoodsService.getNumByZation(id);
//查询不在库位的托盘数量
Integer num2 =warehouseTrayGoodsService.getNumByZation(id);
warehouseStockListZationVO.setResidueNumber(quantityStock-(null==num1?0:num1)-(null==num2?0:num2));
//Integer num2 =warehouseTrayGoodsService.getNumByZation(id); -(null==num2?0:num2)
warehouseStockListZationVO.setResidueNumber(quantityStock-(null==num1?0:num1));
}
return page.setRecords(list);
}

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayGoodsLogServiceImpl.java

@ -48,6 +48,7 @@ public class WarehouseTrayGoodsLogServiceImpl extends BaseServiceImpl<WarehouseT
trayGoodsLogEntity.setRemark(remark);
trayGoodsLogEntity.setPalletizingType(palletizingType);
trayGoodsLogEntity.setNum(num);
trayGoodsLogEntity.setWarehouseId(trayTypeEntity.getWarehouseId());
save(trayGoodsLogEntity);
}
@ -66,11 +67,12 @@ public class WarehouseTrayGoodsLogServiceImpl extends BaseServiceImpl<WarehouseT
trayGoodsLogEntity.setMarketId(trayTypeEntity.getMarketId());
trayGoodsLogEntity.setMarketName(trayTypeEntity.getMarketName());
trayGoodsLogEntity.setIncomingBatch(incomingBatch);
trayGoodsLogEntity.setWarehouseId(trayTypeEntity.getWarehouseId());
save(trayGoodsLogEntity);
}
@Override
public void saveLogByTrayGoodsList(List<WarehouseTrayGoodsEntity> sourceTrayGoodsList, String bindingType, String remark, String palletizingType) {
public void saveLogByTrayGoodsList(List<WarehouseTrayGoodsEntity> sourceTrayGoodsList, String bindingType, String remark, String palletizingType,Long warehouseId) {
List<WarehouseTrayGoodsLogEntity> ls = new ArrayList<>();
for (WarehouseTrayGoodsEntity trayGoodsEntity:sourceTrayGoodsList){
WarehouseTrayGoodsLogEntity trayGoodsLogEntity = new WarehouseTrayGoodsLogEntity();
@ -78,6 +80,7 @@ public class WarehouseTrayGoodsLogServiceImpl extends BaseServiceImpl<WarehouseT
trayGoodsLogEntity.setBindingType(bindingType);
trayGoodsLogEntity.setRemark(remark);
trayGoodsLogEntity.setPalletizingType(palletizingType);
trayGoodsLogEntity.setWarehouseId(warehouseId);
ls.add(trayGoodsLogEntity);
}
saveBatch(ls);

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

@ -1544,24 +1544,37 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
return R.fail(403,"该托盘已在其他仓库打托");
}
List<ReCheckTrayListVO> trayListVOS = null;
if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){//订制品打托
trayListVOS = warehouseTrayGoodsService.getReCheckPackageByTrayTypeId(trayTypeId);
List<UpShelfDataVO> listByTrayTypeId = null;
if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){
listByTrayTypeId = warehouseTrayGoodsService.getUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.ARTIFICIAL.equals(type)){
trayListVOS = warehouseTrayGoodsService.getReCheckZeroByTrayTypeId(trayTypeId);
listByTrayTypeId = warehouseTrayGoodsService.getZeroUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.STOCKDATA.equals(type)){
trayListVOS = warehouseTrayGoodsService.getReCheckStockByTrayTypeId(trayTypeId);
listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.STOCKNODATA.equals(type)){
trayListVOS = warehouseTrayGoodsService.getReCheckStockByTrayTypeId(trayTypeId);
}else {
log.warn("##################getEntityByTrayCode: 未知的打托类型");
listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
}
// List<ReCheckTrayListVO> trayListVOS = null;
// if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){//订制品打托
// trayListVOS = warehouseTrayGoodsService.getReCheckPackageByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.ARTIFICIAL.equals(type)){
// trayListVOS = warehouseTrayGoodsService.getReCheckZeroByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.STOCKDATA.equals(type)){
// trayListVOS = warehouseTrayGoodsService.getReCheckStockByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.STOCKNODATA.equals(type)){
// trayListVOS = warehouseTrayGoodsService.getReCheckStockByTrayTypeId(trayTypeId);
// }else {
// log.warn("##################getEntityByTrayCode: 未知的打托类型");
// }
map.put("trayCode",trayCode);
map.put("totalNum",totalNum);
map.put("orderTotalNum",orderTotalNum);
map.put("stockNum",stockNum);
map.put("stockTotalNum",stockTotalNum);
map.put("list",trayListVOS);
map.put("list",listByTrayTypeId);
return R.data(map);
}
@ -1763,24 +1776,35 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
return R.success("托盘已在其他仓库打托");
}
List<ReCheckTrayListVO> trayListVOS = null;
if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){//订制品打托
trayListVOS = warehouseTrayGoodsService.getReCheckPackageByTrayTypeId(trayTypeId);
List<UpShelfDataVO> listByTrayTypeId = null;
if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){
listByTrayTypeId = warehouseTrayGoodsService.getUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.ARTIFICIAL.equals(type)){
trayListVOS = warehouseTrayGoodsService.getReCheckZeroByTrayTypeId(trayTypeId);
listByTrayTypeId = warehouseTrayGoodsService.getZeroUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.STOCKDATA.equals(type)){
trayListVOS = warehouseTrayGoodsService.getReCheckStockByTrayTypeId(trayTypeId);
listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
}else if(PalletProductTypeConstant.STOCKNODATA.equals(type)){
trayListVOS = warehouseTrayGoodsService.getReCheckStockByTrayTypeId(trayTypeId);
}else {
log.warn("##################scanTargetTrayCode: 未知的打托类型");
listByTrayTypeId = warehouseTrayGoodsService.getStockUpListByTrayTypeId(trayTypeId);
}
// List<ReCheckTrayListVO> trayListVOS = null;
// if(PalletProductTypeConstant.CUSTOMIZED.equals(type)){//订制品打托
// trayListVOS = warehouseTrayGoodsService.getReCheckPackageByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.ARTIFICIAL.equals(type)){
// trayListVOS = warehouseTrayGoodsService.getReCheckZeroByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.STOCKDATA.equals(type)){
// trayListVOS = warehouseTrayGoodsService.getReCheckStockByTrayTypeId(trayTypeId);
// }else if(PalletProductTypeConstant.STOCKNODATA.equals(type)){
// trayListVOS = warehouseTrayGoodsService.getReCheckStockByTrayTypeId(trayTypeId);
// }else {
// log.warn("##################scanTargetTrayCode: 未知的打托类型");
// }
map.put("trayCode",trayCode);
map.put("totalNum",totalNum);
map.put("orderTotalNum",orderTotalNum);
map.put("stockNum",stockNum);
map.put("stockTotalNum",stockTotalNum);
map.put("list",trayListVOS);
map.put("list",listByTrayTypeId);
return R.data(map);
}
}
@ -2037,7 +2061,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
}
//更新值
warehouseTrayGoodsService.updateBatchById(sourceTrayGoodsList);
warehouseTrayGoodsLogService.saveLogByTrayGoodsList(sourceTrayGoodsList,"1","合托:绑定","1");
warehouseTrayGoodsLogService.saveLogByTrayGoodsList(sourceTrayGoodsList,"1","合托:绑定","1",targetTrayTypeEntity.getWarehouseId());
//更新数量值
updateNumByTrayTypeId(targetTrayTypeEntity);
}
@ -2299,6 +2323,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
trayGoodsLogEntity.setBindingType(bindingType);
trayGoodsLogEntity.setRemark(remark);
trayGoodsLogEntity.setPalletizingType(palletizingType);
trayGoodsLogEntity.setWarehouseId(trayTypeEntity.getWarehouseId());
ls.add(trayGoodsLogEntity);
}
warehouseTrayGoodsLogService.saveBatch(ls);

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownGoodsLogServiceImpl.java

@ -86,6 +86,7 @@ public class WarehouseUpdownGoodsLogServiceImpl extends BaseServiceImpl<Warehous
warehouseUpdownGoodsLogEntity.setAssociationType("3");
warehouseUpdownGoodsLogEntity.setNum(parcelListEntity.getQuantity());
warehouseUpdownGoodsLogEntity.setRemark(remark);
warehouseUpdownGoodsLogEntity.setWarehouseId(updownTypeEntity.getWarehouseId());
save(warehouseUpdownGoodsLogEntity);
}

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownGoodsServiceImpl.java

@ -210,6 +210,7 @@ public class WarehouseUpdownGoodsServiceImpl extends BaseServiceImpl<WarehouseUp
@Override
public Integer getNumByZation(Long id) {
log.info("id>>>>>>>>>>{}",id);
return baseMapper.getNumByZation(id);
}

35
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

@ -1072,7 +1072,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
//修改库位状态为空闲
basicdataGoodsAllocationClient.updateAllocationStatus(allocationId,"1");
}
saveUpdownGoodsLog(updownGoodsList,"2",0,"下架:零担下架");
saveUpdownGoodsLog(updownGoodsList,"2",0,"下架:零担下架",updownTypeEntity.getWarehouseId());
updateUpdownTypeNum(updownTypeEntity);
}else{
if(!Objects.isNull(trayEntity)){
@ -1085,7 +1085,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
warehouseUpdownGoodsService.updeteNumByUpdownGoodsId(residue,updownGoodsId);
//存入日志
saveUpdownGoodsLogPart(updownGoodsList,enterNum,"2",0,"下架:零担部分下架");
saveUpdownGoodsLogPart(updownGoodsList,enterNum,"2",0,"下架:零担部分下架",updownTypeEntity.getWarehouseId());
}
updateZeroOrderGroundingStatus(orderCode);
updateUpdownTypeNum(updownTypeEntity);
@ -1182,7 +1182,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
//修改库位状态为空闲
basicdataGoodsAllocationClient.updateAllocationStatus(allocationId,"1");
}
saveUpdownGoodsLog(updownGoodsList,"2",0,"下架:库存品下架");
saveUpdownGoodsLog(updownGoodsList,"2",0,"下架:库存品下架",updownTypeEntity.getWarehouseId());
// updateUpdownTypeNum(updownTypeEntity);
}else{
if(!Objects.isNull(trayEntity)){
@ -1206,7 +1206,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
warehouseUpdownGoodsService.updeteNumByUpdownGoodsId(residue,updownGoodsId);
//存入日志
saveUpdownGoodsLogPart(updownGoodsList,enterNum,"2",0,"下架:库存品部分下架");
saveUpdownGoodsLogPart(updownGoodsList,enterNum,"2",0,"下架:库存品部分下架",updownTypeEntity.getWarehouseId());
}
updateUpdownTypeNum(updownTypeEntity);
allNum = allNum + enterNum;
@ -1242,7 +1242,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
return R.fail(basicdataGoodsAllocationClient.getEntityByAllocationId(allocationId).getGoodsAllocationName()+"暂无下架物品");
}
//存入下架日志
saveUpdownGoodsLog(updownGoodsList,"2",0,"下架:按库位下架");
saveUpdownGoodsLog(updownGoodsList,"2",0,"下架:按库位下架",updownTypeEntity.getWarehouseId());
//删除绑定关系
warehouseUpdownGoodsService.deleteEntityList(updownGoodsList);
//上架方式删除
@ -1575,7 +1575,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
}
private void saveUpdownGoodsLogPart(List<WarehouseUpdownGoodsEntity> updownGoodsList, int residue, String bindingType, Integer isAlltrays, String remark) {
private void saveUpdownGoodsLogPart(List<WarehouseUpdownGoodsEntity> updownGoodsList, int residue, String bindingType, Integer isAlltrays, String remark,Long warehouseId) {
List<WarehouseUpdownGoodsLogEntity> updownGoodsLogList = new ArrayList<>();
for (WarehouseUpdownGoodsEntity updownGoodsEntity:updownGoodsList){
WarehouseUpdownGoodsLogEntity updownGoodsLogEntity = new WarehouseUpdownGoodsLogEntity();
@ -1584,6 +1584,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
updownGoodsLogEntity.setBindingType(bindingType);
updownGoodsLogEntity.setIsAlltrays(isAlltrays);
updownGoodsLogEntity.setRemark(remark);
updownGoodsLogEntity.setWarehouseId(warehouseId);
updownGoodsLogList.add(updownGoodsLogEntity);
}
warehouseUpdownGoodsLogService.saveBatch(updownGoodsLogList);
@ -1609,13 +1610,16 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
.eq("association_value",materialCode)
.eq("incoming_batch",incomingBatch);
WarehouseUpdownGoodsEntity updownGoodsEntity = warehouseUpdownGoodsService.getOne(queryWrapper);
DistributionStockListEntity stockListEntity = distributionStockListClient.getEntityByMarketIdAndMaterialCodeAndIncomingBatch(marketId, materialCode,incomingBatch);
if(!Objects.isNull(updownGoodsEntity)){
Integer num = updownGoodsEntity.getNum();
if (enterNum>num){
int i = num + enterNum;
//对比原库存数量
if (i>stockListEntity.getQuantityStock()){
stringBuffer.append("{").append(materialCode).append("},");
continue;
}
updownGoodsEntity.setNum(num+enterNum);
updownGoodsEntity.setNum(i);
updownGoodsList.add(updownGoodsEntity);
//存入日志对象
WarehouseUpdownGoodsEntity oldUpdownGoodsEntity = new WarehouseUpdownGoodsEntity();
@ -1624,7 +1628,11 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
oldUpdownGoodsEntity.setId(null);
updownGoodsLogList.add(oldUpdownGoodsEntity);
}else{
DistributionStockListEntity stockListEntity = distributionStockListClient.getEntityByMarketIdAndMaterialCodeAndIncomingBatch(marketId, materialCode,incomingBatch);
//对比原库存数量
if (enterNum>stockListEntity.getQuantityStock()){
stringBuffer.append("{").append(materialCode).append("},");
continue;
}
updownGoodsEntity = new WarehouseUpdownGoodsEntity();
updownGoodsEntity.setUpdownTypeId(updownTypeEntity.getId());
updownGoodsEntity.setAreaId(updownTypeEntity.getAreaId());
@ -1649,7 +1657,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
}
warehouseUpdownGoodsService.saveOrUpdateBatch(updownGoodsList);
saveUpdownGoodsLog(updownGoodsLogList,"1",0,"扫描上架:库存品上架");
saveUpdownGoodsLog(updownGoodsLogList,"1",0,"扫描上架:库存品上架",updownTypeEntity.getWarehouseId());
return stringBuffer.toString();
}
@ -1742,7 +1750,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
}
}
warehouseUpdownGoodsService.saveOrUpdateBatch(updownGoodsList);
saveUpdownGoodsLog(updownGoodsLogList,"1",0,"扫描上架:零担上架");
saveUpdownGoodsLog(updownGoodsLogList,"1",0,"扫描上架:零担上架",updownTypeEntity.getWarehouseId());
}
private R saveTrayGoodsToAllocation(WarehouseTrayTypeEntity trayTypeEntity, BasicdataGoodsAllocationEntity goodsAllocationEntity, BasicdataGoodsShelfEntity goodsShelfEntity, BasicdataGoodsAreaEntity goodsAreaEntity,Long warehouseId) {
@ -1821,12 +1829,12 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
}
warehouseUpdownGoodsService.saveBatch(updownGoodsList);
saveUpdownGoodsLog(updownGoodsList,"1",1,"扫描上架:托盘上架");
saveUpdownGoodsLog(updownGoodsList,"1",1,"扫描上架:托盘上架",updownTypeEntity.getWarehouseId());
return updownGoodsList;
}
private void saveUpdownGoodsLog(List<WarehouseUpdownGoodsEntity> updownGoodsList, String bindingType, Integer isAlltrays, String remark) {
private void saveUpdownGoodsLog(List<WarehouseUpdownGoodsEntity> updownGoodsList, String bindingType, Integer isAlltrays, String remark,Long warehouseId) {
List<WarehouseUpdownGoodsLogEntity> updownGoodsLogList = new ArrayList<>();
for (WarehouseUpdownGoodsEntity updownGoodsEntity:updownGoodsList){
WarehouseUpdownGoodsLogEntity updownGoodsLogEntity = new WarehouseUpdownGoodsLogEntity();
@ -1835,6 +1843,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
updownGoodsLogEntity.setBindingType(bindingType);
updownGoodsLogEntity.setIsAlltrays(isAlltrays);
updownGoodsLogEntity.setRemark(remark);
updownGoodsLogEntity.setWarehouseId(warehouseId);
updownGoodsLogList.add(updownGoodsLogEntity);
}
warehouseUpdownGoodsLogService.saveBatch(updownGoodsLogList);

Loading…
Cancel
Save