Bläddra i källkod

新冠疫苗新增添加疫苗和产品的功能。

xiaochan 4 år sedan
förälder
incheckning
d34d332862

+ 56 - 6
src/main/java/thyyxxk/webserver/controller/querydata/CovidVaccinateAppointmentController.java

@@ -1,12 +1,15 @@
 package thyyxxk.webserver.controller.querydata;
 
 
+import oracle.ucp.proxy.annotation.Post;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.querydata.CovidVaccinateAppointment;
+import thyyxxk.webserver.entity.querydata.CovidVaccinateFactory;
 import thyyxxk.webserver.entity.querydata.CovidVaccinateThreshold;
+import thyyxxk.webserver.entity.querydata.ZdCovidVaccinate;
 import thyyxxk.webserver.service.querydata.CovidVaccinateAppointmentService;
 import javax.servlet.http.HttpServletResponse;
 import java.text.ParseException;
@@ -38,20 +41,67 @@ public class CovidVaccinateAppointmentController {
     }
 
     @GetMapping("/queryCount")
-    public ResultVo<List<CovidVaccinateThreshold>> queryCount() throws ParseException {
+    public ResultVo<List<CovidVaccinateFactory>> queryCount() throws ParseException {
         return server.queryCount();
     }
 
-    @GetMapping("/update")
-    public ResultVo<Boolean> update(@RequestParam("value")int value,
-                                    @RequestParam("date") Date limitDate,
-                                    @RequestParam("newValue") int newValue){
-        return server.update(value,limitDate,newValue);
+    @GetMapping("/queryChangJiaDuiYingDeYuZhi")
+    public ResultVo<List<CovidVaccinateThreshold>> queryChangJiaDuiYingDeYuZhi(@RequestParam("code") Integer code)
+            throws ParseException {
+        return server.queryChangJiaDuiYingDeYuZhi(code);
+    }
+
+    @GetMapping("/xiuGaiYuZhi")
+    public ResultVo<Boolean> xiuGaiYuZhi(@RequestParam("id")int id,
+                                    @RequestParam("value")int value){
+        return server.xiuGaiYuZhi(id,value);
     }
     @PostMapping("/exportExcel")
     public void exportExcel(HttpServletResponse response,
                             @RequestBody @Validated CovidVaccinateAppointment param) {
         server.exportExcel(response,param);
     }
+
+    @PostMapping("/xinZengYiMiao")
+    public ResultVo<Integer> xinZengYiMiao(@RequestBody ZdCovidVaccinate param){
+            return server.xinZengYiMiao(param);
+    }
+
+    @PostMapping("/xinZengChangJia")
+    public ResultVo<Boolean> xinZengChangJia(@RequestBody List<CovidVaccinateFactory> param){
+        return server.xinZengChangJia(param);
+    }
+
+    @GetMapping("/chaKanYiMiao")
+    public ResultVo<List<ZdCovidVaccinate>> chaKanYiMiao(){
+        return server.chaKanYiMiao();
+    }
+
+    @GetMapping("/chaKanChangJia")
+    public ResultVo<List<CovidVaccinateFactory>> chaKanChangJia(@RequestParam("id") int id){
+        return server.chaKanChangJia(id);
+    }
+
+    @PostMapping("/xiuGaiYiMiao")
+    public ResultVo<Boolean> xiuGaiYiMiao(@RequestBody ZdCovidVaccinate param){
+        return server.xiuGaiYiMiao(param);
+    }
+
+    @PostMapping("/xiuGaiChangJia")
+    public ResultVo<Boolean> xiuGaiChangJia(@RequestBody CovidVaccinateFactory param){
+        return server.xiuGaiChangJia(param);
+    }
+
+    @GetMapping("/shanChuChangJia")
+    public ResultVo<Boolean> shanChuChangJia(@RequestParam("code") Integer code){
+        return  server.shanChuChangJia(code);
+    }
+
+    @PostMapping("/yiJianXiuGaiRiQi")
+    public ResultVo<Boolean> yiJianXiuGaiRiQi(@RequestBody List<CovidVaccinateThreshold> list){
+        return server.yiJianXiuGaiRiQi(list);
+    }
+
+
 }
 

+ 2 - 5
src/main/java/thyyxxk/webserver/dao/his/datamodify/YzTemperatureMapper.java

@@ -1,6 +1,5 @@
 package thyyxxk.webserver.dao.his.datamodify;
 
-import org.apache.ibatis.annotations.Delete;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Select;
 import org.apache.ibatis.annotations.Update;
@@ -96,7 +95,7 @@ public interface YzTemperatureMapper {
 
     /**
      * 更新 剩下的地方 主要是更新 病室和 修改人 修改时间
-     * */
+     * @param param  科室 修改人 修改时间 */
     @Update("<script>" +
             "update yz_temperature set modify_userid=#{modifyUserid},modify_time=#{modifyTime}" +
             "<if test=\"ward!=null\">" +
@@ -106,7 +105,5 @@ public interface YzTemperatureMapper {
             "inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} and scd_flag='0' " +
             "and rec_date=#{toStringRecDate} and rec_time=#{toStringRecTime} and detail_no=#{detailNo}" +
             "</script>")
-    Boolean teperatureBody(YzTemperature param);
-
-
+    void teperatureBody(YzTemperature param);
 }

+ 104 - 4
src/main/java/thyyxxk/webserver/dao/his/querydata/CovidVaccinateAppointmentMapper.java

@@ -4,8 +4,11 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Constants;
 import org.apache.ibatis.annotations.*;
+import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.querydata.CovidVaccinateAppointment;
+import thyyxxk.webserver.entity.querydata.CovidVaccinateFactory;
 import thyyxxk.webserver.entity.querydata.CovidVaccinateThreshold;
+import thyyxxk.webserver.entity.querydata.ZdCovidVaccinate;
 
 import java.util.Date;
 import java.util.List;
@@ -47,12 +50,12 @@ public interface CovidVaccinateAppointmentMapper {
 
     /**
      * 设置新冠疫苗每日预约的人数限制
-     * @param date 设置限制的日期
+     * @param id 收到显示的id
      * @param value 设置预约的具体人数
      * @return 返回
      * */
-    @Update("update t_covid_vaccinate_threshold set value = #{value} where date=#{date}")
-    Boolean update(@Param("value")int value, @Param("date")String date);
+    @Update("update t_covid_vaccinate_threshold_new set value = #{value} where id=#{id}")
+    Boolean xiuGaiYuZhi(@Param("id")int id, @Param("value")int value);
 
     /**
      * 使用了MyBatis-Plus 来查询并分页 新冠疫苗的人数
@@ -62,10 +65,107 @@ public interface CovidVaccinateAppointmentMapper {
      * */
     @Select("select patient_id,a.name,sex, " +
             "phone,social_no,age,corp_name, " +
-            "job_category_to_string=(b.name),execute_date from t_covid_vaccinate_appointment a " +
+            "job_category_to_string=(b.name),execute_date,vaccinate_code,vaccinate_name,vaccinate_factory " +
+            "from t_covid_vaccinate_appointment a " +
             "inner join t_covid_appointment_job_category_dict b on (b.id = job_category) ${ew.customSqlSegment} and " +
             "isnull(del_flag,0)=0")
     IPage<CovidVaccinateAppointment> mybatisPlusQueryXGYM(IPage<CovidVaccinateAppointment> page,
                                                           @Param(Constants.WRAPPER) Wrapper<CovidVaccinateAppointment> queryWrapper);
 
+    /**
+     * 新增疫苗种类
+     * @param param name:疫苗名字 enableFlag:是否可以预约 bookTip:描述
+     * @return 返回状态
+     * */
+    @Insert("insert into t_zd_covid_vaccinate (name,enable_flag,book_tip) values (#{name},#{enableFlag},#{bookTip})")
+    @Options(useGeneratedKeys = true,keyColumn = "id" , keyProperty = "id")
+    Integer xinZengYiMiao(ZdCovidVaccinate param);
+
+
+    /**
+     * 插入对应的 疫苗的厂家
+     * @param param 需要插入的字段有 code主键不允许重复 vaccinateId:对应的疫苗
+     *              specification:规格 price:金额,name;名字,enableFlag:是否允许预约
+     * */
+    @Insert("insert into t_covid_vaccinate_factory (code, vaccinate_id, specification, price, name,enable_flag) " +
+            "values (#{code},#{vaccinateId},#{specification},#{price},#{name},#{enableFlag})")
+    void xinZengChangJia(CovidVaccinateFactory param);
+
+    /**
+     * 查询全部的疫苗名称
+     * @return 返回全部的数据
+     * */
+    @Select("select * from t_zd_covid_vaccinate")
+    List<ZdCovidVaccinate> chaKanYiMiao();
+
+    /**
+     * 查询全部的疫苗名称
+     * @param id 对应的疫苗
+     * @return 对应的数据
+     * */
+    @Select("select * from t_covid_vaccinate_factory where vaccinate_id=#{id}")
+    List<CovidVaccinateFactory> chaKanChangJia(@Param("id") Integer id);
+
+    /**
+     * 查询厂家编码是否有重复的
+     * @param code 通过code查找
+     * @return 返回一条
+     * */
+    @Select("select vaccinate_id from t_covid_vaccinate_factory where code=#{code}")
+    Integer changJiaCodePanDuan(@Param("code") Integer code);
+
+    /**
+     * 根据id来修改 疫苗的一些字段
+     * @param param 修改的字段为 name  enableFlag bookTip 通过id来修改
+     * */
+    @Update("update t_zd_covid_vaccinate set name=#{name},enable_flag=#{enableFlag},book_tip=#{bookTip} where id=#{id}")
+    Boolean xiuGaiYiMiao(ZdCovidVaccinate param);
+
+
+    /**
+     * 根据code来修改厂家
+     * @param param  根据code来修改 能修改的值为
+     * @return 返回boolean
+     * */
+    @Update("update t_covid_vaccinate_factory set specification=#{specification},price=#{price}," +
+            "name=#{name},enable_flag=#{enableFlag} where code =#{code}")
+    Boolean xiuGaiChangJia(CovidVaccinateFactory param);
+
+
+    /**
+     * 删除厂家 根据code来删除
+     * @param code  删除条件
+     * */
+    @Delete("delete t_covid_vaccinate_factory where code=#{code}")
+    Boolean shanChuChangJia(@Param("code") Integer code);
+
+    /**
+     *查看可以预约 新冠疫苗厂家的信息
+     * @return 返回一个list的集合
+     * */
+    @Select("select code,name from t_covid_vaccinate_factory where enable_flag =1")
+    List<CovidVaccinateFactory> kaiQiYuYueChangJia();
+
+    /**
+     * 查看厂家的code 和 日期 是否存在
+     * @return 返回最大值的日期
+     * */
+    @Select("select max(date) as date from t_covid_vaccinate_threshold_new where code = #{code}")
+    Date changJiaYuZhiDoesItExist(@Param("code")int code);
+
+    /**
+     * 插入 数据库中没有的日期 和 厂家
+     * */
+    @Insert("insert into t_covid_vaccinate_threshold_new (code, date, value) values (#{code},#{date},150)")
+    void chaRuMeiYouDeDate(@Param("code")int code,
+                           @Param("date")Date date);
+
+    /**
+     * 查看进七天该产品的阈值
+     * @return 返回七天的数据
+     * */
+    @Select("select * from t_covid_vaccinate_threshold_new where code=#{code} and date>=#{startTime} and date<=#{endTime}")
+    List<CovidVaccinateThreshold> chaKanQiTianYuZhi(@Param("code")int code,
+                                                    @Param("startTime")String startTime,
+                                                    @Param("endTime")String endTime);
 }

+ 6 - 0
src/main/java/thyyxxk/webserver/entity/querydata/CovidVaccinateAppointment.java

@@ -69,4 +69,10 @@ public class CovidVaccinateAppointment implements Serializable {
     private long currentPage;
 
     private long pageSize;
+
+    private Integer vaccinateCode;
+
+    private String vaccinateName;
+
+    private String vaccinateFactory;
 }

+ 56 - 0
src/main/java/thyyxxk/webserver/entity/querydata/CovidVaccinateFactory.java

@@ -0,0 +1,56 @@
+package thyyxxk.webserver.entity.querydata;
+
+import java.io.Serializable;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author 肖
+ */
+@Data
+public class CovidVaccinateFactory implements Serializable {
+
+	private static final long serialVersionUID =  5933243722775161066L;
+
+	/**
+	 * code
+	 */
+	private Integer code;
+	/**
+	 * 原来的code
+	 */
+	private Integer oldCode;
+
+	/**
+	 * vaccinateId
+	 */
+	private Integer vaccinateId;
+
+	/**
+	 * specification
+	 */
+	private String specification;
+
+	/**
+	 * price
+	 */
+	private BigDecimal price;
+
+	/**
+	 * name
+	 */
+	private String name;
+
+	/**
+	 * enableFlag
+	 */
+	private Integer enableFlag;
+
+	/**
+	 * createDatetime
+	 */
+	private Date createDatetime;
+
+}

+ 5 - 0
src/main/java/thyyxxk/webserver/entity/querydata/CovidVaccinateThreshold.java

@@ -2,6 +2,7 @@ package thyyxxk.webserver.entity.querydata;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.Date;
 
@@ -14,9 +15,13 @@ import java.util.Date;
 @Data
 public class CovidVaccinateThreshold {
 
+    private Integer id;
+
     @JsonFormat(pattern = "yyyy-MM-dd")
     private Date date;
 
     private Integer value;
 
+    private Integer code;
+
 }

+ 40 - 0
src/main/java/thyyxxk/webserver/entity/querydata/ZdCovidVaccinate.java

@@ -0,0 +1,40 @@
+package thyyxxk.webserver.entity.querydata;
+
+import java.io.Serializable;
+import lombok.Data;
+import java.util.Date;
+
+/**
+ * @author 肖
+ */
+@Data
+public class ZdCovidVaccinate implements Serializable {
+
+	private static final long serialVersionUID =  4405569050802161951L;
+
+	/**
+	 * id
+	 */
+	private Integer id;
+
+	/**
+	 * name
+	 */
+	private String name;
+
+	/**
+	 * enableFlag
+	 */
+	private Integer enableFlag;
+
+	/**
+	 * bookTip
+	 */
+	private String bookTip;
+
+	/**
+	 * createDatetime
+	 */
+	private Date createDatetime;
+
+}

+ 1 - 1
src/main/java/thyyxxk/webserver/service/datamodify/YzActOrderModifyService.java

@@ -42,7 +42,7 @@ public class YzActOrderModifyService {
      * */
     public ResultVo<List<YzActOrder>> queryYz(YzActOrder param){
         QueryWrapper<YzActOrder> qw = new QueryWrapper<>();
-        log.info("通过住院号或者医嘱号查询==》医嘱号:{},住院号:{}",param.getActOrderNo(),param.getInpatientNo());
+        log.info("医嘱修改申请查询==》医嘱号:{},住院号:{}",param.getActOrderNo(),param.getInpatientNo());
         if (param.getActOrderNo()!=null){
            qw.eq("a.act_order_no",param.getActOrderNo());
         }

+ 2 - 5
src/main/java/thyyxxk/webserver/service/datamodify/YzTemperatureService.java

@@ -35,9 +35,9 @@ public class YzTemperatureService {
     }
  
     /**
-     * 查询护理记录单
+     * 查询护理记录单
      * @param param 根据 住院号 住院次数 日期 查询 坑爹的这个人把 日期要 拆分出来
-     * @return 返回一条拼接好问题描述的数据 给到页面
+     * @return 返回一条拼接好问题描述的数据
      * */
     public ResultVo<YzTemperature> queryDetails(YzTemperature param){
         String date =  DateUtil.formatDatetime(param.getDate(), GET_DATE_FORMAT);
@@ -129,7 +129,4 @@ public class YzTemperatureService {
     public ResultVo<List<GetDropdownBox>> getWard(){
         return ResultVoUtil.success(dao.getWard());
     }
-
-
-
 }

+ 129 - 17
src/main/java/thyyxxk/webserver/service/querydata/CovidVaccinateAppointmentService.java

@@ -6,12 +6,16 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
 import thyyxxk.webserver.config.exception.ExceptionEnum;
 import thyyxxk.webserver.constants.Capacity;
 import thyyxxk.webserver.dao.his.querydata.CovidVaccinateAppointmentMapper;
 import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.querydata.CovidVaccinateAppointment;
+import thyyxxk.webserver.entity.querydata.CovidVaccinateFactory;
 import thyyxxk.webserver.entity.querydata.CovidVaccinateThreshold;
+import thyyxxk.webserver.entity.querydata.ZdCovidVaccinate;
 import thyyxxk.webserver.utils.*;
 
 import javax.servlet.http.HttpServletResponse;
@@ -34,13 +38,14 @@ public class CovidVaccinateAppointmentService {
     private final CovidVaccinateAppointmentMapper dao;
 
     private static final SimpleDateFormat SDF = new SimpleDateFormat("yyyy-MM-dd");
+    private static final int GET_DATE_SECTION = 7;
 
     public CovidVaccinateAppointmentService(CovidVaccinateAppointmentMapper dao) {
         this.dao = dao;
     }
 
     /**
-     * 通过日期区间或者预约的姓名 来查找到数据 分页查询
+     * 通过日期区间 或者 预约的姓名 来查找到数据 分页查询
      * @param param 包含 name姓名  ExecuteDate预约时间  currentPage PageSize
      * @return 指定数据
      * */
@@ -59,32 +64,44 @@ public class CovidVaccinateAppointmentService {
     }
 
     /**
-     * 查询近七日的预约人数 如果没有指定的日期就插入一条
+     * 查看 可以预约的厂家信息
      * @return 指定数据
      * */
-    static final int GET_DATE_SECTION = 7;
-    public ResultVo<List<CovidVaccinateThreshold>> queryCount() throws ParseException {
-        for(int i = 1; i<= GET_DATE_SECTION; i++){
+
+    public ResultVo<List<CovidVaccinateFactory>> queryCount() {
+        return ResultVoUtil.success(dao.kaiQiYuYueChangJia());
+    }
+
+    /**
+     * 插入每日阈值人数的限制 要判断一些 第一次创建数据库中没有对应的值那么就全部插入 如果有了
+     * 就只插入没有的日期 这个是新冠疫苗的厂家每日阈值的人数
+     * @param code 只要产品的 code 去判断有没有这个产品的 日期 和 阈值 如果没有就插入 日期 和 默认的阈值  默认值为150
+     * @return 插入完后就需要返回给 前端 查看近七日的 阈值
+     * */
+    public ResultVo<List<CovidVaccinateThreshold>> queryChangJiaDuiYingDeYuZhi(Integer code) throws ParseException {
+         Date maxDate = dao.changJiaYuZhiDoesItExist(code);
+         for(int i = 1; i<= GET_DATE_SECTION; i++){
             Date date =SDF.parse(DateUtil.getOffsetDate(i));
-            if (dao.maxDate().getTime()<date.getTime()){
-                dao.insertDate(DateUtil.getOffsetDate(i));
-                log.info("日期为:{}的没有插入",DateUtil.getOffsetDate(i));
+            //厂家在创建的时候是 没有日期的 那么就需要 插入全部的数据
+            if (maxDate == null){
+                dao.chaRuMeiYouDeDate(code,date);
+                log.info("第一次插入新冠疫苗厂家阈值插入=》code:{},插入的日期为:{}",code,date);
+            }else if (maxDate.getTime()<date.getTime()){
+                dao.chaRuMeiYouDeDate(code,date);
+                log.info("新冠疫苗厂家阈值插入=》code:{},插入的日期为:{}",code,date);
             }
         }
-        return ResultVoUtil.success(dao.queryList(DateUtil.getOffsetDate(1),DateUtil.getOffsetDate(7)));
+        return ResultVoUtil.success(dao.chaKanQiTianYuZhi(code,DateUtil.getOffsetDate(1),DateUtil.getOffsetDate(7)));
     }
 
     /**
      * 修改指定日期的人数
-     * @param modificationDate 原本阈值人数
-     * @param newRevisionDate  设置阈值人数
-     * @param limitDate 阈值日期
+     * @param id 根据id来修改 对应的阈值
+     * @param value  设置阈值人数
      * @return 返回符合的数据
      * */
-    public ResultVo<Boolean> update(int modificationDate, Date limitDate, int newRevisionDate){
-        log.info("修改疫苗预约人数=>操作员:{},修改的日期为:{},限制人数为:{},原本的人数为:{}",
-                TokenUtil.getTokenUserId(),SDF.format(limitDate),newRevisionDate,modificationDate);
-         return ResultVoUtil.success(dao.update(newRevisionDate,SDF.format(limitDate)));
+    public ResultVo<Boolean> xiuGaiYuZhi(int id, int value){
+        return ResultVoUtil.success(dao.xiuGaiYuZhi(id,value));
     }
 
     /**
@@ -95,7 +112,7 @@ public class CovidVaccinateAppointmentService {
     public void exportExcel(HttpServletResponse response, CovidVaccinateAppointment param) {
         log.info("导出新冠疫苗excel: {}", JSON.toJSONString(param));
         List<CovidVaccinateAppointment> list = getQueryPage(param).getRecords();
-        String[] title = {"门诊id","姓名","性别","联系电话","身份证号","年龄","工作单位","工作性质","预约接种时间"};
+        String[] title = {"门诊id","姓名","性别","联系电话","身份证号","年龄","工作单位","工作性质","预约接种时间","产品编码","产品名称","疫苗厂商"};
         String[][] content = new String[list.size()][];
         for (int i = 0; i < list.size(); i++){
             content[i] = new String[title.length];
@@ -109,6 +126,9 @@ public class CovidVaccinateAppointmentService {
             content[i][6] = pojo.getCorpName();
             content[i][7] = pojo.getJobCategoryToString();
             content[i][8] = DateUtil.formatDatetime(pojo.getExecuteDate(),"yyyy-MM-dd");
+            content[i][9] = String.valueOf(pojo.getVaccinateCode());
+            content[i][10] = pojo.getVaccinateName();
+            content[i][11] = pojo.getVaccinateFactory();
         }
         //传三个参数 一个是 固定的 response ,excel的头部信息,excel的内容
         ExcelUtil.exportExcel(response, title, content);
@@ -130,4 +150,96 @@ public class CovidVaccinateAppointmentService {
         }
         return dao.mybatisPlusQueryXGYM(page,qw);
     }
+
+    /**
+     * 插入 新增疫苗种类
+     * @param param name:疫苗名字 enableFlag:是否可以预约 bookTip:描述
+     * @return 返回自增的主键
+     * */
+    public ResultVo<Integer> xinZengYiMiao(ZdCovidVaccinate param){
+        try {
+            log.info("插入疫苗=》操作人:{},信息:{}",TokenUtil.getTokenUserId(),JSON.toJSONString(param));
+            dao.xinZengYiMiao(param);
+        }catch (Exception e){
+            return ResultVoUtil.fail(ExceptionEnum.INTERNAL_SERVER_ERROR,"该疫苗名称已存在,无法保存");
+        }
+
+        return ResultVoUtil.success(param.getId());
+    }
+
+    /**
+     * 插入对应的 疫苗的厂家
+     * @param param 需要插入的字段有 code主键不允许重复 vaccinateId:对应的疫苗
+     *              specification:规格 price:金额,name;名字,enableFlag:是否允许预约
+     * */
+    public ResultVo<Boolean> xinZengChangJia(List<CovidVaccinateFactory> param){
+        //先判断一边是否有存在这编码的
+        for (CovidVaccinateFactory pojo : param) {
+            Integer vaccinesId =  dao.changJiaCodePanDuan(pojo.getCode());
+            if (vaccinesId!=null && vaccinesId>0){
+                return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER,
+                        "厂家编码为【"+pojo.getCode()+"】已存在插入失败," +
+                                "所属疫苗院内编码为【"+vaccinesId+"】");
+            }
+        }
+        for (CovidVaccinateFactory pojo : param) {
+            log.info("插入厂家=》操作人:{},信息:{}",TokenUtil.getTokenUserId(),JSON.toJSONString(param));
+            dao.xinZengChangJia(pojo);
+        }
+        return ResultVoUtil.success();
+    }
+
+    /**
+     * 查询全部的疫苗名称
+     * @return 返回全部的数据
+     * */
+    public ResultVo<List<ZdCovidVaccinate>> chaKanYiMiao(){
+       return  ResultVoUtil.success(dao.chaKanYiMiao());
+    }
+
+    /**
+     * 查询全部的疫苗名称
+     * @param id 对应的疫苗
+     * @return 对应的数据
+     * */
+    public ResultVo<List<CovidVaccinateFactory>> chaKanChangJia(int id){
+        return ResultVoUtil.success(dao.chaKanChangJia(id));
+    }
+
+    /**
+     * 根据id来修改 疫苗的一些字段
+     * @param param 修改的字段为 name  enableFlag bookTip 通过id来修改
+     * */
+    public ResultVo<Boolean> xiuGaiYiMiao(ZdCovidVaccinate param){
+        log.info("修改疫苗=》操作人:{},数据:{}",TokenUtil.getTokenUserId(),JSON.toJSONString(param));
+        return ResultVoUtil.success(dao.xiuGaiYiMiao(param));
+    }
+
+    /**
+     * 根据code来修改厂家
+     * @param param  传入需要修改的值和原本的code
+     * @return 返回boolean
+     * */
+    public ResultVo<Boolean> xiuGaiChangJia(CovidVaccinateFactory param){
+        log.info("修改新冠疫苗厂家==》操作人:{},数据:{}",TokenUtil.getTokenUserId(),JSON.toJSONString(param));
+        return ResultVoUtil.success(dao.xiuGaiChangJia(param));
+    }
+
+    /**
+     * 删除厂家一些信息
+     * @param code 根据code来删除
+     * @return 返回
+     * */
+    public ResultVo<Boolean> shanChuChangJia(Integer code){
+        log.info("删除新冠疫苗厂家==》操作人:{},删除的数据:{}",TokenUtil.getTokenUserId(),code);
+        return ResultVoUtil.success(dao.shanChuChangJia(code));
+    }
+
+    public ResultVo<Boolean> yiJianXiuGaiRiQi(List<CovidVaccinateThreshold> list){
+        log.info("批量修改新冠疫苗厂家阈值==》操作人:{},数据:{}",TokenUtil.getTokenUserId(),JSON.toJSONString(list));
+        for (CovidVaccinateThreshold pojo : list) {
+            dao.xiuGaiYuZhi(pojo.getId(), pojo.getValue());
+        }
+        return ResultVoUtil.success();
+    }
 }