| 
					
				 | 
			
			
				@@ -28,8 +28,10 @@ import javax.swing.table.TableCellRenderer; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.bs.framework.common.InvocationInfoProxy;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.bs.framework.common.NCLocator;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import nc.bs.hr.plugin.GetDataUtil;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.desktop.ui.WorkbenchEnvironment;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.hr.utils.OutputDialogUtil;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import nc.itf.hr.IReceivableService;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.itf.hr.SocialInsuranceAllMaintain;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.itf.uap.IUAPQueryBS;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.jdbc.framework.SQLParameter;
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -38,6 +40,7 @@ import nc.jdbc.framework.processor.ColumnListProcessor; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.jdbc.framework.processor.ColumnProcessor;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.jdbc.framework.processor.MapListProcessor;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.jdbc.framework.processor.MapProcessor;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import nc.log.NcLog;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.ui.pub.ButtonObject;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.ui.pub.ToftPanel;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.ui.pub.beans.MessageDialog;
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -48,6 +51,9 @@ import nc.ui.pub.beans.UITablePane; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.ui.pub.beans.ValueChangedEvent;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.ui.pub.beans.ValueChangedListener;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.ui.pub.link.BillLinkOneNodeCenter;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import nc.vo.arap.receivable.AggReceivableBillVO;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import nc.vo.arap.receivable.ReceivableBillItemVO;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import nc.vo.arap.receivable.ReceivableBillVO;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.vo.fipub.exception.ExceptionHandler;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.vo.fipub.freevalue.Module;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.vo.gl.pubvoucher.DetailVO;
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -59,6 +65,7 @@ import nc.vo.pub.BusinessException; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.vo.pub.SuperVO;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.vo.pub.lang.UFBoolean;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.vo.pub.lang.UFDate;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import nc.vo.pub.lang.UFDateTime;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.vo.pub.lang.UFDouble;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.vo.pubapp.pattern.data.ValueUtils;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import nc.vo.pubapp.pattern.exception.ExceptionUtils;
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -79,6 +86,7 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private ButtonObject bt_output = new ButtonObject("导出", "", 2, "bt_output");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private ButtonObject bt_voucher = new ButtonObject("生成凭证", "", 2, "bt_voucher");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private ButtonObject bt_linkvouchar = new ButtonObject("联查凭证", "", 2, "bt_linkvouchar");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	private ButtonObject bt_arrecbill = new ButtonObject("生成内部应收单", "", 2, "bt_arrecbill");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private JProgressBar pb;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private UITablePane tablepanel = null;
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -95,8 +103,8 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private String[] subheading = { "序号", "员工编号", "姓名", "缴费基数", "个人部分", "公司部分", "备注" };
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private String orgCode;// 查询组织
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private String period;// 查询期间
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	private Map<String, Map<String, UFDouble>> beforePsgMoney = null; // 处理前金额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	private Map<String, Map<String, UFDouble>> afterPsgMoney = null; // 处理后金额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	private Map<String, Map<String, UFDouble>> beforePsgMoney = null;// 处理前金额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	private Map<String, Map<String, UFDouble>> afterPsgMoney = null;// 处理后金额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	Map<String, Map<String, String>> middleTableData = null;// 中间表数据
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private SocialInsuranceAllMaintain siaMaintain = NCLocator.getInstance().lookup(SocialInsuranceAllMaintain.class);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private Map<String, UFDouble> tableFourSelfMap = null;// 表四(凭证)
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -115,11 +123,23 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	public void initialize() {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		setLayout(new BorderLayout());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		add(getUIPanel0(), BorderLayout.NORTH);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		add(getUIPanel2(), BorderLayout.CENTER);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		add(getUIPanel4(), BorderLayout.SOUTH);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		setButtons(new ButtonObject[] { this.bt_query, this.bt_insert, this.bt_update, this.bt_output, this.bt_voucher, this.bt_linkvouchar });// 添加按钮
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		try {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			setLayout(new BorderLayout());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			add(getUIPanel0(), BorderLayout.NORTH);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			add(getUIPanel2(), BorderLayout.CENTER);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			add(getUIPanel4(), BorderLayout.SOUTH);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			String cuserid = InvocationInfoProxy.getInstance().getUserId();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			String roleCode = GetDataUtil.powerRole(cuserid);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			if("GJJ_HR001".equals(roleCode)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				setButtons(new ButtonObject[] { this.bt_query, this.bt_insert, this.bt_update, this.bt_output });// 添加按钮
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			}else if("GJJ_CW001".equals(roleCode)){
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				setButtons(new ButtonObject[] { this.bt_query, this.bt_output, this.bt_voucher, this.bt_linkvouchar, this.bt_arrecbill });// 添加按钮
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			}else {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				setButtons(new ButtonObject[] { this.bt_query, this.bt_insert, this.bt_update, this.bt_output, this.bt_voucher, this.bt_linkvouchar, this.bt_arrecbill });// 添加按钮
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		} catch (Exception e) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			MessageDialog.showHintDlg(this, "提示", e.getMessage());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private UILabel getOrgLabel() {
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -293,20 +313,15 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				onoutput();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} else if ("bt_linkvouchar".equals(bt.getCode())) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				String pkvouchersql = "select voucher_pk from voucher_flag where tablename='公积金分摊表' and orgcode='" + orgCode + "' and period='" + period + "' and nvl(dr,0)=0 ";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				Object voucher_pk = iuap.executeQuery(pkvouchersql, new ColumnProcessor());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				if (null != voucher_pk) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					String sqlvoucher = "select num from gl_voucher where pk_voucher='" + voucher_pk + "' ";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					Object vouchernum = iuap.executeQuery(sqlvoucher, new ColumnProcessor());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					if (null != vouchernum) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						VoucherVO[] aggvos = GLPubProxy.getRemoteVoucher().queryByPks(new String[] { voucher_pk.toString() });
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						BillLinkOneNodeCenter.linkQuery_Dialog(this, "C0", new String[] { voucher_pk.toString() }, aggvos, true);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} else if ("bt_voucher".equals(bt.getCode())) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				String pkvouchersql = "select voucher_pk from voucher_flag where tablename='公积金分摊表' and orgcode='" + orgCode + "' and period='" + period + "' and nvl(dr,0)=0 ";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				Object voucher_pk = iuap.executeQuery(pkvouchersql, new ColumnProcessor());
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -325,7 +340,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				// 组装生成凭证数据
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				Map<String, UFDouble> voucheramount = getVoucherAmount(getTablePanel());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				VoucherVO voucher = getVoucherVO(voucheramount);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				for (DetailVO detail : voucher.getDetails()) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					if (detail.getAss() != null && detail.getAss().length > 0) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						String assIDs = GLPubProxy.getRemoteFreevaluePub().getAssID_RequiresNew(detail.getAss(), false, "", InvocationInfoProxy.getInstance().getGroupId(), Module.GL);
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -333,7 +347,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				OperationResultVO[] rs = GLPubProxy.getRemoteVoucher().save((VoucherVO) voucher, new Boolean(true));
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				// 保存已经生成凭证的标识pk
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				String pk = rs[0].m_strPK;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				StringBuilder insertSQL = new StringBuilder("insert into voucher_flag (TABLENAME, ORGCODE, PERIOD,  VOUCHER_PK) values (");
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -342,11 +355,22 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				insertSQL.append("'").append(period).append("', ");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				insertSQL.append("'").append(pk).append("'); ");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				siaMaintain.executeBaseDAO(insertSQL.toString());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				MessageDialog.showHintDlg(this, "提示", "凭证已生成");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			} else if ("bt_arrecbill".equals(bt.getCode())) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				// 验证内部应收是否存在
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				String pk_recbillsql = "select pk_recbill from ar_recbill where def11='公积金分摊表_" + orgCode + "_" + period + "' and nvl(dr,0)=0 ";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				Object pk_recbill = iuap.executeQuery(pk_recbillsql, new ColumnProcessor());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				if (null != pk_recbill) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					ExceptionUtils.wrappBusinessException("内部应收单【" + period + "】已经生成!不能重复生成!");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				MessageDialog.showHintDlg(this, "", "生成内部应收单开始");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				// 组装应收单数据新增应收单
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				String billNO = addReceivableBill(getTablePanel());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				MessageDialog.showHintDlg(this, "提示", "内部应收单已生成 " + billNO);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		} catch (Exception e) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			e.printStackTrace();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			NcLog.info(e.getMessage());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			MessageDialog.showHintDlg(this, "提示", e.getMessage());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -409,7 +433,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		UFDouble tableSixOrg = tableMap.get("tableSix").get("org");// 实际已缴当月工资个人部分未扣公司部分
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		UFDouble tableSevenStaff = tableMap.get("tableSeven").get("staff");// 实际未缴当月工资个人部分已扣个人部分
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		UFDouble tableSevenOrg = tableMap.get("tableSeven").get("org");// 实际未缴当月工资个人部分已扣公司部分
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		UFDouble queryTableNine = nvl(queryTableNine(orgCode, period), 2);// 个人工资表扣缴数
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		Map<String, String> TableTenMap = queryTableTen(orgCode, period);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		UFDouble TableTenStaff = nvl(TableTenMap.get("so_staff_sum"), 2);// 个人实际缴纳数
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -452,8 +475,7 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		};
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		tablepanel.getTable().setModel(model);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		tablepanel.getTable().setColumnWidth(new int[] { 300, 150, 150, 280, 150, 150, 190, 190, 160 });
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		tablepanel.getTable().setColumnWidth(new int[] { 300, 150, 150, 300, 150, 150, 200, 190, 160 });
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		TableCellRenderer renderer = new DefaultTableCellRenderer() {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			@Override
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -470,7 +492,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				} else {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					setForeground(Color.BLACK);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				// 返回渲染的组件
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				return this;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -494,7 +515,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			String orgMoney = null;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			// orgName可能存在为空的情况,拼接的时候会把null拼接到新的字符串,使用三目运算处理改问题
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			String combinedField = title + (orgName == null ? "" : orgName) + clerkcode + clerkname;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			// 取中间表数据
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			Map<String, String> middleTableMap = middleTableData.get(combinedField);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			// middleTableMap为空表示中间表为空,使用原始数据,不为空使用中间表数据
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -523,7 +543,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					mapMoney.put("beforePsgOrgMoney", beforePsgOrgMoney);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					beforePsgMoney.put(clerkcode, mapMoney);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -548,7 +567,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		if ("表七:实际未缴当月工资个人部分已扣".equals(title)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			tableSevenSelfMap = new HashMap<String, UFDouble>();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		dataList.add(new Object[] { title });
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		dataList.add(subheading);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		Map<String, UFDouble> MapMoney = new HashMap<String, UFDouble>();
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -632,7 +650,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				// 输出行数据
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				dataList.add(new Object[] { i + 1, clerkcode, clerkname, basicsMoney, staffMoney, orgMoney, mark, str + orgName });
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				if ("表一:由个人承担".equals(title)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					tableOneOrgMap.put(clerkcode + "," + clerkname, orgMoney);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -642,7 +659,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				if ("表七:实际未缴当月工资个人部分已扣".equals(title)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					tableSevenSelfMap.put(clerkcode + "," + clerkname, staffMoney);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				// 统计小计
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				staffSubtotal = staffSubtotal.add(staffMoney);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				orgSubtotal = orgSubtotal.add(orgMoney);
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -662,14 +678,12 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					if ("表四:个人部分已在集团内其他公司扣除".equals(title)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						tableFourSelfMap.put(orgName, staffSubtotal);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					staffSubtotal = new UFDouble(0.00, 2);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					orgSubtotal = new UFDouble(0.00, 2);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} else {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				// 输出行数据
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				dataList.add(new Object[] { i + 1, clerkcode, clerkname, basicsMoney, staffMoney, orgMoney, mark, str });
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				if ("表一:由个人承担".equals(title)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					tableOneOrgMap.put(clerkcode + "," + clerkname, orgMoney);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -930,7 +944,7 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		sql.append(" )ORDER BY orgname");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return (List<Map<String, String>>) iuap.executeQuery(sql.toString(), new MapListProcessor());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	/**
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 * 查询实际集团内其他公司已缴当月工资个人部分已扣
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 * 
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -951,7 +965,7 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		sql.append(" ORDER BY CONTRIBUTORYORG");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return (List<Map<String, String>>) iuap.executeQuery(sql.toString(), new MapListProcessor());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	/**
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 * 查询工资表扣缴数
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 * 
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1027,7 +1041,7 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	public UFDouble nvl(Object obj, int power) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return MathTool.nvl(ValueUtils.getUFDouble(obj)).setScale(2, UFDouble.ROUND_HALF_UP);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	/**
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 * 导出
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 */
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1039,10 +1053,9 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	/**
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	 * 获取修改数据打开修改界面
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	 * 获取修改数据打开修改界面 修改数据
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 * 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 * @param table
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	 *            修改数据
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 */
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private void update(UITablePane table) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		try {
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1092,14 +1105,14 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	/**
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	 * 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 * 组装凭证借贷金额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 * 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 * @param tablepane
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	 * 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 */
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private Map<String, UFDouble> getVoucherAmount(UITablePane tablepane) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		Map<String, UFDouble> map = new LinkedHashMap<String, UFDouble>();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		// 表一 个人承担-公司部分合计
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		Object objgs = tablepane.getTable().getValueAt(2, 2);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		// 表一 个人承担-个人部分合计
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1156,9 +1169,7 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		// 金额=表三(由部门承担) 表三 个人部分+公司部分合计 (个人部分为0)
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		UFDouble bsbmhj = bmgs.add(bmgr);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		/**
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		 * 借方:其他应收款/单位往来/对应公司-上海茗杰商务咨询有限公司 注:辅助核算客商和人关联的,尤咏杰---上海茗杰商务咨询有限公司
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		 */
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		/** 借方:其他应收款/单位往来/对应公司-上海茗杰商务咨询有限公司 注:辅助核算客商和人关联的,尤咏杰---上海茗杰商务咨询有限公司 **/
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		// 现在只有1个人(尤咏杰),先写默认值,后续有新增人员再进行优化
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		UFDouble wbgs = objwbgs == null ? UFDouble.ZERO_DBL : new UFDouble(objwbgs.toString());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		UFDouble wbgr = objwbgr == null ? UFDouble.ZERO_DBL : new UFDouble(objwbgr.toString());
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1169,23 +1180,21 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		// 金额=表四 个人部分合计
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		UFDouble bsgr = objbsgr == null ? UFDouble.ZERO_DBL : new UFDouble(objbsgr.toString());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		/**
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		 * 生成的凭证自动加一行借方数据,等于管理费用/社会保险费/部门:其他虚拟财务与应付账款/预估成本/办公费/部门:合计值 借方:应付职工薪酬/住房公积金
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		 **/
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		/** 生成的凭证自动加一行借方数据,等于管理费用/社会保险费/部门:其他虚拟财务与应付账款/预估成本/办公费/部门:合计值 借方:应付职工薪酬/住房公积金 **/
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		// 金额=管理费用/住房公积金+应付账款/预估成本/办公费
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		UFDouble gjjhj = gjjcmpamout.add(bsbmhj);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		/** 贷方: 预付账款/待摊费用/待摊事项:公积金摊销 **/
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		// 金额=公积金汇缴单实际缴纳数
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		UFDouble jsibcomount = objsibco == null ? UFDouble.ZERO_DBL : new UFDouble(objsibco.toString());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		// 金额=社保分摊表金额扣除内部往来
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		UFDouble xjsibcomount = jsibcomount.sub(bsgr);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		/** 贷方: 其他应收款/个人往来 **/
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		// 金额=表七个人部分合计
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		UFDouble bqgrmx = objbqgr == null ? UFDouble.ZERO_DBL : new UFDouble(objbqgr.toString());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		/**
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		 * 生成的凭证自动加一行借方数据,等于管理费用/社会保险费/部门:其他虚拟财务与应付账款/预估成本/办公费/部门:合计值 贷方:应付职工薪酬/住房公积金
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		 **/
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		/** 生成的凭证自动加一行借方数据,等于管理费用/社会保险费/部门:其他虚拟财务与应付账款/预估成本/办公费/部门:合计值 贷方:应付职工薪酬/住房公积金 **/
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		// 金额=管理费用/住房公积金+应付账款/预估成本/办公费
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		UFDouble gjjhd = gjjcmpamout.add(bsbmhj);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1194,26 +1203,22 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		map.put("其他应收款/个人往来", byblhj);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		map.put("应付账款/预估成本/办公费", bsbmhj);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		map.put("其他应收款/单位往来", wbgshj);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		map.put("其他应收款/内部往来", bsgr);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		// map.put("其他应收款/内部往来", bsgr);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		map.put("应付职工薪酬/住房公积金", gjjhj);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		map.put("预付账款/待摊费用/贷方", jsibcomount);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		map.put("预付账款/待摊费用/贷方", xjsibcomount);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		map.put("其他应收款/个人往来/贷方", bqgrmx);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		map.put("应付职工薪酬/住房公积金/贷方", gjjhd);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return map;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	// 凭证封装
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	public VoucherVO getVoucherVO(Map<String, UFDouble> map) throws Exception {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		VoucherVO voucher = new VoucherVO();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		String pk_org = getPk_financeorg(orgCode);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		// 组织版本
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		String pk_group = InvocationInfoProxy.getInstance().getGroupId();// 集团
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//		String year = period.substring(0, 4);// 会计年度
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//		String month = period.substring(5, 7);// 会计月份
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		// String year = period.substring(0, 4);// 会计年度
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		// String month = period.substring(5, 7);// 会计月份
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		Date newDate = convertStringToDate(period + "-01", "yyyy-MM-dd");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		String nexMonthDate = getMonthFirstDate(newDate);// 下月最后一天
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		String year = nexMonthDate.substring(0, 4);// 会计年度
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1222,7 +1227,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		String pk_accountGlbook = tran_accountingbook(pk_org);// 核算账簿
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		String pk_vouchertype = vouchertypeGetCode("03");// 凭证类型03;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		String pk_org_v = getPkorgv(pk_org);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		voucher.setPk_vouchertype(pk_vouchertype);// 记账凭证
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		voucher.setAttachment(0);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		voucher.setDetailmodflag(UFBoolean.TRUE);
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1246,11 +1250,8 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		voucher.setPk_org_v(pk_org_v);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		voucher.setPk_group(pk_group);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		voucher.setPk_accountingbook(pk_accountGlbook);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		ArrayList<DetailVO> itemarr = new ArrayList<DetailVO>();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		for (Entry<String, UFDouble> entry : map.entrySet()) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			String key = entry.getKey();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			String km_code = "";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			UFDouble creditamount = UFDouble.ZERO_DBL;
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1268,7 +1269,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				arrassvo.add(assvos[0]);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				itemVO.setAss((AssVO[]) arrassvo.toArray(new AssVO[0]));
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				itemarr.add(itemVO);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} else if ("其他应收款/五险一金".equals(key)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				km_code = "122104";// 其他应收款/五险一金
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				debitamount = entry.getValue();// 借方发生额
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1276,7 +1276,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				DetailVO itemVO = new DetailVO();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + year + "年" + month + "月 公积金");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				itemarr.add(itemVO);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} else if ("其他应收款/个人往来".equals(key)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				km_code = "122102";// 其他应收款/个人往来
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				debitamount = entry.getValue();// 借方发生额
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1302,7 +1301,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					UFDouble debitamounttotal1 = debitamounttotal;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				if (null != tableSixSelfMap) {// 表六 个人部分
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					UFDouble debitamounttotal = new UFDouble();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					for (Entry<String, UFDouble> tableSixSelfEntry : tableSixSelfMap.entrySet()) {
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1324,7 +1322,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					UFDouble debitamounttotal1 = debitamounttotal;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} else if ("应付账款/预估成本/办公费".equals(key)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				km_code = "22020205";// 应付账款/预估成本/办公费
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				debitamount = entry.getValue();// 借方发生额
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1341,7 +1338,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				arrassvo.add(assvos2[0]);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				itemVO.setAss((AssVO[]) arrassvo.toArray(new AssVO[0]));
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				itemarr.add(itemVO);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} else if ("其他应收款/单位往来".equals(key)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				km_code = "122101";// 其他应收款/单位往来
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				debitamount = entry.getValue();// 借方发生额
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1354,40 +1350,39 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				arrassvo.add(assvos[0]);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				itemVO.setAss((AssVO[]) arrassvo.toArray(new AssVO[0]));
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				itemarr.add(itemVO);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			} else if ("其他应收款/内部往来".equals(key)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				// 取表四个人部分合计包含各个子公司,每个公司一条明细
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				km_code = "12210503";// 其他应收款/内部往来/代垫费用
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				debitamount = entry.getValue();// 借方发生额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				if (null != tableFourSelfMap) {// 表四每个公司小计
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					UFDouble debitamounttotal = new UFDouble();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					for (Entry<String, UFDouble> tableFourSelfEntry : tableFourSelfMap.entrySet()) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						String orgName = tableFourSelfEntry.getKey();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						UFDouble debitamountOrg = tableFourSelfEntry.getValue();// 借方发生额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						debitamounttotal = debitamounttotal.add(debitamountOrg);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						if (debitamountOrg.doubleValue() != 0) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							DetailVO itemVO = new DetailVO();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							getDetailvo(itemVO, pk_accasoa, creditamount, debitamountOrg, voucher, "缴纳" + year + "年" + month + "月 公积金 ");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							// 辅助核算
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							AssVO[] assvos = getAss(pk_accasoa, "0004", getbd_cust_supplier_code(orgName), pk_org);// 客商
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							arrassvo.add(assvos[0]);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							itemVO.setAss((AssVO[]) arrassvo.toArray(new AssVO[0]));
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							itemarr.add(itemVO);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					UFDouble debitamounttotal1 = debitamounttotal;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			} else if ("应付职工薪酬/住房公积金".equals(key)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// else if ("其他应收款/内部往来".equals(key)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// // 取表四个人部分合计包含各个子公司,每个公司一条明细
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// km_code = "12210503";// 其他应收款/内部往来/代垫费用
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// debitamount = entry.getValue();// 借方发生额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// if (null != tableFourSelfMap) {// 表四每个公司小计
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// UFDouble debitamounttotal = new UFDouble();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// for (Entry<String, UFDouble> tableFourSelfEntry : tableFourSelfMap.entrySet()) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// String orgName = tableFourSelfEntry.getKey();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// UFDouble debitamountOrg = tableFourSelfEntry.getValue();// 借方发生额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// debitamounttotal = debitamounttotal.add(debitamountOrg);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// if (debitamountOrg.doubleValue() != 0) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// DetailVO itemVO = new DetailVO();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// getDetailvo(itemVO, pk_accasoa, creditamount, debitamountOrg, voucher, "缴纳" + year + "年" + month + "月 公积金 ");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// // 辅助核算
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// AssVO[] assvos = getAss(pk_accasoa, "0004", getbd_cust_supplier_code(orgName), pk_org);// 客商
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// arrassvo.add(assvos[0]);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// itemVO.setAss((AssVO[]) arrassvo.toArray(new AssVO[0]));
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// itemarr.add(itemVO);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// UFDouble debitamounttotal1 = debitamounttotal;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			else if ("应付职工薪酬/住房公积金".equals(key)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				km_code = "221106";// 应付职工薪酬/住房公积金 无辅助核算
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				debitamount = entry.getValue();// 借方发生额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				DetailVO itemVO = new DetailVO();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + year + "年" + month + "月 公积金 ");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				itemarr.add(itemVO);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} else if ("预付账款/待摊费用/贷方".equals(key)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				// km_code = "220201";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				km_code = "112301";// 预付账款/待摊费用
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1402,7 +1397,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				arrassvo.add(assvos[0]);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				itemVO.setAss((AssVO[]) arrassvo.toArray(new AssVO[0]));
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				itemarr.add(itemVO);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} else if ("其他应收款/个人往来/贷方".equals(key)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				km_code = "122102";// 其他应收款/个人往来
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				creditamount = entry.getValue();// 贷方发生额
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1438,13 +1432,10 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		voucher.setDetails((DetailVO[]) itemarr.toArray(new DetailVO[0]));
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return voucher;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private DetailVO getDetailvo(DetailVO itemVO, String pk_accasoa, UFDouble creditamount, UFDouble debitamount, VoucherVO voucher, String explanation) throws BusinessException {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		String pk_currtype = getcurrtype("CNY");// 币种
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		itemVO.setPk_accasoa(pk_accasoa);// 会计科目
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		itemVO.setCreditamount(creditamount);// 贷方
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1478,9 +1469,7 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		itemVO.setPk_unit(voucher.getPk_org());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		itemVO.setPk_unit_v(voucher.getPk_org_v());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		itemVO.setPk_currtype(pk_currtype);// 币种
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return itemVO;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private AssVO[] getAss(String pk_km, String code1, String pk_checkvalue1, String pk_org) throws ClassNotFoundException, BusinessException {
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1500,26 +1489,21 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		if (ass_arr != null) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			for (int j = 0; j < ass_arr.size(); j++) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				HashMap assmap = (HashMap) ass_arr.get(j);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				String getRefnodename = assmap.get("refnodename") + "";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				String fullclassname = assmap.get("fullclassname") + "";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				SuperVO refvo = initSuperVOClass(Class.forName(fullclassname));
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				String qrykey = "code";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				if ("项目".equals(getRefnodename)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					qrykey = "project_code";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				} else if ("部门".equals(getRefnodename)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					qrykey = "name";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				String refsql = "select * from   " + refvo.getTableName() + " where  nvl(dr,0) = 0   and ( " + qrykey + "  ='" + pk_checkvalue1 + "'  or " + refvo.getPKFieldName() + " = '"
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						+ pk_checkvalue1 + "' )";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				if (refvo.getTableName().equals("org_dept")) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					refsql = "select * from   " + refvo.getTableName() + " where  nvl(dr,0) = 0  and   pk_org  = '" + pk_org + "'  and ( " + qrykey + "  ='" + pk_checkvalue1 + "'  or "
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							+ refvo.getPKFieldName() + " = '" + pk_checkvalue1 + "' )";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				} else if (refvo.getTableName().equals("bd_defdoc")) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					if ("公司内部专业(自定义档案)".equals(getRefnodename)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						refsql = "select * from   " + refvo.getTableName() + " where  nvl(dr,0) = 0  and  ( " + qrykey + "  ='" + pk_checkvalue1 + "'  or " + refvo.getPKFieldName() + " = '"
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 								+ pk_checkvalue1 + "' )  " + "and  pk_defdoclist =(select pk_defdoclist from  bd_defdoclist  where   code = 'HR016' )     ";
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1531,15 +1515,11 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 								+ pk_checkvalue1 + "' )  " + "and  pk_defdoclist =(select pk_defdoclist from  bd_defdoclist  where   code = '14' )     ";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				SuperVO dataVO = (SuperVO) iuap.executeQuery(refsql, new BeanProcessor(Class.forName(fullclassname)));
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				if (dataVO == null) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					throw new BusinessException("辅助核算翻译失败:" + pk_checkvalue1);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				AssVO tempAss = new AssVO();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				String pk_checkvalue = dataVO.getPrimaryKey();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				String code = "";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				if ("项目".equals(getRefnodename)) {
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1547,7 +1527,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				} else {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					code = dataVO.getAttributeValue("code") + "";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				if ("".equals(getRefnodename)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					// 说明是基本类型,则直接当作字符串保存
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					tempAss.setPk_Checkvalue(code);
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1555,11 +1534,9 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					tempAss.setChecktypecode(assmap.get("code") + "");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					tempAss.setChecktypename(assmap.get("name") + "");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				} else {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					//
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					tempAss.setPk_Checktype(assmap.get("pk_accassitem") + "");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					tempAss.setChecktypecode(assmap.get("code") + "");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					tempAss.setChecktypename(assmap.get("name") + "");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					if ("项目".equals(getRefnodename)) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						tempAss.setCheckvaluename(dataVO.getAttributeValue("project_name") + "");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					} else {
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1636,10 +1613,8 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		String sql = "select  pk_vouchertype     from  bd_vouchertype  where  code   = ? and nvl(dr,0) = 0 ";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		SQLParameter parameter = new SQLParameter();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		parameter.addParam(pk);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		Object pk_vouchertype = iuap.executeQuery(sql, parameter, new ColumnProcessor());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return pk_vouchertype != null ? pk_vouchertype + "" : "";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	/**
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1649,10 +1624,8 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		String sql = "select   pk_vid    from  org_financeorg_v  where   pk_financeorg    = ? and nvl(dr,0) = 0 ";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		SQLParameter parameter = new SQLParameter();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		parameter.addParam(pk);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		Object pk_vid = iuap.executeQuery(sql, parameter, new ColumnProcessor());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return pk_vid != null ? pk_vid + "" : "";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	/**
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1667,7 +1640,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				+ "   and bd_accasoa.pk_accchart =\n" + "       (select pk_accchart\n" + "           from bd_accchart\n" + "          where  originalchart =\n"
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				+ "                 (select pk_curraccchart\n" + "                    from org_accountingbook\n" + "                   where pk_accountingbook = ? and alterchart <> '~' and\n"
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				+ "           tempversionflag <> 'Y'));";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		SQLParameter parameter = new SQLParameter();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		parameter.addParam(km_code);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		parameter.addParam(pk_accountingbook);
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1695,7 +1667,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	// 员工编号查询人员编码
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private String psndocCode(String clerkcode) throws BusinessException {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		String sql = "select bd_psndoc.code from  hi_psnjob " + "inner join bd_psndoc on bd_psndoc.pk_psndoc=hi_psnjob.pk_psndoc " + "and nvl(hi_psnjob.dr,0)=0 and nvl(bd_psndoc.dr,0)=0 "
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				+ "and hi_psnjob.clerkcode='" + clerkcode + "'  ";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		Object code = (String) iuap.executeQuery(sql, new ColumnProcessor());
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1703,31 +1674,22 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private String getPk_financeorg(String code) throws BusinessException {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		String sql = "select pk_financeorg  from  org_financeorg  where code='" + code + "' and nvl(dr,0)=0 and enablestate ='2' ";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		Object pk_financeorg = (String) iuap.executeQuery(sql, new ColumnProcessor());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return pk_financeorg != null ? pk_financeorg + "" : "";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private String getpk_user(String code) throws BusinessException {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		String sql = "select cuserid   from  sm_user  where user_code='" + code + "' and nvl(dr,0)=0 and enablestate ='2' ";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		Object cuserid = (String) iuap.executeQuery(sql, new ColumnProcessor());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return cuserid != null ? cuserid + "" : "";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	// 根据客商名称查询客商编码
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private String getbd_cust_supplier_code(String name) throws BusinessException {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		String sql = "select code  from  bd_cust_supplier  where name='" + name + "' and nvl(dr,0)=0  ";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		Object code = (String) iuap.executeQuery(sql, new ColumnProcessor());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return code != null ? code + "" : "";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	// 日期格式转字符串
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1738,7 +1700,6 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		Date first = calendar.getTime();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return convertDateToString(first, "yyyy-MM-dd");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	// 获取下个月最后一天
 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1773,4 +1734,157 @@ public class AccumulationFundAllocationUI extends ToftPanel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return resultDate;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	/**
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	 * 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	 * 生成内部应收单
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	 * 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	 * @throws Exception
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	 * 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	 */
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	private String addReceivableBill(UITablePane tablepane) throws Exception {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		String billNO = "";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		Map<String, UFDouble> map = new LinkedHashMap<String, UFDouble>();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		// 表四 个人部分已在集团内其他公司扣除-个人部分合计
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		Object objbsgr = tablepane.getTable().getValueAt(5, 2);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		/** 借方:其他应收款/内部往来/代垫费用/对应公司 **/
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		// 金额=表四 个人部分合计
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		UFDouble bsgr = objbsgr == null ? UFDouble.ZERO_DBL : new UFDouble(objbsgr.toString());// 20385.96
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		if (null != tableFourSelfMap) {// 表四每个公司小计
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			AggReceivableBillVO aggReceivableBillVO = new AggReceivableBillVO();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			ReceivableBillVO receivableBillVO = new ReceivableBillVO();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// 赋值主表数据
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setDef11("公积金分摊表_" + orgCode + "_" + period);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			String pk_org = getPk_financeorg(orgCode);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// 组织版本
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			String pk_group = InvocationInfoProxy.getInstance().getGroupId();// 集团
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			String pk_user = InvocationInfoProxy.getInstance().getUserId();// 制单人
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			String pk_org_v = getPkorgv(pk_org);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setBillstatus(-1);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setPk_group(pk_group);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setPk_org(pk_org);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setPk_org_v(pk_org_v);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setPk_fiorg(pk_org);// 应收财务组织
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setSett_org(pk_org);// 结算财务组织
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setSett_org_v(pk_org);// 结算财务组织版本
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setBillmaker(pk_user);// 制单人
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setBilldate(new UFDate());// 单据日期
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setCreator(pk_user);// 创建人
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setCreationtime(new UFDateTime());// 创建时间
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setBusidate(new UFDate());// 开票日期
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setObjtype(0);// 往来对象
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setPk_deptid(GetDataUtil.getDeptPK("000101205"));// 收款部门
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setLocal_money(bsgr);// 合计金额--本币金额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setMoney(bsgr);// 原币金额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			String pk_bankaccsub = GetDataUtil.getBankaccsubPK("310066218018000420123");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setRecaccount(pk_bankaccsub);// 收款银行账户
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setPk_busitype(GetDataUtil.getBusitypePK("AR01"));// 业务流程:选择收款
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setBillclass("ys");// 单据大类:应收单
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			String year = period.substring(0, 4);// 会计年度
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			String month = period.substring(5, 7);// 会计月份
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setBillyear(year);// 单据会计年度
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setBillperiod(month);// 单据会计期间
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setIsreded(UFBoolean.FALSE);// 是否红冲过
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setIsflowbill(UFBoolean.FALSE);// 是否流程单据
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setPk_billtype("F0");// 单据类型编码
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			String pk_currtype = getcurrtype("CNY");// 币种
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setPk_currtype(pk_currtype);// 币种
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setPk_balatype(GetDataUtil.getBalatypePK("12"));
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			String pk_country = GetDataUtil.getCountryzonePK("CN");// 国家地区 默认CN
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setSendcountryid(pk_country);// 发货国
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setTaxcountryid(pk_country);// 报税国
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setSubjcode("112301");// 科目编码
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setSrc_syscode(0);// 单据来源系统
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setSyscode(0);// 单据所属系统
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setScomment("S00009");// 摘要
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setMoney(bsgr);// 金额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// 应收类型:内部应收单(含代垫费用)
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			String pk_tradetype = "F0-Cxx-01";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setPk_tradetype(pk_tradetype);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			String pk_billtypeid = GetDataUtil.getBilltypePK(pk_tradetype, pk_group);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setPk_tradetypeid(pk_billtypeid);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setIsflowbill(UFBoolean.FALSE);// 是否流程单据
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			receivableBillVO.setIsreded(UFBoolean.FALSE);// 是否红冲过
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			aggReceivableBillVO.setParentVO(receivableBillVO);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			List<ReceivableBillItemVO> listItemVO = new ArrayList<ReceivableBillItemVO>();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			int rowNo = 0;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			for (Entry<String, UFDouble> tableFourSelfEntry : tableFourSelfMap.entrySet()) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				rowNo++;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				String orgName = tableFourSelfEntry.getKey();// 公司名称
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				UFDouble debitamount = tableFourSelfEntry.getValue();// 借方发生额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				if (debitamount.doubleValue() != 0) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					ReceivableBillItemVO receivableBillItemVO = new ReceivableBillItemVO();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					// 赋值子表数据
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setPk_org(pk_org);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setPk_org_v(pk_org_v);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setPk_group(pk_group);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setPk_fiorg(pk_org);// 应收财务组织
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setDef30("06");// 费用归属:06待摊费用"
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setDef30(GetDataUtil.getDefdocPK("06", "05", "待摊费用"));
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setDef26(GetDataUtil.getDefdocPK("S00009", "08", "代垫费用"));// 收款摘要:S00009代垫费用
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setDef29(GetDataUtil.getDefdocPK("060501", "YS001", "不开票结算"));// 收款业务性质:060501不开票结算
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setDef15(GetDataUtil.getDefdocPK("其他合同(财务专用)", "01", "其他合同(财务专用)"));// 经营合同名称
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setDef16("其他合同(财务专用)");// 合同编号
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setDef10(year + month + "公积金个人部分");// 备注
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					String code = getbd_cust_supplier_code(orgName);// 根据名称查询code
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setCustomer(GetDataUtil.getCustomerPK(code));// 客户
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setOrdercubasdoc(GetDataUtil.getCustomerPK(code));// 订单客户
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setTaxcodeid(GetDataUtil.getTaxcodePK("10"));// 税码
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setTaxrate(new UFDouble(0));// 税率
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setLocal_money_bal(debitamount);// 组织本币余额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setLocal_money_de(debitamount);// 价税合计
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setLocal_notax_de(debitamount);// 金额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setLocal_tax_de(new UFDouble(0));// 税额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setLocal_price(debitamount);// 本币单价
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setLocal_taxprice(debitamount);// 本币含税单价
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setMoney_bal(debitamount);// 原币余额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setMoney_de(debitamount);// 借方原币金额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setNotax_de(debitamount);// 借方原币无税金额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setOccupationmny(debitamount);// 预占用原币余额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setCaltaxmny(debitamount);// 计税金额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setPrice(debitamount);// 单价
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setTaxprice(debitamount);// 含税单价
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setBilldate(new UFDate());// 单据日期
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setBusidate(new UFDate());// 起算日期
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setPk_billtype("F0");// 单据类型编码
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setBillclass("ys");// 单据大类
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setRowno(rowNo);// 单据分录号--行号
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setRowtype(22);// 行类型:22代垫
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setDirection(1);// 方向:1借方
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setPk_currtype(pk_currtype);// 币种
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setTaxtype(1);// 扣税类别:1应税外加
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setObjtype(0);// 往来对象
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setPk_balatype(GetDataUtil.getBalatypePK("12"));
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setSendcountryid(pk_country);// 发货国
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setBuysellflag(1);// 购销类型 1国内销售
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					// receivableBillItemVO.setConfernum("ARAP_0001A81000000000NVK0_D02024012200077450");// 内部交易结算号
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setPk_billtype("F0");// 单据类型编码
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setPk_deptid(GetDataUtil.getDeptPK("000101205"));// 部门
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setPk_deptid_v(GetDataUtil.getDeptPK("000101205"));// 部门
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setPk_psndoc(GetDataUtil.getPsndocPK("1001A8100000003IHP1U"));// 业务员
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					// 应收类型:内部应收单(含代垫费用);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setPk_tradetype(pk_tradetype);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setPk_tradetypeid(pk_billtypeid);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setQuantity_bal(new UFDouble(1));// 数量余额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setQuantity_de(new UFDouble(1));// 借方数量
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setRate(new UFDouble(1));// 组织本币税率
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setRecaccount(pk_bankaccsub);// 收款银行账户
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setRececountryid(pk_country);// 收货国
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setSett_org(pk_org);// 结算财务组织
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setSett_org_v(pk_org);// 结算财务组织版本
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setTriatradeflag(UFBoolean.FALSE);// 三角贸易区
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setSettlecurr(pk_currtype);// 收款币种
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					receivableBillItemVO.setSettlemoney(debitamount);// 收款金额
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					listItemVO.add(receivableBillItemVO);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			aggReceivableBillVO.setChildrenVO(listItemVO.toArray(new ReceivableBillItemVO[listItemVO.size()]));
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// 调用应收单新增方法
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			IReceivableService receivableService = NCLocator.getInstance().lookup(IReceivableService.class);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			AggReceivableBillVO aggvo = receivableService.receivable_RequiresNew(aggReceivableBillVO);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			ReceivableBillVO headerVO = (ReceivableBillVO) aggvo.getParentVO();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			billNO = headerVO.getBillno();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		return billNO;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }
 
			 |