Commit 0fd8a25e authored by zhangch's avatar zhangch

提交护理机构相关代码以及主菜单排序问题修复

parent fb48c807
package com.hungraim.ltc.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgSrvOrganType;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndSrvOrganLevel;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganListVo;
import com.hungraim.ltc.service.SrvOrganService;
import com.hungraim.ltc.util.Result;
......@@ -9,6 +11,8 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/api.apply/srvOrgan")
@AllArgsConstructor
......@@ -33,4 +37,28 @@ public class SrvOrganController {
page = srvOrganService.getSrvOrganList(page, organId, isInvolveChild, creditCode, srvOrganName);
return Result.success(page);
}
/**
* 获取所有服务机构等级
*
* @return 返回服务机构等级
*/
@GetMapping("/srvOrganLevels")
public Result<List<ChFndSrvOrganLevel>> getSrvOrganLevels() {
List<ChFndSrvOrganLevel> srvOrganLevels = srvOrganService.getSrvOrganLevels();
return Result.success(srvOrganLevels);
}
/**
* 获取所有服务机构类型
*
* @return 返回所有服务机构类型
*/
@GetMapping("/srvOrganTypes")
public Result<List<ChCfgSrvOrganType>> getSrvOrganTypes() {
List<ChCfgSrvOrganType> chCfgSrvOrganTypes = srvOrganService.getSrvOrganTypes();
return Result.success(chCfgSrvOrganTypes);
}
}
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgSrvOrganType;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ChCfgSrvOrganTypeMapper extends BaseMapper<ChCfgSrvOrganType> {
}
\ No newline at end of file
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndSrvOrganLevel;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface ChFndSrvOrganLevelMapper extends BaseMapper<ChFndSrvOrganLevel> {
}
\ No newline at end of file
package com.hungraim.ltc.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgSrvOrganType;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndSrvOrganLevel;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganListVo;
import java.util.List;
public interface SrvOrganService {
/**
......@@ -16,4 +20,18 @@ public interface SrvOrganService {
* @return 返回护理机构列表
*/
Page<SrvOrganListVo> getSrvOrganList(Page<SrvOrganListVo> page, Long organId, Boolean isInvolveChild, String creditCode, String srvOrganName);
/**
* 获取所有服务机构等级
*
* @return 返回服务机构等级
*/
List<ChFndSrvOrganLevel> getSrvOrganLevels();
/**
* 获取所有服务机构类型
*
* @return 返回所有服务机构类型
*/
List<ChCfgSrvOrganType> getSrvOrganTypes();
}
......@@ -2,8 +2,12 @@ package com.hungraim.ltc.service.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.dao.ChCfgSrvOrganTypeMapper;
import com.hungraim.ltc.dao.ChFndSrvOrganLevelMapper;
import com.hungraim.ltc.dao.SrvModeMapper;
import com.hungraim.ltc.dao.SrvOrganMapper;
import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgSrvOrganType;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndSrvOrganLevel;
import com.hungraim.ltc.pojo.vo.disable.SrvModeVo;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganListVo;
import com.hungraim.ltc.service.OrganService;
......@@ -24,6 +28,9 @@ public class SrvOrganServiceImpl implements SrvOrganService {
private final SrvModeMapper srvModeMapper;
private final ChFndSrvOrganLevelMapper chFndSrvOrganLevelMapper;
private final ChCfgSrvOrganTypeMapper chCfgSrvOrganTypeMapper;
@Override
public Page<SrvOrganListVo> getSrvOrganList(Page<SrvOrganListVo> page, Long organId, Boolean isInvolveChild, String creditCode, String srvOrganName) {
......@@ -48,5 +55,15 @@ public class SrvOrganServiceImpl implements SrvOrganService {
return srvOrganList;
}
@Override
public List<ChFndSrvOrganLevel> getSrvOrganLevels() {
return chFndSrvOrganLevelMapper.selectList(null);
}
@Override
public List<ChCfgSrvOrganType> getSrvOrganTypes() {
return chCfgSrvOrganTypeMapper.selectList(null);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hungraim.ltc.dao.ChCfgSrvOrganTypeMapper">
<resultMap id="BaseResultMap" type="com.hungraim.ltc.pojo.entity.SysConfig.ChCfgSrvOrganType">
<id column="ORGAN_TYPE_ID" jdbcType="DECIMAL" property="organTypeId" />
<result column="ORGAN_TYPE_NAME" jdbcType="VARCHAR" property="organTypeName" />
<result column="REMARK" jdbcType="VARCHAR" property="remark" />
<result column="PARA_ID" jdbcType="DECIMAL" property="paraId" />
<result column="FCD" jdbcType="TIMESTAMP" property="fcd" />
<result column="FCU" jdbcType="DECIMAL" property="fcu" />
</resultMap>
<sql id="Base_Column_List">
ORGAN_TYPE_ID, ORGAN_TYPE_NAME, REMARK, PARA_ID, FCD, FCU
</sql>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hungraim.ltc.dao.ChFndSrvOrganLevelMapper">
<resultMap id="BaseResultMap" type="com.hungraim.ltc.pojo.entity.SysConfig.ChFndSrvOrganLevel">
<id column="LEVEL_ID" jdbcType="DECIMAL" property="levelId" />
<result column="LEVEL_NAME" jdbcType="VARCHAR" property="levelName" />
</resultMap>
<sql id="Base_Column_List">
LEVEL_ID, LEVEL_NAME
</sql>
</mapper>
\ No newline at end of file
package com.hungraim.ltc.pojo.entity.SysConfig;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* CH_CFG_SRV_ORGAN_TYPE
*
* @author zhangch
*/
@Data
@TableName("CH_CFG_SRV_ORGAN_TYPE")
public class ChCfgSrvOrganType implements Serializable {
/**
* 服务机构类型id
*/
@TableId(type = IdType.INPUT)
private Long organTypeId;
/**
* 服务机构类型名称
*/
private String organTypeName;
/**
* 备注
*/
private String remark;
/**
* 基础参数配置id
*/
private Long paraId;
/**
* 首次操作时间
*/
private Date fcd;
/**
* 首次操作人
*/
private Long fcu;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.hungraim.ltc.pojo.entity.SysConfig;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* CH_FND_BANK 银行基础表
*
* @author zhangch
*/
@Data
@TableName("CH_FND_BANK")
public class ChFndBank implements Serializable {
/**
* 银行ID
*/
@TableId(type = IdType.INPUT)
private String bankId;
/**
* 银行名称
*/
private String bankName;
/**
* 银行简称
*/
private String bankAbb;
private String bankClass;
/**
* 银行代码
*/
private String bankPaycode;
/**
* 首次操作时间
*/
private Date fcd;
/**
* 首次操作人
*/
private Long fcu;
/**
* 末次操作时间
*/
private Date lcd;
/**
* 末次操作人
*/
private Long lcu;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.hungraim.ltc.pojo.entity.SysConfig;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
/**
* CH_FND_SRV_ORGAN_LEVEL
* @author
*/
@TableName("CH_FND_SRV_ORGAN_LEVEL")
@KeySequence("SEQ_CH_FND_SRV_ORGAN_LEVEL")
@Data
public class ChFndSrvOrganLevel implements Serializable {
/**
* 机构级别code
*/
@TableId(type = IdType.INPUT)
private Long levelId;
/**
* 机构级别名称
*/
private String levelName;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.hungraim.ltc.system.controller;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndBank;
import com.hungraim.ltc.system.service.BankService;
import com.hungraim.ltc.util.Result;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/api.system/bank")
@AllArgsConstructor
public class BankController {
private final BankService bankService;
/**
* 获取银行信息列表
*
* @return 返回银行信息列表
*/
@RequestMapping("/list")
public Result<List<ChFndBank>> getBankList() {
List<ChFndBank> chFndBanks = bankService.getBankList();
return Result.success(chFndBanks);
}
}
......@@ -42,7 +42,7 @@ public class ResourcesController {
public Result getMainMenu() {
//查出所有菜单 并且转换成菜单vo
List<MainMenuVO> resourceList = resourceService.list(new LambdaQueryWrapper<SystemResource>().eq(SystemResource::getResourceType, "2"))
List<MainMenuVO> resourceList = resourceService.list(new LambdaQueryWrapper<SystemResource>().eq(SystemResource::getResourceType, "2").orderByAsc(SystemResource::getCreatedTime))
.stream().map(item -> {
MainMenuVO mainMenuVO = new MainMenuVO();
mainMenuVO.setIcon(item.getResourceIcon());
......
package com.hungraim.ltc.system.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndBank;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ChFndBankMapper extends BaseMapper<ChFndBank> {
}
\ No newline at end of file
package com.hungraim.ltc.system.service;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndBank;
import java.util.List;
/**
* 银行信息相关service
*/
public interface BankService {
/**
* 获取银行信息列表
*
* @return 返回银行信息列表
*/
List<ChFndBank> getBankList();
}
package com.hungraim.ltc.system.service.impl;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndBank;
import com.hungraim.ltc.system.dao.ChFndBankMapper;
import com.hungraim.ltc.system.service.BankService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.List;
@AllArgsConstructor
@Service
public class BankServiceImpl implements BankService {
private final ChFndBankMapper chFndBankMapper;
@Override
public List<ChFndBank> getBankList() {
return chFndBankMapper.selectList(null);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hungraim.ltc.system.dao.ChFndBankMapper">
<resultMap id="BaseResultMap" type="com.hungraim.ltc.pojo.entity.SysConfig.ChFndBank">
<result column="BANK_ID" jdbcType="VARCHAR" property="bankId" />
<result column="BANK_NAME" jdbcType="VARCHAR" property="bankName" />
<result column="BANK_ABB" jdbcType="VARCHAR" property="bankAbb" />
<result column="BANK_CLASS" jdbcType="VARCHAR" property="bankClass" />
<result column="BANK_PAYCODE" jdbcType="VARCHAR" property="bankPaycode" />
<result column="FCD" jdbcType="TIMESTAMP" property="fcd" />
<result column="FCU" jdbcType="DECIMAL" property="fcu" />
<result column="LCD" jdbcType="TIMESTAMP" property="lcd" />
<result column="LCU" jdbcType="DECIMAL" property="lcu" />
</resultMap>
</mapper>
\ No newline at end of file
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