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
adb6105f
Commit
adb6105f
authored
Dec 24, 2016
by
季圣华
Browse files
采购入库,增加单行的金额,合计金额,付款账户,付款金额等字段,改动较大,为临时版本
parent
77e30a07
Changes
65
Expand all
Show whitespace changes
Inline
Side-by-side
sql/jsh_erp.sql
View file @
adb6105f
This diff is collapsed.
Click to expand it.
src/com/jsh/action/basic/DepotAction.java
View file @
adb6105f
...
@@ -40,7 +40,7 @@ public class DepotAction extends BaseAction<DepotModel>
...
@@ -40,7 +40,7 @@ public class DepotAction extends BaseAction<DepotModel>
try
try
{
{
Map
<
String
,
Object
>
condition
=
pageUtil
.
getAdvSearch
();
Map
<
String
,
Object
>
condition
=
pageUtil
.
getAdvSearch
();
condition
.
put
(
"
id
_s_order"
,
"asc"
);
condition
.
put
(
"
sort
_s_order"
,
"asc"
);
depotService
.
find
(
pageUtil
);
depotService
.
find
(
pageUtil
);
mapData
.
put
(
"depotList"
,
pageUtil
.
getPageList
());
mapData
.
put
(
"depotList"
,
pageUtil
.
getPageList
());
}
}
...
@@ -237,10 +237,6 @@ public class DepotAction extends BaseAction<DepotModel>
...
@@ -237,10 +237,6 @@ public class DepotAction extends BaseAction<DepotModel>
depotService
.
find
(
pageUtil
);
depotService
.
find
(
pageUtil
);
List
<
Depot
>
dataList
=
pageUtil
.
getPageList
();
List
<
Depot
>
dataList
=
pageUtil
.
getPageList
();
//开始拼接json数据
// {"total":28,"rows":[
// {"productid":"AV-CB-01","attr1":"Adult Male","itemid":"EST-18"}
// ]}
JSONObject
outer
=
new
JSONObject
();
JSONObject
outer
=
new
JSONObject
();
outer
.
put
(
"total"
,
pageUtil
.
getTotalCount
());
outer
.
put
(
"total"
,
pageUtil
.
getTotalCount
());
//存放数据json数组
//存放数据json数组
...
@@ -274,7 +270,7 @@ public class DepotAction extends BaseAction<DepotModel>
...
@@ -274,7 +270,7 @@ public class DepotAction extends BaseAction<DepotModel>
}
}
/**
/**
* 用户对应
部门
显示
* 用户对应
仓库
显示
* @return
* @return
*/
*/
public
void
findUserDepot
()
public
void
findUserDepot
()
...
@@ -292,7 +288,7 @@ public class DepotAction extends BaseAction<DepotModel>
...
@@ -292,7 +288,7 @@ public class DepotAction extends BaseAction<DepotModel>
//开始拼接json数据
//开始拼接json数据
JSONObject
outer
=
new
JSONObject
();
JSONObject
outer
=
new
JSONObject
();
outer
.
put
(
"id"
,
1
);
outer
.
put
(
"id"
,
1
);
outer
.
put
(
"text"
,
"
部门
列表"
);
outer
.
put
(
"text"
,
"
仓库
列表"
);
outer
.
put
(
"state"
,
"open"
);
outer
.
put
(
"state"
,
"open"
);
//存放数据json数组
//存放数据json数组
JSONArray
dataArray
=
new
JSONArray
();
JSONArray
dataArray
=
new
JSONArray
();
...
@@ -311,7 +307,7 @@ public class DepotAction extends BaseAction<DepotModel>
...
@@ -311,7 +307,7 @@ public class DepotAction extends BaseAction<DepotModel>
}
}
catch
(
DataAccessException
e
)
catch
(
DataAccessException
e
)
{
{
Log
.
errorFileSync
(
">>>>>>>>>>>>>>>>>设置用户对应的
部门
:类型"
+
model
.
getUBType
()
+
" KeyId为: "
+
model
.
getUBKeyId
()
+
" 存在异常!"
);
Log
.
errorFileSync
(
">>>>>>>>>>>>>>>>>设置用户对应的
仓库
:类型"
+
model
.
getUBType
()
+
" KeyId为: "
+
model
.
getUBKeyId
()
+
" 存在异常!"
);
}
}
if
(
flag
==
true
){
item
.
put
(
"checked"
,
true
);}
if
(
flag
==
true
){
item
.
put
(
"checked"
,
true
);}
//结束
//结束
...
@@ -324,11 +320,11 @@ public class DepotAction extends BaseAction<DepotModel>
...
@@ -324,11 +320,11 @@ public class DepotAction extends BaseAction<DepotModel>
}
}
catch
(
DataAccessException
e
)
catch
(
DataAccessException
e
)
{
{
Log
.
errorFileSync
(
">>>>>>>>>>>>>>>>>>>查找
部门
异常"
,
e
);
Log
.
errorFileSync
(
">>>>>>>>>>>>>>>>>>>查找
仓库
异常"
,
e
);
}
}
catch
(
IOException
e
)
catch
(
IOException
e
)
{
{
Log
.
errorFileSync
(
">>>>>>>>>>>>>>>>>>>回写查询
部门
结果异常"
,
e
);
Log
.
errorFileSync
(
">>>>>>>>>>>>>>>>>>>回写查询
仓库
结果异常"
,
e
);
}
}
}
}
...
@@ -358,7 +354,7 @@ public class DepotAction extends BaseAction<DepotModel>
...
@@ -358,7 +354,7 @@ public class DepotAction extends BaseAction<DepotModel>
* 拼接搜索条件
* 拼接搜索条件
*/
*/
Map
<
String
,
Object
>
condition
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
condition
=
new
HashMap
<
String
,
Object
>();
condition
.
put
(
"
Id
_s_order"
,
"asc"
);
condition
.
put
(
"
sort
_s_order"
,
"asc"
);
return
condition
;
return
condition
;
}
}
...
...
src/com/jsh/action/materials/AccountHeadAction.java
View file @
adb6105f
...
@@ -12,7 +12,6 @@ import net.sf.json.JSONObject;
...
@@ -12,7 +12,6 @@ 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.Building
;
import
com.jsh.model.po.Account
;
import
com.jsh.model.po.Account
;
import
com.jsh.model.po.AccountHead
;
import
com.jsh.model.po.AccountHead
;
import
com.jsh.model.po.Logdetails
;
import
com.jsh.model.po.Logdetails
;
...
...
src/com/jsh/action/materials/BuildingAction.java
deleted
100644 → 0
View file @
77e30a07
package
com.jsh.action.materials
;
import
java.io.IOException
;
import
java.sql.Timestamp
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONObject
;
import
org.springframework.dao.DataAccessException
;
import
com.jsh.base.BaseAction
;
import
com.jsh.base.Log
;
import
com.jsh.model.po.Depot
;
import
com.jsh.model.po.Building
;
import
com.jsh.model.po.Logdetails
;
import
com.jsh.model.vo.materials.BuildingModel
;
import
com.jsh.service.materials.BuildingIService
;
import
com.jsh.util.PageUtil
;
@SuppressWarnings
(
"serial"
)
public
class
BuildingAction
extends
BaseAction
<
BuildingModel
>
{
private
BuildingIService
buildingService
;
private
BuildingModel
model
=
new
BuildingModel
();
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
public
String
getBasicData
()
{
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
(
"ProjectId_n_eq"
,
model
.
getProjectId
());
condition
.
put
(
"Id_s_order"
,
"asc"
);
buildingService
.
find
(
pageUtil
);
mapData
.
put
(
"buildingList"
,
pageUtil
.
getPageList
());
}
catch
(
Exception
e
)
{
Log
.
errorFileSync
(
">>>>>>>>>>>>>查找系统基础数据信息异常"
,
e
);
model
.
getShowModel
().
setMsgTip
(
"exceptoin"
);
}
return
SUCCESS
;
}
/**
* 增加单元
* @return
*/
public
void
create
()
{
Log
.
infoFileSync
(
"==================开始调用增加单元信息方法create()==================="
);
Boolean
flag
=
false
;
try
{
Building
building
=
new
Building
();
building
.
setDepot
(
new
Depot
(
model
.
getProjectId
()));
building
.
setName
(
model
.
getName
());
building
.
setRemark
(
model
.
getRemark
());
building
.
setEnabled
(
model
.
getEnabled
());
buildingService
.
create
(
building
);
//========标识位===========
flag
=
true
;
//记录操作日志使用
tipMsg
=
"成功"
;
tipType
=
0
;
}
catch
(
DataAccessException
e
)
{
Log
.
errorFileSync
(
">>>>>>>>>>>>>>>>>>>增加单元信息异常"
,
e
);
flag
=
false
;
tipMsg
=
"失败"
;
tipType
=
1
;
}
finally
{
try
{
toClient
(
flag
.
toString
());
}
catch
(
IOException
e
)
{
Log
.
errorFileSync
(
">>>>>>>>>>>>增加单元信息回写客户端结果异常"
,
e
);
}
}
logService
.
create
(
new
Logdetails
(
getUser
(),
"增加单元"
,
model
.
getClientIp
(),
new
Timestamp
(
System
.
currentTimeMillis
())
,
tipType
,
"增加单元名称为 "
+
model
.
getName
()
+
" "
+
tipMsg
+
"!"
,
"增加单元"
+
tipMsg
));
Log
.
infoFileSync
(
"==================结束调用增加单元方法create()==================="
);
}
/**
* 删除单元
* @return
*/
public
String
delete
()
{
Log
.
infoFileSync
(
"====================开始调用删除单元信息方法delete()================"
);
try
{
buildingService
.
delete
(
model
.
getBuildingID
());
tipMsg
=
"成功"
;
tipType
=
0
;
}
catch
(
DataAccessException
e
)
{
Log
.
errorFileSync
(
">>>>>>>>>>>删除ID为 "
+
model
.
getBuildingID
()
+
" 的单元异常"
,
e
);
tipMsg
=
"失败"
;
tipType
=
1
;
}
model
.
getShowModel
().
setMsgTip
(
tipMsg
);
logService
.
create
(
new
Logdetails
(
getUser
(),
"删除单元"
,
model
.
getClientIp
(),
new
Timestamp
(
System
.
currentTimeMillis
())
,
tipType
,
"删除单元ID为 "
+
model
.
getBuildingID
()
+
" "
+
tipMsg
+
"!"
,
"删除单元"
+
tipMsg
));
Log
.
infoFileSync
(
"====================结束调用删除单元信息方法delete()================"
);
return
SUCCESS
;
}
/**
* 更新单元
* @return
*/
public
void
update
()
{
Boolean
flag
=
false
;
try
{
Building
building
=
buildingService
.
get
(
model
.
getBuildingID
());
building
.
setDepot
(
new
Depot
(
model
.
getProjectId
()));
building
.
setName
(
model
.
getName
());
building
.
setRemark
(
model
.
getRemark
());
building
.
setEnabled
(
model
.
getEnabled
());
buildingService
.
update
(
building
);
flag
=
true
;
tipMsg
=
"成功"
;
tipType
=
0
;
}
catch
(
DataAccessException
e
)
{
Log
.
errorFileSync
(
">>>>>>>>>>>>>修改单元ID为 : "
+
model
.
getBuildingID
()
+
"信息失败"
,
e
);
flag
=
false
;
tipMsg
=
"失败"
;
tipType
=
1
;
}
finally
{
try
{
toClient
(
flag
.
toString
());
}
catch
(
IOException
e
)
{
Log
.
errorFileSync
(
">>>>>>>>>>>>修改单元回写客户端结果异常"
,
e
);
}
}
logService
.
create
(
new
Logdetails
(
getUser
(),
"更新单元"
,
model
.
getClientIp
(),
new
Timestamp
(
System
.
currentTimeMillis
())
,
tipType
,
"更新单元ID为 "
+
model
.
getBuildingID
()
+
" "
+
tipMsg
+
"!"
,
"更新单元"
+
tipMsg
));
}
/**
* 批量删除指定ID单元
* @return
*/
public
String
batchDelete
()
{
try
{
buildingService
.
batchDelete
(
model
.
getBuildingIDs
());
model
.
getShowModel
().
setMsgTip
(
"成功"
);
//记录操作日志使用
tipMsg
=
"成功"
;
tipType
=
0
;
}
catch
(
DataAccessException
e
)
{
Log
.
errorFileSync
(
">>>>>>>>>>>批量删除单元ID为:"
+
model
.
getBuildingIDs
()
+
"信息异常"
,
e
);
tipMsg
=
"失败"
;
tipType
=
1
;
}
logService
.
create
(
new
Logdetails
(
getUser
(),
"批量删除单元"
,
model
.
getClientIp
(),
new
Timestamp
(
System
.
currentTimeMillis
())
,
tipType
,
"批量删除单元ID为 "
+
model
.
getBuildingIDs
()
+
" "
+
tipMsg
+
"!"
,
"批量删除单元"
+
tipMsg
));
return
SUCCESS
;
}
/**
* 查找单元信息
* @return
*/
public
void
findBy
()
{
try
{
PageUtil
<
Building
>
pageUtil
=
new
PageUtil
<
Building
>();
pageUtil
.
setPageSize
(
model
.
getPageSize
());
pageUtil
.
setCurPage
(
model
.
getPageNo
());
pageUtil
.
setAdvSearch
(
getCondition
());
buildingService
.
find
(
pageUtil
);
List
<
Building
>
dataList
=
pageUtil
.
getPageList
();
//开始拼接json数据
// {"total":28,"rows":[
// {"productid":"AV-CB-01","attr1":"Adult Male","itemid":"EST-18"}
// ]}
JSONObject
outer
=
new
JSONObject
();
outer
.
put
(
"total"
,
pageUtil
.
getTotalCount
());
//存放数据json数组
JSONArray
dataArray
=
new
JSONArray
();
if
(
null
!=
dataList
)
{
for
(
Building
building:
dataList
)
{
JSONObject
item
=
new
JSONObject
();
item
.
put
(
"Id"
,
building
.
getId
());
item
.
put
(
"ProjectId"
,
building
.
getDepot
().
getId
());
item
.
put
(
"ProjectName"
,
building
.
getDepot
().
getName
());
item
.
put
(
"Name"
,
building
.
getName
());
item
.
put
(
"Remark"
,
building
.
getRemark
());
item
.
put
(
"Enabled"
,
building
.
getEnabled
());
item
.
put
(
"op"
,
1
);
dataArray
.
add
(
item
);
}
}
outer
.
put
(
"rows"
,
dataArray
);
//回写查询结果
toClient
(
outer
.
toString
());
}
catch
(
DataAccessException
e
)
{
Log
.
errorFileSync
(
">>>>>>>>>>>>>>>>>>>查找单元信息异常"
,
e
);
}
catch
(
IOException
e
)
{
Log
.
errorFileSync
(
">>>>>>>>>>>>>>>>>>>回写查询单元信息结果异常"
,
e
);
}
}
/**
* 拼接搜索条件
* @return
*/
private
Map
<
String
,
Object
>
getCondition
()
{
/**
* 拼接搜索条件
*/
Map
<
String
,
Object
>
condition
=
new
HashMap
<
String
,
Object
>();
condition
.
put
(
"ProjectId_n_eq"
,
model
.
getProjectId
());
condition
.
put
(
"Name_s_like"
,
model
.
getName
());
condition
.
put
(
"Id_s_order"
,
"asc"
);
return
condition
;
}
//=============以下spring注入以及Model驱动公共方法,与Action处理无关==================
@Override
public
BuildingModel
getModel
()
{
return
model
;
}
public
void
setBuildingService
(
BuildingIService
buildingService
)
{
this
.
buildingService
=
buildingService
;
}
}
src/com/jsh/action/materials/DepotHeadAction.java
View file @
adb6105f
...
@@ -12,7 +12,7 @@ import net.sf.json.JSONObject;
...
@@ -12,7 +12,7 @@ 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.
Building
;
import
com.jsh.model.po.
Account
;
import
com.jsh.model.po.Depot
;
import
com.jsh.model.po.Depot
;
import
com.jsh.model.po.DepotHead
;
import
com.jsh.model.po.DepotHead
;
import
com.jsh.model.po.Logdetails
;
import
com.jsh.model.po.Logdetails
;
...
@@ -82,12 +82,11 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
...
@@ -82,12 +82,11 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
}
}
if
(
model
.
getOrganId
()!=
null
){
depotHead
.
setOrganId
(
new
Supplier
(
model
.
getOrganId
()));}
if
(
model
.
getOrganId
()!=
null
){
depotHead
.
setOrganId
(
new
Supplier
(
model
.
getOrganId
()));}
if
(
model
.
getHandsPersonId
()!=
null
){
depotHead
.
setHandsPersonId
(
new
Person
(
model
.
getHandsPersonId
()));}
if
(
model
.
getHandsPersonId
()!=
null
){
depotHead
.
setHandsPersonId
(
new
Person
(
model
.
getHandsPersonId
()));}
if
(
model
.
getWareHousePersonId
()!=
null
){
depotHead
.
setWareHousePersonId
(
new
Person
(
model
.
getWareHousePersonId
()));}
if
(
model
.
getAccountId
()!=
null
){
depotHead
.
setAccountId
(
new
Account
(
model
.
getAccountId
()));}
depotHead
.
setChangeAmount
(
model
.
getChangeAmount
());
if
(
model
.
getAllocationProjectId
()!=
null
){
depotHead
.
setAllocationProjectId
(
new
Depot
(
model
.
getAllocationProjectId
()));}
if
(
model
.
getAllocationProjectId
()!=
null
){
depotHead
.
setAllocationProjectId
(
new
Depot
(
model
.
getAllocationProjectId
()));}
if
(
model
.
getBuildingId
()!=
null
){
depotHead
.
setBuildingId
(
new
Building
(
model
.
getBuildingId
()));}
depotHead
.
setTotalPrice
(
model
.
getTotalPrice
());
depotHead
.
setSettlementWay
(
model
.
getSettlementWay
());
depotHead
.
setRemark
(
model
.
getRemark
());
depotHead
.
setRemark
(
model
.
getRemark
());
depotHead
.
setState
(
"草稿"
);
depotHeadService
.
create
(
depotHead
);
depotHeadService
.
create
(
depotHead
);
//========标识位===========
//========标识位===========
...
@@ -173,10 +172,10 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
...
@@ -173,10 +172,10 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
}
}
if
(
model
.
getOrganId
()!=
null
){
depotHead
.
setOrganId
(
new
Supplier
(
model
.
getOrganId
()));}
if
(
model
.
getOrganId
()!=
null
){
depotHead
.
setOrganId
(
new
Supplier
(
model
.
getOrganId
()));}
if
(
model
.
getHandsPersonId
()!=
null
){
depotHead
.
setHandsPersonId
(
new
Person
(
model
.
getHandsPersonId
()));}
if
(
model
.
getHandsPersonId
()!=
null
){
depotHead
.
setHandsPersonId
(
new
Person
(
model
.
getHandsPersonId
()));}
if
(
model
.
getWareHousePersonId
()!=
null
){
depotHead
.
setWareHousePersonId
(
new
Person
(
model
.
getWareHousePersonId
()));}
if
(
model
.
getAccountId
()!=
null
){
depotHead
.
setAccountId
(
new
Account
(
model
.
getAccountId
()));}
depotHead
.
setChangeAmount
(
model
.
getChangeAmount
());
if
(
model
.
getAllocationProjectId
()!=
null
){
depotHead
.
setAllocationProjectId
(
new
Depot
(
model
.
getAllocationProjectId
()));}
if
(
model
.
getAllocationProjectId
()!=
null
){
depotHead
.
setAllocationProjectId
(
new
Depot
(
model
.
getAllocationProjectId
()));}
if
(
model
.
getBuildingId
()!=
null
){
depotHead
.
setBuildingId
(
new
Building
(
model
.
getBuildingId
()));}
depotHead
.
setTotalPrice
(
model
.
getTotalPrice
());
depotHead
.
setSettlementWay
(
model
.
getSettlementWay
());
depotHead
.
setRemark
(
model
.
getRemark
());
depotHead
.
setRemark
(
model
.
getRemark
());
depotHeadService
.
update
(
depotHead
);
depotHeadService
.
update
(
depotHead
);
...
@@ -207,58 +206,6 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
...
@@ -207,58 +206,6 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
,
tipType
,
"更新仓管通ID为 "
+
model
.
getDepotHeadID
()
+
" "
+
tipMsg
+
"!"
,
"更新仓管通"
+
tipMsg
));
,
tipType
,
"更新仓管通ID为 "
+
model
.
getDepotHeadID
()
+
" "
+
tipMsg
+
"!"
,
"更新仓管通"
+
tipMsg
));
}
}
/**
* 更新状态
* @return
*/
public
void
submit
()
{
Log
.
infoFileSync
(
"====================开始调用更新状态仓管通信息方法submit()================"
);
Boolean
flag
=
false
;
String
changeId
=
""
;
try
{
String
DepotHeadIDs
=
model
.
getDepotHeadIDs
();
String
[]
DepotHeadID
=
DepotHeadIDs
.
split
(
","
);
for
(
int
i
=
0
;
i
<
DepotHeadID
.
length
;
i
++)
{
changeId
=
DepotHeadID
[
i
].
toString
();
DepotHead
depotHead
=
depotHeadService
.
get
(
Long
.
parseLong
(
changeId
));
String
state
=
model
.
getState
();
depotHead
.
setState
(
state
);
//状态
String
userName
=
state
.
equals
(
"未通过"
)?
getUser
().
getUsername
():
""
;
//判断状态
depotHead
.
setReAuditPersonName
(
userName
);
//撤审人
depotHead
.
setReason
(
model
.
getReason
());
//撤审原因
depotHeadService
.
update
(
depotHead
);
}
flag
=
true
;
tipMsg
=
"成功"
;
tipType
=
0
;
}
catch
(
DataAccessException
e
)
{
Log
.
errorFileSync
(
">>>>>>>>>>>>>更新状态仓管通ID为 : "
+
model
.
getDepotHeadID
()
+
"信息失败"
,
e
);
flag
=
false
;
tipMsg
=
"失败"
;
tipType
=
1
;
}
finally
{
try
{
toClient
(
flag
.
toString
());
}
catch
(
IOException
e
)
{
Log
.
errorFileSync
(
">>>>>>>>>>>>更新状态仓管通回写客户端结果异常"
,
e
);
}
}
logService
.
create
(
new
Logdetails
(
getUser
(),
"更新状态仓管通"
,
model
.
getClientIp
(),
new
Timestamp
(
System
.
currentTimeMillis
())
,
tipType
,
"更新状态-"
+
model
.
getState
()+
"-ID为 "
+
changeId
+
" "
+
tipMsg
+
"!"
,
"更新状态仓管通"
+
tipMsg
));
Log
.
infoFileSync
(
"====================结束调用更新状态仓管通信息方法submit()================"
);
}
/**
/**
* 批量删除指定ID仓管通
* 批量删除指定ID仓管通
* @return
* @return
...
@@ -301,10 +248,6 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
...
@@ -301,10 +248,6 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
depotHeadService
.
find
(
pageUtil
);
depotHeadService
.
find
(
pageUtil
);
List
<
DepotHead
>
dataList
=
pageUtil
.
getPageList
();
List
<
DepotHead
>
dataList
=
pageUtil
.
getPageList
();
//开始拼接json数据
// {"total":28,"rows":[
// {"productid":"AV-CB-01","attr1":"Adult Male","itemid":"EST-18"}
// ]}
JSONObject
outer
=
new
JSONObject
();
JSONObject
outer
=
new
JSONObject
();
outer
.
put
(
"total"
,
pageUtil
.
getTotalCount
());
outer
.
put
(
"total"
,
pageUtil
.
getTotalCount
());
//存放数据json数组
//存放数据json数组
...
@@ -325,17 +268,13 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
...
@@ -325,17 +268,13 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
item
.
put
(
"OrganName"
,
depotHead
.
getOrganId
()==
null
?
""
:
depotHead
.
getOrganId
().
getSupplier
());
item
.
put
(
"OrganName"
,
depotHead
.
getOrganId
()==
null
?
""
:
depotHead
.
getOrganId
().
getSupplier
());
item
.
put
(
"HandsPersonId"
,
depotHead
.
getHandsPersonId
()==
null
?
""
:
depotHead
.
getHandsPersonId
().
getId
());
item
.
put
(
"HandsPersonId"
,
depotHead
.
getHandsPersonId
()==
null
?
""
:
depotHead
.
getHandsPersonId
().
getId
());
item
.
put
(
"HandsPersonName"
,
depotHead
.
getHandsPersonId
()==
null
?
""
:
depotHead
.
getHandsPersonId
().
getName
());
item
.
put
(
"HandsPersonName"
,
depotHead
.
getHandsPersonId
()==
null
?
""
:
depotHead
.
getHandsPersonId
().
getName
());
item
.
put
(
"WareHousePersonId"
,
depotHead
.
getWareHousePersonId
()==
null
?
""
:
depotHead
.
getWareHousePersonId
().
getId
());
item
.
put
(
"AccountId"
,
depotHead
.
getAccountId
()==
null
?
""
:
depotHead
.
getAccountId
().
getId
());
item
.
put
(
"WareHousePersonName"
,
depotHead
.
getWareHousePersonId
()==
null
?
""
:
depotHead
.
getWareHousePersonId
().
getName
());
item
.
put
(
"AccountName"
,
depotHead
.
getAccountId
()==
null
?
""
:
depotHead
.
getAccountId
().
getName
());
item
.
put
(
"ChangeAmount"
,
depotHead
.
getChangeAmount
());
item
.
put
(
"AllocationProjectId"
,
depotHead
.
getAllocationProjectId
()==
null
?
""
:
depotHead
.
getAllocationProjectId
().
getId
());
item
.
put
(
"AllocationProjectId"
,
depotHead
.
getAllocationProjectId
()==
null
?
""
:
depotHead
.
getAllocationProjectId
().
getId
());
item
.
put
(
"AllocationProjectName"
,
depotHead
.
getAllocationProjectId
()==
null
?
""
:
depotHead
.
getAllocationProjectId
().
getName
());
item
.
put
(
"AllocationProjectName"
,
depotHead
.
getAllocationProjectId
()==
null
?
""
:
depotHead
.
getAllocationProjectId
().
getName
());
item
.
put
(
"BuildingId"
,
depotHead
.
getBuildingId
()==
null
?
""
:
depotHead
.
getBuildingId
().
getId
());
item
.
put
(
"TotalPrice"
,
depotHead
.
getTotalPrice
());
item
.
put
(
"BuildingName"
,
depotHead
.
getBuildingId
()==
null
?
""
:
depotHead
.
getBuildingId
().
getName
());
//单元名称
item
.
put
(
"SettlementWay"
,
depotHead
.
getSettlementWay
());
item
.
put
(
"Remark"
,
depotHead
.
getRemark
());
item
.
put
(
"Remark"
,
depotHead
.
getRemark
());
item
.
put
(
"State"
,
depotHead
.
getState
());
item
.
put
(
"ReAuditPersonName"
,
depotHead
.
getReAuditPersonName
());
item
.
put
(
"Reason"
,
depotHead
.
getReason
());
item
.
put
(
"op"
,
1
);
item
.
put
(
"op"
,
1
);
dataArray
.
add
(
item
);
dataArray
.
add
(
item
);
}
}
...
@@ -411,7 +350,6 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
...
@@ -411,7 +350,6 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
condition
.
put
(
"Number_s_like"
,
model
.
getNumber
());
condition
.
put
(
"Number_s_like"
,
model
.
getNumber
());
condition
.
put
(
"OperTime_s_gteq"
,
model
.
getBeginTime
());
condition
.
put
(
"OperTime_s_gteq"
,
model
.
getBeginTime
());
condition
.
put
(
"OperTime_s_lteq"
,
model
.
getEndTime
());
condition
.
put
(
"OperTime_s_lteq"
,
model
.
getEndTime
());
condition
.
put
(
"State_s_eq"
,
model
.
getState
());
condition
.
put
(
"Id_s_order"
,
"desc"
);
condition
.
put
(
"Id_s_order"
,
"desc"
);
return
condition
;
return
condition
;
}
}
...
...
src/com/jsh/action/materials/DepotItemAction.java
View file @
adb6105f
...
@@ -66,9 +66,8 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
...
@@ -66,9 +66,8 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
depotItem
.
setMaterialId
(
new
Material
(
tempInsertedJson
.
getLong
(
"MaterialId"
)));
depotItem
.
setMaterialId
(
new
Material
(
tempInsertedJson
.
getLong
(
"MaterialId"
)));
depotItem
.
setOperNumber
(
tempInsertedJson
.
getDouble
(
"OperNumber"
));
depotItem
.
setOperNumber
(
tempInsertedJson
.
getDouble
(
"OperNumber"
));
if
(
tempInsertedJson
.
get
(
"UnitPrice"
)!=
null
){
depotItem
.
setUnitPrice
(
tempInsertedJson
.
getDouble
(
"UnitPrice"
));}
if
(
tempInsertedJson
.
get
(
"UnitPrice"
)!=
null
){
depotItem
.
setUnitPrice
(
tempInsertedJson
.
getDouble
(
"UnitPrice"
));}
if
(
tempInsertedJson
.
get
(
"
Incidentals
"
)!=
null
){
depotItem
.
set
Incidentals
(
0.0
);}
if
(
tempInsertedJson
.
get
(
"
AllPrice
"
)!=
null
){
depotItem
.
set
AllPrice
(
tempInsertedJson
.
getDouble
(
"AllPrice"
)
);}
depotItem
.
setRemark
(
tempInsertedJson
.
getString
(
"Remark"
));
depotItem
.
setRemark
(
tempInsertedJson
.
getString
(
"Remark"
));
depotItem
.
setImg
(
tempInsertedJson
.
getString
(
"Img"
));
depotItemService
.
create
(
depotItem
);
depotItemService
.
create
(
depotItem
);
}
}
}
}
...
@@ -89,9 +88,8 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
...
@@ -89,9 +88,8 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
depotItem
.
setMaterialId
(
new
Material
(
tempUpdatedJson
.
getLong
(
"MaterialId"
)));
depotItem
.
setMaterialId
(
new
Material
(
tempUpdatedJson
.
getLong
(
"MaterialId"
)));
depotItem
.
setOperNumber
(
tempUpdatedJson
.
getDouble
(
"OperNumber"
));
depotItem
.
setOperNumber
(
tempUpdatedJson
.
getDouble
(
"OperNumber"
));
if
(
tempUpdatedJson
.
get
(
"UnitPrice"
)!=
null
){
depotItem
.
setUnitPrice
(
tempUpdatedJson
.
getDouble
(
"UnitPrice"
));}
if
(
tempUpdatedJson
.
get
(
"UnitPrice"
)!=
null
){
depotItem
.
setUnitPrice
(
tempUpdatedJson
.
getDouble
(
"UnitPrice"
));}
if
(
tempUpdatedJson
.
get
(
"
Incidentals
"
)!=
null
){
depotItem
.
set
Incidentals
(
0.0
);}
if
(
tempUpdatedJson
.
get
(
"
AllPrice
"
)!=
null
){
depotItem
.
set
AllPrice
(
tempUpdatedJson
.
getDouble
(
"AllPrice"
)
);}
depotItem
.
setRemark
(
tempUpdatedJson
.
getString
(
"Remark"
));
depotItem
.
setRemark
(
tempUpdatedJson
.
getString
(
"Remark"
));
depotItem
.
setImg
(
tempUpdatedJson
.
getString
(
"Img"
));
depotItemService
.
create
(
depotItem
);
depotItemService
.
create
(
depotItem
);
}
}
}
}
...
@@ -143,10 +141,6 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
...
@@ -143,10 +141,6 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
depotItemService
.
find
(
pageUtil
);
depotItemService
.
find
(
pageUtil
);
List
<
DepotItem
>
dataList
=
pageUtil
.
getPageList
();
List
<
DepotItem
>
dataList
=
pageUtil
.
getPageList
();
//开始拼接json数据
// {"total":28,"rows":[
// {"productid":"AV-CB-01","attr1":"Adult Male","itemid":"EST-18"}
// ]}
JSONObject
outer
=
new
JSONObject
();
JSONObject
outer
=
new
JSONObject
();
outer
.
put
(
"total"
,
pageUtil
.
getTotalCount
());
outer
.
put
(
"total"
,
pageUtil
.
getTotalCount
());
//存放数据json数组
//存放数据json数组
...
@@ -158,10 +152,13 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
...
@@ -158,10 +152,13 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
JSONObject
item
=
new
JSONObject
();
JSONObject
item
=
new
JSONObject
();
item
.
put
(
"Id"
,
depotItem
.
getId
());
item
.
put
(
"Id"
,
depotItem
.
getId
());
item
.
put
(
"MaterialId"
,
depotItem
.
getMaterialId
()==
null
?
""
:
depotItem
.
getMaterialId
().
getId
());
item
.
put
(
"MaterialId"
,
depotItem
.
getMaterialId
()==
null
?
""
:
depotItem
.
getMaterialId
().
getId
());
item
.
put
(
"MaterialName"
,
((
depotItem
.
getMaterialId
().
getModel
().
equals
(
""
))?
""
:
""
+
depotItem
.
getMaterialId
().
getModel
())+
" "
+
depotItem
.
getMaterialId
().
getName
()+((
depotItem
.
getMaterialId
().
getColor
()
==
null
)?
"("
:
"("
+
depotItem
.
getMaterialId
().
getColor
())
+
")"
);
String
MaterialName
=
((
depotItem
.
getMaterialId
().
getModel
().
equals
(
""
))?
""
:
""
+
depotItem
.
getMaterialId
().
getModel
())+
" "
+
depotItem
.
getMaterialId
().
getName
()
+((
depotItem
.
getMaterialId
().
getColor
()
==
null
)?
"("
:
"("
+
depotItem
.
getMaterialId
().
getColor
())
+
")"
+((
depotItem
.
getMaterialId
().
getUnit
()
==
null
)?
"("
:
"("
+
depotItem
.
getMaterialId
().
getUnit
())
+
")"
;
item
.
put
(
"MaterialName"
,
MaterialName
);
item
.
put
(
"OperNumber"
,
depotItem
.
getOperNumber
());
item
.
put
(
"OperNumber"
,
depotItem
.
getOperNumber
());
item
.
put
(
"UnitPrice"
,
depotItem
.
getUnitPrice
());
item
.
put
(
"UnitPrice"
,
depotItem
.
getUnitPrice
());
item
.
put
(
"
Incidentals
"
,
depotItem
.
get
Incidentals
());
item
.
put
(
"
AllPrice
"
,
depotItem
.
get
AllPrice
());
item
.
put
(
"Remark"
,
depotItem
.
getRemark
());
item
.
put
(
"Remark"
,
depotItem
.
getRemark
());
item
.
put
(
"Img"
,
depotItem
.
getImg
());
item
.
put
(
"Img"
,
depotItem
.
getImg
());
item
.
put
(
"op"
,
1
);
item
.
put
(
"op"
,
1
);
...
...
src/com/jsh/action/materials/MaterialAction.java
View file @
adb6105f
...
@@ -271,7 +271,10 @@ public class MaterialAction extends BaseAction<MaterialModel>
...
@@ -271,7 +271,10 @@ public class MaterialAction extends BaseAction<MaterialModel>
JSONObject
item
=
new
JSONObject
();
JSONObject
item
=
new
JSONObject
();
item
.
put
(
"Id"
,
material
.
getId
());
item
.
put
(
"Id"
,
material
.
getId
());
//名称
//名称
item
.
put
(
"MaterialName"
,
((
material
.
getModel
().
equals
(
""
))?
""
:
""
+
material
.
getModel
())
+
" "
+
material
.
getName
()
+
((
material
.
getColor
()
==
null
)?
""
:
"("
+
material
.
getColor
()
+
")"
));
String
MaterialName
=
((
material
.
getModel
().
equals
(
""
))?
""
:
""
+
material
.
getModel
())
+
" "
+
material
.
getName
()
+
((
material
.
getColor
()
==
null
)?
""
:
"("
+
material
.
getColor
()
+
")"
)
+
((
material
.
getUnit
()
==
null
)?
""
:
"("
+
material
.
getUnit
()
+
")"
);
item
.
put
(
"MaterialName"
,
MaterialName
);
dataArray
.
add
(
item
);
dataArray
.
add
(
item
);
}
}
}
}
...
...
src/com/jsh/action/materials/PersonAction.java
View file @
adb6105f
...
@@ -36,7 +36,6 @@ public class PersonAction extends BaseAction<PersonModel>
...
@@ -36,7 +36,6 @@ public class PersonAction extends BaseAction<PersonModel>
try
try
{
{
Map
<
String
,
Object
>
condition
=
pageUtil
.
getAdvSearch
();
Map
<
String
,
Object
>
condition
=
pageUtil
.
getAdvSearch
();
condition
.
put
(
"ProjectId_n_eq"
,
model
.
getProjectId
());
condition
.
put
(
"Id_s_order"
,
"asc"
);
condition
.
put
(
"Id_s_order"
,
"asc"
);
personService
.
find
(
pageUtil
);
personService
.
find
(
pageUtil
);
mapData
.
put
(
"personList"
,
pageUtil
.
getPageList
());
mapData
.
put
(
"personList"
,
pageUtil
.
getPageList
());
...
@@ -83,7 +82,6 @@ public class PersonAction extends BaseAction<PersonModel>
...
@@ -83,7 +82,6 @@ public class PersonAction extends BaseAction<PersonModel>
try
try
{
{
Person
person
=
new
Person
();
Person
person
=
new
Person
();
person
.
setDepot
(
new
Depot
(
model
.
getProjectId
()));
person
.
setType
(
model
.
getType
());
person
.
setType
(
model
.
getType
());
person
.
setName
(
model
.
getName
());
person
.
setName
(
model
.
getName
());
...
@@ -157,7 +155,6 @@ public class PersonAction extends BaseAction<PersonModel>
...
@@ -157,7 +155,6 @@ public class PersonAction extends BaseAction<PersonModel>
try
try
{
{
Person
person
=
personService
.
get
(
model
.
getPersonID
());
Person
person
=
personService
.
get
(
model
.
getPersonID
());
person
.
setDepot
(
new
Depot
(
model
.
getProjectId
()));
person
.
setType
(
model
.
getType
());
person
.
setType
(
model
.
getType
());
person
.
setName
(
model
.
getName
());
person
.
setName
(
model
.
getName
());
...
@@ -242,8 +239,6 @@ public class PersonAction extends BaseAction<PersonModel>
...
@@ -242,8 +239,6 @@ public class PersonAction extends BaseAction<PersonModel>
{
{
JSONObject
item
=
new
JSONObject
();
JSONObject
item
=
new
JSONObject
();
item
.
put
(
"Id"
,
person
.
getId
());
item
.
put
(
"Id"
,
person
.
getId
());
item
.
put
(
"ProjectId"
,
person
.
getDepot
().
getId
());
item
.
put
(
"ProjectName"
,
person
.
getDepot
().
getName
());
item
.
put
(
"Type"
,
person
.
getType
());
item
.
put
(
"Type"
,
person
.
getType
());
item
.
put
(
"Name"
,
person
.
getName
());
item
.
put
(
"Name"
,
person
.
getName
());
item
.
put
(
"op"
,
1
);
item
.
put
(
"op"
,
1
);
...
@@ -274,7 +269,7 @@ public class PersonAction extends BaseAction<PersonModel>
...
@@ -274,7 +269,7 @@ public class PersonAction extends BaseAction<PersonModel>
* 拼接搜索条件
* 拼接搜索条件
*/
*/
Map
<
String
,
Object
>
condition
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
condition
=
new
HashMap
<
String
,
Object
>();
condition
.
put
(
"
ProjectId_n_eq
"
,
model
.
get
ProjectId
());
condition
.
put
(
"
Name_s_like
"
,
model
.
get
Name
());
condition
.
put
(
"Type_s_eq"
,
model
.
getType
());
condition
.
put
(
"Type_s_eq"
,
model
.
getType
());
return
condition
;
return
condition
;
}
}
...
...
src/com/jsh/dao/materials/BuildingDAO.java
deleted
100644 → 0
View file @
77e30a07
package
com.jsh.dao.materials
;
import
com.jsh.base.BaseDAO
;
import
com.jsh.model.po.Building
;
public
class
BuildingDAO
extends
BaseDAO
<
Building
>
implements
BuildingIDAO
{
/**
* 设置dao映射基类
* @return
*/
@Override
public
Class
<
Building
>
getEntityClass
()
{
return
Building
.
class
;
}
}
src/com/jsh/dao/materials/BuildingIDAO.java
deleted
100644 → 0
View file @
77e30a07
package
com.jsh.dao.materials
;
import
com.jsh.base.BaseIDAO
;
import
com.jsh.model.po.Building
;
public
interface
BuildingIDAO
extends
BaseIDAO
<
Building
>
{
}
src/com/jsh/model/po/Building.hbm.xml
deleted
100644 → 0
View file @
77e30a07
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class
name=
"com.jsh.model.po.Building"
table=
"jsh_building"
>
<id
name=
"Id"
type=
"java.lang.Long"
>
<column
name=
"Id"
/>
<generator
class=
"native"
/>
</id>
<many-to-one
name=
"depot"
class=
"com.jsh.model.po.Depot"
lazy=
"false"
>
<column
name=
"ProjectId"
not-null=
"true"
/>
</many-to-one>
<property
generated=
"never"
lazy=
"false"
name=
"Name"
type=
"java.lang.String"
>
<column
length=
"20"
name=
"Name"
>
<comment>
名称
</comment>
</column>
</property>
<property
generated=
"never"
lazy=
"false"
name=
"Remark"
type=
"java.lang.String"
>
<column
length=
"50"
name=
"Remark"
>
<comment>
备注
</comment>
</column>
</property>
<property
generated=
"never"
lazy=
"false"
name=
"Enabled"
type=
"boolean"
>
<column
length=
"1"
name=
"Enabled"
>
<comment>
启用
</comment>
</column>
</property>
</class>
</hibernate-mapping>
src/com/jsh/model/po/Building.java
deleted
100644 → 0
View file @
77e30a07
package
com.jsh.model.po
;
@SuppressWarnings
(
"serial"
)
public
class
Building
implements
java
.
io
.
Serializable
{
private
Long
Id
;
private
Depot
depot
;
private
String
Name
;
private
String
Remark
;
private
Boolean
Enabled
;
public
Building
()
{
}
public
Building
(
Long
Id
)
{
this
.
Id
=
Id
;
}
public
Building
(
Depot
depot
,
String
name
,
String
remark
,
Boolean
enabled
)
{
super
();
this
.
depot
=
depot
;
Name
=
name
;
Remark
=
remark
;
Enabled
=
enabled
;
}
public
Long
getId
()
{
return
Id
;
}
public
void
setId
(
Long
id
)
{
Id
=
id
;
}
public
Depot
getDepot
()
{
return
depot
;
}
public
void
setDepot
(
Depot
depot
)
{
this
.
depot
=
depot
;
}
public
String
getName
()
{
return
Name
;
}
public
void
setName
(
String
name
)
{
Name
=
name
;
}
public
String
getRemark
()
{
return
Remark
;
}
public
void
setRemark
(
String
remark
)
{
Remark
=
remark
;
}
public
Boolean
getEnabled
()
{
return
Enabled
;
}
public
void
setEnabled
(
Boolean
enabled
)
{
Enabled
=
enabled
;
}
}
\ No newline at end of file
src/com/jsh/model/po/DepotHead.hbm.xml
View file @
adb6105f
...
@@ -49,48 +49,33 @@
...
@@ -49,48 +49,33 @@
</many-to-one>
</many-to-one>
<many-to-one
name=
"HandsPersonId"
class=
"com.jsh.model.po.Person"
lazy=
"false"
>
<many-to-one
name=
"HandsPersonId"
class=
"com.jsh.model.po.Person"
lazy=
"false"
>
<column
name=
"HandsPersonId"
>
<column
name=
"HandsPersonId"
>
<comment>
采购/领料-
经手人Id
</comment>
<comment>
经手人Id
</comment>
</column>
</column>
</many-to-one>
</many-to-one>
<many-to-one
name=
"
WareHousePerson
Id"
class=
"com.jsh.model.po.
Person
"
lazy=
"false"
>
<many-to-one
name=
"
Account
Id"
class=
"com.jsh.model.po.
Account
"
lazy=
"false"
>
<column
name=
"
WareHousePersonId"
not-null=
"true
"
>
<column
name=
"
AccountId
"
>
<comment>
仓管员-经手人
Id
</comment>
<comment>
账户
Id
</comment>
</column>
</column>
</many-to-one>
</many-to-one>
<property
generated=
"never"
lazy=
"false"
name=
"
SettlementWay
"
type=
"java.lang.
String
"
>
<property
generated=
"never"
lazy=
"false"
name=
"
ChangeAmount
"
type=
"java.lang.
Double
"
>
<column
length=
"50"
name=
"SettlementWay
"
>
<column
name=
"ChangeAmount"
precision=
"22"
scale=
"3
"
>
<comment>
现金/记账
</comment>
<comment>
变动金额(收款/付款)
</comment>
</column>
</column>
</property>
</property>
<many-to-one
name=
"BuildingId"
class=
"com.jsh.model.po.Building"
lazy=
"false"
>
<column
name=
"BuildingId"
>
<comment>
单元Id
</comment>
</column>
</many-to-one>
<many-to-one
name=
"AllocationProjectId"
class=
"com.jsh.model.po.Depot"
lazy=
"false"
>
<many-to-one
name=
"AllocationProjectId"
class=
"com.jsh.model.po.Depot"
lazy=
"false"
>
<column
name=
"AllocationProjectId"
>
<column
name=
"AllocationProjectId"
>
<comment>
调拨时,对方项目Id
</comment>
<comment>
调拨时,对方项目Id
</comment>
</column>
</column>
</many-to-one>
</many-to-one>
<property
generated=
"never"
lazy=
"false"
name=
"TotalPrice"
type=
"java.lang.Double"
>
<column
name=
"TotalPrice"
precision=
"22"
scale=
"3"
>
<comment>
合计金额
</comment>
</column>
</property>
<property
generated=
"never"
lazy=
"false"
name=
"Remark"
type=
"java.lang.String"
>
<property
generated=
"never"
lazy=
"false"
name=
"Remark"
type=
"java.lang.String"
>
<column
length=
"1000"
name=
"Remark"
>
<column
length=
"1000"
name=
"Remark"
>
<comment>
备注
</comment>
<comment>
备注
</comment>
</column>
</column>
</property>
</property>
<property
generated=
"never"
lazy=
"false"
name=
"State"
type=
"java.lang.String"
>
<column
length=
"50"
name=
"State"
>
<comment>
草稿/已生效/废弃/待审核/未通过
</comment>
</column>
</property>
<property
generated=
"never"
lazy=
"false"
name=
"ReAuditPersonName"
type=
"java.lang.String"
>
<column
length=
"50"
name=
"ReAuditPersonName"
>
<comment>
撤审人
</comment>
</column>
</property>
<property
generated=
"never"
lazy=
"false"
name=
"Reason"
type=
"java.lang.String"
>
<column
length=
"100"
name=
"Reason"
>
<comment>
撤审原因
</comment>
</column>
</property>
</class>
</class>
</hibernate-mapping>
</hibernate-mapping>
src/com/jsh/model/po/DepotHead.java
View file @
adb6105f
...
@@ -15,15 +15,11 @@ public class DepotHead implements java.io.Serializable
...
@@ -15,15 +15,11 @@ public class DepotHead implements java.io.Serializable
private
Timestamp
OperTime
;
private
Timestamp
OperTime
;
private
Supplier
OrganId
;
private
Supplier
OrganId
;
private
Person
HandsPersonId
;
private
Person
HandsPersonId
;
private
Person
WareHousePersonId
;
private
Account
AccountId
;
private
String
SettlementWay
;
private
Double
ChangeAmount
;
private
Building
BuildingId
;
private
Depot
AllocationProjectId
;
private
Depot
AllocationProjectId
;
private
Double
TotalPrice
;
private
String
Remark
;
private
String
Remark
;
private
String
State
;
private
String
ReAuditPersonName
;
private
String
Reason
;
public
DepotHead
()
public
DepotHead
()
{
{
...
@@ -38,9 +34,7 @@ public class DepotHead implements java.io.Serializable
...
@@ -38,9 +34,7 @@ public class DepotHead implements java.io.Serializable
public
DepotHead
(
String
type
,
String
subType
,
Depot
projectId
,
public
DepotHead
(
String
type
,
String
subType
,
Depot
projectId
,
String
number
,
String
operPersonName
,
Timestamp
createTime
,
String
number
,
String
operPersonName
,
Timestamp
createTime
,
Timestamp
operTime
,
Supplier
organId
,
Person
handsPersonId
,
Timestamp
operTime
,
Supplier
organId
,
Person
handsPersonId
,
Person
wareHousePersonId
,
String
settlementWay
,
Account
accountId
,
Double
changeAmount
,
Depot
allocationProjectId
,
Double
totalPrice
,
String
remark
)
{
Building
buildingId
,
Depot
allocationProjectId
,
String
remark
,
String
state
,
String
reAuditPersonName
,
String
reason
)
{
super
();
super
();
Type
=
type
;
Type
=
type
;
SubType
=
subType
;
SubType
=
subType
;
...
@@ -51,14 +45,11 @@ public class DepotHead implements java.io.Serializable
...
@@ -51,14 +45,11 @@ public class DepotHead implements java.io.Serializable
OperTime
=
operTime
;
OperTime
=
operTime
;
OrganId
=
organId
;
OrganId
=
organId
;
HandsPersonId
=
handsPersonId
;
HandsPersonId
=
handsPersonId
;
WareHousePersonId
=
wareHousePersonId
;
AccountId
=
accountId
;
SettlementWay
=
settlementWay
;
ChangeAmount
=
changeAmount
;
BuildingId
=
buildingId
;
AllocationProjectId
=
allocationProjectId
;
AllocationProjectId
=
allocationProjectId
;
TotalPrice
=
totalPrice
;
Remark
=
remark
;
Remark
=
remark
;
State
=
state
;
ReAuditPersonName
=
reAuditPersonName
;
Reason
=
reason
;
}
}
public
Long
getId
()
{
public
Long
getId
()
{
...
@@ -141,28 +132,20 @@ public class DepotHead implements java.io.Serializable
...
@@ -141,28 +132,20 @@ public class DepotHead implements java.io.Serializable
HandsPersonId
=
handsPersonId
;
HandsPersonId
=
handsPersonId
;
}
}
public
Person
getWareHousePersonId
()
{
public
Account
getAccountId
()
{
return
WareHousePersonId
;
return
AccountId
;
}
public
void
setWareHousePersonId
(
Person
wareHousePersonId
)
{
WareHousePersonId
=
wareHousePersonId
;
}
}
public
String
getSettlementWay
(
)
{
public
void
setAccountId
(
Account
accountId
)
{
return
SettlementWay
;
AccountId
=
accountId
;
}
}
public
void
setSettlementWay
(
String
settlementWay
)
{
public
Double
getChangeAmount
(
)
{
S
et
tlementWay
=
settlementWay
;
r
et
urn
ChangeAmount
;
}
}
public
Building
getBuildingId
()
{
public
void
setChangeAmount
(
Double
changeAmount
)
{
return
BuildingId
;
ChangeAmount
=
changeAmount
;
}
public
void
setBuildingId
(
Building
buildingId
)
{
BuildingId
=
buildingId
;
}
}
public
Depot
getAllocationProjectId
()
{
public
Depot
getAllocationProjectId
()
{
...
@@ -173,38 +156,19 @@ public class DepotHead implements java.io.Serializable
...
@@ -173,38 +156,19 @@ public class DepotHead implements java.io.Serializable
AllocationProjectId
=
allocationProjectId
;
AllocationProjectId
=
allocationProjectId
;
}
}
public
String
getRemark
()
{
public
Double
getTotalPrice
()
{
return
Remark
;
return
TotalPrice
;
}
public
void
setRemark
(
String
remark
)
{
Remark
=
remark
;
}
public
String
getState
()
{
return
State
;
}
public
void
setState
(
String
state
)
{
State
=
state
;
}
}
public
String
getReAuditPersonName
(
)
{
public
void
setTotalPrice
(
Double
totalPrice
)
{
return
ReAuditPersonNam
e
;
TotalPrice
=
totalPric
e
;
}
}
public
void
setReAuditPersonName
(
String
reAuditPersonName
)
{
public
String
getRemark
()
{
ReAuditPersonName
=
reAuditPersonName
;
return
Remark
;
}
public
String
getReason
()
{
return
Reason
;
}
}
public
void
setRe
ason
(
String
re
ason
)
{
public
void
setRe
mark
(
String
re
mark
)
{
Re
ason
=
re
ason
;
Re
mark
=
re
mark
;
}
}
}
}
\ No newline at end of file
src/com/jsh/model/po/DepotItem.hbm.xml
View file @
adb6105f
...
@@ -27,9 +27,9 @@
...
@@ -27,9 +27,9 @@
<comment>
单价
</comment>
<comment>
单价
</comment>
</column>
</column>
</property>
</property>
<property
generated=
"never"
lazy=
"false"
name=
"
Incidentals
"
type=
"java.lang.Double"
>
<property
generated=
"never"
lazy=
"false"
name=
"
AllPrice
"
type=
"java.lang.Double"
>
<column
name=
"
Incidentals
"
precision=
"22"
scale=
"3"
>
<column
name=
"
AllPrice
"
precision=
"22"
scale=
"3"
>
<comment>
运杂费
</comment>
<comment>
金额
</comment>
</column>
</column>
</property>
</property>
<property
generated=
"never"
lazy=
"false"
name=
"Remark"
type=
"java.lang.String"
>
<property
generated=
"never"
lazy=
"false"
name=
"Remark"
type=
"java.lang.String"
>
...
...
src/com/jsh/model/po/DepotItem.java
View file @
adb6105f
...
@@ -8,7 +8,7 @@ public class DepotItem implements java.io.Serializable
...
@@ -8,7 +8,7 @@ public class DepotItem implements java.io.Serializable
private
Material
MaterialId
;
private
Material
MaterialId
;
private
Double
OperNumber
;
private
Double
OperNumber
;
private
Double
UnitPrice
;
private
Double
UnitPrice
;
private
Double
Incidentals
;
private
Double
AllPrice
;
private
String
Remark
;
private
String
Remark
;
private
String
Img
;
private
String
Img
;
...
@@ -23,14 +23,14 @@ public class DepotItem implements java.io.Serializable
...
@@ -23,14 +23,14 @@ public class DepotItem implements java.io.Serializable
}
}
public
DepotItem
(
DepotHead
headerId
,
Material
materialId
,
public
DepotItem
(
DepotHead
headerId
,
Material
materialId
,
Double
operNumber
,
Double
unitPrice
,
Double
incidentals
,
Double
operNumber
,
Double
unitPrice
,
Double
allPrice
,
String
remark
,
String
img
)
{
String
remark
,
String
img
)
{
super
();
super
();
HeaderId
=
headerId
;
HeaderId
=
headerId
;
MaterialId
=
materialId
;
MaterialId
=
materialId
;
OperNumber
=
operNumber
;
OperNumber
=
operNumber
;
UnitPrice
=
unitPrice
;
UnitPrice
=
unitPrice
;
Incidentals
=
incidentals
;
AllPrice
=
allPrice
;
Remark
=
remark
;
Remark
=
remark
;
Img
=
img
;
Img
=
img
;
}
}
...
@@ -75,12 +75,12 @@ public class DepotItem implements java.io.Serializable
...
@@ -75,12 +75,12 @@ public class DepotItem implements java.io.Serializable
UnitPrice
=
unitPrice
;
UnitPrice
=
unitPrice
;
}
}
public
Double
get
Incidentals
()
{
public
Double
get
AllPrice
()
{
return
Incidentals
;
return
AllPrice
;
}
}
public
void
set
Incidentals
(
Double
incidentals
)
{
public
void
set
AllPrice
(
Double
allPrice
)
{
Incidentals
=
incidentals
;
AllPrice
=
allPrice
;
}
}
public
String
getRemark
()
{
public
String
getRemark
()
{
...
...
src/com/jsh/model/po/Person.hbm.xml
View file @
adb6105f
...
@@ -7,9 +7,6 @@
...
@@ -7,9 +7,6 @@
<column
name=
"Id"
/>
<column
name=
"Id"
/>
<generator
class=
"native"
/>
<generator
class=
"native"
/>
</id>
</id>
<many-to-one
name=
"depot"
class=
"com.jsh.model.po.Depot"
lazy=
"false"
>
<column
name=
"ProjectId"
not-null=
"true"
/>
</many-to-one>
<property
generated=
"never"
lazy=
"false"
name=
"Type"
type=
"java.lang.String"
>
<property
generated=
"never"
lazy=
"false"
name=
"Type"
type=
"java.lang.String"
>
<column
length=
"20"
name=
"Type"
>
<column
length=
"20"
name=
"Type"
>
<comment>
类型
</comment>
<comment>
类型
</comment>
...
...
src/com/jsh/model/po/Person.java
View file @
adb6105f
...
@@ -4,7 +4,6 @@ package com.jsh.model.po;
...
@@ -4,7 +4,6 @@ package com.jsh.model.po;
public
class
Person
implements
java
.
io
.
Serializable
public
class
Person
implements
java
.
io
.
Serializable
{
{
private
Long
Id
;
private
Long
Id
;
private
Depot
depot
;
private
String
Type
;
private
String
Type
;
private
String
Name
;
private
String
Name
;
...
@@ -18,8 +17,7 @@ public class Person implements java.io.Serializable
...
@@ -18,8 +17,7 @@ public class Person implements java.io.Serializable
this
.
Id
=
Id
;
this
.
Id
=
Id
;
}
}
public
Person
(
Depot
depot
,
String
type
,
String
name
)
{
public
Person
(
String
type
,
String
name
)
{
this
.
depot
=
depot
;
Type
=
type
;
Type
=
type
;
Name
=
name
;
Name
=
name
;
}
}
...
@@ -32,14 +30,6 @@ public class Person implements java.io.Serializable
...
@@ -32,14 +30,6 @@ public class Person implements java.io.Serializable
Id
=
id
;
Id
=
id
;
}
}
public
Depot
getDepot
()
{
return
depot
;
}
public
void
setDepot
(
Depot
depot
)
{
this
.
depot
=
depot
;
}
public
String
getType
()
{
public
String
getType
()
{
return
Type
;
return
Type
;
}
}
...
...
src/com/jsh/model/vo/materials/BuildingModel.java
deleted
100644 → 0
View file @
77e30a07
package
com.jsh.model.vo.materials
;
import
java.io.Serializable
;
@SuppressWarnings
(
"serial"
)
public
class
BuildingModel
implements
Serializable
{
private
BuildingShowModel
showModel
=
new
BuildingShowModel
();
/**======开始接受页面参数=================**/
/**
* ProjectId
*/
private
Long
ProjectId
;
/**
* 名称
*/
private
String
Name
=
""
;
/**
* 备注
*/
private
String
Remark
=
""
;
/**
* 启用
*/
private
Boolean
Enabled
=
false
;
/**
* 分类ID
*/
private
Long
buildingID
=
0
l
;
/**
* 分类IDs 批量操作使用
*/
private
String
buildingIDs
=
""
;
/**
* 每页显示的个数
*/
private
int
pageSize
=
10
;
/**
* 当前页码
*/
private
int
pageNo
=
1
;
/**
* 用户IP,用户记录操作日志
*/
private
String
clientIp
=
""
;
public
BuildingShowModel
getShowModel
()
{
return
showModel
;
}
public
void
setShowModel
(
BuildingShowModel
showModel
)
{
this
.
showModel
=
showModel
;
}
public
Long
getProjectId
()
{
return
ProjectId
;
}
public
void
setProjectId
(
Long
projectId
)
{
ProjectId
=
projectId
;
}
public
String
getName
()
{
return
Name
;
}
public
void
setName
(
String
name
)
{
Name
=
name
;
}
public
String
getRemark
()
{
return
Remark
;
}
public
void
setRemark
(
String
remark
)
{
Remark
=
remark
;
}
public
Boolean
getEnabled
()
{
return
Enabled
;
}
public
void
setEnabled
(
Boolean
enabled
)
{
Enabled
=
enabled
;
}
public
Long
getBuildingID
()
{
return
buildingID
;
}
public
void
setBuildingID
(
Long
buildingID
)
{
this
.
buildingID
=
buildingID
;
}
public
String
getBuildingIDs
()
{
return
buildingIDs
;
}
public
void
setBuildingIDs
(
String
buildingIDs
)
{
this
.
buildingIDs
=
buildingIDs
;
}
public
int
getPageSize
()
{
return
pageSize
;
}
public
void
setPageSize
(
int
pageSize
)
{
this
.
pageSize
=
pageSize
;
}
public
int
getPageNo
()
{
return
pageNo
;
}
public
void
setPageNo
(
int
pageNo
)
{
this
.
pageNo
=
pageNo
;
}
public
String
getClientIp
()
{
return
clientIp
;
}
public
void
setClientIp
(
String
clientIp
)
{
this
.
clientIp
=
clientIp
;
}
}
src/com/jsh/model/vo/materials/BuildingShowModel.java
deleted
100644 → 0
View file @
77e30a07
package
com.jsh.model.vo.materials
;
import
java.io.Serializable
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@SuppressWarnings
(
"serial"
)
public
class
BuildingShowModel
implements
Serializable
{
/**
* 提示信息
*/
private
String
msgTip
=
""
;
/**
* 系统数据
*/
@SuppressWarnings
(
"rawtypes"
)
private
Map
<
String
,
List
>
map
=
new
HashMap
<
String
,
List
>();
public
String
getMsgTip
()
{
return
msgTip
;
}
public
void
setMsgTip
(
String
msgTip
)
{
this
.
msgTip
=
msgTip
;
}
@SuppressWarnings
(
"rawtypes"
)
public
Map
<
String
,
List
>
getMap
()
{
return
map
;
}
}
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