Browse Source

修改订单物料查询

dev-warehouse
caoyizhong 2 years ago
parent
commit
b125e4d4a8
  1. 10
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java
  2. 5
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/vo/DistributionParcelListEntityVO.java
  3. 13
      blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java
  4. 4
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceDetailMapper.xml

10
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java

@ -116,6 +116,16 @@ public class DistributionParcelListEntity extends TenantEntity {
*/ */
@ApiModelProperty(value = "三级品") @ApiModelProperty(value = "三级品")
private String thirdProduct; private String thirdProduct;
/**
* 运单号
*/
@ApiModelProperty(value = "运单号")
private String waybillNumber;
/**
* 运单ID
*/
@ApiModelProperty(value = "运单ID")
private String waybillId;
/** /**
* 客户id * 客户id
*/ */

5
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/vo/DistributionParcelListEntityVO.java

@ -55,6 +55,11 @@ public class DistributionParcelListEntityVO {
*/ */
@ApiModelProperty(value = "物料") @ApiModelProperty(value = "物料")
private String materialName; private String materialName;
/**
* 物料编码
*/
@ApiModelProperty(value = "物料编码")
private String materialCode;
/** /**
* 数量 * 数量
*/ */

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

@ -369,6 +369,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
DistributionStockArticleEntity distributionStockArticleEntity = distributionStockArticleClient.findByAdvanceId(advanceId); DistributionStockArticleEntity distributionStockArticleEntity = distributionStockArticleClient.findByAdvanceId(advanceId);
Long id = null; Long id = null;
String waybillNoNum = null;
if (Objects.isNull(distributionStockArticleEntity)) { if (Objects.isNull(distributionStockArticleEntity)) {
Date date = CommonUtil.StringToDate(operationTime); Date date = CommonUtil.StringToDate(operationTime);
@ -431,7 +432,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
//存入运单信息 //存入运单信息
saveWaybillEntity(orderDetailEntity.getWaybillNo()); saveWaybillEntity(orderDetailEntity.getWaybillNo());
waybillNoNum = orderDetailEntity.getWaybillNo();
// 增加订单 经销商信息 和门店信息 // 增加订单 经销商信息 和门店信息
buildDealerAndStore(distributionStockArticleEntity, advanceEntity); buildDealerAndStore(distributionStockArticleEntity, advanceEntity);
@ -457,7 +458,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
} }
//查询包件信息数据 //查询包件信息数据
saveOrderPackage(unitNo, distributionStockArticleEntity, id, basicdataWarehouseEntity); saveOrderPackage(unitNo, distributionStockArticleEntity, id, basicdataWarehouseEntity,waybillNoNum);
//包件保存成功去修改订单的数量 //包件保存成功去修改订单的数量
distributionStockArticleClient.addHandQuantity(id,1); distributionStockArticleClient.addHandQuantity(id,1);
// todo 这里需要根据包件状态修改状态 // todo 这里需要根据包件状态修改状态
@ -476,8 +477,9 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
* @param id * @param id
* @param basicdataWarehouseEntity * @param basicdataWarehouseEntity
*/ */
private void saveOrderPackage(String unitNo, DistributionStockArticleEntity distributionStockArticleEntity, Long id, BasicdataWarehouseEntity basicdataWarehouseEntity) { private void saveOrderPackage(String unitNo, DistributionStockArticleEntity distributionStockArticleEntity, Long id, BasicdataWarehouseEntity basicdataWarehouseEntity,String waybillNoNum) {
DistributionParcelListEntityVO vo = advanceDetailClient.getByUnitNo(unitNo); DistributionParcelListEntityVO vo = advanceDetailClient.getByUnitNo(unitNo);
WarehouseWaybillEntity warehouseWaybill = warehouseWaybillClient.findByWaybillNo(waybillNoNum);
DistributionParcelListEntity entity = new DistributionParcelListEntity(); DistributionParcelListEntity entity = new DistributionParcelListEntity();
BeanUtil.copyProperties(vo, entity); BeanUtil.copyProperties(vo, entity);
entity.setOrderPackageCode(vo.getPacketBarCode()); entity.setOrderPackageCode(vo.getPacketBarCode());
@ -490,6 +492,8 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
entity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue()); entity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue());
entity.setOrderPackageGroundingStatus(OrderPackageGroundingStatusConstant.daishangjia.getValue()); entity.setOrderPackageGroundingStatus(OrderPackageGroundingStatusConstant.daishangjia.getValue());
entity.setOrderPackageStockupStatus(OrderPackageStockupStatusConstant.daibeihuo.getValue()); entity.setOrderPackageStockupStatus(OrderPackageStockupStatusConstant.daibeihuo.getValue());
entity.setWaybillNumber(waybillNoNum);
entity.setWarehouseId(warehouseWaybill.getId());
// 绑定部门--仓库 // 绑定部门--仓库
if (!Objects.isNull(basicdataWarehouseEntity)) { if (!Objects.isNull(basicdataWarehouseEntity)) {
entity.setCreateDept(basicdataWarehouseEntity.getDepartment()); entity.setCreateDept(basicdataWarehouseEntity.getDepartment());
@ -502,6 +506,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
if(ObjectUtils.isNotNull(basicMaterialEntity)){ if(ObjectUtils.isNotNull(basicMaterialEntity)){
entity.setMaterialId(basicdataWarehouseEntity.getId()); entity.setMaterialId(basicdataWarehouseEntity.getId());
entity.setMaterialCode(basicMaterialEntity.getProductCode()); entity.setMaterialCode(basicMaterialEntity.getProductCode());
entity.setMaterialUnit(basicMaterialEntity.getLogpmUnit());
} }
} }
boolean b = distributionParcelListClient.add(entity); boolean b = distributionParcelListClient.add(entity);
@ -580,7 +585,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
warehouseWaybill.setReplacePrice(wayBillEntity.getReplacePrice()); warehouseWaybill.setReplacePrice(wayBillEntity.getReplacePrice());
warehouseWaybill.setReceivedReplacePrice(BigDecimal.ZERO); warehouseWaybill.setReceivedReplacePrice(BigDecimal.ZERO);
warehouseWaybill.setReceivedTotalPrice(BigDecimal.ZERO); warehouseWaybill.setReceivedTotalPrice(BigDecimal.ZERO);
warehouseWaybill.setWaybillType(1); warehouseWaybill.setWaybillType(wayBillEntity.getType());
warehouseWaybill.setReceivedStatus(0); warehouseWaybill.setReceivedStatus(0);
BasicdataClientEntity agentClient = basicdataClientClient.findByName(agent); BasicdataClientEntity agentClient = basicdataClientClient.findByName(agent);

4
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/AdvanceDetailMapper.xml

@ -97,7 +97,8 @@
ad.firstPackName firsts, ad.firstPackName firsts,
ad.secondPackName `second`, ad.secondPackName `second`,
ad.thirdPackName thirdProduct, ad.thirdPackName thirdProduct,
ad.productCode materialName, hdp.productcode materialCode,
hdp.productname materialName,
ad.mscsNum quantity, ad.mscsNum quantity,
ad.mctsTruck trainNumber ad.mctsTruck trainNumber
from ht_order_detail od from ht_order_detail od
@ -108,6 +109,7 @@
left join ht_cargo c on s.cargo_id = c.id left join ht_cargo c on s.cargo_id = c.id
left join ht_tray_scan_des tsd on tsd.unitNo = od.unitNo left join ht_tray_scan_des tsd on tsd.unitNo = od.unitNo
left join ht_tray t on t.id = tsd.tray_id left join ht_tray t on t.id = tsd.tray_id
left join ht_tray_scan_des htsd on od.unitNo = htsd.unitNo
where od.unitNo = #{unitNo} where od.unitNo = #{unitNo}
</select> </select>

Loading…
Cancel
Save