|
|
|
@ -16,16 +16,20 @@
|
|
|
|
|
*/ |
|
|
|
|
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.vo.BasicdataStorageServicesVO; |
|
|
|
|
import com.logpm.basicdata.excel.BasicdataStorageServicesExcel; |
|
|
|
|
import com.logpm.basicdata.mapper.BasicdataStorageServicesMapper; |
|
|
|
|
import com.logpm.basicdata.service.IBasicdataStorageServicesService; |
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 门店服务仓库表 服务实现类 |
|
|
|
@ -51,4 +55,26 @@ public class BasicdataStorageServicesServiceImpl extends BaseServiceImpl<Basicda
|
|
|
|
|
return basicdataStorageServicesList; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean submitSave(BasicdataStorageServicesEntity basicdataStorageServices) { |
|
|
|
|
|
|
|
|
|
List<BasicdataStorageServicesEntity> basicdataStorageServicesEntities = baseMapper.selectList(Wrappers.<BasicdataStorageServicesEntity>query().lambda(). |
|
|
|
|
eq(BasicdataStorageServicesEntity::getShopId, basicdataStorageServices.getShopId()). |
|
|
|
|
eq(BasicdataStorageServicesEntity::getForwardingUnit, basicdataStorageServices.getForwardingUnit()). |
|
|
|
|
eq(BasicdataStorageServicesEntity::getWarehouseService, basicdataStorageServices.getWarehouseService()) |
|
|
|
|
); |
|
|
|
|
if(basicdataStorageServicesEntities.size() > 0){ |
|
|
|
|
throw new RuntimeException("存在重复数据!已拒绝!!"); |
|
|
|
|
} |
|
|
|
|
return this.saveOrUpdate(basicdataStorageServices); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public List<BasicdataStorageServicesVO> pageList(IPage<Object> page, Map<String, Object> basicdataStorageServices) { |
|
|
|
|
BasicdataStorageServicesEntity basicdataStorageServicesEntity = JSONObject.parseObject(JSONObject.toJSONString(basicdataStorageServices), BasicdataStorageServicesEntity.class); |
|
|
|
|
BasicdataStorageServicesVO basicdataStorageServicesvo = new BasicdataStorageServicesVO() ; |
|
|
|
|
BeanUtils.copyProperties(basicdataStorageServicesEntity,basicdataStorageServicesvo); |
|
|
|
|
return baseMapper.selectBasicdataStorageServicesPage(page,basicdataStorageServicesvo); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|