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
25cea4ea
Commit
25cea4ea
authored
Dec 07, 2017
by
季圣华
Browse files
解决库存状况的导出报表的bug
parent
95e036b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/jsh/action/materials/DepotItemAction.java
View file @
25cea4ea
...
@@ -751,6 +751,10 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
...
@@ -751,6 +751,10 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
Double
prevPrice
=
sumPrice
(
"入库"
,
pid
,
depotItem
.
getMaterialId
().
getId
(),
model
.
getMonthTime
(),
true
)
-
sumPrice
(
"出库"
,
pid
,
depotItem
.
getMaterialId
().
getId
(),
model
.
getMonthTime
(),
true
);
Double
prevPrice
=
sumPrice
(
"入库"
,
pid
,
depotItem
.
getMaterialId
().
getId
(),
model
.
getMonthTime
(),
true
)
-
sumPrice
(
"出库"
,
pid
,
depotItem
.
getMaterialId
().
getId
(),
model
.
getMonthTime
(),
true
);
Double
InPrice
=
sumPrice
(
"入库"
,
pid
,
depotItem
.
getMaterialId
().
getId
(),
model
.
getMonthTime
(),
false
);
Double
InPrice
=
sumPrice
(
"入库"
,
pid
,
depotItem
.
getMaterialId
().
getId
(),
model
.
getMonthTime
(),
false
);
Double
OutPrice
=
sumPrice
(
"出库"
,
pid
,
depotItem
.
getMaterialId
().
getId
(),
model
.
getMonthTime
(),
false
);
Double
OutPrice
=
sumPrice
(
"出库"
,
pid
,
depotItem
.
getMaterialId
().
getId
(),
model
.
getMonthTime
(),
false
);
Double
unitPrice
=
0.0
;
if
(
prevSum
+
InSum
-
OutSum
!=
0
)
{
unitPrice
=
(
prevPrice
+
InPrice
-
OutPrice
)/(
prevSum
+
InSum
-
OutSum
);
}
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
().
getName
());
item
.
put
(
"MaterialName"
,
depotItem
.
getMaterialId
().
getName
());
...
@@ -758,7 +762,7 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
...
@@ -758,7 +762,7 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
item
.
put
(
"MaterialStandard"
,
depotItem
.
getMaterialId
().
getStandard
());
item
.
put
(
"MaterialStandard"
,
depotItem
.
getMaterialId
().
getStandard
());
item
.
put
(
"MaterialColor"
,
depotItem
.
getMaterialId
().
getColor
());
item
.
put
(
"MaterialColor"
,
depotItem
.
getMaterialId
().
getColor
());
item
.
put
(
"MaterialUnit"
,
depotItem
.
getMaterialId
().
getUnit
());
item
.
put
(
"MaterialUnit"
,
depotItem
.
getMaterialId
().
getUnit
());
item
.
put
(
"UnitPrice"
,
(
prevPrice
+
InPrice
-
OutPrice
)/(
prevSum
+
InSum
-
OutSum
)
);
item
.
put
(
"UnitPrice"
,
unitPrice
);
item
.
put
(
"prevSum"
,
prevSum
);
item
.
put
(
"prevSum"
,
prevSum
);
item
.
put
(
"InSum"
,
InSum
);
item
.
put
(
"InSum"
,
InSum
);
item
.
put
(
"OutSum"
,
OutSum
);
item
.
put
(
"OutSum"
,
OutSum
);
...
...
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