Commit 44daaf65 authored by 赵啸非's avatar 赵啸非

修改部分一键部署功能

parent 255cd917
......@@ -158,6 +158,7 @@ public class WorkmanServiceImpl extends AbstractCRUDCacheServiceImpl<WorkmanDao,
} catch (Exception e) {
throw new AppException("密码转换异常!", e);
}
sysUser.setUpdateTime(new Date());
dao.update(sysUser);
this.putCache(loginName, sysUser);
......@@ -218,7 +219,8 @@ public class WorkmanServiceImpl extends AbstractCRUDCacheServiceImpl<WorkmanDao,
boolean bool = com.mortals.framework.util.FileUtil.write(filePath, FileUtil.readBytes(file), true, true);
if (bool) {
workmanEntity.setPhotoPath(newName);
workmanService.update(workmanEntity);
workmanEntity.setUpdateTime(new Date());
workmanService.getDao().update(workmanEntity);
}
} catch (IOException e) {
log.error("写入证照异常", e);
......@@ -254,7 +256,7 @@ public class WorkmanServiceImpl extends AbstractCRUDCacheServiceImpl<WorkmanDao,
entity.setId(workmanEntity.getId());
entity.setDeleted(YesNoEnum.NO.getValue());
entity.setUpdateUserId(this.getContextUserId(context));
entity.setCreateTime(new Date());
entity.setUpdateTime(new Date());
WorkmanEntity update = this.update(entity, context);
if (update != null) {
successNum++;
......
......@@ -111,10 +111,10 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
WorkmanEntity workmanEntity = this.service.doLogin(query.getLoginName(), query.getLoginPwd(), ip);
workmanEntity.setLastLoginAddress(ip);
workmanEntity.setLastLoginTime(new Date());
if(query.getWindowId()!=null) {
if (query.getWindowId() != null) {
workmanEntity.setWindowId(query.getWindowId());
WindowEntity windowEntity = windowService.get(query.getWindowId());
if(windowEntity!=null){
if (windowEntity != null) {
workmanEntity.setWindowName(windowEntity.getName());
}
}
......@@ -141,7 +141,7 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
JSONObject ret = new JSONObject();
try {
log.info("filePath:" + query.getFilePath());
Rest<Void> rest = this.service.doImportPic(query.getFilePath());
this.service.doImportPic(query.getFilePath());
ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
recordSysLog(request, getCurUser(), "解析工作人员图片成功!");
return ret.toJSONString();
......@@ -170,7 +170,7 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
} else {
throw new AppException("账户密码修改失败!");
}
recordSysLog(request, getCurUser(), "工作人员更新密码成功! workman:"+query.getLoginName());
} catch (Exception e) {
ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
ret.put(KEY_RESULT_MSG, super.convertException(e));
......@@ -245,7 +245,7 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
}
if (!ObjectUtils.isEmpty(workmanEntity.getDeptName())) {
DeptEntity dept = deptService.selectOne(new DeptQuery().name(workmanEntity.getDeptName()).siteId(siteEntity.getId()));
if(!ObjectUtils.isEmpty(dept)){
if (!ObjectUtils.isEmpty(dept)) {
workmanEntity.setDeptId(dept.getId());
workmanEntity.setDeptName(dept.getName());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment