Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
6a1a850c57
|
@ -27,34 +27,36 @@ public class AutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements Plug
|
||||||
//costcompany
|
//costcompany
|
||||||
Object company = this.getModel().getValue("costcompany");//核算组织(费用承担公司)
|
Object company = this.getModel().getValue("costcompany");//核算组织(费用承担公司)
|
||||||
Long currentOrgId = RequestContext.get().getOrgId();
|
Long currentOrgId = RequestContext.get().getOrgId();
|
||||||
DynamicObject companyObj = (DynamicObject)company;
|
if(company != null){
|
||||||
Long companyId = companyObj.getLong("id");
|
DynamicObject companyObj = (DynamicObject)company;
|
||||||
if(OrgCheckUtils.isKS(companyId)){
|
Long companyId = companyObj.getLong("id");
|
||||||
String name = e.getProperty().getName();
|
if(OrgCheckUtils.isKS(companyId)){
|
||||||
if(name.equals("zcgj_startdate") ||name.equals("zcgj_enddate")){
|
String name = e.getProperty().getName();
|
||||||
ChangeData[] changeSet = e.getChangeSet();
|
if(name.equals("zcgj_startdate") ||name.equals("zcgj_enddate")){
|
||||||
int rowIndex = changeSet[0].getRowIndex();
|
ChangeData[] changeSet = e.getChangeSet();
|
||||||
int count = calHomeentityDay(rowIndex);
|
int rowIndex = changeSet[0].getRowIndex();
|
||||||
this.getModel().setValue("zcgj_kccbdays",count);
|
int count = calHomeentityDay(rowIndex);
|
||||||
}else if("zcgj_holiday_start_time".equals(name) || "zcgj_holiday_end_time".equals(name)){
|
this.getModel().setValue("zcgj_kccbdays",count);
|
||||||
boolean isVisit = (boolean)this.getModel().getValue("zcgj_is_visit");
|
}else if("zcgj_holiday_start_time".equals(name) || "zcgj_holiday_end_time".equals(name)){
|
||||||
if(isVisit){
|
boolean isVisit = (boolean)this.getModel().getValue("zcgj_is_visit");
|
||||||
calVisitDay();
|
if(isVisit){
|
||||||
}
|
calVisitDay();
|
||||||
}else if(name.equals("zcgj_is_home") ){
|
}
|
||||||
boolean isHome = (boolean)this.getModel().getValue("zcgj_is_home");
|
}else if(name.equals("zcgj_is_home") ){
|
||||||
if(isHome){
|
boolean isHome = (boolean)this.getModel().getValue("zcgj_is_home");
|
||||||
calHomeentityDay();
|
if(isHome){
|
||||||
}else{
|
calHomeentityDay();
|
||||||
this.getModel().setValue("zcgj_kccbdays",null);
|
}else{
|
||||||
this.getModel().deleteEntryData("zcgj_homeentity");
|
this.getModel().setValue("zcgj_kccbdays",null);
|
||||||
}
|
this.getModel().deleteEntryData("zcgj_homeentity");
|
||||||
}else if(name.equals("zcgj_is_visit")){
|
}
|
||||||
boolean isVisit = (boolean)this.getModel().getValue("zcgj_is_visit");
|
}else if(name.equals("zcgj_is_visit")){
|
||||||
if(isVisit){
|
boolean isVisit = (boolean)this.getModel().getValue("zcgj_is_visit");
|
||||||
calVisitDay();
|
if(isVisit){
|
||||||
}else{
|
calVisitDay();
|
||||||
this.getModel().deleteEntryData("zcgj_homeentity");
|
}else{
|
||||||
|
this.getModel().deleteEntryData("zcgj_homeentity");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,7 +122,6 @@ public class CostcompanyDefaultPlugin extends AbstractBillPlugIn implements Plu
|
||||||
@Override
|
@Override
|
||||||
public void itemClick(ItemClickEvent evt) {
|
public void itemClick(ItemClickEvent evt) {
|
||||||
//费用项目设置为默认
|
//费用项目设置为默认
|
||||||
|
|
||||||
Object company = this.getModel().getValue("costcompany");//核算组织
|
Object company = this.getModel().getValue("costcompany");//核算组织
|
||||||
if (company!=null && evt.getItemKey().equals("addloancheck1")) {
|
if (company!=null && evt.getItemKey().equals("addloancheck1")) {
|
||||||
DynamicObject companyObj = (DynamicObject)company;
|
DynamicObject companyObj = (DynamicObject)company;
|
||||||
|
@ -163,33 +162,36 @@ public class CostcompanyDefaultPlugin extends AbstractBillPlugIn implements Plu
|
||||||
Long currentOrgId = RequestContext.get().getOrgId();
|
Long currentOrgId = RequestContext.get().getOrgId();
|
||||||
//当前所在的组织是属于矿山下的 costcompany
|
//当前所在的组织是属于矿山下的 costcompany
|
||||||
//costcompany 费用承担公司
|
//costcompany 费用承担公司
|
||||||
DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany");
|
Object costcompanyObjVal = this.getModel().getValue("costcompany");
|
||||||
long costcompanyId = costcompany.getLong("id");
|
if(costcompanyObjVal!=null){
|
||||||
if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(costcompanyId)){
|
DynamicObject costcompany = (DynamicObject)costcompanyObjVal;
|
||||||
EntryProp entryProp = e.getEntryProp();
|
long costcompanyId = costcompany.getLong("id");
|
||||||
DynamicProperty compareProp = entryProp.getCompareProp();
|
if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(costcompanyId)){
|
||||||
if("expenseentryentity".equals(compareProp.getName())){
|
EntryProp entryProp = e.getEntryProp();
|
||||||
RowDataEntity[] rowDatas = e.getRowDataEntities();
|
DynamicProperty compareProp = entryProp.getCompareProp();
|
||||||
String companyNumber = costcompany.getString("number");
|
if("expenseentryentity".equals(compareProp.getName())){
|
||||||
if (rowDatas.length > 0) {
|
RowDataEntity[] rowDatas = e.getRowDataEntities();
|
||||||
int rowIndex = rowDatas[0].getRowIndex();
|
String companyNumber = costcompany.getString("number");
|
||||||
DynamicObject costcompanyObj = null;
|
if (rowDatas.length > 0) {
|
||||||
//如果费用承担公司是五家本部公司
|
int rowIndex = rowDatas[0].getRowIndex();
|
||||||
if(OrgCheckUtils.testCompanyNumberSet.contains(companyNumber) || OrgCheckUtils.ksNumber.equals(companyNumber)){
|
DynamicObject costcompanyObj = null;
|
||||||
//费用承担部门带入到成本中心
|
//如果费用承担公司是五家本部公司
|
||||||
costcompanyObj= (DynamicObject)this.getModel().getValue("costdept");
|
if(OrgCheckUtils.testCompanyNumberSet.contains(companyNumber) || OrgCheckUtils.ksNumber.equals(companyNumber)){
|
||||||
}else{
|
//费用承担部门带入到成本中心
|
||||||
//费用承担公司带入到成本中心
|
costcompanyObj= (DynamicObject)this.getModel().getValue("costdept");
|
||||||
costcompanyObj= (DynamicObject)this.getModel().getValue("costcompany");
|
|
||||||
}
|
|
||||||
if(costcompanyObj!=null){
|
|
||||||
//bos_costcenter
|
|
||||||
QFilter numberFilter = new QFilter("number",QCP.equals,costcompanyObj.getString("number"));
|
|
||||||
DynamicObject[] dynamicObjectAccItem = BusinessDataServiceHelper.load("bos_costcenter", "number,name", new QFilter[]{numberFilter});
|
|
||||||
if(dynamicObjectAccItem!=null && dynamicObjectAccItem.length >0){
|
|
||||||
this.getModel().setValue("std_entrycostcenter", dynamicObjectAccItem[0], rowIndex);
|
|
||||||
}else{
|
}else{
|
||||||
this.getView().showErrorNotification("请设置成本中心!");
|
//费用承担公司带入到成本中心
|
||||||
|
costcompanyObj= (DynamicObject)this.getModel().getValue("costcompany");
|
||||||
|
}
|
||||||
|
if(costcompanyObj!=null){
|
||||||
|
//bos_costcenter
|
||||||
|
QFilter numberFilter = new QFilter("number",QCP.equals,costcompanyObj.getString("number"));
|
||||||
|
DynamicObject[] dynamicObjectAccItem = BusinessDataServiceHelper.load("bos_costcenter", "number,name", new QFilter[]{numberFilter});
|
||||||
|
if(dynamicObjectAccItem!=null && dynamicObjectAccItem.length >0){
|
||||||
|
this.getModel().setValue("std_entrycostcenter", dynamicObjectAccItem[0], rowIndex);
|
||||||
|
}else{
|
||||||
|
this.getView().showErrorNotification("请设置成本中心!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,16 +73,19 @@ public class DailyloanbillExpAccPlugin extends AbstractBillPlugIn implements Plu
|
||||||
Long currentOrgId = RequestContext.get().getOrgId();
|
Long currentOrgId = RequestContext.get().getOrgId();
|
||||||
//当前所在的组织是属于矿山下的 costcompany
|
//当前所在的组织是属于矿山下的 costcompany
|
||||||
//costcompany 费用承担公司
|
//costcompany 费用承担公司
|
||||||
DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany");
|
Object costcompanyObj = this.getModel().getValue("costcompany");
|
||||||
long costcompanyId = costcompany.getLong("id");
|
if(costcompanyObj!=null){
|
||||||
if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(costcompanyId)){
|
DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany");
|
||||||
BasedataEdit fieldEdit = this.getView().getControl(ACCOUNT_ITEM);
|
long costcompanyId = costcompany.getLong("id");
|
||||||
fieldEdit.addBeforeF7SelectListener(this);
|
if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(costcompanyId)){
|
||||||
fieldEdit.addAfterF7SelectListener(this);
|
BasedataEdit fieldEdit = this.getView().getControl(ACCOUNT_ITEM);
|
||||||
|
fieldEdit.addBeforeF7SelectListener(this);
|
||||||
|
fieldEdit.addAfterF7SelectListener(this);
|
||||||
|
|
||||||
BasedataEdit fieldEditExpense = this.getView().getControl(EXPENSE_ITEM);
|
BasedataEdit fieldEditExpense = this.getView().getControl(EXPENSE_ITEM);
|
||||||
fieldEditExpense.addBeforeF7SelectListener(this);
|
fieldEditExpense.addBeforeF7SelectListener(this);
|
||||||
fieldEditExpense.addAfterF7SelectListener(this);
|
fieldEditExpense.addAfterF7SelectListener(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,16 +67,19 @@ public class DailyreimbursExpAccPlugin extends AbstractBillPlugIn implements Plu
|
||||||
Long currentOrgId = RequestContext.get().getOrgId();
|
Long currentOrgId = RequestContext.get().getOrgId();
|
||||||
//当前所在的组织是属于矿山下的
|
//当前所在的组织是属于矿山下的
|
||||||
//costcompany 费用承担公司
|
//costcompany 费用承担公司
|
||||||
DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany");
|
Object costcompanyObj = this.getModel().getValue("costcompany");
|
||||||
long costcompanyId = costcompany.getLong("id");
|
if(costcompanyObj != null){
|
||||||
if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(costcompanyId)){
|
DynamicObject costcompany = (DynamicObject)costcompanyObj;
|
||||||
BasedataEdit fieldEdit = this.getView().getControl(ACCOUNT_ITEM);
|
long costcompanyId = costcompany.getLong("id");
|
||||||
fieldEdit.addBeforeF7SelectListener(this);
|
if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(costcompanyId)){
|
||||||
fieldEdit.addAfterF7SelectListener(this);
|
BasedataEdit fieldEdit = this.getView().getControl(ACCOUNT_ITEM);
|
||||||
|
fieldEdit.addBeforeF7SelectListener(this);
|
||||||
|
fieldEdit.addAfterF7SelectListener(this);
|
||||||
|
|
||||||
BasedataEdit fieldEditExpense = this.getView().getControl(EXPENSE_ITEM);
|
BasedataEdit fieldEditExpense = this.getView().getControl(EXPENSE_ITEM);
|
||||||
fieldEditExpense.addBeforeF7SelectListener(this);
|
fieldEditExpense.addBeforeF7SelectListener(this);
|
||||||
fieldEditExpense.addAfterF7SelectListener(this);
|
fieldEditExpense.addAfterF7SelectListener(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,33 +32,36 @@ public class DefaultExpenseItemPlugin extends AbstractBillPlugIn implements Plu
|
||||||
//通过费用承担公司找到行政组织,获取长名称,排除编码为'10006447','10007186','10006476','10006461','10006939'的
|
//通过费用承担公司找到行政组织,获取长名称,排除编码为'10006447','10007186','10006476','10006461','10006939'的
|
||||||
String rootOrgCode = "10006431";
|
String rootOrgCode = "10006431";
|
||||||
super.afterCreateNewData(e);
|
super.afterCreateNewData(e);
|
||||||
DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany");
|
Object costcompany1 = this.getModel().getValue("costcompany");
|
||||||
long id = costcompany.getLong("id");
|
if(costcompany1!=null){
|
||||||
|
DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany");
|
||||||
|
long id = costcompany.getLong("id");
|
||||||
|
|
||||||
List<String> orgNumList = new ArrayList<>();
|
List<String> orgNumList = new ArrayList<>();
|
||||||
orgNumList.add("10006447");
|
orgNumList.add("10006447");
|
||||||
orgNumList.add("10007186");
|
orgNumList.add("10007186");
|
||||||
orgNumList.add("10006476");
|
orgNumList.add("10006476");
|
||||||
orgNumList.add("10006461");
|
orgNumList.add("10006461");
|
||||||
orgNumList.add("10006939");
|
orgNumList.add("10006939");
|
||||||
QFilter filterOrgDepId = new QFilter("number", QCP.in,orgNumList);
|
QFilter filterOrgDepId = new QFilter("number", QCP.in,orgNumList);
|
||||||
DynamicObject[] adminOrg1 = BusinessDataServiceHelper.load("bos_org", "number,name,fullname", new QFilter[]{filterOrgDepId});
|
DynamicObject[] adminOrg1 = BusinessDataServiceHelper.load("bos_org", "number,name,fullname", new QFilter[]{filterOrgDepId});
|
||||||
Set<Long> idSet = Arrays.stream(adminOrg1).map(data -> data.getLong("id")).collect(Collectors.toSet());
|
Set<Long> idSet = Arrays.stream(adminOrg1).map(data -> data.getLong("id")).collect(Collectors.toSet());
|
||||||
//判断是不是在几家总部
|
//判断是不是在几家总部
|
||||||
if(!idSet.contains(id)){
|
if(!idSet.contains(id)){
|
||||||
QFilter filterOrgId = new QFilter("number", QCP.equals,rootOrgCode);//中材矿山建设有限公司
|
QFilter filterOrgId = new QFilter("number", QCP.equals,rootOrgCode);//中材矿山建设有限公司
|
||||||
DynamicObject adminOrg = BusinessDataServiceHelper.loadSingle("bos_org", "number,name,fullname", new QFilter[]{filterOrgId});
|
DynamicObject adminOrg = BusinessDataServiceHelper.loadSingle("bos_org", "number,name,fullname", new QFilter[]{filterOrgId});
|
||||||
long orgId = adminOrg.getLong("id");
|
long orgId = adminOrg.getLong("id");
|
||||||
List<Long> orgIds = new ArrayList<>(1);
|
List<Long> orgIds = new ArrayList<>(1);
|
||||||
//orgIds.add(1692204547985902592L);
|
//orgIds.add(1692204547985902592L);
|
||||||
orgIds.add(orgId);
|
orgIds.add(orgId);
|
||||||
List<Long> subOrgIds = OrgUnitServiceHelper.getAllSubordinateOrgs(1L, orgIds, true);
|
List<Long> subOrgIds = OrgUnitServiceHelper.getAllSubordinateOrgs(1L, orgIds, true);
|
||||||
Set<Long> collect = subOrgIds.stream().filter(data -> !idSet.contains(id)).collect(Collectors.toSet());
|
Set<Long> collect = subOrgIds.stream().filter(data -> !idSet.contains(id)).collect(Collectors.toSet());
|
||||||
|
|
||||||
if(collect.contains(id)){
|
if(collect.contains(id)){
|
||||||
QFilter nameQFilterAccItem = new QFilter("number", QCP.equals,"FYXM004.999");
|
QFilter nameQFilterAccItem = new QFilter("number", QCP.equals,"FYXM004.999");
|
||||||
DynamicObject dynamicObjectAccItem = BusinessDataServiceHelper.loadSingle("er_expenseitemedit", "number,name", new QFilter[]{nameQFilterAccItem});
|
DynamicObject dynamicObjectAccItem = BusinessDataServiceHelper.loadSingle("er_expenseitemedit", "number,name", new QFilter[]{nameQFilterAccItem});
|
||||||
this.getModel().setValue("expenseitem",dynamicObjectAccItem,0);
|
this.getModel().setValue("expenseitem",dynamicObjectAccItem,0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,18 +70,20 @@ public class PrepaybillExpAccPlugin extends AbstractBillPlugIn implements Plugin
|
||||||
Long currentOrgId = RequestContext.get().getOrgId();
|
Long currentOrgId = RequestContext.get().getOrgId();
|
||||||
//当前所在的组织是属于矿山下的 costcompany
|
//当前所在的组织是属于矿山下的 costcompany
|
||||||
//costcompany 费用承担公司
|
//costcompany 费用承担公司
|
||||||
DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany");
|
Object costcompanyObj = this.getModel().getValue("costcompany");
|
||||||
long costcompanyId = costcompany.getLong("id");
|
if(costcompanyObj!=null){
|
||||||
if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(costcompanyId)){
|
DynamicObject costcompany = (DynamicObject)costcompanyObj;
|
||||||
BasedataEdit fieldEdit = this.getView().getControl(ACCOUNT_ITEM);
|
long costcompanyId = costcompany.getLong("id");
|
||||||
fieldEdit.addBeforeF7SelectListener(this);
|
if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(costcompanyId)){
|
||||||
fieldEdit.addAfterF7SelectListener(this);
|
BasedataEdit fieldEdit = this.getView().getControl(ACCOUNT_ITEM);
|
||||||
|
fieldEdit.addBeforeF7SelectListener(this);
|
||||||
|
fieldEdit.addAfterF7SelectListener(this);
|
||||||
|
|
||||||
BasedataEdit fieldEditExpense = this.getView().getControl(EXPENSE_ITEM);
|
BasedataEdit fieldEditExpense = this.getView().getControl(EXPENSE_ITEM);
|
||||||
fieldEditExpense.addBeforeF7SelectListener(this);
|
fieldEditExpense.addBeforeF7SelectListener(this);
|
||||||
fieldEditExpense.addAfterF7SelectListener(this);
|
fieldEditExpense.addAfterF7SelectListener(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -71,16 +71,19 @@ public class PublicreimbursebillExpAccPlugin extends AbstractBillPlugIn implemen
|
||||||
Long currentOrgId = RequestContext.get().getOrgId();
|
Long currentOrgId = RequestContext.get().getOrgId();
|
||||||
//当前所在的组织是属于矿山下的 costcompany
|
//当前所在的组织是属于矿山下的 costcompany
|
||||||
//costcompany 费用承担公司
|
//costcompany 费用承担公司
|
||||||
DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany");
|
Object costcompanyObj = this.getModel().getValue("costcompany");
|
||||||
long costcompanyId = costcompany.getLong("id");
|
if(costcompanyObj!=null){
|
||||||
if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(costcompanyId)){
|
DynamicObject costcompany = (DynamicObject)costcompanyObj;
|
||||||
BasedataEdit fieldEdit = this.getView().getControl(ACCOUNT_ITEM);
|
long costcompanyId = costcompany.getLong("id");
|
||||||
fieldEdit.addBeforeF7SelectListener(this);
|
if(OrgCheckUtils.isKS(currentOrgId) && OrgCheckUtils.isKS(costcompanyId)){
|
||||||
fieldEdit.addAfterF7SelectListener(this);
|
BasedataEdit fieldEdit = this.getView().getControl(ACCOUNT_ITEM);
|
||||||
|
fieldEdit.addBeforeF7SelectListener(this);
|
||||||
|
fieldEdit.addAfterF7SelectListener(this);
|
||||||
|
|
||||||
BasedataEdit fieldEditExpense = this.getView().getControl(EXPENSE_ITEM);
|
BasedataEdit fieldEditExpense = this.getView().getControl(EXPENSE_ITEM);
|
||||||
fieldEditExpense.addBeforeF7SelectListener(this);
|
fieldEditExpense.addBeforeF7SelectListener(this);
|
||||||
fieldEditExpense.addAfterF7SelectListener(this);
|
fieldEditExpense.addAfterF7SelectListener(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,43 +29,45 @@ public class TriprAutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements
|
||||||
//当前切换选择的组织
|
//当前切换选择的组织
|
||||||
Object company = this.getModel().getValue("costcompany");//核算组织(费用承担公司)
|
Object company = this.getModel().getValue("costcompany");//核算组织(费用承担公司)
|
||||||
Long currentOrgId = RequestContext.get().getOrgId();
|
Long currentOrgId = RequestContext.get().getOrgId();
|
||||||
DynamicObject companyObj = (DynamicObject)company;
|
if(company!=null){
|
||||||
Long companyId = companyObj.getLong("id");
|
DynamicObject companyObj = (DynamicObject)company;
|
||||||
if(OrgCheckUtils.isKS(companyId)){
|
Long companyId = companyObj.getLong("id");
|
||||||
String name = e.getProperty().getName();
|
if(OrgCheckUtils.isKS(companyId)){
|
||||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
String name = e.getProperty().getName();
|
||||||
if(name.equals("zcgj_startdate") ||name.equals("zcgj_enddate")){
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
ChangeData[] changeSet = e.getChangeSet();
|
if(name.equals("zcgj_startdate") ||name.equals("zcgj_enddate")){
|
||||||
int rowIndex = changeSet[0].getRowIndex();
|
ChangeData[] changeSet = e.getChangeSet();
|
||||||
calHomeentityDay(rowIndex);
|
int rowIndex = changeSet[0].getRowIndex();
|
||||||
Set<LocalDate> allSet = new HashSet<>();
|
calHomeentityDay(rowIndex);
|
||||||
Set<LocalDate> localDates1 = calHomeentityDay();
|
Set<LocalDate> allSet = new HashSet<>();
|
||||||
Set<LocalDate> localDates2 = calTripentryDay();
|
Set<LocalDate> localDates1 = calHomeentityDay();
|
||||||
allSet.addAll(localDates1);
|
Set<LocalDate> localDates2 = calTripentryDay();
|
||||||
allSet.addAll(localDates2);
|
allSet.addAll(localDates1);
|
||||||
this.getModel().setValue("zcgj_kccbdays",allSet.size());
|
allSet.addAll(localDates2);
|
||||||
} else if(name.equals("startdate") ||name.equals("enddate")){
|
this.getModel().setValue("zcgj_kccbdays",allSet.size());
|
||||||
// 计算结果
|
} else if(name.equals("startdate") ||name.equals("enddate")){
|
||||||
Set<LocalDate> allSet = new HashSet<>();
|
// 计算结果
|
||||||
Set<LocalDate> localDates1 = calHomeentityDay();
|
Set<LocalDate> allSet = new HashSet<>();
|
||||||
Set<LocalDate> localDates2 = calTripentryDay();
|
Set<LocalDate> localDates1 = calHomeentityDay();
|
||||||
allSet.addAll(localDates1);
|
Set<LocalDate> localDates2 = calTripentryDay();
|
||||||
allSet.addAll(localDates2);
|
allSet.addAll(localDates1);
|
||||||
this.getModel().setValue("zcgj_kccbdays",allSet.size());
|
allSet.addAll(localDates2);
|
||||||
}else if(name.equals("zcgj_is_include_home")){
|
this.getModel().setValue("zcgj_kccbdays",allSet.size());
|
||||||
boolean isHome = (boolean)this.getModel().getValue("zcgj_is_include_home");
|
}else if(name.equals("zcgj_is_include_home")){
|
||||||
if(!isHome){
|
boolean isHome = (boolean)this.getModel().getValue("zcgj_is_include_home");
|
||||||
this.getModel().deleteEntryData("zcgj_homeentity");
|
if(!isHome){
|
||||||
}
|
this.getModel().deleteEntryData("zcgj_homeentity");
|
||||||
Set<LocalDate> allSet = new HashSet<>();
|
}
|
||||||
Set<LocalDate> localDates1 = calHomeentityDay();
|
Set<LocalDate> allSet = new HashSet<>();
|
||||||
Set<LocalDate> localDates2 = calTripentryDay();
|
Set<LocalDate> localDates1 = calHomeentityDay();
|
||||||
allSet.addAll(localDates1);
|
Set<LocalDate> localDates2 = calTripentryDay();
|
||||||
allSet.addAll(localDates2);
|
allSet.addAll(localDates1);
|
||||||
this.getModel().setValue("zcgj_kccbdays",allSet.size());
|
allSet.addAll(localDates2);
|
||||||
getView().updateView();
|
this.getModel().setValue("zcgj_kccbdays",allSet.size());
|
||||||
}
|
getView().updateView();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
super.propertyChanged(e);
|
super.propertyChanged(e);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
package zcgj.zcdev.zcdev.pr.plugin.form;
|
||||||
|
|
||||||
|
import kd.bos.bill.AbstractBillPlugIn;
|
||||||
|
import kd.bos.context.RequestContext;
|
||||||
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||||
|
import kd.bos.form.field.BasedataEdit;
|
||||||
|
import kd.bos.form.field.events.BeforeF7SelectEvent;
|
||||||
|
import kd.bos.form.field.events.BeforeF7SelectListener;
|
||||||
|
import kd.bos.list.ListShowParameter;
|
||||||
|
import kd.bos.orm.query.QCP;
|
||||||
|
import kd.bos.orm.query.QFilter;
|
||||||
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
|
import kd.bos.servicehelper.user.UserServiceHelper;
|
||||||
|
import kd.sdk.plugin.Plugin;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.EventObject;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class EcInFinalsettleJusCustPlugin extends AbstractBillPlugIn implements Plugin, BeforeF7SelectListener {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void registerListener(EventObject e) {
|
||||||
|
super.registerListener(e);
|
||||||
|
BasedataEdit fieldEdit = this.getView().getControl("zcgj_jscustomer");
|
||||||
|
fieldEdit.addBeforeF7SelectListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void beforeF7Select(BeforeF7SelectEvent arg0) {
|
||||||
|
String name = arg0.getProperty().getName();
|
||||||
|
if(name.equals("zcgj_jscustomer")){
|
||||||
|
Object contractObj = this.getModel().getValue("contract");
|
||||||
|
if(contractObj != null){
|
||||||
|
DynamicObject contract = (DynamicObject)contractObj;
|
||||||
|
boolean ismulticontract = contract.getBoolean("ismulticontract");//多方合同
|
||||||
|
DynamicObject parta = contract.getDynamicObject("parta");
|
||||||
|
List<Long> ids = new ArrayList<>();
|
||||||
|
ids.add(parta.getLong("id"));
|
||||||
|
if(ismulticontract){
|
||||||
|
DynamicObjectCollection otherpart = contract.getDynamicObjectCollection("otherpart");
|
||||||
|
for (DynamicObject dynamicObject : otherpart) {
|
||||||
|
ids.add(dynamicObject.getLong(2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<QFilter> qFilterList = new ArrayList<>();
|
||||||
|
qFilterList.add(new QFilter("id", QCP.in,ids));
|
||||||
|
arg0.setCustomQFilters(qFilterList);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue