解决入库汇总、出库汇总分页的问题
This commit is contained in:
@@ -209,9 +209,7 @@ public class DepotHeadController {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
try {
|
||||
List<DepotHeadVo4InDetail> resList = new ArrayList<DepotHeadVo4InDetail>();
|
||||
Integer limitStart = (currentPage-1)*pageSize;
|
||||
Integer limitEnd = pageSize;
|
||||
List<DepotHeadVo4InDetail> list = depotHeadService.findByAll(beginTime, endTime, type, pid, dids, oId, limitStart, limitEnd);
|
||||
List<DepotHeadVo4InDetail> list = depotHeadService.findByAll(beginTime, endTime, type, pid, dids, oId, (currentPage-1)*pageSize, pageSize);
|
||||
int total = depotHeadService.findByAllCount(beginTime, endTime, type, pid, dids, oId);
|
||||
map.put("total", total);
|
||||
//存放数据json数组
|
||||
@@ -258,7 +256,7 @@ public class DepotHeadController {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
try {
|
||||
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);
|
||||
map.put("total", total);
|
||||
//存放数据json数组
|
||||
|
||||
@@ -205,8 +205,8 @@
|
||||
</select>
|
||||
|
||||
<select id="findInOutMaterialCountTotal" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId
|
||||
select count(1) from
|
||||
(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
|
||||
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}'
|
||||
@@ -219,6 +219,7 @@
|
||||
<if test="pid == null">
|
||||
and di.DepotId in (${dids})
|
||||
</if>
|
||||
GROUP BY di.MaterialId,m.mName,m.Model,m.categoryName) a
|
||||
</select>
|
||||
|
||||
<select id="findStatementAccount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultStatementAccount">
|
||||
|
||||
Reference in New Issue
Block a user