qushaowei
2024-01-31 a5bb107b88b161bd59edb68fa5be7e52137af839
增加报表
已修改5个文件
123 ■■■■■ 文件已修改
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamEquipmentMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentMapper.xml 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamEquipmentService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java
@@ -24,6 +24,7 @@
import org.jeecg.modules.base.service.IFactoryModelService;
import org.jeecg.modules.eam.entity.*;
import org.jeecg.modules.eam.model.DepartVo;
import org.jeecg.modules.eam.model.MaintenanceCycleVo;
import org.jeecg.modules.eam.service.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -115,6 +116,12 @@
     @Autowired
     private IAreaService areaService;
     @Autowired
     private IDailyInspectionStandardService dailyInspectionStandardService;
     @Autowired
     private IMaintenanceStandardService maintenanceStandardService;
@@ -954,4 +961,52 @@
         return Result.OK("修改成功");
     }
     /**
      *设备台站-保养标准
      */
     @GetMapping("getEquipmentListAllStandard")
     public Result<?> getEquipmentListAllStandard(@RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize, @RequestParam Map<String, Object> params) {
         IPage<Map<String, Object>> equipmentListAllStandards = equipmentService.getEquipmentListAllStandard(pageNo, pageSize, params);
         List<Map<String, Object>> records = equipmentListAllStandards.getRecords();
         for (Map<String, Object> record : records) {
             String id = (String) record.get("id");
             String precisionParameters = (String)record.get("precisionParameters");
             if("1".equals(precisionParameters)){
                 record.put("yseNoPrecisionParameters","0");
             }else{
                 record.put("yseNoPrecisionParameters","1");
             }
             List<DailyInspectionStandard> dailyInspectionStandards = dailyInspectionStandardService.lambdaQuery()
                     .eq(DailyInspectionStandard::getEquipmentId, id)
                     .eq(DailyInspectionStandard::getVersionStatus, "2")
                     .list();
             if(dailyInspectionStandards.size()>0){
                 record.put("yseNoInspectionStandard","0");
             }else{
                 record.put("yseNoInspectionStandard","1");
             }
             List<MaintenanceStandard> maintenance2Standards = maintenanceStandardService.lambdaQuery()
                     .eq(MaintenanceStandard::getEquipmentId, id)
                     .eq(MaintenanceStandard::getMaintenanceType, "2")
                     .eq(MaintenanceStandard::getVersionStatus, "2").list();
             if(maintenance2Standards.size()>0){
                 record.put("yseNoMaintenance2Standard","0");
             }else{
                 record.put("yseNoMaintenance2Standard","1");
             }
             List<MaintenanceStandard> maintenance3Standards = maintenanceStandardService.lambdaQuery()
                     .eq(MaintenanceStandard::getEquipmentId, id)
                     .eq(MaintenanceStandard::getMaintenanceType, "3")
                     .eq(MaintenanceStandard::getVersionStatus, "2").list();
             if(maintenance3Standards.size()>0){
                 record.put("yseNoMaintenance3Standard","0");
             }else{
                 record.put("yseNoMaintenance3Standard","1");
             }
         }
         return Result.ok(equipmentListAllStandards);
     }
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamEquipmentMapper.java
@@ -64,6 +64,8 @@
    IPage<Equipment> pageEquipment(IPage<Map> pageData,@Param("params") Map<String, Object> params);
    IPage<Map<String, Object>> getEquipmentListAllStandard(IPage<Map> pageData, @Param("params") Map<String,Object> params);
    List<Equipment> getEquipmentList(   Page<Equipment> page,
                                       @Param("num") String num,
                                       @Param("name")String name,
@@ -81,6 +83,7 @@
                                        @Param("lineId")String lineId,
                                        @Param("isLineEquip")String isLineEquip,
                                       @Param("isLine")String isLine,
                                        @Param("equipmentCategoryId")String equipmentCategoryId,
                                       @Param("equipNums") List<String> equipNums,
                                       @Param("sql")String sql
    );
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentMapper.xml
@@ -259,6 +259,9 @@
    left join (select  * from mom_eam_equipment_category where del_flag = 0) t2 on t1.equipment_category_id = t2.id
    left join(select  count(id) sumOfEquipment,line_id  from mom_eam_equipment where del_flag=0 group by line_id) t3 on t3.line_id = t1.id
    where t1.del_flag  = 0
        <if test="equipmentCategoryId != null and equipmentCategoryId != ''">
            and t1.equipment_category_id = #{equipmentCategoryId}
        </if>
        <if test="num != null and num != ''">
            and t1.num like concat('%',#{num},'%')
        </if>
@@ -355,4 +358,57 @@
           order by t9.type
    </select>
    <select id="getEquipmentListAllStandard"  parameterType="Map" resultType="Map">
        SELECT
        t1.id,
        t2.name as categoryName,
        t1.num as equipmentNum,
        t1.name as equipmentName,
        t1.model as equipmentModel,
        t1.equipment_importance_id as abc,
        t1.precision_parameters as precisionParameters,
        t1.precision_parameters_template_id as precisionParametersTemplateId,
        t3.depart_name as departName,
        t4.item_text as technologyStatus,
        t5.item_text as specificEquipment
        FROM
        mom_eam_equipment t1
        LEFT JOIN mom_eam_equipment_category t2 ON t1.equipment_category_id = t2.id
        LEFT JOIN sys_depart t3 ON t1.use_id = t3.id
        LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'technology_status' ) t4 ON t4.item_value = t1.technology_status
        LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'specific_equipment' ) t5 ON t5.item_value = t1.specific_equipment
        WHERE t1.del_flag = '0'
        <if test="params.num != null and params.num != ''">
            and t1.num like concat('%',#{params.num},'%')
        </if>
        <if test="params.name != null and params.name != ''">
            and t1.name like concat('%',#{params.name},'%')
        </if>
        <if test="params.model != null and params.model != ''">
            and t1.model like concat('%',#{params.model},'%')
        </if>
        <if test="params.useId != null and params.useId != ''">
            and t1.use_id = #{params.useId}
        </if>
        <if test="params.equipmentImportanceId != null and  params.equipmentImportanceId != ''">
            and t1. equipment_importance_id = #{params.equipmentImportanceId}
        </if>
        <if test="params.technologyStatus != null and  params.technologyStatus != ''">
            and t1.technology_status = #{params.technologyStatus}
        </if>
        <if test="params.equipmentStatus != null and  params.equipmentStatus != ''">
            and t1.equipment_status = #{params.equipmentStatus}
        </if>
        <if test="params.specificEquipment != null and  params.specificEquipment != ''">
            and t1.specific_equipment = #{params.specificEquipment}
        </if>
        <if test="params.factoryModelId != null and params.factoryModelId != ''">
            and t1.factory_model_id = #{params.factoryModelId}
        </if>
        <if test="params.equipmentCategoryId != null and params.equipmentCategoryId != ''">
            and t1.equipment_category_id = #{params.equipmentCategoryId}
        </if>
        ORDER BY t1.create_time desc
    </select>
</mapper>
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamEquipmentService.java
@@ -62,4 +62,6 @@
    Page<Equipment> getEquipmentList(Page<Equipment> page, Equipment equipment);
    IPage<DailyInspectionStandardDetail>  getStandardList(Page<DailyInspectionStandardDetail> page, String mainId,String type);
    IPage<Map<String, Object>> getEquipmentListAllStandard(Integer pageNo, Integer pageSize, Map<String, Object> params);
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentServiceImpl.java
@@ -126,6 +126,7 @@
                equipment.getLineId(),
                equipment.getIsLineEquip(),
                equipment.getIsLine(),
                equipment.getEquipmentCategoryId(),
                equipNums,
                sql
        ));
@@ -135,4 +136,10 @@
    public IPage<DailyInspectionStandardDetail> getStandardList(Page<DailyInspectionStandardDetail> page, String mainId,String type) {
        return page.setRecords(baseMapper.getStandardList(page,mainId,type));
    }
    @Override
    public IPage<Map<String, Object>> getEquipmentListAllStandard(Integer pageNo, Integer pageSize, Map<String, Object> params) {
        IPage<Map> pageData = new Page<Map>(pageNo, pageSize);
        return super.getBaseMapper().getEquipmentListAllStandard(pageData,params);
    }
}