| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.CityManagerClient; |
| | |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.TCity; |
| | | import com.dsh.guns.modular.system.model.TOperator; |
| | | import com.dsh.guns.modular.system.model.TSite; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.model.dto.SelectDto; |
| | | import com.dsh.guns.modular.system.service.*; |
| | | import com.dsh.guns.modular.system.service.ICoursePackageService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.ITSiteService; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import io.swagger.models.auth.In; |
| | | import org.aspectj.weaver.ast.Var; |
| | |
| | | |
| | | @Resource |
| | | private CoursePackageClient coursePackageClient; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | |
| | | |
| | | |
| | | |
| | |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @Autowired |
| | | private TOperatorService operatorService; |
| | | @GetMapping("/openCoursePackageListPage") |
| | | public String openCoursePackageListPage(Model model){ |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | List<TCoursePackageType> tCoursePackageTypes = coursePackageTypeClient.queryAllCoursePackageType(); |
| | | model.addAttribute("coursePackageType", tCoursePackageTypes); |
| | | |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | String cityCode = null; |
| | | if(objectType == 2){//城市管理员 |
| | | CityManager cityManager = cityManagerClient.queryCityManagerById(objectId); |
| | | if (cityManager!=null){ |
| | | cityCode = cityManager.getCityCode(); |
| | | } |
| | | } |
| | | List<Map<String, Object>> list = storeService.queryProvince(cityCode); |
| | | model.addAttribute("province", list); |
| | | model.addAttribute("objectType", objectType); |
| | | return PREFIX + "coursePackage.html"; |
| | |
| | | String cityCode = null; |
| | | if(objectType == 2){//城市管理员 |
| | | CityManager cityManager = cityManagerClient.queryCityManagerById(objectId); |
| | | cityCode = cityManager.getCityCode(); |
| | | if (cityManager!=null){ |
| | | cityCode = cityManager.getCityCode(); |
| | | } |
| | | } |
| | | List<Map<String, Object>> list = storeService.queryProvince(cityCode); |
| | | model.addAttribute("province", list); |
| | |
| | | |
| | | |
| | | model.addAttribute("type",type); |
| | | model.addAttribute("objectType",objectType); |
| | | System.out.println("========type========"+type); |
| | | // if (type ==1){ |
| | | // return PREFIX + "coursePackage_edit.html"; |
| | |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/queryWalkInStudentList") |
| | | @PostMapping("/queryWalkInStudentListqueryCoursePackageLists") |
| | | public Object queryWalkInStudentList(Long coursePackageSchedulingId, String userName, String studentName){ |
| | | Page<Map<String, Object>> page = coursePackageService.queryWalkInStudentList(coursePackageSchedulingId, userName, studentName); |
| | | return super.packForBT(page); |