|
@@ -11,15 +11,21 @@ import com.ym.mec.biz.service.StudentRepairService;
|
|
|
import com.ym.mec.biz.service.SubjectService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
+import com.ym.mec.util.date.DateUtil;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
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.RestController;
|
|
|
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
|
|
|
@RequestMapping("eduRepair")
|
|
@@ -108,4 +114,29 @@ public class EduRepairController extends BaseController {
|
|
|
return succeed(studentRepairService.getRepairInfo(id));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @ApiOperation("获取维修列表")
|
|
|
+ @GetMapping(value = "/queryPage")
|
|
|
+ public HttpResponseResult queryPage(RepairStudentQueryInfo queryInfo) {
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if (sysUser == null) {
|
|
|
+ return failed("用户信息获取失败");
|
|
|
+ }
|
|
|
+ queryInfo.setEmployeeId(sysUser.getId());
|
|
|
+ Date endTime = queryInfo.getEndTime();
|
|
|
+ if(endTime != null){
|
|
|
+ queryInfo.setEndTime(DateUtil.addDays(endTime, 1));
|
|
|
+ }
|
|
|
+ queryInfo.setPayStatus(2);
|
|
|
+ return succeed(studentRepairService.queryPage(queryInfo));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation("维修完成")
|
|
|
+ @PostMapping(value = "/repairSuccess")
|
|
|
+ public HttpResponseResult repairSuccess(Integer id,String description,Integer repairStatus) {
|
|
|
+ studentRepairService.repairSuccess(id,description,repairStatus);
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
+
|
|
|
}
|