调整数据源配置、机构管理、服务指令同步机构获取相关逻辑

This commit is contained in:
1378012178@qq.com 2025-04-21 17:07:33 +08:00
parent bf385a19dd
commit 4d3a6aa0ca
5 changed files with 27 additions and 5 deletions

View File

@ -132,10 +132,10 @@ public class SysDepartController {
* @return
*/
@RequestMapping(value = "/queryDepartTreeSync", method = RequestMethod.GET)
public Result<List<SysDepartTreeModel>> queryDepartTreeSync(@RequestParam(name = "pid", required = false) String parentId,@RequestParam(name = "ids", required = false) String ids, @RequestParam(name = "primaryKey", required = false) String primaryKey) {
public Result<List<SysDepartTreeModel>> queryDepartTreeSync(@RequestParam(name = "pid", required = false) String parentId,@RequestParam(name = "ids", required = false) String ids, @RequestParam(name = "primaryKey", required = false) String primaryKey, @RequestParam(name = "platType", required = false) String platType) {
Result<List<SysDepartTreeModel>> result = new Result<>();
try {
List<SysDepartTreeModel> list = sysDepartService.queryTreeListByPid(parentId,ids, primaryKey);
List<SysDepartTreeModel> list = sysDepartService.queryTreeListByPid(parentId,ids, primaryKey,platType);
result.setResult(list);
result.setSuccess(true);
} catch (Exception e) {

View File

@ -54,6 +54,10 @@ public class SysDepart implements Serializable {
/**机构编码*/
@Excel(name="机构编码",width=15)
private String orgCode;
/**业务平台类型*/
@Excel(name="业务平台类型",width=15)
@Dict(dicCode = "iz_test_site")
private String platType;
/**运营开始时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")

View File

@ -39,6 +39,8 @@ public class SysDepartTreeModel implements Serializable{
private String parentId;
private String platType;
private String departName;
private String departNameEn;
@ -103,6 +105,7 @@ public class SysDepartTreeModel implements Serializable{
this.title = sysDepart.getDepartName();
this.id = sysDepart.getId();
this.parentId = sysDepart.getParentId();
this.platType = sysDepart.getPlatType();
this.departName = sysDepart.getDepartName();
this.departNameEn = sysDepart.getDepartNameEn();
this.departNameAbbr = sysDepart.getDepartNameAbbr();
@ -199,6 +202,14 @@ public class SysDepartTreeModel implements Serializable{
this.parentId = parentId;
}
public String getPlatType() {
return platType;
}
public void setPlatType(String platType) {
this.platType = platType;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
@ -411,6 +422,7 @@ public class SysDepartTreeModel implements Serializable{
SysDepartTreeModel model = (SysDepartTreeModel) o;
return Objects.equals(id, model.id) &&
Objects.equals(parentId, model.parentId) &&
Objects.equals(platType, model.platType) &&
Objects.equals(departName, model.departName) &&
Objects.equals(departNameEn, model.departNameEn) &&
Objects.equals(departNameAbbr, model.departNameAbbr) &&
@ -444,7 +456,7 @@ public class SysDepartTreeModel implements Serializable{
@Override
public int hashCode() {
return Objects.hash(id, parentId, departName, departNameEn, departNameAbbr,
return Objects.hash(id, parentId, platType, departName, departNameEn, departNameAbbr,
departOrder, description, orgCategory, orgType, orgCode,
operationStartTime, operationEndTime, contractStartTime, contractEndTime,
mobile, fax, address, memo, status, delFlag, qywxIdentifier,

View File

@ -141,9 +141,10 @@ public interface ISysDepartService extends IService<SysDepart>{
* @param parentId 父id
* @param ids 多个部门id
* @param primaryKey 主键字段id或者orgCode
* @param platType syjg试验机构 ywjg业务机构
* @return
*/
List<SysDepartTreeModel> queryTreeListByPid(String parentId,String ids, String primaryKey);
List<SysDepartTreeModel> queryTreeListByPid(String parentId,String ids, String primaryKey,String platType);
/**
* 获取某个部门的所有父级部门的ID

View File

@ -597,10 +597,11 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
* @param parentId
* @param ids 前端回显传递
* @param primaryKey 主键字段id或者orgCode
* @param platType syjg试验机构 ywjg业务机构
* @return
*/
@Override
public List<SysDepartTreeModel> queryTreeListByPid(String parentId,String ids, String primaryKey) {
public List<SysDepartTreeModel> queryTreeListByPid(String parentId,String ids, String primaryKey,String platType) {
Consumer<LambdaQueryWrapper<SysDepart>> square = i -> {
if (oConvertUtils.isNotEmpty(ids)) {
if (CommonConstant.DEPART_KEY_ORG_CODE.equals(primaryKey)) {
@ -628,6 +629,10 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
//update-begin---author:wangshuai ---date:20220527 for[VUEN-1143]排序不对vue3和2应该都有问题应该按照升序排------------
lqw.orderByAsc(SysDepart::getDepartOrder);
//update-end---author:wangshuai ---date:20220527 for[VUEN-1143]排序不对vue3和2应该都有问题应该按照升序排--------------
//查询试验机构 业务机构
if(StringUtils.isNotBlank(platType)){
lqw.eq(true,SysDepart::getPlatType,platType);
}
List<SysDepart> list = list(lqw);
//update-begin---author:wangshuai ---date:20220316 for[JTC-119]在部门管理菜单下设置部门负责人 创建用户的时候不需要处理
//设置用户id,让前台显示