ソースを参照

'销售订单接口'

HUJIANGUO 3 年 前
コミット
5e3c6bea90

+ 25 - 0
pom.xml

@@ -206,6 +206,31 @@
                     </execution>
                 </executions>
             </plugin>
+<!--                         自动生成代码文件-->
+<!--            <plugin>-->
+<!--                <groupId>com.steerinfo</groupId>-->
+<!--                <artifactId>generator-maven-plugin</artifactId>-->
+<!--                <version>3.0</version>-->
+<!--                <configuration>-->
+<!--                    <connUrl>jdbc:oracle:thin:@172.16.33.163:1521:ilsdbpri</connUrl>-->
+<!--                    <user>dil</user>-->
+<!--                    <password>Dil123789</password>-->
+<!--                    &lt;!&ndash;包名&ndash;&gt;-->
+<!--                    <targetPackage>com.steerinfo.dil</targetPackage>-->
+<!--                    <tables>-->
+<!--                        <table>
+</table>-->
+<!--                    </tables>-->
+<!--                </configuration>-->
+<!--                <executions>-->
+<!--                    <execution>-->
+<!--                        <phase>compile</phase>-->
+<!--                        <goals>-->
+<!--                            <goal>steerinfo</goal>-->
+<!--                        </goals>-->
+<!--                    </execution>-->
+<!--                </executions>-->
+<!--            </plugin>-->
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>

+ 9 - 9
src/main/java/com/steerinfo/dil/controller/TmsTruckQualityResultController.java

@@ -26,13 +26,13 @@ public class TmsTruckQualityResultController extends BaseRESTfulController {
     TmsTruckQualityService tmsTruckQualityService;
 
 
-    @ApiModelProperty(value = "发送磅单号,接收质检实绩信息")
-    @GetMapping("/insert")
-    @Transactional
-    public RESTfulResult addQualityResult() throws IOException, DocumentException {
-
-        tmsTruckQualityService.insertQualityResult();
-
-        return success();
-    }
+//    @ApiModelProperty(value = "发送磅单号,接收质检实绩信息")
+//    @GetMapping("/insert")
+//    @Transactional
+//    public RESTfulResult addQualityResult(String WzInputId) throws IOException, DocumentException {
+//
+//        return success(tmsTruckQualityService.insertQualityResult(WzInputId));
+//
+//
+//    }
 }

+ 7 - 2
src/main/java/com/steerinfo/dil/service/impl/TmsTruckQualityService.java

@@ -15,6 +15,7 @@ import org.apache.http.impl.client.HttpClientBuilder;
 import org.apache.http.util.EntityUtils;
 import org.dom4j.DocumentException;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Service;
 
 import com.steerinfo.dil.util.XmlToJsonUtil;
@@ -33,14 +34,15 @@ public class TmsTruckQualityService implements ITmsTruckQualityResultService {
     TmstruckQualityResultMapper tmstruckQualityResultMapper;
     @Autowired
     TmstruckWeightResultMapper tmstruckWeightResultMapper;
-
+    //定时访问质检系统,获取质检实绩
+    @Scheduled(cron = "* 1 * * * ?")
     @Override
     public int insertQualityResult() throws IOException, DocumentException {
         //先查出所有没有质检实绩的磅单号
         List<Map<String,Object>>mapList=tmstruckWeightResultMapper.selectWzInputId();
         System.out.println(mapList);
         System.out.println(mapList);
-        if (mapList.size()!=0){
+        if (mapList.size() != 0){
             for (Map<String,Object> map:mapList
             ) {
                 String  WzInputId=(String) map.get("WzInputId");
@@ -65,6 +67,9 @@ public class TmsTruckQualityService implements ITmsTruckQualityResultService {
                         Map<String, Object>map1 = (Map<String, Object>) object.get("JsonResult");
                         System.out.println(map1);
                         List mapList2= JSON.parseArray((String) map1.get("jsonResult"));
+                        if(mapList2.size() == 0){
+                            return 0;
+                        }
                         List<Map<String,Object>>mapList9=mapList2;
                         for (Map<String,Object> map3:mapList9
                         ) {

+ 0 - 3
src/main/resources/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.xml

@@ -622,9 +622,6 @@
         select twr.RESULT_POUND_NO "WzInputId",
                twr.RESULT_TOTAL_ID "resultTotalId"
         from TMSTRUCK_WEIGHT_RESULT twr
-        where twr.ISDEDUCT=1
-        and
-        twr.ISQUALITY=0
     </select>
     <update id="updateWzInputId">
         update TMSTRUCK_WEIGHT_RESULT twr