toStrList(String split, String str) {
+ return Arrays.asList(toStrArray(split, str));
+ }
+
+ /**
+ * 清理字符串,清理出某些不可见字符
+ *
+ * @param txt 字符串
+ * @return {String}
+ */
+ public static String cleanChars(String txt) {
+ return txt.replaceAll("[ `·•�\\f\\t\\v\\s]", "");
+ }
+
+ /**
+ * Convert a {@code Collection} into a delimited {@code String} (e.g., CSV).
+ * Useful for {@code toString()} implementations.
+ *
+ * @param coll the {@code Collection} to convert
+ * @return the delimited {@code String}
+ */
+ public static String join(Collection> coll) {
+ return StringUtils.join(coll);
+ }
+
+ /**
+ * Convert a {@code Collection} into a delimited {@code String} (e.g. CSV).
+ *
Useful for {@code toString()} implementations.
+ *
+ * @param coll the {@code Collection} to convert
+ * @param delim the delimiter to use (typically a ",")
+ * @return the delimited {@code String}
+ */
+ public static String join(Collection> coll, String delim) {
+ return StringUtils.join(coll, delim);
+ }
+
+ /**
+ * Convert a {@code String} array into a comma delimited {@code String}
+ * (i.e., CSV).
+ *
Useful for {@code toString()} implementations.
+ *
+ * @param arr the array to display
+ * @return the delimited {@code String}
+ */
+ public static String join(Object[] arr) {
+ return StringUtils.join(arr);
+ }
+
+ /**
+ * Convert a {@code String} array into a delimited {@code String} (e.g. CSV).
+ *
Useful for {@code toString()} implementations.
+ *
+ * @param arr the array to display
+ * @param delim the delimiter to use (typically a ",")
+ * @return the delimited {@code String}
+ */
+ public static String join(Object[] arr, String delim) {
+ return StringUtils.join(arr, delim);
+ }
+
+ /**
+ * Trim leading and trailing whitespace from the given {@code String}.
+ *
+ * @param str the {@code String} to check
+ * @return the trimmed {@code String}
+ * @see java.lang.Character#isWhitespace
+ */
+ public static String trimWhitespace(String str) {
+ if (!hasLength(str)) {
+ return str;
+ }
+
+ int beginIndex = 0;
+ int endIndex = str.length() - 1;
+
+ while (beginIndex <= endIndex && Character.isWhitespace(str.charAt(beginIndex))) {
+ beginIndex++;
+ }
+
+ while (endIndex > beginIndex && Character.isWhitespace(str.charAt(endIndex))) {
+ endIndex--;
+ }
+
+ return str.substring(beginIndex, endIndex + 1);
+ }
+
+ /**
+ * Check that the given {@code String} is neither {@code null} nor of length 0.
+ *
Note: this method returns {@code true} for a {@code String} that
+ * purely consists of whitespace.
+ *
+ * @param str the {@code String} to check (may be {@code null})
+ * @return {@code true} if the {@code String} is not {@code null} and has length
+ */
+ public static boolean hasLength(@Nullable String str) {
+ return (str != null && !str.isEmpty());
+ }
+
+ /**
+ * copy 对象属性到另一个对象,默认不使用Convert
+ *
+ * 注意:不支持链式Bean,链式用 copyProperties
+ *
+ * @param source 源对象
+ * @param clazz 类名
+ * @param 泛型标记
+ * @return T
+ */
+ public static T copy(Object source, Class clazz) {
+ BaseBeanCopier copier = BaseBeanCopier.create(source.getClass(), clazz, false);
+ T to = org.springframework.beans.BeanUtils.instantiateClass(clazz);
+ copier.copy(source, to, null);
+ return to;
+ }
+
+ /**
+ * 拷贝对象
+ *
+ * 注意:不支持链式Bean,链式用 copyProperties
+ *
+ * @param source 源对象
+ * @param targetBean 需要赋值的对象
+ */
+ public static void copy(Object source, Object targetBean) {
+ BaseBeanCopier copier = BaseBeanCopier.create(source.getClass(), targetBean.getClass(), false);
+ copier.copy(source, targetBean, null);
+ }
+
+ /**
+ * 判断一个字符串是否是数字
+ *
+ * @param cs the CharSequence to check, may be null
+ * @return {boolean}
+ */
+ public static boolean isNumeric(final CharSequence cs) {
+ return StringUtils.isNumeric(cs);
+ }
+
+ /**
+ *
Convert a String to an int, returning
+ * zero if the conversion fails.
+ *
+ * If the string is null, zero is returned.
+ *
+ *
+ * $.toInt(null) = 0
+ * $.toInt("") = 0
+ * $.toInt("1") = 1
+ *
+ *
+ * @param value the string to convert, may be null
+ * @return the int represented by the string, or zero if
+ * conversion fails
+ */
+ public static int toInt(final Object value) {
+ return NumberUtils.toInt(String.valueOf(value));
+ }
+
+ /**
+ * Convert a String to an int, returning a
+ * default value if the conversion fails.
+ *
+ * If the string is null, the default value is returned.
+ *
+ *
+ * $.toInt(null, 1) = 1
+ * $.toInt("", 1) = 1
+ * $.toInt("1", 0) = 1
+ *
+ *
+ * @param value the string to convert, may be null
+ * @param defaultValue the default value
+ * @return the int represented by the string, or the default if conversion fails
+ */
+ public static int toInt(final Object value, final int defaultValue) {
+ return NumberUtils.toInt(String.valueOf(value), defaultValue);
+ }
+
+ /**
+ * Convert a String to a long, returning
+ * zero if the conversion fails.
+ *
+ * If the string is null, zero is returned.
+ *
+ *
+ * $.toLong(null) = 0L
+ * $.toLong("") = 0L
+ * $.toLong("1") = 1L
+ *
+ *
+ * @param value the string to convert, may be null
+ * @return the long represented by the string, or 0 if
+ * conversion fails
+ */
+ public static long toLong(final Object value) {
+ return NumberUtils.toLong(String.valueOf(value));
+ }
+
+ /**
+ * Convert a String to a long, returning a
+ * default value if the conversion fails.
+ *
+ * If the string is null, the default value is returned.
+ *
+ *
+ * $.toLong(null, 1L) = 1L
+ * $.toLong("", 1L) = 1L
+ * $.toLong("1", 0L) = 1L
+ *
+ *
+ * @param value the string to convert, may be null
+ * @param defaultValue the default value
+ * @return the long represented by the string, or the default if conversion fails
+ */
+ public static long toLong(final Object value, final long defaultValue) {
+ return NumberUtils.toLong(String.valueOf(value), defaultValue);
+ }
+
+ /**
+ * Convert a String to an Double, returning a
+ * default value if the conversion fails.
+ *
+ * If the string is null, the default value is returned.
+ *
+ *
+ * $.toDouble(null, 1) = 1.0
+ * $.toDouble("", 1) = 1.0
+ * $.toDouble("1", 0) = 1.0
+ *
+ *
+ * @param value the string to convert, may be null
+ * @return the int represented by the string, or the default if conversion fails
+ */
+ public static Double toDouble(Object value) {
+ return toDouble(String.valueOf(value), -1.00);
+ }
+
+ /**
+ * Convert a String to an Double, returning a
+ * default value if the conversion fails.
+ *
+ * If the string is null, the default value is returned.
+ *
+ *
+ * $.toDouble(null, 1) = 1.0
+ * $.toDouble("", 1) = 1.0
+ * $.toDouble("1", 0) = 1.0
+ *
+ *
+ * @param value the string to convert, may be null
+ * @param defaultValue the default value
+ * @return the int represented by the string, or the default if conversion fails
+ */
+ public static Double toDouble(Object value, Double defaultValue) {
+ return NumberUtils.toDouble(String.valueOf(value), defaultValue);
+ }
+
+ /**
+ * Convert a String to an Float, returning a
+ * default value if the conversion fails.
+ *
+ * If the string is null, the default value is returned.
+ *
+ *
+ * $.toFloat(null, 1) = 1.00f
+ * $.toFloat("", 1) = 1.00f
+ * $.toFloat("1", 0) = 1.00f
+ *
+ *
+ * @param value the string to convert, may be null
+ * @return the int represented by the string, or the default if conversion fails
+ */
+ public static Float toFloat(Object value) {
+ return toFloat(String.valueOf(value), -1.0f);
+ }
+
+ /**
+ * Convert a String to an Float, returning a
+ * default value if the conversion fails.
+ *
+ * If the string is null, the default value is returned.
+ *
+ *
+ * $.toFloat(null, 1) = 1.00f
+ * $.toFloat("", 1) = 1.00f
+ * $.toFloat("1", 0) = 1.00f
+ *
+ *
+ * @param value the string to convert, may be null
+ * @param defaultValue the default value
+ * @return the int represented by the string, or the default if conversion fails
+ */
+ public static Float toFloat(Object value, Float defaultValue) {
+ return NumberUtils.toFloat(String.valueOf(value), defaultValue);
+ }
+
+ /**
+ * Convert a String to an Boolean, returning a
+ * default value if the conversion fails.
+ *
+ * If the string is null, the default value is returned.
+ *
+ *
+ * $.toBoolean("true", true) = true
+ * $.toBoolean("false") = false
+ * $.toBoolean("", false) = false
+ *
+ *
+ * @param value the string to convert, may be null
+ * @return the int represented by the string, or the default if conversion fails
+ */
+ public static Boolean toBoolean(Object value) {
+ return toBoolean(value, null);
+ }
+
+ /**
+ * Convert a String to an Boolean, returning a
+ * default value if the conversion fails.
+ *
+ * If the string is null, the default value is returned.
+ *
+ *
+ * $.toBoolean("true", true) = true
+ * $.toBoolean("false") = false
+ * $.toBoolean("", false) = false
+ *
+ *
+ * @param value the string to convert, may be null
+ * @param defaultValue the default value
+ * @return the int represented by the string, or the default if conversion fails
+ */
+ public static Boolean toBoolean(Object value, Boolean defaultValue) {
+ if (value != null) {
+ String val = String.valueOf(value);
+ val = val.toLowerCase().trim();
+ return Boolean.parseBoolean(val);
+ }
+ return defaultValue;
+ }
+
+ /**
+ * 转换为Integer数组
+ *
+ * @param str 被转换的值
+ * @return 结果
+ */
+ public static Integer[] toIntArray(String str) {
+ return toIntArray(",", str);
+ }
+
+ /**
+ * 转换为Integer数组
+ *
+ * @param split 分隔符
+ * @param str 被转换的值
+ * @return 结果
+ */
+ public static Integer[] toIntArray(String split, String str) {
+ if (StringUtils.isEmpty(str)) {
+ return new Integer[]{};
+ }
+ String[] arr = str.split(split);
+ final Integer[] ints = new Integer[arr.length];
+ for (int i = 0; i < arr.length; i++) {
+ final int v = toInt(arr[i], 0);
+ ints[i] = v;
+ }
+ return ints;
+ }
+
+ /**
+ * 转换为Integer集合
+ *
+ * @param str 结果被转换的值
+ * @return 结果
+ */
+ public static List toIntList(String str) {
+ return Arrays.asList(toIntArray(str));
+ }
+
+ /**
+ * 转换为Integer集合
+ *
+ * @param split 分隔符
+ * @param str 被转换的值
+ * @return 结果
+ */
+ public static List toIntList(String split, String str) {
+ return Arrays.asList(toIntArray(split, str));
+ }
+
+ /**
+ * 转换为Long数组
+ *
+ * @param str 被转换的值
+ * @return 结果
+ */
+ public static Long[] toLongArray(String str) {
+ return toLongArray(",", str);
+ }
+
+ /**
+ * 转换为Long数组
+ *
+ * @param split 分隔符
+ * @param str 被转换的值
+ * @return 结果
+ */
+ public static Long[] toLongArray(String split, String str) {
+ if (StringUtils.isEmpty(str)) {
+ return new Long[]{};
+ }
+ String[] arr = str.split(split);
+ final Long[] longs = new Long[arr.length];
+ for (int i = 0; i < arr.length; i++) {
+ final Long v = toLong(arr[i], 0);
+ longs[i] = v;
+ }
+ return longs;
+ }
+
+ /**
+ * 转换为Long集合
+ *
+ * @param str 结果被转换的值
+ * @return 结果
+ */
+ public static List toLongList(String str) {
+ return Arrays.asList(toLongArray(str));
+ }
+
+ /**
+ * 转换为Long集合
+ *
+ * @param split 分隔符
+ * @param str 被转换的值
+ * @return 结果
+ */
+ public static List toLongList(String split, String str) {
+ return Arrays.asList(toLongArray(split, str));
+ }
+
+ /**
+ * 强转string,并去掉多余空格
+ *
+ * @param str 字符串
+ * @return String
+ */
+ public static String toStr(Object str) {
+ return toStr(str, "");
+ }
+
+ /**
+ * 强转string,并去掉多余空格
+ *
+ * @param str 字符串
+ * @param defaultValue 默认值
+ * @return String
+ */
+ public static String toStr(Object str, String defaultValue) {
+ if (null == str) {
+ return defaultValue;
+ }
+ return String.valueOf(str);
+ }
+
+ /**
+ * 获取 Bean 的所有 get方法
+ *
+ * @param type 类
+ * @return PropertyDescriptor数组
+ */
+ public static PropertyDescriptor[] getBeanGetters(Class type) {
+ return getPropertiesHelper(type, true, false);
+ }
+
+ /**
+ * 获取 Bean 的所有 set方法
+ *
+ * @param type 类
+ * @return PropertyDescriptor数组
+ */
+ public static PropertyDescriptor[] getBeanSetters(Class type) {
+ return getPropertiesHelper(type, false, true);
+ }
+
+ private static PropertyDescriptor[] getPropertiesHelper(Class type, boolean read, boolean write) {
+ try {
+ PropertyDescriptor[] all = BeanUtils.getPropertyDescriptors(type);
+ if (read && write) {
+ return all;
+ } else {
+ List properties = new ArrayList<>(all.length);
+ for (PropertyDescriptor pd : all) {
+ if (read && pd.getReadMethod() != null) {
+ properties.add(pd);
+ } else if (write && pd.getWriteMethod() != null) {
+ properties.add(pd);
+ }
+ }
+ return properties.toArray(new PropertyDescriptor[0]);
+ }
+ } catch (BeansException ex) {
+ throw new CodeGenerationException(ex);
+ }
+ }
+
+ /**
+ * 日期减少时间量
+ *
+ * @param date 时间
+ * @param amount 时间量
+ * @return 设置后的时间
+ */
+ public static Date minus(Date date, TemporalAmount amount) {
+ Instant instant = date.toInstant();
+ return Date.from(instant.minus(amount));
+ }
+
+ /**
+ * 日期添加时间量
+ *
+ * @param date 时间
+ * @param amount 时间量
+ * @return 设置后的时间
+ */
+ public static Date plus(Date date, TemporalAmount amount) {
+ Instant instant = date.toInstant();
+ return Date.from(instant.plus(amount));
+ }
+
+ /**
+ * 添加天
+ *
+ * @param date 时间
+ * @param daysToAdd 添加的天数
+ * @return 设置后的时间
+ */
+ public static Date plusDays(Date date, long daysToAdd) {
+ return plus(date, Duration.ofDays(daysToAdd));
+ }
+
+
+ /**
+ * 减少天
+ *
+ * @param date 时间
+ * @param days 减少的天数
+ * @return 设置后的时间
+ */
+ public static Date minusDays(Date date, long days) {
+ return minus(date, Duration.ofDays(days));
+ }
+
+ /**
+ * 根据小时判断是否为上午、中午、下午
+ */
+ public static String getDuringDay(LocalDateTime localDateTime) {
+ int i = localDateTime.get(ChronoField.AMPM_OF_DAY);
+ return i == 0 ? "上午" : "下午";
+ }
+
+ /**
+ * 根据小时判断是否为上午、中午、下午
+ */
+ public static String getDuringDay(Date date) {
+ LocalDateTime localDateTime = fromDate(date);
+ return getDuringDay(localDateTime);
+ }
+
+ /**
+ * 转换成java8 时间
+ *
+ * @param date Date
+ * @return LocalDateTime
+ */
+ public static LocalDateTime fromDate(final Date date) {
+ return LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault());
+ }
+
+ /**
+ * 日期格式化:yyyy-MM-dd HH:mm:ss
+ *
+ * @param date 时间,
+ * @return 格式化后的时间 ,yyyy-MM-dd HH:mm:ss
+ */
+ public static String formatDate(Date date) {
+ return ConcurrentDateFormat.of(DateUtils.YYYY_MM_DD_HH_MM_SS).format(date);
+ }
+
+ /**
+ * 日期格式化:yyyy-MM-dd HH:mm:ss
+ *
+ * @param date 时间
+ * @return 格式化后的时间, yyyy-MM-dd HH:mm:ss
+ */
+ public static String formatDate(LocalDateTime date) {
+ return DateTimeFormatter.ofPattern(DateUtils.YYYY_MM_DD_HH_MM_SS).format(date);
+ }
+
+ /**
+ * 日期格式化
+ *
+ * @param date 时间
+ * @param pattern 格式
+ * @return 格式化后的时间
+ */
+ public static String formatDate(Date date, String pattern) {
+ return ConcurrentDateFormat.of(pattern).format(date);
+ }
+
+ /**
+ * 日期格式化
+ *
+ * @param date 时间
+ * @param pattern 格式
+ * @return 格式化后的时间
+ */
+ public static String formatDate(LocalDateTime date, String pattern) {
+ return DateTimeFormatter.ofPattern(pattern).format(date);
+ }
+
+ /**
+ * 日期时间格式化
+ *
+ * @param date 时间
+ * @return 格式化后的时间
+ */
+ public static String formatDateTime(Date date) {
+ return ConcurrentDateFormat.of(DateUtils.YYYY_MM_DD_HH_MM_SS).format(date);
+ }
+
+ /**
+ * 日期时间格式化
+ *
+ * @param date 时间
+ * @return 格式化后的时间
+ */
+ public static String formatDateTime(LocalDateTime date) {
+ return DateTimeFormatter.ofPattern(DateUtils.YYYY_MM_DD_HH_MM_SS).format(date);
+ }
+
+ /**
+ * 将字符串转换为时间
+ *
+ * @param dateStr 时间字符串
+ * @param pattern 表达式
+ * @return 时间
+ */
+ public static Date parse(String dateStr, String pattern) {
+ ConcurrentDateFormat format = ConcurrentDateFormat.of(pattern);
+ try {
+ return format.parse(dateStr);
+ } catch (ParseException e) {
+ throw ExceptionUtil.unchecked(e);
+ }
+ }
+
+ /**
+ * 将字符串转换为时间
+ *
+ * @param dateStr 时间字符串
+ * @param format ConcurrentDateFormat
+ * @return 时间
+ */
+ public static Date parse(String dateStr, ConcurrentDateFormat format) {
+ try {
+ return format.parse(dateStr);
+ } catch (ParseException e) {
+ throw ExceptionUtil.unchecked(e);
+ }
+ }
+
+ private static final String S_INT = "0123456789";
+ private static final String S_STR = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+ private static final String S_ALL = S_INT + S_STR;
+
+ /**
+ * 随机数生成
+ *
+ * @param count 字符长度
+ * @param randomType 随机数类别
+ * @return 随机数
+ */
+ public static String random(int count, RandomType randomType) {
+ if (count == 0) {
+ return "";
+ }
+ Assert.isTrue(count > 0, "Requested random string length " + count + " is less than 0.");
+ final ThreadLocalRandom random = ThreadLocalRandom.current();
+ char[] buffer = new char[count];
+ for (int i = 0; i < count; i++) {
+ if (RandomType.INT == randomType) {
+ buffer[i] = S_INT.charAt(random.nextInt(S_INT.length()));
+ } else if (RandomType.STRING == randomType) {
+ buffer[i] = S_STR.charAt(random.nextInt(S_STR.length()));
+ } else {
+ buffer[i] = S_ALL.charAt(random.nextInt(S_ALL.length()));
+ }
+ }
+ return new String(buffer);
+ }
+
+
+
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/func/IConstant.java b/ruoyi-common/src/main/java/com/ruoyi/common/func/IConstant.java
new file mode 100644
index 000000000..60a020f75
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/func/IConstant.java
@@ -0,0 +1,26 @@
+package com.ruoyi.common.func;
+
+public enum IConstant {
+ MINUS_ONE(-1),
+ ZERO(0),
+ ONE(1),
+ TWO(2),
+ THREE(3),
+ FOURTH(4),
+ FIFTH(5),
+ SIXTH(6),
+ SEVENTH(7),
+ EIGHTH(8),
+ NINTH(9),
+ TENTH(10);
+
+ private int value;
+
+ private IConstant(int value) {
+ this.value = value;
+ }
+
+ public int getValue() {
+ return this.value;
+ }
+ }
\ No newline at end of file
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/func/IdCardUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/func/IdCardUtil.java
new file mode 100644
index 000000000..0dcdba7bb
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/func/IdCardUtil.java
@@ -0,0 +1,262 @@
+package com.ruoyi.common.func;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import java.util.Hashtable;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * 身份证号码的格式:610821-20061222-612-X 由18位数字组成:前6位为地址码,第7至14位为出生日期码,第15至17位为顺序码,
+ * 第18位为校验码。检验码分别是0-10共11个数字,当检验码为“10”时,为了保证公民身份证号码18位,所以用“X”表示。虽然校验码为“X”不能更换,但若需全用数字表示,只需将18位公民身份号码转换成15位居民身份证号码,去掉第7至8位和最后1位3个数码。
+ * 当今的身份证号码有15位和18位之分。1985年我国实行居民身份证制度,当时签发的身份证号码是15位的,1999年签发的身份证由于年份的扩展(由两位变为四位)和末尾加了效验码,就成了18位。
+ * (1)前1、2位数字表示:所在省份的代码;
+ * (2)第3、4位数字表示:所在城市的代码;
+ * (3)第5、6位数字表示:所在区县的代码;
+ * (4)第7~14位数字表示:出生年、月、日;
+ * (5)第15、16位数字表示:所在地的派出所的代码;
+ * (6)第17位数字表示性别:奇数表示男性,偶数表示女性
+ * (7)第18位数字是校检码:根据一定算法生成
+ *
+ * ————————————————
+ * 版权声明:本文为CSDN博主「mazaiting」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
+ * 原文链接:https://blog.csdn.net/mazaiting/article/details/79707923=
+ */
+public class IdCardUtil {
+
+ private static final Logger logger = LoggerFactory.getLogger(IdCardUtil.class);
+ /**
+ * 身份证有效
+ */
+ private static final String VALIDITY = "该身份证有效!";
+ /**
+ * 位数不足
+ */
+ private static final String LACKDIGITS = "身份证号码长度应该为15位或18位。";
+ /**
+ * 最后一位应为数字
+ */
+ private static final String LASTOFNUMBER = "身份证15位号码都应为数字 ; 18位号码除最后一位外,都应为数字。";
+ /**
+ * 出生日期无效
+ */
+ private static final String INVALIDBIRTH = "身份证出生日期无效。";
+ /**
+ * 生日不在有效范围
+ */
+ private static final String INVALIDSCOPE = "身份证生日不在有效范围。";
+ /**
+ * 月份无效
+ */
+ private static final String INVALIDMONTH = "身份证月份无效";
+ /**
+ * 日期无效
+ */
+ private static final String INVALIDDAY = "身份证日期无效";
+ /**
+ * 身份证地区编码错误
+ */
+ private static final String CODINGERROR = "身份证地区编码错误。";
+ /**
+ * 身份证校验码无效
+ */
+ private static final String INVALIDCALIBRATION = "身份证校验码无效,不是合法的身份证号码";
+
+ /**
+ * 检验身份证号码是否符合规范
+ *
+ * @param IDStr 身份证号码
+ * @return 错误信息或成功信息
+ */
+ public static boolean validate(String IDStr) {
+ String tipMsg = VALIDITY;// 记录错误信息
+ String Ai = "";
+ // 判断号码的长度 15位或18位
+ if (IDStr.length() != 15 && IDStr.length() != 18) {
+ tipMsg = LACKDIGITS;
+ logger.error("{}:{}", IDStr, tipMsg);
+ return false;
+ }
+
+ // 18位身份证前17位位数字,如果是15位的身份证则所有号码都为数字
+ if (IDStr.length() == 18) Ai = IDStr.substring(0, 17);
+ if (IDStr.length() == 15) Ai = IDStr.substring(0, 6) + "19" + IDStr.substring(6, 15);
+ if (!isNumeric(Ai)) {
+ tipMsg = LASTOFNUMBER;
+ logger.error("{}:{}", IDStr, tipMsg);
+ return false;
+ }
+
+ // 判断出生年月是否有效
+ String strYear = Ai.substring(6, 10);// 年份
+ String strMonth = Ai.substring(10, 12);// 月份
+ String strDay = Ai.substring(12, 14);// 日期
+ if (!isDate(strYear + "-" + strMonth + "-" + strDay)) {
+ tipMsg = INVALIDBIRTH;
+ logger.error("{}:{}", IDStr, tipMsg);
+ return false;
+ }
+ GregorianCalendar gc = new GregorianCalendar();
+ SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd");
+ try {
+ if ((gc.get(Calendar.YEAR) - Integer.parseInt(strYear)) > 150
+ || (gc.getTime().getTime() - s.parse(strYear + "-" + strMonth + "-" + strDay).getTime()) < 0) {
+ tipMsg = INVALIDSCOPE;
+ logger.error("{}:{}", IDStr, tipMsg);
+ return false;
+ }
+ } catch (NumberFormatException | ParseException e) {
+ e.printStackTrace();
+ }
+ if (Integer.parseInt(strMonth) > 12 || Integer.parseInt(strMonth) == 0) {
+ tipMsg = INVALIDMONTH;
+ logger.error("{}:{}", IDStr, tipMsg);
+ return false;
+ }
+ if (Integer.parseInt(strDay) > 31 || Integer.parseInt(strDay) == 0) {
+ tipMsg = INVALIDDAY;
+ logger.error("{}:{}", IDStr, tipMsg);
+ return false;
+ }
+ // 判断地区码是否有效
+ Hashtable areaCode = getAreaCode();
+ // 如果身份证前两位的地区码不在Hashtable,则地区码有误
+ if (areaCode.get(Ai.substring(0, 2)) == null) {
+ tipMsg = CODINGERROR;
+ logger.error("{}:{}", IDStr, tipMsg);
+ return false;
+ }
+ if (!isVerifyCode(Ai, IDStr)) {
+ tipMsg = INVALIDCALIBRATION;
+ logger.error("{}:{}", IDStr, tipMsg);
+ return false;
+ }
+ //logger.debug("{}:{}", IDStr, tipMsg);
+ return true;
+ }
+
+ /*
+ * 判断第18位校验码是否正确 第18位校验码的计算方式:
+ * 1. 对前17位数字本体码加权求和 公式为:S = Sum(Ai * Wi), i =
+ * 0, ... , 16 其中Ai表示第i个位置上的身份证号码数字值,Wi表示第i位置上的加权因子,其各位对应的值依次为: 7 9 10 5 8 4
+ * 2 1 6 3 7 9 10 5 8 4 2
+ * 2. 用11对计算结果取模 Y = mod(S, 11)
+ * 3. 根据模的值得到对应的校验码
+ * 对应关系为: Y值: 0 1 2 3 4 5 6 7 8 9 10 校验码: 1 0 X 9 8 7 6 5 4 3 2
+ */
+ private static boolean isVerifyCode(String Ai, String IDStr) {
+ String[] verifyCode = {"1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"};
+ String[] Wi = {"7", "9", "10", "5", "8", "4", "2", "1", "6", "3", "7", "9", "10", "5", "8", "4", "2"};
+ int sum = 0;
+ for (int i = 0; i < 17; i++) {
+ sum = sum + Integer.parseInt(String.valueOf(Ai.charAt(i))) * Integer.parseInt(Wi[i]);
+ }
+ int modValue = sum % 11;
+ String strVerifyCode = verifyCode[modValue];
+ Ai = Ai + strVerifyCode;
+ if (IDStr.length() == 18) {
+ return Ai.equals(IDStr);
+ }
+ return true;
+ }
+
+ /**
+ * 将所有地址编码保存在一个Hashtable中
+ *
+ * @return Hashtable 对象
+ */
+
+ private static Hashtable getAreaCode() {
+ Hashtable hashtable = new Hashtable();
+ hashtable.put("11", "北京");
+ hashtable.put("12", "天津");
+ hashtable.put("13", "河北");
+ hashtable.put("14", "山西");
+ hashtable.put("15", "内蒙古");
+ hashtable.put("21", "辽宁");
+ hashtable.put("22", "吉林");
+ hashtable.put("23", "黑龙江");
+ hashtable.put("31", "上海");
+ hashtable.put("32", "江苏");
+ hashtable.put("33", "浙江");
+ hashtable.put("34", "安徽");
+ hashtable.put("35", "福建");
+ hashtable.put("36", "江西");
+ hashtable.put("37", "山东");
+ hashtable.put("41", "河南");
+ hashtable.put("42", "湖北");
+ hashtable.put("43", "湖南");
+ hashtable.put("44", "广东");
+ hashtable.put("45", "广西");
+ hashtable.put("46", "海南");
+ hashtable.put("50", "重庆");
+ hashtable.put("51", "四川");
+ hashtable.put("52", "贵州");
+ hashtable.put("53", "云南");
+ hashtable.put("54", "西藏");
+ hashtable.put("61", "陕西");
+ hashtable.put("62", "甘肃");
+ hashtable.put("63", "青海");
+ hashtable.put("64", "宁夏");
+ hashtable.put("65", "新疆");
+ hashtable.put("71", "台湾");
+ hashtable.put("81", "香港");
+ hashtable.put("82", "澳门");
+ hashtable.put("91", "国外");
+ return hashtable;
+ }
+
+ /**
+ * 判断字符串是否为数字,0-9重复0次或者多次
+ *
+ * @param strNum
+ * @return true, 符合; false, 不符合。
+ */
+ private static boolean isNumeric(String strNum) {
+ Pattern pattern = Pattern.compile("[0-9]*");
+ Matcher isNum = pattern.matcher(strNum);
+ return isNum.matches();
+ }
+
+ /**
+ * 功能:判断字符串出生日期是否符合正则表达式:包括年月日,闰年、平年和每月31天、30天和闰月的28天或者29天
+ *
+ * @param strDate
+ * @return true, 符合; false, 不符合。
+ */
+ public static boolean isDate(String strDate) {
+ Pattern pattern = Pattern.compile(
+ "^((\\d{2}(([02468][048])|([13579][26]))[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])))))|(\\d{2}(([02468][1235679])|([13579][01345789]))[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))?$");
+ Matcher m = pattern.matcher(strDate);
+ return m.matches();
+ }
+
+ /***
+ * 性别判断 可以根据身份证号码的第十七位判断性别,如果为奇数则为男性,偶数则为女性。
+ * @param IDStr 身份证
+ * @return 0:未知,1:男,2:女
+ */
+ public static Integer verifyGender(String IDStr) {
+ IDStr = IDStr.trim();
+ if (IDStr.length() == 15) {
+ if (Integer.parseInt(IDStr.substring(14, 15)) % 2 == 0) {
+ return 2;
+ } else {
+ return 1;
+ }
+ } else if (IDStr.length() == 18) {
+ if (Integer.parseInt(IDStr.substring(16).substring(0, 1)) % 2 == 0) {
+ return 2;
+ } else {
+ return 1;
+ }
+ } else {
+ return 0;
+ }
+ }
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/func/ObjectUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/func/ObjectUtil.java
new file mode 100644
index 000000000..4b8f6659c
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/func/ObjectUtil.java
@@ -0,0 +1,22 @@
+package com.ruoyi.common.func;
+
+import org.springframework.lang.Nullable;
+
+/**
+ * 对象工具类
+ *
+ * @author L.cm
+ */
+public class ObjectUtil extends org.springframework.util.ObjectUtils {
+
+ /**
+ * 判断元素不为空
+ *
+ * @param obj object
+ * @return boolean
+ */
+ public static boolean isNotEmpty(@Nullable Object obj) {
+ return !ObjectUtil.isEmpty(obj);
+ }
+
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/func/RandomType.java b/ruoyi-common/src/main/java/com/ruoyi/common/func/RandomType.java
new file mode 100644
index 000000000..744a28251
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/func/RandomType.java
@@ -0,0 +1,13 @@
+package com.ruoyi.common.func;
+
+/**
+ * 生成的随机数类型
+ *
+ * @author L.cm
+ */
+public enum RandomType {
+ /**
+ * INT STRING ALL
+ */
+ INT, STRING, ALL
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/func/StringPool.java b/ruoyi-common/src/main/java/com/ruoyi/common/func/StringPool.java
new file mode 100644
index 000000000..937ed9be8
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/func/StringPool.java
@@ -0,0 +1,74 @@
+package com.ruoyi.common.func;
+
+/**
+ * 静态 String 池
+ *
+ * @author L.cm
+ */
+public interface StringPool {
+
+ String AMPERSAND = "&";
+ String AND = "and";
+ String AT = "@";
+ String ASTERISK = "*";
+ String STAR = ASTERISK;
+ String SLASH = "/";
+ char BACK_SLASH = '\\';
+ String DOUBLE_SLASH = "#//";
+ String COLON = ":";
+ String COMMA = ",";
+ String DASH = "-";
+ String DOLLAR = "$";
+ String DOT = ".";
+ String EMPTY = "";
+ String EMPTY_JSON = "{}";
+ String EQUALS = "=";
+ String FALSE = "false";
+ String HASH = "#";
+ String HAT = "^";
+ String LEFT_BRACE = "{";
+ String LEFT_BRACKET = "(";
+ String LEFT_CHEV = "<";
+ String NEWLINE = "\n";
+ String N = "n";
+ String NO = "no";
+ String NULL = "null";
+ String OFF = "off";
+ String ON = "on";
+ String PERCENT = "%";
+ String PIPE = "|";
+ String PLUS = "+";
+ String QUESTION_MARK = "?";
+ String EXCLAMATION_MARK = "!";
+ String QUOTE = "\"";
+ String RETURN = "\r";
+ String TAB = "\t";
+ String RIGHT_BRACE = "}";
+ String RIGHT_BRACKET = ")";
+ String RIGHT_CHEV = ">";
+ String SEMICOLON = ";";
+ String SINGLE_QUOTE = "'";
+ String BACKTICK = "`";
+ String SPACE = " ";
+ String TILDA = "~";
+ String LEFT_SQ_BRACKET = "[";
+ String RIGHT_SQ_BRACKET = "]";
+ String TRUE = "true";
+ String UNDERSCORE = "_";
+ String UTF_8 = "UTF-8";
+ String GBK = "GBK";
+ String ISO_8859_1 = "ISO-8859-1";
+ String Y = "y";
+ String YES = "yes";
+ String ONE = "1";
+ String ZERO = "0";
+ String DOLLAR_LEFT_BRACE= "${";
+ char U_A = 'A';
+ char L_A = 'a';
+ char U_Z = 'Z';
+ char L_Z = 'z';
+ String UNKNOWN = "unknown";
+ String GET = "GET";
+ String POST = "POST";
+
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/func/support/BaseBeanCopier.java b/ruoyi-common/src/main/java/com/ruoyi/common/func/support/BaseBeanCopier.java
new file mode 100644
index 000000000..3aa41bcf1
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/func/support/BaseBeanCopier.java
@@ -0,0 +1,196 @@
+package com.ruoyi.common.func.support;
+
+import com.ruoyi.common.func.Func;
+import org.springframework.asm.ClassVisitor;
+import org.springframework.asm.Type;
+import org.springframework.cglib.core.*;
+
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Modifier;
+import java.security.ProtectionDomain;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * spring cglib 魔改
+ *
+ *
+ * 1. 支持链式 bean
+ * 2. 自定义的 BeanCopier 解决 spring boot 和 cglib ClassLoader classLoader 不一致的问题
+ *
+ *
+ * @author L.cm
+ */
+public abstract class BaseBeanCopier {
+ private static final BeanCopierKey KEY_FACTORY = (BeanCopierKey) KeyFactory.create(BeanCopierKey.class);
+ private static final Type CONVERTER = TypeUtils.parseType("org.springframework.cglib.core.Converter");
+ private static final Type BEAN_COPIER = TypeUtils.parseType(BaseBeanCopier.class.getName());
+ private static final Signature COPY = new Signature("copy", Type.VOID_TYPE, new Type[]{Constants.TYPE_OBJECT, Constants.TYPE_OBJECT, CONVERTER});
+ private static final Signature CONVERT = TypeUtils.parseSignature("Object convert(Object, Class, Object)");
+
+ interface BeanCopierKey {
+ /**
+ * 实例化
+ * @param source 源
+ * @param target 目标
+ * @param useConverter 是否使用转换
+ * @return
+ */
+ Object newInstance(String source, String target, boolean useConverter);
+ }
+
+ public static BaseBeanCopier create(Class source, Class target, boolean useConverter) {
+ return BaseBeanCopier.create(source, target, null, useConverter);
+ }
+
+ public static BaseBeanCopier create(Class source, Class target, ClassLoader classLoader, boolean useConverter) {
+ Generator gen;
+ if (classLoader == null) {
+ gen = new Generator();
+ } else {
+ gen = new Generator(classLoader);
+ }
+ gen.setSource(source);
+ gen.setTarget(target);
+ gen.setUseConverter(useConverter);
+ return gen.create();
+ }
+
+ /**
+ * 拷贝
+ * @param from 源
+ * @param to 目标
+ * @param converter 转换器
+ */
+ abstract public void copy(Object from, Object to, Converter converter);
+
+ public static class Generator extends AbstractClassGenerator {
+ private static final Source SOURCE = new Source(BaseBeanCopier.class.getName());
+ private final ClassLoader classLoader;
+ private Class source;
+ private Class target;
+ private boolean useConverter;
+
+ Generator() {
+ super(SOURCE);
+ this.classLoader = null;
+ }
+
+ Generator(ClassLoader classLoader) {
+ super(SOURCE);
+ this.classLoader = classLoader;
+ }
+
+ public void setSource(Class source) {
+ if (!Modifier.isPublic(source.getModifiers())) {
+ setNamePrefix(source.getName());
+ }
+ this.source = source;
+ }
+
+ public void setTarget(Class target) {
+ if (!Modifier.isPublic(target.getModifiers())) {
+ setNamePrefix(target.getName());
+ }
+
+ this.target = target;
+ }
+
+ public void setUseConverter(boolean useConverter) {
+ this.useConverter = useConverter;
+ }
+
+ @Override
+ protected ClassLoader getDefaultClassLoader() {
+ return target.getClassLoader();
+ }
+
+ @Override
+ protected ProtectionDomain getProtectionDomain() {
+ return ReflectUtils.getProtectionDomain(source);
+ }
+
+ public BaseBeanCopier create() {
+ Object key = KEY_FACTORY.newInstance(source.getName(), target.getName(), useConverter);
+ return (BaseBeanCopier) super.create(key);
+ }
+
+ @Override
+ public void generateClass(ClassVisitor v) {
+ Type sourceType = Type.getType(source);
+ Type targetType = Type.getType(target);
+ ClassEmitter ce = new ClassEmitter(v);
+ ce.begin_class(Constants.V1_2,
+ Constants.ACC_PUBLIC,
+ getClassName(),
+ BEAN_COPIER,
+ null,
+ Constants.SOURCE_FILE);
+
+ EmitUtils.null_constructor(ce);
+ CodeEmitter e = ce.begin_method(Constants.ACC_PUBLIC, COPY, null);
+
+ // 2018.12.27 by L.cm 支持链式 bean
+ PropertyDescriptor[] getters = Func.getBeanGetters(source);
+ PropertyDescriptor[] setters = Func.getBeanSetters(target);
+ Map names = new HashMap<>(16);
+ for (PropertyDescriptor getter : getters) {
+ names.put(getter.getName(), getter);
+ }
+
+ Local targetLocal = e.make_local();
+ Local sourceLocal = e.make_local();
+ e.load_arg(1);
+ e.checkcast(targetType);
+ e.store_local(targetLocal);
+ e.load_arg(0);
+ e.checkcast(sourceType);
+ e.store_local(sourceLocal);
+
+ for (int i = 0; i < setters.length; i++) {
+ PropertyDescriptor setter = setters[i];
+ PropertyDescriptor getter = (PropertyDescriptor) names.get(setter.getName());
+ if (getter != null) {
+ MethodInfo read = ReflectUtils.getMethodInfo(getter.getReadMethod());
+ MethodInfo write = ReflectUtils.getMethodInfo(setter.getWriteMethod());
+ if (useConverter) {
+ Type setterType = write.getSignature().getArgumentTypes()[0];
+ e.load_local(targetLocal);
+ e.load_arg(2);
+ e.load_local(sourceLocal);
+ e.invoke(read);
+ e.box(read.getSignature().getReturnType());
+ EmitUtils.load_class(e, setterType);
+ e.push(write.getSignature().getName());
+ e.invoke_interface(CONVERTER, CONVERT);
+ e.unbox_or_zero(setterType);
+ e.invoke(write);
+ } else if (compatible(getter, setter)) {
+ // 2018.12.27 by L.cm 支持链式 bean
+ e.load_local(targetLocal);
+ e.load_local(sourceLocal);
+ e.invoke(read);
+ e.invoke(write);
+ }
+ }
+ }
+ e.return_value();
+ e.end_method();
+ ce.end_class();
+ }
+
+ private static boolean compatible(PropertyDescriptor getter, PropertyDescriptor setter) {
+ return setter.getPropertyType().isAssignableFrom(getter.getPropertyType());
+ }
+
+ @Override
+ protected Object firstInstance(Class type) {
+ return ReflectUtils.newInstance(type);
+ }
+
+ @Override
+ protected Object nextInstance(Object instance) {
+ return instance;
+ }
+ }
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/func/support/BeanProperty.java b/ruoyi-common/src/main/java/com/ruoyi/common/func/support/BeanProperty.java
new file mode 100644
index 000000000..d1457b69d
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/func/support/BeanProperty.java
@@ -0,0 +1,16 @@
+package com.ruoyi.common.func.support;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * Bean属性
+ *
+ * @author Chill
+ */
+@Getter
+@AllArgsConstructor
+public class BeanProperty {
+ private final String name;
+ private final Class> type;
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/func/support/ConcurrentDateFormat.java b/ruoyi-common/src/main/java/com/ruoyi/common/func/support/ConcurrentDateFormat.java
new file mode 100644
index 000000000..ff40d8af6
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/func/support/ConcurrentDateFormat.java
@@ -0,0 +1,86 @@
+/**
+ * Copyright (c) 2018-2028, DreamLu 卢春梦 (qq596392912@gmail.com).
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.ruoyi.common.func.support;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Locale;
+import java.util.Queue;
+import java.util.TimeZone;
+import java.util.concurrent.ConcurrentLinkedQueue;
+
+/**
+ * 参考tomcat8中的并发DateFormat
+ *
+ * {@link SimpleDateFormat}的线程安全包装器。
+ * 不使用ThreadLocal,创建足够的SimpleDateFormat对象来满足并发性要求。
+ *
+ *
+ * @author L.cm
+ */
+public class ConcurrentDateFormat {
+ private final String format;
+ private final Locale locale;
+ private final TimeZone timezone;
+ private final Queue queue = new ConcurrentLinkedQueue<>();
+
+ private ConcurrentDateFormat(String format, Locale locale, TimeZone timezone) {
+ this.format = format;
+ this.locale = locale;
+ this.timezone = timezone;
+ SimpleDateFormat initial = createInstance();
+ queue.add(initial);
+ }
+
+ public static ConcurrentDateFormat of(String format) {
+ return new ConcurrentDateFormat(format, Locale.getDefault(), TimeZone.getDefault());
+ }
+
+ public static ConcurrentDateFormat of(String format, TimeZone timezone) {
+ return new ConcurrentDateFormat(format, Locale.getDefault(), timezone);
+ }
+
+ public static ConcurrentDateFormat of(String format, Locale locale, TimeZone timezone) {
+ return new ConcurrentDateFormat(format, locale, timezone);
+ }
+
+ public String format(Date date) {
+ SimpleDateFormat sdf = queue.poll();
+ if (sdf == null) {
+ sdf = createInstance();
+ }
+ String result = sdf.format(date);
+ queue.add(sdf);
+ return result;
+ }
+
+ public Date parse(String source) throws ParseException {
+ SimpleDateFormat sdf = queue.poll();
+ if (sdf == null) {
+ sdf = createInstance();
+ }
+ Date result = sdf.parse(source);
+ queue.add(sdf);
+ return result;
+ }
+
+ private SimpleDateFormat createInstance() {
+ SimpleDateFormat sdf = new SimpleDateFormat(format, locale);
+ sdf.setTimeZone(timezone);
+ return sdf;
+ }
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/func/support/FastStringWriter.java b/ruoyi-common/src/main/java/com/ruoyi/common/func/support/FastStringWriter.java
new file mode 100644
index 000000000..86b95f225
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/func/support/FastStringWriter.java
@@ -0,0 +1,103 @@
+package com.ruoyi.common.func.support;
+
+import com.ruoyi.common.func.StringPool;
+import org.springframework.lang.Nullable;
+
+import java.io.Writer;
+
+/**
+ * FastStringWriter
+ *
+ * @author L.cm
+ */
+public class FastStringWriter extends Writer {
+ private final StringBuilder builder;
+
+ public FastStringWriter() {
+ builder = new StringBuilder(64);
+ }
+
+ public FastStringWriter(final int capacity) {
+ if (capacity < 0) {
+ throw new IllegalArgumentException("Negative builderfer size");
+ }
+ builder = new StringBuilder(capacity);
+ }
+
+ public FastStringWriter(@Nullable final StringBuilder builder) {
+ this.builder = builder != null ? builder : new StringBuilder(64);
+ }
+
+ /**
+ * Gets the underlying StringBuilder.
+ *
+ * @return StringBuilder
+ */
+ public StringBuilder getBuilder() {
+ return builder;
+ }
+
+ @Override
+ public void write(int c) {
+ builder.append((char) c);
+ }
+
+ @Override
+ public void write(char[] cbuilder, int off, int len) {
+ if ((off < 0) || (off > cbuilder.length) || (len < 0) ||
+ ((off + len) > cbuilder.length) || ((off + len) < 0)) {
+ throw new IndexOutOfBoundsException();
+ } else if (len == 0) {
+ return;
+ }
+ builder.append(cbuilder, off, len);
+ }
+
+ @Override
+ public void write(String str) {
+ builder.append(str);
+ }
+
+ @Override
+ public void write(String str, int off, int len) {
+ builder.append(str.substring(off, off + len));
+ }
+
+ @Override
+ public FastStringWriter append(CharSequence csq) {
+ if (csq == null) {
+ write(StringPool.NULL);
+ } else {
+ write(csq.toString());
+ }
+ return this;
+ }
+
+ @Override
+ public FastStringWriter append(CharSequence csq, int start, int end) {
+ CharSequence cs = (csq == null ? StringPool.NULL : csq);
+ write(cs.subSequence(start, end).toString());
+ return this;
+ }
+
+ @Override
+ public FastStringWriter append(char c) {
+ write(c);
+ return this;
+ }
+
+ @Override
+ public String toString() {
+ return builder.toString();
+ }
+
+ @Override
+ public void flush() {
+ }
+
+ @Override
+ public void close() {
+ builder.setLength(0);
+ builder.trimToSize();
+ }
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/func/support/Kv.java b/ruoyi-common/src/main/java/com/ruoyi/common/func/support/Kv.java
new file mode 100644
index 000000000..d52815886
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/func/support/Kv.java
@@ -0,0 +1,190 @@
+package com.ruoyi.common.func.support;
+
+import com.ruoyi.common.func.Func;
+import org.springframework.util.LinkedCaseInsensitiveMap;
+
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.Date;
+import java.util.HashMap;
+
+/**
+ * 链式map
+ *
+ * @author Chill
+ */
+public class Kv extends LinkedCaseInsensitiveMap {
+
+
+ private Kv() {
+
+ }
+
+ /**
+ * 创建Kv
+ *
+ * @return Kv
+ */
+ public static Kv init() {
+ return new Kv();
+ }
+
+ public static HashMap newMap() {
+ return new HashMap(16);
+ }
+
+ /**
+ * 设置列
+ *
+ * @param attr 属性
+ * @param value 值
+ * @return 本身
+ */
+ public Kv set(String attr, Object value) {
+ this.put(attr, value);
+ return this;
+ }
+
+ /**
+ * 设置列,当键或值为null时忽略
+ *
+ * @param attr 属性
+ * @param value 值
+ * @return 本身
+ */
+ public Kv setIgnoreNull(String attr, Object value) {
+ if (null != attr && null != value) {
+ set(attr, value);
+ }
+ return this;
+ }
+
+ public Object getObj(String key) {
+ return super.get(key);
+ }
+
+ /**
+ * 获得特定类型值
+ *
+ * @param 值类型
+ * @param attr 字段名
+ * @param defaultValue 默认值
+ * @return 字段值
+ */
+ @SuppressWarnings("unchecked")
+ public T get(String attr, T defaultValue) {
+ final Object result = get(attr);
+ return (T) (result != null ? result : defaultValue);
+ }
+
+ /**
+ * 获得特定类型值
+ *
+ * @param attr 字段名
+ * @return 字段值
+ */
+ public String getStr(String attr) {
+ return Func.toStr(get(attr), null);
+ }
+
+ /**
+ * 获得特定类型值
+ *
+ * @param attr 字段名
+ * @return 字段值
+ */
+ public Integer getInt(String attr) {
+ return Func.toInt(get(attr), -1);
+ }
+
+ /**
+ * 获得特定类型值
+ *
+ * @param attr 字段名
+ * @return 字段值
+ */
+ public Long getLong(String attr) {
+ return Func.toLong(get(attr), -1L);
+ }
+
+ /**
+ * 获得特定类型值
+ *
+ * @param attr 字段名
+ * @return 字段值
+ */
+ public Float getFloat(String attr) {
+ return Func.toFloat(get(attr), null);
+ }
+
+ public Double getDouble(String attr) {
+ return Func.toDouble(get(attr), null);
+ }
+
+
+ /**
+ * 获得特定类型值
+ *
+ * @param attr 字段名
+ * @return 字段值
+ */
+ public Boolean getBool(String attr) {
+ return Func.toBoolean(get(attr), null);
+ }
+
+ /**
+ * 获得特定类型值
+ *
+ * @param attr 字段名
+ * @return 字段值
+ */
+ public byte[] getBytes(String attr) {
+ return get(attr, null);
+ }
+
+ /**
+ * 获得特定类型值
+ *
+ * @param attr 字段名
+ * @return 字段值
+ */
+ public Date getDate(String attr) {
+ return get(attr, null);
+ }
+
+ /**
+ * 获得特定类型值
+ *
+ * @param attr 字段名
+ * @return 字段值
+ */
+ public Time getTime(String attr) {
+ return get(attr, null);
+ }
+
+ /**
+ * 获得特定类型值
+ *
+ * @param attr 字段名
+ * @return 字段值
+ */
+ public Timestamp getTimestamp(String attr) {
+ return get(attr, null);
+ }
+
+ /**
+ * 获得特定类型值
+ *
+ * @param attr 字段名
+ * @return 字段值
+ */
+ public Number getNumber(String attr) {
+ return get(attr, null);
+ }
+
+ @Override
+ public Kv clone() {
+ return (Kv) super.clone();
+ }
+
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/mappers/RuoYiBaseMapper.java b/ruoyi-common/src/main/java/com/ruoyi/common/mappers/RuoYiBaseMapper.java
new file mode 100644
index 000000000..bea1fde71
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/mappers/RuoYiBaseMapper.java
@@ -0,0 +1,16 @@
+package com.ruoyi.common.mappers;
+
+
+import com.ruoyi.common.core.domain.BaseEntity;
+import tk.mybatis.mapper.common.IdsMapper;
+import tk.mybatis.mapper.common.Mapper;
+import tk.mybatis.mapper.common.MySqlMapper;
+import tk.mybatis.mapper.common.special.InsertListMapper;
+
+/**
+ * 通用Mapper继承Mapper、MySqlMapper
+ * @param
+ */
+public interface RuoYiBaseMapper extends Mapper, MySqlMapper, IdsMapper, InsertListMapper {
+
+}
\ No newline at end of file
diff --git a/ruoyi-dependencies-bom/pom.xml b/ruoyi-dependencies-bom/pom.xml
new file mode 100644
index 000000000..f9a7f8c77
--- /dev/null
+++ b/ruoyi-dependencies-bom/pom.xml
@@ -0,0 +1,137 @@
+
+
+ 4.0.0
+
+ com.ruoyi
+ ruoyi-dependencies-bom
+ 4.4.0
+ pom
+ http://www.ruoyi.vip
+ ${project.artifactId}
+ RuoYi dependencies BOM
+
+
+ 4.4.0
+ UTF-8
+ UTF-8
+ 1.8
+ 2.0.3
+
+
+
+
+
+
+ com.ruoyi
+ ruoyi-his
+ ${ruoyi.version}
+
+
+
+ com.bending.core
+ bending-his-core
+ 1.0.5-SNAPSHOT
+
+
+
+ com.google.code.findbugs
+ annotations
+ 3.0.1
+
+
+
+ org.mybatis.spring.boot
+ mybatis-spring-boot-starter
+ 2.1.3
+
+
+
+ tk.mybatis
+ mapper
+ 4.1.5
+
+
+
+ io.swagger
+ swagger-models
+ 1.5.21
+ compile
+
+
+ io.swagger
+ swagger-annotations
+ 1.5.21
+ compile
+
+
+ org.projectlombok
+ lombok
+ 1.18.12
+
+
+
+ com.github.xiaoymin
+ knife4j-spring-boot-starter
+ ${knife4j.version}
+
+
+ com.github.xiaoymin
+ knife4j-spring-ui
+ ${knife4j.version}
+
+
+
+ io.zipkin.brave
+ brave-bom
+ 5.9.1
+ pom
+ import
+
+
+
+
+
+
+
+
+
+
+ nexus
+ maven-releases
+ http://nexus.liudebin.cn/repository/maven-releases/
+
+
+ snapshots
+ maven-snapshots
+ http://nexus.liudebin.cn/repository/maven-snapshots/
+
+
+
+
+
+ public
+ aliyun nexus
+ http://maven.aliyun.com/nexus/content/groups/public/
+
+ true
+
+
+
+
+
+
+ public
+ aliyun nexus
+ http://maven.aliyun.com/nexus/content/groups/public/
+
+ true
+
+
+ false
+
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ApplicationConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ApplicationConfig.java
index b6b0e88c6..b3a9e6ccb 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ApplicationConfig.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ApplicationConfig.java
@@ -1,6 +1,6 @@
package com.ruoyi.framework.config;
-import org.mybatis.spring.annotation.MapperScan;
+import tk.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
@@ -13,6 +13,7 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy;
// 表示通过aop框架暴露该代理对象,AopContext能够访问
@EnableAspectJAutoProxy(exposeProxy = true)
// 指定要扫描的Mapper类的包的路径
+//@MapperScan("com.ruoyi.**.mapper")
@MapperScan("com.ruoyi.**.mapper")
public class ApplicationConfig
{
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/HisConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/HisConfig.java
new file mode 100644
index 000000000..ed392e2c8
--- /dev/null
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/HisConfig.java
@@ -0,0 +1,15 @@
+package com.ruoyi.framework.config;
+
+import com.bending.core.props.HisClientProperties;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * HIS客户端配置
+ */
+@Configuration
+@EnableConfigurationProperties({HisClientProperties.class})
+@ComponentScan(basePackages = "com.bending.core")
+public class HisConfig {
+}
diff --git a/ruoyi-generator/src/main/resources/generator.yml b/ruoyi-generator/src/main/resources/generator.yml
index f3792cdc6..9caf8a68f 100644
--- a/ruoyi-generator/src/main/resources/generator.yml
+++ b/ruoyi-generator/src/main/resources/generator.yml
@@ -2,10 +2,10 @@
# 代码生成
gen:
# 作者
- author: ruoyi
+ author: bend
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
- packageName: com.ruoyi.system
+ packageName: com.ruoyi.his
# 自动去除表前缀,默认是false
- autoRemovePre: false
+ autoRemovePre: true
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
- tablePrefix: sys_
\ No newline at end of file
+ tablePrefix: sys_,bend_,his_
\ No newline at end of file
diff --git a/ruoyi-generator/src/main/resources/vm/java/domain.java.vm b/ruoyi-generator/src/main/resources/vm/java/domain.java.vm
index a9d18f097..965f23552 100644
--- a/ruoyi-generator/src/main/resources/vm/java/domain.java.vm
+++ b/ruoyi-generator/src/main/resources/vm/java/domain.java.vm
@@ -3,14 +3,17 @@ package ${packageName}.domain;
#foreach ($import in $importList)
import ${import};
#end
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
#if($table.crud || $table.sub)
import com.ruoyi.common.core.domain.BaseEntity;
#elseif($table.tree)
import com.ruoyi.common.core.domain.TreeEntity;
#end
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import javax.persistence.Table;
/**
* ${functionName}对象 ${tableName}
@@ -18,6 +21,10 @@ import com.ruoyi.common.core.domain.TreeEntity;
* @author ${author}
* @date ${datetime}
*/
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel(value = "${functionName}")
+@Table(name = "${tableName}")
#if($table.crud || $table.sub)
#set($Entity="BaseEntity")
#elseif($table.tree)
@@ -30,6 +37,7 @@ public class ${ClassName} extends ${Entity}
#foreach ($column in $columns)
#if(!$table.isSuperColumn($column.javaField))
/** $column.columnComment */
+ @ApiModelProperty(notes = "$column.columnComment")
#if($column.list)
#set($parentheseIndex=$column.columnComment.indexOf("("))
#if($parentheseIndex != -1)
@@ -51,54 +59,8 @@ public class ${ClassName} extends ${Entity}
#end
#if($table.sub)
/** $table.subTable.functionName信息 */
+ @ApiModelProperty(notes = "$table.subTable.functionName信息")
private List<${subClassName}> ${subclassName}List;
#end
-#foreach ($column in $columns)
-#if(!$table.isSuperColumn($column.javaField))
-#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
-#set($AttrName=$column.javaField)
-#else
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-#end
- public void set${AttrName}($column.javaType $column.javaField)
- {
- this.$column.javaField = $column.javaField;
- }
-
- public $column.javaType get${AttrName}()
- {
- return $column.javaField;
- }
-#end
-#end
-
-#if($table.sub)
- public List<${subClassName}> get${subClassName}List()
- {
- return ${subclassName}List;
- }
-
- public void set${subClassName}List(List<${subClassName}> ${subclassName}List)
- {
- this.${subclassName}List = ${subclassName}List;
- }
-
-#end
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-#foreach ($column in $columns)
-#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
-#set($AttrName=$column.javaField)
-#else
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-#end
- .append("${column.javaField}", get${AttrName}())
-#end
-#if($table.sub)
- .append("${subclassName}List", get${subClassName}List())
-#end
- .toString();
- }
}
diff --git a/ruoyi-generator/src/main/resources/vm/java/mapper.java.vm b/ruoyi-generator/src/main/resources/vm/java/mapper.java.vm
index d25ec18cb..647d7750a 100644
--- a/ruoyi-generator/src/main/resources/vm/java/mapper.java.vm
+++ b/ruoyi-generator/src/main/resources/vm/java/mapper.java.vm
@@ -1,10 +1,11 @@
package ${packageName}.mapper;
-import java.util.List;
+import com.ruoyi.common.mappers.RuoYiBaseMapper;
import ${packageName}.domain.${ClassName};
#if($table.sub)
import ${packageName}.domain.${subClassName};
#end
+import java.util.List;
/**
* ${functionName}Mapper接口
@@ -12,7 +13,7 @@ import ${packageName}.domain.${subClassName};
* @author ${author}
* @date ${datetime}
*/
-public interface ${ClassName}Mapper
+public interface ${ClassName}Mapper extends RuoYiBaseMapper<${ClassName}>
{
/**
* 查询${functionName}
@@ -66,7 +67,7 @@ public interface ${ClassName}Mapper
/**
* 批量删除${subTable.functionName}
*
- * @param customerIds 需要删除的数据ID
+ * @param ${pkColumn.javaField}s 需要删除的数据ID
* @return 结果
*/
public int delete${subClassName}By${subTableFkClassName}s(String[] ${pkColumn.javaField}s);
@@ -83,7 +84,7 @@ public interface ${ClassName}Mapper
/**
* 通过${functionName}ID删除${subTable.functionName}信息
*
- * @param roleId 角色ID
+ * @param ${pkColumn.javaField} ${functionName}ID
* @return 结果
*/
public int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField});
diff --git a/ruoyi-generator/src/main/resources/vm/java/sub-domain.java.vm b/ruoyi-generator/src/main/resources/vm/java/sub-domain.java.vm
index 3539474cc..b438607f5 100644
--- a/ruoyi-generator/src/main/resources/vm/java/sub-domain.java.vm
+++ b/ruoyi-generator/src/main/resources/vm/java/sub-domain.java.vm
@@ -3,10 +3,13 @@ package ${packageName}.domain;
#foreach ($import in $subImportList)
import ${import};
#end
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import javax.persistence.Table;
/**
* ${subTable.functionName}对象 ${subTableName}
@@ -14,6 +17,10 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author ${author}
* @date ${datetime}
*/
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel(value = "${functionName}")
+@Table(name = "${subTableName}")
public class ${subClassName} extends BaseEntity
{
private static final long serialVersionUID = 1L;
@@ -21,6 +28,7 @@ public class ${subClassName} extends BaseEntity
#foreach ($column in $subTable.columns)
#if(!$table.isSuperColumn($column.javaField))
/** $column.columnComment */
+ @ApiModelProperty(notes = "$column.columnComment")
#if($column.list)
#set($parentheseIndex=$column.columnComment.indexOf("("))
#if($parentheseIndex != -1)
@@ -40,36 +48,4 @@ public class ${subClassName} extends BaseEntity
#end
#end
-#foreach ($column in $subTable.columns)
-#if(!$table.isSuperColumn($column.javaField))
-#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
-#set($AttrName=$column.javaField)
-#else
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-#end
- public void set${AttrName}($column.javaType $column.javaField)
- {
- this.$column.javaField = $column.javaField;
- }
-
- public $column.javaType get${AttrName}()
- {
- return $column.javaField;
- }
-#end
-#end
-
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-#foreach ($column in $subTable.columns)
-#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
-#set($AttrName=$column.javaField)
-#else
-#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
-#end
- .append("${column.javaField}", get${AttrName}())
-#end
- .toString();
- }
}
diff --git a/ruoyi-his/pom.xml b/ruoyi-his/pom.xml
new file mode 100644
index 000000000..4d5507966
--- /dev/null
+++ b/ruoyi-his/pom.xml
@@ -0,0 +1,37 @@
+
+
+
+ ruoyi
+ com.ruoyi
+ 4.4.0
+
+ 4.0.0
+
+ ruoyi-his
+
+
+ HIS 系统模块
+
+
+
+
+
+ com.ruoyi
+ ruoyi-common
+
+
+
+ com.ruoyi
+ ruoyi-framework
+
+
+
+ com.bending.core
+ bending-his-core
+
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/controller/AgreementController.java b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/AgreementController.java
new file mode 100644
index 000000000..fbdd74442
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/AgreementController.java
@@ -0,0 +1,132 @@
+package com.ruoyi.bend.controller;
+
+import java.util.List;
+
+import com.ruoyi.framework.util.ShiroUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.bend.domain.Agreement;
+import com.ruoyi.bend.service.IAgreementService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 协议管理Controller
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+@Controller
+@RequestMapping("/bend/agreement")
+public class AgreementController extends BaseController
+{
+ private String prefix = "bend/agreement";
+
+ @Autowired
+ private IAgreementService agreementService;
+
+ @RequiresPermissions("bend:agreement:view")
+ @GetMapping()
+ public String agreement()
+ {
+ return prefix + "/agreement";
+ }
+
+ /**
+ * 查询协议管理列表
+ */
+ @RequiresPermissions("bend:agreement:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(Agreement agreement)
+ {
+ startPage();
+ List list = agreementService.selectAgreementList(agreement);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出协议管理列表
+ */
+ @RequiresPermissions("bend:agreement:export")
+ @Log(title = "协议管理", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(Agreement agreement)
+ {
+ List list = agreementService.selectAgreementList(agreement);
+ ExcelUtil util = new ExcelUtil(Agreement.class);
+ return util.exportExcel(list, "agreement");
+ }
+
+ /**
+ * 新增协议管理
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存协议管理
+ */
+ @RequiresPermissions("bend:agreement:add")
+ @Log(title = "协议管理", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(Agreement agreement)
+ {
+ String operName = ShiroUtils.getSysUser().getLoginName();
+ agreement.setCreateBy(operName);
+ return toAjax(agreementService.insertAgreement(agreement));
+ }
+
+ /**
+ * 修改协议管理
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ Agreement agreement = agreementService.selectAgreementById(id);
+ mmap.put("agreement", agreement);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存协议管理
+ */
+ @RequiresPermissions("bend:agreement:edit")
+ @Log(title = "协议管理", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(Agreement agreement)
+ {
+ String operName = ShiroUtils.getSysUser().getLoginName();
+ agreement.setCreateBy(operName);
+ return toAjax(agreementService.updateAgreement(agreement));
+ }
+
+ /**
+ * 删除协议管理
+ */
+ @RequiresPermissions("bend:agreement:remove")
+ @Log(title = "协议管理", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(agreementService.deleteAgreementByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/controller/ArticleController.java b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/ArticleController.java
new file mode 100644
index 000000000..bde5b7e29
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/ArticleController.java
@@ -0,0 +1,164 @@
+package com.ruoyi.bend.controller;
+
+import com.ruoyi.bend.domain.Article;
+import com.ruoyi.bend.service.IArticleService;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.framework.util.ShiroUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 内容管理Controller
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+@Controller
+@RequestMapping("/bend/article")
+public class ArticleController extends BaseController
+{
+ private String prefix = "bend/article";
+
+ @Autowired
+ private IArticleService articleService;
+
+ @RequiresPermissions("bend:article:view")
+ @GetMapping()
+ public String article()
+ {
+ return prefix + "/article";
+ }
+
+ /**
+ * 查询内容管理列表
+ */
+ @RequiresPermissions("bend:article:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(Article article)
+ {
+ startPage();
+ List list = articleService.selectArticleList(article);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出内容管理列表
+ */
+ @RequiresPermissions("bend:article:export")
+ @Log(title = "内容管理", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(Article article)
+ {
+ List list = articleService.selectArticleList(article);
+ ExcelUtil util = new ExcelUtil(Article.class);
+ return util.exportExcel(list, "article");
+ }
+
+ /**
+ * 草稿箱 页面
+ */
+ @RequiresPermissions("bend:article:view")
+ @GetMapping("/draft")
+ public String draftArticle(@RequestParam(value = "articleStatus")Integer articleStatus, ModelMap mmap)
+ {
+ mmap.put("articleStatus", articleStatus);
+ return prefix + "/draft";
+ }
+
+ /**
+ * 查询草稿箱内容列表
+ * @param article 内容
+ * @return 列表
+ */
+ @RequiresPermissions("bend:article:draft")
+ @PostMapping("/draft/list")
+ @ResponseBody
+ public TableDataInfo draftList(Article article)
+ {
+ startPage();
+ List list = articleService.selectArticleList(article);
+ return getDataTable(list);
+ }
+
+
+ /**
+ * 新增内容管理
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存内容管理
+ */
+ @RequiresPermissions("bend:article:add")
+ @Log(title = "内容管理", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(Article article)
+ {
+ //根据文章发布状态(文章状态(0草稿 1正常 2删除)),添加额外数据
+ if(article.getArticleStatus().equals(1)){
+ article.setReleaseTime(DateUtils.getNowDate());
+ }
+ String operName = ShiroUtils.getSysUser().getLoginName();
+ article.setCreateBy(operName);
+ return toAjax(articleService.insertArticle(article));
+ }
+
+ /**
+ * 修改内容管理
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ Article article = articleService.selectArticleById(id);
+ mmap.put("article", article);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存内容管理
+ */
+ @RequiresPermissions("bend:article:edit")
+ @Log(title = "内容管理", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(Article article)
+ {
+ //根据文章发布状态(文章状态(0草稿 1正常 2删除)),添加额外数据
+ if(article.getArticleStatus().equals(1)){
+ article.setReleaseTime(DateUtils.getNowDate());
+ }
+ String operName = ShiroUtils.getSysUser().getLoginName();
+ article.setCreateBy(operName);
+ return toAjax(articleService.updateArticle(article));
+ }
+
+ /**
+ * 删除内容管理
+ */
+ @RequiresPermissions("bend:article:remove")
+ @Log(title = "内容管理", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(articleService.deleteArticleByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/controller/BannerController.java b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/BannerController.java
new file mode 100644
index 000000000..3fa5182f2
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/BannerController.java
@@ -0,0 +1,126 @@
+package com.ruoyi.bend.controller;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.bend.domain.Banner;
+import com.ruoyi.bend.service.IBannerService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 首页管理Controller
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+@Controller
+@RequestMapping("/bend/banner")
+public class BannerController extends BaseController
+{
+ private String prefix = "bend/banner";
+
+ @Autowired
+ private IBannerService bannerService;
+
+ @RequiresPermissions("bend:banner:view")
+ @GetMapping()
+ public String banner()
+ {
+ return prefix + "/banner";
+ }
+
+ /**
+ * 查询首页管理列表
+ */
+ @RequiresPermissions("bend:banner:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(Banner banner)
+ {
+ startPage();
+ List list = bannerService.selectBannerList(banner);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出首页管理列表
+ */
+ @RequiresPermissions("bend:banner:export")
+ @Log(title = "首页管理", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(Banner banner)
+ {
+ List list = bannerService.selectBannerList(banner);
+ ExcelUtil util = new ExcelUtil(Banner.class);
+ return util.exportExcel(list, "banner");
+ }
+
+ /**
+ * 新增首页管理
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存首页管理
+ */
+ @RequiresPermissions("bend:banner:add")
+ @Log(title = "首页管理", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(Banner banner)
+ {
+ return toAjax(bannerService.insertBanner(banner));
+ }
+
+ /**
+ * 修改首页管理
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ Banner banner = bannerService.selectBannerById(id);
+ mmap.put("banner", banner);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存首页管理
+ */
+ @RequiresPermissions("bend:banner:edit")
+ @Log(title = "首页管理", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(Banner banner)
+ {
+ return toAjax(bannerService.updateBanner(banner));
+ }
+
+ /**
+ * 删除首页管理
+ */
+ @RequiresPermissions("bend:banner:remove")
+ @Log(title = "首页管理", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(bannerService.deleteBannerByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/controller/MemberController.java b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/MemberController.java
new file mode 100644
index 000000000..516897f2a
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/MemberController.java
@@ -0,0 +1,126 @@
+package com.ruoyi.bend.controller;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.bend.domain.Member;
+import com.ruoyi.bend.service.IMemberService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 会员列表Controller
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+@Controller
+@RequestMapping("/bend/member")
+public class MemberController extends BaseController
+{
+ private String prefix = "bend/member";
+
+ @Autowired
+ private IMemberService memberService;
+
+ @RequiresPermissions("bend:member:view")
+ @GetMapping()
+ public String member()
+ {
+ return prefix + "/member";
+ }
+
+ /**
+ * 查询会员列表列表
+ */
+ @RequiresPermissions("bend:member:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(Member member)
+ {
+ startPage();
+ List list = memberService.selectMemberList(member);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出会员列表列表
+ */
+ @RequiresPermissions("bend:member:export")
+ @Log(title = "会员列表", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(Member member)
+ {
+ List list = memberService.selectMemberList(member);
+ ExcelUtil util = new ExcelUtil(Member.class);
+ return util.exportExcel(list, "member");
+ }
+
+ /**
+ * 新增会员列表
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存会员列表
+ */
+ @RequiresPermissions("bend:member:add")
+ @Log(title = "会员列表", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(Member member)
+ {
+ return toAjax(memberService.insertMember(member));
+ }
+
+ /**
+ * 修改会员列表
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ Member member = memberService.selectMemberById(id);
+ mmap.put("member", member);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存会员列表
+ */
+ @RequiresPermissions("bend:member:edit")
+ @Log(title = "会员列表", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(Member member)
+ {
+ return toAjax(memberService.updateMember(member));
+ }
+
+ /**
+ * 删除会员列表
+ */
+ @RequiresPermissions("bend:member:remove")
+ @Log(title = "会员列表", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(memberService.deleteMemberByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/controller/MessageCodeController.java b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/MessageCodeController.java
new file mode 100644
index 000000000..d2f405826
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/MessageCodeController.java
@@ -0,0 +1,126 @@
+package com.ruoyi.bend.controller;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.bend.domain.MessageCode;
+import com.ruoyi.bend.service.IMessageCodeService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 短信管理Controller
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+@Controller
+@RequestMapping("/bend/messageCode")
+public class MessageCodeController extends BaseController
+{
+ private String prefix = "bend/messageCode";
+
+ @Autowired
+ private IMessageCodeService messageCodeService;
+
+ @RequiresPermissions("bend:messageCode:view")
+ @GetMapping()
+ public String messageCode()
+ {
+ return prefix + "/messageCode";
+ }
+
+ /**
+ * 查询短信管理列表
+ */
+ @RequiresPermissions("bend:messageCode:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(MessageCode messageCode)
+ {
+ startPage();
+ List list = messageCodeService.selectMessageCodeList(messageCode);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出短信管理列表
+ */
+ @RequiresPermissions("bend:messageCode:export")
+ @Log(title = "短信管理", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(MessageCode messageCode)
+ {
+ List list = messageCodeService.selectMessageCodeList(messageCode);
+ ExcelUtil util = new ExcelUtil(MessageCode.class);
+ return util.exportExcel(list, "messageCode");
+ }
+
+ /**
+ * 新增短信管理
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存短信管理
+ */
+ @RequiresPermissions("bend:messageCode:add")
+ @Log(title = "短信管理", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(MessageCode messageCode)
+ {
+ return toAjax(messageCodeService.insertMessageCode(messageCode));
+ }
+
+ /**
+ * 修改短信管理
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ MessageCode messageCode = messageCodeService.selectMessageCodeById(id);
+ mmap.put("messageCode", messageCode);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存短信管理
+ */
+ @RequiresPermissions("bend:messageCode:edit")
+ @Log(title = "短信管理", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(MessageCode messageCode)
+ {
+ return toAjax(messageCodeService.updateMessageCode(messageCode));
+ }
+
+ /**
+ * 删除短信管理
+ */
+ @RequiresPermissions("bend:messageCode:remove")
+ @Log(title = "短信管理", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(messageCodeService.deleteMessageCodeByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/controller/PatientListController.java b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/PatientListController.java
new file mode 100644
index 000000000..9cf4d9834
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/PatientListController.java
@@ -0,0 +1,126 @@
+package com.ruoyi.bend.controller;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.bend.domain.PatientList;
+import com.ruoyi.bend.service.IPatientListService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 就诊人列表Controller
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+@Controller
+@RequestMapping("/bend/patientList")
+public class PatientListController extends BaseController
+{
+ private String prefix = "bend/patientList";
+
+ @Autowired
+ private IPatientListService patientListService;
+
+ @RequiresPermissions("bend:patientList:view")
+ @GetMapping()
+ public String patientList()
+ {
+ return prefix + "/patientList";
+ }
+
+ /**
+ * 查询就诊人列表列表
+ */
+ @RequiresPermissions("bend:patientList:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(PatientList patientList)
+ {
+ startPage();
+ List list = patientListService.selectPatientListList(patientList);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出就诊人列表列表
+ */
+ @RequiresPermissions("bend:patientList:export")
+ @Log(title = "就诊人列表", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(PatientList patientList)
+ {
+ List list = patientListService.selectPatientListList(patientList);
+ ExcelUtil util = new ExcelUtil(PatientList.class);
+ return util.exportExcel(list, "patientList");
+ }
+
+ /**
+ * 新增就诊人列表
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存就诊人列表
+ */
+ @RequiresPermissions("bend:patientList:add")
+ @Log(title = "就诊人列表", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(PatientList patientList)
+ {
+ return toAjax(patientListService.insertPatientList(patientList));
+ }
+
+ /**
+ * 修改就诊人列表
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ PatientList patientList = patientListService.selectPatientListById(id);
+ mmap.put("patientList", patientList);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存就诊人列表
+ */
+ @RequiresPermissions("bend:patientList:edit")
+ @Log(title = "就诊人列表", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(PatientList patientList)
+ {
+ return toAjax(patientListService.updatePatientList(patientList));
+ }
+
+ /**
+ * 删除就诊人列表
+ */
+ @RequiresPermissions("bend:patientList:remove")
+ @Log(title = "就诊人列表", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(patientListService.deletePatientListByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/controller/ScrcuOfflineOrdersController.java b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/ScrcuOfflineOrdersController.java
new file mode 100644
index 000000000..ec1e39e0e
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/ScrcuOfflineOrdersController.java
@@ -0,0 +1,126 @@
+package com.ruoyi.bend.controller;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.bend.domain.ScrcuOfflineOrders;
+import com.ruoyi.bend.service.IScrcuOfflineOrdersService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 线下订单Controller
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+@Controller
+@RequestMapping("/bend/offlineOrders")
+public class ScrcuOfflineOrdersController extends BaseController
+{
+ private String prefix = "bend/offlineOrders";
+
+ @Autowired
+ private IScrcuOfflineOrdersService scrcuOfflineOrdersService;
+
+ @RequiresPermissions("bend:offlineOrders:view")
+ @GetMapping()
+ public String offlineOrders()
+ {
+ return prefix + "/offlineOrders";
+ }
+
+ /**
+ * 查询线下订单列表
+ */
+ @RequiresPermissions("bend:offlineOrders:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(ScrcuOfflineOrders scrcuOfflineOrders)
+ {
+ startPage();
+ List list = scrcuOfflineOrdersService.selectScrcuOfflineOrdersList(scrcuOfflineOrders);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出线下订单列表
+ */
+ @RequiresPermissions("bend:offlineOrders:export")
+ @Log(title = "线下订单", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(ScrcuOfflineOrders scrcuOfflineOrders)
+ {
+ List list = scrcuOfflineOrdersService.selectScrcuOfflineOrdersList(scrcuOfflineOrders);
+ ExcelUtil util = new ExcelUtil(ScrcuOfflineOrders.class);
+ return util.exportExcel(list, "offlineOrders");
+ }
+
+ /**
+ * 新增线下订单
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存线下订单
+ */
+ @RequiresPermissions("bend:offlineOrders:add")
+ @Log(title = "线下订单", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(ScrcuOfflineOrders scrcuOfflineOrders)
+ {
+ return toAjax(scrcuOfflineOrdersService.insertScrcuOfflineOrders(scrcuOfflineOrders));
+ }
+
+ /**
+ * 修改线下订单
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ ScrcuOfflineOrders scrcuOfflineOrders = scrcuOfflineOrdersService.selectScrcuOfflineOrdersById(id);
+ mmap.put("scrcuOfflineOrders", scrcuOfflineOrders);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存线下订单
+ */
+ @RequiresPermissions("bend:offlineOrders:edit")
+ @Log(title = "线下订单", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(ScrcuOfflineOrders scrcuOfflineOrders)
+ {
+ return toAjax(scrcuOfflineOrdersService.updateScrcuOfflineOrders(scrcuOfflineOrders));
+ }
+
+ /**
+ * 删除线下订单
+ */
+ @RequiresPermissions("bend:offlineOrders:remove")
+ @Log(title = "线下订单", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(scrcuOfflineOrdersService.deleteScrcuOfflineOrdersByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/controller/ScrcuOfflineRefundOrdersController.java b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/ScrcuOfflineRefundOrdersController.java
new file mode 100644
index 000000000..ea6f7f232
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/ScrcuOfflineRefundOrdersController.java
@@ -0,0 +1,126 @@
+package com.ruoyi.bend.controller;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.bend.domain.ScrcuOfflineRefundOrders;
+import com.ruoyi.bend.service.IScrcuOfflineRefundOrdersService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 扫码退款Controller
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+@Controller
+@RequestMapping("/bend/offlineRefund")
+public class ScrcuOfflineRefundOrdersController extends BaseController
+{
+ private String prefix = "bend/offlineRefund";
+
+ @Autowired
+ private IScrcuOfflineRefundOrdersService scrcuOfflineRefundOrdersService;
+
+ @RequiresPermissions("bend:offlineRefund:view")
+ @GetMapping()
+ public String offlineRefund()
+ {
+ return prefix + "/offlineRefund";
+ }
+
+ /**
+ * 查询扫码退款列表
+ */
+ @RequiresPermissions("bend:offlineRefund:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(ScrcuOfflineRefundOrders scrcuOfflineRefundOrders)
+ {
+ startPage();
+ List list = scrcuOfflineRefundOrdersService.selectScrcuOfflineRefundOrdersList(scrcuOfflineRefundOrders);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出扫码退款列表
+ */
+ @RequiresPermissions("bend:offlineRefund:export")
+ @Log(title = "扫码退款", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(ScrcuOfflineRefundOrders scrcuOfflineRefundOrders)
+ {
+ List list = scrcuOfflineRefundOrdersService.selectScrcuOfflineRefundOrdersList(scrcuOfflineRefundOrders);
+ ExcelUtil util = new ExcelUtil(ScrcuOfflineRefundOrders.class);
+ return util.exportExcel(list, "offlineRefund");
+ }
+
+ /**
+ * 新增扫码退款
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存扫码退款
+ */
+ @RequiresPermissions("bend:offlineRefund:add")
+ @Log(title = "扫码退款", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(ScrcuOfflineRefundOrders scrcuOfflineRefundOrders)
+ {
+ return toAjax(scrcuOfflineRefundOrdersService.insertScrcuOfflineRefundOrders(scrcuOfflineRefundOrders));
+ }
+
+ /**
+ * 修改扫码退款
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ ScrcuOfflineRefundOrders scrcuOfflineRefundOrders = scrcuOfflineRefundOrdersService.selectScrcuOfflineRefundOrdersById(id);
+ mmap.put("scrcuOfflineRefundOrders", scrcuOfflineRefundOrders);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存扫码退款
+ */
+ @RequiresPermissions("bend:offlineRefund:edit")
+ @Log(title = "扫码退款", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(ScrcuOfflineRefundOrders scrcuOfflineRefundOrders)
+ {
+ return toAjax(scrcuOfflineRefundOrdersService.updateScrcuOfflineRefundOrders(scrcuOfflineRefundOrders));
+ }
+
+ /**
+ * 删除扫码退款
+ */
+ @RequiresPermissions("bend:offlineRefund:remove")
+ @Log(title = "扫码退款", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(scrcuOfflineRefundOrdersService.deleteScrcuOfflineRefundOrdersByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/controller/ScrcuOnlineOrdersController.java b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/ScrcuOnlineOrdersController.java
new file mode 100644
index 000000000..23188abc1
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/ScrcuOnlineOrdersController.java
@@ -0,0 +1,166 @@
+package com.ruoyi.bend.controller;
+
+import com.ruoyi.bend.domain.ScrcuOnlineOrderDetails;
+import com.ruoyi.bend.domain.ScrcuOnlineOrders;
+import com.ruoyi.bend.service.IScrcuOnlineOrderDetailsService;
+import com.ruoyi.bend.service.IScrcuOnlineOrdersService;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 收单列表Controller
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+@Controller
+@RequestMapping("/bend/onlineOrders")
+public class ScrcuOnlineOrdersController extends BaseController
+{
+ private String prefix = "bend/onlineOrders";
+
+ @Autowired
+ private IScrcuOnlineOrdersService scrcuOnlineOrdersService;
+
+ @Resource
+ private IScrcuOnlineOrderDetailsService orderDetailsService;
+
+
+ @RequiresPermissions("bend:onlineOrders:view")
+ @GetMapping()
+ public String onlineOrders()
+ {
+ return prefix + "/onlineOrders";
+ }
+
+ /**
+ * 查询收单列表列表
+ */
+ @RequiresPermissions("bend:onlineOrders:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(ScrcuOnlineOrders scrcuOnlineOrders)
+ {
+ startPage();
+ List list = scrcuOnlineOrdersService.selectScrcuOnlineOrdersList(scrcuOnlineOrders);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出收单列表列表
+ */
+ @RequiresPermissions("bend:onlineOrders:export")
+ @Log(title = "收单列表", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(ScrcuOnlineOrders scrcuOnlineOrders)
+ {
+ List list = scrcuOnlineOrdersService.selectScrcuOnlineOrdersList(scrcuOnlineOrders);
+ ExcelUtil util = new ExcelUtil(ScrcuOnlineOrders.class);
+ return util.exportExcel(list, "onlineOrders");
+ }
+
+ /**
+ * 新增收单列表
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存收单列表
+ */
+ @RequiresPermissions("bend:onlineOrders:add")
+ @Log(title = "收单列表", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(ScrcuOnlineOrders scrcuOnlineOrders)
+ {
+ return toAjax(scrcuOnlineOrdersService.insertScrcuOnlineOrders(scrcuOnlineOrders));
+ }
+
+ /**
+ * 修改收单列表
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ ScrcuOnlineOrders scrcuOnlineOrders = scrcuOnlineOrdersService.selectScrcuOnlineOrdersById(id);
+ mmap.put("scrcuOnlineOrders", scrcuOnlineOrders);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存收单列表
+ */
+ @RequiresPermissions("bend:onlineOrders:edit")
+ @Log(title = "收单列表", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(ScrcuOnlineOrders scrcuOnlineOrders)
+ {
+ return toAjax(scrcuOnlineOrdersService.updateScrcuOnlineOrders(scrcuOnlineOrders));
+ }
+
+ /**
+ * 删除收单列表
+ */
+ @RequiresPermissions("bend:onlineOrders:remove")
+ @Log(title = "收单列表", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(scrcuOnlineOrdersService.deleteScrcuOnlineOrdersByIds(ids));
+ }
+
+ /**
+ * 收单详情页面
+ * @param orderNumber 收单单号
+ */
+ @RequiresPermissions("bend:onlineOrders:detail")
+ @GetMapping("/detail/{orderNumber}")
+ public String onlineOrdersDetail(@PathVariable("orderNumber") String orderNumber, ModelMap mmap)
+ {
+ if (StringUtils.isNotEmpty(orderNumber))
+ {
+ ScrcuOnlineOrders scrcuOnlineOrders = new ScrcuOnlineOrders();
+ scrcuOnlineOrders.setOrderNumber(orderNumber);
+ ScrcuOnlineOrders onlineOrders = scrcuOnlineOrdersService.selectScrcuOnlineOrders(scrcuOnlineOrders);
+ mmap.put("onlineOrders",onlineOrders);
+ }
+ return prefix + "/onlineOrderDetails";
+ }
+
+
+ /**
+ * 收单详情列表
+ * @param detail 收单详情
+ * @return 列表
+ */
+ @RequiresPermissions("bend:onlineOrders:list")
+ @PostMapping("/detail/list")
+ @ResponseBody
+ public TableDataInfo onlineOrdersDetailList(ScrcuOnlineOrderDetails detail)
+ {
+ startPage();
+ List list = orderDetailsService.selectScrcuOnlineOrderDetailsList(detail);
+ return getDataTable(list);
+ }
+
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/controller/ScrcuOnlineRefundOrdersController.java b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/ScrcuOnlineRefundOrdersController.java
new file mode 100644
index 000000000..b118fa183
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/ScrcuOnlineRefundOrdersController.java
@@ -0,0 +1,126 @@
+package com.ruoyi.bend.controller;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.bend.domain.ScrcuOnlineRefundOrders;
+import com.ruoyi.bend.service.IScrcuOnlineRefundOrdersService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 退款订单Controller
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+@Controller
+@RequestMapping("/bend/onlineRefund")
+public class ScrcuOnlineRefundOrdersController extends BaseController
+{
+ private String prefix = "bend/onlineRefund";
+
+ @Autowired
+ private IScrcuOnlineRefundOrdersService scrcuOnlineRefundOrdersService;
+
+ @RequiresPermissions("bend:onlineRefund:view")
+ @GetMapping()
+ public String onlineRefund()
+ {
+ return prefix + "/onlineRefund";
+ }
+
+ /**
+ * 查询退款订单列表
+ */
+ @RequiresPermissions("bend:onlineRefund:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(ScrcuOnlineRefundOrders scrcuOnlineRefundOrders)
+ {
+ startPage();
+ List list = scrcuOnlineRefundOrdersService.selectScrcuOnlineRefundOrdersList(scrcuOnlineRefundOrders);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出退款订单列表
+ */
+ @RequiresPermissions("bend:onlineRefund:export")
+ @Log(title = "退款订单", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(ScrcuOnlineRefundOrders scrcuOnlineRefundOrders)
+ {
+ List list = scrcuOnlineRefundOrdersService.selectScrcuOnlineRefundOrdersList(scrcuOnlineRefundOrders);
+ ExcelUtil util = new ExcelUtil(ScrcuOnlineRefundOrders.class);
+ return util.exportExcel(list, "onlineRefund");
+ }
+
+ /**
+ * 新增退款订单
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存退款订单
+ */
+ @RequiresPermissions("bend:onlineRefund:add")
+ @Log(title = "退款订单", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(ScrcuOnlineRefundOrders scrcuOnlineRefundOrders)
+ {
+ return toAjax(scrcuOnlineRefundOrdersService.insertScrcuOnlineRefundOrders(scrcuOnlineRefundOrders));
+ }
+
+ /**
+ * 修改退款订单
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ ScrcuOnlineRefundOrders scrcuOnlineRefundOrders = scrcuOnlineRefundOrdersService.selectScrcuOnlineRefundOrdersById(id);
+ mmap.put("scrcuOnlineRefundOrders", scrcuOnlineRefundOrders);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存退款订单
+ */
+ @RequiresPermissions("bend:onlineRefund:edit")
+ @Log(title = "退款订单", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(ScrcuOnlineRefundOrders scrcuOnlineRefundOrders)
+ {
+ return toAjax(scrcuOnlineRefundOrdersService.updateScrcuOnlineRefundOrders(scrcuOnlineRefundOrders));
+ }
+
+ /**
+ * 删除退款订单
+ */
+ @RequiresPermissions("bend:onlineRefund:remove")
+ @Log(title = "退款订单", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(scrcuOnlineRefundOrdersService.deleteScrcuOnlineRefundOrdersByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/controller/WechatMemberController.java b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/WechatMemberController.java
new file mode 100644
index 000000000..73c2f1f4c
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/controller/WechatMemberController.java
@@ -0,0 +1,126 @@
+package com.ruoyi.bend.controller;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.bend.domain.WechatMember;
+import com.ruoyi.bend.service.IWechatMemberService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 微信用户Controller
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+@Controller
+@RequestMapping("/bend/wechatMember")
+public class WechatMemberController extends BaseController
+{
+ private String prefix = "bend/wechatMember";
+
+ @Autowired
+ private IWechatMemberService wechatMemberService;
+
+ @RequiresPermissions("bend:wechatMember:view")
+ @GetMapping()
+ public String wechatMember()
+ {
+ return prefix + "/wechatMember";
+ }
+
+ /**
+ * 查询微信用户列表
+ */
+ @RequiresPermissions("bend:wechatMember:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(WechatMember wechatMember)
+ {
+ startPage();
+ List list = wechatMemberService.selectWechatMemberList(wechatMember);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出微信用户列表
+ */
+ @RequiresPermissions("bend:wechatMember:export")
+ @Log(title = "微信用户", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(WechatMember wechatMember)
+ {
+ List list = wechatMemberService.selectWechatMemberList(wechatMember);
+ ExcelUtil util = new ExcelUtil(WechatMember.class);
+ return util.exportExcel(list, "wechatMember");
+ }
+
+ /**
+ * 新增微信用户
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存微信用户
+ */
+ @RequiresPermissions("bend:wechatMember:add")
+ @Log(title = "微信用户", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(WechatMember wechatMember)
+ {
+ return toAjax(wechatMemberService.insertWechatMember(wechatMember));
+ }
+
+ /**
+ * 修改微信用户
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ WechatMember wechatMember = wechatMemberService.selectWechatMemberById(id);
+ mmap.put("wechatMember", wechatMember);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存微信用户
+ */
+ @RequiresPermissions("bend:wechatMember:edit")
+ @Log(title = "微信用户", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(WechatMember wechatMember)
+ {
+ return toAjax(wechatMemberService.updateWechatMember(wechatMember));
+ }
+
+ /**
+ * 删除微信用户
+ */
+ @RequiresPermissions("bend:wechatMember:remove")
+ @Log(title = "微信用户", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(wechatMemberService.deleteWechatMemberByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/domain/Agreement.java b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/Agreement.java
new file mode 100644
index 000000000..f68f5a2bb
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/Agreement.java
@@ -0,0 +1,49 @@
+package com.ruoyi.bend.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import javax.persistence.Table;
+
+/**
+ * 协议管理对象 bend_agreement
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel(value = "协议管理")
+@Table(name = "bend_agreement")
+public class Agreement extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+
+ /** 协议标题 */
+ @ApiModelProperty(notes = "协议标题")
+ @Excel(name = "协议标题")
+ private String agreementTitle;
+
+ /** 协议类型 */
+ @ApiModelProperty(notes = "协议类型")
+ @Excel(name = "协议类型")
+ private Integer agreementType;
+
+ /** 状态(0正常 1关闭) */
+ @ApiModelProperty(notes = "状态(0正常 1关闭)")
+ @Excel(name = "状态", readConverterExp = "0=正常,1=关闭")
+ private Integer status;
+
+ /** 协议内容 */
+ @ApiModelProperty(notes = "协议内容")
+ private String agreementContent;
+
+ /** 删除标记(0否 1是) */
+ @ApiModelProperty(notes = "删除标记(0否 1是)")
+ private Integer deleted;
+
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/domain/Article.java b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/Article.java
new file mode 100644
index 000000000..065a58db3
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/Article.java
@@ -0,0 +1,113 @@
+package com.ruoyi.bend.domain;
+
+import java.util.Date;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import javax.persistence.Table;
+
+/**
+ * 内容管理对象 bend_article
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel(value = "内容管理")
+@Table(name = "bend_article")
+public class Article extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 文章标题 */
+ @ApiModelProperty(notes = "文章标题")
+ @Excel(name = "文章标题")
+ private String title;
+
+ /** 副标题 */
+ @ApiModelProperty(notes = "副标题")
+ @Excel(name = "副标题")
+ private String subTitle;
+
+ /** 文章封面 */
+ @ApiModelProperty(notes = "文章封面")
+ @Excel(name = "文章封面")
+ private String articleCover;
+
+ /** 浏览量 */
+ @ApiModelProperty(notes = "浏览量")
+ @Excel(name = "浏览量")
+ private Long pvCount;
+
+ /** 评论数 */
+ @ApiModelProperty(notes = "评论数")
+ @Excel(name = "评论数")
+ private Long commentCount;
+
+ /** 转载量 */
+ @ApiModelProperty(notes = "转载量")
+ @Excel(name = "转载量")
+ private Long quoteCount;
+
+ /** 微信公众号 */
+ @ApiModelProperty(notes = "微信公众号")
+ @Excel(name = "微信公众号")
+ private String wechatAccount;
+
+ /** 署名名称(医生名称或医院名称) */
+ @ApiModelProperty(notes = "署名名称(医生名称或医院名称)")
+ @Excel(name = "署名名称(医生名称或医院名称)")
+ private String signatureName;
+
+ /** 文章类型(0公众号 1平台文章 2医院文章 3医生文章) */
+ @ApiModelProperty(notes = "文章类型(0公众号 1平台文章 2医院文章 3医生文章)")
+ @Excel(name = "文章类型", readConverterExp = "0=公众号,1=平台文章,2=医院文章,3=医生文章")
+ private Integer articleType;
+
+ /** 文章类别(0内容文章 1活动文章) */
+ @ApiModelProperty(notes = "文章类别(0内容文章 1活动文章)")
+ @Excel(name = "文章类别", readConverterExp = "0=内容文章,1=活动文章")
+ private Integer articleClassify;
+
+ /** 文章分类(0健康资讯 1惠民政策) */
+ @ApiModelProperty(notes = "文章分类(0健康资讯 1惠民政策)")
+ @Excel(name = "文章分类", readConverterExp = "0=健康资讯,1=惠民政策")
+ private Integer articleCategory;
+
+ /** 文章状态(0草稿 1正常 2删除) */
+ @ApiModelProperty(notes = "文章状态(0草稿 1正常 2删除)")
+ @Excel(name = "文章状态", readConverterExp = "0=草稿,1=正常,2=删除")
+ private Integer articleStatus;
+
+ /** 审核状态(0正常/审核通过 1审核中 2审核驳回) */
+ @ApiModelProperty(notes = "审核状态(0正常/审核通过 1审核中 2审核驳回)")
+ @Excel(name = "审核状态", readConverterExp = "0=正常/审核通过,1=审核中,2=审核驳回")
+ private Integer approveStatus;
+
+ /** 排序号 */
+ @ApiModelProperty(notes = "排序号")
+ @Excel(name = "排序号")
+ private Long sortNo;
+
+ /** 审核时间 */
+ @ApiModelProperty(notes = "审核时间")
+ private Date auditTime;
+
+ /** 发布时间 */
+ @ApiModelProperty(notes = "发布时间")
+ @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date releaseTime;
+
+ /** 文章内容 */
+ @ApiModelProperty(notes = "文章内容")
+ private String content;
+
+ /** 删除标记(0否 1是) */
+ @ApiModelProperty(notes = "删除标记(0否 1是)")
+ private Integer deleted;
+
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/domain/Banner.java b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/Banner.java
new file mode 100644
index 000000000..6f90569b6
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/Banner.java
@@ -0,0 +1,49 @@
+package com.ruoyi.bend.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import javax.persistence.Table;
+
+/**
+ * 首页管理对象 bend_banner
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel(value = "首页管理")
+@Table(name = "bend_banner")
+public class Banner extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 广告标题 */
+ @ApiModelProperty(notes = "广告标题")
+ @Excel(name = "广告标题")
+ private String adTitle;
+
+ /** 图片地址 */
+ @ApiModelProperty(notes = "图片地址")
+ @Excel(name = "图片地址")
+ private String adUrl;
+
+ /** 活动详情 */
+ @ApiModelProperty(notes = "活动详情")
+ @Excel(name = "活动详情")
+ private String adDetailUrl;
+
+ /** 广告类型(0广告 1活动) */
+ @ApiModelProperty(notes = "广告类型(0广告 1活动)")
+ @Excel(name = "广告类型", readConverterExp = "0=广告,1=活动")
+ private Integer adType;
+
+ /** 删除标记(0否 1是) */
+ @ApiModelProperty(notes = "删除标记(0否 1是)")
+ private Integer deleted;
+
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/domain/Member.java b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/Member.java
new file mode 100644
index 000000000..ef7c14083
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/Member.java
@@ -0,0 +1,58 @@
+package com.ruoyi.bend.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import javax.persistence.Table;
+
+/**
+ * 会员列表对象 bend_member
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel(value = "会员列表")
+@Table(name = "bend_member")
+public class Member extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 手机号 */
+ @ApiModelProperty(notes = "手机号")
+ @Excel(name = "手机号")
+ private String mobilePhone;
+
+ /** 密码 */
+ @ApiModelProperty(notes = "密码")
+ private String password;
+
+ /** 真实姓名 */
+ @ApiModelProperty(notes = "真实姓名")
+ @Excel(name = "真实姓名")
+ private String realName;
+
+ /** 身份证号 */
+ @ApiModelProperty(notes = "身份证号")
+ @Excel(name = "身份证号")
+ private String idCardNo;
+
+ /** 用户状态(0正常 1冻结) */
+ @ApiModelProperty(notes = "用户状态(0正常 1冻结)")
+ @Excel(name = "用户状态", readConverterExp = "0=正常,1=冻结")
+ private Integer memberStatus;
+
+ /** 会员类型(0普通 1医生 2管理员) */
+ @ApiModelProperty(notes = "会员类型(0普通 1医生 2管理员)")
+ @Excel(name = "会员类型", readConverterExp = "0=普通,1=医生,2=管理员")
+ private Integer memberType;
+
+ /** 删除标记(0否 1是) */
+ @ApiModelProperty(notes = "删除标记(0否 1是)")
+ private Integer deleted;
+
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/domain/MessageCode.java b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/MessageCode.java
new file mode 100644
index 000000000..9d9f368b8
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/MessageCode.java
@@ -0,0 +1,68 @@
+package com.ruoyi.bend.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import javax.persistence.Table;
+
+/**
+ * 短信管理对象 bend_message_code
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel(value = "短信管理")
+@Table(name = "bend_message_code")
+public class MessageCode extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 手机号 */
+ @ApiModelProperty(notes = "手机号")
+ @Excel(name = "手机号")
+ private String mobilePhone;
+
+ /** 短信签名 */
+ @ApiModelProperty(notes = "短信签名")
+ @Excel(name = "短信签名")
+ private String signName;
+
+ /** 短信类型 */
+ @ApiModelProperty(notes = "短信类型")
+ private Integer smsType;
+
+ /** 验证码 */
+ @ApiModelProperty(notes = "验证码")
+ @Excel(name = "验证码")
+ private String smsCode;
+
+ /** 短信内容 */
+ @ApiModelProperty(notes = "短信内容")
+ @Excel(name = "短信内容")
+ private String messageText;
+
+ /** 模板编号 */
+ @ApiModelProperty(notes = "模板编号")
+ @Excel(name = "模板编号")
+ private String templateCode;
+
+ /** 模板参数 */
+ @ApiModelProperty(notes = "模板参数")
+ @Excel(name = "模板参数")
+ private String templateParam;
+
+ /** 状态(0未使用 1已使用) */
+ @ApiModelProperty(notes = "状态(0未使用 1已使用)")
+ @Excel(name = "状态", readConverterExp = "0=未使用,1=已使用")
+ private Integer smsStatus;
+
+ /** 删除标记(0否 1是) */
+ @ApiModelProperty(notes = "删除标记(0否 1是)")
+ private Integer deleted;
+
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/domain/PatientList.java b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/PatientList.java
new file mode 100644
index 000000000..69311546b
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/PatientList.java
@@ -0,0 +1,73 @@
+package com.ruoyi.bend.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import javax.persistence.Table;
+
+/**
+ * 就诊人列表对象 bend_patient_list
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel(value = "就诊人列表")
+@Table(name = "bend_patient_list")
+public class PatientList extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 用户ID */
+ @ApiModelProperty(notes = "用户ID")
+ private Long memberId;
+
+ /** 真实姓名 */
+ @ApiModelProperty(notes = "真实姓名")
+ @Excel(name = "真实姓名")
+ private String realName;
+
+ /** 身份证号 */
+ @ApiModelProperty(notes = "身份证号")
+ @Excel(name = "身份证号")
+ private String idCardNo;
+
+ /** 手机号 */
+ @ApiModelProperty(notes = "手机号")
+ @Excel(name = "手机号")
+ private String mobilePhone;
+
+ /** 是否默认(0否 1是) */
+ @ApiModelProperty(notes = "是否默认(0否 1是)")
+ @Excel(name = "是否默认", readConverterExp = "0=否,1=是")
+ private Integer defaultPatient;
+
+ /** 就诊人关系(0未指定 1本人 2配偶 3父亲 4母亲 5儿子 6女儿 7亲友 8朋友 9其他) */
+ @ApiModelProperty(notes = "就诊人关系(0未指定 1本人 2配偶 3父亲 4母亲 5儿子 6女儿 7亲友 8朋友 9其他)")
+ @Excel(name = "就诊人关系", readConverterExp = "0=未指定,1=本人,2=配偶,3=父亲,4=母亲,5=儿子,6=女儿,7=亲友,8=朋友,9=其他")
+ private Integer relationShip;
+
+ /** 家庭关系(0未指定 1配偶 2父子 3母子 4儿子 5女儿) */
+ @ApiModelProperty(notes = "家庭关系(0未指定 1配偶 2父子 3母子 4儿子 5女儿)")
+ @Excel(name = "家庭关系", readConverterExp = "0=未指定,1=配偶,2=父子,3=母子,4=儿子,5=女儿")
+ private Integer familyRelationship;
+
+ /** 性别(0未知 1男 2女) */
+ @ApiModelProperty(notes = "性别(0未知 1男 2女)")
+ @Excel(name = "性别", readConverterExp = "0=未知,1=男,2=女")
+ private Integer sex;
+
+ /** 绑定状态(0绑定中 1已解绑) */
+ @ApiModelProperty(notes = "绑定状态(0绑定中 1已解绑)")
+ @Excel(name = "绑定状态", readConverterExp = "0=绑定中,1=已解绑")
+ private Integer bindStatus;
+
+ /** 删除标记(0否 1是) */
+ @ApiModelProperty(notes = "删除标记(0否 1是)")
+ private Integer deleted;
+
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/domain/ScrcuOfflineOrders.java b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/ScrcuOfflineOrders.java
new file mode 100644
index 000000000..583bb4fcd
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/ScrcuOfflineOrders.java
@@ -0,0 +1,130 @@
+package com.ruoyi.bend.domain;
+
+import java.util.Date;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import javax.persistence.Table;
+
+/**
+ * 线下订单对象 scrcu_offline_orders
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel(value = "线下订单")
+@Table(name = "scrcu_offline_orders")
+public class ScrcuOfflineOrders extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+
+ /** 用户ID */
+ @ApiModelProperty(notes = "用户ID")
+ private Long memberId;
+
+ /** 订单号 */
+ @ApiModelProperty(notes = "订单号")
+ @Excel(name = "订单号")
+ private String reqSsn;
+
+ /** 请求时间 */
+ @ApiModelProperty(notes = "请求时间")
+ @Excel(name = "请求时间")
+ private String reqTime;
+
+ /** 商户编号 */
+ @ApiModelProperty(notes = "商户编号")
+ @Excel(name = "商户编号")
+ private String mchtNo;
+
+ /** 行政区划 */
+ @ApiModelProperty(notes = "行政区划")
+ private String txnAreaInfo;
+
+ /** 交易结果通知地址 */
+ @ApiModelProperty(notes = "交易结果通知地址")
+ private String notifyUrl;
+
+ /** 订单金额 */
+ @ApiModelProperty(notes = "订单金额")
+ @Excel(name = "订单金额")
+ private String orderAmt;
+
+ /** 有效时间,单位为秒;超过该时间订单自动关闭; */
+ @ApiModelProperty(notes = "有效时间,单位为秒;超过该时间订单自动关闭;")
+ private String validTime;
+
+ /** 订单描述 */
+ @ApiModelProperty(notes = "订单描述")
+ @Excel(name = "订单描述")
+ private String orderDesc;
+
+ /** 商户二维码 */
+ @ApiModelProperty(notes = "商户二维码")
+ private String mchToken;
+
+ /** 用户付款码 */
+ @ApiModelProperty(notes = "用户付款码")
+ private String userToken;
+
+ /** 扫码类别(1用户主扫 2用户被扫) */
+ @ApiModelProperty(notes = "扫码类别(1用户主扫 2用户被扫)")
+ @Excel(name = "扫码类别", readConverterExp = "1=用户主扫,2=用户被扫")
+ private String sacnType;
+
+ /** 交易类型(01支付 02退款) */
+ @ApiModelProperty(notes = "交易类型(01支付 02退款)")
+ @Excel(name = "交易类型", readConverterExp = "0=1支付,0=2退款")
+ private String txnType;
+
+ /** 系统流水号 */
+ @ApiModelProperty(notes = "系统流水号")
+ @Excel(name = "系统流水号")
+ private String payNo;
+
+ /** 机构编码 */
+ @ApiModelProperty(notes = "机构编码")
+ @Excel(name = "机构编码")
+ private String orgCode;
+
+ /** HIS交易号 */
+ @ApiModelProperty(notes = "HIS交易号")
+ @Excel(name = "HIS交易号")
+ private String hisTradeNo;
+
+ /** 响应流水号 */
+ @ApiModelProperty(notes = "响应流水号")
+ @Excel(name = "响应流水号")
+ private String respSsn;
+
+ /** 响应时间 */
+ @ApiModelProperty(notes = "响应时间")
+ @Excel(name = "响应时间")
+ private String respTime;
+
+ /** 订单状态(00订单成功 01已撤销 02已发生退款 03已关闭 09订单失败 10订单已受理 11订单处理中 12用户输密中 13订单处理超时)] */
+ @ApiModelProperty(notes = "订单状态(00订单成功 01已撤销 02已发生退款 03已关闭 09订单失败 10订单已受理 11订单处理中 12用户输密中 13订单处理超时)]")
+ @Excel(name = "订单状态", readConverterExp = "0=0订单成功,0=1已撤销,0=2已发生退款,0=3已关闭,0=9订单失败,1=0订单已受理,1=1订单处理中,1=2用户输密中,1=3订单处理超时")
+ private String orderState;
+
+ /** 订单种类(0免费支付 1收单支付 2扫码支付 3微信支付) */
+ @ApiModelProperty(notes = "订单种类(0免费支付 1收单支付 2扫码支付 3微信支付)")
+ @Excel(name = "订单种类", readConverterExp = "0=免费支付,1=收单支付,2=扫码支付,3=微信支付")
+ private Integer orderSpecies;
+
+ /** 费用来源(0微信挂号 1微信门诊缴费 2微信住院预交 3分诊挂号 4分诊门诊缴费 5线下扫码支付 6诊间支付) */
+ @ApiModelProperty(notes = "费用来源(0微信挂号 1微信门诊缴费 2微信住院预交 3分诊挂号 4分诊门诊缴费 5线下扫码支付 6诊间支付)")
+ @Excel(name = "费用来源", readConverterExp = "0=微信挂号,1=微信门诊缴费,2=微信住院预交,3=分诊挂号,4=分诊门诊缴费,5=线下扫码支付,6=诊间支付")
+ private Integer expenseType;
+
+ /** 删除标记(0否 1是) */
+ @ApiModelProperty(notes = "删除标记(0否 1是)")
+ private Integer deleted;
+
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/domain/ScrcuOfflineRefundOrders.java b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/ScrcuOfflineRefundOrders.java
new file mode 100644
index 000000000..f3f80c58b
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/ScrcuOfflineRefundOrders.java
@@ -0,0 +1,89 @@
+package com.ruoyi.bend.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import javax.persistence.Table;
+
+/**
+ * 扫码退款对象 scrcu_offline_refund_orders
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel(value = "扫码退款")
+@Table(name = "scrcu_offline_refund_orders")
+public class ScrcuOfflineRefundOrders extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 商户编号 */
+ @ApiModelProperty(notes = "商户编号")
+ @Excel(name = "商户编号")
+ private String mchtNo;
+
+ /** 退款订单 */
+ @ApiModelProperty(notes = "退款订单")
+ @Excel(name = "退款订单")
+ private String reqSsn;
+
+ /** 请求时间 */
+ @ApiModelProperty(notes = "请求时间")
+ @Excel(name = "请求时间")
+ private String reqTime;
+
+ /** 原订单号 */
+ @ApiModelProperty(notes = "原订单号")
+ @Excel(name = "原订单号")
+ private String origReqSsn;
+
+ /** 原请求时间 */
+ @ApiModelProperty(notes = "原请求时间")
+ @Excel(name = "原请求时间")
+ private String origReqTime;
+
+ /** 原响应流水 */
+ @ApiModelProperty(notes = "原响应流水")
+ @Excel(name = "原响应流水")
+ private String origRespSsn;
+
+ /** 原响应时间 */
+ @ApiModelProperty(notes = "原响应时间")
+ @Excel(name = "原响应时间")
+ private String origRespTime;
+
+ /** 退款金额 */
+ @ApiModelProperty(notes = "退款金额")
+ @Excel(name = "退款金额")
+ private String orderAmt;
+
+ /** 退款描述 */
+ @ApiModelProperty(notes = "退款描述")
+ @Excel(name = "退款描述")
+ private String orderDesc;
+
+ /** 退款响应流水号 */
+ @ApiModelProperty(notes = "退款响应流水号")
+ @Excel(name = "退款响应流水号")
+ private String respSsn;
+
+ /** 退款响应时间 */
+ @ApiModelProperty(notes = "退款响应时间")
+ @Excel(name = "退款响应时间")
+ private String respTime;
+
+ /** 订单状态(00订单成功 01已撤销 02已发生退款 03已关闭 09订单失败 10订单已受理 11订单处理中 12用户输密中 13订单处理超时)] */
+ @ApiModelProperty(notes = "订单状态(00订单成功 01已撤销 02已发生退款 03已关闭 09订单失败 10订单已受理 11订单处理中 12用户输密中 13订单处理超时)]")
+ @Excel(name = "订单状态", readConverterExp = "0=0订单成功,0=1已撤销,0=2已发生退款,0=3已关闭,0=9订单失败,1=0订单已受理,1=1订单处理中,1=2用户输密中,1=3订单处理超时")
+ private String orderState;
+
+ /** 删除标记(0否 1是) */
+ @ApiModelProperty(notes = "删除标记(0否 1是)")
+ private Integer deleted;
+
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/domain/ScrcuOnlineOrderDetails.java b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/ScrcuOnlineOrderDetails.java
new file mode 100644
index 000000000..0a858339d
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/ScrcuOnlineOrderDetails.java
@@ -0,0 +1,82 @@
+package com.ruoyi.bend.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import javax.persistence.Table;
+
+/**
+ * 收单详情对象 scrcu_online_order_details
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel(value = "收单列表")
+@Table(name = "scrcu_online_order_details")
+public class ScrcuOnlineOrderDetails extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 商户号 */
+ @ApiModelProperty(notes = "商户号")
+ @Excel(name = "商户号")
+ private String merId;
+
+ /** 父商户号 */
+ @ApiModelProperty(notes = "父商户号")
+ @Excel(name = "父商户号")
+ private String parentMerId;
+
+ /** 机构编码 */
+ @ApiModelProperty(notes = "机构编码")
+ @Excel(name = "机构编码")
+ private String orgCode;
+
+ /** 主订单号 */
+ @ApiModelProperty(notes = "主订单号")
+ @Excel(name = "主订单号")
+ private String orderNumber;
+
+ /** 子订单号 */
+ @ApiModelProperty(notes = "子订单号")
+ @Excel(name = "子订单号")
+ private String subOrderNumber;
+
+ /** 交易金额 */
+ @ApiModelProperty(notes = "交易金额")
+ @Excel(name = "交易金额")
+ private String subOrderAmt;
+
+ /** 支付金额 */
+ @ApiModelProperty(notes = "支付金额")
+ @Excel(name = "支付金额")
+ private String subPayAmt;
+
+ /** 物流码 */
+ @ApiModelProperty(notes = "物流码")
+ private String logisCode;
+
+ /** 机构红包 */
+ @ApiModelProperty(notes = "机构红包")
+ private String redPacketOrgNo;
+
+ /** 结算标记(0不自动结算 1自动结算) */
+ @ApiModelProperty(notes = "结算标记(0不自动结算 1自动结算)")
+ @Excel(name = "结算标记", readConverterExp = "0=不自动结算,1=自动结算")
+ private String autoSettleFlag;
+
+ /** 商品信息 */
+ @ApiModelProperty(notes = "商品信息")
+ @Excel(name = "商品信息")
+ private String goodsInfo;
+
+ /** 删除标记(0否 1是) */
+ @ApiModelProperty(notes = "删除标记(0否 1是)")
+ private Integer deleted;
+
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/domain/ScrcuOnlineOrders.java b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/ScrcuOnlineOrders.java
new file mode 100644
index 000000000..e59e57d68
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/ScrcuOnlineOrders.java
@@ -0,0 +1,157 @@
+package com.ruoyi.bend.domain;
+
+import java.util.List;
+import java.util.Date;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import javax.persistence.Table;
+
+/**
+ * 收单列表对象 scrcu_online_orders
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel(value = "收单列表")
+@Table(name = "scrcu_online_orders")
+public class ScrcuOnlineOrders extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 用户ID */
+ @ApiModelProperty(notes = "用户ID")
+ @Excel(name = "用户ID")
+ private Long memberId;
+
+ /** 商户代码 */
+ @ApiModelProperty(notes = "商户代码")
+ @Excel(name = "商户代码")
+ private String merId;
+
+ /** 订单类型(01实物消费订单,固定值) */
+ @ApiModelProperty(notes = "订单类型(01实物消费订单,固定值)")
+ private String orderType;
+
+ /** 订单号 */
+ @ApiModelProperty(notes = "订单号")
+ @Excel(name = "订单号")
+ private String orderNumber;
+
+ /** 订单发送时间,格式: yyyyMMddHHmmss */
+ @ApiModelProperty(notes = "订单发送时间,格式: yyyyMMddHHmmss")
+ @Excel(name = "订单发送时间,格式: yyyyMMddHHmmss")
+ private String orderSendTime;
+
+ /** 订单总金额,单位为分 */
+ @ApiModelProperty(notes = "订单总金额,单位为分")
+ @Excel(name = "订单总金额,单位为分")
+ private String orderAmt;
+
+ /** 支付总金额,单位为分(包含物流,不包含红包) */
+ @ApiModelProperty(notes = "支付总金额,单位为分(包含物流,不包含红包)")
+ @Excel(name = "支付总金额,单位为分(包含物流,不包含红包)")
+ private String payAmt;
+
+ /** 商品名称 */
+ @ApiModelProperty(notes = "商品名称")
+ @Excel(name = "商品名称")
+ private String goodsSubject;
+
+ /** 交易币种(01人民币) */
+ @ApiModelProperty(notes = "交易币种(01人民币)")
+ @Excel(name = "交易币种", readConverterExp = "0=1人民币")
+ private String orderCurrency;
+
+ /** 接入渠道(01PC 02手机) */
+ @ApiModelProperty(notes = "接入渠道(01PC 02手机)")
+ @Excel(name = "接入渠道", readConverterExp = "0=1PC,0=2手机")
+ private String channel;
+
+ /** 接入方式(01H5商城 02APP商城 03微信公众号商城 04小程序商城 05其它(当channel为02时必填)) */
+ @ApiModelProperty(notes = "接入方式(01H5商城 02APP商城 03微信公众号商城 04小程序商城 05其它(当channel为02时必填))")
+ @Excel(name = "接入方式", readConverterExp = "0=1H5商城,0=2APP商城,0=3微信公众号商城,0=4小程序商城,0=5其它(当channel为02时必填)")
+ private String mobileWay;
+
+ /** 手机接入类型(01安卓 02IOS系统(当mobileWay为02时必填)) */
+ @ApiModelProperty(notes = "手机接入类型(01安卓 02IOS系统(当mobileWay为02时必填))")
+ @Excel(name = "手机接入类型", readConverterExp = "0=1安卓,0=2IOS系统(当mobileWay为02时必填)")
+ private String mobileType;
+
+ /** 前端通知地址 */
+ @ApiModelProperty(notes = "前端通知地址")
+ private String frontEndUrl;
+
+ /** 后台通知地址 */
+ @ApiModelProperty(notes = "后台通知地址")
+ private String backEndUrl;
+
+ /** 收单主订单号 */
+ @ApiModelProperty(notes = "收单主订单号")
+ @Excel(name = "收单主订单号")
+ private String orderSeqId;
+
+ /** 支付类型(00蜀信e支付 01蜀信卡快捷支付 02银联支付 03微信支付 04支付宝支付 05授信支付 10积分支付) */
+ @ApiModelProperty(notes = "支付类型(00蜀信e支付 01蜀信卡快捷支付 02银联支付 03微信支付 04支付宝支付 05授信支付 10积分支付)")
+ @Excel(name = "支付类型", readConverterExp = "0=0蜀信e支付,0=1蜀信卡快捷支付,0=2银联支付,0=3微信支付,0=4支付宝支付,0=5授信支付,1=0积分支付")
+ private String payType;
+
+ /** 交易类型(01消费 02退货 03撤销 04查询) */
+ @ApiModelProperty(notes = "交易类型(01消费 02退货 03撤销 04查询)")
+ @Excel(name = "交易类型", readConverterExp = "0=1消费,0=2退货,0=3撤销,0=4查询")
+ private String transType;
+
+ /** 交易状态(02成功) */
+ @ApiModelProperty(notes = "交易状态(02成功)")
+ @Excel(name = "交易状态", readConverterExp = "0=2成功")
+ private String payStatus;
+
+ /** 订单种类(1收单支付 2扫码支付) */
+ @ApiModelProperty(notes = "订单种类(1收单支付 2扫码支付)")
+ @Excel(name = "订单种类", readConverterExp = "1=收单支付,2=扫码支付")
+ private Integer orderSpecies;
+
+ /** 订单状态(01交易中 02交易成功 03交易失败) */
+ @ApiModelProperty(notes = "订单状态(01交易中 02交易成功 03交易失败)")
+ @Excel(name = "订单状态", readConverterExp = "0=1交易中,0=2交易成功,0=3交易失败")
+ private String orderState;
+
+ /** 支付完成时间,格式: yyyyMMddHHmmss */
+ @ApiModelProperty(notes = "支付完成时间,格式: yyyyMMddHHmmss")
+ @Excel(name = "支付完成时间,格式: yyyyMMddHHmmss", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date orderTranTime;
+
+ /** 订单创建时间,格式: yyyyMMddHHmmss */
+ @ApiModelProperty(notes = "订单创建时间,格式: yyyyMMddHHmmss")
+ @Excel(name = "订单创建时间,格式: yyyyMMddHHmmss", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date orderCreateTime;
+
+ /** 费用来源(0微信挂号 1微信门诊缴费 2微信住院预交 3分诊挂号 4分诊门诊缴费 5线下扫码支付 6诊间支付) */
+ @ApiModelProperty(notes = "费用来源(0微信挂号 1微信门诊缴费 2微信住院预交 3分诊挂号 4分诊门诊缴费 5线下扫码支付 6诊间支付)")
+ @Excel(name = "费用来源", readConverterExp = "0=微信挂号,1=微信门诊缴费,2=微信住院预交,3=分诊挂号,4=分诊门诊缴费,5=线下扫码支付,6=诊间支付")
+ private Integer expenseType;
+
+ /** 支付方式类别(1微信支付 2支付宝 3农信支付) */
+ @ApiModelProperty(notes = "支付方式类别(1微信支付 2支付宝 3农信支付)")
+ @Excel(name = "支付方式类别", readConverterExp = "1=微信支付,2=支付宝,3=农信支付")
+ private Integer payWayType;
+
+ /** 流水号 */
+ @ApiModelProperty(notes = "流水号")
+ @Excel(name = "流水号")
+ private String payNo;
+
+ /** 删除标记(0否 1是) */
+ @ApiModelProperty(notes = "删除标记(0否 1是)")
+ private Integer deleted;
+
+ /** 收单详情信息 */
+ @ApiModelProperty(notes = "收单详情信息")
+ private List scrcuOnlineOrderDetailsList;
+
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/domain/ScrcuOnlineRefundOrders.java b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/ScrcuOnlineRefundOrders.java
new file mode 100644
index 000000000..17ad6505f
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/ScrcuOnlineRefundOrders.java
@@ -0,0 +1,78 @@
+package com.ruoyi.bend.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import javax.persistence.Table;
+
+/**
+ * 退款订单对象 scrcu_online_refund_orders
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel(value = "退款订单")
+@Table(name = "scrcu_online_refund_orders")
+public class ScrcuOnlineRefundOrders extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 商户代码 */
+ @ApiModelProperty(notes = "商户代码")
+ @Excel(name = "商户代码")
+ private String merId;
+
+ /** 退货商户号 */
+ @ApiModelProperty(notes = "退货商户号")
+ @Excel(name = "退货商户号")
+ private String merNo;
+
+ /** 退款订单号 */
+ @ApiModelProperty(notes = "退款订单号")
+ @Excel(name = "退款订单号")
+ private String orderNumber;
+
+ /** 发送时间 */
+ @ApiModelProperty(notes = "发送时间")
+ @Excel(name = "发送时间")
+ private String orderSendTime;
+
+ /** 后台通知地址 */
+ @ApiModelProperty(notes = "后台通知地址")
+ private String backEndUrl;
+
+ /** 原支付主订单号 */
+ @ApiModelProperty(notes = "原支付主订单号")
+ @Excel(name = "原支付主订单号")
+ private String oriOrderNumber;
+
+ /** 原支付子订单号 */
+ @ApiModelProperty(notes = "原支付子订单号")
+ @Excel(name = "原支付子订单号")
+ private String oriSubOrderNumber;
+
+ /** 退款金额 */
+ @ApiModelProperty(notes = "退款金额")
+ @Excel(name = "退款金额")
+ private String orderAmt;
+
+ /** 接入渠道(01PC 02手机wap) */
+ @ApiModelProperty(notes = "接入渠道(01PC 02手机wap)")
+ @Excel(name = "接入渠道", readConverterExp = "0=1PC,0=2手机wap")
+ private String channel;
+
+ /** 订单状态(01交易中 02交易成功 03交易失败) */
+ @ApiModelProperty(notes = "订单状态(01交易中 02交易成功 03交易失败)")
+ @Excel(name = "订单状态", readConverterExp = "0=1交易中,0=2交易成功,0=3交易失败")
+ private String orderState;
+
+ /** 删除标记(0否 1是) */
+ @ApiModelProperty(notes = "删除标记(0否 1是)")
+ private Integer deleted;
+
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/domain/WechatMember.java b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/WechatMember.java
new file mode 100644
index 000000000..4ab3af971
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/domain/WechatMember.java
@@ -0,0 +1,130 @@
+package com.ruoyi.bend.domain;
+
+import java.util.Date;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import javax.persistence.Table;
+
+/**
+ * 微信用户对象 bend_wechat_member
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel(value = "微信用户")
+@Table(name = "bend_wechat_member")
+public class WechatMember extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 用户ID */
+ @ApiModelProperty(notes = "用户ID")
+ private Long memberId;
+
+ /** 手机号 */
+ @ApiModelProperty(notes = "手机号")
+ @Excel(name = "手机号")
+ private String mobilePhone;
+
+ /** AppId */
+ @ApiModelProperty(notes = "AppId")
+ @Excel(name = "AppId")
+ private String appId;
+
+ /** OpenId */
+ @ApiModelProperty(notes = "OpenId")
+ @Excel(name = "OpenId")
+ private String openId;
+
+ /** 微信昵称 */
+ @ApiModelProperty(notes = "微信昵称")
+ @Excel(name = "微信昵称")
+ private String nickname;
+
+ /** 真实姓名 */
+ @ApiModelProperty(notes = "真实姓名")
+ @Excel(name = "真实姓名")
+ private String realName;
+
+ /** 性别(0未知 1男 2女) */
+ @ApiModelProperty(notes = "性别(0未知 1男 2女)")
+ private Integer sex;
+
+ /** 性别描述 */
+ @ApiModelProperty(notes = "性别描述")
+ @Excel(name = "性别描述")
+ private String sexDesc;
+
+ /** 关注状态(0未关注 1关注中 2已取消) */
+ @ApiModelProperty(notes = "关注状态(0未关注 1关注中 2已取消)")
+ @Excel(name = "关注状态", readConverterExp = "0=未关注,1=关注中,2=已取消")
+ private Integer followStatus;
+
+ /** 订阅标识(0未订阅 1订阅中 2已取消) */
+ @ApiModelProperty(notes = "订阅标识(0未订阅 1订阅中 2已取消)")
+ @Excel(name = "订阅标识", readConverterExp = "0=未订阅,1=订阅中,2=已取消")
+ private Integer subscribe;
+
+ /** 所在城市 */
+ @ApiModelProperty(notes = "所在城市")
+ @Excel(name = "所在城市")
+ private String city;
+
+ /** 所在省份 */
+ @ApiModelProperty(notes = "所在省份")
+ @Excel(name = "所在省份")
+ private String province;
+
+ /** 所在国家 */
+ @ApiModelProperty(notes = "所在国家")
+ private String country;
+
+ /** 用户语言 */
+ @ApiModelProperty(notes = "用户语言")
+ private String language;
+
+ /** 用户头像 */
+ @ApiModelProperty(notes = "用户头像")
+ @Excel(name = "用户头像")
+ private String headImgUrl;
+
+ /** 关注时间 */
+ @ApiModelProperty(notes = "关注时间")
+ @Excel(name = "关注时间", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date subscribeTime;
+
+ /** UnionID */
+ @ApiModelProperty(notes = "UnionID")
+ private String unionid;
+
+ /** 分组ID */
+ @ApiModelProperty(notes = "分组ID")
+ private String groupId;
+
+ /** 标签列表 */
+ @ApiModelProperty(notes = "标签列表")
+ private String tagIds;
+
+ /** 关注渠道 */
+ @ApiModelProperty(notes = "关注渠道")
+ private String subscribeScene;
+
+ /** 扫码场景 */
+ @ApiModelProperty(notes = "扫码场景")
+ private String qrScene;
+
+ /** 场景描述 */
+ @ApiModelProperty(notes = "场景描述")
+ private String qrSceneStr;
+
+ /** 删除标记(0否 1是) */
+ @ApiModelProperty(notes = "删除标记(0否 1是)")
+ private Integer deleted;
+
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/AgreementMapper.java b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/AgreementMapper.java
new file mode 100644
index 000000000..833f47df2
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/AgreementMapper.java
@@ -0,0 +1,62 @@
+package com.ruoyi.bend.mapper;
+
+import com.ruoyi.common.mappers.RuoYiBaseMapper;
+import com.ruoyi.bend.domain.Agreement;
+import java.util.List;
+
+/**
+ * 协议管理Mapper接口
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+public interface AgreementMapper extends RuoYiBaseMapper
+{
+ /**
+ * 查询协议管理
+ *
+ * @param id 协议管理ID
+ * @return 协议管理
+ */
+ public Agreement selectAgreementById(Long id);
+
+ /**
+ * 查询协议管理列表
+ *
+ * @param agreement 协议管理
+ * @return 协议管理集合
+ */
+ public List selectAgreementList(Agreement agreement);
+
+ /**
+ * 新增协议管理
+ *
+ * @param agreement 协议管理
+ * @return 结果
+ */
+ public int insertAgreement(Agreement agreement);
+
+ /**
+ * 修改协议管理
+ *
+ * @param agreement 协议管理
+ * @return 结果
+ */
+ public int updateAgreement(Agreement agreement);
+
+ /**
+ * 删除协议管理
+ *
+ * @param id 协议管理ID
+ * @return 结果
+ */
+ public int deleteAgreementById(Long id);
+
+ /**
+ * 批量删除协议管理
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteAgreementByIds(String[] ids);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/ArticleMapper.java b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/ArticleMapper.java
new file mode 100644
index 000000000..a5b156933
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/ArticleMapper.java
@@ -0,0 +1,62 @@
+package com.ruoyi.bend.mapper;
+
+import com.ruoyi.common.mappers.RuoYiBaseMapper;
+import com.ruoyi.bend.domain.Article;
+import java.util.List;
+
+/**
+ * 内容管理Mapper接口
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+public interface ArticleMapper extends RuoYiBaseMapper
+{
+ /**
+ * 查询内容管理
+ *
+ * @param id 内容管理ID
+ * @return 内容管理
+ */
+ public Article selectArticleById(Long id);
+
+ /**
+ * 查询内容管理列表
+ *
+ * @param article 内容管理
+ * @return 内容管理集合
+ */
+ public List selectArticleList(Article article);
+
+ /**
+ * 新增内容管理
+ *
+ * @param article 内容管理
+ * @return 结果
+ */
+ public int insertArticle(Article article);
+
+ /**
+ * 修改内容管理
+ *
+ * @param article 内容管理
+ * @return 结果
+ */
+ public int updateArticle(Article article);
+
+ /**
+ * 删除内容管理
+ *
+ * @param id 内容管理ID
+ * @return 结果
+ */
+ public int deleteArticleById(Long id);
+
+ /**
+ * 批量删除内容管理
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteArticleByIds(String[] ids);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/BannerMapper.java b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/BannerMapper.java
new file mode 100644
index 000000000..b011ca9b7
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/BannerMapper.java
@@ -0,0 +1,62 @@
+package com.ruoyi.bend.mapper;
+
+import com.ruoyi.common.mappers.RuoYiBaseMapper;
+import com.ruoyi.bend.domain.Banner;
+import java.util.List;
+
+/**
+ * 首页管理Mapper接口
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+public interface BannerMapper extends RuoYiBaseMapper
+{
+ /**
+ * 查询首页管理
+ *
+ * @param id 首页管理ID
+ * @return 首页管理
+ */
+ public Banner selectBannerById(Long id);
+
+ /**
+ * 查询首页管理列表
+ *
+ * @param banner 首页管理
+ * @return 首页管理集合
+ */
+ public List selectBannerList(Banner banner);
+
+ /**
+ * 新增首页管理
+ *
+ * @param banner 首页管理
+ * @return 结果
+ */
+ public int insertBanner(Banner banner);
+
+ /**
+ * 修改首页管理
+ *
+ * @param banner 首页管理
+ * @return 结果
+ */
+ public int updateBanner(Banner banner);
+
+ /**
+ * 删除首页管理
+ *
+ * @param id 首页管理ID
+ * @return 结果
+ */
+ public int deleteBannerById(Long id);
+
+ /**
+ * 批量删除首页管理
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteBannerByIds(String[] ids);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/MemberMapper.java b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/MemberMapper.java
new file mode 100644
index 000000000..9ac000487
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/MemberMapper.java
@@ -0,0 +1,62 @@
+package com.ruoyi.bend.mapper;
+
+import com.ruoyi.common.mappers.RuoYiBaseMapper;
+import com.ruoyi.bend.domain.Member;
+import java.util.List;
+
+/**
+ * 会员列表Mapper接口
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+public interface MemberMapper extends RuoYiBaseMapper
+{
+ /**
+ * 查询会员列表
+ *
+ * @param id 会员列表ID
+ * @return 会员列表
+ */
+ public Member selectMemberById(Long id);
+
+ /**
+ * 查询会员列表列表
+ *
+ * @param member 会员列表
+ * @return 会员列表集合
+ */
+ public List selectMemberList(Member member);
+
+ /**
+ * 新增会员列表
+ *
+ * @param member 会员列表
+ * @return 结果
+ */
+ public int insertMember(Member member);
+
+ /**
+ * 修改会员列表
+ *
+ * @param member 会员列表
+ * @return 结果
+ */
+ public int updateMember(Member member);
+
+ /**
+ * 删除会员列表
+ *
+ * @param id 会员列表ID
+ * @return 结果
+ */
+ public int deleteMemberById(Long id);
+
+ /**
+ * 批量删除会员列表
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteMemberByIds(String[] ids);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/MessageCodeMapper.java b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/MessageCodeMapper.java
new file mode 100644
index 000000000..c9b1ab508
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/MessageCodeMapper.java
@@ -0,0 +1,62 @@
+package com.ruoyi.bend.mapper;
+
+import com.ruoyi.common.mappers.RuoYiBaseMapper;
+import com.ruoyi.bend.domain.MessageCode;
+import java.util.List;
+
+/**
+ * 短信管理Mapper接口
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+public interface MessageCodeMapper extends RuoYiBaseMapper
+{
+ /**
+ * 查询短信管理
+ *
+ * @param id 短信管理ID
+ * @return 短信管理
+ */
+ public MessageCode selectMessageCodeById(Long id);
+
+ /**
+ * 查询短信管理列表
+ *
+ * @param messageCode 短信管理
+ * @return 短信管理集合
+ */
+ public List selectMessageCodeList(MessageCode messageCode);
+
+ /**
+ * 新增短信管理
+ *
+ * @param messageCode 短信管理
+ * @return 结果
+ */
+ public int insertMessageCode(MessageCode messageCode);
+
+ /**
+ * 修改短信管理
+ *
+ * @param messageCode 短信管理
+ * @return 结果
+ */
+ public int updateMessageCode(MessageCode messageCode);
+
+ /**
+ * 删除短信管理
+ *
+ * @param id 短信管理ID
+ * @return 结果
+ */
+ public int deleteMessageCodeById(Long id);
+
+ /**
+ * 批量删除短信管理
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteMessageCodeByIds(String[] ids);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/PatientListMapper.java b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/PatientListMapper.java
new file mode 100644
index 000000000..bd1e8f000
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/PatientListMapper.java
@@ -0,0 +1,62 @@
+package com.ruoyi.bend.mapper;
+
+import com.ruoyi.common.mappers.RuoYiBaseMapper;
+import com.ruoyi.bend.domain.PatientList;
+import java.util.List;
+
+/**
+ * 就诊人列表Mapper接口
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+public interface PatientListMapper extends RuoYiBaseMapper
+{
+ /**
+ * 查询就诊人列表
+ *
+ * @param id 就诊人列表ID
+ * @return 就诊人列表
+ */
+ public PatientList selectPatientListById(Long id);
+
+ /**
+ * 查询就诊人列表列表
+ *
+ * @param patientList 就诊人列表
+ * @return 就诊人列表集合
+ */
+ public List selectPatientListList(PatientList patientList);
+
+ /**
+ * 新增就诊人列表
+ *
+ * @param patientList 就诊人列表
+ * @return 结果
+ */
+ public int insertPatientList(PatientList patientList);
+
+ /**
+ * 修改就诊人列表
+ *
+ * @param patientList 就诊人列表
+ * @return 结果
+ */
+ public int updatePatientList(PatientList patientList);
+
+ /**
+ * 删除就诊人列表
+ *
+ * @param id 就诊人列表ID
+ * @return 结果
+ */
+ public int deletePatientListById(Long id);
+
+ /**
+ * 批量删除就诊人列表
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deletePatientListByIds(String[] ids);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/ScrcuOfflineOrdersMapper.java b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/ScrcuOfflineOrdersMapper.java
new file mode 100644
index 000000000..415c4aec9
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/ScrcuOfflineOrdersMapper.java
@@ -0,0 +1,62 @@
+package com.ruoyi.bend.mapper;
+
+import com.ruoyi.common.mappers.RuoYiBaseMapper;
+import com.ruoyi.bend.domain.ScrcuOfflineOrders;
+import java.util.List;
+
+/**
+ * 线下订单Mapper接口
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+public interface ScrcuOfflineOrdersMapper extends RuoYiBaseMapper
+{
+ /**
+ * 查询线下订单
+ *
+ * @param id 线下订单ID
+ * @return 线下订单
+ */
+ public ScrcuOfflineOrders selectScrcuOfflineOrdersById(Long id);
+
+ /**
+ * 查询线下订单列表
+ *
+ * @param scrcuOfflineOrders 线下订单
+ * @return 线下订单集合
+ */
+ public List selectScrcuOfflineOrdersList(ScrcuOfflineOrders scrcuOfflineOrders);
+
+ /**
+ * 新增线下订单
+ *
+ * @param scrcuOfflineOrders 线下订单
+ * @return 结果
+ */
+ public int insertScrcuOfflineOrders(ScrcuOfflineOrders scrcuOfflineOrders);
+
+ /**
+ * 修改线下订单
+ *
+ * @param scrcuOfflineOrders 线下订单
+ * @return 结果
+ */
+ public int updateScrcuOfflineOrders(ScrcuOfflineOrders scrcuOfflineOrders);
+
+ /**
+ * 删除线下订单
+ *
+ * @param id 线下订单ID
+ * @return 结果
+ */
+ public int deleteScrcuOfflineOrdersById(Long id);
+
+ /**
+ * 批量删除线下订单
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteScrcuOfflineOrdersByIds(String[] ids);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/ScrcuOfflineRefundOrdersMapper.java b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/ScrcuOfflineRefundOrdersMapper.java
new file mode 100644
index 000000000..925226626
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/ScrcuOfflineRefundOrdersMapper.java
@@ -0,0 +1,62 @@
+package com.ruoyi.bend.mapper;
+
+import com.ruoyi.common.mappers.RuoYiBaseMapper;
+import com.ruoyi.bend.domain.ScrcuOfflineRefundOrders;
+import java.util.List;
+
+/**
+ * 扫码退款Mapper接口
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+public interface ScrcuOfflineRefundOrdersMapper extends RuoYiBaseMapper
+{
+ /**
+ * 查询扫码退款
+ *
+ * @param id 扫码退款ID
+ * @return 扫码退款
+ */
+ public ScrcuOfflineRefundOrders selectScrcuOfflineRefundOrdersById(Long id);
+
+ /**
+ * 查询扫码退款列表
+ *
+ * @param scrcuOfflineRefundOrders 扫码退款
+ * @return 扫码退款集合
+ */
+ public List selectScrcuOfflineRefundOrdersList(ScrcuOfflineRefundOrders scrcuOfflineRefundOrders);
+
+ /**
+ * 新增扫码退款
+ *
+ * @param scrcuOfflineRefundOrders 扫码退款
+ * @return 结果
+ */
+ public int insertScrcuOfflineRefundOrders(ScrcuOfflineRefundOrders scrcuOfflineRefundOrders);
+
+ /**
+ * 修改扫码退款
+ *
+ * @param scrcuOfflineRefundOrders 扫码退款
+ * @return 结果
+ */
+ public int updateScrcuOfflineRefundOrders(ScrcuOfflineRefundOrders scrcuOfflineRefundOrders);
+
+ /**
+ * 删除扫码退款
+ *
+ * @param id 扫码退款ID
+ * @return 结果
+ */
+ public int deleteScrcuOfflineRefundOrdersById(Long id);
+
+ /**
+ * 批量删除扫码退款
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteScrcuOfflineRefundOrdersByIds(String[] ids);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/ScrcuOnlineOrderDetailsMapper.java b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/ScrcuOnlineOrderDetailsMapper.java
new file mode 100644
index 000000000..a0411acea
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/ScrcuOnlineOrderDetailsMapper.java
@@ -0,0 +1,62 @@
+package com.ruoyi.bend.mapper;
+
+import com.ruoyi.common.mappers.RuoYiBaseMapper;
+import com.ruoyi.bend.domain.ScrcuOnlineOrderDetails;
+import java.util.List;
+
+/**
+ * 收单详情Mapper接口
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+public interface ScrcuOnlineOrderDetailsMapper extends RuoYiBaseMapper
+{
+ /**
+ * 查询收单详情
+ *
+ * @param id 收单详情ID
+ * @return 收单详情
+ */
+ public ScrcuOnlineOrderDetails selectScrcuOnlineOrderDetailsById(Long id);
+
+ /**
+ * 查询收单详情列表
+ *
+ * @param scrcuOnlineOrderDetails 收单详情
+ * @return 收单详情集合
+ */
+ public List selectScrcuOnlineOrderDetailsList(ScrcuOnlineOrderDetails scrcuOnlineOrderDetails);
+
+ /**
+ * 新增收单详情
+ *
+ * @param scrcuOnlineOrderDetails 收单详情
+ * @return 结果
+ */
+ public int insertScrcuOnlineOrderDetails(ScrcuOnlineOrderDetails scrcuOnlineOrderDetails);
+
+ /**
+ * 修改收单详情
+ *
+ * @param scrcuOnlineOrderDetails 收单详情
+ * @return 结果
+ */
+ public int updateScrcuOnlineOrderDetails(ScrcuOnlineOrderDetails scrcuOnlineOrderDetails);
+
+ /**
+ * 删除收单详情
+ *
+ * @param id 收单详情ID
+ * @return 结果
+ */
+ public int deleteScrcuOnlineOrderDetailsById(Long id);
+
+ /**
+ * 批量删除收单详情
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteScrcuOnlineOrderDetailsByIds(String[] ids);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/ScrcuOnlineOrdersMapper.java b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/ScrcuOnlineOrdersMapper.java
new file mode 100644
index 000000000..30f0dd187
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/ScrcuOnlineOrdersMapper.java
@@ -0,0 +1,88 @@
+package com.ruoyi.bend.mapper;
+
+import com.ruoyi.common.mappers.RuoYiBaseMapper;
+import com.ruoyi.bend.domain.ScrcuOnlineOrders;
+import com.ruoyi.bend.domain.ScrcuOnlineOrderDetails;
+import java.util.List;
+
+/**
+ * 收单列表Mapper接口
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+public interface ScrcuOnlineOrdersMapper extends RuoYiBaseMapper
+{
+ /**
+ * 查询收单列表
+ *
+ * @param id 收单列表ID
+ * @return 收单列表
+ */
+ public ScrcuOnlineOrders selectScrcuOnlineOrdersById(Long id);
+
+ /**
+ * 查询收单列表列表
+ *
+ * @param scrcuOnlineOrders 收单列表
+ * @return 收单列表集合
+ */
+ public List selectScrcuOnlineOrdersList(ScrcuOnlineOrders scrcuOnlineOrders);
+
+ /**
+ * 新增收单列表
+ *
+ * @param scrcuOnlineOrders 收单列表
+ * @return 结果
+ */
+ public int insertScrcuOnlineOrders(ScrcuOnlineOrders scrcuOnlineOrders);
+
+ /**
+ * 修改收单列表
+ *
+ * @param scrcuOnlineOrders 收单列表
+ * @return 结果
+ */
+ public int updateScrcuOnlineOrders(ScrcuOnlineOrders scrcuOnlineOrders);
+
+ /**
+ * 删除收单列表
+ *
+ * @param id 收单列表ID
+ * @return 结果
+ */
+ public int deleteScrcuOnlineOrdersById(Long id);
+
+ /**
+ * 批量删除收单列表
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteScrcuOnlineOrdersByIds(String[] ids);
+
+ /**
+ * 批量删除收单详情
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteScrcuOnlineOrderDetailsByOrderNumbers(String[] ids);
+
+ /**
+ * 批量新增收单详情
+ *
+ * @param scrcuOnlineOrderDetailsList 收单详情列表
+ * @return 结果
+ */
+ public int batchScrcuOnlineOrderDetails(List scrcuOnlineOrderDetailsList);
+
+
+ /**
+ * 通过收单列表ID删除收单详情信息
+ *
+ * @param id 收单列表ID
+ * @return 结果
+ */
+ public int deleteScrcuOnlineOrderDetailsByOrderNumber(Long id);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/ScrcuOnlineRefundOrdersMapper.java b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/ScrcuOnlineRefundOrdersMapper.java
new file mode 100644
index 000000000..d1f2528f6
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/ScrcuOnlineRefundOrdersMapper.java
@@ -0,0 +1,62 @@
+package com.ruoyi.bend.mapper;
+
+import com.ruoyi.common.mappers.RuoYiBaseMapper;
+import com.ruoyi.bend.domain.ScrcuOnlineRefundOrders;
+import java.util.List;
+
+/**
+ * 退款订单Mapper接口
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+public interface ScrcuOnlineRefundOrdersMapper extends RuoYiBaseMapper
+{
+ /**
+ * 查询退款订单
+ *
+ * @param id 退款订单ID
+ * @return 退款订单
+ */
+ public ScrcuOnlineRefundOrders selectScrcuOnlineRefundOrdersById(Long id);
+
+ /**
+ * 查询退款订单列表
+ *
+ * @param scrcuOnlineRefundOrders 退款订单
+ * @return 退款订单集合
+ */
+ public List selectScrcuOnlineRefundOrdersList(ScrcuOnlineRefundOrders scrcuOnlineRefundOrders);
+
+ /**
+ * 新增退款订单
+ *
+ * @param scrcuOnlineRefundOrders 退款订单
+ * @return 结果
+ */
+ public int insertScrcuOnlineRefundOrders(ScrcuOnlineRefundOrders scrcuOnlineRefundOrders);
+
+ /**
+ * 修改退款订单
+ *
+ * @param scrcuOnlineRefundOrders 退款订单
+ * @return 结果
+ */
+ public int updateScrcuOnlineRefundOrders(ScrcuOnlineRefundOrders scrcuOnlineRefundOrders);
+
+ /**
+ * 删除退款订单
+ *
+ * @param id 退款订单ID
+ * @return 结果
+ */
+ public int deleteScrcuOnlineRefundOrdersById(Long id);
+
+ /**
+ * 批量删除退款订单
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteScrcuOnlineRefundOrdersByIds(String[] ids);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/WechatMemberMapper.java b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/WechatMemberMapper.java
new file mode 100644
index 000000000..b719201b4
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/mapper/WechatMemberMapper.java
@@ -0,0 +1,62 @@
+package com.ruoyi.bend.mapper;
+
+import com.ruoyi.common.mappers.RuoYiBaseMapper;
+import com.ruoyi.bend.domain.WechatMember;
+import java.util.List;
+
+/**
+ * 微信用户Mapper接口
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+public interface WechatMemberMapper extends RuoYiBaseMapper
+{
+ /**
+ * 查询微信用户
+ *
+ * @param id 微信用户ID
+ * @return 微信用户
+ */
+ public WechatMember selectWechatMemberById(Long id);
+
+ /**
+ * 查询微信用户列表
+ *
+ * @param wechatMember 微信用户
+ * @return 微信用户集合
+ */
+ public List selectWechatMemberList(WechatMember wechatMember);
+
+ /**
+ * 新增微信用户
+ *
+ * @param wechatMember 微信用户
+ * @return 结果
+ */
+ public int insertWechatMember(WechatMember wechatMember);
+
+ /**
+ * 修改微信用户
+ *
+ * @param wechatMember 微信用户
+ * @return 结果
+ */
+ public int updateWechatMember(WechatMember wechatMember);
+
+ /**
+ * 删除微信用户
+ *
+ * @param id 微信用户ID
+ * @return 结果
+ */
+ public int deleteWechatMemberById(Long id);
+
+ /**
+ * 批量删除微信用户
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteWechatMemberByIds(String[] ids);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/IAgreementService.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IAgreementService.java
new file mode 100644
index 000000000..37934fb2c
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IAgreementService.java
@@ -0,0 +1,61 @@
+package com.ruoyi.bend.service;
+
+import java.util.List;
+import com.ruoyi.bend.domain.Agreement;
+
+/**
+ * 协议管理Service接口
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+public interface IAgreementService
+{
+ /**
+ * 查询协议管理
+ *
+ * @param id 协议管理ID
+ * @return 协议管理
+ */
+ public Agreement selectAgreementById(Long id);
+
+ /**
+ * 查询协议管理列表
+ *
+ * @param agreement 协议管理
+ * @return 协议管理集合
+ */
+ public List selectAgreementList(Agreement agreement);
+
+ /**
+ * 新增协议管理
+ *
+ * @param agreement 协议管理
+ * @return 结果
+ */
+ public int insertAgreement(Agreement agreement);
+
+ /**
+ * 修改协议管理
+ *
+ * @param agreement 协议管理
+ * @return 结果
+ */
+ public int updateAgreement(Agreement agreement);
+
+ /**
+ * 批量删除协议管理
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteAgreementByIds(String ids);
+
+ /**
+ * 删除协议管理信息
+ *
+ * @param id 协议管理ID
+ * @return 结果
+ */
+ public int deleteAgreementById(Long id);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/IArticleService.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IArticleService.java
new file mode 100644
index 000000000..f9c3ff7a4
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IArticleService.java
@@ -0,0 +1,61 @@
+package com.ruoyi.bend.service;
+
+import java.util.List;
+import com.ruoyi.bend.domain.Article;
+
+/**
+ * 内容管理Service接口
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+public interface IArticleService
+{
+ /**
+ * 查询内容管理
+ *
+ * @param id 内容管理ID
+ * @return 内容管理
+ */
+ public Article selectArticleById(Long id);
+
+ /**
+ * 查询内容管理列表
+ *
+ * @param article 内容管理
+ * @return 内容管理集合
+ */
+ public List selectArticleList(Article article);
+
+ /**
+ * 新增内容管理
+ *
+ * @param article 内容管理
+ * @return 结果
+ */
+ public int insertArticle(Article article);
+
+ /**
+ * 修改内容管理
+ *
+ * @param article 内容管理
+ * @return 结果
+ */
+ public int updateArticle(Article article);
+
+ /**
+ * 批量删除内容管理
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteArticleByIds(String ids);
+
+ /**
+ * 删除内容管理信息
+ *
+ * @param id 内容管理ID
+ * @return 结果
+ */
+ public int deleteArticleById(Long id);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/IBannerService.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IBannerService.java
new file mode 100644
index 000000000..72c6230d8
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IBannerService.java
@@ -0,0 +1,61 @@
+package com.ruoyi.bend.service;
+
+import java.util.List;
+import com.ruoyi.bend.domain.Banner;
+
+/**
+ * 首页管理Service接口
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+public interface IBannerService
+{
+ /**
+ * 查询首页管理
+ *
+ * @param id 首页管理ID
+ * @return 首页管理
+ */
+ public Banner selectBannerById(Long id);
+
+ /**
+ * 查询首页管理列表
+ *
+ * @param banner 首页管理
+ * @return 首页管理集合
+ */
+ public List selectBannerList(Banner banner);
+
+ /**
+ * 新增首页管理
+ *
+ * @param banner 首页管理
+ * @return 结果
+ */
+ public int insertBanner(Banner banner);
+
+ /**
+ * 修改首页管理
+ *
+ * @param banner 首页管理
+ * @return 结果
+ */
+ public int updateBanner(Banner banner);
+
+ /**
+ * 批量删除首页管理
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteBannerByIds(String ids);
+
+ /**
+ * 删除首页管理信息
+ *
+ * @param id 首页管理ID
+ * @return 结果
+ */
+ public int deleteBannerById(Long id);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/IMemberService.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IMemberService.java
new file mode 100644
index 000000000..3f677fe5b
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IMemberService.java
@@ -0,0 +1,61 @@
+package com.ruoyi.bend.service;
+
+import java.util.List;
+import com.ruoyi.bend.domain.Member;
+
+/**
+ * 会员列表Service接口
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+public interface IMemberService
+{
+ /**
+ * 查询会员列表
+ *
+ * @param id 会员列表ID
+ * @return 会员列表
+ */
+ public Member selectMemberById(Long id);
+
+ /**
+ * 查询会员列表列表
+ *
+ * @param member 会员列表
+ * @return 会员列表集合
+ */
+ public List selectMemberList(Member member);
+
+ /**
+ * 新增会员列表
+ *
+ * @param member 会员列表
+ * @return 结果
+ */
+ public int insertMember(Member member);
+
+ /**
+ * 修改会员列表
+ *
+ * @param member 会员列表
+ * @return 结果
+ */
+ public int updateMember(Member member);
+
+ /**
+ * 批量删除会员列表
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteMemberByIds(String ids);
+
+ /**
+ * 删除会员列表信息
+ *
+ * @param id 会员列表ID
+ * @return 结果
+ */
+ public int deleteMemberById(Long id);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/IMessageCodeService.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IMessageCodeService.java
new file mode 100644
index 000000000..20533e627
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IMessageCodeService.java
@@ -0,0 +1,61 @@
+package com.ruoyi.bend.service;
+
+import java.util.List;
+import com.ruoyi.bend.domain.MessageCode;
+
+/**
+ * 短信管理Service接口
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+public interface IMessageCodeService
+{
+ /**
+ * 查询短信管理
+ *
+ * @param id 短信管理ID
+ * @return 短信管理
+ */
+ public MessageCode selectMessageCodeById(Long id);
+
+ /**
+ * 查询短信管理列表
+ *
+ * @param messageCode 短信管理
+ * @return 短信管理集合
+ */
+ public List selectMessageCodeList(MessageCode messageCode);
+
+ /**
+ * 新增短信管理
+ *
+ * @param messageCode 短信管理
+ * @return 结果
+ */
+ public int insertMessageCode(MessageCode messageCode);
+
+ /**
+ * 修改短信管理
+ *
+ * @param messageCode 短信管理
+ * @return 结果
+ */
+ public int updateMessageCode(MessageCode messageCode);
+
+ /**
+ * 批量删除短信管理
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteMessageCodeByIds(String ids);
+
+ /**
+ * 删除短信管理信息
+ *
+ * @param id 短信管理ID
+ * @return 结果
+ */
+ public int deleteMessageCodeById(Long id);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/IPatientListService.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IPatientListService.java
new file mode 100644
index 000000000..17df92b38
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IPatientListService.java
@@ -0,0 +1,61 @@
+package com.ruoyi.bend.service;
+
+import java.util.List;
+import com.ruoyi.bend.domain.PatientList;
+
+/**
+ * 就诊人列表Service接口
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+public interface IPatientListService
+{
+ /**
+ * 查询就诊人列表
+ *
+ * @param id 就诊人列表ID
+ * @return 就诊人列表
+ */
+ public PatientList selectPatientListById(Long id);
+
+ /**
+ * 查询就诊人列表列表
+ *
+ * @param patientList 就诊人列表
+ * @return 就诊人列表集合
+ */
+ public List selectPatientListList(PatientList patientList);
+
+ /**
+ * 新增就诊人列表
+ *
+ * @param patientList 就诊人列表
+ * @return 结果
+ */
+ public int insertPatientList(PatientList patientList);
+
+ /**
+ * 修改就诊人列表
+ *
+ * @param patientList 就诊人列表
+ * @return 结果
+ */
+ public int updatePatientList(PatientList patientList);
+
+ /**
+ * 批量删除就诊人列表
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deletePatientListByIds(String ids);
+
+ /**
+ * 删除就诊人列表信息
+ *
+ * @param id 就诊人列表ID
+ * @return 结果
+ */
+ public int deletePatientListById(Long id);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/IScrcuOfflineOrdersService.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IScrcuOfflineOrdersService.java
new file mode 100644
index 000000000..652e81320
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IScrcuOfflineOrdersService.java
@@ -0,0 +1,61 @@
+package com.ruoyi.bend.service;
+
+import java.util.List;
+import com.ruoyi.bend.domain.ScrcuOfflineOrders;
+
+/**
+ * 线下订单Service接口
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+public interface IScrcuOfflineOrdersService
+{
+ /**
+ * 查询线下订单
+ *
+ * @param id 线下订单ID
+ * @return 线下订单
+ */
+ public ScrcuOfflineOrders selectScrcuOfflineOrdersById(Long id);
+
+ /**
+ * 查询线下订单列表
+ *
+ * @param scrcuOfflineOrders 线下订单
+ * @return 线下订单集合
+ */
+ public List selectScrcuOfflineOrdersList(ScrcuOfflineOrders scrcuOfflineOrders);
+
+ /**
+ * 新增线下订单
+ *
+ * @param scrcuOfflineOrders 线下订单
+ * @return 结果
+ */
+ public int insertScrcuOfflineOrders(ScrcuOfflineOrders scrcuOfflineOrders);
+
+ /**
+ * 修改线下订单
+ *
+ * @param scrcuOfflineOrders 线下订单
+ * @return 结果
+ */
+ public int updateScrcuOfflineOrders(ScrcuOfflineOrders scrcuOfflineOrders);
+
+ /**
+ * 批量删除线下订单
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteScrcuOfflineOrdersByIds(String ids);
+
+ /**
+ * 删除线下订单信息
+ *
+ * @param id 线下订单ID
+ * @return 结果
+ */
+ public int deleteScrcuOfflineOrdersById(Long id);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/IScrcuOfflineRefundOrdersService.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IScrcuOfflineRefundOrdersService.java
new file mode 100644
index 000000000..f46019ecf
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IScrcuOfflineRefundOrdersService.java
@@ -0,0 +1,61 @@
+package com.ruoyi.bend.service;
+
+import java.util.List;
+import com.ruoyi.bend.domain.ScrcuOfflineRefundOrders;
+
+/**
+ * 扫码退款Service接口
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+public interface IScrcuOfflineRefundOrdersService
+{
+ /**
+ * 查询扫码退款
+ *
+ * @param id 扫码退款ID
+ * @return 扫码退款
+ */
+ public ScrcuOfflineRefundOrders selectScrcuOfflineRefundOrdersById(Long id);
+
+ /**
+ * 查询扫码退款列表
+ *
+ * @param scrcuOfflineRefundOrders 扫码退款
+ * @return 扫码退款集合
+ */
+ public List selectScrcuOfflineRefundOrdersList(ScrcuOfflineRefundOrders scrcuOfflineRefundOrders);
+
+ /**
+ * 新增扫码退款
+ *
+ * @param scrcuOfflineRefundOrders 扫码退款
+ * @return 结果
+ */
+ public int insertScrcuOfflineRefundOrders(ScrcuOfflineRefundOrders scrcuOfflineRefundOrders);
+
+ /**
+ * 修改扫码退款
+ *
+ * @param scrcuOfflineRefundOrders 扫码退款
+ * @return 结果
+ */
+ public int updateScrcuOfflineRefundOrders(ScrcuOfflineRefundOrders scrcuOfflineRefundOrders);
+
+ /**
+ * 批量删除扫码退款
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteScrcuOfflineRefundOrdersByIds(String ids);
+
+ /**
+ * 删除扫码退款信息
+ *
+ * @param id 扫码退款ID
+ * @return 结果
+ */
+ public int deleteScrcuOfflineRefundOrdersById(Long id);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/IScrcuOnlineOrderDetailsService.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IScrcuOnlineOrderDetailsService.java
new file mode 100644
index 000000000..1cfec8462
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IScrcuOnlineOrderDetailsService.java
@@ -0,0 +1,61 @@
+package com.ruoyi.bend.service;
+
+import java.util.List;
+import com.ruoyi.bend.domain.ScrcuOnlineOrderDetails;
+
+/**
+ * 收单详情Service接口
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+public interface IScrcuOnlineOrderDetailsService
+{
+ /**
+ * 查询收单详情
+ *
+ * @param id 收单详情ID
+ * @return 收单详情
+ */
+ public ScrcuOnlineOrderDetails selectScrcuOnlineOrderDetailsById(Long id);
+
+ /**
+ * 查询收单详情列表
+ *
+ * @param scrcuOnlineOrderDetails 收单详情
+ * @return 收单详情集合
+ */
+ public List selectScrcuOnlineOrderDetailsList(ScrcuOnlineOrderDetails scrcuOnlineOrderDetails);
+
+ /**
+ * 新增收单详情
+ *
+ * @param scrcuOnlineOrderDetails 收单详情
+ * @return 结果
+ */
+ public int insertScrcuOnlineOrderDetails(ScrcuOnlineOrderDetails scrcuOnlineOrderDetails);
+
+ /**
+ * 修改收单详情
+ *
+ * @param scrcuOnlineOrderDetails 收单详情
+ * @return 结果
+ */
+ public int updateScrcuOnlineOrderDetails(ScrcuOnlineOrderDetails scrcuOnlineOrderDetails);
+
+ /**
+ * 批量删除收单详情
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteScrcuOnlineOrderDetailsByIds(String ids);
+
+ /**
+ * 删除收单详情信息
+ *
+ * @param id 收单详情ID
+ * @return 结果
+ */
+ public int deleteScrcuOnlineOrderDetailsById(Long id);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/IScrcuOnlineOrdersService.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IScrcuOnlineOrdersService.java
new file mode 100644
index 000000000..347af5646
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IScrcuOnlineOrdersService.java
@@ -0,0 +1,69 @@
+package com.ruoyi.bend.service;
+
+import java.util.List;
+import com.ruoyi.bend.domain.ScrcuOnlineOrders;
+
+/**
+ * 收单列表Service接口
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+public interface IScrcuOnlineOrdersService
+{
+ /**
+ * 查询收单列表
+ *
+ * @param id 收单列表ID
+ * @return 收单列表
+ */
+ public ScrcuOnlineOrders selectScrcuOnlineOrdersById(Long id);
+
+ /**
+ * 查询收单列表列表
+ *
+ * @param scrcuOnlineOrders 收单列表
+ * @return 收单列表集合
+ */
+ public List selectScrcuOnlineOrdersList(ScrcuOnlineOrders scrcuOnlineOrders);
+
+ /**
+ * 新增收单列表
+ *
+ * @param scrcuOnlineOrders 收单列表
+ * @return 结果
+ */
+ public int insertScrcuOnlineOrders(ScrcuOnlineOrders scrcuOnlineOrders);
+
+ /**
+ * 修改收单列表
+ *
+ * @param scrcuOnlineOrders 收单列表
+ * @return 结果
+ */
+ public int updateScrcuOnlineOrders(ScrcuOnlineOrders scrcuOnlineOrders);
+
+ /**
+ * 批量删除收单列表
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteScrcuOnlineOrdersByIds(String ids);
+
+ /**
+ * 删除收单列表信息
+ *
+ * @param id 收单列表ID
+ * @return 结果
+ */
+ public int deleteScrcuOnlineOrdersById(Long id);
+
+ /**
+ * 查询在线收单
+ *
+ * @param scrcuOnlineOrders 在线收单
+ * @return 在线收单
+ */
+ public ScrcuOnlineOrders selectScrcuOnlineOrders(ScrcuOnlineOrders scrcuOnlineOrders);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/IScrcuOnlineRefundOrdersService.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IScrcuOnlineRefundOrdersService.java
new file mode 100644
index 000000000..fa5a481e4
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IScrcuOnlineRefundOrdersService.java
@@ -0,0 +1,61 @@
+package com.ruoyi.bend.service;
+
+import java.util.List;
+import com.ruoyi.bend.domain.ScrcuOnlineRefundOrders;
+
+/**
+ * 退款订单Service接口
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+public interface IScrcuOnlineRefundOrdersService
+{
+ /**
+ * 查询退款订单
+ *
+ * @param id 退款订单ID
+ * @return 退款订单
+ */
+ public ScrcuOnlineRefundOrders selectScrcuOnlineRefundOrdersById(Long id);
+
+ /**
+ * 查询退款订单列表
+ *
+ * @param scrcuOnlineRefundOrders 退款订单
+ * @return 退款订单集合
+ */
+ public List selectScrcuOnlineRefundOrdersList(ScrcuOnlineRefundOrders scrcuOnlineRefundOrders);
+
+ /**
+ * 新增退款订单
+ *
+ * @param scrcuOnlineRefundOrders 退款订单
+ * @return 结果
+ */
+ public int insertScrcuOnlineRefundOrders(ScrcuOnlineRefundOrders scrcuOnlineRefundOrders);
+
+ /**
+ * 修改退款订单
+ *
+ * @param scrcuOnlineRefundOrders 退款订单
+ * @return 结果
+ */
+ public int updateScrcuOnlineRefundOrders(ScrcuOnlineRefundOrders scrcuOnlineRefundOrders);
+
+ /**
+ * 批量删除退款订单
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteScrcuOnlineRefundOrdersByIds(String ids);
+
+ /**
+ * 删除退款订单信息
+ *
+ * @param id 退款订单ID
+ * @return 结果
+ */
+ public int deleteScrcuOnlineRefundOrdersById(Long id);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/IWechatMemberService.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IWechatMemberService.java
new file mode 100644
index 000000000..55ee769e0
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/IWechatMemberService.java
@@ -0,0 +1,61 @@
+package com.ruoyi.bend.service;
+
+import java.util.List;
+import com.ruoyi.bend.domain.WechatMember;
+
+/**
+ * 微信用户Service接口
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+public interface IWechatMemberService
+{
+ /**
+ * 查询微信用户
+ *
+ * @param id 微信用户ID
+ * @return 微信用户
+ */
+ public WechatMember selectWechatMemberById(Long id);
+
+ /**
+ * 查询微信用户列表
+ *
+ * @param wechatMember 微信用户
+ * @return 微信用户集合
+ */
+ public List selectWechatMemberList(WechatMember wechatMember);
+
+ /**
+ * 新增微信用户
+ *
+ * @param wechatMember 微信用户
+ * @return 结果
+ */
+ public int insertWechatMember(WechatMember wechatMember);
+
+ /**
+ * 修改微信用户
+ *
+ * @param wechatMember 微信用户
+ * @return 结果
+ */
+ public int updateWechatMember(WechatMember wechatMember);
+
+ /**
+ * 批量删除微信用户
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteWechatMemberByIds(String ids);
+
+ /**
+ * 删除微信用户信息
+ *
+ * @param id 微信用户ID
+ * @return 结果
+ */
+ public int deleteWechatMemberById(Long id);
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/AgreementServiceImpl.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/AgreementServiceImpl.java
new file mode 100644
index 000000000..683f10a3e
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/AgreementServiceImpl.java
@@ -0,0 +1,97 @@
+package com.ruoyi.bend.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.bend.mapper.AgreementMapper;
+import com.ruoyi.bend.domain.Agreement;
+import com.ruoyi.bend.service.IAgreementService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 协议管理Service业务层处理
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+@Service
+public class AgreementServiceImpl implements IAgreementService
+{
+ @Autowired
+ private AgreementMapper agreementMapper;
+
+ /**
+ * 查询协议管理
+ *
+ * @param id 协议管理ID
+ * @return 协议管理
+ */
+ @Override
+ public Agreement selectAgreementById(Long id)
+ {
+ return agreementMapper.selectAgreementById(id);
+ }
+
+ /**
+ * 查询协议管理列表
+ *
+ * @param agreement 协议管理
+ * @return 协议管理
+ */
+ @Override
+ public List selectAgreementList(Agreement agreement)
+ {
+ return agreementMapper.selectAgreementList(agreement);
+ }
+
+ /**
+ * 新增协议管理
+ *
+ * @param agreement 协议管理
+ * @return 结果
+ */
+ @Override
+ public int insertAgreement(Agreement agreement)
+ {
+ agreement.setCreateTime(DateUtils.getNowDate());
+ return agreementMapper.insertAgreement(agreement);
+ }
+
+ /**
+ * 修改协议管理
+ *
+ * @param agreement 协议管理
+ * @return 结果
+ */
+ @Override
+ public int updateAgreement(Agreement agreement)
+ {
+ agreement.setUpdateTime(DateUtils.getNowDate());
+ return agreementMapper.updateAgreement(agreement);
+ }
+
+ /**
+ * 删除协议管理对象
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ @Override
+ public int deleteAgreementByIds(String ids)
+ {
+ return agreementMapper.deleteAgreementByIds(Convert.toStrArray(ids));
+ }
+
+ /**
+ * 删除协议管理信息
+ *
+ * @param id 协议管理ID
+ * @return 结果
+ */
+ @Override
+ public int deleteAgreementById(Long id)
+ {
+ return agreementMapper.deleteAgreementById(id);
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/ArticleServiceImpl.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/ArticleServiceImpl.java
new file mode 100644
index 000000000..aaea5e406
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/ArticleServiceImpl.java
@@ -0,0 +1,97 @@
+package com.ruoyi.bend.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.bend.mapper.ArticleMapper;
+import com.ruoyi.bend.domain.Article;
+import com.ruoyi.bend.service.IArticleService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 内容管理Service业务层处理
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+@Service
+public class ArticleServiceImpl implements IArticleService
+{
+ @Autowired
+ private ArticleMapper articleMapper;
+
+ /**
+ * 查询内容管理
+ *
+ * @param id 内容管理ID
+ * @return 内容管理
+ */
+ @Override
+ public Article selectArticleById(Long id)
+ {
+ return articleMapper.selectArticleById(id);
+ }
+
+ /**
+ * 查询内容管理列表
+ *
+ * @param article 内容管理
+ * @return 内容管理
+ */
+ @Override
+ public List selectArticleList(Article article)
+ {
+ return articleMapper.selectArticleList(article);
+ }
+
+ /**
+ * 新增内容管理
+ *
+ * @param article 内容管理
+ * @return 结果
+ */
+ @Override
+ public int insertArticle(Article article)
+ {
+ article.setCreateTime(DateUtils.getNowDate());
+ return articleMapper.insertArticle(article);
+ }
+
+ /**
+ * 修改内容管理
+ *
+ * @param article 内容管理
+ * @return 结果
+ */
+ @Override
+ public int updateArticle(Article article)
+ {
+ article.setUpdateTime(DateUtils.getNowDate());
+ return articleMapper.updateArticle(article);
+ }
+
+ /**
+ * 删除内容管理对象
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ @Override
+ public int deleteArticleByIds(String ids)
+ {
+ return articleMapper.deleteArticleByIds(Convert.toStrArray(ids));
+ }
+
+ /**
+ * 删除内容管理信息
+ *
+ * @param id 内容管理ID
+ * @return 结果
+ */
+ @Override
+ public int deleteArticleById(Long id)
+ {
+ return articleMapper.deleteArticleById(id);
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/BannerServiceImpl.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/BannerServiceImpl.java
new file mode 100644
index 000000000..c2d900a2a
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/BannerServiceImpl.java
@@ -0,0 +1,97 @@
+package com.ruoyi.bend.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.bend.mapper.BannerMapper;
+import com.ruoyi.bend.domain.Banner;
+import com.ruoyi.bend.service.IBannerService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 首页管理Service业务层处理
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+@Service
+public class BannerServiceImpl implements IBannerService
+{
+ @Autowired
+ private BannerMapper bannerMapper;
+
+ /**
+ * 查询首页管理
+ *
+ * @param id 首页管理ID
+ * @return 首页管理
+ */
+ @Override
+ public Banner selectBannerById(Long id)
+ {
+ return bannerMapper.selectBannerById(id);
+ }
+
+ /**
+ * 查询首页管理列表
+ *
+ * @param banner 首页管理
+ * @return 首页管理
+ */
+ @Override
+ public List selectBannerList(Banner banner)
+ {
+ return bannerMapper.selectBannerList(banner);
+ }
+
+ /**
+ * 新增首页管理
+ *
+ * @param banner 首页管理
+ * @return 结果
+ */
+ @Override
+ public int insertBanner(Banner banner)
+ {
+ banner.setCreateTime(DateUtils.getNowDate());
+ return bannerMapper.insertBanner(banner);
+ }
+
+ /**
+ * 修改首页管理
+ *
+ * @param banner 首页管理
+ * @return 结果
+ */
+ @Override
+ public int updateBanner(Banner banner)
+ {
+ banner.setUpdateTime(DateUtils.getNowDate());
+ return bannerMapper.updateBanner(banner);
+ }
+
+ /**
+ * 删除首页管理对象
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ @Override
+ public int deleteBannerByIds(String ids)
+ {
+ return bannerMapper.deleteBannerByIds(Convert.toStrArray(ids));
+ }
+
+ /**
+ * 删除首页管理信息
+ *
+ * @param id 首页管理ID
+ * @return 结果
+ */
+ @Override
+ public int deleteBannerById(Long id)
+ {
+ return bannerMapper.deleteBannerById(id);
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/MemberServiceImpl.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/MemberServiceImpl.java
new file mode 100644
index 000000000..9f696e730
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/MemberServiceImpl.java
@@ -0,0 +1,97 @@
+package com.ruoyi.bend.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.bend.mapper.MemberMapper;
+import com.ruoyi.bend.domain.Member;
+import com.ruoyi.bend.service.IMemberService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 会员列表Service业务层处理
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+@Service
+public class MemberServiceImpl implements IMemberService
+{
+ @Autowired
+ private MemberMapper memberMapper;
+
+ /**
+ * 查询会员列表
+ *
+ * @param id 会员列表ID
+ * @return 会员列表
+ */
+ @Override
+ public Member selectMemberById(Long id)
+ {
+ return memberMapper.selectMemberById(id);
+ }
+
+ /**
+ * 查询会员列表列表
+ *
+ * @param member 会员列表
+ * @return 会员列表
+ */
+ @Override
+ public List selectMemberList(Member member)
+ {
+ return memberMapper.selectMemberList(member);
+ }
+
+ /**
+ * 新增会员列表
+ *
+ * @param member 会员列表
+ * @return 结果
+ */
+ @Override
+ public int insertMember(Member member)
+ {
+ member.setCreateTime(DateUtils.getNowDate());
+ return memberMapper.insertMember(member);
+ }
+
+ /**
+ * 修改会员列表
+ *
+ * @param member 会员列表
+ * @return 结果
+ */
+ @Override
+ public int updateMember(Member member)
+ {
+ member.setUpdateTime(DateUtils.getNowDate());
+ return memberMapper.updateMember(member);
+ }
+
+ /**
+ * 删除会员列表对象
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ @Override
+ public int deleteMemberByIds(String ids)
+ {
+ return memberMapper.deleteMemberByIds(Convert.toStrArray(ids));
+ }
+
+ /**
+ * 删除会员列表信息
+ *
+ * @param id 会员列表ID
+ * @return 结果
+ */
+ @Override
+ public int deleteMemberById(Long id)
+ {
+ return memberMapper.deleteMemberById(id);
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/MessageCodeServiceImpl.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/MessageCodeServiceImpl.java
new file mode 100644
index 000000000..8e6852028
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/MessageCodeServiceImpl.java
@@ -0,0 +1,97 @@
+package com.ruoyi.bend.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.bend.mapper.MessageCodeMapper;
+import com.ruoyi.bend.domain.MessageCode;
+import com.ruoyi.bend.service.IMessageCodeService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 短信管理Service业务层处理
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+@Service
+public class MessageCodeServiceImpl implements IMessageCodeService
+{
+ @Autowired
+ private MessageCodeMapper messageCodeMapper;
+
+ /**
+ * 查询短信管理
+ *
+ * @param id 短信管理ID
+ * @return 短信管理
+ */
+ @Override
+ public MessageCode selectMessageCodeById(Long id)
+ {
+ return messageCodeMapper.selectMessageCodeById(id);
+ }
+
+ /**
+ * 查询短信管理列表
+ *
+ * @param messageCode 短信管理
+ * @return 短信管理
+ */
+ @Override
+ public List selectMessageCodeList(MessageCode messageCode)
+ {
+ return messageCodeMapper.selectMessageCodeList(messageCode);
+ }
+
+ /**
+ * 新增短信管理
+ *
+ * @param messageCode 短信管理
+ * @return 结果
+ */
+ @Override
+ public int insertMessageCode(MessageCode messageCode)
+ {
+ messageCode.setCreateTime(DateUtils.getNowDate());
+ return messageCodeMapper.insertMessageCode(messageCode);
+ }
+
+ /**
+ * 修改短信管理
+ *
+ * @param messageCode 短信管理
+ * @return 结果
+ */
+ @Override
+ public int updateMessageCode(MessageCode messageCode)
+ {
+ messageCode.setUpdateTime(DateUtils.getNowDate());
+ return messageCodeMapper.updateMessageCode(messageCode);
+ }
+
+ /**
+ * 删除短信管理对象
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ @Override
+ public int deleteMessageCodeByIds(String ids)
+ {
+ return messageCodeMapper.deleteMessageCodeByIds(Convert.toStrArray(ids));
+ }
+
+ /**
+ * 删除短信管理信息
+ *
+ * @param id 短信管理ID
+ * @return 结果
+ */
+ @Override
+ public int deleteMessageCodeById(Long id)
+ {
+ return messageCodeMapper.deleteMessageCodeById(id);
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/PatientListServiceImpl.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/PatientListServiceImpl.java
new file mode 100644
index 000000000..47dd214b4
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/PatientListServiceImpl.java
@@ -0,0 +1,97 @@
+package com.ruoyi.bend.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.bend.mapper.PatientListMapper;
+import com.ruoyi.bend.domain.PatientList;
+import com.ruoyi.bend.service.IPatientListService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 就诊人列表Service业务层处理
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+@Service
+public class PatientListServiceImpl implements IPatientListService
+{
+ @Autowired
+ private PatientListMapper patientListMapper;
+
+ /**
+ * 查询就诊人列表
+ *
+ * @param id 就诊人列表ID
+ * @return 就诊人列表
+ */
+ @Override
+ public PatientList selectPatientListById(Long id)
+ {
+ return patientListMapper.selectPatientListById(id);
+ }
+
+ /**
+ * 查询就诊人列表列表
+ *
+ * @param patientList 就诊人列表
+ * @return 就诊人列表
+ */
+ @Override
+ public List selectPatientListList(PatientList patientList)
+ {
+ return patientListMapper.selectPatientListList(patientList);
+ }
+
+ /**
+ * 新增就诊人列表
+ *
+ * @param patientList 就诊人列表
+ * @return 结果
+ */
+ @Override
+ public int insertPatientList(PatientList patientList)
+ {
+ patientList.setCreateTime(DateUtils.getNowDate());
+ return patientListMapper.insertPatientList(patientList);
+ }
+
+ /**
+ * 修改就诊人列表
+ *
+ * @param patientList 就诊人列表
+ * @return 结果
+ */
+ @Override
+ public int updatePatientList(PatientList patientList)
+ {
+ patientList.setUpdateTime(DateUtils.getNowDate());
+ return patientListMapper.updatePatientList(patientList);
+ }
+
+ /**
+ * 删除就诊人列表对象
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ @Override
+ public int deletePatientListByIds(String ids)
+ {
+ return patientListMapper.deletePatientListByIds(Convert.toStrArray(ids));
+ }
+
+ /**
+ * 删除就诊人列表信息
+ *
+ * @param id 就诊人列表ID
+ * @return 结果
+ */
+ @Override
+ public int deletePatientListById(Long id)
+ {
+ return patientListMapper.deletePatientListById(id);
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/ScrcuOfflineOrdersServiceImpl.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/ScrcuOfflineOrdersServiceImpl.java
new file mode 100644
index 000000000..a4e950407
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/ScrcuOfflineOrdersServiceImpl.java
@@ -0,0 +1,97 @@
+package com.ruoyi.bend.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.bend.mapper.ScrcuOfflineOrdersMapper;
+import com.ruoyi.bend.domain.ScrcuOfflineOrders;
+import com.ruoyi.bend.service.IScrcuOfflineOrdersService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 线下订单Service业务层处理
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+@Service
+public class ScrcuOfflineOrdersServiceImpl implements IScrcuOfflineOrdersService
+{
+ @Autowired
+ private ScrcuOfflineOrdersMapper scrcuOfflineOrdersMapper;
+
+ /**
+ * 查询线下订单
+ *
+ * @param id 线下订单ID
+ * @return 线下订单
+ */
+ @Override
+ public ScrcuOfflineOrders selectScrcuOfflineOrdersById(Long id)
+ {
+ return scrcuOfflineOrdersMapper.selectScrcuOfflineOrdersById(id);
+ }
+
+ /**
+ * 查询线下订单列表
+ *
+ * @param scrcuOfflineOrders 线下订单
+ * @return 线下订单
+ */
+ @Override
+ public List selectScrcuOfflineOrdersList(ScrcuOfflineOrders scrcuOfflineOrders)
+ {
+ return scrcuOfflineOrdersMapper.selectScrcuOfflineOrdersList(scrcuOfflineOrders);
+ }
+
+ /**
+ * 新增线下订单
+ *
+ * @param scrcuOfflineOrders 线下订单
+ * @return 结果
+ */
+ @Override
+ public int insertScrcuOfflineOrders(ScrcuOfflineOrders scrcuOfflineOrders)
+ {
+ scrcuOfflineOrders.setCreateTime(DateUtils.getNowDate());
+ return scrcuOfflineOrdersMapper.insertScrcuOfflineOrders(scrcuOfflineOrders);
+ }
+
+ /**
+ * 修改线下订单
+ *
+ * @param scrcuOfflineOrders 线下订单
+ * @return 结果
+ */
+ @Override
+ public int updateScrcuOfflineOrders(ScrcuOfflineOrders scrcuOfflineOrders)
+ {
+ scrcuOfflineOrders.setUpdateTime(DateUtils.getNowDate());
+ return scrcuOfflineOrdersMapper.updateScrcuOfflineOrders(scrcuOfflineOrders);
+ }
+
+ /**
+ * 删除线下订单对象
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ @Override
+ public int deleteScrcuOfflineOrdersByIds(String ids)
+ {
+ return scrcuOfflineOrdersMapper.deleteScrcuOfflineOrdersByIds(Convert.toStrArray(ids));
+ }
+
+ /**
+ * 删除线下订单信息
+ *
+ * @param id 线下订单ID
+ * @return 结果
+ */
+ @Override
+ public int deleteScrcuOfflineOrdersById(Long id)
+ {
+ return scrcuOfflineOrdersMapper.deleteScrcuOfflineOrdersById(id);
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/ScrcuOfflineRefundOrdersServiceImpl.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/ScrcuOfflineRefundOrdersServiceImpl.java
new file mode 100644
index 000000000..61e30e226
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/ScrcuOfflineRefundOrdersServiceImpl.java
@@ -0,0 +1,96 @@
+package com.ruoyi.bend.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.bend.mapper.ScrcuOfflineRefundOrdersMapper;
+import com.ruoyi.bend.domain.ScrcuOfflineRefundOrders;
+import com.ruoyi.bend.service.IScrcuOfflineRefundOrdersService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 扫码退款Service业务层处理
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+@Service
+public class ScrcuOfflineRefundOrdersServiceImpl implements IScrcuOfflineRefundOrdersService
+{
+ @Autowired
+ private ScrcuOfflineRefundOrdersMapper scrcuOfflineRefundOrdersMapper;
+
+ /**
+ * 查询扫码退款
+ *
+ * @param id 扫码退款ID
+ * @return 扫码退款
+ */
+ @Override
+ public ScrcuOfflineRefundOrders selectScrcuOfflineRefundOrdersById(Long id)
+ {
+ return scrcuOfflineRefundOrdersMapper.selectScrcuOfflineRefundOrdersById(id);
+ }
+
+ /**
+ * 查询扫码退款列表
+ *
+ * @param scrcuOfflineRefundOrders 扫码退款
+ * @return 扫码退款
+ */
+ @Override
+ public List selectScrcuOfflineRefundOrdersList(ScrcuOfflineRefundOrders scrcuOfflineRefundOrders)
+ {
+ return scrcuOfflineRefundOrdersMapper.selectScrcuOfflineRefundOrdersList(scrcuOfflineRefundOrders);
+ }
+
+ /**
+ * 新增扫码退款
+ *
+ * @param scrcuOfflineRefundOrders 扫码退款
+ * @return 结果
+ */
+ @Override
+ public int insertScrcuOfflineRefundOrders(ScrcuOfflineRefundOrders scrcuOfflineRefundOrders)
+ {
+ scrcuOfflineRefundOrders.setCreateTime(DateUtils.getNowDate());
+ return scrcuOfflineRefundOrdersMapper.insertScrcuOfflineRefundOrders(scrcuOfflineRefundOrders);
+ }
+
+ /**
+ * 修改扫码退款
+ *
+ * @param scrcuOfflineRefundOrders 扫码退款
+ * @return 结果
+ */
+ @Override
+ public int updateScrcuOfflineRefundOrders(ScrcuOfflineRefundOrders scrcuOfflineRefundOrders)
+ {
+ return scrcuOfflineRefundOrdersMapper.updateScrcuOfflineRefundOrders(scrcuOfflineRefundOrders);
+ }
+
+ /**
+ * 删除扫码退款对象
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ @Override
+ public int deleteScrcuOfflineRefundOrdersByIds(String ids)
+ {
+ return scrcuOfflineRefundOrdersMapper.deleteScrcuOfflineRefundOrdersByIds(Convert.toStrArray(ids));
+ }
+
+ /**
+ * 删除扫码退款信息
+ *
+ * @param id 扫码退款ID
+ * @return 结果
+ */
+ @Override
+ public int deleteScrcuOfflineRefundOrdersById(Long id)
+ {
+ return scrcuOfflineRefundOrdersMapper.deleteScrcuOfflineRefundOrdersById(id);
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/ScrcuOnlineOrderDetailsServiceImpl.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/ScrcuOnlineOrderDetailsServiceImpl.java
new file mode 100644
index 000000000..d921fd582
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/ScrcuOnlineOrderDetailsServiceImpl.java
@@ -0,0 +1,96 @@
+package com.ruoyi.bend.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.bend.mapper.ScrcuOnlineOrderDetailsMapper;
+import com.ruoyi.bend.domain.ScrcuOnlineOrderDetails;
+import com.ruoyi.bend.service.IScrcuOnlineOrderDetailsService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 收单详情Service业务层处理
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+@Service
+public class ScrcuOnlineOrderDetailsServiceImpl implements IScrcuOnlineOrderDetailsService
+{
+ @Autowired
+ private ScrcuOnlineOrderDetailsMapper scrcuOnlineOrderDetailsMapper;
+
+ /**
+ * 查询收单详情
+ *
+ * @param id 收单详情ID
+ * @return 收单详情
+ */
+ @Override
+ public ScrcuOnlineOrderDetails selectScrcuOnlineOrderDetailsById(Long id)
+ {
+ return scrcuOnlineOrderDetailsMapper.selectScrcuOnlineOrderDetailsById(id);
+ }
+
+ /**
+ * 查询收单详情列表
+ *
+ * @param scrcuOnlineOrderDetails 收单详情
+ * @return 收单详情
+ */
+ @Override
+ public List selectScrcuOnlineOrderDetailsList(ScrcuOnlineOrderDetails scrcuOnlineOrderDetails)
+ {
+ return scrcuOnlineOrderDetailsMapper.selectScrcuOnlineOrderDetailsList(scrcuOnlineOrderDetails);
+ }
+
+ /**
+ * 新增收单详情
+ *
+ * @param scrcuOnlineOrderDetails 收单详情
+ * @return 结果
+ */
+ @Override
+ public int insertScrcuOnlineOrderDetails(ScrcuOnlineOrderDetails scrcuOnlineOrderDetails)
+ {
+ scrcuOnlineOrderDetails.setCreateTime(DateUtils.getNowDate());
+ return scrcuOnlineOrderDetailsMapper.insertScrcuOnlineOrderDetails(scrcuOnlineOrderDetails);
+ }
+
+ /**
+ * 修改收单详情
+ *
+ * @param scrcuOnlineOrderDetails 收单详情
+ * @return 结果
+ */
+ @Override
+ public int updateScrcuOnlineOrderDetails(ScrcuOnlineOrderDetails scrcuOnlineOrderDetails)
+ {
+ return scrcuOnlineOrderDetailsMapper.updateScrcuOnlineOrderDetails(scrcuOnlineOrderDetails);
+ }
+
+ /**
+ * 删除收单详情对象
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ @Override
+ public int deleteScrcuOnlineOrderDetailsByIds(String ids)
+ {
+ return scrcuOnlineOrderDetailsMapper.deleteScrcuOnlineOrderDetailsByIds(Convert.toStrArray(ids));
+ }
+
+ /**
+ * 删除收单详情信息
+ *
+ * @param id 收单详情ID
+ * @return 结果
+ */
+ @Override
+ public int deleteScrcuOnlineOrderDetailsById(Long id)
+ {
+ return scrcuOnlineOrderDetailsMapper.deleteScrcuOnlineOrderDetailsById(id);
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/ScrcuOnlineOrdersServiceImpl.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/ScrcuOnlineOrdersServiceImpl.java
new file mode 100644
index 000000000..524d3b277
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/ScrcuOnlineOrdersServiceImpl.java
@@ -0,0 +1,146 @@
+package com.ruoyi.bend.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.ArrayList;
+import com.ruoyi.common.utils.StringUtils;
+import org.springframework.transaction.annotation.Transactional;
+import com.ruoyi.bend.domain.ScrcuOnlineOrderDetails;
+import com.ruoyi.bend.mapper.ScrcuOnlineOrdersMapper;
+import com.ruoyi.bend.domain.ScrcuOnlineOrders;
+import com.ruoyi.bend.service.IScrcuOnlineOrdersService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 收单列表Service业务层处理
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+@Service
+public class ScrcuOnlineOrdersServiceImpl implements IScrcuOnlineOrdersService
+{
+ @Autowired
+ private ScrcuOnlineOrdersMapper scrcuOnlineOrdersMapper;
+
+ /**
+ * 查询收单列表
+ *
+ * @param id 收单列表ID
+ * @return 收单列表
+ */
+ @Override
+ public ScrcuOnlineOrders selectScrcuOnlineOrdersById(Long id)
+ {
+ return scrcuOnlineOrdersMapper.selectScrcuOnlineOrdersById(id);
+ }
+
+ /**
+ * 查询收单列表列表
+ *
+ * @param scrcuOnlineOrders 收单列表
+ * @return 收单列表
+ */
+ @Override
+ public List selectScrcuOnlineOrdersList(ScrcuOnlineOrders scrcuOnlineOrders)
+ {
+ return scrcuOnlineOrdersMapper.selectScrcuOnlineOrdersList(scrcuOnlineOrders);
+ }
+
+ /**
+ * 新增收单列表
+ *
+ * @param scrcuOnlineOrders 收单列表
+ * @return 结果
+ */
+ @Transactional
+ @Override
+ public int insertScrcuOnlineOrders(ScrcuOnlineOrders scrcuOnlineOrders)
+ {
+ scrcuOnlineOrders.setCreateTime(DateUtils.getNowDate());
+ int rows = scrcuOnlineOrdersMapper.insertScrcuOnlineOrders(scrcuOnlineOrders);
+ insertScrcuOnlineOrderDetails(scrcuOnlineOrders);
+ return rows;
+ }
+
+ /**
+ * 修改收单列表
+ *
+ * @param scrcuOnlineOrders 收单列表
+ * @return 结果
+ */
+ @Transactional
+ @Override
+ public int updateScrcuOnlineOrders(ScrcuOnlineOrders scrcuOnlineOrders)
+ {
+ scrcuOnlineOrders.setUpdateTime(DateUtils.getNowDate());
+ scrcuOnlineOrdersMapper.deleteScrcuOnlineOrderDetailsByOrderNumber(scrcuOnlineOrders.getId());
+ insertScrcuOnlineOrderDetails(scrcuOnlineOrders);
+ return scrcuOnlineOrdersMapper.updateScrcuOnlineOrders(scrcuOnlineOrders);
+ }
+
+ /**
+ * 删除收单列表对象
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ @Transactional
+ @Override
+ public int deleteScrcuOnlineOrdersByIds(String ids)
+ {
+ scrcuOnlineOrdersMapper.deleteScrcuOnlineOrderDetailsByOrderNumbers(Convert.toStrArray(ids));
+ return scrcuOnlineOrdersMapper.deleteScrcuOnlineOrdersByIds(Convert.toStrArray(ids));
+ }
+
+ /**
+ * 删除收单列表信息
+ *
+ * @param id 收单列表ID
+ * @return 结果
+ */
+ @Override
+ public int deleteScrcuOnlineOrdersById(Long id)
+ {
+ scrcuOnlineOrdersMapper.deleteScrcuOnlineOrderDetailsByOrderNumber(id);
+ return scrcuOnlineOrdersMapper.deleteScrcuOnlineOrdersById(id);
+ }
+
+ /**
+ * 新增收单详情信息
+ *
+ * @param scrcuOnlineOrders 收单列表对象
+ */
+ public void insertScrcuOnlineOrderDetails(ScrcuOnlineOrders scrcuOnlineOrders)
+ {
+ List scrcuOnlineOrderDetailsList = scrcuOnlineOrders.getScrcuOnlineOrderDetailsList();
+ Long id = scrcuOnlineOrders.getId();
+ if (StringUtils.isNotNull(scrcuOnlineOrderDetailsList))
+ {
+ List list = new ArrayList();
+ for (ScrcuOnlineOrderDetails scrcuOnlineOrderDetails : scrcuOnlineOrderDetailsList)
+ {
+ scrcuOnlineOrderDetails.setId(id);
+ list.add(scrcuOnlineOrderDetails);
+ }
+ if (list.size() > 0)
+ {
+ scrcuOnlineOrdersMapper.batchScrcuOnlineOrderDetails(list);
+ }
+ }
+ }
+
+ /**
+ * 查询在线收单
+ *
+ * @param scrcuOnlineOrders 在线收单ID
+ * @return 在线收单
+ */
+ @Override
+ public ScrcuOnlineOrders selectScrcuOnlineOrders(ScrcuOnlineOrders scrcuOnlineOrders)
+ {
+ return scrcuOnlineOrdersMapper.selectOne(scrcuOnlineOrders);
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/ScrcuOnlineRefundOrdersServiceImpl.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/ScrcuOnlineRefundOrdersServiceImpl.java
new file mode 100644
index 000000000..4b7b03b5a
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/ScrcuOnlineRefundOrdersServiceImpl.java
@@ -0,0 +1,96 @@
+package com.ruoyi.bend.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.bend.mapper.ScrcuOnlineRefundOrdersMapper;
+import com.ruoyi.bend.domain.ScrcuOnlineRefundOrders;
+import com.ruoyi.bend.service.IScrcuOnlineRefundOrdersService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 退款订单Service业务层处理
+ *
+ * @author bend
+ * @date 2020-09-01
+ */
+@Service
+public class ScrcuOnlineRefundOrdersServiceImpl implements IScrcuOnlineRefundOrdersService
+{
+ @Autowired
+ private ScrcuOnlineRefundOrdersMapper scrcuOnlineRefundOrdersMapper;
+
+ /**
+ * 查询退款订单
+ *
+ * @param id 退款订单ID
+ * @return 退款订单
+ */
+ @Override
+ public ScrcuOnlineRefundOrders selectScrcuOnlineRefundOrdersById(Long id)
+ {
+ return scrcuOnlineRefundOrdersMapper.selectScrcuOnlineRefundOrdersById(id);
+ }
+
+ /**
+ * 查询退款订单列表
+ *
+ * @param scrcuOnlineRefundOrders 退款订单
+ * @return 退款订单
+ */
+ @Override
+ public List selectScrcuOnlineRefundOrdersList(ScrcuOnlineRefundOrders scrcuOnlineRefundOrders)
+ {
+ return scrcuOnlineRefundOrdersMapper.selectScrcuOnlineRefundOrdersList(scrcuOnlineRefundOrders);
+ }
+
+ /**
+ * 新增退款订单
+ *
+ * @param scrcuOnlineRefundOrders 退款订单
+ * @return 结果
+ */
+ @Override
+ public int insertScrcuOnlineRefundOrders(ScrcuOnlineRefundOrders scrcuOnlineRefundOrders)
+ {
+ scrcuOnlineRefundOrders.setCreateTime(DateUtils.getNowDate());
+ return scrcuOnlineRefundOrdersMapper.insertScrcuOnlineRefundOrders(scrcuOnlineRefundOrders);
+ }
+
+ /**
+ * 修改退款订单
+ *
+ * @param scrcuOnlineRefundOrders 退款订单
+ * @return 结果
+ */
+ @Override
+ public int updateScrcuOnlineRefundOrders(ScrcuOnlineRefundOrders scrcuOnlineRefundOrders)
+ {
+ return scrcuOnlineRefundOrdersMapper.updateScrcuOnlineRefundOrders(scrcuOnlineRefundOrders);
+ }
+
+ /**
+ * 删除退款订单对象
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ @Override
+ public int deleteScrcuOnlineRefundOrdersByIds(String ids)
+ {
+ return scrcuOnlineRefundOrdersMapper.deleteScrcuOnlineRefundOrdersByIds(Convert.toStrArray(ids));
+ }
+
+ /**
+ * 删除退款订单信息
+ *
+ * @param id 退款订单ID
+ * @return 结果
+ */
+ @Override
+ public int deleteScrcuOnlineRefundOrdersById(Long id)
+ {
+ return scrcuOnlineRefundOrdersMapper.deleteScrcuOnlineRefundOrdersById(id);
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/WechatMemberServiceImpl.java b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/WechatMemberServiceImpl.java
new file mode 100644
index 000000000..0b91dcf40
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/bend/service/impl/WechatMemberServiceImpl.java
@@ -0,0 +1,97 @@
+package com.ruoyi.bend.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.bend.mapper.WechatMemberMapper;
+import com.ruoyi.bend.domain.WechatMember;
+import com.ruoyi.bend.service.IWechatMemberService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 微信用户Service业务层处理
+ *
+ * @author bend
+ * @date 2020-08-30
+ */
+@Service
+public class WechatMemberServiceImpl implements IWechatMemberService
+{
+ @Autowired
+ private WechatMemberMapper wechatMemberMapper;
+
+ /**
+ * 查询微信用户
+ *
+ * @param id 微信用户ID
+ * @return 微信用户
+ */
+ @Override
+ public WechatMember selectWechatMemberById(Long id)
+ {
+ return wechatMemberMapper.selectWechatMemberById(id);
+ }
+
+ /**
+ * 查询微信用户列表
+ *
+ * @param wechatMember 微信用户
+ * @return 微信用户
+ */
+ @Override
+ public List selectWechatMemberList(WechatMember wechatMember)
+ {
+ return wechatMemberMapper.selectWechatMemberList(wechatMember);
+ }
+
+ /**
+ * 新增微信用户
+ *
+ * @param wechatMember 微信用户
+ * @return 结果
+ */
+ @Override
+ public int insertWechatMember(WechatMember wechatMember)
+ {
+ wechatMember.setCreateTime(DateUtils.getNowDate());
+ return wechatMemberMapper.insertWechatMember(wechatMember);
+ }
+
+ /**
+ * 修改微信用户
+ *
+ * @param wechatMember 微信用户
+ * @return 结果
+ */
+ @Override
+ public int updateWechatMember(WechatMember wechatMember)
+ {
+ wechatMember.setUpdateTime(DateUtils.getNowDate());
+ return wechatMemberMapper.updateWechatMember(wechatMember);
+ }
+
+ /**
+ * 删除微信用户对象
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ @Override
+ public int deleteWechatMemberByIds(String ids)
+ {
+ return wechatMemberMapper.deleteWechatMemberByIds(Convert.toStrArray(ids));
+ }
+
+ /**
+ * 删除微信用户信息
+ *
+ * @param id 微信用户ID
+ * @return 结果
+ */
+ @Override
+ public int deleteWechatMemberById(Long id)
+ {
+ return wechatMemberMapper.deleteWechatMemberById(id);
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisController.java
new file mode 100644
index 000000000..86bdb5ddd
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisController.java
@@ -0,0 +1,409 @@
+package com.ruoyi.his.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.TypeReference;
+import com.bending.core.his.bo.PayAccountBO;
+import com.bending.core.his.common.HISResult;
+import com.bending.core.his.constant.HisConstant;
+import com.bending.core.his.entity.*;
+import com.bending.core.his.vo.*;
+import com.bending.core.utils.HISClientUtil;
+import com.ruoyi.common.func.IConstant;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.func.Func;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.bean.BeanUtils;
+import com.ruoyi.his.domain.*;
+import com.ruoyi.his.service.*;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.function.Function;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+
+import static java.util.stream.Collectors.toList;
+
+@RestController
+@RequestMapping("his/v1/sync")
+@Api(value = "HIS同步数据接口", tags = "HIS同步数据接口")
+public class HisController {
+ @Resource
+ private HISClientUtil hisClientUtil;
+ @Resource
+ private IHisHospitalInfoService iHisHospitalInfoService;
+ @Resource
+ private IHisDepartmentService iHisDepartmentService;
+ @Resource
+ private IHisDoctorDepartmentService iHisDoctorDepartmentService;
+ @Resource
+ private IHisDoctorService iHisDoctorService;
+ @Resource
+ private IHisRegistrationTemplateService iHisRegistrationTemplateService;
+ @Resource
+ private IHisPayAccountService iHisPayAccountService;
+ @Resource
+ private IHisFeeItemService hisFeeItemService;
+ @Resource
+ private IHisDoctorScheduleService iHisDoctorScheduleService;
+
+ @ApiOperation("获取挂号模板")
+ @GetMapping("/template/list")
+ public AjaxResult templateList(String orgCode) {
+ HisHospitalInfo hisHospitalInfo = iHisHospitalInfoService.selectHisHospitalInfoByOrgCode(orgCode);
+ if (null == hisHospitalInfo) {
+ return AjaxResult.error("指定机构不存在!");
+ }
+ RegistrationTemplate registrationTemplate = new RegistrationTemplate();
+ registrationTemplate.setOrgCode(orgCode);
+ registrationTemplate.setTemplateId("");
+ HISResult hisResult = hisClientUtil.getRegistrationTemplateList(registrationTemplate);
+ if (HisConstant.RESULT_SUCCESS_CODE.equals(hisResult.getResult())) {
+ TypeReference> typeRef = new TypeReference>() {
+ };
+ List list = JSON.parseObject(hisResult.getMsg(), typeRef);
+ //保存数据到本地数据库
+ for (RegistrationTemplateVO vo : list) {
+ //每次更新时,查询是否已经存在
+ String s = vo.getTemplateName().replaceAll("\\s*", "");
+ vo.setTemplateName(Func.cleanChars(s));
+ HisRegistrationTemplate hisRegistrationTemplate = Func.copy(vo, HisRegistrationTemplate.class);
+ hisRegistrationTemplate.setIsShow(0);
+ hisRegistrationTemplate.setFee(vo.getRegistrationAmount());
+ hisRegistrationTemplate.setOrgCode(orgCode);
+ hisRegistrationTemplate.setOrgName(hisHospitalInfo.getOrgName());
+ iHisRegistrationTemplateService.insertHisRegistrationTemplate(hisRegistrationTemplate);
+ }
+ return AjaxResult.success(list);
+ }
+ return AjaxResult.error(hisResult.getMsg());
+ }
+
+ @ApiOperation("获取机构列表")
+ @GetMapping("/hospital/list")
+ public AjaxResult hospitalList(String orgName) {
+ HospitalInfo hospitalInfo = new HospitalInfo();
+ hospitalInfo.setOrgName(orgName);
+ HISResult hisResult = hisClientUtil.getHospitalInfoByList(hospitalInfo);
+ if (HisConstant.RESULT_SUCCESS_CODE.equals(hisResult.getResult())) {
+ TypeReference> typeRef = new TypeReference>() {
+ };
+ List list = JSON.parseObject(hisResult.getMsg(), typeRef);
+ if (CollectionUtils.isNotEmpty(list)) {
+ for (HospitalInfoVO hospitalInfoVO : list) {
+ HisHospitalInfo hisHospitalInfo = iHisHospitalInfoService.selectHisHospitalInfoByOrgCode(hospitalInfoVO.getOrgCode());
+ if (null == hisHospitalInfo) {
+ hisHospitalInfo = new HisHospitalInfo();
+ BeanUtils.copyProperties(hospitalInfoVO, hisHospitalInfo);
+ iHisHospitalInfoService.insertHisHospitalInfo(hisHospitalInfo);
+ } else {
+ iHisHospitalInfoService.updateHisHospitalInfo(hisHospitalInfo);
+ }
+ }
+ }
+ return AjaxResult.success(list);
+ }
+ return AjaxResult.error(hisResult.getMsg());
+ }
+
+ @ApiOperation("获取科室列表")
+ @GetMapping("/dept/list")
+ public AjaxResult deptList(String orgCode) {
+ //查询本地数据库
+ HisHospitalInfo hisHospitalInfo = iHisHospitalInfoService.selectHisHospitalInfoByOrgCode(orgCode);
+ if (null == hisHospitalInfo) {
+ return AjaxResult.error("指定机构不存在!");
+ }
+ //HIS医院综合目录
+ ComprehensiveCatalogue comprehensiveCatalogue = new ComprehensiveCatalogue();
+ comprehensiveCatalogue.setDirectoryType(HisConstant.CATALOG_TYPE_1);
+ comprehensiveCatalogue.setOrgCode(orgCode);
+ HISResult hisResult = hisClientUtil.getComprehensiveCatalogueList(comprehensiveCatalogue);
+ if (HisConstant.RESULT_SUCCESS_CODE.equals(hisResult.getResult())) {
+ TypeReference> typeRef = new TypeReference>() {
+ };
+ List list = JSON.parseObject(hisResult.getMsg(), typeRef);
+ for (ComprehensiveCatalogueVO vo : list) {
+ String deptId = vo.getDirectoryCode();
+ HisDepartment hisDepartment = new HisDepartment();
+ hisDepartment.setDeptId(deptId);
+ hisDepartment.setDeptName(vo.getDirectoryName());
+ hisDepartment.setOrgCode(orgCode);
+ hisDepartment.setOrgName(hisHospitalInfo.getOrgName());
+ hisDepartment.setIsShow(0);
+ hisDepartment.setCreateTime(DateUtils.getNowDate());
+ int res = iHisDepartmentService.insertHisDepartment(hisDepartment);
+ //每次更新时,查询是否已经存在
+ }
+ return AjaxResult.success(list);
+ }
+ return AjaxResult.error(hisResult.getMsg());
+ }
+
+ @ApiOperation("获取医生列表")
+ @GetMapping("/doctor/list")
+ public AjaxResult doctorList(String orgCode) {
+ //查询本地数据库
+ HisHospitalInfo hisHospitalInfo = iHisHospitalInfoService.selectHisHospitalInfoByOrgCode(orgCode);
+ if (null == hisHospitalInfo) {
+ return AjaxResult.error("指定机构不存在!");
+ }
+ //HIS医院综合目录
+ ComprehensiveCatalogue comprehensiveCatalogue = new ComprehensiveCatalogue();
+ comprehensiveCatalogue.setDirectoryType(HisConstant.CATALOG_TYPE_2);
+ comprehensiveCatalogue.setOrgCode(orgCode);
+ HISResult hisResult = hisClientUtil.getComprehensiveCatalogueList(comprehensiveCatalogue);
+ if (HisConstant.RESULT_SUCCESS_CODE.equals(hisResult.getResult())) {
+ TypeReference> typeRef = new TypeReference>() {
+ };
+ List list = JSON.parseObject(hisResult.getMsg(), typeRef);
+
+ //医生分组,但是数据没有去重。
+ Map> map = list.stream().collect(Collectors.groupingBy(ComprehensiveCatalogueVO::getDirectoryCode));
+ // 医生与科室对应关系
+ // Map --> Map>
+ Map> doctorMapR = new HashMap<>();
+ map.forEach((doctorId, voList) -> {
+ //拿到科室ID,就是科室去重
+ List tempList = voList.stream().filter(distinctByKey(ComprehensiveCatalogueVO::getRemark)).collect(Collectors.toList());
+ List deptIds = tempList.stream().map(ComprehensiveCatalogueVO::getRemark).collect(Collectors.toList());
+ doctorMapR.put(doctorId, deptIds);
+ });
+ //保存医生与科室的对应关系
+ doctorMapR.forEach((doctorId, deptIds) -> {
+ deptIds.forEach(deptId -> {
+ //每次更新时,查询是否已经存在对应关系
+ HisDoctorDepartment doctorDepartment = new HisDoctorDepartment();
+ //一个医生理论上对应一个科室,实际上是对应多个科室的.
+ doctorDepartment.setDeptId(deptId);
+ HisDepartment hisDepartment = iHisDepartmentService.selectHisDepartmentByDeptId(deptId);
+ doctorDepartment.setDeptName(null != hisDepartment ? hisDepartment.getDeptName() : "");
+ doctorDepartment.setDoctorId(doctorId);
+ doctorDepartment.setOrgCode(orgCode);
+ doctorDepartment.setIsShow(0);
+ iHisDoctorDepartmentService.insertHisDoctorDepartment(doctorDepartment);
+ });
+ });
+
+ //根据医生ID去重
+ List voList = list.stream().filter(distinctByKey(ComprehensiveCatalogueVO::getDirectoryCode)).collect(Collectors.toList());
+ for (ComprehensiveCatalogueVO v : voList) {
+ HisDoctor hisDoctor = new HisDoctor();
+ hisDoctor.setDoctorId(v.getDirectoryCode());
+ hisDoctor.setDoctorName(v.getDirectoryName());
+ //备注[目录类型1: 返回医生所在科室的编码;目录类型3: 返回床位所在的病区编码.]
+ hisDoctor.setDeptId(v.getRemark()); //随机设置一个默认科室
+ HisDepartment hisDepartment = iHisDepartmentService.selectHisDepartmentByDeptId(v.getRemark());
+ hisDoctor.setDeptName(null != hisDepartment ? hisDepartment.getDeptName() : "");
+ hisDoctor.setOrgCode(orgCode);
+ hisDoctor.setOrgName(hisHospitalInfo.getOrgName());
+ hisDoctor.setIsShow(0);
+ iHisDoctorService.insertHisDoctor(hisDoctor);
+ }
+ //每次更新时,查询是否已经存在
+ return AjaxResult.success(list);
+ }
+ return AjaxResult.error(hisResult.getMsg());
+ }
+
+ private static Predicate distinctByKey(Function super T, ?> keyExtractor) {
+ Map seen = new ConcurrentHashMap<>();
+ return t -> seen.putIfAbsent(keyExtractor.apply(t), Boolean.TRUE) == null;
+ }
+
+
+ @GetMapping("/payment/list")
+ @ApiOperation(value = "HIS同步数据接口:机构支付方式列表", notes = "传入查询参数")
+ public AjaxResult queryHospitalPayment(@ApiParam(name = "orgCode", value = "机构ID", required = true) @RequestParam String orgCode) {
+ HisHospitalInfo hisHospitalInfo = iHisHospitalInfoService.selectHisHospitalInfoByOrgCode(orgCode);
+ if (null == hisHospitalInfo) {
+ return AjaxResult.error("指定机构不存在!");
+ }
+ HospitalPayment hospitalPayment = new HospitalPayment();
+ hospitalPayment.setOrgCode(orgCode);
+ HISResult hisResult = hisClientUtil.getHospitalPaymentList(hospitalPayment);
+
+ List hisPayAccountList = new ArrayList<>();
+
+ if (HisConstant.RESULT_SUCCESS_CODE.equals(hisResult.getResult())) {
+ TypeReference> typeRef = new TypeReference>() {
+ };
+ List list = JSON.parseObject(hisResult.getMsg(), typeRef);
+ //保存数据到本地数据库
+ for (HospitalPaymentVO vo : list) {
+ List payAccountBOList = vo.getOrgAcc();
+ payAccountBOList.forEach(bo -> {
+ HisPayAccount payAccount = new HisPayAccount();
+ Func.copy(bo, payAccount);
+ payAccount.setAccId(bo.getId());
+ hisPayAccountList.add(payAccount);
+ });
+ }
+ if (Func.isNotEmpty(hisPayAccountList)) {
+ iHisPayAccountService.insertHisPayAccountBatch(hisPayAccountList);
+ }
+ return AjaxResult.success(hisPayAccountList);
+ }
+ return AjaxResult.error(hisResult.getMsg());
+ }
+
+
+ @GetMapping("/fee/item/list")
+ @ApiOperation(value = "HIS同步数据接口:挂号费用类型")
+ public AjaxResult queryHisFeeItem() {
+ List hisFeeItemList = new ArrayList<>();
+ RegistrationFeeType registrationFeeType = new RegistrationFeeType();
+ HISResult hisResult = hisClientUtil.getFeeItemList(registrationFeeType);
+ if (HisConstant.RESULT_SUCCESS_CODE.equals(hisResult.getResult())) {
+ TypeReference> typeRef = new TypeReference>() {
+ };
+ List list = JSON.parseObject(hisResult.getMsg(), typeRef);
+ if (Func.isNotEmpty(list)) {
+ for (RegistrationFeeTypeVO vo : list) {
+ HisFeeItem hisFeeItem = new HisFeeItem();
+ Func.copy(vo, hisFeeItem);
+ hisFeeItem.setIsShow(IConstant.ZERO.getValue());
+ hisFeeItem.setCreateTime(DateUtils.getNowDate());
+ hisFeeItemList.add(hisFeeItem);
+ }
+ }
+ if (Func.isNotEmpty(hisFeeItemList)) {
+ hisFeeItemService.insertHisFeeItemBatch(hisFeeItemList);
+ }
+ return AjaxResult.success(hisFeeItemList);
+ } else {
+ return AjaxResult.error(hisResult.getMsg());
+ }
+ }
+
+ /**
+ * /his/v1/sync/doctor/schedule
+ * 同步医生排班信息
+ *
+ * @param orgCode 机构ID
+ * @return
+ */
+ @GetMapping("/doctor/schedule")
+ @ApiOperation(value = "HIS同步数据接口:医生排班信息", notes = "传入查询参数")
+ public AjaxResult queryDoctorSchedule(@ApiParam(name = "orgCode", value = "机构ID") @RequestParam(required = false) String orgCode) {
+ Date nowDate = DateUtils.getNowDate();
+ Date beginTime = Func.minusDays(nowDate, 1);//-days天
+ Date endTime = Func.plusDays(nowDate, 1);//+days天
+ if (Func.isNotEmpty(orgCode)) {
+ HisHospitalInfo hospitalInfo = iHisHospitalInfoService.selectHisHospitalInfoByOrgCode(orgCode); //机构信息
+ if (null == hospitalInfo) return AjaxResult.error("指定机构不存在!");
+ syncDoctorSchedule(hospitalInfo, beginTime, endTime);
+ } else {
+ HisHospitalInfo hospitalInfoQuery = new HisHospitalInfo();
+ hospitalInfoQuery.setIsShow(IConstant.ONE.getValue());
+ List hospitalInfoList = iHisHospitalInfoService.selectHisHospitalInfoList(hospitalInfoQuery);
+ if (Func.isNotEmpty(hospitalInfoList)) {
+ hospitalInfoList.forEach(hospitalInfo -> {
+ syncDoctorSchedule(hospitalInfo, beginTime, endTime);
+ });
+ }
+ }
+ return AjaxResult.success("医生排班同步完成!");
+ }
+
+ private void syncDoctorSchedule(HisHospitalInfo hospitalInfo, Date beginTime, Date endTime) {
+ if (null == hospitalInfo) return;
+ String orgName = Func.isNotEmpty(hospitalInfo) ? hospitalInfo.getOrgName() : "";
+ String orgCode = hospitalInfo.getOrgCode();
+ //班次判断是否存在
+ HisDoctorSchedule doctorScheduleQuery = new HisDoctorSchedule();
+ doctorScheduleQuery.setOrgCode(orgCode);
+ Map paramsQuery = new HashMap<>();
+ //删除过期排班老数据
+ Date beginScheduleDate = Func.minusDays(beginTime, 7); //当前日期过去的days
+ Date endScheduleDate = Func.minusDays(beginTime, 1); //昨天
+ paramsQuery.put("beginScheduleDate", Func.formatDate(beginScheduleDate, DateUtils.YYYY_MM_DD));
+ paramsQuery.put("endScheduleDate", Func.formatDate(endScheduleDate, DateUtils.YYYY_MM_DD));
+ doctorScheduleQuery.setParams(paramsQuery);
+ List oldScheduleList = iHisDoctorScheduleService.selectHisDoctorScheduleList(doctorScheduleQuery);
+ if (Func.isNotEmpty(oldScheduleList)) {
+ List idsList = oldScheduleList.stream().map(HisDoctorSchedule::getId).collect(toList());
+ String ids = Func.join(idsList, ",");
+ iHisDoctorScheduleService.deleteHisDoctorScheduleByIds(ids);
+ }
+ //医生列表(正常在线)
+ HisDoctor hisDoctor = new HisDoctor();
+ hisDoctor.setOrgCode(orgCode);
+ hisDoctor.setIsShow(IConstant.ONE.getValue());
+ List doctorList = iHisDoctorService.selectHisDoctorList(hisDoctor);
+ if (Func.isNotEmpty(doctorList)) {
+ // 新数据
+ List newDoctorScheduleList = new ArrayList<>();
+ List oldDoctorScheduleList = new ArrayList<>();
+
+ doctorList.forEach(doctor -> {
+ DoctorSchedule doctorSchedule = new DoctorSchedule();
+ doctorSchedule.setOrgCode(orgCode);
+ doctorSchedule.setDoctorId(doctor.getDoctorId());
+ //查询日期限制在7天内,yyyy-MM-dd
+ doctorSchedule.setBeginTime(Func.formatDate(beginTime));
+ doctorSchedule.setEndTime(Func.formatDate(endTime));
+ HISResult hisResult = hisClientUtil.getDoctorScheduleList(doctorSchedule);
+ if (HisConstant.RESULT_SUCCESS_CODE.equals(hisResult.getResult())) {
+ TypeReference> typeRef = new TypeReference>() {
+ };
+ List list = JSON.parseObject(hisResult.getMsg(), typeRef);
+ if (Func.isNotEmpty(list)) {
+ for (DoctorScheduleVO vo : list) {
+ String shift = Func.trimWhitespace(vo.getScheduleShift());
+ Date scheduleDate = Func.parse(vo.getScheduleDate(), "yyyy-MM-dd");
+ //班次判断是否存在 --老数据
+ HisDoctorSchedule hisDoctorScheduleQuery = new HisDoctorSchedule();
+ hisDoctorScheduleQuery.setOrgCode(orgCode);
+ hisDoctorScheduleQuery.setDoctorId(vo.getDoctorId());
+ hisDoctorScheduleQuery.setScheduleDate(scheduleDate);
+ hisDoctorScheduleQuery.setScheduleShift(shift);
+ HisDoctorSchedule hisDoctorSchedule = iHisDoctorScheduleService.selectHisDoctorSchedule(hisDoctorScheduleQuery);
+ if (null == hisDoctorSchedule) {
+ hisDoctorSchedule = new HisDoctorSchedule();
+ hisDoctorSchedule.setScheduleDate(scheduleDate);
+ hisDoctorSchedule.setOrgCode(orgCode);
+ hisDoctorSchedule.setOrgName(orgName);
+ hisDoctorSchedule.setCreateTime(DateUtils.getNowDate());
+ hisDoctorSchedule.setIsShow(IConstant.ONE.getValue());
+ Func.copy(vo, hisDoctorSchedule);
+ if (HisConstant.MORNING.equals(shift)) {
+ hisDoctorSchedule.setScheduleTag(IConstant.ONE.getValue());
+ }
+ if (HisConstant.AFTERNOON.equals(shift)) {
+ hisDoctorSchedule.setScheduleTag(IConstant.TWO.getValue());
+ }
+ newDoctorScheduleList.add(hisDoctorSchedule);
+ } else {
+ Func.copy(vo, hisDoctorSchedule);
+ if (HisConstant.MORNING.equals(shift)) {
+ hisDoctorSchedule.setScheduleTag(IConstant.ONE.getValue());
+ }
+ if (HisConstant.AFTERNOON.equals(shift)) {
+ hisDoctorSchedule.setScheduleTag(IConstant.TWO.getValue());
+ }
+ oldDoctorScheduleList.add(hisDoctorSchedule);
+ }
+ }
+ }
+ }
+ });
+
+ if (Func.isNotEmpty(newDoctorScheduleList)) {
+ iHisDoctorScheduleService.insertHisDoctorScheduleBatch(newDoctorScheduleList);
+ }
+ if (Func.isNotEmpty(oldDoctorScheduleList)) {
+ iHisDoctorScheduleService.updateHisDoctorScheduleBatch(oldDoctorScheduleList);
+ }
+ }
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisDepartmentController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisDepartmentController.java
new file mode 100644
index 000000000..e9c863feb
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisDepartmentController.java
@@ -0,0 +1,138 @@
+package com.ruoyi.his.controller;
+
+import java.util.List;
+
+import com.ruoyi.his.domain.HisDoctorDepartment;
+import com.ruoyi.his.service.IHisDoctorDepartmentService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.his.domain.HisDepartment;
+import com.ruoyi.his.service.IHisDepartmentService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 科室Controller
+ *
+ * @author bend
+ * @date 2020-07-01
+ */
+@Controller
+@RequestMapping("/his/department")
+public class HisDepartmentController extends BaseController
+{
+ private String prefix = "his/department";
+
+ @Autowired
+ private IHisDepartmentService hisDepartmentService;
+ @Autowired
+ private IHisDoctorDepartmentService iHisDoctorDepartmentService;
+
+ @RequiresPermissions("his:department:view")
+ @GetMapping()
+ public String department()
+ {
+ return prefix + "/department";
+ }
+
+ /**
+ * 查询科室列表
+ */
+ @RequiresPermissions("his:department:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisDepartment hisDepartment)
+ {
+ startPage();
+ List list = hisDepartmentService.selectHisDepartmentList(hisDepartment);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出科室列表
+ */
+ @RequiresPermissions("his:department:export")
+ @Log(title = "科室", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(HisDepartment hisDepartment)
+ {
+ List list = hisDepartmentService.selectHisDepartmentList(hisDepartment);
+ ExcelUtil util = new ExcelUtil(HisDepartment.class);
+ return util.exportExcel(list, "department");
+ }
+
+ /**
+ * 新增科室
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存科室
+ */
+ @RequiresPermissions("his:department:add")
+ @Log(title = "科室", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(HisDepartment hisDepartment)
+ {
+ return toAjax(hisDepartmentService.insertHisDepartment(hisDepartment));
+ }
+
+ /**
+ * 修改科室
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ HisDepartment hisDepartment = hisDepartmentService.selectHisDepartmentById(id);
+ mmap.put("hisDepartment", hisDepartment);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存科室
+ */
+ @RequiresPermissions("his:department:edit")
+ @Log(title = "科室", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(HisDepartment hisDepartment)
+ {
+ //科室更新时 同步更新对应关系
+ String deptId = hisDepartment.getDeptId();
+ HisDoctorDepartment hisDoctorDepartment = new HisDoctorDepartment();
+ hisDoctorDepartment.setDeptId(deptId);
+ hisDoctorDepartment.setIsShow(hisDepartment.getIsShow());
+ iHisDoctorDepartmentService.updateHisDoctorDepartmentByDeptId(hisDoctorDepartment);
+
+ return toAjax(hisDepartmentService.updateHisDepartment(hisDepartment));
+ }
+
+ /**
+ * 删除科室
+ */
+ @RequiresPermissions("his:department:remove")
+ @Log(title = "科室", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(hisDepartmentService.deleteHisDepartmentByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisDoctorController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisDoctorController.java
new file mode 100644
index 000000000..9a80b847c
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisDoctorController.java
@@ -0,0 +1,172 @@
+package com.ruoyi.his.controller;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.func.Func;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.his.domain.HisDepartment;
+import com.ruoyi.his.domain.HisDoctor;
+import com.ruoyi.his.domain.HisDoctorDepartment;
+import com.ruoyi.his.domain.HisRegistrationTemplate;
+import com.ruoyi.his.service.IHisDepartmentService;
+import com.ruoyi.his.service.IHisDoctorDepartmentService;
+import com.ruoyi.his.service.IHisDoctorService;
+import com.ruoyi.his.service.IHisRegistrationTemplateService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 医生Controller
+ *
+ * @author bend
+ * @date 2020-07-01
+ */
+@Controller
+@RequestMapping("/his/doctor")
+public class HisDoctorController extends BaseController
+{
+ private String prefix = "his/doctor";
+
+ @Autowired
+ private IHisDoctorService hisDoctorService;
+ @Autowired
+ private IHisRegistrationTemplateService iHisRegistrationTemplateService;
+ @Autowired
+ private IHisDoctorDepartmentService iHisDoctorDepartmentService;
+ @Autowired
+ private IHisDepartmentService iHisDepartmentService;
+
+
+ @RequiresPermissions("his:doctor:view")
+ @GetMapping()
+ public String doctor()
+ {
+ return prefix + "/doctor";
+ }
+
+ /**
+ * 查询医生列表
+ */
+ @RequiresPermissions("his:doctor:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisDoctor hisDoctor)
+ {
+ startPage();
+ List list = hisDoctorService.selectHisDoctorList(hisDoctor);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出医生列表
+ */
+ @RequiresPermissions("his:doctor:export")
+ @Log(title = "医生", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(HisDoctor hisDoctor)
+ {
+ List list = hisDoctorService.selectHisDoctorList(hisDoctor);
+ ExcelUtil util = new ExcelUtil(HisDoctor.class);
+ return util.exportExcel(list, "doctor");
+ }
+
+ /**
+ * 新增医生
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存医生
+ */
+ @RequiresPermissions("his:doctor:add")
+ @Log(title = "医生", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(HisDoctor hisDoctor)
+ {
+ return toAjax(hisDoctorService.insertHisDoctor(hisDoctor));
+ }
+
+ /**
+ * 修改医生
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ HisDoctor hisDoctor = hisDoctorService.selectHisDoctorById(id);
+ mmap.put("hisDoctor", hisDoctor);
+ if(Func.isNotEmpty(hisDoctor)){
+ //编辑时可设置挂号模板
+ HisRegistrationTemplate template = new HisRegistrationTemplate();
+ template.setOrgCode(hisDoctor.getOrgCode());
+ template.setIsShow(1);
+ List hisRegistrationTemplateList = iHisRegistrationTemplateService.selectHisRegistrationTemplateList(template);
+ if (Func.isNotEmpty(hisRegistrationTemplateList)){
+ mmap.put("hisRegistrationTemplateList", hisRegistrationTemplateList);
+ }
+ //修改默认科室
+ HisDoctorDepartment hisDoctorDepartment= new HisDoctorDepartment();
+ hisDoctorDepartment.setDoctorId(hisDoctor.getDoctorId());
+ List hisDoctorDepartmentList = iHisDoctorDepartmentService.selectHisDoctorDepartmentList(hisDoctorDepartment);
+ if (Func.isNotEmpty(hisDoctorDepartmentList)){
+ mmap.put("hisDoctorDepartmentList", hisDoctorDepartmentList);
+ }
+ }
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存医生
+ */
+ @RequiresPermissions("his:doctor:edit")
+ @Log(title = "医生", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(HisDoctor hisDoctor)
+ {
+ //根据挂号模板ID获取模板名称
+ String templateId = hisDoctor.getTemplateId();
+ if (Func.isNotEmpty(templateId)){
+ HisRegistrationTemplate template = new HisRegistrationTemplate();
+ template.setTemplateId(templateId);
+ HisRegistrationTemplate hisRegistrationTemplate = iHisRegistrationTemplateService.selectHisRegistrationTemplate(template);
+ if (Func.isNotEmpty(hisRegistrationTemplate)){
+ hisDoctor.setTemplateName(hisRegistrationTemplate.getTemplateName());
+ }
+ }
+ //设置默认科室
+ String deptId = hisDoctor.getDeptId();
+ if (Func.isNotEmpty(deptId)){
+ HisDepartment hisDepartment = iHisDepartmentService.selectHisDepartmentByDeptId(deptId);
+ if (Func.isNotEmpty(hisDepartment)){
+ hisDoctor.setDeptName(hisDepartment.getDeptName());
+ }
+ }
+ return toAjax(hisDoctorService.updateHisDoctor(hisDoctor));
+ }
+
+ /**
+ * 删除医生
+ */
+ @RequiresPermissions("his:doctor:remove")
+ @Log(title = "医生", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(hisDoctorService.deleteHisDoctorByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisDoctorDepartmentController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisDoctorDepartmentController.java
new file mode 100644
index 000000000..2517129bb
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisDoctorDepartmentController.java
@@ -0,0 +1,126 @@
+package com.ruoyi.his.controller;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.his.domain.HisDoctorDepartment;
+import com.ruoyi.his.service.IHisDoctorDepartmentService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 医生科室关系Controller
+ *
+ * @author bend
+ * @date 2020-07-01
+ */
+@Controller
+@RequestMapping("/his/doctorDepartment")
+public class HisDoctorDepartmentController extends BaseController
+{
+ private String prefix = "his/doctorDepartment";
+
+ @Autowired
+ private IHisDoctorDepartmentService hisDoctorDepartmentService;
+
+ @RequiresPermissions("his:doctorDepartment:view")
+ @GetMapping()
+ public String doctorDepartment()
+ {
+ return prefix + "/doctorDepartment";
+ }
+
+ /**
+ * 查询医生科室关系列表
+ */
+ @RequiresPermissions("his:doctorDepartment:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisDoctorDepartment hisDoctorDepartment)
+ {
+ startPage();
+ List list = hisDoctorDepartmentService.selectHisDoctorDepartmentList(hisDoctorDepartment);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出医生科室关系列表
+ */
+ @RequiresPermissions("his:doctorDepartment:export")
+ @Log(title = "医生科室关系", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(HisDoctorDepartment hisDoctorDepartment)
+ {
+ List list = hisDoctorDepartmentService.selectHisDoctorDepartmentList(hisDoctorDepartment);
+ ExcelUtil util = new ExcelUtil(HisDoctorDepartment.class);
+ return util.exportExcel(list, "doctorDepartment");
+ }
+
+ /**
+ * 新增医生科室关系
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存医生科室关系
+ */
+ @RequiresPermissions("his:doctorDepartment:add")
+ @Log(title = "医生科室关系", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(HisDoctorDepartment hisDoctorDepartment)
+ {
+ return toAjax(hisDoctorDepartmentService.insertHisDoctorDepartment(hisDoctorDepartment));
+ }
+
+ /**
+ * 修改医生科室关系
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ HisDoctorDepartment hisDoctorDepartment = hisDoctorDepartmentService.selectHisDoctorDepartmentById(id);
+ mmap.put("hisDoctorDepartment", hisDoctorDepartment);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存医生科室关系
+ */
+ @RequiresPermissions("his:doctorDepartment:edit")
+ @Log(title = "医生科室关系", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(HisDoctorDepartment hisDoctorDepartment)
+ {
+ return toAjax(hisDoctorDepartmentService.updateHisDoctorDepartment(hisDoctorDepartment));
+ }
+
+ /**
+ * 删除医生科室关系
+ */
+ @RequiresPermissions("his:doctorDepartment:remove")
+ @Log(title = "医生科室关系", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(hisDoctorDepartmentService.deleteHisDoctorDepartmentByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisDoctorScheduleController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisDoctorScheduleController.java
new file mode 100644
index 000000000..7e7e19beb
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisDoctorScheduleController.java
@@ -0,0 +1,126 @@
+package com.ruoyi.his.controller;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.his.domain.HisDoctorSchedule;
+import com.ruoyi.his.service.IHisDoctorScheduleService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 医生排班Controller
+ *
+ * @author bend
+ * @date 2020-07-03
+ */
+@Controller
+@RequestMapping("/his/doctorSchedule")
+public class HisDoctorScheduleController extends BaseController
+{
+ private String prefix = "his/doctorSchedule";
+
+ @Autowired
+ private IHisDoctorScheduleService hisDoctorScheduleService;
+
+ @RequiresPermissions("his:doctorSchedule:view")
+ @GetMapping()
+ public String doctorSchedule()
+ {
+ return prefix + "/doctorSchedule";
+ }
+
+ /**
+ * 查询医生排班列表
+ */
+ @RequiresPermissions("his:doctorSchedule:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisDoctorSchedule hisDoctorSchedule)
+ {
+ startPage();
+ List list = hisDoctorScheduleService.selectHisDoctorScheduleList(hisDoctorSchedule);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出医生排班列表
+ */
+ @RequiresPermissions("his:doctorSchedule:export")
+ @Log(title = "医生排班", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(HisDoctorSchedule hisDoctorSchedule)
+ {
+ List list = hisDoctorScheduleService.selectHisDoctorScheduleList(hisDoctorSchedule);
+ ExcelUtil util = new ExcelUtil(HisDoctorSchedule.class);
+ return util.exportExcel(list, "doctorSchedule");
+ }
+
+ /**
+ * 新增医生排班
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存医生排班
+ */
+ @RequiresPermissions("his:doctorSchedule:add")
+ @Log(title = "医生排班", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(HisDoctorSchedule hisDoctorSchedule)
+ {
+ return toAjax(hisDoctorScheduleService.insertHisDoctorSchedule(hisDoctorSchedule));
+ }
+
+ /**
+ * 修改医生排班
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ HisDoctorSchedule hisDoctorSchedule = hisDoctorScheduleService.selectHisDoctorScheduleById(id);
+ mmap.put("hisDoctorSchedule", hisDoctorSchedule);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存医生排班
+ */
+ @RequiresPermissions("his:doctorSchedule:edit")
+ @Log(title = "医生排班", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(HisDoctorSchedule hisDoctorSchedule)
+ {
+ return toAjax(hisDoctorScheduleService.updateHisDoctorSchedule(hisDoctorSchedule));
+ }
+
+ /**
+ * 删除医生排班
+ */
+ @RequiresPermissions("his:doctorSchedule:remove")
+ @Log(title = "医生排班", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(hisDoctorScheduleService.deleteHisDoctorScheduleByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisEhealthClientController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisEhealthClientController.java
new file mode 100644
index 000000000..8b085fbaa
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisEhealthClientController.java
@@ -0,0 +1,126 @@
+package com.ruoyi.his.controller;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.his.domain.HisEhealthClient;
+import com.ruoyi.his.service.IHisEhealthClientService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 健康卡Controller
+ *
+ * @author bend
+ * @date 2020-07-27
+ */
+@Controller
+@RequestMapping("/his/ehealthClient")
+public class HisEhealthClientController extends BaseController
+{
+ private String prefix = "his/ehealthClient";
+
+ @Autowired
+ private IHisEhealthClientService hisEhealthClientService;
+
+ @RequiresPermissions("his:ehealthClient:view")
+ @GetMapping()
+ public String ehealthClient()
+ {
+ return prefix + "/ehealthClient";
+ }
+
+ /**
+ * 查询健康卡列表
+ */
+ @RequiresPermissions("his:ehealthClient:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisEhealthClient hisEhealthClient)
+ {
+ startPage();
+ List list = hisEhealthClientService.selectHisEhealthClientList(hisEhealthClient);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出健康卡列表
+ */
+ @RequiresPermissions("his:ehealthClient:export")
+ @Log(title = "健康卡", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(HisEhealthClient hisEhealthClient)
+ {
+ List list = hisEhealthClientService.selectHisEhealthClientList(hisEhealthClient);
+ ExcelUtil util = new ExcelUtil(HisEhealthClient.class);
+ return util.exportExcel(list, "ehealthClient");
+ }
+
+ /**
+ * 新增健康卡
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存健康卡
+ */
+ @RequiresPermissions("his:ehealthClient:add")
+ @Log(title = "健康卡", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(HisEhealthClient hisEhealthClient)
+ {
+ return toAjax(hisEhealthClientService.insertHisEhealthClient(hisEhealthClient));
+ }
+
+ /**
+ * 修改健康卡
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ HisEhealthClient hisEhealthClient = hisEhealthClientService.selectHisEhealthClientById(id);
+ mmap.put("hisEhealthClient", hisEhealthClient);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存健康卡
+ */
+ @RequiresPermissions("his:ehealthClient:edit")
+ @Log(title = "健康卡", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(HisEhealthClient hisEhealthClient)
+ {
+ return toAjax(hisEhealthClientService.updateHisEhealthClient(hisEhealthClient));
+ }
+
+ /**
+ * 删除健康卡
+ */
+ @RequiresPermissions("his:ehealthClient:remove")
+ @Log(title = "健康卡", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(hisEhealthClientService.deleteHisEhealthClientByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisFeeItemController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisFeeItemController.java
new file mode 100644
index 000000000..02055cdc7
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisFeeItemController.java
@@ -0,0 +1,140 @@
+package com.ruoyi.his.controller;
+
+import java.util.List;
+
+import com.ruoyi.his.domain.HisRegistrationTemplate;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.his.domain.HisFeeItem;
+import com.ruoyi.his.service.IHisFeeItemService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 费用类型Controller
+ *
+ * @author bend
+ * @date 2020-07-14
+ */
+@Controller
+@RequestMapping("/his/feeItem")
+public class HisFeeItemController extends BaseController
+{
+ private String prefix = "his/feeItem";
+
+ @Autowired
+ private IHisFeeItemService hisFeeItemService;
+
+ @RequiresPermissions("his:feeItem:view")
+ @GetMapping()
+ public String feeItem()
+ {
+ return prefix + "/feeItem";
+ }
+
+ /**
+ * 查询费用类型列表
+ */
+ @RequiresPermissions("his:feeItem:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisFeeItem hisFeeItem)
+ {
+ startPage();
+ List list = hisFeeItemService.selectHisFeeItemList(hisFeeItem);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出费用类型列表
+ */
+ @RequiresPermissions("his:feeItem:export")
+ @Log(title = "费用类型", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(HisFeeItem hisFeeItem)
+ {
+ List list = hisFeeItemService.selectHisFeeItemList(hisFeeItem);
+ ExcelUtil util = new ExcelUtil(HisFeeItem.class);
+ return util.exportExcel(list, "feeItem");
+ }
+
+ /**
+ * 新增费用类型
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存费用类型
+ */
+ @RequiresPermissions("his:feeItem:add")
+ @Log(title = "费用类型", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(HisFeeItem hisFeeItem)
+ {
+ return toAjax(hisFeeItemService.insertHisFeeItem(hisFeeItem));
+ }
+
+ /**
+ * 修改费用类型
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ HisFeeItem hisFeeItem = hisFeeItemService.selectHisFeeItemById(id);
+ mmap.put("hisFeeItem", hisFeeItem);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存费用类型
+ */
+ @RequiresPermissions("his:feeItem:edit")
+ @Log(title = "费用类型", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(HisFeeItem hisFeeItem)
+ {
+ return toAjax(hisFeeItemService.updateHisFeeItem(hisFeeItem));
+ }
+
+ /**
+ * 删除费用类型
+ */
+ @RequiresPermissions("his:feeItem:remove")
+ @Log(title = "费用类型", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(hisFeeItemService.deleteHisFeeItemByIds(ids));
+ }
+
+ /**
+ * 状态修改
+ */
+ @Log(title = "费用类型管理", businessType = BusinessType.UPDATE)
+ @RequiresPermissions("his:feeItem:edit")
+ @PostMapping("/changeStatus")
+ @ResponseBody
+ public AjaxResult changeStatus(HisFeeItem hisFeeItem)
+ {
+ return toAjax(hisFeeItemService.changeStatus(hisFeeItem));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisHospitalInfoController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisHospitalInfoController.java
new file mode 100644
index 000000000..79c59fbff
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisHospitalInfoController.java
@@ -0,0 +1,237 @@
+package com.ruoyi.his.controller;
+
+import java.util.List;
+
+import com.ruoyi.common.config.Global;
+import com.ruoyi.common.config.ServerConfig;
+import com.ruoyi.common.func.Func;
+import com.ruoyi.common.utils.file.FileUploadUtils;
+import com.ruoyi.his.domain.HisDepartment;
+import com.ruoyi.his.domain.HisDoctor;
+import com.ruoyi.his.service.IHisDepartmentService;
+import com.ruoyi.his.service.IHisDoctorService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.his.domain.HisHospitalInfo;
+import com.ruoyi.his.service.IHisHospitalInfoService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * 医疗机构Controller
+ *
+ * @author bend
+ * @date 2020-06-28
+ */
+@Controller
+@RequestMapping("/his/hospital")
+public class HisHospitalInfoController extends BaseController
+{
+ private String prefix = "his/hospital";
+
+ @Autowired
+ private IHisHospitalInfoService hisHospitalInfoService;
+ @Autowired
+ private IHisDoctorService hisDoctorService;
+ @Autowired
+ private IHisDepartmentService iHisDepartmentService;
+
+ @RequiresPermissions("his:hospital:view")
+ @GetMapping()
+ public String hospital()
+ {
+ return prefix + "/hospital";
+ }
+
+ /**
+ * 查询医疗机构列表
+ */
+ @RequiresPermissions("his:hospital:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisHospitalInfo hisHospitalInfo)
+ {
+ startPage();
+ List list = hisHospitalInfoService.selectHisHospitalInfoList(hisHospitalInfo);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出医疗机构列表
+ */
+ @RequiresPermissions("his:hospital:export")
+ @Log(title = "医疗机构", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(HisHospitalInfo hisHospitalInfo)
+ {
+ List list = hisHospitalInfoService.selectHisHospitalInfoList(hisHospitalInfo);
+ ExcelUtil util = new ExcelUtil(HisHospitalInfo.class);
+ return util.exportExcel(list, "hospital");
+ }
+
+ /**
+ * 新增医疗机构
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存医疗机构
+ */
+ @RequiresPermissions("his:hospital:add")
+ @Log(title = "医疗机构", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(HisHospitalInfo hisHospitalInfo)
+ {
+ return toAjax(hisHospitalInfoService.insertHisHospitalInfo(hisHospitalInfo));
+ }
+
+ /**
+ * 修改医疗机构
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ HisHospitalInfo hisHospitalInfo = hisHospitalInfoService.selectHisHospitalInfoById(id);
+ mmap.put("hisHospitalInfo", hisHospitalInfo);
+ if (Func.isNotEmpty(hisHospitalInfo)){
+ HisDoctor hisDoctor = new HisDoctor();
+ hisDoctor.setOrgCode(hisHospitalInfo.getOrgCode());
+ hisDoctor.setIsShow(1);
+ //选择优秀医生
+ List hisDoctorList = hisDoctorService.selectHisDoctorList(hisDoctor);
+ if (Func.isNotEmpty(hisDoctorList)){
+ //已经选中的优秀医生
+ String excellentDoctorIds = hisHospitalInfo.getExcellentDoctorIds();
+ if (Func.isNotEmpty(excellentDoctorIds)){
+ String[] doctorIds = Func.toStrArray(",", excellentDoctorIds);
+ if (Func.isNotEmpty(doctorIds)){
+ for (String doctorId : doctorIds) {
+ for (HisDoctor doctor : hisDoctorList) {
+ if (doctorId.equals(doctor.getDoctorId())) {
+ doctor.setFlag(true);
+ break;
+ }
+ }
+ }
+ }
+ }
+ //设置选中标签
+ mmap.put("hisDoctorList", hisDoctorList);
+ }
+
+ //选择机构虚拟操作员列表
+ HisDoctor vmDoctor = new HisDoctor();
+ vmDoctor.setOrgCode(hisHospitalInfo.getOrgCode());
+ vmDoctor.setIsVirtualAccount(1);
+ List vmUserList = hisDoctorService.selectHisDoctorList(vmDoctor);
+ if (Func.isNotEmpty(vmUserList)){
+ String vmUserId = hisHospitalInfo.getVmUserId();
+ //已经选中的虚拟操作员
+ if (Func.isNotEmpty(vmUserId)){
+ for (HisDoctor vm : vmUserList) {
+ if (vmUserId.equals(vm.getDoctorId())) {
+ vm.setFlag(true);//设置选中标签
+ break;
+ }
+ }
+ }
+ mmap.put("vmUserList", vmUserList);
+ }
+
+ //选择优秀科室
+ HisDepartment hisDepartment = new HisDepartment();
+ hisDepartment.setOrgCode(hisHospitalInfo.getOrgCode());
+ hisDepartment.setIsShow(1);
+ List hisDepartmentList = iHisDepartmentService.selectHisDepartmentList(hisDepartment);
+ if (Func.isNotEmpty(hisDepartmentList)){
+ //已经选中的优秀科室
+ String excellentDeptIds = hisHospitalInfo.getExcellentDeptIds();
+ if (Func.isNotEmpty(excellentDeptIds)){
+ String[] deptIds= Func.toStrArray(",", excellentDeptIds);
+ if (Func.isNotEmpty(deptIds)){
+ for (String deptId : deptIds) {
+ for (HisDepartment department : hisDepartmentList) {
+ if (deptId.equals(department.getDeptId())) {
+ department.setFlag(true);
+ break;
+ }
+ }
+ }
+ }
+ }
+ //设置选中标签
+ mmap.put("hisDepartmentList", hisDepartmentList);
+ }
+ }
+
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存医疗机构
+ */
+ @RequiresPermissions("his:hospital:edit")
+ @Log(title = "医疗机构", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(HisHospitalInfo hisHospitalInfo)
+ {
+ return toAjax(hisHospitalInfoService.updateHisHospitalInfo(hisHospitalInfo));
+ }
+
+ /**
+ * 删除医疗机构
+ */
+ @RequiresPermissions("his:hospital:remove")
+ @Log(title = "医疗机构", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(hisHospitalInfoService.deleteHisHospitalInfoByIds(ids));
+ }
+
+ @Autowired
+ private ServerConfig serverConfig;
+
+ /**
+ * 机构图标
+ */
+ @Log(title = "上传机构图标", businessType = BusinessType.UPDATE)
+ @PostMapping("/update/logo")
+ @ResponseBody
+ public AjaxResult updateLogo(@RequestParam("logoFile") MultipartFile file)
+ {
+ try
+ {
+ if (!file.isEmpty())
+ {
+ String fileName = FileUploadUtils.upload(Global.getUploadPath(), file);
+ String url = serverConfig.getUrl() + fileName;
+ AjaxResult ajax = AjaxResult.success();
+ ajax.put("data", fileName);
+ ajax.put("url", url);
+ return ajax;
+ }
+ return error();
+ }
+ catch (Exception e)
+ {
+ return error(e.getMessage());
+ }
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisInpatientController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisInpatientController.java
new file mode 100644
index 000000000..79d67b7e6
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisInpatientController.java
@@ -0,0 +1,126 @@
+package com.ruoyi.web.controller.his;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.his.domain.HisInpatient;
+import com.ruoyi.his.service.IHisInpatientService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 住院病人Controller
+ *
+ * @author bend
+ * @date 2020-07-08
+ */
+@Controller
+@RequestMapping("/his/inpatient")
+public class HisInpatientController extends BaseController
+{
+ private String prefix = "his/inpatient";
+
+ @Autowired
+ private IHisInpatientService hisInpatientService;
+
+ @RequiresPermissions("his:inpatient:view")
+ @GetMapping()
+ public String inpatient()
+ {
+ return prefix + "/inpatient";
+ }
+
+ /**
+ * 查询住院病人列表
+ */
+ @RequiresPermissions("his:inpatient:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisInpatient hisInpatient)
+ {
+ startPage();
+ List list = hisInpatientService.selectHisInpatientList(hisInpatient);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出住院病人列表
+ */
+ @RequiresPermissions("his:inpatient:export")
+ @Log(title = "住院病人", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(HisInpatient hisInpatient)
+ {
+ List list = hisInpatientService.selectHisInpatientList(hisInpatient);
+ ExcelUtil util = new ExcelUtil(HisInpatient.class);
+ return util.exportExcel(list, "inpatient");
+ }
+
+ /**
+ * 新增住院病人
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存住院病人
+ */
+ @RequiresPermissions("his:inpatient:add")
+ @Log(title = "住院病人", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(HisInpatient hisInpatient)
+ {
+ return toAjax(hisInpatientService.insertHisInpatient(hisInpatient));
+ }
+
+ /**
+ * 修改住院病人
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ HisInpatient hisInpatient = hisInpatientService.selectHisInpatientById(id);
+ mmap.put("hisInpatient", hisInpatient);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存住院病人
+ */
+ @RequiresPermissions("his:inpatient:edit")
+ @Log(title = "住院病人", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(HisInpatient hisInpatient)
+ {
+ return toAjax(hisInpatientService.updateHisInpatient(hisInpatient));
+ }
+
+ /**
+ * 删除住院病人
+ */
+ @RequiresPermissions("his:inpatient:remove")
+ @Log(title = "住院病人", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(hisInpatientService.deleteHisInpatientByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisInpatientPrepaymentController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisInpatientPrepaymentController.java
new file mode 100644
index 000000000..b3d34d526
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisInpatientPrepaymentController.java
@@ -0,0 +1,126 @@
+package com.ruoyi.his.controller;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.his.domain.HisInpatientPrepayment;
+import com.ruoyi.his.service.IHisInpatientPrepaymentService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 住院预交Controller
+ *
+ * @author bend
+ * @date 2020-07-14
+ */
+@Controller
+@RequestMapping("/his/inpatientPrepayment")
+public class HisInpatientPrepaymentController extends BaseController
+{
+ private String prefix = "his/inpatientPrepayment";
+
+ @Autowired
+ private IHisInpatientPrepaymentService hisInpatientPrepaymentService;
+
+ @RequiresPermissions("his:inpatientPrepayment:view")
+ @GetMapping()
+ public String inpatientPrepayment()
+ {
+ return prefix + "/inpatientPrepayment";
+ }
+
+ /**
+ * 查询住院预交列表
+ */
+ @RequiresPermissions("his:inpatientPrepayment:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisInpatientPrepayment hisInpatientPrepayment)
+ {
+ startPage();
+ List list = hisInpatientPrepaymentService.selectHisInpatientPrepaymentList(hisInpatientPrepayment);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出住院预交列表
+ */
+ @RequiresPermissions("his:inpatientPrepayment:export")
+ @Log(title = "住院预交", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(HisInpatientPrepayment hisInpatientPrepayment)
+ {
+ List list = hisInpatientPrepaymentService.selectHisInpatientPrepaymentList(hisInpatientPrepayment);
+ ExcelUtil util = new ExcelUtil(HisInpatientPrepayment.class);
+ return util.exportExcel(list, "inpatientPrepayment");
+ }
+
+ /**
+ * 新增住院预交
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存住院预交
+ */
+ @RequiresPermissions("his:inpatientPrepayment:add")
+ @Log(title = "住院预交", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(HisInpatientPrepayment hisInpatientPrepayment)
+ {
+ return toAjax(hisInpatientPrepaymentService.insertHisInpatientPrepayment(hisInpatientPrepayment));
+ }
+
+ /**
+ * 修改住院预交
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ HisInpatientPrepayment hisInpatientPrepayment = hisInpatientPrepaymentService.selectHisInpatientPrepaymentById(id);
+ mmap.put("hisInpatientPrepayment", hisInpatientPrepayment);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存住院预交
+ */
+ @RequiresPermissions("his:inpatientPrepayment:edit")
+ @Log(title = "住院预交", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(HisInpatientPrepayment hisInpatientPrepayment)
+ {
+ return toAjax(hisInpatientPrepaymentService.updateHisInpatientPrepayment(hisInpatientPrepayment));
+ }
+
+ /**
+ * 删除住院预交
+ */
+ @RequiresPermissions("his:inpatientPrepayment:remove")
+ @Log(title = "住院预交", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(hisInpatientPrepaymentService.deleteHisInpatientPrepaymentByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisInspectionApplyController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisInspectionApplyController.java
new file mode 100644
index 000000000..1d1d4b196
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisInspectionApplyController.java
@@ -0,0 +1,126 @@
+package com.ruoyi.his.controller;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.his.domain.HisInspectionApply;
+import com.ruoyi.his.service.IHisInspectionApplyService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 申请单Controller
+ *
+ * @author bend
+ * @date 2020-07-10
+ */
+@Controller
+@RequestMapping("/his/inspectionApply")
+public class HisInspectionApplyController extends BaseController
+{
+ private String prefix = "his/inspectionApply";
+
+ @Autowired
+ private IHisInspectionApplyService hisInspectionApplyService;
+
+ @RequiresPermissions("his:inspectionApply:view")
+ @GetMapping()
+ public String inspectionApply()
+ {
+ return prefix + "/inspectionApply";
+ }
+
+ /**
+ * 查询申请单列表
+ */
+ @RequiresPermissions("his:inspectionApply:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisInspectionApply hisInspectionApply)
+ {
+ startPage();
+ List list = hisInspectionApplyService.selectHisInspectionApplyList(hisInspectionApply);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出申请单列表
+ */
+ @RequiresPermissions("his:inspectionApply:export")
+ @Log(title = "申请单", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(HisInspectionApply hisInspectionApply)
+ {
+ List list = hisInspectionApplyService.selectHisInspectionApplyList(hisInspectionApply);
+ ExcelUtil util = new ExcelUtil(HisInspectionApply.class);
+ return util.exportExcel(list, "inspectionApply");
+ }
+
+ /**
+ * 新增申请单
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存申请单
+ */
+ @RequiresPermissions("his:inspectionApply:add")
+ @Log(title = "申请单", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(HisInspectionApply hisInspectionApply)
+ {
+ return toAjax(hisInspectionApplyService.insertHisInspectionApply(hisInspectionApply));
+ }
+
+ /**
+ * 修改申请单
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ HisInspectionApply hisInspectionApply = hisInspectionApplyService.selectHisInspectionApplyById(id);
+ mmap.put("hisInspectionApply", hisInspectionApply);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存申请单
+ */
+ @RequiresPermissions("his:inspectionApply:edit")
+ @Log(title = "申请单", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(HisInspectionApply hisInspectionApply)
+ {
+ return toAjax(hisInspectionApplyService.updateHisInspectionApply(hisInspectionApply));
+ }
+
+ /**
+ * 删除申请单
+ */
+ @RequiresPermissions("his:inspectionApply:remove")
+ @Log(title = "申请单", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(hisInspectionApplyService.deleteHisInspectionApplyByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisInspectionReportController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisInspectionReportController.java
new file mode 100644
index 000000000..a8e764076
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisInspectionReportController.java
@@ -0,0 +1,149 @@
+package com.ruoyi.his.controller;
+
+import java.util.List;
+
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.his.domain.HisInspectionReportItem;
+import com.ruoyi.his.domain.HisOutpatientExpensesBill;
+import com.ruoyi.his.domain.HisOutpatientExpensesBillDetail;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.his.domain.HisInspectionReport;
+import com.ruoyi.his.service.IHisInspectionReportService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 检查检验Controller
+ *
+ * @author bend
+ * @date 2020-07-10
+ */
+@Controller
+@RequestMapping("/his/inspectionReport")
+public class HisInspectionReportController extends BaseController
+{
+ private String prefix = "his/inspectionReport";
+
+ @Autowired
+ private IHisInspectionReportService hisInspectionReportService;
+
+ @RequiresPermissions("his:inspectionReport:view")
+ @GetMapping()
+ public String inspectionReport()
+ {
+ return prefix + "/inspectionReport";
+ }
+
+ /**
+ * 查询检查检验列表
+ */
+ @RequiresPermissions("his:inspectionReport:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisInspectionReport hisInspectionReport)
+ {
+ startPage();
+ List list = hisInspectionReportService.selectHisInspectionReportList(hisInspectionReport);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出检查检验列表
+ */
+ @RequiresPermissions("his:inspectionReport:export")
+ @Log(title = "检查检验", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(HisInspectionReport hisInspectionReport)
+ {
+ List list = hisInspectionReportService.selectHisInspectionReportList(hisInspectionReport);
+ ExcelUtil util = new ExcelUtil(HisInspectionReport.class);
+ return util.exportExcel(list, "inspectionReport");
+ }
+
+ /**
+ * 新增检查检验
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存检查检验
+ */
+ @RequiresPermissions("his:inspectionReport:add")
+ @Log(title = "检查检验", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(HisInspectionReport hisInspectionReport)
+ {
+ return toAjax(hisInspectionReportService.insertHisInspectionReport(hisInspectionReport));
+ }
+
+ /**
+ * 修改检查检验
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ HisInspectionReport hisInspectionReport = hisInspectionReportService.selectHisInspectionReportById(id);
+ mmap.put("hisInspectionReport", hisInspectionReport);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存检查检验
+ */
+ @RequiresPermissions("his:inspectionReport:edit")
+ @Log(title = "检查检验", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(HisInspectionReport hisInspectionReport)
+ {
+ return toAjax(hisInspectionReportService.updateHisInspectionReport(hisInspectionReport));
+ }
+
+ /**
+ * 删除检查检验
+ */
+ @RequiresPermissions("his:inspectionReport:remove")
+ @Log(title = "检查检验", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(hisInspectionReportService.deleteHisInspectionReportByIds(ids));
+ }
+
+ @RequiresPermissions("his:inspectionReport:detail")
+ @GetMapping("/detail")
+ public String expensesBillDetail(@RequestParam(value = "id") Long id, ModelMap mmap)
+ {
+ if (StringUtils.isNotNull(id))
+ {
+ HisInspectionReport report = hisInspectionReportService.selectHisInspectionReportById(id);
+ mmap.put("report", report);
+ }
+ return prefix + "/inspectionReportItem";
+ }
+
+ @RequiresPermissions("his:inspectionReport:list")
+ @PostMapping("/detail/list")
+ @ResponseBody
+ public TableDataInfo list(HisInspectionReportItem item)
+ {
+ startPage();
+ List list = hisInspectionReportService.selectHisInspectionReportItemList(item);
+ return getDataTable(list);
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisMerchantScrcuController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisMerchantScrcuController.java
new file mode 100644
index 000000000..d384cf465
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisMerchantScrcuController.java
@@ -0,0 +1,126 @@
+package com.ruoyi.his.controller;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.his.domain.HisMerchantScrcu;
+import com.ruoyi.his.service.IHisMerchantScrcuService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 农信商户Controller
+ *
+ * @author bend
+ * @date 2020-07-27
+ */
+@Controller
+@RequestMapping("/his/merchantScrcu")
+public class HisMerchantScrcuController extends BaseController
+{
+ private String prefix = "his/merchantScrcu";
+
+ @Autowired
+ private IHisMerchantScrcuService hisMerchantScrcuService;
+
+ @RequiresPermissions("his:merchantScrcu:view")
+ @GetMapping()
+ public String merchantScrcu()
+ {
+ return prefix + "/merchantScrcu";
+ }
+
+ /**
+ * 查询农信商户列表
+ */
+ @RequiresPermissions("his:merchantScrcu:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisMerchantScrcu hisMerchantScrcu)
+ {
+ startPage();
+ List list = hisMerchantScrcuService.selectHisMerchantScrcuList(hisMerchantScrcu);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出农信商户列表
+ */
+ @RequiresPermissions("his:merchantScrcu:export")
+ @Log(title = "农信商户", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(HisMerchantScrcu hisMerchantScrcu)
+ {
+ List list = hisMerchantScrcuService.selectHisMerchantScrcuList(hisMerchantScrcu);
+ ExcelUtil util = new ExcelUtil(HisMerchantScrcu.class);
+ return util.exportExcel(list, "merchantScrcu");
+ }
+
+ /**
+ * 新增农信商户
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存农信商户
+ */
+ @RequiresPermissions("his:merchantScrcu:add")
+ @Log(title = "农信商户", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(HisMerchantScrcu hisMerchantScrcu)
+ {
+ return toAjax(hisMerchantScrcuService.insertHisMerchantScrcu(hisMerchantScrcu));
+ }
+
+ /**
+ * 修改农信商户
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ HisMerchantScrcu hisMerchantScrcu = hisMerchantScrcuService.selectHisMerchantScrcuById(id);
+ mmap.put("hisMerchantScrcu", hisMerchantScrcu);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存农信商户
+ */
+ @RequiresPermissions("his:merchantScrcu:edit")
+ @Log(title = "农信商户", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(HisMerchantScrcu hisMerchantScrcu)
+ {
+ return toAjax(hisMerchantScrcuService.updateHisMerchantScrcu(hisMerchantScrcu));
+ }
+
+ /**
+ * 删除农信商户
+ */
+ @RequiresPermissions("his:merchantScrcu:remove")
+ @Log(title = "农信商户", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(hisMerchantScrcuService.deleteHisMerchantScrcuByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisMerchantWechatController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisMerchantWechatController.java
new file mode 100644
index 000000000..bb18d57fe
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisMerchantWechatController.java
@@ -0,0 +1,126 @@
+package com.ruoyi.his.controller;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.his.domain.HisMerchantWechat;
+import com.ruoyi.his.service.IHisMerchantWechatService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 特约商户Controller
+ *
+ * @author bend
+ * @date 2020-07-27
+ */
+@Controller
+@RequestMapping("/his/merchantWechat")
+public class HisMerchantWechatController extends BaseController
+{
+ private String prefix = "his/merchantWechat";
+
+ @Autowired
+ private IHisMerchantWechatService hisMerchantWechatService;
+
+ @RequiresPermissions("his:merchantWechat:view")
+ @GetMapping()
+ public String merchantWechat()
+ {
+ return prefix + "/merchantWechat";
+ }
+
+ /**
+ * 查询特约商户列表
+ */
+ @RequiresPermissions("his:merchantWechat:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisMerchantWechat hisMerchantWechat)
+ {
+ startPage();
+ List list = hisMerchantWechatService.selectHisMerchantWechatList(hisMerchantWechat);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出特约商户列表
+ */
+ @RequiresPermissions("his:merchantWechat:export")
+ @Log(title = "特约商户", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(HisMerchantWechat hisMerchantWechat)
+ {
+ List list = hisMerchantWechatService.selectHisMerchantWechatList(hisMerchantWechat);
+ ExcelUtil util = new ExcelUtil(HisMerchantWechat.class);
+ return util.exportExcel(list, "merchantWechat");
+ }
+
+ /**
+ * 新增特约商户
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存特约商户
+ */
+ @RequiresPermissions("his:merchantWechat:add")
+ @Log(title = "特约商户", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(HisMerchantWechat hisMerchantWechat)
+ {
+ return toAjax(hisMerchantWechatService.insertHisMerchantWechat(hisMerchantWechat));
+ }
+
+ /**
+ * 修改特约商户
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ HisMerchantWechat hisMerchantWechat = hisMerchantWechatService.selectHisMerchantWechatById(id);
+ mmap.put("hisMerchantWechat", hisMerchantWechat);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存特约商户
+ */
+ @RequiresPermissions("his:merchantWechat:edit")
+ @Log(title = "特约商户", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(HisMerchantWechat hisMerchantWechat)
+ {
+ return toAjax(hisMerchantWechatService.updateHisMerchantWechat(hisMerchantWechat));
+ }
+
+ /**
+ * 删除特约商户
+ */
+ @RequiresPermissions("his:merchantWechat:remove")
+ @Log(title = "特约商户", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(hisMerchantWechatService.deleteHisMerchantWechatByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisOutpatientController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisOutpatientController.java
new file mode 100644
index 000000000..a562f0f2d
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisOutpatientController.java
@@ -0,0 +1,126 @@
+package com.ruoyi.web.controller.his;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.his.domain.HisOutpatient;
+import com.ruoyi.his.service.IHisOutpatientService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 门诊病人Controller
+ *
+ * @author bend
+ * @date 2020-07-07
+ */
+@Controller
+@RequestMapping("/his/outpatient")
+public class HisOutpatientController extends BaseController
+{
+ private String prefix = "his/outpatient";
+
+ @Autowired
+ private IHisOutpatientService hisOutpatientService;
+
+ @RequiresPermissions("his:outpatient:view")
+ @GetMapping()
+ public String outpatient()
+ {
+ return prefix + "/outpatient";
+ }
+
+ /**
+ * 查询门诊病人列表
+ */
+ @RequiresPermissions("his:outpatient:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisOutpatient hisOutpatient)
+ {
+ startPage();
+ List list = hisOutpatientService.selectHisOutpatientList(hisOutpatient);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出门诊病人列表
+ */
+ @RequiresPermissions("his:outpatient:export")
+ @Log(title = "门诊病人", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(HisOutpatient hisOutpatient)
+ {
+ List list = hisOutpatientService.selectHisOutpatientList(hisOutpatient);
+ ExcelUtil util = new ExcelUtil(HisOutpatient.class);
+ return util.exportExcel(list, "outpatient");
+ }
+
+ /**
+ * 新增门诊病人
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存门诊病人
+ */
+ @RequiresPermissions("his:outpatient:add")
+ @Log(title = "门诊病人", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(HisOutpatient hisOutpatient)
+ {
+ return toAjax(hisOutpatientService.insertHisOutpatient(hisOutpatient));
+ }
+
+ /**
+ * 修改门诊病人
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ HisOutpatient hisOutpatient = hisOutpatientService.selectHisOutpatientById(id);
+ mmap.put("hisOutpatient", hisOutpatient);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存门诊病人
+ */
+ @RequiresPermissions("his:outpatient:edit")
+ @Log(title = "门诊病人", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(HisOutpatient hisOutpatient)
+ {
+ return toAjax(hisOutpatientService.updateHisOutpatient(hisOutpatient));
+ }
+
+ /**
+ * 删除门诊病人
+ */
+ @RequiresPermissions("his:outpatient:remove")
+ @Log(title = "门诊病人", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(hisOutpatientService.deleteHisOutpatientByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisOutpatientExpensesBillController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisOutpatientExpensesBillController.java
new file mode 100644
index 000000000..84aa12296
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisOutpatientExpensesBillController.java
@@ -0,0 +1,147 @@
+package com.ruoyi.his.controller;
+
+import java.util.List;
+
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.his.domain.HisOutpatientExpensesBillDetail;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.his.domain.HisOutpatientExpensesBill;
+import com.ruoyi.his.service.IHisOutpatientExpensesBillService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 待缴费单Controller
+ *
+ * @author bend
+ * @date 2020-07-09
+ */
+@Controller
+@RequestMapping("/his/expensesBill")
+public class HisOutpatientExpensesBillController extends BaseController
+{
+ private String prefix = "his/expensesBill";
+
+ @Autowired
+ private IHisOutpatientExpensesBillService hisOutpatientExpensesBillService;
+
+ @RequiresPermissions("his:expensesBill:view")
+ @GetMapping()
+ public String expensesBill()
+ {
+ return prefix + "/expensesBill";
+ }
+
+ /**
+ * 查询待缴费单列表
+ */
+ @RequiresPermissions("his:expensesBill:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisOutpatientExpensesBill hisOutpatientExpensesBill)
+ {
+ startPage();
+ List list = hisOutpatientExpensesBillService.selectHisOutpatientExpensesBillList(hisOutpatientExpensesBill);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出待缴费单列表
+ */
+ @RequiresPermissions("his:expensesBill:export")
+ @Log(title = "待缴费单", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(HisOutpatientExpensesBill hisOutpatientExpensesBill)
+ {
+ List list = hisOutpatientExpensesBillService.selectHisOutpatientExpensesBillList(hisOutpatientExpensesBill);
+ ExcelUtil util = new ExcelUtil(HisOutpatientExpensesBill.class);
+ return util.exportExcel(list, "expensesBill");
+ }
+
+ /**
+ * 新增待缴费单
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存待缴费单
+ */
+ @RequiresPermissions("his:expensesBill:add")
+ @Log(title = "待缴费单", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(HisOutpatientExpensesBill hisOutpatientExpensesBill)
+ {
+ return toAjax(hisOutpatientExpensesBillService.insertHisOutpatientExpensesBill(hisOutpatientExpensesBill));
+ }
+
+ /**
+ * 修改待缴费单
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ HisOutpatientExpensesBill hisOutpatientExpensesBill = hisOutpatientExpensesBillService.selectHisOutpatientExpensesBillById(id);
+ mmap.put("hisOutpatientExpensesBill", hisOutpatientExpensesBill);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存待缴费单
+ */
+ @RequiresPermissions("his:expensesBill:edit")
+ @Log(title = "待缴费单", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(HisOutpatientExpensesBill hisOutpatientExpensesBill)
+ {
+ return toAjax(hisOutpatientExpensesBillService.updateHisOutpatientExpensesBill(hisOutpatientExpensesBill));
+ }
+
+ /**
+ * 删除待缴费单
+ */
+ @RequiresPermissions("his:expensesBill:remove")
+ @Log(title = "待缴费单", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(hisOutpatientExpensesBillService.deleteHisOutpatientExpensesBillByIds(ids));
+ }
+
+ @RequiresPermissions("his:expensesBill:detail")
+ @GetMapping("/detail")
+ public String expensesBillDetail(@RequestParam(value = "billId") Long billId, ModelMap mmap)
+ {
+ if (StringUtils.isNotNull(billId))
+ {
+ HisOutpatientExpensesBill bill = hisOutpatientExpensesBillService.selectHisOutpatientExpensesBillById(billId);
+ mmap.put("bill", bill);
+ }
+ return prefix + "/expensesBillDetail";
+ }
+
+ @RequiresPermissions("his:expensesBill:list")
+ @PostMapping("/detail/list")
+ @ResponseBody
+ public TableDataInfo list(HisOutpatientExpensesBillDetail detail)
+ {
+ startPage();
+ List list = hisOutpatientExpensesBillService.selectHisOutpatientExpensesBillDetailList(detail);
+ return getDataTable(list);
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisOutpatientPaymentController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisOutpatientPaymentController.java
new file mode 100644
index 000000000..f964b83ec
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisOutpatientPaymentController.java
@@ -0,0 +1,126 @@
+package com.ruoyi.his.controller;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.his.domain.HisOutpatientPayment;
+import com.ruoyi.his.service.IHisOutpatientPaymentService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 门诊预交Controller
+ *
+ * @author bend
+ * @date 2020-07-14
+ */
+@Controller
+@RequestMapping("/his/outpatientPayment")
+public class HisOutpatientPaymentController extends BaseController
+{
+ private String prefix = "his/outpatientPayment";
+
+ @Autowired
+ private IHisOutpatientPaymentService hisOutpatientPaymentService;
+
+ @RequiresPermissions("his:outpatientPayment:view")
+ @GetMapping()
+ public String outpatientPayment()
+ {
+ return prefix + "/outpatientPayment";
+ }
+
+ /**
+ * 查询门诊预交列表
+ */
+ @RequiresPermissions("his:outpatientPayment:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisOutpatientPayment hisOutpatientPayment)
+ {
+ startPage();
+ List list = hisOutpatientPaymentService.selectHisOutpatientPaymentList(hisOutpatientPayment);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出门诊预交列表
+ */
+ @RequiresPermissions("his:outpatientPayment:export")
+ @Log(title = "门诊预交", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(HisOutpatientPayment hisOutpatientPayment)
+ {
+ List list = hisOutpatientPaymentService.selectHisOutpatientPaymentList(hisOutpatientPayment);
+ ExcelUtil util = new ExcelUtil(HisOutpatientPayment.class);
+ return util.exportExcel(list, "outpatientPayment");
+ }
+
+ /**
+ * 新增门诊预交
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存门诊预交
+ */
+ @RequiresPermissions("his:outpatientPayment:add")
+ @Log(title = "门诊预交", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(HisOutpatientPayment hisOutpatientPayment)
+ {
+ return toAjax(hisOutpatientPaymentService.insertHisOutpatientPayment(hisOutpatientPayment));
+ }
+
+ /**
+ * 修改门诊预交
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ HisOutpatientPayment hisOutpatientPayment = hisOutpatientPaymentService.selectHisOutpatientPaymentById(id);
+ mmap.put("hisOutpatientPayment", hisOutpatientPayment);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存门诊预交
+ */
+ @RequiresPermissions("his:outpatientPayment:edit")
+ @Log(title = "门诊预交", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(HisOutpatientPayment hisOutpatientPayment)
+ {
+ return toAjax(hisOutpatientPaymentService.updateHisOutpatientPayment(hisOutpatientPayment));
+ }
+
+ /**
+ * 删除门诊预交
+ */
+ @RequiresPermissions("his:outpatientPayment:remove")
+ @Log(title = "门诊预交", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(hisOutpatientPaymentService.deleteHisOutpatientPaymentByIds(ids));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisPatientExpensesController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisPatientExpensesController.java
new file mode 100644
index 000000000..800f1b297
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisPatientExpensesController.java
@@ -0,0 +1,152 @@
+package com.ruoyi.his.controller;
+
+import java.util.List;
+
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.his.domain.HisOutpatientExpensesBill;
+import com.ruoyi.his.domain.HisOutpatientExpensesBillDetail;
+import com.ruoyi.his.domain.HisPatientExpensesDetail;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.his.domain.HisPatientExpenses;
+import com.ruoyi.his.service.IHisPatientExpensesService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 费用记录Controller
+ *
+ * @author bend
+ * @date 2020-07-09
+ */
+@Controller
+@RequestMapping("/his/patientExpenses")
+public class HisPatientExpensesController extends BaseController
+{
+ private String prefix = "his/patientExpenses";
+
+ @Autowired
+ private IHisPatientExpensesService hisPatientExpensesService;
+
+ @RequiresPermissions("his:patientExpenses:view")
+ @GetMapping()
+ public String patientExpenses()
+ {
+ return prefix + "/patientExpenses";
+ }
+
+ /**
+ * 查询费用记录列表
+ */
+ @RequiresPermissions("his:patientExpenses:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisPatientExpenses hisPatientExpenses)
+ {
+ startPage();
+ List list = hisPatientExpensesService.selectHisPatientExpensesList(hisPatientExpenses);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出费用记录列表
+ */
+ @RequiresPermissions("his:patientExpenses:export")
+ @Log(title = "费用记录", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(HisPatientExpenses hisPatientExpenses)
+ {
+ List list = hisPatientExpensesService.selectHisPatientExpensesList(hisPatientExpenses);
+ ExcelUtil util = new ExcelUtil(HisPatientExpenses.class);
+ return util.exportExcel(list, "patientExpenses");
+ }
+
+ /**
+ * 新增费用记录
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存费用记录
+ */
+ @RequiresPermissions("his:patientExpenses:add")
+ @Log(title = "费用记录", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(HisPatientExpenses hisPatientExpenses)
+ {
+ return toAjax(hisPatientExpensesService.insertHisPatientExpenses(hisPatientExpenses));
+ }
+
+ /**
+ * 修改费用记录
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ HisPatientExpenses hisPatientExpenses = hisPatientExpensesService.selectHisPatientExpensesById(id);
+ mmap.put("hisPatientExpenses", hisPatientExpenses);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存费用记录
+ */
+ @RequiresPermissions("his:patientExpenses:edit")
+ @Log(title = "费用记录", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(HisPatientExpenses hisPatientExpenses)
+ {
+ return toAjax(hisPatientExpensesService.updateHisPatientExpenses(hisPatientExpenses));
+ }
+
+ /**
+ * 删除费用记录
+ */
+ @RequiresPermissions("his:patientExpenses:remove")
+ @Log(title = "费用记录", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(hisPatientExpensesService.deleteHisPatientExpensesByIds(ids));
+ }
+
+ /**
+ * 费用记录详情
+ */
+ @RequiresPermissions("his:patientExpenses:detail")
+ @GetMapping("/detail")
+ public String patientExpensesDetail(@RequestParam(value = "expensesId") Long expensesId, ModelMap mmap)
+ {
+ if (StringUtils.isNotNull(expensesId))
+ {
+ HisPatientExpenses patientExpenses = hisPatientExpensesService.selectHisPatientExpensesById(expensesId);
+ mmap.put("patientExpenses", patientExpenses);
+ }
+ return prefix + "/patientExpensesDetail";
+ }
+
+ @RequiresPermissions("his:patientExpenses:list")
+ @PostMapping("/detail/list")
+ @ResponseBody
+ public TableDataInfo list(HisPatientExpensesDetail detail)
+ {
+ startPage();
+ List list = hisPatientExpensesService.selectHisPatientExpensesDetailList(detail);
+ return getDataTable(list);
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisPatientExpensesDetailController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisPatientExpensesDetailController.java
new file mode 100644
index 000000000..4769c54d1
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisPatientExpensesDetailController.java
@@ -0,0 +1,69 @@
+package com.ruoyi.his.controller;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.his.domain.HisPatientExpensesDetail;
+import com.ruoyi.his.service.IHisPatientExpensesDetailService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.List;
+
+/**
+ * 费用详情Controller
+ *
+ * @author bend
+ * @date 2020-07-09
+ */
+@Controller
+@RequestMapping("/his/patientExpensesDetail")
+public class HisPatientExpensesDetailController extends BaseController
+{
+ private String prefix = "his/patientExpensesDetail";
+
+ @Autowired
+ private IHisPatientExpensesDetailService hisPatientExpensesDetailService;
+
+ @RequiresPermissions("his:patientExpensesDetail:view")
+ @GetMapping()
+ public String patientExpensesDetail()
+ {
+ return prefix + "/patientExpensesDetail";
+ }
+
+ /**
+ * 查询费用详情列表
+ */
+ @RequiresPermissions("his:patientExpensesDetail:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisPatientExpensesDetail hisPatientExpensesDetail)
+ {
+ startPage();
+ List list = hisPatientExpensesDetailService.selectHisPatientExpensesDetailList(hisPatientExpensesDetail);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出费用详情列表
+ */
+ @RequiresPermissions("his:patientExpensesDetail:export")
+ @Log(title = "费用详情", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(HisPatientExpensesDetail hisPatientExpensesDetail)
+ {
+ List list = hisPatientExpensesDetailService.selectHisPatientExpensesDetailList(hisPatientExpensesDetail);
+ ExcelUtil util = new ExcelUtil(HisPatientExpensesDetail.class);
+ return util.exportExcel(list, "patientExpensesDetail");
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisPayAccountController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisPayAccountController.java
new file mode 100644
index 000000000..0a14772b7
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisPayAccountController.java
@@ -0,0 +1,140 @@
+package com.ruoyi.his.controller;
+
+import java.util.List;
+
+import com.ruoyi.his.domain.HisRegistrationTemplate;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.his.domain.HisPayAccount;
+import com.ruoyi.his.service.IHisPayAccountService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 支付账户Controller
+ *
+ * @author bend
+ * @date 2020-07-14
+ */
+@Controller
+@RequestMapping("/his/payAccount")
+public class HisPayAccountController extends BaseController
+{
+ private String prefix = "his/payAccount";
+
+ @Autowired
+ private IHisPayAccountService hisPayAccountService;
+
+ @RequiresPermissions("his:payAccount:view")
+ @GetMapping()
+ public String payAccount()
+ {
+ return prefix + "/payAccount";
+ }
+
+ /**
+ * 查询支付账户列表
+ */
+ @RequiresPermissions("his:payAccount:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisPayAccount hisPayAccount)
+ {
+ startPage();
+ List list = hisPayAccountService.selectHisPayAccountList(hisPayAccount);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出支付账户列表
+ */
+ @RequiresPermissions("his:payAccount:export")
+ @Log(title = "支付账户", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ResponseBody
+ public AjaxResult export(HisPayAccount hisPayAccount)
+ {
+ List list = hisPayAccountService.selectHisPayAccountList(hisPayAccount);
+ ExcelUtil util = new ExcelUtil(HisPayAccount.class);
+ return util.exportExcel(list, "payAccount");
+ }
+
+ /**
+ * 新增支付账户
+ */
+ @GetMapping("/add")
+ public String add()
+ {
+ return prefix + "/add";
+ }
+
+ /**
+ * 新增保存支付账户
+ */
+ @RequiresPermissions("his:payAccount:add")
+ @Log(title = "支付账户", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @ResponseBody
+ public AjaxResult addSave(HisPayAccount hisPayAccount)
+ {
+ return toAjax(hisPayAccountService.insertHisPayAccount(hisPayAccount));
+ }
+
+ /**
+ * 修改支付账户
+ */
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ HisPayAccount hisPayAccount = hisPayAccountService.selectHisPayAccountById(id);
+ mmap.put("hisPayAccount", hisPayAccount);
+ return prefix + "/edit";
+ }
+
+ /**
+ * 修改保存支付账户
+ */
+ @RequiresPermissions("his:payAccount:edit")
+ @Log(title = "支付账户", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ @ResponseBody
+ public AjaxResult editSave(HisPayAccount hisPayAccount)
+ {
+ return toAjax(hisPayAccountService.updateHisPayAccount(hisPayAccount));
+ }
+
+ /**
+ * 删除支付账户
+ */
+ @RequiresPermissions("his:payAccount:remove")
+ @Log(title = "支付账户", businessType = BusinessType.DELETE)
+ @PostMapping( "/remove")
+ @ResponseBody
+ public AjaxResult remove(String ids)
+ {
+ return toAjax(hisPayAccountService.deleteHisPayAccountByIds(ids));
+ }
+
+ /**
+ * 账户状态修改
+ */
+ @Log(title = "支付账户管理", businessType = BusinessType.UPDATE)
+ @RequiresPermissions("his:payAccount:edit")
+ @PostMapping("/changeStatus")
+ @ResponseBody
+ public AjaxResult changeStatus(HisPayAccount hisPayAccount)
+ {
+ return toAjax(hisPayAccountService.changeStatus(hisPayAccount));
+ }
+}
diff --git a/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisRegistrationRecordController.java b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisRegistrationRecordController.java
new file mode 100644
index 000000000..9e4765fdf
--- /dev/null
+++ b/ruoyi-his/src/main/java/com/ruoyi/his/controller/HisRegistrationRecordController.java
@@ -0,0 +1,126 @@
+package com.ruoyi.his.controller;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.his.domain.HisRegistrationRecord;
+import com.ruoyi.his.service.IHisRegistrationRecordService;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 挂号记录Controller
+ *
+ * @author bend
+ * @date 2020-06-28
+ */
+@Controller
+@RequestMapping("/his/registration")
+public class HisRegistrationRecordController extends BaseController
+{
+ private String prefix = "his/registration";
+
+ @Autowired
+ private IHisRegistrationRecordService hisRegistrationRecordService;
+
+ @RequiresPermissions("his:registration:view")
+ @GetMapping()
+ public String registration()
+ {
+ return prefix + "/registration";
+ }
+
+ /**
+ * 查询挂号记录列表
+ */
+ @RequiresPermissions("his:registration:list")
+ @PostMapping("/list")
+ @ResponseBody
+ public TableDataInfo list(HisRegistrationRecord hisRegistrationRecord)
+ {
+ startPage();
+ List