This commit is contained in:
parent
12d4499755
commit
0ba72b09a7
|
@ -818,6 +818,7 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
|
||||||
if (headvo.getRate() == null) {
|
if (headvo.getRate() == null) {
|
||||||
headvo.setRate(UFDouble.ONE_DBL);
|
headvo.setRate(UFDouble.ONE_DBL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 结算方式名称
|
// 结算方式名称
|
||||||
Object balatypeName = "";
|
Object balatypeName = "";
|
||||||
// 金额
|
// 金额
|
||||||
|
@ -835,13 +836,18 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
|
||||||
List<Map<String, Object>> itemMaps = (List) billMap.get("items");
|
List<Map<String, Object>> itemMaps = (List) billMap.get("items");
|
||||||
List<GatheringBillItemVO> itemvos = new ArrayList<GatheringBillItemVO>();
|
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);
|
||||||
customer = itemvo.getCustomer();
|
// customer = itemvo.getCustomer();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
HYPubBO hybo = new HYPubBO();
|
HYPubBO hybo = new HYPubBO();
|
||||||
|
// SELECT pk_adminorg FROM org_adminorg WHERE code='C042'
|
||||||
|
|
||||||
|
String org =hybo.findColValue("org_adminorg", "pk_adminorg", " code = '" + headvo.getPk_org() + "' ") + "";
|
||||||
|
|
||||||
headvo.setIsinit(new UFBoolean(false));
|
headvo.setIsinit(new UFBoolean(false));
|
||||||
// 默认 收款类型 默认合同收款单
|
// 默认 收款类型 默认合同收款单
|
||||||
Object pk_billtypecode = hybo.findColValue("bd_billtype", "PK_BILLTYPECODE", "billtypename = '合同收款单' ");
|
Object pk_billtypecode = hybo.findColValue("bd_billtype", "PK_BILLTYPECODE", "billtypename = '合同收款单' ");
|
||||||
|
@ -851,7 +857,7 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
|
||||||
headvo.setPk_busitype(pk_busitype.toString());
|
headvo.setPk_busitype(pk_busitype.toString());
|
||||||
// 往来对象0-客户 2-部门 3-业务员 默认客户
|
// 往来对象0-客户 2-部门 3-业务员 默认客户
|
||||||
headvo.setObjtype(0);
|
headvo.setObjtype(0);
|
||||||
headvo.setCustomer(customer);
|
// headvo.setCustomer(customer);
|
||||||
|
|
||||||
// pk_currtype 币种编码 默认人民币
|
// pk_currtype 币种编码 默认人民币
|
||||||
if (headvo.getPk_currtype() == null || headvo.getPk_currtype().isEmpty()) {
|
if (headvo.getPk_currtype() == null || headvo.getPk_currtype().isEmpty()) {
|
||||||
|
@ -885,29 +891,34 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return ResultMessageUtil.exceptionToJSON(e);
|
return ResultMessageUtil.exceptionToJSON(e);
|
||||||
}
|
}
|
||||||
|
HYPubBO hybo1 = new HYPubBO();
|
||||||
|
String org =hybo1.findColValue("org_adminorg", "pk_adminorg", " code = '" + headvo.getPk_org() + "' ") + "";
|
||||||
//根据BIP传的值进行创建自定义档案 def2 合同销售订单号
|
//根据BIP传的值进行创建自定义档案 def2 合同销售订单号
|
||||||
//def6 合同编号
|
//def6 合同编号
|
||||||
//def3 标前项目号
|
//def3 标前项目号
|
||||||
if (itemMaps.size() > 0) {
|
if (itemMaps.size() > 0) {
|
||||||
NCLocator.getInstance().lookup(IDefdocService.class).insertDefdocs(headvo.getPk_org(), createDefVO(itemMaps.stream()
|
NCLocator.getInstance().lookup(IDefdocService.class).insertDefdocs(headvo.getPk_org(), createDefVO(itemMaps.stream()
|
||||||
.map(map -> (String) map.get("def6"))
|
.map(map -> (String) map.get("def6"))
|
||||||
.collect(Collectors.toList()), "zdy-001", headvo.getPk_org().toString()));
|
.collect(Collectors.toList()), "zdy-001", org));
|
||||||
}
|
}
|
||||||
if (itemMaps.size() > 0) {
|
if (itemMaps.size() > 0) {
|
||||||
NCLocator.getInstance().lookup(IDefdocService.class).insertDefdocs(headvo.getPk_org(), createDefVO(itemMaps.stream()
|
NCLocator.getInstance().lookup(IDefdocService.class).insertDefdocs(headvo.getPk_org(), createDefVO(itemMaps.stream()
|
||||||
.map(map -> (String) map.get("def2"))
|
.map(map -> (String) map.get("def2"))
|
||||||
.collect(Collectors.toList()), "BIP-ddh", headvo.getPk_org().toString()));
|
.collect(Collectors.toList()), "BIP-ddh", org));
|
||||||
}
|
}
|
||||||
if (itemMaps.size() > 0) {
|
if (itemMaps.size() > 0) {
|
||||||
NCLocator.getInstance().lookup(IDefdocService.class).insertDefdocs(headvo.getPk_org(), createDefVO(itemMaps.stream()
|
NCLocator.getInstance().lookup(IDefdocService.class).insertDefdocs(headvo.getPk_org(), createDefVO(itemMaps.stream()
|
||||||
.map(map -> (String) map.get("def3"))
|
.map(map -> (String) map.get("def3"))
|
||||||
.collect(Collectors.toList()), "zdy-023", headvo.getPk_org().toString()));
|
.collect(Collectors.toList()), "zdy-023", org));
|
||||||
|
|
||||||
createProjectHeadVO(itemMaps, headvo.getPk_org().toString());
|
createProjectHeadVO(itemMaps, headvo.getPk_org().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itemMaps != null && itemMaps.size() > 0) {
|
if (itemMaps != null && itemMaps.size() > 0) {
|
||||||
for (Map<String, Object> item : itemMaps) {
|
for (Map<String, Object> item : itemMaps) {
|
||||||
|
if(item.get("def7") != null){
|
||||||
|
item.put("def7", item.get("def7").toString());
|
||||||
|
}
|
||||||
GatheringBillItemVO itemvo = (GatheringBillItemVO) fromJsonToVO(item, GatheringBillItemVO.class);
|
GatheringBillItemVO itemvo = (GatheringBillItemVO) fromJsonToVO(item, GatheringBillItemVO.class);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue