CZT
2023-11-27 c206acfaedc69c390fb67daa81bc686f58a212ef
igds-manager/src/main/java/com/ld/igds/oa/service/HStaffService.java
@@ -25,10 +25,11 @@
    public void pageData(Page<OAStaff> page, Map<String, Object> param)
            throws Exception {
        String hql = " from " + OAStaff.class.getName() + " where companyId=:companyId";
        String hql = " from " + OAStaff.class.getName() + " where companyId =:companyId and deptId =:deptId";
        Map<String, Object> args = new HashMap<>();
        args.put("companyId", ContextUtil.getCompanyId());
        args.put("deptId", ContextUtil.subDeptId(null));
        if (null != param) {
@@ -68,13 +69,13 @@
    }
    public String saveOrUpdate(OAStaff data) {
        //判断组织编码
        if (StringUtils.isEmpty(data.getCompanyId())) {
            data.setCompanyId(data.getCompanyId());
        }
        Session session = this.getSessionFactory().openSession();
        try {
            data.setCompanyId(ContextUtil.getCompanyId());
            if (null == data.getId()) {
                data.setId(ContextUtil.getUUID());
            }
            session.saveOrUpdate(data);
        } finally {
            session.flush();