Преглед на файлове

完善手写信息采集的创建人

cgp преди 18 часа
родител
ревизия
6a63b532d1

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

@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse;
 import com.fs.common.utils.ServletUtils;
 import com.fs.common.utils.StringUtils;
 import com.fs.framework.security.LoginUser;
+import com.fs.framework.security.SecurityUtils;
 import com.fs.framework.service.TokenService;
 import com.fs.his.param.CollectionOrcParam;
 import com.fs.his.vo.CollectionOrcVO;
@@ -72,6 +73,9 @@ public class HandwriteCollectionController extends BaseController
     @PostMapping
     public AjaxResult add(@RequestBody HandwriteCollection handwriteCollection)
     {
+        //获取当前登录用户
+        Long currentUserId = SecurityUtils.getLoginUser().getUser().getUserId();
+        handwriteCollection.setCompanyUserId(currentUserId);
         return toAjax(handwriteCollectionService.insertHandwriteCollection(handwriteCollection));
     }
 
@@ -81,6 +85,9 @@ public class HandwriteCollectionController extends BaseController
     @PutMapping
     public AjaxResult edit(@RequestBody HandwriteCollection handwriteCollection)
     {
+        //获取当前登录用户
+        Long currentUserId = SecurityUtils.getLoginUser().getUser().getUserId();
+        handwriteCollection.setUpdateBy(currentUserId);
         return toAjax(handwriteCollectionService.updateHandwriteCollection(handwriteCollection));
     }
 

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

@@ -3,6 +3,7 @@ package com.fs.company.controller.handwrite;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 
+import com.fs.framework.security.SecurityUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import com.fs.common.core.controller.BaseController;
@@ -62,6 +63,9 @@ public class HandwritePatientFormController extends BaseController
     @PostMapping
     public AjaxResult add(@RequestBody HandwritePatientForm handwritePatientForm)
     {
+        //获取当前登录用户
+        Long currentUserId = SecurityUtils.getLoginUser().getUser().getUserId();
+        handwritePatientForm.setCompanyUserId(currentUserId);
         return toAjax(handwritePatientFormService.insertHandwritePatientForm(handwritePatientForm));
     }
 
@@ -71,6 +75,9 @@ public class HandwritePatientFormController extends BaseController
     @PutMapping
     public AjaxResult edit(@RequestBody HandwritePatientForm handwritePatientForm)
     {
+        //获取当前登录用户
+        Long currentUserId = SecurityUtils.getLoginUser().getUser().getUserId();
+        handwritePatientForm.setUpdateBy(currentUserId);
         return toAjax(handwritePatientFormService.updateHandwritePatientForm(handwritePatientForm));
     }
 

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

@@ -46,4 +46,16 @@ public class HandwriteCollection implements Serializable
     /** 订单号 */
     @Excel(name = "订单号")
     private String orderCode;
+
+
+    /** 创建人 */
+    @Excel(name = "创建人")
+    private Long createBy;
+
+    /** 更新人 */
+    @Excel(name = "更新人")
+    private Long updateBy;
+
+    /** 销售id*/
+    private Long companyUserId;
 }

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

@@ -42,4 +42,15 @@ public class HandwritePatientForm implements Serializable
     /** 初诊单url */
     @Excel(name = "初诊单url")
     private String billImgUrl;
+
+    /** 创建人 */
+    @Excel(name = "创建人")
+    private Long createBy;
+
+    /** 更新人 */
+    @Excel(name = "更新人")
+    private Long updateBy;
+
+    /** 销售id*/
+    private Long companyUserId;
 }

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

@@ -68,6 +68,8 @@ public class HandwriteCollectionServiceImpl implements IHandwriteCollectionServi
     {
         handwriteCollection.setCreateTime(new Date());
         handwriteCollection.setUpdateTime(new Date());
+        handwriteCollection.setCreateBy(handwriteCollection.getCompanyUserId());
+        handwriteCollection.setUpdateBy(handwriteCollection.getCompanyUserId());
         try {
             return handwriteCollectionMapper.insertHandwriteCollection(handwriteCollection);
         } catch (DuplicateKeyException e) {

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

@@ -37,6 +37,8 @@ public class HandwritePatientFormServiceImpl implements IHandwritePatientFormSer
     {
         handwritePatientForm.setCreateTime(new Date());
         handwritePatientForm.setUpdateTime(new Date());
+        handwritePatientForm.setCreateBy(handwritePatientForm.getCompanyUserId());
+        handwritePatientForm.setUpdateBy(handwritePatientForm.getCompanyUserId());
         return handwritePatientFormMapper.insertHandwritePatientForm(handwritePatientForm);
     }
 

+ 20 - 8
fs-service/src/main/resources/mapper/handwrite/HandwriteCollectionMapper.xml

@@ -5,17 +5,20 @@
 <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"    />
+        <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"    />
+        <result property="createBy"      column="create_by"     />
+        <result property="updateBy"      column="update_by"     />
+        <result property="companyUserId" column="company_user_id"/>
     </resultMap>
 
     <sql id="selectHandwriteCollectionVo">
-        select id, patient_name, patient_phone, create_time, update_time, bill_img_url, order_code
+        select id, patient_name, patient_phone, create_time, update_time, bill_img_url, order_code, create_by, update_by, company_user_id
         from fs_handwrite_collection
     </sql>
 
@@ -44,6 +47,9 @@
             <if test="updateTime != null">update_time,</if>
             <if test="billImgUrl != null">bill_img_url,</if>
             <if test="orderCode != null">order_code,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="companyUserId != null">company_user_id,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="patientName != null">#{patientName},</if>
@@ -52,6 +58,9 @@
             <if test="updateTime != null">#{updateTime},</if>
             <if test="billImgUrl != null">#{billImgUrl},</if>
             <if test="orderCode != null">#{orderCode},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="companyUserId != null">#{companyUserId},</if>
         </trim>
     </insert>
 
@@ -64,6 +73,9 @@
             <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>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
         </trim>
         where id = #{id}
     </update>

+ 19 - 7
fs-service/src/main/resources/mapper/handwrite/HandwritePatientFormMapper.xml

@@ -5,16 +5,19 @@
 <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"  />
+        <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="createBy"      column="create_by"     />
+        <result property="updateBy"      column="update_by"     />
+        <result property="companyUserId" column="company_user_id"/>
     </resultMap>
 
     <sql id="selectHandwritePatientFormVo">
-        select id, patient_name, patient_phone, create_time, update_time, bill_img_url
+        select id, patient_name, patient_phone, create_time, update_time, bill_img_url, create_by, update_by, company_user_id
         from fs_handwrite_patient_form
     </sql>
 
@@ -41,6 +44,9 @@
             <if test="createTime != null">create_time,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="billImgUrl != null">bill_img_url,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="companyUserId != null">company_user_id,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="patientName != null">#{patientName},</if>
@@ -48,6 +54,9 @@
             <if test="createTime != null">#{createTime},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="billImgUrl != null">#{billImgUrl},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="companyUserId != null">#{companyUserId},</if>
         </trim>
     </insert>
 
@@ -59,6 +68,9 @@
             <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="createBy != null">create_by = #{createBy},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
         </trim>
         where id = #{id}
     </update>