From 23855599412c4d61b38d78f0f3abd3430a48b5b1 Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期三, 25 六月 2025 11:51:38 +0800 Subject: [PATCH] Merge branch 'mdc_hyjs_master' --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcOeeInfoMapper.xml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 43 insertions(+), 0 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcOeeInfoMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcOeeInfoMapper.xml new file mode 100644 index 0000000..3261ab9 --- /dev/null +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcOeeInfoMapper.xml @@ -0,0 +1,43 @@ +<?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="org.jeecg.modules.mdc.mapper.MdcOeeInfoMapper"> + + <!--鍒嗛〉鍒楄〃--> + <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcOeeInfo"> + SELECT + * + FROM + mdc_oee_info + <where> + <if test="mdcOeeInfoVo.equipmentId != null and mdcOeeInfoVo.equipmentId != ''"> + AND equipment_id = #{ mdcOeeInfoVo.equipmentId } + </if> + <if test="mdcOeeInfoVo.startTime != null and mdcOeeInfoVo.startTime != ''"> + AND the_date >= #{ mdcOeeInfoVo.startTime } + </if> + <if test="mdcOeeInfoVo.endTime != null and mdcOeeInfoVo.endTime != ''"> + AND the_date <= #{mdcOeeInfoVo.endTime } + </if> + <if test="mdcOeeInfoVo.equipmentIdList != null and mdcOeeInfoVo.equipmentIdList.size() > 0 "> + AND equipment_id IN + <foreach collection="mdcOeeInfoVo.equipmentIdList" item="id" index="index" open="(" close=")" separator=","> + #{ id } + </foreach> + </if> + </where> + ORDER BY the_date DESC, equipment_id ASC + </select> + + <select id="findByEquIdAndMonth" resultType="java.math.BigDecimal"> + SELECT + AVG(oee) + FROM + mdc_oee_info + WHERE + the_date LIKE CONCAT(#{month}, '%') + AND equipment_id IN + <foreach collection="equipmentIdList" item="id" index="index" open="(" close=")" separator=","> + #{ id } + </foreach> + </select> +</mapper> \ No newline at end of file -- Gitblit v1.9.3