Browse Source

Merge branch 'dev' into pre-production

newStockUp
pref_mail@163.com 1 year ago
parent
commit
2d78932850
  1. 4
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java
  2. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java
  3. 4
      blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicMaterialController.java
  4. 8
      blade-service/logpm-basic/src/main/java/com/logpm/basic/excel/BasicMaterialExcel.java
  5. 1
      blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicMaterialServiceImpl.java
  6. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataWarehouseService.java
  7. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java
  8. 18
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java
  9. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java
  10. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  11. 3
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java
  12. 27
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

4
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java

@ -244,6 +244,10 @@ public class DistributionStockArticleEntity extends TenantEntity {
@TableField(exist = false)
@ApiModelProperty(value = "预约数量")
private Integer reservationNum;
@ApiModelProperty(value = "运单ID")
private Long waybillId;
/**
* 运单号
*/

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java

@ -74,7 +74,7 @@ public interface IDistributionStockArticleClient {
void submitHandQuantity(@RequestParam Integer allNum,@RequestParam Long articleId);
@GetMapping(API_PREFIX + "/likeOrderSelfNumbering")
List<DistributionStockArticleEntity> likeOrderSelfNumbering(String orderSelfNumbering);
List<DistributionStockArticleEntity> likeOrderSelfNumbering(@RequestParam String orderSelfNum);
@GetMapping(API_PREFIX + "/findStockArticleByOrderCode")
DistributionStockArticleEntity findStockArticleByOrderCode(@RequestParam String orderCode);

4
blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicMaterialController.java

@ -85,7 +85,9 @@ public class BasicMaterialController extends BladeController {
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入basicMaterial")
public R<IPage<BasicMaterialEntity>> list(@ApiIgnore @RequestParam Map<String, Object> basicMaterial, Query query) {
IPage<BasicMaterialEntity> pages = basicMaterialService.page(Condition.getPage(query), Condition.getQueryWrapper(basicMaterial, BasicMaterialEntity.class));
QueryWrapper<BasicMaterialEntity> queryWrapper = Condition.getQueryWrapper(basicMaterial, BasicMaterialEntity.class);
queryWrapper.orderByDesc("create_time");
IPage<BasicMaterialEntity> pages = basicMaterialService.page(Condition.getPage(query), queryWrapper);
return R.data(pages);
}

8
blade-service/logpm-basic/src/main/java/com/logpm/basic/excel/BasicMaterialExcel.java

@ -136,25 +136,25 @@ public class BasicMaterialExcel implements Serializable {
*/
@ColumnWidth(20)
@ExcelProperty("长")
private BigDecimal extent;
private String extent;
/**
*
*/
@ColumnWidth(20)
@ExcelProperty("宽")
private BigDecimal breadth;
private String breadth;
/**
* 高度
*/
@ColumnWidth(20)
@ExcelProperty("高度")
private BigDecimal altitude;
private String altitude;
/**
* 体积
*/
@ColumnWidth(20)
@ExcelProperty("体积")
private BigDecimal volume;
private String volume;
/**
* 总量
*/

1
blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicMaterialServiceImpl.java

@ -94,6 +94,7 @@ public class BasicMaterialServiceImpl extends BaseServiceImpl<BasicMaterialMappe
List<BasicMaterialEntity> basicMaterialEntities = baseMapper.selectList(new QueryWrapper<BasicMaterialEntity>().lambda().eq(BasicMaterialEntity::getProductCode,datum.getProductCode()));
if (basicMaterialEntities.size()>0){continue;}
BasicMaterialEntity copy = BeanUtil.copy(datum, BasicMaterialEntity.class);
copy.setHide(1);
arrayList.add(copy);
}
// 根据对象的value属性进行去重

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

@ -20,16 +20,13 @@ package com.logpm.basicdata.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.dto.BasicdataWarehouseDTO;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.excel.BasicdataWarehouseExcel;
import com.logpm.basicdata.vo.BasicdataGoodsShelfVO;
import com.logpm.basicdata.vo.BasicdataWarehouseVO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
import java.util.List;
import java.util.Map;
/**
* 仓库 服务类
@ -107,4 +104,6 @@ public interface IBasicdataWarehouseService extends BaseService<BasicdataWarehou
* 根据当前登录用户查询Redis缓存中选择的仓库信息
*/
BasicdataWarehouseEntity getMyCurrentWarehouse();
BasicdataWarehouseEntity getWarehouseEntityByWarehouseCode(String warehouseCode);
}

5
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java

@ -4,6 +4,7 @@ import com.logpm.basic.feign.IBasicTenantCodeClient;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.basicdata.service.IBasicdataCodeService;
import com.logpm.basicdata.service.IBasicdataWarehouseService;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.constant.CodeDesEnum;
@ -28,6 +29,8 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
private final IBasicdataWarehouseClient basicdataWarehouseClient;
private final IBasicdataWarehouseService basicdataWarehouseService;
/**
* 根据类型生成编号
* @param type
@ -98,7 +101,7 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
//托盘 HT+仓库拼音+ 年月 +【当前仓库总数+1(五位数 不足补零)】
//通过仓库编码获取仓库简写
BasicdataWarehouseEntity entity = basicdataWarehouseClient.getWarehouseEntityByWarehouseCode(warehouseCode);
BasicdataWarehouseEntity entity = basicdataWarehouseService.getWarehouseEntityByWarehouseCode(warehouseCode);
if(Objects.isNull(entity)){
log.warn("############generateTraysCode: 未找到对应仓库warehouseCode={}",warehouseCode);
return null;

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

@ -16,13 +16,12 @@
*/
package com.logpm.basicdata.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.nacos.shaded.com.google.gson.GsonBuilder;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
import com.logpm.basicdata.dto.BasicdataWarehouseDTO;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.excel.BasicdataWarehouseExcel;
import com.logpm.basicdata.mapper.BasicdataGoodsAreaMapper;
@ -31,6 +30,7 @@ import com.logpm.basicdata.service.IBasicdataWarehouseService;
import com.logpm.basicdata.vo.BasicdataWarehouseVO;
import com.logpm.basicdata.wrapper.BasicdataWarehouseWrapper;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
@ -39,9 +39,6 @@ import org.springblade.core.tool.utils.Func;
import org.springblade.system.entity.Dept;
import org.springblade.system.feign.IDeptClient;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@ -205,4 +202,13 @@ public class BasicdataWarehouseServiceImpl extends BaseServiceImpl<BasicdataWare
BasicdataWarehouseEntity o = redis.get(str);
return o;
}
@Override
public BasicdataWarehouseEntity getWarehouseEntityByWarehouseCode(String warehouseCode) {
QueryWrapper<BasicdataWarehouseEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("warehouse_code",warehouseCode)
.eq("is_deleted",0);
return baseMapper.selectOne(queryWrapper);
}
}

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java

