Merge remote-tracking branch 'origin/master'
# Conflicts:
# jcdm-ui/src/views/main/kb/prepareOnline/index.vue
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('bs:orderScheduling:list')") |
| | | @GetMapping("/list2") |
| | | public TableDataInfo list2(BsOrderScheduling bsOrderScheduling) |
| | | { |
| | | // startPage(); |
| | | List<BsOrderScheduling> list = bsOrderSchedulingService.selectBsOrderSchedulingList(bsOrderScheduling); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè®¢åæ产å表 |
| | | */ |
| | |
| | | import com.jcdm.common.annotation.Excel; |
| | | import com.jcdm.common.core.domain.BaseEntity; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 订åæ产对象 bs_order_scheduling |
| | | * |
| | |
| | | |
| | | private String endTime; |
| | | |
| | | /** åç®±ä¸çº¿æ¶é´ */ |
| | | @Excel(name = "åç®±ä¸çº¿æ¶é´") |
| | | private Date boxClosingOnlineTime; |
| | | |
| | | /** åç®±ä¸çº¿æ¶é´ */ |
| | | @Excel(name = "åç®±ä¸çº¿æ¶é´") |
| | | private Date closingBoxOfflineTime; |
| | | |
| | | /** æ»è£
ä¸çº¿æ¶é´ */ |
| | | @Excel(name = "æ»è£
ä¸çº¿æ¶é´") |
| | | private Date finalAssemblyLaunchTime; |
| | | |
| | | /** æ»è£
ä¸çº¿æ¶é´ */ |
| | | @Excel(name = "æ»è£
ä¸çº¿æ¶é´") |
| | | private Date finalAssemblyOfflineTime; |
| | | |
| | | /** CVTä¸çº¿æ¶é´ */ |
| | | @Excel(name = "CVTä¸çº¿æ¶é´") |
| | | private Date cvtLaunchTime; |
| | | |
| | | /** CVTä¸çº¿æ¶é´ */ |
| | | @Excel(name = "CVTä¸çº¿æ¶é´") |
| | | private Date cvtOfflineTime; |
| | | |
| | | public Date getBoxClosingOnlineTime() { |
| | | return boxClosingOnlineTime; |
| | | } |
| | | |
| | | public void setBoxClosingOnlineTime(Date boxClosingOnlineTime) { |
| | | this.boxClosingOnlineTime = boxClosingOnlineTime; |
| | | } |
| | | |
| | | public Date getClosingBoxOfflineTime() { |
| | | return closingBoxOfflineTime; |
| | | } |
| | | |
| | | public void setClosingBoxOfflineTime(Date closingBoxOfflineTime) { |
| | | this.closingBoxOfflineTime = closingBoxOfflineTime; |
| | | } |
| | | |
| | | public Date getFinalAssemblyLaunchTime() { |
| | | return finalAssemblyLaunchTime; |
| | | } |
| | | |
| | | public void setFinalAssemblyLaunchTime(Date finalAssemblyLaunchTime) { |
| | | this.finalAssemblyLaunchTime = finalAssemblyLaunchTime; |
| | | } |
| | | |
| | | public Date getFinalAssemblyOfflineTime() { |
| | | return finalAssemblyOfflineTime; |
| | | } |
| | | |
| | | public void setFinalAssemblyOfflineTime(Date finalAssemblyOfflineTime) { |
| | | this.finalAssemblyOfflineTime = finalAssemblyOfflineTime; |
| | | } |
| | | |
| | | public Date getCvtLaunchTime() { |
| | | return cvtLaunchTime; |
| | | } |
| | | |
| | | public void setCvtLaunchTime(Date cvtLaunchTime) { |
| | | this.cvtLaunchTime = cvtLaunchTime; |
| | | } |
| | | |
| | | public Date getCvtOfflineTime() { |
| | | return cvtOfflineTime; |
| | | } |
| | | |
| | | public void setCvtOfflineTime(Date cvtOfflineTime) { |
| | | this.cvtOfflineTime = cvtOfflineTime; |
| | | } |
| | | |
| | | public String[] getDateConditions() { |
| | | return dateConditions; |
| | | } |
| | |
| | | import com.jcdm.main.da.opcuaconfig.domain.NodeEntity; |
| | | import com.jcdm.main.da.opcuaconfig.init.BeanUtils; |
| | | import com.jcdm.main.da.paramCollection.domain.DaParamCollection; |
| | | import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; |
| | | import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId; |
| | |
| | | @Slf4j |
| | | public class MethodName { |
| | | private IDaCollectionParamConfService collectionParamConfService = BeanUtils.getBean(IDaCollectionParamConfService.class); |
| | | private IDaParamCollectionService daParamCollectionService = BeanUtils.getBean(IDaParamCollectionService.class); |
| | | private List<DataValue> s=null; |
| | | public void getSn(String Node, String value) throws Exception { |
| | | log.info(Node+":"+value); |
| | | String[] parts = Node.split("[.]"); |
| | |
| | | DaCollectionParamConf daCollectionParamConf=new DaCollectionParamConf(); |
| | | daCollectionParamConf.setCollectParameterId(parts[0]+"."+parts[1]); |
| | | b=collectionParamConfService.selectDaCollectionParamConfList(daCollectionParamConf); |
| | | List<String> ids = b.stream().map(e -> e.getCollectParameterId()).collect(Collectors.toList()); |
| | | Set<String> de=ListToSet(ids); |
| | | List<DataValue> s=readValues(de); |
| | | // s.forEach(element->{ |
| | | // DaParamCollection Config=new DaParamCollection(); |
| | | // String[] q = element.getIdentifier().split("[.]"); |
| | | // Config.setParamCode(q[2]); |
| | | // Config.setLocationCode(q[1]); |
| | | // Config.setParamValue(element.getValue().toString()); |
| | | // daParamCollectionService.insertDaParamCollection(Config); |
| | | // }); |
| | | |
| | | List<NodeId> nodeId = b.stream().map(info -> { |
| | | NodeId nodeid = new NodeId(2,info.getCollectParameterId()); |
| | | return nodeid; |
| | | }).collect(Collectors.toList()); |
| | | List<DataValue> s=readValues(nodeId); |
| | | |
| | | for(int i=0;i<nodeId.size();i++) |
| | | { |
| | | DaParamCollection Config=new DaParamCollection(); |
| | | Config.setParamCode(nodeId.get(i).getIdentifier().toString().split("[.]")[2]); |
| | | Config.setLocationCode(nodeId.get(i).getIdentifier().toString().split("[.]")[1]); |
| | | Config.setParamValue(s.get(i).getValue().getValue().toString()); |
| | | daParamCollectionService.insertDaParamCollection(Config); |
| | | } |
| | | NodeEntity node2= NodeEntity.builder().index(2).identifier(parts[0]+"."+parts[1]+".RecordDataDone").value("21").type("short").build(); |
| | | Boolean out2=clientHandler.write(node2); |
| | | log.info("èç¹:{},ååºç»æ:{}", node2.getIdentifier(),out2); |
| | |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | public Set<String> ListToSet(List<String> list) { |
| | | Object[] objects = list.toArray();// è¿åObjectæ°ç» |
| | | String[] strings1 = new String[list.size()]; |
| | | list.toArray(strings1);// å°è½¬ååçæ°ç»æ¾å
¥å·²ç»å建好çå¯¹è±¡ä¸ |
| | | String[] strings2 = list.toArray(new String[0]);// å°è½¬ååçæ°ç»èµç»æ°å¯¹è±¡ |
| | | Set<String> set = new HashSet<String>(Arrays.asList(strings2)); |
| | | return set; |
| | | } |
| | | } |
| | |
| | | * @return {@link List<DataValue>} |
| | | * @throws |
| | | */ |
| | | public static List<DataValue> readValues(Set<String> keys){ |
| | | List<NodeId> nodeIdList=new ArrayList<>(500); |
| | | keys.forEach(e->{ |
| | | NodeId nodeId = new NodeId(2, e); |
| | | nodeIdList.add(nodeId); |
| | | }); |
| | | // 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; |
| | | // } |
| | | |
| | | |
| | | /** |
| | | * æ¹æ³æè¿°: 读åå¤ä¸ªç¹ä½çå¼ |
| | | * |
| | | * @param nodeIdList ç¹ä½éå |
| | | * @return {@link List<DataValue>} |
| | | * @throws |
| | | */ |
| | | public static List<DataValue> readValues(List<NodeId> nodeIdList){ |
| | | try { |
| | | List<DataValue> dataValues=client.readValues(0.0, TimestampsToReturn.Both,nodeIdList).get(); |
| | | return dataValues; |
| | |
| | | |
| | | |
| | | 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; |
| | |
| | | // 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åéSOAPè¯·æ± |
| | |
| | | // InputStream is = postMethod.getResponseBodyAsStream(); |
| | | // // è·å请æ±ç»æå符串 |
| | | // String result = IOUtils.toString(is); |
| | | // String jsonStr = xmlToJSON2(result); |
| | | // Gson gson = new Gson(); |
| | | // // å°jsonå符串转æ¢æ对象 |
| | | // ItemList itemList = gson.fromJson(jsonStr, ItemList.class); |
| | | //// String jsonStr = xmlToJSON2(result); |
| | | //// Gson gson = new Gson(); |
| | | //// // å°jsonå符串转æ¢æ对象 |
| | | //// ItemList itemList = gson.fromJson(jsonStr, ItemList.class); |
| | | // System.out.println("è¿åç»æ:" + result); |
| | | // } else { |
| | | // System.out.println("é误代ç ï¼" + status + ":" + postMethod.getResponseBodyAsString()); |
| | |
| | | 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; |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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åéSOAPè¯·æ± |
| | | 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); |
| | | // ç¶åæSoap请æ±æ°æ®æ·»å å°PostMethodä¸ |
| | | RequestEntity requestEntity = new StringRequestEntity(content, "text/xml", "UTF-8"); |
| | | |
| | | // 设置请æ±å¤´é¨ï¼å¦åå¯è½ä¼æ¥ âno 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(); |
| | | // // å°jsonå符串转æ¢æ对象 |
| | | // ItemList itemList = gson.fromJson(jsonStr, ItemList.class); |
| | | System.out.println("è¿åç»æ:" + result); |
| | | } else { |
| | | System.out.println("é误代ç ï¼" + status + ":" + postMethod.getResponseBodyAsString()); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="remarks" column="remarks" /> |
| | | <result property="report30" column="report_30" /> |
| | | <result property="boxClosingOnlineTime" column="box_closing_online_time" /> |
| | | <result property="closingBoxOfflineTime" column="closing_box_offline_time" /> |
| | | <result property="finalAssemblyLaunchTime" column="final_assembly_launch_time" /> |
| | | <result property="finalAssemblyOfflineTime" column="final_assembly_offline_time" /> |
| | | <result property="cvtLaunchTime" column="cvt_launch_time" /> |
| | | <result property="cvtOfflineTime" column="cvt_offline_time" /> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsOrderSchedulingVo"> |
| | | select id, order_no, engine_no, product_type, model, production_status, working_hours, current_workstation, quality_status, whether_or_print, report_10, report_20, combined_box_time, final_assembly_time, operator, operate_time, status, spare_field_1, spare_field_2, spare_field_3, spare_field_4, create_user, create_time, update_user, update_time, remarks, report_30 from bs_order_scheduling |
| | | select id, order_no, engine_no, product_type, model, production_status, working_hours, current_workstation, quality_status, whether_or_print, report_10, report_20, combined_box_time, final_assembly_time, operator, operate_time, status, spare_field_1, spare_field_2, spare_field_3, spare_field_4, create_user, create_time, update_user, update_time, remarks, report_30, box_closing_online_time, closing_box_offline_time, final_assembly_launch_time, final_assembly_offline_time, cvt_launch_time, cvt_offline_time from bs_order_scheduling |
| | | </sql> |
| | | |
| | | <select id="selectBsOrderSchedulingList" parameterType="BsOrderScheduling" resultMap="BsOrderSchedulingResult"> |
| | |
| | | <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> |
| | | <if test="report30 != null and report30 != ''"> and report_30 = #{report30}</if> |
| | | <if test="dateConditions != null and dateConditions != ''"> and operate_time BETWEEN #{startTime} AND #{endTime}</if> |
| | | <if test="boxClosingOnlineTime != null and boxClosingOnlineTime != ''"> and box_closing_online_time = #{boxClosingOnlineTime}</if> |
| | | <if test="closingBoxOfflineTime != null and closingBoxOfflineTime != ''"> and closing_box_offline_time = #{closingBoxOfflineTime}</if> |
| | | <if test="finalAssemblyLaunchTime != null and finalAssemblyLaunchTime != ''"> and final_assembly_launch_time = #{finalAssemblyLaunchTime}</if> |
| | | <if test="finalAssemblyOfflineTime != null and finalAssemblyOfflineTime != ''"> and final_assembly_offline_time = #{finalAssemblyOfflineTime}</if> |
| | | <if test="cvtLaunchTime != null and cvtLaunchTime != ''"> and cvt_launch_time = #{cvtLaunchTime}</if> |
| | | <if test="cvtOfflineTime != null and cvtOfflineTime != ''"> and cvt_offline_time = #{cvtOfflineTime}</if> |
| | | |
| | | |
| | | </where> |
| | |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="remarks != null">remarks,</if> |
| | | <if test="report30 != null">report_30,</if> |
| | | <if test="boxClosingOnlineTime != null">box_closing_online_time,</if> |
| | | <if test="closingBoxOfflineTime != null">closing_box_offline_time,</if> |
| | | <if test="finalAssemblyLaunchTime != null">final_assembly_launch_time,</if> |
| | | <if test="finalAssemblyOfflineTime != null">final_assembly_offline_time,</if> |
| | | <if test="cvtLaunchTime != null">cvt_launch_time,</if> |
| | | <if test="cvtOfflineTime != null">cvt_offline_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="orderNo != null">#{orderNo},</if> |
| | |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="remarks != null">#{remarks},</if> |
| | | <if test="report30 != null">#{report30},</if> |
| | | <if test="boxClosingOnlineTime != null">#{boxClosingOnlineTime},</if> |
| | | <if test="closingBoxOfflineTime != null">#{closingBoxOfflineTime},</if> |
| | | <if test="finalAssemblyLaunchTime != null">#{finalAssemblyLaunchTime},</if> |
| | | <if test="finalAssemblyOfflineTime != null">#{finalAssemblyOfflineTime},</if> |
| | | <if test="cvtLaunchTime != null">#{cvtLaunchTime},</if> |
| | | <if test="cvtOfflineTime != null">#{cvtOfflineTime},</if> |
| | | |
| | | </trim> |
| | | </insert> |
| | |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="remarks != null">remarks = #{remarks},</if> |
| | | <if test="report30 != null">report_30 = #{report30},</if> |
| | | <if test="boxClosingOnlineTime != null">box_closing_online_time = #{boxClosingOnlineTime},</if> |
| | | <if test="closingBoxOfflineTime != null">closing_box_offline_time = #{closingBoxOfflineTime},</if> |
| | | <if test="finalAssemblyLaunchTime != null">final_assembly_launch_time = #{finalAssemblyLaunchTime},</if> |
| | | <if test="finalAssemblyOfflineTime != null">final_assembly_offline_time = #{finalAssemblyOfflineTime},</if> |
| | | <if test="cvtLaunchTime != null">cvt_launch_time = #{cvtLaunchTime},</if> |
| | | <if test="cvtOfflineTime != null">cvt_offline_time = #{cvtOfflineTime},</if> |
| | | |
| | | </trim> |
| | | where id = #{id} |
| | |
| | | <artifactId>jcdm-common</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.jcdm</groupId> |
| | | <artifactId>jcdm-main</artifactId> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | | </project> |
| | |
| | | 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; |
| | | |
| | | /** |
| | | * å®æ¶ä»»å¡è°åº¦æµè¯ |
| | |
| | | { |
| | | 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; |
| | | } |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢å·¥èºæ件 |
| | | export function getMainProductProcess(query) { |
| | | return request({ |
| | | url: '/bs/formulaChild/getMainProductProcess', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢é
æ¹é
ç½®åä¿¡æ¯è¯¦ç» |
| | | export function getFormulaChild(id) { |
| | | return request({ |
| | |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function listOrderScheduling2(query) { |
| | | return request({ |
| | | url: '/bs/orderScheduling/list2', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | // æ¥è¯¢è®¢åæäº§è¯¦ç» |
| | | export function getOrderScheduling(id) { |
| | | return request({ |
| | |
| | | <template> |
| | | <el-row :gutter="40" class="panel-group"> |
| | | <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> |
| | | <div class="top2">åæ¥ç´¯è®¡äº§é</div> |
| | | <el-col :xs="12" :sm="12" :lg="4" class="card-panel-col"> |
| | | <div class="card-panel" @click="handleSetLineChartData('newVisitis')"> |
| | | <div class="card-panel-icon-wrapper icon-people"> |
| | | <svg-icon icon-class="peoples" class-name="card-panel-icon" /> |
| | |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> |
| | | <el-col :xs="12" :sm="12" :lg="4" class="card-panel-col"> |
| | | <div class="card-panel" @click="handleSetLineChartData('messages')"> |
| | | <div class="card-panel-icon-wrapper icon-message"> |
| | | <svg-icon icon-class="message" class-name="card-panel-icon" /> |
| | |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> |
| | | <el-col :xs="12" :sm="12" :lg="4" class="card-panel-col"> |
| | | <div class="card-panel" @click="handleSetLineChartData('purchases')"> |
| | | <div class="card-panel-icon-wrapper icon-money"> |
| | | <svg-icon icon-class="money" class-name="card-panel-icon" /> |
| | |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> |
| | | <el-col :xs="12" :sm="12" :lg="4" class="card-panel-col"> |
| | | <div class="card-panel" @click="handleSetLineChartData('shoppings')"> |
| | | <div class="card-panel-icon-wrapper icon-shopping"> |
| | | <svg-icon icon-class="shopping" class-name="card-panel-icon" /> |
| | |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | |
| | | <el-col :xs="12" :sm="12" :lg="4" class="card-panel-col"> |
| | | <div class="card-panel" @click="handleSetLineChartData('shoppings')"> |
| | | <div class="card-panel-icon-wrapper icon-shopping"> |
| | | <svg-icon icon-class="shopping" class-name="card-panel-icon" /> |
| | | </div> |
| | | <div class="card-panel-description"> |
| | | <div class="card-panel-text"> |
| | | CVTä¸çº¿ |
| | | </div> |
| | | <count-to :start-val="0" :end-val="13600" :duration="3600" class="card-panel-num" /> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | |
| | | <el-col :xs="12" :sm="12" :lg="4" class="card-panel-col"> |
| | | <div class="card-panel" @click="handleSetLineChartData('shoppings')"> |
| | | <div class="card-panel-icon-wrapper icon-shopping"> |
| | | <svg-icon icon-class="shopping" class-name="card-panel-icon" /> |
| | | </div> |
| | | <div class="card-panel-description"> |
| | | <div class="card-panel-text"> |
| | | CVTä¸çº¿ |
| | | </div> |
| | | <count-to :start-val="0" :end-val="13600" :duration="3600" class="card-panel-num" /> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | |
| | | |
| | | </el-row> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .top2{ |
| | | font-size: 26px; |
| | | font-weight: bold; |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | .panel-group { |
| | | margin-top: 18px; |
| | | |
| | |
| | | </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"> |
| | |
| | | <el-table-column label="CVTæ¥å·¥" align="center" prop="report30"> |
| | | |
| | | </el-table-column> |
| | | <el-table-column label="åç®±ä¸çº¿" align="center" prop="combinedBoxTime"> |
| | | |
| | | <el-table-column label="åç®±ä¸çº¿æ¶é´" align="center" prop="boxClosingOnlineTime" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="æ»è£
ä¸çº¿" align="center" prop="finalAssemblyTime"> |
| | | |
| | | <el-table-column label="åç®±ä¸çº¿æ¶é´" align="center" prop="closingBoxOfflineTime" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="æ»è£
ä¸çº¿æ¶é´" align="center" prop="finalAssemblyLaunchTime" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="æ»è£
ä¸çº¿æ¶é´" align="center" prop="finalAssemblyOfflineTime" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="CVTä¸çº¿æ¶é´" align="center" prop="cvtLaunchTime" width="160"> |
| | | </el-table-column> |
| | | <el-table-column label="CVTä¸çº¿æ¶é´" align="center" prop="cvtOfflineTime" width="160"> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="åç®±ä¸çº¿" align="center" prop="combinedBoxTime">--> |
| | | |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column label="æ»è£
ä¸çº¿" align="center" prop="finalAssemblyTime">--> |
| | | |
| | | <!-- </el-table-column>--> |
| | | <el-table-column label="æä½äºº" align="center" prop="operator"> |
| | | |
| | | </el-table-column> |
| | |
| | | updateUser: null, |
| | | updateTime: null, |
| | | remarks: null, |
| | | report30: null |
| | | report30: null, |
| | | boxClosingOnlineTime: null, |
| | | closingBoxOfflineTime: null, |
| | | finalAssemblyLaunchTime: null, |
| | | finalAssemblyOfflineTime: null, |
| | | cvtLaunchTime: null, |
| | | cvtOfflineTime: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | |
| | | |
| | | </el-col> |
| | | </el-row> |
| | | <div> |
| | | <el-dialog |
| | | title="å·¥èºæ件" |
| | | :visible.sync="dialogVisible" |
| | | width="70%" |
| | | lock-scroll="false" |
| | | @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">ç¡® å®</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: "æªé
置工ä½", |
| | |
| | | }); |
| | | |
| | | }, |
| | | closeMethod(){ |
| | | this.mainProcessSrc = '' |
| | | }, |
| | | //è·åå½åæ¶é´ |
| | | getNowTime () { |
| | | let speed = 1000 |
| | |
| | | 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){ |
| | | |
| | |
| | | /** æ¥è¯¢é
æ¹é
ç½®åä¿¡æ¯å表 */ |
| | | 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; |
| | |
| | | .active { |
| | | background-color: #31b431; /* ç¹å»åçèæ¯è² */ |
| | | } |
| | | |
| | | ::v-deep .el-dialog { |
| | | height: 90%; |
| | | overflow-y: auto; |
| | | } |
| | | ::v-deep .el-dialog__footer{ |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | </el-form-item> |
| | | <el-form-item style="margin-left: 360px"> |
| | | <el-checkbox-group v-model="queryParams.isRepairFlag"> |
| | | <el-checkbox name="type"></el-checkbox> |
| | | <el-checkbox @change="cleanFlag" name="type"></el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | <el-form-item label-width="120" label="è¿ä¿®åå¨æºå·:" prop="engineNo" style="margin-left: 5px"> |
| | | <el-form-item label-width="120" label="è¿ä¿®åå¨æºå·:" prop="repairEngineNo" style="margin-left: 5px"> |
| | | |
| | | <el-input |
| | | :disabled="!queryParams.isRepairFlag" |
| | | v-model="queryParams.engineNo" |
| | | v-model="queryParams.repairEngineNo" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {listOrderScheduling} from "@/api/main/bs/orderScheduling/orderScheduling"; |
| | | import {listOrderScheduling2} from "@/api/main/bs/orderScheduling/orderScheduling"; |
| | | import VueQr from 'vue-qr' |
| | | export default { |
| | | name: "index", |
| | |
| | | queryParams: { |
| | | orderNo: '', |
| | | isRepairFlag: '', |
| | | engineNo: '' |
| | | repairEngineNo: '' |
| | | }, |
| | | dataList: [] |
| | | } |
| | |
| | | this.getList(); |
| | | }, |
| | | getList(){ |
| | | listOrderScheduling(this.queryParams).then(response => { |
| | | listOrderScheduling2(this.queryParams).then(response => { |
| | | console.log("--------------------"+response.rows) |
| | | this.dataList = response.rows |
| | | if (this.queryParams.orderNo === '' || this.queryParams.orderNo === null){ |
| | |
| | | filterTag(value, row) { |
| | | return row.tag === value; |
| | | }, |
| | | cleanFlag(){ |
| | | if (this.queryParams.isRepairFlag === false){ |
| | | this.queryParams.repairEngineNo = '' |
| | | } |
| | | }, |
| | | filterHandler(value, row, column) { |
| | | const property = column['property']; |
| | | return row[property] === value; |