供方入围新增供应商公告为空阻塞校验
This commit is contained in:
parent
2ecb06d28f
commit
e2e2359a6b
|
@ -62,23 +62,25 @@ public class SupplierInvitationFormPlugin extends SupplierInvitationBidNumEdit i
|
|||
if ("addsupplierdetail".equals(itemKey) || "addsupplierenroll".equals(itemKey) ){
|
||||
EntryGrid SEEntryGrid = this.getControl("supplierenrollentry");
|
||||
DynamicObjectCollection SEEntry = this.getModel().getEntryEntity("supplierenrollentry");
|
||||
int[] selectRows = SEEntryGrid.getSelectRows();
|
||||
for (int selectRow : selectRows) {
|
||||
DynamicObject dy = SEEntry.get(selectRow);
|
||||
DynamicObject enrollsupplier = dy.getDynamicObject("enrollsupplier");//报名供应商
|
||||
if (enrollsupplier != null){
|
||||
Object enrollsupplierPkValue = enrollsupplier.getPkValue();//syssupplier
|
||||
boolean flag = checkSupplierCollection(enrollsupplierPkValue,bidproject);
|
||||
if (!flag){
|
||||
boolean createResult = this.createRespMyTender(enrollsupplierPkValue);
|
||||
if (createResult){
|
||||
DynamicObject dataEntity = this.getModel().getDataEntity(true);
|
||||
SaveServiceHelper.save(new DynamicObject[]{dataEntity});
|
||||
}else {
|
||||
evt.setCancel(true);
|
||||
}
|
||||
boolean announcementStatus = this.checkAnnouncementStatus();
|
||||
if (announcementStatus){
|
||||
int[] selectRows = SEEntryGrid.getSelectRows();
|
||||
for (int selectRow : selectRows) {
|
||||
DynamicObject dy = SEEntry.get(selectRow);
|
||||
DynamicObject enrollsupplier = dy.getDynamicObject("enrollsupplier");//报名供应商
|
||||
if (enrollsupplier != null){
|
||||
Object enrollsupplierPkValue = enrollsupplier.getPkValue();//syssupplier
|
||||
boolean flag = checkSupplierCollection(enrollsupplierPkValue,bidproject);
|
||||
if (!flag){
|
||||
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());
|
||||
// mytender_QF.and("supplier.id",QCP.equals,enrollsupplierPkValue);
|
||||
|
@ -97,9 +99,14 @@ public class SupplierInvitationFormPlugin extends SupplierInvitationBidNumEdit i
|
|||
// resp_mytender.set("publishdate", announcement.getDate("publishdate"));//发布日期
|
||||
// SaveServiceHelper.save(new DynamicObject[]{resp_mytender});//修改日期
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}else {
|
||||
evt.setCancel(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -271,12 +278,26 @@ public class SupplierInvitationFormPlugin extends SupplierInvitationBidNumEdit i
|
|||
SaveServiceHelper.save(new DynamicObject[]{myTender});
|
||||
return true;
|
||||
}else {
|
||||
this.getView().showTipNotification("当前采购方式为公开招标,请发布招标公告!");
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean checkAnnouncementStatus(){
|
||||
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());
|
||||
|
||||
if (announcement != null){
|
||||
return true;
|
||||
}else {
|
||||
this.getView().showTipNotification("请发布招标公告!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// public void updateSupplierCollection(Object supplierId,DynamicObject bidproject, Long adminUserId){
|
||||
// QFilter mytender_QF = new QFilter("bidproject.id", QCP.equals, bidproject.getPkValue());
|
||||
// mytender_QF.and("supplier.id",QCP.equals,supplierId);
|
||||
|
|
Loading…
Reference in New Issue