资金计划优化
This commit is contained in:
parent
a56a7a8266
commit
f1660b0c23
|
|
@ -165,7 +165,7 @@ public class FundPlanCollectionTask extends AbstractTask implements Plugin {
|
||||||
}
|
}
|
||||||
months = JhzjUtils.getFundPeriodBySAPDate(months);
|
months = JhzjUtils.getFundPeriodBySAPDate(months);
|
||||||
//根据品牌和事业部关系,将该笔金额归属到事业部上
|
//根据品牌和事业部关系,将该笔金额归属到事业部上
|
||||||
ppsybinfo = BusinessDataServiceHelper.loadSingleFromCache(ppsybName,new QFilter[]{new QFilter("shjh_pp", QCP.equals, productnum)});
|
ppsybinfo = BusinessDataServiceHelper.loadSingleFromCache(ppsybName,new QFilter[]{new QFilter("shjh_productgroup.number", QCP.equals, productnum)});
|
||||||
if(ppsybinfo != null){
|
if(ppsybinfo != null){
|
||||||
sybnum = ppsybinfo.getDynamicObject("shjh_division").getString("number");
|
sybnum = ppsybinfo.getDynamicObject("shjh_division").getString("number");
|
||||||
mapkey = sybnum+months+accountnum;
|
mapkey = sybnum+months+accountnum;
|
||||||
|
|
@ -176,6 +176,7 @@ public class FundPlanCollectionTask extends AbstractTask implements Plugin {
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
//TODO 如果品牌没有对应的事业部时,数据放哪里?
|
//TODO 如果品牌没有对应的事业部时,数据放哪里?
|
||||||
|
logger.info("根据SAP的品牌编号未找到对应的品牌和事业部关系"+productnum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return acctamountMap;
|
return acctamountMap;
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@ public class FundPlanPaymentTask extends AbstractTask implements Plugin {
|
||||||
}
|
}
|
||||||
months = JhzjUtils.getFundPeriodBySAPDate(months);
|
months = JhzjUtils.getFundPeriodBySAPDate(months);
|
||||||
//根据二级部门和事业部关系,将该笔金额归属到事业部上
|
//根据二级部门和事业部关系,将该笔金额归属到事业部上
|
||||||
ppsybinfo = BusinessDataServiceHelper.loadSingleFromCache(ppsybName,new QFilter[]{new QFilter("shjh_orgdept", QCP.equals, deptnum)});
|
ppsybinfo = BusinessDataServiceHelper.loadSingleFromCache(ppsybName,new QFilter[]{new QFilter("shjh_orgdept.number", QCP.equals, deptnum)});
|
||||||
if(ppsybinfo != null){
|
if(ppsybinfo != null){
|
||||||
sybnum = ppsybinfo.getDynamicObject("shjh_division").getString("number");
|
sybnum = ppsybinfo.getDynamicObject("shjh_division").getString("number");
|
||||||
mapkey = sybnum+months+accountnum;
|
mapkey = sybnum+months+accountnum;
|
||||||
|
|
@ -181,6 +181,7 @@ public class FundPlanPaymentTask extends AbstractTask implements Plugin {
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
//TODO 如果二级部门没有对应的事业部时,数据放哪里?
|
//TODO 如果二级部门没有对应的事业部时,数据放哪里?
|
||||||
|
logger.info("根据SAP的二级部门编号未找到对应的二级部门和事业部关系"+deptnum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return acctamountMap;
|
return acctamountMap;
|
||||||
|
|
@ -287,24 +288,58 @@ public class FundPlanPaymentTask extends AbstractTask implements Plugin {
|
||||||
boolean notorgFlag;
|
boolean notorgFlag;
|
||||||
boolean suppFlag;
|
boolean suppFlag;
|
||||||
boolean notsuppFlag;
|
boolean notsuppFlag;
|
||||||
|
String sapbillno;
|
||||||
|
String kdbilltype;
|
||||||
|
boolean billTypeFlag;
|
||||||
|
boolean notbillTypeFlag;
|
||||||
for (int i = 0; i < pzblist.size(); i++) {
|
for (int i = 0; i < pzblist.size(); i++) {
|
||||||
pzbinfo = pzblist.get(i);
|
pzbinfo = pzblist.get(i);
|
||||||
yymFlag = getDOInFlag(pzbinfo,"shjh_yym",sapresult.getString(""));//原因码
|
yymFlag = getDOInFlag(pzbinfo,"shjh_yym",sapresult.getString(""));//原因码
|
||||||
|
if(!yymFlag){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
kmbhFlag = getDOInFlag(pzbinfo,"shjh_kjkm",sapresult.getString(""));//会计科目
|
kmbhFlag = getDOInFlag(pzbinfo,"shjh_kjkm",sapresult.getString(""));//会计科目
|
||||||
|
if(!kmbhFlag){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
orgFlag = getDOInFlag(pzbinfo,"shjh_companys",sapresult.getString(""));//公司范围
|
orgFlag = getDOInFlag(pzbinfo,"shjh_companys",sapresult.getString(""));//公司范围
|
||||||
|
if(!orgFlag){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
suppFlag = getDOInFlag(pzbinfo,"shjh_supplier",sapresult.getString(""));//包含供应商
|
suppFlag = getDOInFlag(pzbinfo,"shjh_supplier",sapresult.getString(""));//包含供应商
|
||||||
|
if(!suppFlag){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
bizbigFlag = getDOInFlag(pzbinfo,"shjh_bizbig",sapresult.getString(""));//业务大类
|
bizbigFlag = getDOInFlag(pzbinfo,"shjh_bizbig",sapresult.getString(""));//业务大类
|
||||||
|
if(!bizbigFlag){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
bizsmallFlag = getDOInFlag(pzbinfo,"shjh_bizsmall",sapresult.getString(""));//业务小类
|
bizsmallFlag = getDOInFlag(pzbinfo,"shjh_bizsmall",sapresult.getString(""));//业务小类
|
||||||
|
if(!bizsmallFlag){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
notsuppFlag = getDOOutFlag(pzbinfo,"shjh_bbhgys",sapresult.getString(""));//不包含供应商
|
notsuppFlag = getDOOutFlag(pzbinfo,"shjh_bbhgys",sapresult.getString(""));//不包含供应商
|
||||||
|
if(!notsuppFlag){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
notorgFlag = getDOOutFlag(pzbinfo,"shjh_bbhzz",sapresult.getString(""));//不包含公司
|
notorgFlag = getDOOutFlag(pzbinfo,"shjh_bbhzz",sapresult.getString(""));//不包含公司
|
||||||
|
if(!notorgFlag){
|
||||||
getBooleanFlag(pzbinfo,"shjh_czl",sapresult.getString(""));//是否充值类
|
continue;
|
||||||
getBooleanFlag(pzbinfo,"shjh_zxcg",sapresult.getString(""));//是否自行采购
|
}
|
||||||
getBooleanFlag(pzbinfo,"shjh_poisnull",sapresult.getString(""));//PO号是否为空
|
// getBooleanFlag(pzbinfo,"shjh_czl",sapresult.getString(""));//是否充值类
|
||||||
|
// getBooleanFlag(pzbinfo,"shjh_zxcg",sapresult.getString(""));//是否自行采购
|
||||||
getInTextFlag(pzbinfo,"shjh_billtype",sapresult.getString(""));//包含的单据类型
|
// getBooleanFlag(pzbinfo,"shjh_poisnull",sapresult.getString(""));//PO号是否为空
|
||||||
getOutTextFlag(pzbinfo,"shjh_bbhdjlx",sapresult.getString(""));//不包含的单据类型
|
sapbillno = sapresult.getString("XBLNR");//sap单据号
|
||||||
|
kdbilltype = JhzjUtils.getBillTypeForSAP(sapbillno);//根据sap单据号获取对应的金蝶单据类型
|
||||||
|
billTypeFlag = getInTextFlag(pzbinfo,"shjh_billtype",kdbilltype);//包含的单据类型
|
||||||
|
if(!billTypeFlag){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
notbillTypeFlag = getOutTextFlag(pzbinfo,"shjh_bbhdjlx",kdbilltype);//不包含的单据类型
|
||||||
|
if(!notbillTypeFlag){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,44 @@ public class JhzjUtils {
|
||||||
return isocode;
|
return isocode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据sap中的单据号字段,找到金蝶对应的单据类型
|
||||||
|
* @param sapbillno sap单据号
|
||||||
|
*/
|
||||||
|
public static String getBillTypeForSAP(String sapbillno){
|
||||||
|
if(isEmpty(sapbillno)){
|
||||||
|
return null;
|
||||||
|
}else if (sapbillno.contains("JKY")) {
|
||||||
|
return "A";//员工借款单
|
||||||
|
// ap_payapply_entry.set("e_paymenttype", paytype_s);//对私
|
||||||
|
}else if (sapbillno.contains("TYB")) {
|
||||||
|
return "B";//通用报销单
|
||||||
|
// ap_payapply_entry.set("e_paymenttype", paytype_s);//对私
|
||||||
|
}else if (sapbillno.contains("CLB")) {
|
||||||
|
return "C";//差旅报销单
|
||||||
|
// ap_payapply_entry.set("e_paymenttype", paytype_s);//对私
|
||||||
|
}else if (sapbillno.contains("LWB")) {
|
||||||
|
return "D";//劳务人员报销单
|
||||||
|
// ap_payapply_entry.set("e_paymenttype", paytype_s);//对私
|
||||||
|
}else if (sapbillno.contains("YFK")) {
|
||||||
|
return "E";//预付款单
|
||||||
|
// ap_payapply_entry.set("e_paymenttype", paytype_g);//对公
|
||||||
|
}else if (sapbillno.contains("JCW")) {
|
||||||
|
return "F";//请款单无订单
|
||||||
|
// ap_payapply_entry.set("e_paymenttype", paytype_g);//对公
|
||||||
|
}else if (sapbillno.contains("FWK")) { //服务付款单
|
||||||
|
return "G";
|
||||||
|
// ap_payapply_entry.set("e_paymenttype", paytype_g);//对公
|
||||||
|
}else if (sapbillno.contains("TFK")) {
|
||||||
|
return "I";//其他付款单
|
||||||
|
// ap_payapply_entry.set("e_paymenttype", paytype_g);//对公
|
||||||
|
}else if (sapbillno.contains("SPA")) {
|
||||||
|
return "J";//SPA会员退卡申请单
|
||||||
|
// ap_payapply_entry.set("e_paymenttype", paytype_g);//对公
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将认领公告列表组装成html语句中的table
|
* 将认领公告列表组装成html语句中的table
|
||||||
* @param billlist 认领公告的列表
|
* @param billlist 认领公告的列表
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue