¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionPlanArchives.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.jcdm.common.annotation.Log; |
| | | import com.jcdm.common.core.controller.BaseController; |
| | | import com.jcdm.common.core.domain.AjaxResult; |
| | | import com.jcdm.common.enums.BusinessType; |
| | | import com.jcdm.main.em.inspectionPlanArchives.domain.EmInspectionPlanArchives; |
| | | import com.jcdm.main.em.inspectionPlanArchives.service.IEmInspectionPlanArchivesService; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * ç¹æ£ä¿å
»è®¡å设å¤æ¸
åController |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-14 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/em/inspectionPlanArchives") |
| | | public class EmInspectionPlanArchivesController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IEmInspectionPlanArchivesService emInspectionPlanArchivesService; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡å设å¤æ¸
åå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionPlanArchives:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(EmInspectionPlanArchives emInspectionPlanArchives) |
| | | { |
| | | startPage(); |
| | | List<EmInspectionPlanArchives> list = emInspectionPlanArchivesService.selectEmInspectionPlanArchivesList(emInspectionPlanArchives); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºç¹æ£ä¿å
»è®¡å设å¤æ¸
åå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionPlanArchives:export')") |
| | | @Log(title = "ç¹æ£ä¿å
»è®¡å设å¤æ¸
å", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, EmInspectionPlanArchives emInspectionPlanArchives) |
| | | { |
| | | List<EmInspectionPlanArchives> list = emInspectionPlanArchivesService.selectEmInspectionPlanArchivesList(emInspectionPlanArchives); |
| | | ExcelUtil<EmInspectionPlanArchives> util = new ExcelUtil<EmInspectionPlanArchives>(EmInspectionPlanArchives.class); |
| | | util.exportExcel(response, list, "ç¹æ£ä¿å
»è®¡å设å¤æ¸
åæ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åç¹æ£ä¿å
»è®¡å设å¤æ¸
å详ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionPlanArchives:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(emInspectionPlanArchivesService.selectEmInspectionPlanArchivesById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionPlanArchives:add')") |
| | | @Log(title = "ç¹æ£ä¿å
»è®¡å设å¤æ¸
å", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody EmInspectionPlanArchives emInspectionPlanArchives) |
| | | { |
| | | return toAjax(emInspectionPlanArchivesService.insertEmInspectionPlanArchives(emInspectionPlanArchives)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionPlanArchives:edit')") |
| | | @Log(title = "ç¹æ£ä¿å
»è®¡å设å¤æ¸
å", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody EmInspectionPlanArchives emInspectionPlanArchives) |
| | | { |
| | | return toAjax(emInspectionPlanArchivesService.updateEmInspectionPlanArchives(emInspectionPlanArchives)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionPlanArchives:remove')") |
| | | @Log(title = "ç¹æ£ä¿å
»è®¡å设å¤æ¸
å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(emInspectionPlanArchivesService.deleteEmInspectionPlanArchivesByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionPlanArchives.domain; |
| | | |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.jcdm.common.annotation.Excel; |
| | | import com.jcdm.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * ç¹æ£ä¿å
»è®¡å设å¤æ¸
å对象 em_inspection_plan_archives |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-14 |
| | | */ |
| | | public class EmInspectionPlanArchives extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** ID */ |
| | | private Long id; |
| | | |
| | | /** 设å¤ç¼ç */ |
| | | @Excel(name = "设å¤ç¼ç ") |
| | | private String equipmentCode; |
| | | |
| | | /** 设å¤å称 */ |
| | | @Excel(name = "设å¤å称") |
| | | private String equipmentName; |
| | | |
| | | /** åç */ |
| | | @Excel(name = "åç") |
| | | private String equipmentBrand; |
| | | |
| | | /** è§æ ¼åå· */ |
| | | @Excel(name = "è§æ ¼åå·") |
| | | private String equipmentSpec; |
| | | |
| | | /** å建人 */ |
| | | @Excel(name = "å建人") |
| | | private String createUser; |
| | | |
| | | /** æ´æ°äºº */ |
| | | @Excel(name = "æ´æ°äºº") |
| | | private String updateUser; |
| | | |
| | | /** é¢çå段1 */ |
| | | @Excel(name = "é¢çå段1") |
| | | private String spareField1; |
| | | |
| | | /** é¢çå段2 */ |
| | | @Excel(name = "é¢çå段2") |
| | | private String spareField2; |
| | | |
| | | /** é¢çå段3 */ |
| | | @Excel(name = "é¢çå段3") |
| | | private Long spareField3; |
| | | |
| | | /** é¢çå段4 */ |
| | | @Excel(name = "é¢çå段4") |
| | | private Long spareField4; |
| | | |
| | | /** 计åç¼å· */ |
| | | @Excel(name = "计åç¼å·") |
| | | private String planCode; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setEquipmentCode(String equipmentCode) |
| | | { |
| | | this.equipmentCode = equipmentCode; |
| | | } |
| | | |
| | | public String getEquipmentCode() |
| | | { |
| | | return equipmentCode; |
| | | } |
| | | public void setEquipmentName(String equipmentName) |
| | | { |
| | | this.equipmentName = equipmentName; |
| | | } |
| | | |
| | | public String getEquipmentName() |
| | | { |
| | | return equipmentName; |
| | | } |
| | | public void setEquipmentBrand(String equipmentBrand) |
| | | { |
| | | this.equipmentBrand = equipmentBrand; |
| | | } |
| | | |
| | | public String getEquipmentBrand() |
| | | { |
| | | return equipmentBrand; |
| | | } |
| | | public void setEquipmentSpec(String equipmentSpec) |
| | | { |
| | | this.equipmentSpec = equipmentSpec; |
| | | } |
| | | |
| | | public String getEquipmentSpec() |
| | | { |
| | | return equipmentSpec; |
| | | } |
| | | public void setCreateUser(String createUser) |
| | | { |
| | | this.createUser = createUser; |
| | | } |
| | | |
| | | public String getCreateUser() |
| | | { |
| | | return createUser; |
| | | } |
| | | public void setUpdateUser(String updateUser) |
| | | { |
| | | this.updateUser = updateUser; |
| | | } |
| | | |
| | | public String getUpdateUser() |
| | | { |
| | | return updateUser; |
| | | } |
| | | public void setSpareField1(String spareField1) |
| | | { |
| | | this.spareField1 = spareField1; |
| | | } |
| | | |
| | | public String getSpareField1() |
| | | { |
| | | return spareField1; |
| | | } |
| | | public void setSpareField2(String spareField2) |
| | | { |
| | | this.spareField2 = spareField2; |
| | | } |
| | | |
| | | public String getSpareField2() |
| | | { |
| | | return spareField2; |
| | | } |
| | | public void setSpareField3(Long spareField3) |
| | | { |
| | | this.spareField3 = spareField3; |
| | | } |
| | | |
| | | public Long getSpareField3() |
| | | { |
| | | return spareField3; |
| | | } |
| | | public void setSpareField4(Long spareField4) |
| | | { |
| | | this.spareField4 = spareField4; |
| | | } |
| | | |
| | | public Long getSpareField4() |
| | | { |
| | | return spareField4; |
| | | } |
| | | public void setPlanCode(String planCode) |
| | | { |
| | | this.planCode = planCode; |
| | | } |
| | | |
| | | public String getPlanCode() |
| | | { |
| | | return planCode; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("equipmentCode", getEquipmentCode()) |
| | | .append("equipmentName", getEquipmentName()) |
| | | .append("equipmentBrand", getEquipmentBrand()) |
| | | .append("equipmentSpec", getEquipmentSpec()) |
| | | .append("remark", getRemark()) |
| | | .append("createUser", getCreateUser()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateUser", getUpdateUser()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("spareField1", getSpareField1()) |
| | | .append("spareField2", getSpareField2()) |
| | | .append("spareField3", getSpareField3()) |
| | | .append("spareField4", getSpareField4()) |
| | | .append("planCode", getPlanCode()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionPlanArchives.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.em.inspectionPlanArchives.domain.EmInspectionPlanArchives; |
| | | |
| | | /** |
| | | * ç¹æ£ä¿å
»è®¡å设å¤æ¸
åMapperæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-14 |
| | | */ |
| | | public interface EmInspectionPlanArchivesMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * |
| | | * @param id ç¹æ£ä¿å
»è®¡å设å¤æ¸
åä¸»é® |
| | | * @return ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | */ |
| | | public EmInspectionPlanArchives selectEmInspectionPlanArchivesById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡å设å¤æ¸
åå表 |
| | | * |
| | | * @param emInspectionPlanArchives ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * @return ç¹æ£ä¿å
»è®¡å设å¤æ¸
åéå |
| | | */ |
| | | public List<EmInspectionPlanArchives> selectEmInspectionPlanArchivesList(EmInspectionPlanArchives emInspectionPlanArchives); |
| | | |
| | | /** |
| | | * æ°å¢ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * |
| | | * @param emInspectionPlanArchives ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * @return ç»æ |
| | | */ |
| | | public int insertEmInspectionPlanArchives(EmInspectionPlanArchives emInspectionPlanArchives); |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * |
| | | * @param emInspectionPlanArchives ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * @return ç»æ |
| | | */ |
| | | public int updateEmInspectionPlanArchives(EmInspectionPlanArchives emInspectionPlanArchives); |
| | | |
| | | /** |
| | | * å é¤ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * |
| | | * @param id ç¹æ£ä¿å
»è®¡å设å¤æ¸
åä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteEmInspectionPlanArchivesById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteEmInspectionPlanArchivesByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionPlanArchives.service; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.em.inspectionPlanArchives.domain.EmInspectionPlanArchives; |
| | | |
| | | /** |
| | | * ç¹æ£ä¿å
»è®¡å设å¤æ¸
åServiceæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-14 |
| | | */ |
| | | public interface IEmInspectionPlanArchivesService |
| | | { |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * |
| | | * @param id ç¹æ£ä¿å
»è®¡å设å¤æ¸
åä¸»é® |
| | | * @return ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | */ |
| | | public EmInspectionPlanArchives selectEmInspectionPlanArchivesById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡å设å¤æ¸
åå表 |
| | | * |
| | | * @param emInspectionPlanArchives ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * @return ç¹æ£ä¿å
»è®¡å设å¤æ¸
åéå |
| | | */ |
| | | public List<EmInspectionPlanArchives> selectEmInspectionPlanArchivesList(EmInspectionPlanArchives emInspectionPlanArchives); |
| | | |
| | | /** |
| | | * æ°å¢ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * |
| | | * @param emInspectionPlanArchives ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * @return ç»æ |
| | | */ |
| | | public int insertEmInspectionPlanArchives(EmInspectionPlanArchives emInspectionPlanArchives); |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * |
| | | * @param emInspectionPlanArchives ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * @return ç»æ |
| | | */ |
| | | public int updateEmInspectionPlanArchives(EmInspectionPlanArchives emInspectionPlanArchives); |
| | | |
| | | /** |
| | | * æ¹éå é¤ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * |
| | | * @param ids éè¦å é¤çç¹æ£ä¿å
»è®¡å设å¤æ¸
å主é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteEmInspectionPlanArchivesByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤ç¹æ£ä¿å
»è®¡å设å¤æ¸
åä¿¡æ¯ |
| | | * |
| | | * @param id ç¹æ£ä¿å
»è®¡å设å¤æ¸
åä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteEmInspectionPlanArchivesById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionPlanArchives.service.impl; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.jcdm.main.em.inspectionPlanArchives.mapper.EmInspectionPlanArchivesMapper; |
| | | import com.jcdm.main.em.inspectionPlanArchives.domain.EmInspectionPlanArchives; |
| | | import com.jcdm.main.em.inspectionPlanArchives.service.IEmInspectionPlanArchivesService; |
| | | |
| | | /** |
| | | * ç¹æ£ä¿å
»è®¡å设å¤æ¸
åServiceä¸å¡å±å¤ç |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-14 |
| | | */ |
| | | @Service |
| | | public class EmInspectionPlanArchivesServiceImpl implements IEmInspectionPlanArchivesService |
| | | { |
| | | @Autowired |
| | | private EmInspectionPlanArchivesMapper emInspectionPlanArchivesMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * |
| | | * @param id ç¹æ£ä¿å
»è®¡å设å¤æ¸
åä¸»é® |
| | | * @return ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | */ |
| | | @Override |
| | | public EmInspectionPlanArchives selectEmInspectionPlanArchivesById(Long id) |
| | | { |
| | | return emInspectionPlanArchivesMapper.selectEmInspectionPlanArchivesById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡å设å¤æ¸
åå表 |
| | | * |
| | | * @param emInspectionPlanArchives ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * @return ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | */ |
| | | @Override |
| | | public List<EmInspectionPlanArchives> selectEmInspectionPlanArchivesList(EmInspectionPlanArchives emInspectionPlanArchives) |
| | | { |
| | | return emInspectionPlanArchivesMapper.selectEmInspectionPlanArchivesList(emInspectionPlanArchives); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * |
| | | * @param emInspectionPlanArchives ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertEmInspectionPlanArchives(EmInspectionPlanArchives emInspectionPlanArchives) |
| | | { |
| | | emInspectionPlanArchives.setCreateTime(DateUtils.getNowDate()); |
| | | return emInspectionPlanArchivesMapper.insertEmInspectionPlanArchives(emInspectionPlanArchives); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * |
| | | * @param emInspectionPlanArchives ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateEmInspectionPlanArchives(EmInspectionPlanArchives emInspectionPlanArchives) |
| | | { |
| | | emInspectionPlanArchives.setUpdateTime(DateUtils.getNowDate()); |
| | | return emInspectionPlanArchivesMapper.updateEmInspectionPlanArchives(emInspectionPlanArchives); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | * |
| | | * @param ids éè¦å é¤çç¹æ£ä¿å
»è®¡å设å¤æ¸
åä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteEmInspectionPlanArchivesByIds(Long[] ids) |
| | | { |
| | | return emInspectionPlanArchivesMapper.deleteEmInspectionPlanArchivesByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç¹æ£ä¿å
»è®¡å设å¤æ¸
åä¿¡æ¯ |
| | | * |
| | | * @param id ç¹æ£ä¿å
»è®¡å设å¤æ¸
åä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteEmInspectionPlanArchivesById(Long id) |
| | | { |
| | | return emInspectionPlanArchivesMapper.deleteEmInspectionPlanArchivesById(id); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionPlanItems.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.jcdm.common.annotation.Log; |
| | | import com.jcdm.common.core.controller.BaseController; |
| | | import com.jcdm.common.core.domain.AjaxResult; |
| | | import com.jcdm.common.enums.BusinessType; |
| | | import com.jcdm.main.em.inspectionPlanItems.domain.EmInspectionPlanItems; |
| | | import com.jcdm.main.em.inspectionPlanItems.service.IEmInspectionPlanItemsService; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åController |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-13 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/em/inspectionPlanItems") |
| | | public class EmInspectionPlanItemsController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IEmInspectionPlanItemsService emInspectionPlanItemsService; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionPlanItems:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(EmInspectionPlanItems emInspectionPlanItems) |
| | | { |
| | | startPage(); |
| | | List<EmInspectionPlanItems> list = emInspectionPlanItemsService.selectEmInspectionPlanItemsList(emInspectionPlanItems); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionPlanItems:export')") |
| | | @Log(title = "ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, EmInspectionPlanItems emInspectionPlanItems) |
| | | { |
| | | List<EmInspectionPlanItems> list = emInspectionPlanItemsService.selectEmInspectionPlanItemsList(emInspectionPlanItems); |
| | | ExcelUtil<EmInspectionPlanItems> util = new ExcelUtil<EmInspectionPlanItems>(EmInspectionPlanItems.class); |
| | | util.exportExcel(response, list, "ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åæ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å详ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionPlanItems:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(emInspectionPlanItemsService.selectEmInspectionPlanItemsById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionPlanItems:add')") |
| | | @Log(title = "ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody EmInspectionPlanItems emInspectionPlanItems) |
| | | { |
| | | return toAjax(emInspectionPlanItemsService.insertEmInspectionPlanItems(emInspectionPlanItems)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionPlanItems:edit')") |
| | | @Log(title = "ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody EmInspectionPlanItems emInspectionPlanItems) |
| | | { |
| | | return toAjax(emInspectionPlanItemsService.updateEmInspectionPlanItems(emInspectionPlanItems)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionPlanItems:remove')") |
| | | @Log(title = "ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(emInspectionPlanItemsService.deleteEmInspectionPlanItemsByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionPlanItems.domain; |
| | | |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.jcdm.common.annotation.Excel; |
| | | import com.jcdm.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å对象 em_inspection_plan_items |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-13 |
| | | */ |
| | | public class EmInspectionPlanItems extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** ID */ |
| | | private Long id; |
| | | |
| | | /** 项ç®ç¼å· */ |
| | | @Excel(name = "项ç®ç¼å·") |
| | | private String itemsCode; |
| | | |
| | | /** 项ç®å称 */ |
| | | @Excel(name = "项ç®å称") |
| | | private String itemsName; |
| | | |
| | | /** 项ç®ç±»å */ |
| | | @Excel(name = "项ç®ç±»å") |
| | | private String itemsType; |
| | | |
| | | /** æ å */ |
| | | @Excel(name = "æ å") |
| | | private String standard; |
| | | |
| | | /** 项ç®å
容 */ |
| | | @Excel(name = "项ç®å
容") |
| | | private String itemsContent; |
| | | |
| | | /** å建人 */ |
| | | @Excel(name = "å建人") |
| | | private String createUser; |
| | | |
| | | /** æ´æ°äºº */ |
| | | @Excel(name = "æ´æ°äºº") |
| | | private String updateUser; |
| | | |
| | | /** é¢çå段1 */ |
| | | @Excel(name = "é¢çå段1") |
| | | private String spareField1; |
| | | |
| | | /** é¢çå段2 */ |
| | | @Excel(name = "é¢çå段2") |
| | | private String spareField2; |
| | | |
| | | /** 计åç¼å· */ |
| | | @Excel(name = "计åç¼å·") |
| | | private String planCode; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setItemsCode(String itemsCode) |
| | | { |
| | | this.itemsCode = itemsCode; |
| | | } |
| | | |
| | | public String getItemsCode() |
| | | { |
| | | return itemsCode; |
| | | } |
| | | public void setItemsName(String itemsName) |
| | | { |
| | | this.itemsName = itemsName; |
| | | } |
| | | |
| | | public String getItemsName() |
| | | { |
| | | return itemsName; |
| | | } |
| | | public void setItemsType(String itemsType) |
| | | { |
| | | this.itemsType = itemsType; |
| | | } |
| | | |
| | | public String getItemsType() |
| | | { |
| | | return itemsType; |
| | | } |
| | | public void setStandard(String standard) |
| | | { |
| | | this.standard = standard; |
| | | } |
| | | |
| | | public String getStandard() |
| | | { |
| | | return standard; |
| | | } |
| | | public void setItemsContent(String itemsContent) |
| | | { |
| | | this.itemsContent = itemsContent; |
| | | } |
| | | |
| | | public String getItemsContent() |
| | | { |
| | | return itemsContent; |
| | | } |
| | | public void setCreateUser(String createUser) |
| | | { |
| | | this.createUser = createUser; |
| | | } |
| | | |
| | | public String getCreateUser() |
| | | { |
| | | return createUser; |
| | | } |
| | | public void setUpdateUser(String updateUser) |
| | | { |
| | | this.updateUser = updateUser; |
| | | } |
| | | |
| | | public String getUpdateUser() |
| | | { |
| | | return updateUser; |
| | | } |
| | | public void setSpareField1(String spareField1) |
| | | { |
| | | this.spareField1 = spareField1; |
| | | } |
| | | |
| | | public String getSpareField1() |
| | | { |
| | | return spareField1; |
| | | } |
| | | public void setSpareField2(String spareField2) |
| | | { |
| | | this.spareField2 = spareField2; |
| | | } |
| | | |
| | | public String getSpareField2() |
| | | { |
| | | return spareField2; |
| | | } |
| | | public void setPlanCode(String planCode) |
| | | { |
| | | this.planCode = planCode; |
| | | } |
| | | |
| | | public String getPlanCode() |
| | | { |
| | | return planCode; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("itemsCode", getItemsCode()) |
| | | .append("itemsName", getItemsName()) |
| | | .append("itemsType", getItemsType()) |
| | | .append("standard", getStandard()) |
| | | .append("itemsContent", getItemsContent()) |
| | | .append("createUser", getCreateUser()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateUser", getUpdateUser()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("spareField1", getSpareField1()) |
| | | .append("spareField2", getSpareField2()) |
| | | .append("planCode", getPlanCode()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionPlanItems.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.em.inspectionPlanItems.domain.EmInspectionPlanItems; |
| | | |
| | | /** |
| | | * ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åMapperæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-13 |
| | | */ |
| | | public interface EmInspectionPlanItemsMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * |
| | | * @param id ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åä¸»é® |
| | | * @return ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | */ |
| | | public EmInspectionPlanItems selectEmInspectionPlanItemsById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åå表 |
| | | * |
| | | * @param emInspectionPlanItems ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * @return ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åéå |
| | | */ |
| | | public List<EmInspectionPlanItems> selectEmInspectionPlanItemsList(EmInspectionPlanItems emInspectionPlanItems); |
| | | |
| | | /** |
| | | * æ°å¢ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * |
| | | * @param emInspectionPlanItems ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * @return ç»æ |
| | | */ |
| | | public int insertEmInspectionPlanItems(EmInspectionPlanItems emInspectionPlanItems); |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * |
| | | * @param emInspectionPlanItems ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * @return ç»æ |
| | | */ |
| | | public int updateEmInspectionPlanItems(EmInspectionPlanItems emInspectionPlanItems); |
| | | |
| | | /** |
| | | * å é¤ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * |
| | | * @param id ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteEmInspectionPlanItemsById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteEmInspectionPlanItemsByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionPlanItems.service; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.em.inspectionPlanItems.domain.EmInspectionPlanItems; |
| | | |
| | | /** |
| | | * ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åServiceæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-13 |
| | | */ |
| | | public interface IEmInspectionPlanItemsService |
| | | { |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * |
| | | * @param id ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åä¸»é® |
| | | * @return ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | */ |
| | | public EmInspectionPlanItems selectEmInspectionPlanItemsById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åå表 |
| | | * |
| | | * @param emInspectionPlanItems ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * @return ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åéå |
| | | */ |
| | | public List<EmInspectionPlanItems> selectEmInspectionPlanItemsList(EmInspectionPlanItems emInspectionPlanItems); |
| | | |
| | | /** |
| | | * æ°å¢ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * |
| | | * @param emInspectionPlanItems ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * @return ç»æ |
| | | */ |
| | | public int insertEmInspectionPlanItems(EmInspectionPlanItems emInspectionPlanItems); |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * |
| | | * @param emInspectionPlanItems ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * @return ç»æ |
| | | */ |
| | | public int updateEmInspectionPlanItems(EmInspectionPlanItems emInspectionPlanItems); |
| | | |
| | | /** |
| | | * æ¹éå é¤ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * |
| | | * @param ids éè¦å é¤çç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å主é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteEmInspectionPlanItemsByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åä¿¡æ¯ |
| | | * |
| | | * @param id ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteEmInspectionPlanItemsById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionPlanItems.service.impl; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.jcdm.main.em.inspectionPlanItems.mapper.EmInspectionPlanItemsMapper; |
| | | import com.jcdm.main.em.inspectionPlanItems.domain.EmInspectionPlanItems; |
| | | import com.jcdm.main.em.inspectionPlanItems.service.IEmInspectionPlanItemsService; |
| | | |
| | | /** |
| | | * ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åServiceä¸å¡å±å¤ç |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-13 |
| | | */ |
| | | @Service |
| | | public class EmInspectionPlanItemsServiceImpl implements IEmInspectionPlanItemsService |
| | | { |
| | | @Autowired |
| | | private EmInspectionPlanItemsMapper emInspectionPlanItemsMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * |
| | | * @param id ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åä¸»é® |
| | | * @return ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | */ |
| | | @Override |
| | | public EmInspectionPlanItems selectEmInspectionPlanItemsById(Long id) |
| | | { |
| | | return emInspectionPlanItemsMapper.selectEmInspectionPlanItemsById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åå表 |
| | | * |
| | | * @param emInspectionPlanItems ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * @return ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | */ |
| | | @Override |
| | | public List<EmInspectionPlanItems> selectEmInspectionPlanItemsList(EmInspectionPlanItems emInspectionPlanItems) |
| | | { |
| | | return emInspectionPlanItemsMapper.selectEmInspectionPlanItemsList(emInspectionPlanItems); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * |
| | | * @param emInspectionPlanItems ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertEmInspectionPlanItems(EmInspectionPlanItems emInspectionPlanItems) |
| | | { |
| | | emInspectionPlanItems.setCreateTime(DateUtils.getNowDate()); |
| | | return emInspectionPlanItemsMapper.insertEmInspectionPlanItems(emInspectionPlanItems); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * |
| | | * @param emInspectionPlanItems ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateEmInspectionPlanItems(EmInspectionPlanItems emInspectionPlanItems) |
| | | { |
| | | emInspectionPlanItems.setUpdateTime(DateUtils.getNowDate()); |
| | | return emInspectionPlanItemsMapper.updateEmInspectionPlanItems(emInspectionPlanItems); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | * |
| | | * @param ids éè¦å é¤çç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteEmInspectionPlanItemsByIds(Long[] ids) |
| | | { |
| | | return emInspectionPlanItemsMapper.deleteEmInspectionPlanItemsByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åä¿¡æ¯ |
| | | * |
| | | * @param id ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteEmInspectionPlanItemsById(Long id) |
| | | { |
| | | return emInspectionPlanItemsMapper.deleteEmInspectionPlanItemsById(id); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.jcdm.main.em.inspectionPlanArchives.mapper.EmInspectionPlanArchivesMapper"> |
| | | |
| | | <resultMap type="EmInspectionPlanArchives" id="EmInspectionPlanArchivesResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="equipmentCode" column="equipment_code" /> |
| | | <result property="equipmentName" column="equipment_name" /> |
| | | <result property="equipmentBrand" column="equipment_brand" /> |
| | | <result property="equipmentSpec" column="equipment_spec" /> |
| | | <result property="remark" column="remark" /> |
| | | <result property="createUser" column="create_user" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateUser" column="update_user" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="spareField1" column="spare_field_1" /> |
| | | <result property="spareField2" column="spare_field_2" /> |
| | | <result property="spareField3" column="spare_field_3" /> |
| | | <result property="spareField4" column="spare_field_4" /> |
| | | <result property="planCode" column="plan_code" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectEmInspectionPlanArchivesVo"> |
| | | select id, equipment_code, equipment_name, equipment_brand, equipment_spec, remark, create_user, create_time, update_user, update_time, spare_field_1, spare_field_2, spare_field_3, spare_field_4, plan_code from em_inspection_plan_archives |
| | | </sql> |
| | | |
| | | <select id="selectEmInspectionPlanArchivesList" parameterType="EmInspectionPlanArchives" resultMap="EmInspectionPlanArchivesResult"> |
| | | <include refid="selectEmInspectionPlanArchivesVo"/> |
| | | <where> |
| | | <if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if> |
| | | <if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if> |
| | | <if test="equipmentBrand != null and equipmentBrand != ''"> and equipment_brand = #{equipmentBrand}</if> |
| | | <if test="equipmentSpec != null and equipmentSpec != ''"> and equipment_spec = #{equipmentSpec}</if> |
| | | <if test="createUser != null and createUser != ''"> and create_user = #{createUser}</if> |
| | | <if test="updateUser != null and updateUser != ''"> and update_user = #{updateUser}</if> |
| | | <if test="spareField1 != null and spareField1 != ''"> and spare_field_1 = #{spareField1}</if> |
| | | <if test="spareField2 != null and spareField2 != ''"> and spare_field_2 = #{spareField2}</if> |
| | | <if test="spareField3 != null "> and spare_field_3 = #{spareField3}</if> |
| | | <if test="spareField4 != null "> and spare_field_4 = #{spareField4}</if> |
| | | <if test="planCode != null and planCode != ''"> and plan_code = #{planCode}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectEmInspectionPlanArchivesById" parameterType="Long" resultMap="EmInspectionPlanArchivesResult"> |
| | | <include refid="selectEmInspectionPlanArchivesVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertEmInspectionPlanArchives" parameterType="EmInspectionPlanArchives" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into em_inspection_plan_archives |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="equipmentCode != null">equipment_code,</if> |
| | | <if test="equipmentName != null">equipment_name,</if> |
| | | <if test="equipmentBrand != null">equipment_brand,</if> |
| | | <if test="equipmentSpec != null">equipment_spec,</if> |
| | | <if test="remark != null">remark,</if> |
| | | <if test="createUser != null">create_user,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateUser != null">update_user,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="spareField1 != null">spare_field_1,</if> |
| | | <if test="spareField2 != null">spare_field_2,</if> |
| | | <if test="spareField3 != null">spare_field_3,</if> |
| | | <if test="spareField4 != null">spare_field_4,</if> |
| | | <if test="planCode != null">plan_code,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="equipmentCode != null">#{equipmentCode},</if> |
| | | <if test="equipmentName != null">#{equipmentName},</if> |
| | | <if test="equipmentBrand != null">#{equipmentBrand},</if> |
| | | <if test="equipmentSpec != null">#{equipmentSpec},</if> |
| | | <if test="remark != null">#{remark},</if> |
| | | <if test="createUser != null">#{createUser},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateUser != null">#{updateUser},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="spareField1 != null">#{spareField1},</if> |
| | | <if test="spareField2 != null">#{spareField2},</if> |
| | | <if test="spareField3 != null">#{spareField3},</if> |
| | | <if test="spareField4 != null">#{spareField4},</if> |
| | | <if test="planCode != null">#{planCode},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateEmInspectionPlanArchives" parameterType="EmInspectionPlanArchives"> |
| | | update em_inspection_plan_archives |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="equipmentCode != null">equipment_code = #{equipmentCode},</if> |
| | | <if test="equipmentName != null">equipment_name = #{equipmentName},</if> |
| | | <if test="equipmentBrand != null">equipment_brand = #{equipmentBrand},</if> |
| | | <if test="equipmentSpec != null">equipment_spec = #{equipmentSpec},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="createUser != null">create_user = #{createUser},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateUser != null">update_user = #{updateUser},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="spareField1 != null">spare_field_1 = #{spareField1},</if> |
| | | <if test="spareField2 != null">spare_field_2 = #{spareField2},</if> |
| | | <if test="spareField3 != null">spare_field_3 = #{spareField3},</if> |
| | | <if test="spareField4 != null">spare_field_4 = #{spareField4},</if> |
| | | <if test="planCode != null">plan_code = #{planCode},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteEmInspectionPlanArchivesById" parameterType="Long"> |
| | | delete from em_inspection_plan_archives where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteEmInspectionPlanArchivesByIds" parameterType="String"> |
| | | delete from em_inspection_plan_archives where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.jcdm.main.em.inspectionPlanItems.mapper.EmInspectionPlanItemsMapper"> |
| | | |
| | | <resultMap type="EmInspectionPlanItems" id="EmInspectionPlanItemsResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="itemsCode" column="items_code" /> |
| | | <result property="itemsName" column="items_name" /> |
| | | <result property="itemsType" column="items_type" /> |
| | | <result property="standard" column="standard" /> |
| | | <result property="itemsContent" column="items_content" /> |
| | | <result property="createUser" column="create_user" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateUser" column="update_user" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="spareField1" column="spare_field_1" /> |
| | | <result property="spareField2" column="spare_field_2" /> |
| | | <result property="planCode" column="plan_code" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectEmInspectionPlanItemsVo"> |
| | | select id, items_code, items_name, items_type, standard, items_content, create_user, create_time, update_user, update_time, spare_field_1, spare_field_2, plan_code from em_inspection_plan_items |
| | | </sql> |
| | | |
| | | <select id="selectEmInspectionPlanItemsList" parameterType="EmInspectionPlanItems" resultMap="EmInspectionPlanItemsResult"> |
| | | <include refid="selectEmInspectionPlanItemsVo"/> |
| | | <where> |
| | | <if test="itemsCode != null and itemsCode != ''"> and items_code = #{itemsCode}</if> |
| | | <if test="itemsName != null and itemsName != ''"> and items_name like concat('%', #{itemsName}, '%')</if> |
| | | <if test="itemsType != null and itemsType != ''"> and items_type = #{itemsType}</if> |
| | | <if test="standard != null and standard != ''"> and standard = #{standard}</if> |
| | | <if test="itemsContent != null and itemsContent != ''"> and items_content = #{itemsContent}</if> |
| | | <if test="createUser != null and createUser != ''"> and create_user = #{createUser}</if> |
| | | <if test="updateUser != null and updateUser != ''"> and update_user = #{updateUser}</if> |
| | | <if test="spareField1 != null and spareField1 != ''"> and spare_field_1 = #{spareField1}</if> |
| | | <if test="spareField2 != null and spareField2 != ''"> and spare_field_2 = #{spareField2}</if> |
| | | <if test="planCode != null and planCode != ''"> and plan_code = #{planCode}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectEmInspectionPlanItemsById" parameterType="Long" resultMap="EmInspectionPlanItemsResult"> |
| | | <include refid="selectEmInspectionPlanItemsVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertEmInspectionPlanItems" parameterType="EmInspectionPlanItems" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into em_inspection_plan_items |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="itemsCode != null">items_code,</if> |
| | | <if test="itemsName != null">items_name,</if> |
| | | <if test="itemsType != null">items_type,</if> |
| | | <if test="standard != null">standard,</if> |
| | | <if test="itemsContent != null">items_content,</if> |
| | | <if test="createUser != null">create_user,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateUser != null">update_user,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="spareField1 != null">spare_field_1,</if> |
| | | <if test="spareField2 != null">spare_field_2,</if> |
| | | <if test="planCode != null">plan_code,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="itemsCode != null">#{itemsCode},</if> |
| | | <if test="itemsName != null">#{itemsName},</if> |
| | | <if test="itemsType != null">#{itemsType},</if> |
| | | <if test="standard != null">#{standard},</if> |
| | | <if test="itemsContent != null">#{itemsContent},</if> |
| | | <if test="createUser != null">#{createUser},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateUser != null">#{updateUser},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="spareField1 != null">#{spareField1},</if> |
| | | <if test="spareField2 != null">#{spareField2},</if> |
| | | <if test="planCode != null">#{planCode},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateEmInspectionPlanItems" parameterType="EmInspectionPlanItems"> |
| | | update em_inspection_plan_items |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="itemsCode != null">items_code = #{itemsCode},</if> |
| | | <if test="itemsName != null">items_name = #{itemsName},</if> |
| | | <if test="itemsType != null">items_type = #{itemsType},</if> |
| | | <if test="standard != null">standard = #{standard},</if> |
| | | <if test="itemsContent != null">items_content = #{itemsContent},</if> |
| | | <if test="createUser != null">create_user = #{createUser},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateUser != null">update_user = #{updateUser},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="spareField1 != null">spare_field_1 = #{spareField1},</if> |
| | | <if test="spareField2 != null">spare_field_2 = #{spareField2},</if> |
| | | <if test="planCode != null">plan_code = #{planCode},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteEmInspectionPlanItemsById" parameterType="Long"> |
| | | delete from em_inspection_plan_items where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteEmInspectionPlanItemsByIds" parameterType="String"> |
| | | delete from em_inspection_plan_items where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢ç¹æ£ä¿å
»è®¡å设å¤æ¸
åå表 |
| | | export function listInspectionPlanArchives(query) { |
| | | return request({ |
| | | url: '/em/inspectionPlanArchives/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢ç¹æ£ä¿å
»è®¡å设å¤æ¸
åè¯¦ç» |
| | | export function getInspectionPlanArchives(id) { |
| | | return request({ |
| | | url: '/em/inspectionPlanArchives/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | export function addInspectionPlanArchives(data) { |
| | | return request({ |
| | | url: '/em/inspectionPlanArchives', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | export function updateInspectionPlanArchives(data) { |
| | | return request({ |
| | | url: '/em/inspectionPlanArchives', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤ç¹æ£ä¿å
»è®¡å设å¤æ¸
å |
| | | export function delInspectionPlanArchives(id) { |
| | | return request({ |
| | | url: '/em/inspectionPlanArchives/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åå表 |
| | | export function listInspectionPlanItems(query) { |
| | | return request({ |
| | | url: '/em/inspectionPlanItems/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®åè¯¦ç» |
| | | export function getInspectionPlanItems(id) { |
| | | return request({ |
| | | url: '/em/inspectionPlanItems/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | export function addInspectionPlanItems(data) { |
| | | return request({ |
| | | url: '/em/inspectionPlanItems', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | export function updateInspectionPlanItems(data) { |
| | | return request({ |
| | | url: '/em/inspectionPlanItems', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤ç¹æ£ä¿å
»è®¡åç¹æ£é¡¹ç®å |
| | | export function delInspectionPlanItems(id) { |
| | | return request({ |
| | | url: '/em/inspectionPlanItems/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog title="设å¤éæ©" |
| | | v-if="showFlag" |
| | | :visible.sync="showFlag" |
| | | :modal= false |
| | | width="80%" |
| | | center |
| | | > |
| | | <el-row :gutter="20"> |
| | | <!--设å¤æ°æ®--> |
| | | <el-col :span="20" :xs="24"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="设å¤ç¼ç " prop="machineryCode"> |
| | | <el-input |
| | | v-model="queryParams.equipmentCode" |
| | | placeholder="请è¾å
¥è®¾å¤ç¼ç " |
| | | clearable |
| | | style="width: 240px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤å称" prop="machineryName"> |
| | | <el-input |
| | | v-model="queryParams.equipmentName" |
| | | placeholder="请è¾å
¥è®¾å¤å称" |
| | | clearable |
| | | style="width: 240px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table v-loading="loading" :data="machineryList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="50" align="center" /> |
| | | <el-table-column label="设å¤ç¼ç " align="center" prop="equipmentCode"/> |
| | | <el-table-column label="设å¤å称" align="center" prop="equipmentName" /> |
| | | <el-table-column label="åç" align="center" prop="equipmentBrand" /> |
| | | <el-table-column label="è§æ ¼åå·" align="center" prop="equipmentSpec" /> |
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime" width="160"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.createTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | </el-col> |
| | | </el-row> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="confirmSelect">ç¡® å®</el-button> |
| | | <el-button @click="showFlag=false">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { listEquipmentArchives, getEquipmentArchives, delEquipmentArchives, addEquipmentArchives, updateEquipmentArchives } from "@/api/main/em/equipmentArchives/equipmentArchives"; |
| | | |
| | | |
| | | export default { |
| | | name: "MachinerySelect", |
| | | dicts: ['sys_yes_no','mes_machinery_status'], |
| | | components: { }, |
| | | data() { |
| | | return { |
| | | showFlag: false, |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | selectedRows: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // ç©æ产åè¡¨æ ¼æ°æ® |
| | | machineryList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // 设å¤ç±»åæ é项 |
| | | machineryTypeOptions: [], |
| | | //车é´é项 |
| | | workshopOptions:[], |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | //èªå¨çæç©æç¼ç æ è¯ |
| | | autoGenFlag: false, |
| | | // 表ååæ° |
| | | form: {}, |
| | | defaultProps: { |
| | | children: "children", |
| | | }, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | equipmentCode: null, |
| | | equipmentName: null, |
| | | equipmentBrand: null, |
| | | equipmentSpec: null, |
| | | workshopId: null, |
| | | workshopCode: null, |
| | | workshopName: null, |
| | | status: null |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢ç©æç¼ç å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listEquipmentArchives(this.queryParams).then(response => { |
| | | this.machineryList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | |
| | | }, |
| | | ); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡éä¸æ°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.machineryId); |
| | | this.selectedRows = selection; |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | }, |
| | | //ç¡®å®éä¸ |
| | | confirmSelect(){ |
| | | if(this.ids ==[] || this.ids.length==0){ |
| | | this.$notify({ |
| | | title:'æ示', |
| | | type:'warning', |
| | | message: '请è³å°éæ©ä¸æ¡æ°æ®!' |
| | | }); |
| | | return; |
| | | } |
| | | this.$emit('onSelected',this.selectedRows); |
| | | this.showFlag = false; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog title="设å¤éæ©" |
| | | v-if="showFlag" |
| | | :visible.sync="showFlag" |
| | | :modal= false |
| | | width="80%" |
| | | center |
| | | > |
| | | <el-row :gutter="20"> |
| | | <!--设å¤æ°æ®--> |
| | | <el-col :span="20" :xs="24"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="设å¤ç¼ç " prop="machineryCode"> |
| | | <el-input |
| | | v-model="queryParams.equipmentCode" |
| | | placeholder="请è¾å
¥è®¾å¤ç¼ç " |
| | | clearable |
| | | style="width: 240px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤å称" prop="machineryName"> |
| | | <el-input |
| | | v-model="queryParams.equipmentName" |
| | | placeholder="请è¾å
¥è®¾å¤å称" |
| | | clearable |
| | | style="width: 240px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table v-loading="loading" :data="dvsubjectList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="项ç®å称" align="center" prop="itemsName"> |
| | | </el-table-column> |
| | | <el-table-column label="项ç®ç¼å·" align="center" prop="itemsCode"> |
| | | </el-table-column> |
| | | <el-table-column label="项ç®ç±»å" align="center" prop="itemsType"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.spotmaintenance" :value="scope.row.itemsType"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="项ç®å
容" align="center" prop="itemsContent"> |
| | | </el-table-column> |
| | | <el-table-column label="æ å" align="center" prop="standard"> |
| | | </el-table-column> |
| | | <el-table-column label="å建人" align="center" prop="createUser"> |
| | | </el-table-column> |
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime"> |
| | | </el-table-column> |
| | | <el-table-column label="æ´æ°äºº" align="center" prop="updateUser"> |
| | | </el-table-column> |
| | | <el-table-column label="æ´æ°æ¶é´" align="center" prop="updateTime"> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | </el-col> |
| | | </el-row> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="confirmSelect">ç¡® å®</el-button> |
| | | <el-button @click="showFlag=false">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { listInspectionItems, getInspectionItems, delInspectionItems, addInspectionItems, updateInspectionItems } from "@/api/main/em/inspectionItems/inspectionItems"; |
| | | |
| | | |
| | | export default { |
| | | name: "DvsubjectSelect", |
| | | dicts: ['sys_yes_no','mes_machinery_status','spotmaintenance'], |
| | | components: { }, |
| | | data() { |
| | | return { |
| | | showFlag:false, |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç»s |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // 设å¤ç¹æ£ä¿å
»é¡¹ç®è¡¨æ ¼æ°æ® |
| | | dvsubjectList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | itemsCode: null, |
| | | itemsName: null, |
| | | itemsType: null, |
| | | standard: null, |
| | | itemsContent: null, |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢ç¹æ£é¡¹ç®å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listInspectionItems(this.queryParams).then(response => { |
| | | this.dvsubjectList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | |
| | | }, |
| | | ); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡éä¸æ°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.machineryId); |
| | | this.selectedRows = selection; |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | }, |
| | | //ç¡®å®éä¸ |
| | | confirmSelect(){ |
| | | if(this.ids ==[] || this.ids.length==0){ |
| | | this.$notify({ |
| | | title:'æ示', |
| | | type:'warning', |
| | | message: '请è³å°éæ©ä¸æ¡æ°æ®!' |
| | | }); |
| | | return; |
| | | } |
| | | this.$emit('onSelected',this.selectedRows); |
| | | this.showFlag = false; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <el-input style="width: 1000px" v-model="form.remarks" placeholder="请è¾å
¥å¤æ³¨" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-tabs type="border-card" > |
| | | <el-tab-pane label="设å¤æ¸
å" > |
| | | <Checkmachinery ref="machinerylist"></Checkmachinery> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="ç¹æ£é¡¹ç®"> |
| | | <Checksubject ref="subjectlist"></Checksubject> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <el-divider></el-divider> |
| | | <el-button type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listInspectionPlan, getInspectionPlan, delInspectionPlan, addInspectionPlan, updateInspectionPlan } from "@/api/main/em/inspectionPlan/inspectionPlan"; |
| | | import Checkmachinery from "./machinery.vue" |
| | | import Checksubject from "./subject.vue" |
| | | |
| | | export default { |
| | | name: "InspectionPlan", |
| | | dicts: ['plan_status','plan_type','dimension'], |
| | | dicts: ['plan_status','plan_type'], |
| | | components:{Checkmachinery,Checksubject}, |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | titleName: "", |
| | | optType: null, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['mes:dv:checkplan:add']" |
| | | >æ°å¢</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['mes:dv:checkplan:remove']" |
| | | >å é¤</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <MachinerySelect ref="machinerySelect" @onSelected="onMachineryAdd"></MachinerySelect> |
| | | <el-table v-loading="loading" :data="checkmachineryList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="设å¤ç¼ç " align="center" prop="equipmentCode" /> |
| | | <el-table-column label="设å¤å称" align="center" prop="equipmentName" /> |
| | | <el-table-column label="åç" align="center" prop="equipmentBrand" /> |
| | | <el-table-column label="è§æ ¼åå·" align="center" prop="equipmentSpec" /> |
| | | <el-table-column label="å¤æ³¨" align="center" prop="remark" /> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listInspectionPlanArchives, delInspectionPlanArchives, addInspectionPlanArchives} from "@/api/main/em/inspectionPlanArchives/inspectionPlanArchives"; |
| | | import MachinerySelect from "@/components/inspectionPlanArchives/index.vue"; |
| | | export default { |
| | | name: "Checkmachinery", |
| | | components:{MachinerySelect}, |
| | | props:{ |
| | | planId: null, |
| | | optType: null |
| | | }, |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // ç¹æ£è®¾å¤è¡¨æ ¼æ°æ® |
| | | checkmachineryList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | planId: this.planId, |
| | | equipmentId: null, |
| | | equipmentCode: null, |
| | | equipmentName: null, |
| | | equipmentBrand: null, |
| | | equipmentSpec: null, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢ç¹æ£è®¾å¤å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listInspectionPlanArchives(this.queryParams).then(response => { |
| | | this.checkmachineryList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | // å¤éæ¡éä¸æ°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.recordId) |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.$refs.machinerySelect.showFlag = true; |
| | | }, |
| | | //设å¤èµæºéæ©åè° |
| | | onMachineryAdd(rows){ |
| | | if(rows !=null && rows.length >0){ |
| | | rows.forEach(row => { |
| | | row.planId = this.planId; |
| | | addInspectionPlanArchives(row).then(response =>{ |
| | | this.getList(); |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const recordIds = row.recordId || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤ç¹æ£è®¾å¤ç¼å·ä¸º"' + recordIds + '"çæ°æ®é¡¹ï¼').then(function() { |
| | | return delInspectionPlanArchives(recordIds); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['mes:dv:checkplan:add']" |
| | | >æ°å¢</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['mes:dv:checkplan:remove']" |
| | | >å é¤</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <DvsubjectSelect ref="subjectSelect" @onSelected="onSubjectSelected"></DvsubjectSelect> |
| | | <el-table v-loading="loading" :data="checksubjectList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="项ç®ç¼ç " align="center" prop="itemsCode" /> |
| | | <el-table-column label="项ç®å称" align="center" prop="itemsName" /> |
| | | <el-table-column label="项ç®ç±»å" align="center" prop="itemsType"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.spotmaintenance" :value="scope.row.itemsType"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="项ç®å
容" align="center" width="300px" prop="itemsContent" /> |
| | | <el-table-column label="æ å" align="center" width="300px" prop="standard" /> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {listInspectionPlanItems,delInspectionPlanItems,addInspectionPlanItems} from "@/api/main/em/inspectionPlanItems/inspectionPlanItems"; |
| | | import DvsubjectSelect from "@/components/inspectionPlanItems/index.vue" |
| | | export default { |
| | | name: "Checksubject", |
| | | props:{ |
| | | planId: null, |
| | | optType: null |
| | | }, |
| | | dicts: ['spotmaintenance'], |
| | | components:{DvsubjectSelect}, |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | selectedRows: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // ç¹æ£é¡¹ç®è¡¨æ ¼æ°æ® |
| | | checksubjectList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | planId: this.planId, |
| | | itemsCode: null, |
| | | itemsName: null, |
| | | itemsType: null, |
| | | standard: null, |
| | | itemsContent: null, |
| | | }, |
| | | // 表ååæ° |
| | | form: {} |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢ç¹æ£é¡¹ç®å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listInspectionPlanItems(this.queryParams).then(response => { |
| | | this.checksubjectList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | console.log(response.rows) |
| | | }); |
| | | }, |
| | | // å¤éæ¡éä¸æ°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.recordId) |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.$refs.subjectSelect.showFlag = true; |
| | | }, |
| | | onSubjectSelected(rows){ |
| | | if(rows != null && rows.length >0){ |
| | | rows.forEach(row => { |
| | | row.planId= this.planId; |
| | | addInspectionPlanItems(row).then(response => { |
| | | this.getList(); |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const recordIds = row.recordId || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤ç¹æ£é¡¹ç®ç¼å·ä¸º"' + recordIds + '"çæ°æ®é¡¹ï¼').then(function() { |
| | | return delInspectionPlanItems(recordIds); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | |
| | | } |
| | | }; |
| | | </script> |