|
@ -333,7 +333,7 @@ public class SynergyManageService extends BaseJpaService {
|
|
|
* @param labelType
|
|
|
* @param labelCode
|
|
|
*/
|
|
|
public void takeWorkorderNum(String workorderCode,String townCode,String hospitalCode,Integer labelType,String labelCode){
|
|
|
public void takeWorkorderNum(String workorderCode,String townCode,String hospitalCode,Integer labelType,String labelCode) throws Exception{
|
|
|
|
|
|
String whereSql ="";
|
|
|
if(StringUtils.isNotEmpty(townCode)){
|
|
@ -342,14 +342,35 @@ public class SynergyManageService extends BaseJpaService {
|
|
|
if(StringUtils.isNotEmpty(hospitalCode)){
|
|
|
whereSql+=" and s.hospital='"+hospitalCode+"' ";
|
|
|
}
|
|
|
String sql =" select DISTINCT s.*,w.* from manage_synergy_workorder_servicer s " +
|
|
|
String sql =" select DISTINCT w.*,s.mobile,s.service_patient_name,s.service_patient_code, " +
|
|
|
" from manage_synergy_workorder_servicer s " +
|
|
|
" LEFT JOIN manage_synergy_workorder w on s.workorder_code=w.code and w.del=1 and w.status=2 " +
|
|
|
" LEFT JOIN manage_synergy_workorder_executor e on e.workorder_code=w.code and e.del=1 " +
|
|
|
" LEFT JOIN wlyy_sign_patient_label_info i on i.patient=s.service_patient_code and i.status=1 " +
|
|
|
" LEFT JOIN manage_synergy_workorder_customer_log l on l.service_patient_code=s.service_patient_code " +
|
|
|
" where s.status=1 and i.label='"+labelCode+"' and i.label_type='"+labelType+"' and s.workorderCode='"+workorderCode+"' " +
|
|
|
whereSql+" order by l.id desc";
|
|
|
List<Map<String,Object>> resultWorkorderList = jdbcTemplate.queryForList(sql);
|
|
|
Map<String,Object> resultMap = new HashMap<>();
|
|
|
if(resultWorkorderList.size()>0){
|
|
|
Map<String,Object> workorderMap = resultWorkorderList.get(0);
|
|
|
//居民信息
|
|
|
resultMap.put("mobile",workorderMap.get("mobile"));//电话号码
|
|
|
resultMap.put("mobile",workorderMap.get("mobile"));//居民姓名
|
|
|
|
|
|
resultMap.put("mobile",workorderMap.get("mobile"));//已呼叫次数
|
|
|
resultMap.put("mobile",workorderMap.get("mobile"));//性别
|
|
|
resultMap.put("mobile",workorderMap.get("mobile"));//年龄
|
|
|
resultMap.put("mobile",workorderMap.get("mobile"));//所属区县
|
|
|
resultMap.put("mobile",workorderMap.get("mobile"));//所属社区
|
|
|
resultMap.put("mobile",workorderMap.get("mobile"));//签约医生
|
|
|
resultMap.put("mobile",workorderMap.get("mobile"));//健管师
|
|
|
resultMap.put("mobile",workorderMap.get("mobile"));//疾病类型
|
|
|
resultMap.put("mobile",workorderMap.get("mobile"));//健康情况
|
|
|
resultMap.put("mobile",workorderMap.get("mobile"));//服务类型
|
|
|
}else{
|
|
|
throw new Exception("没有任务");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|