Jelajahi Sumber

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

liuwenbin 7 tahun lalu
induk
melakukan
09c35343bf

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

@ -494,6 +494,7 @@ public class PrescriptionExpressageService extends BaseService {
                        " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                        " WHERE " +
                        " p.patient = '" + p.getCode() + "' " +
                        " AND py.trade_status ='1' " +
                        " AND p.`status`>=50 " +
                        " ORDER BY p.`status` ASC ";
                List<Map<String, Object>> totallist = jdbcTemplate.queryForList(sqlTotal);
@ -519,7 +520,8 @@ public class PrescriptionExpressageService extends BaseService {
                        " wlyy_prescription p " +
                        " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                        " WHERE " +
                        " p.patient = '" + p.getCode() + "' " +
                        " p.patient = '" + p.getCode() + "'" +
                        " AND py.trade_status ='1' " +
                        " AND p.`status`>=50 " +
                        " ORDER BY p.`status` ASC " +
                        " LIMIT " + start + "," + pageSize;
@ -631,7 +633,8 @@ public class PrescriptionExpressageService extends BaseService {
                " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                " LEFT JOIN wlyy_prescription_expressage e ON p.code = e.prescription_code" +
                " WHERE" +
                " p.hospital = '"+d.getHospital()+"' ";
                " p.hospital = '"+d.getHospital()+"' " +
                " AND py.trade_status = '1' ";
        totalSql = setSQL( totalSql,keyWord,state,type,startDate,endDate,operator,flag);
        totalSql +=  " AND p.`status`>=50 ";
        List<Map<String, Object>> totallist = jdbcTemplate.queryForList(totalSql);
@ -662,7 +665,8 @@ public class PrescriptionExpressageService extends BaseService {
                " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                " LEFT JOIN wlyy_prescription_expressage e ON p.code = e.prescription_code" +
                " WHERE" +
                " p.hospital = '"+d.getHospital()+"' ";
                " p.hospital = '"+d.getHospital()+"' " +
                " AND py.trade_status = '1' ";
        sql = setSQL( sql,keyWord,state,type,startDate,endDate,operator,flag);
        sql +=  " AND p.`status`>=50 " +
                " ORDER BY py.charge_time DESC " +
@ -744,7 +748,8 @@ public class PrescriptionExpressageService extends BaseService {
                " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                " LEFT JOIN wlyy_prescription_expressage e ON p.code = e.prescription_code" +
                " WHERE" +
                " p.hospital = '"+d.getHospital()+"' ";
                " p.hospital = '"+d.getHospital()+"' " +
                " AND py.trade_status = '1' ";
        totalSql = setDrugSQL( totalSql,keyWord,state,type,startDate,endDate,operator,flag);
        totalSql +=  " AND p.`status`>=50 ";
        List<Map<String, Object>> totallist = jdbcTemplate.queryForList(totalSql);
@ -775,7 +780,8 @@ public class PrescriptionExpressageService extends BaseService {
                " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                " LEFT JOIN wlyy_prescription_expressage e ON p.code = e.prescription_code" +
                " WHERE" +
                " p.hospital = '"+d.getHospital()+"' ";
                " p.hospital = '"+d.getHospital()+"' " +
                " AND py.trade_status = '1' ";
        sql = setDrugSQL( sql,keyWord,state,type,startDate,endDate,operator,flag);
        sql +=  " AND p.`status`>=50 " +
                " ORDER BY e.fetching_medicine_time DESC " +

+ 16 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/scheme/DoctorSchemeService.java

@ -1086,8 +1086,8 @@ public class DoctorSchemeService extends BaseService{
                " t.del='1' " +
                " AND t.doctor_code = '"+doctor+"' " +
                " AND t.team_code = "+teamCode +
                " AND t.create_time >= '"+startDate+"' " +
                " AND t.create_time <= '"+endDate+"'";
                " AND t.create_time >= '"+startDate+" 00:00:00' " +
                " AND t.create_time <= '"+endDate+" 23:59:59'";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        if(list!=null&&list.size()>0){
            Long total = (Long)list.get(0).get("total");
@ -1503,7 +1503,8 @@ public class DoctorSchemeService extends BaseService{
    }
    public List<Map<String,Object>> getPatientScheme(String patient,String type){
    public Map<String,Object> getPatientScheme(String patient,String type){
        Map<String,Object> rs = new HashedMap();
        String sql =null;
        if("1".equals(type)){
            sql =  "SELECT " +
@ -1528,7 +1529,14 @@ public class DoctorSchemeService extends BaseService{
        }
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        return list;
        if(list!=null&&list.size()>0){
            rs.put("code",list.get(0).get("code"));
            rs.put("name",list.get(0).get("name"));
            rs.put("content",list.get(0).get("content"));
            rs.put("list",list);
        }
        return rs;
    }
    public List<Map<String,Object>> getTrackPatientIndexCountList(String doctor,Integer teamCode,String type,String startDate,String endDate,String keyword,Integer page,Integer size){
@ -1554,7 +1562,8 @@ public class DoctorSchemeService extends BaseService{
                " p.`name`, " +
                " IFNULL(year( from_days( datediff( now(), p.birthday))),'未知') age, " +
                " p.photo, " +
                " p.idcard " +
                " p.idcard," +
                " p.sex " +
                " FROM " +
                " " +
                "( " +
@ -1811,7 +1820,8 @@ public class DoctorSchemeService extends BaseService{
                " t3.total AS highCount, " +
                " p.`name`, " +
                " IFNULL(year( from_days( datediff( now(), p.birthday))),'未知') age, " +
                " p.photo " +
                " p.photo, " +
                " p.sex" +
                " FROM " +
                " " +
                " ( " +

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/DateUtil.java

@ -901,7 +901,7 @@ public class DateUtil {
	 */
	public static Time hhmmStrToTime(String hhmm){
		Time time = null;
		DateFormat sdf = new SimpleDateFormat("hh:mm");
		DateFormat sdf = new SimpleDateFormat("HH:mm");
		try {
			Date date = sdf.parse(hhmm);
			time = new Time(date.getTime());

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/scheme/DoctroSchemeController.java

@ -241,7 +241,7 @@ public class DoctroSchemeController extends BaseController {
                                            @ApiParam(name="startDate", value="开始时间") @RequestParam(value = "startDate",required = true)String startDate,
                                            @ApiParam(name="endDate", value="结束时间") @RequestParam(value = "endDate",required = true)String endDate){
        try {
            return write(200, "查询成功", "data",doctorSchemeService.getTrackPatientCountTitle(teamCode,getUID(),startDate,endDate));
            return write(200, "查询成功", "data",doctorSchemeService.getTrackPatientCountTitle(teamCode,"xh1D2017031503333",startDate,endDate));
        }catch (Exception e){
            error(e);
            //返回接口异常信息处理结果
@ -345,7 +345,7 @@ public class DoctroSchemeController extends BaseController {
                                                @ApiParam(name="page", value="起始页,1开始") @RequestParam(value = "page",required = true)Integer page,
                                                @ApiParam(name="size", value="每页大小") @RequestParam(value = "size",required = true)Integer size){
        try {
            return write(200, "查询成功", "data",doctorSchemeService.getTrackPatientIndexCountList("xh1D2017031503333", teamCode, type, startDate, endDate, keyword, page, size));
            return write(200, "查询成功", "data",doctorSchemeService.getTrackPatientIndexCountList(getUID(), teamCode, type, startDate, endDate, keyword, page, size));
        }catch (Exception e){
            error(e);
            //返回接口异常信息处理结果