¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.lineInfo.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.bs.lineInfo.domain.BsLineInfo; |
| | | import com.jcdm.main.bs.lineInfo.service.IBsLineInfoService; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * 产线信æ¯Controller |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-09 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/main/lineInfo") |
| | | public class BsLineInfoController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IBsLineInfoService bsLineInfoService; |
| | | |
| | | /** |
| | | * æ¥è¯¢äº§çº¿ä¿¡æ¯å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:lineInfo:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(BsLineInfo bsLineInfo) |
| | | { |
| | | startPage(); |
| | | List<BsLineInfo> list = bsLineInfoService.selectBsLineInfoList(bsLineInfo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºäº§çº¿ä¿¡æ¯å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:lineInfo:export')") |
| | | @Log(title = "产线信æ¯", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, BsLineInfo bsLineInfo) |
| | | { |
| | | List<BsLineInfo> list = bsLineInfoService.selectBsLineInfoList(bsLineInfo); |
| | | ExcelUtil<BsLineInfo> util = new ExcelUtil<BsLineInfo>(BsLineInfo.class); |
| | | util.exportExcel(response, list, "产线信æ¯æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·å产线信æ¯è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:lineInfo:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(bsLineInfoService.selectBsLineInfoById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢äº§çº¿ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:lineInfo:add')") |
| | | @Log(title = "产线信æ¯", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody BsLineInfo bsLineInfo) |
| | | { |
| | | return toAjax(bsLineInfoService.insertBsLineInfo(bsLineInfo)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹äº§çº¿ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:lineInfo:edit')") |
| | | @Log(title = "产线信æ¯", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody BsLineInfo bsLineInfo) |
| | | { |
| | | return toAjax(bsLineInfoService.updateBsLineInfo(bsLineInfo)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤äº§çº¿ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:lineInfo:remove')") |
| | | @Log(title = "产线信æ¯", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(bsLineInfoService.deleteBsLineInfoByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.lineInfo.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; |
| | | |
| | | /** |
| | | * 产线信æ¯å¯¹è±¡ bs_line_info |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-09 |
| | | */ |
| | | public class BsLineInfo extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®id */ |
| | | private Long id; |
| | | |
| | | /** 产线ç¼å· */ |
| | | @Excel(name = "产线ç¼å·") |
| | | private String lineCode; |
| | | |
| | | /** 产线å称 */ |
| | | @Excel(name = "产线å称") |
| | | private String lineName; |
| | | |
| | | /** 车é´ç¼å· */ |
| | | @Excel(name = "车é´ç¼å·") |
| | | private String workshopCode; |
| | | |
| | | /** å·¥ä½æ¥å */ |
| | | @Excel(name = "å·¥ä½æ¥å") |
| | | private String workCalendar; |
| | | |
| | | /** é¢çå段1 */ |
| | | @Excel(name = "é¢çå段1") |
| | | private String spareField1; |
| | | |
| | | /** é¢çå段2 */ |
| | | @Excel(name = "é¢çå段2") |
| | | private String spareField2; |
| | | |
| | | /** å¤æ³¨ */ |
| | | @Excel(name = "å¤æ³¨") |
| | | private String remarks; |
| | | |
| | | /** å建ç¨æ· */ |
| | | @Excel(name = "å建ç¨æ·") |
| | | private String createUser; |
| | | |
| | | /** æ´æ¹ç¨æ· */ |
| | | @Excel(name = "æ´æ¹ç¨æ·") |
| | | private String updateUser; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setLineCode(String lineCode) |
| | | { |
| | | this.lineCode = lineCode; |
| | | } |
| | | |
| | | public String getLineCode() |
| | | { |
| | | return lineCode; |
| | | } |
| | | public void setLineName(String lineName) |
| | | { |
| | | this.lineName = lineName; |
| | | } |
| | | |
| | | public String getLineName() |
| | | { |
| | | return lineName; |
| | | } |
| | | public void setWorkshopCode(String workshopCode) |
| | | { |
| | | this.workshopCode = workshopCode; |
| | | } |
| | | |
| | | public String getWorkshopCode() |
| | | { |
| | | return workshopCode; |
| | | } |
| | | public void setWorkCalendar(String workCalendar) |
| | | { |
| | | this.workCalendar = workCalendar; |
| | | } |
| | | |
| | | public String getWorkCalendar() |
| | | { |
| | | return workCalendar; |
| | | } |
| | | 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 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; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("lineCode", getLineCode()) |
| | | .append("lineName", getLineName()) |
| | | .append("workshopCode", getWorkshopCode()) |
| | | .append("workCalendar", getWorkCalendar()) |
| | | .append("spareField1", getSpareField1()) |
| | | .append("spareField2", getSpareField2()) |
| | | .append("remarks", getRemarks()) |
| | | .append("createUser", getCreateUser()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateUser", getUpdateUser()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.lineInfo.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.bs.lineInfo.domain.BsLineInfo; |
| | | |
| | | /** |
| | | * 产线信æ¯Mapperæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-09 |
| | | */ |
| | | public interface BsLineInfoMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢äº§çº¿ä¿¡æ¯ |
| | | * |
| | | * @param id 产线信æ¯ä¸»é® |
| | | * @return äº§çº¿ä¿¡æ¯ |
| | | */ |
| | | public BsLineInfo selectBsLineInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢äº§çº¿ä¿¡æ¯å表 |
| | | * |
| | | * @param bsLineInfo äº§çº¿ä¿¡æ¯ |
| | | * @return 产线信æ¯éå |
| | | */ |
| | | public List<BsLineInfo> selectBsLineInfoList(BsLineInfo bsLineInfo); |
| | | |
| | | /** |
| | | * æ°å¢äº§çº¿ä¿¡æ¯ |
| | | * |
| | | * @param bsLineInfo äº§çº¿ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsLineInfo(BsLineInfo bsLineInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹äº§çº¿ä¿¡æ¯ |
| | | * |
| | | * @param bsLineInfo äº§çº¿ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsLineInfo(BsLineInfo bsLineInfo); |
| | | |
| | | /** |
| | | * å é¤äº§çº¿ä¿¡æ¯ |
| | | * |
| | | * @param id 产线信æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsLineInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤äº§çº¿ä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsLineInfoByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.lineInfo.service; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.bs.lineInfo.domain.BsLineInfo; |
| | | |
| | | /** |
| | | * 产线信æ¯Serviceæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-09 |
| | | */ |
| | | public interface IBsLineInfoService |
| | | { |
| | | /** |
| | | * æ¥è¯¢äº§çº¿ä¿¡æ¯ |
| | | * |
| | | * @param id 产线信æ¯ä¸»é® |
| | | * @return äº§çº¿ä¿¡æ¯ |
| | | */ |
| | | public BsLineInfo selectBsLineInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢äº§çº¿ä¿¡æ¯å表 |
| | | * |
| | | * @param bsLineInfo äº§çº¿ä¿¡æ¯ |
| | | * @return 产线信æ¯éå |
| | | */ |
| | | public List<BsLineInfo> selectBsLineInfoList(BsLineInfo bsLineInfo); |
| | | |
| | | /** |
| | | * æ°å¢äº§çº¿ä¿¡æ¯ |
| | | * |
| | | * @param bsLineInfo äº§çº¿ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsLineInfo(BsLineInfo bsLineInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹äº§çº¿ä¿¡æ¯ |
| | | * |
| | | * @param bsLineInfo äº§çº¿ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsLineInfo(BsLineInfo bsLineInfo); |
| | | |
| | | /** |
| | | * æ¹éå é¤äº§çº¿ä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤ç产线信æ¯ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsLineInfoByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤äº§çº¿ä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id 产线信æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsLineInfoById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.lineInfo.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.bs.lineInfo.mapper.BsLineInfoMapper; |
| | | import com.jcdm.main.bs.lineInfo.domain.BsLineInfo; |
| | | import com.jcdm.main.bs.lineInfo.service.IBsLineInfoService; |
| | | |
| | | /** |
| | | * 产线信æ¯Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-09 |
| | | */ |
| | | @Service |
| | | public class BsLineInfoServiceImpl implements IBsLineInfoService |
| | | { |
| | | @Autowired |
| | | private BsLineInfoMapper bsLineInfoMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢äº§çº¿ä¿¡æ¯ |
| | | * |
| | | * @param id 产线信æ¯ä¸»é® |
| | | * @return äº§çº¿ä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public BsLineInfo selectBsLineInfoById(Long id) |
| | | { |
| | | return bsLineInfoMapper.selectBsLineInfoById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢äº§çº¿ä¿¡æ¯å表 |
| | | * |
| | | * @param bsLineInfo äº§çº¿ä¿¡æ¯ |
| | | * @return äº§çº¿ä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public List<BsLineInfo> selectBsLineInfoList(BsLineInfo bsLineInfo) |
| | | { |
| | | return bsLineInfoMapper.selectBsLineInfoList(bsLineInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢äº§çº¿ä¿¡æ¯ |
| | | * |
| | | * @param bsLineInfo äº§çº¿ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertBsLineInfo(BsLineInfo bsLineInfo) |
| | | { |
| | | bsLineInfo.setCreateTime(DateUtils.getNowDate()); |
| | | return bsLineInfoMapper.insertBsLineInfo(bsLineInfo); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹äº§çº¿ä¿¡æ¯ |
| | | * |
| | | * @param bsLineInfo äº§çº¿ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateBsLineInfo(BsLineInfo bsLineInfo) |
| | | { |
| | | bsLineInfo.setUpdateTime(DateUtils.getNowDate()); |
| | | return bsLineInfoMapper.updateBsLineInfo(bsLineInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤äº§çº¿ä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤ç产线信æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsLineInfoByIds(Long[] ids) |
| | | { |
| | | return bsLineInfoMapper.deleteBsLineInfoByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤äº§çº¿ä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id 产线信æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsLineInfoById(Long id) |
| | | { |
| | | return bsLineInfoMapper.deleteBsLineInfoById(id); |
| | | } |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo; |
| | | import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.om.workReport.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.om.workReport.domain.OmWorkReport; |
| | | import com.jcdm.main.om.workReport.service.IOmWorkReportService; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * æ¥å·¥è®°å½ 表Controller |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-12 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/om/workReport") |
| | | public class OmWorkReportController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IOmWorkReportService omWorkReportService; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¥å·¥è®°å½ 表å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('om:workReport:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(OmWorkReport omWorkReport) |
| | | { |
| | | startPage(); |
| | | List<OmWorkReport> list = omWorkReportService.selectOmWorkReportList(omWorkReport); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºæ¥å·¥è®°å½ 表å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('om:workReport:export')") |
| | | @Log(title = "æ¥å·¥è®°å½ 表", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, OmWorkReport omWorkReport) |
| | | { |
| | | List<OmWorkReport> list = omWorkReportService.selectOmWorkReportList(omWorkReport); |
| | | ExcelUtil<OmWorkReport> util = new ExcelUtil<OmWorkReport>(OmWorkReport.class); |
| | | util.exportExcel(response, list, "æ¥å·¥è®°å½ 表æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åæ¥å·¥è®°å½ 表详ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('om:workReport:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(omWorkReportService.selectOmWorkReportById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ¥å·¥è®°å½ 表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('om:workReport:add')") |
| | | @Log(title = "æ¥å·¥è®°å½ 表", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody OmWorkReport omWorkReport) |
| | | { |
| | | return toAjax(omWorkReportService.insertOmWorkReport(omWorkReport)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¥å·¥è®°å½ 表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('om:workReport:edit')") |
| | | @Log(title = "æ¥å·¥è®°å½ 表", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody OmWorkReport omWorkReport) |
| | | { |
| | | return toAjax(omWorkReportService.updateOmWorkReport(omWorkReport)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤æ¥å·¥è®°å½ 表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('om:workReport:remove')") |
| | | @Log(title = "æ¥å·¥è®°å½ 表", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(omWorkReportService.deleteOmWorkReportByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.om.workReport.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; |
| | | |
| | | /** |
| | | * æ¥å·¥è®°å½ 表对象 om_work_report |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-12 |
| | | */ |
| | | public class OmWorkReport extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®id */ |
| | | private Long id; |
| | | |
| | | /** å·¥åç¼å· */ |
| | | @Excel(name = "å·¥åç¼å·") |
| | | private String workOrderCode; |
| | | |
| | | /** SFCæ»æåºåå· */ |
| | | @Excel(name = "SFCæ»æåºåå·") |
| | | private String sfcCode; |
| | | |
| | | /** 产åç¼å· */ |
| | | @Excel(name = "产åç¼å·") |
| | | private String productCode; |
| | | |
| | | /** 产åå称 */ |
| | | @Excel(name = "产åå称") |
| | | private String productName; |
| | | |
| | | /** ä¸çº¿æ¶é´ */ |
| | | @Excel(name = "ä¸çº¿æ¶é´") |
| | | private String upTime; |
| | | |
| | | /** ä¸çº¿æ¶é´ */ |
| | | @Excel(name = "ä¸çº¿æ¶é´") |
| | | private String offlineTime; |
| | | |
| | | /** æ¯å¦åæ ¼ */ |
| | | @Excel(name = "æ¯å¦åæ ¼") |
| | | private String status; |
| | | |
| | | /** å建ç¨æ· */ |
| | | @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 String spareField3; |
| | | |
| | | /** é¢çå段4 */ |
| | | @Excel(name = "é¢çå段4") |
| | | private String spareField4; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setWorkOrderCode(String workOrderCode) |
| | | { |
| | | this.workOrderCode = workOrderCode; |
| | | } |
| | | |
| | | public String getWorkOrderCode() |
| | | { |
| | | return workOrderCode; |
| | | } |
| | | public void setSfcCode(String sfcCode) |
| | | { |
| | | this.sfcCode = sfcCode; |
| | | } |
| | | |
| | | public String getSfcCode() |
| | | { |
| | | return sfcCode; |
| | | } |
| | | public void setProductCode(String productCode) |
| | | { |
| | | this.productCode = productCode; |
| | | } |
| | | |
| | | public String getProductCode() |
| | | { |
| | | return productCode; |
| | | } |
| | | public void setProductName(String productName) |
| | | { |
| | | this.productName = productName; |
| | | } |
| | | |
| | | public String getProductName() |
| | | { |
| | | return productName; |
| | | } |
| | | public void setUpTime(String upTime) |
| | | { |
| | | this.upTime = upTime; |
| | | } |
| | | |
| | | public String getUpTime() |
| | | { |
| | | return upTime; |
| | | } |
| | | public void setOfflineTime(String offlineTime) |
| | | { |
| | | this.offlineTime = offlineTime; |
| | | } |
| | | |
| | | public String getOfflineTime() |
| | | { |
| | | return offlineTime; |
| | | } |
| | | public void setStatus(String status) |
| | | { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getStatus() |
| | | { |
| | | return status; |
| | | } |
| | | 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("workOrderCode", getWorkOrderCode()) |
| | | .append("sfcCode", getSfcCode()) |
| | | .append("productCode", getProductCode()) |
| | | .append("productName", getProductName()) |
| | | .append("upTime", getUpTime()) |
| | | .append("offlineTime", getOfflineTime()) |
| | | .append("status", getStatus()) |
| | | .append("createUser", getCreateUser()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateUser", getUpdateUser()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("remark", getRemark()) |
| | | .append("spareField1", getSpareField1()) |
| | | .append("spareField2", getSpareField2()) |
| | | .append("spareField3", getSpareField3()) |
| | | .append("spareField4", getSpareField4()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.om.workReport.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.om.workReport.domain.OmWorkReport; |
| | | |
| | | /** |
| | | * æ¥å·¥è®°å½ 表Mapperæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-12 |
| | | */ |
| | | public interface OmWorkReportMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢æ¥å·¥è®°å½ 表 |
| | | * |
| | | * @param id æ¥å·¥è®°å½ è¡¨ä¸»é® |
| | | * @return æ¥å·¥è®°å½ 表 |
| | | */ |
| | | public OmWorkReport selectOmWorkReportById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¥å·¥è®°å½ 表å表 |
| | | * |
| | | * @param omWorkReport æ¥å·¥è®°å½ 表 |
| | | * @return æ¥å·¥è®°å½ 表éå |
| | | */ |
| | | public List<OmWorkReport> selectOmWorkReportList(OmWorkReport omWorkReport); |
| | | |
| | | /** |
| | | * æ°å¢æ¥å·¥è®°å½ 表 |
| | | * |
| | | * @param omWorkReport æ¥å·¥è®°å½ 表 |
| | | * @return ç»æ |
| | | */ |
| | | public int insertOmWorkReport(OmWorkReport omWorkReport); |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¥å·¥è®°å½ 表 |
| | | * |
| | | * @param omWorkReport æ¥å·¥è®°å½ 表 |
| | | * @return ç»æ |
| | | */ |
| | | public int updateOmWorkReport(OmWorkReport omWorkReport); |
| | | |
| | | /** |
| | | * å é¤æ¥å·¥è®°å½ 表 |
| | | * |
| | | * @param id æ¥å·¥è®°å½ è¡¨ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteOmWorkReportById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤æ¥å·¥è®°å½ 表 |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteOmWorkReportByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.om.workReport.service; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.om.workReport.domain.OmWorkReport; |
| | | |
| | | /** |
| | | * æ¥å·¥è®°å½ 表Serviceæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-12 |
| | | */ |
| | | public interface IOmWorkReportService |
| | | { |
| | | /** |
| | | * æ¥è¯¢æ¥å·¥è®°å½ 表 |
| | | * |
| | | * @param id æ¥å·¥è®°å½ è¡¨ä¸»é® |
| | | * @return æ¥å·¥è®°å½ 表 |
| | | */ |
| | | public OmWorkReport selectOmWorkReportById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¥å·¥è®°å½ 表å表 |
| | | * |
| | | * @param omWorkReport æ¥å·¥è®°å½ 表 |
| | | * @return æ¥å·¥è®°å½ 表éå |
| | | */ |
| | | public List<OmWorkReport> selectOmWorkReportList(OmWorkReport omWorkReport); |
| | | |
| | | /** |
| | | * æ°å¢æ¥å·¥è®°å½ 表 |
| | | * |
| | | * @param omWorkReport æ¥å·¥è®°å½ 表 |
| | | * @return ç»æ |
| | | */ |
| | | public int insertOmWorkReport(OmWorkReport omWorkReport); |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¥å·¥è®°å½ 表 |
| | | * |
| | | * @param omWorkReport æ¥å·¥è®°å½ 表 |
| | | * @return ç»æ |
| | | */ |
| | | public int updateOmWorkReport(OmWorkReport omWorkReport); |
| | | |
| | | /** |
| | | * æ¹éå é¤æ¥å·¥è®°å½ 表 |
| | | * |
| | | * @param ids éè¦å é¤çæ¥å·¥è®°å½ 表主é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteOmWorkReportByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤æ¥å·¥è®°å½ è¡¨ä¿¡æ¯ |
| | | * |
| | | * @param id æ¥å·¥è®°å½ è¡¨ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteOmWorkReportById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.om.workReport.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.om.workReport.mapper.OmWorkReportMapper; |
| | | import com.jcdm.main.om.workReport.domain.OmWorkReport; |
| | | import com.jcdm.main.om.workReport.service.IOmWorkReportService; |
| | | |
| | | /** |
| | | * æ¥å·¥è®°å½ 表Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-12 |
| | | */ |
| | | @Service |
| | | public class OmWorkReportServiceImpl implements IOmWorkReportService |
| | | { |
| | | @Autowired |
| | | private OmWorkReportMapper omWorkReportMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¥å·¥è®°å½ 表 |
| | | * |
| | | * @param id æ¥å·¥è®°å½ è¡¨ä¸»é® |
| | | * @return æ¥å·¥è®°å½ 表 |
| | | */ |
| | | @Override |
| | | public OmWorkReport selectOmWorkReportById(Long id) |
| | | { |
| | | return omWorkReportMapper.selectOmWorkReportById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¥å·¥è®°å½ 表å表 |
| | | * |
| | | * @param omWorkReport æ¥å·¥è®°å½ 表 |
| | | * @return æ¥å·¥è®°å½ 表 |
| | | */ |
| | | @Override |
| | | public List<OmWorkReport> selectOmWorkReportList(OmWorkReport omWorkReport) |
| | | { |
| | | return omWorkReportMapper.selectOmWorkReportList(omWorkReport); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ¥å·¥è®°å½ 表 |
| | | * |
| | | * @param omWorkReport æ¥å·¥è®°å½ 表 |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertOmWorkReport(OmWorkReport omWorkReport) |
| | | { |
| | | omWorkReport.setCreateTime(DateUtils.getNowDate()); |
| | | return omWorkReportMapper.insertOmWorkReport(omWorkReport); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¥å·¥è®°å½ 表 |
| | | * |
| | | * @param omWorkReport æ¥å·¥è®°å½ 表 |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateOmWorkReport(OmWorkReport omWorkReport) |
| | | { |
| | | omWorkReport.setUpdateTime(DateUtils.getNowDate()); |
| | | return omWorkReportMapper.updateOmWorkReport(omWorkReport); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤æ¥å·¥è®°å½ 表 |
| | | * |
| | | * @param ids éè¦å é¤çæ¥å·¥è®°å½ è¡¨ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteOmWorkReportByIds(Long[] ids) |
| | | { |
| | | return omWorkReportMapper.deleteOmWorkReportByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤æ¥å·¥è®°å½ è¡¨ä¿¡æ¯ |
| | | * |
| | | * @param id æ¥å·¥è®°å½ è¡¨ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteOmWorkReportById(Long id) |
| | | { |
| | | return omWorkReportMapper.deleteOmWorkReportById(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.bs.lineInfo.mapper.BsLineInfoMapper"> |
| | | |
| | | <resultMap type="BsLineInfo" id="BsLineInfoResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="lineCode" column="line_code" /> |
| | | <result property="lineName" column="line_name" /> |
| | | <result property="workshopCode" column="workshop_code" /> |
| | | <result property="workCalendar" column="work_calendar" /> |
| | | <result property="spareField1" column="spare_field_1" /> |
| | | <result property="spareField2" column="spare_field_2" /> |
| | | <result property="remarks" column="remarks" /> |
| | | <result property="createUser" column="create_user" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateUser" column="update_user" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsLineInfoVo"> |
| | | select id, line_code, line_name, workshop_code, work_calendar, spare_field_1, spare_field_2, remarks, create_user, create_time, update_user, update_time from bs_line_info |
| | | </sql> |
| | | |
| | | <select id="selectBsLineInfoList" parameterType="BsLineInfo" resultMap="BsLineInfoResult"> |
| | | <include refid="selectBsLineInfoVo"/> |
| | | <where> |
| | | <if test="lineCode != null and lineCode != ''"> and line_code like concat('%', #{lineCode}, '%')</if> |
| | | <if test="lineName != null and lineName != ''"> and line_name like concat('%', #{lineName}, '%')</if> |
| | | <if test="workshopCode != null and workshopCode != ''"> and workshop_code like concat('%', #{workshopCode}, '%')</if> |
| | | <if test="workCalendar != null and workCalendar != ''"> and work_calendar = #{workCalendar}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBsLineInfoById" parameterType="Long" resultMap="BsLineInfoResult"> |
| | | <include refid="selectBsLineInfoVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertBsLineInfo" parameterType="BsLineInfo" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into bs_line_info |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="lineCode != null and lineCode != ''">line_code,</if> |
| | | <if test="lineName != null and lineName != ''">line_name,</if> |
| | | <if test="workshopCode != null and workshopCode != ''">workshop_code,</if> |
| | | <if test="workCalendar != null">work_calendar,</if> |
| | | <if test="spareField1 != null">spare_field_1,</if> |
| | | <if test="spareField2 != null">spare_field_2,</if> |
| | | <if test="remarks != null">remarks,</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> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="lineCode != null and lineCode != ''">#{lineCode},</if> |
| | | <if test="lineName != null and lineName != ''">#{lineName},</if> |
| | | <if test="workshopCode != null and workshopCode != ''">#{workshopCode},</if> |
| | | <if test="workCalendar != null">#{workCalendar},</if> |
| | | <if test="spareField1 != null">#{spareField1},</if> |
| | | <if test="spareField2 != null">#{spareField2},</if> |
| | | <if test="remarks != null">#{remarks},</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> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateBsLineInfo" parameterType="BsLineInfo"> |
| | | update bs_line_info |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="lineCode != null and lineCode != ''">line_code = #{lineCode},</if> |
| | | <if test="lineName != null and lineName != ''">line_name = #{lineName},</if> |
| | | <if test="workshopCode != null and workshopCode != ''">workshop_code = #{workshopCode},</if> |
| | | <if test="workCalendar != null">work_calendar = #{workCalendar},</if> |
| | | <if test="spareField1 != null">spare_field_1 = #{spareField1},</if> |
| | | <if test="spareField2 != null">spare_field_2 = #{spareField2},</if> |
| | | <if test="remarks != null">remarks = #{remarks},</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> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteBsLineInfoById" parameterType="Long"> |
| | | delete from bs_line_info where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteBsLineInfoByIds" parameterType="String"> |
| | | delete from bs_line_info 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.om.workReport.mapper.OmWorkReportMapper"> |
| | | |
| | | <resultMap type="OmWorkReport" id="OmWorkReportResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="workOrderCode" column="work_order_code" /> |
| | | <result property="sfcCode" column="sfc_code" /> |
| | | <result property="productCode" column="product_code" /> |
| | | <result property="productName" column="product_name" /> |
| | | <result property="upTime" column="up_time" /> |
| | | <result property="offlineTime" column="offline_time" /> |
| | | <result property="status" column="status" /> |
| | | <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="remark" column="remark" /> |
| | | <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="selectOmWorkReportVo"> |
| | | select id, work_order_code, sfc_code, product_code, product_name, up_time, offline_time, status, create_user, create_time, update_user, update_time, remark, spare_field_1, spare_field_2, spare_field_3, spare_field_4 from om_work_report |
| | | </sql> |
| | | |
| | | <select id="selectOmWorkReportList" parameterType="OmWorkReport" resultMap="OmWorkReportResult"> |
| | | <include refid="selectOmWorkReportVo"/> |
| | | <where> |
| | | <if test="workOrderCode != null and workOrderCode != ''"> and work_order_code = #{workOrderCode}</if> |
| | | <if test="sfcCode != null and sfcCode != ''"> and sfc_code = #{sfcCode}</if> |
| | | <if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if> |
| | | <if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if> |
| | | <if test="upTime != null and upTime != ''"> and up_time = #{upTime}</if> |
| | | <if test="offlineTime != null and offlineTime != ''"> and offline_time = #{offlineTime}</if> |
| | | <if test="status != null and status != ''"> and status = #{status}</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 spareField3 != ''"> and spare_field_3 = #{spareField3}</if> |
| | | <if test="spareField4 != null and spareField4 != ''"> and spare_field_4 = #{spareField4}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectOmWorkReportById" parameterType="Long" resultMap="OmWorkReportResult"> |
| | | <include refid="selectOmWorkReportVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertOmWorkReport" parameterType="OmWorkReport" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into om_work_report |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="workOrderCode != null">work_order_code,</if> |
| | | <if test="sfcCode != null">sfc_code,</if> |
| | | <if test="productCode != null">product_code,</if> |
| | | <if test="productName != null">product_name,</if> |
| | | <if test="upTime != null">up_time,</if> |
| | | <if test="offlineTime != null">offline_time,</if> |
| | | <if test="status != null">status,</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="remark != null">remark,</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="workOrderCode != null">#{workOrderCode},</if> |
| | | <if test="sfcCode != null">#{sfcCode},</if> |
| | | <if test="productCode != null">#{productCode},</if> |
| | | <if test="productName != null">#{productName},</if> |
| | | <if test="upTime != null">#{upTime},</if> |
| | | <if test="offlineTime != null">#{offlineTime},</if> |
| | | <if test="status != null">#{status},</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="remark != null">#{remark},</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="updateOmWorkReport" parameterType="OmWorkReport"> |
| | | update om_work_report |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="workOrderCode != null">work_order_code = #{workOrderCode},</if> |
| | | <if test="sfcCode != null">sfc_code = #{sfcCode},</if> |
| | | <if test="productCode != null">product_code = #{productCode},</if> |
| | | <if test="productName != null">product_name = #{productName},</if> |
| | | <if test="upTime != null">up_time = #{upTime},</if> |
| | | <if test="offlineTime != null">offline_time = #{offlineTime},</if> |
| | | <if test="status != null">status = #{status},</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="remark != null">remark = #{remark},</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="deleteOmWorkReportById" parameterType="Long"> |
| | | delete from om_work_report where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteOmWorkReportByIds" parameterType="String"> |
| | | delete from om_work_report where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢äº§çº¿ä¿¡æ¯å表 |
| | | export function listLineInfo(query) { |
| | | return request({ |
| | | url: '/main/lineInfo/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢äº§çº¿ä¿¡æ¯è¯¦ç» |
| | | export function getLineInfo(id) { |
| | | return request({ |
| | | url: '/main/lineInfo/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢äº§çº¿ä¿¡æ¯ |
| | | export function addLineInfo(data) { |
| | | return request({ |
| | | url: '/main/lineInfo', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹äº§çº¿ä¿¡æ¯ |
| | | export function updateLineInfo(data) { |
| | | return request({ |
| | | url: '/main/lineInfo', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤äº§çº¿ä¿¡æ¯ |
| | | export function delLineInfo(id) { |
| | | return request({ |
| | | url: '/main/lineInfo/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢æ¥å·¥è®°å½ 表å表 |
| | | export function listWorkReport(query) { |
| | | return request({ |
| | | url: '/om/workReport/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢æ¥å·¥è®°å½ è¡¨è¯¦ç» |
| | | export function getWorkReport(id) { |
| | | return request({ |
| | | url: '/om/workReport/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢æ¥å·¥è®°å½ 表 |
| | | export function addWorkReport(data) { |
| | | return request({ |
| | | url: '/om/workReport', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹æ¥å·¥è®°å½ 表 |
| | | export function updateWorkReport(data) { |
| | | return request({ |
| | | url: '/om/workReport', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤æ¥å·¥è®°å½ 表 |
| | | export function delWorkReport(id) { |
| | | return request({ |
| | | url: '/om/workReport/' + 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="lineCode"> |
| | | <el-input |
| | | v-model="queryParams.lineCode" |
| | | placeholder="请è¾å
¥äº§çº¿ç¼å·" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="产线å称" prop="lineName"> |
| | | <el-input |
| | | v-model="queryParams.lineName" |
| | | placeholder="请è¾å
¥äº§çº¿å称" |
| | | clearable |
| | | @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 type="warning" icon="el-icon-copy-document" size="mini" @click="advancedQuery">é«çº§æ¥è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-form :model="queryParams" ref="queryParams" size="small" :inline="true" v-show="advancedShowSearch" label-width="68px"> |
| | | <el-form-item label="车é´ç¼å·" prop="workshopCode"> |
| | | <el-input |
| | | v-model="queryParams.workshopCode" |
| | | placeholder="请è¾å
¥è½¦é´ç¼å·" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥ä½æ¥å" prop="workCalendar"> |
| | | <el-input |
| | | v-model="queryParams.workCalendar" |
| | | placeholder="请è¾å
¥å·¥ä½æ¥å" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </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="['main:lineInfo: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="['main:lineInfo: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="['main:lineInfo: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="['main:lineInfo:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | <el-table v-loading="loading" border :data="lineInfoList" @selection-change="handleSelectionChange" v-if="lineInfoList.length > 0"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="产线ç¼å·" align="center" prop="lineCode"> |
| | | </el-table-column> |
| | | <el-table-column label="产线å称" align="center" prop="lineName"> |
| | | </el-table-column> |
| | | <el-table-column label="车é´ç¼ç " align="center" prop="workshopCode"> |
| | | </el-table-column> |
| | | <el-table-column label="车é´å称" align="center" prop="workshopName"> |
| | | </el-table-column> |
| | | <el-table-column label="å¤æ³¨" align="center" prop="remarks"> |
| | | </el-table-column> |
| | | <el-table-column label="å建ç¨æ·" align="center" prop="createUser" width="80"> |
| | | </el-table-column> |
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime" width="170"> |
| | | </el-table-column> |
| | | <el-table-column label="æ´æ°äºº" align="center" prop="updateUser" width="80"> |
| | | </el-table-column> |
| | | <el-table-column label="æ´æ°æ¶é´" align="center" prop="updateTime" width="170"> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['bs:lineInfo:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['bs:lineInfo:remove']" |
| | | >å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-empty v-else> |
| | | <span slot="description">ææ æ°æ®</span> |
| | | </el-empty> |
| | | </el-card> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- <el-table v-loading="loading" :data="lineInfoList" @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" class-name="small-padding fixed-width">--> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <el-button--> |
| | | <!-- size="mini"--> |
| | | <!-- type="text"--> |
| | | <!-- icon="el-icon-edit"--> |
| | | <!-- @click="handleUpdate(scope.row)"--> |
| | | <!-- v-hasPermi="['main:lineInfo:edit']"--> |
| | | <!-- >ä¿®æ¹</el-button>--> |
| | | <!-- <el-button--> |
| | | <!-- size="mini"--> |
| | | <!-- type="text"--> |
| | | <!-- icon="el-icon-delete"--> |
| | | <!-- @click="handleDelete(scope.row)"--> |
| | | <!-- v-hasPermi="['main:lineInfo:remove']"--> |
| | | <!-- >å é¤</el-button>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- </el-table>--> |
| | | |
| | | |
| | | |
| | | <!-- æ·»å æä¿®æ¹äº§çº¿ä¿¡æ¯å¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="产线ç¼å·" prop="lineCode"> |
| | | <el-input v-model="form.lineCode" placeholder="请è¾å
¥äº§çº¿ç¼å·" /> |
| | | </el-form-item> |
| | | <el-form-item label="产线å称" prop="lineName"> |
| | | <el-input v-model="form.lineName" placeholder="请è¾å
¥äº§çº¿å称" /> |
| | | </el-form-item> |
| | | <el-form-item label="车é´ç¼å·" prop="workshopCode"> |
| | | <el-input v-model="form.workshopCode" placeholder="请è¾å
¥è½¦é´ç¼å·" /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="å·¥ä½æ¥å" prop="workCalendar">--> |
| | | <!-- <el-input v-model="form.workCalendar" placeholder="请è¾å
¥å·¥ä½æ¥å" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="é¢çå段1" prop="spareField1">--> |
| | | <!-- <el-input v-model="form.spareField1" placeholder="请è¾å
¥é¢çå段1" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="é¢çå段2" prop="spareField2">--> |
| | | <!-- <el-input v-model="form.spareField2" placeholder="请è¾å
¥é¢çå段2" />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="å¤æ³¨" prop="remarks"> |
| | | <el-input v-model="form.remarks" placeholder="请è¾å
¥å¤æ³¨" /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="å建ç¨æ·" prop="createUser">--> |
| | | <!-- <el-input v-model="form.createUser" placeholder="请è¾å
¥å建ç¨æ·" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="æ´æ¹ç¨æ·" prop="updateUser">--> |
| | | <!-- <el-input v-model="form.updateUser" 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 { listLineInfo, getLineInfo, delLineInfo, addLineInfo, updateLineInfo } from "@/api/main/bs/lineInfo/lineInfo"; |
| | | |
| | | export default { |
| | | name: "LineInfo", |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // 产线信æ¯è¡¨æ ¼æ°æ® |
| | | lineInfoList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | advancedShowSearch: false, |
| | | // æ¥è¯¢åæ° |
| | | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | lineCode: null, |
| | | lineName: null, |
| | | workshopCode: null, |
| | | workCalendar: null, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | lineCode: [ |
| | | { required: true, message: "产线ç¼å·ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | lineName: [ |
| | | { required: true, message: "产线å称ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | workshopCode: [ |
| | | { required: true, message: "车é´ç¼å·ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | advancedQuery(){ |
| | | this.advancedShowSearch = (this.advancedShowSearch) ? this.advancedShowSearch = false : this.advancedShowSearch = true; |
| | | }, |
| | | /** æ¥è¯¢äº§çº¿ä¿¡æ¯å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listLineInfo(this.queryParams).then(response => { |
| | | this.lineInfoList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | lineCode: null, |
| | | lineName: null, |
| | | workshopCode: null, |
| | | workCalendar: null, |
| | | spareField1: null, |
| | | spareField2: null, |
| | | remarks: null, |
| | | createUser: null, |
| | | createTime: null, |
| | | updateUser: null, |
| | | updateTime: 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.title = "æ·»å 产线信æ¯"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getLineInfo(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹äº§çº¿ä¿¡æ¯"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateLineInfo(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addLineInfo(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 delLineInfo(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('main/lineInfo/export', { |
| | | ...this.queryParams |
| | | }, `lineInfo_${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="workOrderCode"> |
| | | <el-input |
| | | v-model="queryParams.workOrderCode" |
| | | placeholder="请è¾å
¥å·¥åç¼å·" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="SFCæ»æåºåå·" prop="sfcCode" label-width="110px"> |
| | | <el-input |
| | | v-model="queryParams.sfcCode" |
| | | placeholder="请è¾å
¥SFCæ»æåºåå·" |
| | | clearable |
| | | @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 type="warning" icon="el-icon-copy-document" size="mini" @click="advancedQuery">é«çº§æ¥è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-form :model="queryParams" ref="queryParams" size="small" :inline="true" v-show="advancedShowSearch" label-width="68px"> |
| | | <el-form-item label="产åç¼å·" prop="productCode"> |
| | | <el-input |
| | | v-model="queryParams.productCode" |
| | | placeholder="请è¾å
¥äº§åç¼å·" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="产åå称" prop="productName"> |
| | | <el-input |
| | | v-model="queryParams.productName" |
| | | placeholder="请è¾å
¥äº§åå称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="æ¯å¦åæ ¼" prop="status"> |
| | | <el-input |
| | | v-model="queryParams.status" |
| | | placeholder="请è¾å
¥æ¯å¦åæ ¼" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </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="['om:workReport: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="['om:' + |
| | | '']" |
| | | >ä¿®æ¹</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="['om:workReport: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="['om:workReport:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="workReportList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <!-- <el-table-column label="å·¥åç¼å·" align="center" prop="workOrderCode" />--> |
| | | <el-table-column label="å·¥åç¼å·" width="130" align="center"> |
| | | <template slot-scope="scope"> |
| | | <router-link :to="{path: '/main/route-data/index/', query: {workOrderCode: scope.row.workOrderCode} }" class="link-type"> |
| | | <span>{{ scope.row.workOrderCode }}</span> |
| | | </router-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="SFCæ»æåºåå·" align="center" prop="sfcCode" /> |
| | | <el-table-column label="产åç¼å·" align="center" prop="productCode" /> |
| | | <el-table-column label="产åå称" align="center" prop="productName" /> |
| | | <el-table-column label="ä¸çº¿æ¶é´" align="center" prop="upTime" /> |
| | | <el-table-column label="ä¸çº¿æ¶é´" align="center" prop="offlineTime" /> |
| | | <el-table-column label="æ¯å¦åæ ¼" align="center" prop="status"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å¤æ³¨" align="center" prop="remark" /> |
| | | |
| | | <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['om:workReport:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['om:workReport: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 :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="å·¥åç¼å·" prop="workOrderCode"> |
| | | <el-input v-model="form.workOrderCode" placeholder="请è¾å
¥å·¥åç¼å·" /> |
| | | </el-form-item> |
| | | <el-form-item label="SFCæ»æåºåå·" prop="sfcCode"> |
| | | <el-input v-model="form.sfcCode" placeholder="请è¾å
¥SFCæ»æåºåå·" /> |
| | | </el-form-item> |
| | | <el-form-item label="产åç¼å·" prop="productCode"> |
| | | <el-input v-model="form.productCode" placeholder="请è¾å
¥äº§åç¼å·" /> |
| | | </el-form-item> |
| | | <el-form-item label="产åå称" prop="productName"> |
| | | <el-input v-model="form.productName" placeholder="请è¾å
¥äº§åå称" /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="æ¯å¦åæ ¼" prop="status">--> |
| | | <!-- <el-input v-model="form.status" placeholder="请è¾å
¥äº§åå称" />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="æ¯å¦åæ ¼" prop="status"> |
| | | <el-radio-group v-model="form.status"> |
| | | <el-radio |
| | | v-for="dict in dict.type.sys_yes_no" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | </el-radio-group> |
| | | </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 { listWorkReport, getWorkReport, delWorkReport, addWorkReport, updateWorkReport } from "@/api/main/om/workReport/workReport"; |
| | | |
| | | export default { |
| | | name: "WorkReport", |
| | | dicts: ['sys_yes_no'], |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // æ¥å·¥è®°å½ è¡¨è¡¨æ ¼æ°æ® |
| | | workReportList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | advancedShowSearch: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | workOrderCode: null, |
| | | sfcCode: null, |
| | | productCode: null, |
| | | productName: null, |
| | | upTime: null, |
| | | offlineTime: null, |
| | | status: null, |
| | | createUser: null, |
| | | updateUser: null, |
| | | spareField1: null, |
| | | spareField2: null, |
| | | spareField3: null, |
| | | spareField4: null |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | workOrderCode: [ |
| | | { required: true, message: "请è¾å
¥å·¥åç¼å·", trigger: "blur" } |
| | | ], |
| | | sfcCode: [ |
| | | { required: true, message: "请è¾å
¥SFCæ»æåºåå·", trigger: "blur" } |
| | | ], |
| | | productCode: [ |
| | | { required: true, message: "请è¾å
¥äº§åç¼å·", trigger: "blur" } |
| | | ], |
| | | productName: [ |
| | | { required: true, message: "请è¾å
¥äº§åå称", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | advancedQuery(){ |
| | | this.advancedShowSearch = (this.advancedShowSearch) ? this.advancedShowSearch = false : this.advancedShowSearch = true; |
| | | }, |
| | | /** æ¥è¯¢æ¥å·¥è®°å½ 表å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listWorkReport(this.queryParams).then(response => { |
| | | this.workReportList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | workOrderCode: null, |
| | | sfcCode: null, |
| | | productCode: null, |
| | | productName: null, |
| | | upTime: null, |
| | | offlineTime: null, |
| | | status: null, |
| | | createUser: null, |
| | | createTime: null, |
| | | updateUser: null, |
| | | updateTime: null, |
| | | remark: 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.title = "æ·»å æ¥å·¥è®°å½è¡¨"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getWorkReport(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹æ¥å·¥è®°å½è¡¨"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateWorkReport(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addWorkReport(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 delWorkReport(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('om/workReport/export', { |
| | | ...this.queryParams |
| | | }, `workReport_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |