作者 朱兆平

新舱单辅助管理-统一认证实体优化

@@ -37,12 +37,12 @@ spring: @@ -37,12 +37,12 @@ spring:
37 #eureka主机名,会在控制页面中显示 37 #eureka主机名,会在控制页面中显示
38 #DEV环境关闭注册。 38 #DEV环境关闭注册。
39 features: 39 features:
40 - enabled: true 40 + enabled: false
41 discovery: 41 discovery:
42 - enabled: true 42 + enabled: false
43 service-registry: 43 service-registry:
44 auto-registration: 44 auto-registration:
45 - enabled: true 45 + enabled: false
46 46
47 datasource: 47 datasource:
48 type: com.alibaba.druid.pool.DruidDataSource 48 type: com.alibaba.druid.pool.DruidDataSource
@@ -79,6 +79,11 @@ @@ -79,6 +79,11 @@
79 <artifactId>pagehelper-spring-boot-starter</artifactId> 79 <artifactId>pagehelper-spring-boot-starter</artifactId>
80 <version>1.2.5</version> 80 <version>1.2.5</version>
81 </dependency> 81 </dependency>
  82 + <dependency>
  83 + <groupId>com.alibaba</groupId>
  84 + <artifactId>fastjson</artifactId>
  85 + <version>1.2.51</version>
  86 + </dependency>
82 <!--&lt;!&ndash; mysql&ndash;&gt;--> 87 <!--&lt;!&ndash; mysql&ndash;&gt;-->
83 <!--<dependency>--> 88 <!--<dependency>-->
84 <!--<groupId>mysql</groupId>--> 89 <!--<groupId>mysql</groupId>-->
@@ -4,13 +4,13 @@ package com.tianbo.analysis.controller; @@ -4,13 +4,13 @@ package com.tianbo.analysis.controller;
4 import com.tianbo.analysis.model.FFMInfo; 4 import com.tianbo.analysis.model.FFMInfo;
5 import com.tianbo.analysis.model.ResultJson; 5 import com.tianbo.analysis.model.ResultJson;
6 import com.tianbo.analysis.service.FFMResolve; 6 import com.tianbo.analysis.service.FFMResolve;
  7 +import lombok.extern.slf4j.Slf4j;
7 import org.springframework.beans.factory.annotation.Autowired; 8 import org.springframework.beans.factory.annotation.Autowired;
8 import org.springframework.web.bind.annotation.*; 9 import org.springframework.web.bind.annotation.*;
9 10
10 -import java.util.Map;  
11 -  
12 @RestController 11 @RestController
13 @RequestMapping("/ffm") 12 @RequestMapping("/ffm")
  13 +@Slf4j
14 public class FFMController { 14 public class FFMController {
15 15
16 @Autowired 16 @Autowired
  1 +package com.tianbo.analysis.controller;
  2 +
  3 +
  4 +import com.tianbo.analysis.dao.ORIGINMANIFESTMASTERMapper;
  5 +import com.tianbo.analysis.model.ResultJson;
  6 +import com.tianbo.analysis.model.SENDLOG;
  7 +import org.springframework.web.bind.annotation.RequestMapping;
  8 +import org.springframework.web.bind.annotation.RequestParam;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import javax.annotation.Resource;
  12 +import java.util.List;
  13 +
  14 +/**
  15 + * 新舱单统计分析接口
  16 + * 航班日期/航班号
  17 + * 航班数量
  18 + * 主单单数
  19 + * 分单单数
  20 + * 舱单总件数/重量
  21 + * 理货总件数/重量
  22 + * 进出港分开
  23 + * 理货/与原始航班日期不对称
  24 + * 原始对应理货完毕配色
  25 + * 运单放行统计及配色
  26 + */
  27 +
  28 +/**
  29 + * 转运统计
  30 + */
  31 +
  32 +/**
  33 + * 关区统计
  34 + */
  35 +
  36 +@RestController
  37 +@RequestMapping("/static")
  38 +public class StatisticsController {
  39 +
  40 + @Resource
  41 + ORIGINMANIFESTMASTERMapper originmanifestmasterMapper;
  42 +
  43 + @RequestMapping("/import")
  44 + public ResultJson getById(@RequestParam(value = "startDate",required = true) String startDate,
  45 + @RequestParam(value = "endDate",required = true) String endDate){
  46 +
  47 + return new ResultJson<>("200","success",originmanifestmasterMapper.statics(startDate,endDate));
  48 + }
  49 +}
1 package com.tianbo.analysis.dao; 1 package com.tianbo.analysis.dao;
2 2
3 import com.tianbo.analysis.model.ORIGINMANIFESTMASTER; 3 import com.tianbo.analysis.model.ORIGINMANIFESTMASTER;
  4 +import org.apache.ibatis.annotations.Param;
4 5
5 import java.util.HashMap; 6 import java.util.HashMap;
  7 +import java.util.List;
  8 +import java.util.Map;
6 9
7 public interface ORIGINMANIFESTMASTERMapper { 10 public interface ORIGINMANIFESTMASTERMapper {
8 int insert(ORIGINMANIFESTMASTER record); 11 int insert(ORIGINMANIFESTMASTER record);
@@ -12,4 +15,6 @@ public interface ORIGINMANIFESTMASTERMapper { @@ -12,4 +15,6 @@ public interface ORIGINMANIFESTMASTERMapper {
12 int changeFlightDate(HashMap map); 15 int changeFlightDate(HashMap map);
13 16
14 ORIGINMANIFESTMASTER selectByAHBA(ORIGINMANIFESTMASTER record); 17 ORIGINMANIFESTMASTER selectByAHBA(ORIGINMANIFESTMASTER record);
  18 +
  19 + List<Map> statics(@Param("startDate") String var1, @Param("endDate")String var2);
15 } 20 }
@@ -72,6 +72,7 @@ public class FFMInfo implements Serializable { @@ -72,6 +72,7 @@ public class FFMInfo implements Serializable {
72 72
73 //报文内容 73 //报文内容
74 public String text; 74 public String text;
  75 + public Object tests;
75 public List<String> lineList; 76 public List<String> lineList;
76 public String order; 77 public String order;
77 public String planeNo; 78 public String planeNo;
@@ -8,61 +8,61 @@ import lombok.Data; @@ -8,61 +8,61 @@ import lombok.Data;
8 @Data 8 @Data
9 public class UserData { 9 public class UserData {
10 10
11 - private String USER_ID; 11 + public String USER_ID;
12 12
13 - private String USER_NAME; 13 + public String USER_NAME;
14 14
15 - private String USER_NO; 15 + public String USER_NO;
16 16
17 - private String MOBILE; 17 + public String MOBILE;
18 18
19 - private String IDCARD_NO; 19 + public String IDCARD_NO;
20 20
21 - private String COUNTRY; 21 + public String COUNTRY;
22 22
23 - private String SEX; 23 + public String SEX;
24 24
25 - private String NATIONALITY; 25 + public String NATIONALITY;
26 26
27 - private String OFFICE_PHONE; 27 + public String OFFICE_PHONE;
28 28
29 - private String OFFICE_ADDRESS; 29 + public String OFFICE_ADDRESS;
30 30
31 - private String EMAIL; 31 + public String EMAIL;
32 32
33 - private String JOB_LEVEL; 33 + public String JOB_LEVEL;
34 34
35 - private String JOB_TITLE; 35 + public String JOB_TITLE;
36 36
37 - private String JOB_TYPE; 37 + public String JOB_TYPE;
38 38
39 - private String JOB_STATUS; 39 + public String JOB_STATUS;
40 40
41 - private String JOB_POSITION; 41 + public String JOB_POSITION;
42 42
43 - private String SECRET_LEVEL; 43 + public String SECRET_LEVEL;
44 44
45 - private String USER_POST; 45 + public String USER_POST;
46 46
47 - private String USER_JOB_ID; 47 + public String USER_JOB_ID;
48 48
49 - private String ORG_ID; 49 + public String ORG_ID;
50 50
51 - private String USER_TITLE; 51 + public String USER_TITLE;
52 52
53 - private String LOGIN_NAME; 53 + public String LOGIN_NAME;
54 54
55 - private String SHOW_ORDER; 55 + public String SHOW_ORDER;
56 56
57 - private String REMARK; 57 + public String REMARK;
58 58
59 - private String NAIL_ID; 59 + public String NAIL_ID;
60 60
61 - private String PK_PSNDOC; 61 + public String PK_PSNDOC;
62 62
63 - private String PWD; 63 + public String PWD;
64 64
65 - private String PWD_ENCRYPT; 65 + public String PWD_ENCRYPT;
66 66
67 - private String UPDATE_TIME; 67 + public String UPDATE_TIME;
68 } 68 }
@@ -375,4 +375,36 @@ @@ -375,4 +375,36 @@
375 AND 375 AND
376 WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} 376 WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
377 </select> 377 </select>
  378 +
  379 + <select id="statics" resultType="map">
  380 + SELECT
  381 + FLIGHTNO,
  382 + ORIGINATINGSTATION,
  383 + DESTINATIONSTATION,
  384 + count( WAYBILLNOMASTER ) AS waybillTotal,
  385 + SUM( MANIFESTTOTALPIECE ) AS piece,
  386 + SUM( MANIFESTTOTALWEIGHT ) AS weight,
  387 + (SELECT
  388 + count(AUTOID)
  389 +FROM
  390 + ORIGINMANIFESTSECONDARY
  391 +WHERE
  392 + ORIGINMANIFESTMASTERAUTOID IN (
  393 + SELECT
  394 + AUTOID
  395 + FROM
  396 + ORIGINMANIFESTMASTER
  397 + WHERE
  398 + FLIGHT_DATE between TO_DATE( #{startDate,jdbcType=VARCHAR}, 'yyyy-MM-dd' ) and TO_DATE( #{endDate,jdbcType=VARCHAR}, 'yyyy-MM-dd' )
  399 + )) as awbhTotal
  400 +FROM
  401 + ORIGINMANIFESTMASTER
  402 +WHERE
  403 + DESTINATIONSTATION = 'CGO'
  404 + AND FLIGHT_DATE between TO_DATE( #{startDate,jdbcType=VARCHAR}, 'yyyy-MM-dd' ) and TO_DATE( #{endDate,jdbcType=VARCHAR}, 'yyyy-MM-dd' )
  405 +GROUP BY
  406 + FLIGHTNO,
  407 + ORIGINATINGSTATION,
  408 + DESTINATIONSTATION
  409 + </select>
378 </mapper> 410 </mapper>