运营商同步生成用户账号,停用启用关联启动
This commit is contained in:
@ -2,7 +2,15 @@ package com.ruoyi.operation.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.exception.RRException;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.framework.shiro.service.SysPasswordService;
|
||||
import com.ruoyi.system.domain.Zoning;
|
||||
import com.ruoyi.system.service.ISysAreaHnService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
@ -36,6 +44,15 @@ public class CompanyController extends BaseController
|
||||
@Autowired
|
||||
private ICompanyService companyService;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
@Autowired
|
||||
private SysPasswordService passwordService;
|
||||
|
||||
@Autowired
|
||||
private ISysAreaHnService areaHnService;
|
||||
|
||||
@RequiresPermissions("operation:company:view")
|
||||
@GetMapping()
|
||||
public String company()
|
||||
@ -88,8 +105,39 @@ public class CompanyController extends BaseController
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(Company company)
|
||||
{
|
||||
if (StringUtils.isNotEmpty(company.getPhone())
|
||||
&& UserConstants.USER_PHONE_NOT_UNIQUE.equals(companyService.checkPhoneUnique(company)))
|
||||
{
|
||||
return error("新增失败,手机号码已存在");
|
||||
}
|
||||
company.setCreateBy(getLoginName());
|
||||
return toAjax(companyService.insertCompany(company));
|
||||
int flag = companyService.insertCompany(company);
|
||||
if(flag > 0) {
|
||||
// 创建运营商成功,添加运营商账号
|
||||
SysUser user = new SysUser();
|
||||
user.setSalt("");
|
||||
String password = UserConstants.DEFAULT_PASSWORD;
|
||||
user.setLoginName(company.getPhone());
|
||||
user.setUserName(company.getCompanyName());
|
||||
user.setUserType(UserConstants.USER_TYPE_02);
|
||||
user.setPhonenumber(company.getPhone());
|
||||
user.setPassword(passwordService.encryptPassword(user.getLoginName(), password, user.getSalt()));
|
||||
//所属区域转换省市县乡村组字段
|
||||
Zoning zoning = areaHnService.getAreaSuperior(company.getCitys());
|
||||
user.setCityCode(zoning.getCityCode());
|
||||
user.setCityName(zoning.getCityName());
|
||||
user.setDistrictCode(zoning.getDistrictCode());
|
||||
user.setDistrictName(zoning.getDistrictName());
|
||||
user.setTownCode(zoning.getTownCode());
|
||||
user.setTownName(zoning.getTownName());
|
||||
user.setCreateBy(getLoginName());
|
||||
user.setCreateTime(DateUtils.getNowDate());
|
||||
user.setUpdateTime(DateUtils.getNowDate());
|
||||
user.setStatus("0");
|
||||
user.setCreateById(getUserId());
|
||||
userService.insertUser(user);
|
||||
}
|
||||
return toAjax(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -113,6 +161,11 @@ public class CompanyController extends BaseController
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(Company company)
|
||||
{
|
||||
if (StringUtils.isNotEmpty(company.getPhone())
|
||||
&& UserConstants.USER_PHONE_NOT_UNIQUE.equals(companyService.checkPhoneUnique(company)))
|
||||
{
|
||||
return error("修改失败,手机号码已存在");
|
||||
}
|
||||
company.setUpdateBy(getLoginName());
|
||||
return toAjax(companyService.updateCompany(company));
|
||||
}
|
||||
@ -136,6 +189,15 @@ public class CompanyController extends BaseController
|
||||
@ResponseBody
|
||||
public AjaxResult changeStatus(Company company)
|
||||
{
|
||||
int flag = companyService.changeStatus(company);
|
||||
if(flag >0) {
|
||||
// 运营商启用停用,同时启用停用用户信息
|
||||
SysUser user = userService.selectUserByPhoneNumber(company.getPhone());
|
||||
if(user != null) {
|
||||
user.setStatus(company.getStatus());
|
||||
userService.changeStatus(user);
|
||||
}
|
||||
}
|
||||
return toAjax(companyService.changeStatus(company));
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,6 +19,14 @@ public interface CompanyMapper
|
||||
*/
|
||||
public Company selectCompanyById(Long id);
|
||||
|
||||
/**
|
||||
* 根据手机号查询运营商信息
|
||||
*
|
||||
* @param phone 手机号
|
||||
* @return 运营商对象
|
||||
*/
|
||||
Company checkPhoneUnique(String phone);
|
||||
|
||||
/**
|
||||
* 查询运营商列表
|
||||
*
|
||||
|
||||
@ -27,6 +27,17 @@ public interface ICompanyService
|
||||
*/
|
||||
public List<Company> selectCompanyList(Company company);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 校验手机号是否唯一
|
||||
*
|
||||
* @param company 运营商信息
|
||||
* @return 结果("0"表示唯一,"1"表示重复)
|
||||
*/
|
||||
public String checkPhoneUnique(Company company);
|
||||
|
||||
|
||||
/**
|
||||
* 新增运营商
|
||||
*
|
||||
|
||||
@ -1,7 +1,12 @@
|
||||
package com.ruoyi.operation.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.operation.mapper.CompanyMapper;
|
||||
@ -45,6 +50,18 @@ public class CompanyServiceImpl implements ICompanyService
|
||||
return companyMapper.selectCompanyList(company);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String checkPhoneUnique(Company company){
|
||||
Long companyId = StringUtils.isNull(company.getId()) ? -1L : company.getId();
|
||||
Company info = companyMapper.checkPhoneUnique(company.getPhone());
|
||||
if (StringUtils.isNotNull(info) && info.getId().longValue() != companyId.longValue())
|
||||
{
|
||||
return UserConstants.USER_PHONE_NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.USER_PHONE_UNIQUE;
|
||||
}
|
||||
/**
|
||||
* 新增运营商
|
||||
*
|
||||
|
||||
@ -166,7 +166,7 @@ public class SysUserController extends BaseController
|
||||
user.setVillageName(zoning.getVillageName());
|
||||
user.setGroupId(zoning.getGroupId());
|
||||
user.setGroupName(zoning.getGroupName());
|
||||
|
||||
user.setStatus("0");
|
||||
return toAjax(userService.insertUser(user));
|
||||
}
|
||||
|
||||
|
||||
@ -104,7 +104,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectCompanyVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 根据手机号查询运营商是否存在 -->
|
||||
<select id="checkPhoneUnique" parameterType="string" resultType="com.ruoyi.operation.domain.Company">
|
||||
SELECT * FROM company WHERE phone = #{phone}
|
||||
</select>
|
||||
|
||||
<insert id="insertCompany" parameterType="Company" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into company
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
@ -244,325 +244,7 @@
|
||||
</div>
|
||||
<div class="box-body chat" >
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show" th:if="${homeStatisticsVo.roleKey == 'dfb' || homeStatisticsVo.roleKey == 'xjw' || homeStatisticsVo.roleKey == 'admin'}">
|
||||
<div id="bern1">
|
||||
<div class="panel-heading">
|
||||
<span class='span-title'>钱袋子</span>
|
||||
</div>
|
||||
<div style="overflow-y: auto;padding:0 10px;">
|
||||
<div class="yu clear" style="width: 100%;margin-top:0;padding-top:0;">
|
||||
|
||||
<a onclick="toPage('钱袋子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=1&queryWarningStatus=0')">
|
||||
<div class="yu-item1" style="background:#1ab394;">
|
||||
<i class="fa fa-pencil-square-o"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">待交办</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.qiandaiziNoAssigned}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a onclick="toPage('钱袋子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=1&queryWarningStatus=10')">
|
||||
<div class="yu-item1" style="background:#f8ac59;">
|
||||
<i class="fa fa-file-text"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">待核处</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.qiandaiziNoVerified}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a onclick="toPage('钱袋子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=1&queryWarningStatus=20')">
|
||||
<div class="yu-item1" style="background:#23c6c8;">
|
||||
<i class="fa fa-hourglass-1"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">待审核</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.qiandaiziUnaudited}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a onclick="toPage('钱袋子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=1&queryWarningStatus=30')">
|
||||
<div class="yu-item1" style="background:#f85976;">
|
||||
<i class="fa fa-check-square"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">建议销号</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.qiandaiziConsiderCancel}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a onclick="toPage('钱袋子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=1&queryWarningStatus=31')">
|
||||
<div class="yu-item1" style="background:#4a79ab;">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">待办案</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.qiandaiziNoHandle}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-tab-item layui-show" th:if="${homeStatisticsVo.roleKey == 'dfb' || homeStatisticsVo.roleKey == 'xjw' || homeStatisticsVo.roleKey == 'admin'}">
|
||||
<div id="bern2">
|
||||
<div class="panel-heading">
|
||||
<span class='span-title'>命根子</span>
|
||||
</div>
|
||||
<div style="overflow-y: auto;padding:0 10px;">
|
||||
<div class="yu clear" style="width: 100%;margin-top:0;padding-top:0;">
|
||||
|
||||
<a onclick="toPage('命根子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=2&queryWarningStatus=0')" >
|
||||
<div class="yu-item1" style="background:#1ab394;">
|
||||
<i class="fa fa-pencil-square-o"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">待交办</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.minggenziNoAssigned}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a onclick="toPage('命根子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=2&queryWarningStatus=10')">
|
||||
<div class="yu-item1" style="background:#f8ac59;">
|
||||
<i class="fa fa-file-text"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">待核处</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.minggenziNoVerified}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a onclick="toPage('命根子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=2&queryWarningStatus=20')">
|
||||
<div class="yu-item1" style="background:#23c6c8;">
|
||||
<i class="fa fa-hourglass-1"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">待审核</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.minggenziUnaudited}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a onclick="toPage('命根子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=2&queryWarningStatus=30')">
|
||||
<div class="yu-item1" style="background:#f85976;">
|
||||
<i class="fa fa-check-square"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">建议销号</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.minggenziConsiderCancel}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a onclick="toPage('命根子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=2&queryWarningStatus=31')">
|
||||
<div class="yu-item1" style="background:#4a79ab;">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">待办案</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.minggenziNoHandle}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-tab-item layui-show" th:if="${homeStatisticsVo.roleKey == 'dfb' || homeStatisticsVo.roleKey == 'xjw' || homeStatisticsVo.roleKey == 'admin'}">
|
||||
<div id="bern3">
|
||||
<div class="panel-heading">
|
||||
<span class='span-title'>印把子</span>
|
||||
</div>
|
||||
<div style="overflow-y: auto;padding:0 10px;">
|
||||
<div class="yu clear" style="width: 100%;margin-top:0;padding-top:0;">
|
||||
|
||||
<a onclick="toPage('印把子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=3&queryWarningStatus=0')" >
|
||||
<div class="yu-item1" style="background:#1ab394;">
|
||||
<i class="fa fa-pencil-square-o"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">待交办</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.yinbaziNoAssigned}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a onclick="toPage('印把子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=3&queryWarningStatus=10')">
|
||||
<div class="yu-item1" style="background:#f8ac59;">
|
||||
<i class="fa fa-file-text"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">待核处</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.yinbaziNoVerified}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a onclick="toPage('印把子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=3&queryWarningStatus=20')">
|
||||
<div class="yu-item1" style="background:#23c6c8;">
|
||||
<i class="fa fa-hourglass-1"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">待审核</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.yinbaziUnaudited}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a onclick="toPage('印把子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=3&queryWarningStatus=30')">
|
||||
<div class="yu-item1" style="background:#f85976;">
|
||||
<i class="fa fa-check-square"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">建议销号</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.yinbaziConsiderCancel}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a onclick="toPage('印把子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=3&queryWarningStatus=31')">
|
||||
<div class="yu-item1" style="background:#4a79ab;">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">待办案</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.yinbaziNoHandle}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-tab-item layui-show" th:if="${homeStatisticsVo.roleKey == 'dfb' || homeStatisticsVo.roleKey == 'xjw' || homeStatisticsVo.roleKey == 'admin'}">
|
||||
<div id="bern4">
|
||||
<div class="panel-heading">
|
||||
<span class='span-title'>一班子</span>
|
||||
</div>
|
||||
<div style="overflow-y: auto;padding:0 10px;">
|
||||
<div class="yu clear" style="width: 100%;margin-top:0;padding-top:0;">
|
||||
|
||||
<a onclick="toPage('一班子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=4&queryWarningStatus=0')" >
|
||||
<div class="yu-item1" style="background:#1ab394;">
|
||||
<i class="fa fa-pencil-square-o"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">待交办</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.yibanziNoAssigned}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a onclick="toPage('一班子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=4&queryWarningStatus=10')">
|
||||
<div class="yu-item1" style="background:#f8ac59;">
|
||||
<i class="fa fa-file-text"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">待核处</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.yibanziNoVerified}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a onclick="toPage('一班子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=4&queryWarningStatus=20')">
|
||||
<div class="yu-item1" style="background:#23c6c8;">
|
||||
<i class="fa fa-hourglass-1"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">待审核</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.yibanziUnaudited}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a onclick="toPage('一班子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=4&queryWarningStatus=30')">
|
||||
<div class="yu-item1" style="background:#f85976;">
|
||||
<i class="fa fa-check-square"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">建议销号</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.yibanziConsiderCancel}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a onclick="toPage('一班子预警列表','/jd-hh-xupu/jd/IdWarningMember?warningType=4&queryWarningStatus=31')">
|
||||
<div class="yu-item1" style="background:#4a79ab;">
|
||||
<i class="fa fa-calendar"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">待办案</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.yibanziNoHandle}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-tab-item layui-show" th:if="${homeStatisticsVo.roleKey == 'xzjw' || homeStatisticsVo.roleKey == 'bm' || homeStatisticsVo.roleKey == 'admin'}">
|
||||
<div id="bern5">
|
||||
<div class="panel-heading">
|
||||
<span class='span-title'>部门核实</span>
|
||||
</div>
|
||||
<div style="overflow-y: auto;padding:0 10px;">
|
||||
<div class="yu clear" style="width: 100%;margin-top:0;padding-top:0;">
|
||||
|
||||
<a onclick="toPage('部门核实列表','/jd-hh-xupu/jd/IdWarningMember?verifyFlag=1&queryWarningStatus=10')" >
|
||||
<div class="yu-item1" style="background:#1ab394;">
|
||||
<i class="fa fa-pencil-square-o"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">待核处</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.notVerified}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-tab-item layui-show" th:if="${homeStatisticsVo.roleKey == 'bas' || homeStatisticsVo.roleKey == 'admin'}">
|
||||
<div id="bern6">
|
||||
<div class="panel-heading">
|
||||
<span class='span-title'>办案室</span>
|
||||
</div>
|
||||
<div style="overflow-y: auto;padding:0 10px;">
|
||||
<div class="yu clear" style="width: 100%;margin-top:0;padding-top:0;">
|
||||
<a onclick="toPage('办案室列表','/jd-hh-xupu/jd/IdWarningMember?queryWarningStatus=31')" >
|
||||
<div class="yu-item1" style="background:#1ab394;">
|
||||
<i class="fa fa-pencil-square-o"></i>
|
||||
<div class="yu-item-block">
|
||||
<p class="yu-item-text">待办案</p>
|
||||
<p class="fz-bigger">
|
||||
[[${homeStatisticsVo.notHandle}]]
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box (chat box) -->
|
||||
|
||||
@ -133,9 +133,9 @@
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + ' btnOption" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
if (row.status == 1) {
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onclick="enable(\'' + row.id + '\')"><i class="fa fa-edit"></i>启用</a> ');
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onclick="enable(\'' + row.id + '\',\'' + row.phone + '\')"><i class="fa fa-edit"></i>启用</a> ');
|
||||
} else {
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onclick="disable(\'' + row.id + '\')"><i class="fa fa-edit"></i>停用</a> ');
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onclick="disable(\'' + row.id + '\',\'' + row.phone + '\')"><i class="fa fa-edit"></i>停用</a> ');
|
||||
}
|
||||
return actions.join('');
|
||||
}
|
||||
@ -145,16 +145,16 @@
|
||||
});
|
||||
|
||||
/* 用户管理-停用 */
|
||||
function disable(id) {
|
||||
function disable(id,phone) {
|
||||
$.modal.confirm("确认是否停用此运营商?<span style='color: red'>停用后此运营商的车辆与门店不会显示在小程序中</span>", function() {
|
||||
$.operate.post(prefix + "/changeStatus", { "id": id, "status": 1 });
|
||||
$.operate.post(prefix + "/changeStatus", { "id": id, "phone": phone , "status": 1 });
|
||||
})
|
||||
}
|
||||
|
||||
/* 用户管理启用 */
|
||||
function enable(id) {
|
||||
function enable(id,phone) {
|
||||
$.modal.confirm("确认是否启用此运营商?<span style='color: red'>启用运营商后停用前的数据将恢复正常,运营商可登录管理后台。</span>", function() {
|
||||
$.operate.post(prefix + "/changeStatus", { "id": id, "status": 0 });
|
||||
$.operate.post(prefix + "/changeStatus", { "id": id, "phone": phone , "status": 0 });
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -82,6 +82,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">用户类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="userType" class="form-control m-b" th:with="type=${@dict.getType('sys_user_type')}" required >
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">用户性别:</label>
|
||||
@ -92,17 +102,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">出生日期:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="birthday" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
||||
@ -71,6 +71,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">用户类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="userType" class="form-control m-b" th:with="type=${@dict.getType('sys_user_type')}" required >
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{userType}" ></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">用户性别:</label>
|
||||
@ -81,17 +91,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">出生日期:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="birthday" class="form-control is-required" placeholder="yyyy-MM-dd" type="text" th:value="${#dates.format(user.birthday, 'yyyy-MM-dd')}" required>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
||||
@ -6,24 +6,7 @@
|
||||
<th:block th:include="include :: ztree-css" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="ui-layout-west">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-grid"></i> 组织机构
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<a type="button" class="btn btn-box-tool" href="#" onclick="dept()" title="管理部门"><i class="fa fa-edit"></i></a>
|
||||
<button type="button" class="btn btn-box-tool" id="btnExpand" title="展开" style="display:none;"><i class="fa fa-chevron-up"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnCollapse" title="折叠"><i class="fa fa-chevron-down"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnRefresh" title="刷新部门"><i class="fa fa-refresh"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-layout-content">
|
||||
<div id="tree" class="ztree"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ui-layout-center">
|
||||
<div class="container-div">
|
||||
@ -71,12 +54,12 @@
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:user:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="system:user:import">
|
||||
<i class="fa fa-upload"></i> 导入
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:user:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
<!-- <a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="system:user:import">-->
|
||||
<!-- <i class="fa fa-upload"></i> 导入-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:user:export">-->
|
||||
<!-- <i class="fa fa-download"></i> 导出-->
|
||||
<!-- </a>-->
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
@ -165,10 +148,10 @@
|
||||
field: 'phonenumber',
|
||||
title: '手机'
|
||||
},
|
||||
{
|
||||
field: 'birthday',
|
||||
title: '出生日期'
|
||||
},
|
||||
// {
|
||||
// field: 'birthday',
|
||||
// title: '出生日期'
|
||||
// },
|
||||
// {
|
||||
// field: 'status',
|
||||
// title: '用户状态',
|
||||
@ -191,26 +174,34 @@
|
||||
// field: 'cardNumber',
|
||||
// title: '一卡通账号'
|
||||
// },
|
||||
// {
|
||||
// field: 'userType',
|
||||
// title: '用户类型',
|
||||
// formatter: function(value, row, index) {
|
||||
// return $.table.selectDictLabel(userTypeDatas, value);
|
||||
// }
|
||||
// },
|
||||
{
|
||||
field: 'cityName',
|
||||
title: '省'
|
||||
},
|
||||
{
|
||||
field: 'districtName',
|
||||
title: '市'
|
||||
},
|
||||
// {
|
||||
// field: 'createTime',
|
||||
// title: '创建时间',
|
||||
// sortable: true
|
||||
// },
|
||||
{
|
||||
field: 'userType',
|
||||
title: '用户类型',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(userTypeDatas, value);
|
||||
}
|
||||
},
|
||||
// {
|
||||
// field: 'cityName',
|
||||
// title: '省'
|
||||
// },
|
||||
// {
|
||||
// field: 'districtName',
|
||||
// title: '市'
|
||||
// },
|
||||
{
|
||||
visible: editFlag == 'hidden' ? false : true,
|
||||
title: '用户状态',
|
||||
align: 'center',
|
||||
formatter: function (value, row, index) {
|
||||
return statusTools(row);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
|
||||
Reference in New Issue
Block a user