¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionItems.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.inspectionItems.domain.EmInspectionItems; |
| | | import com.jcdm.main.em.inspectionItems.service.IEmInspectionItemsService; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * ç¹æ£ä¿å
»é¡¹ç®Controller |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-08 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/em/inspectionItems") |
| | | public class EmInspectionItemsController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IEmInspectionItemsService emInspectionItemsService; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»é¡¹ç®å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionItems:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(EmInspectionItems emInspectionItems) |
| | | { |
| | | startPage(); |
| | | List<EmInspectionItems> list = emInspectionItemsService.selectEmInspectionItemsList(emInspectionItems); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºç¹æ£ä¿å
»é¡¹ç®å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionItems:export')") |
| | | @Log(title = "ç¹æ£ä¿å
»é¡¹ç®", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, EmInspectionItems emInspectionItems) |
| | | { |
| | | List<EmInspectionItems> list = emInspectionItemsService.selectEmInspectionItemsList(emInspectionItems); |
| | | ExcelUtil<EmInspectionItems> util = new ExcelUtil<EmInspectionItems>(EmInspectionItems.class); |
| | | util.exportExcel(response, list, "ç¹æ£ä¿å
»é¡¹ç®æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åç¹æ£ä¿å
»é¡¹ç®è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionItems:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(emInspectionItemsService.selectEmInspectionItemsById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç¹æ£ä¿å
»é¡¹ç® |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionItems:add')") |
| | | @Log(title = "ç¹æ£ä¿å
»é¡¹ç®", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody EmInspectionItems emInspectionItems) |
| | | { |
| | | return toAjax(emInspectionItemsService.insertEmInspectionItems(emInspectionItems)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¹æ£ä¿å
»é¡¹ç® |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionItems:edit')") |
| | | @Log(title = "ç¹æ£ä¿å
»é¡¹ç®", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody EmInspectionItems emInspectionItems) |
| | | { |
| | | return toAjax(emInspectionItemsService.updateEmInspectionItems(emInspectionItems)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç¹æ£ä¿å
»é¡¹ç® |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionItems:remove')") |
| | | @Log(title = "ç¹æ£ä¿å
»é¡¹ç®", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(emInspectionItemsService.deleteEmInspectionItemsByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionItems.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_items |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-08 |
| | | */ |
| | | public class EmInspectionItems 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 status; |
| | | |
| | | /** æ å */ |
| | | @Excel(name = "æ å") |
| | | private String standard; |
| | | |
| | | /** 项ç®å
容 */ |
| | | @Excel(name = "项ç®å
容") |
| | | private String itemsContent; |
| | | |
| | | /** å建人 */ |
| | | @Excel(name = "å建人") |
| | | private String createUser; |
| | | |
| | | /** æ´æ°äºº */ |
| | | @Excel(name = "æ´æ°äºº") |
| | | private String updateUser; |
| | | |
| | | /** é¢çå段1 */ |
| | | private String spareField1; |
| | | |
| | | /** é¢çå段2 */ |
| | | private String spareField2; |
| | | |
| | | 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 setStatus(String status) |
| | | { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getStatus() |
| | | { |
| | | return status; |
| | | } |
| | | 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; |
| | | } |
| | | |
| | | @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("status", getStatus()) |
| | | .append("standard", getStandard()) |
| | | .append("itemsContent", getItemsContent()) |
| | | .append("remark", getRemark()) |
| | | .append("createUser", getCreateUser()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateUser", getUpdateUser()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("spareField1", getSpareField1()) |
| | | .append("spareField2", getSpareField2()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionItems.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.em.inspectionItems.domain.EmInspectionItems; |
| | | |
| | | /** |
| | | * ç¹æ£ä¿å
»é¡¹ç®Mapperæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-08 |
| | | */ |
| | | public interface EmInspectionItemsMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»é¡¹ç® |
| | | * |
| | | * @param id ç¹æ£ä¿å
»é¡¹ç®ä¸»é® |
| | | * @return ç¹æ£ä¿å
»é¡¹ç® |
| | | */ |
| | | public EmInspectionItems selectEmInspectionItemsById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»é¡¹ç®å表 |
| | | * |
| | | * @param emInspectionItems ç¹æ£ä¿å
»é¡¹ç® |
| | | * @return ç¹æ£ä¿å
»é¡¹ç®éå |
| | | */ |
| | | public List<EmInspectionItems> selectEmInspectionItemsList(EmInspectionItems emInspectionItems); |
| | | |
| | | /** |
| | | * æ°å¢ç¹æ£ä¿å
»é¡¹ç® |
| | | * |
| | | * @param emInspectionItems ç¹æ£ä¿å
»é¡¹ç® |
| | | * @return ç»æ |
| | | */ |
| | | public int insertEmInspectionItems(EmInspectionItems emInspectionItems); |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¹æ£ä¿å
»é¡¹ç® |
| | | * |
| | | * @param emInspectionItems ç¹æ£ä¿å
»é¡¹ç® |
| | | * @return ç»æ |
| | | */ |
| | | public int updateEmInspectionItems(EmInspectionItems emInspectionItems); |
| | | |
| | | /** |
| | | * å é¤ç¹æ£ä¿å
»é¡¹ç® |
| | | * |
| | | * @param id ç¹æ£ä¿å
»é¡¹ç®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteEmInspectionItemsById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ç¹æ£ä¿å
»é¡¹ç® |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteEmInspectionItemsByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionItems.service; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.em.inspectionItems.domain.EmInspectionItems; |
| | | |
| | | /** |
| | | * ç¹æ£ä¿å
»é¡¹ç®Serviceæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-08 |
| | | */ |
| | | public interface IEmInspectionItemsService |
| | | { |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»é¡¹ç® |
| | | * |
| | | * @param id ç¹æ£ä¿å
»é¡¹ç®ä¸»é® |
| | | * @return ç¹æ£ä¿å
»é¡¹ç® |
| | | */ |
| | | public EmInspectionItems selectEmInspectionItemsById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»é¡¹ç®å表 |
| | | * |
| | | * @param emInspectionItems ç¹æ£ä¿å
»é¡¹ç® |
| | | * @return ç¹æ£ä¿å
»é¡¹ç®éå |
| | | */ |
| | | public List<EmInspectionItems> selectEmInspectionItemsList(EmInspectionItems emInspectionItems); |
| | | |
| | | /** |
| | | * æ°å¢ç¹æ£ä¿å
»é¡¹ç® |
| | | * |
| | | * @param emInspectionItems ç¹æ£ä¿å
»é¡¹ç® |
| | | * @return ç»æ |
| | | */ |
| | | public int insertEmInspectionItems(EmInspectionItems emInspectionItems); |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¹æ£ä¿å
»é¡¹ç® |
| | | * |
| | | * @param emInspectionItems ç¹æ£ä¿å
»é¡¹ç® |
| | | * @return ç»æ |
| | | */ |
| | | public int updateEmInspectionItems(EmInspectionItems emInspectionItems); |
| | | |
| | | /** |
| | | * æ¹éå é¤ç¹æ£ä¿å
»é¡¹ç® |
| | | * |
| | | * @param ids éè¦å é¤çç¹æ£ä¿å
»é¡¹ç®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteEmInspectionItemsByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤ç¹æ£ä¿å
»é¡¹ç®ä¿¡æ¯ |
| | | * |
| | | * @param id ç¹æ£ä¿å
»é¡¹ç®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteEmInspectionItemsById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionItems.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.inspectionItems.mapper.EmInspectionItemsMapper; |
| | | import com.jcdm.main.em.inspectionItems.domain.EmInspectionItems; |
| | | import com.jcdm.main.em.inspectionItems.service.IEmInspectionItemsService; |
| | | |
| | | /** |
| | | * ç¹æ£ä¿å
»é¡¹ç®Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-08 |
| | | */ |
| | | @Service |
| | | public class EmInspectionItemsServiceImpl implements IEmInspectionItemsService |
| | | { |
| | | @Autowired |
| | | private EmInspectionItemsMapper emInspectionItemsMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»é¡¹ç® |
| | | * |
| | | * @param id ç¹æ£ä¿å
»é¡¹ç®ä¸»é® |
| | | * @return ç¹æ£ä¿å
»é¡¹ç® |
| | | */ |
| | | @Override |
| | | public EmInspectionItems selectEmInspectionItemsById(Long id) |
| | | { |
| | | return emInspectionItemsMapper.selectEmInspectionItemsById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»é¡¹ç®å表 |
| | | * |
| | | * @param emInspectionItems ç¹æ£ä¿å
»é¡¹ç® |
| | | * @return ç¹æ£ä¿å
»é¡¹ç® |
| | | */ |
| | | @Override |
| | | public List<EmInspectionItems> selectEmInspectionItemsList(EmInspectionItems emInspectionItems) |
| | | { |
| | | return emInspectionItemsMapper.selectEmInspectionItemsList(emInspectionItems); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç¹æ£ä¿å
»é¡¹ç® |
| | | * |
| | | * @param emInspectionItems ç¹æ£ä¿å
»é¡¹ç® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertEmInspectionItems(EmInspectionItems emInspectionItems) |
| | | { |
| | | emInspectionItems.setCreateTime(DateUtils.getNowDate()); |
| | | return emInspectionItemsMapper.insertEmInspectionItems(emInspectionItems); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¹æ£ä¿å
»é¡¹ç® |
| | | * |
| | | * @param emInspectionItems ç¹æ£ä¿å
»é¡¹ç® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateEmInspectionItems(EmInspectionItems emInspectionItems) |
| | | { |
| | | emInspectionItems.setUpdateTime(DateUtils.getNowDate()); |
| | | return emInspectionItemsMapper.updateEmInspectionItems(emInspectionItems); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ç¹æ£ä¿å
»é¡¹ç® |
| | | * |
| | | * @param ids éè¦å é¤çç¹æ£ä¿å
»é¡¹ç®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteEmInspectionItemsByIds(Long[] ids) |
| | | { |
| | | return emInspectionItemsMapper.deleteEmInspectionItemsByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç¹æ£ä¿å
»é¡¹ç®ä¿¡æ¯ |
| | | * |
| | | * @param id ç¹æ£ä¿å
»é¡¹ç®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteEmInspectionItemsById(Long id) |
| | | { |
| | | return emInspectionItemsMapper.deleteEmInspectionItemsById(id); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionPlan.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.inspectionPlan.domain.EmInspectionPlan; |
| | | import com.jcdm.main.em.inspectionPlan.service.IEmInspectionPlanService; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * ç¹æ£ä¿å
»è®¡åController |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-08 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/em/inspectionPlan") |
| | | public class EmInspectionPlanController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IEmInspectionPlanService emInspectionPlanService; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡åå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionPlan:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(EmInspectionPlan emInspectionPlan) |
| | | { |
| | | startPage(); |
| | | List<EmInspectionPlan> list = emInspectionPlanService.selectEmInspectionPlanList(emInspectionPlan); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºç¹æ£ä¿å
»è®¡åå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionPlan:export')") |
| | | @Log(title = "ç¹æ£ä¿å
»è®¡å", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, EmInspectionPlan emInspectionPlan) |
| | | { |
| | | List<EmInspectionPlan> list = emInspectionPlanService.selectEmInspectionPlanList(emInspectionPlan); |
| | | ExcelUtil<EmInspectionPlan> util = new ExcelUtil<EmInspectionPlan>(EmInspectionPlan.class); |
| | | util.exportExcel(response, list, "ç¹æ£ä¿å
»è®¡åæ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åç¹æ£ä¿å
»è®¡å详ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionPlan:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(emInspectionPlanService.selectEmInspectionPlanById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç¹æ£ä¿å
»è®¡å |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionPlan:add')") |
| | | @Log(title = "ç¹æ£ä¿å
»è®¡å", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody EmInspectionPlan emInspectionPlan) |
| | | { |
| | | return toAjax(emInspectionPlanService.insertEmInspectionPlan(emInspectionPlan)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¹æ£ä¿å
»è®¡å |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionPlan:edit')") |
| | | @Log(title = "ç¹æ£ä¿å
»è®¡å", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody EmInspectionPlan emInspectionPlan) |
| | | { |
| | | return toAjax(emInspectionPlanService.updateEmInspectionPlan(emInspectionPlan)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç¹æ£ä¿å
»è®¡å |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('em:inspectionPlan:remove')") |
| | | @Log(title = "ç¹æ£ä¿å
»è®¡å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(emInspectionPlanService.deleteEmInspectionPlanByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionPlan.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 |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-08 |
| | | */ |
| | | public class EmInspectionPlan extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** ID */ |
| | | private Long id; |
| | | |
| | | /** 计åç¼å· */ |
| | | @Excel(name = "计åç¼å·") |
| | | private String planCode; |
| | | |
| | | /** 计åå称 */ |
| | | @Excel(name = "计åå称") |
| | | private String planName; |
| | | |
| | | /** 计åç±»å */ |
| | | @Excel(name = "计åç±»å") |
| | | private String planType; |
| | | |
| | | /** ç¶æ */ |
| | | @Excel(name = "ç¶æ") |
| | | private String state; |
| | | |
| | | /** é¢ç */ |
| | | @Excel(name = "é¢ç") |
| | | private String frequency; |
| | | |
| | | /** 维度 */ |
| | | @Excel(name = "维度") |
| | | private String dimension; |
| | | |
| | | /** ä¸æ¬¡çææ¶é´ */ |
| | | @Excel(name = "ä¸æ¬¡çææ¶é´") |
| | | private String lastGenerationTime; |
| | | |
| | | /** å¼å§æ¶é´ */ |
| | | @Excel(name = "å¼å§æ¶é´") |
| | | private String startTime; |
| | | |
| | | /** ç»ææ¶é´ */ |
| | | @Excel(name = "ç»ææ¶é´") |
| | | private String endTime; |
| | | |
| | | /** 设å¤æ¸
å */ |
| | | private String devices; |
| | | |
| | | /** ç¹æ£é¡¹ç® */ |
| | | private String inspectionItems; |
| | | |
| | | /** å¤æ³¨ */ |
| | | @Excel(name = "å¤æ³¨") |
| | | private String remarks; |
| | | |
| | | /** å建人 */ |
| | | @Excel(name = "å建人") |
| | | private String createUser; |
| | | |
| | | /** ä¿®æ¹äºº */ |
| | | @Excel(name = "ä¿®æ¹äºº") |
| | | private String updateUser; |
| | | |
| | | /** é¢çå段1 */ |
| | | private String spareField1; |
| | | |
| | | /** é¢çå段2 */ |
| | | private String spareField2; |
| | | |
| | | /** é¢çå段3 */ |
| | | private String spareField3; |
| | | |
| | | /** é¢çå段4 */ |
| | | private String spareField4; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setPlanCode(String planCode) |
| | | { |
| | | this.planCode = planCode; |
| | | } |
| | | |
| | | public String getPlanCode() |
| | | { |
| | | return planCode; |
| | | } |
| | | public void setPlanName(String planName) |
| | | { |
| | | this.planName = planName; |
| | | } |
| | | |
| | | public String getPlanName() |
| | | { |
| | | return planName; |
| | | } |
| | | public void setPlanType(String planType) |
| | | { |
| | | this.planType = planType; |
| | | } |
| | | |
| | | public String getPlanType() |
| | | { |
| | | return planType; |
| | | } |
| | | public void setState(String state) |
| | | { |
| | | this.state = state; |
| | | } |
| | | |
| | | public String getState() |
| | | { |
| | | return state; |
| | | } |
| | | public void setFrequency(String frequency) |
| | | { |
| | | this.frequency = frequency; |
| | | } |
| | | |
| | | public String getFrequency() |
| | | { |
| | | return frequency; |
| | | } |
| | | public void setDimension(String dimension) |
| | | { |
| | | this.dimension = dimension; |
| | | } |
| | | |
| | | public String getDimension() |
| | | { |
| | | return dimension; |
| | | } |
| | | public void setLastGenerationTime(String lastGenerationTime) |
| | | { |
| | | this.lastGenerationTime = lastGenerationTime; |
| | | } |
| | | |
| | | public String getLastGenerationTime() |
| | | { |
| | | return lastGenerationTime; |
| | | } |
| | | public void setStartTime(String startTime) |
| | | { |
| | | this.startTime = startTime; |
| | | } |
| | | |
| | | public String getStartTime() |
| | | { |
| | | return startTime; |
| | | } |
| | | public void setEndTime(String endTime) |
| | | { |
| | | this.endTime = endTime; |
| | | } |
| | | |
| | | public String getEndTime() |
| | | { |
| | | return endTime; |
| | | } |
| | | public void setDevices(String devices) |
| | | { |
| | | this.devices = devices; |
| | | } |
| | | |
| | | public String getDevices() |
| | | { |
| | | return devices; |
| | | } |
| | | public void setInspectionItems(String inspectionItems) |
| | | { |
| | | this.inspectionItems = inspectionItems; |
| | | } |
| | | |
| | | public String getInspectionItems() |
| | | { |
| | | return inspectionItems; |
| | | } |
| | | public void setRemarks(String remarks) |
| | | { |
| | | this.remarks = remarks; |
| | | } |
| | | |
| | | public String getRemarks() |
| | | { |
| | | return remarks; |
| | | } |
| | | 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(String spareField3) |
| | | { |
| | | this.spareField3 = spareField3; |
| | | } |
| | | |
| | | public String getSpareField3() |
| | | { |
| | | return spareField3; |
| | | } |
| | | public void setSpareField4(String spareField4) |
| | | { |
| | | this.spareField4 = spareField4; |
| | | } |
| | | |
| | | public String getSpareField4() |
| | | { |
| | | return spareField4; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("planCode", getPlanCode()) |
| | | .append("planName", getPlanName()) |
| | | .append("planType", getPlanType()) |
| | | .append("state", getState()) |
| | | .append("frequency", getFrequency()) |
| | | .append("dimension", getDimension()) |
| | | .append("lastGenerationTime", getLastGenerationTime()) |
| | | .append("startTime", getStartTime()) |
| | | .append("endTime", getEndTime()) |
| | | .append("devices", getDevices()) |
| | | .append("inspectionItems", getInspectionItems()) |
| | | .append("remarks", getRemarks()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("createUser", getCreateUser()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("updateUser", getUpdateUser()) |
| | | .append("spareField1", getSpareField1()) |
| | | .append("spareField2", getSpareField2()) |
| | | .append("spareField3", getSpareField3()) |
| | | .append("spareField4", getSpareField4()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionPlan.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.em.inspectionPlan.domain.EmInspectionPlan; |
| | | |
| | | /** |
| | | * ç¹æ£ä¿å
»è®¡åMapperæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-08 |
| | | */ |
| | | public interface EmInspectionPlanMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡å |
| | | * |
| | | * @param id ç¹æ£ä¿å
»è®¡åä¸»é® |
| | | * @return ç¹æ£ä¿å
»è®¡å |
| | | */ |
| | | public EmInspectionPlan selectEmInspectionPlanById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡åå表 |
| | | * |
| | | * @param emInspectionPlan ç¹æ£ä¿å
»è®¡å |
| | | * @return ç¹æ£ä¿å
»è®¡åéå |
| | | */ |
| | | public List<EmInspectionPlan> selectEmInspectionPlanList(EmInspectionPlan emInspectionPlan); |
| | | |
| | | /** |
| | | * æ°å¢ç¹æ£ä¿å
»è®¡å |
| | | * |
| | | * @param emInspectionPlan ç¹æ£ä¿å
»è®¡å |
| | | * @return ç»æ |
| | | */ |
| | | public int insertEmInspectionPlan(EmInspectionPlan emInspectionPlan); |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¹æ£ä¿å
»è®¡å |
| | | * |
| | | * @param emInspectionPlan ç¹æ£ä¿å
»è®¡å |
| | | * @return ç»æ |
| | | */ |
| | | public int updateEmInspectionPlan(EmInspectionPlan emInspectionPlan); |
| | | |
| | | /** |
| | | * å é¤ç¹æ£ä¿å
»è®¡å |
| | | * |
| | | * @param id ç¹æ£ä¿å
»è®¡åä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteEmInspectionPlanById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ç¹æ£ä¿å
»è®¡å |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteEmInspectionPlanByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionPlan.service; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.em.inspectionPlan.domain.EmInspectionPlan; |
| | | |
| | | /** |
| | | * ç¹æ£ä¿å
»è®¡åServiceæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-08 |
| | | */ |
| | | public interface IEmInspectionPlanService |
| | | { |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡å |
| | | * |
| | | * @param id ç¹æ£ä¿å
»è®¡åä¸»é® |
| | | * @return ç¹æ£ä¿å
»è®¡å |
| | | */ |
| | | public EmInspectionPlan selectEmInspectionPlanById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡åå表 |
| | | * |
| | | * @param emInspectionPlan ç¹æ£ä¿å
»è®¡å |
| | | * @return ç¹æ£ä¿å
»è®¡åéå |
| | | */ |
| | | public List<EmInspectionPlan> selectEmInspectionPlanList(EmInspectionPlan emInspectionPlan); |
| | | |
| | | /** |
| | | * æ°å¢ç¹æ£ä¿å
»è®¡å |
| | | * |
| | | * @param emInspectionPlan ç¹æ£ä¿å
»è®¡å |
| | | * @return ç»æ |
| | | */ |
| | | public int insertEmInspectionPlan(EmInspectionPlan emInspectionPlan); |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¹æ£ä¿å
»è®¡å |
| | | * |
| | | * @param emInspectionPlan ç¹æ£ä¿å
»è®¡å |
| | | * @return ç»æ |
| | | */ |
| | | public int updateEmInspectionPlan(EmInspectionPlan emInspectionPlan); |
| | | |
| | | /** |
| | | * æ¹éå é¤ç¹æ£ä¿å
»è®¡å |
| | | * |
| | | * @param ids éè¦å é¤çç¹æ£ä¿å
»è®¡å主é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteEmInspectionPlanByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤ç¹æ£ä¿å
»è®¡åä¿¡æ¯ |
| | | * |
| | | * @param id ç¹æ£ä¿å
»è®¡åä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteEmInspectionPlanById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.em.inspectionPlan.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.inspectionPlan.mapper.EmInspectionPlanMapper; |
| | | import com.jcdm.main.em.inspectionPlan.domain.EmInspectionPlan; |
| | | import com.jcdm.main.em.inspectionPlan.service.IEmInspectionPlanService; |
| | | |
| | | /** |
| | | * ç¹æ£ä¿å
»è®¡åServiceä¸å¡å±å¤ç |
| | | * |
| | | * @author Yi |
| | | * @date 2024-03-08 |
| | | */ |
| | | @Service |
| | | public class EmInspectionPlanServiceImpl implements IEmInspectionPlanService |
| | | { |
| | | @Autowired |
| | | private EmInspectionPlanMapper emInspectionPlanMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡å |
| | | * |
| | | * @param id ç¹æ£ä¿å
»è®¡åä¸»é® |
| | | * @return ç¹æ£ä¿å
»è®¡å |
| | | */ |
| | | @Override |
| | | public EmInspectionPlan selectEmInspectionPlanById(Long id) |
| | | { |
| | | return emInspectionPlanMapper.selectEmInspectionPlanById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¹æ£ä¿å
»è®¡åå表 |
| | | * |
| | | * @param emInspectionPlan ç¹æ£ä¿å
»è®¡å |
| | | * @return ç¹æ£ä¿å
»è®¡å |
| | | */ |
| | | @Override |
| | | public List<EmInspectionPlan> selectEmInspectionPlanList(EmInspectionPlan emInspectionPlan) |
| | | { |
| | | return emInspectionPlanMapper.selectEmInspectionPlanList(emInspectionPlan); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç¹æ£ä¿å
»è®¡å |
| | | * |
| | | * @param emInspectionPlan ç¹æ£ä¿å
»è®¡å |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertEmInspectionPlan(EmInspectionPlan emInspectionPlan) |
| | | { |
| | | emInspectionPlan.setCreateTime(DateUtils.getNowDate()); |
| | | return emInspectionPlanMapper.insertEmInspectionPlan(emInspectionPlan); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¹æ£ä¿å
»è®¡å |
| | | * |
| | | * @param emInspectionPlan ç¹æ£ä¿å
»è®¡å |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateEmInspectionPlan(EmInspectionPlan emInspectionPlan) |
| | | { |
| | | emInspectionPlan.setUpdateTime(DateUtils.getNowDate()); |
| | | return emInspectionPlanMapper.updateEmInspectionPlan(emInspectionPlan); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ç¹æ£ä¿å
»è®¡å |
| | | * |
| | | * @param ids éè¦å é¤çç¹æ£ä¿å
»è®¡åä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteEmInspectionPlanByIds(Long[] ids) |
| | | { |
| | | return emInspectionPlanMapper.deleteEmInspectionPlanByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç¹æ£ä¿å
»è®¡åä¿¡æ¯ |
| | | * |
| | | * @param id ç¹æ£ä¿å
»è®¡åä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteEmInspectionPlanById(Long id) |
| | | { |
| | | return emInspectionPlanMapper.deleteEmInspectionPlanById(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.inspectionItems.mapper.EmInspectionItemsMapper"> |
| | | |
| | | <resultMap type="EmInspectionItems" id="EmInspectionItemsResult"> |
| | | <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="status" column="status" /> |
| | | <result property="standard" column="standard" /> |
| | | <result property="itemsContent" column="items_content" /> |
| | | <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" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectEmInspectionItemsVo"> |
| | | select id, items_code, items_name, items_type, status, standard, items_content, remark, create_user, create_time, update_user, update_time, spare_field_1, spare_field_2 from em_inspection_items |
| | | </sql> |
| | | |
| | | <select id="selectEmInspectionItemsList" parameterType="EmInspectionItems" resultMap="EmInspectionItemsResult"> |
| | | <include refid="selectEmInspectionItemsVo"/> |
| | | <where> |
| | | <if test="itemsCode != null and itemsCode != ''"> and items_code like concat('%', #{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="status != null and status != ''"> and status = #{status}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectEmInspectionItemsById" parameterType="Long" resultMap="EmInspectionItemsResult"> |
| | | <include refid="selectEmInspectionItemsVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertEmInspectionItems" parameterType="EmInspectionItems" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into em_inspection_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="status != null">status,</if> |
| | | <if test="standard != null">standard,</if> |
| | | <if test="itemsContent != null">items_content,</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> |
| | | </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="status != null">#{status},</if> |
| | | <if test="standard != null">#{standard},</if> |
| | | <if test="itemsContent != null">#{itemsContent},</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> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateEmInspectionItems" parameterType="EmInspectionItems"> |
| | | update em_inspection_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="status != null">status = #{status},</if> |
| | | <if test="standard != null">standard = #{standard},</if> |
| | | <if test="itemsContent != null">items_content = #{itemsContent},</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> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteEmInspectionItemsById" parameterType="Long"> |
| | | delete from em_inspection_items where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteEmInspectionItemsByIds" parameterType="String"> |
| | | delete from em_inspection_items 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.inspectionPlan.mapper.EmInspectionPlanMapper"> |
| | | |
| | | <resultMap type="EmInspectionPlan" id="EmInspectionPlanResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="planCode" column="plan_code" /> |
| | | <result property="planName" column="plan_name" /> |
| | | <result property="planType" column="plan_type" /> |
| | | <result property="state" column="state" /> |
| | | <result property="frequency" column="frequency" /> |
| | | <result property="dimension" column="dimension" /> |
| | | <result property="lastGenerationTime" column="last_generation_time" /> |
| | | <result property="startTime" column="start_time" /> |
| | | <result property="endTime" column="end_time" /> |
| | | <result property="devices" column="devices" /> |
| | | <result property="inspectionItems" column="Inspection_items" /> |
| | | <result property="remarks" column="remarks" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="createUser" column="create_user" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="updateUser" column="update_user" /> |
| | | <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" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectEmInspectionPlanVo"> |
| | | select id, plan_code, plan_name, plan_type, state, frequency, dimension, last_generation_time, start_time, end_time, devices, Inspection_items, remarks, create_time, create_user, update_time, update_user, spare_field_1, spare_field_2, spare_field_3, spare_field_4 from em_inspection_plan |
| | | </sql> |
| | | |
| | | <select id="selectEmInspectionPlanList" parameterType="EmInspectionPlan" resultMap="EmInspectionPlanResult"> |
| | | <include refid="selectEmInspectionPlanVo"/> |
| | | <where> |
| | | <if test="planCode != null and planCode != ''"> and plan_code like concat('%', #{planCode}, '%')</if> |
| | | <if test="planName != null and planName != ''"> and plan_name like concat('%', #{planName}, '%')</if> |
| | | <if test="planType != null and planType != ''"> and plan_type = #{planType}</if> |
| | | <if test="state != null and state != ''"> and state = #{state}</if> |
| | | <if test="frequency != null and frequency != ''"> and frequency = #{frequency}</if> |
| | | <if test="dimension != null and dimension != ''"> and dimension = #{dimension}</if> |
| | | <if test="startTime != null and startTime != ''"> and start_time = #{startTime}</if> |
| | | <if test="endTime != null and endTime != ''"> and end_time = #{endTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectEmInspectionPlanById" parameterType="Long" resultMap="EmInspectionPlanResult"> |
| | | <include refid="selectEmInspectionPlanVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertEmInspectionPlan" parameterType="EmInspectionPlan" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into em_inspection_plan |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="planCode != null">plan_code,</if> |
| | | <if test="planName != null">plan_name,</if> |
| | | <if test="planType != null">plan_type,</if> |
| | | <if test="state != null">state,</if> |
| | | <if test="frequency != null">frequency,</if> |
| | | <if test="dimension != null">dimension,</if> |
| | | <if test="lastGenerationTime != null">last_generation_time,</if> |
| | | <if test="startTime != null">start_time,</if> |
| | | <if test="endTime != null">end_time,</if> |
| | | <if test="devices != null">devices,</if> |
| | | <if test="inspectionItems != null">Inspection_items,</if> |
| | | <if test="remarks != null">remarks,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="createUser != null">create_user,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="updateUser != null">update_user,</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> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="planCode != null">#{planCode},</if> |
| | | <if test="planName != null">#{planName},</if> |
| | | <if test="planType != null">#{planType},</if> |
| | | <if test="state != null">#{state},</if> |
| | | <if test="frequency != null">#{frequency},</if> |
| | | <if test="dimension != null">#{dimension},</if> |
| | | <if test="lastGenerationTime != null">#{lastGenerationTime},</if> |
| | | <if test="startTime != null">#{startTime},</if> |
| | | <if test="endTime != null">#{endTime},</if> |
| | | <if test="devices != null">#{devices},</if> |
| | | <if test="inspectionItems != null">#{inspectionItems},</if> |
| | | <if test="remarks != null">#{remarks},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="createUser != null">#{createUser},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="updateUser != null">#{updateUser},</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> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateEmInspectionPlan" parameterType="EmInspectionPlan"> |
| | | update em_inspection_plan |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="planCode != null">plan_code = #{planCode},</if> |
| | | <if test="planName != null">plan_name = #{planName},</if> |
| | | <if test="planType != null">plan_type = #{planType},</if> |
| | | <if test="state != null">state = #{state},</if> |
| | | <if test="frequency != null">frequency = #{frequency},</if> |
| | | <if test="dimension != null">dimension = #{dimension},</if> |
| | | <if test="lastGenerationTime != null">last_generation_time = #{lastGenerationTime},</if> |
| | | <if test="startTime != null">start_time = #{startTime},</if> |
| | | <if test="endTime != null">end_time = #{endTime},</if> |
| | | <if test="devices != null">devices = #{devices},</if> |
| | | <if test="inspectionItems != null">Inspection_items = #{inspectionItems},</if> |
| | | <if test="remarks != null">remarks = #{remarks},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="createUser != null">create_user = #{createUser},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="updateUser != null">update_user = #{updateUser},</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> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteEmInspectionPlanById" parameterType="Long"> |
| | | delete from em_inspection_plan where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteEmInspectionPlanByIds" parameterType="String"> |
| | | delete from em_inspection_plan where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢ç¹æ£ä¿å
»é¡¹ç®å表 |
| | | export function listInspectionItems(query) { |
| | | return request({ |
| | | url: '/em/inspectionItems/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢ç¹æ£ä¿å
»é¡¹ç®è¯¦ç» |
| | | export function getInspectionItems(id) { |
| | | return request({ |
| | | url: '/em/inspectionItems/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢ç¹æ£ä¿å
»é¡¹ç® |
| | | export function addInspectionItems(data) { |
| | | return request({ |
| | | url: '/em/inspectionItems', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹ç¹æ£ä¿å
»é¡¹ç® |
| | | export function updateInspectionItems(data) { |
| | | return request({ |
| | | url: '/em/inspectionItems', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤ç¹æ£ä¿å
»é¡¹ç® |
| | | export function delInspectionItems(id) { |
| | | return request({ |
| | | url: '/em/inspectionItems/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢ç¹æ£ä¿å
»è®¡åå表 |
| | | export function listInspectionPlan(query) { |
| | | return request({ |
| | | url: '/em/inspectionPlan/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢ç¹æ£ä¿å
»è®¡åè¯¦ç» |
| | | export function getInspectionPlan(id) { |
| | | return request({ |
| | | url: '/em/inspectionPlan/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢ç¹æ£ä¿å
»è®¡å |
| | | export function addInspectionPlan(data) { |
| | | return request({ |
| | | url: '/em/inspectionPlan', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹ç¹æ£ä¿å
»è®¡å |
| | | export function updateInspectionPlan(data) { |
| | | return request({ |
| | | url: '/em/inspectionPlan', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤ç¹æ£ä¿å
»è®¡å |
| | | export function delInspectionPlan(id) { |
| | | return request({ |
| | | url: '/em/inspectionPlan/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-card class="box-card"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="项ç®ç¼å·" prop="itemsCode"> |
| | | <el-input |
| | | v-model="queryParams.itemsCode" |
| | | placeholder="请è¾å
¥é¡¹ç®ç¼å·" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="项ç®å称" prop="itemsName"> |
| | | <el-input |
| | | v-model="queryParams.itemsName" |
| | | placeholder="请è¾å
¥é¡¹ç®å称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="项ç®ç±»å" prop="itemsType">--> |
| | | <!-- <el-select v-model="queryParams.itemsType" placeholder="请éæ©é¡¹ç®ç±»å" clearable>--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="dict in dict.type.${dictType}"--> |
| | | <!-- :key="dict.value"--> |
| | | <!-- :label="dict.label"--> |
| | | <!-- :value="dict.value"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="æ¯å¦å¯ç¨" prop="status">--> |
| | | <!-- <el-select v-model="queryParams.status" placeholder="请éæ©æ¯å¦å¯ç¨" clearable>--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="dict in dict.type.${dictType}"--> |
| | | <!-- :key="dict.value"--> |
| | | <!-- :label="dict.label"--> |
| | | <!-- :value="dict.value"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item style="float: right"> |
| | | <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-card> |
| | | |
| | | <el-card style="margin-top: 10px" class="box-card"> |
| | | <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="['em:inspectionItems:add']" |
| | | >æ°å¢</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['em:inspectionItems:edit']" |
| | | >ä¿®æ¹</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="['em:inspectionItems:remove']" |
| | | >å é¤</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['em:inspectionItems:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table border v-loading="loading" :data="inspectionItemsList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="ID" align="center" prop="id" /> |
| | | <el-table-column label="项ç®ç¼å·" align="center" prop="itemsCode"> |
| | | </el-table-column> |
| | | <el-table-column label="项ç®å称" align="center" prop="itemsName"> |
| | | </el-table-column> |
| | | <el-table-column label="项ç®ç±»å" align="center" prop="itemsType"> |
| | | </el-table-column> |
| | | <el-table-column label="æ¯å¦å¯ç¨" align="center" prop="status"> |
| | | </el-table-column> |
| | | <el-table-column label="æ å" align="center" prop="standard"> |
| | | </el-table-column> |
| | | <el-table-column label="项ç®å
容" align="center" prop="itemsContent"> |
| | | </el-table-column> |
| | | <el-table-column label="å¤æ³¨" align="center" prop="remark"> |
| | | </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-column fixed="right" width="200" label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="success" |
| | | plain |
| | | style="width: 72px" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['em:inspectionItems:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="danger" |
| | | plain |
| | | style="width: 72px" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['em:inspectionItems:remove']" |
| | | >å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-card> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹ç¹æ£ä¿å
»é¡¹ç®å¯¹è¯æ¡ --> |
| | | <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <span slot="title"> |
| | | <i class="el-icon-s-order"></i> |
| | | {{titleName}} |
| | | </span> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="项ç®ç¼å·" prop="itemsCode"> |
| | | <el-input v-model="form.itemsCode" placeholder="请è¾å
¥é¡¹ç®ç¼å·" /> |
| | | </el-form-item> |
| | | <el-form-item label="项ç®å称" prop="itemsName"> |
| | | <el-input v-model="form.itemsName" placeholder="请è¾å
¥é¡¹ç®å称" /> |
| | | </el-form-item> |
| | | <el-form-item label="项ç®ç±»å" prop="itemsType"> |
| | | <!-- <el-select v-model="form.itemsType" placeholder="请éæ©é¡¹ç®ç±»å">--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="dict in dict.type.${dictType}"--> |
| | | <!-- :key="dict.value"--> |
| | | <!-- :label="dict.label"--> |
| | | <!-- :value="dict.value"--> |
| | | <!-- ></el-option>--> |
| | | <!-- </el-select>--> |
| | | </el-form-item> |
| | | <el-form-item label="æ¯å¦å¯ç¨" prop="status"> |
| | | <!-- <el-radio-group v-model="form.status">--> |
| | | <!-- <el-radio--> |
| | | <!-- v-for="dict in dict.type.${dictType}"--> |
| | | <!-- :key="dict.value"--> |
| | | <!-- :label="dict.value"--> |
| | | <!-- >{{dict.label}}</el-radio>--> |
| | | <!-- </el-radio-group>--> |
| | | </el-form-item> |
| | | <el-form-item label="æ å" prop="standard"> |
| | | <el-input v-model="form.standard" placeholder="请è¾å
¥æ å" /> |
| | | </el-form-item> |
| | | <el-form-item label="项ç®å
容"> |
| | | <editor v-model="form.itemsContent" :min-height="192"/> |
| | | </el-form-item> |
| | | <el-form-item label="å¤æ³¨" prop="remark"> |
| | | <el-input v-model="form.remark" placeholder="请è¾å
¥å¤æ³¨" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listInspectionItems, getInspectionItems, delInspectionItems, addInspectionItems, updateInspectionItems } from "@/api/main/em/inspectionItems/inspectionItems"; |
| | | |
| | | export default { |
| | | name: "InspectionItems", |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | titleName: "", |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // ç¹æ£ä¿å
»é¡¹ç®è¡¨æ ¼æ°æ® |
| | | inspectionItemsList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | itemsCode: null, |
| | | itemsName: null, |
| | | itemsType: null, |
| | | status: null, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "IDä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢ç¹æ£ä¿å
»é¡¹ç®å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listInspectionItems(this.queryParams).then(response => { |
| | | this.inspectionItemsList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | itemsCode: null, |
| | | itemsName: null, |
| | | itemsType: null, |
| | | status: null, |
| | | standard: null, |
| | | itemsContent: null, |
| | | remark: null, |
| | | createUser: null, |
| | | createTime: null, |
| | | updateUser: null, |
| | | updateTime: null, |
| | | spareField1: null, |
| | | spareField2: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡éä¸æ°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.titleName = "æ·»å ç¹æ£ä¿å
»é¡¹ç®"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getInspectionItems(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.titleName = "ä¿®æ¹ç¹æ£ä¿å
»é¡¹ç®"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateInspectionItems(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addInspectionItems(this.form).then(response => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤ç¹æ£ä¿å
»é¡¹ç®ç¼å·ä¸º"' + ids + '"çæ°æ®é¡¹ï¼').then(function() { |
| | | return delInspectionItems(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('em/inspectionItems/export', { |
| | | ...this.queryParams |
| | | }, `inspectionItems_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-card class="box-card"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="计åç¼å·" prop="planCode"> |
| | | <el-input |
| | | v-model="queryParams.planCode" |
| | | placeholder="请è¾å
¥è®¡åç¼å·" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="计åå称" prop="planName"> |
| | | <el-input |
| | | v-model="queryParams.planName" |
| | | placeholder="请è¾å
¥è®¡åå称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="计åç±»å" prop="planType">--> |
| | | <!-- <el-select v-model="queryParams.planType" placeholder="请éæ©è®¡åç±»å" clearable>--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="dict in dict.type.${dictType}"--> |
| | | <!-- :key="dict.value"--> |
| | | <!-- :label="dict.label"--> |
| | | <!-- :value="dict.value"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="ç¶æ" prop="state"> |
| | | <el-input |
| | | v-model="queryParams.state" |
| | | placeholder="请è¾å
¥ç¶æ" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="é¢ç" prop="frequency"> |
| | | <el-input |
| | | v-model="queryParams.frequency" |
| | | placeholder="请è¾å
¥é¢ç" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="维度" prop="dimension"> |
| | | <el-input |
| | | v-model="queryParams.dimension" |
| | | placeholder="请è¾å
¥ç»´åº¦" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item style="float: right"> |
| | | <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-card> |
| | | |
| | | <el-card style="margin-top: 10px" class="box-card"> |
| | | <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="['em:inspectionPlan:add']" |
| | | >æ°å¢</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['em:inspectionPlan:edit']" |
| | | >ä¿®æ¹</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="['em:inspectionPlan:remove']" |
| | | >å é¤</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['em:inspectionPlan:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table border v-loading="loading" :data="inspectionPlanList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="ID" align="center" prop="id" /> |
| | | <el-table-column label="计åç¼å·" align="center" prop="planCode"> |
| | | </el-table-column> |
| | | <el-table-column label="计åå称" align="center" prop="planName"> |
| | | </el-table-column> |
| | | <el-table-column label="计åç±»å" align="center" prop="planType"> |
| | | </el-table-column> |
| | | <el-table-column label="ç¶æ" align="center" prop="state"> |
| | | </el-table-column> |
| | | <el-table-column label="é¢ç" align="center" prop="frequency"> |
| | | </el-table-column> |
| | | <el-table-column label="维度" align="center" prop="dimension"> |
| | | </el-table-column> |
| | | <el-table-column label="ä¸æ¬¡çææ¶é´" align="center" prop="lastGenerationTime"> |
| | | </el-table-column> |
| | | <el-table-column label="å¼å§æ¶é´" align="center" prop="startTime"> |
| | | </el-table-column> |
| | | <el-table-column label="ç»ææ¶é´" align="center" prop="endTime"> |
| | | </el-table-column> |
| | | <el-table-column label="å¤æ³¨" align="center" prop="remarks"> |
| | | </el-table-column> |
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime"> |
| | | </el-table-column> |
| | | <el-table-column label="å建人" align="center" prop="createUser"> |
| | | </el-table-column> |
| | | <el-table-column label="ä¿®æ¹æ¶é´" align="center" prop="updateTime"> |
| | | </el-table-column> |
| | | <el-table-column label="ä¿®æ¹äºº" align="center" prop="updateUser"> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" width="200" label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="success" |
| | | plain |
| | | style="width: 72px" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['em:inspectionPlan:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="danger" |
| | | plain |
| | | style="width: 72px" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['em:inspectionPlan:remove']" |
| | | >å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-card> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹ç¹æ£ä¿å
»è®¡å对è¯æ¡ --> |
| | | <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <span slot="title"> |
| | | <i class="el-icon-s-order"></i> |
| | | {{titleName}} |
| | | </span> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="计åç¼å·" prop="planCode"> |
| | | <el-input v-model="form.planCode" placeholder="请è¾å
¥è®¡åç¼å·" /> |
| | | </el-form-item> |
| | | <el-form-item label="计åå称" prop="planName"> |
| | | <el-input v-model="form.planName" placeholder="请è¾å
¥è®¡åå称" /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="计åç±»å" prop="planType">--> |
| | | <!-- <el-select v-model="form.planType" placeholder="请éæ©è®¡åç±»å">--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="dict in dict.type.${dictType}"--> |
| | | <!-- :key="dict.value"--> |
| | | <!-- :label="dict.label"--> |
| | | <!-- :value="dict.value"--> |
| | | <!-- ></el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="ç¶æ" prop="state"> |
| | | <el-input v-model="form.state" placeholder="请è¾å
¥ç¶æ" /> |
| | | </el-form-item> |
| | | <el-form-item label="é¢ç" prop="frequency"> |
| | | <el-input v-model="form.frequency" placeholder="请è¾å
¥é¢ç" /> |
| | | </el-form-item> |
| | | <el-form-item label="维度" prop="dimension"> |
| | | <el-input v-model="form.dimension" placeholder="请è¾å
¥ç»´åº¦" /> |
| | | </el-form-item> |
| | | <el-form-item label="å¤æ³¨" prop="remarks"> |
| | | <el-input v-model="form.remarks" placeholder="请è¾å
¥å¤æ³¨" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <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"; |
| | | |
| | | export default { |
| | | name: "InspectionPlan", |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | titleName: "", |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // ç¹æ£ä¿å
»è®¡åè¡¨æ ¼æ°æ® |
| | | inspectionPlanList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | planCode: null, |
| | | planName: null, |
| | | planType: null, |
| | | state: null, |
| | | frequency: null, |
| | | dimension: null, |
| | | startTime: null, |
| | | endTime: null, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "IDä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢ç¹æ£ä¿å
»è®¡åå表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listInspectionPlan(this.queryParams).then(response => { |
| | | this.inspectionPlanList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | planCode: null, |
| | | planName: null, |
| | | planType: null, |
| | | state: null, |
| | | frequency: null, |
| | | dimension: null, |
| | | lastGenerationTime: null, |
| | | startTime: null, |
| | | endTime: null, |
| | | devices: null, |
| | | inspectionItems: null, |
| | | remarks: null, |
| | | createTime: null, |
| | | createUser: null, |
| | | updateTime: null, |
| | | updateUser: null, |
| | | spareField1: null, |
| | | spareField2: null, |
| | | spareField3: null, |
| | | spareField4: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡éä¸æ°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.titleName = "æ·»å ç¹æ£ä¿å
»è®¡å"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getInspectionPlan(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.titleName = "ä¿®æ¹ç¹æ£ä¿å
»è®¡å"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateInspectionPlan(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addInspectionPlan(this.form).then(response => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤ç¹æ£ä¿å
»è®¡åç¼å·ä¸º"' + ids + '"çæ°æ®é¡¹ï¼').then(function() { |
| | | return delInspectionPlan(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('em/inspectionPlan/export', { |
| | | ...this.queryParams |
| | | }, `inspectionPlan_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |