|
@@ -10,6 +10,7 @@ import kd.bos.entity.plugin.args.EndOperationTransactionArgs;
|
|
|
import kd.bos.exception.KDBizException;
|
|
|
import kd.bos.orm.query.QCP;
|
|
|
import kd.bos.orm.query.QFilter;
|
|
|
+import kd.bos.servicehelper.AttachmentServiceHelper;
|
|
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
|
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
|
|
|
|
@@ -37,10 +38,8 @@ public class AmountOpPlugin extends AbstractOperationServicePlugIn {
|
|
|
DynamicObject info = BusinessDataServiceHelper.loadSingle(dynamicObjects[i].getPkValue(), dynamicObjects[i].getDynamicObjectType().getName());
|
|
|
DynamicObjectCollection writeoffapply = info.getDynamicObjectCollection("writeoffapply");
|
|
|
if(writeoffapply.size()<=0){
|
|
|
- QFilter nckd_orgamountFilter = new QFilter("fbilltype", QCP.equals, "er_tripreimburse");
|
|
|
- nckd_orgamountFilter.and("finterid", QCP.equals, info.getString("id"));
|
|
|
- Map<Object, DynamicObject> nckd_cas_arbilMap = BusinessDataServiceHelper.loadFromCache("bos_attachment", new QFilter[]{nckd_orgamountFilter});
|
|
|
- if(nckd_cas_arbilMap.size()<=0){
|
|
|
+ List<Map<String, Object>> attachments = AttachmentServiceHelper.getAttachments("er_tripreimbursebill", info.getLong("id"), "nckd_attachmentpanelsq", true);
|
|
|
+ if(attachments.size()<=0){
|
|
|
throw new KDBizException("请上传出差申请附件!");
|
|
|
}
|
|
|
}
|