服务指令同步(非终版)
This commit is contained in:
parent
cc0d353b8b
commit
5fece028f8
|
@ -11,6 +11,7 @@ import java.net.URLDecoder;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.nu.modules.orgapplyinfo.entity.OrgAllInfo;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||||
|
@ -230,12 +231,30 @@ public class OrgApplyInfoController extends JeecgController<OrgApplyInfo, IOrgAp
|
||||||
/**
|
/**
|
||||||
* 获取变更信息
|
* 获取变更信息
|
||||||
* 查询同一信息(pkid相同) 的申请变更(status=4)和 当前使用的机构信息(status=2) 转换成对应的数据格式
|
* 查询同一信息(pkid相同) 的申请变更(status=4)和 当前使用的机构信息(status=2) 转换成对应的数据格式
|
||||||
|
*
|
||||||
* @param orgApplyInfo
|
* @param orgApplyInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "机构信息变更申请-获取变更信息", notes = "机构信息变更申请-获取变更信息")
|
@ApiOperation(value = "机构信息变更申请-获取变更信息", notes = "机构信息变更申请-获取变更信息")
|
||||||
@PostMapping(value = "/getModifyInfo")
|
@PostMapping(value = "/getModifyInfo")
|
||||||
public Result<List<Map<String,Object>>> getModifyInfo(@RequestBody OrgApplyInfo orgApplyInfo) {
|
public Result<List<Map<String, Object>>> getModifyInfo(@RequestBody OrgApplyInfo orgApplyInfo) {
|
||||||
return Result.OK(orgApplyInfoService.getModifyInfo(orgApplyInfo));
|
return Result.OK(orgApplyInfoService.getModifyInfo(orgApplyInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取各机构详细信息
|
||||||
|
*
|
||||||
|
* @param orgCode 机构编码
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getOrgInfo")
|
||||||
|
public Result<IPage<OrgAllInfo>> getModifyInfo(
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "8") Integer pageSize,
|
||||||
|
@RequestParam(value = "orgCode", defaultValue = "", required = false) String orgCode,
|
||||||
|
@RequestParam(value = "title", defaultValue = "", required = false) String title) {
|
||||||
|
IPage<OrgAllInfo> page = new Page<>(pageNo, pageSize);
|
||||||
|
IPage<OrgAllInfo> resultPage = orgApplyInfoService.queryOrgInfo(page, orgCode, title);
|
||||||
|
return Result.OK(resultPage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,157 @@
|
||||||
|
package com.nu.modules.orgapplyinfo.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 机构全部信息
|
||||||
|
* @Author: zmy
|
||||||
|
* @Date: 2025-07-09
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrgAllInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**机构id*/
|
||||||
|
private String orgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机构/部门名称
|
||||||
|
*/
|
||||||
|
private String departName;
|
||||||
|
/**
|
||||||
|
* 机构编码
|
||||||
|
*/
|
||||||
|
private String orgCode;
|
||||||
|
/**
|
||||||
|
* 协议+域名
|
||||||
|
*/
|
||||||
|
private String url;
|
||||||
|
/**
|
||||||
|
* 省份
|
||||||
|
*/
|
||||||
|
private String province;
|
||||||
|
/**
|
||||||
|
* 城市
|
||||||
|
*/
|
||||||
|
private String city;
|
||||||
|
/**
|
||||||
|
* 区县
|
||||||
|
*/
|
||||||
|
private String district;
|
||||||
|
/**
|
||||||
|
* 业务平台类型
|
||||||
|
*/
|
||||||
|
private String platType;
|
||||||
|
/**
|
||||||
|
* 运营开始时间
|
||||||
|
*/
|
||||||
|
private Date operationStartTime;
|
||||||
|
/**
|
||||||
|
* 运营到期时间
|
||||||
|
*/
|
||||||
|
private Date operationEndTime;
|
||||||
|
/**
|
||||||
|
* 合同开始时间
|
||||||
|
*/
|
||||||
|
private Date contractStartTime;
|
||||||
|
/**
|
||||||
|
* 合同到期时间
|
||||||
|
*/
|
||||||
|
private Date contractEndTime;
|
||||||
|
/**
|
||||||
|
* 手机号
|
||||||
|
*/
|
||||||
|
private String mobile;
|
||||||
|
/**
|
||||||
|
* 传真
|
||||||
|
*/
|
||||||
|
private String fax;
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String memo;
|
||||||
|
/**
|
||||||
|
* 应缴金额
|
||||||
|
*/
|
||||||
|
private BigDecimal payableAmount;
|
||||||
|
/**
|
||||||
|
* 机构图片
|
||||||
|
*/
|
||||||
|
private String picUrl;
|
||||||
|
|
||||||
|
/**微信id*/
|
||||||
|
private String openId;
|
||||||
|
/**微信名称*/
|
||||||
|
private String wechatName;
|
||||||
|
/**联系电话*/
|
||||||
|
private String tel;
|
||||||
|
/**咨询人姓名*/
|
||||||
|
private String name;
|
||||||
|
/**性别*/
|
||||||
|
private String sex;
|
||||||
|
/**民族*/
|
||||||
|
private String national;
|
||||||
|
/**出生日期*/
|
||||||
|
private Date birthDate;
|
||||||
|
/**住址(身份证上)*/
|
||||||
|
private String idCardAddress;
|
||||||
|
/**身份证号*/
|
||||||
|
private String idCard;
|
||||||
|
/**签发机关*/
|
||||||
|
private String issuingAuthority;
|
||||||
|
/**有效开始日期*/
|
||||||
|
private Date startTime;
|
||||||
|
/**有效结束日期*/
|
||||||
|
private Date endTime;
|
||||||
|
/**身份证正面*/
|
||||||
|
private String cardZmPath;
|
||||||
|
/**身份证反面*/
|
||||||
|
private String cardFmPath;
|
||||||
|
/**营业执照照片*/
|
||||||
|
private String comBusinessLicense;
|
||||||
|
/**企业名称*/
|
||||||
|
private String comName;
|
||||||
|
/**企业注册地址*/
|
||||||
|
private String comRegisterAddress;
|
||||||
|
/**企业信用代码*/
|
||||||
|
private String comCreditCode;
|
||||||
|
/**企业法人*/
|
||||||
|
private String comLegalPerson;
|
||||||
|
/**机构地址*/
|
||||||
|
private String orgAddress;
|
||||||
|
/**机构位置坐标:经度*/
|
||||||
|
private String orgCoordinateLo;
|
||||||
|
/**机构位置坐标:维度*/
|
||||||
|
private String orgCoordinateLa;
|
||||||
|
/**机构负责人*/
|
||||||
|
private String orgLeader;
|
||||||
|
/**机构负责人电话*/
|
||||||
|
private String orgLeaderPhone;
|
||||||
|
/**机构楼宇牌号*/
|
||||||
|
private String orgBuildingNumber;
|
||||||
|
/**机构房屋性质*/
|
||||||
|
private String orgPropertyType;
|
||||||
|
/**机构建筑面积*/
|
||||||
|
private Double orgBuildingArea;
|
||||||
|
/**机构省份 sys_category.id*/
|
||||||
|
private String orgProvince;
|
||||||
|
/**机构城市 sys_category.id*/
|
||||||
|
private String orgCity;
|
||||||
|
/**机构区域 sys_category.id*/
|
||||||
|
private String orgDistrict;
|
||||||
|
/**合同附件*/
|
||||||
|
private String contract;
|
||||||
|
/**合同备注*/
|
||||||
|
private String contractNote;
|
||||||
|
/** 加盟时间*/
|
||||||
|
private Date franchiseTime;
|
||||||
|
}
|
|
@ -2,6 +2,8 @@ package com.nu.modules.orgapplyinfo.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.nu.modules.orgapplyinfo.entity.OrgAllInfo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfo;
|
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfo;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
@ -15,4 +17,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
public interface OrgApplyInfoMapper extends BaseMapper<OrgApplyInfo> {
|
public interface OrgApplyInfoMapper extends BaseMapper<OrgApplyInfo> {
|
||||||
|
|
||||||
void realDelete(@Param("pkId") String pkId);
|
void realDelete(@Param("pkId") String pkId);
|
||||||
|
|
||||||
|
IPage<OrgAllInfo> queryOrgInfo(@Param("page") IPage<OrgAllInfo> page, @Param("orgCode") String orgCode, @Param("title") String title);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,63 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.nu.modules.orgapplyinfo.mapper.OrgApplyInfoMapper">
|
<mapper namespace="com.nu.modules.orgapplyinfo.mapper.OrgApplyInfoMapper">
|
||||||
|
|
||||||
|
<select id="queryOrgInfo" resultType="com.nu.modules.orgapplyinfo.entity.OrgAllInfo">
|
||||||
|
select
|
||||||
|
d.id as orgId,
|
||||||
|
d.depart_name,
|
||||||
|
d.org_code,
|
||||||
|
d.url,
|
||||||
|
d.plat_type,
|
||||||
|
o.open_id,
|
||||||
|
o.wechat_name,
|
||||||
|
o.tel,
|
||||||
|
o.name,
|
||||||
|
o.sex,
|
||||||
|
o.national,
|
||||||
|
o.birth_date,
|
||||||
|
o.id_card_address,
|
||||||
|
o.id_card,
|
||||||
|
o.issuing_authority,
|
||||||
|
o.start_time,
|
||||||
|
o.end_time,
|
||||||
|
o.card_zm_path,
|
||||||
|
o.card_fm_path,
|
||||||
|
o.com_business_license,
|
||||||
|
o.com_name,
|
||||||
|
o.com_register_address,
|
||||||
|
o.com_credit_code,
|
||||||
|
o.com_legal_person,
|
||||||
|
o.org_address,
|
||||||
|
o.org_leader,
|
||||||
|
o.org_leader_phone,
|
||||||
|
o.org_building_number,
|
||||||
|
o.org_property_type,
|
||||||
|
o.org_building_area,
|
||||||
|
o.org_province,
|
||||||
|
o.org_city,
|
||||||
|
o.org_district,
|
||||||
|
o.contract,
|
||||||
|
o.contract_note,
|
||||||
|
o.franchise_time
|
||||||
|
from sys_depart d
|
||||||
|
left join nu_org_apply_info o
|
||||||
|
on d.id = o.pk_id
|
||||||
|
<where>
|
||||||
|
o.status = '2'
|
||||||
|
<if test="orgCode !=null and orgCode != ''">
|
||||||
|
AND d.org_code = #{orgCode}
|
||||||
|
</if>
|
||||||
|
<if test="title != null and title != ''">
|
||||||
|
AND d.depart_name LIKE CONCAT('%', #{title}, '%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by (d.org_code + 0) asc
|
||||||
|
</select>
|
||||||
|
|
||||||
<delete id="realDelete">
|
<delete id="realDelete">
|
||||||
delete from nu_org_apply_info where pk_id = #{pkId} and status = '5'
|
delete
|
||||||
|
from nu_org_apply_info
|
||||||
|
where pk_id = #{pkId}
|
||||||
|
and status = '5'
|
||||||
</delete>
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package com.nu.modules.orgapplyinfo.service;
|
package com.nu.modules.orgapplyinfo.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.nu.modules.orgapplyinfo.entity.OrgAllInfo;
|
||||||
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfo;
|
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfo;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
@ -14,9 +16,11 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
public interface IOrgApplyInfoService extends IService<OrgApplyInfo> {
|
public interface IOrgApplyInfoService extends IService<OrgApplyInfo> {
|
||||||
|
|
||||||
List<Map<String,Object>> getModifyInfo(OrgApplyInfo orgApplyInfo);
|
List<Map<String, Object>> getModifyInfo(OrgApplyInfo orgApplyInfo);
|
||||||
|
|
||||||
void audit(OrgApplyInfo orgApplyInfo);
|
void audit(OrgApplyInfo orgApplyInfo);
|
||||||
|
|
||||||
void submitContract(OrgApplyInfo orgApplyInfo);
|
void submitContract(OrgApplyInfo orgApplyInfo);
|
||||||
|
|
||||||
|
IPage<OrgAllInfo> queryOrgInfo(IPage<OrgAllInfo> page, String orgCode, String title);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,11 @@ package com.nu.modules.orgapplyinfo.service.impl;
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.nu.dto.OrgApplyInfoMQDto;
|
import com.nu.dto.OrgApplyInfoMQDto;
|
||||||
import com.nu.modules.orgapplyinfo.api.IOrgApplyInfoApi;
|
import com.nu.modules.orgapplyinfo.api.IOrgApplyInfoApi;
|
||||||
|
import com.nu.modules.orgapplyinfo.entity.OrgAllInfo;
|
||||||
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfo;
|
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfo;
|
||||||
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfoApiEntity;
|
import com.nu.modules.orgapplyinfo.entity.OrgApplyInfoApiEntity;
|
||||||
import com.nu.modules.orgapplyinfo.mapper.OrgApplyInfoMapper;
|
import com.nu.modules.orgapplyinfo.mapper.OrgApplyInfoMapper;
|
||||||
|
@ -245,4 +247,9 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
|
||||||
//运维mq收到后 1、自动创建新的机构、机构附加信息 2、生成运维平台工单
|
//运维mq收到后 1、自动创建新的机构、机构附加信息 2、生成运维平台工单
|
||||||
rabbitMQUtil.sendToExchange("hldy.orgApply.build", "hldy.orgApply.build", orgApplyInfoMQDto);
|
rabbitMQUtil.sendToExchange("hldy.orgApply.build", "hldy.orgApply.build", orgApplyInfoMQDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<OrgAllInfo> queryOrgInfo(IPage<OrgAllInfo> page, String orgCode, String title) {
|
||||||
|
return baseMapper.queryOrgInfo(page, orgCode, title);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,9 @@ import com.nu.modules.orgapplyinfo.entity.OrgApplyInfo;
|
||||||
import com.nu.modules.orgapplyinfo.service.IOrgApplyInfoService;
|
import com.nu.modules.orgapplyinfo.service.IOrgApplyInfoService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||||
|
import org.jeecg.common.system.entity.SysDepartEntity;
|
||||||
|
import org.jeecg.common.system.vo.SysDepartModel;
|
||||||
import org.springframework.amqp.core.ExchangeTypes;
|
import org.springframework.amqp.core.ExchangeTypes;
|
||||||
import org.springframework.amqp.rabbit.annotation.Exchange;
|
import org.springframework.amqp.rabbit.annotation.Exchange;
|
||||||
import org.springframework.amqp.rabbit.annotation.Queue;
|
import org.springframework.amqp.rabbit.annotation.Queue;
|
||||||
|
@ -18,6 +21,9 @@ import org.springframework.stereotype.Component;
|
||||||
public class WorkOrderMQListener {
|
public class WorkOrderMQListener {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOrgApplyInfoService orgApplyInfoService;
|
private IOrgApplyInfoService orgApplyInfoService;
|
||||||
|
@Autowired
|
||||||
|
private ISysBaseAPI sysBaseAPI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工单回执
|
* 工单回执
|
||||||
*/
|
*/
|
||||||
|
@ -45,6 +51,22 @@ public class WorkOrderMQListener {
|
||||||
orgApplyInfoService.updateById(orgApplyInfo);
|
orgApplyInfoService.updateById(orgApplyInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//新增机构信息(如果没有)
|
||||||
|
SysDepartModel sysDepartModel = sysBaseAPI.selectDepartById(workOrderMQDto.getOrgId());
|
||||||
|
if(sysDepartModel.getId() == null){
|
||||||
|
SysDepartEntity sysDepart =new SysDepartEntity();
|
||||||
|
sysDepart.setId(workOrderMQDto.getOrgId());
|
||||||
|
sysDepart.setCreateBy("admin");
|
||||||
|
sysDepart.setDepartName(workOrderMQDto.getOrgName());
|
||||||
|
sysDepart.setDepartOrder(0);
|
||||||
|
sysDepart.setOrgCategory("1");
|
||||||
|
sysDepart.setOrgType("1");
|
||||||
|
sysDepart.setDelFlag("0");
|
||||||
|
sysDepart.setIzLeaf(1);
|
||||||
|
sysDepart.setPlatType("ywjg");
|
||||||
|
sysDepart.setOrgCode(workOrderMQDto.getOrgCode());
|
||||||
|
sysBaseAPI.addOrg(sysDepart);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.nu.modules.servicedirective.controller;
|
package com.nu.modules.servicedirective.controller;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
@ -12,6 +13,7 @@ import com.nu.utils.RabbitMQUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.compress.utils.Lists;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
@ -112,6 +114,71 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询-更换数据源
|
||||||
|
*
|
||||||
|
* @param configServiceDirective
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "服务指令-分页列表查询")
|
||||||
|
@ApiOperation(value = "服务指令-分页列表查询", notes = "服务指令-分页列表查询")
|
||||||
|
@GetMapping(value = "/listByDS")
|
||||||
|
@DS("#dataSourceCode")
|
||||||
|
public Result<IPage<ConfigServiceDirective>> queryPageListByDS(@RequestParam(name = "dataSourceCode") String dataSourceCode, ConfigServiceDirective configServiceDirective,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
if (StringUtils.isBlank(dataSourceCode)) {
|
||||||
|
return Result.ok(new Page<ConfigServiceDirective>());
|
||||||
|
}
|
||||||
|
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||||
|
// 自定义多选的查询规则为:LIKE_WITH_OR
|
||||||
|
customeRuleMap.put("categoryId", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
|
customeRuleMap.put("typeId", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
|
customeRuleMap.put("instructionTagId", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
|
customeRuleMap.put("izReimbursement", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
|
customeRuleMap.put("izPreferential", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
|
customeRuleMap.put("chargingFrequency", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
|
customeRuleMap.put("cycleType", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
|
customeRuleMap.put("izEnabled", QueryRuleEnum.LIKE_WITH_OR);
|
||||||
|
QueryWrapper<ConfigServiceDirective> queryWrapper = QueryGenerator.initQueryWrapper(configServiceDirective, req.getParameterMap(), customeRuleMap);
|
||||||
|
queryWrapper.select("id");
|
||||||
|
//如果有服务指令需要提前查询下对应的服务指令id
|
||||||
|
List<ConfigServiceDirective> directiveIds = null;
|
||||||
|
if (StringUtils.isNotBlank(configServiceDirective.getBodyTags())) {
|
||||||
|
directiveIds = configServiceDirectiveService.queryDirectiveIdByBodyTagIds(configServiceDirective.getBodyTags());
|
||||||
|
if (directiveIds != null && !directiveIds.isEmpty()) {
|
||||||
|
queryWrapper.in("id", directiveIds.stream().map(ConfigServiceDirective::getId).collect(Collectors.toList()));
|
||||||
|
} else {
|
||||||
|
//体重标签下没有数据
|
||||||
|
queryWrapper.eq("id", "null");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(configServiceDirective.getEmotionTags())) {
|
||||||
|
directiveIds = configServiceDirectiveService.queryDirectiveIdByEmotionTagIds(configServiceDirective.getEmotionTags());
|
||||||
|
if (directiveIds != null && !directiveIds.isEmpty() && StringUtils.isNotBlank(configServiceDirective.getEmotionTags())) {
|
||||||
|
queryWrapper.in("id", directiveIds.stream().map(ConfigServiceDirective::getId).collect(Collectors.toList()));
|
||||||
|
} else {
|
||||||
|
//情绪标签下没有数据
|
||||||
|
queryWrapper.eq("id", "null");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//只查询已授权(status = 0)
|
||||||
|
if (StringUtils.isNotBlank(configServiceDirective.getStatus())) {
|
||||||
|
queryWrapper.in("status", configServiceDirective.getStatus().split(","));
|
||||||
|
} else {
|
||||||
|
queryWrapper.in("status", new String[]{"0", "2"});
|
||||||
|
}
|
||||||
|
Page<ConfigServiceDirective> page = new Page<ConfigServiceDirective>(pageNo, pageSize);
|
||||||
|
IPage<ConfigServiceDirective> list = configServiceDirectiveService.page(page, queryWrapper);
|
||||||
|
List<ConfigServiceDirective> pageList = service.pageList(configServiceDirective, list);
|
||||||
|
list.setRecords(pageList);
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
*
|
*
|
||||||
|
@ -229,12 +296,20 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
||||||
//@AutoLog(value = "服务指令-通过id查询")
|
//@AutoLog(value = "服务指令-通过id查询")
|
||||||
@ApiOperation(value = "服务指令-通过id查询", notes = "服务指令-通过id查询")
|
@ApiOperation(value = "服务指令-通过id查询", notes = "服务指令-通过id查询")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result<ConfigServiceDirective> queryById(@RequestParam(name = "id", required = true) String id) {
|
@DS("#dataSourceCode")
|
||||||
ConfigServiceDirective configServiceDirective = configServiceDirectiveService.getById(id);
|
public Result<ConfigServiceDirective> queryById(@RequestParam(name = "dataSourceCode") String dataSourceCode, @RequestParam(name = "id", required = true) String id) {
|
||||||
if (configServiceDirective == null) {
|
ConfigServiceDirective configServiceDirective = new ConfigServiceDirective();
|
||||||
|
configServiceDirective.setId(id);
|
||||||
|
List<ConfigServiceDirective> param = Lists.newArrayList();
|
||||||
|
param.add(configServiceDirective);
|
||||||
|
Page<ConfigServiceDirective> page = new Page<ConfigServiceDirective>(1, 10);
|
||||||
|
page.setRecords(param);
|
||||||
|
List<ConfigServiceDirective> result = configServiceDirectiveService.pageList(configServiceDirective, page);
|
||||||
|
if (result == null || result.size() < 1) {
|
||||||
return Result.error("未找到对应数据");
|
return Result.error("未找到对应数据");
|
||||||
|
} else {
|
||||||
|
return Result.OK(result.get(0));
|
||||||
}
|
}
|
||||||
return Result.OK(configServiceDirective);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -263,6 +338,7 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
||||||
/**
|
/**
|
||||||
* 同步媒体资源给业务平台
|
* 同步媒体资源给业务平台
|
||||||
* 此方法是审核业务平台自己新建的数据后 将媒体资源同步回去 并非给所有平台更新媒体资源
|
* 此方法是审核业务平台自己新建的数据后 将媒体资源同步回去 并非给所有平台更新媒体资源
|
||||||
|
*
|
||||||
* @param dto
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -274,7 +350,7 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
||||||
configServiceDirectiveService.handleMediaFile(dto);
|
configServiceDirectiveService.handleMediaFile(dto);
|
||||||
//保存
|
//保存
|
||||||
ConfigServiceDirective configServiceDirective = new ConfigServiceDirective();
|
ConfigServiceDirective configServiceDirective = new ConfigServiceDirective();
|
||||||
BeanUtils.copyProperties(dto,configServiceDirective);
|
BeanUtils.copyProperties(dto, configServiceDirective);
|
||||||
configServiceDirectiveService.updateById(configServiceDirective);
|
configServiceDirectiveService.updateById(configServiceDirective);
|
||||||
|
|
||||||
DirectiveAsyncMQDto directiveAsyncMQDto = new DirectiveAsyncMQDto();
|
DirectiveAsyncMQDto directiveAsyncMQDto = new DirectiveAsyncMQDto();
|
||||||
|
@ -291,7 +367,7 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
||||||
configServiceDirectiveService.handleMediaFile(dto);
|
configServiceDirectiveService.handleMediaFile(dto);
|
||||||
//保存
|
//保存
|
||||||
ConfigServiceDirective configServiceDirective = new ConfigServiceDirective();
|
ConfigServiceDirective configServiceDirective = new ConfigServiceDirective();
|
||||||
BeanUtils.copyProperties(dto,configServiceDirective);
|
BeanUtils.copyProperties(dto, configServiceDirective);
|
||||||
configServiceDirectiveService.updateById(configServiceDirective);
|
configServiceDirectiveService.updateById(configServiceDirective);
|
||||||
|
|
||||||
DirectiveAsyncMQDto directiveAsyncMQDto = new DirectiveAsyncMQDto();
|
DirectiveAsyncMQDto directiveAsyncMQDto = new DirectiveAsyncMQDto();
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//处理单元格合并所需数据
|
//处理单元格合并所需数据
|
||||||
merge(list);
|
// merge(list);
|
||||||
|
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
|
|
|
@ -6,6 +6,7 @@ import org.jeecg.common.api.dto.DataLogDTO;
|
||||||
import org.jeecg.common.api.dto.OnlineAuthDTO;
|
import org.jeecg.common.api.dto.OnlineAuthDTO;
|
||||||
import org.jeecg.common.api.dto.message.*;
|
import org.jeecg.common.api.dto.message.*;
|
||||||
import org.jeecg.common.constant.enums.EmailTemplateEnum;
|
import org.jeecg.common.constant.enums.EmailTemplateEnum;
|
||||||
|
import org.jeecg.common.system.entity.SysDepartEntity;
|
||||||
import org.jeecg.common.system.vo.*;
|
import org.jeecg.common.system.vo.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -627,4 +628,14 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||||
JSONObject getOrgInfo(String orgCode);
|
JSONObject getOrgInfo(String orgCode);
|
||||||
|
|
||||||
JSONObject getDeptInfo();
|
JSONObject getDeptInfo();
|
||||||
|
|
||||||
|
String addOrg(SysDepartEntity sysDepart);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过部门id获取部门全部信息
|
||||||
|
*
|
||||||
|
* @param id 部门id
|
||||||
|
* @return SysDepartModel对象
|
||||||
|
*/
|
||||||
|
SysDepartModel selectDepartById(String id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,177 @@
|
||||||
|
package org.jeecg.common.system.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 部门表
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SysDepartEntity implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
/**
|
||||||
|
* 父机构ID
|
||||||
|
*/
|
||||||
|
private String parentId;
|
||||||
|
/**
|
||||||
|
* 机构/部门名称
|
||||||
|
*/
|
||||||
|
private String departName;
|
||||||
|
/**
|
||||||
|
* 英文名
|
||||||
|
*/
|
||||||
|
private String departNameEn;
|
||||||
|
/**
|
||||||
|
* 缩写
|
||||||
|
*/
|
||||||
|
private String departNameAbbr;
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
private Integer departOrder;
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
/**
|
||||||
|
* 机构类别 1=公司,2=组织机构,3=岗位
|
||||||
|
*/
|
||||||
|
private String orgCategory;
|
||||||
|
/**
|
||||||
|
* 机构类型
|
||||||
|
*/
|
||||||
|
private String orgType;
|
||||||
|
/**
|
||||||
|
* 机构编码
|
||||||
|
*/
|
||||||
|
private String orgCode;
|
||||||
|
/**
|
||||||
|
* 协议+域名
|
||||||
|
*/
|
||||||
|
private String url;
|
||||||
|
/**
|
||||||
|
* 省份
|
||||||
|
*/
|
||||||
|
private String province;
|
||||||
|
/**
|
||||||
|
* 城市
|
||||||
|
*/
|
||||||
|
private String city;
|
||||||
|
/**
|
||||||
|
* 区县
|
||||||
|
*/
|
||||||
|
private String district;
|
||||||
|
/**
|
||||||
|
* 业务平台类型
|
||||||
|
*/
|
||||||
|
private String platType;
|
||||||
|
/**
|
||||||
|
* 运营开始时间
|
||||||
|
*/
|
||||||
|
private Date operationStartTime;
|
||||||
|
/**
|
||||||
|
* 运营到期时间
|
||||||
|
*/
|
||||||
|
private Date operationEndTime;
|
||||||
|
/**
|
||||||
|
* 合同开始时间
|
||||||
|
*/
|
||||||
|
private Date contractStartTime;
|
||||||
|
/**
|
||||||
|
* 合同到期时间
|
||||||
|
*/
|
||||||
|
private Date contractEndTime;
|
||||||
|
/**
|
||||||
|
* 手机号
|
||||||
|
*/
|
||||||
|
private String mobile;
|
||||||
|
/**
|
||||||
|
* 传真
|
||||||
|
*/
|
||||||
|
private String fax;
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String memo;
|
||||||
|
/**
|
||||||
|
* 应缴金额
|
||||||
|
*/
|
||||||
|
private BigDecimal payableAmount;
|
||||||
|
/**
|
||||||
|
* 状态(1启用,0不启用)
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
/**
|
||||||
|
* 删除状态(0,正常,1已删除)
|
||||||
|
*/
|
||||||
|
private String delFlag;
|
||||||
|
/**
|
||||||
|
* 对接企业微信的ID
|
||||||
|
*/
|
||||||
|
private String qywxIdentifier;
|
||||||
|
/**
|
||||||
|
* 对接钉钉的部门ID
|
||||||
|
*/
|
||||||
|
private String dingIdentifier;
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String createBy;
|
||||||
|
/**
|
||||||
|
* 创建日期
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
private String updateBy;
|
||||||
|
/**
|
||||||
|
* 更新日期
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
/**
|
||||||
|
* 租户ID
|
||||||
|
*/
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否有叶子节点: 1是0否
|
||||||
|
*/
|
||||||
|
private Integer izLeaf;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 各机构服务器后台接口地址
|
||||||
|
*/
|
||||||
|
private String serverUrl;
|
||||||
|
/**
|
||||||
|
* 各机构服务器后台接口地址
|
||||||
|
*/
|
||||||
|
private String picUrl;
|
||||||
|
|
||||||
|
//update-begin---author:wangshuai ---date:20200308 for:[JTC-119]在部门管理菜单下设置部门负责人,新增字段负责人ids和旧的负责人ids
|
||||||
|
/**
|
||||||
|
* 部门负责人的ids
|
||||||
|
*/
|
||||||
|
private String directorUserIds;
|
||||||
|
/**
|
||||||
|
* 旧的部门负责人的ids(用于比较删除和新增)
|
||||||
|
*/
|
||||||
|
private String oldDirectorUserIds;
|
||||||
|
//update-end---author:wangshuai ---date:20200308 for:[JTC-119]新增字段负责人ids和旧的负责人ids
|
||||||
|
|
||||||
|
}
|
|
@ -16,6 +16,7 @@ import com.google.common.collect.Maps;
|
||||||
import org.apache.commons.compress.utils.Lists;
|
import org.apache.commons.compress.utils.Lists;
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||||
|
import org.jeecg.common.system.entity.SysDepartEntity;
|
||||||
import org.jeecg.modules.message.entity.SysMessageTemplate;
|
import org.jeecg.modules.message.entity.SysMessageTemplate;
|
||||||
import org.jeecg.modules.message.handle.impl.DdSendMsgHandle;
|
import org.jeecg.modules.message.handle.impl.DdSendMsgHandle;
|
||||||
import org.jeecg.modules.message.handle.impl.EmailSendMsgHandle;
|
import org.jeecg.modules.message.handle.impl.EmailSendMsgHandle;
|
||||||
|
@ -1941,4 +1942,21 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||||
return categoryMapper.selectOne(qw);
|
return categoryMapper.selectOne(qw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String addOrg(SysDepartEntity sysDepart_) {
|
||||||
|
SysDepart sysDepart = new SysDepart();
|
||||||
|
BeanUtils.copyProperties(sysDepart_, sysDepart);
|
||||||
|
sysDepartService.save(sysDepart);
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SysDepartModel selectDepartById(String id) {
|
||||||
|
SysDepart depart = sysDepartService.getDepartById(id);
|
||||||
|
SysDepartModel sysDepartModel = new SysDepartModel();
|
||||||
|
if(depart!=null){
|
||||||
|
BeanUtils.copyProperties(depart, sysDepartModel);
|
||||||
|
}
|
||||||
|
return sysDepartModel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue