3 Коміти 6819a74e31 ... bccaec5842

Автор SHA1 Опис Дата
  zhangxin bccaec5842 场次优化 1 тиждень тому
  zhangxin 1d3f6a194d Merge branch 'master' of http://git.zonelife.cn:3000/huangyang/national-motion-backend 1 тиждень тому
  zhangxin 2a09f3a25c 员工管理 1 тиждень тому
14 змінених файлів з 248 додано та 74 видалено
  1. 2 4
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/controller/stadium/StadiumController.java
  2. 2 2
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/IDetailService.java
  3. 8 2
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/impl/DetailServiceImpl.java
  4. 4 4
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/vo/stadium/ConcertsDetailsVO.java
  5. 28 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/vo/stadium/StadiumConcertsResponseVO.java
  6. 101 58
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppInstructorController.java
  7. 4 1
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/AppSitePlaceMapper.java
  8. 3 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/AppSitePlaceMapper.xml
  9. 74 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/vo/staff/StaffSaveVO.java
  10. 10 3
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java
  11. 2 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDepartMapper.java
  12. 3 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysDepartMapper.xml
  13. 2 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/service/ISysDepartService.java
  14. 5 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysDepartServiceImpl.java

+ 2 - 4
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/controller/stadium/StadiumController.java

@@ -7,15 +7,13 @@ import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.modules.app.service.IDetailService;
 import org.jeecg.modules.app.vo.PlaceInfoVO;
-import org.jeecg.modules.app.vo.stadium.StadiumConcertsVO;
+import org.jeecg.modules.app.vo.stadium.StadiumConcertsResponseVO;
 import org.jeecg.modules.app.vo.stadium.StadiumFindById;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.List;
-
 
 @Slf4j
 @Tag(name = "App体育馆场次选择")
