Browse Source

去掉按钮权限

yaoyu 3 weeks ago
parent
commit
339dbbf24e

+ 0 - 15
hr/hr/src/client/nc/bs/hr/plugin/GetDataUtil.java

@@ -321,19 +321,4 @@ public class GetDataUtil {
 		return map;
 	}
 	
-	//ȨÏÞ¹ýÂË
-	public static String powerRole(String cuserid) throws BusinessException {
-		StringBuffer sql = new StringBuffer();
-		sql.append("SELECT");
-		sql.append("	sm_role.role_code");
-		sql.append(" FROM");
-		sql.append("	sm_role sm_role");
-		sql.append("	LEFT JOIN sm_user_role sm_user_role ON sm_role.pk_role = sm_user_role.pk_role");
-		sql.append(" WHERE");
-		sql.append("	sm_user_role.cuserid = '"+cuserid+"'");
-		sql.append("	AND ( sm_role.role_code = 'GJJ_HR001' OR sm_role.role_code = 'GJJ_CW001' )");
-		return (String) iuap.executeQuery(sql.toString(), new ColumnProcessor());
-	}
-	
-	
 }

+ 37 - 41
hr/hr/src/client/nc/ui/hr/baod_orders/view/AccumulationFundAllocationUI.java

@@ -123,23 +123,11 @@ public class AccumulationFundAllocationUI extends ToftPanel {
 	}
 
 	public void initialize() {
-		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());
-		}
+		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, this.bt_arrecbill });// 添加按钮
 	}
 
 	private UILabel getOrgLabel() {
@@ -1217,8 +1205,8 @@ public class AccumulationFundAllocationUI extends ToftPanel {
 		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 yearperiod = period.substring(0, 4);// 会计年度
+		 String monthperiod = period.substring(5, 7);// 会计月份
 		Date newDate = convertStringToDate(period + "-01", "yyyy-MM-dd");
 		String nexMonthDate = getMonthFirstDate(newDate);// 下月最后一天
 		String year = nexMonthDate.substring(0, 4);// 会计年度
@@ -1262,7 +1250,7 @@ public class AccumulationFundAllocationUI extends ToftPanel {
 				debitamount = entry.getValue();// 借方发生额
 				pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
 				DetailVO itemVO = new DetailVO();
-				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + year + "年" + month + "月 公积金");
+				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 公积金");
 				// 辅助核算
 				AssVO[] assvos = getAss(pk_accasoa, "0001", "其他-虚拟(财务成本归结)", pk_org);// 部门:其他虚拟财务
 				ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
@@ -1274,7 +1262,7 @@ public class AccumulationFundAllocationUI extends ToftPanel {
 				debitamount = entry.getValue();// 借方发生额
 				pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
 				DetailVO itemVO = new DetailVO();
-				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + year + "年" + month + "月 公积金");
+				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 公积金");
 				itemarr.add(itemVO);
 			} else if ("其他应收款/个人往来".equals(key)) {
 				km_code = "122102";// 其他应收款/个人往来
@@ -1290,7 +1278,7 @@ public class AccumulationFundAllocationUI extends ToftPanel {
 						if (debitamountOrg.doubleValue() != 0) {
 							debitamounttotal = debitamounttotal.add(debitamountOrg);
 							DetailVO itemVO = new DetailVO();
-							getDetailvo(itemVO, pk_accasoa, creditamount, debitamountOrg, voucher, "缴纳" + year + "年" + month + "月 公积金 " + userName);
+							getDetailvo(itemVO, pk_accasoa, creditamount, debitamountOrg, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 公积金 " + userName);
 							// 辅助核算
 							AssVO[] assvos = getAss(pk_accasoa, "0002", psndocCode(checkCode), pk_org);// 人员
 							ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
@@ -1311,7 +1299,7 @@ public class AccumulationFundAllocationUI extends ToftPanel {
 						if (debitamountSelf.doubleValue() != 0) {
 							debitamounttotal = debitamounttotal.add(debitamountSelf);
 							DetailVO itemVO = new DetailVO();
-							getDetailvo(itemVO, pk_accasoa, creditamount, debitamountSelf, voucher, "缴纳" + year + "年" + month + "月 公积金 " + userName + "-实际已缴个人未扣");
+							getDetailvo(itemVO, pk_accasoa, creditamount, debitamountSelf, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 公积金 " + userName + "-实际已缴个人未扣");
 							// 辅助核算
 							AssVO[] assvos = getAss(pk_accasoa, "0002", psndocCode(checkCode), pk_org);// 人员
 							ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
@@ -1327,13 +1315,18 @@ public class AccumulationFundAllocationUI extends ToftPanel {
 				debitamount = entry.getValue();// 借方发生额
 				pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
 				DetailVO itemVO = new DetailVO();
-				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + year + "年" + month + "月 公积金 ");
-				// 辅助核算
-				AssVO[] assvos1 = getAss(pk_accasoa, "0001", "结构三所", pk_org);// 部门:结构三所
+				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 公积金 ");
+				// 辅助核算  2025-03-13
+				ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
 				AssVO[] assvos = getAss(pk_accasoa, "0010", "PM201601130001", pk_org);// 项目:其他
 				AssVO[] assvos2 = getAss(pk_accasoa, "0043", "99", pk_org);// 项目专业:不涉及
-				ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
-				arrassvo.add(assvos1[0]);
+				if("000101".equals(orgCode)){
+					AssVO[] assvos1 = getAss(pk_accasoa, "0001", "结构三所", pk_org);// 部门:结构三所
+					arrassvo.add(assvos1[0]);	
+				}else{
+					AssVO[] assvos1 = getAss(pk_accasoa, "0001", "其他-虚拟(财务成本归结)", pk_org);// 部门:其他虚拟财务
+					arrassvo.add(assvos1[0]);
+				}
 				arrassvo.add(assvos[0]);
 				arrassvo.add(assvos2[0]);
 				itemVO.setAss((AssVO[]) arrassvo.toArray(new AssVO[0]));
@@ -1341,15 +1334,18 @@ public class AccumulationFundAllocationUI extends ToftPanel {
 			} else if ("其他应收款/单位往来".equals(key)) {
 				km_code = "122101";// 其他应收款/单位往来
 				debitamount = entry.getValue();// 借方发生额
-				pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
-				DetailVO itemVO = new DetailVO();
-				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + year + "年" + month + "月 公积金 尤咏杰");
-				// 辅助核算:上海茗杰商务咨询有限公司
-				AssVO[] assvos = getAss(pk_accasoa, "0004", "G006353", pk_org);// 客商
-				ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
-				arrassvo.add(assvos[0]);
-				itemVO.setAss((AssVO[]) arrassvo.toArray(new AssVO[0]));
-				itemarr.add(itemVO);
+				if(debitamount.doubleValue() != 0){// 判断外部公司承担表公司部分是否为0(龙咏杰特殊处理)
+					pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
+					DetailVO itemVO = new DetailVO();
+					getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 公积金 尤咏杰");
+					// 辅助核算:上海茗杰商务咨询有限公司
+					AssVO[] assvos = getAss(pk_accasoa, "0004", "G006353", pk_org);// 客商
+					ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
+					arrassvo.add(assvos[0]);
+					itemVO.setAss((AssVO[]) arrassvo.toArray(new AssVO[0]));
+					itemarr.add(itemVO);
+				}
+				
 			}
 			// else if ("其他应收款/内部往来".equals(key)) {
 			// // 取表四个人部分合计包含各个子公司,每个公司一条明细
@@ -1381,7 +1377,7 @@ public class AccumulationFundAllocationUI extends ToftPanel {
 				debitamount = entry.getValue();// 借方发生额
 				pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
 				DetailVO itemVO = new DetailVO();
-				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + year + "年" + month + "月 公积金 ");
+				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 公积金 ");
 				itemarr.add(itemVO);
 			} else if ("预付账款/待摊费用/贷方".equals(key)) {
 				// km_code = "220201";
@@ -1389,7 +1385,7 @@ public class AccumulationFundAllocationUI extends ToftPanel {
 				creditamount = entry.getValue();// 贷方发生额
 				pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
 				DetailVO itemVO = new DetailVO();
-				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + year + "年" + month + "月 公积金 ");
+				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 公积金 ");
 				// 辅助核算
 				// AssVO[] assvos = getAss(pk_accasoa, "0004", "G000371", pk_org);// 客商
 				AssVO[] assvos = getAss(pk_accasoa, "05", "10", pk_org);// 待摊事项:公积金摊销
@@ -1411,7 +1407,7 @@ public class AccumulationFundAllocationUI extends ToftPanel {
 						if (creditamountOrg.doubleValue() != 0) {
 							debitamounttotal = debitamounttotal.add(creditamountOrg);
 							DetailVO itemVO = new DetailVO();
-							getDetailvo(itemVO, pk_accasoa, creditamountOrg, debitamount, voucher, "缴纳" + year + "年" + month + "月 公积金 " + userName + "-实际未缴个人已扣");
+							getDetailvo(itemVO, pk_accasoa, creditamountOrg, debitamount, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 公积金 " + userName + "-实际未缴个人已扣");
 							// 辅助核算
 							AssVO[] assvos = getAss(pk_accasoa, "0002", psndocCode(checkCode), pk_org);// 人员
 							ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
@@ -1427,7 +1423,7 @@ public class AccumulationFundAllocationUI extends ToftPanel {
 				creditamount = entry.getValue();// 贷方发生额
 				pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
 				DetailVO itemVO = new DetailVO();
-				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + year + "年" + month + "月 公积金 ");
+				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 公积金 ");
 				itemarr.add(itemVO);
 			}
 		}

+ 1 - 9
hr/hr/src/client/nc/ui/hr/baod_orders/view/ServiceChargeAllocationUI.java

@@ -117,15 +117,7 @@ public class ServiceChargeAllocationUI extends ToftPanel {
 			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_output, this.bt_voucher, this.bt_linkvouchar });// Ìí¼Ó°´Å¥
-			}else if("GJJ_CW001".equals(roleCode)){
-				setButtons(new ButtonObject[] { this.bt_query, this.bt_update, this.bt_output });// Ìí¼Ó°´Å¥
-			}else {
-				setButtons(new ButtonObject[] { this.bt_query, this.bt_update, this.bt_output, this.bt_voucher, this.bt_linkvouchar });// Ìí¼Ó°´Å¥
-			}
+			setButtons(new ButtonObject[] { this.bt_query, this.bt_update, this.bt_output, this.bt_voucher, this.bt_linkvouchar });// Ìí¼Ó°´Å¥
 		} catch (Exception e) {
 			MessageDialog.showHintDlg(this, "Ìáʾ", e.getMessage());
 		}

+ 73 - 55
hr/hr/src/client/nc/ui/hr/baod_orders/view/SocialInsuranceAllocationUI.java

@@ -124,23 +124,11 @@ public class SocialInsuranceAllocationUI extends ToftPanel {
 	}
 
 	public void initialize() {
-		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_output, this.bt_voucher, this.bt_linkvouchar, this.bt_arrecbill });// 添加按钮
-			}else if("GJJ_CW001".equals(roleCode)){
-				setButtons(new ButtonObject[] { this.bt_query, this.bt_insert, this.bt_update, this.bt_output });// 添加按钮
-			}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());
-		}
+		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, this.bt_arrecbill });// 添加按钮
 	}
 
 	private UILabel getOrgLabel() {
@@ -1167,8 +1155,15 @@ public class SocialInsuranceAllocationUI extends ToftPanel {
 		/** 借方:管理费用/社会保险费/残疾 部门:其他虚拟财务 **/
 		UFDouble bmgs = objbmgs == null ? UFDouble.ZERO_DBL : new UFDouble(objbmgs.toString());
 		UFDouble bmgr = objbmgr == null ? UFDouble.ZERO_DBL : new UFDouble(objbmgr.toString());
-		// 金额=表三 除姜艳外 其他员工个人+公司合计 (残疾员工)
-		UFDouble sbcmpamoutcj = bmgs.add(bmgr).sub(jiangyanOrg);
+		UFDouble sbcmpamoutcj=null;
+		if(null!=jiangyanOrg){// 2025-3-13
+			// 金额=表三 除姜艳外 其他员工个人+公司合计 (残疾员工)
+			 sbcmpamoutcj = bmgs.add(bmgr).sub(jiangyanOrg);	
+		}else{
+			// 金额=表三 除姜艳外 其他员工个人+公司合计 (残疾员工)
+			 sbcmpamoutcj = bmgs.add(bmgr);
+		}
+		
 
 		/** 借方:其他应收款/五险一金 **/
 		UFDouble bwgr = objbwgr == null ? UFDouble.ZERO_DBL : new UFDouble(objbwgr.toString());
@@ -1198,7 +1193,13 @@ public class SocialInsuranceAllocationUI extends ToftPanel {
 
 		/** 生成的凭证自动加一行借方数据,等于管理费用/社会保险费/部门:其他虚拟财务与应付账款/预估成本/办公费/部门:合计值 借方:应付职工薪酬/社会保险费 **/
 		// 金额=管理费用/社会保险费+应付账款/预估成本/办公费
-		UFDouble shbxfj = sbcmpamout.add(jiangyanOrg);
+		UFDouble shbxfj =null;
+		if(null!=jiangyanOrg){// 2025-03-13
+			 shbxfj = sbcmpamout.add(jiangyanOrg);	
+		}else{
+			 shbxfj = sbcmpamout;
+		}
+		
 
 		/** 贷方: 预付账款/待摊费用/待摊事项:社保摊销 **/
 		// 金额=社保分摊表金额
@@ -1211,7 +1212,13 @@ public class SocialInsuranceAllocationUI extends ToftPanel {
 
 		/** 生成的凭证自动加一行借方数据,等于管理费用/社会保险费/部门:其他虚拟财务与应付账款/预估成本/办公费/部门:合计值 贷方:应付职工薪酬/社会保险费 **/
 		// 金额=管理费用/社会保险费+应付账款/预估成本/办公费
-		UFDouble shbxfd = sbcmpamout.add(jiangyanOrg);
+		UFDouble shbxfd =null;
+		if(null!=jiangyanOrg){
+			 shbxfd = sbcmpamout.add(jiangyanOrg);	
+		}else{
+			 shbxfd = sbcmpamout;
+		}
+		
 
 		map.put("管理费用/社会保险费", sbcmpamout);
 		map.put("管理费用/社会保险费/残疾", sbcmpamoutcj);
@@ -1233,8 +1240,8 @@ public class SocialInsuranceAllocationUI extends ToftPanel {
 		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 yearperiod = period.substring(0, 4);// 会计年度   2025-3-13
+		String monthperiod = period.substring(5, 7);// 会计月份   2025-3-13
 		Date newDate = convertStringToDate(period + "-01", "yyyy-MM-dd");
 		String nexMonthDate = getMonthFirstDate(newDate);// 下月最后一天
 		String year = nexMonthDate.substring(0, 4);// 会计年度
@@ -1278,7 +1285,7 @@ public class SocialInsuranceAllocationUI extends ToftPanel {
 				debitamount = entry.getValue();// 借方发生额
 				pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
 				DetailVO itemVO = new DetailVO();
-				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + year + "年" + month + "月 社保");
+				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 社保");
 				// 辅助核算
 				AssVO[] assvos = getAss(pk_accasoa, "0001", "其他-虚拟(财务成本归结)", pk_org);// 部门:其他虚拟财务
 				ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
@@ -1290,7 +1297,7 @@ public class SocialInsuranceAllocationUI extends ToftPanel {
 				debitamount = entry.getValue();// 借方发生额
 				pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
 				DetailVO itemVO = new DetailVO();
-				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + year + "年" + month + "月 社保 残疾员工");
+				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 社保 残疾员工");
 				// 辅助核算
 				AssVO[] assvos = getAss(pk_accasoa, "0001", "其他-虚拟(财务成本归结)", pk_org);// 部门:其他虚拟财务
 				ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
@@ -1302,7 +1309,7 @@ public class SocialInsuranceAllocationUI extends ToftPanel {
 				debitamount = entry.getValue();// 借方发生额
 				pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
 				DetailVO itemVO = new DetailVO();
-				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + year + "年" + month + "月 社保");
+				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 社保");
 				itemarr.add(itemVO);
 			} else if ("其他应收款/个人往来".equals(key)) {
 				km_code = "122102";// 其他应收款/个人往来
@@ -1315,10 +1322,10 @@ public class SocialInsuranceAllocationUI extends ToftPanel {
 						String checkCode = checkCode_name.split(",")[0];
 						String userName = checkCode_name.split(",")[1];
 						UFDouble debitamountOrg = tableOneOrgEntry.getValue();// 借方发生额
-						if (debitamountOrg.doubleValue() != 0) {
+						if (debitamountOrg.doubleValue() != 0) {// 2025-03-13
 							debitamounttotal = debitamounttotal.add(debitamountOrg);
 							DetailVO itemVO = new DetailVO();
-							getDetailvo(itemVO, pk_accasoa, creditamount, debitamountOrg, voucher, "缴纳" + year + "年" + month + "月 社保 " + userName);
+							getDetailvo(itemVO, pk_accasoa, creditamount, debitamountOrg, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 社保 " + userName);
 							// 辅助核算
 							AssVO[] assvos = getAss(pk_accasoa, "0002", psndocCode(checkCode), pk_org);// 人员
 							ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
@@ -1339,7 +1346,7 @@ public class SocialInsuranceAllocationUI extends ToftPanel {
 						if (debitamountSelf.doubleValue() != 0) {
 							debitamounttotal = debitamounttotal.add(debitamountSelf);
 							DetailVO itemVO = new DetailVO();
-							getDetailvo(itemVO, pk_accasoa, creditamount, debitamountSelf, voucher, "缴纳" + year + "年" + month + "月 社保 " + userName + "-实际已缴个人未扣");
+							getDetailvo(itemVO, pk_accasoa, creditamount, debitamountSelf, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 社保 " + userName + "-实际已缴个人未扣");
 							// 辅助核算
 							AssVO[] assvos = getAss(pk_accasoa, "0002", psndocCode(checkCode), pk_org);// 人员
 							ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
@@ -1353,31 +1360,42 @@ public class SocialInsuranceAllocationUI extends ToftPanel {
 			} else if ("应付账款/预估成本/办公费".equals(key)) {
 				km_code = "22020205";// 应付账款/预估成本/办公费
 				debitamount = entry.getValue();// 借方发生额
-				pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
-				DetailVO itemVO = new DetailVO();
-				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + year + "年" + month + "月 社保 姜艳-全额代付");
-				// 辅助核算
-				AssVO[] assvos1 = getAss(pk_accasoa, "0001", "结构三所", pk_org);// 部门:结构三所
-				AssVO[] assvos = getAss(pk_accasoa, "0010", "PM201601130001", pk_org);// 项目:其他
-				AssVO[] assvos2 = getAss(pk_accasoa, "0043", "99", pk_org);// 项目专业:不涉及
-				ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
-				arrassvo.add(assvos1[0]);
-				arrassvo.add(assvos[0]);
-				arrassvo.add(assvos2[0]);
-				itemVO.setAss((AssVO[]) arrassvo.toArray(new AssVO[0]));
-				itemarr.add(itemVO);
+				if(null!=debitamount){
+					pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
+					DetailVO itemVO = new DetailVO();
+					getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 社保 姜艳-全额代付");
+					// 辅助核算  2025-03-13
+					ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
+					AssVO[] assvos = getAss(pk_accasoa, "0010", "PM201601130001", pk_org);// 项目:其他
+					AssVO[] assvos2 = getAss(pk_accasoa, "0043", "99", pk_org);// 项目专业:不涉及
+					if("000101".equals(orgCode)){// 2025-3-13
+						AssVO[] assvos1 = getAss(pk_accasoa, "0001", "结构三所", pk_org);// 部门:结构三所
+						arrassvo.add(assvos1[0]);	
+					}else{
+						AssVO[] assvos1 = getAss(pk_accasoa, "0001", "其他-虚拟(财务成本归结)", pk_org);// 部门:其他虚拟财务
+						arrassvo.add(assvos1[0]);
+					}
+					arrassvo.add(assvos[0]);
+					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();// 借方发生额
-				pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
-				DetailVO itemVO = new DetailVO();
-				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + year + "年" + month + "月 社保 尤咏杰");
-				// 辅助核算:上海茗杰商务咨询有限公司
-				AssVO[] assvos = getAss(pk_accasoa, "0004", "G006353", pk_org);// 客商
-				ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
-				arrassvo.add(assvos[0]);
-				itemVO.setAss((AssVO[]) arrassvo.toArray(new AssVO[0]));
-				itemarr.add(itemVO);
+				if(debitamount.doubleValue() != 0){// 判断外部公司承担表公司部分是否为0(龙咏杰特殊处理)
+					pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
+					DetailVO itemVO = new DetailVO();
+					getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 社保 尤咏杰");
+					// 辅助核算:上海茗杰商务咨询有限公司
+					AssVO[] assvos = getAss(pk_accasoa, "0004", "G006353", pk_org);// 客商
+					ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
+					arrassvo.add(assvos[0]);
+					itemVO.setAss((AssVO[]) arrassvo.toArray(new AssVO[0]));
+					itemarr.add(itemVO);	
+				}
+				
 			}
 			// else if ("其他应收款/内部往来".equals(key)) {
 			// // 取表四个人部分合计包含各个子公司,每个公司一条明细
@@ -1409,7 +1427,7 @@ public class SocialInsuranceAllocationUI extends ToftPanel {
 				debitamount = entry.getValue();// 借方发生额
 				pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
 				DetailVO itemVO = new DetailVO();
-				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + year + "年" + month + "月 社保 ");
+				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 社保 ");
 				itemarr.add(itemVO);
 			} else if ("预付账款/待摊费用/贷方".equals(key)) {
 				// km_code = "220201";// 应付账款/实际应付款
@@ -1417,7 +1435,7 @@ public class SocialInsuranceAllocationUI extends ToftPanel {
 				creditamount = entry.getValue();// 贷方发生额
 				pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
 				DetailVO itemVO = new DetailVO();
-				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + year + "年" + month + "月 社保 ");
+				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 社保 ");
 				// 辅助核算
 				// AssVO[] assvos = getAss(pk_accasoa, "0004", "G007461", pk_org);// 客商:上海市社保险事业管理中心
 				AssVO[] assvos = getAss(pk_accasoa, "05", "09", pk_org);// 待摊事项:社保摊销
@@ -1439,7 +1457,7 @@ public class SocialInsuranceAllocationUI extends ToftPanel {
 						if (creditamountOrg.doubleValue() != 0) {
 							debitamounttotal = debitamounttotal.add(creditamountOrg);
 							DetailVO itemVO = new DetailVO();
-							getDetailvo(itemVO, pk_accasoa, creditamountOrg, debitamount, voucher, "缴纳" + year + "年" + month + "月 社保 " + userName + "-实际未缴个人已扣");
+							getDetailvo(itemVO, pk_accasoa, creditamountOrg, debitamount, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 社保 " + userName + "-实际未缴个人已扣");
 							// 辅助核算
 							AssVO[] assvos = getAss(pk_accasoa, "0002", psndocCode(checkCode), pk_org);// 人员
 							ArrayList<AssVO> arrassvo = new ArrayList<AssVO>();
@@ -1455,7 +1473,7 @@ public class SocialInsuranceAllocationUI extends ToftPanel {
 				creditamount = entry.getValue();// 贷方发生额
 				pk_accasoa = tranKm(km_code, pk_accountGlbook);// 科目
 				DetailVO itemVO = new DetailVO();
-				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + year + "年" + month + "月 社保 ");
+				getDetailvo(itemVO, pk_accasoa, creditamount, debitamount, voucher, "缴纳" + yearperiod + "年" + monthperiod + "月 社保 ");
 				itemarr.add(itemVO);
 			}
 		}