增加接口:获取待收款或付款的条数
This commit is contained in:
@@ -495,6 +495,29 @@ public class DepotHeadController extends BaseController {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取待收款或付款的条数
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getNeedCount")
|
||||||
|
@ApiOperation(value = "获取待收款或付款的条数")
|
||||||
|
public BaseResponseInfo getNeedCount(@RequestParam("supplierType") String supplierType, HttpServletRequest request)throws Exception {
|
||||||
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
try {
|
||||||
|
int needCount = depotHeadService.getNeedCount(supplierType);
|
||||||
|
map.put("needCount", needCount);
|
||||||
|
res.code = 200;
|
||||||
|
res.data = map;
|
||||||
|
} catch(Exception e){
|
||||||
|
logger.error(e.getMessage(), e);
|
||||||
|
res.code = 500;
|
||||||
|
res.data = "获取数据失败";
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据编号查询单据信息
|
* 根据编号查询单据信息
|
||||||
* @param number
|
* @param number
|
||||||
|
|||||||
@@ -928,6 +928,32 @@ public class DepotHeadService {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getNeedCount(String supplierType) throws Exception {
|
||||||
|
String type = "";
|
||||||
|
String subType = "";
|
||||||
|
String typeBack = "";
|
||||||
|
String subTypeBack = "";
|
||||||
|
String billType = "";
|
||||||
|
if (("vendor").equals(supplierType)) {
|
||||||
|
type = "入库";
|
||||||
|
subType = "采购";
|
||||||
|
typeBack = "出库";
|
||||||
|
subTypeBack = "采购退货";
|
||||||
|
billType = "付款";
|
||||||
|
} else if (("customer").equals(supplierType)) {
|
||||||
|
type = "出库";
|
||||||
|
subType = "销售";
|
||||||
|
typeBack = "入库";
|
||||||
|
subTypeBack = "销售退货";
|
||||||
|
billType = "收款";
|
||||||
|
}
|
||||||
|
String beginTime = Tools.parseDayToTime(Tools.getYearBegin(), BusinessConstants.DAY_FIRST_TIME);
|
||||||
|
String endTime = Tools.getCenternTime(new Date());
|
||||||
|
String [] organArray = getOrganArray(subType, "");
|
||||||
|
return getStatementAccountCount(beginTime, endTime, null, organArray,
|
||||||
|
1, supplierType, type, subType,typeBack, subTypeBack, billType);
|
||||||
|
}
|
||||||
|
|
||||||
public List<DepotHeadVo4List> getDetailByNumber(String number, HttpServletRequest request)throws Exception {
|
public List<DepotHeadVo4List> getDetailByNumber(String number, HttpServletRequest request)throws Exception {
|
||||||
List<DepotHeadVo4List> resList = new ArrayList<>();
|
List<DepotHeadVo4List> resList = new ArrayList<>();
|
||||||
try{
|
try{
|
||||||
|
|||||||
Reference in New Issue
Block a user