Explorar o código

统一用户调整

shaohao521 hai 1 ano
pai
achega
5c2c4dd808

+ 9 - 41
fangchan_manager/src/main/resources/templates/system/user/add_user.html

@@ -65,53 +65,25 @@
 					<label class="layui-form-label">账号</label>
 					<div class="layui-input-block">
 						<input type="text" id="account" lay-verify="required"
-							value="${(user.account)! }" placeholder="请输入账号" autocomplete="off" class="layui-input">
-					</div>
-				</div>
-				<div class="layui-form-item">
-					<label class="layui-form-label">角色:</label>
-					<div class="layui-input-block">
-						<select id="roleId">
-							<option value="19" <#if user.roleId?? && user.roleId == 19>selected</#if>>市局初审</option>
-							<option value="20" <#if user.roleId?? && user.roleId == 20>selected</#if>>市局复审</option>
-							<option value="21" <#if user.roleId?? && user.roleId == 21>selected</#if>>市局终审</option>
-							<option value="16" <#if user.roleId?? && user.roleId == 16>selected</#if>>区县局初审</option>
-							<option value="17" <#if user.roleId?? && user.roleId == 17>selected</#if>>区县局复审</option>
-							<option value="18" <#if user.roleId?? && user.roleId == 18>selected</#if>>区县局终审</option>
-						</select>
+							value="${(user.account)! }" placeholder="请输入账号" autocomplete="off" class="layui-input" disabled>
 					</div>
 				</div>
 				<div class="layui-form-item">
 					<label class="layui-form-label">昵称</label>
 					<div class="layui-input-block">
 						<input type="text" id="nice"
-							autocomplete="off" value="${(user.nice)! }" placeholder="请输入昵称"
-							class="layui-input">
+							   autocomplete="off" value="${(user.nice)! }" placeholder="请输入昵称"
+							   class="layui-input" disabled>
 					</div>
 				</div>
 				<div class="layui-form-item">
-					<label class="layui-form-label">密码</label>
-					<div class="layui-input-block">
-						<input type="text" id="password" autocomplete="off"  placeholder="请输入密码" class="layui-input">
-					</div>
-				</div>
-
-				<div class="layui-form-item">
-					<label class="layui-form-label">区县:</label>
+					<label class="layui-form-label">角色:</label>
 					<div class="layui-input-block">
-						<select id="ssqy">
-							<option value="">请选择</option>
-							<option value="1" <#if user.ssqy?? && user.ssqy == 1>selected</#if>>张店区</option>
-							<option value="2" <#if user.ssqy?? && user.ssqy == 2>selected</#if>>博山区</option>
-							<option value="3" <#if user.ssqy?? && user.ssqy == 3>selected</#if>>淄川区</option>
-							<option value="4" <#if user.ssqy?? && user.ssqy == 4>selected</#if>>周村区</option>
-							<option value="5" <#if user.ssqy?? && user.ssqy == 5>selected</#if>>临淄区</option>
-							<option value="6" <#if user.ssqy?? && user.ssqy == 6>selected</#if>>桓台县</option>
-							<option value="7" <#if user.ssqy?? && user.ssqy == 7>selected</#if>>高青县</option>
-							<option value="8" <#if user.ssqy?? && user.ssqy == 8>selected</#if>>沂源县</option>
-							<option value="9" <#if user.ssqy?? && user.ssqy == 9>selected</#if>>高新区</option>
-							<option value="10" <#if user.ssqy?? && user.ssqy == 10>selected</#if>>经开区</option>
-							<option value="11" <#if user.ssqy?? && user.ssqy == 11>selected</#if>>文昌湖区</option>
+						<select id="roleId">
+							<option value="19" <#if user.roleId?? && user.roleId == 19>selected</#if>>管理员</option>
+							<option value="16" <#if user.roleId?? && user.roleId == 16>selected</#if>>主管部门-初审</option>
+							<option value="17" <#if user.roleId?? && user.roleId == 17>selected</#if>>主管部门-复审</option>
+							<option value="18" <#if user.roleId?? && user.roleId == 18>selected</#if>>主管部门-终审</option>
 						</select>
 					</div>
 				</div>
