parent
18a8a1a064
commit
288fa85533
|
@ -26,36 +26,7 @@ public class PurDemandFormPlugin extends AbstractFormPlugin {
|
|||
super.afterBindData(e);
|
||||
//根据组织携带项目
|
||||
updateRenovationProject();
|
||||
DynamicObject dataEntity = this.getModel().getDataEntity(true);
|
||||
|
||||
// if (StringUtils.isEmpty(dataEntity.getString("billno"))) {
|
||||
// QFilter q1 = new QFilter("number","=","CGXQ");
|
||||
// DynamicObject coderule = BusinessDataServiceHelper.loadSingle("bos_coderule", "id", new QFilter[]{q1});
|
||||
// if (null != coderule) {
|
||||
// CodeRuleInfo codeRule = CodeRuleCache.reloadCodeRuleById(coderule.getString("id"));
|
||||
// String number = CodeRuleServiceHelper.getNumber(codeRule, dataEntity);
|
||||
// String purissue = codeRuleNumberIsExits(number, codeRule, dataEntity);
|
||||
// this.getModel().setValue("billno", purissue);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归,若生成的采购单号已存在,则重新生成
|
||||
* @param purissue
|
||||
* @param codeRule
|
||||
* @param purapplybill
|
||||
* @return
|
||||
*/
|
||||
public static String codeRuleNumberIsExits(String purissue,CodeRuleInfo codeRule,DynamicObject purapplybill){
|
||||
QFilter filter = new QFilter("billno", QCP.equals,purissue);
|
||||
boolean exists = QueryServiceHelper.exists("recon_settleplanbill", new QFilter[]{filter});
|
||||
if(exists){
|
||||
purissue = CodeRuleServiceHelper.getNumber(codeRule, purapplybill);
|
||||
return codeRuleNumberIsExits(purissue,codeRule,purapplybill);
|
||||
}else{
|
||||
return purissue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -98,3 +69,34 @@ public class PurDemandFormPlugin extends AbstractFormPlugin {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// DynamicObject dataEntity = this.getModel().getDataEntity(true);
|
||||
// if (StringUtils.isEmpty(dataEntity.getString("billno"))) {
|
||||
// QFilter q1 = new QFilter("number","=","CGXQ");
|
||||
// DynamicObject coderule = BusinessDataServiceHelper.loadSingle("bos_coderule", "id", new QFilter[]{q1});
|
||||
// if (null != coderule) {
|
||||
// CodeRuleInfo codeRule = CodeRuleCache.reloadCodeRuleById(coderule.getString("id"));
|
||||
// String number = CodeRuleServiceHelper.getNumber(codeRule, dataEntity);
|
||||
// String purissue = codeRuleNumberIsExits(number, codeRule, dataEntity);
|
||||
// this.getModel().setValue("billno", purissue);
|
||||
// }
|
||||
// }
|
||||
|
||||
// /**
|
||||
// * 递归,若生成的采购单号已存在,则重新生成
|
||||
// * @param purissue
|
||||
// * @param codeRule
|
||||
// * @param purapplybill
|
||||
// * @return
|
||||
// */
|
||||
// public static String codeRuleNumberIsExits(String purissue,CodeRuleInfo codeRule,DynamicObject purapplybill){
|
||||
// QFilter filter = new QFilter("billno", QCP.equals,purissue);
|
||||
// boolean exists = QueryServiceHelper.exists("recon_settleplanbill", new QFilter[]{filter});
|
||||
// if(exists){
|
||||
// purissue = CodeRuleServiceHelper.getNumber(codeRule, purapplybill);
|
||||
// return codeRuleNumberIsExits(purissue,codeRule,purapplybill);
|
||||
// }else{
|
||||
// return purissue;
|
||||
// }
|
||||
// }
|
||||
|
|
Loading…
Reference in New Issue