Browse Source

1.干线bug修复

dev
zhenghaoyu 2 weeks ago
parent
commit
a2360cd9fd
  1. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineWaybillTrackMapper.java
  2. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineWaybillTrackMapper.xml
  3. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineWaybillTrackService.java
  4. 10
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderAsyncServiceImpl.java
  5. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineWaybillTrackServiceImpl.java

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineWaybillTrackMapper.java

@ -18,4 +18,6 @@ public interface TrunklineWaybillTrackMapper extends BaseMapper<TrunklineWaybill
IPage<TrunklineWaybillTrackVO> findUpdateWaybillList(IPage<Object> page, @Param("param") OpenOrderDTO openOrderDTO);
void deleteByWaybillNo(@Param("waybillNo") String waybillNo);
void deleteListByIds(@Param("ids") List<Long> ids);
}

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineWaybillTrackMapper.xml

@ -91,4 +91,11 @@
</select>
<delete id="deleteListByIds" >
delete from logpm_trunkline_waybill_track where id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper>

1
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineWaybillTrackService.java

@ -18,4 +18,5 @@ public interface ITrunklineWaybillTrackService extends BaseService<TrunklineWayb
void addSignWaybillLog(WaybillLogDTO waybillLogDTO);
void deleteListByIds(List<Long> ids);
}

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

@ -24,8 +24,6 @@ import org.springblade.common.constant.broadcast.FanoutConstants;
import org.springblade.common.model.FanoutMsg;
import org.springblade.common.utils.CommonUtil;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.system.cache.UserCache;
import org.springblade.system.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
@ -176,6 +174,14 @@ public class OpenOrderAsyncServiceImpl implements IOpenOrderAsyncService {
log.warn("saveAbnormalLog >>>> 重复保存,不做处理");
}
}else{
//把list中所有对象的id取出来放入一个list
List<Long> ids = list.stream().map(TrunklineWaybillTrackEntity::getId).collect(Collectors.toList());
//把ids的第一个元素移除
ids.remove(0);
if(CollUtil.isNotEmpty(ids)){
trunklineWaybillTrackService.deleteListByIds(ids);
}
}
}else{
TrunklineWaybillTrackEntity waybillTrackEntity = new TrunklineWaybillTrackEntity();

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

@ -108,6 +108,11 @@ public class TrunklineWaybillTrackServiceImpl extends BaseServiceImpl<TrunklineW
}
}
@Override
public void deleteListByIds(List<Long> ids) {
baseMapper.deleteListByIds(ids);
}
private void addZeroWaybillTrackLog(WaybillLogDTO waybillLogDTO, WarehouseWaybillEntity warehouseWaybillEntity) {
Long waybillId = warehouseWaybillEntity.getId();
Integer num = waybillLogDTO.getNum();

Loading…
Cancel
Save