Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
55135aca
"src/main/webapp/upload/article/1/1436260614687.png" did not exist on "c9bf4f7e66b8fafcfe4ad7ff795c691daab54f8b"
Commit
55135aca
authored
Nov 19, 2016
by
季圣华
Browse files
整理代码
parent
46b75fec
Changes
76
Show whitespace changes
Inline
Side-by-side
src/com/jsh/service/asset/ReportIService.java
View file @
55135aca
package
com.jsh.service.asset
;
import
com.jsh.exception.
Ams
Exception
;
import
com.jsh.exception.
Jsh
Exception
;
import
com.jsh.model.po.Asset
;
import
com.jsh.util.common.PageUtil
;
...
...
@@ -9,7 +9,7 @@ public interface ReportIService
/**
* 查找报表数据
* @param asset
* @throws
Ams
Exception
* @throws
Jsh
Exception
*/
void
find
(
PageUtil
<
Asset
>
asset
,
String
reportType
,
String
reportName
)
throws
Ams
Exception
;
void
find
(
PageUtil
<
Asset
>
asset
,
String
reportType
,
String
reportName
)
throws
Jsh
Exception
;
}
src/com/jsh/service/asset/ReportService.java
View file @
55135aca
package
com.jsh.service.asset
;
import
com.jsh.dao.asset.ReportIDAO
;
import
com.jsh.exception.
Ams
Exception
;
import
com.jsh.exception.
Jsh
Exception
;
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
Ams
Exception
public
void
find
(
PageUtil
<
Asset
>
pageUtil
,
String
reportType
,
String
reportName
)
throws
Jsh
Exception
{
reportDao
.
find
(
pageUtil
,
reportType
,
reportName
);
}
...
...
src/com/jsh/service/basic/LogIService.java
View file @
55135aca
package
com.jsh.service.basic
;
import
com.jsh.base.BaseIService
;
import
com.jsh.exception.
Ams
Exception
;
import
com.jsh.exception.
Jsh
Exception
;
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
Ams
Exception
* @throws
Jsh
Exception
*/
@Override
void
save
(
Logdetails
t
);
...
...
src/com/jsh/service/basic/UserBusinessIService.java
View file @
55135aca
package
com.jsh.service.basic
;
import
com.jsh.base.BaseIService
;
import
com.jsh.exception.
Ams
Exception
;
import
com.jsh.exception.
Jsh
Exception
;
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
Ams
Exception
;
void
find
(
PageUtil
<
UserBusiness
>
userBusiness
,
String
ceshi
)
throws
Jsh
Exception
;
}
src/com/jsh/service/basic/UserBusinessService.java
View file @
55135aca
...
...
@@ -2,7 +2,7 @@ package com.jsh.service.basic;
import
com.jsh.base.BaseService
;
import
com.jsh.dao.basic.UserBusinessIDAO
;
import
com.jsh.exception.
Ams
Exception
;
import
com.jsh.exception.
Jsh
Exception
;
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
Ams
Exception
public
void
find
(
PageUtil
<
UserBusiness
>
pageUtil
,
String
ceshi
)
throws
Jsh
Exception
{
userBusinessDao
.
find
(
pageUtil
,
ceshi
);
}
...
...
src/com/jsh/service/basic/UserIService.java
View file @
55135aca
package
com.jsh.service.basic
;
import
com.jsh.base.BaseIService
;
import
com.jsh.exception.
Ams
Exception
;
import
com.jsh.exception.
Jsh
Exception
;
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
Ams
Exception
;
int
validateUser
(
String
username
,
String
password
)
throws
Jsh
Exception
;
/**
* 获取用户信息
* @param username
* @return 用户信息
* @throws
Ams
Exception
* @throws
Jsh
Exception
*/
public
Basicuser
getUser
(
String
username
)
throws
Ams
Exception
;
public
Basicuser
getUser
(
String
username
)
throws
Jsh
Exception
;
/**
* 检查用户名称是否存在
...
...
@@ -27,7 +27,7 @@ public interface UserIService extends BaseIService<Basicuser>
* @param username 用户名称
* @param userID 供应商ID
* @return true==存在重名 false==不存在
* @throws
Ams
Exception
* @throws
Jsh
Exception
*/
Boolean
checkIsNameExist
(
String
field
,
String
username
,
Long
userID
)
throws
Ams
Exception
;
Boolean
checkIsNameExist
(
String
field
,
String
username
,
Long
userID
)
throws
Jsh
Exception
;
}
src/com/jsh/service/basic/UserService.java
View file @
55135aca
...
...
@@ -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.
Ams
Exception
;
import
com.jsh.exception.
Jsh
Exception
;
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
Ams
Exception
public
int
validateUser
(
String
username
,
String
password
)
throws
Jsh
Exception
{
try
{
...
...
@@ -66,12 +66,12 @@ public class UserService extends BaseService<Basicuser> implements UserIService
}
catch
(
Exception
e
)
{
throw
new
Ams
Exception
(
"unknown exception"
,
e
);
throw
new
Jsh
Exception
(
"unknown exception"
,
e
);
}
}
@Override
public
Basicuser
getUser
(
String
username
)
throws
Ams
Exception
public
Basicuser
getUser
(
String
username
)
throws
Jsh
Exception
{
//全局变量 每次使用前清除
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
Ams
Exception
(
"no username exist"
);
throw
new
Jsh
Exception
(
"no username exist"
);
}
@Override
public
Boolean
checkIsNameExist
(
String
field
,
String
username
,
Long
userID
)
throws
Ams
Exception
public
Boolean
checkIsNameExist
(
String
field
,
String
username
,
Long
userID
)
throws
Jsh
Exception
{
condition
.
clear
();
condition
.
put
(
field
+
"_s_eq"
,
username
);
...
...
src/com/jsh/service/materials/DepotHeadIService.java
View file @
55135aca
package
com.jsh.service.materials
;
import
com.jsh.base.BaseIService
;
import
com.jsh.exception.
Ams
Exception
;
import
com.jsh.exception.
Jsh
Exception
;
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
Ams
Exception
;
void
find
(
PageUtil
<
DepotHead
>
depotHead
,
String
maxid
)
throws
Jsh
Exception
;
}
src/com/jsh/service/materials/DepotHeadService.java
View file @
55135aca
...
...
@@ -2,7 +2,7 @@ package com.jsh.service.materials;
import
com.jsh.base.BaseService
;
import
com.jsh.dao.materials.DepotHeadIDAO
;
import
com.jsh.exception.
Ams
Exception
;
import
com.jsh.exception.
Jsh
Exception
;
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
Ams
Exception
public
void
find
(
PageUtil
<
DepotHead
>
pageUtil
,
String
maxid
)
throws
Jsh
Exception
{
depotHeadDao
.
find
(
pageUtil
,
maxid
);
}
...
...
src/com/jsh/service/materials/DepotItemIService.java
View file @
55135aca
...
...
@@ -6,7 +6,7 @@ import java.util.List;
import
net.sf.json.JSONArray
;
import
com.jsh.base.BaseIService
;
import
com.jsh.exception.
Ams
Exception
;
import
com.jsh.exception.
Jsh
Exception
;
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
Ams
Exception
;
void
findByType
(
PageUtil
<
DepotItem
>
depotItem
,
String
type
,
Long
MId
,
String
MonthTime
,
Boolean
isPrev
)
throws
Jsh
Exception
;
void
findOrderByMaterial
(
PageUtil
<
DepotItem
>
depotItem
)
throws
Ams
Exception
;
void
findOrderByMaterial
(
PageUtil
<
DepotItem
>
depotItem
)
throws
Jsh
Exception
;
/**
* 导出信息
* @return
*/
InputStream
exmportExcel
(
String
isAllPage
,
JSONArray
dataArray
)
throws
Ams
Exception
;
InputStream
exmportExcel
(
String
isAllPage
,
JSONArray
dataArray
)
throws
Jsh
Exception
;
}
src/com/jsh/service/materials/DepotItemService.java
View file @
55135aca
...
...
@@ -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.
Ams
Exception
;
import
com.jsh.exception.
Jsh
Exception
;
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
Ams
Exception
public
void
findByType
(
PageUtil
<
DepotItem
>
pageUtil
,
String
type
,
Long
MId
,
String
MonthTime
,
Boolean
isPrev
)
throws
Jsh
Exception
{
depotItemDao
.
findByType
(
pageUtil
,
type
,
MId
,
MonthTime
,
isPrev
);
}
@Override
public
void
findOrderByMaterial
(
PageUtil
<
DepotItem
>
pageUtil
)
throws
Ams
Exception
public
void
findOrderByMaterial
(
PageUtil
<
DepotItem
>
pageUtil
)
throws
Jsh
Exception
{
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
Ams
Exception
public
InputStream
exmportExcel
(
String
isAllPage
,
JSONArray
dataArray
)
throws
Jsh
Exception
{
try
{
...
...
@@ -72,7 +72,7 @@ public class DepotItemService extends BaseService<DepotItem> implements DepotIte
catch
(
Exception
e
)
{
Log
.
errorFileSync
(
">>>>>>>>>>>>>>>>>>>>>>>导出信息为excel表格异常"
,
e
);
throw
new
Ams
Exception
(
"export asset info to excel exception"
,
e
);
throw
new
Jsh
Exception
(
"export asset info to excel exception"
,
e
);
}
}
...
...
src/com/jsh/util/common/BeanFactoryUtil.java
View file @
55135aca
/**
* 项 目 名: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
...
...
src/com/jsh/util/common/PageUtil.java
View file @
55135aca
...
...
@@ -7,7 +7,7 @@ import java.util.List;
import
java.util.Map
;
/**
* 分页工具类,实现分页功能
* @author
andy
* @author
jishenghua
* @version [版本号version01, 2012-1-25]
*/
@SuppressWarnings
(
"serial"
)
...
...
src/com/jsh/util/common/PathTool.java
View file @
55135aca
...
...
@@ -8,7 +8,7 @@ import com.jsh.base.Log;
/**
* 获取应用系统路径
* @author
andy
* @author
jishenghua
*/
public
class
PathTool
{
...
...
src/com/jsh/util/common/SearchConditionUtil.java
View file @
55135aca
...
...
@@ -6,7 +6,7 @@ import java.util.Set;
/**
* 根据搜索条件拼装成查询hql语句
* @author
andy
* @author
jishenghua
*/
public
class
SearchConditionUtil
{
...
...
src/com/jsh/util/common/Tools.java
View file @
55135aca
...
...
@@ -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
...
...
Prev
1
2
3
4
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment