Forráskód Böngészése

Merge branch 'dev' of yeshijie/patient-co-management into dev

trick9191 7 éve
szülő
commit
860dd8ac19

+ 2 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/prescription/PrescriptionService.java

@ -17,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.HashMap;
@ -27,6 +28,7 @@ import java.util.Map;
 * Created by yeshijie on 2017/8/3.
 */
@Service
@Transactional
public class PrescriptionService extends ZysoftBaseService{
    private static Logger logger = LoggerFactory.getLogger(PrescriptionService.class);

+ 9 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/message/Message.java

@ -47,6 +47,7 @@ public class Message extends IdEntity {
	private String tzCode;//体征code
	private Integer sex;//患者性别
	private String relationCode;//业务关联code,type=6时为咨询code
	private String prescriptionStatus;//续方审核状态 0待审核,1审核通过,2审核失败
	public String getCode() {
		return code;
@ -292,4 +293,12 @@ public class Message extends IdEntity {
	public void setRelationCode(String relationCode) {
		this.relationCode = relationCode;
	}
	public String getPrescriptionStatus() {
		return prescriptionStatus;
	}
	public void setPrescriptionStatus(String prescriptionStatus) {
		this.prescriptionStatus = prescriptionStatus;
	}
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/message/MessageDao.java

@ -61,7 +61,7 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Query("select a from Message a where a.receiver = ?1 and a.type not in (1,2,6)")
    List<Message> getSystemMessage(String doctor,Pageable pageRequest);
    @Query("select a from Message a where a.receiver = ?1 and a.type=6")
    @Query("select a from Message a where a.receiver = ?1 and a.type=6 and a.prescriptionStatus='0' ")
    List<Message> getPrescriptionMessage(String doctor,Pageable pageRequest);
    @Query("select count(a) from Message a where a.read = 0 and a.over ='0'  and a.receiver=?1 and a.type=?2 ")

+ 5 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java

@ -34,7 +34,10 @@ import com.yihu.wlyy.service.app.health.PatientHealthGuidanceService;
import com.yihu.wlyy.service.app.prescription.PrescriptionLogService;
import com.yihu.wlyy.service.app.talk.TalkGroupService;
import com.yihu.wlyy.task.PushMsgTask;
import com.yihu.wlyy.util.*;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.HttpClientUtil;
import com.yihu.wlyy.util.ImUtill;
import com.yihu.wlyy.util.MessageType;
import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
import com.yihu.wlyy.wechat.util.WeiXinOpenIdUtils;
import org.apache.commons.lang3.StringUtils;
@ -996,6 +999,7 @@ public class ConsultTeamService extends ConsultService {
        message.setReadonly(1);//是否只读消息
        message.setDel("1");
        message.setRelationCode(prescription.getConsult());
        message.setPrescriptionStatus("0");
        messageDao.save(message);
    }