| | |
| | | |
| | | |
| | | import com.dsh.course.dto.*; |
| | | import com.dsh.course.entity.EvaluateStudent; |
| | | import com.dsh.course.feignClient.account.AppUserClient; |
| | | import com.dsh.course.feignClient.account.StudentClient; |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.course.feignClient.course.CoursePackageClient; |
| | | import com.dsh.course.feignClient.course.CourseStuddentClient; |
| | |
| | | import com.dsh.guns.modular.system.model.TStudent; |
| | | import com.dsh.guns.modular.system.model.User; |
| | | import com.dsh.guns.modular.system.model.dto.*; |
| | | import com.dsh.guns.modular.system.service.EvaluateStudentService; |
| | | import com.dsh.guns.modular.system.service.ITStudentService; |
| | | import com.dsh.guns.modular.system.util.BigDecimalToChineseAmountUtil; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import io.swagger.models.auth.In; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.bouncycastle.math.raw.Mod; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpRequest; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | import java.math.RoundingMode; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | public String index(Model model) { |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | model.addAttribute("objectType",objectType); |
| | | return PREFIX + "tStudent.html"; |
| | | } |
| | | |
| | |
| | | TStudentDto tStudentDto = appUserClient.queryOneWebUser(id); |
| | | model.addAttribute("id", id); |
| | | model.addAttribute("ids", ids); |
| | | |
| | | |
| | | TAppUser tAppUser = appUserClient.queryById(tStudentDto.getAppUserId()); |
| | | model.addAttribute("userName",tAppUser.getName()); |
| | |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private EvaluateStudentService evalstuService; |
| | | |
| | | @RequestMapping("/tStudent_commite/{tStudentId}") |
| | | public String tStudent_commite(@PathVariable("tStudentId") Integer tStudentId, Model model) { |
| | | |
| | | model.addAttribute("id",tStudentId); |
| | | |
| | | return PREFIX + "tStudent_commite.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // |
| | |
| | | @RequestMapping("/list") |
| | | @ResponseBody |
| | | public List<TStudentDto> list(StudentSearch search) { |
| | | List<Integer> ids = new ArrayList<>(); |
| | | |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | ids = appUserClient.getUserStore(UserExt.getUser().getObjectId()); |
| | | if(ids.size()==0){ |
| | | ids.add(-1); |
| | | } |
| | | search.setIds(ids); |
| | | } |
| | | if(UserExt.getUser().getObjectType()==2){ |
| | | ids = appUserClient.getUserYYs(UserExt.getUser().getObjectId()); |
| | | if(ids.size()==0){ |
| | | ids.add(-1); |
| | | } |
| | | search.setIds(ids); |
| | | } |
| | | System.out.println("============学员查询接口========="); |
| | | return itStudentService.listAll(search); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private EvaluateStudentService evaluateStudentService; |
| | | |
| | | @Resource |
| | | private StudentClient studentClient; |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping("/listcom/{id}") |
| | | @ResponseBody |
| | | public List<Map<String,Object>> listcom(@PathVariable("id") Integer id) { |
| | | |
| | | List<Map<String,Object>> maps = studentClient.listCom(id); |
| | | |
| | | |
| | | |
| | | return maps; |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/addcom/{id}") |
| | | @ResponseBody |
| | | public ResultUtil addcom(@PathVariable("id") Integer id,String content,String image) { |
| | | |
| | | EvaluateStudent evaluateStudent = new EvaluateStudent(); |
| | | evaluateStudent.setStudentId(id); |
| | | evaluateStudent.setContent(content); |
| | | evaluateStudent.setImgs(image); |
| | | // evaluateStudent.setInsertTime(new Date()); |
| | | |
| | | |
| | | appUserClient.save(evaluateStudent); |
| | | // evaluateStudentService.save(evaluateStudent); |
| | | |
| | | |
| | | |
| | | return new ResultUtil<>(0,0,"保存成功",null,null); |
| | | } |
| | | |
| | | |
| | | |
| | | @RequestMapping("/updatecom") |
| | | @ResponseBody |
| | | public ResultUtil updatecom(Integer id,String content,String images) { |
| | | |
| | | EvaluateStudent evaluateStudent = new EvaluateStudent(); |
| | | evaluateStudent.setId(id); |
| | | evaluateStudent.setContent(content); |
| | | evaluateStudent.setImgs(images); |
| | | appUserClient.save(evaluateStudent); |
| | | |
| | | // evaluateStudentService.updateById(evaluateStudent); |
| | | |
| | | |
| | | |
| | | return new ResultUtil<>(0,0,"修改成功",null,null); |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/comdel/{id}") |
| | | @ResponseBody |
| | | public ResultUtil comdel(@PathVariable("id") Integer id) { |
| | | |
| | | |
| | | appUserClient.comdel(id); |
| | | |
| | | // evaluateStudentService.removeById(id); |
| | | |
| | | |
| | | |
| | | return new ResultUtil<>(0,0,"删除成功",null,null); |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/frozen") |
| | | @ResponseBody |
| | | |
| | | public ResultUtil forzen(Integer id,Integer state){ |
| | | |
| | | TStudent student = new TStudent(); |
| | | student.setId(id); |
| | | student.setState(state); |
| | | |
| | | |
| | | studentClient.frozen(student); |
| | | |
| | | |
| | | return ResultUtil.success(); |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |