Merge remote-tracking branch 'origin/master'
| | |
| | | excludes: /system/notice |
| | | # å¹é
é¾æ¥ |
| | | urlPatterns: /system/*,/monitor/*,/tool/* |
| | | |
| | | kangaroohy: |
| | | milo: |
| | | primary: default |
| | | config: |
| | | default: |
| | | endpoint: opc.tcp://127.0.0.1:49320 |
| | | security-policy: none |
| | |
| | | <dependency> |
| | | <groupId>com.jcdm</groupId> |
| | | <artifactId>jcdm-common</artifactId> |
| | | <exclusions> |
| | | <exclusion> |
| | | <artifactId>mybatis-spring</artifactId> |
| | | <groupId>org.mybatis</groupId> |
| | | </exclusion> |
| | | <exclusion> |
| | | <artifactId>mybatis</artifactId> |
| | | <groupId>org.mybatis</groupId> |
| | | </exclusion> |
| | | <exclusion> |
| | | <artifactId>jsqlparser</artifactId> |
| | | <groupId>com.github.jsqlparser</groupId> |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.kangaroohy</groupId> |
| | | <artifactId>milo-spring-boot-starter</artifactId> |
| | | <version>3.0.4</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.projectlombok</groupId> |
| | | <artifactId>lombok</artifactId> |
| | | <optional>true</optional> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | |
| | | @Excel(name = "æ´æ¹ç¨æ·") |
| | | private String updateUser; |
| | | |
| | | @Excel(name = "车é´å称") |
| | | private String workshopName; |
| | | @Excel(name = "ç¶æ") |
| | | private String status; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | |
| | | { |
| | | return lineName; |
| | | } |
| | | public void setWorkshopName(String workshopName) |
| | | { |
| | | this.workshopName = workshopName; |
| | | } |
| | | |
| | | public String getWorkshopName() |
| | | { |
| | | return workshopName; |
| | | } |
| | | public void setWorkshopCode(String workshopCode) |
| | | { |
| | | this.workshopCode = workshopCode; |
| | |
| | | public String getWorkCalendar() |
| | | { |
| | | return workCalendar; |
| | | } |
| | | public void setStatus(String status) |
| | | { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getStatus() |
| | | { |
| | | return status; |
| | | } |
| | | public void setSpareField1(String spareField1) |
| | | { |
| | |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateUser", getUpdateUser()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("workshopName", getWorkshopName()) |
| | | .append("status", getStatus()) |
| | | .toString(); |
| | | } |
| | | } |
| | |
| | | @Excel(name = "æ´æ°äºº") |
| | | private String updateUser; |
| | | |
| | | @Excel(name = "ç¶æ") |
| | | private String status; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | |
| | | { |
| | | return spareField2; |
| | | } |
| | | public void setStatus(String status) |
| | | { |
| | | this.status = status; |
| | | } |
| | | public String getStatus() {return status;} |
| | | public void setRemarks(String remarks) |
| | | { |
| | | this.remarks = remarks; |
| | |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateUser", getUpdateUser()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("status", getStatus()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.opcuaconfig.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.jcdm.main.da.opcuaconfig.domain.DaOpcuaConfig; |
| | | import com.jcdm.main.da.opcuaconfig.service.IDaOpcuaConfigService; |
| | | 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; |
| | | |
| | | /** |
| | | * OPCUAåæ°è®¾ç½®Controller |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-22 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/da/opcuaconfig") |
| | | public class DaOpcuaConfigController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IDaOpcuaConfigService daOpcuaConfigService; |
| | | |
| | | /** |
| | | * æ¥è¯¢OPCUAåæ°è®¾ç½®å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:opcuaconfig:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(DaOpcuaConfig daOpcuaConfig) |
| | | { |
| | | startPage(); |
| | | List<DaOpcuaConfig> list = daOpcuaConfigService.selectDaOpcuaConfigList(daOpcuaConfig); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('da:opcuaconfig:getconfig')") |
| | | @GetMapping("/getconfig") |
| | | public List<DaOpcuaConfig> getconfig(DaOpcuaConfig daOpcuaConfig) |
| | | { |
| | | return daOpcuaConfigService.selectDaOpcuaConfigList(daOpcuaConfig); |
| | | } |
| | | |
| | | /** |
| | | * 导åºOPCUAåæ°è®¾ç½®å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:opcuaconfig:export')") |
| | | @Log(title = "OPCUAåæ°è®¾ç½®", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, DaOpcuaConfig daOpcuaConfig) |
| | | { |
| | | List<DaOpcuaConfig> list = daOpcuaConfigService.selectDaOpcuaConfigList(daOpcuaConfig); |
| | | ExcelUtil<DaOpcuaConfig> util = new ExcelUtil<DaOpcuaConfig>(DaOpcuaConfig.class); |
| | | util.exportExcel(response, list, "OPCUAåæ°è®¾ç½®æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åOPCUAåæ°è®¾ç½®è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:opcuaconfig:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(daOpcuaConfigService.selectDaOpcuaConfigById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢OPCUAåæ°è®¾ç½® |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:opcuaconfig:add')") |
| | | @Log(title = "OPCUAåæ°è®¾ç½®", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody DaOpcuaConfig daOpcuaConfig) |
| | | { |
| | | return toAjax(daOpcuaConfigService.insertDaOpcuaConfig(daOpcuaConfig)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹OPCUAåæ°è®¾ç½® |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:opcuaconfig:edit')") |
| | | @Log(title = "OPCUAåæ°è®¾ç½®", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody DaOpcuaConfig daOpcuaConfig) |
| | | { |
| | | return toAjax(daOpcuaConfigService.updateDaOpcuaConfig(daOpcuaConfig)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤OPCUAåæ°è®¾ç½® |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:opcuaconfig:remove')") |
| | | @Log(title = "OPCUAåæ°è®¾ç½®", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(daOpcuaConfigService.deleteDaOpcuaConfigByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.opcuaconfig.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; |
| | | |
| | | /** |
| | | * OPCUAåæ°è®¾ç½®å¯¹è±¡ da_opcua_config |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-22 |
| | | */ |
| | | public class DaOpcuaConfig extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** ID */ |
| | | private Long id; |
| | | |
| | | /** æå±æ¨¡å */ |
| | | @Excel(name = "æå±æ¨¡å") |
| | | private String module; |
| | | |
| | | /** èç¹ */ |
| | | @Excel(name = "èç¹") |
| | | private String node; |
| | | |
| | | /** é¿åº¦ */ |
| | | @Excel(name = "é¿åº¦") |
| | | private Long length; |
| | | |
| | | /** ç±»å */ |
| | | @Excel(name = "ç±»å") |
| | | private String sysTypes; |
| | | |
| | | /** åè½è¯´æ */ |
| | | @Excel(name = "åè½è¯´æ") |
| | | private String functionality; |
| | | |
| | | /** æ¯å¦è®¢é
*/ |
| | | @Excel(name = "æ¯å¦è®¢é
") |
| | | private Long subscribe; |
| | | |
| | | /** 订é
ååºæ¨¡å */ |
| | | @Excel(name = "订é
ååºæ¨¡å") |
| | | private String rModule; |
| | | |
| | | /** 订é
ååºå½æ° */ |
| | | @Excel(name = "订é
ååºå½æ°") |
| | | private String rFunction; |
| | | |
| | | /** å¤æ³¨ */ |
| | | @Excel(name = "å¤æ³¨") |
| | | private String remarks; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setModule(String module) |
| | | { |
| | | this.module = module; |
| | | } |
| | | |
| | | public String getModule() |
| | | { |
| | | return module; |
| | | } |
| | | public void setNode(String node) |
| | | { |
| | | this.node = node; |
| | | } |
| | | |
| | | public String getNode() |
| | | { |
| | | return node; |
| | | } |
| | | public void setLength(Long length) |
| | | { |
| | | this.length = length; |
| | | } |
| | | |
| | | public Long getLength() |
| | | { |
| | | return length; |
| | | } |
| | | public void setSysTypes(String sysTypes) |
| | | { |
| | | this.sysTypes = sysTypes; |
| | | } |
| | | |
| | | public String getSysTypes() |
| | | { |
| | | return sysTypes; |
| | | } |
| | | public void setFunctionality(String functionality) |
| | | { |
| | | this.functionality = functionality; |
| | | } |
| | | |
| | | public String getFunctionality() |
| | | { |
| | | return functionality; |
| | | } |
| | | public void setSubscribe(Long subscribe) |
| | | { |
| | | this.subscribe = subscribe; |
| | | } |
| | | |
| | | public Long getSubscribe() |
| | | { |
| | | return subscribe; |
| | | } |
| | | public void setrModule(String rModule) |
| | | { |
| | | this.rModule = rModule; |
| | | } |
| | | |
| | | public String getrModule() |
| | | { |
| | | return rModule; |
| | | } |
| | | public void setrFunction(String rFunction) |
| | | { |
| | | this.rFunction = rFunction; |
| | | } |
| | | |
| | | public String getrFunction() |
| | | { |
| | | return rFunction; |
| | | } |
| | | public void setRemarks(String remarks) |
| | | { |
| | | this.remarks = remarks; |
| | | } |
| | | |
| | | public String getRemarks() |
| | | { |
| | | return remarks; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("module", getModule()) |
| | | .append("node", getNode()) |
| | | .append("length", getLength()) |
| | | .append("sysTypes", getSysTypes()) |
| | | .append("functionality", getFunctionality()) |
| | | .append("subscribe", getSubscribe()) |
| | | .append("rModule", getrModule()) |
| | | .append("rFunction", getrFunction()) |
| | | .append("remarks", getRemarks()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.opcuaconfig.init; |
| | | |
| | | import com.kangaroohy.milo.runner.subscription.SubscriptionCallback; |
| | | import com.kangaroohy.milo.service.MiloService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.ApplicationArguments; |
| | | import org.springframework.boot.ApplicationRunner; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Component |
| | | @Slf4j |
| | | public class CustomRunner implements ApplicationRunner { |
| | | |
| | | @Autowired |
| | | private MiloService miloService; |
| | | |
| | | @Override |
| | | public void run(ApplicationArguments args) throws Exception { |
| | | sub(); |
| | | } |
| | | |
| | | private void sub() throws Exception { |
| | | List<String> ids = new ArrayList<>(); |
| | | ids.add("nbu01.OP1010.PalletID"); |
| | | // miloService.subscriptionFromOpcUa(ids, (id, value) -> log.info("subscription ç¹ä½ï¼{} 订é
å°æ¶æ¯ï¼{}", id, value)); |
| | | TestCallback testCallback = new TestCallback(); |
| | | miloService.subscriptionFromOpcUa(ids,testCallback); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.opcuaconfig.init; |
| | | |
| | | import com.jcdm.main.da.opcuaconfig.controller.DaOpcuaConfigController; |
| | | import com.jcdm.main.da.opcuaconfig.domain.DaOpcuaConfig; |
| | | import com.kangaroohy.milo.runner.subscription.SubscriptionCallback; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.lang.reflect.InvocationTargetException; |
| | | import java.lang.reflect.Method; |
| | | import java.util.List; |
| | | |
| | | @Component |
| | | public class TestCallback implements SubscriptionCallback { |
| | | |
| | | // public List<DaOpcuaConfig> b = null; |
| | | // @Autowired |
| | | // private DaOpcuaConfigController daOpcuaConfigController; |
| | | // public void onSubscribe(String identifier, Object value) { |
| | | // if (b == null || 0 > b.size()) { |
| | | // DaOpcuaConfig daOpcuaConfig=new DaOpcuaConfig(); |
| | | // daOpcuaConfig.setSubscribe(1L); |
| | | // b=daOpcuaConfigController.getconfig(daOpcuaConfig); |
| | | // } |
| | | // //使ç¨Stream APIå¨List<T>ä¸æ¥æ¾å
ç´ |
| | | // DaOpcuaConfig opcuaConf = b.stream() |
| | | // .filter(customer ->identifier.equals(customer.getNode())) |
| | | // .findAny() |
| | | // .orElse(null); |
| | | // try { |
| | | // Class<?> clazz = Class.forName(opcuaConf.getrModule()); |
| | | // Method method = clazz.getMethod(opcuaConf.getrFunction(), new Class[] { String.class, |
| | | // String.class }); |
| | | // method.invoke(clazz.newInstance(),new Object[] { |
| | | // new String(identifier), new String(value.toString()) }); |
| | | // } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException | InstantiationException | |
| | | // InvocationTargetException e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // } |
| | | public void onSubscribe(String identifier, Object value) { |
| | | if(identifier.equals("nbu01.OP1010.PalletID")){ |
| | | switch(value.toString()) { |
| | | case "Q": |
| | | System.out.println("订é
åè°æåQQQ"); |
| | | break; |
| | | case "T": |
| | | System.out.println("订é
åè°æåTTT"); |
| | | break; |
| | | case "F": |
| | | System.out.println("订é
åè°æå"); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.opcuaconfig.mapper; |
| | | |
| | | import com.jcdm.main.da.opcuaconfig.domain.DaOpcuaConfig; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * OPCUAåæ°è®¾ç½®Mapperæ¥å£ |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-22 |
| | | */ |
| | | public interface DaOpcuaConfigMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢OPCUAåæ°è®¾ç½® |
| | | * |
| | | * @param id OPCUAåæ°è®¾ç½®ä¸»é® |
| | | * @return OPCUAåæ°è®¾ç½® |
| | | */ |
| | | public DaOpcuaConfig selectDaOpcuaConfigById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢OPCUAåæ°è®¾ç½®å表 |
| | | * |
| | | * @param daOpcuaConfig OPCUAåæ°è®¾ç½® |
| | | * @return OPCUAåæ°è®¾ç½®éå |
| | | */ |
| | | public List<DaOpcuaConfig> selectDaOpcuaConfigList(DaOpcuaConfig daOpcuaConfig); |
| | | |
| | | /** |
| | | * æ°å¢OPCUAåæ°è®¾ç½® |
| | | * |
| | | * @param daOpcuaConfig OPCUAåæ°è®¾ç½® |
| | | * @return ç»æ |
| | | */ |
| | | public int insertDaOpcuaConfig(DaOpcuaConfig daOpcuaConfig); |
| | | |
| | | /** |
| | | * ä¿®æ¹OPCUAåæ°è®¾ç½® |
| | | * |
| | | * @param daOpcuaConfig OPCUAåæ°è®¾ç½® |
| | | * @return ç»æ |
| | | */ |
| | | public int updateDaOpcuaConfig(DaOpcuaConfig daOpcuaConfig); |
| | | |
| | | /** |
| | | * å é¤OPCUAåæ°è®¾ç½® |
| | | * |
| | | * @param id OPCUAåæ°è®¾ç½®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaOpcuaConfigById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤OPCUAåæ°è®¾ç½® |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaOpcuaConfigByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.opcuaconfig.service; |
| | | |
| | | import com.jcdm.main.da.opcuaconfig.domain.DaOpcuaConfig; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * OPCUAåæ°è®¾ç½®Serviceæ¥å£ |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-22 |
| | | */ |
| | | public interface IDaOpcuaConfigService |
| | | { |
| | | /** |
| | | * æ¥è¯¢OPCUAåæ°è®¾ç½® |
| | | * |
| | | * @param id OPCUAåæ°è®¾ç½®ä¸»é® |
| | | * @return OPCUAåæ°è®¾ç½® |
| | | */ |
| | | public DaOpcuaConfig selectDaOpcuaConfigById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢OPCUAåæ°è®¾ç½®å表 |
| | | * |
| | | * @param daOpcuaConfig OPCUAåæ°è®¾ç½® |
| | | * @return OPCUAåæ°è®¾ç½®éå |
| | | */ |
| | | public List<DaOpcuaConfig> selectDaOpcuaConfigList(DaOpcuaConfig daOpcuaConfig); |
| | | |
| | | /** |
| | | * æ°å¢OPCUAåæ°è®¾ç½® |
| | | * |
| | | * @param daOpcuaConfig OPCUAåæ°è®¾ç½® |
| | | * @return ç»æ |
| | | */ |
| | | public int insertDaOpcuaConfig(DaOpcuaConfig daOpcuaConfig); |
| | | |
| | | /** |
| | | * ä¿®æ¹OPCUAåæ°è®¾ç½® |
| | | * |
| | | * @param daOpcuaConfig OPCUAåæ°è®¾ç½® |
| | | * @return ç»æ |
| | | */ |
| | | public int updateDaOpcuaConfig(DaOpcuaConfig daOpcuaConfig); |
| | | |
| | | /** |
| | | * æ¹éå é¤OPCUAåæ°è®¾ç½® |
| | | * |
| | | * @param ids éè¦å é¤çOPCUAåæ°è®¾ç½®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaOpcuaConfigByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤OPCUAåæ°è®¾ç½®ä¿¡æ¯ |
| | | * |
| | | * @param id OPCUAåæ°è®¾ç½®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaOpcuaConfigById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.opcuaconfig.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.jcdm.main.da.opcuaconfig.domain.DaOpcuaConfig; |
| | | import com.jcdm.main.da.opcuaconfig.mapper.DaOpcuaConfigMapper; |
| | | import com.jcdm.main.da.opcuaconfig.service.IDaOpcuaConfigService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * OPCUAåæ°è®¾ç½®Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-22 |
| | | */ |
| | | @Service |
| | | public class DaOpcuaConfigServiceImpl implements IDaOpcuaConfigService |
| | | { |
| | | @Autowired |
| | | private DaOpcuaConfigMapper daOpcuaConfigMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢OPCUAåæ°è®¾ç½® |
| | | * |
| | | * @param id OPCUAåæ°è®¾ç½®ä¸»é® |
| | | * @return OPCUAåæ°è®¾ç½® |
| | | */ |
| | | @Override |
| | | public DaOpcuaConfig selectDaOpcuaConfigById(Long id) |
| | | { |
| | | return daOpcuaConfigMapper.selectDaOpcuaConfigById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢OPCUAåæ°è®¾ç½®å表 |
| | | * |
| | | * @param daOpcuaConfig OPCUAåæ°è®¾ç½® |
| | | * @return OPCUAåæ°è®¾ç½® |
| | | */ |
| | | @Override |
| | | public List<DaOpcuaConfig> selectDaOpcuaConfigList(DaOpcuaConfig daOpcuaConfig) |
| | | { |
| | | return daOpcuaConfigMapper.selectDaOpcuaConfigList(daOpcuaConfig); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢OPCUAåæ°è®¾ç½® |
| | | * |
| | | * @param daOpcuaConfig OPCUAåæ°è®¾ç½® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertDaOpcuaConfig(DaOpcuaConfig daOpcuaConfig) |
| | | { |
| | | return daOpcuaConfigMapper.insertDaOpcuaConfig(daOpcuaConfig); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹OPCUAåæ°è®¾ç½® |
| | | * |
| | | * @param daOpcuaConfig OPCUAåæ°è®¾ç½® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateDaOpcuaConfig(DaOpcuaConfig daOpcuaConfig) |
| | | { |
| | | return daOpcuaConfigMapper.updateDaOpcuaConfig(daOpcuaConfig); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤OPCUAåæ°è®¾ç½® |
| | | * |
| | | * @param ids éè¦å é¤çOPCUAåæ°è®¾ç½®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteDaOpcuaConfigByIds(Long[] ids) |
| | | { |
| | | return daOpcuaConfigMapper.deleteDaOpcuaConfigByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤OPCUAåæ°è®¾ç½®ä¿¡æ¯ |
| | | * |
| | | * @param id OPCUAåæ°è®¾ç½®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteDaOpcuaConfigById(Long id) |
| | | { |
| | | return daOpcuaConfigMapper.deleteDaOpcuaConfigById(id); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.rm.repairRecord.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.rm.repairRecord.domain.RmRepairRecord; |
| | | import com.jcdm.main.rm.repairRecord.service.IRmRepairRecordService; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * è¿ä¿®è®°å½Controller |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-22 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/rm/repairRecord") |
| | | public class RmRepairRecordController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IRmRepairRecordService rmRepairRecordService; |
| | | |
| | | /** |
| | | * æ¥è¯¢è¿ä¿®è®°å½å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('rm:repairRecord:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(RmRepairRecord rmRepairRecord) |
| | | { |
| | | startPage(); |
| | | List<RmRepairRecord> list = rmRepairRecordService.selectRmRepairRecordList(rmRepairRecord); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè¿ä¿®è®°å½å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('rm:repairRecord:export')") |
| | | @Log(title = "è¿ä¿®è®°å½", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, RmRepairRecord rmRepairRecord) |
| | | { |
| | | List<RmRepairRecord> list = rmRepairRecordService.selectRmRepairRecordList(rmRepairRecord); |
| | | ExcelUtil<RmRepairRecord> util = new ExcelUtil<RmRepairRecord>(RmRepairRecord.class); |
| | | util.exportExcel(response, list, "è¿ä¿®è®°å½æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åè¿ä¿®è®°å½è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('rm:repairRecord:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(rmRepairRecordService.selectRmRepairRecordById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è¿ä¿®è®°å½ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('rm:repairRecord:add')") |
| | | @Log(title = "è¿ä¿®è®°å½", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody RmRepairRecord rmRepairRecord) |
| | | { |
| | | return toAjax(rmRepairRecordService.insertRmRepairRecord(rmRepairRecord)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è¿ä¿®è®°å½ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('rm:repairRecord:edit')") |
| | | @Log(title = "è¿ä¿®è®°å½", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody RmRepairRecord rmRepairRecord) |
| | | { |
| | | return toAjax(rmRepairRecordService.updateRmRepairRecord(rmRepairRecord)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è¿ä¿®è®°å½ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('rm:repairRecord:remove')") |
| | | @Log(title = "è¿ä¿®è®°å½", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(rmRepairRecordService.deleteRmRepairRecordByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.rm.repairRecord.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; |
| | | |
| | | /** |
| | | * è¿ä¿®è®°å½å¯¹è±¡ rm_repair_record |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-22 |
| | | */ |
| | | public class RmRepairRecord extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®id */ |
| | | private Long id; |
| | | |
| | | /** æ»æç¼ç */ |
| | | @Excel(name = "æ»æç¼ç ") |
| | | private String snCode; |
| | | |
| | | /** è¿ä¿®æ è¯ */ |
| | | @Excel(name = "è¿ä¿®æ è¯") |
| | | private String repairIdentification; |
| | | |
| | | /** ç®±ä½ç¼ç */ |
| | | @Excel(name = "ç®±ä½ç¼ç ") |
| | | private String boxCode; |
| | | |
| | | /** å·¥åºç¼ç */ |
| | | @Excel(name = "å·¥åºç¼ç ") |
| | | private String processesCode; |
| | | |
| | | /** åç»æ */ |
| | | @Excel(name = "åç»æ") |
| | | private String originalResult; |
| | | |
| | | /** å建ç¨æ· */ |
| | | @Excel(name = "å建ç¨æ·") |
| | | private String createUser; |
| | | |
| | | /** æ´æ°ç¨æ· */ |
| | | @Excel(name = "æ´æ°ç¨æ·") |
| | | private String updateUser; |
| | | |
| | | /** è¿ä¿®ç»æ */ |
| | | @Excel(name = "è¿ä¿®ç»æ") |
| | | private String repairResults; |
| | | |
| | | /** ç¶æ */ |
| | | @Excel(name = "ç¶æ") |
| | | private String status; |
| | | |
| | | /** å¤æ³¨ */ |
| | | @Excel(name = "å¤æ³¨") |
| | | private String remarks; |
| | | |
| | | /** é¢çå段1 */ |
| | | @Excel(name = "é¢çå段1") |
| | | private String spareField1; |
| | | |
| | | /** é¢çå段2 */ |
| | | @Excel(name = "é¢çå段2") |
| | | private String spareField2; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setSnCode(String snCode) |
| | | { |
| | | this.snCode = snCode; |
| | | } |
| | | |
| | | public String getSnCode() |
| | | { |
| | | return snCode; |
| | | } |
| | | public void setRepairIdentification(String repairIdentification) |
| | | { |
| | | this.repairIdentification = repairIdentification; |
| | | } |
| | | |
| | | public String getRepairIdentification() |
| | | { |
| | | return repairIdentification; |
| | | } |
| | | public void setBoxCode(String boxCode) |
| | | { |
| | | this.boxCode = boxCode; |
| | | } |
| | | |
| | | public String getBoxCode() |
| | | { |
| | | return boxCode; |
| | | } |
| | | public void setProcessesCode(String processesCode) |
| | | { |
| | | this.processesCode = processesCode; |
| | | } |
| | | |
| | | public String getProcessesCode() |
| | | { |
| | | return processesCode; |
| | | } |
| | | public void setOriginalResult(String originalResult) |
| | | { |
| | | this.originalResult = originalResult; |
| | | } |
| | | |
| | | public String getOriginalResult() |
| | | { |
| | | return originalResult; |
| | | } |
| | | 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 setRepairResults(String repairResults) |
| | | { |
| | | this.repairResults = repairResults; |
| | | } |
| | | |
| | | public String getRepairResults() |
| | | { |
| | | return repairResults; |
| | | } |
| | | public void setStatus(String status) |
| | | { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getStatus() |
| | | { |
| | | return status; |
| | | } |
| | | public void setRemarks(String remarks) |
| | | { |
| | | this.remarks = remarks; |
| | | } |
| | | |
| | | public String getRemarks() |
| | | { |
| | | return remarks; |
| | | } |
| | | public void setSpareField1(String spareField1) |
| | | { |
| | | this.spareField1 = spareField1; |
| | | } |
| | | |
| | | public String getSpareField1() |
| | | { |
| | | return spareField1; |
| | | } |
| | | public void setSpareField2(String spareField2) |
| | | { |
| | | this.spareField2 = spareField2; |
| | | } |
| | | |
| | | public String getSpareField2() |
| | | { |
| | | return spareField2; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("snCode", getSnCode()) |
| | | .append("repairIdentification", getRepairIdentification()) |
| | | .append("boxCode", getBoxCode()) |
| | | .append("processesCode", getProcessesCode()) |
| | | .append("originalResult", getOriginalResult()) |
| | | .append("createUser", getCreateUser()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("updateUser", getUpdateUser()) |
| | | .append("repairResults", getRepairResults()) |
| | | .append("status", getStatus()) |
| | | .append("remarks", getRemarks()) |
| | | .append("spareField1", getSpareField1()) |
| | | .append("spareField2", getSpareField2()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.rm.repairRecord.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.rm.repairRecord.domain.RmRepairRecord; |
| | | |
| | | /** |
| | | * è¿ä¿®è®°å½Mapperæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-22 |
| | | */ |
| | | public interface RmRepairRecordMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢è¿ä¿®è®°å½ |
| | | * |
| | | * @param id è¿ä¿®è®°å½ä¸»é® |
| | | * @return è¿ä¿®è®°å½ |
| | | */ |
| | | public RmRepairRecord selectRmRepairRecordById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢è¿ä¿®è®°å½å表 |
| | | * |
| | | * @param rmRepairRecord è¿ä¿®è®°å½ |
| | | * @return è¿ä¿®è®°å½éå |
| | | */ |
| | | public List<RmRepairRecord> selectRmRepairRecordList(RmRepairRecord rmRepairRecord); |
| | | |
| | | /** |
| | | * æ°å¢è¿ä¿®è®°å½ |
| | | * |
| | | * @param rmRepairRecord è¿ä¿®è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertRmRepairRecord(RmRepairRecord rmRepairRecord); |
| | | |
| | | /** |
| | | * ä¿®æ¹è¿ä¿®è®°å½ |
| | | * |
| | | * @param rmRepairRecord è¿ä¿®è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateRmRepairRecord(RmRepairRecord rmRepairRecord); |
| | | |
| | | /** |
| | | * å é¤è¿ä¿®è®°å½ |
| | | * |
| | | * @param id è¿ä¿®è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteRmRepairRecordById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤è¿ä¿®è®°å½ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteRmRepairRecordByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.rm.repairRecord.service; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.rm.repairRecord.domain.RmRepairRecord; |
| | | |
| | | /** |
| | | * è¿ä¿®è®°å½Serviceæ¥å£ |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-22 |
| | | */ |
| | | public interface IRmRepairRecordService |
| | | { |
| | | /** |
| | | * æ¥è¯¢è¿ä¿®è®°å½ |
| | | * |
| | | * @param id è¿ä¿®è®°å½ä¸»é® |
| | | * @return è¿ä¿®è®°å½ |
| | | */ |
| | | public RmRepairRecord selectRmRepairRecordById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢è¿ä¿®è®°å½å表 |
| | | * |
| | | * @param rmRepairRecord è¿ä¿®è®°å½ |
| | | * @return è¿ä¿®è®°å½éå |
| | | */ |
| | | public List<RmRepairRecord> selectRmRepairRecordList(RmRepairRecord rmRepairRecord); |
| | | |
| | | /** |
| | | * æ°å¢è¿ä¿®è®°å½ |
| | | * |
| | | * @param rmRepairRecord è¿ä¿®è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertRmRepairRecord(RmRepairRecord rmRepairRecord); |
| | | |
| | | /** |
| | | * ä¿®æ¹è¿ä¿®è®°å½ |
| | | * |
| | | * @param rmRepairRecord è¿ä¿®è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateRmRepairRecord(RmRepairRecord rmRepairRecord); |
| | | |
| | | /** |
| | | * æ¹éå é¤è¿ä¿®è®°å½ |
| | | * |
| | | * @param ids éè¦å é¤çè¿ä¿®è®°å½ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteRmRepairRecordByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤è¿ä¿®è®°å½ä¿¡æ¯ |
| | | * |
| | | * @param id è¿ä¿®è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteRmRepairRecordById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.rm.repairRecord.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.rm.repairRecord.mapper.RmRepairRecordMapper; |
| | | import com.jcdm.main.rm.repairRecord.domain.RmRepairRecord; |
| | | import com.jcdm.main.rm.repairRecord.service.IRmRepairRecordService; |
| | | |
| | | /** |
| | | * è¿ä¿®è®°å½Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author Yi |
| | | * @date 2023-12-22 |
| | | */ |
| | | @Service |
| | | public class RmRepairRecordServiceImpl implements IRmRepairRecordService |
| | | { |
| | | @Autowired |
| | | private RmRepairRecordMapper rmRepairRecordMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢è¿ä¿®è®°å½ |
| | | * |
| | | * @param id è¿ä¿®è®°å½ä¸»é® |
| | | * @return è¿ä¿®è®°å½ |
| | | */ |
| | | @Override |
| | | public RmRepairRecord selectRmRepairRecordById(Long id) |
| | | { |
| | | return rmRepairRecordMapper.selectRmRepairRecordById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è¿ä¿®è®°å½å表 |
| | | * |
| | | * @param rmRepairRecord è¿ä¿®è®°å½ |
| | | * @return è¿ä¿®è®°å½ |
| | | */ |
| | | @Override |
| | | public List<RmRepairRecord> selectRmRepairRecordList(RmRepairRecord rmRepairRecord) |
| | | { |
| | | return rmRepairRecordMapper.selectRmRepairRecordList(rmRepairRecord); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è¿ä¿®è®°å½ |
| | | * |
| | | * @param rmRepairRecord è¿ä¿®è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertRmRepairRecord(RmRepairRecord rmRepairRecord) |
| | | { |
| | | rmRepairRecord.setCreateTime(DateUtils.getNowDate()); |
| | | return rmRepairRecordMapper.insertRmRepairRecord(rmRepairRecord); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è¿ä¿®è®°å½ |
| | | * |
| | | * @param rmRepairRecord è¿ä¿®è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateRmRepairRecord(RmRepairRecord rmRepairRecord) |
| | | { |
| | | rmRepairRecord.setUpdateTime(DateUtils.getNowDate()); |
| | | return rmRepairRecordMapper.updateRmRepairRecord(rmRepairRecord); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤è¿ä¿®è®°å½ |
| | | * |
| | | * @param ids éè¦å é¤çè¿ä¿®è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteRmRepairRecordByIds(Long[] ids) |
| | | { |
| | | return rmRepairRecordMapper.deleteRmRepairRecordByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è¿ä¿®è®°å½ä¿¡æ¯ |
| | | * |
| | | * @param id è¿ä¿®è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteRmRepairRecordById(Long id) |
| | | { |
| | | return rmRepairRecordMapper.deleteRmRepairRecordById(id); |
| | | } |
| | | } |
| | |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateUser" column="update_user" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="workshopName" column="workshop_name" /> |
| | | <result property="status" column="status" /> |
| | | </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 |
| | | 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,workshop_name,status from bs_line_info |
| | | </sql> |
| | | |
| | | <select id="selectBsLineInfoList" parameterType="BsLineInfo" resultMap="BsLineInfoResult"> |
| | |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateUser != null">update_user,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="workshopName != null">workshop_name,</if> |
| | | <if test="status != null">status,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="lineCode != null and lineCode != ''">#{lineCode},</if> |
| | |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateUser != null">#{updateUser},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="workshopName != null">#{workshopName},</if> |
| | | <if test="status != null">#{status},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <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="workshopName != null">workshop_name = #{workshopName},</if> |
| | | <if test="status != null">status = #{status},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateUser" column="update_user" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="status" column="status" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsWorkshopInfoVo"> |
| | | select id, workshop_code, workshop_name, spare_field_1, spare_field_2, remarks, create_user, create_time, update_user, update_time from bs_workshop_info |
| | | select id, workshop_code, workshop_name, spare_field_1, spare_field_2, remarks, create_user, create_time, update_user, update_time,status from bs_workshop_info |
| | | </sql> |
| | | |
| | | <select id="selectBsWorkshopInfoList" parameterType="BsWorkshopInfo" resultMap="BsWorkshopInfoResult"> |
| | |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateUser != null">update_user,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="status != null">status,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateUser != null">#{updateUser},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="status != null">#{status},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <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="status != null">status = #{status},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.opcuaconfig.mapper.DaOpcuaConfigMapper"> |
| | | |
| | | <resultMap type="DaOpcuaConfig" id="DaOpcuaConfigResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="module" column="module" /> |
| | | <result property="node" column="node" /> |
| | | <result property="length" column="length" /> |
| | | <result property="sysTypes" column="sys_types" /> |
| | | <result property="functionality" column="functionality" /> |
| | | <result property="subscribe" column="subscribe" /> |
| | | <result property="rModule" column="r_module" /> |
| | | <result property="rFunction" column="r_function" /> |
| | | <result property="remarks" column="remarks" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectDaOpcuaConfigVo"> |
| | | select id, module, node, length, sys_types, functionality, subscribe, r_module, r_function, remarks from da_opcua_config |
| | | </sql> |
| | | |
| | | <select id="selectDaOpcuaConfigList" parameterType="DaOpcuaConfig" resultMap="DaOpcuaConfigResult"> |
| | | <include refid="selectDaOpcuaConfigVo"/> |
| | | <where> |
| | | <if test="module != null and module != ''"> and module like concat('%', #{module}, '%')</if> |
| | | <if test="node != null and node != ''"> and node like concat('%', #{node}, '%')</if> |
| | | <if test="length != null "> and length = #{length}</if> |
| | | <if test="sysTypes != null and sysTypes != ''"> and sys_types = #{sysTypes}</if> |
| | | <if test="functionality != null and functionality != ''"> and functionality like concat('%', #{functionality}, '%')</if> |
| | | <if test="subscribe != null "> and subscribe = #{subscribe}</if> |
| | | <if test="rModule != null and rModule != ''"> and r_module like concat('%', #{rModule}, '%')</if> |
| | | <if test="rFunction != null and rFunction != ''"> and r_function like concat('%', #{rFunction}, '%')</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectDaOpcuaConfigById" parameterType="Long" resultMap="DaOpcuaConfigResult"> |
| | | <include refid="selectDaOpcuaConfigVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertDaOpcuaConfig" parameterType="DaOpcuaConfig"> |
| | | insert into da_opcua_config |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="module != null">module,</if> |
| | | <if test="node != null">node,</if> |
| | | <if test="length != null">length,</if> |
| | | <if test="sysTypes != null">sys_types,</if> |
| | | <if test="functionality != null">functionality,</if> |
| | | <if test="subscribe != null">subscribe,</if> |
| | | <if test="rModule != null">r_module,</if> |
| | | <if test="rFunction != null">r_function,</if> |
| | | <if test="remarks != null">remarks,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="module != null">#{module},</if> |
| | | <if test="node != null">#{node},</if> |
| | | <if test="length != null">#{length},</if> |
| | | <if test="sysTypes != null">#{sysTypes},</if> |
| | | <if test="functionality != null">#{functionality},</if> |
| | | <if test="subscribe != null">#{subscribe},</if> |
| | | <if test="rModule != null">#{rModule},</if> |
| | | <if test="rFunction != null">#{rFunction},</if> |
| | | <if test="remarks != null">#{remarks},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateDaOpcuaConfig" parameterType="DaOpcuaConfig"> |
| | | update da_opcua_config |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="module != null">module = #{module},</if> |
| | | <if test="node != null">node = #{node},</if> |
| | | <if test="length != null">length = #{length},</if> |
| | | <if test="sysTypes != null">sys_types = #{sysTypes},</if> |
| | | <if test="functionality != null">functionality = #{functionality},</if> |
| | | <if test="subscribe != null">subscribe = #{subscribe},</if> |
| | | <if test="rModule != null">r_module = #{rModule},</if> |
| | | <if test="rFunction != null">r_function = #{rFunction},</if> |
| | | <if test="remarks != null">remarks = #{remarks},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteDaOpcuaConfigById" parameterType="Long"> |
| | | delete from da_opcua_config where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteDaOpcuaConfigByIds" parameterType="String"> |
| | | delete from da_opcua_config 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.rm.repairRecord.mapper.RmRepairRecordMapper"> |
| | | |
| | | <resultMap type="RmRepairRecord" id="RmRepairRecordResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="snCode" column="sn_code" /> |
| | | <result property="repairIdentification" column="repair_identification" /> |
| | | <result property="boxCode" column="box_code" /> |
| | | <result property="processesCode" column="processes_code" /> |
| | | <result property="originalResult" column="original_result" /> |
| | | <result property="createUser" column="create_user" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="updateUser" column="update_user" /> |
| | | <result property="repairResults" column="repair_results" /> |
| | | <result property="status" column="status" /> |
| | | <result property="remarks" column="remarks" /> |
| | | <result property="spareField1" column="spare_field_1" /> |
| | | <result property="spareField2" column="spare_field_2" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectRmRepairRecordVo"> |
| | | select id, sn_code, repair_identification, box_code, processes_code, original_result, create_user, create_time, update_time, update_user, repair_results, status, remarks, spare_field_1, spare_field_2,repair_time from rm_repair_record |
| | | </sql> |
| | | |
| | | <select id="selectRmRepairRecordList" parameterType="RmRepairRecord" resultMap="RmRepairRecordResult"> |
| | | <include refid="selectRmRepairRecordVo"/> |
| | | <where> |
| | | <if test="snCode != null and snCode != ''"> and sn_code = #{snCode}</if> |
| | | <if test="repairIdentification != null and repairIdentification != ''"> and repair_identification = #{repairIdentification}</if> |
| | | <if test="boxCode != null and boxCode != ''"> and box_code = #{boxCode}</if> |
| | | <if test="processesCode != null and processesCode != ''"> and processes_code = #{processesCode}</if> |
| | | <if test="originalResult != null and originalResult != ''"> and original_result = #{originalResult}</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="repairResults != null and repairResults != ''"> and repair_results = #{repairResults}</if> |
| | | <if test="status != null and status != ''"> and status = #{status}</if> |
| | | <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</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> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectRmRepairRecordById" parameterType="Long" resultMap="RmRepairRecordResult"> |
| | | <include refid="selectRmRepairRecordVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertRmRepairRecord" parameterType="RmRepairRecord" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into rm_repair_record |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="snCode != null">sn_code,</if> |
| | | <if test="repairIdentification != null">repair_identification,</if> |
| | | <if test="boxCode != null">box_code,</if> |
| | | <if test="processesCode != null">processes_code,</if> |
| | | <if test="originalResult != null">original_result,</if> |
| | | <if test="createUser != null">create_user,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="updateUser != null">update_user,</if> |
| | | <if test="repairResults != null">repair_results,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="remarks != null">remarks,</if> |
| | | <if test="spareField1 != null">spare_field_1,</if> |
| | | <if test="spareField2 != null">spare_field_2,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="snCode != null">#{snCode},</if> |
| | | <if test="repairIdentification != null">#{repairIdentification},</if> |
| | | <if test="boxCode != null">#{boxCode},</if> |
| | | <if test="processesCode != null">#{processesCode},</if> |
| | | <if test="originalResult != null">#{originalResult},</if> |
| | | <if test="createUser != null">#{createUser},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="updateUser != null">#{updateUser},</if> |
| | | <if test="repairResults != null">#{repairResults},</if> |
| | | <if test="status != null">#{status},</if> |
| | | <if test="remarks != null">#{remarks},</if> |
| | | <if test="spareField1 != null">#{spareField1},</if> |
| | | <if test="spareField2 != null">#{spareField2},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateRmRepairRecord" parameterType="RmRepairRecord"> |
| | | update rm_repair_record |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="snCode != null">sn_code = #{snCode},</if> |
| | | <if test="repairIdentification != null">repair_identification = #{repairIdentification},</if> |
| | | <if test="boxCode != null">box_code = #{boxCode},</if> |
| | | <if test="processesCode != null">processes_code = #{processesCode},</if> |
| | | <if test="originalResult != null">original_result = #{originalResult},</if> |
| | | <if test="createUser != null">create_user = #{createUser},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="updateUser != null">update_user = #{updateUser},</if> |
| | | <if test="repairResults != null">repair_results = #{repairResults},</if> |
| | | <if test="status != null">status = #{status},</if> |
| | | <if test="remarks != null">remarks = #{remarks},</if> |
| | | <if test="spareField1 != null">spare_field_1 = #{spareField1},</if> |
| | | <if test="spareField2 != null">spare_field_2 = #{spareField2},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteRmRepairRecordById" parameterType="Long"> |
| | | delete from rm_repair_record where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteRmRepairRecordByIds" parameterType="String"> |
| | | delete from rm_repair_record where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
| | |
| | | <if test="jobMessage != null and jobMessage != ''">#{jobMessage},</if> |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="exceptionInfo != null and exceptionInfo != ''">#{exceptionInfo},</if> |
| | | sysdate() |
| | | getdate() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="configType != null and configType != ''">#{configType},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | sysdate() |
| | | getdate() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="configType != null and configType != ''">config_type = #{configType},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | update_time = sysdate() |
| | | update_time = getdate() |
| | | </set> |
| | | where config_id = #{configId} |
| | | </update> |
| | |
| | | <if test="status != null">#{status},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | getdate() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="status != null and status != ''">#{status}, </if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | getdate() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="noticeContent != null">notice_content = #{noticeContent}, </if> |
| | | <if test="status != null and status != ''">status = #{status}, </if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = getdate() |
| | | </set> |
| | | where notice_id = #{noticeId} |
| | | </update> |
| | |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | getdate() |
| | | ) |
| | | </insert> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢OPCUAåæ°è®¾ç½®å表 |
| | | export function listOpcuaconfig(query) { |
| | | return request({ |
| | | url: '/da/opcuaconfig/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢OPCUAåæ°è®¾ç½®è¯¦ç» |
| | | export function getOpcuaconfig(id) { |
| | | return request({ |
| | | url: '/da/opcuaconfig/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢OPCUAåæ°è®¾ç½® |
| | | export function addOpcuaconfig(data) { |
| | | return request({ |
| | | url: '/da/opcuaconfig', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹OPCUAåæ°è®¾ç½® |
| | | export function updateOpcuaconfig(data) { |
| | | return request({ |
| | | url: '/da/opcuaconfig', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤OPCUAåæ°è®¾ç½® |
| | | export function delOpcuaconfig(id) { |
| | | return request({ |
| | | url: '/da/opcuaconfig/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢è¿ä¿®è®°å½å表 |
| | | export function listRepairRecord(query) { |
| | | return request({ |
| | | url: '/rm/repairRecord/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢è¿ä¿®è®°å½è¯¦ç» |
| | | export function getRepairRecord(id) { |
| | | return request({ |
| | | url: '/rm/repairRecord/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢è¿ä¿®è®°å½ |
| | | export function addRepairRecord(data) { |
| | | return request({ |
| | | url: '/rm/repairRecord', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹è¿ä¿®è®°å½ |
| | | export function updateRepairRecord(data) { |
| | | return request({ |
| | | url: '/rm/repairRecord', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤è¿ä¿®è®°å½ |
| | | export function delRepairRecord(id) { |
| | | return request({ |
| | | url: '/rm/repairRecord/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | |
| | | </el-table-column> |
| | | <el-table-column label="车é´å称" align="center" prop="workshopName"> |
| | | </el-table-column> |
| | | <el-table-column label="ç¶æ" align="center" prop="status" width="80"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | | </template> |
| | | </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-form-item label="车é´ç¼å·" prop="workshopCode"> |
| | | <el-input v-model="form.workshopCode" placeholder="请è¾å
¥è½¦é´ç¼å·" /> |
| | | </el-form-item> |
| | | <el-form-item style="margin-left: -15px" label="车é´ç¼å·" prop="workshopCode"> |
| | | <el-select style="width: 93%" v-model="form.workshopCode" placeholder="请éæ©è½¦é´ç¼å·"> |
| | | <el-option |
| | | v-for="item in lineOptions" |
| | | :key="item.lineCode" |
| | | :label="item.lineName" |
| | | :value="item.lineCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="车é´å称" prop="workshopName"> |
| | | <el-input v-model="form.workshopName" 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_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="å¤æ³¨" prop="remarks"> |
| | | <el-input v-model="form.remarks" placeholder="请è¾å
¥å¤æ³¨" /> |
| | |
| | | |
| | | export default { |
| | | name: "LineInfo", |
| | | dicts: ['sys_normal_disable'], |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | |
| | | id: null, |
| | | lineCode: null, |
| | | lineName: null, |
| | | workshopName: null, |
| | | workshopCode: null, |
| | | workCalendar: null, |
| | | spareField1: null, |
| | |
| | | createUser: null, |
| | | createTime: null, |
| | | updateUser: null, |
| | | status: "0", |
| | | updateTime: null |
| | | }; |
| | | this.resetForm("form"); |
| | |
| | | </el-table-column> |
| | | <el-table-column label="å·¥åºå称" align="center" prop="processesName"> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥åºç±»å" align="center" prop="processesType"> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="å·¥åºç±»å" align="center" prop="processesType">--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column label="ç¶æ" align="center" prop="status" width="80"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | |
| | | </el-table-column> |
| | | <el-table-column :show-overflow-tooltip='true' label="车é´å称" align="center" prop="workshopName"> |
| | | </el-table-column> |
| | | <el-table-column label="ç¶æ" align="center" prop="status" width="80"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | | </template> |
| | | </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-form-item label="车é´å称" prop="workshopName"> |
| | | <el-input v-model="form.workshopName" 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_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="å¤æ³¨" prop="remarks"> |
| | | <el-input v-model="form.remarks" placeholder="请è¾å
¥å¤æ³¨" /> |
| | | </el-form-item> |
| | |
| | | |
| | | export default { |
| | | name: "Workshop", |
| | | dicts: ['sys_normal_disable'], |
| | | data() { |
| | | return { |
| | | select: '', |
| | |
| | | createUser: null, |
| | | createTime: null, |
| | | updateUser: null, |
| | | status: "0", |
| | | updateTime: null |
| | | }; |
| | | this.resetForm("form"); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="æå±æ¨¡å" prop="module"> |
| | | <el-input |
| | | v-model="queryParams.module" |
| | | placeholder="请è¾å
¥æå±æ¨¡å" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="èç¹" prop="node"> |
| | | <el-input |
| | | v-model="queryParams.node" |
| | | placeholder="请è¾å
¥èç¹" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="é¿åº¦" prop="length"> |
| | | <el-input |
| | | v-model="queryParams.length" |
| | | placeholder="请è¾å
¥é¿åº¦" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç±»å" prop="sysTypes"> |
| | | <el-select v-model="queryParams.sysTypes" placeholder="请éæ©ç±»å" clearable> |
| | | <!-- <el-option--> |
| | | <!-- v-for="dict in dict.type.${dictType}"--> |
| | | <!-- :key="dict.value"--> |
| | | <!-- :label="dict.label"--> |
| | | <!-- :value="dict.value"--> |
| | | <!-- />--> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åè½è¯´æ" prop="functionality"> |
| | | <el-input |
| | | v-model="queryParams.functionality" |
| | | placeholder="请è¾å
¥åè½è¯´æ" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="æ¯å¦è®¢é
" prop="subscribe"> |
| | | <el-select v-model="queryParams.subscribe" placeholder="请éæ©æ¯å¦è®¢é
" clearable> |
| | | <!-- <el-option--> |
| | | <!-- v-for="dict in dict.type.${dictType}"--> |
| | | <!-- :key="dict.value"--> |
| | | <!-- :label="dict.label"--> |
| | | <!-- :value="dict.value"--> |
| | | <!-- />--> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="订é
ååºæ¨¡å" prop="rModule"> |
| | | <el-input |
| | | v-model="queryParams.rModule" |
| | | placeholder="请è¾å
¥è®¢é
ååºæ¨¡å" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="订é
ååºå½æ°" prop="rFunction"> |
| | | <el-input |
| | | v-model="queryParams.rFunction" |
| | | 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 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="['da:opcuaconfig: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="['da:opcuaconfig: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="['da:opcuaconfig: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="['da:opcuaconfig:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="opcuaconfigList" @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="module"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.module"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="èç¹" align="center" prop="node"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.node"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="é¿åº¦" align="center" prop="length"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.length"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="ç±»å" align="center" prop="sysTypes"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.sysTypes"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="åè½è¯´æ" align="center" prop="functionality"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.functionality"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="æ¯å¦è®¢é
" align="center" prop="subscribe"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.subscribe"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="订é
ååºæ¨¡å" align="center" prop="rModule"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.rModule"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="订é
ååºå½æ°" align="center" prop="rFunction"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.rFunction"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="å¤æ³¨" align="center" prop="remarks"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.remarks"/>--> |
| | | <!-- </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="['da:opcuaconfig:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['da:opcuaconfig: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" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹OPCUAåæ°è®¾ç½®å¯¹è¯æ¡ --> |
| | | <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="module"> |
| | | <el-input v-model="form.module" placeholder="请è¾å
¥æå±æ¨¡å" /> |
| | | </el-form-item> |
| | | <el-form-item label="èç¹" prop="node"> |
| | | <el-input v-model="form.node" placeholder="请è¾å
¥èç¹" /> |
| | | </el-form-item> |
| | | <el-form-item label="é¿åº¦" prop="length"> |
| | | <el-input v-model="form.length" placeholder="请è¾å
¥é¿åº¦" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç±»å" prop="sysTypes"> |
| | | <el-select v-model="form.sysTypes" placeholder="请éæ©ç±»å"> |
| | | <!-- <el-option--> |
| | | <!-- v-for="dict in dict.type.${dictType}"--> |
| | | <!-- :key="dict.value"--> |
| | | <!-- :label="dict.label"--> |
| | | <!-- :value="dict.value"--> |
| | | <!-- ></el-option>--> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åè½è¯´æ" prop="functionality"> |
| | | <el-input v-model="form.functionality" placeholder="请è¾å
¥åè½è¯´æ" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ¯å¦è®¢é
" prop="subscribe"> |
| | | <el-select v-model="form.subscribe" placeholder="请éæ©æ¯å¦è®¢é
"> |
| | | <!-- <el-option--> |
| | | <!-- v-for="dict in dict.type.${dictType}"--> |
| | | <!-- :key="dict.value"--> |
| | | <!-- :label="dict.label"--> |
| | | <!-- :value="parseInt(dict.value)"--> |
| | | <!-- ></el-option>--> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="订é
ååºæ¨¡å" prop="rModule"> |
| | | <el-input v-model="form.rModule" placeholder="请è¾å
¥è®¢é
ååºæ¨¡å" /> |
| | | </el-form-item> |
| | | <el-form-item label="订é
ååºå½æ°" prop="rFunction"> |
| | | <el-input v-model="form.rFunction" placeholder="请è¾å
¥è®¢é
ååºå½æ°" /> |
| | | </el-form-item> |
| | | <el-form-item label="å¤æ³¨" prop="remarks"> |
| | | <el-input v-model="form.remarks" placeholder="请è¾å
¥å¤æ³¨" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listOpcuaconfig, getOpcuaconfig, delOpcuaconfig, addOpcuaconfig, updateOpcuaconfig } from "@/api/main/da/opcuaconfig/opcuaconfig"; |
| | | |
| | | export default { |
| | | name: "Opcuaconfig", |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // OPCUAåæ°è®¾ç½®è¡¨æ ¼æ°æ® |
| | | opcuaconfigList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | module: null, |
| | | node: null, |
| | | length: null, |
| | | sysTypes: null, |
| | | functionality: null, |
| | | subscribe: null, |
| | | rModule: null, |
| | | rFunction: null, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "IDä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢OPCUAåæ°è®¾ç½®å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listOpcuaconfig(this.queryParams).then(response => { |
| | | this.opcuaconfigList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | module: null, |
| | | node: null, |
| | | length: null, |
| | | sysTypes: null, |
| | | functionality: null, |
| | | subscribe: null, |
| | | rModule: null, |
| | | rFunction: null, |
| | | remarks: 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 = "æ·»å OPCUAåæ°è®¾ç½®"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getOpcuaconfig(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹OPCUAåæ°è®¾ç½®"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateOpcuaconfig(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addOpcuaconfig(this.form).then(response => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤OPCUAåæ°è®¾ç½®ç¼å·ä¸º"' + ids + '"çæ°æ®é¡¹ï¼').then(function() { |
| | | return delOpcuaconfig(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('da/opcuaconfig/export', { |
| | | ...this.queryParams |
| | | }, `opcuaconfig_${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="repairIdentification"> |
| | | <el-input |
| | | v-model="queryParams.repairIdentification" |
| | | placeholder="请è¾å
¥è¿ä¿®æ è¯" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç®±ä½ç¼ç " prop="boxCode"> |
| | | <el-input |
| | | v-model="queryParams.boxCode" |
| | | placeholder="请è¾å
¥ç®±ä½ç¼ç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item style="float: right"> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-card> |
| | | <el-card style="margin-top: 10px" class="box-card"> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <!-- <el-col :span="1.5">--> |
| | | <!-- <el-button--> |
| | | <!-- type="primary"--> |
| | | <!-- plain--> |
| | | <!-- icon="el-icon-plus"--> |
| | | <!-- size="mini"--> |
| | | <!-- @click="handleAdd"--> |
| | | <!-- v-hasPermi="['rm:repairRecord: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="['rm:repairRecord: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="['rm:repairRecord: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="['rm:repairRecord:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" border :data="repairRecordList" @selection-change="handleSelectionChange" v-if="repairRecordList.length > 0"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="è¿ä¿®æ è¯" align="center" prop="repairIdentification" /> |
| | | <el-table-column label="ç®±ä½ç¼ç " align="center" prop="boxCode" /> |
| | | <el-table-column label="å·¥åºç¼ç " align="center" prop="processesCode" /> |
| | | <el-table-column label="åç»æ" align="center" prop="originalResult" /> |
| | | <el-table-column label="è¿ä¿®ç»æ" align="center" prop="repairResults" /> |
| | | <el-table-column label="å建ç¨æ·" align="center" prop="createUser" /> |
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime" /> |
| | | <el-table-column label="è¿ä¿®æ¶é´" align="center" prop="repairTime" /> |
| | | <el-table-column label="ç¶æ" align="center" prop="status" width="80"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | | </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="['rm:repairRecord:edit']"--> |
| | | <!-- >ä¿®æ¹</el-button>--> |
| | | <!-- <el-button--> |
| | | <!-- size="mini"--> |
| | | <!-- type="text"--> |
| | | <!-- icon="el-icon-delete"--> |
| | | <!-- @click="handleDelete(scope.row)"--> |
| | | <!-- v-hasPermi="['rm:repairRecord: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-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="snCode"> |
| | | <el-input v-model="form.snCode" placeholder="请è¾å
¥æ»æç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="è¿ä¿®æ è¯" prop="repairIdentification"> |
| | | <el-input v-model="form.repairIdentification" placeholder="请è¾å
¥è¿ä¿®æ è¯" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç®±ä½ç¼ç " prop="boxCode"> |
| | | <el-input v-model="form.boxCode" placeholder="请è¾å
¥ç®±ä½ç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åºç¼ç " prop="processesCode"> |
| | | <el-input v-model="form.processesCode" placeholder="请è¾å
¥å·¥åºç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="åç»æ" prop="originalResult"> |
| | | <el-input v-model="form.originalResult" 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="repairResults"> |
| | | <el-input v-model="form.repairResults" placeholder="请è¾å
¥è¿ä¿®ç»æ" /> |
| | | </el-form-item> |
| | | <el-form-item label="å¤æ³¨" prop="remarks"> |
| | | <el-input v-model="form.remarks" 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="status"> |
| | | <el-radio-group v-model="form.status"> |
| | | <el-radio |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | </el-radio-group> |
| | | </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 { listRepairRecord, getRepairRecord, delRepairRecord, addRepairRecord, updateRepairRecord } from "@/api/main/rm/repairRecord/repairRecord"; |
| | | |
| | | export default { |
| | | name: "RepairRecord", |
| | | dicts: ['sys_normal_disable'], |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // è¿ä¿®è®°å½è¡¨æ ¼æ°æ® |
| | | repairRecordList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | snCode: null, |
| | | repairIdentification: null, |
| | | boxCode: null, |
| | | processesCode: null, |
| | | originalResult: null, |
| | | createUser: null, |
| | | updateUser: null, |
| | | repairResults: null, |
| | | status: null, |
| | | remarks: null, |
| | | spareField1: null, |
| | | spareField2: null |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢è¿ä¿®è®°å½å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listRepairRecord(this.queryParams).then(response => { |
| | | this.repairRecordList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | snCode: null, |
| | | repairIdentification: null, |
| | | boxCode: null, |
| | | processesCode: null, |
| | | originalResult: null, |
| | | createUser: null, |
| | | createTime: null, |
| | | updateTime: null, |
| | | updateUser: null, |
| | | repairResults: null, |
| | | status: "0", |
| | | remarks: null, |
| | | spareField1: null, |
| | | repairTime: null, |
| | | spareField2: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡éä¸æ°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "æ·»å è¿ä¿®è®°å½"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getRepairRecord(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) { |
| | | updateRepairRecord(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addRepairRecord(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 delRepairRecord(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('rm/repairRecord/export', { |
| | | ...this.queryParams |
| | | }, `repairRecord_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <version>${jcdm.version}</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.kangaroohy</groupId> |
| | | <artifactId>milo-spring-boot-starter</artifactId> |
| | | <version>3.0.4</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.apache.commons</groupId> |
| | | <artifactId>commons-pool2</artifactId> |
| | | <version>2.12.0</version> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | </dependencyManagement> |
| | | |
| | |
| | | -- ---------------------------- |
| | | -- åå§å-é¨é¨è¡¨æ°æ® |
| | | -- ---------------------------- |
| | | insert into sys_dept values(100, 0, '0', 'è¥ä¾ç§æ', 0, 'è¥ä¾', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); |
| | | insert into sys_dept values(101, 100, '0,100', 'æ·±å³æ»å
¬å¸', 1, 'è¥ä¾', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); |
| | | insert into sys_dept values(102, 100, '0,100', 'é¿æ²åå
¬å¸', 2, 'è¥ä¾', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); |
| | | insert into sys_dept values(103, 101, '0,100,101', 'ç åé¨é¨', 1, 'è¥ä¾', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); |
| | | insert into sys_dept values(104, 101, '0,100,101', 'å¸åºé¨é¨', 2, 'è¥ä¾', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); |
| | | insert into sys_dept values(105, 101, '0,100,101', 'æµè¯é¨é¨', 3, 'è¥ä¾', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); |
| | | insert into sys_dept values(106, 101, '0,100,101', 'è´¢å¡é¨é¨', 4, 'è¥ä¾', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); |
| | | insert into sys_dept values(107, 101, '0,100,101', 'è¿ç»´é¨é¨', 5, 'è¥ä¾', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); |
| | | insert into sys_dept values(108, 102, '0,100,102', 'å¸åºé¨é¨', 1, 'è¥ä¾', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); |
| | | insert into sys_dept values(109, 102, '0,100,102', 'è´¢å¡é¨é¨', 2, 'è¥ä¾', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); |
| | | insert into sys_dept values(100, 0, '0', 'æ±å®¸', 0, 'æ±å®¸', '15888888888', 'ry@qq.com', '0', '0', 'admin', getdate(), '', null); |
| | | insert into sys_dept values(101, 100, '0,100', 'æ·±å³æ»å
¬å¸', 1, 'æ±å®¸', '15888888888', 'ry@qq.com', '0', '0', 'admin', getdate(), '', null); |
| | | insert into sys_dept values(102, 100, '0,100', 'é¿æ²åå
¬å¸', 2, 'æ±å®¸', '15888888888', 'ry@qq.com', '0', '0', 'admin', getdate(), '', null); |
| | | insert into sys_dept values(103, 101, '0,100,101', 'ç åé¨é¨', 1, 'æ±å®¸', '15888888888', 'ry@qq.com', '0', '0', 'admin', getdate(), '', null); |
| | | insert into sys_dept values(104, 101, '0,100,101', 'å¸åºé¨é¨', 2, 'æ±å®¸', '15888888888', 'ry@qq.com', '0', '0', 'admin', getdate(), '', null); |
| | | insert into sys_dept values(105, 101, '0,100,101', 'æµè¯é¨é¨', 3, 'æ±å®¸', '15888888888', 'ry@qq.com', '0', '0', 'admin', getdate(), '', null); |
| | | insert into sys_dept values(106, 101, '0,100,101', 'è´¢å¡é¨é¨', 4, 'æ±å®¸', '15888888888', 'ry@qq.com', '0', '0', 'admin', getdate(), '', null); |
| | | insert into sys_dept values(107, 101, '0,100,101', 'è¿ç»´é¨é¨', 5, 'æ±å®¸', '15888888888', 'ry@qq.com', '0', '0', 'admin', getdate(), '', null); |
| | | insert into sys_dept values(108, 102, '0,100,102', 'å¸åºé¨é¨', 1, 'æ±å®¸', '15888888888', 'ry@qq.com', '0', '0', 'admin', getdate(), '', null); |
| | | insert into sys_dept values(109, 102, '0,100,102', 'è´¢å¡é¨é¨', 2, 'æ±å®¸', '15888888888', 'ry@qq.com', '0', '0', 'admin', getdate(), '', null); |
| | | |
| | | |
| | | -- ---------------------------- |
| | |
| | | -- ---------------------------- |
| | | -- åå§å-ç¨æ·ä¿¡æ¯è¡¨æ°æ® |
| | | -- ---------------------------- |
| | | insert into sys_user values(1, 103, 'admin', 'è¥ä¾', '00', 'ry@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 'admin', sysdate(), '', null, '管çå'); |
| | | insert into sys_user values(2, 105, 'ry', 'è¥ä¾', '00', 'ry@qq.com', '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 'admin', sysdate(), '', null, 'æµè¯å'); |
| | | insert into sys_user values(1, 103, 'admin', 'è¥ä¾', '00', 'ry@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', getdate(), 'admin', sysdate(), '', null, '管çå'); |
| | | insert into sys_user values(2, 105, 'ry', 'è¥ä¾', '00', 'ry@qq.com', '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', getdate(), 'admin', sysdate(), '', null, 'æµè¯å'); |
| | | |
| | | |
| | | -- ---------------------------- |