Explorar o código

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

wangzhinan %!s(int64=3) %!d(string=hai) anos
pai
achega
72fc276445

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

@ -3232,7 +3232,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @return
     */
    public MixEnvelop  findExpressageList2(String status, String oneselfPickupFlg, String nameKey, String startTime, String endTime, Integer page, Integer size, String wxId,String patientName) {
        String totalSql = "SELECT " +
        /*String totalSql = "SELECT " +
                " COUNT(1) AS \"total\" " +
                " FROM " +
                " wlyy_outpatient o " +
@ -3281,7 +3281,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        Long count = 0L;
        if (rstotal != null && rstotal.size() > 0) {
            count = Long.parseLong(rstotal.get(0).get("total").toString());
        }
        }*/
        String sql = "SELECT  ";
        if ("xm_ykyy_wx".equals(wxId)) {
            if (flag) {
@ -3341,7 +3341,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if (StringUtils.isNotBlank(patientName)) {
            sql += " AND o.patient_name like '%" + patientName + "%' ";
            /*sql += " and (a.patient_name like '" + title + "' OR a.doctor_name like '" + title + "' OR a.dept_name like '" + title + "' )"*/
        }
        if (StringUtils.isNotBlank(startTime)) {
            if ("xm_ykyy_wx".equals(wxId)) {
@ -3366,7 +3365,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            } else {
                sql += " AND p.create_time <='" + endTime + " 23:59:59'";
            }
        }
        sql += " order by p.create_time desc ";
        /*       sql += " LIMIT " + (page - 1) * size + "," + size + "";*/
@ -3581,10 +3579,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                }
                String opf = "";
                if (m.get("oneself_pickup_flg") == null) {
                if (m.get("oneselfPickupFlg") == null) {
                    opf = null;
                }else {
                    String opff = m.get("oneself_pickup_flg").toString();
                    String opff = m.get("oneselfPickupFlg").toString();
                    if (opff.equals("1")){
                        opf = "自取";
                    }else if (opff.equals("0")){

+ 4 - 4
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -1993,19 +1993,19 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
            }
        }
        if (StringUtils.isNoneBlank(orderNo)){
            sql+=" and t.order_no ='"+orderNo+"'";
            sql+=" and t.order_no like '%"+orderNo+"%'";
        }
        if (StringUtils.isNoneBlank(yktOrderNo)){
            sql+=" and t.yk_order_no ='"+yktOrderNo+"'";
            sql+=" and t.yk_order_no like '%"+yktOrderNo+"%'";
        }
        if (StringUtils.isNoneBlank(patientName)){
            sql+=" and t.patient_name  like '%"+patientName+"%'";
        }
        if (StringUtils.isNoneBlank(idCard)){
            sql+=" and b.idcard ='"+idCard+"'";
            sql+=" and b.idcard like '%"+idCard+"%'";
        }
        if (StringUtils.isNoneBlank(medicard)){
            sql+=" and t.relation_code ='"+medicard+"'";
            sql+=" and t.relation_code like '%"+medicard+"%'";
        }
        if (status!=null){
            sql+=" and t.status ="+status+"";

+ 31 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/third/device/PDeviceController.java

@ -12,11 +12,12 @@ import com.yihu.jw.care.service.device.YsDeviceService;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.care.device.DevicePatientDevice;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.restmodel.ResponseContant;
import com.yihu.jw.restmodel.web.ListEnvelop;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -186,4 +187,33 @@ public class PDeviceController extends BaseController {
            return errorResult(e);
        }
    }
    @ApiOperation("获取设备录像存储信息")
    @RequestMapping(value = "deviceVideoTimeList", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String deviceVideoTimeList(
            @ApiParam(name="patient")@RequestParam(value = "patient",required = false)String patient,
            @ApiParam(name="deviceSerial",required = false,value="设备序列号")
            @RequestParam(value = "deviceSerial",required = false) String deviceSerial,
            @ApiParam(name="channelNo",required = true,value="通道号,IPC设备填1")
            @RequestParam(value = "channelNo",required = false,defaultValue = "1") Integer channelNo,
            @ApiParam(name="startTime",required = false,value="起始时间,时间格式为:YYYY-MM-DD hh:ss:mm。非必选,默认为当天0点")
            @RequestParam(value = "startTime",required = false) String startTime,
            @ApiParam(name="endTime",required = false,value="结束时间,时间格式为:YYYY-MM-DD hh:ss:mm。非必选,默认为当前时间")
            @RequestParam(value = "endTime",required = false) String endTime,
            @ApiParam(name="recType",required = false,value="回放源,0-系统自动选择,1-云存储,2-本地录像。非必选,默认为0")
            @RequestParam(value = "recType",required = false) Integer recType,
            HttpServletRequest request){
        try {
            if (org.apache.commons.lang.StringUtils.isBlank(patient)&& StringUtils.isBlank(deviceSerial)){
                return error(-1,"参数错误");
            }
            JSONObject result = ysDeviceService.deviceVideoTimeList(patient,deviceSerial,channelNo,startTime,endTime,recType,request);
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail){
                return error(200,result.getString(ResponseContant.resultMsg));
            }
            return write(200,"查询成功","data",result.getJSONArray(ResponseContant.resultMsg));
        }catch (Exception e){
            return errorResult(e);
        }
    }
}

+ 3 - 5
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/service/device/PatientDeviceService.java

@ -5,6 +5,7 @@ import com.yihu.jw.care.config.AqgConfig;
import com.yihu.jw.care.dao.device.DeviceDao;
import com.yihu.jw.care.dao.device.PatientDeviceDao;
import com.yihu.jw.care.dao.device.WlyyDeviceDao;
import com.yihu.jw.care.util.DateUtil;
import com.yihu.jw.care.util.DeviceLostMessageUtil;
import com.yihu.jw.entity.care.device.Device;
import com.yihu.jw.entity.care.device.DevicePatientDevice;
@ -239,11 +240,8 @@ public class PatientDeviceService {
        Date nowDate = device1.getTime();
        String startTimeDevice1 = sdf.format(nowDate);
        Calendar device2 = Calendar.getInstance();
        device2.setTime(new Date());
        device2.add(device2.DATE, -2);
        Date nowDate2 = device2.getTime();
        String startTimeDevice2 = sdf.format(nowDate2);
        String startTimeDevice2 =  DateUtil.getPreTime(endTime,-60*2+"");
        try {
            List<String> lostSN = new ArrayList<>();
            List<String> onContact = new ArrayList<>();