Browse Source

代码修改

LAPTOP-KB9HII50\70708 1 year ago
parent
commit
90973d9812

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

@ -7702,6 +7702,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        rs.put("mobile", basePatientDO.getMobile());
        rs.put("photo", basePatientDO.getPhoto());
        rs.put("address", basePatientDO.getAddress());
        rs.put("latLon",basePatientDO.getLatLon());
        rs.put("cardType",basePatientDO.getCardType());
        rs.put("healthStatus","");
        rs.put("diseaseType","");

+ 55 - 0
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/booking/controller/BaseBookingServiceEndpoint.java

@ -0,0 +1,55 @@
package com.yihu.jw.hospital.module.booking.controller;
import com.yihu.jw.hospital.module.booking.service.BaseBookingServiceService;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/***
 * @ClassName: BaseBookingServiceEndpoint
 * @Description:
 * @Auther: shi kejing
 * @Date: 2021/8/12 10:31
 */
@RestController
@RequestMapping("bookingService" )
@Api(tags = "预订服务弹框", description = "预订服务弹框")
public class BaseBookingServiceEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private BaseBookingServiceService serviceService;
    @ApiOperation("是否需要弹框")
    @GetMapping(value= "findByPatient")
    public Envelop findByPatient(@ApiParam(name = "patient", value = "patient", required = true)
                                     @RequestParam(value = "patient", required = true)String patient){
        try {
            return success("获取成功!",serviceService.findByPatient(patient));
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError("获取失败!");
        }
    }
    @ApiOperation("保存,不在弹框")
    @GetMapping(value= "saveByPatient")
    public Envelop saveByPatient(@ApiParam(name = "patient", value = "patient", required = true)
                                     @RequestParam(value = "patient", required = true)String patient){
        try {
            serviceService.saveByPatient(patient);
            return success("保存成功!");
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError("保存失败!");
        }
    }
}

+ 20 - 0
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/booking/dao/BaseBookingServiceDao.java

@ -0,0 +1,20 @@
package com.yihu.jw.hospital.module.booking.dao;
import com.yihu.jw.entity.care.booking.BaseBookingServiceDo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
/***
 * @ClassName: BaseBookingServiceDao
 * @Description:
 * @Auther: shi kejing
 * @Date: 2021/8/12 10:23
 */
public interface BaseBookingServiceDao extends JpaRepository<BaseBookingServiceDo,String>,
        JpaSpecificationExecutor<BaseBookingServiceDo> {
    @Query("select a from BaseBookingServiceDo a where a.patient = ?1 and a.status = 1")
    BaseBookingServiceDo findByPatient(String patient);
}

+ 37 - 0
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/booking/service/BaseBookingServiceService.java

@ -0,0 +1,37 @@
package com.yihu.jw.hospital.module.booking.service;
import com.yihu.jw.entity.care.booking.BaseBookingServiceDo;
import com.yihu.jw.hospital.module.booking.dao.BaseBookingServiceDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/***
 * @ClassName: BaseBookingServiceService
 * @Description:
 * @Auther: shi kejing
 * @Date: 2021/8/12 10:24
 */
@Service
public class BaseBookingServiceService {
    @Autowired
    private BaseBookingServiceDao serviceDao;
    public void saveByPatient(String patient) throws Exception {
            BaseBookingServiceDo serviceDo = new BaseBookingServiceDo();
            serviceDo.setPatient(patient);
            serviceDo.setStatus(1);
            serviceDao.save(serviceDo);
    }
    public int findByPatient(String patient){
        BaseBookingServiceDo serviceDo = serviceDao.findByPatient(patient);
        if (serviceDo != null){
            return serviceDo.getStatus();
        }else {
            return 0;
        }
    }
}

+ 2 - 3
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/common/CommonItemController.java

