Quellcode durchsuchen

销售端-手写初诊单,手写信息采集增删改查语句

cgp vor 2 Tagen
Ursprung
Commit
8d1860079c

+ 85 - 0
fs-company/src/main/java/com/fs/company/controller/handwrite/HandwriteCollectionController.java

@@ -0,0 +1,85 @@
+package com.fs.company.controller.handwrite;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+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.HandwriteCollection;
+import com.fs.handwrite.service.IHandwriteCollectionService;
+
+/**
+ * 手写信息采集表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));
+    }
+
+    /**
+     * 新增手写信息采集表
+     */
+    @PostMapping
+    public AjaxResult add(@RequestBody HandwriteCollection handwriteCollection)
+    {
+        return toAjax(handwriteCollectionService.insertHandwriteCollection(handwriteCollection));
+    }
+
+    /**
+     * 修改手写信息采集表
+     */
+    @PutMapping
+    public AjaxResult edit(@RequestBody HandwriteCollection handwriteCollection)
+    {
+        return toAjax(handwriteCollectionService.updateHandwriteCollection(handwriteCollection));
+    }
+
+    /**
+     * 删除手写信息采集表
+     */
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Integer[] ids)
+    {
+        return toAjax(handwriteCollectionService.deleteHandwriteCollectionByIds(ids));
+    }
+}

+ 85 - 0
fs-company/src/main/java/com/fs/company/controller/handwrite/HandwritePatientFormController.java

@@ -0,0 +1,85 @@
+package com.fs.company.controller.handwrite;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+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;
+
+/**
+ * 手写初诊单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));
+    }
+
+    /**
+     * 新增手写初诊单
+     */
+    @PostMapping
+    public AjaxResult add(@RequestBody HandwritePatientForm handwritePatientForm)
+    {
+        return toAjax(handwritePatientFormService.insertHandwritePatientForm(handwritePatientForm));
+    }
+
+    /**
+     * 修改手写初诊单
+     */
+    @PutMapping
+    public AjaxResult edit(@RequestBody HandwritePatientForm handwritePatientForm)
+    {
+        return toAjax(handwritePatientFormService.updateHandwritePatientForm(handwritePatientForm));
+    }
+
+    /**
+     * 删除手写初诊单
+     */
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Integer[] ids)
+    {
+        return toAjax(handwritePatientFormService.deleteHandwritePatientFormByIds(ids));
+    }
+}

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

@@ -0,0 +1,49 @@
+package com.fs.handwrite.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 手写信息采集表对象 fs_handwrite_collection
+ * 
+ * @author fs
+ * @date 2024-01-01
+ */
+@Data
+public class HandwriteCollection implements Serializable
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键ID */
+    @Excel(name = "主键ID")
+    private Integer id;
+
+    /** 患者姓名 */
+    @Excel(name = "患者姓名")
+    private String patientName;
+
+    /** 患者电话 */
+    @Excel(name = "患者电话")
+    private String patientPhone;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    /** 更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /** 手写信息采集表url */
+    @Excel(name = "手写信息采集表url")
+    private String billImgUrl;
+
+    /** 订单号 */
+    @Excel(name = "订单号")
+    private String orderCode;
+}

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

@@ -0,0 +1,45 @@
+package com.fs.handwrite.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 手写初诊单对象 fs_handwrite_patient_form
+ * 
+ * @author fs
+ * @date 2024-01-01
+ */
+@Data
+public class HandwritePatientForm implements Serializable
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键ID */
+    @Excel(name = "主键ID")
+    private Integer id;
+
+    /** 患者姓名 */
+    @Excel(name = "患者姓名")
+    private String patientName;
+
+    /** 患者电话 */
+    @Excel(name = "患者电话")
+    private String patientPhone;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    /** 更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /** 初诊单url */
+    @Excel(name = "初诊单url")
+    private String billImgUrl;
+}

+ 61 - 0
fs-service/src/main/java/com/fs/handwrite/mapper/HandwriteCollectionMapper.java

