Przeglądaj źródła

Merge branch 'dev' of liuwenbin/patient-co-management into dev

liuwenbin 6 lat temu
rodzic
commit
b486525396

+ 4 - 1
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/synergy/ManageSynergyWorkorderServicerLogDao.java

@ -14,9 +14,12 @@ public interface ManageSynergyWorkorderServicerLogDao extends PagingAndSortingRe
    @Query("select count(distinct l.workorderServiceCode) from ManageSynergyWorkorderServicerLogDO l where l.workorderCode=?1 and l.followUp=2 ")
    Integer findByWorkorderCodeAndFollowUp(String workorderCode);
    @Query("select count(distinct l.workorderServiceCode) from ManageSynergyWorkorderServicerLogDO l where l.workorderCode=?1 and l.returnVisit=2 ")
    @Query("select count(distinct l.workorderServiceCode) from ManageSynergyWorkorderServicerLogDO l where l.workorderCode=?1 and l.returnVisit=1 ")
    Integer findByWorkorderCodeAndReturnVisit(String workorderCode);
    @Query("select count(distinct l.workorderServiceCode) from ManageSynergyWorkorderServicerLogDO l where l.workorderCode=?1")
    Integer findByWorkorderCode(String workorderCode);
    @Query("select l from ManageSynergyWorkorderServicerLogDO l where l.workorderServiceCode=?1 order by id desc")
    List<ManageSynergyWorkorderServicerLogDO> findByWorkorderServiceCode(String workorderServiceCode);
}

+ 6 - 3
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/synergy/SynergyManageService.java

@ -487,7 +487,7 @@ public class SynergyManageService extends BaseJpaService {
            whereSql+=" and aa.label LIKE '%,3"+diseaseCode+",%' ";
        }
        if(isFollow!=null&&isFollow==1){//跟进
            leftSql+=" LEFT JOIN manage_synergy_workorder_servicer_log ll on ll.service_patient_code=s.code ";
            leftSql+=" LEFT JOIN manage_synergy_workorder_servicer_log ll on ll.workorder_service_code=s.code ";
            whereSql+=" and ll.follow_up=2 and ll.workorder_service_code not in (select DISTINCT lll.workorder_service_code from manage_synergy_workorder_servicer_log lll where lll.follow_up=1 and lll.workorder_code='"+workorderCode+"') ";
            orderBySql=" ll.id desc";
            whereSql+=" and s.status=3 ";
@ -802,10 +802,12 @@ public class SynergyManageService extends BaseJpaService {
        Map<String,Object> resultMap = new HashMap<>();
        //完成情况
        //1、有效
        Integer validCount = workorderServicerDao.findByWorkorderCodeCount(workorderCode,3);
//        Integer validCount = workorderServicerDao.findByWorkorderCodeCount(workorderCode,3);
        Integer validCount = manageSynergyWorkorderServicerLogDao.findByWorkorderCodeAndReturnVisit(workorderCode);
        resultMap.put("validCount",validCount);
        //2、无效
        resultMap.put("invalidCount",0);
        Integer allCount = manageSynergyWorkorderServicerLogDao.findByWorkorderCode(workorderCode);
        resultMap.put("invalidCount",allCount-validCount);
        //3、总数
        ManageSynergyWorkorderDO manageSynergyWorkorder = workOrderDao.findByCode(workorderCode);
        resultMap.put("allCount",manageSynergyWorkorder.getServicerCount());
@ -1412,6 +1414,7 @@ public class SynergyManageService extends BaseJpaService {
                i++;
            }
            wwb.write();
            os.flush();
        }catch (Exception e) {
            e.printStackTrace();
            if(os!=null)os.close();