|
@@ -22,6 +22,7 @@ import com.thinkgem.jeesite.common.persistence.Page;
|
|
|
import com.thinkgem.jeesite.common.utils.Encodes;
|
|
|
import com.thinkgem.jeesite.common.utils.StringUtils;
|
|
|
import com.thinkgem.jeesite.common.web.BaseController;
|
|
|
+import com.thinkgem.jeesite.modules.sys.security.SystemAuthorizingRealm;
|
|
|
import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
@@ -37,6 +38,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.IOException;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
@@ -74,11 +76,13 @@ public class AgencyController extends BaseController {
|
|
|
CmSpService cmSpService;
|
|
|
@Autowired
|
|
|
private CmOperationUserService cmOperationUserService;
|
|
|
+ @Autowired
|
|
|
+ private SysLogService sysLogService;
|
|
|
|
|
|
public static NewCmClub newCm;
|
|
|
public static CmClubinfo cmClu;
|
|
|
public static CmUser cmUs;
|
|
|
- public static String types;
|
|
|
+ public static String types;
|
|
|
public static NewCmSp newCms;
|
|
|
|
|
|
@ModelAttribute
|
|
@@ -197,38 +201,55 @@ public class AgencyController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "online")
|
|
|
- @OperationLogAnnotation(operType = "更改状态",operModul = "设置为已上线")
|
|
|
+// @OperationLogAnnotation(operType = "更改状态", operModul = "设置为已上线")
|
|
|
@RequiresPermissions("user:newCmClub:edit")
|
|
|
public String onLine(NewCmClub newCmClub, Model model, RedirectAttributes redirectAttributes) {
|
|
|
- Integer companyUserID = newCmClub.getUserID();
|
|
|
- CmUser cmUser = cmUserService.get(companyUserID + "");
|
|
|
- if (null != cmUser) {
|
|
|
- cmUser.setClubStatus(ClubStatus.ONLINE.getCode() + "");
|
|
|
- cmUser.setValidFlag(AppKeys.FLAG_YES);//解除冻结
|
|
|
- cmUser.setUserPermission(2);
|
|
|
- cmUs=cmUser;
|
|
|
- //更新所有企业员工状态
|
|
|
- cmUserService.updateEmployeeStatus(null, ClubStatus.ONLINE.getCode() + "", null, "1", companyUserID);
|
|
|
- //更新所有审核过的企业员工权限
|
|
|
- cmUserService.updateEmployeePermission(2, companyUserID);
|
|
|
- cmUserService.update(cmUser);
|
|
|
- } else {
|
|
|
- addMessage(redirectAttributes, "上线失败,用户信息异常");
|
|
|
- return "redirect:" + Global.getAdminPath() + "/new/user/agency/?repage";
|
|
|
+ OperationalLogs sysLog = new OperationalLogs();
|
|
|
+ sysLog.setOperationtime(new Date());
|
|
|
+ sysLog.setContact(newCmClub.getLinkMan());
|
|
|
+ sysLog.setInstitutionName(newCmClub.getName());
|
|
|
+ SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
|
|
|
+ System.out.println("操作员" + principal.getName());
|
|
|
+ String username = principal.getName();
|
|
|
+ sysLog.setOperator(username);
|
|
|
+ sysLog.setOperationtype("更改状态");
|
|
|
+ sysLog.setActioncontent("设置为已上线");
|
|
|
+ //调用service保存SysLog实体类到数据库
|
|
|
+ if (!"".equals(sysLog.getActioncontent())) {
|
|
|
+ if (sysLog.getInstitutionName() != null && sysLog.getContact() != null) {
|
|
|
+ int i = sysLogService.insert(sysLog);
|
|
|
+ }
|
|
|
}
|
|
|
- newCmClub.setStatus(ClubStatus.ONLINE.getCode());
|
|
|
- newCmClubService.update(newCmClub);
|
|
|
- addMessage(redirectAttributes, "机构上线成功");
|
|
|
- redirectAttributes.addAttribute("searchName", newCmClub.getSearchName());
|
|
|
- redirectAttributes.addAttribute("searchUserName", newCmClub.getSearchUserName());
|
|
|
- redirectAttributes.addAttribute("searchBindMobile", newCmClub.getSearchBindMobile());
|
|
|
- redirectAttributes.addAttribute("searchEmail", newCmClub.getSearchEmail());
|
|
|
- redirectAttributes.addAttribute("searchUserOrganizeID", newCmClub.getSearchUserOrganizeID());
|
|
|
- redirectAttributes.addAttribute("searchStatus", newCmClub.getSearchStatus());
|
|
|
- redirectAttributes.addAttribute("searchUserIdentity", newCmClub.getSearchUserIdentity());
|
|
|
- redirectAttributes.addAttribute("searchStartTime", newCmClub.getSearchStartTime());
|
|
|
- redirectAttributes.addAttribute("searchEndTime", newCmClub.getSearchEndTime());
|
|
|
- return "redirect:" + Global.getAdminPath() + "/new/user/agency/?repage";
|
|
|
+
|
|
|
+ Integer companyUserID = newCmClub.getUserID();
|
|
|
+ CmUser cmUser = cmUserService.get(companyUserID + "");
|
|
|
+ if (null != cmUser) {
|
|
|
+ cmUser.setClubStatus(ClubStatus.ONLINE.getCode() + "");
|
|
|
+ cmUser.setValidFlag(AppKeys.FLAG_YES);//解除冻结
|
|
|
+ cmUser.setUserPermission(2);
|
|
|
+ //更新所有企业员工状态
|
|
|
+ cmUserService.updateEmployeeStatus(null, ClubStatus.ONLINE.getCode() + "", null, "1", companyUserID);
|
|
|
+ //更新所有审核过的企业员工权限
|
|
|
+ cmUserService.updateEmployeePermission(2, companyUserID);
|
|
|
+ cmUserService.update(cmUser);
|
|
|
+ } else {
|
|
|
+ addMessage(redirectAttributes, "上线失败,用户信息异常");
|
|
|
+ return "redirect:" + Global.getAdminPath() + "/new/user/agency/?repage";
|
|
|
+ }
|
|
|
+ newCmClub.setStatus(ClubStatus.ONLINE.getCode());
|
|
|
+ newCmClubService.update(newCmClub);
|
|
|
+ addMessage(redirectAttributes, "机构上线成功");
|
|
|
+ redirectAttributes.addAttribute("searchName", newCmClub.getSearchName());
|
|
|
+ redirectAttributes.addAttribute("searchUserName", newCmClub.getSearchUserName());
|
|
|
+ redirectAttributes.addAttribute("searchBindMobile", newCmClub.getSearchBindMobile());
|
|
|
+ redirectAttributes.addAttribute("searchEmail", newCmClub.getSearchEmail());
|
|
|
+ redirectAttributes.addAttribute("searchUserOrganizeID", newCmClub.getSearchUserOrganizeID());
|
|
|
+ redirectAttributes.addAttribute("searchStatus", newCmClub.getSearchStatus());
|
|
|
+ redirectAttributes.addAttribute("searchUserIdentity", newCmClub.getSearchUserIdentity());
|
|
|
+ redirectAttributes.addAttribute("searchStartTime", newCmClub.getSearchStartTime());
|
|
|
+ redirectAttributes.addAttribute("searchEndTime", newCmClub.getSearchEndTime());
|
|
|
+ return "redirect:" + Global.getAdminPath() + "/new/user/agency/?repage";
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -240,7 +261,6 @@ public class AgencyController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "offline")
|
|
|
- @OperationLogAnnotation(operType = "更改状态",operModul = "设置为已下线")
|
|
|
@RequiresPermissions("user:newCmClub:edit")
|
|
|
public String offLine(NewCmClub newCmClub, Model model, RedirectAttributes redirectAttributes) {
|
|
|
Integer companyUserID = newCmClub.getUserID();
|
|
@@ -249,28 +269,46 @@ public class AgencyController extends BaseController {
|
|
|
cmUser.setClubStatus(ClubStatus.FREEZE.getCode() + "");
|
|
|
cmUser.setValidFlag(AppKeys.FLAG_NO);//冻结
|
|
|
cmUser.setUserPermission(0);
|
|
|
- cmUs=cmUser;
|
|
|
- //更新所有企业员工状态 设置未提示
|
|
|
- cmUserService.updateEmployeeStatus(1, ClubStatus.ONLINE.getCode() + "", null, "0", companyUserID);
|
|
|
- cmUserService.update(cmUser);
|
|
|
- } else {
|
|
|
- addMessage(redirectAttributes, "下线失败,用户信息异常");
|
|
|
+
|
|
|
+ OperationalLogs sysLog = new OperationalLogs();
|
|
|
+ sysLog.setOperationtime(new Date());
|
|
|
+ sysLog.setContact(newCmClub.getLinkMan());
|
|
|
+ sysLog.setInstitutionName(newCmClub.getName());
|
|
|
+ SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
|
|
|
+ System.out.println("操作员" + principal.getName());
|
|
|
+ String username = principal.getName();
|
|
|
+ sysLog.setOperator(username);
|
|
|
+ sysLog.setOperationtype("更改状态");
|
|
|
+ sysLog.setActioncontent("设置为已下线");
|
|
|
+ //调用service保存SysLog实体类到数据库
|
|
|
+ if (!"".equals(sysLog.getActioncontent())) {
|
|
|
+ if (sysLog.getInstitutionName() != null && sysLog.getContact() != null) {
|
|
|
+ int i = sysLogService.insert(sysLog);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //更新所有企业员工状态 设置未提示
|
|
|
+ cmUserService.updateEmployeeStatus(1, ClubStatus.ONLINE.getCode() + "", null, "0", companyUserID);
|
|
|
+ cmUserService.update(cmUser);
|
|
|
+ } else {
|
|
|
+ addMessage(redirectAttributes, "下线失败,用户信息异常");
|
|
|
+ return "redirect:" + Global.getAdminPath() + "/new/user/agency/?repage";
|
|
|
+ }
|
|
|
+ newCmClub.setStatus(ClubStatus.FREEZE.getCode());
|
|
|
+ newCmClubService.update(newCmClub);
|
|
|
+ addMessage(redirectAttributes, "机构下线成功");
|
|
|
+ redirectAttributes.addAttribute("searchName", newCmClub.getSearchName());
|
|
|
+ redirectAttributes.addAttribute("searchUserName", newCmClub.getSearchUserName());
|
|
|
+ redirectAttributes.addAttribute("searchBindMobile", newCmClub.getSearchBindMobile());
|
|
|
+ redirectAttributes.addAttribute("searchEmail", newCmClub.getSearchEmail());
|
|
|
+ redirectAttributes.addAttribute("searchUserOrganizeID", newCmClub.getSearchUserOrganizeID());
|
|
|
+ redirectAttributes.addAttribute("searchStatus", newCmClub.getSearchStatus());
|
|
|
+ redirectAttributes.addAttribute("searchUserIdentity", newCmClub.getSearchUserIdentity());
|
|
|
+ redirectAttributes.addAttribute("searchStartTime", newCmClub.getSearchStartTime());
|
|
|
+ redirectAttributes.addAttribute("searchEndTime", newCmClub.getSearchEndTime());
|
|
|
return "redirect:" + Global.getAdminPath() + "/new/user/agency/?repage";
|
|
|
}
|
|
|
- newCmClub.setStatus(ClubStatus.FREEZE.getCode());
|
|
|
- newCmClubService.update(newCmClub);
|
|
|
- addMessage(redirectAttributes, "机构下线成功");
|
|
|
- redirectAttributes.addAttribute("searchName", newCmClub.getSearchName());
|
|
|
- redirectAttributes.addAttribute("searchUserName", newCmClub.getSearchUserName());
|
|
|
- redirectAttributes.addAttribute("searchBindMobile", newCmClub.getSearchBindMobile());
|
|
|
- redirectAttributes.addAttribute("searchEmail", newCmClub.getSearchEmail());
|
|
|
- redirectAttributes.addAttribute("searchUserOrganizeID", newCmClub.getSearchUserOrganizeID());
|
|
|
- redirectAttributes.addAttribute("searchStatus", newCmClub.getSearchStatus());
|
|
|
- redirectAttributes.addAttribute("searchUserIdentity", newCmClub.getSearchUserIdentity());
|
|
|
- redirectAttributes.addAttribute("searchStartTime", newCmClub.getSearchStartTime());
|
|
|
- redirectAttributes.addAttribute("searchEndTime", newCmClub.getSearchEndTime());
|
|
|
- return "redirect:" + Global.getAdminPath() + "/new/user/agency/?repage";
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 查看机构
|
|
@@ -312,11 +350,9 @@ public class AgencyController extends BaseController {
|
|
|
cmClubinfo.setMedicalPracticeLicenseImg(newCmClub.getMedicalPracticeLicenseImg());
|
|
|
cmClubinfo.setContractEmail(newCmClub.getContractEmail());
|
|
|
cmClubinfo.setLinkManIdentity(newCmClub.getLinkManIdentity());
|
|
|
- newCm = newCmClub;
|
|
|
- cmClu = cmClubinfo;
|
|
|
-
|
|
|
model.addAttribute("cmClubinfo", cmClubinfo);
|
|
|
model.addAttribute("newCmClub", newCmClub);
|
|
|
+
|
|
|
String wwwServer = Global.getConfig("wwwServer");
|
|
|
//营业执照
|
|
|
newCmClub.setBusinessLicenseImage(AppUtils.getImageURL("clubBusinessLicenseImage", newCmClub.getBusinessLicenseImage(), 0, wwwServer));
|
|
@@ -335,9 +371,269 @@ public class AgencyController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "save")
|
|
|
- @OperationLogAnnotation(operType = "编辑" ,oper = "2")
|
|
|
@RequiresPermissions("user:newCmClub:edit")
|
|
|
public String save(NewCmClub newCmClub, CmClubinfo cmClubinfo, Model model, RedirectAttributes redirectAttributes) {
|
|
|
+ ArrayList<String> list = new ArrayList();
|
|
|
+ OperationalLogs sysLog = new OperationalLogs();
|
|
|
+ NewCmClub newCmClubs = sysLogService.newCmClub(newCmClub.getClubID());
|
|
|
+ System.out.println("id>>>>>>>>>>"+ newCmClub.getClubID()+"<<<<<"+cmClubinfo.getUserID());
|
|
|
+ CmClubinfo cmClubinfos = sysLogService.cmclubinfo(cmClubinfo.getClubInfoID());
|
|
|
+
|
|
|
+ logger.info("newCmClub页面数据"+newCmClub);
|
|
|
+ logger.info("newCmClub数据库数据"+newCmClubs);
|
|
|
+ logger.info("cmClubinfo页面数据"+cmClubinfo);
|
|
|
+ logger.info("cmClubinfo数据库数据"+cmClubinfos);
|
|
|
+ //编辑时添加操作日志
|
|
|
+ if(cmClubinfos!=null) {
|
|
|
+ if (null == (cmClubinfos.getHighestAchievement()) || null == cmClubinfos.getReachPepole() || null == cmClubinfos.getClinchPepole()) {
|
|
|
+ if (!"".equals(cmClubinfo.getHighestAchievement()) || cmClubinfo.getReachPepole() != null || cmClubinfo.getClinchPepole() != null) {
|
|
|
+ list.add("新增了活动业绩信息");
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ if (!cmClubinfo.getHighestAchievement().equals(cmClubinfos.getHighestAchievement())) {
|
|
|
+ list.add("修改了活动业绩的最高业绩信息");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!cmClubinfo.getReachPepole().equals(cmClubinfos.getReachPepole())) {
|
|
|
+ list.add("修改了活动业绩的到店人数信息");
|
|
|
+ }
|
|
|
+ if (!cmClubinfo.getClinchPepole().equals(cmClubinfos.getClinchPepole())) {
|
|
|
+ list.add("修改了活动业绩的成交人数信息");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (cmClubinfos.getConsumeA() == null || cmClubinfos.getConsumeB() == null || cmClubinfos.getConsumeC() == null) {
|
|
|
+ if (cmClubinfo.getConsumeA() != null || cmClubinfo.getConsumeB() != null || cmClubinfo.getConsumeC() != null) {
|
|
|
+ list.add("新增了会员消费金额信息");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (!cmClubinfo.getConsumeA().equals(cmClubinfos.getConsumeA())) {
|
|
|
+ list.add("修改了A类会员消费金额");
|
|
|
+ }
|
|
|
+ if (!cmClubinfo.getConsumeB().equals(cmClubinfos.getConsumeB())) {
|
|
|
+ list.add("修改了B类会员消费金额");
|
|
|
+ }
|
|
|
+ if (!cmClubinfo.getConsumeC().equals(cmClubinfos.getConsumeC())) {
|
|
|
+ list.add("修改了C类会员消费金额");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (cmClubinfos.getCateA() == null || cmClubinfos.getCateB() == null || cmClubinfos.getCateC() == null) {
|
|
|
+ if (null != cmClubinfo.getCateA() || null != cmClubinfo.getCateB() || null != cmClubinfo.getCateC()) {
|
|
|
+ list.add("新增了会员信息");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (!cmClubinfo.getCateA().equals(cmClubinfos.getCateA())) {
|
|
|
+ list.add("修改了A会员信息");
|
|
|
+ }
|
|
|
+ if (!cmClubinfo.getCateB().equals(cmClubinfos.getCateB())) {
|
|
|
+ list.add("修改了B会员信息");
|
|
|
+ }
|
|
|
+ if (!cmClubinfo.getCateC().equals(cmClubinfos.getCateC())) {
|
|
|
+ list.add("修改了C会员信息");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if ("".equals(cmClubinfos.getMonthAchievement()) || "".equals(cmClubinfos.getPromotionAchievement()) || "".equals(cmClubinfos.getYearAchievement())) {
|
|
|
+ if (!"".equals(cmClubinfos.getMonthAchievement()) || !"".equals(cmClubinfos.getPromotionAchievement()) || !"".equals(cmClubinfos.getYearAchievement())) {
|
|
|
+ list.add("新增了业绩信息");
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ if (!cmClubinfo.getMonthAchievement().equals(cmClubinfos.getMonthAchievement())) {
|
|
|
+ list.add("修改了月业绩信息");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!cmClubinfo.getPromotionAchievement().equals(cmClubinfos.getPromotionAchievement())) {
|
|
|
+ list.add("修改了促销业绩信息");
|
|
|
+ }
|
|
|
+ if (!cmClubinfo.getYearAchievement().equals(cmClubinfos.getYearAchievement())) {
|
|
|
+ list.add("修改了年业绩信息");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (cmClubinfos.getArea() == null || cmClubinfos.getBedNums() == null || cmClubinfos.getBeauticians() == null) {
|
|
|
+ if (null != cmClubinfo.getArea() || null != cmClubinfo.getBedNums() || null != cmClubinfo.getBeauticians()) {
|
|
|
+ list.add("更新了基本信息");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (!cmClubinfo.getArea().equals(cmClubinfos.getArea())) {
|
|
|
+ list.add("修改了机构面积");
|
|
|
+ }
|
|
|
+ if (!cmClubinfo.getBedNums().equals(cmClubinfos.getBedNums())) {
|
|
|
+ list.add("修改了美容床数");
|
|
|
+ }
|
|
|
+ if (!cmClubinfo.getBeauticians().equals(cmClubinfos.getBeauticians())) {
|
|
|
+ list.add("修改了美容师数");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (null == (newCmClubs.getInfo())) {
|
|
|
+ if (!"".equals(newCmClub.getInfo())) {
|
|
|
+ list.add("新增了公司简介");
|
|
|
+ }
|
|
|
+ } else if (!newCmClub.getInfo().equals(newCmClubs.getInfo())) {
|
|
|
+ list.add("修改了公司简介");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (cmClubinfo.getEmpnum() != null) {
|
|
|
+ if (!cmClubinfo.getEmpnum().equals(cmClubinfos.getEmpnum())) {
|
|
|
+ list.add("更新了公司人数");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (null == (newCmClubs.getFax())) {
|
|
|
+ if (!"".equals(newCmClub.getFax())) {
|
|
|
+ list.add("新增了传真");
|
|
|
+ }
|
|
|
+ } else if (!newCmClub.getFax().equals(newCmClubs.getFax())) {
|
|
|
+ list.add("修改了传真");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (null == (newCmClubs.getContractPhone())) {
|
|
|
+ if (!"".equals(newCmClub.getContractPhone())) {
|
|
|
+ list.add("新增了固定电话");
|
|
|
+ }
|
|
|
+ } else if (!newCmClub.getContractPhone().equals(newCmClubs.getContractPhone())) {
|
|
|
+ list.add("修改了固定电话");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!newCmClub.getAddress().equals(newCmClubs.getAddress())) {
|
|
|
+ list.add("修改了详细地址");
|
|
|
+ }
|
|
|
+ if (newCmClub.getLinkManIdentity() != null) {
|
|
|
+ if (!newCmClub.getLinkManIdentity().equals(newCmClubs.getLinkManIdentity())) {
|
|
|
+ list.add("修改了联系人身份");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (newCmClubs.getLinkMan() == null) {
|
|
|
+ if (newCmClub.getUserName() != null) {
|
|
|
+ list.add("新增了联系人");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!newCmClub.getUserName().equals(newCmClubs.getLinkMan())) {
|
|
|
+ list.add("修改了联系人");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (newCmClubs.getMainpro() != null) {
|
|
|
+ if (!newCmClub.getMainpro().equals(newCmClubs.getMainpro())) {
|
|
|
+ list.add("修改了主营内容");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (newCmClubs.getFirstClubType() == null) {
|
|
|
+ if (newCmClub.getFirstClubType() != null) {
|
|
|
+ list.add("新增了机构类型");
|
|
|
+ }
|
|
|
+ } else if (!newCmClub.getFirstClubType().equals(newCmClubs.getFirstClubType())) {
|
|
|
+ list.add("修改了机构类型");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (newCmClubs.getBusinessLicenseImage() == null) {
|
|
|
+ if (newCmClub.getBusinessLicenseImage() != null) {
|
|
|
+ list.add("新增了营业执照");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (!newCmClub.getBusinessLicenseImage().equals(newCmClubs.getBusinessLicenseImage())) {
|
|
|
+ list.add("修改了营业执照");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (newCmClubs.getHeadpic() == null) {
|
|
|
+ if (newCmClub.getHeadpic() != null) {
|
|
|
+ list.add("新增了门头照");
|
|
|
+ }
|
|
|
+ if (!newCmClub.getHeadpic().equals(newCmClubs.getHeadpic())) {
|
|
|
+ list.add("修改了门头照");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (newCmClubs.getSocialCreditCode() == null) {
|
|
|
+ if (newCmClub.getSocialCreditCode() != null) {
|
|
|
+ list.add("新增了营业执照编号");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!newCmClub.getSocialCreditCode().equals(newCmClubs.getSocialCreditCode())) {
|
|
|
+ list.add("修改了营业执照编号");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (newCmClubs.getAddress() == null) {
|
|
|
+ if (newCmClub.getAddress() != null) {
|
|
|
+ list.add("新增了详细地址");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (newCmClubs.getSname() == null) {
|
|
|
+ if (newCmClub.getSname() != null) {
|
|
|
+ list.add("新增了机构简称");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!newCmClub.getSname().equals(newCmClubs.getSname())) {
|
|
|
+ list.add("修改了机构简称");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (newCmClubs.getName() == null) {
|
|
|
+ if (newCmClub.getName() != null) {
|
|
|
+ list.add("新增了机构名称");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!newCmClub.getName().equals(newCmClubs.getName())) {
|
|
|
+ list.add("修改了机构名称");
|
|
|
+ }
|
|
|
+
|
|
|
+ if ("".equals(newCmClubs.getContractMobile())) {
|
|
|
+ if (!newCmClub.getBindMobile().equals(null)) {
|
|
|
+ list.add("新增了手机号");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!newCmClub.getBindMobile().equals(newCmClubs.getContractMobile())) {
|
|
|
+ list.add("修改了手机号");
|
|
|
+ }
|
|
|
+ if ("".equals(newCmClubs.getContractEmail())) {
|
|
|
+ if (!newCmClub.getContractEmail().equals(null)) {
|
|
|
+ list.add("新增了注册邮箱");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!"".equals(newCmClub.getContractEmail())) {
|
|
|
+ if (!newCmClub.getContractEmail().equals(newCmClubs.getContractEmail())) {
|
|
|
+ list.add("修改了邮箱");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ list.add("新机构添加了信息");
|
|
|
+ }
|
|
|
+ sysLog.setActioncontent(StringUtils.strip(list.toString(), "[]"));
|
|
|
+
|
|
|
+ //获取操作时间
|
|
|
+ sysLog.setOperationtime(new Date());
|
|
|
+
|
|
|
+ //获取操作员
|
|
|
+ SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
|
|
|
+ System.out.println("操作员" + principal.getName());
|
|
|
+ String username = principal.getName();
|
|
|
+ sysLog.setOperator(username);
|
|
|
+ sysLog.setContact(newCmClub.getLinkMan());
|
|
|
+ sysLog.setInstitutionName(newCmClub.getName());
|
|
|
+ sysLog.setOperationtype("编辑");
|
|
|
+ if (!"".equals(sysLog.getActioncontent())) {
|
|
|
+ if (sysLog.getInstitutionName() != null && sysLog.getContact() != null) {
|
|
|
+ int i = sysLogService.insert(sysLog);
|
|
|
+ list.removeAll(list);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
String name = cmClubinfo.getName();
|
|
|
String userName = cmClubinfo.getUserName();
|
|
|
String bindMobile = cmClubinfo.getBindMobile();
|
|
@@ -419,8 +715,8 @@ public class AgencyController extends BaseController {
|
|
|
user.setBindMobile(bindMobile);
|
|
|
cmUserService.update(user);
|
|
|
newCmClubService.update(newCmClub);//更新机构表数据
|
|
|
+ System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>"+cmClubinfo);
|
|
|
cmClubinfoService.save(cmClubinfo);
|
|
|
-
|
|
|
addMessage(redirectAttributes, "保存机构资料成功");
|
|
|
redirectAttributes.addAttribute("searchName", newCmClub.getSearchName());
|
|
|
redirectAttributes.addAttribute("searchUserName", newCmClub.getSearchUserName());
|
|
@@ -441,8 +737,8 @@ public class AgencyController extends BaseController {
|
|
|
*/
|
|
|
@RequiresPermissions("user:newCmClub:edit")
|
|
|
@ResponseBody
|
|
|
- @OperationLogAnnotation(operType = "更换协销")
|
|
|
@RequestMapping(value = "changeSp")
|
|
|
+ @OperationLogAnnotation()
|
|
|
public Map<String, Object> changeSp(String spID, String clubID, HttpServletRequest request, HttpServletResponse response) {
|
|
|
Map<String, Object> map = Maps.newLinkedHashMap();
|
|
|
try {
|
|
@@ -493,7 +789,6 @@ public class AgencyController extends BaseController {
|
|
|
Map<String, Object> map = Maps.newLinkedHashMap();
|
|
|
try {
|
|
|
CmUser cmUser = cmUserService.get(id);
|
|
|
- cmUs = cmUser;
|
|
|
cmUser.setPassword(MD5Util.MD5(password));
|
|
|
cmUserService.update(cmUser);
|
|
|
map.put("success", true);
|
|
@@ -518,7 +813,7 @@ public class AgencyController extends BaseController {
|
|
|
*/
|
|
|
@RequiresPermissions("user:newCmClub:edit")
|
|
|
@ResponseBody
|
|
|
- @OperationLogAnnotation(operType = "审核")
|
|
|
+// @OperationLogAnnotation(operType = "审核")
|
|
|
@RequestMapping(value = "auditClub")
|
|
|
public Map<String, Object> auditClub(String auditStatus, String auditNote, String id, HttpServletRequest request, HttpServletResponse response) {
|
|
|
Map<String, Object> map = Maps.newLinkedHashMap();
|
|
@@ -526,6 +821,9 @@ public class AgencyController extends BaseController {
|
|
|
String smsMessage = "";
|
|
|
String currTime = DateUtils.getDateTime();
|
|
|
Integer userPermission;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
try {
|
|
|
NewCmClub newCmClub = newCmClubService.get(id);
|
|
|
Integer companyUserID = newCmClub.getUserID();
|
|
@@ -537,6 +835,32 @@ public class AgencyController extends BaseController {
|
|
|
/**审核处理*/
|
|
|
//审核通过
|
|
|
if (StringUtils.equals("1", auditStatus)) {
|
|
|
+
|
|
|
+ OperationalLogs sysLog = new OperationalLogs();
|
|
|
+ if ("1".equals(auditStatus)){
|
|
|
+ sysLog.setActioncontent("审核通过");
|
|
|
+ } else {
|
|
|
+ sysLog.setActioncontent("审核不通过");
|
|
|
+ }
|
|
|
+ String Contact = sysLogService.auditlinkMan(Integer.parseInt(id));
|
|
|
+ String ionName = sysLogService.auditName(Integer.parseInt(id));
|
|
|
+ sysLog.setContact(Contact);
|
|
|
+ sysLog.setInstitutionName(ionName);
|
|
|
+ SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
|
|
|
+ System.out.println("操作员" + principal.getName());
|
|
|
+ String username = principal.getName();
|
|
|
+ sysLog.setOperator(username);
|
|
|
+ sysLog.setOperationtype("审核");
|
|
|
+ sysLog.setOperationtime(new Date());
|
|
|
+ //调用service保存SysLog实体类到数据库
|
|
|
+ if (!"".equals(sysLog.getActioncontent())) {
|
|
|
+ if (sysLog.getInstitutionName() != null && sysLog.getContact() != null) {
|
|
|
+ int i = sysLogService.insert(sysLog);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
userPermission = 2;
|
|
|
status = "90";
|
|
|
auditStatus = "1";
|
|
@@ -662,9 +986,32 @@ public class AgencyController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
- @OperationLogAnnotation(operType = "设置机构类别")
|
|
|
+// @OperationLogAnnotation(operType = "设置机构类别")
|
|
|
@RequestMapping("/upgradeClub")
|
|
|
public Map<String, Object> upgradeClub(NewCmClub cmClub, String type, RedirectAttributes redirectAttributes) {
|
|
|
+ OperationalLogs sysLog = new OperationalLogs();
|
|
|
+ sysLog.setOperationtime(new Date());
|
|
|
+ if ("1".equals(type)){
|
|
|
+ sysLog.setActioncontent("设置为资质机构");
|
|
|
+ }else {
|
|
|
+ sysLog.setActioncontent("设置为个人机构");
|
|
|
+ }
|
|
|
+ sysLog.setContact(cmClub.getLinkMan());
|
|
|
+ sysLog.setInstitutionName(cmClub.getName());
|
|
|
+ SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
|
|
|
+ System.out.println("操作员" + principal.getName());
|
|
|
+ String username = principal.getName();
|
|
|
+ sysLog.setOperator(username);
|
|
|
+ sysLog.setOperationtype("设置机构类别");
|
|
|
+ //调用service保存SysLog实体类到数据库
|
|
|
+ if (!"".equals(sysLog.getActioncontent())) {
|
|
|
+ if (sysLog.getInstitutionName() != null && sysLog.getContact() != null) {
|
|
|
+ int i = sysLogService.insert(sysLog);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
if (cmClub != null) {
|
|
|
CmUser cmUser = cmUserService.get(cmClub.getUserID().toString());
|