@@ -0,0 +1,61 @@
+package com.fs.handwrite.mapper;
+
+import com.fs.handwrite.domain.HandwriteCollection;
+import java.util.List;
+
+/**
+ * 手写信息采集表Mapper接口
+ * 
+ * @author fs
+ * @date 2024-01-01
+ */
+public interface HandwriteCollectionMapper
+{
+    /**
+     * 查询手写信息采集表
+     * 
+     * @param id 手写信息采集表主键
+     * @return 手写信息采集表
+     */
+    public HandwriteCollection selectHandwriteCollectionById(Integer id);
+
+    /**
+     * 查询手写信息采集表列表
+     * 
+     * @param handwriteCollection 手写信息采集表
+     * @return 手写信息采集表集合
+     */
+    public List<HandwriteCollection> selectHandwriteCollectionList(HandwriteCollection handwriteCollection);
+
+    /**
+     * 新增手写信息采集表
+     * 
+     * @param handwriteCollection 手写信息采集表
+     * @return 结果
+     */
+    public int insertHandwriteCollection(HandwriteCollection handwriteCollection);
+
+    /**
+     * 修改手写信息采集表
+     * 
+     * @param handwriteCollection 手写信息采集表
+     * @return 结果
+     */
+    public int updateHandwriteCollection(HandwriteCollection handwriteCollection);
+
+    /**
+     * 删除手写信息采集表
+     * 
+     * @param id 手写信息采集表主键
+     * @return 结果
+     */
+    public int deleteHandwriteCollectionById(Integer id);
+
+    /**
+     * 批量删除手写信息采集表
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteHandwriteCollectionByIds(Integer[] ids);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/handwrite/mapper/HandwritePatientFormMapper.java

@@ -0,0 +1,61 @@
+package com.fs.handwrite.mapper;
+
+import com.fs.handwrite.domain.HandwritePatientForm;
+import java.util.List;
+
+/**
+ * 手写初诊单Mapper接口
+ * 
+ * @author fs
+ * @date 2024-01-01
+ */
+public interface HandwritePatientFormMapper
+{
+    /**
+     * 查询手写初诊单
+     * 
+     * @param id 手写初诊单主键
+     * @return 手写初诊单
+     */
+    public HandwritePatientForm selectHandwritePatientFormById(Integer id);
+
+    /**
+     * 查询手写初诊单列表
+     * 
+     * @param handwritePatientForm 手写初诊单
+     * @return 手写初诊单集合
+     */
+    public List<HandwritePatientForm> selectHandwritePatientFormList(HandwritePatientForm handwritePatientForm);
+
+    /**
+     * 新增手写初诊单
+     * 
+     * @param handwritePatientForm 手写初诊单
+     * @return 结果
+     */
+    public int insertHandwritePatientForm(HandwritePatientForm handwritePatientForm);
+
+    /**
+     * 修改手写初诊单
+     * 
+     * @param handwritePatientForm 手写初诊单
+     * @return 结果
+     */
+    public int updateHandwritePatientForm(HandwritePatientForm handwritePatientForm);
+
+    /**
+     * 删除手写初诊单
+     * 
+     * @param id 手写初诊单主键
+     * @return 结果
+     */
+    public int deleteHandwritePatientFormById(Integer id);
+
+    /**
+     * 批量删除手写初诊单
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteHandwritePatientFormByIds(Integer[] ids);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/handwrite/service/IHandwriteCollectionService.java

@@ -0,0 +1,61 @@
+package com.fs.handwrite.service;
+
+import com.fs.handwrite.domain.HandwriteCollection;
+import java.util.List;
+
+/**
+ * 手写信息采集表Service接口
+ * 
+ * @author fs
+ * @date 2024-01-01
+ */
+public interface IHandwriteCollectionService
+{
+    /**
+     * 查询手写信息采集表
+     * 
+     * @param id 手写信息采集表主键
+     * @return 手写信息采集表
+     */
+    public HandwriteCollection selectHandwriteCollectionById(Integer id);
+
+    /**
+     * 查询手写信息采集表列表
+     * 
+     * @param handwriteCollection 手写信息采集表
+     * @return 手写信息采集表集合
+     */
+    public List<HandwriteCollection> selectHandwriteCollectionList(HandwriteCollection handwriteCollection);
+
+    /**
+     * 新增手写信息采集表
+     * 
+     * @param handwriteCollection 手写信息采集表
+     * @return 结果
+     */
+    public int insertHandwriteCollection(HandwriteCollection handwriteCollection);
+
+    /**
+     * 修改手写信息采集表
+     * 
+     * @param handwriteCollection 手写信息采集表
+     * @return 结果
+     */
+    public int updateHandwriteCollection(HandwriteCollection handwriteCollection);
+
+    /**
+     * 批量删除手写信息采集表
+     * 
+     * @param ids 需要删除的手写信息采集表主键集合
+     * @return 结果
+     */
+    public int deleteHandwriteCollectionByIds(Integer[] ids);
+
+    /**
+     * 删除手写信息采集表信息
+     * 
+     * @param id 手写信息采集表主键
+     * @return 结果
+     */
+    public int deleteHandwriteCollectionById(Integer id);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/handwrite/service/IHandwritePatientFormService.java

@@ -0,0 +1,61 @@
+package com.fs.handwrite.service;
+
+import com.fs.handwrite.domain.HandwritePatientForm;
+import java.util.List;
+
+/**
+ * 手写初诊单Service接口
+ * 
+ * @author fs
+ * @date 2024-01-01
+ */
+public interface IHandwritePatientFormService
+{
+    /**
+     * 查询手写初诊单
+     * 
+     * @param id 手写初诊单主键
+     * @return 手写初诊单
+     */
+    public HandwritePatientForm selectHandwritePatientFormById(Integer id);
+
+    /**
+     * 查询手写初诊单列表
+     * 
+     * @param handwritePatientForm 手写初诊单
+     * @return 手写初诊单集合
+     */
+    public List<HandwritePatientForm> selectHandwritePatientFormList(HandwritePatientForm handwritePatientForm);
+
+    /**
+     * 新增手写初诊单
+     * 
+     * @param handwritePatientForm 手写初诊单
+     * @return 结果
+     */
+    public int insertHandwritePatientForm(HandwritePatientForm handwritePatientForm);
+
+    /**
+     * 修改手写初诊单
+     * 
+     * @param handwritePatientForm 手写初诊单
+     * @return 结果
+     */
+    public int updateHandwritePatientForm(HandwritePatientForm handwritePatientForm);
+
+    /**
+     * 批量删除手写初诊单
+     * 
+     * @param ids 需要删除的手写初诊单主键集合
+     * @return 结果
+     */
+    public int deleteHandwritePatientFormByIds(Integer[] ids);
+
+    /**
+     * 删除手写初诊单信息
+     * 
+     * @param id 手写初诊单主键
+     * @return 结果
+     */
+    public int deleteHandwritePatientFormById(Integer id);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/handwrite/service/impl/HandwriteCollectionServiceImpl.java

@@ -0,0 +1,61 @@
+package com.fs.handwrite.service.impl;
+
+import com.fs.handwrite.domain.HandwriteCollection;
+import com.fs.handwrite.mapper.HandwriteCollectionMapper;
+import com.fs.handwrite.service.IHandwriteCollectionService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 手写信息采集表Service业务层处理
+ * 
+ * @author fs
+ * @date 2024-01-01
+ */
+@Service
+public class HandwriteCollectionServiceImpl implements IHandwriteCollectionService
+{
+    @Autowired
+    private HandwriteCollectionMapper handwriteCollectionMapper;
+
+    @Override
+    public HandwriteCollection selectHandwriteCollectionById(Integer id)
+    {
+        return handwriteCollectionMapper.selectHandwriteCollectionById(id);
+    }
+
+    @Override
+    public List<HandwriteCollection> selectHandwriteCollectionList(HandwriteCollection handwriteCollection)
+    {
+        return handwriteCollectionMapper.selectHandwriteCollectionList(handwriteCollection);
+    }
+
+    @Override
+    public int insertHandwriteCollection(HandwriteCollection handwriteCollection)
+    {
+        handwriteCollection.setCreateTime(new Date());
+        handwriteCollection.setUpdateTime(new Date());
+        return handwriteCollectionMapper.insertHandwriteCollection(handwriteCollection);
+    }
+
+    @Override
+    public int updateHandwriteCollection(HandwriteCollection handwriteCollection)
+    {
+        handwriteCollection.setUpdateTime(new Date());
+        return handwriteCollectionMapper.updateHandwriteCollection(handwriteCollection);
+    }
+
+    @Override
+    public int deleteHandwriteCollectionByIds(Integer[] ids)
+    {
+        return handwriteCollectionMapper.deleteHandwriteCollectionByIds(ids);
+    }
+
+    @Override
+    public int deleteHandwriteCollectionById(Integer id)
+    {
+        return handwriteCollectionMapper.deleteHandwriteCollectionById(id);
+    }
+}

+ 61 - 0
fs-service/src/main/java/com/fs/handwrite/service/impl/HandwritePatientFormServiceImpl.java

@@ -0,0 +1,61 @@
+package com.fs.handwrite.service.impl;
+
+import com.fs.handwrite.domain.HandwritePatientForm;
+import com.fs.handwrite.mapper.HandwritePatientFormMapper;
+import com.fs.handwrite.service.IHandwritePatientFormService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 手写初诊单Service业务层处理
+ * 
+ * @author fs
+ * @date 2024-01-01
+ */
+@Service
+public class HandwritePatientFormServiceImpl implements IHandwritePatientFormService
+{
+    @Autowired
+    private HandwritePatientFormMapper handwritePatientFormMapper;
+
+    @Override
+    public HandwritePatientForm selectHandwritePatientFormById(Integer id)
+    {
+        return handwritePatientFormMapper.selectHandwritePatientFormById(id);
+    }
+
+    @Override
+    public List<HandwritePatientForm> selectHandwritePatientFormList(HandwritePatientForm handwritePatientForm)
+    {
+        return handwritePatientFormMapper.selectHandwritePatientFormList(handwritePatientForm);
+    }
+
+    @Override
+    public int insertHandwritePatientForm(HandwritePatientForm handwritePatientForm)
+    {
+        handwritePatientForm.setCreateTime(new Date());
+        handwritePatientForm.setUpdateTime(new Date());
+        return handwritePatientFormMapper.insertHandwritePatientForm(handwritePatientForm);
+    }
+
+    @Override
+    public int updateHandwritePatientForm(HandwritePatientForm handwritePatientForm)
+    {
+        handwritePatientForm.setUpdateTime(new Date());
+        return handwritePatientFormMapper.updateHandwritePatientForm(handwritePatientForm);
+    }
+
+    @Override
+    public int deleteHandwritePatientFormByIds(Integer[] ids)
+    {
+        return handwritePatientFormMapper.deleteHandwritePatientFormByIds(ids);
+    }
+
+    @Override
+    public int deleteHandwritePatientFormById(Integer id)
+    {
+        return handwritePatientFormMapper.deleteHandwritePatientFormById(id);
+    }
+}

+ 82 - 0
fs-service/src/main/resources/mapper/handwrite/HandwriteCollectionMapper.xml

@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fs.handwrite.mapper.HandwriteCollectionMapper">
+
+    <resultMap type="HandwriteCollection" id="HandwriteCollectionResult">
+        <result property="id"           column="id"            />
+        <result property="patientName"  column="patient_name"  />
+        <result property="patientPhone" column="patient_phone" />
+        <result property="createTime"   column="create_time"   />
+        <result property="updateTime"   column="update_time"   />
+        <result property="billImgUrl"   column="bill_img_url"  />
+        <result property="orderCode"    column="order_code"    />
+    </resultMap>
+
+    <sql id="selectHandwriteCollectionVo">
+        select id, patient_name, patient_phone, create_time, update_time, bill_img_url, order_code
+        from fs_handwrite_collection
+    </sql>
+
+    <select id="selectHandwriteCollectionList" parameterType="HandwriteCollection" resultMap="HandwriteCollectionResult">
+        <include refid="selectHandwriteCollectionVo"/>
+        <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>
+        </where>
+        order by create_time desc
+    </select>
+
+    <select id="selectHandwriteCollectionById" parameterType="Integer" resultMap="HandwriteCollectionResult">
+        <include refid="selectHandwriteCollectionVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertHandwriteCollection" parameterType="HandwriteCollection" useGeneratedKeys="true" keyProperty="id">
+        insert into fs_handwrite_collection
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="patientName != null">patient_name,</if>
+            <if test="patientPhone != null">patient_phone,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="billImgUrl != null">bill_img_url,</if>
+            <if test="orderCode != null">order_code,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="patientName != null">#{patientName},</if>
+            <if test="patientPhone != null">#{patientPhone},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="billImgUrl != null">#{billImgUrl},</if>
+            <if test="orderCode != null">#{orderCode},</if>
+        </trim>
+    </insert>
+
+    <update id="updateHandwriteCollection" parameterType="HandwriteCollection">
+        update fs_handwrite_collection
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="patientName != null">patient_name = #{patientName},</if>
+            <if test="patientPhone != null">patient_phone = #{patientPhone},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="billImgUrl != null">bill_img_url = #{billImgUrl},</if>
+            <if test="orderCode != null">order_code = #{orderCode},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteHandwriteCollectionById" parameterType="Integer">
+        delete from fs_handwrite_collection where id = #{id}
+    </delete>
+
+    <delete id="deleteHandwriteCollectionByIds" parameterType="String">
+        delete from fs_handwrite_collection where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>

+ 77 - 0
fs-service/src/main/resources/mapper/handwrite/HandwritePatientFormMapper.xml

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fs.handwrite.mapper.HandwritePatientFormMapper">
+
+    <resultMap type="HandwritePatientForm" id="HandwritePatientFormResult">
+        <result property="id"           column="id"            />
+        <result property="patientName"  column="patient_name"  />
+        <result property="patientPhone" column="patient_phone" />
+        <result property="createTime"   column="create_time"   />
+        <result property="updateTime"   column="update_time"   />
+        <result property="billImgUrl"   column="bill_img_url"  />
+    </resultMap>
+
+    <sql id="selectHandwritePatientFormVo">
+        select id, patient_name, patient_phone, create_time, update_time, bill_img_url
+        from fs_handwrite_patient_form
+    </sql>
+
+    <select id="selectHandwritePatientFormList" parameterType="HandwritePatientForm" resultMap="HandwritePatientFormResult">
+        <include refid="selectHandwritePatientFormVo"/>
+        <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>
+        </where>
+        order by create_time desc
+    </select>
+
+    <select id="selectHandwritePatientFormById" parameterType="Integer" resultMap="HandwritePatientFormResult">
+        <include refid="selectHandwritePatientFormVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertHandwritePatientForm" parameterType="HandwritePatientForm" useGeneratedKeys="true" keyProperty="id">
+        insert into fs_handwrite_patient_form
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="patientName != null">patient_name,</if>
+            <if test="patientPhone != null">patient_phone,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="billImgUrl != null">bill_img_url,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="patientName != null">#{patientName},</if>
+            <if test="patientPhone != null">#{patientPhone},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="billImgUrl != null">#{billImgUrl},</if>
+        </trim>
+    </insert>
+
+    <update id="updateHandwritePatientForm" parameterType="HandwritePatientForm">
+        update fs_handwrite_patient_form
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="patientName != null">patient_name = #{patientName},</if>
+            <if test="patientPhone != null">patient_phone = #{patientPhone},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="billImgUrl != null">bill_img_url = #{billImgUrl},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteHandwritePatientFormById" parameterType="Integer">
+        delete from fs_handwrite_patient_form where id = #{id}
+    </delete>
+
+    <delete id="deleteHandwritePatientFormByIds" parameterType="String">
+        delete from fs_handwrite_patient_form where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>