📄 custinfo.java
字号:
return customerList;
}
public ArrayList getCustomerList(int num) throws SaasApplicationException {
ArrayList customerList = new ArrayList();
ArrayList itemsList = new ArrayList();
CustomerExt customerExt = new CustomerExt();
customerExt.setParam(":VCUST_STATE", "0");
customerList = customerExt.selByList("SEL_BY_LIMIT_NUM", 0, num);
return customerList;
}
// 查询已冻结用户
public void getNoFreeList(Buffers inbuffer) {
log.LOG_INFO("进入getNoFreeList方法...");
this.outBuffer = inbuffer;
String query_param = inbuffer.getString("QUERY_PARAM");
try {
if (query_param.equals(""))
this.queryResult = getNoFreeList();
else
this.queryResult = searchCust(query_param);
}
catch (SaasApplicationException e) {
log.LOG_INFO(e.getMessage());
}
log.LOG_INFO("退出getNoFreeList方法...");
}
public ArrayList getNoFreeList() throws SaasApplicationException {
ArrayList customerList = new ArrayList();
ArrayList itemsList = new ArrayList();
CustomerExt customerExt = new CustomerExt();
customerExt.setParam(":VCUST_STATE", "1");
customerList = customerExt.selByList("SEL_BY_ALL");
return customerList;
}
// 客户解冻
public void CustNoFree(Buffers inbuffer) throws SaasApplicationException {
String cust_id = inbuffer.getString("CUST_ID");
String session_user_id = inbuffer.getString("SESSION_USER_ID");
this.outBuffer = inbuffer;
int iResult = -1;
log.LOG_INFO("进入CustNoFree方法.....");
try {
iResult = CustNoFree(cust_id, session_user_id);
}
catch (SaasApplicationException e) {
log.LOG_INFO(e.getMessage());
}
if (iResult != 0) {
this.outBuffer.setInt("RESULT_CODE", -1);
this.outBuffer.setString("RESULT_INFO", "业务处理失败!");
}
else {
this.outBuffer.setInt("RESULT_CODE", 0);
this.outBuffer.setString("RESULT_INFO", "业务处理成功!");
}
log.LOG_INFO("退出CustNoFree方法...");
}
public int CustNoFree(String cust_id, String session_user_id) throws SaasApplicationException {
CustomerExt updatestate = new CustomerExt();
changUserState(cust_id, "0", session_user_id);
updatestate.setParam(":VCUST_ID", cust_id);
updatestate.setParam(":VCUST_STATE", "0");
tradeQuery.executeBy(updatestate.insBy("STATE_CHANGE"));
return 0;
}
// 修改客户资料
public void updateCustInfo(Buffers inbuffer) {
log.LOG_INFO("进入updateCustInfo方法...");
String cust_id = inbuffer.getString("CUST_ID");
this.outBuffer = inbuffer;
int iResult = -1;
try {
CustomerDAO customerDao = new CustomerDAO();
customerDao.setCust_id(inbuffer.getString("CUST_ID"));
customerDao.setAll_emp_count(inbuffer.getString("ALL_EMP_COUNT"));// 全球员工数
customerDao.setCalling_area_code(inbuffer.getString("CALLING_AREA_CODE"));// 所属行业区域
customerDao.setCalling_type_code(inbuffer.getString("CALLING_TYPE_CODE"));// 行业类别
customerDao.setChina_emp_count(inbuffer.getString("CHINA_EMP_COUNT"));// 中国员工数
customerDao.setCity(inbuffer.getString("CITY"));// 城市
// customerDao.setCity_code(inbuffer.getString("CITY_CODE"));//
// 归属业务区
customerDao.setClass_id(inbuffer.getString("CLASS_ID"));// 客户规模
// customerDao.setClient_status(inbuffer.getString("CLIENT_STATUS"));//
// 集团状态
customerDao.setCompany_address(inbuffer.getString("COMPANY_ADDRESS"));// 公司地址
customerDao.setCust_name(inbuffer.getString("CUST_NAME"));// 客户名称
customerDao.setDevelope_channel(inbuffer.getString("DEVELOPE_CHANNEL"));// 发展渠道
customerDao.setDevelope_man(inbuffer.getString("DEVELOPE_MAN"));// 发展人
customerDao.setEmail(inbuffer.getString("EMAIL"));// 公司Email
// customerDao.setEnterprise_scope(inbuffer.getString("ENTERPRISE_SCOPE"));//
// 区域特点
customerDao.setEnterprise_type_code(inbuffer.getString("ENTERPRISE_TYPE_CODE"));// 企业类型
// customerDao.setEparchy_code(inbuffer.getString("EPARCHY_CODE"));//
// 归属城市
customerDao.setFax_nbr(inbuffer.getString("FAX_NBR"));// 传真
customerDao.setGroup_attr(inbuffer.getString("GROUP_ATTR"));// 集团属性
customerDao.setGroup_contact_phone(inbuffer.getString("GROUP_CONTACT_PHONE"));// 联系电话
customerDao.setJuristic(inbuffer.getString("JURISTIC"));// 法人代表
customerDao.setJuristic_type_code(inbuffer.getString("JURISTIC_TYPE_CODE"));// 法人类别
customerDao.setLocal_emp_count(inbuffer.getString("LOCAL_EMP_COUNT"));// 本地员工数
customerDao.setPost_code(inbuffer.getString("POST_CODE"));// 邮政编码
customerDao.setPspt_addr(inbuffer.getString("PSPT_ADDR"));// 证件地址
customerDao.setPspt_id(inbuffer.getString("PSPT_ID"));// 证件号码
customerDao.setPspt_type_code(inbuffer.getString("PSPT_TYPE_CODE"));// 证件类型
customerDao.setUser_count(inbuffer.getString("USER_COUNT"));// 用户数
customerDao.setWebsite(inbuffer.getString("WEBSITE"));// 公司网站
customerDao.setEnterprise_size_code(inbuffer.getString("ENTERPRISE_SIZE_CODE"));// 企业规模
customerDao.setProvince(inbuffer.getString("PROVINCE"));// 省份
customerDao.setGroup_memo(inbuffer.getString("GROUP_MEMO"));
customerDao.setCust_aim(inbuffer.getString("CUST_AIM"));
customerDao.setReg_money(inbuffer.getString("REG_MONEY"));
customerDao.setScope(inbuffer.getString("SCOPE"));
iResult = updateCustInfo(customerDao);
}
catch (SaasApplicationException e) {
log.LOG_INFO(e.getMessage());
}
if (iResult != 0) {
this.outBuffer.setInt("RESULT_CODE", -1);
this.outBuffer.setString("RESULT_INFO", "业务处理失败!");
}
else {
this.outBuffer.setInt("RESULT_CODE", 0);
this.outBuffer.setString("RESULT_INFO", "业务处理成功!");
}
log.LOG_INFO("退出updateCustInfo方法...");
}
public int updateCustInfo(CustomerDAO customerDao) throws SaasApplicationException {
CustomerExt customerExt = new CustomerExt();
customerExt.setParam(":VCUST_ID", customerDao.getCust_id());
customerExt.setParam(":VALL_EMP_COUNT", customerDao.getAll_emp_count());
customerExt.setParam(":VCALLING_AREA_CODE", customerDao.getCalling_area_code());
customerExt.setParam(":VCALLING_TYPE_CODE", customerDao.getCalling_type_code());
customerExt.setParam(":VCHINA_EMP_COUNT", customerDao.getChina_emp_count());
customerExt.setParam(":VCITY", customerDao.getCity());
customerExt.setParam(":VCITY_CODE", "");
customerExt.setParam(":VCLASS_ID", customerDao.getClass_id());
customerExt.setParam(":VCOMPANY_ADDRESS", customerDao.getCompany_address());
customerExt.setParam(":VCUST_NAME", customerDao.getCust_name());
customerExt.setParam(":VDEVELOPE_CHANNEL", customerDao.getDevelope_channel());
customerExt.setParam(":VDEVELOPE_MAN", customerDao.getDevelope_man());
customerExt.setParam(":VEMAIL", customerDao.getEmail());
customerExt.setParam(":VPROVINCE", customerDao.getProvince());
customerExt.setParam(":VENTERPRISE_TYPE_CODE", customerDao.getEnterprise_type_code());
customerExt.setParam(":VENTERPRISE_SCOPE", "");
customerExt.setParam(":VENTERPRISE_SIZE_CODE", customerDao.getEnterprise_size_code());
customerExt.setParam(":VEPARCHY_CODE", "");
customerExt.setParam(":VFAX_NBR", customerDao.getFax_nbr());
customerExt.setParam(":VGROUP_ATTR", customerDao.getGroup_attr());
customerExt.setParam(":VGROUP_CONTACT_PHONE", customerDao.getGroup_contact_phone());
customerExt.setParam(":VJURISTIC", customerDao.getJuristic());
customerExt.setParam(":VJURISTIC_TYPE_CODE", customerDao.getJuristic_type_code());
customerExt.setParam(":VLOCAL_EMP_COUNT", customerDao.getLocal_emp_count());
customerExt.setParam(":VPOST_CODE", customerDao.getPost_code());
customerExt.setParam(":VPSPT_ADDR", customerDao.getPspt_addr());
customerExt.setParam(":VPSPT_ID", customerDao.getPspt_id());
customerExt.setParam(":VPSPT_TYPE_CODE", customerDao.getPspt_type_code());
customerExt.setParam(":VUSER_COUNT", customerDao.getUser_count());
customerExt.setParam(":VWEBSITE", customerDao.getWebsite());
customerExt.setParam(":VGROUP_MEMO", customerDao.getGroup_memo());
customerExt.setParam(":VCUST_AIM", customerDao.getCust_aim());
customerExt.setParam(":VREG_MONEY", customerDao.getReg_money());
customerExt.setParam(":VSCOPE", customerDao.getScope());
tradeQuery.executeBy(customerExt.insBy("UPDATE_BY_INFO"));
return 0;
}
// ********************************************
// 修改客户资料***************************************
public void updateCustById(Buffers inbuffer) {
log.LOG_INFO("进入updateCustById方法...");
String cust_id = inbuffer.getString("CUST_ID");
this.outBuffer = inbuffer;
int iResult = -1;
try {
CustomerDAO customerDao = new CustomerDAO();
customerDao.setCust_id(inbuffer.getString("CUST_ID"));
customerDao.setAll_emp_count(inbuffer.getString("ALL_EMP_COUNT")); // 全球员工数
customerDao.setCalling_area_code(inbuffer.getString("CALLING_AREA_CODE")); // 所属行业区域
customerDao.setCalling_type_code(inbuffer.getString("CALLING_TYPE_CODE")); // 行业类别
customerDao.setChina_emp_count(inbuffer.getString("CHINA_EMP_COUNT")); // 中国员工数
customerDao.setCity(inbuffer.getString("CITY")); // 城市
customerDao.setCity_code(inbuffer.getString("CITY_CODE")); // 归属业务区
customerDao.setClass_id(inbuffer.getString("CLASS_ID")); // 客户规模
customerDao.setClient_status(inbuffer.getString("CLIENT_STATUS")); // 集团状态
customerDao.setCompany_address(inbuffer.getString("COMPANY_ADDRESS")); // 公司地址
customerDao.setCust_name(inbuffer.getString("CUST_NAME")); // 客户名称
customerDao.setDevelope_channel(inbuffer.getString("DEVELOPE_CHANNEL")); // 发展渠道
customerDao.setDevelope_man(inbuffer.getString("DEVELOPE_MAN")); // 发展人
customerDao.setEmail(inbuffer.getString("EMAIL")); // 公司Email
customerDao.setEnterprise_scope(inbuffer.getString("ENTERPRISE_SCOPE")); // 区域特点
customerDao.setEnterprise_type_code(inbuffer.getString("ENTERPRISE_TYPE_CODE"));// 企业类型
customerDao.setEparchy_code(inbuffer.getString("EPARCHY_CODE")); // 归属城市
customerDao.setFax_nbr(inbuffer.getString("FAX_NBR")); // 传真
customerDao.setGroup_attr(inbuffer.getString("GROUP_ATTR")); // 集团属性
customerDao.setGroup_contact_phone(inbuffer.getString("GROUP_CONTACT_PHONE")); // 联系电话
customerDao.setJuristic(inbuffer.getString("JURISTIC")); // 法人代表
customerDao.setJuristic_type_code(inbuffer.getString("JURISTIC_TYPE_CODE")); // 法人类别
customerDao.setLocal_emp_count(inbuffer.getString("LOCAL_EMP_COUNT")); // 本地员工数
customerDao.setPost_code(inbuffer.getString("POST_CODE")); // 邮政编码
customerDao.setPspt_addr(inbuffer.getString("PSPT_ADDR")); // 证件地址
customerDao.setPspt_id(inbuffer.getString("PSPT_ID")); // 证件号码
customerDao.setPspt_type_code(inbuffer.getString("PSPT_TYPE_CODE")); // 证件类型
customerDao.setUser_count(inbuffer.getString("USER_COUNT")); // 用户数
customerDao.setWebsite(inbuffer.getString("WEBSITE")); // 公司网站
customerDao.setEnterprise_size_code(inbuffer.getString("ENTERPRISE_SIZE_CODE"));// 企业规模
customerDao.setProvince(inbuffer.getString("PROVINCE")); // 省份
customerDao.setGroup_memo(inbuffer.getString("GROUP_MEMO"));
customerDao.setCust_aim(inbuffer.getString("CUST_AIM"));
customerDao.setReg_money(inbuffer.getString("REG_MONEY")); // 注册资金
customerDao.setScope(inbuffer.getString("SCOPE"));
iResult = updateCustById(customerDao);
}
catch (SaasApplicationException e) {
log.LOG_INFO(e.getMessage());
}
if (iResult != 0) {
this.outBuffer.setInt("RESULT_CODE", -1);
this.outBuffer.setString("RESULT_INFO", "业务处理失败!");
}
else {
this.outBuffer.setInt("RESULT_CODE", 0);
this.outBuffer.setString("RESULT_INFO", "业务处理成功!");
}
log.LOG_INFO("退出updateCustById方法...");
}
public int updateCustById(CustomerDAO customerDao) throws SaasApplicationException {
log.LOG_INFO("进入2222222222updateCustById2222222222222方法...");
CustomerExt customerExt = new CustomerExt();
customerExt.setParam(":VCUST_ID", customerDao.getCust_id());
customerExt.setParam(":VALL_EMP_COUNT", customerDao.getAll_emp_count());
customerExt.setParam(":VCALLING_AREA_CODE", customerDao.getCalling_area_code());
customerExt.setParam(":VCALLING_TYPE_CODE", customerDao.getCalling_type_code());
customerExt.setParam(":VCHINA_EMP_COUNT", customerDao.getChina_emp_count());
customerExt.setParam(":VCITY", customerDao.getCity());
customerExt.setParam(":VCITY_CODE", "");
customerExt.setParam(":VCLASS_ID", customerDao.getClass_id());
customerExt.setParam(":VCOMPANY_ADDRESS", customerDao.getCompany_address());
customerExt.setParam(":VCUST_NAME", customerDao.getCust_name());
customerExt.setParam(":VDEVELOPE_CHANNEL", customerDao.getDevelope_channel());
customerExt.setParam(":VDEVELOPE_MAN", customerDao.getDevelope_man());
customerExt.setParam(":VEMAIL", customerDao.getEmail());
customerExt.setParam(":VPROVINCE", customerDao.getProvince());
customerExt.setParam(":VENTERPRISE_TYPE_CODE", customerDao.getEnterprise_type_code());
customerExt.setParam(":VENTERPRISE_SCOPE", "");
customerExt.setParam(":VENTERPRISE_SIZE_CODE", customerDao.getEnterprise_size_code());
customerExt.setParam(":VEPARCHY_CODE", "");
customerExt.setParam(":VCLIENT_STATUS", "");
customerExt.setParam(":VFAX_NBR", customerDao.getFax_nbr());
customerExt.setParam(":VGROUP_ATTR", customerDao.getGroup_attr());
customerExt.setParam(":VGROUP_CONTACT_PHONE", customerDao.getGroup_contact_phone());
customerExt.setParam(":VJURISTIC", customerDao.getJuristic());
customerExt.setParam(":VJURISTIC_TYPE_CODE", customerDao.getJuristic_type_code());
customerExt.setParam(":VLOCAL_EMP_COUNT", customerDao.getLocal_emp_count());
customerExt.setParam(":VPOST_CODE", customerDao.getPost_code());
customerExt.setParam(":VPSPT_ADDR", customerDao.getPspt_addr());
customerExt.setParam(":VPSPT_ID", customerDao.getPspt_id());
customerExt.setParam(":VPSPT_TYPE_CODE", customerDao.getPspt_type_code());
customerExt.setParam(":VUSER_COUNT", customerDao.getUser_count());
customerExt.setParam(":VWEBSITE", customerDao.getWebsite());
customerExt.setParam(":VGROUP_MEMO", customerDao.getGroup_memo());
customerExt.setParam(":VCUST_AIM", customerDao.getCust_aim());
customerExt.setParam(":VREG_MONEY", customerDao.getReg_money());
customerExt.setParam(":VSCOPE", customerDao.getScope());
tradeQuery.executeBy(customerExt.insBy("UPDATE_BY_CUST_ID"));
log.LOG_INFO("退出2222222222updateCustById2222222222222方法...");
return 0;
}
// 查找图片路径
public String getCustAttachPath(String strAttachId, String flag) throws SaasApplicationException {
// log.LOG_INFO("进入getAttachPath方法...");
Attachinfo attachInfo = new Attachinfo();
String file_path = attachInfo.getAttachPath(strAttachId, flag, "0");
// log.LOG_INFO("退出getAttachPath方法...");
return file_path;
}
// 客户状态 冻结
public void CustStateFree(Buffers inbuffer) throws SaasApplicationException {
String cust_id = inbuffer.getString("CUST_ID");
String session_user_id = inbuffer.getString("SESSION_USER_ID");
this.outBuffer = inbuffer;
int iResult = -1;
log.LOG_INFO("进入CustStateFree方法.....");
try {
iResult = CustStateFree(cust_id, session_user_id);
}
catch (SaasApplicationException e) {
log.LOG_INFO(e.getMessage());
}
if (iResult != 0) {
this.outBuffer.setInt("RESULT_CODE", -1);
this.outBuffer.setString("RESULT_INFO", "业务处理失败!");
}
else {
this.outBuffer.setInt("RESULT_CODE", 0);
this.outBuffer.setString("RESULT_INFO", "业务处理成功!");
}
log.LOG_INFO("退出CustStateFree方法...");
}
public int CustStateFree(String cust_id, String session_user_id) throws SaasApplicationException {
CustomerExt updatestate = new CustomerExt();
changUserState(cust_id, "1", session_user_id);
updatestate.setParam(":VCUST_ID", cust_id);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -