Browse Source

bug 修改

chenweida 7 years ago
parent
commit
41cf469729

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

@ -47,6 +47,7 @@ public class PrescriptionExpressageService {
        //获取根据wlyy_prescription_dispensary_code的code处方编码
        PrescriptionDispensaryCode prescriptionDispensaryCode = prescriptionDispensaryCodeDao.finByCode(code);
        if (prescriptionDispensaryCode == null) {
            //保存配送失败的日志
            PrescriptionLog prescriptionLog = new PrescriptionLog();
            prescriptionLog.setCode(UUID.randomUUID().toString());
            prescriptionLog.setPrescriptionCode(prescriptionDispensaryCode.getPrescriptionCode());
@ -61,7 +62,8 @@ public class PrescriptionExpressageService {
        }
        //修改处方状态为完成
        prescriptionDao.updateStatus(prescriptionDispensaryCode.getPrescriptionCode(),100);
        //保存操作日志
        //保存配送成功的日志
        PrescriptionLog prescriptionLog = new PrescriptionLog();
        prescriptionLog.setPrescriptionCode(prescriptionDispensaryCode.getPrescriptionCode());
        prescriptionLog.setCode(UUID.randomUUID().toString());

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

@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value = "/doctor/prescriptionInfo")
@Api("医生端-长处方接口")
public class PrescriptionInfoController extends BaseController{
public class PrescriptionInfoController extends BaseController {
    @Autowired
    private PrescriptionInfoService prescriptionInfoService;
@ -39,7 +39,10 @@ public class PrescriptionInfoController extends BaseController{
            @RequestParam(required = true) @ApiParam(value = "wlyy_prescription_dispensary_code的code", name = "code") String code) {
        try {
            prescriptionExpressageService.expressage(code,getUID());
            Integer status = prescriptionExpressageService.expressage(code, getUID());
            if (status == -1) {
                return error(-1, "编码不存在");
            }
            return write(200, "配送成功");
        } catch (Exception e) {
            return error(-1, "失败");