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
cbcf3b73
Commit
cbcf3b73
authored
Jan 22, 2019
by
季圣华
Browse files
解决入库汇总、出库汇总分页的问题
parent
00587c9a
Changes
4
Hide whitespace changes
Inline
Side-by-side
erp_web/pages/reports/in_material_count.html
View file @
cbcf3b73
...
@@ -281,7 +281,7 @@
...
@@ -281,7 +281,7 @@
}),
}),
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
&&
res
.
data
)
{
if
(
res
&&
res
.
code
===
200
&&
res
.
data
)
{
$
(
"
#tableData
"
).
datagrid
(
'
loadData
'
,
res
.
data
.
rows
);
$
(
"
#tableData
"
).
datagrid
(
'
loadData
'
,
res
.
data
);
}
}
},
},
//此处添加错误处理
//此处添加错误处理
...
...
erp_web/pages/reports/out_material_count.html
View file @
cbcf3b73
...
@@ -281,7 +281,7 @@
...
@@ -281,7 +281,7 @@
}),
}),
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
&&
res
.
data
)
{
if
(
res
&&
res
.
code
===
200
&&
res
.
data
)
{
$
(
"
#tableData
"
).
datagrid
(
'
loadData
'
,
res
.
data
.
rows
);
$
(
"
#tableData
"
).
datagrid
(
'
loadData
'
,
res
.
data
);
}
}
},
},
//此处添加错误处理
//此处添加错误处理
...
...
src/main/java/com/jsh/erp/controller/DepotHeadController.java
View file @
cbcf3b73
...
@@ -209,9 +209,7 @@ public class DepotHeadController {
...
@@ -209,9 +209,7 @@ public class DepotHeadController {
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
try
{
List
<
DepotHeadVo4InDetail
>
resList
=
new
ArrayList
<
DepotHeadVo4InDetail
>();
List
<
DepotHeadVo4InDetail
>
resList
=
new
ArrayList
<
DepotHeadVo4InDetail
>();
Integer
limitStart
=
(
currentPage
-
1
)*
pageSize
;
List
<
DepotHeadVo4InDetail
>
list
=
depotHeadService
.
findByAll
(
beginTime
,
endTime
,
type
,
pid
,
dids
,
oId
,
(
currentPage
-
1
)*
pageSize
,
pageSize
);
Integer
limitEnd
=
pageSize
;
List
<
DepotHeadVo4InDetail
>
list
=
depotHeadService
.
findByAll
(
beginTime
,
endTime
,
type
,
pid
,
dids
,
oId
,
limitStart
,
limitEnd
);
int
total
=
depotHeadService
.
findByAllCount
(
beginTime
,
endTime
,
type
,
pid
,
dids
,
oId
);
int
total
=
depotHeadService
.
findByAllCount
(
beginTime
,
endTime
,
type
,
pid
,
dids
,
oId
);
map
.
put
(
"total"
,
total
);
map
.
put
(
"total"
,
total
);
//存放数据json数组
//存放数据json数组
...
@@ -258,7 +256,7 @@ public class DepotHeadController {
...
@@ -258,7 +256,7 @@ public class DepotHeadController {
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
try
{
List
<
DepotHeadVo4InOutMCount
>
resList
=
new
ArrayList
<
DepotHeadVo4InOutMCount
>();
List
<
DepotHeadVo4InOutMCount
>
resList
=
new
ArrayList
<
DepotHeadVo4InOutMCount
>();
List
<
DepotHeadVo4InOutMCount
>
list
=
depotHeadService
.
findInOutMaterialCount
(
beginTime
,
endTime
,
type
,
pid
,
dids
,
oId
,
currentPage
,
pageSize
);
List
<
DepotHeadVo4InOutMCount
>
list
=
depotHeadService
.
findInOutMaterialCount
(
beginTime
,
endTime
,
type
,
pid
,
dids
,
oId
,
(
currentPage
-
1
)*
pageSize
,
pageSize
);
int
total
=
depotHeadService
.
findInOutMaterialCountTotal
(
beginTime
,
endTime
,
type
,
pid
,
dids
,
oId
);
int
total
=
depotHeadService
.
findInOutMaterialCountTotal
(
beginTime
,
endTime
,
type
,
pid
,
dids
,
oId
);
map
.
put
(
"total"
,
total
);
map
.
put
(
"total"
,
total
);
//存放数据json数组
//存放数据json数组
...
...
src/main/resources/mapper_xml/DepotHeadMapperEx.xml
View file @
cbcf3b73
...
@@ -205,8 +205,8 @@
...
@@ -205,8 +205,8 @@
</select>
</select>
<select
id=
"findInOutMaterialCountTotal"
resultType=
"java.lang.Integer"
>
<select
id=
"findInOutMaterialCountTotal"
resultType=
"java.lang.Integer"
>
select count(1)
select count(1)
from
from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId
(select di.MaterialId, m.mName,m.Model,m.categoryName
from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId
INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_materialcategory.`Name` categoryName
INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_materialcategory.`Name` categoryName
from jsh_material INNER JOIN jsh_materialcategory on jsh_material.CategoryId=jsh_materialcategory.Id) m
from jsh_material INNER JOIN jsh_materialcategory on jsh_material.CategoryId=jsh_materialcategory.Id) m
on m.Id=di.MaterialId where dh.type='${type}' and dh.OperTime >='${beginTime}' and dh.OperTime
<
='${endTime}'
on m.Id=di.MaterialId where dh.type='${type}' and dh.OperTime >='${beginTime}' and dh.OperTime
<
='${endTime}'
...
@@ -219,6 +219,7 @@
...
@@ -219,6 +219,7 @@
<if
test=
"pid == null"
>
<if
test=
"pid == null"
>
and di.DepotId in (${dids})
and di.DepotId in (${dids})
</if>
</if>
GROUP BY di.MaterialId,m.mName,m.Model,m.categoryName) a
</select>
</select>
<select
id=
"findStatementAccount"
parameterType=
"com.jsh.erp.datasource.entities.DepotItemExample"
resultMap=
"ResultStatementAccount"
>
<select
id=
"findStatementAccount"
parameterType=
"com.jsh.erp.datasource.entities.DepotItemExample"
resultMap=
"ResultStatementAccount"
>
...
...
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