Browse Source

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

LAPTOP-KB9HII50\70708 1 year ago
parent
commit
c7215ab5fd

+ 17 - 13
common/common-entity/src/main/java/com/yihu/jw/entity/door/WlyyDoorServiceOrderDO.java

@ -215,9 +215,10 @@ public class WlyyDoorServiceOrderDO extends UuidIdentityEntityWithOperator {
    }
    private String packageId;//服务包的id
    private String feeAfter;//服务后收费标识(1是0否)
    private String signId;//签约id
    private String planId;//服务包的id---改成计划id ==>planId
    private String planItemDetailId;//签约id ---改成详情id===>planItemDetailId
    private String feeAfter;//服务后收费标识(1是0否)--这个暂时没用
    /**
@ -1266,13 +1267,7 @@ public class WlyyDoorServiceOrderDO extends UuidIdentityEntityWithOperator {
        this.nursingStaffType = nursingStaffType;
    }
    public String getPackageId() {
        return packageId;
    }
    public void setPackageId(String packageId) {
        this.packageId = packageId;
    }
    public String getFeeAfter() {
        return feeAfter;
@ -1282,11 +1277,20 @@ public class WlyyDoorServiceOrderDO extends UuidIdentityEntityWithOperator {
        this.feeAfter = feeAfter;
    }
    public String getSignId() {
        return signId;
    public String getPlanId() {
        return planId;
    }
    public void setPlanId(String planId) {
        this.planId = planId;
    }
    public String getPlanItemDetailId() {
        return planItemDetailId;
    }
    public void setSignId(String signId) {
        this.signId = signId;
    public void setPlanItemDetailId(String planItemDetailId) {
        this.planItemDetailId = planItemDetailId;
    }
}

+ 2 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/service/servicePackage/ServicePackageSubItemService.java

@ -28,6 +28,7 @@ public class ServicePackageSubItemService extends BaseJpaService<ServicePackageS
    public Map<String, Object> getSubItemList(ParamQvo qvo) {
        String detailSql = "select * ";
        String countSql = " select count(1) ";
        String orderBySql = " order by a.sort desc ";
        String pageSql = "";
        String sql = " FROM base_service_package_sub_item a   ";
        if (StringUtils.isNotBlank(qvo.getParentId())) {
@ -62,7 +63,7 @@ public class ServicePackageSubItemService extends BaseJpaService<ServicePackageS
        if (StringUtils.isNotBlank(qvo.getPageIf())) {
            pageSql += " limit " + (qvo.getPage() - 1) * qvo.getPageSize() + "," + qvo.getPageSize();
        }
        detailSql += sql + pageSql;
        detailSql += sql + orderBySql + pageSql;
        countSql += sql;
        Integer count = jdbcTemplate.queryForObject(countSql, Integer.class);
        List<Map<String, Object>> list = jdbcTemplate.queryForList(detailSql);

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

@ -24,18 +24,19 @@ public class CommonItemController extends EnvelopRestEndpoint {
    @Autowired
    private DoorOrderService doorOrderService;
    /**
     * 这个接口没用了
     * 去调用服务子项查询接口
     */
    @ApiOperation("查询字典-通用字典接口")
    @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){
    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);
        }catch (Exception e){

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

@ -1398,11 +1398,11 @@ public class DoorOrderService {
        doorServiceOrderDao.save(one);
        //
        String signId = one.getSignId();//签约id
        String packageId = one.getPackageId();//服务包id
        String planId = one.getPlanId();//计划id
        String planItemDetailId = one.getPlanItemDetailId();//计划服务项id
        Date date = new Date();
        //更新计划状态为完成
//        serviceItemPlanDao.updateState(signId, packageId, date);
        serviceItemPlanDao.updateState(planId, planItemDetailId, date);
        WlyyDoorServiceOrderDO doorServiceOrderDO = this.getDoorServiceOrderById(orderId, level);

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

@ -1404,7 +1404,7 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
                "  ifnull(de.order_id,concat(rand(),'_notExist')) AS feeOrderId, " +
                "  a.mobile AS hospitalPhone, " +
                "  count(de.number) as itemCount ," +
                "  o.sign_id 'signId' , o.package_id 'packageId' " +
                "  o.plan_id 'planId' , o.plan_item_detail_id 'planItemDetailId' " +
                " FROM " +
                "  ( wlyy_door_service_order o " +
                " LEFT JOIN base_doctor d ON o.doctor = d.`id`) " +

+ 29 - 18
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/service/RehabilitationInfoService.java

@ -847,6 +847,7 @@ public class RehabilitationInfoService {
        RehabilitationPatientInfoDO infoDO = new RehabilitationPatientInfoDO();
        infoDO.setPatient(patient.getId());
        infoDO.setStatus(0);
        infoDO.setIdcard(patient.getIdcard());
        infoDO.setAge(IdCardUtil.getAgeByBirthdayOrIdcard(patient.getIdcard(), patient.getBirthday()));
        infoDO.setSsc(patient.getSsc());
        infoDO.setAddress(patient.getAddress());
@ -1101,30 +1102,39 @@ public class RehabilitationInfoService {
        String limitSql = " LIMIT " + (page - 1) * pagesize + "," + pagesize;
        String sql = "SELECT * FROM ( " +
                "SELECT DISTINCT \n" +
                "	 a.idcard,a.id,a.`name`,a.birthday,a.phone,a.sex,a.mobile,c.age,\n" +
                "	  (\n" +
                "		SELECT GROUP_CONCAT(q.`name`) FROM base_disease_hospital q  INNER JOIN wlyy_patient_rehabilitation_plan w ON q.id = w.disease \n" +
                "	 a.idcard,a.id,a.`name`,a.birthday,a.phone,a.sex,a.mobile,TIMESTAMPDIFF(YEAR,a.birthday,NOW()) 'age',\n" +
                "	   (\n" +
                "		SELECT GROUP_CONCAT(q.`name`) FROM base_disease_hospital q \n" +
                "        INNER JOIN wlyy_patient_rehabilitation_plan w ON q.id = w.disease \n" +
                "		 WHERE 1 = 1 AND w.patient=a.id  GROUP BY w.patient\n" +
                "	  ) 'diseaseListName',\n" +
                "	   ) 'diseaseListName',\n" +
                "      (\n" +
                "        SELECT GROUP_CONCAT(DISTINCT w.plan_doctor_name) FROM wlyy_patient_rehabilitation_plan w WHERE a.id = w.patient \n" +
                "      ) 'planDoctorListName',\n" +
                "	   (\n" +
                "			SELECT count(1) FROM wlyy_patient_rehabilitation_plan w \n" +
                "			INNER JOIN wlyy_rehabilitation_plan_detail q ON w.id = q.plan_id \n" +
                "           INNER JOIN base_service_item_plan e ON e.plan_detail_id = q.id \n" +
                "			WHERE 1 = 1 AND w.patient = a.id \n" +
                "		)'itemAllCount',\n" +
                "		(\n" +
                "			SELECT count(1) FROM wlyy_patient_rehabilitation_plan w \n" +
                "			INNER JOIN wlyy_rehabilitation_plan_detail q ON w.id = q.plan_id \n" +
                "			WHERE	1 = 1 	AND q.`status`='0'	AND w.patient = a.id \n" +
                "           INNER JOIN base_service_item_plan e ON e.plan_detail_id = q.id \n" +
                "			WHERE	1 = 1 	AND e.`status`='0'	AND w.patient = a.id \n" +
                "		)'unFinishCount',\n" +
                "		(\n" +
                "			SELECT count(1) 	FROM wlyy_patient_rehabilitation_plan w \n" +
                "			INNER JOIN wlyy_rehabilitation_plan_detail q ON w.id = q.plan_id \n" +
                "			WHERE	1 = 1 	AND q.`status`='1'	AND w.patient = a.id \n" +
                "           INNER JOIN base_service_item_plan e ON e.plan_detail_id = q.id \n" +
                "			WHERE	1 = 1 	AND e.`status`='1'	AND w.patient = a.id \n" +
                "		)'finishCount',\n" +
                "		0 'totayTask'\n" +
                "		(\n" +
                "			SELECT count(1) FROM wlyy_patient_rehabilitation_plan w \n" +
                "			INNER JOIN wlyy_rehabilitation_plan_detail q ON w.id = q.plan_id \n" +
                "           INNER JOIN base_service_item_plan e ON e.plan_detail_id = q.id \n" +
                "			WHERE	1 = 1 	AND e.plan_time=DATE_FORMAT(NOW(),'%Y-%m-%d') AND e.`status`='0'	AND w.patient = a.id \n" +
                "		)'totayTask'\n" +
                "FROM\n" +
                "	base_patient a\n" +
                "	left JOIN wlyy_patient_rehabilitation_plan b ON a.id = b.patient\n" +
@ -1173,16 +1183,17 @@ public class RehabilitationInfoService {
    public HashMap<String, Object> getRehabilitationPatientPlanCount(String doctorId) {
        String sql =
                "SELECT DISTINCT \n" +
                        "	 a.id,a.`name`,a.birthday,a.phone,a.sex,a.mobile,c.age,\n" +
                        "	 a.id,a.`name`,a.birthday,a.phone,a.sex,a.mobile,TIMESTAMPDIFF(YEAR,a.birthday,NOW()) 'age',\n" +
                        "	  (\n" +
                        "		SELECT GROUP_CONCAT(q.`name`) FROM base_disease_hospital q  INNER JOIN wlyy_patient_rehabilitation_plan w ON q.id = w.disease \n" +
                        "		 WHERE 1 = 1 AND w.patient=a.id  GROUP BY w.patient\n" +
                        "	  ) 'diseaseListName',\n" +
                        "		(\n" +
                        "			SELECT count(1) 	FROM wlyy_patient_rehabilitation_plan w \n" +
                        "			INNER JOIN wlyy_rehabilitation_plan_detail q ON w.id = q.plan_id \n" +
                        "			WHERE		1 = 1 	AND q.`status`='0'		AND w.patient = a.id \n" +
                        "		)'unFinishCount'\n" +
                        "	  (\n" +
                        "	  	SELECT count(1)  FROM wlyy_patient_rehabilitation_plan w \n" +
                        "	  	INNER JOIN wlyy_rehabilitation_plan_detail q ON w.id = q.plan_id \n" +
                        "       INNER JOIN base_service_item_plan e ON e.plan_detail_id = q.id \n" +
                        "	  	WHERE 1 = 1  AND e.`status`='0'	 AND w.patient = a.id \n" +
                        "	  )'unFinishCount'\n" +
                        "FROM\n" +
                        "	base_patient a\n" +
                        "	INNER JOIN wlyy_patient_rehabilitation_plan b ON a.id = b.patient\n" +
@ -1221,7 +1232,7 @@ public class RehabilitationInfoService {
     */
    public List<Map<String, Object>> getPatientRehabilitationByPatientId(String patientId, String planId) {
        String sql = "SELECT DISTINCT \n" +
                "	 a.id,a.`name`,a.birthday,a.phone,a.sex,a.mobile,c.age,a.idcard,\n" +
                "	 a.id,a.`name`,a.birthday,a.phone,a.sex,a.mobile,TIMESTAMPDIFF(YEAR,a.birthday,NOW()) 'age',a.idcard,\n" +
                "	 b.id 'planId',b.title 'planTitle',b.plan_doctor_name 'planDoctorName',d. `name` 'diseaseName',c.dept_name 'deptName',\n" +
                "	 b.`status` 'planStatus', c.hospital_name 'hospitalName',b.medical_records_code medicalRecordsCode," +
                "    c.from_source, " +
@ -1232,10 +1243,10 @@ public class RehabilitationInfoService {
                "      END 'fromSourceName',\n" +
                "     c.ijk_id, c.status,'patientStatus'," +
                "     b.advice_content 'adviceContent',\n" +
                "	 (SELECT count(1) FROM wlyy_rehabilitation_plan_detail q WHERE	1 = 1 AND q.plan_id = b.id )'itemAllCount',\n" +
                "	 (SELECT count(1) FROM wlyy_rehabilitation_plan_detail q WHERE	1 = 1 AND q.`status`='1' AND q.plan_id = b.id )'finishCount',\n" +
                "	 (SELECT count(1) FROM wlyy_rehabilitation_plan_detail q WHERE	1 = 1 AND q.`status`='0' AND q.plan_id = b.id )'unFinishCount',\n" +
                "	 0 'todayTaskCount'\n" +
                "	 (SELECT count(1) FROM wlyy_rehabilitation_plan_detail q INNER JOIN base_service_item_plan w ON w.plan_detail_id = q.id WHERE 1 = 1 AND q.plan_id = b.id )'itemAllCount',\n" +
                "	 (SELECT count(1) FROM wlyy_rehabilitation_plan_detail q INNER JOIN base_service_item_plan w ON w.plan_detail_id = q.id WHERE 1 = 1 AND w.`status`='1' AND q.plan_id = b.id )'finishCount',\n" +
                "	 (SELECT count(1) FROM wlyy_rehabilitation_plan_detail q INNER JOIN base_service_item_plan w ON w.plan_detail_id = q.id WHERE 1 = 1 AND w.`status`='0' AND q.plan_id = b.id )'unFinishCount',\n" +
                "	 (SELECT count(1) FROM wlyy_rehabilitation_plan_detail q INNER JOIN base_service_item_plan w ON w.plan_detail_id = q.id WHERE 1 = 1 AND w.`status`='0' AND w.plan_time=DATE_FORMAT(NOW(),'%Y-%m-%d') AND q.plan_id = b.id )'todayTaskCount' \n" +
                "FROM\n" +
                "	base_patient a\n" +
                "	LEFT JOIN wlyy_patient_rehabilitation_plan b ON a.id = b.patient\n" +

+ 9 - 2
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/service/RehabilitationPlanService.java

@ -665,9 +665,16 @@ public class RehabilitationPlanService extends BaseJpaService<RehabilitationPlan
    }
    public List<Map<String, Object>> findRehabilitationServiceItem(String itemName) {
        String sql = " SELECT * FROM base.wlyy_rehabilitation_service_item WHERE 1=1 ";
        String sql = "SELECT\n" +
                "	a.* \n" +
                "FROM\n" +
                "	wlyy_rehabilitation_service_item a\n" +
                "	INNER JOIN base_service_package_item b ON a.id = b.dict_id \n" +
                "WHERE\n" +
                "	1 = 1 \n" +
                "	AND b.del = '1' ";
        if (StringUtils.isNotBlank(itemName)) {
            sql += " and `name` LIKE '%" + itemName + "%'";
            sql += " and a.`name` LIKE '%" + itemName + "%'";
        }
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        return list;