【部门】盘点方案传值给盘点表
This commit is contained in:
parent
5662240c16
commit
24b35f19b8
|
|
@ -1,38 +0,0 @@
|
|||
package tqq9.lc123.cloud.app.plugin.form.im;
|
||||
|
||||
import kd.bos.bill.AbstractBillPlugIn;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
|
||||
import java.util.EventObject;
|
||||
|
||||
/**
|
||||
* 盘点表表单插件
|
||||
*/
|
||||
public class InvCountBillPLugin extends AbstractBillPlugIn {
|
||||
|
||||
|
||||
@Override
|
||||
public void afterCreateNewData(EventObject e) {
|
||||
super.afterCreateNewData(e);
|
||||
//给泛微审批状态设置初始默认值--待提交
|
||||
this.getModel().setValue("tqq9_fwstate", "A");
|
||||
//设置创建部门
|
||||
DynamicObject creator = (DynamicObject) this.getModel().getValue("creator");
|
||||
if(creator != null){
|
||||
DynamicObject bos_user = BusinessDataServiceHelper.loadSingle("bos_user", new QFilter[]{new QFilter("id", QCP.equals, creator.getLong("id"))});
|
||||
DynamicObjectCollection entryentity = bos_user.getDynamicObjectCollection("entryentity");
|
||||
DynamicObject dept = null;
|
||||
for (DynamicObject dynamicObject : entryentity) {
|
||||
boolean ispartjob = dynamicObject.getBoolean("ispartjob");
|
||||
if (!ispartjob) {
|
||||
dept = dynamicObject.getDynamicObject("dpt");
|
||||
}
|
||||
}
|
||||
this.getModel().setValue("tqq9_dept", dept);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package tqq9.lc123.cloud.app.plugin.form.im;
|
||||
|
||||
import kd.sdk.scmc.im.extpoint.IInvCountSchemeAuditExpand;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 盘点方案传值给盘点表
|
||||
* 系统服务云-配置工具-业务扩展-业务扩展场景
|
||||
* 名称:库存盘点方案审核处理扩展字段
|
||||
*/
|
||||
public class InvCountSchemeAuditExpandPlugin implements IInvCountSchemeAuditExpand {
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, String> getFieldMap() {
|
||||
Map<String, String> fieldMap = new HashMap<>(1);
|
||||
//key:盘点方案单头扩展字段标识 value:盘点表单头扩展字段标识
|
||||
fieldMap.put("tqq9_dept","tqq9_dept");//创建部门
|
||||
fieldMap.put("tqq9_fwstate","tqq9_fwstate");//泛微审批状态-默认A
|
||||
return fieldMap;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue