|
|
|
@ -35,7 +35,10 @@ public class ThrDeptServiceImpl extends ServiceImpl<ThrDeptDao, ThrDeptEntity> i
|
|
|
|
|
private ErpBasicClient erpBasicClient;
|
|
|
|
|
@Resource
|
|
|
|
|
private ThrInvWarehouseDao thrInvWarehouseDao;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private ThrDeptServiceImpl thrDeptService;
|
|
|
|
|
@Resource
|
|
|
|
|
private ThrInvWarehouseServiceImpl thrInvWarehouseService;
|
|
|
|
|
@Override
|
|
|
|
|
public ThrDeptEntity findDefault(Boolean advaceType, Boolean isDefault) {
|
|
|
|
|
|
|
|
|
@ -161,9 +164,39 @@ public class ThrDeptServiceImpl extends ServiceImpl<ThrDeptDao, ThrDeptEntity> i
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
thrDeptDao.delete(new QueryWrapper<>());
|
|
|
|
|
thrInvWarehouseDao.delete(new QueryWrapper<>());
|
|
|
|
|
|
|
|
|
|
thrInvWarehouseService.saveBatch(warehouseList);
|
|
|
|
|
this.saveBatch(list);
|
|
|
|
|
// if(list!= null && list.size() >0){
|
|
|
|
|
// for (ThrDeptEntity thrDeptEntity : list) {
|
|
|
|
|
// QueryWrapper queryWrapper = new QueryWrapper<ThrDeptEntity>().eq("code",thrDeptEntity.getCode());
|
|
|
|
|
// ThrDeptEntity thrDeptEntityNew = thrDeptDao.selectOne(queryWrapper);
|
|
|
|
|
// if(thrDeptEntityNew!=null){
|
|
|
|
|
// thrDeptDao.update(thrDeptEntity,queryWrapper);
|
|
|
|
|
// }else {
|
|
|
|
|
// thrDeptDao.insert(thrDeptEntity);
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// if(warehouseList!= null && warehouseList.size() >0){
|
|
|
|
|
// for (ThrInvWarehouseEntity invWarehouseEntity : warehouseList) {
|
|
|
|
|
// QueryWrapper queryWrapper = new QueryWrapper<ThrDeptEntity>().eq("code",invWarehouseEntity.getCode());
|
|
|
|
|
// ThrInvWarehouseEntity thrInvWarehouseEntityNew = thrInvWarehouseDao.selectOne(queryWrapper);
|
|
|
|
|
// if(thrInvWarehouseEntityNew!=null){
|
|
|
|
|
// thrInvWarehouseDao.update(invWarehouseEntity,queryWrapper);
|
|
|
|
|
// }else {
|
|
|
|
|
// thrInvWarehouseDao.insert(invWarehouseEntity);
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//插入数据
|
|
|
|
|
thrDeptDao.insertThrDeptList(list);
|
|
|
|
|
thrInvWarehouseDao.insertThrInvWarehouses(warehouseList);
|
|
|
|
|
// thrDeptDao.insertOrUpdateBatch(list);
|
|
|
|
|
// thrInvWarehouseDao.insertOrUpdateBatch(warehouseList);
|
|
|
|
|
// thrInvWarehouseDao.insertThrInvWarehouses(warehouseList);
|
|
|
|
|
if (list.size() >= limit) {
|
|
|
|
|
page++;
|
|
|
|
|
} else {
|
|
|
|
|