Browse Source

fix:优化代码 更具ID跟新的代码需要只能能行那几个字段

fix-sign
pref_mail@163.com 3 months ago
parent
commit
359f95817d
  1. 25
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionStockupAppController.java
  2. 2
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/controller/MerchantStatisticsController.java
  3. 2
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsOrderInfoMapper.java
  4. 17
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsOrderInfoMapper.xml
  5. 2
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/IStatisticsOrderInfoService.java
  6. 37
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsOrderInfoServiceImpl.java
  7. 30
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingPackageServiceImpl.java
  8. 46
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java
  9. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingWaybillServiceImpl.java
  10. 10
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadLogServiceImpl.java
  11. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

25
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionStockupAppController.java

@ -944,9 +944,11 @@ public class DistributionStockupAppController extends BladeController {
List<DistributionReservationStocklistEntity> reservationStockList = reservationStocklistEntities.stream().filter(drs -> drs.getReservationNum() > 0 && drs.getRealityNum() < drs.getReservationNum()).collect(Collectors.toList()); List<DistributionReservationStocklistEntity> reservationStockList = reservationStocklistEntities.stream().filter(drs -> drs.getReservationNum() > 0 && drs.getRealityNum() < drs.getReservationNum()).collect(Collectors.toList());
if (Func.isNotEmpty(reservationStockList)) { if (Func.isNotEmpty(reservationStockList)) {
DistributionReservationStocklistEntity oldReservationStocklistEntity = reservationStockList.get(0); DistributionReservationStocklistEntity oldReservationStocklistEntity = reservationStockList.get(0);
DistributionReservationStocklistEntity t0 = new DistributionReservationStocklistEntity();
t0.setId(oldReservationStocklistEntity.getId());
//扣减计划数量 //扣减计划数量
oldReservationStocklistEntity.setReservationNum(oldReservationStocklistEntity.getReservationNum() - 1); t0.setReservationNum(oldReservationStocklistEntity.getReservationNum() - 1);
distributionReservationStocklistService.updateById(oldReservationStocklistEntity); distributionReservationStocklistService.updateById(t0);
//维护对应的库存品包件 //维护对应的库存品包件
List<DisStockListDetailEntity> stockListDetailEntities = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query().lambda() List<DisStockListDetailEntity> stockListDetailEntities = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query().lambda()
@ -956,19 +958,26 @@ public class DistributionStockupAppController extends BladeController {
); );
DistributionStockListEntity oldStockListEntity = distributionStockListService.getById(oldReservationStocklistEntity.getStocklistId()); DistributionStockListEntity oldStockListEntity = distributionStockListService.getById(oldReservationStocklistEntity.getStocklistId());
oldStockListEntity.setQuantityOccupied(oldStockListEntity.getQuantityOccupied() - 1);
distributionStockListService.updateById(oldStockListEntity); DistributionStockListEntity t =new DistributionStockListEntity();
t.setId(oldStockListEntity.getId());
t.setQuantityOccupied(oldStockListEntity.getQuantityOccupied() - 1);
distributionStockListService.updateById(t);
//对指定库存品包件进行库存品ID修改 //对指定库存品包件进行库存品ID修改
DisStockListDetailEntity disStockListDetailEntity = stockListDetailEntities.stream().filter(sd -> Func.isEmpty(sd.getStockPackageCode())).collect(Collectors.toList()).get(0); DisStockListDetailEntity disStockListDetailEntity = stockListDetailEntities.stream().filter(sd -> Func.isEmpty(sd.getStockPackageCode())).collect(Collectors.toList()).get(0);
if (Func.isNotEmpty(disStockListDetailEntity)) { if (Func.isNotEmpty(disStockListDetailEntity)) {
disStockListDetailEntity.setStockListId(stockupDTO.getStockListId()); DisStockListDetailEntity t1 = new DisStockListDetailEntity();
disStockListDetailService.updateById(disStockListDetailEntity); t1.setId(disStockListDetailEntity.getId());
t1.setStockListId(stockupDTO.getStockListId());
disStockListDetailService.updateById(t1);
} }
//维护对应库存品的冻结数量 //维护对应库存品的冻结数量
DistributionStockListEntity newStockListEntity = distributionStockListService.getById(stockupDTO.getStockListId()); DistributionStockListEntity newStockListEntity = distributionStockListService.getById(stockupDTO.getStockListId());
newStockListEntity.setQuantityOccupied(newStockListEntity.getQuantityOccupied() + 1); DistributionStockListEntity t2 = new DistributionStockListEntity();
distributionStockListService.updateById(newStockListEntity); t2.setId(newStockListEntity.getId());
t2.setQuantityOccupied(newStockListEntity.getQuantityOccupied() + 1);
distributionStockListService.updateById(t2);
} }
// 增加实际扫描的包件对应的库存品信息 增加在预约库存品中间表上 // 增加实际扫描的包件对应的库存品信息 增加在预约库存品中间表上
DistributionReservationStocklistEntity reservationStocklistEntity = new DistributionReservationStocklistEntity(); DistributionReservationStocklistEntity reservationStocklistEntity = new DistributionReservationStocklistEntity();

