2312收款单销售订单根据表体def37来进行判断-张鑫0415
This commit is contained in:
parent
1e5670c100
commit
a78c7a2e19
|
@ -99,8 +99,16 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
|
||||||
// 税码
|
// 税码
|
||||||
String ctaxcode = "";
|
String ctaxcode = "";
|
||||||
BaseDAO dao = new BaseDAO();
|
BaseDAO dao = new BaseDAO();
|
||||||
// 销售订单号
|
// 销售订单号 从表体拿
|
||||||
String csaleorderid = "";
|
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 {
|
try {
|
||||||
HYPubBO hybo = new HYPubBO();
|
HYPubBO hybo = new HYPubBO();
|
||||||
headvo.setIsinit(new UFBoolean(false));
|
headvo.setIsinit(new UFBoolean(false));
|
||||||
|
@ -113,10 +121,10 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
|
||||||
// 往来对象0-客户 2-部门 3-业务员 默认客户
|
// 往来对象0-客户 2-部门 3-业务员 默认客户
|
||||||
headvo.setObjtype(0);
|
headvo.setObjtype(0);
|
||||||
// 销售订单号
|
// 销售订单号
|
||||||
csaleorderid = headvo.getDef3();
|
|
||||||
if (StringUtils.isEmpty(csaleorderid)) {
|
if (StringUtils.isEmpty(csaleorderid)) {
|
||||||
throw new BusinessException("销售订单不能为空");
|
throw new BusinessException("销售订单不能为空");
|
||||||
// return ResultMessageUtil.exceptionToJSON("销售订单不能为空", APIErrCodeEnum.BUSINESSEXCCODE.getCode());
|
// return ResultMessageUtil.exceptionToJSON("销售订单不能为空",
|
||||||
|
// APIErrCodeEnum.BUSINESSEXCCODE.getCode());
|
||||||
}
|
}
|
||||||
// 客户
|
// 客户
|
||||||
Object customerid = hybo.findColValue("so_saleorder", "ccustomerid",
|
Object customerid = hybo.findColValue("so_saleorder", "ccustomerid",
|
||||||
|
@ -181,8 +189,6 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
|
||||||
return ResultMessageUtil.exceptionToJSON(e);
|
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) {
|
if (itemMaps != null && itemMaps.size() > 0) {
|
||||||
for (Map<String, Object> item : itemMaps) {
|
for (Map<String, Object> item : itemMaps) {
|
||||||
GatheringBillItemVO itemvo = (GatheringBillItemVO) fromJsonToVO(item, GatheringBillItemVO.class);
|
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);
|
UFDouble notax_cr = money_cr.sub(local_tax_cr);
|
||||||
itemvo.setNotax_cr(notax_cr);
|
itemvo.setNotax_cr(notax_cr);
|
||||||
//zhangxinah增加组织本币无税金额(贷方)
|
// zhangxinah增加组织本币无税金额(贷方)
|
||||||
itemvo.setLocal_notax_cr(notax_cr);
|
itemvo.setLocal_notax_cr(notax_cr);
|
||||||
//
|
//
|
||||||
itemvo.setRate(UFDouble.ZERO_DBL);
|
itemvo.setRate(UFDouble.ZERO_DBL);
|
||||||
|
|
Loading…
Reference in New Issue