Просмотр исходного кода

Merge remote-tracking branch '总库/dev-1.3.8' into dev-1.3.8

trick9191 7 лет назад
Родитель
Сommit
e8d7d3dddd

+ 8 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PatientPrescriptionPayService.java

@ -117,6 +117,8 @@ public class PatientPrescriptionPayService extends BaseService {
    private PrescriptionInfoService infoService;
    @Autowired
    private PushMsgTask pushMsgTask;
    @Autowired
    private PrescriptionDispensaryCodeService codeService;
    /**
     * 长处方配送信息查询接口
@ -742,13 +744,13 @@ public class PatientPrescriptionPayService extends BaseService {
                            message.setCzrq(new Date());
                            messageDao.save(message);
                        }
                        //支付成功发起结算
                        //支付成功生成二维码
                        result = prescriptionCode;
//                        try {
//                            jwPrescriptionService.executeSickSettle(prescriptionCode);
//                        } catch (Exception e) {
//                            e.printStackTrace();
//                        }
                        try {
                            codeService.saveQRCode(prescriptionCode);
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
                    } else if ("1".equals(tradeStatus) || "FAIL".equals(tradeStatus)) {
                        prescriptionPay.setTradeStatus("0");//交易状态 成功1 失败0
                        prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.pay_error.getValue());////续费状态 30支付成功 21支付失败

+ 6 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionDispensaryCodeService.java

@ -119,7 +119,7 @@ public class PrescriptionDispensaryCodeService extends BaseService {
    }
    @Transactional
    public void saveQRCode(String token,String prescriptionCode) throws Exception {
    public void saveQRCode(String prescriptionCode) throws Exception {
        Prescription prescription = prescriptionDao.findByCode(prescriptionCode);
        //取药类型:1 自取 2快递配送 3健管师配送
        Integer type = prescription.getDispensaryType();
@ -127,7 +127,7 @@ public class PrescriptionDispensaryCodeService extends BaseService {
        PrescriptionDispensaryCode p1 = prescriptionDispensaryCodeDao.findByPrescriptionCodeAndIsUseAndType(prescriptionCode,0,1);
        if(p1==null){
            p1 = savePatientQRCode(token,prescriptionCode);
            p1 = savePatientQRCode(prescriptionCode);
        }
        if(p1==null){
            throw new Exception("二维码生成失败!");
@ -136,7 +136,7 @@ public class PrescriptionDispensaryCodeService extends BaseService {
            PrescriptionDispensaryCode p2 = prescriptionDispensaryCodeDao.findByPrescriptionCodeAndIsUseAndType(prescriptionCode,0,2);
            if(p2==null){
                p2 = saveQRCode(p1.getCode(),token,prescriptionCode,2);
                p2 = saveQRCode(p1.getCode(),prescriptionCode,2);
            }
            if(p2==null){
                throw new Exception("二维码生成失败!");
@ -144,7 +144,7 @@ public class PrescriptionDispensaryCodeService extends BaseService {
            PrescriptionDispensaryCode p3 = prescriptionDispensaryCodeDao.findByPrescriptionCodeAndIsUseAndType(prescriptionCode,0,3);
            if(p3==null){
                p3 = saveQRCode(p1.getCode(),token,prescriptionCode,3);
                p3 = saveQRCode(p1.getCode(),prescriptionCode,3);
            }
            if(p3==null){
                throw new Exception("二维码生成失败!");
@ -154,7 +154,7 @@ public class PrescriptionDispensaryCodeService extends BaseService {
    //生成居民端取药码
    @Transactional
    public PrescriptionDispensaryCode savePatientQRCode(String token,String prescriptionCode) throws Exception {
    public PrescriptionDispensaryCode savePatientQRCode(String prescriptionCode) throws Exception {
        //获取年月日8位数
        Calendar cal  = Calendar.getInstance();
        String year = String.valueOf(cal.get(Calendar.YEAR));
@ -192,7 +192,7 @@ public class PrescriptionDispensaryCodeService extends BaseService {
    //生成配送员(健管师)(2、取药码  2、配送码)
    @Transactional
    public PrescriptionDispensaryCode saveQRCode(String code,String token,String prescriptionCode,Integer type) throws Exception {
    public PrescriptionDispensaryCode saveQRCode(String code,String prescriptionCode,Integer type) throws Exception {
        String jgsCode= "";
        synchronized (obj2){
            boolean bl = true;

+ 4 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionController.java

@ -53,7 +53,7 @@ public class PatientPrescriptionController extends WeixinBaseController {
            @ApiParam(required = true, name = "prescriptionCode", value = "处方code") @RequestParam(value = "prescriptionCode", required = true) String prescriptionCode) {
        try {
            prescriptionDispensaryCodeService.saveQRCode(getAccessToken(), prescriptionCode);
            prescriptionDispensaryCodeService.saveQRCode(prescriptionCode);
            return write(200, "生成二维码成功!");
        } catch (Exception e) {
            error(e);
@ -75,7 +75,7 @@ public class PatientPrescriptionController extends WeixinBaseController {
//        String token = getAccessToken();
        try {
            PrescriptionDispensaryCode prescriptionDispensaryCode = prescriptionDispensaryCodeService.savePatientQRCode(getAccessToken(), prescriptionCode);
            PrescriptionDispensaryCode prescriptionDispensaryCode = prescriptionDispensaryCodeService.savePatientQRCode(prescriptionCode);
            if (prescriptionDispensaryCode == null) {
                return error(-1, "生成居民取药码失败!");
            } else {
@ -100,7 +100,7 @@ public class PatientPrescriptionController extends WeixinBaseController {
            @RequestParam(value = "code", required = true) String code) {
        try {
            PrescriptionDispensaryCode prescriptionDispensaryCode = prescriptionDispensaryCodeService.saveQRCode(code, getAccessToken(), prescriptionCode, 2);
            PrescriptionDispensaryCode prescriptionDispensaryCode = prescriptionDispensaryCodeService.saveQRCode(code,prescriptionCode, 2);
            if (prescriptionDispensaryCode == null) {
                return error(-1, "生成配送员取药码失败!");
            } else {
@ -126,7 +126,7 @@ public class PatientPrescriptionController extends WeixinBaseController {
            @RequestParam(value = "code", required = true) String code) {
        try {
            PrescriptionDispensaryCode prescriptionDispensaryCode = prescriptionDispensaryCodeService.saveQRCode(code, getAccessToken(), prescriptionCode, 3);
            PrescriptionDispensaryCode prescriptionDispensaryCode = prescriptionDispensaryCodeService.saveQRCode(code,prescriptionCode, 3);
            if (prescriptionDispensaryCode == null) {
                return error(-1, "生成配送员配送码失败!");
            } else {