付款单,已设置“结构性清账客户映射表” and 业务小类=全部金蝶清账的,是否需要下推清账单的才需要勾选
This commit is contained in:
parent
ce1ede80ac
commit
b3c9d91f83
|
|
@ -182,6 +182,7 @@ public class RecBillFromPlugin extends AbstractFormPlugin implements Plugin {
|
||||||
if (null != bizSmall) {
|
if (null != bizSmall) {
|
||||||
String string = bizSmall.getString("shjh_qzfs");//业务小类中的清账方式
|
String string = bizSmall.getString("shjh_qzfs");//业务小类中的清账方式
|
||||||
DynamicObjectCollection entryEntity = this.getModel().getEntryEntity("entry");
|
DynamicObjectCollection entryEntity = this.getModel().getEntryEntity("entry");
|
||||||
|
DynamicObject currentorg = (DynamicObject) this.getModel().getValue("org");//单据所属当前公司
|
||||||
//当收款单【业务小类】清账方式字段=全部金蝶清账
|
//当收款单【业务小类】清账方式字段=全部金蝶清账
|
||||||
if ("qbjdqz".equals(string)) {
|
if ("qbjdqz".equals(string)) {
|
||||||
//判断收款单中的客户信息,是否在《结构性清账客户映射表》中
|
//判断收款单中的客户信息,是否在《结构性清账客户映射表》中
|
||||||
|
|
@ -195,9 +196,11 @@ public class RecBillFromPlugin extends AbstractFormPlugin implements Plugin {
|
||||||
this.getModel().setValue("shjh_closingstatus", "A", i);//无需金蝶清账
|
this.getModel().setValue("shjh_closingstatus", "A", i);//无需金蝶清账
|
||||||
}
|
}
|
||||||
if (null != value && "bd_customer".equals(this.getModel().getValue(RecFieldsInfo.PAYER_TYPE))) {
|
if (null != value && "bd_customer".equals(this.getModel().getValue(RecFieldsInfo.PAYER_TYPE))) {
|
||||||
DynamicObject customerObj = BusinessDataServiceHelper.loadSingle(value, "bd_customer");
|
// DynamicObject customerObj = BusinessDataServiceHelper.loadSingle(value, "bd_customer");
|
||||||
QFilter number = new QFilter("shjh_customer.number", QCP.equals, customerObj.getString("number"));
|
QFilter mapnumber = new QFilter("shjh_customer.id", QCP.equals, value);
|
||||||
DynamicObject mappingObj = BusinessDataServiceHelper.loadSingle("shjh_jgqzcust", number.toArray());
|
mapnumber.and("enable", QCP.equals, "1");//是否可用
|
||||||
|
mapnumber.and("shjh_org.id", QCP.equals, currentorg.getLong("id"));//公司
|
||||||
|
DynamicObject mappingObj = BusinessDataServiceHelper.loadSingle("shjh_jgqzcust", mapnumber.toArray());
|
||||||
if (null != mappingObj) {
|
if (null != mappingObj) {
|
||||||
for (int i = 0; i < entryEntity.size(); i++) {
|
for (int i = 0; i < entryEntity.size(); i++) {
|
||||||
this.getModel().setValue("shjh_needpushbill", true, i);//需要下推清账单
|
this.getModel().setValue("shjh_needpushbill", true, i);//需要下推清账单
|
||||||
|
|
@ -213,8 +216,10 @@ public class RecBillFromPlugin extends AbstractFormPlugin implements Plugin {
|
||||||
}else{
|
}else{
|
||||||
//当客户拆分=是,以分录客户来判断
|
//当客户拆分=是,以分录客户来判断
|
||||||
for (int i = 0; i < entryEntity.size(); i++) {
|
for (int i = 0; i < entryEntity.size(); i++) {
|
||||||
QFilter number = new QFilter("shjh_customer.number", QCP.equals, entryEntity.get(i).getString("shjh_entrycustomer.number"));
|
QFilter mapnumber = new QFilter("shjh_customer.number", QCP.equals, entryEntity.get(i).getString("shjh_entrycustomer.number"));
|
||||||
DynamicObject mappingObj = BusinessDataServiceHelper.loadSingle("shjh_jgqzcust", number.toArray());
|
mapnumber.and("enable", QCP.equals, "1");//是否可用
|
||||||
|
mapnumber.and("shjh_org.id", QCP.equals, currentorg.getLong("id"));//公司
|
||||||
|
DynamicObject mappingObj = BusinessDataServiceHelper.loadSingle("shjh_jgqzcust", mapnumber.toArray());
|
||||||
if (null != mappingObj) {
|
if (null != mappingObj) {
|
||||||
this.getModel().setValue("shjh_needpushbill", true, i);
|
this.getModel().setValue("shjh_needpushbill", true, i);
|
||||||
}else{
|
}else{
|
||||||
|
|
@ -263,10 +268,13 @@ public class RecBillFromPlugin extends AbstractFormPlugin implements Plugin {
|
||||||
}
|
}
|
||||||
DynamicObjectCollection entryEntity = this.getModel().getEntryEntity("entry");
|
DynamicObjectCollection entryEntity = this.getModel().getEntryEntity("entry");
|
||||||
if(iskdqbqz){
|
if(iskdqbqz){
|
||||||
|
DynamicObject currentorg = (DynamicObject) this.getModel().getValue("org");//单据所属当前公司
|
||||||
//业务小类是全部金蝶清账,再判断结构性客户
|
//业务小类是全部金蝶清账,再判断结构性客户
|
||||||
for (int i = 0; i < entryEntity.size(); i++) {
|
for (int i = 0; i < entryEntity.size(); i++) {
|
||||||
QFilter number = new QFilter("shjh_customer.number", QCP.equals, entryEntity.get(i).getString("shjh_entrycustomer.number"));
|
QFilter mapnumber = new QFilter("shjh_customer.number", QCP.equals, entryEntity.get(i).getString("shjh_entrycustomer.number"));
|
||||||
DynamicObject mappingObj = BusinessDataServiceHelper.loadSingle("shjh_jgqzcust", number.toArray());
|
mapnumber.and("enable", QCP.equals, "1");//是否可用
|
||||||
|
mapnumber.and("shjh_org.id", QCP.equals, currentorg.getLong("id"));//公司
|
||||||
|
DynamicObject mappingObj = BusinessDataServiceHelper.loadSingle("shjh_jgqzcust", mapnumber.toArray());
|
||||||
if (null != mappingObj) {
|
if (null != mappingObj) {
|
||||||
this.getModel().setValue("shjh_needpushbill", true, i);//需要下推清账单
|
this.getModel().setValue("shjh_needpushbill", true, i);//需要下推清账单
|
||||||
this.getModel().setValue("shjh_closingstatus", "B", i);//待清账
|
this.getModel().setValue("shjh_closingstatus", "B", i);//待清账
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,9 @@ public class RecBillSaveOperation extends AbstractOperationServicePlugIn impleme
|
||||||
bill.set("shjh_qzzt", "A");//无需金蝶清账
|
bill.set("shjh_qzzt", "A");//无需金蝶清账
|
||||||
}else{
|
}else{
|
||||||
//根据收款单付款人id判断,此时的付款类型是客户
|
//根据收款单付款人id判断,此时的付款类型是客户
|
||||||
QFilter mapnumber = new QFilter("shjh_customer.id", QCP.equals, bill.getLong("payer"));
|
QFilter mapnumber = new QFilter("shjh_customer.id", QCP.equals, bill.getLong("payer"));//客户
|
||||||
|
mapnumber.and("enable", QCP.equals, "1");//是否可用
|
||||||
|
mapnumber.and("shjh_org.id", QCP.equals, org.getLong("id"));//公司
|
||||||
DynamicObject mappingObj = BusinessDataServiceHelper.loadSingle("shjh_jgqzcust", mapnumber.toArray());
|
DynamicObject mappingObj = BusinessDataServiceHelper.loadSingle("shjh_jgqzcust", mapnumber.toArray());
|
||||||
if(mappingObj != null){
|
if(mappingObj != null){
|
||||||
//结构性清账客户映射表中有值
|
//结构性清账客户映射表中有值
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue