Pārlūkot izejas kodu

Merge branch 'master' into 'master'

新增药品计划申请与审核功能

See merge request lighter/web-server!127
huangshuhua 6 mēneši atpakaļ
vecāks
revīzija
47197b31e4

+ 58 - 0
src/main/java/thyyxxk/webserver/controller/medicine/YpPlanController.java

@@ -0,0 +1,58 @@
+package thyyxxk.webserver.controller.medicine;
+
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.medicine.YpPlanDetail;
+import thyyxxk.webserver.entity.medicine.YpPlanInfo;
+import thyyxxk.webserver.service.medicine.YpPlanService;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName YpPlanController
+ * @Author hsh
+ * @Date 2025/2/20 9:19
+ * @Version 1.0
+ * @Description 药品计划申请与审核
+ **/
+@RestController
+@RequestMapping("/ypPlan")
+public class YpPlanController {
+
+    private final YpPlanService service;
+
+    public YpPlanController(YpPlanService service) {
+        this.service = service;
+    }
+
+    @PostMapping("/selectYpPlanInfo")
+    public ResultVo<List<YpPlanInfo>> selectYpPlanInfo(@RequestBody @Validated YpPlanInfo info){
+        return service.selectYpPlanInfo(info);
+    }
+
+    @PostMapping("/selectYpPlanDetail")
+    public ResultVo<List<YpPlanDetail>> selectYpPlanDetail(@RequestBody @Validated YpPlanDetail detail){
+        return service.selectYpPlanDetail(detail);
+    }
+
+    @PostMapping("/selectYpPlanDetailById")
+    public ResultVo<List<YpPlanDetail>> selectYpPlanDetailById(@RequestBody @Validated YpPlanDetail detail){
+        return service.selectYpPlanDetailById(detail);
+    }
+
+    @PostMapping("/saveYpPlanFile")
+    public ResultVo<Map<String, Object>> saveYpPlanFile(@Validated YpPlanInfo info){
+        return service.saveYpPlanFile(info);
+    }
+
+    @PostMapping("/updateYpPlanAuditData")
+    public ResultVo<Map<String, Object>> updateYpPlanAuditData(@RequestBody @Validated YpPlanInfo info){
+        return service.updateYpPlanAuditData(info);
+    }
+
+}

+ 36 - 0
src/main/java/thyyxxk/webserver/dao/his/medicine/YpPlanDetailDao.java

@@ -0,0 +1,36 @@
+package thyyxxk.webserver.dao.his.medicine;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Delete;
+import org.apache.ibatis.annotations.Insert;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import thyyxxk.webserver.entity.medicine.YpPlanDetail;
+
+import java.util.List;
+
+@Mapper
+public interface YpPlanDetailDao extends BaseMapper<YpPlanDetail> {
+
+    @Select(" select * from yp_plan_detail ")
+    List<YpPlanDetail> selectYpPlanDetail(YpPlanDetail detail);
+
+    @Select(" select * from yp_plan_detail where file_id = #{fileId}  ")
+    List<YpPlanDetail> selectYpPlanDetailById(@Param("fileId") String fileId);
+
+    @Delete(" delete from yp_plan_detail where file_id = #{fileId} ")
+    int deleteYpPlanDetailById(@Param("fileId") String fileId);
+
+    @Insert({"<script>" +
+            " insert into yp_plan_detail (file_id, remark, drug_name, specification, pack_retprice, buy_price, amount, manu_name, " +
+            " amount3, amount7, amount14, amount30, amount60, days, buy_amount, unit, buy_fee, content, imp_date) values " +
+            "<foreach collection='list' item='item' separator=','>" +
+            " (#{item.fileId}, #{item.remark}, #{item.drugName}, #{item.specification}, #{item.packRetprice}, #{item.buyPrice}, #{item.amount}, #{item.manuName}, " +
+            " #{item.amount3}, #{item.amount7}, #{item.amount14}, #{item.amount30}, #{item.amount60}, #{item.days}, #{item.buyAmount}, #{item.unit}, #{item.buyFee}, " +
+            " #{item.content}, #{item.impDate})" +
+            "</foreach>" +
+            "</script>"})
+    int insertList(List<YpPlanDetail> list);
+
+}

+ 74 - 0
src/main/java/thyyxxk/webserver/dao/his/medicine/YpPlanInfoDao.java

@@ -0,0 +1,74 @@
+package thyyxxk.webserver.dao.his.medicine;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Delete;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
+import thyyxxk.webserver.entity.medicine.YpPlanInfo;
+
+import java.util.List;
+
+@Mapper
+public interface YpPlanInfoDao extends BaseMapper<YpPlanInfo> {
+
+    @Select("<script>" +
+            " select pl.* from yp_plan_info as pl " +
+            " <where> " +
+            "<if test=\" fileId != null and fileId != '' \">" +
+            " and (pl.file_id like '%${fileId}%' or pl.file_name like '%${fileId}%' ) " +
+            "</if>" +
+            "<if test=\" startTime != null and startTime != '' \">" +
+            " and pl.apply_date &gt;= #{startTime} " +
+            "</if>" +
+            "<if test=\" endTime != null and endTime != '' \">" +
+            " and pl.apply_date &lt;= #{endTime} " +
+            "</if>" +
+            "<if test=\" ztFlag == '1'.toString \">" +
+            " and pl.trial_audit = '1' " +
+            "</if>" +
+            "<if test=\" ztFlag == '2'.toString \">" +
+            " and pl.trial_audit != '1' " +
+            "</if>" +
+            "<if test=\" ztFlag == '3'.toString \">" +
+            " and pl.review_audit = '1' " +
+            "</if>" +
+            "<if test=\" ztFlag == '4'.toString \">" +
+            " and pl.review_audit != '1' " +
+            "</if>" +
+            "<if test=\" ztFlag == '5'.toString \">" +
+            " and pl.final_audit = '1' " +
+            "</if>" +
+            "<if test=\" ztFlag == '6'.toString \">" +
+            " and pl.final_audit != '1' " +
+            "</if>" +
+            " </where> " +
+            " order by pl.apply_date " +
+            "</script>")
+    List<YpPlanInfo> selectYpPlanInfo(YpPlanInfo info);
+
+    @Select(" select * from yp_plan_info where file_id = #{fileId} ")
+    YpPlanInfo selectYpPlanInfoById(@Param("fileId") String fileId);
+
+    @Delete(" delete from yp_plan_info where file_id = #{fileId} ")
+    void deleteYpPlanInfoById(@Param("fileId") String fileId);
+
+    @Update("<script>" +
+            "update yp_plan_info " +
+            "<trim prefix=\"set\" suffixOverrides=\",\">" +
+            "<if test=\"type == 1 \">" +
+            "trial_audit = #{trialAudit}, trial_content = #{trialContent}, trial_id = #{trialId}, trial_name = #{trialName}, " +
+            "</if>" +
+            "<if test=\"type == 2 \">" +
+            "review_audit = #{reviewAudit}, review_content = #{reviewContent}, review_id = #{reviewId}, review_name = #{reviewName},  " +
+            "</if>" +
+            "<if test=\"type == 3 \">" +
+            "final_audit = #{finalAudit}, final_content = #{finalContent}, final_id = #{finalId}, final_name = #{finalName},  " +
+            "</if>" +
+            "</trim>" +
+            "where file_id = #{fileId} " +
+            "</script>")
+    int updateYpPlanAuditById(YpPlanInfo info);
+
+}

+ 45 - 0
src/main/java/thyyxxk/webserver/entity/medicine/YpPlanDetail.java

@@ -0,0 +1,45 @@
+package thyyxxk.webserver.entity.medicine;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @ClassName YpPlanDetail
+ * @Author hsh
+ * @Date 2025/2/20 9:29
+ * @Version 1.0
+ * @Description 药品计划申请与审核的药品明细
+ **/
+@Data
+@TableName(value = "yp_plan_detail")
+public class YpPlanDetail implements Serializable {
+
+    private static final long serialVersionUID = -1L;
+
+    @TableId(value = "file_id", type = IdType.NONE)
+    private String fileId; // 文件id
+    private String remark; // 备注
+    private String drugName; // 药品名称
+    private String specification; //规格
+    private BigDecimal packRetprice; // 零售价
+    private BigDecimal buyPrice; // 购入价
+    private BigDecimal amount; // 库存量
+    private String manuName; // 制药厂
+    private BigDecimal amount3; // 3天用量
+    private BigDecimal amount7; // 7天用量
+    private BigDecimal amount14; // 14天用量
+    private BigDecimal amount30; // 30天用量
+    private BigDecimal amount60; // 60天用量
+    private String days; // 可用天数
+    private BigDecimal buyAmount; // 采购计划
+    private String unit; // 单位
+    private BigDecimal buyFee;// 购入金额
+    private String content; // 主任意见
+    private String impDate; // 导入时间
+
+}

+ 64 - 0
src/main/java/thyyxxk/webserver/entity/medicine/YpPlanInfo.java

