| | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.main.bs.material.domain.BsMaterialInfo; |
| | | import com.jcdm.main.bs.material.service.IBsMaterialInfoService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | import com.jcdm.common.enums.BusinessType; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | import com.jcdm.common.utils.DateUtils; |
| | | |
| | | /** |
| | | * ç©æä¿¡æ¯Controller |
| | |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody BsMaterialInfo bsMaterialInfo) |
| | | { |
| | | bsMaterialInfo.setCreateBy(getUsername()); |
| | | bsMaterialInfo.setCreateTime(DateUtils.getNowDate()); |
| | | return toAjax(bsMaterialInfoService.insertBsMaterialInfo(bsMaterialInfo)); |
| | | } |
| | | |
| | |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody BsMaterialInfo bsMaterialInfo) |
| | | { |
| | | bsMaterialInfo.setUpdateBy(getUsername()); |
| | | bsMaterialInfo.setUpdateTime(DateUtils.getNowDate()); |
| | | return toAjax(bsMaterialInfoService.updateBsMaterialInfo(bsMaterialInfo)); |
| | | } |
| | | |
| | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.main.bs.productBom.domain.BsProductBomInfo; |
| | | import com.jcdm.main.bs.productBom.service.IBsProductBomInfoService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody BsProductBomInfo bsProductBomInfo) |
| | | { |
| | | bsProductBomInfo.setCreateBy(getUsername()); |
| | | bsProductBomInfo.setCreateTime(DateUtils.getNowDate()); |
| | | return toAjax(bsProductBomInfoService.insertBsProductBomInfo(bsProductBomInfo)); |
| | | } |
| | | |
| | |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody BsProductBomInfo bsProductBomInfo) |
| | | { |
| | | bsProductBomInfo.setUpdateBy(getUsername()); |
| | | bsProductBomInfo.setUpdateTime(DateUtils.getNowDate()); |
| | | return toAjax(bsProductBomInfoService.updateBsProductBomInfo(bsProductBomInfo)); |
| | | } |
| | | |
| | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.main.bs.productBomChild.domain.BsProductBomChildInfo; |
| | | import com.jcdm.main.bs.productBomChild.service.IBsProductBomChildInfoService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody BsProductBomChildInfo bsProductBomChildInfo) |
| | | { |
| | | bsProductBomChildInfo.setCreateBy(getUsername()); |
| | | bsProductBomChildInfo.setCreateTime(DateUtils.getNowDate()); |
| | | return toAjax(bsProductBomChildInfoService.insertBsProductBomChildInfo(bsProductBomChildInfo)); |
| | | } |
| | | |
| | |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody BsProductBomChildInfo bsProductBomChildInfo) |
| | | { |
| | | bsProductBomChildInfo.setUpdateBy(getUsername()); |
| | | bsProductBomChildInfo.setUpdateTime(DateUtils.getNowDate()); |
| | | return toAjax(bsProductBomChildInfoService.updateBsProductBomChildInfo(bsProductBomChildInfo)); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.paramCollection.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.main.da.paramCollection.domain.DaParamCollection; |
| | | import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService; |
| | | 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.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * 设å¤äº§åè¿ç¨åæ°ééController |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-13 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/main/paramCollection") |
| | | public class DaParamCollectionController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IDaParamCollectionService daParamCollectionService; |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤äº§åè¿ç¨åæ°ééå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:paramCollection:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(DaParamCollection daParamCollection) |
| | | { |
| | | startPage(); |
| | | List<DaParamCollection> list = daParamCollectionService.selectDaParamCollectionList(daParamCollection); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¾å¤äº§åè¿ç¨åæ°ééå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:paramCollection:export')") |
| | | @Log(title = "设å¤äº§åè¿ç¨åæ°éé", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, DaParamCollection daParamCollection) |
| | | { |
| | | List<DaParamCollection> list = daParamCollectionService.selectDaParamCollectionList(daParamCollection); |
| | | ExcelUtil<DaParamCollection> util = new ExcelUtil<DaParamCollection>(DaParamCollection.class); |
| | | util.exportExcel(response, list, "设å¤äº§åè¿ç¨åæ°ééæ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·å设å¤äº§åè¿ç¨åæ°éé详ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:paramCollection:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(daParamCollectionService.selectDaParamCollectionById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤äº§åè¿ç¨åæ°éé |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:paramCollection:add')") |
| | | @Log(title = "设å¤äº§åè¿ç¨åæ°éé", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody DaParamCollection daParamCollection) |
| | | { |
| | | daParamCollection.setCreateBy(getUsername()); |
| | | daParamCollection.setCreateTime(DateUtils.getNowDate()); |
| | | return toAjax(daParamCollectionService.insertDaParamCollection(daParamCollection)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤äº§åè¿ç¨åæ°éé |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:paramCollection:edit')") |
| | | @Log(title = "设å¤äº§åè¿ç¨åæ°éé", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody DaParamCollection daParamCollection) |
| | | { |
| | | daParamCollection.setUpdateBy(getUsername()); |
| | | daParamCollection.setUpdateTime(DateUtils.getNowDate()); |
| | | return toAjax(daParamCollectionService.updateDaParamCollection(daParamCollection)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤äº§åè¿ç¨åæ°éé |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('main:paramCollection:remove')") |
| | | @Log(title = "设å¤äº§åè¿ç¨åæ°éé", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(daParamCollectionService.deleteDaParamCollectionByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.paramCollection.domain; |
| | | |
| | | import java.util.Date; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | 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; |
| | | |
| | | /** |
| | | * 设å¤äº§åè¿ç¨åæ°éé对象 da_param_collection |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-13 |
| | | */ |
| | | public class DaParamCollection extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®id */ |
| | | private Long id; |
| | | |
| | | /** å·¥åç¼å· */ |
| | | @Excel(name = "å·¥åç¼å·") |
| | | private String workOrderNo; |
| | | |
| | | /** æ»æåºåå· */ |
| | | @Excel(name = "æ»æåºåå·") |
| | | private String sfcCode; |
| | | |
| | | /** 产åç¼å· */ |
| | | @Excel(name = "产åç¼å·") |
| | | private String productCode; |
| | | |
| | | /** 产线ç¼å· */ |
| | | @Excel(name = "产线ç¼å·") |
| | | private String productionLine; |
| | | |
| | | /** å·¥ä½ç¼å· */ |
| | | @Excel(name = "å·¥ä½ç¼å·") |
| | | private String locationCode; |
| | | |
| | | /** 设å¤ç¼å· */ |
| | | @Excel(name = "设å¤ç¼å·") |
| | | private String equipmentNo; |
| | | |
| | | /** åæ°ç¼ç */ |
| | | @Excel(name = "åæ°ç¼ç ") |
| | | private String paramCode; |
| | | |
| | | /** åæ°å¼ */ |
| | | @Excel(name = "åæ°å¼") |
| | | private String paramValue; |
| | | |
| | | /** åæ°ä¸é */ |
| | | @Excel(name = "åæ°ä¸é") |
| | | private String paramUpper; |
| | | |
| | | /** åæ°ä¸é */ |
| | | @Excel(name = "åæ°ä¸é") |
| | | private String paramLower; |
| | | |
| | | /** æ åå¼ */ |
| | | @Excel(name = "æ åå¼") |
| | | private String paramStandard; |
| | | |
| | | /** ééæ¶é´ */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "ééæ¶é´", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date collectionTime; |
| | | |
| | | /** é¢çå段1 */ |
| | | private String spareField1; |
| | | |
| | | /** é¢çå段2 */ |
| | | private String spareField2; |
| | | |
| | | /** å建ç¨æ· */ |
| | | private String createUser; |
| | | |
| | | /** æ´æ¹ç¨æ· */ |
| | | private String updateUser; |
| | | |
| | | /** ç¶æï¼1åæ ¼ã2ä¸åæ ¼ï¼ */ |
| | | @Excel(name = "ç¶æ", readConverterExp = "1=åæ ¼ã2ä¸åæ ¼") |
| | | private String state; |
| | | |
| | | /** åæ°å称 */ |
| | | @Excel(name = "åæ°å称") |
| | | private String paramName; |
| | | |
| | | /** åä½ */ |
| | | @Excel(name = "åä½") |
| | | private String unit; |
| | | |
| | | /** ç±»å */ |
| | | @Excel(name = "ç±»å") |
| | | private String type; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setWorkOrderNo(String workOrderNo) |
| | | { |
| | | this.workOrderNo = workOrderNo; |
| | | } |
| | | |
| | | public String getWorkOrderNo() |
| | | { |
| | | return workOrderNo; |
| | | } |
| | | 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 setProductionLine(String productionLine) |
| | | { |
| | | this.productionLine = productionLine; |
| | | } |
| | | |
| | | public String getProductionLine() |
| | | { |
| | | return productionLine; |
| | | } |
| | | public void setLocationCode(String locationCode) |
| | | { |
| | | this.locationCode = locationCode; |
| | | } |
| | | |
| | | public String getLocationCode() |
| | | { |
| | | return locationCode; |
| | | } |
| | | public void setEquipmentNo(String equipmentNo) |
| | | { |
| | | this.equipmentNo = equipmentNo; |
| | | } |
| | | |
| | | public String getEquipmentNo() |
| | | { |
| | | return equipmentNo; |
| | | } |
| | | public void setParamCode(String paramCode) |
| | | { |
| | | this.paramCode = paramCode; |
| | | } |
| | | |
| | | public String getParamCode() |
| | | { |
| | | return paramCode; |
| | | } |
| | | public void setParamValue(String paramValue) |
| | | { |
| | | this.paramValue = paramValue; |
| | | } |
| | | |
| | | public String getParamValue() |
| | | { |
| | | return paramValue; |
| | | } |
| | | public void setParamUpper(String paramUpper) |
| | | { |
| | | this.paramUpper = paramUpper; |
| | | } |
| | | |
| | | public String getParamUpper() |
| | | { |
| | | return paramUpper; |
| | | } |
| | | public void setParamLower(String paramLower) |
| | | { |
| | | this.paramLower = paramLower; |
| | | } |
| | | |
| | | public String getParamLower() |
| | | { |
| | | return paramLower; |
| | | } |
| | | public void setParamStandard(String paramStandard) |
| | | { |
| | | this.paramStandard = paramStandard; |
| | | } |
| | | |
| | | public String getParamStandard() |
| | | { |
| | | return paramStandard; |
| | | } |
| | | public void setCollectionTime(Date collectionTime) |
| | | { |
| | | this.collectionTime = collectionTime; |
| | | } |
| | | |
| | | public Date getCollectionTime() |
| | | { |
| | | return collectionTime; |
| | | } |
| | | 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 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 setState(String state) |
| | | { |
| | | this.state = state; |
| | | } |
| | | |
| | | public String getState() |
| | | { |
| | | return state; |
| | | } |
| | | public void setParamName(String paramName) |
| | | { |
| | | this.paramName = paramName; |
| | | } |
| | | |
| | | public String getParamName() |
| | | { |
| | | return paramName; |
| | | } |
| | | public void setUnit(String unit) |
| | | { |
| | | this.unit = unit; |
| | | } |
| | | |
| | | public String getUnit() |
| | | { |
| | | return unit; |
| | | } |
| | | public void setType(String type) |
| | | { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getType() |
| | | { |
| | | return type; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("workOrderNo", getWorkOrderNo()) |
| | | .append("sfcCode", getSfcCode()) |
| | | .append("productCode", getProductCode()) |
| | | .append("productionLine", getProductionLine()) |
| | | .append("locationCode", getLocationCode()) |
| | | .append("equipmentNo", getEquipmentNo()) |
| | | .append("paramCode", getParamCode()) |
| | | .append("paramValue", getParamValue()) |
| | | .append("paramUpper", getParamUpper()) |
| | | .append("paramLower", getParamLower()) |
| | | .append("paramStandard", getParamStandard()) |
| | | .append("collectionTime", getCollectionTime()) |
| | | .append("spareField1", getSpareField1()) |
| | | .append("spareField2", getSpareField2()) |
| | | .append("createUser", getCreateUser()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateUser", getUpdateUser()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("state", getState()) |
| | | .append("paramName", getParamName()) |
| | | .append("unit", getUnit()) |
| | | .append("type", getType()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.paramCollection.mapper; |
| | | |
| | | import com.jcdm.main.da.paramCollection.domain.DaParamCollection; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设å¤äº§åè¿ç¨åæ°ééMapperæ¥å£ |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-13 |
| | | */ |
| | | public interface DaParamCollectionMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢è®¾å¤äº§åè¿ç¨åæ°éé |
| | | * |
| | | * @param id 设å¤äº§åè¿ç¨åæ°ééä¸»é® |
| | | * @return 设å¤äº§åè¿ç¨åæ°éé |
| | | */ |
| | | public DaParamCollection selectDaParamCollectionById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤äº§åè¿ç¨åæ°ééå表 |
| | | * |
| | | * @param daParamCollection 设å¤äº§åè¿ç¨åæ°éé |
| | | * @return 设å¤äº§åè¿ç¨åæ°éééå |
| | | */ |
| | | public List<DaParamCollection> selectDaParamCollectionList(DaParamCollection daParamCollection); |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤äº§åè¿ç¨åæ°éé |
| | | * |
| | | * @param daParamCollection 设å¤äº§åè¿ç¨åæ°éé |
| | | * @return ç»æ |
| | | */ |
| | | public int insertDaParamCollection(DaParamCollection daParamCollection); |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤äº§åè¿ç¨åæ°éé |
| | | * |
| | | * @param daParamCollection 设å¤äº§åè¿ç¨åæ°éé |
| | | * @return ç»æ |
| | | */ |
| | | public int updateDaParamCollection(DaParamCollection daParamCollection); |
| | | |
| | | /** |
| | | * å é¤è®¾å¤äº§åè¿ç¨åæ°éé |
| | | * |
| | | * @param id 设å¤äº§åè¿ç¨åæ°ééä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaParamCollectionById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤è®¾å¤äº§åè¿ç¨åæ°éé |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaParamCollectionByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.paramCollection.service; |
| | | |
| | | import com.jcdm.main.da.paramCollection.domain.DaParamCollection; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设å¤äº§åè¿ç¨åæ°ééServiceæ¥å£ |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-13 |
| | | */ |
| | | public interface IDaParamCollectionService |
| | | { |
| | | /** |
| | | * æ¥è¯¢è®¾å¤äº§åè¿ç¨åæ°éé |
| | | * |
| | | * @param id 设å¤äº§åè¿ç¨åæ°ééä¸»é® |
| | | * @return 设å¤äº§åè¿ç¨åæ°éé |
| | | */ |
| | | public DaParamCollection selectDaParamCollectionById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤äº§åè¿ç¨åæ°ééå表 |
| | | * |
| | | * @param daParamCollection 设å¤äº§åè¿ç¨åæ°éé |
| | | * @return 设å¤äº§åè¿ç¨åæ°éééå |
| | | */ |
| | | public List<DaParamCollection> selectDaParamCollectionList(DaParamCollection daParamCollection); |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤äº§åè¿ç¨åæ°éé |
| | | * |
| | | * @param daParamCollection 设å¤äº§åè¿ç¨åæ°éé |
| | | * @return ç»æ |
| | | */ |
| | | public int insertDaParamCollection(DaParamCollection daParamCollection); |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤äº§åè¿ç¨åæ°éé |
| | | * |
| | | * @param daParamCollection 设å¤äº§åè¿ç¨åæ°éé |
| | | * @return ç»æ |
| | | */ |
| | | public int updateDaParamCollection(DaParamCollection daParamCollection); |
| | | |
| | | /** |
| | | * æ¹éå é¤è®¾å¤äº§åè¿ç¨åæ°éé |
| | | * |
| | | * @param ids éè¦å é¤ç设å¤äº§åè¿ç¨åæ°éé主é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaParamCollectionByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤è®¾å¤äº§åè¿ç¨åæ°ééä¿¡æ¯ |
| | | * |
| | | * @param id 设å¤äº§åè¿ç¨åæ°ééä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaParamCollectionById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.paramCollection.service.impl; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.main.da.paramCollection.domain.DaParamCollection; |
| | | import com.jcdm.main.da.paramCollection.mapper.DaParamCollectionMapper; |
| | | import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * 设å¤äº§åè¿ç¨åæ°ééServiceä¸å¡å±å¤ç |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-13 |
| | | */ |
| | | @Service |
| | | public class DaParamCollectionServiceImpl implements IDaParamCollectionService |
| | | { |
| | | @Autowired |
| | | private DaParamCollectionMapper daParamCollectionMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤äº§åè¿ç¨åæ°éé |
| | | * |
| | | * @param id 设å¤äº§åè¿ç¨åæ°ééä¸»é® |
| | | * @return 设å¤äº§åè¿ç¨åæ°éé |
| | | */ |
| | | @Override |
| | | public DaParamCollection selectDaParamCollectionById(Long id) |
| | | { |
| | | return daParamCollectionMapper.selectDaParamCollectionById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¾å¤äº§åè¿ç¨åæ°ééå表 |
| | | * |
| | | * @param daParamCollection 设å¤äº§åè¿ç¨åæ°éé |
| | | * @return 设å¤äº§åè¿ç¨åæ°éé |
| | | */ |
| | | @Override |
| | | public List<DaParamCollection> selectDaParamCollectionList(DaParamCollection daParamCollection) |
| | | { |
| | | return daParamCollectionMapper.selectDaParamCollectionList(daParamCollection); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤äº§åè¿ç¨åæ°éé |
| | | * |
| | | * @param daParamCollection 设å¤äº§åè¿ç¨åæ°éé |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertDaParamCollection(DaParamCollection daParamCollection) |
| | | { |
| | | daParamCollection.setCreateTime(DateUtils.getNowDate()); |
| | | return daParamCollectionMapper.insertDaParamCollection(daParamCollection); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¾å¤äº§åè¿ç¨åæ°éé |
| | | * |
| | | * @param daParamCollection 设å¤äº§åè¿ç¨åæ°éé |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateDaParamCollection(DaParamCollection daParamCollection) |
| | | { |
| | | daParamCollection.setUpdateTime(DateUtils.getNowDate()); |
| | | return daParamCollectionMapper.updateDaParamCollection(daParamCollection); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤è®¾å¤äº§åè¿ç¨åæ°éé |
| | | * |
| | | * @param ids éè¦å é¤ç设å¤äº§åè¿ç¨åæ°ééä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteDaParamCollectionByIds(Long[] ids) |
| | | { |
| | | return daParamCollectionMapper.deleteDaParamCollectionByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è®¾å¤äº§åè¿ç¨åæ°ééä¿¡æ¯ |
| | | * |
| | | * @param id 设å¤äº§åè¿ç¨åæ°ééä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteDaParamCollectionById(Long id) |
| | | { |
| | | return daParamCollectionMapper.deleteDaParamCollectionById(id); |
| | | } |
| | | } |
| | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection; |
| | | import com.jcdm.main.da.passingStationCollection.service.IDaPassingStationCollectionService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody DaPassingStationCollection daPassingStationCollection) |
| | | { |
| | | daPassingStationCollection.setCreateBy(getUsername()); |
| | | daPassingStationCollection.setCreateTime(DateUtils.getNowDate()); |
| | | return toAjax(daPassingStationCollectionService.insertDaPassingStationCollection(daPassingStationCollection)); |
| | | } |
| | | |
| | |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody DaPassingStationCollection daPassingStationCollection) |
| | | { |
| | | daPassingStationCollection.setUpdateBy(getUsername()); |
| | | daPassingStationCollection.setUpdateTime(DateUtils.getNowDate()); |
| | | return toAjax(daPassingStationCollectionService.updateDaPassingStationCollection(daPassingStationCollection)); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.da.paramCollection.mapper.DaParamCollectionMapper"> |
| | | |
| | | <resultMap type="DaParamCollection" id="DaParamCollectionResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="workOrderNo" column="work_order_no" /> |
| | | <result property="sfcCode" column="sfc_code" /> |
| | | <result property="productCode" column="product_code" /> |
| | | <result property="productionLine" column="production_line" /> |
| | | <result property="locationCode" column="location_code" /> |
| | | <result property="equipmentNo" column="equipment_no" /> |
| | | <result property="paramCode" column="param_code" /> |
| | | <result property="paramValue" column="param_value" /> |
| | | <result property="paramUpper" column="param_upper" /> |
| | | <result property="paramLower" column="param_lower" /> |
| | | <result property="paramStandard" column="param_standard" /> |
| | | <result property="collectionTime" column="collection_time" /> |
| | | <result property="spareField1" column="spare_field_1" /> |
| | | <result property="spareField2" column="spare_field_2" /> |
| | | <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="state" column="state" /> |
| | | <result property="paramName" column="param_name" /> |
| | | <result property="unit" column="unit" /> |
| | | <result property="type" column="type" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectDaParamCollectionVo"> |
| | | select id, work_order_no, sfc_code, product_code, production_line, location_code, equipment_no, param_code, param_value, param_upper, param_lower, param_standard, collection_time, spare_field_1, spare_field_2, create_user, create_time, update_user, update_time, state, param_name, unit, type from da_param_collection |
| | | </sql> |
| | | |
| | | <select id="selectDaParamCollectionList" parameterType="DaParamCollection" resultMap="DaParamCollectionResult"> |
| | | <include refid="selectDaParamCollectionVo"/> |
| | | <where> |
| | | <if test="workOrderNo != null and workOrderNo != ''"> and work_order_no = #{workOrderNo}</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="productionLine != null and productionLine != ''"> and production_line = #{productionLine}</if> |
| | | <if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if> |
| | | <if test="equipmentNo != null and equipmentNo != ''"> and equipment_no = #{equipmentNo}</if> |
| | | <if test="paramCode != null and paramCode != ''"> and param_code = #{paramCode}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectDaParamCollectionById" parameterType="Long" resultMap="DaParamCollectionResult"> |
| | | <include refid="selectDaParamCollectionVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertDaParamCollection" parameterType="DaParamCollection"> |
| | | insert into da_param_collection |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="workOrderNo != null and workOrderNo != ''">work_order_no,</if> |
| | | <if test="sfcCode != null and sfcCode != ''">sfc_code,</if> |
| | | <if test="productCode != null and productCode != ''">product_code,</if> |
| | | <if test="productionLine != null and productionLine != ''">production_line,</if> |
| | | <if test="locationCode != null and locationCode != ''">location_code,</if> |
| | | <if test="equipmentNo != null">equipment_no,</if> |
| | | <if test="paramCode != null and paramCode != ''">param_code,</if> |
| | | <if test="paramValue != null and paramValue != ''">param_value,</if> |
| | | <if test="paramUpper != null">param_upper,</if> |
| | | <if test="paramLower != null">param_lower,</if> |
| | | <if test="paramStandard != null">param_standard,</if> |
| | | <if test="collectionTime != null">collection_time,</if> |
| | | <if test="spareField1 != null">spare_field_1,</if> |
| | | <if test="spareField2 != null">spare_field_2,</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="state != null">state,</if> |
| | | <if test="paramName != null">param_name,</if> |
| | | <if test="unit != null">unit,</if> |
| | | <if test="type != null">type,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="workOrderNo != null and workOrderNo != ''">#{workOrderNo},</if> |
| | | <if test="sfcCode != null and sfcCode != ''">#{sfcCode},</if> |
| | | <if test="productCode != null and productCode != ''">#{productCode},</if> |
| | | <if test="productionLine != null and productionLine != ''">#{productionLine},</if> |
| | | <if test="locationCode != null and locationCode != ''">#{locationCode},</if> |
| | | <if test="equipmentNo != null">#{equipmentNo},</if> |
| | | <if test="paramCode != null and paramCode != ''">#{paramCode},</if> |
| | | <if test="paramValue != null and paramValue != ''">#{paramValue},</if> |
| | | <if test="paramUpper != null">#{paramUpper},</if> |
| | | <if test="paramLower != null">#{paramLower},</if> |
| | | <if test="paramStandard != null">#{paramStandard},</if> |
| | | <if test="collectionTime != null">#{collectionTime},</if> |
| | | <if test="spareField1 != null">#{spareField1},</if> |
| | | <if test="spareField2 != null">#{spareField2},</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="state != null">#{state},</if> |
| | | <if test="paramName != null">#{paramName},</if> |
| | | <if test="unit != null">#{unit},</if> |
| | | <if test="type != null">#{type},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateDaParamCollection" parameterType="DaParamCollection"> |
| | | update da_param_collection |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="workOrderNo != null and workOrderNo != ''">work_order_no = #{workOrderNo},</if> |
| | | <if test="sfcCode != null and sfcCode != ''">sfc_code = #{sfcCode},</if> |
| | | <if test="productCode != null and productCode != ''">product_code = #{productCode},</if> |
| | | <if test="productionLine != null and productionLine != ''">production_line = #{productionLine},</if> |
| | | <if test="locationCode != null and locationCode != ''">location_code = #{locationCode},</if> |
| | | <if test="equipmentNo != null">equipment_no = #{equipmentNo},</if> |
| | | <if test="paramCode != null and paramCode != ''">param_code = #{paramCode},</if> |
| | | <if test="paramValue != null and paramValue != ''">param_value = #{paramValue},</if> |
| | | <if test="paramUpper != null">param_upper = #{paramUpper},</if> |
| | | <if test="paramLower != null">param_lower = #{paramLower},</if> |
| | | <if test="paramStandard != null">param_standard = #{paramStandard},</if> |
| | | <if test="collectionTime != null">collection_time = #{collectionTime},</if> |
| | | <if test="spareField1 != null">spare_field_1 = #{spareField1},</if> |
| | | <if test="spareField2 != null">spare_field_2 = #{spareField2},</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="state != null">state = #{state},</if> |
| | | <if test="paramName != null">param_name = #{paramName},</if> |
| | | <if test="unit != null">unit = #{unit},</if> |
| | | <if test="type != null">type = #{type},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteDaParamCollectionById" parameterType="Long"> |
| | | delete from da_param_collection where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteDaParamCollectionByIds" parameterType="String"> |
| | | delete from da_param_collection where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢è®¾å¤äº§åè¿ç¨åæ°ééå表 |
| | | export function listParamCollection(query) { |
| | | return request({ |
| | | url: '/main/paramCollection/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢è®¾å¤äº§åè¿ç¨åæ°ééè¯¦ç» |
| | | export function getParamCollection(id) { |
| | | return request({ |
| | | url: '/main/paramCollection/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢è®¾å¤äº§åè¿ç¨åæ°éé |
| | | export function addParamCollection(data) { |
| | | return request({ |
| | | url: '/main/paramCollection', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹è®¾å¤äº§åè¿ç¨åæ°éé |
| | | export function updateParamCollection(data) { |
| | | return request({ |
| | | url: '/main/paramCollection', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤è®¾å¤äº§åè¿ç¨åæ°éé |
| | | export function delParamCollection(id) { |
| | | return request({ |
| | | url: '/main/paramCollection/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | |
| | | |
| | | /** |
| | | * éç¨jsæ¹æ³å°è£
å¤ç |
| | | * Copyright (c) 2019 ruoyi |
| | | */ |
| | | |
| | | // æ¥ææ ¼å¼å |
| | |
| | | |
| | | <!-- æ·»å æä¿®æ¹åºç¡BOM对è¯æ¡ --> |
| | | <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 ref="form" :model="form" :rules="rules" label-width="100px"> |
| | | <el-form-item label="BOMç¼ç " prop="bomCode"> |
| | | <el-input v-model="form.bomCode" placeholder="请è¾å
¥BOMç¼ç " /> |
| | | </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="remark"> |
| | | <el-input v-model="form.remark" 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-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-item label="æ°æ®æ¥æº" prop="dataSource"> |
| | | <el-input v-model="form.dataSource" placeholder="请è¾å
¥æ°æ®æ¥æº" /> |
| | | </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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-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:paramCollection: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:paramCollection: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:paramCollection: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:paramCollection:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="paramCollectionList" @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="workOrderNo"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.workOrderNo"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="æ»æåºåå·" align="center" prop="sfcCode"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.sfcCode"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="产åç¼å·" align="center" prop="productCode"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.productCode"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="产线ç¼å·" align="center" prop="productionLine"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.productionLine"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥ä½ç¼å·" align="center" prop="locationCode"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.locationCode"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="设å¤ç¼å·" align="center" prop="equipmentNo"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.equipmentNo"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="åæ°ç¼ç " align="center" prop="paramCode"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.paramCode"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="åæ°å¼" align="center" prop="paramValue"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.paramValue"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="åæ°ä¸é" align="center" prop="paramUpper"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.paramUpper"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="åæ°ä¸é" align="center" prop="paramLower"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.paramLower"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="æ åå¼" align="center" prop="paramStandard"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.paramStandard"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="ééæ¶é´" align="center" prop="collectionTime" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.collectionTime, '{y}-{m}-{d}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç¶æ" align="center" prop="state"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.state"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="åæ°å称" align="center" prop="paramName"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.paramName"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="åä½" align="center" prop="unit"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.unit"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="ç±»å" align="center" prop="type"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.type"/>--> |
| | | <!-- </template>--> |
| | | </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="['main:paramCollection:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['main:paramCollection:remove']" |
| | | >å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <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="workOrderNo"> |
| | | <el-input v-model="form.workOrderNo" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ»æåºåå·" prop="sfcCode"> |
| | | <el-input v-model="form.sfcCode" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="产åç¼å·" prop="productCode"> |
| | | <el-input v-model="form.productCode" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="产线ç¼å·" prop="productionLine"> |
| | | <el-input v-model="form.productionLine" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥ä½ç¼å·" prop="locationCode"> |
| | | <el-input v-model="form.locationCode" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤ç¼å·" prop="equipmentNo"> |
| | | <el-input v-model="form.equipmentNo" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="åæ°ç¼ç " prop="paramCode"> |
| | | <el-input v-model="form.paramCode" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="åæ°å¼" prop="paramValue"> |
| | | <el-input v-model="form.paramValue" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="åæ°ä¸é" prop="paramUpper"> |
| | | <el-input v-model="form.paramUpper" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="åæ°ä¸é" prop="paramLower"> |
| | | <el-input v-model="form.paramLower" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ åå¼" prop="paramStandard"> |
| | | <el-input v-model="form.paramStandard" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="ééæ¶é´" prop="collectionTime"> |
| | | <el-date-picker clearable |
| | | v-model="form.collectionTime" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="请éæ©ééæ¶é´"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="é¢çå段1" prop="spareField1"> |
| | | <el-input v-model="form.spareField1" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="é¢çå段2" prop="spareField2"> |
| | | <el-input v-model="form.spareField2" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="å建ç¨æ·" prop="createUser"> |
| | | <el-input v-model="form.createUser" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ´æ¹ç¨æ·" prop="updateUser"> |
| | | <el-input v-model="form.updateUser" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="state"> |
| | | <el-input v-model="form.state" placeholder="请è¾å
¥ç¶æ" /> |
| | | </el-form-item> |
| | | <el-form-item label="åæ°å称" prop="paramName"> |
| | | <el-input v-model="form.paramName" placeholder="请è¾å
¥åæ°å称" /> |
| | | </el-form-item> |
| | | <el-form-item label="åä½" prop="unit"> |
| | | <el-input v-model="form.unit" placeholder="请è¾å
¥åä½" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç±»å" prop="type"> |
| | | <el-select v-model="form.type" 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> |
| | | <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 { listParamCollection, getParamCollection, delParamCollection, addParamCollection, updateParamCollection } from "@/api/main/da/paramCollection/paramCollection"; |
| | | |
| | | export default { |
| | | name: "ParamCollection", |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // 设å¤äº§åè¿ç¨åæ°ééè¡¨æ ¼æ°æ® |
| | | paramCollectionList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | workOrderNo: null, |
| | | sfcCode: null, |
| | | productCode: null, |
| | | productionLine: null, |
| | | locationCode: null, |
| | | equipmentNo: null, |
| | | paramCode: null, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | workOrderNo: [ |
| | | { required: true, message: "å·¥åç¼å·ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | sfcCode: [ |
| | | { required: true, message: "æ»æåºåå·ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | productCode: [ |
| | | { required: true, message: "产åç¼å·ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | productionLine: [ |
| | | { required: true, message: "产线ç¼å·ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | locationCode: [ |
| | | { required: true, message: "å·¥ä½ç¼å·ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | paramCode: [ |
| | | { required: true, message: "åæ°ç¼ç ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | paramValue: [ |
| | | { required: true, message: "åæ°å¼ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢è®¾å¤äº§åè¿ç¨åæ°ééå表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listParamCollection(this.queryParams).then(response => { |
| | | this.paramCollectionList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | workOrderNo: null, |
| | | sfcCode: null, |
| | | productCode: null, |
| | | productionLine: null, |
| | | locationCode: null, |
| | | equipmentNo: null, |
| | | paramCode: null, |
| | | paramValue: null, |
| | | paramUpper: null, |
| | | paramLower: null, |
| | | paramStandard: null, |
| | | collectionTime: null, |
| | | spareField1: null, |
| | | spareField2: null, |
| | | createUser: null, |
| | | createTime: null, |
| | | updateUser: null, |
| | | updateTime: null, |
| | | state: null, |
| | | paramName: null, |
| | | unit: null, |
| | | type: 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 |
| | | getParamCollection(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) { |
| | | updateParamCollection(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addParamCollection(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 delParamCollection(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('main/paramCollection/export', { |
| | | ...this.queryParams |
| | | }, `paramCollection_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |