|
|
|
@ -19,11 +19,15 @@ package com.logpm.basicdata.service.impl;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataStorageServicesEntity; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataWarehouseEntity; |
|
|
|
|
import com.logpm.basicdata.service.IBasicdataWarehouseService; |
|
|
|
|
import com.logpm.basicdata.vo.BasicdataStorageServicesVO; |
|
|
|
|
import com.logpm.basicdata.excel.BasicdataStorageServicesExcel; |
|
|
|
|
import com.logpm.basicdata.mapper.BasicdataStorageServicesMapper; |
|
|
|
|
import com.logpm.basicdata.service.IBasicdataStorageServicesService; |
|
|
|
|
import org.checkerframework.checker.units.qual.A; |
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
@ -40,6 +44,10 @@ import java.util.Map;
|
|
|
|
|
@Service |
|
|
|
|
public class BasicdataStorageServicesServiceImpl extends BaseServiceImpl<BasicdataStorageServicesMapper, BasicdataStorageServicesEntity> implements IBasicdataStorageServicesService { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private IBasicdataWarehouseService basicdataWarehouseService; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public IPage<BasicdataStorageServicesVO> selectBasicdataStorageServicesPage(IPage<BasicdataStorageServicesVO> page, BasicdataStorageServicesVO basicdataStorageServices) { |
|
|
|
|
return page.setRecords(baseMapper.selectBasicdataStorageServicesPage(page, basicdataStorageServices)); |
|
|
|
@ -66,6 +74,17 @@ public class BasicdataStorageServicesServiceImpl extends BaseServiceImpl<Basicda
|
|
|
|
|
if(basicdataStorageServicesEntities.size() > 0){ |
|
|
|
|
throw new RuntimeException("存在重复数据!已拒绝!!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取仓库名称
|
|
|
|
|
BasicdataWarehouseEntity sendBasicdataWarehouseEntity = basicdataWarehouseService.getById(basicdataStorageServices.getSendWarehouseId()); |
|
|
|
|
basicdataStorageServices.setSendWarehouseName(sendBasicdataWarehouseEntity.getName()); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity serveBasicdataWarehouseEntity = basicdataWarehouseService.getById(basicdataStorageServices.getServeWarehouseId()); |
|
|
|
|
basicdataStorageServices.setServeWarehouseName(serveBasicdataWarehouseEntity.getName()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return this.saveOrUpdate(basicdataStorageServices); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|