2312收款单销售订单根据表体def37来进行判断-张鑫0415

This commit is contained in:
zhangxinah@yonyou.com 2025-04-15 19:10:54 +08:00
parent 1e5670c100
commit a78c7a2e19
1 changed files with 12 additions and 6 deletions

View File

@ -99,8 +99,16 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
// 税码
String ctaxcode = "";
BaseDAO dao = new BaseDAO();
// 销售订单号
// 销售订单号 从表体拿
String csaleorderid = "";
List<Map<String, Object>> itemMaps = (List) billMap.get("items");
List<GatheringBillItemVO> itemvos = new ArrayList<GatheringBillItemVO>();
if (itemMaps != null && itemMaps.size() > 0) {
for (Map<String, Object> item : itemMaps) {
GatheringBillItemVO itemvo = (GatheringBillItemVO) fromJsonToVO(item, GatheringBillItemVO.class);
csaleorderid = itemvo.getDef37();
}
}
try {
HYPubBO hybo = new HYPubBO();
headvo.setIsinit(new UFBoolean(false));
@ -113,10 +121,10 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
// 往来对象0-客户 2-部门 3-业务员 默认客户
headvo.setObjtype(0);
// 销售订单号
csaleorderid = headvo.getDef3();
if (StringUtils.isEmpty(csaleorderid)) {
throw new BusinessException("销售订单不能为空");
// return ResultMessageUtil.exceptionToJSON("销售订单不能为空", APIErrCodeEnum.BUSINESSEXCCODE.getCode());
// return ResultMessageUtil.exceptionToJSON("销售订单不能为空",
// APIErrCodeEnum.BUSINESSEXCCODE.getCode());
}
// 客户
Object customerid = hybo.findColValue("so_saleorder", "ccustomerid",
@ -181,8 +189,6 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
return ResultMessageUtil.exceptionToJSON(e);
}
List<Map<String, Object>> itemMaps = (List) billMap.get("items");
List<GatheringBillItemVO> itemvos = new ArrayList<GatheringBillItemVO>();
if (itemMaps != null && itemMaps.size() > 0) {
for (Map<String, Object> item : itemMaps) {
GatheringBillItemVO itemvo = (GatheringBillItemVO) fromJsonToVO(item, GatheringBillItemVO.class);
@ -229,7 +235,7 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
//
UFDouble notax_cr = money_cr.sub(local_tax_cr);
itemvo.setNotax_cr(notax_cr);
//zhangxinah增加组织本币无税金额(贷方)
// zhangxinah增加组织本币无税金额(贷方)
itemvo.setLocal_notax_cr(notax_cr);
//
itemvo.setRate(UFDouble.ZERO_DBL);