@@ -0,0 +1,64 @@
+package thyyxxk.webserver.entity.medicine;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @ClassName YpPlanInfo
+ * @Author hsh
+ * @Date 2025/2/20 9:29
+ * @Version 1.0
+ * @Description 药品计划申请与审核基本信息
+ **/
+@Data
+@TableName(value = "yp_plan_info")
+public class YpPlanInfo implements Serializable {
+
+    private static final long serialVersionUID = -1L;
+    @TableId(value = "file_id", type = IdType.NONE)
+    private String fileId;
+    private String fileName;
+    private String fileType;
+    @TableField(exist = false)
+    private MultipartFile file;
+    // 申请
+    private String applyId;
+    private String applyName;
+    private String applyDate;
+    private String applyContent;
+    // 初审
+    private String trialAudit;
+    private String trialContent;
+    private String trialId;
+    private String trialName;
+    // 复审
+    private String reviewAudit;
+    private String reviewContent;
+    private String reviewId;
+    private String reviewName;
+    // 终审
+    private String finalAudit;
+    private String finalContent;
+    private String finalId;
+    private String finalName;
+
+    private BigDecimal totalFee;
+
+    @TableField(exist = false)
+    private String ztFlag;
+    @TableField(exist = false)
+    private Integer type;
+    @TableField(exist = false)
+    private String content;
+    @TableField(exist = false)
+    private String startTime;
+    @TableField(exist = false)
+    private String endTime;
+}

+ 330 - 0
src/main/java/thyyxxk/webserver/service/medicine/YpPlanService.java