2
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/controller/MerchantStatisticsController.java

@ -210,7 +210,7 @@ public class MerchantStatisticsController {
return R.fail(405, "请选择正确的对账单"); return R.fail(405, "请选择正确的对账单");
} }
List<StatisticsOrderInfoVO> statisticsOrderInfoVO = statisticsOrderInfoService.findOrderDetail(reconciliationOrderId); List<StatisticsOrderInfoVO> statisticsOrderInfoVO = statisticsOrderInfoService.getStatisticsOrderInfoVOListByReconciliationOrderId(reconciliationOrderId);
return R.data(statisticsOrderInfoVO); return R.data(statisticsOrderInfoVO);
} catch (CustomerException e) { } catch (CustomerException e) {

2
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsOrderInfoMapper.java

@ -53,4 +53,6 @@ public interface StatisticsOrderInfoMapper extends BaseMapper<StatisticsOrderInf
IPage<StatisticsOrderInfoVO> pageList2B(IPage<Object> page, @Param("param") MerchantStatisticsDTO merchantStatisticsDTO); IPage<StatisticsOrderInfoVO> pageList2B(IPage<Object> page, @Param("param") MerchantStatisticsDTO merchantStatisticsDTO);
List<StatisticsOrderInfoVO> pageList2BNoPage( @Param("param") MerchantStatisticsDTO merchantStatisticsDTO); List<StatisticsOrderInfoVO> pageList2BNoPage( @Param("param") MerchantStatisticsDTO merchantStatisticsDTO);
List<StatisticsOrderInfoVO> findStatisticsOrderInfoVOByReconciliationOrderId(@Param("reconciliationOrderId") Long reconciliationOrderId);
} }

17
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/StatisticsOrderInfoMapper.xml

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.statistics.mapper.StatisticsOrderInfoMapper"> <mapper namespace="com.logpm.statistics.mapper.StatisticsOrderInfoMapper">
<select id="pageList" resultType="com.logpm.statistics.vo.StatisticsOrderInfoVO"> <sql id="selectStatisticsOrderInfoVO">
select lsoi.id orderInfoId, select lsoi.id orderInfoId,
lsoi.brand_id brandId, lsoi.brand_id brandId,
lsoi.brand brand, lsoi.brand brand,
@ -42,6 +42,10 @@
from logpm_statistics_order_info lsoi from logpm_statistics_order_info lsoi
left join logpm_basicdata_client lbc on lbc.id = lsoi.consignee_id left join logpm_basicdata_client lbc on lbc.id = lsoi.consignee_id
left join logpm_warehouse_waybill lww on lww.id = lsoi.waybill_id left join logpm_warehouse_waybill lww on lww.id = lsoi.waybill_id
</sql>
<select id="pageList" resultType="com.logpm.statistics.vo.StatisticsOrderInfoVO">
<include refid="selectStatisticsOrderInfoVO"/>
where 1=1 where 1=1
and lsoi.create_reconciliation_order_status = 0 and lsoi.create_reconciliation_order_status = 0
<if test="param.listType == 1"> <if test="param.listType == 1">
@ -1048,6 +1052,17 @@
</foreach> </foreach>
group by lsoi.id group by lsoi.id
</select> </select>
<select id="findStatisticsOrderInfoVOByReconciliationOrderId"
resultType="com.logpm.statistics.vo.StatisticsOrderInfoVO">
<include refid="selectStatisticsOrderInfoVO"/>
<where>
<if test="reconciliationOrderId != null">
and lsoi.reconciliation_order_id = #{reconciliationOrderId}
</if>
</where>
</select>
<delete id="deleteDataByWaybillId" > <delete id="deleteDataByWaybillId" >

