以工号作为登录名称
parent
3a15edaff7
commit
192017cf4f
|
@ -224,7 +224,7 @@ public class AccountController extends BaseController {
|
|||
Map<String, String> searchInfo = getSearchInfo(keywords);
|
||||
downloadHeader(httpServletResponse, Utils.generateExcelName("人员信息"), "application/octet-stream");
|
||||
String[] headers = {"工号", "手机号码", "姓名", "常驻地", "一级部门", "直接主管", "职位", "所属角色", "公司邮件地址"};
|
||||
String[] exportColumns = {"empCode", "telephone", "realName", "workLocation", "deptName", "directManager", "positionName", "roleName", "companyEmail"};
|
||||
String[] exportColumns = {"userName", "telephone", "realName", "workLocation", "deptName", "directManager", "positionName", "roleName", "companyEmail"};
|
||||
ExportUtils.exportToExcel(headers, exportColumns, 1, 10000,
|
||||
httpServletResponse.getOutputStream(), (pN, pS) -> accountService.list(searchInfo, pN, pS).getList());
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ public class AccountController extends BaseController {
|
|||
@RequestMapping("/template")
|
||||
public void template(HttpServletResponse response) throws Exception {
|
||||
|
||||
String[] headers = new String[]{"工号", "手机号码", "登录名称", "姓名", "常驻地", "一级部门", "直接主管", "职位", "所属角色", "公司邮件地址"};
|
||||
String[] headers = new String[]{"工号", "手机号码", "姓名", "常驻地", "一级部门", "直接主管", "职位", "所属角色", "公司邮件地址"};
|
||||
downloadHeader(response, Utils.generateExcelName("人员信息批量导入模板"));
|
||||
ExportUtils exportUtils = new ExportUtils(headers);
|
||||
exportUtils.write(response.getOutputStream());
|
||||
|
|
|
@ -134,7 +134,7 @@ public class AccountService {
|
|||
oldAdmin.setRealName(admin.getRealName());
|
||||
oldAdmin.setDeptName(dept.getName());
|
||||
oldAdmin.setPositionName(userPosition.getPositionName());
|
||||
oldAdmin.setEmpCode(admin.getEmpCode());
|
||||
//oldAdmin.setEmpCode(admin.getEmpCode());
|
||||
oldAdmin.setWorkLocation(admin.getWorkLocation());
|
||||
oldAdmin.setDirectManager(admin.getDirectManager());
|
||||
oldAdmin.setCompanyEmail(admin.getCompanyEmail());
|
||||
|
@ -174,7 +174,7 @@ public class AccountService {
|
|||
}
|
||||
|
||||
//工号重复校验
|
||||
Admin empCode = adminRepository.findByEmpCode(admin.getEmpCode());
|
||||
/*Admin empCode = adminRepository.findByEmpCode(admin.getEmpCode());
|
||||
if (userId == -1) {
|
||||
if (null != empCode) {
|
||||
message = "该工号已存在!";
|
||||
|
@ -185,7 +185,7 @@ public class AccountService {
|
|||
message = "该工号已存在!";
|
||||
return message;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
//手机号重复校验
|
||||
Admin byTelephoneEquals = adminRepository.findByTelephone(phone);
|
||||
|
@ -202,18 +202,18 @@ public class AccountService {
|
|||
}
|
||||
|
||||
if (StringUtils.isEmpty(admin.getUserName())) {
|
||||
message = "登录名不能为空!";
|
||||
message = "工号不能为空!";
|
||||
return message;
|
||||
}
|
||||
Admin existAdmin = adminRepository.getAdminByUsername(admin.getUserName());
|
||||
if (userId == -1) {
|
||||
if (existAdmin != null) {
|
||||
message = "该登录名称已存在!";
|
||||
message = "该工号已存在!";
|
||||
return message;
|
||||
}
|
||||
} else {
|
||||
if (existAdmin != null && existAdmin.getId() != userId) {
|
||||
message = "该登录名称已存在!";
|
||||
message = "该工号已存在!";
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ public class AccountService {
|
|||
throw new Exception("工号不能为空");
|
||||
}
|
||||
|
||||
Admin byEmpCode = adminRepository.findByEmpCode(empCode.toString());
|
||||
Admin byEmpCode = adminRepository.getAdminByUsername(empCode.toString());
|
||||
|
||||
if (null != byEmpCode) {
|
||||
throw new Exception("工号" + empCode.toString() + "已存在");
|
||||
|
@ -320,7 +320,7 @@ public class AccountService {
|
|||
throw new Exception("手机号码" + telephone.toString() + "已存在");
|
||||
}
|
||||
|
||||
Object userName = m.get("登录名称");
|
||||
/*Object userName = m.get("登录名称");
|
||||
if (userName == null || StrKit.isBlank(userName.toString())) {
|
||||
throw new Exception("登录名称不能为空");
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ public class AccountService {
|
|||
Admin byUsername = adminRepository.getAdminByUsername(userName.toString());
|
||||
if (null != byUsername) {
|
||||
throw new Exception("登录名称" + byUsername.toString() + "已存在");
|
||||
}
|
||||
}*/
|
||||
|
||||
Object realName = m.get("姓名");
|
||||
if (realName == null || StrKit.isBlank(realName.toString())) {
|
||||
|
@ -389,9 +389,10 @@ public class AccountService {
|
|||
}
|
||||
|
||||
admin = new Admin();
|
||||
admin.setEmpCode(empCode.toString());
|
||||
//admin.setEmpCode(empCode.toString());
|
||||
admin.setTelephone(telephone.toString());
|
||||
admin.setUserName(userName.toString());
|
||||
admin.setUserName(empCode.toString());
|
||||
admin.setRealName(realName.toString());
|
||||
admin.setWorkLocation(workLocation.toString());
|
||||
admin.setDeptId(dept.getId());
|
||||
admin.setDeptName(dept.getName());
|
||||
|
@ -399,7 +400,7 @@ public class AccountService {
|
|||
admin.setPositionId(userPosition.getId());
|
||||
admin.setPositionName(userPosition.getPositionName());
|
||||
admin.setRoleId(role.getId());
|
||||
admin.setRealName(role.getName());
|
||||
admin.setRoleName(role.getName());
|
||||
admin.setCompanyEmail(companyEmail.toString());
|
||||
|
||||
String salt = RandomStringUtils.randomAlphanumeric(6).toUpperCase();
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
工号
|
||||
</div>
|
||||
<div class="am-u-sm-6 am-u-md-6">
|
||||
<input name="empCode" class="js-ajax-validate"
|
||||
<input name="userName" class="js-ajax-validate"
|
||||
data-validate-async data-validation-message="请输入工号"
|
||||
type="text" id="empCode" value="${account.empCode!}" minlength="1"
|
||||
type="text" id="userName" value="${account.userName!}" minlength="1"
|
||||
maxlength="20"
|
||||
required <#if userId!=-1>readonly</#if>
|
||||
placeholder="请输入工号"/>
|
||||
|
@ -56,7 +56,7 @@
|
|||
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
|
||||
</div>
|
||||
|
||||
<div class="am-g am-form-group am-margin-top">
|
||||
<#--<div class="am-g am-form-group am-margin-top">
|
||||
<div class="am-u-sm-4 am-u-md-2 am-text-right">
|
||||
<span style="color: red;">*</span>
|
||||
登录名称
|
||||
|
@ -70,7 +70,7 @@
|
|||
placeholder="请输入登录名称(20字符以内)"/>
|
||||
</div>
|
||||
<div class="am-u-sm-2 am-u-md-4 input-msg"></div>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<div class="am-g am-form-group am-margin-top">
|
||||
<div class="am-u-sm-4 am-u-md-2 am-text-right">
|
||||
|
|
|
@ -157,7 +157,7 @@
|
|||
<tbody>
|
||||
<#list pager.list as list>
|
||||
<tr>
|
||||
<td>${list.empCode!}</td>
|
||||
<td>${list.userName!}</td>
|
||||
<td>${list.telephone!}</td>
|
||||
<td>${list.realName!}</td>
|
||||
<td>${list.workLocation!}</td>
|
||||
|
|
|
@ -41,17 +41,17 @@
|
|||
<#list primaryIndicatorList as list>
|
||||
<tr>
|
||||
<td>${list.title!}</td>
|
||||
<td>${list.incomeDevice!}</td>
|
||||
<td>${list.incomeEngineer!}</td>
|
||||
<td>${list.incomeService!}</td>
|
||||
<td>${list.costPurchaseDevice!}</td>
|
||||
<td>${list.costPurchaseBuild!}</td>
|
||||
<td>${list.costPurchaseService!}</td>
|
||||
<td>${list.costPurchaseOther!}</td>
|
||||
<td>${list.costOtherOther!}</td>
|
||||
<td>${list.costProjectManage!}</td>
|
||||
<td>${list.costExpropriation!}</td>
|
||||
<td>${list.costCompanyManage!}</td>
|
||||
<td>${(list.incomeDevice!0)?string("0.##")}
|
||||
<td>${(list.incomeEngineer!0)?string("0.##")}</td>
|
||||
<td>${(list.incomeService!0)?string("0.##")}</td>
|
||||
<td>${(list.costPurchaseDevice!0)?string("0.##")}</td>
|
||||
<td>${(list.costPurchaseBuild!0)?string("0.##")}</td>
|
||||
<td>${(list.costPurchaseService!0)?string("0.##")}</td>
|
||||
<td>${(list.costPurchaseOther!0)?string("0.##")}</td>
|
||||
<td>${(list.costOtherOther!0)?string("0.##")}</td>
|
||||
<td>${(list.costProjectManage!0)?string("0.##")}</td>
|
||||
<td>${(list.costExpropriation!0)?string("0.##")}</td>
|
||||
<td>${(list.costCompanyManage!0)?string("0.##")}</td>
|
||||
</tr>
|
||||
</#list>
|
||||
</#if>
|
||||
|
@ -137,20 +137,20 @@
|
|||
<#list cashFlowList as list>
|
||||
<tr>
|
||||
<td>${list.title!}</td>
|
||||
<td>${list.saleIncomeCash!}</td>
|
||||
<td>${list.taxReturn!}</td>
|
||||
<td>${list.earnestMoneyIncome!}</td>
|
||||
<td>${list.purchaseCost!}</td>
|
||||
<td>${list.taxCost!}</td>
|
||||
<td>${list.earnestMoneyCost!}</td>
|
||||
<td>${list.netCashFlow!}</td>
|
||||
<td>${list.cashInflowFromInvestingActivities!}</td>
|
||||
<td>${list.cashOutflowFromInvestingActivities!}</td>
|
||||
<td>${list.netCashFromInvestingActivities!}</td>
|
||||
<td>${list.financingCapitalInflow!}</td>
|
||||
<td>${list.financingCapitalOutflow!}</td>
|
||||
<td>${list.financingCapitalCashflow!}</td>
|
||||
<td>${list.netIncreaseMonetaryFunds!}</td>
|
||||
<td>${(list.saleIncomeCash!0)?string("0.##")}</td>
|
||||
<td>${(list.taxReturn!0)?string("0.##")}</td>
|
||||
<td>${(list.earnestMoneyIncome!0)?string("0.##")}</td>
|
||||
<td>${(list.purchaseCost!0)?string("0.##")}</td>
|
||||
<td>${(list.taxCost!0)?string("0.##")}</td>
|
||||
<td>${(list.earnestMoneyCost!0)?string("0.##")}</td>
|
||||
<td>${(list.netCashFlow!0)?string("0.##")}</td>
|
||||
<td>${(list.cashInflowFromInvestingActivities!0)?string("0.##")}</td>
|
||||
<td>${(list.cashOutflowFromInvestingActivities!0)?string("0.##")}</td>
|
||||
<td>${(list.netCashFromInvestingActivities!0)?string("0.##")}</td>
|
||||
<td>${(list.financingCapitalInflow!0)?string("0.##")}</td>
|
||||
<td>${(list.financingCapitalOutflow!0)?string("0.##")}</td>
|
||||
<td>${(list.financingCapitalCashflow!0)?string("0.##")}</td>
|
||||
<td>${(list.netIncreaseMonetaryFunds!0)?string("0.##")}</td>
|
||||
</tr>
|
||||
</#list>
|
||||
</#if>
|
||||
|
|
Loading…
Reference in New Issue