/*
* PathWsInterUnit.java
*
* Created on 2007年8月16日, 下午12:52
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package path.ws.interUnit;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import path.crm.entity.CRM_Interunit;
import path.crm.manager.InterUnitManager;
/**
*
* @author ljl
*/
@WebService()
public class PathWsInterUnit {
/**
* Web service operation 客户新增
* @param pwsStrWebSiteID 网站id
* @param pwsStrInterUnitName 客户名称
* @param pwsStrTel 电话
* @param pwsStrMobile 手机
* @param pwsStrFax 传真
* @param pwsStrCorpName 公司名称
* @param pwsStrEmail 公司邮件
* @param pwsStrMemo 详细信息
* @return "success" : 添加成功 userexisted: "用户已存在" emailexisted: 该邮件已经被使用过了 fail: 添加失败
*/
@WebMethod
public String pathWsInterUnitAdd(@WebParam(name = "pwsStrWebSiteID") String pwsStrWebSiteID, @WebParam(name = "pwsStrInterUnitName") String pwsStrInterUnitName, @WebParam(name = "pwsStrTel") String pwsStrTel, @WebParam(name = "pwsStrMobile") String pwsStrMobile, @WebParam(name = "pwsStrFax") String pwsStrFax, @WebParam(name = "pwsStrCorpName") String pwsStrCorpName, @WebParam(name = "pwsStrEmail") String pwsStrEmail, @WebParam(name = "pwsStrMemo") String pwsStrMemo) {
String strReturn;
InterUnitManager im=new InterUnitManager();
//检查用户时候存在
if ("existed".equals(im.chkIfExistRcd(pwsStrInterUnitName,"InterUnitName")))
return "userexisted";
if ("existed".equals(im.chkIfExistRcd(pwsStrInterUnitName,"InterUnitName")))
return "emailexisted";
//检查邮件是否存在
try{
CRM_Interunit ci=new CRM_Interunit();
ci.setSerialNumber(pwsStrInterUnitName);
ci.setOrgTypeId("pathwebserviceorgnization");
ci.setCreatorTypeId(pwsStrWebSiteID);
ci.setName(pwsStrCorpName);
ci.setTelephone(pwsStrTel);
ci.setFax(pwsStrFax);
ci.setEmail(pwsStrEmail);
ci.setDescription(pwsStrMemo);
return im.insertInterunitWs(ci);
}catch(Exception e){
System.out.println(e.toString());
return "fail";
}
}
/**
* Web service operation 是否存在的服务 直接调用javabean
* @param pwsStrWebSiteId 网站id
* @param pwsStrChkName
* @param pwsStrChkModule 模块名 InterUnitName:检验客户是否存在 InterUnitEmail:邮件是否被注册过
* @return 不存在:notExisted 存在:existed 异常:"fail
*/
@WebMethod
public String pathWsCheckUserExist(@WebParam(name = "pwsStrWebSiteId") String pwsStrWebSiteId, @WebParam(name = "pwsStrChkName") String pwsStrChkName, @WebParam(name = "pwsStrChkModule") String pwsStrChkModule) {
// TODO implement operation
return new InterUnitManager().chkIfExistRcd(pwsStrChkName,pwsStrChkModule);
}
}
大盘预测
国富论
posted on 2007-08-16 14:19
华梦行 阅读(101)
评论(0) 编辑 收藏