@@ -167,10 +139,6 @@
 					data : {
 						id:$("#id").val(),
 						roleId:$("#roleId").val(),
-						ssqy:$("#ssqy").val(),
-						nice:$("#nice").val(),
-						account:$("#account").val(),
-						password:$("#password").val()
 					},
 					dataType : 'json',
 					success : function(data) {

+ 3 - 3
fangchan_mybatis/src/main/java/com/mw/platform/business/mysql/service/impl/OrganizationServiceImpl.java

@@ -622,7 +622,7 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
             user.setSysType("059358cc4487e7773a878cda0193de67");
             user.setStatus(1);
             user.setCreateTime(new Date());
-            user.settyyhId(loginUser.getTyyhId());
+            user.settyyhId("qy"+loginUser.getUserId());
             user.setFranId(1);
             userInfoMapper.insert(user);
             return user;
@@ -633,12 +633,12 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
             user.setId(UUIDUtils.getEncryUUID());
             user.setAccount(loginUser.getAccount());
             user.setPassword(MD5Util.MD5Encode("123456", "UTF-8"));
-            user.setRoleId(16);
+            user.setRoleId(19);
             user.setNice("主管部门-"+loginUser.getUserName());
             user.setSysType("059358cc4487e7773a878cda0193de67");
             user.setStatus(1);
             user.setCreateTime(new Date());
-            user.settyyhId(loginUser.getTyyhId());
+            user.settyyhId("zgbm"+loginUser.getUserId());
             user.setFranId(5);
             userInfoMapper.insert(user);
             return user;

+ 1 - 1
pom.xml

@@ -3,7 +3,7 @@
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>com.mw.platform</groupId>
-    <artifactId>sg_zjxy</artifactId>
+    <artifactId>cb_platform</artifactId>
     <version>1.0.1</version>
     <packaging>pom</packaging>
 

+ 9 - 8
system_core/src/main/java/com/mw/platform/controller/system/SysUserController.java

@@ -1,9 +1,11 @@
 package com.mw.platform.controller.system;
 
+import com.mw.platform.aspect.Log;
 import com.mw.platform.core.BaseController;
 import com.mw.platform.core.BaseParameter;
 import com.mw.platform.core.Example;
 import com.mw.platform.core.ListView;
+import com.mw.platform.enums.OperationType;
 import com.mw.platform.system.mysql.dao.ISysUserDao;
 import com.mw.platform.system.mysql.entity.LoginUser;
 import com.mw.platform.system.mysql.entity.SysRoleAuthority;
@@ -22,6 +24,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import java.io.IOException;
 import java.util.Arrays;
@@ -39,7 +42,7 @@ public class SysUserController extends BaseController {
 	@Autowired
 	private ISysRoleService roleService;
 
-	@Autowired
+	@Resource
 	private ISysUserDao userInfoMapper;
 
 	@RequestMapping(value = "/getUserList", method = RequestMethod.GET)
@@ -93,6 +96,7 @@ public class SysUserController extends BaseController {
 	@RequestMapping(value = "/userPull", method = RequestMethod.POST)
 	@ResponseBody
 	@Transactional
+	@Log(operationType = OperationType.OTHER , title = "主管部门用户拉取")
 	public String userPull(){
 		List<LoginUser> loginUsers = userService.selectZgbmUser();
 
@@ -110,21 +114,21 @@ public class SysUserController extends BaseController {
 				user.setId(UUIDUtils.getEncryUUID());
 				user.setAccount(loginUser.getAccount());
 				user.setPassword(MD5Util.MD5Encode("123456", "UTF-8"));
-				user.setRoleId(16);
+				user.setRoleId(19);
 				user.setNice("主管部门-"+loginUser.getUserName());
 				user.setSysType("059358cc4487e7773a878cda0193de67");
 				user.setStatus(1);
 				user.setCreateTime(new Date());
-				user.settyyhId(loginUser.getTyyhId());
+				user.settyyhId("zgbm" + loginUser.getUserId());
 				user.setFranId(5);
-				userInfoMapper.insert(user);
+				userService.saveSysUser(user);
 				crsl++;
 			}else {
 				if (!loginUser.getAccount().equals(userInfo.getAccount()) ||
 						!("主管部门-"+loginUser.getUserName()).equals(userInfo.getNice())){
 					userInfo.setAccount(loginUser.getAccount());
 					userInfo.setNice("主管部门-"+loginUser.getUserName());
-					userInfoMapper.update(userInfo);
+					userService.updateSysUser(userInfo);
 					gxsl++;
 				}
 			}
@@ -187,9 +191,6 @@ public class SysUserController extends BaseController {
 	@ResponseBody
 	public String toEditUser(SysUserInfo userInfo){
 		BaseParameter result = new BaseParameter();
-		if (userInfo.getPassword().equals("")){
-			userInfo.setPassword(null);
-		}
 		userService.updateSysUser(userInfo);
 		result.setMessage("修改成功");
 		result.commit();

+ 1 - 1
system_mybatis/src/main/java/com/mw/platform/system/mysql/entity/SysUserInfo.java

@@ -706,7 +706,7 @@ public class SysUserInfo implements Serializable {
      * @mbggenerated
      */
     public void settyyhId(String tyyhId) {
-        this.tyyhId = tyyhId == null ? null : tyyhId.trim();
+        this.tyyhId = tyyhId;
     }
 
     /**