Ver código fonte

处方状态变更

zdm 6 anos atrás
pai
commit
e210669778

+ 13 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -338,4 +338,17 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    }
    /**
     *
     * @return
     */
    public boolean updatePrescriptionByHisStatu(String admNo,String realOrder,String status)throws Exception{
        //TODO 状态需要再判断
        String sql="UPDATE base.wlyy_prescription p SET p.`status`='',p.pay_status='' WHERE p.adm_no='"+admNo+"' AND p.real_order='"+realOrder+"' ";
        jdbcTemplate.execute(sql);
        return true;
    }
}

+ 46 - 0
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/third/PrescriptionUpdateController.java

@ -0,0 +1,46 @@
package com.yihu.jw.entrance.controller.third;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
 * Created by zdm on 2019/5/30.
 */
@RestController
@RequestMapping(value ="/prescriptionUpdate")
@Api(value = "处方状态变更", description = "处方状态变更", tags = {"hospital-entrance处方状态变更"})
public class PrescriptionUpdateController extends EnvelopRestEndpoint {
    @Autowired
    private PrescriptionService prescriptionService;
    @GetMapping(value = "/preUpdate")
    @ApiOperation(value = "药房配药his提示处方变更")
    public ObjEnvelop prescriptionUpdate(
            @ApiParam(name = "admNo", value = "卡号", required = true)
            @RequestParam(value = "admNo") String admNo,
            @ApiParam(name = "realOrder", value = "处方号", required = true)
            @RequestParam(value = "realOrder") String realOrder,
            @ApiParam(name = "status", value = "处方状态", required = true)
            @RequestParam(value = "status") String status) {
        try {
            boolean obj= prescriptionService.updatePrescriptionByHisStatu(admNo,realOrder,status);
            return ObjEnvelop.getSuccess("更新成功",obj);
        } catch (Exception e) {
            e.printStackTrace();
            return ObjEnvelop.getError("更新失败"+e.getMessage());
        }
    }
}