正在显示
45 个修改的文件
包含
1226 行增加
和
116 行删除
| 1 | -#登录账号 | 1 | +#\u767B\u5F55\u8D26\u53F7 |
| 2 | loginname = KKW1 | 2 | loginname = KKW1 |
| 3 | -#登录密码 | 3 | +#\u5361\u53E3\u6570\u636E\u63A5\u6536KKW1\uFF0C\u5361\u53E3\u53D1\u9001\u6570\u636EKAKO\uFF0C\u653E\u884C\u62A5\u6587 KKFX |
| 4 | +#\u767B\u5F55\u5BC6\u7801 | ||
| 4 | loginpass = KKW1 | 5 | loginpass = KKW1 |
| 5 | -#发送报文目录,相对程序目录 | 6 | +#\u53D1\u9001\u62A5\u6587\u76EE\u5F55,\u76F8\u5BF9\u7A0B\u5E8F\u76EE\u5F55 |
| 6 | readDirectory = D:/bw/sendDirectory | 7 | readDirectory = D:/bw/sendDirectory |
| 7 | -#接收存储报文目录 | 8 | +#\u63A5\u6536\u5B58\u50A8\u62A5\u6587\u76EE\u5F55 |
| 8 | bakDirectory = D:/bw/receiveDirectory | 9 | bakDirectory = D:/bw/receiveDirectory |
| 9 | 10 | ||
| 10 | -#IMF MEAT报头配置 | 11 | +#IMF MEAT\u62A5\u5934\u914D\u7F6E |
| 11 | RCVR= | 12 | RCVR= |
| 12 | TYPE=KAKO | 13 | TYPE=KAKO |
| 13 | STYP=CARM | 14 | STYP=CARM |
| 14 | 15 | ||
| 15 | -#载重与称重的可控范围 ?% | ||
| 16 | -grossWt=15% | 16 | +#\u8F7D\u91CD\u4E0E\u79F0\u91CD\u7684\u53EF\u63A7\u8303\u56F4 ?% |
| 17 | +grossWt=5% | ||
| 17 | 18 | ||
| 18 | -#二维码存放路径,项目启动时设置,后期不能更改。 | ||
| 19 | -barCode = barcode/ | 19 | +#\u4E8C\u7EF4\u7801\u5B58\u653E\u8DEF\u5F84\uFF0C\u9879\u76EE\u542F\u52A8\u65F6\u8BBE\u7F6E\uFF0C\u540E\u671F\u4E0D\u80FD\u66F4\u6539\u3002 |
| 20 | +#barCode = barcode/ |
| @@ -403,6 +403,23 @@ | @@ -403,6 +403,23 @@ | ||
| 403 | <scope>system</scope> | 403 | <scope>system</scope> |
| 404 | <systemPath>${project.basedir}/lib/connector.jar</systemPath> | 404 | <systemPath>${project.basedir}/lib/connector.jar</systemPath> |
| 405 | </dependency> | 405 | </dependency> |
| 406 | + <dependency> | ||
| 407 | + <groupId>org.apache.httpcomponents</groupId> | ||
| 408 | + <artifactId>httpclient</artifactId> | ||
| 409 | + <version>4.5.5</version> | ||
| 410 | + </dependency> | ||
| 411 | + <dependency> | ||
| 412 | + <groupId>org.apache.httpcomponents</groupId> | ||
| 413 | + <artifactId>httpclient</artifactId> | ||
| 414 | + <version>4.5.5</version> | ||
| 415 | + </dependency> | ||
| 416 | +<!-- | ||
| 417 | + <dependency> | ||
| 418 | + <groupId>org.springframework</groupId> | ||
| 419 | + <artifactId>spring-context</artifactId> | ||
| 420 | + <version>5.2.0.M1</version> | ||
| 421 | + </dependency> | ||
| 422 | +--> | ||
| 406 | 423 | ||
| 407 | 424 | ||
| 408 | </dependencies> | 425 | </dependencies> |
src/main/java/META-INF/MANIFEST.MF
0 → 100644
| 1 | +Manifest-Version: 1.0 | ||
| 2 | +Class-Path: spring-boot-autoconfigure-2.1.0.RELEASE.jar geronimo-stax- | ||
| 3 | + api_1.0_spec-1.0.1.jar spring-boot-starter-json-2.1.0.RELEASE.jar Xml | ||
| 4 | + Schema-1.4.7.jar snakeyaml-1.23.jar log4j-to-slf4j-2.11.1.jar stax-ap | ||
| 5 | + i-1.0.1.jar com.ibm.mq.defaultconfig.jar javax.annotation-api-1.3.2.j | ||
| 6 | + ar ProcessService.jar jul-to-slf4j-1.7.25.jar druid-1.1.9.jar pagehel | ||
| 7 | + per-spring-boot-autoconfigure-1.2.3.jar spring-boot-starter-web-2.1.0 | ||
| 8 | + .RELEASE.jar logback-core-1.2.3.jar wsdl4j-1.6.2.jar com.ibm.mq.fta.j | ||
| 9 | + ar jackson-annotations-2.9.0.jar druid-spring-boot-starter-1.1.9.jar | ||
| 10 | + commons-lang-2.4.jar jboss-logging-3.3.2.Final.jar xml-apis-1.4.01.ja | ||
| 11 | + r com.ibm.mq.jms.Nojndi.jar jackson-databind-2.9.7.jar spring-boot-2. | ||
| 12 | + 1.0.RELEASE.jar hibernate-validator-6.0.13.Final.jar mybatis-spring-b | ||
| 13 | + oot-starter-1.3.2.jar mybatis-spring-boot-autoconfigure-1.3.2.jar mys | ||
| 14 | + ql-connector-java-8.0.13.jar UploadService.jar com.ibm.mq.jmqi.jar co | ||
| 15 | + m.ibm.mqjms.jar fastjson-1.2.47.jar spring-jcl-5.1.2.RELEASE.jar xmls | ||
| 16 | + ec-1.4.4.jar jackson-datatype-jdk8-2.9.7.jar apiConfig.jar sigar.jar | ||
| 17 | + com.ibm.mq.axis2.jar spring-aop-5.1.2.RELEASE.jar spring-webmvc-5.1.2 | ||
| 18 | + .RELEASE.jar log4j-1.2.17.jar CL3Export.jar mybatis-spring-1.3.2.jar | ||
| 19 | + geronimo-javamail_1.4_spec-1.2.jar mybatis-3.4.6.jar log4j-api-2.11.1 | ||
| 20 | + .jar commons-codec-1.11.jar spring-tx-5.1.2.RELEASE.jar com.ibm.mq.so | ||
| 21 | + ap.jar com.ibm.mqetclient.jar jackson-core-2.9.7.jar com.ibm.mq.postc | ||
| 22 | + ard.jar spring-core-5.1.2.RELEASE.jar xmlpull-1.1.3.1.jar xpp3_min-1. | ||
| 23 | + 1.4c.jar geronimo-activation_1.1_spec-1.0.1.jar HikariCP-3.2.0.jar sp | ||
| 24 | + ring-boot-starter-2.1.0.RELEASE.jar xmlbeans-2.4.0.jar cxf-2.3.2.jar | ||
| 25 | + spring-boot-starter-logging-2.1.0.RELEASE.jar logback-classic-1.2.3.j | ||
| 26 | + ar jsqlparser-1.0.jar axiom-api-1.2.7.jar com.ibm.mq.pcf.jar jackson- | ||
| 27 | + module-parameter-names-2.9.7.jar cxf-xjc-bug671-2.3.2.jar validation- | ||
| 28 | + api-2.0.1.Final.jar IMFClient.1.0.0.jar httpcore-4.4.10.jar Heartbeat | ||
| 29 | + Service.jar slf4j-api-1.7.25.jar axiom-impl-1.2.7.jar xstream-1.4.10. | ||
| 30 | + jar commons-logging-1.1.1.jar neethi-2.0.4.jar pagehelper-spring-boot | ||
| 31 | + -starter-1.2.3.jar com.ibm.mq.headers.jar com.ibm.mq.jar core-3.3.0.j | ||
| 32 | + ar spring-jdbc-5.1.2.RELEASE.jar httpclient-4.5.5.jar mybatis-generat | ||
| 33 | + or-core-1.3.6.jar spring-beans-5.1.2.RELEASE.jar CL3Nonexport.jar dom | ||
| 34 | + 4j-2.1.0.jar jaxen-1.1.6.jar imfmsg.jar com.ibm.mq.tools.ras.jar clas | ||
| 35 | + smate-1.4.0.jar wstx-asl-3.2.4.jar returnXml.jar cxf-xjc-boolean-3.2. | ||
| 36 | + 3.jar spring-expression-5.1.2.RELEASE.jar cxf-xjc-dv-2.3.2.jar pagehe | ||
| 37 | + lper-5.1.2.jar cxf-manifest.jar com.ibm.mq.commonservices.jar cxf-xjc | ||
| 38 | + -ts-2.3.2.jar spring-context-5.1.2.RELEASE.jar jackson-datatype-jsr31 | ||
| 39 | + 0-2.9.7.jar spring-web-5.1.2.RELEASE.jar spring-boot-starter-jdbc-2.1 | ||
| 40 | + .0.RELEASE.jar commons-io-2.5.jar connector.jar | ||
| 41 | +Main-Class: com.sy.AnalysisImfApplication | ||
| 42 | + |
| @@ -34,21 +34,19 @@ public class IMF_Tesk { | @@ -34,21 +34,19 @@ public class IMF_Tesk { | ||
| 34 | logger.info("*********KAKO读取线程已开启-不再启动线程*********"); | 34 | logger.info("*********KAKO读取线程已开启-不再启动线程*********"); |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | - if(!KAKO_Sender.isrunning){ | 37 | + /* if(!KAKO_Sender.isrunning){ |
| 38 | KAKO_Sender kako_sender = new KAKO_Sender(client); | 38 | KAKO_Sender kako_sender = new KAKO_Sender(client); |
| 39 | kako_sender.start(); | 39 | kako_sender.start(); |
| 40 | logger.info("<<<<<<<<<KAKO发送线程已开启>>>>>>>>>>>>"); | 40 | logger.info("<<<<<<<<<KAKO发送线程已开启>>>>>>>>>>>>"); |
| 41 | }else { | 41 | }else { |
| 42 | logger.info("<<<<<<<<<KAKO发送线程已开启-不再启动线程>>>>>>>>>>>>"); | 42 | logger.info("<<<<<<<<<KAKO发送线程已开启-不再启动线程>>>>>>>>>>>>"); |
| 43 | - } | 43 | + }*/ |
| 44 | 44 | ||
| 45 | } | 45 | } |
| 46 | if (!LOGIN_OK){ | 46 | if (!LOGIN_OK){ |
| 47 | loginIMF(client, loginname, loginpass, "config/imf_config.properties"); | 47 | loginIMF(client, loginname, loginpass, "config/imf_config.properties"); |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | - | ||
| 51 | - | ||
| 52 | } | 50 | } |
| 53 | 51 | ||
| 54 | private static void loginIMF(IMFClient client, String userName, String password, String confFileName) { | 52 | private static void loginIMF(IMFClient client, String userName, String password, String confFileName) { |
| @@ -21,7 +21,7 @@ public class KAKO_Reader extends Thread{ | @@ -21,7 +21,7 @@ public class KAKO_Reader extends Thread{ | ||
| 21 | if (IMF_Tesk.LOGIN_OK) synchronized (this) { | 21 | if (IMF_Tesk.LOGIN_OK) synchronized (this) { |
| 22 | String message = this.client.getMSG(); | 22 | String message = this.client.getMSG(); |
| 23 | if (message != null) { | 23 | if (message != null) { |
| 24 | - logger.info(message); | 24 | + // logger.info(message); |
| 25 | AnalysisRoute.analysis(message); | 25 | AnalysisRoute.analysis(message); |
| 26 | } | 26 | } |
| 27 | } | 27 | } |
| @@ -31,7 +31,7 @@ public class KAKO_Sender extends Thread{ | @@ -31,7 +31,7 @@ public class KAKO_Sender extends Thread{ | ||
| 31 | String TYPE = FileTool.readProperties("TYPE"); | 31 | String TYPE = FileTool.readProperties("TYPE"); |
| 32 | String STYP = FileTool.readProperties("STYP"); | 32 | String STYP = FileTool.readProperties("STYP"); |
| 33 | String RCVR = FileTool.readProperties("RCVR"); | 33 | String RCVR = FileTool.readProperties("RCVR"); |
| 34 | - String DDTM = DateTimeConverter.getFormat(); | 34 | + String DDTM = DateTimeConverter.dateFormat(); |
| 35 | String SEQN = DDTM; | 35 | String SEQN = DDTM; |
| 36 | 36 | ||
| 37 | if (this.client == null) { | 37 | if (this.client == null) { |
| @@ -5,6 +5,7 @@ import com.sy.logic.LogicOperation; | @@ -5,6 +5,7 @@ import com.sy.logic.LogicOperation; | ||
| 5 | import com.sy.model.*; | 5 | import com.sy.model.*; |
| 6 | import com.sy.service.*; | 6 | import com.sy.service.*; |
| 7 | import org.apache.log4j.Logger; | 7 | import org.apache.log4j.Logger; |
| 8 | +import org.apache.log4j.PropertyConfigurator; | ||
| 8 | import org.springframework.beans.factory.annotation.Autowired; | 9 | import org.springframework.beans.factory.annotation.Autowired; |
| 9 | import org.springframework.stereotype.Component; | 10 | import org.springframework.stereotype.Component; |
| 10 | 11 | ||
| @@ -36,6 +37,9 @@ public class AnalysisRoute { | @@ -36,6 +37,9 @@ public class AnalysisRoute { | ||
| 36 | @Autowired | 37 | @Autowired |
| 37 | private LandBusListService listService; | 38 | private LandBusListService listService; |
| 38 | 39 | ||
| 40 | + @Autowired | ||
| 41 | + private ResMessageService resMessageService; | ||
| 42 | + | ||
| 39 | protected static final Logger logger = Logger.getLogger(AnalysisRoute.class); | 43 | protected static final Logger logger = Logger.getLogger(AnalysisRoute.class); |
| 40 | 44 | ||
| 41 | private static AnalysisRoute route; | 45 | private static AnalysisRoute route; |
| @@ -47,6 +51,7 @@ public class AnalysisRoute { | @@ -47,6 +51,7 @@ public class AnalysisRoute { | ||
| 47 | private static GATAnaluysis gatAnaluysis = new GATAnaluysis(); | 51 | private static GATAnaluysis gatAnaluysis = new GATAnaluysis(); |
| 48 | private static GatherInfoAnalysis gatherInfoAnalysis = new GatherInfoAnalysis(); | 52 | private static GatherInfoAnalysis gatherInfoAnalysis = new GatherInfoAnalysis(); |
| 49 | private static CommandInfoAnalysis commandInfoAnalysis = new CommandInfoAnalysis(); | 53 | private static CommandInfoAnalysis commandInfoAnalysis = new CommandInfoAnalysis(); |
| 54 | + private static ResMessageAnalysis resMessageAnalysis = new ResMessageAnalysis(); | ||
| 50 | 55 | ||
| 51 | @PostConstruct | 56 | @PostConstruct |
| 52 | public void init(){ | 57 | public void init(){ |
| @@ -58,10 +63,13 @@ public class AnalysisRoute { | @@ -58,10 +63,13 @@ public class AnalysisRoute { | ||
| 58 | route.infoService = this.infoService; | 63 | route.infoService = this.infoService; |
| 59 | route.commandService = this.commandService; | 64 | route.commandService = this.commandService; |
| 60 | route.listService = this.listService; | 65 | route.listService = this.listService; |
| 66 | + route.resMessageService = this.resMessageService; | ||
| 61 | } | 67 | } |
| 62 | 68 | ||
| 63 | public static void analysis(String string) { | 69 | public static void analysis(String string) { |
| 64 | - Message message = analysis.readTicketsXml(string); | 70 | + PropertyConfigurator.configure("config/log4j.properties"); |
| 71 | + string = string.replace("Msg","MSG"); | ||
| 72 | + Message message = analysis.readTicketsXml(string);; | ||
| 65 | String stype = message.getMeta().getSmType(); | 73 | String stype = message.getMeta().getSmType(); |
| 66 | if (stype.equals("CARM")) { | 74 | if (stype.equals("CARM")) { |
| 67 | if(message.getComInfo() !=null){ | 75 | if(message.getComInfo() !=null){ |
| @@ -69,8 +77,25 @@ public class AnalysisRoute { | @@ -69,8 +77,25 @@ public class AnalysisRoute { | ||
| 69 | route.commandService.save(info); | 77 | route.commandService.save(info); |
| 70 | }else{ | 78 | }else{ |
| 71 | GatherInfo info = gatherInfoAnalysis.toJavaBean(message); | 79 | GatherInfo info = gatherInfoAnalysis.toJavaBean(message); |
| 72 | - if(LogicOperation.operation(info)){ | ||
| 73 | - logger.info("进出站业务申请成功"); | 80 | + if(info.getBarcode().length()>0){ |
| 81 | + if(LogicOperation.operation(info)){ | ||
| 82 | + String type = null; | ||
| 83 | + if("I".equals(info.getIetype())){ | ||
| 84 | + type="进入"; | ||
| 85 | + }else{ | ||
| 86 | + type="离开"; | ||
| 87 | + } | ||
| 88 | + logger.info("进出站业务申请成功"); | ||
| 89 | + logger.info("------->>>>>>>"+info.getVename()+"已"+type+info.getAreaid()+"场站<<<<<<<-----"); | ||
| 90 | + } | ||
| 91 | + }else{ | ||
| 92 | + if("4604000000".equals(info.getAreaid())){ | ||
| 93 | + if("I".equals(info.getIetype())){ | ||
| 94 | + LogicOperation.sendData("HK05",info.getVename(),false); | ||
| 95 | + }else{ | ||
| 96 | + LogicOperation.sendData("HK06",info.getVename(),false); | ||
| 97 | + } | ||
| 98 | + } | ||
| 74 | } | 99 | } |
| 75 | route.infoService.save(info); | 100 | route.infoService.save(info); |
| 76 | } | 101 | } |
| @@ -92,6 +117,14 @@ public class AnalysisRoute { | @@ -92,6 +117,14 @@ public class AnalysisRoute { | ||
| 92 | } | 117 | } |
| 93 | port_manifest_head_stat portStat = gatAnaluysis.toPortStat(message); | 118 | port_manifest_head_stat portStat = gatAnaluysis.toPortStat(message); |
| 94 | route.gatService.savePortStat(portStat); | 119 | route.gatService.savePortStat(portStat); |
| 120 | + } else if(stype.equals("CDHZ")){ | ||
| 121 | + if("MT9999".equals(message.getManifest().getHead().getMessageType())){ | ||
| 122 | + RESMESSAGE resmessage = resMessageAnalysis.saveEntry(message.getManifest()); | ||
| 123 | + RESMESSAGE msg =route.resMessageService.selectByManifest(resmessage.getManifest()); | ||
| 124 | + if(msg==null){ | ||
| 125 | + route.resMessageService.saveEnter(resmessage); | ||
| 126 | + } | ||
| 127 | + } | ||
| 95 | } | 128 | } |
| 96 | } | 129 | } |
| 97 | 130 |
| 1 | package com.sy.bwAnalysis; | 1 | package com.sy.bwAnalysis; |
| 2 | 2 | ||
| 3 | -import com.sy.bwAssist.CommandInfo; | 3 | +import com.sy.bwAssist.commandInfo.CommandInfo; |
| 4 | import com.sy.bwAssist.Message; | 4 | import com.sy.bwAssist.Message; |
| 5 | import com.sy.bwAssist.Meta; | 5 | import com.sy.bwAssist.Meta; |
| 6 | import com.sy.model.commandInfo; | 6 | import com.sy.model.commandInfo; |
| 1 | package com.sy.bwAnalysis; | 1 | package com.sy.bwAnalysis; |
| 2 | 2 | ||
| 3 | -import com.sy.bwAssist.GatherInfoAssist; | 3 | +import com.sy.bwAssist.gatherInfo.GatherInfoAssist; |
| 4 | import com.sy.bwAssist.Message; | 4 | import com.sy.bwAssist.Message; |
| 5 | import com.sy.bwAssist.Meta; | 5 | import com.sy.bwAssist.Meta; |
| 6 | import com.sy.model.GatherInfo; | 6 | import com.sy.model.GatherInfo; |
| @@ -7,7 +7,7 @@ import com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder; | @@ -7,7 +7,7 @@ import com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder; | ||
| 7 | 7 | ||
| 8 | public class MessageAnalysis { | 8 | public class MessageAnalysis { |
| 9 | 9 | ||
| 10 | - public static Message msg = null; | 10 | + public static Message message = null; |
| 11 | 11 | ||
| 12 | public Message readTicketsXml(String str) { | 12 | public Message readTicketsXml(String str) { |
| 13 | return getMessage(str); | 13 | return getMessage(str); |
| @@ -16,10 +16,30 @@ public class MessageAnalysis { | @@ -16,10 +16,30 @@ public class MessageAnalysis { | ||
| 16 | static Message getMessage(String str) { | 16 | static Message getMessage(String str) { |
| 17 | XStream xstream = new XStream(new DomDriver("UTF-8", new XmlFriendlyNameCoder("_-", "_"))); | 17 | XStream xstream = new XStream(new DomDriver("UTF-8", new XmlFriendlyNameCoder("_-", "_"))); |
| 18 | xstream.processAnnotations(Message.class); | 18 | xstream.processAnnotations(Message.class); |
| 19 | - msg = (Message) xstream.fromXML(str); | ||
| 20 | - System.out.println("解析后的Message对象" + msg); | ||
| 21 | - return msg; | 19 | + //对xstream对象设置默认的安全防护 |
| 20 | + XStream.setupDefaultSecurity(xstream); | ||
| 21 | + //对xstream对象设置默认的安全防护时,允许设置类 | ||
| 22 | + xstream.allowTypes(new Class[]{Message.class}); | ||
| 23 | + message = (Message) xstream.fromXML(str); | ||
| 24 | + return message; | ||
| 22 | } | 25 | } |
| 23 | 26 | ||
| 24 | 27 | ||
| 28 | +/* public static void main(String[] args) { | ||
| 29 | + Message msg = new MessageAnalysis().readTicketsXml("<MSG> \n" + | ||
| 30 | + " <META> \n" + | ||
| 31 | + " <SNDR>NXCD</SNDR> \n" + | ||
| 32 | + " <RCVR/> \n" + | ||
| 33 | + " <SEQN>20190423105931</SEQN> \n" + | ||
| 34 | + " <DDTM>20190423105931</DDTM> \n" + | ||
| 35 | + " <TYPE>CUST</TYPE> \n" + | ||
| 36 | + " <STYP>CDHZ</STYP> \n" + | ||
| 37 | + " </META> \n" + | ||
| 38 | + " <Manifest><Head><MessageID>CN_MT5202_1P0_460470678920X_20190423105611544</MessageID><FunctionCode>2</FunctionCode><MessageType>MT5202</MessageType><SenderID>EPORT</SenderID><ReceiverID>460470678920X_DXPENT0000019806</ReceiverID><SendTime>20190423105647834</SendTime><Version>1.0</Version></Head><Response><BorderTransportMeans><JourneyID>7L062/20190420</JourneyID><ID>7L062</ID></BorderTransportMeans><Consignment><TransportContractDocument><ID>50106370991</ID></TransportContractDocument><ResponseType><Code>01</Code><Text>35301 理货报告传输成功。比对结果为:理货正常。</Text></ResponseType></Consignment></Response></Manifest>\n" + | ||
| 39 | + " </MSG>"); | ||
| 40 | + RESMESSAGE resmessage = new ResMessageAnalysis().saveEntry(msg.getManifest()); | ||
| 41 | + System.out.println(resmessage); | ||
| 42 | + }*/ | ||
| 43 | + | ||
| 44 | + | ||
| 25 | } | 45 | } |
| 1 | +package com.sy.bwAnalysis; | ||
| 2 | + | ||
| 3 | +import com.sy.bwAssist.ResMessage.Manifest; | ||
| 4 | +import com.sy.model.RESMESSAGE; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * @author | ||
| 8 | + * @time 2019-${MOUTH}-22 21:28 | ||
| 9 | + */ | ||
| 10 | +public class ResMessageAnalysis { | ||
| 11 | + | ||
| 12 | + public RESMESSAGE saveEntry(Manifest manifest){ | ||
| 13 | + RESMESSAGE resmessage = new RESMESSAGE(); | ||
| 14 | + resmessage.setId(String.valueOf(System.currentTimeMillis())); | ||
| 15 | + resmessage.setJourneyid(manifest.getResponse().getBorderTransportMeans().getJourneyID()); | ||
| 16 | + resmessage.setManifest(manifest.getResponse().getConsignment().getTransportContractDocument().getId()); | ||
| 17 | + resmessage.setResponsecode(manifest.getResponse().getConsignment().getResponseType().getCode()); | ||
| 18 | + resmessage.setResponsetext(manifest.getResponse().getConsignment().getResponseType().getText()); | ||
| 19 | + return resmessage; | ||
| 20 | + } | ||
| 21 | +} |
| 1 | package com.sy.bwAssist; | 1 | package com.sy.bwAssist; |
| 2 | 2 | ||
| 3 | +import com.sy.bwAssist.ResMessage.Manifest; | ||
| 4 | +import com.sy.bwAssist.commandInfo.CommandInfo; | ||
| 5 | +import com.sy.bwAssist.gatherInfo.GatherInfoAssist; | ||
| 3 | import com.thoughtworks.xstream.annotations.XStreamAlias; | 6 | import com.thoughtworks.xstream.annotations.XStreamAlias; |
| 4 | import org.springframework.stereotype.Component; | 7 | import org.springframework.stereotype.Component; |
| 5 | 8 | ||
| @@ -19,6 +22,10 @@ public class Message { | @@ -19,6 +22,10 @@ public class Message { | ||
| 19 | @XStreamAlias("DTC_Message") | 22 | @XStreamAlias("DTC_Message") |
| 20 | private DTC_Message message; | 23 | private DTC_Message message; |
| 21 | 24 | ||
| 25 | + @XStreamAlias("Manifest") | ||
| 26 | + private Manifest manifest; | ||
| 27 | + | ||
| 28 | + | ||
| 22 | public DTC_Message getMessage() { | 29 | public DTC_Message getMessage() { |
| 23 | return message; | 30 | return message; |
| 24 | } | 31 | } |
| @@ -50,6 +57,16 @@ public class Message { | @@ -50,6 +57,16 @@ public class Message { | ||
| 50 | public void setComInfo(CommandInfo comInfo) { | 57 | public void setComInfo(CommandInfo comInfo) { |
| 51 | ComInfo = comInfo; | 58 | ComInfo = comInfo; |
| 52 | } | 59 | } |
| 60 | + | ||
| 61 | + public Manifest getManifest() { | ||
| 62 | + return manifest; | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + public void setManifest(Manifest manifest) { | ||
| 66 | + this.manifest = manifest; | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + | ||
| 53 | } | 70 | } |
| 54 | 71 | ||
| 55 | 72 |
| 1 | +package com.sy.bwAssist.ResMessage; | ||
| 2 | + | ||
| 3 | +import com.thoughtworks.xstream.annotations.XStreamAlias; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @author | ||
| 7 | + * @time 2019-${MOUTH}-23 10:55 | ||
| 8 | + */ | ||
| 9 | +public class AssociatedTransportDocument { | ||
| 10 | + | ||
| 11 | + @XStreamAlias("ID") | ||
| 12 | + private String ID; | ||
| 13 | + | ||
| 14 | + public String getID() { | ||
| 15 | + return ID; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setID(String ID) { | ||
| 19 | + this.ID = ID; | ||
| 20 | + } | ||
| 21 | +} |
| 1 | +package com.sy.bwAssist.ResMessage; | ||
| 2 | + | ||
| 3 | +import com.thoughtworks.xstream.annotations.XStreamAlias; | ||
| 4 | +import com.thoughtworks.xstream.annotations.XStreamOmitField; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * @author | ||
| 9 | + * @time 2019-${MOUTH}-22 19:27 | ||
| 10 | + */ | ||
| 11 | +@Component | ||
| 12 | +public class BorderTransportMeans { | ||
| 13 | + | ||
| 14 | + @XStreamAlias("JourneyID") | ||
| 15 | + private String JourneyID; | ||
| 16 | + | ||
| 17 | + @XStreamAlias("ID") | ||
| 18 | + @XStreamOmitField | ||
| 19 | + private String id; | ||
| 20 | + | ||
| 21 | + public String getJourneyID() { | ||
| 22 | + return JourneyID; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + public void setJourneyID(String journeyID) { | ||
| 26 | + JourneyID = journeyID; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + public String getId() { | ||
| 30 | + return id; | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + public void setId(String id) { | ||
| 34 | + this.id = id; | ||
| 35 | + } | ||
| 36 | +} |
| 1 | +package com.sy.bwAssist.ResMessage; | ||
| 2 | + | ||
| 3 | +import com.thoughtworks.xstream.annotations.XStreamAlias; | ||
| 4 | +import com.thoughtworks.xstream.annotations.XStreamOmitField; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * @author | ||
| 9 | + * @time 2019-${MOUTH}-22 19:27 | ||
| 10 | + */ | ||
| 11 | +@Component | ||
| 12 | +public class Consignment { | ||
| 13 | + | ||
| 14 | + @XStreamAlias("ResponseType") | ||
| 15 | + private ResponseType responseType; | ||
| 16 | + | ||
| 17 | + @XStreamAlias("TransportContractDocument") | ||
| 18 | + private TransportContractDocument transportContractDocument; | ||
| 19 | + | ||
| 20 | + @XStreamOmitField | ||
| 21 | + @XStreamAlias("AssociatedTransportDocument") | ||
| 22 | + private AssociatedTransportDocument associatedTransportDocument; | ||
| 23 | + | ||
| 24 | + public ResponseType getResponseType() { | ||
| 25 | + return responseType; | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + public void setResponseType(ResponseType responseType) { | ||
| 29 | + this.responseType = responseType; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + public TransportContractDocument getTransportContractDocument() { | ||
| 33 | + return transportContractDocument; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + public void setTransportContractDocument(TransportContractDocument transportContractDocument) { | ||
| 37 | + this.transportContractDocument = transportContractDocument; | ||
| 38 | + } | ||
| 39 | +} |
| 1 | +package com.sy.bwAssist.ResMessage; | ||
| 2 | + | ||
| 3 | +import com.sy.utils.DateTimeConverter; | ||
| 4 | +import com.thoughtworks.xstream.annotations.XStreamAlias; | ||
| 5 | +import com.thoughtworks.xstream.annotations.XStreamConverter; | ||
| 6 | + | ||
| 7 | +import java.util.Date; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @author | ||
| 11 | + * @time 2019-${MOUTH}-22 19:22 | ||
| 12 | + */ | ||
| 13 | +public class Head { | ||
| 14 | + | ||
| 15 | + @XStreamAlias("MessageID") | ||
| 16 | + private String MessageID; | ||
| 17 | + | ||
| 18 | + @XStreamAlias("FunctionCode") | ||
| 19 | + private String FunctionCode; | ||
| 20 | + | ||
| 21 | + @XStreamAlias("MessageType") | ||
| 22 | + private String MessageType; | ||
| 23 | + | ||
| 24 | + @XStreamAlias("SenderID") | ||
| 25 | + private String SenderID; | ||
| 26 | + | ||
| 27 | + @XStreamAlias("ReceiverID") | ||
| 28 | + private String ReceiverID; | ||
| 29 | + | ||
| 30 | + @XStreamAlias("SendTime") | ||
| 31 | + @XStreamConverter(value=DateTimeConverter.class) | ||
| 32 | + private Date SendTime; | ||
| 33 | + | ||
| 34 | + @XStreamAlias("Version") | ||
| 35 | + private String Version; | ||
| 36 | + | ||
| 37 | + public String getMessageID() { | ||
| 38 | + return MessageID; | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + public void setMessageID(String messageID) { | ||
| 42 | + MessageID = messageID; | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + public String getFunctionCode() { | ||
| 46 | + return FunctionCode; | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + public void setFunctionCode(String functionCode) { | ||
| 50 | + FunctionCode = functionCode; | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + public String getMessageType() { | ||
| 54 | + return MessageType; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + public void setMessageType(String messageType) { | ||
| 58 | + MessageType = messageType; | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + public String getSenderID() { | ||
| 62 | + return SenderID; | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + public void setSenderID(String senderID) { | ||
| 66 | + SenderID = senderID; | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + public String getReceiverID() { | ||
| 70 | + return ReceiverID; | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + public void setReceiverID(String receiverID) { | ||
| 74 | + ReceiverID = receiverID; | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + public Date getSendTime() { | ||
| 78 | + return SendTime; | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | + public void setSendTime(Date sendTime) { | ||
| 82 | + SendTime = sendTime; | ||
| 83 | + } | ||
| 84 | + | ||
| 85 | + public String getVersion() { | ||
| 86 | + return Version; | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + public void setVersion(String version) { | ||
| 90 | + Version = version; | ||
| 91 | + } | ||
| 92 | +} |
| 1 | +package com.sy.bwAssist.ResMessage; | ||
| 2 | + | ||
| 3 | +import com.thoughtworks.xstream.annotations.XStreamAlias; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @author | ||
| 7 | + * @time 2019-${MOUTH}-22 19:21 | ||
| 8 | + */ | ||
| 9 | +public class Manifest { | ||
| 10 | + | ||
| 11 | + @XStreamAlias("Head") | ||
| 12 | + private Head head; | ||
| 13 | + | ||
| 14 | + @XStreamAlias("Response") | ||
| 15 | + private Response response; | ||
| 16 | + | ||
| 17 | + public Head getHead() { | ||
| 18 | + return head; | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + public void setHead(Head head) { | ||
| 22 | + this.head = head; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + public Response getResponse() { | ||
| 26 | + return response; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + public void setResponse(Response response) { | ||
| 30 | + this.response = response; | ||
| 31 | + } | ||
| 32 | +} |
| 1 | +package com.sy.bwAssist.ResMessage; | ||
| 2 | + | ||
| 3 | +import com.thoughtworks.xstream.annotations.XStreamAlias; | ||
| 4 | +import org.springframework.stereotype.Component; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * @author | ||
| 8 | + * @time 2019-${MOUTH}-22 19:22 | ||
| 9 | + */ | ||
| 10 | +@Component | ||
| 11 | +public class Response { | ||
| 12 | + | ||
| 13 | + @XStreamAlias("BorderTransportMeans") | ||
| 14 | + private BorderTransportMeans borderTransportMeans; | ||
| 15 | + | ||
| 16 | + @XStreamAlias("Consignment") | ||
| 17 | + private Consignment consignment; | ||
| 18 | + | ||
| 19 | + public BorderTransportMeans getBorderTransportMeans() { | ||
| 20 | + return borderTransportMeans; | ||
| 21 | + } | ||
| 22 | + | ||
| 23 | + public void setBorderTransportMeans(BorderTransportMeans borderTransportMeans) { | ||
| 24 | + this.borderTransportMeans = borderTransportMeans; | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + public Consignment getConsignment() { | ||
| 28 | + return consignment; | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + public void setConsignment(Consignment consignment) { | ||
| 32 | + this.consignment = consignment; | ||
| 33 | + } | ||
| 34 | +} |
| 1 | +package com.sy.bwAssist.ResMessage; | ||
| 2 | + | ||
| 3 | +import com.thoughtworks.xstream.annotations.XStreamAlias; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @author | ||
| 7 | + * @time 2019-${MOUTH}-22 19:29 | ||
| 8 | + */ | ||
| 9 | +public class ResponseType { | ||
| 10 | + | ||
| 11 | + @XStreamAlias("Code") | ||
| 12 | + private String code; | ||
| 13 | + | ||
| 14 | + @XStreamAlias("Text") | ||
| 15 | + private String text; | ||
| 16 | + | ||
| 17 | + public String getCode() { | ||
| 18 | + return code; | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + public void setCode(String code) { | ||
| 22 | + this.code = code; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + public String getText() { | ||
| 26 | + return text; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + public void setText(String text) { | ||
| 30 | + this.text = text; | ||
| 31 | + } | ||
| 32 | +} |
| 1 | +package com.sy.bwAssist.ResMessage; | ||
| 2 | + | ||
| 3 | +import com.thoughtworks.xstream.annotations.XStreamAlias; | ||
| 4 | +import org.springframework.stereotype.Component; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * @author | ||
| 8 | + * @time 2019-${MOUTH}-22 19:29 | ||
| 9 | + */ | ||
| 10 | +@Component | ||
| 11 | +public class TransportContractDocument { | ||
| 12 | + | ||
| 13 | + @XStreamAlias("ID") | ||
| 14 | + private String id; | ||
| 15 | + | ||
| 16 | + public String getId() { | ||
| 17 | + return id; | ||
| 18 | + } | ||
| 19 | + | ||
| 20 | + public void setId(String id) { | ||
| 21 | + this.id = id; | ||
| 22 | + } | ||
| 23 | +} |
| 1 | -package com.sy.bwAssist; | 1 | +package com.sy.bwAssist.commandInfo; |
| 2 | 2 | ||
| 3 | +import com.sy.bwAssist.gatherInfo.Seal; | ||
| 3 | import com.thoughtworks.xstream.annotations.XStreamAlias; | 4 | import com.thoughtworks.xstream.annotations.XStreamAlias; |
| 4 | import com.thoughtworks.xstream.annotations.XStreamAsAttribute; | 5 | import com.thoughtworks.xstream.annotations.XStreamAsAttribute; |
| 5 | import org.springframework.stereotype.Component; | 6 | import org.springframework.stereotype.Component; |
| 1 | -package com.sy.bwAssist; | 1 | +package com.sy.bwAssist.commandInfo; |
| 2 | 2 | ||
| 3 | import com.thoughtworks.xstream.annotations.XStreamAlias; | 3 | import com.thoughtworks.xstream.annotations.XStreamAlias; |
| 4 | 4 | ||
| 5 | /** | 5 | /** |
| 6 | * @author zhangfan | 6 | * @author zhangfan |
| 7 | * @web www.sy.com | 7 | * @web www.sy.com |
| 8 | - * @company 郑州商友科技有限公司 | 8 | + * @company |
| 9 | * @time 2018-12-27 16:10 | 9 | * @time 2018-12-27 16:10 |
| 10 | */ | 10 | */ |
| 11 | public class GPS { | 11 | public class GPS { |
| 1 | -package com.sy.bwAssist; | 1 | +package com.sy.bwAssist.gatherInfo; |
| 2 | 2 | ||
| 3 | import com.thoughtworks.xstream.annotations.XStreamAlias; | 3 | import com.thoughtworks.xstream.annotations.XStreamAlias; |
| 4 | import com.thoughtworks.xstream.annotations.XStreamAsAttribute; | 4 | import com.thoughtworks.xstream.annotations.XStreamAsAttribute; |
| @@ -7,11 +7,20 @@ import com.sy.crossDomain.buildBarCode; | @@ -7,11 +7,20 @@ import com.sy.crossDomain.buildBarCode; | ||
| 7 | import com.sy.model.GatherInfo; | 7 | import com.sy.model.GatherInfo; |
| 8 | import com.sy.model.LandBusinessTypeList; | 8 | import com.sy.model.LandBusinessTypeList; |
| 9 | import com.sy.model.LandRoadVe; | 9 | import com.sy.model.LandRoadVe; |
| 10 | +import com.sy.model.RESMESSAGE; | ||
| 10 | import com.sy.service.LandBusListService; | 11 | import com.sy.service.LandBusListService; |
| 11 | import com.sy.service.LandRoadVeService; | 12 | import com.sy.service.LandRoadVeService; |
| 13 | +import com.sy.service.ResMessageService; | ||
| 12 | import com.sy.socket.CommandClient; | 14 | import com.sy.socket.CommandClient; |
| 13 | import com.sy.utils.FileTool; | 15 | import com.sy.utils.FileTool; |
| 16 | +import org.apache.http.HttpEntity; | ||
| 17 | +import org.apache.http.HttpResponse; | ||
| 18 | +import org.apache.http.client.HttpClient; | ||
| 19 | +import org.apache.http.client.methods.HttpGet; | ||
| 20 | +import org.apache.http.impl.client.DefaultHttpClient; | ||
| 21 | +import org.apache.http.util.EntityUtils; | ||
| 14 | import org.apache.log4j.Logger; | 22 | import org.apache.log4j.Logger; |
| 23 | +import org.apache.log4j.PropertyConfigurator; | ||
| 15 | import org.springframework.beans.factory.annotation.Autowired; | 24 | import org.springframework.beans.factory.annotation.Autowired; |
| 16 | import org.springframework.stereotype.Component; | 25 | import org.springframework.stereotype.Component; |
| 17 | 26 | ||
| @@ -19,13 +28,13 @@ import javax.annotation.PostConstruct; | @@ -19,13 +28,13 @@ import javax.annotation.PostConstruct; | ||
| 19 | import java.io.BufferedReader; | 28 | import java.io.BufferedReader; |
| 20 | import java.io.IOException; | 29 | import java.io.IOException; |
| 21 | import java.io.InputStreamReader; | 30 | import java.io.InputStreamReader; |
| 22 | -import java.math.BigDecimal; | ||
| 23 | import java.net.MalformedURLException; | 31 | import java.net.MalformedURLException; |
| 24 | import java.net.URL; | 32 | import java.net.URL; |
| 25 | import java.net.URLConnection; | 33 | import java.net.URLConnection; |
| 26 | import java.text.DecimalFormat; | 34 | import java.text.DecimalFormat; |
| 27 | import java.text.NumberFormat; | 35 | import java.text.NumberFormat; |
| 28 | import java.text.ParseException; | 36 | import java.text.ParseException; |
| 37 | +import java.util.Date; | ||
| 29 | import java.util.List; | 38 | import java.util.List; |
| 30 | import java.util.Map; | 39 | import java.util.Map; |
| 31 | 40 | ||
| @@ -40,6 +49,9 @@ public class LogicOperation { | @@ -40,6 +49,9 @@ public class LogicOperation { | ||
| 40 | @Autowired | 49 | @Autowired |
| 41 | private LandRoadVeService veService; | 50 | private LandRoadVeService veService; |
| 42 | 51 | ||
| 52 | + @Autowired | ||
| 53 | + private ResMessageService resMessageService; | ||
| 54 | + | ||
| 43 | private static LogicOperation logic; | 55 | private static LogicOperation logic; |
| 44 | 56 | ||
| 45 | //读取配置文件里的载重与称重的可控范围 | 57 | //读取配置文件里的载重与称重的可控范围 |
| @@ -48,16 +60,19 @@ public class LogicOperation { | @@ -48,16 +60,19 @@ public class LogicOperation { | ||
| 48 | //逻辑判断后的结果定义 | 60 | //逻辑判断后的结果定义 |
| 49 | private static String PERMITTHOUGH = "直接放行"; | 61 | private static String PERMITTHOUGH = "直接放行"; |
| 50 | private static String GROWSSEXCETION = "禁止通行,重量不在可控范围"; | 62 | private static String GROWSSEXCETION = "禁止通行,重量不在可控范围"; |
| 51 | - private static String NORECORD = "车辆未备案"; | 63 | + private static String NORECORD = "车辆未备案或者识别错误,车牌号:"; |
| 52 | private static String INPUTSTATION = "此车辆未做进站申请"; | 64 | private static String INPUTSTATION = "此车辆未做进站申请"; |
| 53 | private static String ENTERSTATION = "此车辆未做出站申请"; | 65 | private static String ENTERSTATION = "此车辆未做出站申请"; |
| 54 | - private static String ISVALID = "二维码已失效或者此车辆未做出入申请"; | 66 | + private static String ISVALID = "二维码数据异常,请使用正确的二维码数据"; |
| 67 | + private static String ERRORWT="出起始场站的重量和进目的场站的重量不一致"; | ||
| 68 | + private static String IEPORSE="无相对应进出场申请"; | ||
| 55 | 69 | ||
| 56 | @PostConstruct | 70 | @PostConstruct |
| 57 | public void init() { | 71 | public void init() { |
| 58 | logic = this; | 72 | logic = this; |
| 59 | logic.listService = this.listService; | 73 | logic.listService = this.listService; |
| 60 | logic.veService = this.veService; | 74 | logic.veService = this.veService; |
| 75 | + logic.resMessageService = this.resMessageService; | ||
| 61 | } | 76 | } |
| 62 | 77 | ||
| 63 | /** | 78 | /** |
| @@ -65,60 +80,157 @@ public class LogicOperation { | @@ -65,60 +80,157 @@ public class LogicOperation { | ||
| 65 | * @Result 计算卡口采集数据并发送报文 | 80 | * @Result 计算卡口采集数据并发送报文 |
| 66 | */ | 81 | */ |
| 67 | public static boolean operation(GatherInfo info) { | 82 | public static boolean operation(GatherInfo info) { |
| 83 | + PropertyConfigurator.configure("config/log4j.properties"); | ||
| 68 | boolean result = false; | 84 | boolean result = false; |
| 69 | - if(info.getBarcode()==null || info.getBarcode().length()<=0 ){ | ||
| 70 | - return result; | ||
| 71 | - } | ||
| 72 | - BigDecimal grosswt = info.getGrosswt(); | ||
| 73 | //转为double类型 | 85 | //转为double类型 |
| 74 | - double growssWt = grosswt.doubleValue(); | ||
| 75 | - String ietype = info.getIetype(); | ||
| 76 | - List<LandBusinessTypeList> lists = null; | 86 | + double growssWt = info.getGrosswt().doubleValue(); |
| 77 | String vaName = info.getVename(); | 87 | String vaName = info.getVename(); |
| 78 | - if(vaName==null || vaName.length()<=0 ){ | 88 | + if (vaName.length() <= 0) { |
| 89 | + CommandClient.Client(info, NORECORD + vaName); | ||
| 79 | return result; | 90 | return result; |
| 80 | } | 91 | } |
| 81 | LandRoadVe ve = logic.veService.selectByFrameNo(vaName); | 92 | LandRoadVe ve = logic.veService.selectByFrameNo(vaName); |
| 82 | - LandBusinessTypeList list = logic.listService.selectForOne(info.getVename(),info.getBarcode(),info.getAreaid | ||
| 83 | - (),info.getChnlno(),info.getIetype()); | ||
| 84 | - if("0".equals(list.getIsvalid())){ | 93 | + if (ve == null) { |
| 94 | + CommandClient.Client(info, NORECORD + vaName); | ||
| 95 | + return result; | ||
| 96 | + } | ||
| 97 | + LandBusinessTypeList list = logic.listService.selectForOne(info.getVename(), info.getBarcode(), info.getAreaid | ||
| 98 | + (), info.getChnlno(), info.getIetype()); | ||
| 99 | + if(list == null) { | ||
| 100 | + CommandClient.Client(info, IEPORSE); | ||
| 101 | + return result; | ||
| 102 | + } | ||
| 103 | + //判断是否失效 | ||
| 104 | + if ("0".equals(list.getIsvalid())) { | ||
| 105 | + //获取总重 | ||
| 85 | double goodsWt = 0.0; | 106 | double goodsWt = 0.0; |
| 86 | - if (list.getMasterList()!=null || list.getMasterList().length()>0 ) { | ||
| 87 | - goodsWt = GoodsWt(list.getMasterList(), info.getIetype()); | 107 | + if (list.getMasterList() != null || list.getMasterList().length() > 0) { |
| 108 | + String type = null; | ||
| 109 | + if ("进口提货".equals(list.getBusinesstype()) || "分拨业务".equals(list.getBusinesstype())) { | ||
| 110 | + type = "I"; | ||
| 111 | + } | ||
| 112 | + if ("出口送货".equals(list.getBusinesstype()) || "调拨业务".equals(list.getBusinesstype())) { | ||
| 113 | + type = "E"; | ||
| 114 | + } | ||
| 115 | + logger.info("=======================>>>>>>>>>>" + type + "<<<<<<<<<<========================"); | ||
| 116 | + goodsWt = GoodsWt(list.getMasterList(), type); | ||
| 88 | } | 117 | } |
| 118 | + //车自重 | ||
| 89 | double selfWt = Double.parseDouble(ve.getSelfWt()); | 119 | double selfWt = Double.parseDouble(ve.getSelfWt()); |
| 90 | - if (sendBw(info, growssWt, selfWt, goodsWt)) { | 120 | + |
| 121 | + | ||
| 122 | + | ||
| 123 | + if (!logic.checkFlag(growssWt, (selfWt+goodsWt))) { | ||
| 124 | + List<LandBusinessTypeList> typeLists = logic.listService.selectMessageId(list.getMassageId()); | ||
| 125 | + for (int i = 0; i < typeLists.size(); i++) { | ||
| 126 | + | ||
| 127 | + if ("进口提货".equals(list.getBusinesstype())) { | ||
| 128 | + if ("E".equals(list.getTurnoverflag())) { | ||
| 129 | + if ("I".equals(typeLists.get(i).getTurnoverflag()) && typeLists.get(i).getContrastflag() != null) { | ||
| 130 | + selfWt = typeLists.get(i).getAislewt() > 1 ? typeLists.get(i).getAislewt() : selfWt; | ||
| 131 | + break; | ||
| 132 | + } | ||
| 133 | + } | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + if ("出口送货".equals(list.getBusinesstype())){ | ||
| 137 | + if ("E".equals(list.getTurnoverflag())) { | ||
| 138 | + if ("I".equals(typeLists.get(i).getTurnoverflag()) && typeLists.get(i).getContrastflag() != null) { | ||
| 139 | + if("1".equals(list.getIsfull())){ | ||
| 140 | + if(list.getMasterList().length()>0){ | ||
| 141 | + selfWt = typeLists.get(i).getAislewt()-Double.parseDouble(typeLists.get(i).getRemark()); | ||
| 142 | + }else { | ||
| 143 | + selfWt=growssWt; | ||
| 144 | + } | ||
| 145 | + } | ||
| 146 | + break; | ||
| 147 | + } | ||
| 148 | + } | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + if(list.getBusinesstype().endsWith("流转")){ | ||
| 152 | + if(list.getMasterList().length()>0){ | ||
| 153 | + if ("E".equals(list.getTurnoverflag())) { | ||
| 154 | + if ("I".equals(typeLists.get(i).getTurnoverflag()) && typeLists.get(i).getContrastflag() != null) { | ||
| 155 | + selfWt = typeLists.get(i).getAislewt() > 1 ? typeLists.get(i).getAislewt() : selfWt; | ||
| 156 | + break; | ||
| 157 | + } | ||
| 158 | + } | ||
| 159 | + if ("I".equals(list.getTurnoverflag())) { | ||
| 160 | + if ("E".equals(typeLists.get(i).getTurnoverflag()) && typeLists.get(i).getContrastflag() != null) { | ||
| 161 | + if(!logic.checkFlag(growssWt,typeLists.get(i).getAislewt())){ | ||
| 162 | + logger.info("-------->>>>>>>>出起始场站的重量和进目的场站的总量不一致<<<<<<<<--------"); | ||
| 163 | + CommandClient.Client(info, ERRORWT); | ||
| 164 | + return result; | ||
| 165 | + } | ||
| 166 | + } | ||
| 167 | + } | ||
| 168 | + } | ||
| 169 | + } | ||
| 170 | + | ||
| 171 | + } | ||
| 172 | + } | ||
| 173 | + | ||
| 174 | + boolean check = checkResult(growssWt, selfWt, goodsWt); | ||
| 175 | + boolean checkMainfest = logic.checkManifest(list.getMasterList()); | ||
| 176 | + boolean checkResult = false; | ||
| 177 | + | ||
| 178 | + if ("E".equals(list.getTurnoverflag())) { | ||
| 179 | + checkResult = checkMainfest || check; | ||
| 180 | + } else { | ||
| 181 | + checkResult = check || checkMainfest; | ||
| 182 | + } | ||
| 183 | + | ||
| 184 | + //宽进 | ||
| 185 | + if ("I".equals(info.getIetype())) { | ||
| 186 | + if (check == false && checkResult == false) { | ||
| 187 | + checkResult = true; | ||
| 188 | + } | ||
| 189 | + } | ||
| 190 | + logger.info("重量校验结果:"+check+",运单校验结果:"+checkMainfest+",最终校验结果:"+checkResult); | ||
| 191 | + | ||
| 192 | + if (sendBw(info, checkResult)) { | ||
| 91 | if ("I".equals(info.getIetype())) { | 193 | if ("I".equals(info.getIetype())) { |
| 194 | + System.out.println(info.getGrosswt().doubleValue()); | ||
| 195 | + list.setAislewt(info.getGrosswt().doubleValue()); | ||
| 196 | + list.setUpdateDate(new Date()); | ||
| 197 | + list.setRemark(String.format("%.1f",goodsWt)); | ||
| 92 | list.setContrastflag("已进站"); | 198 | list.setContrastflag("已进站"); |
| 199 | + logic.checkData(list); | ||
| 93 | } else { | 200 | } else { |
| 201 | + list.setAislewt(info.getGrosswt().doubleValue()); | ||
| 202 | + list.setUpdateDate(new Date()); | ||
| 203 | + list.setRemark(String.format("%.1f",goodsWt)); | ||
| 94 | list.setContrastflag("已出站"); | 204 | list.setContrastflag("已出站"); |
| 205 | + logic.checkData(list); | ||
| 95 | } | 206 | } |
| 96 | - logic.listService.updateById(list); | 207 | + int row = logic.listService.updateById(list); |
| 208 | + System.out.println(row); | ||
| 97 | List<LandBusinessTypeList> businessTypeLists = logic.listService.selectByBarcode(info.getBarcode()); | 209 | List<LandBusinessTypeList> businessTypeLists = logic.listService.selectByBarcode(info.getBarcode()); |
| 98 | int count = 0; | 210 | int count = 0; |
| 99 | - for(int i=0; i<businessTypeLists.size(); i++){ | 211 | + for (int i = 0; i < businessTypeLists.size(); i++) { |
| 100 | String flag1 = businessTypeLists.get(i).getContrastflag(); | 212 | String flag1 = businessTypeLists.get(i).getContrastflag(); |
| 101 | - if(flag1 != null){ | 213 | + if (flag1 != null) { |
| 102 | count++; | 214 | count++; |
| 103 | } | 215 | } |
| 104 | } | 216 | } |
| 105 | - if("货物流转".equals(list.getBusinesstype())){ | ||
| 106 | - if(count==4){ | 217 | + if (list.getBusinesstype().indexOf("业务") > 0) { |
| 218 | + if (count == 4) { | ||
| 107 | buildBarCode.cancleBarCode(vaName); | 219 | buildBarCode.cancleBarCode(vaName); |
| 108 | logic.listService.updateByBarcode(info.getBarcode()); | 220 | logic.listService.updateByBarcode(info.getBarcode()); |
| 109 | } | 221 | } |
| 110 | - }else{ | ||
| 111 | - if(count==2){ | 222 | + } else { |
| 223 | + if (count == 2) { | ||
| 112 | buildBarCode.cancleBarCode(vaName); | 224 | buildBarCode.cancleBarCode(vaName); |
| 113 | logic.listService.updateByBarcode(info.getBarcode()); | 225 | logic.listService.updateByBarcode(info.getBarcode()); |
| 114 | } | 226 | } |
| 115 | } | 227 | } |
| 116 | result = true; | 228 | result = true; |
| 117 | } | 229 | } |
| 118 | - }else{ | ||
| 119 | - CommandClient.Client(info, ISVALID); | 230 | + } else { |
| 231 | + sendError(info); | ||
| 232 | + logger.error("------->>>>>>>二维码数据异常,请使用正确的二维码数据<<<<<<<-----"); | ||
| 120 | } | 233 | } |
| 121 | - | ||
| 122 | return result; | 234 | return result; |
| 123 | } | 235 | } |
| 124 | 236 | ||
| @@ -136,20 +248,21 @@ public class LogicOperation { | @@ -136,20 +248,21 @@ public class LogicOperation { | ||
| 136 | } | 248 | } |
| 137 | 249 | ||
| 138 | /** | 250 | /** |
| 251 | + * 校验载重和称重是否在合理的范围 | ||
| 252 | + * | ||
| 139 | * @Param grossWt 地磅称重 | 253 | * @Param grossWt 地磅称重 |
| 140 | * @Param wt 车辆自重 | 254 | * @Param wt 车辆自重 |
| 141 | * @Param goodsWt 货物总重 | 255 | * @Param goodsWt 货物总重 |
| 142 | * @Result 获取运单重量 | 256 | * @Result 获取运单重量 |
| 143 | */ | 257 | */ |
| 144 | - //校验载重和称重是否在合理的范围 | ||
| 145 | public static boolean checkResult(double grossWt, double wt, double goodsWt) { | 258 | public static boolean checkResult(double grossWt, double wt, double goodsWt) { |
| 146 | - DecimalFormat df=new DecimalFormat("0.00"); | 259 | + DecimalFormat df = new DecimalFormat("0.00"); |
| 147 | boolean flag = false; | 260 | boolean flag = false; |
| 148 | double result = 0.0; | 261 | double result = 0.0; |
| 149 | if (goodsWt > 0) { | 262 | if (goodsWt > 0) { |
| 150 | - result = Double.parseDouble(df.format(Math.abs((goodsWt+wt-grossWt)/grossWt))); | 263 | + result = Double.parseDouble(df.format(Math.abs((goodsWt + wt - grossWt)) / grossWt)); |
| 151 | } else { | 264 | } else { |
| 152 | - result = Double.parseDouble(df.format(Math.abs((grossWt - wt)/grossWt))); | 265 | + result = Double.parseDouble(df.format(Math.abs((grossWt - wt)) / grossWt)); |
| 153 | } | 266 | } |
| 154 | if (result <= valueDob()) { | 267 | if (result <= valueDob()) { |
| 155 | flag = true; | 268 | flag = true; |
| @@ -173,6 +286,31 @@ public class LogicOperation { | @@ -173,6 +286,31 @@ public class LogicOperation { | ||
| 173 | return sum; | 286 | return sum; |
| 174 | } | 287 | } |
| 175 | 288 | ||
| 289 | + /** | ||
| 290 | + * 查询运单是否全部放行 | ||
| 291 | + * | ||
| 292 | + * @param manifestList | ||
| 293 | + * @return | ||
| 294 | + */ | ||
| 295 | + public boolean checkManifest(String manifestList) { | ||
| 296 | + if (manifestList.length() < 1) return false; | ||
| 297 | + manifestList = manifestList.replace("-", ""); | ||
| 298 | + String[] maifest = manifestList.split(","); | ||
| 299 | + boolean flag = false; | ||
| 300 | + int count = 0; | ||
| 301 | + for (int i = 0; i < maifest.length; i++) { | ||
| 302 | + RESMESSAGE resmessage = logic.resMessageService.selectByManifest(maifest[i]); | ||
| 303 | + if(resmessage !=null){ | ||
| 304 | + if ("11".equals(resmessage.getResponsecode())) { | ||
| 305 | + count++; | ||
| 306 | + } | ||
| 307 | + } | ||
| 308 | + } | ||
| 309 | + if (count == maifest.length) { | ||
| 310 | + flag = true; | ||
| 311 | + } | ||
| 312 | + return flag; | ||
| 313 | + } | ||
| 176 | 314 | ||
| 177 | /** | 315 | /** |
| 178 | * @Param waybill 主单号 | 316 | * @Param waybill 主单号 |
| @@ -180,7 +318,9 @@ public class LogicOperation { | @@ -180,7 +318,9 @@ public class LogicOperation { | ||
| 180 | * @Result 获取运单重量 | 318 | * @Result 获取运单重量 |
| 181 | */ | 319 | */ |
| 182 | public static double getGrossWt(String waybill, String imp) { | 320 | public static double getGrossWt(String waybill, String imp) { |
| 183 | - String url = "http://tjfx.15miaoo.com:8003/tj/orig/orig?waybill=" + waybill + "&imp=" + imp; | 321 | + // logger.info("进入获取重量action"); |
| 322 | + String url = "http://10.50.3.64:8080/tj/orig/orig?waybill=" + waybill + "&imp=" + imp; | ||
| 323 | + // String url = "http://tjfx.15miaoo.com:8003/tj/orig/orig=" + waybill + "&imp=" + imp; | ||
| 184 | StringBuilder json = new StringBuilder(); | 324 | StringBuilder json = new StringBuilder(); |
| 185 | Map map = null; | 325 | Map map = null; |
| 186 | double bg = 0; | 326 | double bg = 0; |
| @@ -192,37 +332,121 @@ public class LogicOperation { | @@ -192,37 +332,121 @@ public class LogicOperation { | ||
| 192 | while ((inputLine = in.readLine()) != null) { | 332 | while ((inputLine = in.readLine()) != null) { |
| 193 | json.append(inputLine); | 333 | json.append(inputLine); |
| 194 | } | 334 | } |
| 335 | + // logger.info("返回数据:" + json); | ||
| 195 | JSONArray array = JSONArray.parseArray(json.toString()); | 336 | JSONArray array = JSONArray.parseArray(json.toString()); |
| 196 | for (int i = 0; i < array.size(); i++) { | 337 | for (int i = 0; i < array.size(); i++) { |
| 197 | map = JSON.parseObject(array.getString(i)); | 338 | map = JSON.parseObject(array.getString(i)); |
| 198 | - if (map.get("receiptinformation").toString().startsWith("41301") || map.get("receiptinformation") | ||
| 199 | - .toString().startsWith("41106")) { | ||
| 200 | - bg = Double.parseDouble((String) map.get("totalweight")); | ||
| 201 | - return bg; | 339 | + System.out.println(map); |
| 340 | + if(map.containsKey("receiptinformation")){ | ||
| 341 | + if (map.get("receiptinformation").toString().startsWith("41301") || map.get("receiptinformation") | ||
| 342 | + .toString().startsWith("41106") || map.get("receiptinformation") | ||
| 343 | + .toString().startsWith("31301") || map.get("receiptinformation") | ||
| 344 | + .toString().startsWith("31106") || map.get("receiptinformation") | ||
| 345 | + .toString().indexOf("提运单放行")!=-1) { | ||
| 346 | + bg = Double.parseDouble((String) map.get("totalweight")); | ||
| 347 | + logger.info("for循环取重量:" + bg); | ||
| 348 | + return bg; | ||
| 349 | + } | ||
| 202 | } | 350 | } |
| 203 | } | 351 | } |
| 352 | + // logger.info("访问返回的数据重量:" + bg); | ||
| 204 | in.close(); | 353 | in.close(); |
| 205 | } catch (MalformedURLException e) { | 354 | } catch (MalformedURLException e) { |
| 206 | - e.getMessage(); | 355 | + // logger.info(e.toString()); |
| 207 | } catch (IOException e) { | 356 | } catch (IOException e) { |
| 208 | - e.getMessage(); | 357 | + // logger.info(e.toString()); |
| 209 | } | 358 | } |
| 210 | return bg; | 359 | return bg; |
| 211 | } | 360 | } |
| 212 | 361 | ||
| 213 | 362 | ||
| 214 | /** | 363 | /** |
| 364 | + * 给码头发送卡口数据 | ||
| 365 | + * | ||
| 366 | + * @param stationCode | ||
| 367 | + * @param carNo | ||
| 368 | + * @param IEtype | ||
| 369 | + */ | ||
| 370 | + public static void sendData(String stationCode, String carNo, boolean IEtype) { | ||
| 371 | + String url = "http://10.50.3.73:8080/air-api/car/channelCar?stationCode=" + stationCode + "&carNo=" + carNo + "&isPickup=" + IEtype; | ||
| 372 | + try { | ||
| 373 | + HttpClient httpClient = new DefaultHttpClient(); | ||
| 374 | + HttpGet httpGet = new HttpGet(url); | ||
| 375 | + HttpResponse httpResponse = httpClient.execute(httpGet); | ||
| 376 | + HttpEntity entity = httpResponse.getEntity(); | ||
| 377 | + String entityStr = EntityUtils.toString(entity); | ||
| 378 | + logger.info("------------>>>>>>>>>>>>>>发送车辆信息:{stationCode:" + stationCode + ",carNo:" + carNo + ",isPickup:" + IEtype + "}"); | ||
| 379 | + logger.info("------------>>>>>>>>>>>>>>响应返回内容:" + entityStr + "<<<<<<<<<<<<-----------"); | ||
| 380 | + } catch (Exception e) { | ||
| 381 | + logger.info(e.toString()); | ||
| 382 | + } | ||
| 383 | + } | ||
| 384 | + | ||
| 385 | + /** | ||
| 386 | + * 给码头发送卡口数据 | ||
| 387 | + * | ||
| 388 | + * @param list | ||
| 389 | + */ | ||
| 390 | + public void checkData(LandBusinessTypeList list) { | ||
| 391 | + String sationCode = null; | ||
| 392 | + boolean flag = false; | ||
| 393 | + if ("出口送货".equals(list.getBusinesstype()) || "出口流转".equals(list.getBusinesstype())) { | ||
| 394 | + flag = false; | ||
| 395 | + } | ||
| 396 | + if ("进口提货".equals(list.getBusinesstype()) || "进口流转".equals(list.getBusinesstype())) { | ||
| 397 | + flag = true; | ||
| 398 | + } | ||
| 399 | + if ("4604000000".equals(list.getEndstation())) { | ||
| 400 | + if ("I".equals(list.getTurnoverflag())) { | ||
| 401 | + sationCode = "HK05"; | ||
| 402 | + } else { | ||
| 403 | + sationCode = "HK06"; | ||
| 404 | + } | ||
| 405 | + } | ||
| 406 | + sendData(sationCode, list.getTrailerFrameNo(), flag); | ||
| 407 | + } | ||
| 408 | + | ||
| 409 | + | ||
| 410 | + /** | ||
| 215 | * 校验重量并发送报文 | 411 | * 校验重量并发送报文 |
| 216 | */ | 412 | */ |
| 217 | 413 | ||
| 218 | - public static boolean sendBw(GatherInfo info, double growsswWt, double selfWt, double goodsWt) { | 414 | + public static boolean sendBw(GatherInfo info, boolean check) { |
| 219 | boolean flag = false; | 415 | boolean flag = false; |
| 220 | - if (checkResult(growsswWt, selfWt, goodsWt)) { | 416 | + if (check) { |
| 221 | CommandClient.Client(info, PERMITTHOUGH); | 417 | CommandClient.Client(info, PERMITTHOUGH); |
| 418 | + logger.info("=============>>>>>>>>放行报文发送成功<<<<<<<<<=============="); | ||
| 222 | flag = true; | 419 | flag = true; |
| 223 | } else { | 420 | } else { |
| 224 | CommandClient.Client(info, GROWSSEXCETION); | 421 | CommandClient.Client(info, GROWSSEXCETION); |
| 422 | + logger.info("=============>>>>>>>>重量异常报文发送成功<<<<<<<<<=============="); | ||
| 423 | + } | ||
| 424 | + return flag; | ||
| 425 | + } | ||
| 426 | + | ||
| 427 | + /** | ||
| 428 | + * 排除当前系统问题发送错误commandInfo | ||
| 429 | + */ | ||
| 430 | + public static void sendError(GatherInfo info) { | ||
| 431 | + CommandClient.Client(info, ISVALID); | ||
| 432 | + } | ||
| 433 | + | ||
| 434 | + /** | ||
| 435 | + * 判断空车车与地磅称重是否在合理范围 | ||
| 436 | + * | ||
| 437 | + * @param grossWt | ||
| 438 | + * @param wt | ||
| 439 | + * @return | ||
| 440 | + */ | ||
| 441 | + public boolean checkFlag(double grossWt, double wt) { | ||
| 442 | + DecimalFormat df = new DecimalFormat("0.00"); | ||
| 443 | + boolean flag = false; | ||
| 444 | + double reult = Double.parseDouble(df.format(Math.abs((grossWt - wt)) / grossWt)); | ||
| 445 | + if (reult <= valueDob()) { | ||
| 446 | + flag = true; | ||
| 225 | } | 447 | } |
| 226 | return flag; | 448 | return flag; |
| 227 | } | 449 | } |
| 450 | + | ||
| 451 | + | ||
| 228 | } | 452 | } |
| @@ -30,5 +30,9 @@ public interface LandBusinessTypeListMapper { | @@ -30,5 +30,9 @@ public interface LandBusinessTypeListMapper { | ||
| 30 | 30 | ||
| 31 | List<LandBusinessTypeList> selectByBarcode(@Param("barcode")String barcode); | 31 | List<LandBusinessTypeList> selectByBarcode(@Param("barcode")String barcode); |
| 32 | 32 | ||
| 33 | + | ||
| 33 | int updateByBarCode(@Param("barcode")String barcode); | 34 | int updateByBarCode(@Param("barcode")String barcode); |
| 35 | + | ||
| 36 | + | ||
| 37 | + List<LandBusinessTypeList> selectMessageId(@Param("massageId")String messageId); | ||
| 34 | } | 38 | } |
| 1 | package com.sy.mapper; | 1 | package com.sy.mapper; |
| 2 | 2 | ||
| 3 | import com.sy.model.LandRoadVe; | 3 | import com.sy.model.LandRoadVe; |
| 4 | +import org.apache.ibatis.annotations.Param; | ||
| 4 | import org.springframework.stereotype.Component; | 5 | import org.springframework.stereotype.Component; |
| 5 | 6 | ||
| 6 | @Component | 7 | @Component |
| @@ -17,5 +18,5 @@ public interface LandRoadVeMapper { | @@ -17,5 +18,5 @@ public interface LandRoadVeMapper { | ||
| 17 | 18 | ||
| 18 | int updateByPrimaryKey(LandRoadVe record); | 19 | int updateByPrimaryKey(LandRoadVe record); |
| 19 | //根据车牌号查询 | 20 | //根据车牌号查询 |
| 20 | - LandRoadVe selectByFrameNo(String frameNo); | 21 | + LandRoadVe selectByFrameNo(@Param("domesticLisenceNo") String frameNo); |
| 21 | } | 22 | } |
| 1 | +package com.sy.mapper; | ||
| 2 | + | ||
| 3 | +import com.sy.model.RESMESSAGE; | ||
| 4 | +import org.apache.ibatis.annotations.Param; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +@Component | ||
| 8 | +public interface RESMESSAGEMapper { | ||
| 9 | + int deleteByPrimaryKey(String id); | ||
| 10 | + | ||
| 11 | + int insert(RESMESSAGE record); | ||
| 12 | + | ||
| 13 | + int insertSelective(RESMESSAGE record); | ||
| 14 | + | ||
| 15 | + RESMESSAGE selectByPrimaryKey(String id); | ||
| 16 | + | ||
| 17 | + int updateByPrimaryKeySelective(RESMESSAGE record); | ||
| 18 | + | ||
| 19 | + int updateByPrimaryKey(RESMESSAGE record); | ||
| 20 | + | ||
| 21 | + RESMESSAGE selectByManifest(@Param("manifest") String manifest); | ||
| 22 | +} |
| @@ -55,6 +55,16 @@ public class LandBusinessTypeList { | @@ -55,6 +55,16 @@ public class LandBusinessTypeList { | ||
| 55 | 55 | ||
| 56 | private String isvalid; | 56 | private String isvalid; |
| 57 | 57 | ||
| 58 | + private Double aislewt; | ||
| 59 | + | ||
| 60 | + private String isfull; | ||
| 61 | + | ||
| 62 | + private String remark; | ||
| 63 | + | ||
| 64 | + private String remark1; | ||
| 65 | + | ||
| 66 | + private String remark2; | ||
| 67 | + | ||
| 58 | public String getId() { | 68 | public String getId() { |
| 59 | return id; | 69 | return id; |
| 60 | } | 70 | } |
| @@ -262,4 +272,44 @@ public class LandBusinessTypeList { | @@ -262,4 +272,44 @@ public class LandBusinessTypeList { | ||
| 262 | public void setIsvalid(String isvalid) { | 272 | public void setIsvalid(String isvalid) { |
| 263 | this.isvalid = isvalid == null ? null : isvalid.trim(); | 273 | this.isvalid = isvalid == null ? null : isvalid.trim(); |
| 264 | } | 274 | } |
| 275 | + | ||
| 276 | + public Double getAislewt() { | ||
| 277 | + return aislewt; | ||
| 278 | + } | ||
| 279 | + | ||
| 280 | + public void setAislewt(Double aislewt) { | ||
| 281 | + this.aislewt = aislewt; | ||
| 282 | + } | ||
| 283 | + | ||
| 284 | + public String getIsfull() { | ||
| 285 | + return isfull; | ||
| 286 | + } | ||
| 287 | + | ||
| 288 | + public void setIsfull(String isfull) { | ||
| 289 | + this.isfull = isfull == null ? null : isfull.trim(); | ||
| 290 | + } | ||
| 291 | + | ||
| 292 | + public String getRemark() { | ||
| 293 | + return remark; | ||
| 294 | + } | ||
| 295 | + | ||
| 296 | + public void setRemark(String remark) { | ||
| 297 | + this.remark = remark == null ? null : remark.trim(); | ||
| 298 | + } | ||
| 299 | + | ||
| 300 | + public String getRemark1() { | ||
| 301 | + return remark1; | ||
| 302 | + } | ||
| 303 | + | ||
| 304 | + public void setRemark1(String remark1) { | ||
| 305 | + this.remark1 = remark1 == null ? null : remark1.trim(); | ||
| 306 | + } | ||
| 307 | + | ||
| 308 | + public String getRemark2() { | ||
| 309 | + return remark2; | ||
| 310 | + } | ||
| 311 | + | ||
| 312 | + public void setRemark2(String remark2) { | ||
| 313 | + this.remark2 = remark2 == null ? null : remark2.trim(); | ||
| 314 | + } | ||
| 265 | } | 315 | } |
src/main/java/com/sy/model/RESMESSAGE.java
0 → 100644
| 1 | +package com.sy.model; | ||
| 2 | + | ||
| 3 | +public class RESMESSAGE { | ||
| 4 | + private String id; | ||
| 5 | + | ||
| 6 | + private String journeyid; | ||
| 7 | + | ||
| 8 | + private String manifest; | ||
| 9 | + | ||
| 10 | + private String responsecode; | ||
| 11 | + | ||
| 12 | + private String responsetext; | ||
| 13 | + | ||
| 14 | + public String getId() { | ||
| 15 | + return id; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setId(String id) { | ||
| 19 | + this.id = id == null ? null : id.trim(); | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + public String getJourneyid() { | ||
| 23 | + return journeyid; | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + public void setJourneyid(String journeyid) { | ||
| 27 | + this.journeyid = journeyid == null ? null : journeyid.trim(); | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + public String getManifest() { | ||
| 31 | + return manifest; | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + public void setManifest(String manifest) { | ||
| 35 | + this.manifest = manifest == null ? null : manifest.trim(); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + public String getResponsecode() { | ||
| 39 | + return responsecode; | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + public void setResponsecode(String responsecode) { | ||
| 43 | + this.responsecode = responsecode == null ? null : responsecode.trim(); | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + public String getResponsetext() { | ||
| 47 | + return responsetext; | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + public void setResponsetext(String responsetext) { | ||
| 51 | + this.responsetext = responsetext == null ? null : responsetext.trim(); | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + @Override | ||
| 55 | + public String toString() { | ||
| 56 | + return "RESMESSAGE{" + | ||
| 57 | + "id='" + id + '\'' + | ||
| 58 | + ", journeyid='" + journeyid + '\'' + | ||
| 59 | + ", manifest='" + manifest + '\'' + | ||
| 60 | + ", responsecode='" + responsecode + '\'' + | ||
| 61 | + ", responsetext='" + responsetext + '\'' + | ||
| 62 | + '}'; | ||
| 63 | + } | ||
| 64 | +} |
| @@ -18,4 +18,6 @@ public interface LandBusListService { | @@ -18,4 +18,6 @@ public interface LandBusListService { | ||
| 18 | List<LandBusinessTypeList> selectByBarcode(String barcode); | 18 | List<LandBusinessTypeList> selectByBarcode(String barcode); |
| 19 | 19 | ||
| 20 | int updateByBarcode(String barcode); | 20 | int updateByBarcode(String barcode); |
| 21 | + | ||
| 22 | + List<LandBusinessTypeList> selectMessageId(String messageId); | ||
| 21 | } | 23 | } |
| @@ -69,4 +69,9 @@ public class LandBusListServiceImpl implements LandBusListService { | @@ -69,4 +69,9 @@ public class LandBusListServiceImpl implements LandBusListService { | ||
| 69 | public int updateByBarcode(String barcode) { | 69 | public int updateByBarcode(String barcode) { |
| 70 | return listMapper.updateByBarCode(barcode); | 70 | return listMapper.updateByBarCode(barcode); |
| 71 | } | 71 | } |
| 72 | + | ||
| 73 | + | ||
| 74 | + public List<LandBusinessTypeList> selectMessageId(String messageiD){ | ||
| 75 | + return listMapper.selectMessageId(messageiD); | ||
| 76 | + } | ||
| 72 | } | 77 | } |
| 1 | +package com.sy.service.impl; | ||
| 2 | + | ||
| 3 | +import com.sy.mapper.RESMESSAGEMapper; | ||
| 4 | +import com.sy.model.RESMESSAGE; | ||
| 5 | +import com.sy.service.ResMessageService; | ||
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 7 | +import org.springframework.stereotype.Service; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @author | ||
| 11 | + * @time 2019-${MOUTH}-22 21:32 | ||
| 12 | + */ | ||
| 13 | +@Service | ||
| 14 | +public class ResMessageServiceImpl implements ResMessageService { | ||
| 15 | + | ||
| 16 | + @Autowired | ||
| 17 | + private RESMESSAGEMapper mapper; | ||
| 18 | + | ||
| 19 | + | ||
| 20 | + public int saveEnter(RESMESSAGE resmessage){ | ||
| 21 | + return mapper.insertSelective(resmessage); | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + public RESMESSAGE selectByManifest(String manifest){ | ||
| 25 | + return mapper.selectByManifest(manifest); | ||
| 26 | + } | ||
| 27 | +} |
| @@ -91,10 +91,21 @@ public class CommandClient { | @@ -91,10 +91,21 @@ public class CommandClient { | ||
| 91 | StringBuffer buffer = new StringBuffer(); | 91 | StringBuffer buffer = new StringBuffer(); |
| 92 | buffer.append("<COMMAND_INFO AREA_ID=\""+info.getAreaid()+"\" CHNL_NO=\""+info.getChnlno()+"\" I_E_TYPE=\""+info | 92 | buffer.append("<COMMAND_INFO AREA_ID=\""+info.getAreaid()+"\" CHNL_NO=\""+info.getChnlno()+"\" I_E_TYPE=\""+info |
| 93 | .getIetype()+"\" SEQ_NO=\""+info.getSeqno()+"\">"); | 93 | .getIetype()+"\" SEQ_NO=\""+info.getSeqno()+"\">"); |
| 94 | - buffer.append("<CHECK_RESULT>"+flag+"000000000000000000</CHECK_RESULT><OP_HINT>"+message+"</OP_HINT>"); | 94 | + String type = null; |
| 95 | + if("I".equals(info.getIetype())){ | ||
| 96 | + type="000000200000000000"; | ||
| 97 | + }else{ | ||
| 98 | + type="000000100000000000"; | ||
| 99 | + } | ||
| 100 | + buffer.append("<CHECK_RESULT>"+flag+type+"</CHECK_RESULT><OP_HINT>"+message+"</OP_HINT>"); | ||
| 95 | buffer.append("<SEAL>"); | 101 | buffer.append("<SEAL>"); |
| 96 | buffer.append("<ESEAL_ID>"+info.getEsealid()+"</ESEAL_ID>"); | 102 | buffer.append("<ESEAL_ID>"+info.getEsealid()+"</ESEAL_ID>"); |
| 97 | - buffer.append("<SEAL_KEY>"+info.getSealkey()+"</SEAL_KEY>"); | 103 | + if(flag == "00"){ |
| 104 | + buffer.append("<SEAL_KEY>1234567890</SEAL_KEY>"); | ||
| 105 | + }else{ | ||
| 106 | + buffer.append("<SEAL_KEY>"+info.getSealkey()+"</SEAL_KEY>"); | ||
| 107 | + } | ||
| 108 | + | ||
| 98 | buffer.append("<OPEN_TIMES></OPEN_TIMES>"); | 109 | buffer.append("<OPEN_TIMES></OPEN_TIMES>"); |
| 99 | buffer.append("<ESEAL_IC_NO></ESEAL_IC_NO>"); | 110 | buffer.append("<ESEAL_IC_NO></ESEAL_IC_NO>"); |
| 100 | buffer.append("</SEAL>"); | 111 | buffer.append("</SEAL>"); |
| @@ -14,8 +14,8 @@ public class DateTimeConverter extends AbstractSingleValueConverter { | @@ -14,8 +14,8 @@ public class DateTimeConverter extends AbstractSingleValueConverter { | ||
| 14 | private static final DateFormat DATETIME = new SimpleDateFormat("yyyyMMddHHmmss"); | 14 | private static final DateFormat DATETIME = new SimpleDateFormat("yyyyMMddHHmmss"); |
| 15 | private static final DateFormat DATETIME_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | 15 | private static final DateFormat DATETIME_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| 16 | private static final DateFormat DEFAULT_DATEFORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); | 16 | private static final DateFormat DEFAULT_DATEFORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); |
| 17 | - private static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); | ||
| 18 | - private static SimpleDateFormat date = new SimpleDateFormat("yyyyy-MM-dd"); | 17 | + private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); |
| 18 | + private static final SimpleDateFormat date = new SimpleDateFormat("yyyyy-MM-dd"); | ||
| 19 | 19 | ||
| 20 | public boolean canConvert(Class type) { | 20 | public boolean canConvert(Class type) { |
| 21 | return type.equals(Date.class); | 21 | return type.equals(Date.class); |
| @@ -36,6 +36,10 @@ public class DateTimeConverter extends AbstractSingleValueConverter { | @@ -36,6 +36,10 @@ public class DateTimeConverter extends AbstractSingleValueConverter { | ||
| 36 | if(str.length()==10) { | 36 | if(str.length()==10) { |
| 37 | return DATE.parseObject(str); | 37 | return DATE.parseObject(str); |
| 38 | } | 38 | } |
| 39 | + if(str.length()>14){ | ||
| 40 | + str= str.substring(0,15); | ||
| 41 | + return DATETIME.parseObject(str); | ||
| 42 | + } | ||
| 39 | }else { | 43 | }else { |
| 40 | return null; | 44 | return null; |
| 41 | } | 45 | } |
| @@ -48,6 +52,15 @@ public class DateTimeConverter extends AbstractSingleValueConverter { | @@ -48,6 +52,15 @@ public class DateTimeConverter extends AbstractSingleValueConverter { | ||
| 48 | public static String getFormat() { | 52 | public static String getFormat() { |
| 49 | return dateFormat.format(new Date()); | 53 | return dateFormat.format(new Date()); |
| 50 | } | 54 | } |
| 55 | + | ||
| 56 | + public static String dateFormat() { | ||
| 57 | + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); | ||
| 58 | + return simpleDateFormat.format(new Date()); | ||
| 59 | + } | ||
| 60 | + public static String dateTimeFormat() { | ||
| 61 | + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
| 62 | + return simpleDateFormat.format(new Date()); | ||
| 63 | + } | ||
| 51 | public static String getDay() { | 64 | public static String getDay() { |
| 52 | return date.format(new Date()); | 65 | return date.format(new Date()); |
| 53 | } | 66 | } |
src/main/resources/META-INF/MANIFEST.MF
0 → 100644
| 1 | +Manifest-Version: 1.0 | ||
| 2 | +Class-Path: pagehelper-5.1.2.jar logback-classic-1.2.3.jar xstream-1.4 | ||
| 3 | + .10.jar jsqlparser-1.0.jar axiom-impl-1.2.7.jar geronimo-javamail_1.4 | ||
| 4 | + _spec-1.2.jar cxf-xjc-boolean-3.2.3.jar mybatis-spring-boot-autoconfi | ||
| 5 | + gure-1.3.2.jar xmlpull-1.1.3.1.jar com.ibm.mq.pcf.jar com.ibm.mq.soap | ||
| 6 | + .jar wstx-asl-3.2.4.jar com.ibm.mqjms.jar hibernate-validator-6.0.13. | ||
| 7 | + Final.jar spring-tx-5.1.2.RELEASE.jar xpp3_min-1.1.4c.jar neethi-2.0. | ||
| 8 | + 4.jar commons-io-2.5.jar jackson-databind-2.9.7.jar spring-core-5.1.2 | ||
| 9 | + .RELEASE.jar core-3.3.0.jar slf4j-api-1.7.25.jar jul-to-slf4j-1.7.25. | ||
| 10 | + jar spring-boot-starter-logging-2.1.0.RELEASE.jar jackson-module-para | ||
| 11 | + meter-names-2.9.7.jar validation-api-2.0.1.Final.jar spring-boot-star | ||
| 12 | + ter-json-2.1.0.RELEASE.jar HeartbeatService.jar jboss-logging-3.3.2.F | ||
| 13 | + inal.jar commons-lang-2.4.jar com.ibm.mq.fta.jar classmate-1.4.0.jar | ||
| 14 | + spring-boot-starter-2.1.0.RELEASE.jar ProcessService.jar mysql-connec | ||
| 15 | + tor-java-8.0.13.jar mybatis-3.4.6.jar geronimo-stax-api_1.0_spec-1.0. | ||
| 16 | + 1.jar spring-beans-5.1.2.RELEASE.jar mybatis-spring-boot-starter-1.3. | ||
| 17 | + 2.jar com.ibm.mq.axis2.jar jackson-datatype-jdk8-2.9.7.jar cxf-xjc-bu | ||
| 18 | + g671-2.3.2.jar spring-web-5.1.2.RELEASE.jar com.ibm.mq.headers.jar co | ||
| 19 | + m.ibm.mq.postcard.jar spring-aop-5.1.2.RELEASE.jar snakeyaml-1.23.jar | ||
| 20 | + CL3Nonexport.jar druid-spring-boot-starter-1.1.9.jar com.ibm.mqetcli | ||
| 21 | + ent.jar com.ibm.mq.tools.ras.jar spring-context-5.1.2.RELEASE.jar com | ||
| 22 | + .ibm.mq.defaultconfig.jar xml-apis-1.4.01.jar mybatis-spring-1.3.2.ja | ||
| 23 | + r connector.jar mybatis-generator-core-1.3.6.jar geronimo-activation_ | ||
| 24 | + 1.1_spec-1.0.1.jar com.ibm.mq.jmqi.jar javax.annotation-api-1.3.2.jar | ||
| 25 | + wsdl4j-1.6.2.jar imfmsg.jar CL3Export.jar axiom-api-1.2.7.jar druid- | ||
| 26 | + 1.1.9.jar cxf-xjc-dv-2.3.2.jar IMFClient.1.0.0.jar spring-boot-autoco | ||
| 27 | + nfigure-2.1.0.RELEASE.jar spring-webmvc-5.1.2.RELEASE.jar pagehelper- | ||
| 28 | + spring-boot-starter-1.2.3.jar xmlbeans-2.4.0.jar jackson-datatype-jsr | ||
| 29 | + 310-2.9.7.jar UploadService.jar jackson-core-2.9.7.jar logback-core-1 | ||
| 30 | + .2.3.jar jaxen-1.1.6.jar stax-api-1.0.1.jar dom4j-2.1.0.jar xmlsec-1. | ||
| 31 | + 4.4.jar spring-expression-5.1.2.RELEASE.jar fastjson-1.2.47.jar cxf-m | ||
| 32 | + anifest.jar sigar.jar spring-boot-2.1.0.RELEASE.jar log4j-api-2.11.1. | ||
| 33 | + jar com.ibm.mq.jar pagehelper-spring-boot-autoconfigure-1.2.3.jar Hik | ||
| 34 | + ariCP-3.2.0.jar com.ibm.mq.commonservices.jar apiConfig.jar cxf-xjc-t | ||
| 35 | + s-2.3.2.jar log4j-to-slf4j-2.11.1.jar cxf-2.3.2.jar XmlSchema-1.4.7.j | ||
| 36 | + ar spring-jdbc-5.1.2.RELEASE.jar returnXml.jar commons-logging-1.1.1. | ||
| 37 | + jar spring-boot-starter-web-2.1.0.RELEASE.jar spring-boot-starter-jdb | ||
| 38 | + c-2.1.0.RELEASE.jar jackson-annotations-2.9.0.jar spring-jcl-5.1.2.RE | ||
| 39 | + LEASE.jar log4j-1.2.17.jar com.ibm.mq.jms.Nojndi.jar httpclient-4.5.5 | ||
| 40 | + .jar httpcore-4.4.10.jar commnons-codec-1.11.jar | ||
| 41 | +Main-Class: com.sy.AnalysisImfApplication | ||
| 42 | + |
| 1 | -#设置访问端口 | 1 | +#\u8BBE\u7F6E\u8BBF\u95EE\u7AEF\u53E3 |
| 2 | server.port=8848 | 2 | server.port=8848 |
| 3 | -#eureka注册中心服务器地址 | 3 | +#eureka\u6CE8\u518C\u4E2D\u5FC3\u670D\u52A1\u5668\u5730\u5740 |
| 4 | #eureka.client.service-url.defaultZone=http://10.50.3.82:19527/eureka/ | 4 | #eureka.client.service-url.defaultZone=http://10.50.3.82:19527/eureka/ |
| 5 | -#服务名 | 5 | +#\u670D\u52A1\u540D |
| 6 | #spring.application.name=AnalysisForStation | 6 | #spring.application.name=AnalysisForStation |
| 7 | -#设置热部署 | ||
| 8 | -#开启热部署 | 7 | +#\u8BBE\u7F6E\u70ED\u90E8\u7F72 |
| 8 | +#\u5F00\u542F\u70ED\u90E8\u7F72 | ||
| 9 | spring.devtools.restart.enabled=true | 9 | spring.devtools.restart.enabled=true |
| 10 | -#重启范围 | 10 | +#\u91CD\u542F\u8303\u56F4 |
| 11 | spring.devtools.restart.additional-paths=src/main/java | 11 | spring.devtools.restart.additional-paths=src/main/java |
| 12 | -#映射前缀 | 12 | +#\u6620\u5C04\u524D\u7F00 |
| 13 | spring.mvc.view.suffix=/WEB-INF/jsp/ | 13 | spring.mvc.view.suffix=/WEB-INF/jsp/ |
| 14 | -#映射后缀 | 14 | +#\u6620\u5C04\u540E\u7F00 |
| 15 | spring.mvc.view.prefix=.jsp | 15 | spring.mvc.view.prefix=.jsp |
| 16 | -#设置本地数据源 | 16 | +#\u8BBE\u7F6E\u672C\u5730\u6570\u636E\u6E90 |
| 17 | #spring.datasource.username=root | 17 | #spring.datasource.username=root |
| 18 | #spring.datasource.password=root | 18 | #spring.datasource.password=root |
| 19 | #spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver | 19 | #spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver |
| 20 | -#spring.datasource.url=jdbc:mysql://localhost:3306/bysj?useUnicode=true&characterEncoding=utf8&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&useSSL=true&serverTimezone=Asia/Shanghai | ||
| 21 | -#设置线上数据源 | 20 | +#spring.datasource.url=jdbc:mysql://localhost:3306/station?useUnicode=true&characterEncoding=utf8&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&useSSL=true&serverTimezone=Asia/Shanghai |
| 21 | +#\u8BBE\u7F6E\u7EBF\u4E0A\u6570\u636E\u6E90 | ||
| 22 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver | 22 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver |
| 23 | -spring.datasource.url=jdbc:mysql://10.50.7.10:3306/station?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true | ||
| 24 | -spring.datasource.username=kako | ||
| 25 | -spring.datasource.password=mysql10.50.7.10 | ||
| 26 | -#连接池类 | 23 | +spring.datasource.url=jdbc:mysql://10.50.7.70:3306/station?useUnicode=true&characterEncoding=utf8&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&useSSL=true&serverTimezone=Asia/Shanghai |
| 24 | +spring.datasource.username=station | ||
| 25 | +spring.datasource.password=station@10.50.7.70 | ||
| 26 | +#\u8FDE\u63A5\u6C60\u7C7B | ||
| 27 | spring.datasource.type=com.alibaba.druid.pool.DruidDataSource | 27 | spring.datasource.type=com.alibaba.druid.pool.DruidDataSource |
| 28 | -#连接池配置,因为springboot默认是开启了连接池的,它有默认配置,这一段可以忽略 | ||
| 29 | -# 初始化大小,最小,最大 | 28 | +#\u8FDE\u63A5\u6C60\u914D\u7F6E\uFF0C\u56E0\u4E3Aspringboot\u9ED8\u8BA4\u662F\u5F00\u542F\u4E86\u8FDE\u63A5\u6C60\u7684\uFF0C\u5B83\u6709\u9ED8\u8BA4\u914D\u7F6E\uFF0C\u8FD9\u4E00\u6BB5\u53EF\u4EE5\u5FFD\u7565 |
| 29 | +# \u521D\u59CB\u5316\u5927\u5C0F\uFF0C\u6700\u5C0F\uFF0C\u6700\u5927 | ||
| 30 | spring.datasource.druid.initial-size=5 | 30 | spring.datasource.druid.initial-size=5 |
| 31 | spring.datasource.druid.min-idle=5 | 31 | spring.datasource.druid.min-idle=5 |
| 32 | spring.datasource.druid.max-active=20 | 32 | spring.datasource.druid.max-active=20 |
| 33 | -# 配置获取连接等待超时的时间 | 33 | +# \u914D\u7F6E\u83B7\u53D6\u8FDE\u63A5\u7B49\u5F85\u8D85\u65F6\u7684\u65F6\u95F4 |
| 34 | spring.datasource.druid.max-wait=60000 | 34 | spring.datasource.druid.max-wait=60000 |
| 35 | -# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 | 35 | +# \u914D\u7F6E\u95F4\u9694\u591A\u4E45\u624D\u8FDB\u884C\u4E00\u6B21\u68C0\u6D4B\uFF0C\u68C0\u6D4B\u9700\u8981\u5173\u95ED\u7684\u7A7A\u95F2\u8FDE\u63A5\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2 |
| 36 | spring.datasource.druid.time-between-eviction-runs-millis=60000 | 36 | spring.datasource.druid.time-between-eviction-runs-millis=60000 |
| 37 | -# 配置一个连接在池中最小生存的时间,单位是毫秒 | 37 | +# \u914D\u7F6E\u4E00\u4E2A\u8FDE\u63A5\u5728\u6C60\u4E2D\u6700\u5C0F\u751F\u5B58\u7684\u65F6\u95F4\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2 |
| 38 | spring.datasource.druid.min-evictable-idle-time-millis=300000 | 38 | spring.datasource.druid.min-evictable-idle-time-millis=300000 |
| 39 | spring.datasource.druid.validation-query=SELECT 1 FROM DUAL | 39 | spring.datasource.druid.validation-query=SELECT 1 FROM DUAL |
| 40 | spring.datasource.druid.test-while-idle=true | 40 | spring.datasource.druid.test-while-idle=true |
| 41 | spring.datasource.druid.test-on-borrow=false | 41 | spring.datasource.druid.test-on-borrow=false |
| 42 | spring.datasource.druid.test-on-return=false | 42 | spring.datasource.druid.test-on-return=false |
| 43 | -# 打开PSCache,并且指定每个连接上PSCache的大小 | 43 | +# \u6253\u5F00PSCache\uFF0C\u5E76\u4E14\u6307\u5B9A\u6BCF\u4E2A\u8FDE\u63A5\u4E0APSCache\u7684\u5927\u5C0F |
| 44 | spring.datasource.druid.pool-prepared-statements=true | 44 | spring.datasource.druid.pool-prepared-statements=true |
| 45 | spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20 | 45 | spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20 |
| 46 | -# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙 | 46 | +# \u914D\u7F6E\u76D1\u63A7\u7EDF\u8BA1\u62E6\u622A\u7684filters\uFF0C\u53BB\u6389\u540E\u76D1\u63A7\u754C\u9762sql\u65E0\u6CD5\u7EDF\u8BA1\uFF0C'wall'\u7528\u4E8E\u9632\u706B\u5899 |
| 47 | spring.datasource.druid.filters=stat,wall,log4j | 47 | spring.datasource.druid.filters=stat,wall,log4j |
| 48 | -# 通过connectProperties属性来打开mergeSql功能;慢SQL记录 | 48 | +# \u901A\u8FC7connectProperties\u5C5E\u6027\u6765\u6253\u5F00mergeSql\u529F\u80FD\uFF1B\u6162SQL\u8BB0\u5F55 |
| 49 | spring.datasource.druid.connection-properties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500 | 49 | spring.datasource.druid.connection-properties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500 |
| 50 | -#配置mybatis | 50 | +#\u914D\u7F6Emybatis |
| 51 | mybatis.mapper-locations=classpath:mapping/*.xml | 51 | mybatis.mapper-locations=classpath:mapping/*.xml |
| 52 | -#全局的映射,不用在xml文件写实体类的全路径 | 52 | +#\u5168\u5C40\u7684\u6620\u5C04\uFF0C\u4E0D\u7528\u5728xml\u6587\u4EF6\u5199\u5B9E\u4F53\u7C7B\u7684\u5168\u8DEF\u5F84 |
| 53 | mybatis.type-aliases-package=com.sy.model | 53 | mybatis.type-aliases-package=com.sy.model |
| 54 | -#开启驼峰映射 | 54 | +#\u5F00\u542F\u9A7C\u5CF0\u6620\u5C04 |
| 55 | mybatis.configuration.map-underscore-to-camel-case=true | 55 | mybatis.configuration.map-underscore-to-camel-case=true |
| 56 | -#配置分页插件 | ||
| 57 | -#pagehelper分页插件 | 56 | +#\u914D\u7F6E\u5206\u9875\u63D2\u4EF6 |
| 57 | +#pagehelper\u5206\u9875\u63D2\u4EF6 | ||
| 58 | pagehelper.helper-dialect=mysql | 58 | pagehelper.helper-dialect=mysql |
| 59 | pagehelper.reasonable=true | 59 | pagehelper.reasonable=true |
| 60 | pagehelper.support-methods-arguments=true | 60 | pagehelper.support-methods-arguments=true |
| @@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
| 13 | </commentGenerator> | 13 | </commentGenerator> |
| 14 | <!--数据库链接URL,用户名、密码 --> | 14 | <!--数据库链接URL,用户名、密码 --> |
| 15 | <jdbcConnection driverClass="com.mysql.jdbc.Driver" | 15 | <jdbcConnection driverClass="com.mysql.jdbc.Driver" |
| 16 | - connectionURL="jdbc:mysql://localhost:3306/bysj" | 16 | + connectionURL="jdbc:mysql://localhost:3306/station" |
| 17 | userId="root" password="root"> | 17 | userId="root" password="root"> |
| 18 | </jdbcConnection> | 18 | </jdbcConnection> |
| 19 | <javaTypeResolver> | 19 | <javaTypeResolver> |
| @@ -68,7 +68,13 @@ | @@ -68,7 +68,13 @@ | ||
| 68 | <!-- <table tableName="land_businesstype_list" domainObjectName="LandBusinessTypeList" enableCountByExample="false" | 68 | <!-- <table tableName="land_businesstype_list" domainObjectName="LandBusinessTypeList" enableCountByExample="false" |
| 69 | enableUpdateByExample="false" | 69 | enableUpdateByExample="false" |
| 70 | enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>--> | 70 | enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>--> |
| 71 | - <table tableName="land_road_ve_record" domainObjectName="LandRoadVe" enableCountByExample="false" | 71 | + <!-- <table tableName="land_businesstype_list" domainObjectName="LandBusinessTypeList" enableCountByExample="false" |
| 72 | + enableUpdateByExample="false" | ||
| 73 | + enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>--> | ||
| 74 | + <!-- <table tableName="ResMessage" domainObjectName="RESMESSAGE" enableCountByExample="false" | ||
| 75 | + enableUpdateByExample="false" | ||
| 76 | + enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>--> | ||
| 77 | + <table tableName="land_businesstype_list" domainObjectName="LandBusinessTypeList" enableCountByExample="false" | ||
| 72 | enableUpdateByExample="false" | 78 | enableUpdateByExample="false" |
| 73 | enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table> | 79 | enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table> |
| 74 | </context> | 80 | </context> |
| @@ -28,12 +28,18 @@ | @@ -28,12 +28,18 @@ | ||
| 28 | <result column="UPDATE_BY" jdbcType="VARCHAR" property="updateBy" /> | 28 | <result column="UPDATE_BY" jdbcType="VARCHAR" property="updateBy" /> |
| 29 | <result column="UPDATE_DATE" jdbcType="TIMESTAMP" property="updateDate" /> | 29 | <result column="UPDATE_DATE" jdbcType="TIMESTAMP" property="updateDate" /> |
| 30 | <result column="ISVALID" jdbcType="VARCHAR" property="isvalid" /> | 30 | <result column="ISVALID" jdbcType="VARCHAR" property="isvalid" /> |
| 31 | + <result column="AISLEWT" jdbcType="DOUBLE" property="aislewt" /> | ||
| 32 | + <result column="ISFULL" jdbcType="VARCHAR" property="isfull" /> | ||
| 33 | + <result column="REMARK" jdbcType="VARCHAR" property="remark" /> | ||
| 34 | + <result column="REMARK1" jdbcType="VARCHAR" property="remark1" /> | ||
| 35 | + <result column="REMARK2" jdbcType="VARCHAR" property="remark2" /> | ||
| 31 | </resultMap> | 36 | </resultMap> |
| 32 | <sql id="Base_Column_List"> | 37 | <sql id="Base_Column_List"> |
| 33 | id, MASSAGE_ID, TRAILER_FRAME_NO, TRAILER_LICENSE_NO, MASTER_LIST, PRODECT_TIME, | 38 | id, MASSAGE_ID, TRAILER_FRAME_NO, TRAILER_LICENSE_NO, MASTER_LIST, PRODECT_TIME, |
| 34 | IS_DELETE, AGENTNO, AGENTNAME, COCODE, DRIVERNAME, DRIVERID, STARTPORT, ENDPORT, | 39 | IS_DELETE, AGENTNO, AGENTNAME, COCODE, DRIVERNAME, DRIVERID, STARTPORT, ENDPORT, |
| 35 | STARTSATATION, ENDSTATION, AISLE, BUSINESSTYPE, TURNOVERFLAG, BARCODE, CONTRASTFLAG, | 40 | STARTSATATION, ENDSTATION, AISLE, BUSINESSTYPE, TURNOVERFLAG, BARCODE, CONTRASTFLAG, |
| 36 | - CREATE_BY, CREATE_DATE, UPDATE_BY, UPDATE_DATE, ISVALID | 41 | + CREATE_BY, CREATE_DATE, UPDATE_BY, UPDATE_DATE, ISVALID, AISLEWT, ISFULL, REMARK, |
| 42 | + REMARK1, REMARK2 | ||
| 37 | </sql> | 43 | </sql> |
| 38 | <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> | 44 | <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> |
| 39 | select | 45 | select |
| @@ -66,14 +72,21 @@ | @@ -66,14 +72,21 @@ | ||
| 66 | from land_businesstype_list | 72 | from land_businesstype_list |
| 67 | where BARCODE = #{barcode,jdbcType=VARCHAR} | 73 | where BARCODE = #{barcode,jdbcType=VARCHAR} |
| 68 | </select> | 74 | </select> |
| 69 | - <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> | ||
| 70 | - delete from land_businesstype_list | ||
| 71 | - where id = #{id,jdbcType=VARCHAR} | ||
| 72 | - </delete> | 75 | + |
| 76 | + <select id="selectMessageId" parameterType="java.lang.String" resultMap="BaseResultMap"> | ||
| 77 | + select | ||
| 78 | + <include refid="Base_Column_List" /> | ||
| 79 | + from land_businesstype_list | ||
| 80 | + where MASSAGE_ID = #{massageId,jdbcType=VARCHAR} | ||
| 81 | + </select> | ||
| 73 | 82 | ||
| 74 | <update id="updateByBarCode" parameterType="java.lang.String"> | 83 | <update id="updateByBarCode" parameterType="java.lang.String"> |
| 75 | update land_businesstype_list set ISVALID = "1" where BARCODE=#{barcode,jdbcType=VARCHAR}; | 84 | update land_businesstype_list set ISVALID = "1" where BARCODE=#{barcode,jdbcType=VARCHAR}; |
| 76 | </update> | 85 | </update> |
| 86 | + <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> | ||
| 87 | + delete from land_businesstype_list | ||
| 88 | + where id = #{id,jdbcType=VARCHAR} | ||
| 89 | + </delete> | ||
| 77 | <insert id="insert" parameterType="com.sy.model.LandBusinessTypeList"> | 90 | <insert id="insert" parameterType="com.sy.model.LandBusinessTypeList"> |
| 78 | insert into land_businesstype_list (id, MASSAGE_ID, TRAILER_FRAME_NO, | 91 | insert into land_businesstype_list (id, MASSAGE_ID, TRAILER_FRAME_NO, |
| 79 | TRAILER_LICENSE_NO, MASTER_LIST, PRODECT_TIME, | 92 | TRAILER_LICENSE_NO, MASTER_LIST, PRODECT_TIME, |
| @@ -83,7 +96,9 @@ | @@ -83,7 +96,9 @@ | ||
| 83 | ENDSTATION, AISLE, BUSINESSTYPE, | 96 | ENDSTATION, AISLE, BUSINESSTYPE, |
| 84 | TURNOVERFLAG, BARCODE, CONTRASTFLAG, | 97 | TURNOVERFLAG, BARCODE, CONTRASTFLAG, |
| 85 | CREATE_BY, CREATE_DATE, UPDATE_BY, | 98 | CREATE_BY, CREATE_DATE, UPDATE_BY, |
| 86 | - UPDATE_DATE, ISVALID) | 99 | + UPDATE_DATE, ISVALID, AISLEWT, |
| 100 | + ISFULL, REMARK, REMARK1, | ||
| 101 | + REMARK2) | ||
| 87 | values (#{id,jdbcType=VARCHAR}, #{massageId,jdbcType=VARCHAR}, #{trailerFrameNo,jdbcType=VARCHAR}, | 102 | values (#{id,jdbcType=VARCHAR}, #{massageId,jdbcType=VARCHAR}, #{trailerFrameNo,jdbcType=VARCHAR}, |
| 88 | #{trailerLicenseNo,jdbcType=VARCHAR}, #{masterList,jdbcType=VARCHAR}, #{prodectTime,jdbcType=TIMESTAMP}, | 103 | #{trailerLicenseNo,jdbcType=VARCHAR}, #{masterList,jdbcType=VARCHAR}, #{prodectTime,jdbcType=TIMESTAMP}, |
| 89 | #{isDelete,jdbcType=VARCHAR}, #{agentno,jdbcType=VARCHAR}, #{agentname,jdbcType=VARCHAR}, | 104 | #{isDelete,jdbcType=VARCHAR}, #{agentno,jdbcType=VARCHAR}, #{agentname,jdbcType=VARCHAR}, |
| @@ -92,7 +107,9 @@ | @@ -92,7 +107,9 @@ | ||
| 92 | #{endstation,jdbcType=VARCHAR}, #{aisle,jdbcType=VARCHAR}, #{businesstype,jdbcType=VARCHAR}, | 107 | #{endstation,jdbcType=VARCHAR}, #{aisle,jdbcType=VARCHAR}, #{businesstype,jdbcType=VARCHAR}, |
| 93 | #{turnoverflag,jdbcType=VARCHAR}, #{barcode,jdbcType=VARCHAR}, #{contrastflag,jdbcType=VARCHAR}, | 108 | #{turnoverflag,jdbcType=VARCHAR}, #{barcode,jdbcType=VARCHAR}, #{contrastflag,jdbcType=VARCHAR}, |
| 94 | #{createBy,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, | 109 | #{createBy,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, |
| 95 | - #{updateDate,jdbcType=TIMESTAMP}, #{isvalid,jdbcType=VARCHAR}) | 110 | + #{updateDate,jdbcType=TIMESTAMP}, #{isvalid,jdbcType=VARCHAR}, #{aislewt,jdbcType=DOUBLE}, |
| 111 | + #{isfull,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{remark1,jdbcType=VARCHAR}, | ||
| 112 | + #{remark2,jdbcType=VARCHAR}) | ||
| 96 | </insert> | 113 | </insert> |
| 97 | <insert id="insertSelective" parameterType="com.sy.model.LandBusinessTypeList"> | 114 | <insert id="insertSelective" parameterType="com.sy.model.LandBusinessTypeList"> |
| 98 | insert into land_businesstype_list | 115 | insert into land_businesstype_list |
| @@ -175,6 +192,21 @@ | @@ -175,6 +192,21 @@ | ||
| 175 | <if test="isvalid != null"> | 192 | <if test="isvalid != null"> |
| 176 | ISVALID, | 193 | ISVALID, |
| 177 | </if> | 194 | </if> |
| 195 | + <if test="aislewt != null"> | ||
| 196 | + AISLEWT, | ||
| 197 | + </if> | ||
| 198 | + <if test="isfull != null"> | ||
| 199 | + ISFULL, | ||
| 200 | + </if> | ||
| 201 | + <if test="remark != null"> | ||
| 202 | + REMARK, | ||
| 203 | + </if> | ||
| 204 | + <if test="remark1 != null"> | ||
| 205 | + REMARK1, | ||
| 206 | + </if> | ||
| 207 | + <if test="remark2 != null"> | ||
| 208 | + REMARK2, | ||
| 209 | + </if> | ||
| 178 | </trim> | 210 | </trim> |
| 179 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 211 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 180 | <if test="id != null"> | 212 | <if test="id != null"> |
| @@ -255,6 +287,21 @@ | @@ -255,6 +287,21 @@ | ||
| 255 | <if test="isvalid != null"> | 287 | <if test="isvalid != null"> |
| 256 | #{isvalid,jdbcType=VARCHAR}, | 288 | #{isvalid,jdbcType=VARCHAR}, |
| 257 | </if> | 289 | </if> |
| 290 | + <if test="aislewt != null"> | ||
| 291 | + #{aislewt,jdbcType=DOUBLE}, | ||
| 292 | + </if> | ||
| 293 | + <if test="isfull != null"> | ||
| 294 | + #{isfull,jdbcType=VARCHAR}, | ||
| 295 | + </if> | ||
| 296 | + <if test="remark != null"> | ||
| 297 | + #{remark,jdbcType=VARCHAR}, | ||
| 298 | + </if> | ||
| 299 | + <if test="remark1 != null"> | ||
| 300 | + #{remark1,jdbcType=VARCHAR}, | ||
| 301 | + </if> | ||
| 302 | + <if test="remark2 != null"> | ||
| 303 | + #{remark2,jdbcType=VARCHAR}, | ||
| 304 | + </if> | ||
| 258 | </trim> | 305 | </trim> |
| 259 | </insert> | 306 | </insert> |
| 260 | <update id="updateByPrimaryKeySelective" parameterType="com.sy.model.LandBusinessTypeList"> | 307 | <update id="updateByPrimaryKeySelective" parameterType="com.sy.model.LandBusinessTypeList"> |
| @@ -335,6 +382,21 @@ | @@ -335,6 +382,21 @@ | ||
| 335 | <if test="isvalid != null"> | 382 | <if test="isvalid != null"> |
| 336 | ISVALID = #{isvalid,jdbcType=VARCHAR}, | 383 | ISVALID = #{isvalid,jdbcType=VARCHAR}, |
| 337 | </if> | 384 | </if> |
| 385 | + <if test="aislewt != null"> | ||
| 386 | + AISLEWT = #{aislewt,jdbcType=DOUBLE}, | ||
| 387 | + </if> | ||
| 388 | + <if test="isfull != null"> | ||
| 389 | + ISFULL = #{isfull,jdbcType=VARCHAR}, | ||
| 390 | + </if> | ||
| 391 | + <if test="remark != null"> | ||
| 392 | + REMARK = #{remark,jdbcType=VARCHAR}, | ||
| 393 | + </if> | ||
| 394 | + <if test="remark1 != null"> | ||
| 395 | + REMARK1 = #{remark1,jdbcType=VARCHAR}, | ||
| 396 | + </if> | ||
| 397 | + <if test="remark2 != null"> | ||
| 398 | + REMARK2 = #{remark2,jdbcType=VARCHAR}, | ||
| 399 | + </if> | ||
| 338 | </set> | 400 | </set> |
| 339 | where id = #{id,jdbcType=VARCHAR} | 401 | where id = #{id,jdbcType=VARCHAR} |
| 340 | </update> | 402 | </update> |
| @@ -364,7 +426,12 @@ | @@ -364,7 +426,12 @@ | ||
| 364 | CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, | 426 | CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, |
| 365 | UPDATE_BY = #{updateBy,jdbcType=VARCHAR}, | 427 | UPDATE_BY = #{updateBy,jdbcType=VARCHAR}, |
| 366 | UPDATE_DATE = #{updateDate,jdbcType=TIMESTAMP}, | 428 | UPDATE_DATE = #{updateDate,jdbcType=TIMESTAMP}, |
| 367 | - ISVALID = #{isvalid,jdbcType=VARCHAR} | 429 | + ISVALID = #{isvalid,jdbcType=VARCHAR}, |
| 430 | + AISLEWT = #{aislewt,jdbcType=DOUBLE}, | ||
| 431 | + ISFULL = #{isfull,jdbcType=VARCHAR}, | ||
| 432 | + REMARK = #{remark,jdbcType=VARCHAR}, | ||
| 433 | + REMARK1 = #{remark1,jdbcType=VARCHAR}, | ||
| 434 | + REMARK2 = #{remark2,jdbcType=VARCHAR} | ||
| 368 | where id = #{id,jdbcType=VARCHAR} | 435 | where id = #{id,jdbcType=VARCHAR} |
| 369 | </update> | 436 | </update> |
| 370 | </mapper> | 437 | </mapper> |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | +<mapper namespace="com.sy.mapper.RESMESSAGEMapper"> | ||
| 4 | + <resultMap id="BaseResultMap" type="com.sy.model.RESMESSAGE"> | ||
| 5 | + <id column="id" jdbcType="VARCHAR" property="id" /> | ||
| 6 | + <result column="JourneyID" jdbcType="VARCHAR" property="journeyid" /> | ||
| 7 | + <result column="Manifest" jdbcType="VARCHAR" property="manifest" /> | ||
| 8 | + <result column="ResponseCode" jdbcType="VARCHAR" property="responsecode" /> | ||
| 9 | + <result column="ResponseText" jdbcType="VARCHAR" property="responsetext" /> | ||
| 10 | + </resultMap> | ||
| 11 | + <sql id="Base_Column_List"> | ||
| 12 | + id, JourneyID, Manifest, ResponseCode, ResponseText | ||
| 13 | + </sql> | ||
| 14 | + <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> | ||
| 15 | + select | ||
| 16 | + <include refid="Base_Column_List" /> | ||
| 17 | + from resmessage | ||
| 18 | + where id = #{id,jdbcType=VARCHAR} | ||
| 19 | + </select> | ||
| 20 | + <select id="selectByManifest" parameterType="java.lang.String" resultMap="BaseResultMap"> | ||
| 21 | + select | ||
| 22 | + <include refid="Base_Column_List" /> | ||
| 23 | + from resmessage | ||
| 24 | + where Manifest = #{manifest,jdbcType=VARCHAR} | ||
| 25 | + </select> | ||
| 26 | + <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> | ||
| 27 | + delete from resmessage | ||
| 28 | + where id = #{id,jdbcType=VARCHAR} | ||
| 29 | + </delete> | ||
| 30 | + <insert id="insert" parameterType="com.sy.model.RESMESSAGE"> | ||
| 31 | + insert into resmessage (id, JourneyID, Manifest, | ||
| 32 | + ResponseCode, ResponseText) | ||
| 33 | + values (#{id,jdbcType=VARCHAR}, #{journeyid,jdbcType=VARCHAR}, #{manifest,jdbcType=VARCHAR}, | ||
| 34 | + #{responsecode,jdbcType=VARCHAR}, #{responsetext,jdbcType=VARCHAR}) | ||
| 35 | + </insert> | ||
| 36 | + <insert id="insertSelective" parameterType="com.sy.model.RESMESSAGE"> | ||
| 37 | + insert into resmessage | ||
| 38 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
| 39 | + <if test="id != null"> | ||
| 40 | + id, | ||
| 41 | + </if> | ||
| 42 | + <if test="journeyid != null"> | ||
| 43 | + JourneyID, | ||
| 44 | + </if> | ||
| 45 | + <if test="manifest != null"> | ||
| 46 | + Manifest, | ||
| 47 | + </if> | ||
| 48 | + <if test="responsecode != null"> | ||
| 49 | + ResponseCode, | ||
| 50 | + </if> | ||
| 51 | + <if test="responsetext != null"> | ||
| 52 | + ResponseText, | ||
| 53 | + </if> | ||
| 54 | + </trim> | ||
| 55 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | ||
| 56 | + <if test="id != null"> | ||
| 57 | + #{id,jdbcType=VARCHAR}, | ||
| 58 | + </if> | ||
| 59 | + <if test="journeyid != null"> | ||
| 60 | + #{journeyid,jdbcType=VARCHAR}, | ||
| 61 | + </if> | ||
| 62 | + <if test="manifest != null"> | ||
| 63 | + #{manifest,jdbcType=VARCHAR}, | ||
| 64 | + </if> | ||
| 65 | + <if test="responsecode != null"> | ||
| 66 | + #{responsecode,jdbcType=VARCHAR}, | ||
| 67 | + </if> | ||
| 68 | + <if test="responsetext != null"> | ||
| 69 | + #{responsetext,jdbcType=VARCHAR}, | ||
| 70 | + </if> | ||
| 71 | + </trim> | ||
| 72 | + </insert> | ||
| 73 | + <update id="updateByPrimaryKeySelective" parameterType="com.sy.model.RESMESSAGE"> | ||
| 74 | + update resmessage | ||
| 75 | + <set> | ||
| 76 | + <if test="journeyid != null"> | ||
| 77 | + JourneyID = #{journeyid,jdbcType=VARCHAR}, | ||
| 78 | + </if> | ||
| 79 | + <if test="manifest != null"> | ||
| 80 | + Manifest = #{manifest,jdbcType=VARCHAR}, | ||
| 81 | + </if> | ||
| 82 | + <if test="responsecode != null"> | ||
| 83 | + ResponseCode = #{responsecode,jdbcType=VARCHAR}, | ||
| 84 | + </if> | ||
| 85 | + <if test="responsetext != null"> | ||
| 86 | + ResponseText = #{responsetext,jdbcType=VARCHAR}, | ||
| 87 | + </if> | ||
| 88 | + </set> | ||
| 89 | + where id = #{id,jdbcType=VARCHAR} | ||
| 90 | + </update> | ||
| 91 | + <update id="updateByPrimaryKey" parameterType="com.sy.model.RESMESSAGE"> | ||
| 92 | + update resmessage | ||
| 93 | + set JourneyID = #{journeyid,jdbcType=VARCHAR}, | ||
| 94 | + Manifest = #{manifest,jdbcType=VARCHAR}, | ||
| 95 | + ResponseCode = #{responsecode,jdbcType=VARCHAR}, | ||
| 96 | + ResponseText = #{responsetext,jdbcType=VARCHAR} | ||
| 97 | + where id = #{id,jdbcType=VARCHAR} | ||
| 98 | + </update> | ||
| 99 | +</mapper> |
-
请 注册 或 登录 后发表评论