日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 前端技术 > vue >内容正文

vue

java集合体检套餐管理系统_基于ssm vue的综合项目 健康体检管理系统-第六章

發(fā)布時(shí)間:2024/3/24 vue 44 豆豆
生活随笔 收集整理的這篇文章主要介紹了 java集合体检套餐管理系统_基于ssm vue的综合项目 健康体检管理系统-第六章 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

移動(dòng)端開發(fā)對(duì)體檢預(yù)約進(jìn)行的查詢

當(dāng)頁(yè)面加載完畢時(shí),利用vue的鉤子函數(shù)

已加載頁(yè)面就直接查詢數(shù)據(jù)將數(shù)據(jù)進(jìn)行渲染

created() {

axios.post("/setmeal/getSetmeal.do").then((response) => {

if (response.data.flag) {

this.setmealList = response.data.data;

} else {

this.$message.error(response.data.message);

}

});

}

根據(jù)套餐查詢套餐信息和檢查組、檢查項(xiàng)的信息

點(diǎn)擊套餐前臺(tái)進(jìn)行js截取id以及傳遞的參數(shù)傳遞給后臺(tái)

后臺(tái)接受到數(shù)據(jù)就進(jìn)行查詢

由于傳遞到后臺(tái)的只有一個(gè)id

這里需要多表查詢需要使用到mybatis的高級(jí)特性

/**

* 查詢套餐的基礎(chǔ)信息

* @param id 套餐的id

* @return 套餐實(shí)體類

*/

Setmeal findAssociationById(Integer id);

property="checkGroups"

ofType="com.itheima.pojo.CheckGroup"

javaType="java.util.List"

column="id"

select="com.itheima.dao.CheckgroupDao.findCheckgroupBySetmealId"/>

select id,

name,

code,

helpCode,

sex,

age,

price,

remark,

attention,

img

from t_setmeal where id=#{id}

select * from t_setmeal

查詢套餐的基礎(chǔ)信息,將查詢出來的結(jié)果的id

傳遞到CheckgroupDao的findCheckgroupBySetmealId

CheckGroup findCheckgroupBySetmealId(Integer id);

property="checkItems"

javaType="java.util.List"

ofType="com.itheima.pojo.CheckItem"

column="id"

select="com.itheima.dao.CheckItemDao.findCheckitemByCheckgroup"/>

select id, code, name, helpCode, sex, remark, attention

from t_checkgroup

where id in (select checkgroup_id from t_setmeal_checkgroup where setmeal_id = #{id})

根據(jù)套餐的id查詢套餐和檢查組的中間表的檢查組的id

然后在根據(jù)檢查組的id查詢檢查組的信息

SELECT * FROM t_checkgroup WHERE id in(SELECT checkgroup_id FROM t_setmeal_checkgroup where setmeal_id=12)

再將查詢出來的id帶到檢查項(xiàng)去查詢檢查項(xiàng)的信息

select id,

code,

name,

sex,

age,

price,

type,

attention,

remark

from t_checkitem

where id in (select checkitem_id from t_checkgroup_checkitem where checkgroup_id = #{id})

Freemaker入門案例

@Test

public void test1() throws Exception {

/*

1.創(chuàng)建freemarker的配置

Freemarker為了兼容不同版本,使用配置類的構(gòu)造方法來創(chuàng)建不同的運(yùn)行環(huán)境2.3.23

*/

Configuration configuration = new Configuration(Configuration.VERSION_2_3_23);

/*

2.對(duì)配置進(jìn)行配置 (配置模板的指定目錄,使用類加載器獲取ftl目錄的路徑)

*/

String ftlDirectory = FreemarkerTest.class.getResource("/ftl/").getPath();

//3.設(shè)置模板所在的目錄

configuration.setDirectoryForTemplateLoading(new File(ftlDirectory));

//4.配置模板文件的默認(rèn)字符集

configuration.setDefaultEncoding("utf-8");

//5.獲取指定模板文件的對(duì)象

Template template = configuration.getTemplate("freemarkertest.ftl");

//6.構(gòu)建出數(shù)據(jù)模型

Map map = new HashMap();

map.put("name", "kobe");

map.put("address", "beijing");

//7.生成靜態(tài)化文件

FileWriter fileWriter = new FileWriter("d:/index.html");

template.process(map, fileWriter);

//釋放資源

fileWriter.close();

}

freemarker入門案例

你好${name},歡迎來到${address}。

來源:https://www.icode9.com/content-4-808601.html

總結(jié)

以上是生活随笔為你收集整理的java集合体检套餐管理系统_基于ssm vue的综合项目 健康体检管理系统-第六章的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。