给收付款增加对供应商和客户期初收款的接口

This commit is contained in:
季圣华
2023-03-20 01:47:36 +08:00
parent 71e3d1fe95
commit b8cfcdcac6
10 changed files with 181 additions and 12 deletions

View File

@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.vo.AccountItemVo4List;
import com.jsh.erp.service.accountItem.AccountItemService;
import com.jsh.erp.utils.BaseResponseInfo;
import com.jsh.erp.utils.StringUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
@@ -55,7 +56,11 @@ public class AccountItemController {
item.put("accountName", ai.getAccountName());
item.put("inOutItemId", ai.getInOutItemId());
item.put("inOutItemName", ai.getInOutItemName());
item.put("billNumber", ai.getBillNumber());
if(StringUtil.isNotEmpty(ai.getBillNumber())) {
item.put("billNumber", ai.getBillNumber());
} else {
item.put("billNumber", "QiChu");
}
item.put("needDebt", ai.getNeedDebt());
item.put("finishDebt", ai.getFinishDebt());
BigDecimal eachAmount = ai.getEachAmount();

View File

@@ -512,6 +512,8 @@ public class DepotHeadController {
@GetMapping(value = "/debtList")
@ApiOperation(value = "查询存在欠款的单据")
public String debtList(@RequestParam(value = Constants.SEARCH, required = false) String search,
@RequestParam("currentPage") Integer currentPage,
@RequestParam("pageSize") Integer pageSize,
HttpServletRequest request)throws Exception {
Map<String, Object> objectMap = new HashMap<>();
String organIdStr = StringUtil.getInfo(search, "organId");
@@ -524,12 +526,17 @@ public class DepotHeadController {
String subType = StringUtil.getInfo(search, "subType");
String roleType = StringUtil.getInfo(search, "roleType");
String status = StringUtil.getInfo(search, "status");
List<DepotHeadVo4List> list = depotHeadService.debtList(organId, materialParam, number, beginTime, endTime, type, subType, roleType, status);
List<DepotHeadVo4List> list = depotHeadService.debtList(organId, materialParam, number, beginTime, endTime, type,
subType, roleType, status, (currentPage-1)*pageSize, pageSize);
int total = depotHeadService.debtListCount(organId, materialParam, number, beginTime, endTime, type,
subType, roleType, status);
if (list != null) {
objectMap.put("rows", list);
objectMap.put("total", total);
return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
} else {
objectMap.put("rows", new ArrayList<>());
objectMap.put("total", 0);
return returnJson(objectMap, "查找不到数据", ErpInfo.OK.code);
}
}

View File

@@ -277,6 +277,30 @@ public class SupplierController {
return arr;
}
/**
* 根据客户或供应商查询期初、期初已收等信息
* @param organId
* @param request
* @return
* @throws Exception
*/
@GetMapping(value = "/getBeginNeedByOrganId")
@ApiOperation(value = "根据客户或供应商查询期初、期初已收等信息")
public BaseResponseInfo getBeginNeedByOrganId(@RequestParam("organId") Long organId,
HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
try {
Map<String, Object> map = supplierService.getBeginNeedByOrganId(organId);
res.code = 200;
res.data = map;
} catch (Exception e) {
e.printStackTrace();
res.code = 500;
res.data = "获取数据失败";
}
return res;
}
/**
* 导入供应商
* @param file