增添修改住宿标准的触发时机-龚宇杰
This commit is contained in:
parent
e5165670bf
commit
a212d134ff
|
@ -5,6 +5,8 @@ import kd.bos.cache.ThreadCache;
|
|||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||
import kd.bos.entity.datamodel.IDataModel;
|
||||
import kd.bos.entity.datamodel.events.AfterDeleteEntryEventArgs;
|
||||
import kd.bos.entity.datamodel.events.AfterDeleteRowEventArgs;
|
||||
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||
import kd.bos.form.events.BeforeDoOperationEventArgs;
|
||||
import kd.bos.form.operate.FormOperate;
|
||||
|
@ -14,6 +16,7 @@ import kd.bos.servicehelper.BusinessDataServiceHelper;
|
|||
import kd.fi.er.business.tripstd.context.StdPreCalContext;
|
||||
import kd.fi.er.business.tripstd.model.TripStandardDetail;
|
||||
import kd.fi.er.business.tripstd.service.imp.ErTripStdServiceImp;
|
||||
import kd.fi.er.business.utils.ActionLocalCache;
|
||||
import kd.sdk.plugin.Plugin;
|
||||
import kd.fi.er.formplugin.web.tripstandard.util.TripStandardUtils;
|
||||
|
||||
|
@ -40,6 +43,7 @@ public class TripPersonCohabitPlugin extends AbstractBillPlugIn implements Plugi
|
|||
updateAllAccStd();
|
||||
break;
|
||||
case "expenseitem":
|
||||
case "entrycurrency":
|
||||
case "triparea":
|
||||
case "trip2travelers":
|
||||
updateTripAccStd(parentIndex, rowIndex);
|
||||
|
@ -49,6 +53,10 @@ public class TripPersonCohabitPlugin extends AbstractBillPlugIn implements Plugi
|
|||
this.getView().updateView("entryentity");
|
||||
}
|
||||
|
||||
public void afterCopyData(EventObject e) {
|
||||
updateAllAccStd();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterBindData(EventObject e) {
|
||||
updateAllAccStd();
|
||||
|
@ -63,6 +71,34 @@ public class TripPersonCohabitPlugin extends AbstractBillPlugIn implements Plugi
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterDeleteRow(AfterDeleteRowEventArgs e) {
|
||||
super.afterDeleteRow(e);
|
||||
String entityName = e.getEntryProp().getName();
|
||||
if ("entryentity".equals(entityName)) {
|
||||
updateAllAccStd();
|
||||
this.setTripOver();
|
||||
this.getView().updateView("entryentity");
|
||||
}
|
||||
}
|
||||
|
||||
protected void setTripOver() {
|
||||
DynamicObject dataEntity = this.getModel().getDataEntity(true);
|
||||
DynamicObjectCollection dynamicObjectCollection = (DynamicObjectCollection) dataEntity.get("tripentry");
|
||||
|
||||
for (int i = 0; i < dynamicObjectCollection.size(); ++i) {
|
||||
DynamicObjectCollection entrys = ((DynamicObject) dynamicObjectCollection.get(i)).getDynamicObjectCollection("entryentity");
|
||||
if (entrys != null && entrys.stream().anyMatch((m) -> {
|
||||
return m.getBoolean("isover");
|
||||
})) {
|
||||
this.getModel().setValue("isoverstd", true, i);
|
||||
} else {
|
||||
this.getModel().setValue("isoverstd", false, i);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改所有行程中的住宿费标准
|
||||
*/
|
||||
|
@ -198,8 +234,8 @@ public class TripPersonCohabitPlugin extends AbstractBillPlugIn implements Plugi
|
|||
/**
|
||||
* 构建标准明细
|
||||
*
|
||||
* @param stdDetail 标准明细
|
||||
* @param tripSTDAmount 标准金额
|
||||
* @param stdDetail 标准明细
|
||||
* @param tripSTDAmount 标准金额
|
||||
* @param highSeasonTripSTDAmount 旺季标准金额
|
||||
*/
|
||||
|
||||
|
|
Loading…
Reference in New Issue