|
@@ -12,6 +12,7 @@ import java.util.List;
|
|
|
import java.util.Locale;
|
|
|
import java.util.Map;
|
|
|
|
|
|
+import uap.distribution.dao.DAOException;
|
|
|
import nc.bs.dao.BaseDAO;
|
|
|
import nc.bs.framework.common.InvocationInfoProxy;
|
|
|
import nc.bs.framework.common.NCLocator;
|
|
@@ -37,7 +38,6 @@ import nc.vo.pub.lang.UFDouble;
|
|
|
import nc.vo.pub.lang.UFLiteralDate;
|
|
|
import nc.vo.pubapp.pattern.exception.ExceptionUtils;
|
|
|
import nc.vo.pubapp.pflow.PfUserObject;
|
|
|
-import uap.distribution.dao.DAOException;
|
|
|
|
|
|
public class HrLaborcostcopyPlugin implements IBackgroundWorkPlugin {
|
|
|
|
|
@@ -78,12 +78,10 @@ public class HrLaborcostcopyPlugin implements IBackgroundWorkPlugin {
|
|
|
Map<String, String> pk_suppliermap = null;
|
|
|
Map<String, String> orgnamemap = null;
|
|
|
Map<String, List<String>> mapsl = null;
|
|
|
- // 2025-03-28
|
|
|
Map<String, String> outlaytypeMemoMap = null;
|
|
|
try {
|
|
|
pndocIDMap = getPsndocID();// 人员主键
|
|
|
outlaytypeIDMap = getOutlaytypeID();// 费用归属类别id
|
|
|
- // 2025-03-28
|
|
|
outlaytypeMemoMap = getOutlaytypeMemo();// 费用归属类别备注
|
|
|
xzsxIDMap = getXzsxID();// 薪资事项id
|
|
|
islssuedIDMap = getIslssuedID();// 是否代发id
|
|
@@ -147,15 +145,7 @@ public class HrLaborcostcopyPlugin implements IBackgroundWorkPlugin {
|
|
|
ExceptionUtils.wrappBusinessException(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
-// List<String> orglist = new ArrayList<String>();
|
|
|
-// for (Map<String, String> map : listCostMap1) {
|
|
|
-// String wa_org = map.get("wa_org");
|
|
|
-// if (wa_org != null && !"null".equals(wa_org) ) {
|
|
|
-// if (!orglist.contains(wa_org))
|
|
|
-// orglist.add(wa_org);
|
|
|
-// }
|
|
|
-// }
|
|
|
- // start 2025-03-25
|
|
|
+
|
|
|
List<String> wa_costorglist = new ArrayList<String>();
|
|
|
for (Map<String, String> map : listCostMap1) {
|
|
|
String wa_org = map.get("wa_org");
|
|
@@ -166,12 +156,12 @@ public class HrLaborcostcopyPlugin implements IBackgroundWorkPlugin {
|
|
|
wa_costorglist.add(wa_costorg);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
for (int j = 0; j < wa_costorglist.size(); j++) {
|
|
|
try {
|
|
|
String wa_costorg = wa_costorglist.get(j);
|
|
|
String waorg = wa_costorg.split(",")[0];
|
|
|
String costorg = wa_costorg.split(",")[1];
|
|
|
- // end 2025-03-25
|
|
|
UFDouble debitamounttotal = new UFDouble();
|
|
|
AggReceivableBillVO aggReceivableBillVO = new AggReceivableBillVO();
|
|
|
ReceivableBillVO receivableBillVO = new ReceivableBillVO();
|
|
@@ -197,7 +187,7 @@ public class HrLaborcostcopyPlugin implements IBackgroundWorkPlugin {
|
|
|
receivableBillVO.setPk_deptid(GetDataUtil.getDeptPK(""));// 收款部门
|
|
|
String pk_bankaccsub = GetDataUtil.getBankaccsubPK("");// 收款账户
|
|
|
receivableBillVO.setRecaccount(pk_bankaccsub);// 收款银行账户
|
|
|
- receivableBillVO.setPk_busitype(GetDataUtil.getBusitypePK("AR01"));// 业务流程:选择收款
|
|
|
+ receivableBillVO.setPk_busitype(getBusitypePK("AR01",pk_group));// 业务流程:选择收款
|
|
|
receivableBillVO.setBillclass("ys");// 单据大类:应收单
|
|
|
String year = date2.substring(0, 4);// 会计年度
|
|
|
String month = date2.substring(4, 6);// 会计月份
|
|
@@ -260,8 +250,8 @@ public class HrLaborcostcopyPlugin implements IBackgroundWorkPlugin {
|
|
|
UFDouble total = new UFDouble(decimalmny.toString());
|
|
|
debitamounttotal = debitamounttotal.add(total);
|
|
|
Double dtotal = -total.toDouble();
|
|
|
+
|
|
|
UFDouble fstotal = new UFDouble(dtotal);
|
|
|
- // 2025-03-25
|
|
|
if (waorg.equals(wa_org) && costorg.equals(cost_org)) {
|
|
|
// 赋值子表数据
|
|
|
receivableBillItemVO.setPk_org(pk_org);
|
|
@@ -775,6 +765,16 @@ public class HrLaborcostcopyPlugin implements IBackgroundWorkPlugin {
|
|
|
}
|
|
|
return pk_customer;
|
|
|
}
|
|
|
+
|
|
|
+ // 业务流程
|
|
|
+ private String getBusitypePK(String code,String pk_group) throws Exception {
|
|
|
+ String sql = "select pk_busitype from bd_busitype where busicode = '"+code+"' and pk_group = '"+pk_group+"' and validity = '1' and nvl(dr,0) = 0";
|
|
|
+ String pk_busitype = (String) iuap.executeQuery(sql, new ColumnProcessor());
|
|
|
+ if (pk_busitype == null) {
|
|
|
+ throw new Exception("获取业务流程信息失败,未找到与参数" + code + "有关的数据!");
|
|
|
+ }
|
|
|
+ return pk_busitype;
|
|
|
+ }
|
|
|
|
|
|
// 获取相差月份最后一天addMonth==0 当月 1 下月
|
|
|
private String getMonthLastDate(Date date, int addMonth) {
|