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
a1701cce
Commit
a1701cce
authored
Jan 21, 2017
by
季圣华
Browse files
给财务单据增加合计的功能
parent
4a632b58
Changes
10
Hide whitespace changes
Inline
Side-by-side
WebRoot/WEB-INF/classes/com/jsh/action/materials/AccountHeadAction.class
View file @
a1701cce
No preview for this file type
WebRoot/WEB-INF/classes/com/jsh/model/po/AccountHead.class
View file @
a1701cce
No preview for this file type
WebRoot/WEB-INF/classes/com/jsh/model/po/AccountHead.hbm.xml
View file @
a1701cce
<?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.AccountHead"
table=
"jsh_accounthead"
>
<id
name=
"Id"
type=
"java.lang.Long"
>
<column
name=
"Id"
/>
<generator
class=
"native"
/>
</id>
<property
generated=
"never"
lazy=
"false"
name=
"Type"
type=
"java.lang.String"
>
<column
length=
"50"
name=
"Type"
>
<comment>
类型(支出/收入/收款/付款/转账)
</comment>
</column>
</property>
<many-to-one
name=
"OrganId"
class=
"com.jsh.model.po.Supplier"
lazy=
"false"
>
<column
name=
"OrganId"
>
<comment>
单位Id(收款/付款单位)
</comment>
</column>
</many-to-one>
<many-to-one
name=
"HandsPersonId"
class=
"com.jsh.model.po.Person"
lazy=
"false"
>
<column
name=
"HandsPersonId"
>
<comment>
经手人Id
</comment>
</column>
</many-to-one>
<property
generated=
"never"
lazy=
"false"
name=
"ChangeAmount"
type=
"java.lang.Double"
>
<column
name=
"ChangeAmount"
precision=
"22"
scale=
"3"
>
<comment>
变动金额(优惠/收款/付款/实付)
</comment>
</column>
</property>
<many-to-one
name=
"AccountId"
class=
"com.jsh.model.po.Account"
lazy=
"false"
>
<column
name=
"AccountId"
>
<comment>
账户(收款/付款)
</comment>
</column>
</many-to-one>
<property
generated=
"never"
lazy=
"false"
name=
"BillNo"
type=
"java.lang.String"
>
<column
length=
"50"
name=
"BillNo"
>
<comment>
单据编号
</comment>
</column>
</property>
<property
name=
"BillTime"
type=
"java.sql.Timestamp"
>
<column
length=
"19"
name=
"BillTime"
>
<comment>
单据日期
</comment>
</column>
</property>
<property
generated=
"never"
lazy=
"false"
name=
"Remark"
type=
"java.lang.String"
>
<column
length=
"100"
name=
"Remark"
>
<comment>
备注
</comment>
</column>
</property>
</class>
</hibernate-mapping>
<?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.AccountHead"
table=
"jsh_accounthead"
>
<id
name=
"Id"
type=
"java.lang.Long"
>
<column
name=
"Id"
/>
<generator
class=
"native"
/>
</id>
<property
generated=
"never"
lazy=
"false"
name=
"Type"
type=
"java.lang.String"
>
<column
length=
"50"
name=
"Type"
>
<comment>
类型(支出/收入/收款/付款/转账)
</comment>
</column>
</property>
<many-to-one
name=
"OrganId"
class=
"com.jsh.model.po.Supplier"
lazy=
"false"
>
<column
name=
"OrganId"
>
<comment>
单位Id(收款/付款单位)
</comment>
</column>
</many-to-one>
<many-to-one
name=
"HandsPersonId"
class=
"com.jsh.model.po.Person"
lazy=
"false"
>
<column
name=
"HandsPersonId"
>
<comment>
经手人Id
</comment>
</column>
</many-to-one>
<property
generated=
"never"
lazy=
"false"
name=
"ChangeAmount"
type=
"java.lang.Double"
>
<column
name=
"ChangeAmount"
precision=
"22"
scale=
"3"
>
<comment>
变动金额(优惠/收款/付款/实付)
</comment>
</column>
</property>
<property
generated=
"never"
lazy=
"false"
name=
"TotalPrice"
type=
"java.lang.Double"
>
<column
name=
"TotalPrice"
precision=
"22"
scale=
"3"
>
<comment>
合计金额
</comment>
</column>
</property>
<many-to-one
name=
"AccountId"
class=
"com.jsh.model.po.Account"
lazy=
"false"
>
<column
name=
"AccountId"
>
<comment>
账户(收款/付款)
</comment>
</column>
</many-to-one>
<property
generated=
"never"
lazy=
"false"
name=
"BillNo"
type=
"java.lang.String"
>
<column
length=
"50"
name=
"BillNo"
>
<comment>
单据编号
</comment>
</column>
</property>
<property
name=
"BillTime"
type=
"java.sql.Timestamp"
>
<column
length=
"19"
name=
"BillTime"
>
<comment>
单据日期
</comment>
</column>
</property>
<property
generated=
"never"
lazy=
"false"
name=
"Remark"
type=
"java.lang.String"
>
<column
length=
"100"
name=
"Remark"
>
<comment>
备注
</comment>
</column>
</property>
</class>
</hibernate-mapping>
WebRoot/WEB-INF/classes/com/jsh/model/vo/materials/AccountHeadModel.class
View file @
a1701cce
No preview for this file type
WebRoot/js/pages/financial/financial_base.js
View file @
a1701cce
...
...
@@ -201,13 +201,14 @@
{
field
:
'
Id
'
,
width
:
35
,
align
:
"
center
"
,
checkbox
:
true
},
{
title
:
'
单据编号
'
,
field
:
'
BillNo
'
,
width
:
100
},
{
title
:
'
单据时间
'
,
field
:
'
BillTime
'
,
width
:
100
},
{
title
:
'
合计
'
,
field
:
'
TotalPrice
'
,
width
:
80
},
{
title
:
'
备注
'
,
field
:
'
Remark
'
,
width
:
100
},
{
title
:
'
操作
'
,
field
:
'
op
'
,
align
:
"
center
"
,
width
:
180
,
formatter
:
function
(
value
,
rec
)
{
var
str
=
''
;
var
rowInfo
=
rec
.
Id
+
'
AaBb
'
+
rec
.
BillNo
+
'
AaBb
'
+
rec
.
BillTime
+
'
AaBb
'
+
rec
.
Remark
+
'
AaBb
'
+
rec
.
AccountId
+
'
AaBb
'
+
rec
.
AccountName
+
'
AaBb
'
+
rec
.
OrganId
+
'
AaBb
'
+
rec
.
OrganName
+
'
AaBb
'
+
rec
.
HandsPersonId
+
'
AaBb
'
+
rec
.
HandsPersonName
+
'
AaBb
'
+
rec
.
ChangeAmount
;
+
'
AaBb
'
+
rec
.
HandsPersonId
+
'
AaBb
'
+
rec
.
HandsPersonName
+
'
AaBb
'
+
rec
.
ChangeAmount
+
'
AaBb
'
+
rec
.
TotalPrice
;
if
(
1
==
value
)
{
str
+=
'
<img src="
'
+
path
+
'
/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountHead(
\'
'
+
rowInfo
+
'
\'
);"/> <a onclick="showAccountHead(
\'
'
+
rowInfo
+
'
\'
);" style="text-decoration:none;color:black;" href="javascript:void(0)">查看</a>
'
;
...
...
@@ -247,7 +248,7 @@
}
//初始化表格数据-明细列表-编辑状态
function
initTableData_account
(){
function
initTableData_account
(
type
,
TotalPrice
){
$
(
'
#accountData
'
).
datagrid
({
height
:
300
,
rownumbers
:
false
,
...
...
@@ -260,10 +261,10 @@
//fitColumns:true,
//单击行是否选中
//checkOnSelect : false,
url
:
path
+
'
/accountItem/findBy.action?HeaderId=
'
+
accountHeadID
,
pagination
:
true
,
//交替出现背景
striped
:
true
,
showFooter
:
true
,
//loadFilter: pagerFilter,
onClickRow
:
onClickRow
,
pageSize
:
50
,
...
...
@@ -336,11 +337,31 @@
return
;
}
});
$
.
ajax
({
type
:
"
post
"
,
url
:
path
+
'
/accountItem/findBy.action?HeaderId=
'
+
accountHeadID
,
dataType
:
"
json
"
,
success
:
function
(
res
)
{
var
EachAmount
=
0
;
if
(
type
===
"
edit
"
)
{
EachAmount
=
TotalPrice
;
}
var
array
=
[];
array
.
push
({
"
EachAmount
"
:
EachAmount
});
res
.
footer
=
array
;
$
(
"
#accountData
"
).
datagrid
(
'
loadData
'
,
res
);
},
error
:
function
()
{
$
.
messager
.
alert
(
'
查询提示
'
,
'
查询数据后台异常,请稍后再试!
'
,
'
error
'
);
}
});
}
//初始化表格数据-明细列表-查看状态
function
initTableData_account_show
(){
function
initTableData_account_show
(
TotalPrice
){
$
(
'
#accountDataShow
'
).
datagrid
({
height
:
300
,
rownumbers
:
true
,
...
...
@@ -353,10 +374,10 @@
//fitColumns:true,
//单击行是否选中
//checkOnSelect : false,
url
:
path
+
'
/accountItem/findBy.action?HeaderId=
'
+
accountHeadID
,
pagination
:
true
,
//交替出现背景
striped
:
true
,
showFooter
:
true
,
//loadFilter: pagerFilter,
onClickRow
:
onClickRow
,
pageSize
:
50
,
...
...
@@ -373,6 +394,23 @@
return
;
}
});
$
.
ajax
({
type
:
"
post
"
,
url
:
path
+
'
/accountItem/findBy.action?HeaderId=
'
+
accountHeadID
,
dataType
:
"
json
"
,
success
:
function
(
res
)
{
var
EachAmount
=
TotalPrice
;
var
array
=
[];
array
.
push
({
"
EachAmount
"
:
EachAmount
});
res
.
footer
=
array
;
$
(
"
#accountDataShow
"
).
datagrid
(
'
loadData
'
,
res
);
},
error
:
function
()
{
$
.
messager
.
alert
(
'
查询提示
'
,
'
查询数据后台异常,请稍后再试!
'
,
'
error
'
);
}
});
}
...
...
@@ -507,7 +545,7 @@
orgAccountHead
=
""
;
accountHeadID
=
0
;
initTableData_account
();
//明细列表
initTableData_account
(
"
add
"
);
//明细列表
reject
();
//撤销下、刷新材料列表
url
=
path
+
'
/accountHead/create.action
'
;
}
...
...
@@ -523,12 +561,13 @@
$
(
'
#OrganId
'
).
combobox
(
'
setValue
'
,
accountHeadInfo
[
6
]);
$
(
"
#HandsPersonId
"
).
val
(
accountHeadInfo
[
8
]);
$
(
"
#ChangeAmount
"
).
val
(
accountHeadInfo
[
10
]);
var
TotalPrice
=
accountHeadInfo
[
11
];
var
editTitle
=
listTitle
.
replace
(
"
列表
"
,
"
信息
"
);
$
(
'
#accountHeadDlg
'
).
dialog
(
'
open
'
).
dialog
(
'
setTitle
'
,
'
<img src="
'
+
path
+
'
/js/easyui-1.3.5/themes/icons/pencil.png"/> 编辑
'
+
editTitle
);
$
(
"
.window-mask
"
).
css
({
width
:
webW
,
height
:
webH
});
accountHeadID
=
accountHeadInfo
[
0
];
initTableData_account
();
//明细列表
initTableData_account
(
"
edit
"
,
TotalPrice
);
//明细列表
reject
();
//撤销下、刷新列表
url
=
path
+
'
/accountHead/update.action?accountHeadID=
'
+
accountHeadInfo
[
0
];
}
...
...
@@ -543,12 +582,13 @@
$
(
'
#OrganIdShow
'
).
text
(
accountHeadInfo
[
7
]);
$
(
"
#HandsPersonIdShow
"
).
text
(
accountHeadInfo
[
9
]);
$
(
"
#ChangeAmountShow
"
).
text
(
accountHeadInfo
[
10
]);
var
TotalPrice
=
accountHeadInfo
[
11
];
var
showTitle
=
listTitle
.
replace
(
"
列表
"
,
"
信息
"
);
$
(
'
#accountHeadDlgShow
'
).
dialog
(
'
open
'
).
dialog
(
'
setTitle
'
,
'
<img src="
'
+
path
+
'
/js/easyui-1.3.5/themes/icons/list.png"/> 查看
'
+
showTitle
);
$
(
"
.window-mask
"
).
css
({
width
:
webW
,
height
:
webH
});
accountHeadID
=
accountHeadInfo
[
0
];
initTableData_account_show
();
//明细列表-查看状态
initTableData_account_show
(
TotalPrice
);
//明细列表-查看状态
}
//绑定操作事件
...
...
@@ -590,7 +630,8 @@
else
{
var
OrganId
=
null
;
var
ChangeAmount
=
$
.
trim
(
$
(
"
#ChangeAmount
"
).
val
());
var
ChangeAmount
=
$
.
trim
(
$
(
"
#ChangeAmount
"
).
val
());
var
TotalPrice
=
$
(
"
#accountHeadFM .datagrid-footer [field='EachAmount'] div
"
).
text
();
if
(
listType
!==
"
转账
"
){
OrganId
=
$
(
'
#OrganId
'
).
combobox
(
'
getValue
'
);
}
...
...
@@ -598,6 +639,10 @@
//支出为负数
ChangeAmount
=
0
-
ChangeAmount
;
}
if
(
listType
===
"
支出
"
||
listType
===
"
付款
"
){
//支出和付款为负数
TotalPrice
=
0
-
TotalPrice
;
}
$
.
ajax
({
type
:
"
post
"
,
url
:
url
,
...
...
@@ -609,6 +654,7 @@
BillTime
:
$
.
trim
(
$
(
"
#BillTime
"
).
val
()),
AccountId
:
$
.
trim
(
$
(
"
#AccountId
"
).
val
()),
ChangeAmount
:
ChangeAmount
,
//付款/收款/优惠/实付
TotalPrice
:
TotalPrice
,
//合计
OrganId
:
OrganId
,
HandsPersonId
:
$
.
trim
(
$
(
"
#HandsPersonId
"
).
val
()),
Remark
:
$
.
trim
(
$
(
"
#Remark
"
).
val
()),
...
...
@@ -628,8 +674,7 @@
{
accept
(
accountHeadID
);
//修改
}
$
(
'
#accountHeadDlg
'
).
dialog
(
'
close
'
);
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
showAccountHeadDetails
(
opts
.
pageNumber
,
opts
.
pageSize
);
...
...
@@ -698,6 +743,30 @@
}
});
}
//自动计算事件
function
autoReckon
()
{
//延时绑定事件
setTimeout
(
function
(){
var
body
=
$
(
"
#accountHeadFM .datagrid-body
"
);
var
footer
=
$
(
"
#accountHeadFM .datagrid-footer
"
);
var
input
=
"
.datagrid-editable-input
"
;
//修改金额,自动计算单价和合计
body
.
find
(
"
[field='EachAmount']
"
).
find
(
input
).
off
(
"
keyup
"
).
on
(
"
keyup
"
,
function
(){
var
TotalPrice
=
0
;
var
EachAmount
=
$
(
this
).
val
()
-
0
;
//金额
body
.
find
(
"
[field='EachAmount']
"
).
each
(
function
(){
if
(
$
(
this
).
find
(
"
div
"
).
text
()
!==
""
){
TotalPrice
=
TotalPrice
+
parseFloat
(
$
(
this
).
find
(
"
div
"
).
text
().
toString
());
}
});
TotalPrice
=
TotalPrice
+
EachAmount
;
footer
.
find
(
"
[field='EachAmount']
"
).
find
(
"
div
"
).
text
((
TotalPrice
).
toFixed
(
2
));
});
},
500
);
}
//结束编辑
function
endEditing
()
{
var
edField
=
""
;
...
...
@@ -728,6 +797,7 @@
$
(
'
#accountData
'
).
datagrid
(
'
selectRow
'
,
index
)
.
datagrid
(
'
beginEdit
'
,
index
);
editIndex
=
index
;
autoReckon
();
}
else
{
$
(
'
#accountData
'
).
datagrid
(
'
selectRow
'
,
editIndex
);
}
...
...
@@ -739,6 +809,7 @@
$
(
'
#accountData
'
).
datagrid
(
'
appendRow
'
,
{});
editIndex
=
$
(
'
#accountData
'
).
datagrid
(
'
getRows
'
).
length
-
1
;
$
(
'
#accountData
'
).
datagrid
(
'
selectRow
'
,
editIndex
).
datagrid
(
'
beginEdit
'
,
editIndex
);
autoReckon
();
}
}
//删除
...
...
WebRoot/js/pages/materials/in_out.js
View file @
a1701cce
...
...
@@ -786,13 +786,11 @@
{
getMaxId
();
//查找最大的Id
accept
(
depotHeadMaxId
);
//新增
//changeAmountFn(); //改变账户金额
closeDialog
();
}
else
{
accept
(
depotHeadID
);
//修改
//changeAmountFn(); //改变账户金额
closeDialog
();
}
}
...
...
@@ -1056,28 +1054,6 @@
}
}
}
//改变账户金额
function
changeAmountFn
(){
var
currentAmount
=
$
(
"
#AccountId option:selected
"
).
attr
(
"
data-currentamount
"
)
-
0
;
var
ChangeAmount
=
$
(
"
#ChangeAmount
"
).
val
()
-
0
;
var
oldChangeAmount
=
$
(
"
#ChangeAmount
"
).
attr
(
"
data-changeamount
"
)
-
0
;
$
.
ajax
({
url
:
path
+
"
/account/updateAmount.action
"
,
type
:
"
get
"
,
dataType
:
"
json
"
,
data
:{
accountID
:
$
(
"
#AccountId
"
).
val
(),
currentAmount
:
currentAmount
+
ChangeAmount
-
oldChangeAmount
},
success
:
function
(
res
){
},
error
:
function
(){
$
.
messager
.
alert
(
'
提示
'
,
'
请检查网络连接!
'
,
'
error
'
);
return
;
}
});
}
...
...
src/com/jsh/action/materials/AccountHeadAction.java
View file @
a1701cce
...
...
@@ -69,6 +69,7 @@ public class AccountHeadAction extends BaseAction<AccountHeadModel>
if
(
model
.
getOrganId
()!=
null
){
accountHead
.
setOrganId
(
new
Supplier
(
model
.
getOrganId
()));}
if
(
model
.
getHandsPersonId
()!=
null
){
accountHead
.
setHandsPersonId
(
new
Person
(
model
.
getHandsPersonId
()));}
accountHead
.
setChangeAmount
(
model
.
getChangeAmount
());
accountHead
.
setTotalPrice
(
model
.
getTotalPrice
());
if
(
model
.
getAccountId
()!=
null
){
accountHead
.
setAccountId
(
new
Account
(
model
.
getAccountId
()));}
accountHead
.
setBillNo
(
model
.
getBillNo
());
try
...
...
@@ -154,6 +155,7 @@ public class AccountHeadAction extends BaseAction<AccountHeadModel>
if
(
model
.
getOrganId
()!=
null
){
accountHead
.
setOrganId
(
new
Supplier
(
model
.
getOrganId
()));}
if
(
model
.
getHandsPersonId
()!=
null
){
accountHead
.
setHandsPersonId
(
new
Person
(
model
.
getHandsPersonId
()));}
accountHead
.
setChangeAmount
(
model
.
getChangeAmount
());
accountHead
.
setTotalPrice
(
model
.
getTotalPrice
());
if
(
model
.
getAccountId
()!=
null
){
accountHead
.
setAccountId
(
new
Account
(
model
.
getAccountId
()));}
accountHead
.
setBillNo
(
model
.
getBillNo
());
try
...
...
@@ -255,6 +257,7 @@ public class AccountHeadAction extends BaseAction<AccountHeadModel>
item
.
put
(
"BillNo"
,
accountHead
.
getBillNo
());
item
.
put
(
"BillTime"
,
Tools
.
getCurrentMonth
(
accountHead
.
getBillTime
()));
item
.
put
(
"ChangeAmount"
,
accountHead
.
getChangeAmount
()==
null
?
""
:
Math
.
abs
(
accountHead
.
getChangeAmount
()));
item
.
put
(
"TotalPrice"
,
accountHead
.
getTotalPrice
()==
null
?
""
:
Math
.
abs
(
accountHead
.
getTotalPrice
()));
item
.
put
(
"Remark"
,
accountHead
.
getRemark
());
item
.
put
(
"op"
,
1
);
dataArray
.
add
(
item
);
...
...
src/com/jsh/model/po/AccountHead.hbm.xml
View file @
a1701cce
<?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.AccountHead"
table=
"jsh_accounthead"
>
<id
name=
"Id"
type=
"java.lang.Long"
>
<column
name=
"Id"
/>
<generator
class=
"native"
/>
</id>
<property
generated=
"never"
lazy=
"false"
name=
"Type"
type=
"java.lang.String"
>
<column
length=
"50"
name=
"Type"
>
<comment>
类型(支出/收入/收款/付款/转账)
</comment>
</column>
</property>
<many-to-one
name=
"OrganId"
class=
"com.jsh.model.po.Supplier"
lazy=
"false"
>
<column
name=
"OrganId"
>
<comment>
单位Id(收款/付款单位)
</comment>
</column>
</many-to-one>
<many-to-one
name=
"HandsPersonId"
class=
"com.jsh.model.po.Person"
lazy=
"false"
>
<column
name=
"HandsPersonId"
>
<comment>
经手人Id
</comment>
</column>
</many-to-one>
<property
generated=
"never"
lazy=
"false"
name=
"ChangeAmount"
type=
"java.lang.Double"
>
<column
name=
"ChangeAmount"
precision=
"22"
scale=
"3"
>
<comment>
变动金额(优惠/收款/付款/实付)
</comment>
</column>
</property>
<many-to-one
name=
"AccountId"
class=
"com.jsh.model.po.Account"
lazy=
"false"
>
<column
name=
"AccountId"
>
<comment>
账户(收款/付款)
</comment>
</column>
</many-to-one>
<property
generated=
"never"
lazy=
"false"
name=
"BillNo"
type=
"java.lang.String"
>
<column
length=
"50"
name=
"BillNo"
>
<comment>
单据编号
</comment>
</column>
</property>
<property
name=
"BillTime"
type=
"java.sql.Timestamp"
>
<column
length=
"19"
name=
"BillTime"
>
<comment>
单据日期
</comment>
</column>
</property>
<property
generated=
"never"
lazy=
"false"
name=
"Remark"
type=
"java.lang.String"
>
<column
length=
"100"
name=
"Remark"
>
<comment>
备注
</comment>
</column>
</property>
</class>
</hibernate-mapping>
<?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.AccountHead"
table=
"jsh_accounthead"
>
<id
name=
"Id"
type=
"java.lang.Long"
>
<column
name=
"Id"
/>
<generator
class=
"native"
/>
</id>
<property
generated=
"never"
lazy=
"false"
name=
"Type"
type=
"java.lang.String"
>
<column
length=
"50"
name=
"Type"
>
<comment>
类型(支出/收入/收款/付款/转账)
</comment>
</column>
</property>
<many-to-one
name=
"OrganId"
class=
"com.jsh.model.po.Supplier"
lazy=
"false"
>
<column
name=
"OrganId"
>
<comment>
单位Id(收款/付款单位)
</comment>
</column>
</many-to-one>
<many-to-one
name=
"HandsPersonId"
class=
"com.jsh.model.po.Person"
lazy=
"false"
>
<column
name=
"HandsPersonId"
>
<comment>
经手人Id
</comment>
</column>
</many-to-one>
<property
generated=
"never"
lazy=
"false"
name=
"ChangeAmount"
type=
"java.lang.Double"
>
<column
name=
"ChangeAmount"
precision=
"22"
scale=
"3"
>
<comment>
变动金额(优惠/收款/付款/实付)
</comment>
</column>
</property>
<property
generated=
"never"
lazy=
"false"
name=
"TotalPrice"
type=
"java.lang.Double"
>
<column
name=
"TotalPrice"
precision=
"22"
scale=
"3"
>
<comment>
合计金额
</comment>
</column>
</property>
<many-to-one
name=
"AccountId"
class=
"com.jsh.model.po.Account"
lazy=
"false"
>
<column
name=
"AccountId"
>
<comment>
账户(收款/付款)
</comment>
</column>
</many-to-one>
<property
generated=
"never"
lazy=
"false"
name=
"BillNo"
type=
"java.lang.String"
>
<column
length=
"50"
name=
"BillNo"
>
<comment>
单据编号
</comment>
</column>
</property>
<property
name=
"BillTime"
type=
"java.sql.Timestamp"
>
<column
length=
"19"
name=
"BillTime"
>
<comment>
单据日期
</comment>
</column>
</property>
<property
generated=
"never"
lazy=
"false"
name=
"Remark"
type=
"java.lang.String"
>
<column
length=
"100"
name=
"Remark"
>
<comment>
备注
</comment>
</column>
</property>
</class>
</hibernate-mapping>
src/com/jsh/model/po/AccountHead.java
View file @
a1701cce
...
...
@@ -10,6 +10,7 @@ public class AccountHead implements java.io.Serializable
private
Supplier
OrganId
;
private
Person
HandsPersonId
;
private
Double
ChangeAmount
;
private
Double
TotalPrice
;
private
Account
AccountId
;
private
String
BillNo
;
private
Timestamp
BillTime
;
...
...
@@ -26,14 +27,15 @@ public class AccountHead implements java.io.Serializable
}
public
AccountHead
(
String
type
,
Supplier
organId
,
Person
handsPersonId
,
Double
changeAmount
,
Account
accountId
,
String
billNo
,
Timestamp
billTime
,
String
remark
)
Person
handsPersonId
,
Double
changeAmount
,
Double
totalPrice
,
Account
accountId
,
String
billNo
,
Timestamp
billTime
,
String
remark
)
{
super
();
Type
=
type
;
OrganId
=
organId
;
HandsPersonId
=
handsPersonId
;
ChangeAmount
=
changeAmount
;
TotalPrice
=
totalPrice
;
AccountId
=
accountId
;
BillNo
=
billNo
;
BillTime
=
billTime
;
...
...
@@ -89,8 +91,16 @@ public class AccountHead implements java.io.Serializable
{
return
ChangeAmount
;
}
public
void
setTotalPrice
(
Double
totalPrice
)
{
TotalPrice
=
totalPrice
;
}
public
Double
getTotalPrice
()
{
return
TotalPrice
;
}
public
void
setAccountId
(
Account
accountId
)
public
void
setAccountId
(
Account
accountId
)
{
AccountId
=
accountId
;
}
...
...
src/com/jsh/model/vo/materials/AccountHeadModel.java
View file @
a1701cce
...
...
@@ -12,6 +12,7 @@ public class AccountHeadModel implements Serializable
private
Long
OrganId
;
private
Long
HandsPersonId
;
private
Double
ChangeAmount
;
private
Double
TotalPrice
;
private
Long
AccountId
;
private
String
BillNo
;
private
String
BillTime
;
...
...
@@ -94,7 +95,15 @@ public class AccountHeadModel implements Serializable
return
ChangeAmount
;
}
public
void
setAccountId
(
Long
accountId
)
public
void
setTotalPrice
(
Double
totalPrice
)
{
TotalPrice
=
totalPrice
;
}
public
Double
getTotalPrice
()
{
return
TotalPrice
;
}
public
void
setAccountId
(
Long
accountId
)
{
AccountId
=
accountId
;
}
...
...
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