Просмотр исходного кода

1、经理查看六要素
2、管理员新增公出审核人员
3、公出打卡列表修改审核列表
4、修改项目统计列表

anderx лет назад: 4
Родитель
Сommit
2ed9409f13

+ 1 - 15
src/main/java/com/goafanti/admin/controller/AdminSuperviserApiController.java

@@ -94,23 +94,18 @@ public class AdminSuperviserApiController extends CertifyApiController {
 				res.getError().add(buildError(ErrorConstants.PARAM_BEING_ERROR, "", "咨询师管理员"));
 				return res;
 			}
-
-
 			Admin ad = new Admin();
 			BeanUtils.copyProperties(admin, ad);
 			/*ad.setId(UUID.randomUUID().toString());*/
 			Calendar now = Calendar.getInstance();
 			now.set(Calendar.MILLISECOND, 0);
-
 			ad.setCreateTime(now.getTime());
 			if (StringUtils.isBlank(ad.getPassword())) {
 				ad.setPassword(AFTConstants.INITIALPASSWORD);
 			}
 			ad.setPassword(passwordUtil.getEncryptPwd(ad));
-
 			res.setData(newAdminService.insertNewAdmin(ad,roles));
 		}
-
 		return res;
 	}
 
@@ -129,22 +124,18 @@ public class AdminSuperviserApiController extends CertifyApiController {
 		}
 		if (null != jo) {
 			Admin admin = jo.toJavaObject(Admin.class);
-
 			if (null == admin.getId()) {
 				res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "用户id"));
 				return res;
 			}
-
 			if (null == admin.getMobile()) {
 				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "登录帐号为空", "登录帐号"));
 				return res;
 			}
-
 			if (null == admin.getName()) {
 				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "用户名为空", "用户名"));
 				return res;
 			}
-
 			Admin aa = newAdminService.selectByMobile(admin.getMobile().trim());
 			if (null != aa && !admin.getId().equals(aa.getId())) {
 				res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "当前用户已注册!"));
@@ -155,7 +146,6 @@ public class AdminSuperviserApiController extends CertifyApiController {
 				res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "用户id"));				
 				return res;	
 			}	
-			
 			if (newAdminService.checkAdminRole(roles,admin)) {
 				res.getError().add(buildError(ErrorConstants.PARAM_BEING_ERROR, "", "咨询师管理员"));				
 				return res;	
@@ -168,10 +158,8 @@ public class AdminSuperviserApiController extends CertifyApiController {
 			}
 		res.setData(newAdminService.updateByPrimaryKeySelective(ad, roles));
 		}
-		
-	
 		return res;
-}
+	}
 
 	/**
 	 * 重置管理员密码
@@ -183,7 +171,6 @@ public class AdminSuperviserApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "用户id"));
 			return res;
 		}
-
 		Admin admin = newAdminService.selectByPrimaryKey(id);
 		if (null == admin) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "用户id"));
@@ -219,7 +206,6 @@ public class AdminSuperviserApiController extends CertifyApiController {
 				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "省份为空", "所在省份"));
 				return res;
 			}
-
 			if (province.intValue() > AFTConstants.PROVINCEMAXNUM) {
 				res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "所在省份"));
 				return res;

+ 0 - 2
src/main/java/com/goafanti/admin/service/impl/NewAdminServiceImpl.java

@@ -46,9 +46,7 @@ public class NewAdminServiceImpl extends BaseMybatisDao<AdminMapper> implements
 		if(StringUtils.isNotBlank(alb.getStatus())) params.put("status", alb.getStatus());
 		if(StringUtils.isNotBlank(alb.getMobile())) params.put("mobile", alb.getMobile());
 		if(StringUtils.isNotBlank(alb.getSuperiorId())) params.put("superiorId", alb.getSuperiorId());		
-		@SuppressWarnings("unchecked")
 		Pagination<AdminListBo> p=(Pagination<AdminListBo>)findPage("selectAdminListByPage","selectAdminCount",params,pageNo,pageSize);
-		@SuppressWarnings("unchecked")
 		List<AdminListBo> list=(List<AdminListBo>)p.getList();
 		for(AdminListBo i:list){
 			i.setRoles(adminMapper.selectRolesByUid(i.getId()));