@@ -35,7 +33,7 @@ public class StadiumController {
      **/
     @GetMapping("/getPlaceInfo")
     @Operation(summary = "场次详情查询-缺少已定状态和可预约数逻辑 ")
-    public Result<List<StadiumConcertsVO>> findConcerts(StadiumFindById stadiumFindById){
+    public Result<StadiumConcertsResponseVO> findConcerts(StadiumFindById stadiumFindById){
         String site_id = "1942781931946946561";
         String category_id = "1942391828774895617";
         return iDetailService.findConcerts(site_id,category_id);

+ 2 - 2
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/IDetailService.java

@@ -6,7 +6,7 @@ import org.jeecg.modules.app.vo.CourseInfoVO;
 import org.jeecg.modules.app.vo.PlaceInfoVO;
 import org.jeecg.modules.app.vo.course.CourseRequestVo;
 import org.jeecg.modules.app.vo.course.CourseResponseVo;
-import org.jeecg.modules.app.vo.stadium.StadiumConcertsVO;
+import org.jeecg.modules.app.vo.stadium.StadiumConcertsResponseVO;
 import org.jeecg.modules.system.app.entity.AppCategory;
 
 import java.util.List;
@@ -48,7 +48,7 @@ public interface IDetailService {
      **/
     PlaceInfoVO.theGymnasiumIsCharteredVO getPlaceInfoNoFixation(String id, String categoryId);
 
-    Result<List<StadiumConcertsVO>> findConcerts(String siteId, String categoryId);
+    Result<StadiumConcertsResponseVO> findConcerts(String siteId, String categoryId);
 
     /**
      * @Author SheepHy

+ 8 - 2
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/impl/DetailServiceImpl.java

@@ -15,6 +15,7 @@ import org.jeecg.modules.app.vo.PlaceInfoVO;
 import org.jeecg.modules.app.vo.course.CourseRequestVo;
 import org.jeecg.modules.app.vo.course.CourseResponseVo;
 import org.jeecg.modules.app.vo.stadium.ConcertsVO;
+import org.jeecg.modules.app.vo.stadium.StadiumConcertsResponseVO;
 import org.jeecg.modules.app.vo.stadium.StadiumConcertsVO;
 import org.jeecg.modules.system.app.entity.*;
 import org.jeecg.modules.system.app.mapper.*;
@@ -182,8 +183,12 @@ public class DetailServiceImpl implements IDetailService {
     }
 
     @Override
-    public Result<List<StadiumConcertsVO>> findConcerts(String siteId, String categoryId) {
+    public Result<StadiumConcertsResponseVO> findConcerts(String siteId, String categoryId) {
         List<NextSevenDayVo> nextSevenDays = TimeRangeFinder.getNextSevenDays();
+        StadiumConcertsResponseVO  stadiumConcertsResponseVO = appSitePlaceMapper.findBySidAndCid(siteId,categoryId);
+        if (stadiumConcertsResponseVO==null){
+            stadiumConcertsResponseVO = new StadiumConcertsResponseVO();
+        }
         List<StadiumConcertsVO> stadiumConcertsVOS = new ArrayList<>();
         for (NextSevenDayVo nextSevenDay : nextSevenDays) {
             StadiumConcertsVO stadiumConcertsVO = new StadiumConcertsVO();
@@ -197,7 +202,8 @@ public class DetailServiceImpl implements IDetailService {
             stadiumConcertsVO.setConcertsVOList(concertsVOList);
             stadiumConcertsVOS.add(stadiumConcertsVO);
         }
-        return Result.ok(stadiumConcertsVOS);
+        stadiumConcertsResponseVO.setStadiumConcertsVOList(stadiumConcertsVOS);
+        return Result.ok(stadiumConcertsResponseVO);
     }
 
     @Override

+ 4 - 4
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/vo/stadium/ConcertsDetailsVO.java

@@ -19,13 +19,13 @@ public class ConcertsDetailsVO {
     private String id;
     /**场所名称*/
     @Schema(description = "场所开始时间")
-    @JsonFormat(timezone = "GMT+8",pattern = "HH:mm:ss")
-    @DateTimeFormat(pattern="HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8",pattern = "HH:mm")
+    @DateTimeFormat(pattern="HH:mm")
     private Date startTime;
     /**场所明细*/
     @Schema(description = "场所结束时间")
-    @JsonFormat(timezone = "GMT+8",pattern = "HH:mm:ss")
-    @DateTimeFormat(pattern="HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8",pattern = "HH:mm")
+    @DateTimeFormat(pattern="HH:mm")
     private Date endTime;
     /**当天场次已预约数*/
     @Schema(description = "场所状态0-未预约;1-已预约")

+ 28 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/vo/stadium/StadiumConcertsResponseVO.java

@@ -0,0 +1,28 @@
+package org.jeecg.modules.app.vo.stadium;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.List;
+
+@Data
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@Schema(description="体育馆场次")
+public class StadiumConcertsResponseVO {
+
+    /**退款时间*/
+    @Schema(description = "退款时间")
+    private Integer  earlyRefundTime;
+    /**限购次数*/
+    @Schema(description = "限购次数")
+    private Integer  buyLimit;
+
+    /**当天场次已预约数*/
+    @Schema(description = "当天场所明细")
+    private List<StadiumConcertsVO> StadiumConcertsVOList;
+
+
+}

+ 101 - 58
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/AppInstructorController.java

@@ -1,57 +1,59 @@
 package org.jeecg.modules.system.app.controller;
 
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.common.system.query.QueryRuleEnum;
-import org.jeecg.common.util.oConvertUtils;
-import org.jeecg.modules.system.app.entity.AppInstructor;
-import org.jeecg.modules.system.app.service.IAppInstructorService;
-
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.extern.slf4j.Slf4j;
-
-import org.jeecgframework.poi.excel.ExcelImportUtil;
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
-import org.jeecgframework.poi.excel.entity.ExportParams;
-import org.jeecgframework.poi.excel.entity.ImportParams;
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import me.zhyd.oauth.utils.UuidUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.constant.CommonConstant;
 import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.PasswordUtil;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.base.service.BaseCommonService;
+import org.jeecg.modules.system.app.entity.AppInstructor;
+import org.jeecg.modules.system.app.service.IAppInstructorService;
+import org.jeecg.modules.system.app.vo.staff.StaffSaveVO;
+import org.jeecg.modules.system.entity.SysDepart;
+import org.jeecg.modules.system.entity.SysUser;
+import org.jeecg.modules.system.service.ISysDepartService;
+import org.jeecg.modules.system.service.ISysUserService;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import io.swagger.v3.oas.annotations.Operation;
-import org.jeecg.common.aspect.annotation.AutoLog;
-import org.apache.shiro.authz.annotation.RequiresPermissions;
- /**
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
+import java.util.Date;
+
+/**
  * @Description: 教练表
  * @Author: jeecg-boot
- * @Date:   2025-07-04
  * @Version: V1.0
  */
-@Tag(name="教练表")
+@Tag(name="员工信息")
 @RestController
-@RequestMapping("/org/jeecg/modules/app/appInstructor")
+@RequestMapping("/staff/staff")
 @Slf4j
 public class AppInstructorController extends JeecgController<AppInstructor, IAppInstructorService> {
 	@Autowired
 	private IAppInstructorService appInstructorService;
-	
+	 @Autowired
+	 private ISysUserService sysUserService;
+	@Autowired
+	private BaseCommonService baseCommonService;
+	@Autowired
+	private ISysDepartService sysDepartService;
+
 	/**
 	 * 分页列表查询
 	 *
@@ -62,7 +64,7 @@ public class AppInstructorController extends JeecgController<AppInstructor, IApp
 	 * @return
 	 */
 	//@AutoLog(value = "教练表-分页列表查询")
-	@Operation(summary="教练表-分页列表查询")
+	@Operation(summary="员工信息-分页列表查询")
 	@GetMapping(value = "/list")
 	public Result<IPage<AppInstructor>> queryPageList(AppInstructor appInstructor,
 								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@@ -79,31 +81,72 @@ public class AppInstructorController extends JeecgController<AppInstructor, IApp
 	/**
 	 *   添加
 	 *
-	 * @param appInstructor
+	 * @param staffSaveVO
 	 * @return
 	 */
-	@AutoLog(value = "教练表-添加")
-	@Operation(summary="教练表-添加")
-	@RequiresPermissions("org.jeecg.modules.app:nm_instructor:add")
+	@AutoLog(value = "员工信息-添加")
+	@Operation(summary="员工信息-添加")
+	@RequiresPermissions("staff:add")
 	@PostMapping(value = "/add")
-	public Result<String> add(@RequestBody AppInstructor appInstructor) {
+	@Transactional
+	public Result<String> add(@RequestBody StaffSaveVO staffSaveVO) {
+		SysUser user = new SysUser();
+		AppInstructor appInstructor = new AppInstructor();
+		if (StringUtils.isEmpty(staffSaveVO.getSelectedroles())){
+			return Result.error("角色权限为空");
+		}
+		if (StringUtils.isEmpty(staffSaveVO.getSelecteddeparts())){
+			return Result.error("所属部门为空");
+		}
+		if (staffSaveVO.getSelectedroles().indexOf("instructor")==0){
+			if (staffSaveVO.getSelecteddeparts().contains(",")){
+				return Result.error("该角色涉及教练,不允许多部门");
+			}
+		}
+		SysDepart departById = sysDepartService.getDepartById(staffSaveVO.getSelecteddeparts());
+		try {
+			BeanUtils.copyProperties(staffSaveVO,user);
+			user.setId(UuidUtils.getUUID());
+			user.setCreateTime(new Date());//设置创建时间
+			String salt = oConvertUtils.randomGen(8);
+			user.setSalt(salt);
+			String passwordEncode = PasswordUtil.encrypt(user.getUsername(), user.getPassword(), salt);
+			user.setPassword(passwordEncode);
+			user.setStatus(1);
+			user.setDelFlag(CommonConstant.DEL_FLAG_0);
+			user.setUserIdentity(CommonConstant.USER_IDENTITY_1);
+			//用户表字段org_code不能在这里设置他的值
+			user.setOrgCode(departById.getOrgCode());
+			// 保存用户走一个service 保证事务
+			sysUserService.saveUser(user, staffSaveVO.getSelectedroles(), staffSaveVO.getSelecteddeparts(), null);
+			baseCommonService.addLog("添加用户,username: " +user.getUsername() ,CommonConstant.LOG_TYPE_2, 2);
+		} catch (Exception e) {
+			log.error(e.getMessage(), e);
+			return Result.error("添加失败!");
+		}
+		BeanUtils.copyProperties(staffSaveVO,appInstructor);
+		appInstructor.setUserId(user.getId());
+		appInstructor.setDelFlag(CommonConstant.DEL_FLAG_0);
 		appInstructorService.save(appInstructor);
-
 		return Result.OK("添加成功!");
 	}
 	
 	/**
 	 *  编辑
 	 *
-	 * @param appInstructor
+	 * @param staffSaveVO
 	 * @return
 	 */
-	@AutoLog(value = "教练表-编辑")
-	@Operation(summary="教练表-编辑")
-	@RequiresPermissions("org.jeecg.modules.app:nm_instructor:edit")
+	@AutoLog(value = "员工信息-编辑")
+	@Operation(summary="员工信息-编辑")
+	@RequiresPermissions("staff:edit")
 	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
-	public Result<String> edit(@RequestBody AppInstructor appInstructor) {
-		appInstructorService.updateById(appInstructor);
+	public Result<String> edit(@RequestBody StaffSaveVO staffSaveVO) {
+		if (staffSaveVO==null||StringUtils.isEmpty(staffSaveVO.getId())){
+			return Result.error("编辑失败!请选择需要编辑的员工信息。");
+		}
+//		sysUserService.findByUserIdStaff(staffSaveVO.getId());
+//		appInstructorService.updateById(appInstructor);
 		return Result.OK("编辑成功!");
 	}
 	
@@ -113,9 +156,9 @@ public class AppInstructorController extends JeecgController<AppInstructor, IApp
 	 * @param id
 	 * @return
 	 */
-	@AutoLog(value = "教练表-通过id删除")
-	@Operation(summary="教练表-通过id删除")
-	@RequiresPermissions("org.jeecg.modules.app:nm_instructor:delete")
+	@AutoLog(value = "员工信息-通过id删除")
+	@Operation(summary="员工信息-通过id删除")
+	@RequiresPermissions("staff:delete")
 	@DeleteMapping(value = "/delete")
 	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
 		appInstructorService.removeById(id);
@@ -128,9 +171,9 @@ public class AppInstructorController extends JeecgController<AppInstructor, IApp
 	 * @param ids
 	 * @return
 	 */
-	@AutoLog(value = "教练表-批量删除")
-	@Operation(summary="教练表-批量删除")
-	@RequiresPermissions("org.jeecg.modules.app:nm_instructor:deleteBatch")
+	@AutoLog(value = "员工信息-批量删除")
+	@Operation(summary="员工信息-批量删除")
+	@RequiresPermissions("staff:deleteBatch")
 	@DeleteMapping(value = "/deleteBatch")
 	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
 		this.appInstructorService.removeByIds(Arrays.asList(ids.split(",")));
@@ -144,7 +187,7 @@ public class AppInstructorController extends JeecgController<AppInstructor, IApp
 	 * @return
 	 */
 	//@AutoLog(value = "教练表-通过id查询")
-	@Operation(summary="教练表-通过id查询")
+	@Operation(summary="员工信息-通过id查询")
 	@GetMapping(value = "/queryById")
 	public Result<AppInstructor> queryById(@RequestParam(name="id",required=true) String id) {
 		AppInstructor appInstructor = appInstructorService.getById(id);
@@ -160,10 +203,10 @@ public class AppInstructorController extends JeecgController<AppInstructor, IApp
     * @param request
     * @param appInstructor
     */
-    @RequiresPermissions("org.jeecg.modules.app:nm_instructor:exportXls")
+    @RequiresPermissions("staff:exportXls")
     @RequestMapping(value = "/exportXls")
     public ModelAndView exportXls(HttpServletRequest request, AppInstructor appInstructor) {
-        return super.exportXls(request, appInstructor, AppInstructor.class, "教练表");
+        return super.exportXls(request, appInstructor, AppInstructor.class, "员工表");
     }
 
     /**
@@ -173,7 +216,7 @@ public class AppInstructorController extends JeecgController<AppInstructor, IApp
     * @param response
     * @return
     */
-    @RequiresPermissions("org.jeecg.modules.app:nm_instructor:importExcel")
+    @RequiresPermissions("staff:importExcel")
     @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
     public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
         return super.importExcel(request, response, AppInstructor.class);

+ 4 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/AppSitePlaceMapper.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.system.app.mapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.jeecg.modules.app.vo.PlaceInfoVO;
 import org.jeecg.modules.app.vo.stadium.ConcertsVO;
+import org.jeecg.modules.app.vo.stadium.StadiumConcertsResponseVO;
 import org.jeecg.modules.system.app.entity.AppSitePlace;
 import org.apache.ibatis.annotations.Param;
 import java.util.List;
@@ -23,5 +24,7 @@ public interface AppSitePlaceMapper extends BaseMapper<AppSitePlace> {
      **/
     List<PlaceInfoVO.PlaceInfoGymMsgVO> getPlaceInfoNoFixation(@Param("id")String id);
 
-    List<ConcertsVO> findByConcerts(Integer weekDay, String siteId, String categoryId);
+    List<ConcertsVO> findByConcerts(@Param("weekDay")Integer weekDay, @Param("siteId")String siteId, @Param("categoryId")String categoryId);
+
+    StadiumConcertsResponseVO findBySidAndCid(@Param("siteId")String siteId,@Param("categoryId") String categoryId);
 }

+ 3 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/AppSitePlaceMapper.xml

@@ -42,4 +42,7 @@
         from nm_site_place a left join  nm_site_price_rules b on a.id = b.site_place_id
         where a.site_id = #{siteId} and b.category_id =#{categoryId} and b.day_of_week =#{weekDay}
     </select>
+    <select id="findBySidAndCid" resultType="org.jeecg.modules.app.vo.stadium.StadiumConcertsResponseVO">
+        select early_refund_time,buy_limit from nm_site_place where site_id = #{siteId} and category_id =#{categoryId} limit 1
+    </select>
 </mapper>

+ 74 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/vo/staff/StaffSaveVO.java

@@ -0,0 +1,74 @@
+package org.jeecg.modules.system.app.vo.staff;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+/**
+ * @author DM
+ * @date 2025/7/7 17:37
+ * @description
+ */
+@Data
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@AllArgsConstructor
+@NoArgsConstructor
+@Schema(description="员工请求参数")
+public class StaffSaveVO {
+
+    @Schema(description = "id")
+    private String id;
+    /**名称*/
+    @Schema(description = "登录账号")
+    private String username;
+    /**地址*/
+    @Schema(description = "用户名称(真实姓名)")
+    private String realname;
+    /**1-正常,2-冻结*/
+    @Schema(description = "用户状态1-正常,2-冻结")
+    private Integer status;
+    /**密码*/
+    @Schema(description = "密码")
+    private String password;
+
+
+    @Schema(description = "所属角色")
+    private String  selectedroles;
+
+    @Schema(description = "所属部门")
+    private String  selecteddeparts;
+    /**部门编号*/
+    @Excel(name = "部门编号", width = 15)
+    @Schema(description = "部门编号")
+    private String orgCode;
+    /**培训项目*/
+    @Excel(name = "培训项目", width = 15)
+    @Schema(description = "培训项目,使用,分割")
+    private String trainingPrograms;
+    /**教学理念*/
+    @Excel(name = "教学理念", width = 15)
+    @Schema(description = "教学理念")
+    private String teachingPhilosophy;
+    /**擅长说明*/
+    @Excel(name = "擅长说明", width = 15)
+    @Schema(description = "擅长说明")
+    private String excelMsg;
+    /**无犯罪证明*/
+    @Excel(name = "无犯罪证明", width = 15)
+    @Schema(description = "无犯罪证明")
+    private String certificateInnocence;
+    /**健康证*/
+    @Excel(name = "健康证", width = 15)
+    @Schema(description = "健康证")
+    private String healthy;
+    /**荣誉证书多个逗号分隔*/
+    @Excel(name = "荣誉证书多个逗号分隔", width = 15)
+    @Schema(description = "荣誉证书多个逗号分隔")
+    private String honor;
+
+}

+ 10 - 3
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java

@@ -2,7 +2,6 @@ package org.jeecg.modules.system.controller;
 
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.shiro.SecurityUtils;
@@ -11,12 +10,10 @@ import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.config.TenantContext;
 import org.jeecg.common.constant.CacheConstant;
 import org.jeecg.common.constant.CommonConstant;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.util.JwtUtil;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.ImportExcelUtil;
 import org.jeecg.common.util.RedisUtil;
-import org.jeecg.common.util.YouBianCodeUtil;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
 import org.jeecg.modules.system.entity.SysDepart;
@@ -685,5 +682,15 @@ public class SysDepartController {
 		}
 		return Result.error("文件导入失败!");
 	}
+
+	/**
+	 * 查询当前用户所拥有的部门信息
+	 * @return
+	 */
+	@GetMapping("findByDeptList")
+	public Result<List<SysDepart>> findByDeptList() {
+		LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		return sysDepartService.findByDeptList(loginUser.getOrgCode());
+	}
 	
 }

+ 2 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDepartMapper.java

@@ -204,4 +204,6 @@ public interface SysDepartMapper extends BaseMapper<SysDepart> {
 	Integer findByParentIdCount(@Param("parentId") String parentId);
 
 	FindByMerchantIdResponseDTO findByMerchntId(@Param("id")  String id);
+
+    String findByDeptList(@Param("orgCode") String orgCode);
 }

+ 3 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysDepartMapper.xml

@@ -243,4 +243,7 @@
         where sd.del_flag=0 and sd.id= #{id};
 
     </select>
+    <select id="findByDeptList" resultType="java.lang.String">
+        select * from sys_depart where del_flag=0 and org_code like CONCAT('',#{orgCode},'%')
+    </select>
 </mapper>

+ 2 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/service/ISysDepartService.java

@@ -253,4 +253,6 @@ public interface ISysDepartService extends IService<SysDepart>{
     Result<String> updateMerchntId(AddMerchantRequestDTO addMerchantRequestDTO);
 
     Result<String> resetPassword(String id);
+
+    Result<List<SysDepart>> findByDeptList(String orgCode);
 }

+ 5 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysDepartServiceImpl.java

@@ -1495,6 +1495,11 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
 		return Result.ok("重置密码成功");
 	}
 
+	@Override
+	public Result<List<SysDepart>> findByDeptList(String orgCode) {
+		return Result.ok(departMapper.findByDeptList(orgCode));
+	}
+
 	/**
 	 * 寻找部门路径
 	 *