|
@ -368,7 +368,7 @@ public class SynergyManageService extends BaseJpaService {
|
|
* @param hospitalCode
|
|
* @param hospitalCode
|
|
*/
|
|
*/
|
|
public Map<String,Object> takeWorkorderNum(String workorderCode,String townCode,String hospitalCode,
|
|
public Map<String,Object> takeWorkorderNum(String workorderCode,String townCode,String hospitalCode,
|
|
String diseaseCode,String healthCode,String serveCode,Integer isFollow) throws Exception{
|
|
|
|
|
|
String diseaseCode,String healthCode,String serveCode,Integer isFollow,String userCode) throws Exception{
|
|
String whereSql ="";
|
|
String whereSql ="";
|
|
String leftSql ="";
|
|
String leftSql ="";
|
|
if(StringUtils.isNotEmpty(townCode)){
|
|
if(StringUtils.isNotEmpty(townCode)){
|
|
@ -397,14 +397,14 @@ public class SynergyManageService extends BaseJpaService {
|
|
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.service_patient_code=s.code ";
|
|
whereSql+=" and ll.follow_up=2 ";
|
|
whereSql+=" and ll.follow_up=2 ";
|
|
}
|
|
}
|
|
String sql =" select DISTINCT w.*,s.mobile,s.service_patient_name,s.service_patient_code,s.code as servicerCode,s.town_name,s.hospital_name " +
|
|
|
|
|
|
String sql =" select DISTINCT w.*,s.mobile,s.service_patient_name,s.service_patient_code,s.code as servicerCode,s.town_name,s.hospital_name, " +
|
|
" w.create_user_name " +
|
|
" w.create_user_name " +
|
|
" from manage_synergy_workorder_servicer s " +
|
|
" from manage_synergy_workorder_servicer s " +
|
|
" LEFT JOIN manage_synergy_workorder w on s.workorder_code=w.code " +
|
|
" LEFT JOIN manage_synergy_workorder w on s.workorder_code=w.code " +
|
|
" LEFT JOIN manage_synergy_workorder_executor e on e.workorder_code=w.code " + leftSql+
|
|
" LEFT JOIN manage_synergy_workorder_executor e on e.workorder_code=w.code " + leftSql+
|
|
" LEFT JOIN manage_synergy_workorder_customer_log l on l.service_patient_code=s.service_patient_code " +
|
|
" LEFT JOIN manage_synergy_workorder_customer_log l on l.service_patient_code=s.service_patient_code " +
|
|
" where s.status=1 and s.workorderCode='"+workorderCode+"' " +
|
|
|
|
" and w.del=1 and w.status=2 and e.del=1 "+
|
|
|
|
|
|
" where s.status=1 and s.workorder_code='"+workorderCode+"' " +
|
|
|
|
" and w.del=1 and w.status=2 and e.del=1 and e.executor_code='"+userCode+"' "+
|
|
whereSql+" order by l.id desc";
|
|
whereSql+" order by l.id desc";
|
|
List<Map<String,Object>> resultWorkorderList = jdbcTemplate.queryForList(sql);
|
|
List<Map<String,Object>> resultWorkorderList = jdbcTemplate.queryForList(sql);
|
|
Map<String,Object> resultMap = new HashMap<>();
|
|
Map<String,Object> resultMap = new HashMap<>();
|
|
@ -626,7 +626,8 @@ public class SynergyManageService extends BaseJpaService {
|
|
Integer validCount = workorderServicerDao.findByWorkorderCodeCount(workorderCode,3);
|
|
Integer validCount = workorderServicerDao.findByWorkorderCodeCount(workorderCode,3);
|
|
resultMap.put("validCount",validCount);
|
|
resultMap.put("validCount",validCount);
|
|
//2、无效
|
|
//2、无效
|
|
resultMap.put("invalidCount",0);
|
|
|
|
|
|
Integer invalidCount = manageSynergyWorkorderServicerLogDao.findByWorkorderCodeAndReturnVisit(workorderCode);
|
|
|
|
resultMap.put("invalidCount",invalidCount);
|
|
//3、总数
|
|
//3、总数
|
|
ManageSynergyWorkorderDO manageSynergyWorkorder = workOrderDao.findByCode(workorderCode);
|
|
ManageSynergyWorkorderDO manageSynergyWorkorder = workOrderDao.findByCode(workorderCode);
|
|
resultMap.put("allCount",manageSynergyWorkorder.getServicerCount());
|
|
resultMap.put("allCount",manageSynergyWorkorder.getServicerCount());
|
|
@ -634,7 +635,7 @@ public class SynergyManageService extends BaseJpaService {
|
|
Integer myFinishedCount = workorderServicerDao.countByWorkorderCodeAndExecutorCodeAndStatus(workorderCode,userCode,3);
|
|
Integer myFinishedCount = workorderServicerDao.countByWorkorderCodeAndExecutorCodeAndStatus(workorderCode,userCode,3);
|
|
resultMap.put("myFinishedCount",myFinishedCount);
|
|
resultMap.put("myFinishedCount",myFinishedCount);
|
|
//待跟进
|
|
//待跟进
|
|
Integer followCount = manageSynergyWorkorderServicerLogDao.findByWorkorderCode(workorderCode);
|
|
|
|
|
|
Integer followCount = manageSynergyWorkorderServicerLogDao.findByWorkorderCodeAndFollowUp(workorderCode);
|
|
resultMap.put("followCount",followCount);
|
|
resultMap.put("followCount",followCount);
|
|
return resultMap;
|
|
return resultMap;
|
|
}
|
|
}
|