| | |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.api.dto.message.MessageDTO; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.aspect.annotation.PermissionData; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.system.api.ISysBaseAPI; |
| | | import org.jeecg.common.system.base.entity.SysUpload; |
| | |
| | | * 设备保修 获取设备列表组件 |
| | | * qsw 2023-7-14 |
| | | */ |
| | | |
| | | @GetMapping(value = "/getEquipmentList") |
| | | @PermissionData |
| | | public Result<IPage<Equipment>> getEquipmentList(Equipment equipment, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<Equipment> queryWrapper = QueryGenerator.initQueryWrapper(equipment, req.getParameterMap()); |
| | | // queryWrapper.eq("status","1"); |
| | | // queryWrapper.eq("del_flag",0); |
| | | Page<Equipment> page = new Page<Equipment>(pageNo, pageSize); |
| | | IPage<Equipment> pageList = equipmentService.page(page, queryWrapper); |
| | | IPage<Equipment> pageList = equipmentService.getEquipmentList(page, equipment); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | |
| | | public Result<String> add(@RequestBody EquipmentCategory equipmentCategory) { |
| | | if(!StringUtils.isNotBlank( equipmentCategory.getParentId())){ |
| | | equipmentCategory.setParentId("-1"); |
| | | if("生产设备".equals(equipmentCategory.getName())){ |
| | | equipmentCategory.setEquipmentCategoryUda1("producter"); |
| | | } else if("试验器".equals(equipmentCategory.getName())){ |
| | | equipmentCategory.setEquipmentCategoryUda1("tester"); |
| | | }else if("数控回转库".equals(equipmentCategory.getName())){ |
| | | equipmentCategory.setEquipmentCategoryUda1("filesCarousel"); |
| | | }else if("非标吊索具".equals(equipmentCategory.getName())){ |
| | | equipmentCategory.setEquipmentCategoryUda1("nonStandardLiftingLocks"); |
| | | }else if("运输车".equals(equipmentCategory.getName())){ |
| | | equipmentCategory.setEquipmentCategoryUda1("truck"); |
| | | }else if("起重设备".equals(equipmentCategory.getName())){ |
| | | equipmentCategory.setEquipmentCategoryUda1("crane"); |
| | | }else if("平衡机".equals(equipmentCategory.getName())){ |
| | | equipmentCategory.setEquipmentCategoryUda1("balanceMachine"); |
| | | }else if("焊机".equals(equipmentCategory.getName())){ |
| | | equipmentCategory.setEquipmentCategoryUda1("weldingMachine"); |
| | | }else if("压力容器".equals(equipmentCategory.getName())){ |
| | | equipmentCategory.setEquipmentCategoryUda1("pressureVessel"); |
| | | }else if("环保设备".equals(equipmentCategory.getName())){ |
| | | equipmentCategory.setEquipmentCategoryUda1("envProEquipment"); |
| | | }else if("车台".equals(equipmentCategory.getName())){ |
| | | equipmentCategory.setEquipmentCategoryUda1("ride"); |
| | | }else if("检测、计量设备".equals(equipmentCategory.getName())){ |
| | | equipmentCategory.setEquipmentCategoryUda1("checkoutEquipment"); |
| | | } |
| | | } |
| | | equipmentCategoryService.save(equipmentCategory); |
| | | return Result.OK("添加成功!"); |
| | |
| | | @ApiModel(value="mom_eam_equipment对象", description="mom_eam_equipment") |
| | | public class Equipment implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private String id; |
| | | /**设备编码*/ |
| | | @Excel(name = "统一编码", width = 15,orderNum = "0") |
| | |
| | | private String newABCTag; |
| | | @TableField(exist = false) |
| | | List<EquipmentSpares> equipmentSparesList; |
| | | @TableField(exist = false) |
| | | private String equipmentCategoryUda1; |
| | | } |
| | |
| | | |
| | | 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.eam.entity.Equipment; |
| | | import org.jeecg.modules.eam.model.DepartVo; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | IPage<Map<String, Object>> getResumeChangeRecordList(IPage<Map> pageData, @Param("params") Map<String,Object> params); |
| | | |
| | | IPage<Equipment> pageEquipment(IPage<Map> pageData,@Param("params") Map<String, Object> params); |
| | | |
| | | List<Equipment> getEquipmentList( Page<Equipment> page, |
| | | @Param("num") String num, |
| | | @Param("name")String name, |
| | | @Param("model")String model, |
| | | @Param("workCenterId")String workCenterId, |
| | | @Param("factoryModelId")String factoryModelId, |
| | | @Param("manageId")String manageId, |
| | | @Param("useId")String useId, |
| | | @Param("equipmentImportanceId")String equipmentImportanceId, |
| | | @Param("technologyStatus")String technologyStatus, |
| | | @Param("equipmentStatus")String equipmentStatus, |
| | | @Param("specificEquipment")String specificEquipment, |
| | | @Param("warrantyStart")Date warrantyStart, |
| | | @Param("warrantyEnd")Date warrantyEnd, |
| | | @Param("sql")String sql |
| | | ); |
| | | } |
| | |
| | | and t1.name like concat('%',#{params.name},'%') |
| | | </if> |
| | | </select> |
| | | <select id="getEquipmentList" resultType="org.jeecg.modules.eam.entity.Equipment"> |
| | | select |
| | | t1.id id, |
| | | t1.num num, |
| | | t1.name name, |
| | | t1.model model, |
| | | t1.specification specification, |
| | | t1.equipment_status equipmentStatus, |
| | | t1.technology_status technologyStatus, |
| | | t1.asset_number assetNumber, |
| | | t1.equipment_category_id equipmentCategoryId, |
| | | t1.specific_equipment specificEquipment, |
| | | t1.equipment_photo equipmentPhoto, |
| | | t1.constructor_id constructorId, |
| | | t1.supplier_id supplierId, |
| | | t1.factory_number factoryNumber, |
| | | t1.leave_factory_date leaveFactoryDate, |
| | | t1.acceptance_check_date acceptanceCheckDate, |
| | | t1.affiliation_id affiliationId, |
| | | t1.manage_id manageId, |
| | | t1.manager manager, |
| | | t1.use_id useId, |
| | | t1.functionary functionary, |
| | | t1.location location, |
| | | t1.equipment_importance_id equipmentImportanceId, |
| | | t1.process_parameters processParameters, |
| | | t1.process_parameters_template_id processParametersTemplateId, |
| | | t1.precision_parameters precisionParameters, |
| | | t1.precision_parameters_template_id precisionParametersTemplateId, |
| | | t1.verification verification, |
| | | t1.verification_period verificationPeriod, |
| | | t1.last_verification_date lastVerificationDate, |
| | | t1.next_verification_date nextVerificationDate, |
| | | t1.status status, |
| | | t1.remark remark, |
| | | t1.equipment_uda1 equipmentUda1, |
| | | t1.equipment_uda2 equipmentUda2, |
| | | t1.equipment_uda3 equipmentUda3, |
| | | t1.equipment_uda4 equipmentUda4, |
| | | t1.equipment_uda5 equipmentUda5, |
| | | t1.create_by createBy, |
| | | t1.create_time createTime, |
| | | t1.update_by updateBy, |
| | | t1.update_time updateTime, |
| | | t1.del_flag delFlag, |
| | | t1.team_id teamId, |
| | | t1.source_id sourceId, |
| | | t1.fund_source fundSource, |
| | | t1.factory_no factoryNo, |
| | | t1.mfr mfr, |
| | | t1.source_country sourceCountry, |
| | | t1.gpo gpo, |
| | | t1.key_equipment_identification keyEquipmentIdentification, |
| | | t1.security_configuration securityConfiguration, |
| | | t1.cooling_system coolingSystem, |
| | | t1.fire_extinguisher fireExtinguisher, |
| | | t1.fire_extinguisher_validity_period fireExtinguisherValidityPeriod, |
| | | t1.operating_system operatingSystem, |
| | | t1.system system, |
| | | t1.port port, |
| | | t1.coordinate_num coordinateNum, |
| | | t1.project_approval_no projectApprovalNo, |
| | | t1.standard_a tandardA, |
| | | t1.standard_b standardB, |
| | | t1.standard_c standardC, |
| | | t1.standard_d standardD, |
| | | t1.standard_e standardE, |
| | | t1.standard_f standardF, |
| | | t1.factory_model_id factoryModelId, |
| | | t1.work_center_id workCenterId, |
| | | t1.warranty_start warrantyStart, |
| | | t1.warranty_end warrantyEnd, |
| | | t1.property_status propertyStatus |
| | | from mom_eam_equipment t1 |
| | | left join (select * from mom_eam_equipment_category where del_flag = 0) t2 on t1.equipment_category_id = t2.id |
| | | where t1.del_flag = 0 |
| | | <if test="num != null and num != ''"> |
| | | and t1.num like concat('%',#{num},'%') |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and t1.num like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="model != null and model != ''"> |
| | | and t1.model like concat('%',#{model},'%') |
| | | </if> |
| | | <if test="workCenterId != null and workCenterId != ''"> |
| | | and t1.work_center_id = #{workCenterId} |
| | | </if> |
| | | <if test="factoryModelId != null and factoryModelId != ''"> |
| | | and t1.factory_model_id = #{factoryModelId} |
| | | </if> |
| | | <if test="manageId != null and manageId != ''"> |
| | | and t1.manage_id = #{manageId} |
| | | </if> |
| | | <if test="useId != null and useId != ''"> |
| | | and t1.use_id = #{useId} |
| | | </if> |
| | | <if test="equipmentImportanceId != null and equipmentImportanceId != ''"> |
| | | and t1. equipment_importance_id = #{equipmentImportanceId} |
| | | </if> |
| | | <if test="technologyStatus != null and technologyStatus != ''"> |
| | | and t1.technology_status = #{technologyStatus} |
| | | </if> |
| | | <if test="equipmentStatus != null and equipmentStatus != ''"> |
| | | and t1.equipment_status = #{equipmentStatus} |
| | | </if> |
| | | <if test="specificEquipment != null and specificEquipment != ''"> |
| | | and t1.specific_equipment = #{specificEquipment} |
| | | </if> |
| | | <if test="warrantyStart != null"> |
| | | and DATEDIFF(day,t1.warranty_start,#{warrantyStart})=0 |
| | | </if> |
| | | <if test="warrantyEnd != null"> |
| | | and DATEDIFF(day,t1.warranty_end,#{warrantyEnd})=0 |
| | | </if> |
| | | <if test="sql != null and sql != ''"> |
| | | and t2.equipment_category_uda1 = #{sql} |
| | | </if> |
| | | order by t1.create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | package org.jeecg.modules.eam.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.eam.entity.Equipment; |
| | | import org.jeecg.modules.eam.model.DepartVo; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | IPage<Map<String, Object>> getResumeChangeRecordList(Integer pageNo, Integer pageSize, Map<String, Object> params); |
| | | |
| | | public IPage<Equipment> pageEquipment(Integer pageNo, Integer pageSize, Map<String, Object> params); |
| | | |
| | | Page<Equipment> getEquipmentList(Page<Equipment> page, Equipment equipment); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.modules.eam.entity.Equipment; |
| | | import org.jeecg.modules.eam.entity.EquipmentCategory; |
| | | import org.jeecg.modules.eam.entity.MaintenanceStandardDetail; |
| | | import org.jeecg.modules.eam.mapper.EamEquipmentMapper; |
| | | import org.jeecg.modules.eam.model.DepartVo; |
| | | import org.jeecg.modules.eam.service.IEamEquipmentService; |
| | |
| | | IPage<Map> pageData = new Page<Map>(pageNo, pageSize); |
| | | return super.getBaseMapper().pageEquipment(pageData,params); |
| | | } |
| | | |
| | | @Override |
| | | public Page<Equipment> getEquipmentList(Page<Equipment> page, Equipment equipment) { |
| | | String sql = equipment.getEquipmentCategoryUda1(); |
| | | return page.setRecords(baseMapper.getEquipmentList( |
| | | page, |
| | | equipment.getNum(), |
| | | equipment.getName(), |
| | | equipment.getModel(), |
| | | equipment.getWorkCenterId(), |
| | | equipment.getFactoryModelId(), |
| | | equipment.getManageId(), |
| | | equipment.getUseId(), |
| | | equipment.getEquipmentImportanceId(), |
| | | equipment.getTechnologyStatus(), |
| | | equipment.getEquipmentStatus(), |
| | | equipment.getSpecificEquipment(), |
| | | equipment.getWarrantyStart(), |
| | | equipment.getWarrantyEnd(), |
| | | sql |
| | | )); |
| | | } |
| | | } |