增加明细和汇总的接口
This commit is contained in:
@@ -135,11 +135,13 @@ public class DepotHeadController {
|
||||
map.put("total", total);
|
||||
//存放数据json数组
|
||||
if (null != list) {
|
||||
for (DepotHeadVo4InDetail dhd : list) {
|
||||
resList.add(dhd);
|
||||
}
|
||||
resList.addAll(list);
|
||||
}
|
||||
map.put("rows", resList);
|
||||
DepotHeadVo4InDetail statistic = depotHeadService.findInOutDetailStatistic(beginTime, endTime, type, creatorArray, organArray, forceFlag, inOutManageFlag,
|
||||
StringUtil.toNull(materialParam), depotList, oId, StringUtil.toNull(number), creator, remark);
|
||||
map.put("operNumberTotal", statistic.getOperNumber());
|
||||
map.put("allPriceTotal", statistic.getAllPrice());
|
||||
res.code = 200;
|
||||
res.data = map;
|
||||
} catch(Exception e){
|
||||
@@ -151,7 +153,7 @@ public class DepotHeadController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 入库出库统计接口
|
||||
* 入库出库汇总接口
|
||||
* @param currentPage
|
||||
* @param pageSize
|
||||
* @param oId
|
||||
@@ -164,7 +166,7 @@ public class DepotHeadController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/findInOutMaterialCount")
|
||||
@ApiOperation(value = "入库出库统计接口")
|
||||
@ApiOperation(value = "入库出库汇总接口")
|
||||
public BaseResponseInfo findInOutMaterialCount(@RequestParam("currentPage") Integer currentPage,
|
||||
@RequestParam("pageSize") Integer pageSize,
|
||||
@RequestParam(value = "organId", required = false) Integer oId,
|
||||
@@ -202,6 +204,10 @@ public class DepotHeadController {
|
||||
StringUtil.toNull(materialParam), depotList, organizationId, oId);
|
||||
map.put("total", total);
|
||||
map.put("rows", list);
|
||||
DepotHeadVo4InOutMCount statistic = depotHeadService.findInOutMaterialCountStatistic(beginTime, endTime, type, forceFlag, inOutManageFlag,
|
||||
StringUtil.toNull(materialParam), depotList, organizationId, oId);
|
||||
map.put("numSumTotal", statistic.getNumSum());
|
||||
map.put("priceSumTotal", statistic.getPriceSum());
|
||||
res.code = 200;
|
||||
res.data = map;
|
||||
} catch(Exception e){
|
||||
@@ -281,6 +287,10 @@ public class DepotHeadController {
|
||||
creatorArray, forceFlag, StringUtil.toNull(materialParam), depotList, depotFList, remark);
|
||||
map.put("rows", list);
|
||||
map.put("total", total);
|
||||
DepotHeadVo4InDetail statistic = depotHeadService.findAllocationStatistic(beginTime, endTime, subType, StringUtil.toNull(number),
|
||||
creatorArray, forceFlag, StringUtil.toNull(materialParam), depotList, depotFList, remark);
|
||||
map.put("operNumberTotal", statistic.getOperNumber());
|
||||
map.put("allPriceTotal", statistic.getAllPrice());
|
||||
res.code = 200;
|
||||
res.data = map;
|
||||
} catch(Exception e){
|
||||
|
||||
@@ -97,6 +97,21 @@ public interface DepotHeadMapperEx {
|
||||
@Param("creator") Long creator,
|
||||
@Param("remark") String remark);
|
||||
|
||||
List<DepotHeadVo4InDetail> findInOutDetailStatistic(
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("type") String type,
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("organArray") String[] organArray,
|
||||
@Param("forceFlag") Boolean forceFlag,
|
||||
@Param("inOutManageFlag") Boolean inOutManageFlag,
|
||||
@Param("materialParam") String materialParam,
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("oId") Integer oId,
|
||||
@Param("number") String number,
|
||||
@Param("creator") Long creator,
|
||||
@Param("remark") String remark);
|
||||
|
||||
List<DepotHeadVo4InOutMCount> findInOutMaterialCount(
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@@ -125,6 +140,18 @@ public interface DepotHeadMapperEx {
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("organArray") String[] organArray);
|
||||
|
||||
List<DepotHeadVo4InOutMCount> findInOutMaterialCountStatistic(
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("type") String type,
|
||||
@Param("forceFlag") Boolean forceFlag,
|
||||
@Param("inOutManageFlag") Boolean inOutManageFlag,
|
||||
@Param("materialParam") String materialParam,
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("oId") Integer oId,
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("organArray") String[] organArray);
|
||||
|
||||
List<DepotHeadVo4InDetail> findAllocationDetail(
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@@ -153,6 +180,18 @@ public interface DepotHeadMapperEx {
|
||||
@Param("depotFList") List<Long> depotFList,
|
||||
@Param("remark") String remark);
|
||||
|
||||
List<DepotHeadVo4InDetail> findAllocationStatistic(
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("subType") String subType,
|
||||
@Param("number") String number,
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("forceFlag") Boolean forceFlag,
|
||||
@Param("materialParam") String materialParam,
|
||||
@Param("depotList") List<Long> depotList,
|
||||
@Param("depotFList") List<Long> depotFList,
|
||||
@Param("remark") String remark);
|
||||
|
||||
List<DepotHeadVo4StatementAccount> getStatementAccount(
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
|
||||
@@ -701,6 +701,24 @@ public class DepotHeadService {
|
||||
return result;
|
||||
}
|
||||
|
||||
public DepotHeadVo4InDetail findInOutDetailStatistic(String beginTime, String endTime, String type, String [] creatorArray,
|
||||
String [] organArray, Boolean forceFlag, Boolean inOutManageFlag,
|
||||
String materialParam, List<Long> depotList, Integer oId, String number,
|
||||
Long creator, String remark) throws Exception{
|
||||
DepotHeadVo4InDetail item = new DepotHeadVo4InDetail();
|
||||
try{
|
||||
List<DepotHeadVo4InDetail> list =depotHeadMapperEx.findInOutDetailStatistic(beginTime, endTime, type, creatorArray, organArray, forceFlag, inOutManageFlag,
|
||||
materialParam, depotList, oId, number, creator, remark);
|
||||
if(list.size()>0) {
|
||||
item.setOperNumber(list.get(0).getOperNumber());
|
||||
item.setAllPrice(list.get(0).getAllPrice());
|
||||
}
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
return item;
|
||||
}
|
||||
|
||||
public List<DepotHeadVo4InOutMCount> findInOutMaterialCount(String beginTime, String endTime, String type,
|
||||
Boolean forceFlag, Boolean inOutManageFlag, String materialParam,
|
||||
List<Long> depotList, Long organizationId, Integer oId, String column, String order,
|
||||
@@ -740,6 +758,29 @@ public class DepotHeadService {
|
||||
return result;
|
||||
}
|
||||
|
||||
public DepotHeadVo4InOutMCount findInOutMaterialCountStatistic(String beginTime, String endTime, String type,
|
||||
Boolean forceFlag, Boolean inOutManageFlag, String materialParam,
|
||||
List<Long> depotList, Long organizationId, Integer oId) throws Exception {
|
||||
DepotHeadVo4InOutMCount item = new DepotHeadVo4InOutMCount();
|
||||
try{
|
||||
String [] creatorArray = getCreatorArray();
|
||||
if(creatorArray == null && organizationId != null) {
|
||||
creatorArray = getCreatorArrayByOrg(organizationId);
|
||||
}
|
||||
String subType = "出库".equals(type)? "销售" : "";
|
||||
String [] organArray = getOrganArray(subType, "");
|
||||
List<DepotHeadVo4InOutMCount> list = depotHeadMapperEx.findInOutMaterialCountStatistic(beginTime, endTime, type,
|
||||
forceFlag, inOutManageFlag, materialParam, depotList, oId, creatorArray, organArray);
|
||||
if(list.size()>0) {
|
||||
item.setNumSum(list.get(0).getNumSum());
|
||||
item.setPriceSum(list.get(0).getPriceSum());
|
||||
}
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
return item;
|
||||
}
|
||||
|
||||
public List<DepotHeadVo4InDetail> findAllocationDetail(String beginTime, String endTime, String subType, String number,
|
||||
String [] creatorArray, Boolean forceFlag, String materialParam, List<Long> depotList, List<Long> depotFList,
|
||||
String remark, String column, String order, Integer offset, Integer rows) throws Exception{
|
||||
@@ -766,6 +807,23 @@ public class DepotHeadService {
|
||||
return result;
|
||||
}
|
||||
|
||||
public DepotHeadVo4InDetail findAllocationStatistic(String beginTime, String endTime, String subType, String number,
|
||||
String [] creatorArray, Boolean forceFlag, String materialParam, List<Long> depotList, List<Long> depotFList,
|
||||
String remark) throws Exception{
|
||||
DepotHeadVo4InDetail item = new DepotHeadVo4InDetail();
|
||||
try{
|
||||
List<DepotHeadVo4InDetail> list =depotHeadMapperEx.findAllocationStatistic(beginTime, endTime, subType, number, creatorArray, forceFlag,
|
||||
materialParam, depotList, depotFList, remark);
|
||||
if(list.size()>0) {
|
||||
item.setOperNumber(list.get(0).getOperNumber());
|
||||
item.setAllPrice(list.get(0).getAllPrice());
|
||||
}
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
return item;
|
||||
}
|
||||
|
||||
public List<DepotHeadVo4StatementAccount> getStatementAccount(String beginTime, String endTime, Integer organId, String [] organArray,
|
||||
String supplierType, String type, String subType, String typeBack, String subTypeBack, String billType, Integer offset, Integer rows) {
|
||||
List<DepotHeadVo4StatementAccount> list = null;
|
||||
|
||||
Reference in New Issue
Block a user