ソースを参照

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

trick9191 7 年 前
コミット
4e2e1959b3

+ 2 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionExpressageDao.java

@ -15,4 +15,6 @@ public interface PrescriptionExpressageDao extends PagingAndSortingRepository<Pr
    @Query("from PrescriptionExpressage p where p.mailno=?1")
    PrescriptionExpressage findByPrescriptionExpressMailno(String mailno);
    @Query(" from PrescriptionExpressage p where p.prescriptionCode=?1 and p.del=1")
    PrescriptionExpressage findByPrescriptionCode(String prescriptionCode);
}

+ 19 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java

@ -1,9 +1,5 @@
package com.yihu.wlyy.service.app.prescription;
import com.yihu.wlyy.util.HttpUtil;
import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
import com.yihu.wlyy.wechat.util.WeiXinMessageUtils;
import org.json.JSONObject;
import com.yihu.wlyy.entity.dict.SystemDict;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.doctor.team.admin.AdminTeam;
@ -22,6 +18,7 @@ import com.yihu.wlyy.util.ImUtill;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -67,6 +64,8 @@ public class PrescriptionInfoService extends BaseService {
    private DoctorAdminTeamDao doctorAdminTeamDao;
    @Autowired
    private MessageDao messageDao;
    @Autowired
    private PrescriptionExpressageDao prescriptionExpressageDao;
    private static final Logger logger = LoggerFactory.getLogger(HttpUtil.class);
@ -872,4 +871,20 @@ public class PrescriptionInfoService extends BaseService {
        }
        return new JSONArray(rsList);
    }
    public int distributionHealthDoctor(String codes,String healthDoctor){
        if(StringUtils.isNotBlank(codes)){
            String code[] = codes.split(",");
            for(int i=0;i<code.length;i++){
                Doctor doctor = doctorDao.findByCode(healthDoctor);
                PrescriptionExpressage prescriptionExpressage  = prescriptionExpressageDao.findByPrescriptionCode(code[i]);
                prescriptionExpressage.setExpressageCode(healthDoctor);
                prescriptionExpressage.setExpressageMobile(doctor.getMobile());
                prescriptionExpressage.setExpressageName(doctor.getName());
                prescriptionExpressageDao.save(prescriptionExpressage);
            }
            return 1;
        }
        return 0;
    }
}

+ 18 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionInfoController.java

@ -182,7 +182,7 @@ public class PrescriptionInfoController extends BaseController{
    }
    @RequestMapping(value = "/getHDoctorPrescriptionExpressage", method = RequestMethod.GET)
    @ApiOperation(value = "获取续方订单列表")
    @ApiOperation(value = "获取健康管理师续方订单列表")
    public String getHDoctorPrescriptionExpressage(@RequestParam(required = false) @ApiParam(value = "1:需跟踪;2:已接收", name = "type")  String type,
                                                  @RequestParam(required = false) @ApiParam(value = "患者姓名关键字", name = "nameKey")String nameKey,
                                                  @RequestParam(required = false) @ApiParam(value = "开始时间", name = "startDate")String startDate,
@ -200,7 +200,7 @@ public class PrescriptionInfoController extends BaseController{
    }
    @RequestMapping(value = "/getPrescriptionExpressageFilter", method = RequestMethod.GET)
    @ApiOperation(value = "获取续方订单列表过滤条件")
    @ApiOperation(value = "获取健康管理师续方订单列表过滤条件")
    public String getPrescriptionExpressageFilter(){
        try {
            return write(200, "操作成功!", "data",prescriptionInfoService.getPrescriptionExpressageFilter(getUID()));
@ -221,7 +221,7 @@ public class PrescriptionInfoController extends BaseController{
    }
    @RequestMapping(value = "/getDoctorPrescriptionExpressage", method = RequestMethod.GET)
    @ApiOperation(value = "获取全科医生续方订单列表过滤条件")
    @ApiOperation(value = "获取全科医生续方订单列表")
    public String getDoctorPrescriptionExpressage(@RequestParam(required = false) @ApiParam(value = "团队Code", name = "teamCode")String teamCode,
                                                  @RequestParam(required = false) @ApiParam(value = "居民搜素关键字", name = "nameKey")String nameKey,
                                                  @RequestParam(required = false) @ApiParam(value = "开始时间", name = "startDate")String startDate,
@ -254,7 +254,7 @@ public class PrescriptionInfoController extends BaseController{
    }
    @RequestMapping(value = "/getHospitalListTitle", method = RequestMethod.GET)
    @ApiOperation(value = "获取指定团队未分配建管师订单数目")
    @ApiOperation(value = "获取服务站列表")
    public String getHospitalListTitle(@RequestParam(required = true) @ApiParam(value = "团队Code", name = "teamCode")String teamCode){
        try {
            return write(200, "操作成功!", "data", prescriptionInfoService.getHospitalListTitle(teamCode));
@ -278,8 +278,7 @@ public class PrescriptionInfoController extends BaseController{
    @RequestMapping(value = "/getPrescriptionDurgDict", method = RequestMethod.GET)
    @ApiOperation(value = "获取基卫的药品字典")
    public String getPrescriptionDurgDict(
            @RequestParam(required = true,name = "dictName") @ApiParam(value = "字典名称", name = "dictName",required = true)  String dictName
    ){
            @RequestParam(required = true,name = "dictName") @ApiParam(value = "字典名称", name = "dictName",required = true)  String dictName){
        try {
            return write(200, "操作成功!", "data",jwPrescriptionService.getDictForI(dictName));
        } catch (Exception e) {
@ -287,4 +286,17 @@ public class PrescriptionInfoController extends BaseController{
            return error(-1, "查询失败!");
        }
    }
    @RequestMapping(value = "/distributionHealthDoctor", method = RequestMethod.GET)
    @ApiOperation(value = "配置建管师")
    public String distributionHealthDoctor(@RequestParam(required = true) @ApiParam(value = "续方Code字符串用','分割", name = "codes") String codes,
                                           @RequestParam(required = true) @ApiParam(value = "健康管理师Code", name = "healthDoctor")String healthDoctor){
        try {
            return write(200, "操作成功!", "data",prescriptionInfoService.distributionHealthDoctor( codes, healthDoctor));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
        }
    }
}