2
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/IStatisticsOrderInfoService.java

@ -18,6 +18,8 @@ public interface IStatisticsOrderInfoService extends BaseService<StatisticsOrder
IPage<StatisticsOrderInfoVO> pageList(MerchantStatisticsDTO merchantStatisticsDTO); IPage<StatisticsOrderInfoVO> pageList(MerchantStatisticsDTO merchantStatisticsDTO);
List<StatisticsOrderInfoVO> getStatisticsOrderInfoVOListByReconciliationOrderId(Long reconciliationOrderId);
StatisticsReconciliationOrderInfoVO findChangesRecordList(MerchantStatisticsDTO merchantStatisticsDTO); StatisticsReconciliationOrderInfoVO findChangesRecordList(MerchantStatisticsDTO merchantStatisticsDTO);
R addChangesRecord(ChangesRecordDTO changesRecordDTO); R addChangesRecord(ChangesRecordDTO changesRecordDTO);

37
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsOrderInfoServiceImpl.java

@ -33,7 +33,6 @@ import com.logpm.statistics.service.*;
import com.logpm.statistics.vo.*; import com.logpm.statistics.vo.*;
import com.logpm.warehouse.entity.WarehouseWaybillEntity; import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseWaybillClient; import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.springblade.common.constant.DictBizConstant; import org.springblade.common.constant.DictBizConstant;
@ -268,24 +267,26 @@ public class StatisticsOrderInfoServiceImpl extends BaseServiceImpl<StatisticsOr
return statisticsOrderInfoVOIPage; return statisticsOrderInfoVOIPage;
} }
@NotNull
private IPage<StatisticsOrderInfoVO> getStatisticsOrderInfoVOIPage2C(MerchantStatisticsDTO merchantStatisticsDTO, IPage<Object> page) {
IPage<StatisticsOrderInfoVO> statisticsOrderInfoVOIPage = baseMapper.pageList(page, merchantStatisticsDTO);
List<StatisticsOrderInfoVO> records = statisticsOrderInfoVOIPage.getRecords();
if (CollUtil.isEmpty(records)) {
return statisticsOrderInfoVOIPage;
}
@Override
public List<StatisticsOrderInfoVO> getStatisticsOrderInfoVOListByReconciliationOrderId(Long reconciliationOrderId){
List<StatisticsOrderInfoVO> statisticsOrderInfoVOList = baseMapper.findStatisticsOrderInfoVOByReconciliationOrderId(reconciliationOrderId);
buildListForStatisOrderInfoVO(statisticsOrderInfoVOList);
return statisticsOrderInfoVOList;
}
private void buildListForStatisOrderInfoVO(List<StatisticsOrderInfoVO> statisticsOrderInfoVOList) {
//把records中所有的orderInfoId放入一个集合 //把records中所有的orderInfoId放入一个集合
List<Long> orderInfoIdList = records.stream().map(StatisticsOrderInfoVO::getOrderInfoId).collect(Collectors.toList()); List<Long> orderInfoIdList = statisticsOrderInfoVOList.stream().map(StatisticsOrderInfoVO::getOrderInfoId).collect(Collectors.toList());
// 得到运单ID集合 // 得到运单ID集合
Set<Long> waybillIds = records.stream().map(StatisticsOrderInfoVO::getWaybillId).collect(Collectors.toSet()); Set<Long> waybillIds = statisticsOrderInfoVOList.stream().map(StatisticsOrderInfoVO::getWaybillId).collect(Collectors.toSet());
// 查询运单明细集合 // 查询运单明细集合
List<WaybillDetailByWaybillNoVo> waybillDetailByWaybillId = baseMapper.findWaybillDetailByWaybillId(waybillIds); List<WaybillDetailByWaybillNoVo> waybillDetailByWaybillId = baseMapper.findWaybillDetailByWaybillId(waybillIds);
//得到运单号 //得到运单号
Set<String> orderCodeSet = records.stream().map(StatisticsOrderInfoVO::getOrderCode).collect(Collectors.toSet()); Set<String> orderCodeSet = statisticsOrderInfoVOList.stream().map(StatisticsOrderInfoVO::getOrderCode).collect(Collectors.toSet());
// 通过运单号进行分组 // 通过运单号进行分组
@ -307,7 +308,7 @@ public class StatisticsOrderInfoServiceImpl extends BaseServiceImpl<StatisticsOr
List<AdvanceDetailDTO> advanceDetailDTOS = baseMapper.selectAdvinceDetail(waybillIds, orderCodeSet); List<AdvanceDetailDTO> advanceDetailDTOS = baseMapper.selectAdvinceDetail(waybillIds, orderCodeSet);
records.forEach(statisticsOrderInfoVO -> { statisticsOrderInfoVOList.forEach(statisticsOrderInfoVO -> {
// Long waybillId = statisticsOrderInfoVO.getWaybillId(); // Long waybillId = statisticsOrderInfoVO.getWaybillId();
@ -405,6 +406,18 @@ public class StatisticsOrderInfoServiceImpl extends BaseServiceImpl<StatisticsOr
} }
}); });
}
@NotNull
private IPage<StatisticsOrderInfoVO> getStatisticsOrderInfoVOIPage2C(MerchantStatisticsDTO merchantStatisticsDTO, IPage<Object> page) {
IPage<StatisticsOrderInfoVO> statisticsOrderInfoVOIPage = baseMapper.pageList(page, merchantStatisticsDTO);
List<StatisticsOrderInfoVO> records = statisticsOrderInfoVOIPage.getRecords();
if (CollUtil.isEmpty(records)) {
return statisticsOrderInfoVOIPage;
}
//把records中所有的orderInfoId放入一个集合
buildListForStatisOrderInfoVO(records);
statisticsOrderInfoVOIPage.setRecords(records); statisticsOrderInfoVOIPage.setRecords(records);
return statisticsOrderInfoVOIPage; return statisticsOrderInfoVOIPage;
} }

