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