|
|
@@ -1279,5 +1279,47 @@ public class PaoCust extends Pao implements PaoRemote {
|
|
|
}
|
|
|
return map;
|
|
|
}
|
|
|
-
|
|
|
+ public String[] getMailBySalesGroup(String fagentnum) throws P2Exception {
|
|
|
+ PaoSetRemote email = getPaoSet("$sales_email", "salesassistant", "fsalenum in (select tagents.fsalenum from tagents where fagentnum = '"+fagentnum+"') and sales_email is not null");
|
|
|
+ String[] emailaddress = getStrings(email, "sales_email");
|
|
|
+ return emailaddress;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getSalenumByHrid(String hrid) throws P2Exception {
|
|
|
+ PaoSetRemote pp_users = P2Server.getP2Server().getPaoSet(
|
|
|
+ "pp_users", P2Server.getP2Server().getSystemUserInfo());
|
|
|
+ pp_users.setWhere("hrid='" + hrid + "'");
|
|
|
+ pp_users.reset();
|
|
|
+ if (pp_users.count() == 1) {
|
|
|
+ String fusertype = pp_users.getPao(0).getString("fusertype");
|
|
|
+ pp_users.close();
|
|
|
+ if(fusertype != null && fusertype.length()!=0){
|
|
|
+ return fusertype;
|
|
|
+ }else{
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ pp_users.close();
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void distinctfieldcheckfsalenum(String fieldname) throws P2Exception {
|
|
|
+ PaoSetRemote paoset = P2Server.getP2Server().getPaoSet(getName(),
|
|
|
+ getUserInfo());
|
|
|
+ paoset.setWhere(fieldname + "='" + getString(fieldname)
|
|
|
+ + "' and siteid='" + getString("siteid") + "'");
|
|
|
+
|
|
|
+ System.out.println(fieldname + "='" + getString(fieldname)
|
|
|
+ + "' and siteid='" + getString("siteid") + "'");
|
|
|
+
|
|
|
+ paoset.reset();
|
|
|
+ if (!paoset.isEmpty()) {
|
|
|
+ paoset.close();
|
|
|
+ throw new P2AppException("", "¸Ã"
|
|
|
+ + getPaoField(fieldname).getColumnTitle() + "ÒÑ´æÔÚ");
|
|
|
+ }
|
|
|
+ paoset.close();
|
|
|
+ }
|
|
|
}
|