|
@@ -0,0 +1,69 @@
|
|
|
+package com.platform.rest.controller.mobile;
|
|
|
+
|
|
|
+import com.platform.common.bean.AbstractPageResultBean;
|
|
|
+import com.platform.common.util.BeanConverterUtil;
|
|
|
+import com.platform.common.util.R;
|
|
|
+import com.platform.common.validation.group.AddGroup;
|
|
|
+import com.platform.common.validation.group.UpdateGroup;
|
|
|
+import com.platform.dao.dto.repair.RepairApplicationFormDTO;
|
|
|
+import com.platform.dao.dto.sb.SbInfoDTO;
|
|
|
+import com.platform.dao.entity.sb.SbInfo;
|
|
|
+import com.platform.dao.util.ExcelUtil;
|
|
|
+import com.platform.dao.util.TreeUtil;
|
|
|
+import com.platform.dao.vo.export.sb.ExportSbInfoMeasureVO;
|
|
|
+import com.platform.dao.vo.export.sb.ExportSbInfoVO;
|
|
|
+import com.platform.dao.vo.sb.SbInfoVO;
|
|
|
+import com.platform.office.poi.excel.ExcelImportUtil;
|
|
|
+import com.platform.office.poi.excel.entity.ImportParams;
|
|
|
+import com.platform.rest.log.annotation.SysLog;
|
|
|
+import com.platform.service.repair.RepairApplicationFormService;
|
|
|
+import com.platform.service.sb.SbInfoService;
|
|
|
+import lombok.AllArgsConstructor;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.io.FileInputStream;
|
|
|
+import java.io.FileNotFoundException;
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Description 移动端不需要登录的接口,注意这里不能使用getUserInfo方法,该方法需要登录
|
|
|
+ * @Author liuyu
|
|
|
+ * @Date 2020-04-21 21:05:46
|
|
|
+ * @Version Copyright (c) 2019,北京乾元坤和科技有限公司 All rights reserved.
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@AllArgsConstructor
|
|
|
+@RequestMapping("/ignores")
|
|
|
+public class IgnoreController {
|
|
|
+
|
|
|
+ private final SbInfoService sbInfoService;
|
|
|
+ private final RepairApplicationFormService repairApplicationFormService;
|
|
|
+ /**
|
|
|
+ * 通过id查询单条记录
|
|
|
+ *
|
|
|
+ * @param id 主键
|
|
|
+ * @return R
|
|
|
+ */
|
|
|
+ @GetMapping("/sb/{id}")
|
|
|
+ public R<SbInfoVO> getById(@PathVariable("id") String id) {
|
|
|
+ return new R<>(sbInfoService.getById(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增记录
|
|
|
+ *
|
|
|
+ * @param repairApplicationFormDTO 保修单DTO
|
|
|
+ * @return R
|
|
|
+ */
|
|
|
+ @SysLog("新增保修单")
|
|
|
+ @PostMapping("/repair")
|
|
|
+ public R saveIgnore(@Validated({AddGroup.class}) @RequestBody RepairApplicationFormDTO repairApplicationFormDTO) {
|
|
|
+ return new R<>(repairApplicationFormService.saveModelByDTO(repairApplicationFormDTO));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|