Explorar o código

【疫情防控代码】

wangzhinan %!s(int64=3) %!d(string=hai) anos
pai
achega
0d739a62c3

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

@ -3183,7 +3183,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param size
     * @return
     */
    public MixEnvelop findExpressageList(String status, String oneselfPickupFlg, String nameKey, String startTime, String endTime, Integer page, Integer size, String wxId) {
    public MixEnvelop findExpressageList(String status, String oneselfPickupFlg, String nameKey, String startTime, String endTime, Integer page, Integer size, String wxId,String patientName) {
        String totalSql = "SELECT " +
                " COUNT(1) AS \"total\" " +
                " FROM " +
@ -3191,15 +3191,18 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " JOIN wlyy_prescription p ON p.outpatient_id = o.id " +
                " JOIN wlyy_prescription_expressage e ON e.outpatient_id = o.id" +
                " WHERE" +
                " 1=1";
                " 1=1 ";
        if (StringUtils.isNotBlank(status)) {
            totalSql += " AND p.status in(" + status + ")";
            totalSql += " AND p.status in(" + status + ") ";
        }
        if (StringUtils.isNotBlank(oneselfPickupFlg)) {
            totalSql += " AND e.oneself_pickup_flg = " + oneselfPickupFlg;
            totalSql += " AND e.oneself_pickup_flg = " + oneselfPickupFlg+" ";
        }
        if (StringUtils.isNotBlank(nameKey)) {
            totalSql += " AND e.name like '%" + nameKey + "%'";
            totalSql += " AND e.name like '%" + nameKey + "%' ";
        }
        if (StringUtils.isNotBlank(patientName)) {
            totalSql += " AND o.patient_name like '%" + patientName + "%' ";
        }
        if (StringUtils.isNotBlank(startTime)) {
            if ("xm_ykyy_wx".equals(wxId)) {
@ -3279,13 +3282,17 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " WHERE" +
                " 1=1";
        if (StringUtils.isNotBlank(status)) {
            sql += " AND p.status in(" + status + ")";
            sql += " AND p.status in(" + status + ") ";
        }
        if (StringUtils.isNotBlank(oneselfPickupFlg)) {
            sql += " AND e.oneself_pickup_flg =" + oneselfPickupFlg;
            sql += " AND e.oneself_pickup_flg =" + oneselfPickupFlg+" ";
        }
        if (StringUtils.isNotBlank(nameKey)) {
            sql += " AND e.name like '%" + nameKey + "%'";
            sql += " AND e.name like '%" + nameKey + "%' ";
        }
        if (StringUtils.isNotBlank(patientName)) {
            sql += " AND o.patient_name like '%" + patientName + "%' ";
        }
        if (StringUtils.isNotBlank(startTime)) {
            if ("xm_ykyy_wx".equals(wxId)) {

+ 3 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/YkyyEntranceService.java

@ -661,9 +661,9 @@ public class YkyyEntranceService {
        }
        if(!StringUtil.isBlank(endTime)){
            sql += " and h.KSSJ <= to_date('"+endTime+"', 'YYYY-MM-DD HH24:MI:SS')";
        }if(!StringUtil.isBlank(depts)){
        }/*if(!StringUtil.isBlank(depts)){
            sql += " and h.KSDM in ("+ depts+")";
        }
        }*/
        sql += " order by h.KSSJ desc";
@ -3320,7 +3320,7 @@ public class YkyyEntranceService {
     * @throws Exception
     */
    public JSONArray findPatientCodeByCardNo(String cardNo,boolean demoFlag) throws Exception {
        String sql = "select x.brid as \"brid\" ,o.pat_no as \"pat_no\",o.card_no as \"card_no\",o.card_stat as \"card_stat\",o.op_date as \"op_date\",o.card_type as \"card_type\",o.card_type_name as \"card_type_name\"  from v_zksg_brcx x,V_HLW_CARDINFO o where  o.pat_no = x.mzhm and o.card_no = '"+cardNo+"'";
        String sql = "select x.brid as \"brid\" ,o.pat_no as \"pat_no\",o.card_no as \"card_no\",o.card_stat as \"card_stat\",o.op_date as \"op_date\",o.card_type as \"card_type\",o.card_type_name as \"card_type_name\"  from v_zksg_brcx x,V_HLW_CARDINFO o where  o.pat_no = x.mzhm and (o.card_no = '"+cardNo+"' or x.mzhm='"+cardNo+"' )";
        JSONArray array = new JSONArray();
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);

+ 8 - 2
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -4025,7 +4025,7 @@ public class ImService {
		if (!StringUtils.isEmpty(title)) {
			title = "%" + title + "%";
			sql += " and op.description like '" + title + "'";
			sql += " and (op.patient_name like '" + title + "' OR op.doctor_name like '" + title + "' OR op.dept_name like '" + title + "' )";
		}
		if (!StringUtils.isEmpty(start_time)) {
			if ("xm_ykyy_wx".equals(wxId)) {
@ -4092,11 +4092,17 @@ public class ImService {
				List<BaseDoctorHospitalDO> doctorHospitalDOS = doctorHospitalDao.findByDoctorCode(doctorId);
				if (doctorHospitalDOS!=null&&doctorHospitalDOS.size()!=0){
					map.put("deptName",doctorHospitalDOS.get(0).getDeptName());
				}else {
					map.put("deptName",doctorHospitalDOS.get(0).getDeptName());
				}
				if (baseDoctorDO!=null){
					map.put("doctorName",baseDoctorDO.getName());
				}
			}
			if (map.get("outpatientId")!=null){
				WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(map.get("outpatientId").toString());
				map.put("deptName",wlyyOutpatientDO.getDeptName());
			}
			if (map.get("outpatientType")!=null){
				if ("3".equalsIgnoreCase(map.get("outpatientType").toString())&&"1".equalsIgnoreCase(map.get("type").toString())){
					map.put("type",1);
@ -4182,7 +4188,7 @@ public class ImService {
		if (!StringUtils.isEmpty(title)) {
			title = "%" + title + "%";
			sql += " and op.description like '" + title + "'";
			sql += " and (op.patient_name like '" + title + "' OR op.doctor_name like '" + title + "' OR op.dept_name like '" + title + "' )";
		}
		if (!StringUtils.isEmpty(start_time)) {
			if ("xm_ykyy_wx".equals(wxId)) {

+ 6 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -716,6 +716,8 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                         @RequestParam(value = "oneselfPickupFlg", required = false)String oneselfPickupFlg,
                                         @ApiParam(name = "nameKey", value = "配送员名称")
                                         @RequestParam(value = "nameKey", required = false)String nameKey,
                                         @ApiParam(name = "patientName", value = "就诊人")
                                             @RequestParam(value = "patientName", required = false)String patientName,
                                         @ApiParam(name = "startTime", value = "开始时间,yyyy-MM-dd")
                                         @RequestParam(value = "startTime", required = false)String startTime,
                                         @ApiParam(name = "endTime", value = "结束时间,yyyy-MM-dd")
@ -726,7 +728,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                         @RequestParam(value = "size", required = false)Integer size) {
        try {
            return prescriptionService.findExpressageList(status,oneselfPickupFlg,nameKey,startTime,endTime,page,size,wxId);
            return prescriptionService.findExpressageList(status,oneselfPickupFlg,nameKey,startTime,endTime,page,size,wxId,patientName);
        }catch (Exception e) {
            return failedMixEnvelopException(e);
        }
@ -755,12 +757,14 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                              @RequestParam(value = "oneselfPickupFlg", required = false)String oneselfPickupFlg,
                              @ApiParam(name = "nameKey", value = "配送员名称")
                              @RequestParam(value = "nameKey", required = false)String nameKey,
                              @ApiParam(name = "patientName", value = "就诊人姓名")
                              @RequestParam(value = "patientName", required = false)String patientName,
                              @ApiParam(name = "startTime", value = "开始时间,yyyy-MM-dd")
                              @RequestParam(value = "startTime", required = false)String startTime,
                              @ApiParam(name = "endTime", value = "结束时间,yyyy-MM-dd")
                              @RequestParam(value = "endTime", required = false)String endTime,
                              HttpServletResponse response) throws Exception{
        MixEnvelop expressages = prescriptionService.findExpressageList(status,oneselfPickupFlg,nameKey,startTime,endTime,1,10000,wxId);
        MixEnvelop expressages = prescriptionService.findExpressageList(status,oneselfPickupFlg,nameKey,startTime,endTime,1,10000,wxId,patientName);
        List<Map<String,Object>> list = expressages.getDetailModelList();
        response.setContentType("octets/stream");
        response.setHeader("Content-Disposition", "attachment; filename="+ new String( "pushDataList.xls"));