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
86df29f6
Commit
86df29f6
authored
Dec 11, 2016
by
季圣华
Browse files
no commit message
parent
b8a2b074
Changes
73
Show whitespace changes
Inline
Side-by-side
src/com/jsh/action/materials/MaterialCategoryAction.java
View file @
86df29f6
...
@@ -5,20 +5,20 @@ import java.sql.Timestamp;
...
@@ -5,20 +5,20 @@ import java.sql.Timestamp;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONObject
;
import
net.sf.json.JSONObject
;
import
org.springframework.dao.DataAccessException
;
import
org.springframework.dao.DataAccessException
;
import
com.jsh.base.BaseAction
;
import
com.jsh.base.BaseAction
;
import
com.jsh.base.Log
;
import
com.jsh.base.Log
;
import
com.jsh.model.po.MaterialCategory
;
import
com.jsh.model.po.MaterialCategory
;
import
com.jsh.model.po.Logdetails
;
import
com.jsh.model.po.Logdetails
;
import
com.jsh.model.vo.materials.MaterialCategoryModel
;
import
com.jsh.model.vo.materials.MaterialCategoryModel
;
import
com.jsh.service.materials.MaterialCategoryIService
;
import
com.jsh.service.materials.MaterialCategoryIService
;
import
com.jsh.util.common.PageUtil
;
import
com.jsh.util.PageUtil
;
/*
* 商品类型管理
* @author jishenghua qq:752718920
*/
@SuppressWarnings
(
"serial"
)
@SuppressWarnings
(
"serial"
)
public
class
MaterialCategoryAction
extends
BaseAction
<
MaterialCategoryModel
>
public
class
MaterialCategoryAction
extends
BaseAction
<
MaterialCategoryModel
>
{
{
...
...
src/com/jsh/action/materials/PersonAction.java
View file @
86df29f6
...
@@ -5,12 +5,9 @@ import java.sql.Timestamp;
...
@@ -5,12 +5,9 @@ import java.sql.Timestamp;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONObject
;
import
net.sf.json.JSONObject
;
import
org.springframework.dao.DataAccessException
;
import
org.springframework.dao.DataAccessException
;
import
com.jsh.base.BaseAction
;
import
com.jsh.base.BaseAction
;
import
com.jsh.base.Log
;
import
com.jsh.base.Log
;
import
com.jsh.model.po.Depot
;
import
com.jsh.model.po.Depot
;
...
@@ -18,8 +15,11 @@ import com.jsh.model.po.Person;
...
@@ -18,8 +15,11 @@ import com.jsh.model.po.Person;
import
com.jsh.model.po.Logdetails
;
import
com.jsh.model.po.Logdetails
;
import
com.jsh.model.vo.materials.PersonModel
;
import
com.jsh.model.vo.materials.PersonModel
;
import
com.jsh.service.materials.PersonIService
;
import
com.jsh.service.materials.PersonIService
;
import
com.jsh.util.common.PageUtil
;
import
com.jsh.util.PageUtil
;
/*
* 经手人管理
* @author jishenghua qq:752718920
*/
@SuppressWarnings
(
"serial"
)
@SuppressWarnings
(
"serial"
)
public
class
PersonAction
extends
BaseAction
<
PersonModel
>
public
class
PersonAction
extends
BaseAction
<
PersonModel
>
{
{
...
@@ -49,6 +49,29 @@ public class PersonAction extends BaseAction<PersonModel>
...
@@ -49,6 +49,29 @@ public class PersonAction extends BaseAction<PersonModel>
return
SUCCESS
;
return
SUCCESS
;
}
}
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
public
String
getPersonByType
()
{
Map
<
String
,
List
>
mapData
=
model
.
getShowModel
().
getMap
();
PageUtil
pageUtil
=
new
PageUtil
();
pageUtil
.
setPageSize
(
0
);
pageUtil
.
setCurPage
(
0
);
try
{
Map
<
String
,
Object
>
condition
=
pageUtil
.
getAdvSearch
();
condition
.
put
(
"Type_s_eq"
,
model
.
getType
());
condition
.
put
(
"Id_s_order"
,
"asc"
);
personService
.
find
(
pageUtil
);
mapData
.
put
(
"personList"
,
pageUtil
.
getPageList
());
}
catch
(
Exception
e
)
{
Log
.
errorFileSync
(
">>>>>>>>>>>>>查找系统基础数据信息异常"
,
e
);
model
.
getShowModel
().
setMsgTip
(
"exceptoin"
);
}
return
SUCCESS
;
}
/**
/**
* 增加经手人
* 增加经手人
* @return
* @return
...
...
src/com/jsh/base/BaseAction.java
View file @
86df29f6
...
@@ -15,7 +15,7 @@ import com.jsh.model.po.Basicuser;
...
@@ -15,7 +15,7 @@ import com.jsh.model.po.Basicuser;
import
com.jsh.service.basic.LogIService
;
import
com.jsh.service.basic.LogIService
;
/**
/**
* struts2工具类
* struts2工具类
* @author jishenghua
* @author jishenghua
qq752718920
* struts2 base action 一些常用方法获取
* struts2 base action 一些常用方法获取
*/
*/
@SuppressWarnings
(
"serial"
)
@SuppressWarnings
(
"serial"
)
...
...
src/com/jsh/base/BaseDAO.java
View file @
86df29f6
...
@@ -8,11 +8,11 @@ import org.hibernate.Query;
...
@@ -8,11 +8,11 @@ import org.hibernate.Query;
import
org.springframework.dao.DataAccessException
;
import
org.springframework.dao.DataAccessException
;
import
org.springframework.orm.hibernate3.support.HibernateDaoSupport
;
import
org.springframework.orm.hibernate3.support.HibernateDaoSupport
;
import
com.jsh.util.
common.
PageUtil
;
import
com.jsh.util.PageUtil
;
import
com.jsh.util.
common.
SearchConditionUtil
;
import
com.jsh.util.SearchConditionUtil
;
/**
/**
* 基础dao
* 基础dao
* @author ji_sheng_hua
* @author ji_sheng_hua
qq:752718920
*/
*/
public
class
BaseDAO
<
T
>
extends
HibernateDaoSupport
implements
BaseIDAO
<
T
>
public
class
BaseDAO
<
T
>
extends
HibernateDaoSupport
implements
BaseIDAO
<
T
>
{
{
...
...
src/com/jsh/base/BaseIDAO.java
View file @
86df29f6
...
@@ -6,11 +6,11 @@ import java.util.Map;
...
@@ -6,11 +6,11 @@ import java.util.Map;
import
org.springframework.dao.DataAccessException
;
import
org.springframework.dao.DataAccessException
;
import
com.jsh.util.
common.
PageUtil
;
import
com.jsh.util.PageUtil
;
/**
/**
* 常用增删改查操作
* 常用增删改查操作
* @author ji-sheng-hua
* @author ji-sheng-hua
qq752718920
* @param <T>
* @param <T>
*/
*/
public
interface
BaseIDAO
<
T
>
public
interface
BaseIDAO
<
T
>
...
...
src/com/jsh/base/BaseIService.java
View file @
86df29f6
...
@@ -4,8 +4,12 @@ import java.io.Serializable;
...
@@ -4,8 +4,12 @@ import java.io.Serializable;
import
org.springframework.dao.DataAccessException
;
import
org.springframework.dao.DataAccessException
;
import
com.jsh.util.common.PageUtil
;
import
com.jsh.util.PageUtil
;
/**
* 服务层底层接口
* @author ji-sheng-hua qq752718920
* @param <T>
*/
public
interface
BaseIService
<
T
>
public
interface
BaseIService
<
T
>
{
{
/**
/**
...
...
src/com/jsh/base/BaseService.java
View file @
86df29f6
...
@@ -7,10 +7,14 @@ import java.util.Map;
...
@@ -7,10 +7,14 @@ import java.util.Map;
import
org.springframework.dao.DataAccessException
;
import
org.springframework.dao.DataAccessException
;
import
com.jsh.
exception
.JshException
;
import
com.jsh.
util
.JshException
;
import
com.jsh.model.po.Basicuser
;
import
com.jsh.model.po.Basicuser
;
import
com.jsh.util.common.PageUtil
;
import
com.jsh.util.PageUtil
;
/**
* 底层服务层
* @author ji-sheng-hua qq752718920
* @param <T>
*/
public
abstract
class
BaseService
<
T
>
implements
BaseIService
<
T
>
public
abstract
class
BaseService
<
T
>
implements
BaseIService
<
T
>
{
{
/**
/**
...
...
src/com/jsh/base/Log.java
View file @
86df29f6
...
@@ -4,7 +4,7 @@ import org.apache.log4j.Logger;
...
@@ -4,7 +4,7 @@ import org.apache.log4j.Logger;
/**
/**
* 封装log4j日志信息,打印日志信息类
* 封装log4j日志信息,打印日志信息类
* @author ji/sheng/hua
* @author ji/sheng/hua
qq_752718920
* @since 2014-01-22
* @since 2014-01-22
*/
*/
public
class
Log
public
class
Log
...
@@ -17,7 +17,7 @@ public class Log
...
@@ -17,7 +17,7 @@ public class Log
/**
/**
* 获取Log4j实例
* 获取Log4j实例
*/
*/
private
static
final
Logger
log
=
Logger
.
getLogger
(
"
ams
"
);
private
static
final
Logger
log
=
Logger
.
getLogger
(
"
jsh
"
);
/**
/**
* Info级别日志前缀
* Info级别日志前缀
...
...
src/com/jsh/constants/asset/AssetConstants.java
deleted
100644 → 0
View file @
b8a2b074
package
com.jsh.constants.asset
;
/**
* 定义资产管理常量
* @author jishenghua
*/
public
interface
AssetConstants
{
/**
* 公共常量
* @author jishenghua
*/
public
class
Common
{
}
/**
* 资产常量--导入导出excel表格业务相关
* @author jishenghua
*/
public
class
BusinessForExcel
{
/**
* 资产名称常量
*/
public
static
final
int
EXCEL_ASSETNAME
=
0
;
/**
* 资产类型常量
*/
public
static
final
int
EXCEL_CATEGORY
=
1
;
/**
* 资产单价
*/
public
static
final
int
EXCEL_PRICE
=
2
;
/**
* 用户
*/
public
static
final
int
EXCEL_USER
=
3
;
/**
* 购买日期
*/
public
static
final
int
EXCEL_PURCHASE_DATE
=
4
;
/**
* 资产状态
*/
public
static
final
int
EXCEL_STATUS
=
5
;
/**
* 位置
*/
public
static
final
int
EXCEL_LOCATION
=
6
;
/**
* 资产编号
*/
public
static
final
int
EXCEL_NUM
=
7
;
/**
* 序列号
*/
public
static
final
int
EXCEL_SERIALNO
=
8
;
/**
* 有效日期
*/
public
static
final
int
EXCEL_EXPIRATION_DATE
=
9
;
/**
* 保修日期
*/
public
static
final
int
EXCEL_WARRANTY_DATE
=
10
;
/**
* 供应商
*/
public
static
final
int
EXCEL_SUPPLIER
=
11
;
/**
* 标签
*/
public
static
final
int
EXCEL_LABLE
=
12
;
/**
* 描述
*/
public
static
final
int
EXCEL_DESC
=
13
;
/**
* 表头
*/
public
static
final
int
EXCEL_TABLE_HEAD
=
0
;
/**
* 状态 --在库
*/
public
static
final
int
EXCEl_STATUS_ZAIKU
=
0
;
/**
* 状态 --在用
*/
public
static
final
int
EXCEl_STATUS_INUSE
=
1
;
/**
* 状态 -- 消费
*/
public
static
final
int
EXCEl_STATUS_CONSUME
=
2
;
/**
* action返回excel结果
*/
public
static
final
String
EXCEL
=
"excel"
;
}
}
src/com/jsh/constants/asset/ExcelConstantsCode.java
deleted
100644 → 0
View file @
b8a2b074
package
com.jsh.constants.asset
;
public
interface
ExcelConstantsCode
{
/**
* 导入excel表格常量定义
*/
public
class
ImportExcelCode
{
/**
* 表格正确
*/
public
static
final
String
RIGHT
=
"right"
;
/**
* 表格错误
*/
public
static
final
String
WRONG
=
"wrong"
;
/**
* 表格警告
*/
public
static
final
String
WARN
=
"warn"
;
}
/**
* 导出excel表格常量定义
* @author angel
*
*/
public
class
ExportExcelCode
{
}
}
src/com/jsh/constants/common/AmsConstants.java
deleted
100644 → 0
View file @
b8a2b074
package
com.jsh.constants.common
;
public
interface
AmsConstants
{
/**
* 定义资产管理公共常量
* @author jishenghua
*/
public
class
Common
{
/**
* Info级别日志前缀
*/
public
static
final
String
LOG_INFO_PREFIX
=
"=========="
;
/**
* error级别日志前缀
*/
public
static
final
String
LOG_ERROR_PREFIX
=
">>>>>>>>>>"
;
/**
* debug级别日志前缀
*/
public
static
final
String
LOG_DEBUG_PREFIX
=
"-----------"
;
/**
* fatal级别日志前缀
*/
public
static
final
String
LOG_FATAL_PREFIX
=
"$$$$$$$$$$"
;
/**
* warn级别日志前缀
*/
public
static
final
String
LOG_WARN_PREFIX
=
"##########"
;
}
}
src/com/jsh/constants/common/ExceptionCodeConstants.java
deleted
100644 → 0
View file @
b8a2b074
package
com.jsh.constants.common
;
public
interface
ExceptionCodeConstants
{
/**
* 用户错误码定义
*/
public
class
UserExceptionCode
{
/**
* 用户不存在
*/
public
static
final
int
USER_NOT_EXIST
=
1
;
/**
* 用户密码错误
*/
public
static
final
int
USER_PASSWORD_ERROR
=
2
;
/**
* 被加入黑名单
*/
public
static
final
int
BLACK_USER
=
3
;
/**
* 可以登录
*/
public
static
final
int
USER_CONDITION_FIT
=
4
;
/**
* 访问数据库异常
*/
public
static
final
int
USER_ACCESS_EXCEPTION
=
5
;
}
}
src/com/jsh/constants/common/LogModuleConstants.java
deleted
100644 → 0
View file @
b8a2b074
package
com.jsh.constants.common
;
public
interface
LogModuleConstants
{
/**
* 系统管理模块名称定义
* @author jishenghua
*/
public
class
ManageModuleNameCode
{
/**
* 管理模块资产名称
*/
public
static
final
String
MODULE_MANAGE_ASSETNAME
=
"资产名称"
;
/**
* 管理模块供应商
*/
public
static
final
String
MODULE_MANAGE_SUPPLIER
=
"供应商"
;
/**
* 管理模块资产类型
*/
public
static
final
String
MODULE_MANAGE_CATEGORY
=
"资产类型"
;
/**
* 管理模块用户管理
*/
public
static
final
String
MODULE_MANAGE_USER
=
"用户管理"
;
}
/**
* 资产管理模块名称定义
* @author jishenghua
*/
public
class
AssetModuleNameCode
{
/**
* 资产管理模块资产管理
*/
public
static
final
String
MODULE_ASSET_MANAGE
=
"资产管理"
;
/**
* 资产管理模块资产报表
*/
public
static
final
String
MODULE_ASSET_REPORT
=
"资产报表"
;
/**
* 资产管理模块资产概况
*/
public
static
final
String
MODULE_ASSET_GENERAL
=
"资产概况"
;
}
/**
* 日志管理模块名称定义
* @author jishenghua
*/
public
class
LogModuleNameCode
{
/**
* 日志管理模块日志管理
*/
public
static
final
String
MODULE_LOG_MANAGE
=
"日志管理"
;
}
}
src/com/jsh/dao/asset/ReportDAO.java
View file @
86df29f6
...
@@ -3,10 +3,10 @@ package com.jsh.dao.asset;
...
@@ -3,10 +3,10 @@ package com.jsh.dao.asset;
import
org.hibernate.Query
;
import
org.hibernate.Query
;
import
org.springframework.orm.hibernate3.support.HibernateDaoSupport
;
import
org.springframework.orm.hibernate3.support.HibernateDaoSupport
;
import
com.jsh.
exception
.JshException
;
import
com.jsh.
util
.JshException
;
import
com.jsh.model.po.Asset
;
import
com.jsh.model.po.Asset
;
import
com.jsh.util.
common.
PageUtil
;
import
com.jsh.util.PageUtil
;
import
com.jsh.util.
common.
SearchConditionUtil
;
import
com.jsh.util.SearchConditionUtil
;
public
class
ReportDAO
extends
HibernateDaoSupport
implements
ReportIDAO
public
class
ReportDAO
extends
HibernateDaoSupport
implements
ReportIDAO
{
{
...
...
src/com/jsh/dao/asset/ReportIDAO.java
View file @
86df29f6
package
com.jsh.dao.asset
;
package
com.jsh.dao.asset
;
import
com.jsh.
exception
.JshException
;
import
com.jsh.
util
.JshException
;
import
com.jsh.model.po.Asset
;
import
com.jsh.model.po.Asset
;
import
com.jsh.util.
common.
PageUtil
;
import
com.jsh.util.PageUtil
;
public
interface
ReportIDAO
public
interface
ReportIDAO
{
{
...
...
src/com/jsh/dao/basic/UserBusinessDAO.java
View file @
86df29f6
...
@@ -3,11 +3,11 @@ package com.jsh.dao.basic;
...
@@ -3,11 +3,11 @@ package com.jsh.dao.basic;
import
org.hibernate.Query
;
import
org.hibernate.Query
;
import
com.jsh.base.BaseDAO
;
import
com.jsh.base.BaseDAO
;
import
com.jsh.
exception
.JshException
;
import
com.jsh.
util
.JshException
;
import
com.jsh.model.po.Asset
;
import
com.jsh.model.po.Asset
;
import
com.jsh.model.po.UserBusiness
;
import
com.jsh.model.po.UserBusiness
;
import
com.jsh.util.
common.
PageUtil
;
import
com.jsh.util.PageUtil
;
import
com.jsh.util.
common.
SearchConditionUtil
;
import
com.jsh.util.SearchConditionUtil
;
public
class
UserBusinessDAO
extends
BaseDAO
<
UserBusiness
>
implements
UserBusinessIDAO
public
class
UserBusinessDAO
extends
BaseDAO
<
UserBusiness
>
implements
UserBusinessIDAO
{
{
...
...
src/com/jsh/dao/basic/UserBusinessIDAO.java
View file @
86df29f6
package
com.jsh.dao.basic
;
package
com.jsh.dao.basic
;
import
com.jsh.base.BaseIDAO
;
import
com.jsh.base.BaseIDAO
;
import
com.jsh.
exception
.JshException
;
import
com.jsh.
util
.JshException
;
import
com.jsh.model.po.UserBusiness
;
import
com.jsh.model.po.UserBusiness
;
import
com.jsh.util.
common.
PageUtil
;
import
com.jsh.util.PageUtil
;
public
interface
UserBusinessIDAO
extends
BaseIDAO
<
UserBusiness
>
public
interface
UserBusinessIDAO
extends
BaseIDAO
<
UserBusiness
>
{
{
...
...
src/com/jsh/dao/materials/AccountHeadDAO.java
0 → 100644
View file @
86df29f6
package
com.jsh.dao.materials
;
import
org.hibernate.Query
;
import
com.jsh.base.BaseDAO
;
import
com.jsh.util.JshException
;
import
com.jsh.model.po.AccountHead
;
import
com.jsh.model.po.UserBusiness
;
import
com.jsh.util.PageUtil
;
import
com.jsh.util.SearchConditionUtil
;
public
class
AccountHeadDAO
extends
BaseDAO
<
AccountHead
>
implements
AccountHeadIDAO
{
/**
* 设置dao映射基类
* @return
*/
@Override
public
Class
<
AccountHead
>
getEntityClass
()
{
return
AccountHead
.
class
;
}
@SuppressWarnings
(
"unchecked"
)
@Override
public
void
find
(
PageUtil
<
AccountHead
>
pageUtil
,
String
maxid
)
throws
JshException
{
Query
query
=
this
.
getHibernateTemplate
().
getSessionFactory
().
getCurrentSession
().
createQuery
(
"select max(Id) as Id from AccountHead accountHead where 1=1 "
+
SearchConditionUtil
.
getCondition
(
pageUtil
.
getAdvSearch
()));
pageUtil
.
setTotalCount
(
query
.
list
().
size
());
pageUtil
.
setPageList
(
query
.
list
());
}
}
src/com/jsh/dao/materials/AccountHeadIDAO.java
0 → 100644
View file @
86df29f6
package
com.jsh.dao.materials
;
import
com.jsh.base.BaseIDAO
;
import
com.jsh.util.JshException
;
import
com.jsh.model.po.AccountHead
;
import
com.jsh.model.po.UserBusiness
;
import
com.jsh.util.PageUtil
;
public
interface
AccountHeadIDAO
extends
BaseIDAO
<
AccountHead
>
{
/*
* 获取MaxId
*/
void
find
(
PageUtil
<
AccountHead
>
pageUtil
,
String
maxid
)
throws
JshException
;
}
src/com/jsh/dao/materials/AccountItemDAO.java
0 → 100644
View file @
86df29f6
package
com.jsh.dao.materials
;
import
org.hibernate.Query
;
import
com.jsh.base.BaseDAO
;
import
com.jsh.util.JshException
;
import
com.jsh.model.po.AccountItem
;
import
com.jsh.util.PageUtil
;
import
com.jsh.util.SearchConditionUtil
;
public
class
AccountItemDAO
extends
BaseDAO
<
AccountItem
>
implements
AccountItemIDAO
{
/**
* 设置dao映射基类
* @return
*/
@Override
public
Class
<
AccountItem
>
getEntityClass
()
{
return
AccountItem
.
class
;
}
}
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