Browse Source

更新修改

chenweida 8 years ago
parent
commit
bb956f54ca

+ 1 - 1
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/ZysoftBaseService.java

@ -65,7 +65,7 @@ public class ZysoftBaseService {
    public Result addZyPushLog(String request, String api, String content, String error, String method, String status, String type,String errMsg){
        Result re = null;
        if(errMsg==null){
            re = Result.success("接收线下处方调整完成消息成功");
            re = Result.success(content);
        }else {
            re = Result.error(-1,errMsg);
        }

+ 10 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/DoctorInfoService.java

@ -1543,13 +1543,18 @@ public class DoctorInfoService extends BaseService {
    }
    @Transactional
    public void cancelAuthentication(String doctorCode) throws Exception{
    public boolean cancelAuthentication(String doctorCode) throws Exception{
        Doctor doctor = doctorDao.findByCode(doctorCode);
        doctor.setCheckPassword("");
        doctor.setIscertified(0);
        doctor.setCertifiedOvertime(null);
        doctorDao.save(doctor);
        boolean b = updateAuthenticationPassword(doctor.getIdcard(),doctor.getCheckPassword(),"11111111",doctorCode);
        if(b){
            doctor.setCheckPassword("");
            doctor.setIscertified(0);
            doctor.setCertifiedOvertime(null);
            doctorDao.save(doctor);
        }
        return b;
    }

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionDiagnosisService.java

@ -50,8 +50,8 @@ public class PrescriptionDiagnosisService extends BaseService{
                    if(list!=null&&list.size()>0){
                        for (PrescriptionDiagnosis diagnosis:list){
                            JSONObject json = new JSONObject();
                            json.put("code",diagnosis.getCode());//疾病代码
                            json.put("name",diagnosis.getName());//疾病名称
                            json.put("code",diagnosis.getHealthProblem());//疾病代码
                            json.put("name",diagnosis.getHealthProblemName());//疾病名称
                            jsonArray.add(json);
                        }
                        re = jsonArray.toString();

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionService.java

@ -102,7 +102,7 @@ public class PrescriptionService extends BaseService {
            }else if(prescription.getDispensaryType()==3){
                //健管师配送
                PrescriptionExpressage expressage = prescriptionExpressageDao.findByPrescriptionCode(code);
                if(StringUtils.isEmpty(expressage.getExpressageCode())){
                if(StringUtils.isNotBlank(expressage.getExpressageCode())){
                    String content = "您有一条新的续方订单待取药!";
                    Message message = new Message();
                    message.setCzrq(new Date());

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/PCLoginController.java

@ -75,7 +75,7 @@ public class PCLoginController extends BaseController {
     * @param password 密码
     * @return
     */
    @RequestMapping(value = "doctor",method = RequestMethod.POST)
    @RequestMapping(value = "doctor",method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ResponseBody
    public String doctor(@ApiParam(required = false, name = "mobile", value = "手机号") @RequestParam(required = false,value = "mobile") String mobile,
                         @ApiParam(required = false, name = "captcha", value = "短信验证码") @RequestParam(required = false) String captcha,

+ 16 - 12
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/account/DoctorController.java

@ -1856,7 +1856,7 @@ public class DoctorController extends BaseController {
        try {
//            Doctor doctor = doctorInfoService.findDoctorByCode(getRepUID());
            JSONObject data = doctorInfoService.getCAPastDue(getRepUID(),new JSONObject());
            JSONObject data = doctorInfoService.getCAPastDue(getUID(),new JSONObject());
            return write(200, "获取信息成功!", "data", data);
        }catch (Exception e) {
            error(e);
@ -1873,7 +1873,7 @@ public class DoctorController extends BaseController {
    public String isAuthentication(){
        try {
            //0de6a26a62dd11e69faffa163e8aee56
            JSONObject data = doctorInfoService.isAuthentication(getRepUID());
            JSONObject data = doctorInfoService.isAuthentication(getUID());
            return write(200, "获取信息成功!", "data", data);
        }catch (Exception e) {
            error(e);
@ -1890,8 +1890,8 @@ public class DoctorController extends BaseController {
            @RequestParam(value = "strOldCalledPasswd",required = true) String strOldCalledPasswd,
            @RequestParam(value = "strNewCalledPasswd",required = true) String strNewCalledPasswd){
        try {
            Doctor doctor = doctorInfoService.findDoctorByCode(getRepUID());
            boolean b = doctorInfoService.updateAuthenticationPassword(doctor.getIdcard(),strOldCalledPasswd,strNewCalledPasswd,getRepUID());
            Doctor doctor = doctorInfoService.findDoctorByCode(getUID());
            boolean b = doctorInfoService.updateAuthenticationPassword(doctor.getIdcard(),strOldCalledPasswd,strNewCalledPasswd,getUID());//hxmD201703150222
            if(b){
                return write(200, "修改密码成功!", "data", b);
            }
@ -1911,8 +1911,8 @@ public class DoctorController extends BaseController {
    @RequestMapping(value = "/installAuthenticationPassword", method = RequestMethod.POST)
    public String installAuthenticationPassword(@RequestParam(value = "strNewCalledPasswd",required = true) String strNewCalledPasswd){
        try {
            Doctor doctor = doctorInfoService.findDoctorByCode(getRepUID());
            boolean b = doctorInfoService.updateAuthenticationPassword(doctor.getIdcard(),"11111111",strNewCalledPasswd,getRepUID());
            Doctor doctor = doctorInfoService.findDoctorByCode(getUID());
            boolean b = doctorInfoService.updateAuthenticationPassword(doctor.getIdcard(),"11111111",strNewCalledPasswd,getUID());
            if(b){
                return write(200, "设置密码成功!", "data", b);
            }
@ -1933,8 +1933,8 @@ public class DoctorController extends BaseController {
    @RequestMapping(value = "/resetAuthenticationPassword", method = RequestMethod.POST)
    public String resetAuthenticationPassword(@RequestParam(value = "strNewCalledPasswd",required = true) String strNewCalledPasswd){
        try {
            Doctor doctor = doctorInfoService.findDoctorByCode(getRepUID());
            boolean b = doctorInfoService.updateAuthenticationPassword(doctor.getIdcard(),doctor.getCheckPassword(),strNewCalledPasswd,getRepUID());
            Doctor doctor = doctorInfoService.findDoctorByCode(getUID());
            boolean b = doctorInfoService.updateAuthenticationPassword(doctor.getIdcard(),doctor.getCheckPassword(),strNewCalledPasswd,getUID());
            if(b){
                return write(200, "重置密码成功!", "data", b);
            }
@ -1959,7 +1959,7 @@ public class DoctorController extends BaseController {
            @ApiParam(required = true, name = "prescriptionCode", value = "处方code") @RequestParam(value = "prescriptionCode",required = true) String prescriptionCode){
        try {
            Doctor doctor = doctorInfoService.findDoctorByCode(getRepUID());
            Doctor doctor = doctorInfoService.findDoctorByCode(getUID());
//            JSONObject obj = doctorInfoService.requestRealNameSoftCertAndSign(doctor.getIdcard(),strRealNameSoftCertCalledPasswd,strOriginalData,srcBusinessStreamNO);
            JSONObject jsonObject = doctorInfoService.requestRealNameSoftCertAndSign(doctor.getIdcard(),strRealNameSoftCertCalledPasswd,strOriginalData,prescriptionCode);
//            if(b){
@ -1984,7 +1984,7 @@ public class DoctorController extends BaseController {
            @ApiParam(required = true, name = "certificateNum", value = "证书编号") @RequestParam(value = "certificateNum",required = true) String certificateNum){
        try {
            boolean b = doctorInfoService.checkCertificate(getRepUID(),certificateNum);
            boolean b = doctorInfoService.checkCertificate(getUID(),certificateNum);
            return write(200, "获取信息成功!", "data", b);
        }catch (Exception e) {
            error(e);
@ -2020,8 +2020,12 @@ public class DoctorController extends BaseController {
    public String cancelAuthentication(){
        try {
            doctorInfoService.cancelAuthentication(getRepUID());
            return write(200, "取消认证成功!");
            if(doctorInfoService.cancelAuthentication(getUID())){
                return write(200, "取消认证成功!");
            }else{
                return error(-1, "取消认证失败!");
            }
        }catch (Exception e) {
            error(e);
            return error(-1, "取消认证失败!");

+ 8 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionCodeController.java

@ -124,7 +124,7 @@ public class PrescriptionCodeController extends BaseController{
            @ApiParam(required = true, name = "prescriptionCode", value = "处方code") @RequestParam(value = "prescriptionCode", required = true) String prescriptionCode) {
        try{
            Map<String, Object> map = prescriptionDispensaryCodeService.getQrcode(prescriptionCode,getRepUID(),2);
            Map<String, Object> map = prescriptionDispensaryCodeService.getQrcode(prescriptionCode,getUID(),2);
//            map.put("code", Base64.encode(map.get("code").toString().getBytes()));
            return write(200, "获取配送员取药码成功!", "data", map);
        } catch (Exception e) {
@ -146,9 +146,14 @@ public class PrescriptionCodeController extends BaseController{
            @ApiParam(required = true, name = "prescriptionCode", value = "处方code") @RequestParam(value = "prescriptionCode", required = true) String prescriptionCode) {
        try{
            Map<String, Object> map = prescriptionDispensaryCodeService.getQrcode(prescriptionCode,getRepUID(),3);
            Map<String, Object> map = prescriptionDispensaryCodeService.getQrcode(prescriptionCode,getUID(),3);
//            map.put("code",Base64.encode(map.get("code").toString().getBytes()));
            return write(200, "获取配送员配送码成功!", "data", map);
            if(map!=null&&map.size()>0){
                return write(200, "获取配送员配送码成功!", "data", map);
            }else{
                return error(-1, "获取配送员配送码失败!");
            }
        } catch (Exception e) {
            error(e);
            return error(-1, "获取配送员配送码失败!");