供方入围新增供应商公告为空阻塞校验

This commit is contained in:
zengweihai 2025-02-26 14:22:06 +08:00
parent fd9a63eaa9
commit 2ecb06d28f
1 changed files with 19 additions and 7 deletions

View File

@ -70,9 +70,14 @@ public class SupplierInvitationFormPlugin extends SupplierInvitationBidNumEdit i
Object enrollsupplierPkValue = enrollsupplier.getPkValue();//syssupplier
boolean flag = checkSupplierCollection(enrollsupplierPkValue,bidproject);
if (!flag){
this.createRespMyTender(enrollsupplierPkValue);
DynamicObject dataEntity = this.getModel().getDataEntity(true);
SaveServiceHelper.save(new DynamicObject[]{dataEntity});
boolean createResult = this.createRespMyTender(enrollsupplierPkValue);
if (createResult){
DynamicObject dataEntity = this.getModel().getDataEntity(true);
SaveServiceHelper.save(new DynamicObject[]{dataEntity});
}else {
evt.setCancel(true);
}
}
// else {
// QFilter mytender_QF = new QFilter("bidproject.id", QCP.equals, bidproject.getPkValue());
@ -209,16 +214,15 @@ public class SupplierInvitationFormPlugin extends SupplierInvitationBidNumEdit i
}
}
public void createRespMyTender(Object supplierId ){
public boolean createRespMyTender(Object supplierId ){
DynamicObject bidproject = (DynamicObject) this.getModel().getValue("bidproject");//获取招标立项f7数据
String bidproject_pkValue = bidproject.getString("id");
DynamicObject bid_project = BusinessDataServiceHelper.loadSingle(bidproject_pkValue, "rebm_bidproject_f7");//获取招标立项完整数据
QFilter announcement_qf = new QFilter("bidproject",QCP.equals,bidproject_pkValue);//查找招标公告
DynamicObject announcement = BusinessDataServiceHelper.loadSingle("rebm_project_announcement", announcement_qf.toArray());
DynamicObject myTender = BusinessDataServiceHelper.newDynamicObject("resp_mytender");
if (null != announcement) {
if (announcement != null){
myTender.set("name", announcement.getString("annotitle"));//招标名称取招标立项名称
myTender.set("publishdate", announcement.getDate("publishdate"));//发布日期
myTender.set("announcement", announcement);//招标公告
@ -228,6 +232,7 @@ public class SupplierInvitationFormPlugin extends SupplierInvitationBidNumEdit i
myTender.set("bidproject", bid_project);//设置招标立项
myTender.set("ispublicbid", true);//是否公开招标 默认设置true
myTender.set("tenderstatus", MyTenderStatus.APPLIED);//投标状态, 供方入围添加默认设置为已入围
DynamicObject resm_official_supplier = BusinessDataServiceHelper.loadSingle(supplierId, "resm_official_supplier");
DynamicObject syssupplier = resm_official_supplier.getDynamicObject("syssupplier");//获取系统供应商
@ -262,7 +267,14 @@ public class SupplierInvitationFormPlugin extends SupplierInvitationBidNumEdit i
}
myTender.set("entry", myTenderEntryColl);
// OperationResult operationResult = OperationServiceHelper.executeOperate("save", "resp_mytender", new DynamicObject[]{myTender});
SaveServiceHelper.save(new DynamicObject[]{myTender});
if (announcement != null){
SaveServiceHelper.save(new DynamicObject[]{myTender});
return true;
}else {
this.getView().showTipNotification("当前采购方式为公开招标,请发布招标公告!");
return false;
}
}
// public void updateSupplierCollection(Object supplierId,DynamicObject bidproject, Long adminUserId){