@@ -0,0 +1,330 @@
+package thyyxxk.webserver.service.medicine;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.DateUtil;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.ss.usermodel.WorkbookFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+import thyyxxk.webserver.config.exception.ExceptionEnum;
+import thyyxxk.webserver.dao.his.medicine.YpPlanDetailDao;
+import thyyxxk.webserver.dao.his.medicine.YpPlanInfoDao;
+import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.login.UserInfo;
+import thyyxxk.webserver.entity.medicine.YpPlanDetail;
+import thyyxxk.webserver.entity.medicine.YpPlanInfo;
+import thyyxxk.webserver.service.redislike.RedisLikeService;
+import thyyxxk.webserver.utils.DecimalUtil;
+import thyyxxk.webserver.utils.ResultVoUtil;
+import thyyxxk.webserver.utils.StringUtil;
+import thyyxxk.webserver.utils.TokenUtil;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.math.BigDecimal;
+import java.text.MessageFormat;
+import java.text.SimpleDateFormat;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName YpPlanService
+ * @Author hsh
+ * @Date 2025/2/20 9:21
+ * @Version 1.0
+ * @Description 药品计划申请与审核
+ **/
+@Service
+@Slf4j
+public class YpPlanService {
+
+    private final YpPlanInfoDao infoDao;
+
+    private final YpPlanDetailDao detailDao;
+
+    private final RedisLikeService redis;
+
+    public YpPlanService(YpPlanInfoDao infoDao, YpPlanDetailDao detailDao, RedisLikeService redis) {
+        this.infoDao = infoDao;
+        this.detailDao = detailDao;
+        this.redis = redis;
+    }
+
+    /**
+     * @Description 查询药品申请与审核信息
+     * @Author hsh
+     * @param info 药品申请与审核信息
+     * @return list
+     * @Date 2025/2/21 9:54
+     */
+    public ResultVo<List<YpPlanInfo>> selectYpPlanInfo(YpPlanInfo info){
+        List<YpPlanInfo> list = infoDao.selectYpPlanInfo(info);
+        return ResultVoUtil.success(list);
+    }
+
+    /**
+     * @Description 查询药品申请与审核信息导入明细
+     * @Author hsh
+     * @param detail 药品申请与审核信息导入明细
+     * @return list
+     * @Date 2025/2/21 9:55
+     */
+    public ResultVo<List<YpPlanDetail>> selectYpPlanDetail(YpPlanDetail detail){
+        List<YpPlanDetail> list = detailDao.selectYpPlanDetail(detail);
+        return ResultVoUtil.success(list);
+    }
+
+    public ResultVo<List<YpPlanDetail>> selectYpPlanDetailById(YpPlanDetail detail){
+        List<YpPlanDetail> list = detailDao.selectYpPlanDetailById(detail.getFileId());
+        return ResultVoUtil.success(list);
+    }
+
+    /**
+     * @Description 保存药品申请与审核信息导入明细
+     * @Author hsh
+     * @param info 药品申请与审核信息导入明细
+     * @return map
+     * @Date 2025/2/21 9:57
+     */
+    public ResultVo<Map<String, Object>> saveYpPlanFile(YpPlanInfo info) {
+        Map<String, Object> map = new HashMap<>();
+        String fileId = info.getFileId();
+        String fileName = info.getFileName();
+        MultipartFile file = info.getFile();
+        try {
+            // 解析导入的数据
+            List<YpPlanDetail> list = callYpPlanImportData(fileId, file);
+            if(list.isEmpty()){
+                return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "导入药品申请与审核药品明细为空,请确认!");
+            }
+            // 计算购入总金额
+            BigDecimal totalFee = BigDecimal.ZERO;
+            for(YpPlanDetail d : list){
+                totalFee = DecimalUtil.add(totalFee, d.getBuyAmount());
+            }
+            System.out.println("总金额:" + totalFee);
+            info.setTotalFee(totalFee);
+            UserInfo user = redis.getUserInfoByCode(TokenUtil.getInstance().getTokenUserId());
+            info.setApplyId(user.getCode());
+            info.setApplyName(user.getName());
+            int c = callSavePlanDetail(info, list);
+        } catch (IOException e) {
+            log.info("导入药品计划出错:" + e.getMessage());
+            throw new RuntimeException(e);
+        }
+        return ResultVoUtil.success(map);
+    }
+
+    private static final int BATCH_SIZE = 80;
+
+    private int callSavePlanDetail(YpPlanInfo info, List<YpPlanDetail> list) {
+        YpPlanInfo info1 = infoDao.selectYpPlanInfoById(info.getFileId());
+        if (null != info1) {
+            infoDao.deleteYpPlanInfoById(info.getFileId());
+        }
+        infoDao.insert(info);
+        List<YpPlanDetail> listLs = detailDao.selectYpPlanDetailById(info.getFileId());
+        if (null != listLs && !listLs.isEmpty()) {
+            detailDao.deleteYpPlanDetailById(info.getFileId());
+        }
+        int sum = 0;
+        int cs = (int) Math.ceil((double) list.size() / BATCH_SIZE);
+        for(int i = 0; i < cs; i++ ){
+            int start = i * BATCH_SIZE;
+            int end = Math.min(start + BATCH_SIZE, list.size());
+            List<YpPlanDetail> l = list.subList(start, end);
+            sum = sum + detailDao.insertList(l);
+        }
+        return sum;
+    }
+
+    /**
+     * @Description 药品计划导入数据excel解析
+     * @Author hsh
+     * @param fileId 文件id
+     * @param file 文件
+     * @return list
+     * @Date 2025/2/21 16:19
+     */
+    private List<YpPlanDetail> callYpPlanImportData(String fileId, MultipartFile file) throws IOException {
+        InputStream is = null;
+        Workbook workbook;
+        // 导入数据接收list
+        List<YpPlanDetail> impList = new ArrayList<>();
+        StringBuilder str = new StringBuilder();
+
+        try {
+            is = file.getInputStream();
+            workbook = WorkbookFactory.create(is);
+            // 获取第一个活页数据
+            Sheet sheet = workbook.getSheetAt(0);
+            // 第几行开始解析
+            int rowStart = 2;
+            for (int i = rowStart; i <= sheet.getLastRowNum(); i++) {
+                Row row = sheet.getRow(i);
+                // 第二个药品名称必填
+                if(null == row.getCell(1) || StringUtil.isBlank(row.getCell(1).getStringCellValue())){
+                    continue;
+                }
+                // 获取行所有单元格数据
+                int colNum = row.getPhysicalNumberOfCells();
+                int j = 0;
+                while(j < colNum){
+                    str.append(getCellStringVal(row.getCell(j)).trim()).append("_");
+                    j ++;
+                }
+                YpPlanDetail imp = new YpPlanDetail();
+                String[] stirs = str.toString().split("_");
+                imp.setRemark(stirs[0]);
+                imp.setDrugName(stirs[1]);
+                imp.setSpecification(stirs[2]);
+                if(StringUtil.notBlank(stirs[3])){
+                    imp.setPackRetprice(new BigDecimal(stirs[3]));
+                }
+                if(StringUtil.notBlank(stirs[4])){
+                    imp.setBuyPrice(new BigDecimal(stirs[4]));
+                }
+                if(StringUtil.notBlank(stirs[5])){
+                    imp.setAmount(new BigDecimal(stirs[5]));
+                }
+                imp.setManuName(stirs[6]);
+                if(StringUtil.notBlank(stirs[7])){
+                    imp.setAmount3(new BigDecimal(stirs[7]));
+                }
+                if(StringUtil.notBlank(stirs[8])){
+                    imp.setAmount7(new BigDecimal(stirs[8]));
+                }
+                if(StringUtil.notBlank(stirs[9])){
+                    imp.setAmount14(new BigDecimal(stirs[9]));
+                }
+                if(StringUtil.notBlank(stirs[10])){
+                    imp.setAmount30(new BigDecimal(stirs[10]));
+                }
+                if(StringUtil.notBlank(stirs[11])){
+                    imp.setAmount60(new BigDecimal(stirs[11]));
+                }
+                imp.setDays(stirs[12]);
+                if(StringUtil.notBlank(stirs[13])){
+                    imp.setBuyAmount(new BigDecimal(stirs[13]));
+                }
+                imp.setUnit(stirs[14]);
+                if(null == imp.getBuyPrice() || null == imp.getBuyAmount()){
+                    imp.setBuyFee(BigDecimal.ZERO);
+                } else {
+                    imp.setBuyFee(DecimalUtil.multiply(imp.getBuyPrice(), imp.getBuyAmount()));
+                }
+                if(stirs.length == 17 && StringUtil.notBlank(stirs[16])){
+                    imp.setContent(stirs[16]);
+                }
+                imp.setFileId(fileId);
+                // 常量
+                LocalDateTime now = LocalDateTime.now();
+                DateTimeFormatter sdf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+                imp.setImpDate(now.format(sdf));
+                impList.add(imp);
+                str = new StringBuilder();
+            }
+            workbook.close();
+            is.close();
+        } catch (Exception e) {
+            log.info("导入药品计划出错:" + e.getMessage());
+        } finally {
+            if(is != null){
+                is.close();
+            }
+        }
+
+        return impList;
+    }
+
+    private String getCellStringVal(Cell cell) {
+        String cellType = cell.getCellType().name();
+        switch (cellType) {
+            case "NUMERIC":
+                short format = cell.getCellStyle().getDataFormat();
+                if (DateUtil.isCellDateFormatted(cell)) {
+                    SimpleDateFormat sdf;
+                    if (format == 20 || format == 32) {
+                        sdf = new SimpleDateFormat("HH:mm");
+                    } else if (format == 14 || format == 31 || format == 57 || format == 58) {
+                        // 处理自定义日期格式:m月d日(通过判断单元格的格式id解决,id的值是58)
+                        sdf = new SimpleDateFormat("yyyy-MM-dd");
+                        double value = cell.getNumericCellValue();
+                        Date date = DateUtil.getJavaDate(value);
+                        return sdf.format(date);
+                    } else {
+                        // 日期
+                        sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                    }
+                    return sdf.format(cell.getDateCellValue());
+                }  else {
+                    BigDecimal bd = BigDecimal.valueOf(cell.getNumericCellValue());
+                    // 数值 用BigDecimal包装再获取plainString,可以防止获取到科学计数值
+                    return bd.toPlainString();
+                }
+            case "STRING":
+                return cell.getRichStringCellValue().getString();
+            case "BOOLEAN":
+                return String.valueOf(cell.getBooleanCellValue());
+            case "FORMULA":
+                return cell.getCellFormula();
+            case "ERROR":
+                return String.valueOf(cell.getErrorCellValue());
+            default:
+                return "";
+        }
+    }
+
+    private String formatString(Object... paras) {
+        return MessageFormat.format("{0}|{1}|{2}", paras);
+    }
+
+    /**
+     * @Description 更新药品计划审核状态
+     * @Author hsh
+     * @param info 信息
+     * @return map
+     * @Date 2025/2/26 14:33
+     */
+    public ResultVo<Map<String, Object>> updateYpPlanAuditData(YpPlanInfo info){
+        Map<String, Object> map = new HashMap<>();
+        int type = info.getType();
+        String fileId = info.getFileId();
+        if(StringUtil.isBlank(fileId)){
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "没有找到药品计划审核id,审核失败!");
+        }
+        if(!(type == 1 || type == 2 || type == 3)){
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "不是药品计划审核状态,审核失败!");
+        }
+        UserInfo user = redis.getUserInfoByCode(TokenUtil.getInstance().getTokenUserId());
+        if(type == 1){
+            info.setTrialContent(info.getContent());
+            info.setTrialId(user.getCode());
+            info.setTrialName(user.getName());
+        } else if(type == 2){
+            info.setReviewContent(info.getContent());
+            info.setReviewId(user.getCode());
+            info.setReviewName(user.getName());
+        } else {
+            info.setFinalContent(info.getContent());
+            info.setFinalId(user.getCode());
+            info.setFinalName(user.getName());
+        }
+        int d = infoDao.updateYpPlanAuditById(info);
+        if(d > 0){
+            map.put("cg", "药品计划审核成功!");
+            return ResultVoUtil.success(map);
+        } else {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "药品计划审核失败!");
+        }
+    }
+
+}