From eb64c3ede631f9f1ec49260db5190027fa08fb31 Mon Sep 17 00:00:00 2001 From: jiang <1354748262@qq.com> Date: 星期二, 23 一月 2024 10:57:13 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- jcdm-quartz/src/main/java/com/jcdm/quartz/task/RyTask.java | 60 ++ jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java | 8 jcdm-ui/src/views/main/bs/beatSetting/index.vue | 2 jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/impl/DaOpcuaConfigServiceImpl.java | 36 jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/mapper/DaOpcuaConfigMapper.java | 30 jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/IDaOpcuaConfigService.java | 32 jcdm-quartz/pom.xml | 5 jcdm-ui/src/components/itemSelect/index.vue | 2 jcdm-ui/src/views/main/da/opcuaconfig/index.vue | 479 ++++++++-------- jcdm-main/src/main/java/com/jcdm/main/webservice/service/ReportingForWork.java | 78 ++ jcdm-ui/src/views/main/cfkb/Instructions/index.vue | 41 + jcdm-ui/src/views/main/bs/orderScheduling/index.vue | 4 jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml | 1 jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js | 9 jcdm-ui/src/views/main/pr/tightenReport/index.vue | 203 +++++++ jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/client/ClientHandler.java | 25 jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/domain/DaOpcuaConfig.java | 117 +-- jcdm-ui/src/api/main/da/opcuaconfig/opcuaconfig.js | 10 jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java | 35 + /dev/null | 177 ------ jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java | 62 +- jcdm-ui/src/views/main/kb/engineCheck/index.vue | 37 jcdm-ui/src/views/main/da/paramCollection/index.vue | 120 --- jcdm-main/src/main/resources/mapper/da/opcuaconfig/DaOpcuaConfigMapper.xml | 64 - jcdm-main/src/main/java/com/jcdm/main/webservice/service/ReceivingServices.java | 66 + 25 files changed, 928 insertions(+), 775 deletions(-) diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java b/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java index 8ff0157..ec79b6f 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java +++ b/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java @@ -51,20 +51,45 @@ formulaChildInfo.setAddress(formulaChildInfo.getTechRequirement()); formulaChildInfo.setImg(formulaChildInfo.getPicture()); } + + return getDataTable(list); + } + + /** + * 鏌ヨ宸ヨ壓娴佺▼ + * @param bsFormulaChildInfo query + * @return list + */ + @PostMapping("/getProductProcess") + public TableDataInfo getProductProcess(@RequestBody BsFormulaChildInfo bsFormulaChildInfo) + { + List<BsFormulaChildInfo> list = bsFormulaChildInfoService.selectBsFormulaChildInfoList(bsFormulaChildInfo); + for (BsFormulaChildInfo formulaChildInfo : list) { + formulaChildInfo.setSort(formulaChildInfo.getStepSort()); + formulaChildInfo.setAddress(formulaChildInfo.getTechRequirement()); + formulaChildInfo.setImg(formulaChildInfo.getPicture()); + } list = list.stream() .filter(x -> !ZERO.equals(x.getSort())).sorted(Comparator.comparing(BsFormulaChildInfo::getSort)).collect(Collectors.toList()); return getDataTable(list); } /** - * 鏌ヨ宸ヨ壓娴佺▼ - * @param productProcessQuery query + * 鏌ヨ宸ヨ壓鏂囦欢 + * @param bsFormulaChildInfo query * @return list */ - @PostMapping("/getProductProcess") - public TableDataInfo getProductProcess(@RequestBody ProductProcessQuery productProcessQuery) + @PostMapping("/getMainProductProcess") + public TableDataInfo getMainProductProcess(@RequestBody BsFormulaChildInfo bsFormulaChildInfo) { - List<BsFormulaChildInfo> list = productProcessService.getProductProcess(productProcessQuery); + List<BsFormulaChildInfo> list = bsFormulaChildInfoService.selectBsFormulaChildInfoList(bsFormulaChildInfo); + for (BsFormulaChildInfo formulaChildInfo : list) { + formulaChildInfo.setSort(formulaChildInfo.getStepSort()); + formulaChildInfo.setAddress(formulaChildInfo.getTechRequirement()); + formulaChildInfo.setImg(formulaChildInfo.getPicture()); + } + list = list.stream() + .filter(x -> ZERO.equals(x.getSort())).sorted(Comparator.comparing(BsFormulaChildInfo::getSort)).collect(Collectors.toList()); return getDataTable(list); } diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java index 897b358..b65b7ee 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java +++ b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java @@ -1,7 +1,10 @@ package com.jcdm.main.bs.orderScheduling.controller; +import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletResponse; + +import com.jcdm.common.utils.StringUtils; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -51,7 +54,10 @@ public TableDataInfo list2(BsOrderScheduling bsOrderScheduling) { // startPage(); - List<BsOrderScheduling> list = bsOrderSchedulingService.selectBsOrderSchedulingList(bsOrderScheduling); + List<BsOrderScheduling> list = new ArrayList<>(); + if (StringUtils.isNotEmpty(bsOrderScheduling.getOrderNo())){ + list = bsOrderSchedulingService.selectBsOrderSchedulingList(bsOrderScheduling); + } return getDataTable(list); } diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/client/ClientHandler.java b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/client/ClientHandler.java index bdc2dc7..4a207b8 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/client/ClientHandler.java +++ b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/client/ClientHandler.java @@ -166,7 +166,7 @@ .findAny() .orElse(null); try { - Class<?> clazz = Class.forName(daOpcuaConfig.getrModule()); + Class<?> clazz = Class.forName("com.jcdm.main.da.opcuaconfig.cert.MethodName"); Method method = clazz.getMethod(daOpcuaConfig.getrFunction(), new Class[] { String.class, String.class }); method.invoke(clazz.newInstance(),new Object[] { new String(id.getIdentifier().toString()), new String(value.getValue().toString()) }); @@ -219,29 +219,6 @@ return statusCode.isGood(); } - - /** - * 鏂规硶鎻忚堪: 璇诲彇澶氫釜鐐逛綅鐨勫�� - * - * @param keys 鐐逛綅闆嗗悎 - * @return {@link List<DataValue>} - * @throws - */ -// public static List<DataValue> readValues2(Set<String> keys){ -// List<NodeId> nodeIdList=new ArrayList<>(500); -// keys.forEach(e->{ -// NodeId nodeId = new NodeId(2, e); -// nodeIdList.add(nodeId); -// }); -// try { -// List<DataValue> dataValues=client.readValues(0.0, TimestampsToReturn.Both,nodeIdList).get(); -// return dataValues; -// } catch (InterruptedException | ExecutionException e) { -// e.printStackTrace(); -// } -// return null; -// } - /** * 鏂规硶鎻忚堪: 璇诲彇澶氫釜鐐逛綅鐨勫�� diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java index 0c74d37..f6e8baf 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java +++ b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java @@ -1,26 +1,32 @@ 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.core.page.TableDataInfo; import com.jcdm.common.enums.BusinessType; import com.jcdm.common.utils.poi.ExcelUtil; -import com.jcdm.main.da.opcuaconfig.domain.DaOpcuaConfig; -import com.jcdm.main.da.opcuaconfig.service.IDaOpcuaConfigService; -import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; +import com.jcdm.common.core.page.TableDataInfo; /** - * OPCUA鍙傛暟璁剧疆Controller + * 浜や簰淇″彿閰嶇疆Controller * * @author yyt - * @date 2023-12-22 + * @date 2024-01-22 */ @RestController @RequestMapping("/da/opcuaconfig") @@ -29,11 +35,8 @@ @Autowired private IDaOpcuaConfigService daOpcuaConfigService; - @Autowired - private IDaParamCollectionService daParamCollectionService; - /** - * 鏌ヨOPCUA鍙傛暟璁剧疆鍒楄〃 + * 鏌ヨ浜や簰淇″彿閰嶇疆鍒楄〃 */ @PreAuthorize("@ss.hasPermi('da:opcuaconfig:list')") @GetMapping("/list") @@ -44,28 +47,21 @@ 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) + @Log(title = "浜や簰淇″彿閰嶇疆", 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鍙傛暟璁剧疆鏁版嵁"); + util.exportExcel(response, list, "浜や簰淇″彿閰嶇疆鏁版嵁"); } /** - * 鑾峰彇OPCUA鍙傛暟璁剧疆璇︾粏淇℃伅 + * 鑾峰彇浜や簰淇″彿閰嶇疆璇︾粏淇℃伅 */ @PreAuthorize("@ss.hasPermi('da:opcuaconfig:query')") @GetMapping(value = "/{id}") @@ -75,10 +71,10 @@ } /** - * 鏂板OPCUA鍙傛暟璁剧疆 + * 鏂板浜や簰淇″彿閰嶇疆 */ @PreAuthorize("@ss.hasPermi('da:opcuaconfig:add')") - @Log(title = "OPCUA鍙傛暟璁剧疆", businessType = BusinessType.INSERT) + @Log(title = "浜や簰淇″彿閰嶇疆", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody DaOpcuaConfig daOpcuaConfig) { @@ -86,10 +82,10 @@ } /** - * 淇敼OPCUA鍙傛暟璁剧疆 + * 淇敼浜や簰淇″彿閰嶇疆 */ @PreAuthorize("@ss.hasPermi('da:opcuaconfig:edit')") - @Log(title = "OPCUA鍙傛暟璁剧疆", businessType = BusinessType.UPDATE) + @Log(title = "浜や簰淇″彿閰嶇疆", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody DaOpcuaConfig daOpcuaConfig) { @@ -97,10 +93,10 @@ } /** - * 鍒犻櫎OPCUA鍙傛暟璁剧疆 + * 鍒犻櫎浜や簰淇″彿閰嶇疆 */ @PreAuthorize("@ss.hasPermi('da:opcuaconfig:remove')") - @Log(title = "OPCUA鍙傛暟璁剧疆", businessType = BusinessType.DELETE) + @Log(title = "浜や簰淇″彿閰嶇疆", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/domain/DaOpcuaConfig.java b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/domain/DaOpcuaConfig.java index c9faadc..353a1bf 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/domain/DaOpcuaConfig.java +++ b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/domain/DaOpcuaConfig.java @@ -1,15 +1,15 @@ package com.jcdm.main.da.opcuaconfig.domain; -import com.jcdm.common.annotation.Excel; -import com.jcdm.common.core.domain.BaseEntity; 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 + * 浜や簰淇″彿閰嶇疆瀵硅薄 da_opcua_config * * @author yyt - * @date 2023-12-22 + * @date 2024-01-22 */ public class DaOpcuaConfig extends BaseEntity { @@ -18,41 +18,46 @@ /** ID */ private Long id; - /** 鎵�灞炴ā鍧� */ - @Excel(name = "鎵�灞炴ā鍧�") - private String module; + /** $column.columnComment */ /** 鑺傜偣 */ @Excel(name = "鑺傜偣") private String node; - /** 闀垮害 */ - @Excel(name = "闀垮害") + /** $column.columnComment */ private Long length; - /** 绫诲瀷 */ - @Excel(name = "绫诲瀷") + /** 鏁版嵁绫诲瀷 */ + @Excel(name = "鏁版嵁绫诲瀷") private String sysTypes; - /** 鍔熻兘璇存槑 */ - @Excel(name = "鍔熻兘璇存槑") + /** $column.columnComment */ private String functionality; /** 鏄惁璁㈤槄 */ @Excel(name = "鏄惁璁㈤槄") private Long subscribe; - /** 璁㈤槄鍝嶅簲妯″潡 */ - @Excel(name = "璁㈤槄鍝嶅簲妯″潡") - private String rModule; - /** 璁㈤槄鍝嶅簲鍑芥暟 */ - @Excel(name = "璁㈤槄鍝嶅簲鍑芥暟") + /** 璁㈤槄绫诲瀷 */ + @Excel(name = "璁㈤槄绫诲瀷") private String rFunction; /** 澶囨敞 */ @Excel(name = "澶囨敞") private String remarks; + + /** 宸ュ簭缂栫爜 */ + @Excel(name = "宸ュ簭缂栫爜") + private String process; + + /** 宸ュ簭鍚嶇О */ + @Excel(name = "宸ュ簭鍚嶇О") + private String processName; + + /** 鐘舵�� */ + @Excel(name = "鐘舵��") + private Long state; public void setId(Long id) { @@ -63,15 +68,7 @@ { return id; } - public void setModule(String module) - { - this.module = module; - } - public String getModule() - { - return module; - } public void setNode(String node) { this.node = node; @@ -81,33 +78,12 @@ { 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; @@ -116,19 +92,6 @@ 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() @@ -144,20 +107,46 @@ { return remarks; } + public void setProcess(String process) + { + this.process = process; + } + + public String getProcess() + { + return process; + } + public void setProcessName(String processName) + { + this.processName = processName; + } + + public String getProcessName() + { + return processName; + } + public void setState(Long state) + { + this.state = state; + } + + public Long getState() + { + return state; + } @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()) + .append("process", getProcess()) + .append("processName", getProcessName()) + .append("state", getState()) .toString(); } } diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/domain/OpcuaConf.java b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/domain/OpcuaConf.java deleted file mode 100644 index 63688df..0000000 --- a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/domain/OpcuaConf.java +++ /dev/null @@ -1,177 +0,0 @@ -package com.jcdm.main.da.opcuaconfig.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; - -import java.io.Serializable; - -/** - * <p> - * - * </p> - * - * @author yyt - * @since 2023-10-17 - */ -@TableName("sys_opcua_conf") -public class OpcuaConf implements Serializable { - private static final long serialVersionUID=1L; - - /** - * ID - */ - @TableId(value = "id", type = IdType.ID_WORKER) - private Long id; - - /** - * 鎵�灞炴ā鍧� - */ - @TableField("module") - private String module; - - /** - * 鑺傜偣 - */ - @TableField("node") - private String node; - - /** - * 闀垮害 - */ - @TableField("length") - private Integer length; - - /** - * 绫诲瀷 - */ - @TableField("sys_types") - private String sysTypes; - - /** - * 鍔熻兘璇存槑 - */ - @TableField("functionality") - private String functionality; - - /** - * 鏄惁璁㈤槄 - */ - @TableField("subscribe") - private Integer subscribe; - - /** - * 璁㈤槄鍝嶅簲妯″潡 - */ - @TableField("r_module") - private String rModule; - - /** - * 璁㈤槄鍝嶅簲鍑芥暟 - */ - @TableField("r_function") - private String rFunction; - - /** - * 澶囨敞 - */ - @TableField("remarks") - private String remarks; - - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getModule() { - return module; - } - - public void setModule(String module) { - this.module = module; - } - - public String getNode() { - return node; - } - - public void setNode(String node) { - this.node = node; - } - - public Integer getLength() { - return length; - } - - public void setLength(Integer length) { - this.length = length; - } - - public String getSysTypes() { - return sysTypes; - } - - public void setSysTypes(String sysTypes) { - this.sysTypes = sysTypes; - } - - public String getFunctionality() { - return functionality; - } - - public void setFunctionality(String functionality) { - this.functionality = functionality; - } - - public Integer getSubscribe() { - return subscribe; - } - - public void setSubscribe(Integer subscribe) { - this.subscribe = subscribe; - } - - public String getrModule() { - return rModule; - } - - public void setrModule(String rModule) { - this.rModule = rModule; - } - - public String getrFunction() { - return rFunction; - } - - public void setrFunction(String rFunction) { - this.rFunction = rFunction; - } - - public String getRemarks() { - return remarks; - } - - public void setRemarks(String remarks) { - this.remarks = remarks; - } - - @Override - public String toString() { - return "OpcuaConf{" + - "id=" + id + - ", module=" + module + - ", node=" + node + - ", length=" + length + - ", sysTypes=" + sysTypes + ", " + "functionality=" + functionality + - ", subscribe=" + subscribe + - ", rModule=" + rModule + - ", rFunction=" + rFunction + - ", remarks=" + remarks + - "}"; - } -} diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/mapper/DaOpcuaConfigMapper.java b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/mapper/DaOpcuaConfigMapper.java index 7c75821..ac3897e 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/mapper/DaOpcuaConfigMapper.java +++ b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/mapper/DaOpcuaConfigMapper.java @@ -5,55 +5,55 @@ import java.util.List; /** - * OPCUA鍙傛暟璁剧疆Mapper鎺ュ彛 + * 浜や簰淇″彿閰嶇疆Mapper鎺ュ彛 * * @author yyt - * @date 2023-12-22 + * @date 2024-01-22 */ public interface DaOpcuaConfigMapper { /** - * 鏌ヨOPCUA鍙傛暟璁剧疆 + * 鏌ヨ浜や簰淇″彿閰嶇疆 * - * @param id OPCUA鍙傛暟璁剧疆涓婚敭 - * @return OPCUA鍙傛暟璁剧疆 + * @param id 浜や簰淇″彿閰嶇疆涓婚敭 + * @return 浜や簰淇″彿閰嶇疆 */ public DaOpcuaConfig selectDaOpcuaConfigById(Long id); /** - * 鏌ヨOPCUA鍙傛暟璁剧疆鍒楄〃 + * 鏌ヨ浜や簰淇″彿閰嶇疆鍒楄〃 * - * @param daOpcuaConfig OPCUA鍙傛暟璁剧疆1 - * @return OPCUA鍙傛暟璁剧疆闆嗗悎 + * @param daOpcuaConfig 浜や簰淇″彿閰嶇疆 + * @return 浜や簰淇″彿閰嶇疆闆嗗悎 */ public List<DaOpcuaConfig> selectDaOpcuaConfigList(DaOpcuaConfig daOpcuaConfig); /** - * 鏂板OPCUA鍙傛暟璁剧疆99 + * 鏂板浜や簰淇″彿閰嶇疆 * - * @param daOpcuaConfig OPCUA鍙傛暟璁剧疆 + * @param daOpcuaConfig 浜や簰淇″彿閰嶇疆 * @return 缁撴灉 */ public int insertDaOpcuaConfig(DaOpcuaConfig daOpcuaConfig); /** - * 淇敼OPCUA鍙傛暟璁剧疆 + * 淇敼浜や簰淇″彿閰嶇疆 * - * @param daOpcuaConfig OPCUA鍙傛暟璁剧疆 + * @param daOpcuaConfig 浜や簰淇″彿閰嶇疆 * @return 缁撴灉 */ public int updateDaOpcuaConfig(DaOpcuaConfig daOpcuaConfig); /** - * 鍒犻櫎OPCUA鍙傛暟璁剧疆 + * 鍒犻櫎浜や簰淇″彿閰嶇疆 * - * @param id OPCUA鍙傛暟璁剧疆涓婚敭 + * @param id 浜や簰淇″彿閰嶇疆涓婚敭 * @return 缁撴灉 */ public int deleteDaOpcuaConfigById(Long id); /** - * 鎵归噺鍒犻櫎OPCUA鍙傛暟璁剧疆 + * 鎵归噺鍒犻櫎浜や簰淇″彿閰嶇疆 * * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎 * @return 缁撴灉 diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/IDaOpcuaConfigService.java b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/IDaOpcuaConfigService.java index 5f29de9..aa715ee 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/IDaOpcuaConfigService.java +++ b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/IDaOpcuaConfigService.java @@ -5,57 +5,57 @@ import java.util.List; /** - * OPCUA鍙傛暟璁剧疆Service鎺ュ彛 + * 浜や簰淇″彿閰嶇疆Service鎺ュ彛 * * @author yyt - * @date 2023-12-22 + * @date 2024-01-22 */ public interface IDaOpcuaConfigService { /** - * 鏌ヨOPCUA鍙傛暟璁剧疆 + * 鏌ヨ浜や簰淇″彿閰嶇疆 * - * @param id OPCUA鍙傛暟璁剧疆涓婚敭 - * @return OPCUA鍙傛暟璁剧疆 + * @param id 浜や簰淇″彿閰嶇疆涓婚敭 + * @return 浜や簰淇″彿閰嶇疆 */ public DaOpcuaConfig selectDaOpcuaConfigById(Long id); /** - * 鏌ヨOPCUA鍙傛暟璁剧疆鍒楄〃 + * 鏌ヨ浜や簰淇″彿閰嶇疆鍒楄〃 * - * @param daOpcuaConfig OPCUA鍙傛暟璁剧疆 - * @return OPCUA鍙傛暟璁剧疆闆嗗悎 + * @param daOpcuaConfig 浜や簰淇″彿閰嶇疆 + * @return 浜や簰淇″彿閰嶇疆闆嗗悎 */ public List<DaOpcuaConfig> selectDaOpcuaConfigList(DaOpcuaConfig daOpcuaConfig); /** - * 鏂板OPCUA鍙傛暟璁剧疆 + * 鏂板浜や簰淇″彿閰嶇疆 * - * @param daOpcuaConfig OPCUA鍙傛暟璁剧疆 + * @param daOpcuaConfig 浜や簰淇″彿閰嶇疆 * @return 缁撴灉 */ public int insertDaOpcuaConfig(DaOpcuaConfig daOpcuaConfig); /** - * 淇敼OPCUA鍙傛暟璁剧疆 + * 淇敼浜や簰淇″彿閰嶇疆 * - * @param daOpcuaConfig OPCUA鍙傛暟璁剧疆 + * @param daOpcuaConfig 浜や簰淇″彿閰嶇疆 * @return 缁撴灉 */ public int updateDaOpcuaConfig(DaOpcuaConfig daOpcuaConfig); /** - * 鎵归噺鍒犻櫎OPCUA鍙傛暟璁剧疆 + * 鎵归噺鍒犻櫎浜や簰淇″彿閰嶇疆 * - * @param ids 闇�瑕佸垹闄ょ殑OPCUA鍙傛暟璁剧疆涓婚敭闆嗗悎 + * @param ids 闇�瑕佸垹闄ょ殑浜や簰淇″彿閰嶇疆涓婚敭闆嗗悎 * @return 缁撴灉 */ public int deleteDaOpcuaConfigByIds(Long[] ids); /** - * 鍒犻櫎OPCUA鍙傛暟璁剧疆淇℃伅 + * 鍒犻櫎浜や簰淇″彿閰嶇疆淇℃伅 * - * @param id OPCUA鍙傛暟璁剧疆涓婚敭 + * @param id 浜や簰淇″彿閰嶇疆涓婚敭 * @return 缁撴灉 */ public int deleteDaOpcuaConfigById(Long id); diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/impl/DaOpcuaConfigServiceImpl.java b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/impl/DaOpcuaConfigServiceImpl.java index f2902fb..2beed5b 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/impl/DaOpcuaConfigServiceImpl.java +++ b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/service/impl/DaOpcuaConfigServiceImpl.java @@ -1,18 +1,18 @@ 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; -import java.util.List; - /** - * OPCUA鍙傛暟璁剧疆Service涓氬姟灞傚鐞� + * 浜や簰淇″彿閰嶇疆Service涓氬姟灞傚鐞� * * @author yyt - * @date 2023-12-22 + * @date 2024-01-22 */ @Service public class DaOpcuaConfigServiceImpl implements IDaOpcuaConfigService @@ -21,10 +21,10 @@ private DaOpcuaConfigMapper daOpcuaConfigMapper; /** - * 鏌ヨOPCUA鍙傛暟璁剧疆 + * 鏌ヨ浜や簰淇″彿閰嶇疆 * - * @param id OPCUA鍙傛暟璁剧疆涓婚敭 - * @return OPCUA鍙傛暟璁剧疆 + * @param id 浜や簰淇″彿閰嶇疆涓婚敭 + * @return 浜や簰淇″彿閰嶇疆 */ @Override public DaOpcuaConfig selectDaOpcuaConfigById(Long id) @@ -33,10 +33,10 @@ } /** - * 鏌ヨOPCUA鍙傛暟璁剧疆鍒楄〃 + * 鏌ヨ浜や簰淇″彿閰嶇疆鍒楄〃 * - * @param daOpcuaConfig OPCUA鍙傛暟璁剧疆 - * @return OPCUA鍙傛暟璁剧疆 + * @param daOpcuaConfig 浜や簰淇″彿閰嶇疆 + * @return 浜や簰淇″彿閰嶇疆 */ @Override public List<DaOpcuaConfig> selectDaOpcuaConfigList(DaOpcuaConfig daOpcuaConfig) @@ -45,9 +45,9 @@ } /** - * 鏂板OPCUA鍙傛暟璁剧疆 + * 鏂板浜や簰淇″彿閰嶇疆 * - * @param daOpcuaConfig OPCUA鍙傛暟璁剧疆 + * @param daOpcuaConfig 浜や簰淇″彿閰嶇疆 * @return 缁撴灉 */ @Override @@ -57,9 +57,9 @@ } /** - * 淇敼OPCUA鍙傛暟璁剧疆 + * 淇敼浜や簰淇″彿閰嶇疆 * - * @param daOpcuaConfig OPCUA鍙傛暟璁剧疆 + * @param daOpcuaConfig 浜や簰淇″彿閰嶇疆 * @return 缁撴灉 */ @Override @@ -69,9 +69,9 @@ } /** - * 鎵归噺鍒犻櫎OPCUA鍙傛暟璁剧疆 + * 鎵归噺鍒犻櫎浜や簰淇″彿閰嶇疆 * - * @param ids 闇�瑕佸垹闄ょ殑OPCUA鍙傛暟璁剧疆涓婚敭 + * @param ids 闇�瑕佸垹闄ょ殑浜や簰淇″彿閰嶇疆涓婚敭 * @return 缁撴灉 */ @Override @@ -81,9 +81,9 @@ } /** - * 鍒犻櫎OPCUA鍙傛暟璁剧疆淇℃伅 + * 鍒犻櫎浜や簰淇″彿閰嶇疆淇℃伅 * - * @param id OPCUA鍙傛暟璁剧疆涓婚敭 + * @param id 浜や簰淇″彿閰嶇疆涓婚敭 * @return 缁撴灉 */ @Override diff --git a/jcdm-main/src/main/java/com/jcdm/main/webservice/service/ReceivingServices.java b/jcdm-main/src/main/java/com/jcdm/main/webservice/service/ReceivingServices.java index af08e28..7bcd85e 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/webservice/service/ReceivingServices.java +++ b/jcdm-main/src/main/java/com/jcdm/main/webservice/service/ReceivingServices.java @@ -2,6 +2,9 @@ import cn.hutool.json.JSONObject; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; import com.google.gson.Gson; import com.google.gson.JsonObject; import com.jcdm.main.da.collectionParamConf.service.IDaCollectionParamConfService; @@ -40,16 +43,28 @@ // test1(); // String serviceUrl = "http://podqapp.cfmoto.com.cn:50200/XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_MES&receiverParty=&receiverService=&interface=SI_ZPP_CF_MES_005_SYN_OUT&interfaceNamespace=http://cfmoto.com/xi/MES"; -// +// String serviceUrl = "http://podqapp.cfmoto.com.cn:50200/XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_MES&receiverParty=&receiverService=&interface=SI_ZPP_CF_BC_001_SYN_OUT&interfaceNamespace=http://cfmoto.com/xi/MES"; +//// String content = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:urn=\"urn:sap-com:document:sap:rfc:functions\">\n" + +//// " <soapenv:Header/>\n" + +//// " <soapenv:Body>\n" + +//// " <urn:ZPP_CF_MES_005>\n" + +//// " <!--Optional:-->\n" + +//// " <IV_WERKS>1000</IV_WERKS>\n" + +//// " <!--Optional:-->\n" + +//// " <IV_ZSCTZD>A0055577</IV_ZSCTZD>\n" + +//// " </urn:ZPP_CF_MES_005>\n" + +//// " </soapenv:Body>\n" + +//// "</soapenv:Envelope>"; // String content = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:urn=\"urn:sap-com:document:sap:rfc:functions\">\n" + // " <soapenv:Header/>\n" + // " <soapenv:Body>\n" + -// " <urn:ZPP_CF_MES_005>\n" + -// " <!--Optional:-->\n" + -// " <IV_WERKS>1000</IV_WERKS>\n" + -// " <!--Optional:-->\n" + -// " <IV_ZSCTZD>A0055577</IV_ZSCTZD>\n" + -// " </urn:ZPP_CF_MES_005>\n" + +// " <urn:ZPP_BC_001>\n" + +// " <IV_AUFNR>000010569212</IV_AUFNR>\n" + +// " <IV_VORNR>0010</IV_VORNR>\n" + +// " <IV_LMNGA>1</IV_LMNGA>\n" + +// " <IV_XMNGA>0</IV_XMNGA> \n" + +// " <IV_STATU>1</IV_STATU> \n" + +// " </urn:ZPP_BC_001>\n" + // " </soapenv:Body>\n" + // "</soapenv:Envelope>"; // // HttpClient鍙戦�丼OAP璇锋眰 @@ -79,10 +94,10 @@ // InputStream is = postMethod.getResponseBodyAsStream(); // // 鑾峰彇璇锋眰缁撴灉瀛楃涓� // String result = IOUtils.toString(is); -// String jsonStr = xmlToJSON2(result); -// Gson gson = new Gson(); -// // 灏唈son瀛楃涓茶浆鎹㈡垚瀵硅薄 -// ItemList itemList = gson.fromJson(jsonStr, ItemList.class); +//// String jsonStr = xmlToJSON2(result); +//// Gson gson = new Gson(); +//// // 灏唈son瀛楃涓茶浆鎹㈡垚瀵硅薄 +//// ItemList itemList = gson.fromJson(jsonStr, ItemList.class); // System.out.println("杩斿洖缁撴灉:" + result); // } else { // System.out.println("閿欒浠g爜锛�" + status + ":" + postMethod.getResponseBodyAsString()); @@ -195,4 +210,33 @@ return etData.toString(); } + /** + * 鏂瑰紡--璐� + * 浣跨敤hutool宸ュ叿鍖呬腑鐨勫伐鍏疯浆鍖� + * @param xmlStr + * @return + */ + public static String xmlToJSON3(String xmlStr){ + String status = ""; + if(xmlStr.contains("EV_STATUS")){ + JSONObject jsonObject1 = cn.hutool.json.XML.toJSONObject(xmlStr, true); + + ObjectMapper objectMapper = new ObjectMapper(); + JsonNode rootNode = null; + try { + rootNode = objectMapper.readTree(String.valueOf(jsonObject1)); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + String evStatus = rootNode + .path("SOAP:Envelope") + .path("SOAP:Body") + .path("n0:ZPP_BC_001.Response") + .path("EV_STATUS") + .asText(); + status = evStatus; + } + return status; + } + } diff --git a/jcdm-main/src/main/java/com/jcdm/main/webservice/service/ReportingForWork.java b/jcdm-main/src/main/java/com/jcdm/main/webservice/service/ReportingForWork.java new file mode 100644 index 0000000..9447ace --- /dev/null +++ b/jcdm-main/src/main/java/com/jcdm/main/webservice/service/ReportingForWork.java @@ -0,0 +1,78 @@ +package com.jcdm.main.webservice.service; + +import org.apache.commons.httpclient.HttpClient; +import org.apache.commons.httpclient.UsernamePasswordCredentials; +import org.apache.commons.httpclient.auth.AuthScope; +import org.apache.commons.httpclient.methods.PostMethod; +import org.apache.commons.httpclient.methods.RequestEntity; +import org.apache.commons.httpclient.methods.StringRequestEntity; +import org.apache.commons.io.IOUtils; + +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; + +public class ReportingForWork { + public static void main(String[] args) throws IOException { + String serviceUrl = "http://podqapp.cfmoto.com.cn:50200/XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_MES&receiverParty=&receiverService=&interface=SI_ZPP_CF_BC_001_SYN_OUT&interfaceNamespace=http://cfmoto.com/xi/MES"; +// String content = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:urn=\"urn:sap-com:document:sap:rfc:functions\">\n" + +// " <soapenv:Header/>\n" + +// " <soapenv:Body>\n" + +// " <urn:ZPP_CF_MES_005>\n" + +// " <!--Optional:-->\n" + +// " <IV_WERKS>1000</IV_WERKS>\n" + +// " <!--Optional:-->\n" + +// " <IV_ZSCTZD>A0055577</IV_ZSCTZD>\n" + +// " </urn:ZPP_CF_MES_005>\n" + +// " </soapenv:Body>\n" + +// "</soapenv:Envelope>"; + String content = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:urn=\"urn:sap-com:document:sap:rfc:functions\">\n" + + " <soapenv:Header/>\n" + + " <soapenv:Body>\n" + + " <urn:ZPP_BC_001>\n" + + " <IV_AUFNR>000010569212</IV_AUFNR>\n" + + " <IV_VORNR>0010</IV_VORNR>\n" + + " <IV_LMNGA>1</IV_LMNGA>\n" + + " <IV_XMNGA>0</IV_XMNGA> \n" + + " <IV_STATU>1</IV_STATU> \n" + + " </urn:ZPP_BC_001>\n" + + " </soapenv:Body>\n" + + "</soapenv:Envelope>"; + // HttpClient鍙戦�丼OAP璇锋眰 + int timeout = 10000; + HttpClient client = new HttpClient(); + //濡傛灉闇�瑕佺敤鎴峰悕瀵嗙爜楠岃瘉锛涗笉闇�瑕侀獙璇佺櫥褰曞垯涓嶉渶瑕佷互涓�4琛� + String username = "POMESUSER"; + String password = "12345tgb"; + UsernamePasswordCredentials creds = new UsernamePasswordCredentials(username, password); + client.getState().setCredentials(AuthScope.ANY, creds); + + PostMethod postMethod = new PostMethod(serviceUrl); + // 璁剧疆杩炴帴瓒呮椂 + client.getHttpConnectionManager().getParams().setConnectionTimeout(timeout); + // 璁剧疆璇诲彇鏃堕棿瓒呮椂 + client.getHttpConnectionManager().getParams().setSoTimeout(timeout); + // 鐒跺悗鎶奡oap璇锋眰鏁版嵁娣诲姞鍒癙ostMethod涓� + RequestEntity requestEntity = new StringRequestEntity(content, "text/xml", "UTF-8"); + + // 璁剧疆璇锋眰澶撮儴锛屽惁鍒欏彲鑳戒細鎶� 鈥渘o SOAPAction header鈥� 鐨勯敊璇� + postMethod.setRequestHeader("SOAPAction", ""); + // 璁剧疆璇锋眰浣� + postMethod.setRequestEntity(requestEntity); + int status = client.executeMethod(postMethod); + + if (status == 200) {// 鎴愬姛 + InputStream is = postMethod.getResponseBodyAsStream(); + // 鑾峰彇璇锋眰缁撴灉瀛楃涓� + String result = IOUtils.toString(is); +// String jsonStr = xmlToJSON2(result); +// Gson gson = new Gson(); +// // 灏唈son瀛楃涓茶浆鎹㈡垚瀵硅薄 +// ItemList itemList = gson.fromJson(jsonStr, ItemList.class); + System.out.println("杩斿洖缁撴灉:" + result); + } else { + System.out.println("閿欒浠g爜锛�" + status + ":" + postMethod.getResponseBodyAsString()); + } + } +} + diff --git a/jcdm-main/src/main/resources/mapper/da/opcuaconfig/DaOpcuaConfigMapper.xml b/jcdm-main/src/main/resources/mapper/da/opcuaconfig/DaOpcuaConfigMapper.xml index 9ad8e52..46dedc2 100644 --- a/jcdm-main/src/main/resources/mapper/da/opcuaconfig/DaOpcuaConfigMapper.xml +++ b/jcdm-main/src/main/resources/mapper/da/opcuaconfig/DaOpcuaConfigMapper.xml @@ -6,32 +6,29 @@ <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" /> + <result property="process" column="process" /> + <result property="processName" column="process_name" /> + <result property="state" column="state" /> </resultMap> <sql id="selectDaOpcuaConfigVo"> - select id, module, node, length, sys_types, functionality, subscribe, r_module, r_function, remarks from da_opcua_config + select id, node,sys_types, subscribe, r_function, remarks, process, process_name, state 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="node != null and node != ''"> and node = #{node}</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> + <if test="rFunction != null and rFunction != ''"> and r_function = #{rFunction}</if> + <if test="process != null and process != ''"> and process = #{process}</if> + <if test="processName != null and processName != ''"> and process_name like concat('%', #{processName}, '%')</if> + <if test="state != null "> and state = #{state}</if> </where> </select> @@ -40,46 +37,41 @@ where id = #{id} </select> - <insert id="insertDaOpcuaConfig" parameterType="DaOpcuaConfig"> + <insert id="insertDaOpcuaConfig" parameterType="DaOpcuaConfig" useGeneratedKeys="true" keyProperty="id"> 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="node != null and node != ''">node,</if> + <if test="sysTypes != null and sysTypes != ''">sys_types,</if> <if test="subscribe != null">subscribe,</if> - <if test="rModule != null">r_module,</if> - <if test="rFunction != null">r_function,</if> + <if test="rFunction != null and rFunction != ''">r_function,</if> <if test="remarks != null">remarks,</if> + <if test="process != null">process,</if> + <if test="processName != null">process_name,</if> + <if test="state != null">state,</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="node != null and node != ''">#{node},</if> + <if test="sysTypes != null and sysTypes != ''">#{sysTypes},</if> <if test="subscribe != null">#{subscribe},</if> - <if test="rModule != null">#{rModule},</if> - <if test="rFunction != null">#{rFunction},</if> + <if test="rFunction != null and rFunction != ''">#{rFunction},</if> <if test="remarks != null">#{remarks},</if> + <if test="process != null">#{process},</if> + <if test="processName != null">#{processName},</if> + <if test="state != null">#{state},</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="node != null and node != ''">node = #{node},</if> + <if test="sysTypes != null and sysTypes != ''">sys_types = #{sysTypes},</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="rFunction != null and rFunction != ''">r_function = #{rFunction},</if> <if test="remarks != null">remarks = #{remarks},</if> + <if test="process != null">process = #{process},</if> + <if test="processName != null">process_name = #{processName},</if> + <if test="state != null">state = #{state},</if> </trim> where id = #{id} </update> diff --git a/jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml b/jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml index 8699587..f8bfd29 100644 --- a/jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml +++ b/jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml @@ -38,6 +38,7 @@ <include refid="selectDaParamCollectionVo"/> <where> <if test="workOrderNo != null and workOrderNo != ''"> and work_order_no = #{workOrderNo}</if> + <if test="type != null and type != ''"> and type = #{type}</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> diff --git a/jcdm-quartz/pom.xml b/jcdm-quartz/pom.xml index 145876e..fd2d43a 100644 --- a/jcdm-quartz/pom.xml +++ b/jcdm-quartz/pom.xml @@ -35,6 +35,11 @@ <artifactId>jcdm-common</artifactId> </dependency> + <dependency> + <groupId>com.jcdm</groupId> + <artifactId>jcdm-main</artifactId> + </dependency> + </dependencies> </project> \ No newline at end of file diff --git a/jcdm-quartz/src/main/java/com/jcdm/quartz/task/RyTask.java b/jcdm-quartz/src/main/java/com/jcdm/quartz/task/RyTask.java index d0f1e89..5752e5b 100644 --- a/jcdm-quartz/src/main/java/com/jcdm/quartz/task/RyTask.java +++ b/jcdm-quartz/src/main/java/com/jcdm/quartz/task/RyTask.java @@ -1,7 +1,13 @@ package com.jcdm.quartz.task; +import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling; +import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService; +import com.jcdm.main.webservice.service.ReceivingServices; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.jcdm.common.utils.StringUtils; + +import java.util.List; /** * 瀹氭椂浠诲姟璋冨害娴嬭瘯 @@ -25,4 +31,58 @@ { System.out.println("鎵ц鏃犲弬鏂规硶"); } + + @Autowired + private IBsOrderSchedulingService bsOrderSchedulingService; + String url = "http://podqapp.cfmoto.com.cn:50200/XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_MES&receiverParty=&receiverService=&interface=SI_ZPP_CF_BC_001_SYN_OUT&interfaceNamespace=http://cfmoto.com/xi/MES"; + public void workReportingTasks(){ + report10(); + report20(); + } + + public void report10(){ + BsOrderScheduling bsOrderScheduling = new BsOrderScheduling(); + bsOrderScheduling.setReport10("0"); + List<BsOrderScheduling> bsOrderSchedulings = bsOrderSchedulingService.selectBsOrderSchedulingList(bsOrderScheduling); + for (BsOrderScheduling orderScheduling : bsOrderSchedulings) { + String xmlResult = ReceivingServices.getInterfaceInformationXml(url, getProductionPlanInformationXml(orderScheduling.getOrderNo(), "0010")); + String status = ReceivingServices.xmlToJSON3(xmlResult); + if(status.equals("1")){ + orderScheduling.setReport10("1"); + int i = bsOrderSchedulingService.updateBsOrderScheduling(orderScheduling); + System.out.println("鏇存柊鐘舵�佹垚鍔�"); + } + } + } + + public void report20(){ + BsOrderScheduling bsOrderScheduling = new BsOrderScheduling(); + bsOrderScheduling.setReport20("0"); + List<BsOrderScheduling> bsOrderSchedulings = bsOrderSchedulingService.selectBsOrderSchedulingList(bsOrderScheduling); + for (BsOrderScheduling orderScheduling : bsOrderSchedulings) { + String xmlResult = ReceivingServices.getInterfaceInformationXml(url, getProductionPlanInformationXml(orderScheduling.getOrderNo(), "0790")); + String status = ReceivingServices.xmlToJSON3(xmlResult); + if(status.equals("1")){ + orderScheduling.setReport10("1"); + int i = bsOrderSchedulingService.updateBsOrderScheduling(orderScheduling); + System.out.println("鏇存柊鐘舵�佹垚鍔�"); + } + } + } + + public static String getProductionPlanInformationXml(String orderNo,String location){ + String content = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:urn=\"urn:sap-com:document:sap:rfc:functions\">\n" + + " <soapenv:Header/>\n" + + " <soapenv:Body>\n" + + " <urn:ZPP_BC_001>\n" + + " <IV_AUFNR>"+orderNo+"</IV_AUFNR>\n" + + " <IV_VORNR>"+location+"</IV_VORNR>\n" + + " <IV_LMNGA>1</IV_LMNGA>\n" + + " <IV_XMNGA>0</IV_XMNGA> \n" + + " <IV_STATU>1</IV_STATU> \n" + + " </urn:ZPP_BC_001>\n" + + " </soapenv:Body>\n" + + "</soapenv:Envelope>"; + return content; + } } diff --git a/jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js b/jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js index fade52c..aef47eb 100644 --- a/jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js +++ b/jcdm-ui/src/api/main/bs/formulaChild/formulaChild.js @@ -18,6 +18,15 @@ }) } +// 鏌ヨ宸ヨ壓鏂囦欢 +export function getMainProductProcess(query) { + return request({ + url: '/bs/formulaChild/getMainProductProcess', + method: 'post', + data: query + }) +} + // 鏌ヨ閰嶆柟閰嶇疆瀛愪俊鎭缁� export function getFormulaChild(id) { return request({ diff --git a/jcdm-ui/src/api/main/da/opcuaconfig/opcuaconfig.js b/jcdm-ui/src/api/main/da/opcuaconfig/opcuaconfig.js index 5bb1420..ffa9dab 100644 --- a/jcdm-ui/src/api/main/da/opcuaconfig/opcuaconfig.js +++ b/jcdm-ui/src/api/main/da/opcuaconfig/opcuaconfig.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 鏌ヨOPCUA鍙傛暟璁剧疆鍒楄〃 +// 鏌ヨ浜や簰淇″彿閰嶇疆鍒楄〃 export function listOpcuaconfig(query) { return request({ url: '/da/opcuaconfig/list', @@ -9,7 +9,7 @@ }) } -// 鏌ヨOPCUA鍙傛暟璁剧疆璇︾粏 +// 鏌ヨ浜や簰淇″彿閰嶇疆璇︾粏 export function getOpcuaconfig(id) { return request({ url: '/da/opcuaconfig/' + id, @@ -17,7 +17,7 @@ }) } -// 鏂板OPCUA鍙傛暟璁剧疆 +// 鏂板浜や簰淇″彿閰嶇疆 export function addOpcuaconfig(data) { return request({ url: '/da/opcuaconfig', @@ -26,7 +26,7 @@ }) } -// 淇敼OPCUA鍙傛暟璁剧疆 +// 淇敼浜や簰淇″彿閰嶇疆 export function updateOpcuaconfig(data) { return request({ url: '/da/opcuaconfig', @@ -35,7 +35,7 @@ }) } -// 鍒犻櫎OPCUA鍙傛暟璁剧疆 +// 鍒犻櫎浜や簰淇″彿閰嶇疆 export function delOpcuaconfig(id) { return request({ url: '/da/opcuaconfig/' + id, diff --git a/jcdm-ui/src/components/itemSelect/index.vue b/jcdm-ui/src/components/itemSelect/index.vue index 282ae3f..39743cc 100644 --- a/jcdm-ui/src/components/itemSelect/index.vue +++ b/jcdm-ui/src/components/itemSelect/index.vue @@ -220,4 +220,4 @@ } } }; -</script> \ No newline at end of file +</script> diff --git a/jcdm-ui/src/views/main/bs/beatSetting/index.vue b/jcdm-ui/src/views/main/bs/beatSetting/index.vue index 6179c36..ca3770f 100644 --- a/jcdm-ui/src/views/main/bs/beatSetting/index.vue +++ b/jcdm-ui/src/views/main/bs/beatSetting/index.vue @@ -78,7 +78,7 @@ </el-table-column> <el-table-column label="浜у搧鍚嶇О" align="center" prop="productName"> </el-table-column> - <el-table-column label="鑺傛媿" align="center" prop="beat"> + <el-table-column label="鑺傛媿(S)" align="center" prop="beat"> </el-table-column> <el-table-column fixed="right" width="200" label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> diff --git a/jcdm-ui/src/views/main/bs/orderScheduling/index.vue b/jcdm-ui/src/views/main/bs/orderScheduling/index.vue index 3117645..706695b 100644 --- a/jcdm-ui/src/views/main/bs/orderScheduling/index.vue +++ b/jcdm-ui/src/views/main/bs/orderScheduling/index.vue @@ -242,7 +242,7 @@ <!-- <el-table-column label="澶囨敞" align="center" prop="remarks">--> <!-- </el-table-column>--> - <el-table-column fixed="right" width="200" label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> +<!-- <el-table-column fixed="right" width="200" label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button size="mini" @@ -263,7 +263,7 @@ v-hasPermi="['bs:orderScheduling:remove']" >鍒犻櫎</el-button> </template> - </el-table-column> + </el-table-column>--> </el-table> </el-card> diff --git a/jcdm-ui/src/views/main/cfkb/Instructions/index.vue b/jcdm-ui/src/views/main/cfkb/Instructions/index.vue index 835ee13..7c57df7 100644 --- a/jcdm-ui/src/views/main/cfkb/Instructions/index.vue +++ b/jcdm-ui/src/views/main/cfkb/Instructions/index.vue @@ -69,17 +69,35 @@ </el-col> </el-row> + <div> + <el-dialog + title="宸ヨ壓鏂囦欢" + :visible.sync="dialogVisible" + width="70%" + @close="closeMethod" + + > + <div><el-image style="height: 1090px;width: 960px;margin-left: 33px" :src="mainProcessSrc"></el-image></div> + <span slot="footer" class="dialog-footer"> + <el-button type="primary" @click="dialogVisible = false" style="margin-right: 80px">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> </div> + </template> <script> -import {listFormulaChild, getProductProcess} from "@/api/main/bs/formulaChild/formulaChild"; +import {getMainProductProcess, getProductProcess} from "@/api/main/bs/formulaChild/formulaChild"; import {listStationConf,getIp} from "@/api/main/sc/stationConf"; export default { name: "index", data() { return { + dialogVisible: false, + mainProcessSrc: '', + mainProcess: [], isClickd: '', // 鍒濆鍖栦负鏈偣鍑荤姸鎬� locationCode: "鏈厤缃�", locationName: "鏈厤缃伐浣�", @@ -173,6 +191,9 @@ }); }, + closeMethod(){ + this.mainProcessSrc = '' + }, //鑾峰彇褰撳墠鏃堕棿 getNowTime () { let speed = 1000 @@ -242,7 +263,13 @@ this.getUpOrDown(1) }, processDocuments(){ - + getMainProductProcess(this.queryParams).then(res => { + this.mainProcess = res.rows + if (res.rows!=null && res.rows.length>0){ + this.mainProcessSrc = res.rows[0].img + } + }) + this.dialogVisible = true }, changeProducts(val){ @@ -257,7 +284,7 @@ /** 鏌ヨ閰嶆柟閰嶇疆瀛愪俊鎭垪琛� */ this.queryParams.productCode = val; this.queryParams.processesCode = this.locationCode - listFormulaChild(this.queryParams).then(response => { + getProductProcess(this.queryParams).then(response => { this.tableData = []; this.cleanImg() this.tableData = response.rows; @@ -340,6 +367,12 @@ .active { background-color: #31b431; /* 鐐瑰嚮鍚庣殑鑳屾櫙鑹� */ } - +::v-deep .el-dialog { + height: 90%; + overflow-y: auto; +} +::v-deep .el-dialog__footer{ + margin-top: 10px; +} </style> diff --git a/jcdm-ui/src/views/main/da/opcuaconfig/index.vue b/jcdm-ui/src/views/main/da/opcuaconfig/index.vue index 6be8c27..228e2ed 100644 --- a/jcdm-ui/src/views/main/da/opcuaconfig/index.vue +++ b/jcdm-ui/src/views/main/da/opcuaconfig/index.vue @@ -1,206 +1,173 @@ <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="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 style="float: right"> - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> - <el-button type="warning" icon="el-icon-copy-document" size="mini" @click="advancedQuery">楂樼骇鏌ヨ</el-button> - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> - <el-form :model="queryParams" ref="queryParams" size="small" :inline="true" v-show="advancedShowSearch" label-width="68px"> - <el-form-item label="璁㈤槄鍝嶅簲妯″潡" prop="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 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> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> + <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="rFunction"> + <el-select v-model="queryParams.rFunction" placeholder="璇烽�夋嫨璁㈤槄绫诲瀷" clearable> + <el-option + v-for="dict in dict.type.subscription_type" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> + </el-form-item> + <el-form-item label="宸ュ簭缂栫爜" prop="process"> + <el-select v-model="queryParams.process" 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="processName"> + <el-input + v-model="queryParams.processName" + placeholder="璇疯緭鍏ュ伐搴忓悕绉�" + clearable + @keyup.enter.native="handleQuery" + /> + </el-form-item> + <el-form-item label="鐘舵��" prop="state"> + <el-select v-model="queryParams.state" placeholder="璇烽�夋嫨鐘舵��" clearable> + <el-option + v-for="dict in dict.type.sys_normal_disable" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> + </el-form-item> + <el-form-item style="float: right"> + <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> + </el-form-item> + </el-form> </el-card> <el-card style="margin-top: 10px" class="box-card"> - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="primary" - plain - icon="el-icon-plus" - size="mini" - @click="handleAdd" - v-hasPermi="['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-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: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="['main: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="['main: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="['main:opcuaconfig:export']" + >瀵煎嚭</el-button> + </el-col> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> + </el-row> - <el-table v-loading="loading" border :data="opcuaconfigList" @selection-change="handleSelectionChange" v-if="opcuaconfigList.length > 0"> - <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 fixed="right" label="鎿嶄綔" width="200" align="center" class-name="small-padding fixed-width"> - <template slot-scope="scope"> - <el-button - size="mini" - type="success" - plain - style="width: 72px" - icon="el-icon-edit" - @click="handleUpdate(scope.row)" - v-hasPermi="['da:opcuaconfig:edit']" - >淇敼</el-button> - <el-button - size="mini" - type="danger" - plain - style="width: 72px" - icon="el-icon-delete" - @click="handleDelete(scope.row)" - v-hasPermi="['da:opcuaconfig:remove']" - >鍒犻櫎</el-button> - </template> - </el-table-column> - </el-table> - <el-empty v-else> - <span slot="description">鏆傛棤鏁版嵁</span> - </el-empty> + <el-table border 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="process"> + <!-- <template slot-scope="scope">--> + <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.process"/>--> + <!-- </template>--> + </el-table-column> + <el-table-column label="宸ュ簭鍚嶇О" align="center" prop="processName"> + <!-- <template slot-scope="scope">--> + <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.processName"/>--> + <!-- </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="sysTypes"> + <template slot-scope="scope"> + <dict-tag :options="dict.type.data_type" :value="scope.row.sysTypes"/> + </template> + </el-table-column> + <el-table-column label="鏄惁璁㈤槄" align="center" prop="subscribe"> + <template slot-scope="scope"> + <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.subscribe"/> + </template> + </el-table-column> + <el-table-column label="璁㈤槄绫诲瀷" align="center" prop="rFunction"> + <template slot-scope="scope"> + <dict-tag :options="dict.type.subscription_type" :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" prop="state"> + <template slot-scope="scope"> + <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.state"/> + </template> + </el-table-column> + <el-table-column fixed="right" width="200" label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> + <template slot-scope="scope"> + <el-button + size="mini" + type="success" + plain + style="width: 72px" + icon="el-icon-edit" + @click="handleUpdate(scope.row)" + v-hasPermi="['da:opcuaconfig:edit']" + >淇敼</el-button> + <el-button + size="mini" + type="danger" + plain + style="width: 72px" + icon="el-icon-delete" + @click="handleDelete(scope.row)" + v-hasPermi="['main:opcuaconfig:remove']" + >鍒犻櫎</el-button> + </template> + </el-table-column> + </el-table> </el-card> <pagination @@ -211,49 +178,70 @@ @pagination="getList" /> - <!-- 娣诲姞鎴栦慨鏀筄PCUA鍙傛暟璁剧疆瀵硅瘽妗� --> + <!-- 娣诲姞鎴栦慨鏀逛氦浜掍俊鍙烽厤缃璇濇 --> <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> + <span slot="title"> + <i class="el-icon-s-order"></i> + {{titleName}} + </span> <el-form ref="form" :model="form" :rules="rules" label-width="80px"> - <el-form-item label="鎵�灞炴ā鍧�" prop="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-form-item label="鏁版嵁绫诲瀷" prop="sysTypes"> + <el-select v-model="form.sysTypes" placeholder="璇烽�夋嫨鏁版嵁绫诲瀷"> + <el-option + v-for="dict in dict.type.data_type" + :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-option + v-for="dict in dict.type.sys_yes_no" + :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 label="璁㈤槄绫诲瀷" prop="rFunction"> + <el-select v-model="form.rFunction" placeholder="璇烽�夋嫨璁㈤槄绫诲瀷"> + <el-option + v-for="dict in dict.type.subscription_type" + :key="dict.value" + :label="dict.label" + :value="dict.value" + ></el-option> + </el-select> </el-form-item> <el-form-item label="澶囨敞" prop="remarks"> <el-input v-model="form.remarks" placeholder="璇疯緭鍏ュ娉�" /> + </el-form-item> + <el-form-item label="宸ュ簭缂栫爜" prop="process"> + <el-radio-group v-model="form.process"> +<!-- <el-radio--> +<!-- v-for="dict in dict.type.${dictType}"--> +<!-- :key="dict.value"--> +<!-- :label="dict.value"--> +<!-- >{{dict.label}}</el-radio>--> + </el-radio-group> + </el-form-item> + <el-form-item label="宸ュ簭鍚嶇О" prop="processName"> + <el-input v-model="form.processName" placeholder="璇疯緭鍏ュ伐搴忓悕绉�" /> + </el-form-item> + <el-form-item label="鐘舵��" prop="state"> + <el-select v-model="form.state" placeholder="璇烽�夋嫨鐘舵��"> + <el-option + v-for="dict in dict.type.sys_normal_disable" + :key="dict.value" + :label="dict.label" + :value="parseInt(dict.value)" + ></el-option> + </el-select> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> @@ -269,10 +257,12 @@ export default { name: "Opcuaconfig", + dicts: ['subscription_type', 'sys_yes_no', 'sys_normal_disable', 'data_type'], data() { return { // 閬僵灞� loading: true, + titleName: "", // 閫変腑鏁扮粍 ids: [], // 闈炲崟涓鐢� @@ -283,9 +273,8 @@ showSearch: true, // 鎬绘潯鏁� total: 0, - // OPCUA鍙傛暟璁剧疆琛ㄦ牸鏁版嵁 + // 浜や簰淇″彿閰嶇疆琛ㄦ牸鏁版嵁 opcuaconfigList: [], - advancedShowSearch: false, // 寮瑰嚭灞傛爣棰� title: "", // 鏄惁鏄剧ず寮瑰嚭灞� @@ -294,14 +283,12 @@ queryParams: { pageNum: 1, pageSize: 10, - module: null, node: null, - length: null, sysTypes: null, - functionality: null, - subscribe: null, - rModule: null, rFunction: null, + process: null, + processName: null, + state: null }, // 琛ㄥ崟鍙傛暟 form: {}, @@ -310,6 +297,18 @@ id: [ { required: true, message: "ID涓嶈兘涓虹┖", trigger: "blur" } ], + node: [ + { required: true, message: "鑺傜偣涓嶈兘涓虹┖", trigger: "blur" } + ], + sysTypes: [ + { required: true, message: "鏁版嵁绫诲瀷涓嶈兘涓虹┖", trigger: "change" } + ], + subscribe: [ + { required: true, message: "鏄惁璁㈤槄涓嶈兘涓虹┖", trigger: "change" } + ], + rFunction: [ + { required: true, message: "璁㈤槄绫诲瀷涓嶈兘涓虹┖", trigger: "change" } + ], } }; }, @@ -317,10 +316,7 @@ this.getList(); }, methods: { - advancedQuery(){ - this.advancedShowSearch = (this.advancedShowSearch) ? this.advancedShowSearch = false : this.advancedShowSearch = true; - }, - /** 鏌ヨOPCUA鍙傛暟璁剧疆鍒楄〃 */ + /** 鏌ヨ浜や簰淇″彿閰嶇疆鍒楄〃 */ getList() { this.loading = true; listOpcuaconfig(this.queryParams).then(response => { @@ -346,7 +342,10 @@ subscribe: null, rModule: null, rFunction: null, - remarks: null + remarks: null, + process: null, + processName: null, + state: null }; this.resetForm("form"); }, @@ -370,7 +369,7 @@ handleAdd() { this.reset(); this.open = true; - this.title = "娣诲姞OPCUA鍙傛暟璁剧疆"; + this.titleName = "娣诲姞浜や簰淇″彿閰嶇疆"; }, /** 淇敼鎸夐挳鎿嶄綔 */ handleUpdate(row) { @@ -379,7 +378,7 @@ getOpcuaconfig(id).then(response => { this.form = response.data; this.open = true; - this.title = "淇敼OPCUA鍙傛暟璁剧疆"; + this.titleName = "淇敼浜や簰淇″彿閰嶇疆"; }); }, /** 鎻愪氦鎸夐挳 */ @@ -405,7 +404,7 @@ /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { const ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍒犻櫎OPCUA鍙傛暟璁剧疆缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { + this.$modal.confirm('鏄惁纭鍒犻櫎浜や簰淇″彿閰嶇疆缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() { return delOpcuaconfig(ids); }).then(() => { this.getList(); diff --git a/jcdm-ui/src/views/main/da/paramCollection/index.vue b/jcdm-ui/src/views/main/da/paramCollection/index.vue index 223ef78..f997702 100644 --- a/jcdm-ui/src/views/main/da/paramCollection/index.vue +++ b/jcdm-ui/src/views/main/da/paramCollection/index.vue @@ -73,99 +73,41 @@ <el-table v-loading="loading" border :data="paramCollectionList" @selection-change="handleSelectionChange" v-if="paramCollectionList.length > 0"> <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" width="100" 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"> + <el-table-column label="宸ュ崟缂栧彿" align="center" prop="workOrderNo"></el-table-column> + <el-table-column label="鎬绘垚搴忓垪鍙�" align="center" width="140" prop="sfcCode" ></el-table-column> + <el-table-column label="浜у搧缂栧彿" align="center" prop="productCode"></el-table-column> + <el-table-column label="浜х嚎缂栧彿" align="center" prop="productionLine"></el-table-column> + <el-table-column label="宸ヤ綅缂栧彿" align="center" prop="locationCode"></el-table-column> + <el-table-column label="璁惧缂栧彿" align="center" prop="equipmentNo"></el-table-column> + <el-table-column label="鍙傛暟缂栫爜" align="center" prop="paramCode"></el-table-column> + <el-table-column label="鍙傛暟鍊�" align="center" prop="paramValue"></el-table-column> + <el-table-column label="鍙傛暟涓婇檺" align="center" prop="paramUpper"></el-table-column> + <el-table-column label="鍙傛暟涓嬮檺" align="center" prop="paramLower"></el-table-column> + <el-table-column label="閲囬泦鏃堕棿" align="center" prop="collectionTime" width="100"> <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" > + <el-table-column label="鐘舵��" align="center" prop="state"></el-table-column> + <el-table-column label="鍙傛暟鍚嶇О" align="center" prop="paramName" width="150" ></el-table-column> + <el-table-column label="鍗曚綅" align="center" prop="unit"></el-table-column> + <el-table-column label="绫诲瀷" align="center" prop="type"></el-table-column> + <el-table-column fixed="right" width="200" label="鎿嶄綔" align="center" class-name="small-padding fixed-width" > <template slot-scope="scope"> <el-button size="mini" - type="text" + type="success" + plain + style="width: 72px" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['main:paramCollection:edit']" >淇敼</el-button> <el-button size="mini" - type="text" + type="danger" + plain + style="width: 72px" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['main:paramCollection:remove']" @@ -230,18 +172,6 @@ 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> @@ -253,12 +183,6 @@ </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> diff --git a/jcdm-ui/src/views/main/kb/engineCheck/index.vue b/jcdm-ui/src/views/main/kb/engineCheck/index.vue index 65d5a51..858494b 100644 --- a/jcdm-ui/src/views/main/kb/engineCheck/index.vue +++ b/jcdm-ui/src/views/main/kb/engineCheck/index.vue @@ -1,6 +1,6 @@ <template> <div class="app-container"> - <el-card style="height: 70px;margin-bottom: 10px" class="box-card" > + <el-card class="box-card" > <template> <div class="container"> <el-row type="flex" justify="center" style="text-align: center" > @@ -11,50 +11,41 @@ </div> </template> </el-card> - <el-row :gutter="5" style="margin-top: 10px"> - <el-col :span="10" style=" height:600px;width:800px" > - <el-card class="bottom-card"> - <el-descriptions :column="1" > - <el-descriptions-item> + <el-row :gutter="0" > + + <el-col :span="14"> + <el-card class="box-card" > <el-form ref="form" :model="form" label-width="200px" style="height: 60px;margin-top: 20px" > <el-form-item prop="engineNo" > - <span slot="label" style="font-size:45px;color:black"><strong>鍙戝姩鏈哄彿</strong></span> + <span slot="label" style="font-size:40px;color:black"><strong>鍙戝姩鏈哄彿</strong></span> <el-input style="font-size:30px" v-model="form.engineNo" placeholder="璇疯緭鍏ュ彂鍔ㄦ満鍙�" clearable @keyup.enter.native="EngineNohandleChange" > <el-button slot="append" plain type="info" @click="EngineNohandleChange(form.engineNo)" icon="el-icon-search"></el-button> </el-input> </el-form-item> </el-form> - </el-descriptions-item> - <el-descriptions-item> <el-form ref="form" :model="form" label-width="200px" style="height: 60px;margin-top: 20px" > <el-form-item prop="productType" > - <span slot="label" style="font-size:45px;color:black"><strong>鏈哄瀷</strong></span> + <span slot="label" style="font-size:40px;color:black"><strong>鏈哄瀷</strong></span> <el-input disabled style="font-size:30px" value="form.productType" v-model="form.productType" placeholder="" /> </el-form-item> </el-form> - </el-descriptions-item> - <el-descriptions-item> <el-form ref="form" :model="form" label-width="200px" style="height: 60px;margin-top: 20px" > <el-form-item prop="orderNo" > - <span slot="label" style="font-size:45px;color:black"><strong>宸ュ崟缂栧彿</strong></span> + <span slot="label" style="font-size:40px;color:black"><strong>宸ュ崟缂栧彿</strong></span> <el-input disabled style="font-size:30px" v-model="form.orderNo" placeholder="" /> </el-form-item> </el-form> - </el-descriptions-item> - <el-descriptions-item> <el-form ref="form" :model="form" label-width="200px" style="height: 60px;margin-top: 20px" > <el-form-item prop="currentWorkstation" > - <span slot="label" style="font-size:45px;color:black"><strong>璐ㄩ噺鐘舵��</strong></span> + <span slot="label" style="font-size:40px;color:black"><strong>璐ㄩ噺鐘舵��</strong></span> <el-input disabled style="font-size:30px" v-model:value="form.add" placeholder="" /> </el-form-item> </el-form> - </el-descriptions-item> - </el-descriptions> <el-divider></el-divider> <el-row :gutter="10" class="mb8" type="flex" justify="center" style="text-align: center"> <el-col :span="1.5"> <el-button plain :disabled="buttondisabled" type="primary" style="width:400px;height:160px" v-hasPermi="['bs:formula:add']" @click="forceOnline"> - <span class="el-icon-thumb" style="font-size:45px;color:black"></span> + <span class="el-icon-thumb" style="font-size:40px;color:black"></span> <span style="font-size:45px;color:black"><strong>寮哄埗涓婄嚎</strong></span> </el-button> </el-col> @@ -62,17 +53,17 @@ </el-card> </el-col> - <el-col :span="14" inline style="height:600px;width:600px "> + <el-col :span="10" inline > <el-tabs type="border-card" > <el-card> - <el-col :span="14"style="height: 270px;width:800px "> + <el-col :span="14"style="height: 248px;width:800px "> <span style="font-size:25px"><strong>璐ㄩ噺鐘舵��</strong></span> <el-divider></el-divider> {{this.form.engineCheckList}} </el-col> </el-card> <el-card style="margin-top: 10px" > - <el-col :span="14"style="height: 270px;width:800px "> + <el-col :span="14"style="height: 248px;width:800px "> <span style="font-size:25px"><strong>鏈�缁堢粨鏋�</strong></span> <el-divider></el-divider> {{queryParams.productType}} @@ -163,7 +154,6 @@ else{ this.reset(); this.buttondisabled = true - // this.$modal.msgError('杈撳叆鐨勫彂鍔ㄦ満鍙锋湁璇�'); const h = this.$createElement; this.$message({ message: h('p',null, [ @@ -202,7 +192,6 @@ <style scoped> ::v-deep .el-input__inner{ height: 50px; - width: 450px; } ::v-deep .el-form-item__label { line-height: 50px; diff --git a/jcdm-ui/src/views/main/pr/tightenReport/index.vue b/jcdm-ui/src/views/main/pr/tightenReport/index.vue new file mode 100644 index 0000000..edb177a --- /dev/null +++ b/jcdm-ui/src/views/main/pr/tightenReport/index.vue @@ -0,0 +1,203 @@ +<template> + <div class="app-container"> + <el-card class="box-card" > + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" > + <el-form-item label-width="120" label="绠变綋缂栫爜:" prop="sfcCode"> + <el-input clearable + v-model="queryParams.sfcCode" + placeholder="璇疯緭鍏ョ浣撶紪鐮�" + @keyup.enter.native="handleQuery"/> + </el-form-item> + <el-form-item label-width="120" label="宸ヤ綅鍙�:" prop="locationCode"> + <el-input clearable + v-model="queryParams.locationCode" + placeholder="璇疯緭鍏ュ伐浣嶅彿" + @keyup.enter.native="handleQuery"/> + </el-form-item> + <el-form-item label-width="120" label="閲囬泦鏃堕棿" prop="startDate"> + <el-date-picker + v-model="dateRange" + type="daterange" + range-separator="鑷�" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡"> + </el-date-picker> + </el-form-item> + <el-form-item style="float: right"> + <el-button type="primary" icon="el-icon-refresh" @click="handleQuery">鏌ヨ</el-button> + <el-button type="" icon="el-icon-refresh" @click="resetQuery">閲嶇疆</el-button> + </el-form-item> + </el-form> + </el-card> + + <el-card style="margin-top: 10px" class="box-card"> + <el-table v-loading="loading" border :data="tightenReportList" @selection-change="handleSelectionChange" v-if="tightenReportList.length > 0"> + <el-table-column type="selection" width="55" align="center" /> + <el-table-column label="绠变綋缂栫爜" align="center" width="200" prop="sfcCode"></el-table-column> + <el-table-column label="宸ヤ綅" align="center" prop="locationCode"></el-table-column> + <el-table-column label="鍙傛暟缂栫爜" align="center" prop="paramCode"></el-table-column> + <el-table-column label="鍙傛暟鍚嶇О" align="center" prop="paramName"></el-table-column> + <el-table-column label="鍙傛暟鍊�" align="center" prop="paramValue"></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"></el-table-column> + <el-table-column label="鍗曚綅" align="center" prop="unit"></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" + /> + + </div> +</template> +<script> +import { listParamCollection, getParamCollection, delParamCollection, addParamCollection, updateParamCollection } from "@/api/main/da/paramCollection/paramCollection"; +export default { + name: "index", + computed: { + }, + dicts: ['sys_normal_disable','order_scheduling_produce_status','print_status'], + components: { + }, + data(){ + return{ + dateRange: '', + // 鐢ㄤ簬瀛樺偍閫夋嫨鐨勬棩鏈熻寖鍥� + total: 0, + ids: [], + tightenReportList: [], + loading: true, + single: true, + // 闈炲涓鐢� + multiple: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + // 鏌ヨ鍙傛暟 + queryParams: { + pageNum: 1, + pageSize: 10, + 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: '鎷х揣鏁版嵁', + startDate: null, + endDate: null + }, + } + }, + created() { + this.getList(); + }, + methods: { + + // async fetchData() { + // // 鏋勫缓API璇锋眰鐨刄RL锛屼娇鐢ㄩ�夋嫨鐨勬棩鏈熻寖鍥翠綔涓烘煡璇㈠弬鏁� + // const url = `@/api/main/da/paramCollection/paramCollection?startDate=${this.dateRange[0]}&endDate=${this.dateRange[1]}`; + // + // try { + // // 鍙戦�丄PI璇锋眰锛岃幏鍙栨煡璇㈢粨鏋� + // const response = await fetch(url); + // const data = await response.json(); + // console.log(data); // 澶勭悊鏌ヨ缁撴灉锛屾瘮濡傚湪鎺у埗鍙拌緭鍑烘垨鏄剧ず鍦ㄩ〉闈笂 + // } catch (error) { + // console.error('Error fetching data:', error); + // } + // }, + // }, + + 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: '鎷х揣鏁版嵁', + }; + 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 + }, + + getList() { + this.loading = true; + listParamCollection(this.queryParams).then(response => { + this.tightenReportList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + + }, +} + +</script> + +<style scoped> +::v-deep .el-form-item__label{ + font-size: large; +} +::v-deep .el-card__body{ + padding: 15px 20px 0px 20px; +} +</style> -- Gitblit v1.9.3