Commit 6c083d21 authored by wujiang's avatar wujiang

Merge branch 'develop_dl_plan6' of http://39.98.45.134:8090/moa/amos-boot-biz into develop_dl_plan6

parents 1242de35 54b8ebc1
...@@ -70,6 +70,14 @@ public class OrgMenuDto { ...@@ -70,6 +70,14 @@ public class OrgMenuDto {
this.bizOrgType = bizOrgType; this.bizOrgType = bizOrgType;
} }
public OrgMenuDto(Long key, String title, Long parentId, String bizOrgType, String bizOrgCode) {
this.key = key;
this.title = title;
this.parentId = parentId;
this.bizOrgType = bizOrgType;
this.bizOrgCode = bizOrgCode;
}
public OrgMenuDto() { public OrgMenuDto() {
// TODO Auto-generated constructor stub // TODO Auto-generated constructor stub
} }
......
...@@ -44,6 +44,9 @@ public interface IOrgUsrService { ...@@ -44,6 +44,9 @@ public interface IOrgUsrService {
List<OrgMenuDto> getTree(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy, List<OrgMenuDto> getTree(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy,
String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception; String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception;
List<OrgMenuDto> getCompanyTree(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy,
String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName, String OrgCodeMethodName) throws Exception;
/** /**
* 获取子数据集合 * 获取子数据集合
* *
...@@ -61,6 +64,9 @@ public interface IOrgUsrService { ...@@ -61,6 +64,9 @@ public interface IOrgUsrService {
List<OrgMenuDto> getSub(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy, List<OrgMenuDto> getSub(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy,
String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception; String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception;
List<OrgMenuDto> getCompanySub(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy,
String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName, String OrgCodeMethodName) throws Exception;
/** /**
* 组装融合调度单位人员信息 * 组装融合调度单位人员信息
* *
......
package com.yeejoin.amos.boot.module.common.biz.controller; package com.yeejoin.amos.boot.module.common.biz.controller;
import java.util.*;
import javax.servlet.http.HttpServletRequest;
import com.yeejoin.amos.boot.biz.common.controller.DataDictionaryController;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.Menu;
import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import com.yeejoin.amos.boot.module.common.api.dto.*;
import com.yeejoin.amos.boot.module.common.api.entity.CompanyInfo;
import com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper;
import com.yeejoin.amos.boot.module.common.biz.service.impl.FireCompanyInfoServiceImpl;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...@@ -43,20 +10,40 @@ import com.google.common.collect.Lists; ...@@ -43,20 +10,40 @@ import com.google.common.collect.Lists;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.constants.CommonConstant; import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.controller.DataDictionaryController;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext; import com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils; import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.common.api.core.framework.PersonIdentify; import com.yeejoin.amos.boot.module.common.api.core.framework.PersonIdentify;
import com.yeejoin.amos.boot.module.common.api.dto.*;
import com.yeejoin.amos.boot.module.common.api.entity.CompanyInfo;
import com.yeejoin.amos.boot.module.common.api.entity.FireTeam; import com.yeejoin.amos.boot.module.common.api.entity.FireTeam;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient; import com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient;
import com.yeejoin.amos.boot.module.common.api.mapper.FireTeamMapper; import com.yeejoin.amos.boot.module.common.api.mapper.FireTeamMapper;
import com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper;
import com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService; import com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService;
import com.yeejoin.amos.boot.module.common.biz.service.impl.ESOrgUsrService; import com.yeejoin.amos.boot.module.common.biz.service.impl.ESOrgUsrService;
import com.yeejoin.amos.boot.module.common.biz.service.impl.FireCompanyInfoServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
/** /**
* 部门信息修改 * 部门信息修改
...@@ -130,7 +117,7 @@ public class OrgUsrController extends BaseController { ...@@ -130,7 +117,7 @@ public class OrgUsrController extends BaseController {
public ResponseModel<String> deleteById(HttpServletRequest request, @PathVariable Long id) { public ResponseModel<String> deleteById(HttpServletRequest request, @PathVariable Long id) {
QueryWrapper<CompanyInfo> queryWrapper = new QueryWrapper<>(); QueryWrapper<CompanyInfo> queryWrapper = new QueryWrapper<>();
CompanyInfo info = fireCompanyInfoServiceImpl.getOne(queryWrapper.eq("instance_id", id)); CompanyInfo info = fireCompanyInfoServiceImpl.getOne(queryWrapper.eq("instance_id", id).eq("is_delete", 0));
info.setIsDelete(true); info.setIsDelete(true);
fireCompanyInfoServiceImpl.updateById(info); fireCompanyInfoServiceImpl.updateById(info);
// 删除时,只作逻辑删除 // 删除时,只作逻辑删除
...@@ -163,7 +150,7 @@ public class OrgUsrController extends BaseController { ...@@ -163,7 +150,7 @@ public class OrgUsrController extends BaseController {
/* bug 2812 一次删除多条数据 传入类型修改为string 问题解决 2021-09-09 陈召 结束 */ /* bug 2812 一次删除多条数据 传入类型修改为string 问题解决 2021-09-09 陈召 结束 */
try { try {
eSOrgUsrService.deleteById(id); eSOrgUsrService.deleteById(id);
emqKeeper.getMqttClient().publish(airportDeleteTopic, JSON.toJSONString(id).getBytes(), 2, false); // emqKeeper.getMqttClient().publish(airportDeleteTopic, JSON.toJSONString(id).getBytes(), 2, false);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
throw new RuntimeException(); throw new RuntimeException();
...@@ -224,8 +211,9 @@ public class OrgUsrController extends BaseController { ...@@ -224,8 +211,9 @@ public class OrgUsrController extends BaseController {
@RequestMapping(value = "/companyTree", method = RequestMethod.GET) @RequestMapping(value = "/companyTree", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取单位部门树(key为物理主键)", notes = "获取单位部门树(key为物理主键)\"") @ApiOperation(httpMethod = "GET", value = "获取单位部门树(key为物理主键)", notes = "获取单位部门树(key为物理主键)\"")
public ResponseModel<List<OrgMenuDto>> selectCompanyTree() throws Exception { public ResponseModel<List<OrgMenuDto>> selectCompanyTree() throws Exception {
List<OrgMenuDto> menus = iOrgUsrService.getTree(null, iOrgUsrService.selectCompanyDepartmentMsg(), List<OrgMenuDto> menus = iOrgUsrService.getCompanyTree(null, iOrgUsrService.selectCompanyDepartmentMsg(),
OrgUsr.class.getName(), "getSequenceNbr", 2, "getBizOrgName", "getParentId", "getBizOrgType"); OrgUsr.class.getName(), "getSequenceNbr", 2, "getBizOrgName",
"getParentId", "getBizOrgType", "getBizOrgCode");
return ResponseHelper.buildResponse(menus); return ResponseHelper.buildResponse(menus);
} }
......
...@@ -227,6 +227,132 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -227,6 +227,132 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
} }
@Override @Override
public List<OrgMenuDto> getCompanyTree(Long topId, Collection entityList, String packageURL, String IDMethodName,
int IDHierarchy, String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName, String OrgCodeMethodName)
throws Exception {
List<OrgMenuDto> resultList = new ArrayList<>();
Class<?> clazz = Class.forName(packageURL);
Method IDMethodNameme = null;
switch (IDHierarchy) {
case 1:
IDMethodNameme = clazz.getDeclaredMethod(IDMethodName);
break;
case 2:
IDMethodNameme = clazz.getSuperclass().getDeclaredMethod(IDMethodName);
break;
case 3:
IDMethodNameme = clazz.getSuperclass().getSuperclass().getDeclaredMethod(IDMethodName);
break;
default:
IDMethodNameme = clazz.getDeclaredMethod(IDMethodName);
break;
}
Method NAMEMethodNameme = clazz.getDeclaredMethod(NAMEMethodName);
Method PARENTIDMethodNameme = clazz.getDeclaredMethod(PARENTIDMethodName);
Method OrgTypeMethodNameme = clazz.getDeclaredMethod(OrgTypeMethodName);
Method OrgCodeMethodNameme = clazz.getDeclaredMethod(OrgCodeMethodName);
// 获取顶层元素集合
Long parentId;
for (Object ob : entityList) {
Object entity = clazz.cast(ob);
parentId = !ObjectUtils.isEmpty(PARENTIDMethodNameme.invoke(entity))
? Long.valueOf(String.valueOf(PARENTIDMethodNameme.invoke(entity)))
: null;
if (parentId == null) {
OrgMenuDto menu = new OrgMenuDto(Long.valueOf(String.valueOf(IDMethodNameme.invoke(entity))),
String.valueOf(NAMEMethodNameme.invoke(entity)), parentId,
String.valueOf(OrgTypeMethodNameme.invoke(entity)), false, String.valueOf(OrgCodeMethodNameme.invoke(entity)));
resultList.add(menu);
} else if (topId != null && topId.longValue() == parentId.longValue()) {
OrgMenuDto menu = new OrgMenuDto(Long.valueOf(String.valueOf(IDMethodNameme.invoke(entity))),
String.valueOf(NAMEMethodNameme.invoke(entity)), parentId,
String.valueOf(OrgTypeMethodNameme.invoke(entity)), false, String.valueOf(OrgCodeMethodNameme.invoke(entity)));
resultList.add(menu);
}
}
// 获取每个顶层元素的子数据集合
for (OrgMenuDto entity : resultList) {
entity.setChildren(getCompanySub(entity.getKey(), entityList, packageURL, IDMethodName, IDHierarchy,
NAMEMethodName, PARENTIDMethodName, OrgTypeMethodName, OrgCodeMethodName));
}
return resultList;
}
@Override
public List<OrgMenuDto> getCompanySub(Long topId, @SuppressWarnings("rawtypes") Collection entityList, String packageURL,
String IDMethodName, int IDHierarchy, String NAMEMethodName, String PARENTIDMethodName,
String OrgTypeMethodName, String OrgCodeMethodName) throws Exception {
List<OrgMenuDto> childList = new ArrayList<>();
Class clazz = Class.forName(packageURL);
Method IDMethodNameme = null;
switch (IDHierarchy) {
case 1:
IDMethodNameme = clazz.getDeclaredMethod(IDMethodName);
break;
case 2:
IDMethodNameme = clazz.getSuperclass().getDeclaredMethod(IDMethodName);
break;
case 3:
IDMethodNameme = clazz.getSuperclass().getSuperclass().getDeclaredMethod(IDMethodName);
break;
default:
IDMethodNameme = clazz.getDeclaredMethod(IDMethodName);
break;
}
Method OrgTypeMethodNameme = clazz.getDeclaredMethod(OrgTypeMethodName);
Method NAMEMethodNameme = clazz.getDeclaredMethod(NAMEMethodName);
Method PARENTIDMethodNameme = clazz.getDeclaredMethod(PARENTIDMethodName);
Method OrgCodeMethodNameme = clazz.getDeclaredMethod(OrgCodeMethodName);
Long parentId;
// 子集的直接子对象
for (Object ob : entityList) {
Object entity = clazz.cast(ob);
parentId = !ObjectUtils.isEmpty(PARENTIDMethodNameme.invoke(entity))
? Long.valueOf(String.valueOf(PARENTIDMethodNameme.invoke(entity)))
: null;
if (parentId == null) {
if (topId == parentId) {
OrgMenuDto menu = new OrgMenuDto(Long.valueOf(String.valueOf(IDMethodNameme.invoke(entity))),
String.valueOf(NAMEMethodNameme.invoke(entity)), parentId,
String.valueOf(OrgTypeMethodNameme.invoke(entity)), String.valueOf(OrgCodeMethodNameme.invoke(entity)));
childList.add(menu);
}
} else {
if (topId.longValue() == parentId.longValue()) {
OrgMenuDto menu = new OrgMenuDto(Long.valueOf(String.valueOf(IDMethodNameme.invoke(entity))),
String.valueOf(NAMEMethodNameme.invoke(entity)), parentId,
String.valueOf(OrgTypeMethodNameme.invoke(entity)), String.valueOf(OrgCodeMethodNameme.invoke(entity)));
childList.add(menu);
}
}
}
// 子集的间接子对象
for (OrgMenuDto entity : childList) {
entity.setChildren(getCompanySub(entity.getKey(), entityList, packageURL, IDMethodName, IDHierarchy,
NAMEMethodName, PARENTIDMethodName, OrgTypeMethodName, OrgCodeMethodName));
if (entity.getChildren() != null) {
entity.setLeaf(false);
}
}
// 递归退出条件
if (childList.size() == 0) {
return null;
}
return childList;
}
@Override
public List<OrgMenuDto> getSub(Long topId, @SuppressWarnings("rawtypes") Collection entityList, String packageURL, public List<OrgMenuDto> getSub(Long topId, @SuppressWarnings("rawtypes") Collection entityList, String packageURL,
String IDMethodName, int IDHierarchy, String NAMEMethodName, String PARENTIDMethodName, String IDMethodName, int IDHierarchy, String NAMEMethodName, String PARENTIDMethodName,
String OrgTypeMethodName) throws Exception { String OrgTypeMethodName) throws Exception {
...@@ -698,7 +824,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -698,7 +824,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
OrgUsrDto orgUsrDto = saveOrgUsrDynamicFormInstance(orgUsr, OrgUsrVo.getDynamicFormValue()); OrgUsrDto orgUsrDto = saveOrgUsrDynamicFormInstance(orgUsr, OrgUsrVo.getDynamicFormValue());
orgUsr.setSequenceNbr(orgUsrDto.getSequenceNbr()); orgUsr.setSequenceNbr(orgUsrDto.getSequenceNbr());
// 储存公司消防信息 // 储存公司消防信息
CompanyInfo info = saveOrUpdateFireCompanyInfo(orgUsr, OrgUsrVo.getFireCompanyInfoDto()); CompanyInfo info = saveFireCompanyInfo(orgUsr, OrgUsrVo.getFireCompanyInfoDto());
orgUsrDto.setCompanyInfo(info); orgUsrDto.setCompanyInfo(info);
/** /**
* 同步保存ES * 同步保存ES
...@@ -777,7 +903,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -777,7 +903,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
} }
updateById(orgUsr); updateById(orgUsr);
// 更新公司消防信息 // 更新公司消防信息
CompanyInfo info = saveOrUpdateFireCompanyInfo(orgUsr, orgUsrVo.getFireCompanyInfoDto()); CompanyInfo info = updateFireCompanyInfo(orgUsr, orgUsrVo.getFireCompanyInfoDto());
orgUsrVo.setCompanyInfo(info); orgUsrVo.setCompanyInfo(info);
// 保存动态表单数据 // 保存动态表单数据
...@@ -792,7 +918,52 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -792,7 +918,52 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
return orgUsrVo; return orgUsrVo;
} }
public CompanyInfo saveOrUpdateFireCompanyInfo(OrgUsr orgUsr, FireCompanyInfoDto fireCompanyInfoDto) { public CompanyInfo saveFireCompanyInfo(OrgUsr orgUsr, FireCompanyInfoDto fireCompanyInfoDto) {
if (ValidationUtil.isEmpty(fireCompanyInfoDto)) {
return null;
}
CompanyInfo companyInfo = new CompanyInfo();
String indoor = "";
String outdoor = "";
if (!ValidationUtil.isEmpty(fireCompanyInfoDto.getIndoorPipeNetworkType()) && 0 < fireCompanyInfoDto.getIndoorPipeNetworkType().size()) {
indoor = JSON.toJSONString(fireCompanyInfoDto.getIndoorPipeNetworkType());
}
if (!ValidationUtil.isEmpty(fireCompanyInfoDto.getOutdoorPipeNetworkType()) && 0 < fireCompanyInfoDto.getOutdoorPipeNetworkType().size()) {
outdoor = JSON.toJSONString(fireCompanyInfoDto.getOutdoorPipeNetworkType());
}
BeanUtils.copyProperties(fireCompanyInfoDto, companyInfo);
companyInfo.setIndoorPipeNetworkType(indoor);
companyInfo.setOutdoorPipeNetworkType(outdoor);
if (!ValidationUtil.isEmpty(fireCompanyInfoDto.getFireEquipFile())) {
companyInfo.setFireEquipFile(fireCompanyInfoDto.getFireEquipFile().size() > 0 ?
JSON.toJSONString(fireCompanyInfoDto.getFireEquipFile()) : "");
}
if (!ValidationUtil.isEmpty(fireCompanyInfoDto.getFireDesignCheckFile())) {
companyInfo.setFireDesignCheckFile(fireCompanyInfoDto.getFireDesignCheckFile().size() > 0 ?
JSON.toJSONString(fireCompanyInfoDto.getFireDesignCheckFile()) : "");
}
if (!ValidationUtil.isEmpty(fireCompanyInfoDto.getFireDesignAcceptanceFile())) {
companyInfo.setFireDesignAcceptanceFile(fireCompanyInfoDto.getFireDesignAcceptanceFile().size() > 0 ?
JSON.toJSONString(fireCompanyInfoDto.getFireDesignAcceptanceFile()) : "");
}
if (!ValidationUtil.isEmpty(fireCompanyInfoDto.getFireSafeCheckFile())) {
companyInfo.setFireSafeCheckFile(fireCompanyInfoDto.getFireSafeCheckFile().size() > 0 ?
JSON.toJSONString(fireCompanyInfoDto.getFireSafeCheckFile()) : "");
}
if (!ValidationUtil.isEmpty(fireCompanyInfoDto.getOthersFile())) {
companyInfo.setOthersFile(fireCompanyInfoDto.getOthersFile().size() > 0 ?
JSON.toJSONString(fireCompanyInfoDto.getOthersFile()) : "");
}
companyInfo.setInstanceId(orgUsr.getSequenceNbr());
companyInfo.setRecUserId(String.valueOf(orgUsr.getSequenceNbr()));
companyInfo.setRecUserName(orgUsr.getRecUserName());
companyInfo.setRecDate(new Date());
fireCompanyInfoServiceImpl.save(companyInfo);
return companyInfo;
}
public CompanyInfo updateFireCompanyInfo(OrgUsr orgUsr, FireCompanyInfoDto fireCompanyInfoDto) {
if (ValidationUtil.isEmpty(fireCompanyInfoDto)) { if (ValidationUtil.isEmpty(fireCompanyInfoDto)) {
return null; return null;
} }
...@@ -833,7 +1004,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -833,7 +1004,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
companyInfo.setRecUserId(String.valueOf(orgUsr.getSequenceNbr())); companyInfo.setRecUserId(String.valueOf(orgUsr.getSequenceNbr()));
companyInfo.setRecUserName(orgUsr.getRecUserName()); companyInfo.setRecUserName(orgUsr.getRecUserName());
companyInfo.setRecDate(new Date()); companyInfo.setRecDate(new Date());
fireCompanyInfoServiceImpl.saveOrUpdate(companyInfo); fireCompanyInfoServiceImpl.updateById(companyInfo);
return companyInfo; return companyInfo;
} }
...@@ -921,7 +1092,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -921,7 +1092,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
if (orgUsr.getParentId() != null) { if (orgUsr.getParentId() != null) {
orgUsrFormVo.setParentName(getById(orgUsr.getParentId()).getBizOrgName()); orgUsrFormVo.setParentName(getById(orgUsr.getParentId()).getBizOrgName());
} }
CompanyInfo info = fireCompanyInfoServiceImpl.getOne(new QueryWrapper<CompanyInfo>().eq("instance_id", id)); CompanyInfo info = fireCompanyInfoServiceImpl.getOne(new QueryWrapper<CompanyInfo>().eq("instance_id", id).eq("is_delete", 0));
orgUsrFormVo.setCompanyInfo(info); orgUsrFormVo.setCompanyInfo(info);
return orgUsrFormVo; return orgUsrFormVo;
} }
......
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