فهرست منبع

删除PC版本的项目

chenweida 8 سال پیش
والد
کامیت
34bc578504

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

@ -44,12 +44,11 @@ public class PrescriptionExpressageService {
     *
     * @param code     编码code
     * @param userCode
     * @param type     1是医生  2是患者
     * @return 返回取药码或者配送码的类型  1 居民取药码 2 配送员(健管师)取药码 3 配送员(健管师)配送码
     * 前端根据这个类型去跳转
     */
    @Transactional
    public Integer expressage(String code, String userCode, Integer type) throws Exception {
    public Integer expressage(String code, String userCode) throws Exception {
        Integer returnStatus = -1;
        //获取根据wlyy_prescription_dispensary_code的code处方编码
        PrescriptionDispensaryCode prescriptionDispensaryCode = prescriptionDispensaryCodeDao.finByCode(code);
@ -65,11 +64,25 @@ public class PrescriptionExpressageService {
            prescriptionLog.setUserCode(userCode);
            prescriptionLog.setUserType(2);
            prescriptionLog.setStatus(PrescriptionLog.PrescriptionLogStatus.expressageing_error.getValue());
            prescriptionLog.setRemark("配送失败,处方编码不存在");
            prescriptionLog.setRemark("编码不存在");
            prescriptionLogDao.save(prescriptionLog);
            return returnStatus;
        }
        if(prescriptionDispensaryCode.getIsUse()==1){
            //判断编码是否使用过
            PrescriptionLog prescriptionLog = new PrescriptionLog();
            prescriptionLog.setCode(UUID.randomUUID().toString());
            prescriptionLog.setPrescriptionCode(prescriptionDispensaryCode.getPrescriptionCode());
            prescriptionLog.setCreateTime(new Date());
            prescriptionLog.setType(PrescriptionLog.PrescriptionLogType.expressage.getValue());
            prescriptionLog.setFlag(1);
            prescriptionLog.setUserCode(userCode);
            prescriptionLog.setUserType(2);
            prescriptionLog.setStatus(PrescriptionLog.PrescriptionLogStatus.expressageing_error.getValue());
            prescriptionLog.setRemark("编码重复扫描");
            prescriptionLogDao.save(prescriptionLog);
            return returnStatus;
        }
        switch (prescriptionDispensaryCode.getType()) {
            case 1: {
                //判断是1 居民取药码

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

@ -95,7 +95,7 @@ public class PrescriptionCodeController extends BaseController {
    public String expressage(
            @ApiParam(required = true, name = "code", value = " 二维码code") @RequestParam(value = "code", required = true) String code) {
        try {
            Integer status = prescriptionExpressageService.expressage(code, getUID(), 1);
            Integer status = prescriptionExpressageService.expressage(code, getUID());
            if (status == -1) {
                return error(-1, "取药码错误");
            }