Explorar o código

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

# Conflicts:
#	patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/customer/CustomerSynergyManageController.java
#	patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/synergy/ManageSynergyWorkorderCustomerLogDO.java
#	patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/synergy/ManageSynergyWorkorderCustomerLogDao.java
#	patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/synergy/SynergyManageService.java
liuwenbin %!s(int64=6) %!d(string=hai) anos
pai
achega
e2c828ce60
Modificáronse 13 ficheiros con 197 adicións e 55 borrados
  1. 18 6
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/customer/CustomerSynergyManageController.java
  2. 10 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/synergy/ManageSynergyWorkordeReminderDO.java
  3. 5 5
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/synergy/ManageSynergyWorkorderCustomerLogDO.java
  4. 7 6
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/synergy/ManageSynergyWorkorderReserveConsultDO.java
  5. 2 2
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/synergy/ManageSynergyWorkorderCustomerLogDao.java
  6. 2 2
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/synergy/ManageSynergyWorkorderServicerLogDao.java
  7. 80 6
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/account/CustomerService.java
  8. 10 5
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/device/WlyyPatientDeviceService.java
  9. 50 14
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/synergy/SynergyManageService.java
  10. 4 4
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/device/patientDevice_list.jsp
  11. 2 2
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/device/patientDevice_list_js.jsp
  12. 7 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/survey/SurveyScreenResultService.java
  13. 0 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/synergy/SynergyManageService.java

+ 18 - 6
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/synergy/customer/CustomerSynergyManageController.java

@ -240,8 +240,8 @@ public class CustomerSynergyManageController extends BaseController {
    @RequestMapping(value = "saveCallLabel",method = RequestMethod.POST)
    @RequestMapping(value = "saveCallLabel",method = RequestMethod.POST)
    @ApiOperation(value = "保存所有通话标签")
    @ApiOperation(value = "保存所有通话标签")
    public String saveCallLabel(@ApiParam(name="callCode",value="通话记录code")@RequestParam(required = false)String callCode,
                                @ApiParam(name="callLabels",value="通话标签,多个用逗号隔开")@RequestParam(required = false)String callLabels){
    public String saveCallLabel(@ApiParam(name="callCode",value="通话记录code")@RequestParam(value = "callCode")String callCode,
                                @ApiParam(name="callLabels",value="通话标签,多个用逗号隔开")@RequestParam(value = "callLabels",required = false)String callLabels){
        try{
        try{
            String sql ="UPDATE manage_call_record SET call_label='"+callLabels+"' WHERE `code`='"+callCode+"'";
            String sql ="UPDATE manage_call_record SET call_label='"+callLabels+"' WHERE `code`='"+callCode+"'";
            jdbcTemplate.update(sql);
            jdbcTemplate.update(sql);
@ -265,10 +265,10 @@ public class CustomerSynergyManageController extends BaseController {
    }
    }
    @RequestMapping(value = "saveCallInfo",method = RequestMethod.POST)
    @RequestMapping(value = "saveCallInfo",method = RequestMethod.POST)
    @ApiOperation(value = "显示所有通话标签")
    public String saveCallInfo(@ApiParam(name="callCode",value="通话记录code")@RequestParam(required = false)String callCode,
                                @ApiParam(name="serviceType",value="服务类型,多个用逗号隔开")@RequestParam(required = false)String serviceType,
                               @ApiParam(name="serviceContent",value="服务记录")@RequestParam(required = false)String serviceContent){
    @ApiOperation(value = "保存通话记录详情")
    public String saveCallInfo(@ApiParam(name="callCode",value="通话记录code")@RequestParam(value ="callCode")String callCode,
                                @ApiParam(name="serviceType",value="服务类型,多个用逗号隔开")@RequestParam(value = "serviceType",required = false)String serviceType,
                               @ApiParam(name="serviceContent",value="服务记录")@RequestParam(value = "serviceContent",required = false)String serviceContent){
        try{
        try{
            String sql ="UPDATE manage_call_record SET service_type='"+serviceType+"',service_content='"+serviceContent+"' WHERE `code`='"+callCode+"'";
            String sql ="UPDATE manage_call_record SET service_type='"+serviceType+"',service_content='"+serviceContent+"' WHERE `code`='"+callCode+"'";
            jdbcTemplate.update(sql);
            jdbcTemplate.update(sql);
@ -297,6 +297,18 @@ public class CustomerSynergyManageController extends BaseController {
        }
        }
    }
    }
    @RequestMapping(value = "getDealList",method = RequestMethod.GET)
    @ApiOperation(value = "通话详情获取待办事项")
    public String getDealList(@ApiParam(name="idcard",value="居民身份证")@RequestParam(value ="idcard")String idcard){
        try{
            return write(200,"获取成功!","data",synergyManageService.getDealList(idcard));
        }catch (Exception e){
            e.printStackTrace();
            return write(-1,"获取失败!");
        }
    }
    @RequestMapping(value = "exportWorkorder", method = RequestMethod.GET)
    @RequestMapping(value = "exportWorkorder", method = RequestMethod.GET)
    @ApiOperation("客服系统-协同服务列表")
    @ApiOperation("客服系统-协同服务列表")
    public String exportWorkorder(@ApiParam(name = "userCode", value = "客服code", required = false)
    public String exportWorkorder(@ApiParam(name = "userCode", value = "客服code", required = false)

+ 10 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/synergy/ManageSynergyWorkordeReminderDO.java

@ -16,6 +16,7 @@ import java.util.Date;
public class ManageSynergyWorkordeReminderDO extends IdEntity {
public class ManageSynergyWorkordeReminderDO extends IdEntity {
    private String code;
    private String code;
    private String workorderCode;//协同服务工单code
    private String workorderCode;//协同服务工单code
    private String workorderServiceCode;//协同服务对象code
    private String createUser;//创建人code
    private String createUser;//创建人code
    private String createUserName;//创建者姓名
    private String createUserName;//创建者姓名
    private Integer createUserType;//创建人类型(1、医生,2、客服,3、客服负责人)
    private Integer createUserType;//创建人类型(1、医生,2、客服,3、客服负责人)
@ -193,4 +194,13 @@ public class ManageSynergyWorkordeReminderDO extends IdEntity {
    public void setPriority(Integer priority) {
    public void setPriority(Integer priority) {
        this.priority = priority;
        this.priority = priority;
    }
    }
    @Column(name = "workorder_service_code")
    public String getWorkorderServiceCode() {
        return workorderServiceCode;
    }
    public void setWorkorderServiceCode(String workorderServiceCode) {
        this.workorderServiceCode = workorderServiceCode;
    }
}
}

+ 5 - 5
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/synergy/ManageSynergyWorkorderCustomerLogDO.java

@ -17,7 +17,7 @@ public class ManageSynergyWorkorderCustomerLogDO extends IdEntity {
    private String code;
    private String code;
    private Date createTime;//添加时间
    private Date createTime;//添加时间
    private String workorderCode;//系统服务工单code
    private String workorderCode;//系统服务工单code
    private String workorderPatientCode;//协同服务对象code
    private String workorderServiceCode;//协同服务对象code
    private String createUserCode;//创建人(客服)code
    private String createUserCode;//创建人(客服)code
    private String createUserName;//创建人(客服)名称
    private String createUserName;//创建人(客服)名称
    private String callCode;//通话记录code
    private String callCode;//通话记录code
@ -50,12 +50,12 @@ public class ManageSynergyWorkorderCustomerLogDO extends IdEntity {
    }
    }
    @Column(name = "workorder_service_code")
    @Column(name = "workorder_service_code")
    public String getWorkorderPatientCode() {
        return workorderPatientCode;
    public String getWorkorderServiceCode() {
        return workorderServiceCode;
    }
    }
    public void setWorkorderPatientCode(String workorderPatientCode) {
        this.workorderPatientCode = workorderPatientCode;
    public void setWorkorderServiceCode(String workorderServiceCode) {
        this.workorderServiceCode = workorderServiceCode;
    }
    }
    @Column(name = "create_user_code")
    @Column(name = "create_user_code")

+ 7 - 6
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/synergy/ManageSynergyWorkorderReserveConsultDO.java

@ -32,7 +32,7 @@ public class ManageSynergyWorkorderReserveConsultDO extends IdEntity {
    private String userName;//客服姓名(创建人)
    private String userName;//客服姓名(创建人)
    private Date createTime;//创建时间
    private Date createTime;//创建时间
    private String workorderCode;//协同服务工单code
    private String workorderCode;//协同服务工单code
    private String servicePatientCode;//协同服务对象code
    private String workorderServiceCode;//协同服务对象code
    private String callCode;//通话记录code
    private String callCode;//通话记录code
    @Column(name = "code")
    @Column(name = "code")
@ -197,15 +197,16 @@ public class ManageSynergyWorkorderReserveConsultDO extends IdEntity {
        this.workorderCode = workorderCode;
        this.workorderCode = workorderCode;
    }
    }
    @Column(name = "service_patient_code")
    public String getServicePatientCode() {
        return servicePatientCode;
    @Column(name = "workorder_service_code")
    public String getWorkorderServiceCode() {
        return workorderServiceCode;
    }
    }
    public void setServicePatientCode(String servicePatientCode) {
        this.servicePatientCode = servicePatientCode;
    public void setWorkorderServiceCode(String workorderServiceCode) {
        this.workorderServiceCode = workorderServiceCode;
    }
    }
    @Column(name = "call_code")
    @Column(name = "call_code")
    public String getCallCode() {
    public String getCallCode() {
        return callCode;
        return callCode;

+ 2 - 2
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/synergy/ManageSynergyWorkorderCustomerLogDao.java

@ -11,8 +11,8 @@ import java.util.List;
 */
 */
public interface ManageSynergyWorkorderCustomerLogDao extends PagingAndSortingRepository<ManageSynergyWorkorderCustomerLogDO, Long> {
public interface ManageSynergyWorkorderCustomerLogDao extends PagingAndSortingRepository<ManageSynergyWorkorderCustomerLogDO, Long> {
    @Query("select count(distinct l.callCode) from ManageSynergyWorkorderCustomerLogDO l where l.workorderPatientCode=?1 ")
    Integer callNumByWorkorder(String servicePatientCode);
    @Query("select count(distinct l.callCode) from ManageSynergyWorkorderCustomerLogDO l where l.workorderServiceCode=?1 ")
    Integer callNumByWorkorder(String workorderServiceCode);
    @Query("select count(1) from ManageSynergyWorkorderCustomerLogDO cl where cl.workorderCode = ?1 and cl.createUserCode = ?2 and cl.status = 0")
    @Query("select count(1) from ManageSynergyWorkorderCustomerLogDO cl where cl.workorderCode = ?1 and cl.createUserCode = ?2 and cl.status = 0")
    Integer findExceptionCount(String workorderCode, String customerCode);
    Integer findExceptionCount(String workorderCode, String customerCode);

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

@ -11,10 +11,10 @@ import java.util.List;
 */
 */
public interface ManageSynergyWorkorderServicerLogDao extends PagingAndSortingRepository<ManageSynergyWorkorderServicerLogDO, Long> {
public interface ManageSynergyWorkorderServicerLogDao extends PagingAndSortingRepository<ManageSynergyWorkorderServicerLogDO, Long> {
    @Query("select count(distinct l.servicePatientCode) from ManageSynergyWorkorderServicerLogDO l where l.workorderCode=?1 and l.followUp=2 ")
    @Query("select count(distinct l.workorderServiceCode) from ManageSynergyWorkorderServicerLogDO l where l.workorderCode=?1 and l.followUp=2 ")
    Integer findByWorkorderCodeAndFollowUp(String workorderCode);
    Integer findByWorkorderCodeAndFollowUp(String workorderCode);
    @Query("select count(distinct l.servicePatientCode) 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=2 ")
    Integer findByWorkorderCodeAndReturnVisit(String workorderCode);
    Integer findByWorkorderCodeAndReturnVisit(String workorderCode);
    @Query("select l from ManageSynergyWorkorderServicerLogDO l where l.workorderServiceCode=?1 order by id desc")
    @Query("select l from ManageSynergyWorkorderServicerLogDO l where l.workorderServiceCode=?1 order by id desc")

+ 80 - 6
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/account/CustomerService.java

@ -3,9 +3,11 @@ package com.yihu.wlyy.service.manager.account;
import com.yihu.wlyy.entity.*;
import com.yihu.wlyy.entity.*;
import com.yihu.wlyy.entity.call.CallRecord;
import com.yihu.wlyy.entity.call.CallRecord;
import com.yihu.wlyy.entity.call.CallService;
import com.yihu.wlyy.entity.call.CallService;
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderServicerDO;
import com.yihu.wlyy.repository.*;
import com.yihu.wlyy.repository.*;
import com.yihu.wlyy.repository.call.CallRecordDao;
import com.yihu.wlyy.repository.call.CallRecordDao;
import com.yihu.wlyy.repository.call.CallServiceDao;
import com.yihu.wlyy.repository.call.CallServiceDao;
import com.yihu.wlyy.repository.synergy.ManageSynergyWorkorderServicerDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.manager.family.FamilyMemberService;
import com.yihu.wlyy.service.manager.family.FamilyMemberService;
import com.yihu.wlyy.service.manager.hos.HosDoctorService;
import com.yihu.wlyy.service.manager.hos.HosDoctorService;
@ -92,9 +94,11 @@ public class CustomerService extends BaseService{
				doctors.add(doctor);
				doctors.add(doctor);
			}
			}
		}
		}
		String labelSql="SELECT  DISTINCT CASE call_label WHEN '1' THEN '有待跟踪' WHEN '2' THEN '电话骚扰' WHEN '3' THEN '态度恶劣' END FROM manage_call_record mcr WHERE (caller_number='"+patient.getPhone()+"' OR caller_number='"+patient.getMobile()+"') AND type=1 AND call_label IS NOT NULL";
		List<Map<String,Object>> labelInfo = jdbcTemplate.queryForList(labelSql);
		resp.put("signInfo",signInfo);
		resp.put("signInfo",signInfo);
		resp.put("doctors",doctors);
		resp.put("doctors",doctors);
		resp.put("labelInfo",labelInfo);
		return resp;
		return resp;
	}
	}
@ -167,7 +171,7 @@ public class CustomerService extends BaseService{
		//发送短信消息啦
		//发送短信消息啦
		String mobile = doctor.getMobile();
		String mobile = doctor.getMobile();
		if(!StringUtils.isBlank(mobile)&&!"2".equals(type)){
		if(!StringUtils.isBlank(mobile)&&!"2".equals(type)){
			msg+="\n您可通过微信关注\"i健康智能助手\"公众号更快更便捷的获取服务信息。";
			msg+=" 您可通过微信关注\"i健康智能助手\"公众号更快更便捷的获取服务信息。";
			List<NameValuePair> par = new ArrayList<NameValuePair>();
			List<NameValuePair> par = new ArrayList<NameValuePair>();
			par.add(new BasicNameValuePair("mobiles", mobile));
			par.add(new BasicNameValuePair("mobiles", mobile));
			par.add(new BasicNameValuePair("content", msg));
			par.add(new BasicNameValuePair("content", msg));
@ -387,13 +391,83 @@ public class CustomerService extends BaseService{
	public Map<String,Object> getCallRecordInfo(String code){
	public Map<String,Object> getCallRecordInfo(String code){
		CallRecord callRecord = callRecordDao.findByCode(code);
		CallRecord callRecord = callRecordDao.findByCode(code);
		List<CallService> consultService = callServiceDao.findByCallCodeAndType(code,0);
		List<CallService> orderService = callServiceDao.findByCallCodeAndType(code,1);
		/*List<CallService> consultService = callServiceDao.findByCallCodeAndType(code,0);
		List<CallService> orderService = callServiceDao.findByCallCodeAndType(code,1);*/
		String type="";
		String relationCode="";
		String sql="";
		List<Map<String,Object>> resultList = new ArrayList<>();
		//咨询
		if ("0".equals(type)){
			sql="SELECT " +
				" a.code as workCode," +
				" a.content, " +
				" a.`status`, " +
				" a.service_patient_name, " +
				" c.deal_type, " +
				" c.deal_content, " +
				" a.remark " +
				" FROM " +
				" manage_synergy_workorder_reserve_consult c " +
				" INNER JOIN ( " +
				" SELECT " +
				"  w.*, s.service_patient_name " +
				"  FROM " +
				"  manage_synergy_workorder w " +
				"  LEFT JOIN manage_synergy_workorder_servicer s ON w.`code` = s.workorder_code " +
				" ) a " +
				" WHERE " +
				" call_code = '"+code+"'";
			resultList = jdbcTemplate.queryForList(sql);
		}
		//健康教育
		if ("1".equals(type)){
		}
		//预约
		if ("2".equals(type)){
			sql="SELECT" +
					" a. CODE AS workCode," +
					" a.`status`," +
					" a.service_patient_name," +
					" c.order_hospital_name," +
					" c.order_dept_name," +
					" c.order_time" +
					"FROM" +
					" manage_synergy_workorder_reserve_consult c" +
					"INNER JOIN (" +
					" SELECT" +
					"  w.*, s.service_patient_name" +
					" FROM" +
					"  manage_synergy_workorder w" +
					" LEFT JOIN manage_synergy_workorder_servicer s ON w.`code` = s.workorder_code" +
					") a" +
					"WHERE" +
					" call_code = '"+code+"'";
			resultList = jdbcTemplate.queryForList(sql);
		}
		//随访
		if ("3".equals(type)){
		}
		//问卷调查
		if ("4".equals(type)){
		}
		//疾病筛查
		if ("5".equals(type)){
			sql="SELECT * FROM `wlyy_survey_screen_result` WHERE `code`='"+relationCode+"'";
			resultList = jdbcTemplate.queryForList(sql);
		}
		List<PatientReservation> patientReservation = patientReservationDao.findByCallCode(code);
		List<PatientReservation> patientReservation = patientReservationDao.findByCallCode(code);
		Map<String,Object> rs = new HashedMap();
		Map<String,Object> rs = new HashedMap();
		rs.put("callRecord",callRecord);
		rs.put("callRecord",callRecord);
		rs.put("consultService",consultService);
		rs.put("orderService",orderService);
		/*rs.put("consultService",consultService);
		rs.put("orderService",orderService);*/
		rs.put("patientReservation",patientReservation);
		rs.put("patientReservation",patientReservation);
		return rs;
		return rs;
	}
	}

+ 10 - 5
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/device/WlyyPatientDeviceService.java

@ -129,7 +129,7 @@ public class WlyyPatientDeviceService extends BaseJpaService<WlyyPatientDevice,W
                                                   Integer page, Integer pageSize) throws Exception{
                                                   Integer page, Integer pageSize) throws Exception{
        
        
        List<WlyyPatientDeviceVO> list = new ArrayList<>();
        List<WlyyPatientDeviceVO> list = new ArrayList<>();
        String sql  = "SELECT s.patient," +
        /*String sql  = "SELECT s.patient," +
                "d.id as id," +
                "d.id as id," +
                "d.device_id as deviceId," +
                "d.device_id as deviceId," +
                "d.user as user," +
                "d.user as user," +
@ -152,7 +152,12 @@ public class WlyyPatientDeviceService extends BaseJpaService<WlyyPatientDevice,W
                "wlyy_sign_family s," +
                "wlyy_sign_family s," +
                "wlyy_patient_device d," +
                "wlyy_patient_device d," +
                "wlyy_patient p " +
                "wlyy_patient p " +
                "WHERE s.patient=d.`user` ";
                "WHERE s.patient=d.`user` ";*/
        String sql = "SELECT d.id as id,d.device_id as deviceId,d.user as user,p.name as userName,d.category_code as categoryCode,d.device_name as deviceName," +
                "d.device_sn as deviceSn,d.sim as sim,d.user_type as userType,p.mobile," +
                "CONCAT(LEFT (p.idcard,6),'**********',RIGHT (p.idcard,2)) userIdcard,d.czrq as czrq " +
                "FROM wlyy_patient_device d,wlyy_patient p " +
                "WHERE d.`user`=p.CODE ";
        if(StringUtils.isNotBlank(hospitalName)){
        if(StringUtils.isNotBlank(hospitalName)){
            sql = sql + "AND s.hospital_name like '%"+hospitalName+"%' ";
            sql = sql + "AND s.hospital_name like '%"+hospitalName+"%' ";
        }
        }
@ -181,10 +186,10 @@ public class WlyyPatientDeviceService extends BaseJpaService<WlyyPatientDevice,W
            sql = sql + "AND d.device_name like '%"+deviceName+"%' ";
            sql = sql + "AND d.device_name like '%"+deviceName+"%' ";
        }
        }
        
        
        sql = sql +"AND s.`status`> 0 AND s.patient=p.CODE " +
                "ORDER BY czrq DESC ";
       /* sql = sql +"AND s.`status`> 0 AND s.patient=p.CODE " +
                "ORDER BY czrq DESC ";*/
        
        
        sql = sql+" limit " + (page-1)*pageSize+", "+pageSize;
        sql = sql+"ORDER BY czrq DESC limit " + (page-1)*pageSize+", "+pageSize;
        System.out.println("list:"+sql);
        System.out.println("list:"+sql);
        list =  jdbcTemplate.query(sql,new BeanPropertyRowMapper(WlyyPatientDeviceVO.class));
        list =  jdbcTemplate.query(sql,new BeanPropertyRowMapper(WlyyPatientDeviceVO.class));
        return list ;
        return list ;

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

@ -95,6 +95,7 @@ public class SynergyManageService extends BaseJpaService {
                               Integer isMyTask,Integer status,Integer priority,Integer timeout,String workorderCode,
                               Integer isMyTask,Integer status,Integer priority,Integer timeout,String workorderCode,
                               String principal,String serviceStartTime,String serviceEndTime,String patientName,String ssc,String idcard,
                               String principal,String serviceStartTime,String serviceEndTime,String patientName,String ssc,String idcard,
                               Integer userType,Integer isAcceptTask,String userName,String hospitalName,Integer page, Integer pageSize) throws Exception{
                               Integer userType,Integer isAcceptTask,String userName,String hospitalName,Integer page, Integer pageSize) throws Exception{
        String servicerTable = " left join wlyy.manage_synergy_workorder_executor e on e.workorder_code=w.code AND e.del = 1  " ;
        String servicerTable = " left join wlyy.manage_synergy_workorder_executor e on e.workorder_code=w.code AND e.del = 1  " ;
        String whereSql = "";
        String whereSql = "";
        if(userType==3){//客服管理员
        if(userType==3){//客服管理员
@ -171,7 +172,7 @@ public class SynergyManageService extends BaseJpaService {
        }
        }
        //服务对象
        //服务对象
        if(StringUtils.isNotEmpty(patientName)){
        if(StringUtils.isNotEmpty(patientName)){
            whereSql+=" and s.service_patient_name like '%"+patientName+"%' ";
            whereSql+=" and s.service_patient_name like '%"+keywords+"%' ";
        }
        }
        //社保卡号
        //社保卡号
        if(StringUtils.isNotEmpty(ssc)){
        if(StringUtils.isNotEmpty(ssc)){
@ -185,7 +186,6 @@ public class SynergyManageService extends BaseJpaService {
        if(StringUtils.isNotEmpty(userName)){
        if(StringUtils.isNotEmpty(userName)){
            whereSql+=" and w.create_user_name like '%"+userName+"%' ";
            whereSql+=" and w.create_user_name like '%"+userName+"%' ";
        }
        }
        //所属机构
        if(StringUtils.isNotEmpty(hospitalName)){
        if(StringUtils.isNotEmpty(hospitalName)){
            whereSql+=" and w.hospital_name like '%"+hospitalName+"%' ";
            whereSql+=" and w.hospital_name like '%"+hospitalName+"%' ";
        }
        }
@ -242,7 +242,6 @@ public class SynergyManageService extends BaseJpaService {
            map.put("finishedServicerCount",finishedServicerCount);//服务完成人数
            map.put("finishedServicerCount",finishedServicerCount);//服务完成人数
            map.put("userName",one.get("create_user_name"));
            map.put("userName",one.get("create_user_name"));
            map.put("hospitalName",one.get("hospital_name"));
            map.put("hospitalName",one.get("hospital_name"));
            map.put("remark",one.get("remark"));
            resultList.add(map);
            resultList.add(map);
        }
        }
        Map<String,Object> resultMap = new HashMap<>();
        Map<String,Object> resultMap = new HashMap<>();
@ -515,6 +514,8 @@ public class SynergyManageService extends BaseJpaService {
            workorderDO.setReturnedRemark(jsonObject.getString("returnedRemark"));
            workorderDO.setReturnedRemark(jsonObject.getString("returnedRemark"));
            this.sendMessage(workorderDO, null, 26);
            this.sendMessage(workorderDO, null, 26);
        }else if(status == 2){
        }else if(status == 2){
            //设置接收时间
            workorderDO.setReceiverTime(new Date());
            //创建负责人信息
            //创建负责人信息
            List<ManageSynergyWorkorderExecutorDO> list = new ArrayList<>();
            List<ManageSynergyWorkorderExecutorDO> list = new ArrayList<>();
            String manager = jsonObject.getString("manager");
            String manager = jsonObject.getString("manager");
@ -534,17 +535,19 @@ public class SynergyManageService extends BaseJpaService {
            //保存协作者信息
            //保存协作者信息
            String collaborator = jsonObject.getString("collaborator");
            String collaborator = jsonObject.getString("collaborator");
            String[] collaborators = manager.split(",");
            for(String c : collaborators){
                ManageSynergyWorkorderExecutorDO executorDO = new ManageSynergyWorkorderExecutorDO();
                User u = userDao.findByCode(c);
                executorDO.setCode(getCode());
                executorDO.setWorkorderCode(code);
                executorDO.setExecutorType(1);
                executorDO.setExecutorCode(c);
                executorDO.setExecutorName(u.getName());
                executorDO.setDel(1);
                list.add(executorDO);
            if(StringUtils.isNotBlank(collaborator)) {
                String[] collaborators = collaborator.split(",");
                for (String c : collaborators) {
                    ManageSynergyWorkorderExecutorDO executorDO = new ManageSynergyWorkorderExecutorDO();
                    User u = userDao.findByCode(c);
                    executorDO.setCode(getCode());
                    executorDO.setWorkorderCode(code);
                    executorDO.setExecutorType(2);
                    executorDO.setExecutorCode(c);
                    executorDO.setExecutorName(u.getName());
                    executorDO.setDel(1);
                    list.add(executorDO);
                }
            }
            }
            workorderExecutorDao.save(list);
            workorderExecutorDao.save(list);
        }
        }
@ -1127,6 +1130,39 @@ public class SynergyManageService extends BaseJpaService {
        ws.addCell(label);
        ws.addCell(label);
    }
    }
    public List<Map<String,Object>> getDealList(String idcard){
        Patient patient = patientDao.findByIdcard(idcard);
        if (patient==null){
            return null;
        }
        String sql ="SELECT" +
                " s.create_time," +
                " s.service_patient_name," +
                " w.priority," +
                " w.relation_code," +
                " w.relation_code_name," +
                " w.create_user_type," +
                " w.create_user_name," +
                " w.create_user," +
                " w.remark," +
                " w.service_time" +
                " FROM" +
                " `manage_synergy_workorder_servicer` s" +
                " LEFT JOIN manage_synergy_workorder w ON s.workorder_code = w.`code`" +
                " WHERE" +
                " s.service_patient_code = '"+patient.getCode()+"'" +
                " AND s.`status` = 1" +
                " ORDER BY" +
                " s.create_time" +
                " LIMIT 2";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        for (Map<String,Object> map : list){
            int isOver = isServiceOverTime(DateUtil.strToDate(String.valueOf(map.get("service_time")),DateUtil.YYYY_MM_DD_HH_MM_SS));
            map.put("isOver",isOver);
        }
        return list;
    }
    /**
    /**
     *
     *
     * @param workorderCode
     * @param workorderCode

+ 4 - 4
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/device/patientDevice_list.jsp

@ -17,9 +17,9 @@
	<!-- 检索条件 -->
	<!-- 检索条件 -->
	<div class="m-retrieve-area f-h50 f-dn f-pr m-form-inline" data-role-form style='display: block;'>
	<div class="m-retrieve-area f-h50 f-dn f-pr m-form-inline" data-role-form style='display: block;'>
		<div class="m-form-group f-mt10">
		<div class="m-form-group f-mt10">
			<div class="m-form-control f-ml15">
			<%--<div class="m-form-control f-ml15">
				<input type="text" id="inp_hospital_name" placeholder="请输入机构名称" class="f-ml10" data-attr-scan="hospitalName"/>
				<input type="text" id="inp_hospital_name" placeholder="请输入机构名称" class="f-ml10" data-attr-scan="hospitalName"/>
			</div>
			</div>--%>
			<div class="m-form-control f-ml15">
			<div class="m-form-control f-ml15">
				<input type="text" id="inp_device_name" placeholder="请输入设备名称" class="f-ml10" data-attr-scan="deviceName"/>
				<input type="text" id="inp_device_name" placeholder="请输入设备名称" class="f-ml10" data-attr-scan="deviceName"/>
			</div>
			</div>
@ -32,9 +32,9 @@
			<div class="m-form-control f-ml15">
			<div class="m-form-control f-ml15">
				<input type="text" id="inp_user_name" placeholder="请输入居民姓名" class="f-ml10" data-attr-scan="userName"/>
				<input type="text" id="inp_user_name" placeholder="请输入居民姓名" class="f-ml10" data-attr-scan="userName"/>
			</div>
			</div>
			<div class="m-form-control f-ml15">
			<%--<div class="m-form-control f-ml15">
				<input type="text" id="inp_doctor_name" placeholder="请输入医生/健管师姓名" class="f-ml10" data-attr-scan="doctorName"/>
				<input type="text" id="inp_doctor_name" placeholder="请输入医生/健管师姓名" class="f-ml10" data-attr-scan="doctorName"/>
			</div>
			</div>--%>
			<sec:authorize url="/admin/patientDevice/list">
			<sec:authorize url="/admin/patientDevice/list">
				<div id="btn_search" class="l-button u-btn u-btn-primary u-btn-small f-ib f-vam  f-ml10" >
				<div id="btn_search" class="l-button u-btn u-btn-primary u-btn-small f-ib f-vam  f-ml10" >
					<span>查询</span>
					<span>查询</span>

+ 2 - 2
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/device/patientDevice_list_js.jsp

@ -92,9 +92,9 @@
							},
							},
							{display: 'SN码', name: 'deviceSn', width: '10%', align: "left"},
							{display: 'SN码', name: 'deviceSn', width: '10%', align: "left"},
							{display: 'SIM码', name: 'sim', width: '5%', align: "left"},
							{display: 'SIM码', name: 'sim', width: '5%', align: "left"},
                            {display: '社区', name: 'hospitalName', width: '10%', align: "left"},
                           /* {display: '社区', name: 'hospitalName', width: '10%', align: "left"},
                            {display: '医生', name: 'doctorName', width: '5%', align: "left"},
                            {display: '医生', name: 'doctorName', width: '5%', align: "left"},
                            {display: '健管师', name: 'doctorHealthName', width: '5%', align: "left"},
                            {display: '健管师', name: 'doctorHealthName', width: '5%', align: "left"},*/
							{display: '居民姓名', name: 'userName', width: '5%', align: "center"},
							{display: '居民姓名', name: 'userName', width: '5%', align: "center"},
							{
							{
								display: '绑定按键', name: 'userType', width: '5%', align: "center",
								display: '绑定按键', name: 'userType', width: '5%', align: "center",

+ 7 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/survey/SurveyScreenResultService.java

@ -312,9 +312,13 @@ public class SurveyScreenResultService extends BaseService {
            Map<String, Object> map = new HashMap<>();
            Map<String, Object> map = new HashMap<>();
            map.put("question", surveyTemplateQuestions);
            map.put("question", surveyTemplateQuestions);
            String qusCode = surveyTemplateQuestions.getCode();
            String qusCode = surveyTemplateQuestions.getCode();
            for (Map<String, Object> option : optionAnswersList) {
                if (option.get("question_code").equals(qusCode)) {
                    map.put("option", option);
            if (optionAnswersList==null || optionAnswersList.size()==0){
                map.put("option",new HashMap<String,Object>());
            }else {
                for (Map<String, Object> option : optionAnswersList) {
                    if (option.get("question_code").equals(qusCode)) {
                        map.put("option", option);
                    }
                }
                }
            }
            }
            answerMap.put(surveyTemplateQuestions.getSort() + "", map);
            answerMap.put(surveyTemplateQuestions.getSort() + "", map);

+ 0 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/synergy/SynergyManageService.java