liuwenbin 6 лет назад
Родитель
Сommit
425eefed92

+ 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);
}

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

@ -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();