Bladeren bron

开方功能

xdd 1 maand geleden
bovenliggende
commit
3d1ae2cfde

+ 2 - 1
fs-qw-task/src/main/resources/application.yml

@@ -8,6 +8,7 @@ spring:
   profiles:
 #    active: dev
 #    active: druid-hcl
+    active: druid-yzt
 #    active: druid-sxjz
 #    active: druid-hdt
-    active: druid-fcky-test
+#    active: druid-fcky-test

+ 2 - 2
fs-qwhook/src/main/resources/application.yml

@@ -7,7 +7,7 @@ server:
 spring:
   profiles:
 #    active: dev
-#    active: druid-yzt
+    active: druid-yzt
 #    active: druid-hdt
 #    active: druid-sxjz
-    active: druid-sft
+#    active: druid-sft

+ 5 - 0
fs-service/src/main/java/com/fs/his/param/FsPrescribeListUParam.java

@@ -24,4 +24,9 @@ public class FsPrescribeListUParam extends BaseParam implements Serializable {
      * 患者姓名
      */
     private String patientName;
+
+    /**
+     * 0待确认 1待付款
+     */
+    private Integer prescribeType;
 }

+ 1 - 0
fs-service/src/main/java/com/fs/his/service/IFsPrescribeService.java

@@ -74,6 +74,7 @@ public interface IFsPrescribeService
     String getFsPrescribeXyImg(PrescribeXyImgParam prescribeXyImgParam);
 
     List<FsPrescribeListUVO> selectFsPrescribeListUVO(FsPrescribeListUParam param);
+    List<FsPrescribeListUVO> selectFsPrescribeListUVOWithOrder(FsPrescribeListUParam param);
 
     FsPrescribeVO selectFsPrescribeByPrescribeIdVO(Long prescribeId);
 

+ 12 - 1
fs-service/src/main/java/com/fs/his/service/impl/FsPrescribeServiceImpl.java

@@ -379,7 +379,18 @@ public class FsPrescribeServiceImpl implements IFsPrescribeService
         return list;
     }
 
-//    @Async
+    @Override
+    public List<FsPrescribeListUVO> selectFsPrescribeListUVOWithOrder(FsPrescribeListUParam param) {
+        List<FsPrescribeListUVO> list=fsPrescribeMapper.selectFsPrescribeListUVOWithOrder(param);
+        for(FsPrescribeListUVO vo:list){
+            FsPrescribeDrug map=new FsPrescribeDrug();
+            map.setPrescribeId(vo.getPrescribeId());
+            vo.setDrugs(fsPrescribeDrugMapper.selectFsPrescribeDrugList(map));
+        }
+        return list;
+    }
+
+    //    @Async
     @Override
     @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
     public String PrescribeImg(Long PrescribeId){

+ 11 - 2
fs-service/src/main/resources/mapper/his/FsPrescribeMapper.xml

@@ -229,6 +229,7 @@
             <if test="icdCode != null">icd_code = #{icdCode},</if>
             <if test="source != null">source = #{source},</if>
             <if test="prescribeImgStoreUrl != null">prescribe_img_store_url = #{prescribeImgStoreUrl},</if>
+            <if test="userConfirm != null">user_confirm = #{userConfirm},</if>
         </trim>
         where prescribe_id = #{prescribeId}
     </update>
@@ -273,7 +274,7 @@
     <select id="selectFsPrescribeListUVOWithOrder" resultType="com.fs.his.vo.FsPrescribeListUVO">
         select p.*,o.is_pay  from fs_prescribe p
         left join fs_store_order o
-        on o.order_id=p.order_id
+        on o.order_id=p.store_order_id
         <where>
             <if test = "maps.userId != null">
                 and p.user_id = #{maps.userId}
@@ -282,7 +283,7 @@
                 and p.status = #{maps.status}
             </if>
             <if test="maps.patientName != null">
-                and p.patient_name like count(#{patientName},'%')
+                and p.patient_name like concat(#{maps.patientName},'%')
             </if>
             <if test="maps.userIds != null and maps.userIds.size() > 0">
                 and p.user_id in
@@ -290,6 +291,14 @@
                     #{item}
                 </foreach>
             </if>
+            -- 待确认
+            <if test="maps.prescribeType == 0">
+                AND p.user_confirm=0
+            </if>
+            -- 待付款
+            <if test="maps.prescribeType == 1">
+                AND o.is_pay=0
+            </if>
         </where>
          order by
         case when o.is_pay = 0 or o.is_pay is null then 0 else 1 end,

+ 2 - 2
fs-user-app/src/main/java/com/fs/app/controller/PrescribeController.java

@@ -43,7 +43,6 @@ public class PrescribeController extends  AppBaseController {
     @Autowired
     private IFsPrescribeService prescribeService;
 
-
     @Autowired
     private IFsPrescribeDrugService prescribeDrugService;
     @Autowired
@@ -81,7 +80,7 @@ public class PrescribeController extends  AppBaseController {
         param.setUserIds(userIds);
 
         PageHelper.startPage(param.getPageNum(), param.getPageSize());
-        List<FsPrescribeListUVO> list=prescribeService.selectFsPrescribeListUVO(param);
+        List<FsPrescribeListUVO> list=prescribeService.selectFsPrescribeListUVOWithOrder(param);
         PageInfo<FsPrescribeListUVO> listPageInfo=new PageInfo<>(list);
         return R.ok().put("data",listPageInfo);
     }
@@ -119,6 +118,7 @@ public class PrescribeController extends  AppBaseController {
             throw new IllegalArgumentException("该处方已确认,请勿重复确认!");
         }
         prescribe.setUserConfirm(1);
+        prescribeService.updateFsPrescribe(prescribe);
         return R.ok();
     }