Browse Source

Merge branch 'dev' of trick9191/patient-co-management into dev

trick9191 7 năm trước cách đây
mục cha
commit
267c5caa85

+ 5 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionDao.java

@ -7,6 +7,7 @@ import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.Date;
import java.util.List;
/**
@ -20,6 +21,10 @@ public interface PrescriptionDao extends PagingAndSortingRepository<Prescription
    @Query("update Prescription p set p.status=?2 where p.code=?1")
    void updateStatus(String prescriptionCode,Integer status);
    @Modifying
    @Query("update Prescription p set p.status=?2 ,p.finishTime =?3 where p.code=?1")
    void updateStatus(String prescriptionCode, Integer status, Date date);
    @Query("select p from Prescription p where p.jwCode=?1 and p.status=?2 and p.patient=?3 ")
    List<Prescription> fingdByJwCodeAndStatus(String jwcode,Integer status,String patient);
    //根据处方code得到患者信息

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/express/SFExpressService.java

@ -333,7 +333,7 @@ public class SFExpressService extends BaseService {
            //如果路由信息节点包含了"已收件"节点,这修改处方派送状态为完成,增加物流派送日志为完成
            if(isContainEndRoutInfo){
                //修改处方状态为完成
                prescriptionDao.updateStatus(sfexpress_obj.getPrescriptionCode(), PrescriptionLog.PrescriptionLogStatus.finish.getValue());
                prescriptionDao.updateStatus(sfexpress_obj.getPrescriptionCode(), PrescriptionLog.PrescriptionLogStatus.finish.getValue(),new Date());
                //保存配送成功的日志
                PrescriptionLog prescriptionLog = new PrescriptionLog();
@ -459,7 +459,7 @@ public class SFExpressService extends BaseService {
            //如果路由信息节点包含了"已收件"节点,则修改处方状态为完成,增加物流派送日志为完成
            if(isContainEndRoutInfo){
                //修改处方状态为完成
                prescriptionDao.updateStatus(sfexpress.getPrescriptionCode(), PrescriptionLog.PrescriptionLogStatus.finish.getValue());
                prescriptionDao.updateStatus(sfexpress.getPrescriptionCode(), PrescriptionLog.PrescriptionLogStatus.finish.getValue(),new Date());
                //保存配送成功的日志
                PrescriptionLog prescriptionLog = new PrescriptionLog();

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionExpressageService.java

@ -551,6 +551,7 @@ public class PrescriptionExpressageService extends BaseService {
            p.setDrugDeliveryReasonCode(reasonCode);
            p.setDrugDeliveryReasonValue(reasonName);
            p.setDrugDeliveryTime(new Date());
            p.setFinishTime(new Date());
            prescriptionDao.save(p);
            //更新日志

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionService.java

@ -121,7 +121,7 @@ public class PrescriptionService extends BaseService {
            if (type == 1){
                //直接更改状态为已完成
                prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.finish.getValue());
                prescription.setFinishTime(new Date());
            }else if (type == 2){
                //不更改状态只添加延长收药时间
                int extendCount = prescription.getExtendCount();

+ 6 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/pc/prescription/PrescriptionExpressagePCService.java

@ -286,7 +286,7 @@ public class PrescriptionExpressagePCService extends BaseService {
        switch (prescriptionDispensaryCode.getType()) {
            case 1: {
                //判断是1 居民取药码
                dispensaryCode_1(userCode, prescriptionDispensaryCode);
                dispensaryCode_1(prescription,userCode, prescriptionDispensaryCode);
                break;
            }
            case 2: {
@ -317,10 +317,13 @@ public class PrescriptionExpressagePCService extends BaseService {
     * @param prescriptionDispensaryCode
     * @return
     */
    public void dispensaryCode_1(String userCode, PrescriptionDispensaryCode prescriptionDispensaryCode) {
    public void dispensaryCode_1(Prescription prescription ,String userCode, PrescriptionDispensaryCode prescriptionDispensaryCode) {
        //修改处方状态为完成
        prescriptionDao.updateStatus(prescriptionDispensaryCode.getPrescriptionCode(), PrescriptionLog.PrescriptionLogStatus.finish.getValue());
        //prescriptionDao.updateStatus(prescriptionDispensaryCode.getPrescriptionCode(), PrescriptionLog.PrescriptionLogStatus.finish.getValue());
        prescription.setFinishTime(new Date());
        prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.finish.getValue());
        prescriptionDao.save(prescription);
        //保存配送成功的日志
        PrescriptionLog prescriptionLog = new PrescriptionLog();

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 16 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/HttpUtil.java


+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionInfoController.java

@ -66,7 +66,7 @@ public class PatientPrescriptionInfoController extends BaseController {
                                      @RequestParam(required = false)@ApiParam(name="size",value="每页记录数")Integer size){
        try {
//            com.alibaba.fastjson.JSONObject json = prescriptionInfoService.getRecipeMasterList("ec7572875d27446cb4f067b13a85d72a",startDate,endDate,isRenewal,diagnosisCode,page,size);
            com.alibaba.fastjson.JSONObject json = prescriptionInfoService.getRecipeMasterList(getRepUID(),startDate,endDate,isRenewal,diagnosisCode,page,size);
            com.alibaba.fastjson.JSONObject json = prescriptionInfoService.getRecipeMasterList(getRepUID(),"2017-12-01","2018-01-01",isRenewal,diagnosisCode,page,size);
            return write(200, "查询成功!", "data",json);
        }catch (Exception e){
            error(e);