|
@@ -5,6 +5,7 @@ import com.kmall.admin.dto.GoodsTransportInfoDetailExcelDto;
|
|
import com.kmall.admin.entity.GoodsTransportInfoDetailEntity;
|
|
import com.kmall.admin.entity.GoodsTransportInfoDetailEntity;
|
|
import com.kmall.admin.service.GoodsTransportInfoDetailService;
|
|
import com.kmall.admin.service.GoodsTransportInfoDetailService;
|
|
import com.kmall.common.utils.Query;
|
|
import com.kmall.common.utils.Query;
|
|
|
|
+import com.kmall.common.utils.RRException;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -75,6 +76,11 @@ public class GoodsTransportInfoDetailServiceImpl implements GoodsTransportInfoDe
|
|
public void saveExcelDtoList(List<GoodsTransportInfoDetailExcelDto> goodsTransportInfoDetailExcelDtoList) {
|
|
public void saveExcelDtoList(List<GoodsTransportInfoDetailExcelDto> goodsTransportInfoDetailExcelDtoList) {
|
|
goodsTransportInfoDetailExcelDtoList.forEach(goodsTransportInfoDetailExcelDto -> {
|
|
goodsTransportInfoDetailExcelDtoList.forEach(goodsTransportInfoDetailExcelDto -> {
|
|
GoodsTransportInfoDetailEntity goodsTransportInfoDetailEntity = new GoodsTransportInfoDetailEntity();
|
|
GoodsTransportInfoDetailEntity goodsTransportInfoDetailEntity = new GoodsTransportInfoDetailEntity();
|
|
|
|
+ if (goodsTransportInfoDetailExcelDto.getWayStatus()==null ||
|
|
|
|
+ (Integer.parseInt(goodsTransportInfoDetailExcelDto.getWayStatus())!=0
|
|
|
|
+ && Integer.parseInt(goodsTransportInfoDetailExcelDto.getWayStatus()) != 1)){
|
|
|
|
+ throw new RRException("是否在途必填,且只能填0或1");
|
|
|
|
+ }
|
|
goodsTransportInfoDetailEntity.setWayStatus(Integer.parseInt(goodsTransportInfoDetailExcelDto.getWayStatus()));
|
|
goodsTransportInfoDetailEntity.setWayStatus(Integer.parseInt(goodsTransportInfoDetailExcelDto.getWayStatus()));
|
|
goodsTransportInfoDetailEntity.setSku(goodsTransportInfoDetailExcelDto.getSku());
|
|
goodsTransportInfoDetailEntity.setSku(goodsTransportInfoDetailExcelDto.getSku());
|
|
goodsTransportInfoDetailEntity.setSupplierId(Integer.parseInt(goodsTransportInfoDetailExcelDto.getSupplierId()));
|
|
goodsTransportInfoDetailEntity.setSupplierId(Integer.parseInt(goodsTransportInfoDetailExcelDto.getSupplierId()));
|