|
|
@@ -0,0 +1,96 @@
|
|
|
+package com.fs.crm.controller;
|
|
|
+
|
|
|
+import com.fs.common.core.controller.BaseController;
|
|
|
+import com.fs.common.core.domain.AjaxResult;
|
|
|
+import com.fs.common.core.page.TableDataInfo;
|
|
|
+import com.fs.common.utils.StringUtils;
|
|
|
+import com.fs.common.utils.poi.ExcelUtil;
|
|
|
+import com.fs.handwrite.domain.HandwriteCollection;
|
|
|
+import com.fs.handwrite.service.IHandwriteCollectionService;
|
|
|
+import com.fs.hisStore.domain.FsStoreOrderScrm;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 手写信息采集表Controller
|
|
|
+ *
|
|
|
+ * @author fs
|
|
|
+ * @date 2024-01-01
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/handwrite/collection")
|
|
|
+public class HandwriteCollectionController extends BaseController
|
|
|
+{
|
|
|
+ @Autowired
|
|
|
+ private IHandwriteCollectionService handwriteCollectionService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询手写信息采集表列表
|
|
|
+ */
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo list(HandwriteCollection handwriteCollection)
|
|
|
+ {
|
|
|
+ startPage();
|
|
|
+ List<HandwriteCollection> list = handwriteCollectionService.selectHandwriteCollectionList(handwriteCollection);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出手写信息采集表列表
|
|
|
+ */
|
|
|
+ @PostMapping("/export")
|
|
|
+ public AjaxResult export(HttpServletResponse response, HandwriteCollection handwriteCollection)
|
|
|
+ {
|
|
|
+ List<HandwriteCollection> list = handwriteCollectionService.selectHandwriteCollectionList(handwriteCollection);
|
|
|
+ ExcelUtil<HandwriteCollection> util = new ExcelUtil<HandwriteCollection>(HandwriteCollection.class);
|
|
|
+ return util.exportExcel(list, "手写信息采集表数据");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取手写信息采集表详细信息
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/{id}")
|
|
|
+ public AjaxResult getInfo(@PathVariable("id") Integer id)
|
|
|
+ {
|
|
|
+ return AjaxResult.success(handwriteCollectionService.selectHandwriteCollectionById(id));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除手写信息采集表
|
|
|
+ */
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
+ public AjaxResult remove(@PathVariable Integer[] ids)
|
|
|
+ {
|
|
|
+ return toAjax(handwriteCollectionService.deleteHandwriteCollectionByIds(ids));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据商城订单号查询订单信息
|
|
|
+ * */
|
|
|
+ @GetMapping("/getOrderCodeInfo/{orderCode}")
|
|
|
+ public AjaxResult getOrderCodeInfo(@PathVariable String orderCode) {
|
|
|
+ if (StringUtils.isBlank(orderCode)){
|
|
|
+ return AjaxResult.error("订单号不能为空");
|
|
|
+ }
|
|
|
+ FsStoreOrderScrm orderCodeInfo = handwriteCollectionService.getOrderCodeInfo(orderCode);
|
|
|
+ if (orderCodeInfo == null){
|
|
|
+ return AjaxResult.error("商城订单不存在");
|
|
|
+ }
|
|
|
+ return AjaxResult.success(orderCodeInfo);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 检测上传的订单号
|
|
|
+ * */
|
|
|
+ @GetMapping("/checkOrderCode/{orderCode}")
|
|
|
+ public AjaxResult checkOrderCode(@PathVariable String orderCode) {
|
|
|
+ if (StringUtils.isBlank(orderCode)){
|
|
|
+ return AjaxResult.error("订单号不能为空");
|
|
|
+ }
|
|
|
+ return handwriteCollectionService.checkOrderCode(orderCode);
|
|
|
+ }
|
|
|
+}
|