|
@@ -1,5 +1,6 @@
|
|
|
package uzi9.uzi9q.opmcepaq.epaq.plugin.form.xbt.test.personnel.operation;
|
|
package uzi9.uzi9q.opmcepaq.epaq.plugin.form.xbt.test.personnel.operation;
|
|
|
|
|
|
|
|
|
|
+import kd.bos.dataentity.OperateOption;
|
|
|
import kd.bos.dataentity.entity.DynamicObject;
|
|
import kd.bos.dataentity.entity.DynamicObject;
|
|
|
import kd.bos.entity.ExtendedDataEntity;
|
|
import kd.bos.entity.ExtendedDataEntity;
|
|
|
import kd.bos.entity.formula.RowDataModel;
|
|
import kd.bos.entity.formula.RowDataModel;
|
|
@@ -12,8 +13,10 @@ import kd.bos.entity.plugin.args.EndOperationTransactionArgs;
|
|
|
import kd.bos.entity.validate.AbstractValidator;
|
|
import kd.bos.entity.validate.AbstractValidator;
|
|
|
import kd.bos.orm.query.QCP;
|
|
import kd.bos.orm.query.QCP;
|
|
|
import kd.bos.orm.query.QFilter;
|
|
import kd.bos.orm.query.QFilter;
|
|
|
|
|
+import kd.bos.servicehelper.AttachmentServiceHelper;
|
|
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
|
|
import kd.bos.servicehelper.operation.DeleteServiceHelper;
|
|
import kd.bos.servicehelper.operation.DeleteServiceHelper;
|
|
|
|
|
+import kd.bos.servicehelper.operation.OperationServiceHelper;
|
|
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
|
|
import kd.sdk.plugin.Plugin;
|
|
import kd.sdk.plugin.Plugin;
|
|
|
|
|
|
|
@@ -77,6 +80,8 @@ public class CheckApplyaServicePlugIn extends AbstractOperationServicePlugIn imp
|
|
|
|
|
|
|
|
//审核
|
|
//审核
|
|
|
if ("audit".equals(operationKey)) {
|
|
if ("audit".equals(operationKey)) {
|
|
|
|
|
+ //收集附件信息
|
|
|
|
|
+ HashMap<Long, List<Map<String, Object>>> attachmentsMap = new HashMap<>();
|
|
|
//收集新建入住人员信息
|
|
//收集新建入住人员信息
|
|
|
ArrayList<DynamicObject> checkPersonListNew = new ArrayList<>();
|
|
ArrayList<DynamicObject> checkPersonListNew = new ArrayList<>();
|
|
|
//收集修改入住人员信息id
|
|
//收集修改入住人员信息id
|
|
@@ -103,6 +108,14 @@ public class CheckApplyaServicePlugIn extends AbstractOperationServicePlugIn imp
|
|
|
checkPersonListNew.add(checkPerson);
|
|
checkPersonListNew.add(checkPerson);
|
|
|
personnelId.add(checkApply.getLong("uzi9_personnel_info.id"));
|
|
personnelId.add(checkApply.getLong("uzi9_personnel_info.id"));
|
|
|
|
|
|
|
|
|
|
+ List<Map<String, Object>> attachments = AttachmentServiceHelper.getAttachments(CHECK_APPLY
|
|
|
|
|
+ , checkApply.getLong("id")
|
|
|
|
|
+ , "uzi9_atta"
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+ attachmentsMap.put(checkApply.getLong("id"), attachments);
|
|
|
|
|
+ //删除附件
|
|
|
|
|
+ AttachmentServiceHelper.remove(CHECK_APPLY, checkApply.getLong("id"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
QFilter qFilter = new QFilter("uzi9_personnel_info.id", QCP.in, personnelId.toArray())
|
|
QFilter qFilter = new QFilter("uzi9_personnel_info.id", QCP.in, personnelId.toArray())
|
|
@@ -117,7 +130,18 @@ public class CheckApplyaServicePlugIn extends AbstractOperationServicePlugIn imp
|
|
|
//修改入住人员信息
|
|
//修改入住人员信息
|
|
|
SaveServiceHelper.save(checkPersonListUp);
|
|
SaveServiceHelper.save(checkPersonListUp);
|
|
|
//新建入住人员信息
|
|
//新建入住人员信息
|
|
|
- SaveServiceHelper.save(checkPersonListNew.toArray(new DynamicObject[0]));
|
|
|
|
|
|
|
+ DynamicObject[] checkPersonSave = (DynamicObject[]) SaveServiceHelper.save(checkPersonListNew.toArray(new DynamicObject[0]));
|
|
|
|
|
+
|
|
|
|
|
+ //附件复制
|
|
|
|
|
+ for (DynamicObject checkPerson : checkPersonSave) {
|
|
|
|
|
+ long checkApplyId = checkPerson.getLong("uzi9_check_apply.id");
|
|
|
|
|
+ List<Map<String, Object>> list = attachmentsMap.get(checkApplyId);
|
|
|
|
|
+ AttachmentServiceHelper.upload(CHECK_PERSONNEL,
|
|
|
|
|
+ checkPerson.getLong("id"),
|
|
|
|
|
+ "uzi9_atta",
|
|
|
|
|
+ list);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 反审核
|
|
// 反审核
|
|
@@ -157,7 +181,7 @@ public class CheckApplyaServicePlugIn extends AbstractOperationServicePlugIn imp
|
|
|
room.set("uzi9_peoples_enter", room.getInt("uzi9_peoples_enter") - roomCount);
|
|
room.set("uzi9_peoples_enter", room.getInt("uzi9_peoples_enter") - roomCount);
|
|
|
String judgment = room.getString("uzi9_judgment_full");
|
|
String judgment = room.getString("uzi9_judgment_full");
|
|
|
|
|
|
|
|
- if ("yes".equals(judgment)){
|
|
|
|
|
|
|
+ if ("yes".equals(judgment)) {
|
|
|
room.set("uzi9_judgment_full", "no");
|
|
room.set("uzi9_judgment_full", "no");
|
|
|
}
|
|
}
|
|
|
|
|
|