"src/main/webapp/upload/article/1/1436260614687.png" did not exist on "c9bf4f7e66b8fafcfe4ad7ff795c691daab54f8b"
Commit 55135aca authored by 季圣华's avatar 季圣华
Browse files

整理代码

parent 46b75fec
package com.jsh.service.asset;
import com.jsh.exception.AmsException;
import com.jsh.exception.JshException;
import com.jsh.model.po.Asset;
import com.jsh.util.common.PageUtil;
......@@ -9,7 +9,7 @@ public interface ReportIService
/**
* 查找报表数据
* @param asset
* @throws AmsException
* @throws JshException
*/
void find(PageUtil<Asset> asset,String reportType,String reportName)throws AmsException;
void find(PageUtil<Asset> asset,String reportType,String reportName)throws JshException;
}
package com.jsh.service.asset;
import com.jsh.dao.asset.ReportIDAO;
import com.jsh.exception.AmsException;
import com.jsh.exception.JshException;
import com.jsh.model.po.Asset;
import com.jsh.util.common.PageUtil;
......@@ -15,7 +15,7 @@ public class ReportService implements ReportIService
}
@Override
public void find(PageUtil<Asset> pageUtil, String reportType,String reportName) throws AmsException
public void find(PageUtil<Asset> pageUtil, String reportType,String reportName) throws JshException
{
reportDao.find(pageUtil, reportType,reportName);
}
......
package com.jsh.service.basic;
import com.jsh.base.BaseIService;
import com.jsh.exception.AmsException;
import com.jsh.exception.JshException;
import com.jsh.model.po.Logdetails;
public interface LogIService extends BaseIService<Logdetails>
......@@ -9,7 +9,7 @@ public interface LogIService extends BaseIService<Logdetails>
/**
* 增加
* @param t 对象
* @throws AmsException
* @throws JshException
*/
@Override
void save(Logdetails t);
......
package com.jsh.service.basic;
import com.jsh.base.BaseIService;
import com.jsh.exception.AmsException;
import com.jsh.exception.JshException;
import com.jsh.model.po.UserBusiness;
import com.jsh.util.common.PageUtil;
......@@ -10,6 +10,6 @@ public interface UserBusinessIService extends BaseIService<UserBusiness>
/*
* 测试一下自定义hql语句
*/
void find(PageUtil<UserBusiness> userBusiness,String ceshi)throws AmsException;
void find(PageUtil<UserBusiness> userBusiness,String ceshi)throws JshException;
}
......@@ -2,7 +2,7 @@ package com.jsh.service.basic;
import com.jsh.base.BaseService;
import com.jsh.dao.basic.UserBusinessIDAO;
import com.jsh.exception.AmsException;
import com.jsh.exception.JshException;
import com.jsh.model.po.UserBusiness;
import com.jsh.util.common.PageUtil;
......@@ -23,7 +23,7 @@ public class UserBusinessService extends BaseService<UserBusiness> implements Us
}
@Override
public void find(PageUtil<UserBusiness> pageUtil, String ceshi) throws AmsException
public void find(PageUtil<UserBusiness> pageUtil, String ceshi) throws JshException
{
userBusinessDao.find(pageUtil, ceshi);
}
......
package com.jsh.service.basic;
import com.jsh.base.BaseIService;
import com.jsh.exception.AmsException;
import com.jsh.exception.JshException;
import com.jsh.model.po.Basicuser;
public interface UserIService extends BaseIService<Basicuser>
......@@ -11,15 +11,15 @@ public interface UserIService extends BaseIService<Basicuser>
* @param username 用户名 String password
* @return int 1、用户名不存在 2、密码不正确 3、黑名单用户 4、符合条件 5、访问后台异常
*/
int validateUser(String username,String password)throws AmsException;
int validateUser(String username,String password)throws JshException;
/**
* 获取用户信息
* @param username
* @return 用户信息
* @throws AmsException
* @throws JshException
*/
public Basicuser getUser(String username) throws AmsException;
public Basicuser getUser(String username) throws JshException;
/**
* 检查用户名称是否存在
......@@ -27,7 +27,7 @@ public interface UserIService extends BaseIService<Basicuser>
* @param username 用户名称
* @param userID 供应商ID
* @return true==存在重名 false==不存在
* @throws AmsException
* @throws JshException
*/
Boolean checkIsNameExist(String field,String username,Long userID)throws AmsException;
Boolean checkIsNameExist(String field,String username,Long userID)throws JshException;
}
......@@ -9,7 +9,7 @@ import com.jsh.base.Log;
import com.jsh.constants.common.ExceptionCodeConstants;
import com.jsh.dao.basic.UserBusinessIDAO;
import com.jsh.dao.basic.UserIDAO;
import com.jsh.exception.AmsException;
import com.jsh.exception.JshException;
import com.jsh.model.po.Basicuser;
import com.jsh.util.common.PageUtil;
......@@ -20,7 +20,7 @@ public class UserService extends BaseService<Basicuser> implements UserIService
private UserIDAO userDao;
@Override
public int validateUser(String username, String password)throws AmsException
public int validateUser(String username, String password)throws JshException
{
try
{
......@@ -66,12 +66,12 @@ public class UserService extends BaseService<Basicuser> implements UserIService
}
catch (Exception e)
{
throw new AmsException("unknown exception",e);
throw new JshException("unknown exception",e);
}
}
@Override
public Basicuser getUser(String username) throws AmsException
public Basicuser getUser(String username) throws JshException
{
//全局变量 每次使用前清除
condition.clear();
......@@ -82,11 +82,11 @@ public class UserService extends BaseService<Basicuser> implements UserIService
if(null != list && list.size() >0)
return list.get(0);
else
throw new AmsException("no username exist");
throw new JshException("no username exist");
}
@Override
public Boolean checkIsNameExist(String field,String username, Long userID)throws AmsException
public Boolean checkIsNameExist(String field,String username, Long userID)throws JshException
{
condition.clear();
condition.put(field + "_s_eq", username);
......
package com.jsh.service.materials;
import com.jsh.base.BaseIService;
import com.jsh.exception.AmsException;
import com.jsh.exception.JshException;
import com.jsh.model.po.DepotHead;
import com.jsh.model.po.UserBusiness;
import com.jsh.util.common.PageUtil;
......@@ -11,5 +11,5 @@ public interface DepotHeadIService extends BaseIService<DepotHead>
/*
* 获取MaxId
*/
void find(PageUtil<DepotHead> depotHead,String maxid)throws AmsException;
void find(PageUtil<DepotHead> depotHead,String maxid)throws JshException;
}
......@@ -2,7 +2,7 @@ package com.jsh.service.materials;
import com.jsh.base.BaseService;
import com.jsh.dao.materials.DepotHeadIDAO;
import com.jsh.exception.AmsException;
import com.jsh.exception.JshException;
import com.jsh.model.po.DepotHead;
import com.jsh.model.po.UserBusiness;
import com.jsh.util.common.PageUtil;
......@@ -25,7 +25,7 @@ public class DepotHeadService extends BaseService<DepotHead> implements DepotHea
}
@Override
public void find(PageUtil<DepotHead> pageUtil, String maxid) throws AmsException
public void find(PageUtil<DepotHead> pageUtil, String maxid) throws JshException
{
depotHeadDao.find(pageUtil, maxid);
}
......
......@@ -6,7 +6,7 @@ import java.util.List;
import net.sf.json.JSONArray;
import com.jsh.base.BaseIService;
import com.jsh.exception.AmsException;
import com.jsh.exception.JshException;
import com.jsh.model.po.Asset;
import com.jsh.model.po.DepotHead;
import com.jsh.model.po.DepotItem;
......@@ -14,13 +14,13 @@ import com.jsh.util.common.PageUtil;
public interface DepotItemIService extends BaseIService<DepotItem>
{
void findByType(PageUtil<DepotItem> depotItem, String type, Long MId, String MonthTime,Boolean isPrev)throws AmsException;
void findByType(PageUtil<DepotItem> depotItem, String type, Long MId, String MonthTime,Boolean isPrev)throws JshException;
void findOrderByMaterial(PageUtil<DepotItem> depotItem)throws AmsException;
void findOrderByMaterial(PageUtil<DepotItem> depotItem)throws JshException;
/**
* 导出信息
* @return
*/
InputStream exmportExcel(String isAllPage,JSONArray dataArray)throws AmsException;
InputStream exmportExcel(String isAllPage,JSONArray dataArray)throws JshException;
}
......@@ -20,7 +20,7 @@ import com.jsh.base.BaseService;
import com.jsh.base.Log;
import com.jsh.constants.asset.AssetConstants;
import com.jsh.dao.materials.DepotItemIDAO;
import com.jsh.exception.AmsException;
import com.jsh.exception.JshException;
import com.jsh.model.po.Asset;
import com.jsh.model.po.DepotHead;
import com.jsh.model.po.DepotItem;
......@@ -45,13 +45,13 @@ public class DepotItemService extends BaseService<DepotItem> implements DepotIte
}
@Override
public void findByType(PageUtil<DepotItem> pageUtil, String type,Long MId, String MonthTime,Boolean isPrev) throws AmsException
public void findByType(PageUtil<DepotItem> pageUtil, String type,Long MId, String MonthTime,Boolean isPrev) throws JshException
{
depotItemDao.findByType(pageUtil, type, MId, MonthTime,isPrev);
}
@Override
public void findOrderByMaterial(PageUtil<DepotItem> pageUtil) throws AmsException
public void findOrderByMaterial(PageUtil<DepotItem> pageUtil) throws JshException
{
depotItemDao.findOrderByMaterial(pageUtil);
}
......@@ -60,7 +60,7 @@ public class DepotItemService extends BaseService<DepotItem> implements DepotIte
* 导出Excel表格
*/
@Override
public InputStream exmportExcel(String isAllPage,JSONArray dataArray)throws AmsException
public InputStream exmportExcel(String isAllPage,JSONArray dataArray)throws JshException
{
try
{
......@@ -72,7 +72,7 @@ public class DepotItemService extends BaseService<DepotItem> implements DepotIte
catch (Exception e)
{
Log.errorFileSync(">>>>>>>>>>>>>>>>>>>>>>>导出信息为excel表格异常", e);
throw new AmsException("export asset info to excel exception",e);
throw new JshException("export asset info to excel exception",e);
}
}
......
/**
* 项 目 名:HiTV
* 包 名:com.suma.hitv.utils
* 文 件 名:BeanFactoryUtil.java
* 版本信息:V1.0
* 日 期:2011-12-30-下午01:25:00
* Copyright (c) 2000-2011北京数码视讯有限公司版权所有
*
*/
package com.jsh.util.common;
import java.util.HashMap;
......@@ -19,7 +10,7 @@ import org.springframework.context.support.FileSystemXmlApplicationContext;
/**
* 获取spring配置中的bean对象,是单例,只会加载一次,请注意使用
* 注意:此工具类默认处理UI组件WEB-INF目录下的applicationContext.xml配置文件,请注意文件 名和路径
* @author andy
* @author jishenghua
* @version V1.0
*/
public class BeanFactoryUtil
......
......@@ -7,7 +7,7 @@ import java.util.List;
import java.util.Map;
/**
* 分页工具类,实现分页功能
* @author andy
* @author jishenghua
* @version [版本号version01, 2012-1-25]
*/
@SuppressWarnings("serial")
......
......@@ -8,7 +8,7 @@ import com.jsh.base.Log;
/**
* 获取应用系统路径
* @author andy
* @author jishenghua
*/
public class PathTool
{
......
......@@ -6,7 +6,7 @@ import java.util.Set;
/**
* 根据搜索条件拼装成查询hql语句
* @author andy
* @author jishenghua
*/
public class SearchConditionUtil
{
......
......@@ -14,8 +14,7 @@ import java.util.Date;
import java.util.Locale;
import java.util.UUID;
import java.util.regex.Pattern;
import sun.misc.BASE64Encoder;
import java.math.BigInteger;
public class Tools
{
......@@ -435,7 +434,7 @@ public class Tools
/**
* 判断字符串中是否含有中文
* @author andy
* @author jishenghua
* @param str
* @return
*/
......@@ -456,7 +455,7 @@ public class Tools
/**
* 去掉字符串中所有符号,不论是全角,还是半角的,或是货币符号或者空格等
* @author andy
* @author jishenghua
* @param s
* @return
*
......@@ -483,7 +482,11 @@ public class Tools
*/
public static String md5Encryp(String msg) throws NoSuchAlgorithmException
{
return new BASE64Encoder().encode(MessageDigest.getInstance("MD5").digest(msg.getBytes()));
// 生成一个MD5加密计算摘要
MessageDigest md = MessageDigest.getInstance("MD5");
// 计算md5函数
md.update(msg.getBytes());
return new BigInteger(1, md.digest()).toString(16);
}
/**
......@@ -500,7 +503,7 @@ public class Tools
/**
* 使用参数Format将字符串转为Date
* @author andy
* @author jishenghua
* @param strDate
* @param pattern
* @return
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment