|
|
@@ -842,11 +842,6 @@ public class PublicServer {
|
|
|
}
|
|
|
|
|
|
|
|
|
- public String getName(String groupNo) {
|
|
|
- String name = dao.getGroupName(groupNo);
|
|
|
- return name == null ? "未知" : name;
|
|
|
- }
|
|
|
-
|
|
|
@Async
|
|
|
public void orderRecord(BigDecimal orderCode, String userCode) {
|
|
|
if (orderCode == null) {
|
|
|
@@ -891,5 +886,41 @@ public class PublicServer {
|
|
|
return ResultVoUtil.success(dao.getItemDrug(StringUtil.isContainChinese(code)));
|
|
|
}
|
|
|
|
|
|
+ public Set<String> getUserDeptList(String code) {
|
|
|
+ Set<String> deptList;
|
|
|
+ UserInfo userInfo = redisLikeService.getUserInfoByCode(code);
|
|
|
+ if (userInfo.getDeptCode().startsWith("8")) {
|
|
|
+ deptList = dao.chaXunZhiZXinKeShi(userInfo.getDeptCode());
|
|
|
+ deptList.add(userInfo.getDeptCode());
|
|
|
+ } else {
|
|
|
+ deptList = getDept(true, userInfo);
|
|
|
+ }
|
|
|
+ return deptList;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Set<String> getUserDeptList() {
|
|
|
+ return getUserDeptList(TokenUtil.getInstance().getTokenUserId());
|
|
|
+ }
|
|
|
+
|
|
|
+ public static <T> String listToSqlIn(Collection<T> collection) {
|
|
|
+ if (collection == null || collection.isEmpty()) {
|
|
|
+ return "('')";
|
|
|
+ }
|
|
|
+
|
|
|
+ Set<T> uniqueSet = new HashSet<>(collection);
|
|
|
+ StringBuilder sb = new StringBuilder("(");
|
|
|
+ for (T item : uniqueSet) {
|
|
|
+ if (item instanceof String) {
|
|
|
+ sb.append("'").append(item).append("',");
|
|
|
+ } else {
|
|
|
+ sb.append(item).append(",");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ sb.deleteCharAt(sb.length() - 1);
|
|
|
+ sb.append(")");
|
|
|
+
|
|
|
+ return sb.toString();
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|