30
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingPackageServiceImpl.java

@ -119,7 +119,12 @@ public class TrunklineBillladingPackageServiceImpl extends BaseServiceImpl<Trunk
} }
Integer realNum = billladingWaybillEntity.getRealNum(); Integer realNum = billladingWaybillEntity.getRealNum();
billladingWaybillEntity.setRealNum(realNum+1); billladingWaybillEntity.setRealNum(realNum+1);
trunklineBillladingWaybillService.updateById(billladingWaybillEntity);
TrunklineBillladingWaybillEntity t = new TrunklineBillladingWaybillEntity();
t.setId(billladingWaybillEntity.getId());
t.setRealNum(billladingWaybillEntity.getRealNum());
trunklineBillladingWaybillService.updateById(t);
waybillEntity.setStockCount(finishNum+1); waybillEntity.setStockCount(finishNum+1);
if(allTotalNum.equals(waybillEntity.getStockCount())){ if(allTotalNum.equals(waybillEntity.getStockCount())){
@ -171,15 +176,27 @@ public class TrunklineBillladingPackageServiceImpl extends BaseServiceImpl<Trunk
noWaybillData.setRealVolume(BigDecimal.ZERO); noWaybillData.setRealVolume(BigDecimal.ZERO);
trunklineBillladingWaybillService.save(noWaybillData); trunklineBillladingWaybillService.save(noWaybillData);
}else{ }else{
Integer realNum = noWaybillData.getRealNum(); Integer realNum = noWaybillData.getRealNum();
noWaybillData.setRealNum(realNum+1); noWaybillData.setRealNum(realNum+1);
trunklineBillladingWaybillService.updateById(noWaybillData);
TrunklineBillladingWaybillEntity t =new TrunklineBillladingWaybillEntity();
t.setRealNum(noWaybillData.getRealNum());
t.setId(noWaybillData.getId());
trunklineBillladingWaybillService.updateById(t);
} }
} }
int rn = trunklineBillladingEntity.getRealNum(); int rn = trunklineBillladingEntity.getRealNum();
trunklineBillladingEntity.setRealNum(rn+1); trunklineBillladingEntity.setRealNum(rn+1);
trunklineBillladingService.updateById(trunklineBillladingEntity);
TrunklineBillladingEntity t= new TrunklineBillladingEntity();
t.setRealNum(trunklineBillladingEntity.getRealNum());
t.setId(trunklineBillladingEntity.getId());
trunklineBillladingService.updateById(t);
//根据提货单id重新计算每个运单的费用 //根据提货单id重新计算每个运单的费用
trunklineBillladingWaybillService.updateBillladingFeeByBillladingId(trunklineBillladingEntity); trunklineBillladingWaybillService.updateBillladingFeeByBillladingId(trunklineBillladingEntity);
@ -387,7 +404,12 @@ public class TrunklineBillladingPackageServiceImpl extends BaseServiceImpl<Trunk
int all = advanceDetailList.size(); int all = advanceDetailList.size();
billladingEntity.setRealNum(realNum+all); billladingEntity.setRealNum(realNum+all);
trunklineBillladingService.updateById(billladingEntity);
TrunklineBillladingEntity t =new TrunklineBillladingEntity();
t.setId(billladingEntity.getId());
t.setRealNum(billladingEntity.getRealNum());
trunklineBillladingService.updateById(t);
} }
List<WarehouseWaybillEntity> warehouseWaybillEntities = new ArrayList<>(); List<WarehouseWaybillEntity> warehouseWaybillEntities = new ArrayList<>();