@ -32,16 +32,15 @@ public class CommonItemController extends EnvelopRestEndpoint {
    @GetMapping(value= "getServiceItem")
    public Envelop getServiceItem(
            @ApiParam(name = "name", value = "name", required = false) @RequestParam(value = "name", required = false)String name,
            @ApiParam(name = "signId", value = "signId", required = true) @RequestParam(value = "signId", required = true)String signId,
            @ApiParam(name = "type", value = "type", required = true) @RequestParam(value = "type", required = true)String type,
            @ApiParam(name = "page", value = "page", required = true) @RequestParam(value = "page", required = true) Integer page,
            @ApiParam(name = "size", value = "pageSize", required = true) @RequestParam(value = "size", required = true)Integer size
    ){
        try {
            return doorOrderService.getServiceItem(signId,name,type,page,size);
            return doorOrderService.getServiceItem(name,type,page,size);
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError("查询是吧",-1);
            return Envelop.getError("查询失败",-1);
        }
    }
}

+ 14 - 12
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/door/controller/DoorOrderController.java

@ -62,19 +62,21 @@ public class DoorOrderController extends EnvelopRestEndpoint {
    @Autowired
    JdbcTemplate jdbcTemplate;
//    @Autowired
//    private ZyDictService zyDictService;
//    @Autowired
//    private JwDoorPrescriptionService jwDoorPrescriptionService;
//    @Autowired
//    private FamilyContractService familyContractService;
//    @Autowired
//    private ServerPackageService serverPackageService;
//    @Autowired
//    private ServiceItemService serviceItemService;
//    @Autowired
//    private HospitalService hospitalService;
    @GetMapping(value = "getOgrById")
    @ApiOperation(value = "服务人员列表(医生列表)")
    public Envelop getOgrById(
            @ApiParam(name = "name", value = "医生姓名") @RequestParam(value = "name", required = false) String name,
            @ApiParam(name = "page", value = "第几页",required = true) @RequestParam(value = "page", required = true) Integer page,
            @ApiParam(name = "size", value = "分页大小",required = true) @RequestParam(value = "size", required = true) Integer size) {
        try {
            List<Map<String, Object>> list = wlyyDoorServiceOrderService.findDoctorList(name,page,size);
            return success("查询成功", list);
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError("获取失败");
        }
    }
    /**
     * 获取登录医生的信息

+ 10 - 64
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/door/service/DoorOrderService.java

@ -67,10 +67,6 @@ public class DoorOrderService {
    @Autowired
    private HttpClientUtil httpClientUtil;
    //    @Value("${sign.check_upload}")
    private String jwUrl;
    //    @Value("${server.server_url}")
    private String wxServerUrl;
    //图片服务地址
    @Value("${fastDFS.fastdfs_file_url}")
    private String imgUrlDomain;
@ -99,7 +95,6 @@ public class DoorOrderService {
    @Autowired
    private DoorServiceVoucherDao doorServiceVoucherDao;
    @Autowired
    private SystemMessageDao systemMessageDao;
    @Autowired
@ -110,7 +105,6 @@ public class DoorOrderService {
    @Autowired
    private DoctorRegistrationTempService templateService;
    @Autowired
    private WlyyDoorPrescriptionDao doorPrescriptionDao;
    @Autowired
@ -123,10 +117,6 @@ public class DoorOrderService {
    @Autowired
    private WxTemplateConfigDao wxTemplateConfigDao;
    //    @Autowired
//    private HttpUtil httpUtil;
    @Autowired
    private WlyyDoorCommentDao doorCommentDao;
    @Autowired
    private PushMsgTask pushMsgTask;
@ -140,39 +130,19 @@ public class DoorOrderService {
    /**
     * 服务项查询
     *
     * @param signId 签约id
     * @param type   doorService 上门服务
     * type =4
     */
    public PageEnvelop getServiceItem(String signId, String name, String type, Integer page, Integer size) {
//        String sql = "SELECT si.* ";
//        String countSql = "select count(si.id) ";
//        String filter = " from base_service_package_sign_record r," +
//                "base_service_package_item i,base_service_package_sub_item si,base_service_package_item_relational ir " +
//                "WHERE r.id = '"+signId+"' and i.service_package_id=r.service_package_id and i.`code`='"+type+"' and si.status='1' " +
//                " and i.id = ir.item_id and ir.sub_item_id= si.id ";
//        if(StringUtils.isNotBlank(name)){
//            filter += " and si.name like '%"+name+"%' ";
//        }
//        String oderBy = " order by si.sort limit "+(page-1)*size+","+size;
        String sql = "SELECT e.* ";
        String countSql = "select count(e.id) ";
        String filter =
                "FROM\n" +
                        "	base_service_package_sign_record a \n" +
                        "	INNER JOIN base_service_package_item b ON a.service_package_id = b.service_package_id\n" +
                        "	INNER JOIN base_service_package_item c ON c.id=b.service_package_item_id\n" +
                        "	INNER JOIN base_service_package_item_relational d ON d.item_id=c.id \n" +
                        "	INNER JOIN base_service_package_sub_item e ON e.id=d.sub_item_id\n" +
                        "WHERE 1=1\n" +
                        "	AND b.`code` = '" + type + "' \n" +
                        "	AND e.`status` = '1' \n" +
                        "	AND a.id = '" + signId + "' ";
    public PageEnvelop getServiceItem(String name, String type, Integer page, Integer size) {
        String sql = "SELECT a.* ";
        String countSql = "select count(a.id) ";
        String filter = "FROM " +
                        "	base_service_package_sub_item a " +
                        "WHERE a.dict_item_id = '" + type + "' \n" +
                        "	AND a.`status` = '1' ";
        if (StringUtils.isNotBlank(name)) {
            filter += " and e.name like '%" + name + "%' ";
            filter += " and a.name like '%" + name + "%' ";
        }
        String oderBy = " order by e.sort limit " + (page - 1) * size + "," + size;
        String oderBy = " order by a.sort limit " + (page - 1) * size + "," + size;
        sql = sql + filter + oderBy;
        countSql = countSql + filter;
@ -2346,30 +2316,6 @@ public class DoorOrderService {
        return list;
    }
    public JSONObject getAllDoorOrder(String idCard, String doctorSignTime) throws Exception {
        if (StringUtils.isEmpty(idCard)) {
            idCard = "";
        }
        if (StringUtils.isEmpty(doctorSignTime)) {
            doctorSignTime = "";
        }
        JSONObject object = new JSONObject();
        String url = jwUrl + "/third/allDoor/getAllDoorOrder?idCard=" + idCard + "&doctorSignTime=" + doctorSignTime;
        String response = httpClientUtil.get(url, "UTF-8");
        if (!org.apache.commons.lang3.StringUtils.isEmpty(response)) {
            org.json.JSONObject jsonObject = new org.json.JSONObject(response);
            int status = jsonObject.getInt("status");
            if (status == 200) {
                object = JSONObject.parseObject(response);
            } else {
                throw new Exception(jsonObject.getString("msg"));
            }
        } else {
            throw new Exception("null response.");
        }
        return object;
    }
//    /**
//     * 导出咨询未及时回复数据

+ 9 - 24
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/door/service/WlyyDoorServiceOrderService.java

@ -3122,29 +3122,14 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
    }
    public List<Map<String, Object>> getOgrById(String signId, String orderId) {
        String sql = "";
        if (StringUtils.isNotBlank(signId)) {
            sql = "SELECT\n" +
                    "	b.* \n" +
                    "FROM\n" +
                    "	base_service_package_sign_record a\n" +
                    "	INNER JOIN base_service_package_item b ON a.service_package_id = b.service_package_id\n" +
                    "	AND a.id='" + signId + "'";
            List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
            return list;
        }
        if (StringUtils.isNotBlank(orderId)) {
            sql = "SELECT\n" +
                    "	DISTINCT b.* \n" +
                    "FROM\n" +
                    "	base_service_package_sign_record a\n" +
                    "	INNER JOIN wlyy_door_service_order b ON a.service_package_id=b.package_id\n" +
                    "	INNER JOIN base_service_package_item c ON b.package_id = c.service_package_id\n" +
                    "	AND b.id='" + orderId + "'\n";
            List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
            return list;
        }
        return null;
    //获取医生列表
    public List<Map<String, Object>> findDoctorList(String name,Integer page,Integer size) {
        String sql = "select id,name from base_doctor where del='1' and enabled=1";
        if(StringUtils.isNotBlank(name)){
            sql += " and name like '%"+name+"%'";
        }
        sql+= " limit "+(page-1)*size+","+size;
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        return list;
    }
}

File diff suppressed because it is too large
+ 2 - 1154
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/jw/service/JwSmjkService.java