@ -120,8 +120,9 @@ public class DistributionStockArticleClient implements IDistributionStockArticle
}
@Override
public List<DistributionStockArticleEntity> likeOrderSelfNumbering(String orderSelfNumbering) {
return distributionStockArticleService.likeOrderSelfNumbering(orderSelfNumbering);
@GetMapping(API_PREFIX + "/likeOrderSelfNumbering")
public List<DistributionStockArticleEntity> likeOrderSelfNumbering(String orderSelfNum) {
return distributionStockArticleService.likeOrderSelfNumbering(orderSelfNum);
}
@Override

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

@ -67,11 +67,12 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
@Override
public boolean submitNumByOrderIdAndName(Long articleId, String productName, Integer num) {
int i = baseMapper.submitNumByOrderIdAndName(articleId,productName,num);
if(i == 1){
return true;
}else{
return false;
}
// if(i == 1){
// return true;
// }else{
// return false;
// }
return true;
}
@Override

3
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java

@ -31,6 +31,7 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.constant.order.OrderStatusConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
@ -170,7 +171,7 @@ public class WarehouseWaybillController extends BladeController {
}
Integer state = Integer.parseInt(distributionStockArticleEntity.getOrderStatus());//订单状态
Long orderId = distributionStockArticleEntity.getId();//订单id
if(!state.equals(1)){
if(state>30){
log.warn("################splitOrder: 当前在库订单已进入配送流程,不能拆单 waybillNo={}",waybillNo);
return R.fail(405,"当前在库订单已进入配送流程");
}

27
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

@ -29,7 +29,7 @@ import com.logpm.warehouse.service.IWarehouseWaybillService;
import com.logpm.warehouse.vo.WarehouseWaybillVO;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.constant.order.OrderStatusConstant;
import org.springblade.common.constant.order.*;
import org.springblade.common.constant.TenantNum;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.mp.base.BaseServiceImpl;
@ -166,15 +166,18 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
Date date = new Date();
distributionStockArticleEntity = new DistributionStockArticleEntity();
distributionStockArticleEntity.setOrderCode(warehouseWaybill.getWaybillNo());
distributionStockArticleEntity.setServiceNumber(warehouseWaybill.getServiceNo());
distributionStockArticleEntity.setOrderCode(waybillNo);
distributionStockArticleEntity.setWaybillNumber(waybillNo);
distributionStockArticleEntity.setWaybillId(warehouseWaybill.getId());
distributionStockArticleEntity.setWarehouseId(warehouseWaybill.getId());
distributionStockArticleEntity.setMallName(warehouseWaybill.getConsigneeName());
distributionStockArticleEntity.setMallId(warehouseWaybill.getConsigneeId());
distributionStockArticleEntity.setDescriptionGoods(warehouseWaybill.getGoodsName());
distributionStockArticleEntity.setWarehouse(warehouseWaybill.getDepartureWarehouseName());
distributionStockArticleEntity.setWarehouseEntryTime(date);
distributionStockArticleEntity.setTotalNumber(totalCount);
distributionStockArticleEntity.setHandQuantity(stockCount);
distributionStockArticleEntity.setHandQuantity(totalCount);
//零担订单默认齐套
distributionStockArticleEntity.setCompleteSet(1);
@ -199,7 +202,19 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
distributionStockArticleEntity.setCustomerTelephone(warehouseWaybill.getConsigneeMobile());
distributionStockArticleEntity.setCustomerAddress(warehouseWaybill.getConsigneeAddress());
distributionStockArticleEntity.setGenre(1);
distributionStockArticleEntity.setCreateUser(1123598821738675201L);
distributionStockArticleEntity.setSortingQuantity(0); //分拣件数
distributionStockArticleEntity.setDeliveryQuantity(0); //配送件数
distributionStockArticleEntity.setTransferQuantity(0); //中转件数
distributionStockArticleEntity.setSigninQuantity(0); //签收件数
distributionStockArticleEntity.setFreezeStatus(OrderFreezeStatusConstant.weidongjie.getValue()); //冻结状态
distributionStockArticleEntity.setReservationStatus(OrderReservationStatusConstant.daiyuyue.getValue()); //预约状态
distributionStockArticleEntity.setStockupStatus(OrderStockupStatusConstant.daibeihuo.getValue()); //备货状态
distributionStockArticleEntity.setGroundingStatus(OrderGroundingStatusConstant.daishangjia.getValue()); //上架状态
distributionStockArticleEntity.setOrderStatus(OrderStatusConstant.bufenruku.getValue());
distributionStockArticleEntity.setOrderReceiveStatus(OrderReceiveStatusConstant.bufenshouhuo.getValue());
distributionStockArticleEntity.setConsigneeUnit(customerName);//收货单位(经销商)
distributionStockArticleEntity.setConsigneePerson(warehouseWaybill.getConsigneeName());//收货人
distributionStockArticleEntity.setReserve1("zero");
@ -373,6 +388,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
String takeCompany = wayBillEntity.getTakeCompany();//收货单位
BasicdataClientEntity sendClient = basicdataClientClient.findByName(sendCompany);
BasicdataClientEntity takeClient = basicdataClientClient.findByName(takeCompany);
warehouseWaybill.setServiceType(1);// 默认为商配
if (!Objects.isNull(sendClient)) {
Long clientEntityId = sendClient.getId();//基础客户
warehouseWaybill.setShipperId(clientEntityId);
@ -387,11 +403,11 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
}
warehouseWaybill.setShipper(sendCompany);
warehouseWaybill.setShipperName(wayBillEntity.getSendPerson());
warehouseWaybill.setShipperMobile(wayBillEntity.getSendMobile());
warehouseWaybill.setShipperMobile(wayBillEntity.getSendPhone());
warehouseWaybill.setShipperAddress(wayBillEntity.getSendAddress());
warehouseWaybill.setConsignee(takeCompany);
warehouseWaybill.setConsigneeName(wayBillEntity.getTakePerson());
warehouseWaybill.setConsigneeMobile(wayBillEntity.getTakeMobile());
warehouseWaybill.setConsigneeMobile(wayBillEntity.getTakePhone());
warehouseWaybill.setConsigneeAddress(wayBillEntity.getTakeAddress());
warehouseWaybill.setDestination(wayBillEntity.getArriveSite());
warehouseWaybill.setGoodsName(packname);
@ -411,6 +427,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
warehouseWaybill.setReceivedTotalPrice(BigDecimal.ZERO);
warehouseWaybill.setWaybillType(2);
warehouseWaybill.setReceivedStatus(0);
warehouseWaybill.setTenantId(TenantNum.HUITONGCODE);
BasicdataClientEntity agentClient = basicdataClientClient.findByName(agent);
if (!Objects.isNull(agentClient)) {

Loading…
Cancel
Save