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-common/src/main/java/org/jeecg/modules/mdc/mapper/MdcEquipmentMapper.java | 147 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 147 insertions(+), 0 deletions(-) diff --git a/lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/mapper/MdcEquipmentMapper.java b/lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/mapper/MdcEquipmentMapper.java new file mode 100644 index 0000000..0a71450 --- /dev/null +++ b/lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/mapper/MdcEquipmentMapper.java @@ -0,0 +1,147 @@ +package org.jeecg.modules.mdc.mapper; + +import com.baomidou.mybatisplus.annotation.InterceptorIgnore; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.jeecg.modules.mdc.dto.MdcEquDepDto; +import org.jeecg.modules.mdc.dto.MdcEquProDto; +import org.jeecg.modules.mdc.dto.MdcEquipmentDetailedDto; +import org.jeecg.modules.mdc.dto.MdcEquipmentDto; +import org.jeecg.modules.mdc.entity.MdcEquipment; +import org.jeecg.modules.mdc.entity.MdcEquipmentMonitor; +import org.jeecg.modules.mdc.vo.MdcEquipmentDepVo; +import org.jeecg.modules.mdc.vo.MdcEquipmentProVo; +import org.jeecg.modules.mdc.vo.MdcEquipmentVo; +import org.jeecg.modules.mdc.vo.WorkshopEquipmentVo; + +import java.util.List; +import java.util.Map; + +/** + * @Description: 璁惧琛� + * @Author: liuS + * @Date: 2023-03-22 + * @Version: V1.0 + */ +public interface MdcEquipmentMapper extends BaseMapper<MdcEquipment> { + + /** + * 鏍规嵁璁惧Ids,鏌ヨ璁惧鎵�灞為儴闂ㄥ悕绉颁俊鎭� + */ + List<MdcEquipmentDepVo> getDepNamesByEquipmentIds(@Param("equipmentIds") List<String> equipmentIds); + + /** + * 鏍规嵁璁惧Ids,鏌ヨ璁惧鎵�灞炰骇绾垮悕绉颁俊鎭� + */ + List<MdcEquipmentProVo> getProNamesByEquipmentIds(@Param("equipmentIds") List<String> equipmentIds); + + /** + * 鏍规嵁閮ㄩ棬id鏌ヨ璁惧鍒楄〃 + */ + IPage<MdcEquipment> pageListByDepId(Page<MdcEquipment> page, @Param("departId") String departId, @Param("equipmentId") String equipmentId); + + /** + * 鏍规嵁浜х嚎id鏌ヨ璁惧鍒楄〃 + */ + IPage<MdcEquipment> pageListByProId(Page<MdcEquipment> page, @Param("productionId") String productionId, @Param("equipmentId") String equipmentId); + + /** + * 鏍规嵁閮ㄩ棬id鏌ヨ璁惧 + */ + List<MdcEquipment> queryByDepartId(@Param("departId") String departId); + + /** + * 鏍规嵁浜х嚎id鏌ヨ璁惧 + */ + List<MdcEquipment> queryByProductionId(@Param("productionId") String productionId); + + /** + * 鏍规嵁浜х嚎id銆乼ype銆佸凡鍒嗛厤鏉冮檺鏁版嵁 鏌ヨ璁惧 + */ + List<MdcEquipment> queryByProductionIdAndType(@Param("productionId") String productionId, @Param("deviceIds") List<String> deviceIds); + + /** + * 鏍规嵁閮ㄩ棬ids銆佸凡鍒嗛厤鏉冮檺鏁版嵁 鏌ヨ璁惧 + */ + List<MdcEquipment> queryByDepartIdsAndType(@Param("productionIds") List<String> productionIds, @Param("deviceIds") List<String> deviceIds); + + /** + * 鏌ユ壘璁惧鐩戞帶淇℃伅 + */ + List<MdcEquipmentMonitor> checkStatusFromEquipmentIds(@Param("equipmentIds") List<String> equipmentIds); + + /** + * 鏍规嵁浜х嚎id鏌ヨ璁惧id闆嗗悎 + */ + List<String> queryIdsByProductions(@Param("allProductionIds") List<String> allProductionIds); + + /** + * 鏍规嵁閮ㄩ棬id鏌ヨ璁惧id闆嗗悎 + */ + List<String> queryIdsByDeparts(@Param("allDepartIds") List<String> allDepartIds); + + /** + * 鏍规嵁璁惧缂栧彿鏌ヨ璁惧淇℃伅鍜岄儴闂ㄤ俊鎭� + * + * @param equipmentIdList + * @return + */ + List<MdcEquDepDto> findEquDepList(@Param("equipmentIdList") List<String> equipmentIdList); + + /** + * 鏍规嵁璁惧缂栧彿鏌ヨ璁惧淇℃伅鍜屼骇绾夸俊鎭� + * + * @param equipmentIdList + * @return + */ + List<MdcEquProDto> findEquProList(@Param("equipmentIdList") List<String> equipmentIdList); + + /** + * 鏍规嵁澶у睆杞﹂棿id鏌ヨ璁惧鍒楄〃 + */ + IPage<MdcEquipment> getEquipmentByWorkshopId(Page<MdcEquipment> page, @Param("workshopEquipmentVo") WorkshopEquipmentVo workshopEquipmentVo); + + /** + * 鍒嗛〉鍒楄〃 + */ + IPage<MdcEquipment> pageList(Page<MdcEquipment> page, @Param("mdcEquipment") MdcEquipmentVo mdcEquipment); + + @InterceptorIgnore(tenantLine = "1") + @Select("select TOP 1 CollectTime ${columns} from [${tableName}] order by CollectTime desc") + Map<String, Object> getWorkLineLast(Map<String, Object> param); + + /** + * 瀵煎嚭list + * @param mdcEquipment + * @return + */ + List<MdcEquipment> exportXlsList(@Param("mdcEquipment") MdcEquipmentVo mdcEquipment); + + /** + * 鏌ヨ鍗曡〃鏁版嵁 + * @param tableName + * @return + */ + @InterceptorIgnore(tenantLine = "1") + MdcEquipmentDto findWorkLineLast(@Param("tableName") String tableName); + + /** + * 鏍规嵁id鑾峰彇璁惧淇℃伅 + * @param id + * @return + */ + MdcEquipmentDetailedDto findById(@Param("id") String id); + + List<MdcEquipment> findByProductionIds(@Param("mdcProductionIds") List<String> mdcProductionIds); + + List<MdcEquipment> findByProIdsAndTeamCode(@Param("mdcProductionIds") List<String> mdcProductionIds, @Param("teamCodeList") List<String> teamCodeList); + + List<MdcEquipment> findByProIdsAndType(@Param("mdcProductionIds") List<String> mdcProductionIds, @Param("typeList") List<String> typeList); + + List<String> getEquIdsByProIds(@Param("proIds") List<String> proIds); + + List<MdcEquipment> getEquipmentList(@Param("allProductionIds") List<String> allProductionIds); +} -- Gitblit v1.9.3