Commit 980f7dc7 authored by 赵啸非's avatar 赵啸非

添加终端修改密码日志记录

parent f5c81942
...@@ -2121,9 +2121,10 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -2121,9 +2121,10 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
deptEntity.setCreateTime(new Date()); deptEntity.setCreateTime(new Date());
deptEntity.setCreateUserId(1L); deptEntity.setCreateUserId(1L);
deptService.save(deptEntity); deptService.save(deptEntity);
matterEntity.setDeptCode(deptEntity.getDeptNumber());
this.update(matterEntity);
} }
matterEntity.setDeptCode(deptEntity.getDeptNumber());
this.update(matterEntity);
//todo 固定新增办事流程 //todo 固定新增办事流程
ArrayList<MatterFlowlimitEntity> matterFlowlimitEntities = new ArrayList<>(); ArrayList<MatterFlowlimitEntity> matterFlowlimitEntities = new ArrayList<>();
...@@ -2188,6 +2189,40 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -2188,6 +2189,40 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
matterEntity.setUpdateUserId(1L); matterEntity.setUpdateUserId(1L);
this.dao.update(matterEntity); this.dao.update(matterEntity);
//todo 部门业务逻辑一致
SiteEntity siteEntity = siteService.selectOne(new SiteQuery().areaCode(matterEntity.getAreaCode()));
if (ObjectUtils.isEmpty(siteEntity)) {
//创建一个本级站点
siteEntity = new SiteEntity();
siteEntity.initAttrValue();
siteEntity.setAreaCode(matterEntity.getAreaCode());
siteEntity.setAreaName(matterEntity.getAreaName());
siteEntity.setSiteName(matterEntity.getAreaName());
siteEntity.setCreateTime(new Date());
siteEntity.setCreateUserId(1L);
siteService.save(siteEntity);
}
//保存区域站点部门
DeptEntity deptEntity = deptService.selectOne(new DeptQuery().siteId(siteEntity.getId()).name(matterEntity.getDeptName()));
if (ObjectUtils.isEmpty(deptEntity)) {
deptEntity = new DeptEntity();
deptEntity.initAttrValue();
deptEntity.setName(matterEntity.getDeptName());
deptEntity.setDeptNumber(RandomUtil.randomString(12));
deptEntity.setSiteId(siteEntity.getId());
deptEntity.setCreateTime(new Date());
deptEntity.setCreateUserId(1L);
deptService.save(deptEntity);
}
matterEntity.setDeptCode(deptEntity.getDeptNumber());
this.update(matterEntity);
MatterChannelQuery channelQuery = new MatterChannelQuery(); MatterChannelQuery channelQuery = new MatterChannelQuery();
channelQuery.setMatterId(matterEntity.getId()); channelQuery.setMatterId(matterEntity.getId());
......
...@@ -15,6 +15,7 @@ import com.mortals.framework.util.FileUtil; ...@@ -15,6 +15,7 @@ import com.mortals.framework.util.FileUtil;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.base.system.upload.service.UploadService; import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.common.code.OnlineEnum; import com.mortals.xhx.common.code.OnlineEnum;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
...@@ -170,7 +171,7 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman ...@@ -170,7 +171,7 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
} else { } else {
throw new AppException("账户密码修改失败!"); throw new AppException("账户密码修改失败!");
} }
recordSysLog(request, getCurUser(), "工作人员更新密码成功! workman:"+query.getLoginName()); recordSysLog(request, getCurUser(), "工作人员更新密码成功! workman:" + query.getLoginName());
} catch (Exception e) { } catch (Exception e) {
ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE); ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
ret.put(KEY_RESULT_MSG, super.convertException(e)); ret.put(KEY_RESULT_MSG, super.convertException(e));
...@@ -192,6 +193,13 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman ...@@ -192,6 +193,13 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
throw new AppException("账户密码修改失败!"); throw new AppException("账户密码修改失败!");
} }
UserEntity clientUser = new UserEntity();
clientUser.setLoginName("终端机");
clientUser.setRealName("终端机");
clientUser.setId(-1L);
recordSysLog(request, clientUser, "工作人员更新密码成功! workman:" + query.getLoginName());
} catch (Exception e) { } catch (Exception e) {
ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE); ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
ret.put(KEY_RESULT_MSG, super.convertException(e)); ret.put(KEY_RESULT_MSG, super.convertException(e));
......
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