Merge branch 'master' of http://47.115.223.229:8888/yangjun/hldy_java_monomer
This commit is contained in:
commit
6f6b879821
|
@ -81,6 +81,20 @@ public class H5ApiAdvisoryInfoController extends JeecgController<NuBizAdvisoryIn
|
|||
String dictText = commonApi.translateDict("advisory_approval",nuBizAdvisoryInfo.getStatus());
|
||||
nuBizAdvisoryInfo.setStatusName(dictText);
|
||||
}
|
||||
if(StringUtils.isNotBlank(nuBizAdvisoryInfo.getOldManSex())){
|
||||
String dictText = commonApi.translateDict("sex",nuBizAdvisoryInfo.getOldManSex());
|
||||
nuBizAdvisoryInfo.setOldManSexName(dictText);
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(nuBizAdvisoryInfo.getMedicalInsuranceType())){
|
||||
String dictText = commonApi.translateDict("medical_insurance_type",nuBizAdvisoryInfo.getMedicalInsuranceType());
|
||||
nuBizAdvisoryInfo.setMedicalInsuranceTypeName(dictText);
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(nuBizAdvisoryInfo.getReimbType())){
|
||||
String dictText = commonApi.translateDict("reimb_type",nuBizAdvisoryInfo.getReimbType());
|
||||
nuBizAdvisoryInfo.setReimbTypeName(dictText);
|
||||
}
|
||||
return Result.OK(nuBizAdvisoryInfo);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,6 +95,21 @@ public class NuBizAdvisoryInfo implements Serializable {
|
|||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**老人姓名*/
|
||||
private java.lang.String oldManName;
|
||||
/**老人年龄*/
|
||||
private java.lang.String oldManAge;
|
||||
/**医保类型*/
|
||||
@Dict(dicCode = "medical_insurance_type")
|
||||
private java.lang.String medicalInsuranceType;
|
||||
/**老人性别*/
|
||||
@Dict(dicCode = "sex")
|
||||
private java.lang.String oldManSex;
|
||||
/**报销类型*/
|
||||
@Dict(dicCode = "reimb_type")
|
||||
private java.lang.String reimbType;
|
||||
/**护理单元*/
|
||||
private java.lang.String nuId;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
|
@ -106,4 +121,11 @@ public class NuBizAdvisoryInfo implements Serializable {
|
|||
@TableField(exist = false)
|
||||
private java.lang.String statusName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private java.lang.String oldManSexName;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String medicalInsuranceTypeName;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String reimbTypeName;
|
||||
|
||||
}
|
||||
|
|
|
@ -237,4 +237,26 @@ public class SysDataSourceController extends JeecgController<SysDataSource, ISys
|
|||
return this.sysDataSourceService.queryDepartList(addFLag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过sysOrgCode查询
|
||||
*
|
||||
* @param sysOrgCode
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "多数据源管理-通过sysOrgCode查询")
|
||||
@ApiOperation(value = "多数据源管理-通过id查询", notes = "多数据源管理-通过sysOrgCode查询")
|
||||
@GetMapping(value = "/queryBySysOrgCode")
|
||||
public Result<?> queryBySysOrgCode(@RequestParam(name = "sysOrgCode") String sysOrgCode) throws InterruptedException {
|
||||
SysDataSource sysDataSource = sysDataSourceService.getBySysOrgCode(sysOrgCode);
|
||||
//密码解密
|
||||
if(sysDataSource!=null){
|
||||
String dbPassword = sysDataSource.getDbPassword();
|
||||
if(StringUtils.isNotBlank(dbPassword)){
|
||||
String decodedStr = SecurityUtil.jiemi(dbPassword);
|
||||
sysDataSource.setDbPassword(decodedStr);
|
||||
}
|
||||
}
|
||||
return Result.ok(sysDataSource);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -54,6 +54,22 @@ public class SysDepart implements Serializable {
|
|||
/**机构编码*/
|
||||
@Excel(name="机构编码",width=15)
|
||||
private String orgCode;
|
||||
/**运营开始时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date operationStartTime;
|
||||
/**运营到期时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date operationEndTime;
|
||||
/**合同开始时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date contractStartTime;
|
||||
/**合同到期时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date contractEndTime;
|
||||
/**手机号*/
|
||||
@Excel(name="手机号",width=15)
|
||||
private String mobile;
|
||||
|
|
|
@ -170,7 +170,24 @@
|
|||
|
||||
<!--系统后台导出,根据父级id和租户id查询部门数据-->
|
||||
<select id="getSysDepartList" resultType="org.jeecg.modules.system.vo.SysDepartExportVo">
|
||||
SELECT id,depart_name,parent_id,depart_name_en,depart_order,description,org_category,org_code,mobile,fax,address,memo FROM sys_depart
|
||||
SELECT
|
||||
id,
|
||||
depart_name,
|
||||
parent_id,
|
||||
depart_name_en,
|
||||
depart_order,
|
||||
description,
|
||||
org_category,
|
||||
org_code,
|
||||
operation_start_time,
|
||||
operation_end_time,
|
||||
contract_start_time,
|
||||
contract_end_time,
|
||||
mobile,
|
||||
fax,
|
||||
address,
|
||||
memo
|
||||
FROM sys_depart
|
||||
WHERE
|
||||
1=1
|
||||
<if test="null != tenantId and 0 != tenantId">
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package org.jeecg.modules.system.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.jeecg.modules.system.entity.SysDepart;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
|
@ -53,6 +55,14 @@ public class SysDepartTreeModel implements Serializable{
|
|||
|
||||
private String orgCode;
|
||||
|
||||
private Date operationStartTime;
|
||||
|
||||
private Date operationEndTime;
|
||||
|
||||
private Date contractStartTime;
|
||||
|
||||
private Date contractEndTime;
|
||||
|
||||
private String mobile;
|
||||
|
||||
private String fax;
|
||||
|
@ -101,6 +111,10 @@ public class SysDepartTreeModel implements Serializable{
|
|||
this.orgCategory = sysDepart.getOrgCategory();
|
||||
this.orgType = sysDepart.getOrgType();
|
||||
this.orgCode = sysDepart.getOrgCode();
|
||||
this.operationStartTime = sysDepart.getOperationStartTime();
|
||||
this.operationEndTime = sysDepart.getOperationEndTime();
|
||||
this.contractStartTime = sysDepart.getContractStartTime();
|
||||
this.contractEndTime = sysDepart.getContractEndTime();
|
||||
this.mobile = sysDepart.getMobile();
|
||||
this.fax = sysDepart.getFax();
|
||||
this.address = sysDepart.getAddress();
|
||||
|
@ -221,6 +235,38 @@ public class SysDepartTreeModel implements Serializable{
|
|||
this.orgCode = orgCode;
|
||||
}
|
||||
|
||||
public Date getOperationStartTime() {
|
||||
return operationStartTime;
|
||||
}
|
||||
|
||||
public void setOperationStartTime(Date operationStartTime) {
|
||||
this.operationStartTime = operationStartTime;
|
||||
}
|
||||
|
||||
public Date getOperationEndTime() {
|
||||
return operationEndTime;
|
||||
}
|
||||
|
||||
public void setOperationEndTime(Date operationEndTime) {
|
||||
this.operationEndTime = operationEndTime;
|
||||
}
|
||||
|
||||
public Date getContractStartTime() {
|
||||
return contractStartTime;
|
||||
}
|
||||
|
||||
public void setContractStartTime(Date contractStartTime) {
|
||||
this.contractStartTime = contractStartTime;
|
||||
}
|
||||
|
||||
public Date getContractEndTime() {
|
||||
return contractEndTime;
|
||||
}
|
||||
|
||||
public void setContractEndTime(Date contractEndTime) {
|
||||
this.contractEndTime = contractEndTime;
|
||||
}
|
||||
|
||||
public String getMobile() {
|
||||
return mobile;
|
||||
}
|
||||
|
@ -373,6 +419,10 @@ public class SysDepartTreeModel implements Serializable{
|
|||
Objects.equals(orgCategory, model.orgCategory) &&
|
||||
Objects.equals(orgType, model.orgType) &&
|
||||
Objects.equals(orgCode, model.orgCode) &&
|
||||
Objects.equals(operationStartTime, model.operationStartTime) &&
|
||||
Objects.equals(operationEndTime, model.operationEndTime) &&
|
||||
Objects.equals(contractStartTime, model.contractStartTime) &&
|
||||
Objects.equals(contractEndTime, model.contractEndTime) &&
|
||||
Objects.equals(mobile, model.mobile) &&
|
||||
Objects.equals(fax, model.fax) &&
|
||||
Objects.equals(address, model.address) &&
|
||||
|
@ -395,9 +445,10 @@ public class SysDepartTreeModel implements Serializable{
|
|||
public int hashCode() {
|
||||
|
||||
return Objects.hash(id, parentId, departName, departNameEn, departNameAbbr,
|
||||
departOrder, description, orgCategory, orgType, orgCode, mobile, fax, address,
|
||||
memo, status, delFlag, qywxIdentifier, createBy, createTime, updateBy, updateTime,
|
||||
children,directorUserIds);
|
||||
departOrder, description, orgCategory, orgType, orgCode,
|
||||
operationStartTime, operationEndTime, contractStartTime, contractEndTime,
|
||||
mobile, fax, address, memo, status, delFlag, qywxIdentifier,
|
||||
createBy, createTime, updateBy, updateTime, children,directorUserIds);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -42,4 +42,11 @@ public interface ISysDataSourceService extends IService<SysDataSource> {
|
|||
* @return
|
||||
*/
|
||||
Result<List<SysDataSource>> queryDepartList(String addFLag);
|
||||
|
||||
/**
|
||||
* 通过sysOrgCode查询
|
||||
* @param sysOrgCode
|
||||
* @return
|
||||
*/
|
||||
SysDataSource getBySysOrgCode(String sysOrgCode);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@ import com.baomidou.dynamic.datasource.creator.DataSourceProperty;
|
|||
import com.baomidou.dynamic.datasource.creator.druid.DruidDataSourceCreator;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.zhyd.oauth.log.Log;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.util.dynamic.db.DataSourceCachePool;
|
||||
|
@ -17,6 +19,7 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
import javax.sql.DataSource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 多数据源管理
|
||||
|
@ -25,6 +28,7 @@ import java.util.List;
|
|||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class SysDataSourceServiceImpl extends ServiceImpl<SysDataSourceMapper, SysDataSource> implements ISysDataSourceService {
|
||||
|
||||
@Autowired
|
||||
|
@ -48,7 +52,7 @@ public class SysDataSourceServiceImpl extends ServiceImpl<SysDataSourceMapper, S
|
|||
boolean result = save(sysDataSource);
|
||||
if (result) {
|
||||
//动态创建数据源
|
||||
//addDynamicDataSource(sysDataSource, dbPassword);
|
||||
addDynamicDataSource(sysDataSource, dbPassword);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
@ -68,10 +72,10 @@ public class SysDataSourceServiceImpl extends ServiceImpl<SysDataSourceMapper, S
|
|||
}
|
||||
Boolean result=updateById(sysDataSource);
|
||||
if(result){
|
||||
//先删除老的数据源
|
||||
// removeDynamicDataSource(d.getCode());
|
||||
//添加新的数据源
|
||||
//addDynamicDataSource(sysDataSource,dbPassword);
|
||||
// 先删除老的数据源
|
||||
removeDynamicDataSource(d.getCode());
|
||||
// 添加新的数据源
|
||||
addDynamicDataSource(sysDataSource,dbPassword);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
@ -103,6 +107,14 @@ public class SysDataSourceServiceImpl extends ServiceImpl<SysDataSourceMapper, S
|
|||
DataSource dataSource = dataSourceCreator.createDataSource(dataSourceProperty);
|
||||
try {
|
||||
ds.addDataSource(sysDataSource.getCode(), dataSource);
|
||||
// Map<String, DataSource> map = ds.getDataSources();
|
||||
// map.forEach((key, value) -> System.out.println(key + ": " + value));
|
||||
// for (Map.Entry<String, DataSource> entry : map.entrySet()) {
|
||||
// Log.error("=======================================>");
|
||||
// Log.error(entry.getKey());
|
||||
// DataSource dynamicDataSource = entry.getValue();
|
||||
// Log.error("<=======================================");
|
||||
// }
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -139,4 +151,16 @@ public class SysDataSourceServiceImpl extends ServiceImpl<SysDataSourceMapper, S
|
|||
List<SysDataSource> list = baseMapper.queryDepartList(addFLag);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 机构列表查询
|
||||
* @param sysOrgCode
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SysDataSource getBySysOrgCode(String sysOrgCode){
|
||||
QueryWrapper<SysDataSource> qw = new QueryWrapper();
|
||||
qw.lambda().eq(true, SysDataSource::getSysOrgCode, sysOrgCode);
|
||||
return getOne(qw);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue