fix: 功能优化完善,统计功能代码提交。

This commit is contained in:
tianyongbao
2024-10-16 12:32:15 +08:00
parent 0504ff0121
commit 963278822d
15 changed files with 627 additions and 11 deletions

View File

@@ -33,10 +33,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="character" column="character" />
<result property="storage" column="storage" />
<result property="indications" column="indications" />
<result property="shortName" column="short_name" />
<result property="packageUnit" column="package_unit" />
</resultMap>
<sql id="selectHealthMedicineBasicVo">
select a.id, a.name, a.classification, a.category, a.brand, a.packaging, a.manufacturers, a.treatment_type, a.is_import, a.ingredients, a.usage, a.dosage_form, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, a.remark, a.code, a.specifications, a.unit, a.adverse_reaction, a.address, a.content, a.content_unit, a.character, a.storage, a.indications from health_medicine_basic a
select
a.id,
a.name,
a.classification,
a.category,
a.brand,
a.packaging,
a.manufacturers,
a.treatment_type,
a.is_import,
a.ingredients,
a.usage,
a.dosage_form,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
a.del_flag,
a.remark,
a.code,
a.specifications,
a.unit,
a.adverse_reaction,
a.address,
a.content,
a.content_unit,
a.character,
a.storage,
a.indications,
a.short_name,
a.package_unit
from
health_medicine_basic a
</sql>
<select id="selectHealthMedicineBasicList" parameterType="HealthMedicineBasicDto" resultMap="HealthMedicineBasicResult">
@@ -44,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
a.del_flag='0'
<if test="name != null and name != ''"> and a.name like '%'|| #{name}||'%'</if>
<if test="shortName != null and shortName != ''"> and a.short_name like '%'|| #{shortName}||'%'</if>
<if test="classification != null and classification != ''"> and a.classification = #{classification}</if>
<if test="category != null and category != ''"> and a.category = #{category}</if>
<if test="brand != null and brand != ''"> and a.brand = #{brand}</if>
@@ -95,6 +131,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="character != null">character,</if>
<if test="storage != null">storage,</if>
<if test="indications != null">indications,</if>
<if test="shortName != null">short_name,</if>
<if test="packageUnit != null">package_unit,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@@ -125,6 +163,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="character != null">#{character},</if>
<if test="storage != null">#{storage},</if>
<if test="indications != null">#{indications},</if>
<if test="shortName != null">#{shortName},</if>
<if test="packageUnit != null">#{packageUnit},</if>
</trim>
</insert>
@@ -158,6 +198,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="character != null">character = #{character},</if>
<if test="storage != null">storage = #{storage},</if>
<if test="indications != null">indications = #{indications},</if>
<if test="shortName != null">short_name = #{shortName},</if>
<if test="packageUnit != null">package_unit = #{packageUnit},</if>
</trim>
where id = #{id}
</update>

View File

@@ -27,6 +27,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="medicineName" column="medicine_name" />
<result property="usage" column="usage" />
<result property="ageWeight" column="age_weight" />
<result property="packageUnit" column="package_unit" />
<result property="unit" column="unit" />
<result property="totalCount" column="total_count" />
</resultMap>
<sql id="selectHealthMedicineStockInVo">
@@ -51,8 +54,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.left_count,
a.used_count,
a.purchase_address,
a.unit,
a.total_price,
hmb."name" as medicine_name
hmb."name" as medicine_name,
a.package_unit,
a.total_count
from
health_medicine_stock_in a
left join health_medicine_basic hmb on
@@ -110,6 +116,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="totalPrice != null">total_price,</if>
<if test="usage != null">usage,</if>
<if test="ageWeight != null">age_weight,</if>
<if test="unit != null">unit,</if>
<if test="packageUnit != null">package_unit,</if>
<if test="totalCount != null">total_count,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@@ -133,6 +142,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="totalPrice != null">#{totalPrice},</if>
<if test="usage != null">#{usage},</if>
<if test="ageWeight != null">#{ageWeight},</if>
<if test="unit != null">#{unit},</if>
<if test="packageUnit != null">#{packageUnit},</if>
<if test="totalCount != null">#{packageUnit},</if>
</trim>
</insert>
@@ -159,6 +171,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="totalPrice != null">total_price = #{totalPrice},</if>
<if test="usage != null">usage = #{usage},</if>
<if test="ageWeight != null">age_weight = #{ageWeight},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="packageUnit != null">package_unit = #{packageUnit},</if>
<if test="totalCount != null">total_count = #{packageUnit},</if>
</trim>
where id = #{id}
</update>

View File

@@ -18,10 +18,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="nickName" column="nick_name" />
<result property="height" column="height" />
<result property="weight" column="weight" />
<result property="ranking" column="ranking" />
</resultMap>
<sql id="selectHealthPersonVo">
select a.id, a.name, a.type, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, a.remark, a.birthday, a.nick_name, a.height, a.weight from health_person a
select a.id, a.name, a.type, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, a.remark, a.birthday, a.nick_name, a.height, a.weight, a.ranking from health_person a
</sql>
<select id="selectHealthPersonList" parameterType="HealthPersonDto" resultMap="HealthPersonResult">
@@ -34,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
<!-- 数据范围过滤 -->
${params.dataScope}
order by a.create_time desc
order by a.ranking asc
</select>
<select id="selectHealthPersonById" parameterType="Long" resultMap="HealthPersonResult">
@@ -58,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="nickName != null and nickName != ''">nick_name,</if>
<if test="height != null">height,</if>
<if test="weight != null">weight,</if>
<if test="ranking != null">ranking,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@@ -73,6 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="nickName != null and nickName != ''">#{nickName},</if>
<if test="height != null">#{height},</if>
<if test="weight != null">#{weight},</if>
<if test="ranking != null">#{ranking},</if>
</trim>
</insert>
@@ -91,6 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
<if test="height != null">height = #{height},</if>
<if test="weight != null">weight = #{weight},</if>
<if test="ranking != null">ranking = #{ranking},</if>
</trim>
where id = #{id}
</update>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.health.mapper.StatisticAnalysisMapper">
</mapper>