46
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java

@ -392,6 +392,9 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
log.info("#############updateBillladingStatus: 更新提货单状态 type={}",type); log.info("#############updateBillladingStatus: 更新提货单状态 type={}",type);
TrunklineBillladingEntity billladingEntity = baseMapper.selectById(billladingId); TrunklineBillladingEntity billladingEntity = baseMapper.selectById(billladingId);
TrunklineBillladingEntity updateEntity = new TrunklineBillladingEntity();
updateEntity.setId(billladingEntity.getId());
if (!Objects.isNull(billladingEntity)) { if (!Objects.isNull(billladingEntity)) {
String billladingCode = billladingEntity.getBillladingCode(); String billladingCode = billladingEntity.getBillladingCode();
@ -414,6 +417,10 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
if ("1".equals(billladingStatus)) { if ("1".equals(billladingStatus)) {
billladingEntity.setBillladingStatus("2"); billladingEntity.setBillladingStatus("2");
billladingEntity.setStartTime(CommonUtil.StringToDate(completeTime)); billladingEntity.setStartTime(CommonUtil.StringToDate(completeTime));
updateEntity.setBillladingStatus(billladingEntity.getBillladingStatus());
updateEntity.setStartTime(billladingEntity.getStartTime());
stringBuffer.append(",未开始变更为提货中"); stringBuffer.append(",未开始变更为提货中");
} else { } else {
log.warn("##################updateBillladingStatus: 提货单不能更新为提货中 billladingStatus={}", billladingStatus); log.warn("##################updateBillladingStatus: 提货单不能更新为提货中 billladingStatus={}", billladingStatus);
@ -425,6 +432,8 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
if ("2".equals(billladingStatus)) { if ("2".equals(billladingStatus)) {
billladingEntity.setBillladingStatus("3"); billladingEntity.setBillladingStatus("3");
billladingEntity.setEndTime(CommonUtil.StringToDate(completeTime)); billladingEntity.setEndTime(CommonUtil.StringToDate(completeTime));
updateEntity.setBillladingStatus(billladingEntity.getBillladingStatus());
updateEntity.setEndTime(billladingEntity.getEndTime());
stringBuffer.append(",提货中变更为提货完成"); stringBuffer.append(",提货中变更为提货完成");
} else { } else {
log.warn("##################updateBillladingStatus: 提货单不能更新为已完成 billladingStatus={}", billladingStatus); log.warn("##################updateBillladingStatus: 提货单不能更新为已完成 billladingStatus={}", billladingStatus);
@ -436,6 +445,8 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
if ("3".equals(billladingStatus)) { if ("3".equals(billladingStatus)) {
billladingEntity.setBillladingStatus("2"); billladingEntity.setBillladingStatus("2");
billladingEntity.setEndTime(null); billladingEntity.setEndTime(null);
updateEntity.setBillladingStatus(billladingEntity.getBillladingStatus());
updateEntity.setEndTime(billladingEntity.getEndTime());
stringBuffer.append(",提货完成变更为提货中"); stringBuffer.append(",提货完成变更为提货中");
} else { } else {
log.warn("##################updateBillladingStatus: 提货单不能更新为提货中 billladingStatus={}", billladingStatus); log.warn("##################updateBillladingStatus: 提货单不能更新为提货中 billladingStatus={}", billladingStatus);
@ -450,6 +461,14 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
billladingEntity.setSettlementTime(date); billladingEntity.setSettlementTime(date);
billladingEntity.setSettlementId(AuthUtil.getUserId()); billladingEntity.setSettlementId(AuthUtil.getUserId());
billladingEntity.setSettlementName(AuthUtil.getNickName()); billladingEntity.setSettlementName(AuthUtil.getNickName());
updateEntity.setBillladingStatus(billladingEntity.getBillladingStatus());
updateEntity.setSettlementTime(billladingEntity.getSettlementTime());
updateEntity.setSettlementId(billladingEntity.getSettlementId());
updateEntity.setSettlementName(billladingEntity.getSettlementName());
stringBuffer.append(",提货完成变更为已结算,时间").append(CommonUtil.dateToString(date)).append(",变更人").append(AuthUtil.getNickName()); stringBuffer.append(",提货完成变更为已结算,时间").append(CommonUtil.dateToString(date)).append(",变更人").append(AuthUtil.getNickName());
List<TrunklineBillladingWaybillEntity> billladingWaybillEntities = billladingWaybillService.findNoFinishWaybillByBillladingId(billladingId); List<TrunklineBillladingWaybillEntity> billladingWaybillEntities = billladingWaybillService.findNoFinishWaybillByBillladingId(billladingId);
@ -460,6 +479,9 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
Set<Long> waybillIdSet = map.keySet(); Set<Long> waybillIdSet = map.keySet();
List<WarehouseWaybillEntity> waybillEntityList = warehouseWaybillClient.findListByWaybillIds(new ArrayList<>(waybillIdSet)); List<WarehouseWaybillEntity> waybillEntityList = warehouseWaybillClient.findListByWaybillIds(new ArrayList<>(waybillIdSet));
List<WarehouseWaybillEntity> list =new ArrayList<>();
waybillEntityList.forEach(waybillEntity -> { waybillEntityList.forEach(waybillEntity -> {
Integer integer = map.get(waybillEntity.getId()); Integer integer = map.get(waybillEntity.getId());
if(Objects.isNull(integer)){ if(Objects.isNull(integer)){
@ -470,8 +492,13 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
billladingNum = 0; billladingNum = 0;
} }
waybillEntity.setBillladingNum(Math.max(billladingNum - integer, 0)); waybillEntity.setBillladingNum(Math.max(billladingNum - integer, 0));
WarehouseWaybillEntity updateWaybill= new WarehouseWaybillEntity();
updateWaybill.setId(waybillEntity.getId());
updateWaybill.setBillladingNum(waybillEntity.getBillladingNum());
list.add(updateWaybill);
}); });
warehouseWaybillClient.updateList(waybillEntityList); warehouseWaybillClient.updateList(list);
} else { } else {
log.warn("##################updateBillladingStatus: 提货单不能更新为已结算 billladingStatus={}", billladingStatus); log.warn("##################updateBillladingStatus: 提货单不能更新为已结算 billladingStatus={}", billladingStatus);
@ -494,6 +521,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
case 6: case 6:
//取消提货 //取消提货
billladingEntity.setBillladingStatus("5"); billladingEntity.setBillladingStatus("5");
updateEntity.setBillladingStatus(billladingEntity.getBillladingStatus());
stringBuffer.append(",变更为取消提货,时间").append(CommonUtil.dateToString(new Date())).append(",变更人").append(AuthUtil.getNickName()); stringBuffer.append(",变更为取消提货,时间").append(CommonUtil.dateToString(new Date())).append(",变更人").append(AuthUtil.getNickName());
break; break;
default: default:
@ -501,7 +529,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
throw new CustomerException(405, "未知的更新操作"); throw new CustomerException(405, "未知的更新操作");
} }
//更新状态 //更新状态
updateById(billladingEntity); updateById(updateEntity);
logEntity.setContent(stringBuffer.toString()); logEntity.setContent(stringBuffer.toString());
logEntity.setAfterOpreation(JSON.toJSONString(billladingEntity)); logEntity.setAfterOpreation(JSON.toJSONString(billladingEntity));
trunklineBillladingLogService.save(logEntity); trunklineBillladingLogService.save(logEntity);
@ -666,7 +694,13 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
billladingEntity.setRealNum(numVO.getNum()); billladingEntity.setRealNum(numVO.getNum());
billladingEntity.setRealWeight(numVO.getWeight()); billladingEntity.setRealWeight(numVO.getWeight());
billladingEntity.setRealVolume(numVO.getVolume()); billladingEntity.setRealVolume(numVO.getVolume());
updateById(billladingEntity);
TrunklineBillladingEntity t = new TrunklineBillladingEntity();
t.setId(billladingEntity.getId());
t.setRealNum(billladingEntity.getRealNum());
t.setRealWeight(billladingEntity.getRealWeight());
t.setRealVolume(billladingEntity.getRealVolume());
updateById(t);
billladingWaybillService.updateBillladingFeeByBillladingId(billladingEntity); billladingWaybillService.updateBillladingFeeByBillladingId(billladingEntity);
@ -764,7 +798,11 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
int size = billladingPackageEntities.size(); int size = billladingPackageEntities.size();
noWaybillNoBillladingWaybill.setRealNum(realNum-size); noWaybillNoBillladingWaybill.setRealNum(realNum-size);
} }
billladingWaybillService.updateById(noWaybillNoBillladingWaybill);
TrunklineBillladingWaybillEntity t = new TrunklineBillladingWaybillEntity();
t.setId(noWaybillNoBillladingWaybill.getId());
t.setRealNum(noWaybillNoBillladingWaybill.getRealNum());
billladingWaybillService.updateById(t);
} }

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingWaybillServiceImpl.java

@ -109,7 +109,10 @@ public class TrunklineBillladingWaybillServiceImpl extends BaseServiceImpl<Trunk
fee = price.multiply(rv); fee = price.multiply(rv);
} }
billladingWaybillEntity.setBillladingFee(fee); billladingWaybillEntity.setBillladingFee(fee);
updateById(billladingWaybillEntity); TrunklineBillladingWaybillEntity t =new TrunklineBillladingWaybillEntity();
t.setId(billladingWaybillEntity.getId());
t.setBillladingFee(fee);
updateById(t);
} }
} }

