37 lines
1.3 KiB
Java
37 lines
1.3 KiB
Java
|
|
package tqq9.lc123.cloud.app.api.plugin;
|
||
|
|
|
||
|
|
import kd.bos.bill.AbstractBillPlugIn;
|
||
|
|
import kd.bos.dataentity.OperateOption;
|
||
|
|
import kd.bos.dataentity.entity.DynamicObject;
|
||
|
|
import kd.bos.entity.operate.result.OperationResult;
|
||
|
|
import kd.bos.logging.Log;
|
||
|
|
import kd.bos.logging.LogFactory;
|
||
|
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||
|
|
import kd.bos.servicehelper.operation.OperationServiceHelper;
|
||
|
|
import kd.sdk.plugin.Plugin;
|
||
|
|
import org.apache.commons.lang3.StringUtils;
|
||
|
|
|
||
|
|
import java.util.EventObject;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 单据界面插件
|
||
|
|
* 在进入后采购变更单里的泛微状态显示为待提交
|
||
|
|
*/
|
||
|
|
public class FWDefaultApprovalStatusPlugin extends AbstractBillPlugIn implements Plugin {
|
||
|
|
private final static Log logger = LogFactory.getLog(FWDefaultApprovalStatusPlugin.class);
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public void afterCreateNewData(EventObject e) {
|
||
|
|
super.afterCreateNewData(e);
|
||
|
|
//获取到单据界面的泛微审批状态
|
||
|
|
String tqq9_fwstate = (String) this.getModel().getValue("tqq9_fwstate");
|
||
|
|
//判断是否为空
|
||
|
|
if(StringUtils.isBlank(tqq9_fwstate)){
|
||
|
|
//设置默认值
|
||
|
|
this.getModel().setValue("tqq9_fwstate", "A");
|
||
|
|
logger.info("默认值设置成功");
|
||
|
|
} else {
|
||
|
|
logger.info("默认值已存在");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|