Browse Source

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

yeshijie 7 years ago
parent
commit
0014eee6b2

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jw/JwPrescriptionService.java

@ -265,7 +265,7 @@ public class JwPrescriptionService {
                JSONObject reobj =  JSON.parseObject(response);
                Integer status = reobj.getInteger("status");
                String errmsg = reobj.getString("msg");
                if(0!= status){
                if(-1 == status){
                    throw new Exception("基卫接口(挂号作废)请求失败,"+errmsg);
                }
            }else{

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

@ -8,20 +8,18 @@ import com.yihu.wlyy.entity.patient.prescription.PrescriptionInfo;
import com.yihu.wlyy.entity.patient.prescription.PrescriptionPay;
import com.yihu.wlyy.entity.patient.prescription.*;
import com.yihu.wlyy.service.app.prescription.*;
import com.yihu.wlyy.service.third.jw.JwPrescriptionService;
import com.yihu.wlyy.web.WeixinBaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.axis.encoding.Base64;
import org.json.JSONArray;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.Calendar;
import java.util.List;
import java.util.Map;
import java.util.Random;
/**
 * Created by Administrator on 2017/7/21.
@ -42,6 +40,8 @@ public class PatientPrescriptionController extends WeixinBaseController {
    private PrescriptionPayService prescriptionPayService;
    @Autowired
    private PrescriptionExpressageService prescriptionExpressageService;
    @Autowired
    private JwPrescriptionService jwPrescriptionService;
    /**
     * 生成取药码
@ -252,4 +252,19 @@ public class PatientPrescriptionController extends WeixinBaseController {
        }
    }
    @RequestMapping(value = "/fadeRecipe", method = RequestMethod.POST)
    @ApiOperation(value = "挂号作废处方接口")
    public String fadeRecipe(
            @RequestParam(required = true) @ApiParam(value = "处方code", name = "prescriptionCode") String prescriptionCode){
        try {
            String result = jwPrescriptionService.fadeRecipe(prescriptionCode);
            return write(200, "挂号作废成功!", "result", result);
        } catch (Exception e) {
            error(e);
            return error(-1, "挂号作废失败+"+e.getMessage());
        }
    }
}