Ver código fonte

总后台新增手写初诊单,手写信息采集入口

cgp 6 dias atrás
pai
commit
64980d8c76

+ 96 - 0
fs-admin/src/main/java/com/fs/crm/controller/HandwriteCollectionController.java

@@ -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);
+    }
+}

+ 68 - 0
fs-admin/src/main/java/com/fs/crm/controller/HandwritePatientFormController.java

@@ -0,0 +1,68 @@
+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.poi.ExcelUtil;
+import com.fs.handwrite.domain.HandwritePatientForm;
+import com.fs.handwrite.service.IHandwritePatientFormService;
+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/patientForm")
+public class HandwritePatientFormController extends BaseController
+{
+    @Autowired
+    private IHandwritePatientFormService handwritePatientFormService;
+
+    /**
+     * 查询手写初诊单列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(HandwritePatientForm handwritePatientForm)
+    {
+        startPage();
+        List<HandwritePatientForm> list = handwritePatientFormService.selectHandwritePatientFormList(handwritePatientForm);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出手写初诊单列表
+     */
+    @PostMapping("/export")
+    public AjaxResult export(HttpServletResponse response, HandwritePatientForm handwritePatientForm)
+    {
+        List<HandwritePatientForm> list = handwritePatientFormService.selectHandwritePatientFormList(handwritePatientForm);
+        ExcelUtil<HandwritePatientForm> util = new ExcelUtil<HandwritePatientForm>(HandwritePatientForm.class);
+        return util.exportExcel(list, "手写信息初诊单数据");
+    }
+
+    /**
+     * 获取手写初诊单详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Integer id)
+    {
+        return AjaxResult.success(handwritePatientFormService.selectHandwritePatientFormById(id));
+    }
+
+
+    /**
+     * 删除手写初诊单
+     */
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Integer[] ids)
+    {
+        return toAjax(handwritePatientFormService.deleteHandwritePatientFormByIds(ids));
+    }
+}

+ 3 - 0
fs-service/src/main/java/com/fs/handwrite/domain/HandwriteCollection.java

@@ -58,4 +58,7 @@ public class HandwriteCollection implements Serializable
 
     /** 销售id*/
     private Long companyUserId;
+
+    /** 销售名称*/
+    private String companyUserName;
 }

+ 3 - 0
fs-service/src/main/java/com/fs/handwrite/domain/HandwritePatientForm.java

@@ -53,4 +53,7 @@ public class HandwritePatientForm implements Serializable
 
     /** 销售id*/
     private Long companyUserId;
+
+    /** 销售名称*/
+    private String companyUserName;
 }

+ 10 - 6
fs-service/src/main/resources/mapper/handwrite/HandwriteCollectionMapper.xml

@@ -23,14 +23,18 @@
     </sql>
 
     <select id="selectHandwriteCollectionList" parameterType="HandwriteCollection" resultMap="HandwriteCollectionResult">
-        <include refid="selectHandwriteCollectionVo"/>
+        select hc.id, hc.patient_name, hc.patient_phone, hc.create_time, hc.update_time,
+               hc.bill_img_url, hc.order_code, hc.create_by, hc.update_by, hc.company_user_id,
+               cu.nick_name as companyUserName
+        from fs_handwrite_collection hc left join company_user cu on cu.user_id = hc.company_user_id
         <where>
-            <if test="patientName != null and patientName != ''"> and patient_name like concat('%', #{patientName}, '%')</if>
-            <if test="patientPhone != null and patientPhone != ''"> and patient_phone like concat('%', #{patientPhone}, '%')</if>
-            <if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
-            <if test="billImgUrl != null and billImgUrl != ''"> and bill_img_url = #{billImgUrl}</if>
+            <if test="patientName != null and patientName != ''"> and hc.patient_name like concat('%', #{patientName}, '%')</if>
+            <if test="patientPhone != null and patientPhone != ''"> and hc.patient_phone like concat('%', #{patientPhone}, '%')</if>
+            <if test="companyUserName != null and companyUserName != ''"> and cu.nick_name like concat('%', #{companyUserName}, '%')</if>
+            <if test="orderCode != null and orderCode != ''"> and hc.order_code = #{orderCode}</if>
+            <if test="billImgUrl != null and billImgUrl != ''"> and hc.bill_img_url = #{billImgUrl}</if>
         </where>
-        order by create_time desc
+        order by hc.create_time desc
     </select>
 
     <select id="selectHandwriteCollectionById" parameterType="Integer" resultMap="HandwriteCollectionResult">

+ 8 - 4
fs-service/src/main/resources/mapper/handwrite/HandwritePatientFormMapper.xml

@@ -22,11 +22,15 @@
     </sql>
 
     <select id="selectHandwritePatientFormList" parameterType="HandwritePatientForm" resultMap="HandwritePatientFormResult">
-        <include refid="selectHandwritePatientFormVo"/>
+        select hpf.id, hpf.patient_name, hpf.patient_phone, hpf.create_time,hpf.update_time,
+               hpf.bill_img_url, hpf.create_by, hpf.update_by, hpf.company_user_id,cu.user_name as companyUserName
+        from fs_handwrite_patient_form hpf
+        left join company_user cu on cu.user_id = hpf.company_user_id
         <where>
-            <if test="patientName != null and patientName != ''"> and patient_name like concat('%', #{patientName}, '%')</if>
-            <if test="patientPhone != null and patientPhone != ''"> and patient_phone like concat('%', #{patientPhone}, '%')</if>
-            <if test="billImgUrl != null and billImgUrl != ''"> and bill_img_url = #{billImgUrl}</if>
+            <if test="patientName != null and patientName != ''"> and hpf.patient_name like concat('%', #{patientName}, '%')</if>
+            <if test="patientPhone != null and patientPhone != ''"> and hpf.patient_phone like concat('%', #{patientPhone}, '%')</if>
+            <if test="companyUserName != null and companyUserName != ''"> and cu.nick_name like concat('%', #{companyUserName}, '%')</if>
+            <if test="billImgUrl != null and billImgUrl != ''"> and hpf.bill_img_url = #{billImgUrl}</if>
         </where>
         order by create_time desc
     </select>