⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sysadminmanagerimpl.java

📁 基本库存管理系统的框架 struts hibernate
💻 JAVA
字号:
package com.strong.ims.service.sysadmin.impl;

import java.util.List;

import com.strong.ims.comutil.IConstants;
import com.strong.ims.comutil.PageBean;
import com.strong.ims.comutil.exception.BaseException;
import com.strong.ims.dao.DaoFactory;
import com.strong.ims.domain.sysmanage.StorageInfo;
import com.strong.ims.service.sysadmin.SysAdminManager;

/**
 * 系统管理业务 实现类
 * @author jqg
 *
 */
public class SysAdminManagerImpl implements SysAdminManager {

	public SysAdminManagerImpl() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	/**
	 * ------------- 仓库管理-----------------
	 */
	
	/**
	 * 添加新仓库
	 * @param StorageInfo
	 * @throws BaseException 
	 */
	public void addNewStorageInfo(StorageInfo storageInfo) throws BaseException {
		// TODO Auto-generated method stub
		//throw new  BaseException(IConstants.ERROR_DAOPROCESS,"");
		DaoFactory.getStorageInfoDao().createStorageInfo(storageInfo );
	}
	
	/**
	 * 删除某仓库
	 * @param StorageInfoID
	 * @throws BaseException 
	 */
	public void deleteStorageInfoById(String stroageId) throws BaseException {
		// TODO Auto-generated method stub
		StorageInfo storageInfo  = new StorageInfo( );
		storageInfo.setF_sid( stroageId );
		
		DaoFactory.getStorageInfoDao().deleteStorageInfo(storageInfo);
	}
	
	/**
	 * 修改某仓库信息
	 * @param StorageInfo
	 * @throws BaseException 
	 */
	public void editStorageInfo(StorageInfo storageInfo) throws BaseException {
		// TODO Auto-generated method stub
		DaoFactory.getStorageInfoDao().updateStorageInfo(storageInfo);
	}
	
	/**
	 * 查询仓库信息
	 * @param name
	 * @param 
	 * @throws BaseException 
	 */
	public List getStorageInfoByHQL(String storageName, String storageState ) throws BaseException {
		// TODO Auto-generated method stub
//		String hql = "from StorageInfo as s where s.f_storagename like '" +storageName + "%' and s.f_isdelete = '" 
//			+  storageState + "'";
		StringBuffer HQL = new StringBuffer();
		HQL.append("from StorageInfo as s where s.f_sid is not null");
		if( storageName != null && storageName.trim().length() >= 1) {
			HQL.append(" and s.f_storagename like '" +storageName + "%'");
		}
		if( storageState != null && storageState.trim().length() >= 1) {
			HQL.append(" and s.f_isdelete = '" +  storageState + "'");
		}
		return DaoFactory.getStorageInfoDao().loadStorageInfoByHQL( HQL.toString() );
	}
	
	/**
	 * 读取某仓库信息
	 * @param storageId
	 * @throws BaseException 
	 */
	public StorageInfo getStorageInfoById(String storageId) throws BaseException {
		// TODO Auto-generated method stub
		return DaoFactory.getStorageInfoDao().loadStorageInfo(storageId);
	}
	/**
	 * 查询某仓库信息
	 * @param name
	 * @param 
	 * @throws BaseException 
	 * 支持分页
	 */
	public List getStorageInfoByHQL(String storageName, String storageState, PageBean pageBean) throws BaseException {
		// TODO Auto-generated method stub
		return null;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -