소스 검색

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

zd_123 6 년 전
부모
커밋
e62865e03d

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

+ 6 - 6
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 Date createTime;//添加时间
    private String workorderCode;//系统服务工单code
    private String servicePatientCode;//协同服务对象code
    private String workorderServiceCode;//协同服务对象code
    private String createUserCode;//创建人(客服)code
    private String createUserName;//创建人(客服)名称
    private String callCode;//通话记录code
@ -49,13 +49,13 @@ public class ManageSynergyWorkorderCustomerLogDO extends IdEntity {
        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 = "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 Date createTime;//创建时间
    private String workorderCode;//协同服务工单code
    private String servicePatientCode;//协同服务对象code
    private String workorderServiceCode;//协同服务对象code
    private String callCode;//通话记录code
    @Column(name = "code")
@ -197,15 +197,16 @@ public class ManageSynergyWorkorderReserveConsultDO extends IdEntity {
        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")
    public String getCallCode() {
        return callCode;

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

@ -24,7 +24,7 @@ public class ManageSynergyWorkorderServicerLogDO extends IdEntity {
    private String remark;//备注
    private Date createTime;//添加时间
    private String workorderCode;//系统服务工单code
    private String servicePatientCode;//协同服务对象code
    private String workorderServiceCode;//协同服务对象code
    private String createUserCode;//创建人(客服)code
    private String createUserName;//创建人(客服)名称
    private String callCode;//通话记录code
@ -110,13 +110,13 @@ public class ManageSynergyWorkorderServicerLogDO extends IdEntity {
        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 = "create_user_code")

+ 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> {
    @Query("select count(distinct l.callCode) from ManageSynergyWorkorderCustomerLogDO l where l.servicePatientCode=?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")
    Integer findExceptionCount(String workorderCode, String customerCode);

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

@ -9,9 +9,9 @@ import org.springframework.data.repository.PagingAndSortingRepository;
 */
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);
    @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);
}

+ 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{
        
        List<WlyyPatientDeviceVO> list = new ArrayList<>();
        String sql  = "SELECT s.patient," +
        /*String sql  = "SELECT s.patient," +
                "d.id as id," +
                "d.device_id as deviceId," +
                "d.user as user," +
@ -152,7 +152,12 @@ public class WlyyPatientDeviceService extends BaseJpaService<WlyyPatientDevice,W
                "wlyy_sign_family s," +
                "wlyy_patient_device d," +
                "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)){
            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 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);
        list =  jdbcTemplate.query(sql,new BeanPropertyRowMapper(WlyyPatientDeviceVO.class));
        return list ;

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

@ -413,7 +413,7 @@ public class SynergyManageService extends BaseJpaService {
            whereSql+= " and ( "+labelSql.substring(3)+" )";
        }
        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 ";
        }
        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 " +
@ -421,7 +421,7 @@ public class SynergyManageService extends BaseJpaService {
                " from manage_synergy_workorder_servicer s " +
                " 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_customer_log l on l.service_patient_code=s.service_patient_code " +
                " LEFT JOIN manage_synergy_workorder_customer_log l on l.workorder_service_code = s.code " +
                " where s.status=1  and s.workorderCode='"+workorderCode+"' " +
                " and w.del=1 and w.status=2 and e.del=1 "+
                whereSql+" order by l.id desc";

+ 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-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"/>
			</div>
			</div>--%>
			<div class="m-form-control f-ml15">
				<input type="text" id="inp_device_name" placeholder="请输入设备名称" class="f-ml10" data-attr-scan="deviceName"/>
			</div>
@ -32,9 +32,9 @@
			<div class="m-form-control f-ml15">
				<input type="text" id="inp_user_name" placeholder="请输入居民姓名" class="f-ml10" data-attr-scan="userName"/>
			</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"/>
			</div>
			</div>--%>
			<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" >
					<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: '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: 'doctorHealthName', width: '5%', align: "left"},
                            {display: '健管师', name: 'doctorHealthName', width: '5%', align: "left"},*/
							{display: '居民姓名', name: 'userName', width: '5%', align: "center"},
							{
								display: '绑定按键', name: 'userType', width: '5%', align: "center",