——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明







基于javaweb的SSH客户管理系统CRM客户关系管理(java+ssh+mysql+jsp+bootstrap)
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| public String ajaxGetEmpsByDepId() { List<HrEmployee> employees = hrEmployeeBiz.findEmpsByDepId(depid); WebTools.jsonClearEmps(employees); String data = WebTools.convertJson(employees); Scopes.getRequestMap().put("data", data); return "ajax"; } public String ajaxGetEmps(){ List<HrEmployee> employees = hrEmployeeBiz.findAllEmps(); HrEmployee employee=(HrEmployee)Scopes.getSessionMap().get("emp"); for (int i = 0; i < employees.size(); i++) { if (employees.get(i).getId().equals(employee.getId())) { employees.remove(employees.get(i)); } } System.out.println(employees.size()); WebTools.jsonClearEmps(employees); String data = WebTools.convertJson(employees); Scopes.getRequestMap().put("data", data); return "ajax"; } public String trashAll(){ Scopes.getRequestMap().put("emps", hrEmployeeBiz.findTrashAll()); return "trash"; } public String trashDel(){ hrEmployeeBiz.deleteById(id); return trashAll(); } public String trashAdd(){ hrEmployeeBiz.doTrashAdd(id); return trashAll(); } }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| public String ajaxLoadOneById(){ MailFlow mailFlow=mailFlowBiz.findOne(id); mailFlowBiz.setIsView(id); int currentemp=((HrEmployee)Scopes.getSessionMap().get("emp")).getId(); ParamSysparam p=new ParamSysparam(); p.setId(currentemp); mailFlow.setParamSysparamByReciveTypeId(p); WebTools.clearEmployee(mailFlow.getHrEmployeeByReceiveId()); WebTools.clearEmployee(mailFlow.getHrEmployeeBySenderId()); if (mailFlow.getParamSysparamByImportant()!=null) { WebTools.clearSysParams(mailFlow.getParamSysparamByImportant()); } if (mailFlow.getParamSysparamByReciveTypeId()!=null) { WebTools.clearSysParams(mailFlow.getParamSysparamByReciveTypeId()); } String data=WebTools.convertJson(mailFlow); Scopes.getRequestMap().put("data", data); return "ajax"; } private String searchname;
public void setSearchname(String searchname) { this.searchname = searchname; }
public String ajaxSearchMailByName() throws UnsupportedEncodingException{ searchname=new String(searchname.getBytes("iso-8859-1"),"UTF-8"); PageInfo info=new PageInfo(8, index); List<MailFlow> flows = mailFlowBiz.findBymailTitle(searchname,info); Map<String, Object> jobj=new HashMap<String, Object>(); jobj.put("pi", info); WebTools.jsonClearMailFlows(flows); jobj.put("fs", flows); String data=WebTools.convertJson(jobj); Scopes.getRequestMap().put("data", data); return "ajax"; }
public String del(){ mailFlowBiz.delFalse(id); return "del"; } public String delete(){ mailFlowBiz.delete(id); return "del"; } public String setStar(){
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| private HrEmployeeBiz hrEmployeeBiz;
private SysAppBiz sysAppBiz; private SysMenuBiz sysMenuBiz; private SysLoginBiz sysLoginBiz;
public void setSysLoginBiz(SysLoginBiz sysLoginBiz) { this.sysLoginBiz = sysLoginBiz; }
public void setSysMenuBiz(SysMenuBiz sysMenuBiz) { this.sysMenuBiz = sysMenuBiz; }
public void setHrEmployeeBiz(HrEmployeeBiz hrEmployeeBiz) { this.hrEmployeeBiz = hrEmployeeBiz; }
public void setSysAppBiz(SysAppBiz sysAppBiz) { this.sysAppBiz = sysAppBiz; }
public void ajaxValidateCode() { response.setContentType("image/jpeg"); response.setHeader("Pragma", "No-cache"); response.setHeader("Cache-Control", "no-cache"); response.setDateHeader("Expire", 0); ValidateCode randomValidateCode = new ValidateCode(); try { ValidateCode.code = randomValidateCode.getRandcode(request, response); } catch (Exception e) { e.printStackTrace(); } }
private File headfile; public File getHeadfile() {
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| }
@Scope("prototype") @Controller("crmProductCategoryAction") public class CrmProductCategoryAction extends ActionSupport { private CrmProductCategoryBiz crmProductCategoryBiz; private int id;
public void setId(int id) { this.id = id; } public void setCrmProductCategoryBiz(CrmProductCategoryBiz crmProductCategoryBiz) { this.crmProductCategoryBiz = crmProductCategoryBiz; } public String execute() { List<CrmProductCategory> categories=crmProductCategoryBiz.findAll(); Scopes.getRequestMap().put("cates",categories); return SUCCESS; } public String delCate(){ if (crmProductCategoryBiz.deleteCate(id)) { Scopes.getRequestMap().put("data","success"); }else{ Scopes.getRequestMap().put("data","failed"); } return "ajax"; } private String productCategory,productIcon; private Integer parentid; public void setParentid(Integer parentid) { this.parentid = parentid; }
public void setProductCategory(String productCategory) { this.productCategory = productCategory; } public void setProductIcon(String productIcon) {
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| public void setRole(SysRole role) { this.role = role; }
public String add(){ String data=""; if (sysRoleBiz.add(role)) { data="success"; }else{ data="failed"; } Scopes.getRequestMap().put("data", data); return "ajax"; } public String update(){ String data=""; if (sysRoleBiz.update(role)) { data="success"; }else{ data="failed"; } Scopes.getRequestMap().put("data", data); return "ajax"; } private int id;
public void setId(int id) { this.id = id; }
public String findOne(){ SysRole sysRole = sysRoleBiz.findOne(id); sysRole.setHrEmployeeByCreateid(null); sysRole.setHrEmployeeByUpdateid(null); sysRole.setHrEmployees(null); String data = WebTools.convertJson(sysRole); Scopes.getRequestMap().put("data", data); return "ajax"; }
public String ajaxLoadSysRole(){ List<SysRole> roles=sysRoleBiz.findAll(); WebTools.jsonClearRole(roles); String data=WebTools.convertJson(roles); Scopes.getRequestMap().put("data", data); return "ajax"; }
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=551623142808201cq
https://javayms.pages.dev?id=551623142808201cq