Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

chenyongxing 8 years ago
parent
commit
8261c1b626

+ 1 - 4
common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionLog.java

@ -246,10 +246,7 @@ public class PrescriptionLog extends IdEntity {
    @Transient
    @Transient
    public String getStatusName() {
    public String getStatusName() {
        return statusName;
        return Prescription.getStatusName(this.status,hospitalName);
    }
    }
    public void setStatusName(String statusName) {
        this.statusName = Prescription.getStatusName(this.status,hospitalName);
    }
}
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionLogDao.java

@ -12,6 +12,6 @@ import java.util.List;
 */
 */
public interface PrescriptionLogDao extends PagingAndSortingRepository<PrescriptionLog, Long>, JpaSpecificationExecutor<PrescriptionLog> {
public interface PrescriptionLogDao extends PagingAndSortingRepository<PrescriptionLog, Long>, JpaSpecificationExecutor<PrescriptionLog> {
    @Query("select l.status,l.createTime from PrescriptionLog l where l.prescriptionCode=?1 and l.status in ?2 order by createTime desc")
    @Query(" from PrescriptionLog l where l.prescriptionCode=?1 and l.status in ?2 order by createTime desc")
    List<PrescriptionLog> findPrescriptionLogsByPrescriptionCode(String prescriptionCode, Integer[] types);
    List<PrescriptionLog> findPrescriptionLogsByPrescriptionCode(String prescriptionCode, Integer[] types);
}
}

+ 11 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionLogController.java

@ -4,11 +4,13 @@ import com.yihu.wlyy.entity.patient.prescription.PrescriptionExpressageLog;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageLogService;
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageLogService;
import com.yihu.wlyy.service.app.prescription.PrescriptionLogService;
import com.yihu.wlyy.service.app.prescription.PrescriptionLogService;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.web.BaseController;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiParam;
import org.json.JSONArray;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestMethod;
@ -108,7 +110,15 @@ public class PrescriptionLogController extends BaseController {
                }
                }
            });
            });
            if (prescriptionLogs != null) {
            if (prescriptionLogs != null) {
                return write(200, "获取处方流程成功", "data", new JSONArray(prescriptionLogs));
                JSONArray ja = new JSONArray();
                prescriptionLogs.stream().forEach(one -> {
                    JSONObject jo = new JSONObject();
                    jo.put("createTime", DateUtil.dateToStrLong(one.getCreateTime()));
                    jo.put("statusName", one.getStatusName());
                    ja.put(jo);
                });
                return write(200, "获取处方流程成功", "data", ja);
            } else {
            } else {
                return error(-1, "获取失败");
                return error(-1, "获取失败");
            }
            }

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

@ -4,11 +4,13 @@ import com.yihu.wlyy.entity.patient.prescription.PrescriptionExpressageLog;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageLogService;
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageLogService;
import com.yihu.wlyy.service.app.prescription.PrescriptionLogService;
import com.yihu.wlyy.service.app.prescription.PrescriptionLogService;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.web.BaseController;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiParam;
import org.json.JSONArray;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestMethod;
@ -80,7 +82,15 @@ public class PatientPrescriptionLogController extends BaseController {
                }
                }
            });
            });
            if (prescriptionLogs != null) {
            if (prescriptionLogs != null) {
                return write(200, "获取处方流程成功", "data", new JSONArray(prescriptionLogs));
                JSONArray ja = new JSONArray();
                prescriptionLogs.stream().forEach(one -> {
                    JSONObject jo = new JSONObject();
                    jo.put("createTime", DateUtil.dateToStrLong(one.getCreateTime()));
                    jo.put("statusName", one.getStatusName());
                    ja.put(jo);
                });
                return write(200, "获取处方流程成功", "data", ja);
            } else {
            } else {
                return error(-1, "获取失败");
                return error(-1, "获取失败");
            }
            }