10
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadLogServiceImpl.java

@ -173,7 +173,10 @@ public class TrunklineCarsLoadLogServiceImpl extends BaseServiceImpl<TrunklineCa
return; return;
}else{ }else{
carsLoadLogEntity1.setContent(content); carsLoadLogEntity1.setContent(content);
updateById(carsLoadLogEntity1); TrunklineCarsLoadLogEntity t = new TrunklineCarsLoadLogEntity();
t.setContent(content);
t.setId(carsLoadLogEntity1.getId());
updateById(t);
return; return;
} }
} }
@ -189,8 +192,11 @@ public class TrunklineCarsLoadLogServiceImpl extends BaseServiceImpl<TrunklineCa
save(carsLoadLogEntity); save(carsLoadLogEntity);
return; return;
}else{ }else{
TrunklineCarsLoadLogEntity t = new TrunklineCarsLoadLogEntity();
t.setContent(content);
t.setId(carsLoadLogEntity1.getId());
carsLoadLogEntity1.setContent(content); carsLoadLogEntity1.setContent(content);
updateById(carsLoadLogEntity1); updateById(t);
return; return;
} }
} }

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -595,7 +595,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadEntity.setCustomerNum(CollUtil.isEmpty(list) ? 0 : list.size()); carsLoadEntity.setCustomerNum(CollUtil.isEmpty(list) ? 0 : list.size());
carsLoadEntity.setIsCustomer(CollUtil.isEmpty(list) ? "2" : "1"); carsLoadEntity.setIsCustomer(CollUtil.isEmpty(list) ? "2" : "1");
updateById(carsLoadEntity);
TrunklineCarsLoadEntity t = new TrunklineCarsLoadEntity();
t.setId(carsLoadEntity.getId());
t.setCustomerNum(carsLoadEntity.getCustomerNum());
t.setIsCustomer(carsLoadEntity.getIsCustomer());
updateById(t);
// for (TrunklineLoadSignOrderEntity trunklineLoadSignOrderEntity : list) { // for (TrunklineLoadSignOrderEntity trunklineLoadSignOrderEntity : list) {
// Long signOrderId = trunklineLoadSignOrderEntity.getId(); // Long signOrderId = trunklineLoadSignOrderEntity.getId();

Loading…
Cancel
Save