Selaa lähdekoodia

Merge branch 'dev' of liubing/wlyy2.0 into dev

liubing 2 vuotta sitten
vanhempi
commit
cbab6c3042

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/dailyReport/service/DailyReportUploadService.java

@ -4423,7 +4423,7 @@ public class DailyReportUploadService {
                projectTmpSqlCondition += "  and dh.dept_code='"+dept+"' ";
            }
            String projectItemSql = " select i.id,i.dept,i.dept_name deptName,i.project_code,i.project_name,CAST((sum(cast(IFNULL(de.actual_completion_hour,IFNULL(de.completion_hour,'0')) as decimal(18,2)))) as char ) as completionHour, " +
            String projectItemSql = " select i.id,i.title title,i.dept,i.dept_name deptName,i.project_code,i.project_name,CAST((sum(cast(IFNULL(de.actual_completion_hour,IFNULL(de.completion_hour,'0')) as decimal(18,2)))) as char ) as completionHour, " +
                    " count(distinct up.doctor_id) as doctorTotal,i.begin_time,i.end_time,i.ac_begin_time, DATE_FORMAT(i.completion_time,'%Y-%m-%d %H:%i:%S') completion_time from base_daily_report_item i LEFT JOIN base_daily_report_detail de on i.id = de.report_item_id " +
                    " INNER JOIN base_doctor_daily_report_upload up on up.id = de.report_id INNER JOIN base_doctor doc on up.doctor_id = doc.id and doc.del=1 " +
                    "  INNER JOIN base_doctor_hospital dh on doc.id = dh.doctor_code and dh.del=1  where i.del=1 and i.project_code='"+projectCodeTmp+"'  "+projectTmpSqlCondition+" GROUP BY i.id  ";

+ 47 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -126,6 +126,7 @@ import jxl.write.*;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import net.sf.json.xml.XMLSerializer;
import org.apache.commons.collections.ArrayStack;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.NameValuePair;
@ -15441,6 +15442,52 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        return null;
    }
    public List<Map<String,Object>> getPrescriptionExpressageLog(String outpatientId) throws Exception {
        List<Map<String,Object>> result = new ArrayList<>();
        List<WlyyPrescriptionDO> prescriptionDOs = new ArrayStack();
        prescriptionDOs = prescriptionDao.findByOutpatientId(outpatientId);
        if (prescriptionDOs.size()>0){
            for (WlyyPrescriptionDO prescriptionDOTmp : prescriptionDOs) {
                Map<String,Object> objTmp = new HashMap<>();
                //处方基本信息
                objTmp.put("outpatientId",outpatientId);
                objTmp.put("realOrder",prescriptionDOTmp.getRealOrder());
                objTmp.put("originRealOrder",prescriptionDOTmp.getOriginRealOrder());
                objTmp.put("admNo",prescriptionDOTmp.getAdmNo());
                objTmp.put("serialNo",prescriptionDOTmp.getSerialNo());
                objTmp.put("originSerialNo",prescriptionDOTmp.getOriginSerialNo());
                objTmp.put("patientName",prescriptionDOTmp.getPatientName());
                objTmp.put("doctorName",prescriptionDOTmp.getDoctorName());
                //药品信息
                List<WlyyPrescriptionInfoVO> infoVOs = new ArrayList<>();
                System.out.println("=====PrescriptionId======" + prescriptionDOTmp.getId());
                convertToModels(prescriptionInfoDao.findByPrescriptionId(prescriptionDOTmp.getId(), 1), infoVOs, WlyyPrescriptionInfoVO.class);
                objTmp.put("infoVOs",infoVOs);
                //物流信息
                List<WlyyPrescriptionExpressageDO> expressageDOs = prescriptionExpressageDao.findByOutpatientId(outpatientId);
                if (expressageDOs != null && expressageDOs.size() > 0) {
                    objTmp.put("expressage",convertToModel(expressageDOs.get(0), WlyyPrescriptionExpressageVO.class));
                    objTmp.put("oneselfPickupFlg",expressageDOs.get(0).getOneselfPickupFlg());
                } else {
                    objTmp.put("expressage",null);
                    objTmp.put("oneselfPickupFlg",null);
                }
                List<WlyyPrescriptionExpressageLogDO> expressageLogDOs = prescriptionExpressageLogDao.queryByOutpatientIdOrderByCreateTimeDesc(outpatientId);
                List<WlyyPrescriptionExpressageLogVO> expressageLogVOs = new ArrayList<>();
                if (expressageLogDOs != null && expressageLogDOs.size() > 0) {
                    convertToModels(expressageLogDOs, expressageLogVOs, WlyyPrescriptionExpressageLogVO.class);
                }
                objTmp.put("expressageLogs",expressageLogVOs);
                result.add(objTmp);
            }
        }else{
            throw new Exception("无门诊处方记录。");
        }
        return result;
    }
  /*  public List<Map<String,Object>> selectSettlementInfo(String medicareState,String condition,String startDate,String endDate){
        String sql = ""
    }*/

+ 15 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/thirdUpload/ThirdUploadEndpoint.java

@ -7,6 +7,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.entity.base.dict.BaseFrequencyDictDO;
import com.yihu.jw.entity.hospital.article.KnowledgeCategoryDO;
import com.yihu.jw.entity.thirdUpload.*;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
import com.yihu.jw.restmodel.iot.device.IotDeviceImportVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
@ -53,6 +54,9 @@ public class ThirdUploadEndpoint extends EnvelopRestEndpoint {
    private BaseNsPrescriptionAService baseNsPrescriptionAService;
    @Autowired
    private BaseNsPrescriptionDrugService baseNsPrescriptionDrugService;
    @Autowired
    private PrescriptionService prescriptionService;
    @PostMapping(value = BaseRegulatoryRequestMapping.UpWebTherapySupserviceInfo.SAVEACHNS)     //请求地址  /saveAchns
    @ApiOperation(value = "保存医师唯一标识")
@ -522,4 +526,15 @@ public class ThirdUploadEndpoint extends EnvelopRestEndpoint {
            return failedObjEnvelopException(e);
        }
    }
    @GetMapping(value = "getPrescriptionExpressageLog")
    @ApiOperation(value = "获取处方快递配送记录")
    public ListEnvelop getPrescriptionExpressageLog(@ApiParam(name = "outpatientId", value = "")
                                          @RequestParam(name = "outpatientId", required = true) String outpatientId) throws Exception{
        try{
          return ListEnvelop.getSuccess("success",prescriptionService.getPrescriptionExpressageLog(outpatientId));
        }catch (Exception e){
            return failedListEnvelopException(e);
        }
    }
}