|
@@ -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){
|
|
|
+
|
|
|
+ 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){
|
|
|
+ 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 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);
|
|
@@ -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) {
|
|
|
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 + "月 社保 姜艳-全额代付");
|
|
|
+
|
|
|
+ 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)){
|
|
|
+ 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){
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -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)) {
|
|
|
|
|
@@ -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, "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);
|
|
|
}
|
|
|
}
|