liubing il y a 3 ans
Parent
commit
0e124df7d8

+ 5 - 5
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/lifeCare/DoctorLifeCareEndpoint.java

@ -239,11 +239,11 @@ public class DoctorLifeCareEndpoint extends EnvelopRestEndpoint {
    public ListEnvelop findPatientItemDict(@ApiParam(value = "patient", name = "patient")
                                           @RequestParam(value = "patient", required = false) String patient) {
        try {
//            JSONObject jsonObject = new JSONObject();
//            jsonObject.put("doctorId",permissionService.getUID());
//            if (permissionService.noPermission(1, jsonObject)) {
//                return ListEnvelop.getError("该操作没有权限");
//            }
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("doctorId",permissionService.getUID());
            if (permissionService.noPermission(1, jsonObject)) {
                return ListEnvelop.getError("该操作没有权限");
            }
            return ListEnvelop.getSuccess("查询成功",lifeCareOrderService.findPatientItemDict(patient));
        }catch (Exception e){
            return failedListEnvelopException2(e);

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/lifeCare/PadLifeCareEndpoint.java

@ -89,7 +89,7 @@ public class PadLifeCareEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1") @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15") @RequestParam(value = "size") int size) {
        try {
            JSONObject result = lifeCareOrderService.queryInfoList(patient, status, page, size);
            JSONObject result = lifeCareOrderService.queryInfoList(patient, status,null, page, size);
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return PageEnvelop.getError(result.getString(ResponseContant.resultMsg), -1);
            }

+ 7 - 5
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/lifeCare/PatientLifeCareEndpoint.java

@ -89,10 +89,11 @@ public class PatientLifeCareEndpoint  extends EnvelopRestEndpoint {
    public PageEnvelop page(
            @ApiParam(name = "patient", value = "居民code") @RequestParam(value = "patient", required = true) String patient,
            @ApiParam(name = "status", value = "工单状态,状态为全部时不传") @RequestParam(value = "status", required = false) Integer status,
            @ApiParam(name = "fedCode", value = "生活工单服务项") @RequestParam(value = "fedCode", required = false) String fedCode,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1") @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15") @RequestParam(value = "size") int size) {
        try {
            JSONObject result = lifeCareOrderService.queryInfoList(patient, status, page, size);
            JSONObject result = lifeCareOrderService.queryInfoList(patient, status,fedCode, page, size);
            if (result.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return PageEnvelop.getError(result.getString(ResponseContant.resultMsg), -1);
            }
@ -106,9 +107,10 @@ public class PatientLifeCareEndpoint  extends EnvelopRestEndpoint {
    @GetMapping(value = "infoCount")
    @ApiOperation(value = "查询工单数量")
    public ObjEnvelop infoCount(
            @ApiParam(name = "patient", value = "居民code") @RequestParam(value = "patient", required = true) String patient) {
            @ApiParam(name = "patient", value = "居民code") @RequestParam(value = "patient", required = true) String patient,
            @ApiParam(name = "fedCode", value = "生活工单服务项") @RequestParam(value = "fedCode", required = false) String fedCode) {
        try {
            JSONObject allResult = lifeCareOrderService.queryInfoList(patient, null, 1, 5);
            JSONObject allResult = lifeCareOrderService.queryInfoList(patient, null,fedCode, 1, 5);
            if (allResult.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return ObjEnvelop.getError(allResult.getString(ResponseContant.resultMsg), -1);
            }
@ -116,14 +118,14 @@ public class PatientLifeCareEndpoint  extends EnvelopRestEndpoint {
            JSONObject object = new JSONObject();
            object.put("allCount",allCount);
            JSONObject qxResult = lifeCareOrderService.queryInfoList(patient, -1, 1, 5);
            JSONObject qxResult = lifeCareOrderService.queryInfoList(patient, -1, fedCode,1, 5);
            if (qxResult.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return ObjEnvelop.getError(qxResult.getString(ResponseContant.resultMsg), -1);
            }
            int qxCount = qxResult.getIntValue(ResponseContant.count);
            object.put("qxCount",qxCount);
            JSONObject wcResult = lifeCareOrderService.queryInfoList(patient, 2, 1, 5);
            JSONObject wcResult = lifeCareOrderService.queryInfoList(patient, 2, fedCode,1, 5);
            if (wcResult.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                return ObjEnvelop.getError(wcResult.getString(ResponseContant.resultMsg), -1);
            }

+ 9 - 3
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/lifeCare/LifeCareOrderService.java

@ -501,16 +501,22 @@ public class LifeCareOrderService extends BaseJpaService<LifeCareOrderDO, LifeCa
     *
     * @return
     */
    public JSONObject queryInfoList(String patient,Integer status, int page, int size) {
    public JSONObject queryInfoList(String patient,Integer status,String fedCode ,int page, int size) {
        JSONObject result = new JSONObject();
        status = null == status ? -100 : status;
        int start = 0 == page ? page++ : (page - 1) * size;
        int end = 0 == size ? 15 : size;
        String fedSql = " ";
        if (StringUtils.isNotBlank(fedCode)){
            fedSql = " and EXISTS ( " +
                    " select 1 from base_life_care_fee_detail fed where fed.order_id = o.id and fed.code='"+fedCode+"' " +
                    " )  ";
        }
        String sql = "SELECT *  FROM  base_life_care_order o " +
                " WHERE (o.patient = '{patient}' or o.proxy_patient = '{patient}') "+
                " AND (o.`status` = {status} or -100 = {status})" +
                " AND (o.`status` = {status} or -100 = {status})" +fedSql+
                "  group by o.id " +
                " ORDER BY o.create_time desc" +
                " LIMIT {start},{end} ";
@ -523,7 +529,7 @@ public class LifeCareOrderService extends BaseJpaService<LifeCareOrderDO, LifeCa
        String countSql = "SELECT count(DISTINCT o.id) FROM base_life_care_order o " +
                " WHERE  " +
                "  (o.patient = '{patient}' or o.proxy_patient = '{patient}') " +
                " AND (o.`status` = {status} or -100 = {status})";
                " AND (o.`status` = {status} or -100 = {status})"+fedSql;
        String finqlCountSql = countSql.replace("{patient}", patient)
                .replace("{status}", String.valueOf(status));

+ 2 - 2
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/message/BaseServiceNewsService.java

@ -202,10 +202,10 @@ public class BaseServiceNewsService {
        String sql = "SELECT p.id,p.`name`,p.address,p.photo,p.mobile,p.lat_lon latLon,sex,idcard,archive_type type,p.pad_imei,p.openid " +
                " from base_patient p " +
                "WHERE  p.del =1 and p.archive_type=1 and p.sign_status=0 "+filter+" limit "+page*size+","+size;
                "WHERE  p.del =1 and p.archive_type=1 and p.sign_status=0 and p.lat_lon is not null "+filter+" limit "+page*size+","+size;
        String sqlCount = "SELECT count(p.id) " +
                " from base_patient p " +
                "WHERE  p.del =1 and p.archive_type=1 and p.sign_status=0 "+filter ;
                "WHERE  p.del =1 and p.archive_type=1 and p.sign_status=0 and p.lat_lon is not null "+filter ;
        Long count = jdbcTemplate.queryForObject(sqlCount,Long.class);
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        for (Map<String,Object> map:list){

+ 1 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/security/SecurityMonitoringOrderService.java

@ -2946,6 +2946,7 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        for (Map<String,Object> tmp:list){
            Map<String,Object> mapTmp = new HashMap<>();
            mapTmp.put("categoryCode",tmp.get("category_code").toString());
            switch (tmp.get("category_code").toString()){
                case "4":
                    mapTmp.put("deviceSn",tmp.get("device_sn").toString());

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/sign/ServicePackageService.java

@ -399,7 +399,7 @@ public class ServicePackageService extends BaseJpaService<ServicePackageDO, Serv
     */
    public int getSignTotal(String doctorId){
        String sql = "SELECT COUNT(DISTINCT sr.patient) from base_service_package_sign_record sr,base_service_package_record r, " +
                " base_team_member m " +
                " base_team_member m,base_patient p " +
                "WHERE sr.status=1 and m.team_code = r.team_code and sr.id=r.sign_id and p.id = sr.patient and p.del=1  " +
                "and m.doctor_code = '"+doctorId+"' and m.del = '1' ";