作者 Promise

提交版本

正在显示 54 个修改的文件 包含 3791 行增加0 行删除

要显示太多修改。

为保证性能只显示 54 of 54+ 个文件。

  1 +# java_base
  2 +基于java springmvc集成mybatis、mybatis Generator、maven、shiro的基本项目开发框架
  1 +Manifest-Version: 1.0
  2 +Class-Path:
  3 +
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<project xmlns="http://maven.apache.org/POM/4.0.0"
  3 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5 + <modelVersion>4.0.0</modelVersion>
  6 +
  7 + <groupId>com.tianbo</groupId>
  8 + <artifactId>statistics</artifactId>
  9 + <version>1.0-SNAPSHOT</version>
  10 + <build>
  11 + <finalName>statistics</finalName>
  12 + <plugins>
  13 + <!--mybatis 逆向工程插件-->
  14 + <plugin>
  15 + <groupId>org.mybatis.generator</groupId>
  16 + <artifactId>mybatis-generator-maven-plugin</artifactId>
  17 + <version>1.3.2</version>
  18 + <configuration>
  19 + <verbose>true</verbose>
  20 + <overwrite>true</overwrite>
  21 + </configuration>
  22 + <dependencies>
  23 + <dependency>
  24 + <groupId>com.tianbo</groupId>
  25 + <artifactId>plugin</artifactId>
  26 + <version>1.0</version>
  27 + <scope>system</scope>
  28 + <systemPath>/Users/mrz/Documents/maven/plugin.jar</systemPath>
  29 + </dependency>
  30 + </dependencies>
  31 + </plugin>
  32 +
  33 + <plugin>
  34 + <groupId>org.apache.maven.plugins</groupId>
  35 + <artifactId>maven-surefire-plugin</artifactId>
  36 + <version>2.19.1</version>
  37 + <configuration>
  38 + <includes>
  39 + <include>**/*.java</include>
  40 + </includes>
  41 + </configuration>
  42 + </plugin>
  43 + </plugins>
  44 + </build>
  45 + <properties>
  46 + <spring.version>4.3.10.RELEASE</spring.version>
  47 + <shiro.version>1.2.3</shiro.version>
  48 +
  49 + <!-- log4j日志文件管理包版本 -->
  50 + <slf4j.version>1.6.6</slf4j.version>
  51 + <log4j.version>1.2.17</log4j.version>
  52 + <commons-lang3.version>3.3</commons-lang3.version>
  53 + <commons-collections.version>3.2.1</commons-collections.version>
  54 + <jackson.version>2.8.9</jackson.version>
  55 + <junit.version>4.12</junit.version>
  56 + <ehcache.version>2.6.8</ehcache.version>
  57 + </properties>
  58 +
  59 + <dependencies>
  60 + <!-- springframe start -->
  61 + <dependency>
  62 + <groupId>org.springframework</groupId>
  63 + <artifactId>spring-core</artifactId>
  64 + <version>${spring.version}</version>
  65 + </dependency>
  66 +
  67 + <dependency>
  68 + <groupId>org.springframework</groupId>
  69 + <artifactId>spring-web</artifactId>
  70 + <version>${spring.version}</version>
  71 + </dependency>
  72 +
  73 + <dependency>
  74 + <groupId>org.springframework</groupId>
  75 + <artifactId>spring-oxm</artifactId>
  76 + <version>${spring.version}</version>
  77 + </dependency>
  78 +
  79 + <dependency>
  80 + <groupId>org.springframework</groupId>
  81 + <artifactId>spring-tx</artifactId>
  82 + <version>${spring.version}</version>
  83 + </dependency>
  84 +
  85 + <dependency>
  86 + <groupId>org.springframework</groupId>
  87 + <artifactId>spring-jdbc</artifactId>
  88 + <version>${spring.version}</version>
  89 + </dependency>
  90 +
  91 + <dependency>
  92 + <groupId>org.springframework</groupId>
  93 + <artifactId>spring-webmvc</artifactId>
  94 + <version>${spring.version}</version>
  95 + </dependency>
  96 +
  97 + <dependency>
  98 + <groupId>org.springframework</groupId>
  99 + <artifactId>spring-aop</artifactId>
  100 + <version>${spring.version}</version>
  101 + </dependency>
  102 +
  103 + <dependency>
  104 + <groupId>org.springframework</groupId>
  105 + <artifactId>spring-context-support</artifactId>
  106 + <version>${spring.version}</version>
  107 + </dependency>
  108 +
  109 + <dependency>
  110 + <groupId>org.springframework</groupId>
  111 + <artifactId>spring-test</artifactId>
  112 + <version>${spring.version}</version>
  113 + </dependency>
  114 +
  115 +
  116 + <!-- springframe end -->
  117 +
  118 + <!--aspectj start-->
  119 + <dependency>
  120 + <groupId>org.aspectj</groupId>
  121 + <artifactId>aspectjweaver</artifactId>
  122 + <version>1.8.6</version>
  123 + </dependency>
  124 + <dependency>
  125 + <groupId>com.google.code.gson</groupId>
  126 + <artifactId>gson</artifactId>
  127 + <version>2.6.2</version>
  128 + </dependency>
  129 +
  130 + <dependency>
  131 + <groupId>org.aspectj</groupId>
  132 + <artifactId>aspectjrt</artifactId>
  133 + <version>1.8.6</version>
  134 + </dependency>
  135 + <!--aspectj end-->
  136 +
  137 + <!--commons-io start-->
  138 + <dependency>
  139 + <groupId>commons-io</groupId>
  140 + <artifactId>commons-io</artifactId>
  141 + <version>2.4</version>
  142 + </dependency>
  143 + <!--commons-io end-->
  144 +
  145 + <!--c3p0-->
  146 + <dependency>
  147 + <groupId>com.mchange</groupId>
  148 + <artifactId>c3p0</artifactId>
  149 + <version>0.9.5.1</version>
  150 + </dependency>
  151 +
  152 + <dependency>
  153 + <groupId>org.jdom</groupId>
  154 + <artifactId>jdom2</artifactId>
  155 + <version>2.0.6</version>
  156 + </dependency>
  157 +
  158 +
  159 + <!--servlet/jsp api start-->
  160 + <dependency>
  161 + <groupId>javax.servlet</groupId>
  162 + <artifactId>servlet-api</artifactId>
  163 + <version>2.5</version>
  164 + </dependency>
  165 +
  166 + <dependency>
  167 + <groupId>javax.servlet.jsp</groupId>
  168 + <artifactId>jsp-api</artifactId>
  169 + <version>2.1</version>
  170 + <scope>provided</scope>
  171 + </dependency>
  172 + <!--servlet/jsp api end-->
  173 +
  174 + <!--junit4-->
  175 + <dependency>
  176 + <groupId>junit</groupId>
  177 + <artifactId>junit</artifactId>
  178 + <version>${junit.version}</version>
  179 + <scope>test</scope>
  180 + </dependency>
  181 +
  182 + <!--mybatis-->
  183 + <dependency>
  184 + <groupId>org.mybatis</groupId>
  185 + <artifactId>mybatis</artifactId>
  186 + <version>3.3.0</version>
  187 + </dependency>
  188 + <!--mybatis spring整合-->
  189 + <dependency>
  190 + <groupId>org.mybatis</groupId>
  191 + <artifactId>mybatis-spring</artifactId>
  192 + <version>1.2.3</version>
  193 + </dependency>
  194 +
  195 + <!--mysql driver-->
  196 + <dependency>
  197 + <groupId>mysql</groupId>
  198 + <artifactId>mysql-connector-java</artifactId>
  199 + <version>5.1.6</version>
  200 + </dependency>
  201 +
  202 + <!--jstl-->
  203 + <dependency>
  204 + <groupId>jstl</groupId>
  205 + <artifactId>jstl</artifactId>
  206 + <version>1.2</version>
  207 + </dependency>
  208 +
  209 + <!--oracle driver-->
  210 + <dependency>
  211 + <groupId>com.oracle</groupId>
  212 + <artifactId>ojdbc6</artifactId>
  213 + <version>11.2.0.4.0-atlassian-hosted</version>
  214 + </dependency>
  215 +
  216 +
  217 + <!-- ehcache -->
  218 + <dependency>
  219 + <groupId>net.sf.ehcache</groupId>
  220 + <artifactId>ehcache-core</artifactId>
  221 + <version>${ehcache.version}</version>
  222 + </dependency>
  223 + <!--shiro-->
  224 + <dependency>
  225 + <groupId>org.apache.shiro</groupId>
  226 + <artifactId>shiro-core</artifactId>
  227 + <version>${shiro.version}</version>
  228 + </dependency>
  229 + <dependency>
  230 + <groupId>org.apache.shiro</groupId>
  231 + <artifactId>shiro-web</artifactId>
  232 + <version>${shiro.version}</version>
  233 + </dependency>
  234 + <dependency>
  235 + <groupId>org.apache.shiro</groupId>
  236 + <artifactId>shiro-cas</artifactId>
  237 + <version>${shiro.version}</version>
  238 + </dependency>
  239 + <dependency>
  240 + <groupId>org.apache.shiro</groupId>
  241 + <artifactId>shiro-spring</artifactId>
  242 + <version>${shiro.version}</version>
  243 + </dependency>
  244 + <dependency>
  245 + <groupId>org.apache.shiro</groupId>
  246 + <artifactId>shiro-ehcache</artifactId>
  247 + <version>${shiro.version}</version>
  248 + </dependency>
  249 +
  250 + <!-- 日志文件管理包 -->
  251 + <!-- log start -->
  252 + <dependency>
  253 + <groupId>log4j</groupId>
  254 + <artifactId>log4j</artifactId>
  255 + <version>${log4j.version}</version>
  256 + </dependency>
  257 + <dependency>
  258 + <groupId>org.slf4j</groupId>
  259 + <artifactId>slf4j-api</artifactId>
  260 + <version>${slf4j.version}</version>
  261 + </dependency>
  262 + <dependency>
  263 + <groupId>org.slf4j</groupId>
  264 + <artifactId>slf4j-log4j12</artifactId>
  265 + <version>${slf4j.version}</version>
  266 + </dependency>
  267 + <!-- log end -->
  268 +
  269 + <dependency>
  270 + <groupId>commons-collections</groupId>
  271 + <artifactId>commons-collections</artifactId>
  272 + <version>${commons-collections.version}</version>
  273 + </dependency>
  274 +
  275 + <dependency>
  276 + <groupId>org.apache.commons</groupId>
  277 + <artifactId>commons-lang3</artifactId>
  278 + <version>${commons-lang3.version}</version>
  279 + </dependency>
  280 +
  281 + <!--jackson-->
  282 + <dependency>
  283 + <groupId>com.fasterxml.jackson.core</groupId>
  284 + <artifactId>jackson-core</artifactId>
  285 + <version>${jackson.version}</version>
  286 + </dependency>
  287 + <dependency>
  288 + <groupId>com.fasterxml.jackson.core</groupId>
  289 + <artifactId>jackson-databind</artifactId>
  290 + <version>${jackson.version}</version>
  291 + </dependency>
  292 + <dependency>
  293 + <groupId>com.fasterxml.jackson.core</groupId>
  294 + <artifactId>jackson-annotations</artifactId>
  295 + <version>${jackson.version}</version>
  296 + </dependency>
  297 +
  298 + <dependency>
  299 + <groupId>org.apache.cxf</groupId>
  300 + <artifactId>cxf</artifactId>
  301 + <version>2.7.18</version>
  302 + <type>pom</type>
  303 + </dependency>
  304 +
  305 +
  306 + </dependencies>
  307 +</project>
  1 +package com.tianbo.common;
  2 +
  3 +import com.tianbo.util.dao.Page;
  4 +import com.tianbo.util.dao.Totals;
  5 +
  6 +import java.io.Serializable;
  7 +import java.util.List;
  8 +
  9 +/**
  10 + * 返回对象以及对象分页
  11 + * @param <T>
  12 + */
  13 +public class ModelAndPage<T> implements Serializable {
  14 +
  15 + private static final long serialVersionUID = 6732325477388107799L;
  16 +
  17 + private List<T> modelList;
  18 +
  19 + private Page page;
  20 +
  21 + private Totals totals;
  22 +
  23 +
  24 + public ModelAndPage(){
  25 +
  26 + }
  27 + public ModelAndPage(List<T> list,Page page){
  28 + this.modelList = list;
  29 + this.page = page;
  30 + }
  31 + public ModelAndPage(List<T> list,Page page,Totals totals){
  32 + this.modelList = list;
  33 + this.page = page;
  34 + this.totals = totals;
  35 + }
  36 +
  37 + public List<T> getModel() {
  38 + return modelList;
  39 + }
  40 +
  41 + public void setModel(List<T> model) {
  42 + this.modelList = model;
  43 + }
  44 +
  45 + public Page getPage() {
  46 + return page;
  47 + }
  48 +
  49 + public void setPage(Page page) {
  50 + this.page = page;
  51 + }
  52 +
  53 + public Totals getTotals() {
  54 + return totals;
  55 + }
  56 +
  57 + public void setTotals(Totals totals) {
  58 + this.totals = totals;
  59 + }
  60 +
  61 +
  62 +}
  1 +package com.tianbo.common;
  2 +/**
  3 + * 解析XML文件
  4 + * @author zhangfan
  5 + *
  6 + */
  7 +
  8 +import java.io.File;
  9 +import java.io.FileInputStream;
  10 +import java.io.IOException;
  11 +import java.util.ArrayList;
  12 +import java.util.List;
  13 +
  14 +
  15 +import org.jdom2.Document;
  16 +import org.jdom2.Element;
  17 +import org.jdom2.input.SAXBuilder;
  18 +
  19 +import com.tianbo.util.PropertiesUtils;
  20 +import com.tianbo.util.dao.flightMsg;
  21 +
  22 +public class ReadXML {
  23 +
  24 + private List<flightMsg> flightMsg = null;
  25 + private flightMsg flightBean = null;
  26 + private List<String> path = null;
  27 + private int count = 0;
  28 +
  29 + public List<String> fileName(String fileName) {
  30 + File file = new File(fileName);
  31 + if(!file.exists()){//判断文件夹是否创建,没有创建则创建新文件夹
  32 + file.mkdirs();
  33 + }
  34 + File[] files = file.listFiles();
  35 + path = new ArrayList<String>();
  36 + for (int i = 0; i < files.length; i++) {
  37 + if (files[i].isFile()&&files[i].getPath().endsWith("xml")) {
  38 + String address = files[i].getPath();
  39 + String add = files[i].getName().substring(5, 9);
  40 + if(add.equals("1201")) {
  41 + path.add(address);
  42 + }
  43 + }
  44 + }
  45 + return path;
  46 + }
  47 +
  48 + public List<flightMsg> getFlightMassage(List<String> path) {
  49 + flightMsg = new ArrayList<flightMsg>();
  50 + for (int i = 0; i <path.size(); i++) {
  51 + String fileName =path.get(i);
  52 + SAXBuilder saxBuilder = new SAXBuilder();
  53 + try {
  54 + Document document = saxBuilder.build(new FileInputStream(fileName));
  55 + Element element = document.getRootElement();
  56 + List<Element> elementList = element.getChildren();
  57 + flightBean = new flightMsg();
  58 + for (Element msgElement : elementList) {
  59 + List<Element> children = msgElement.getChildren();
  60 + for (Element chiElement : children) {
  61 + if(chiElement.getName().equals("MessageID")){
  62 + String id = chiElement.getValue();
  63 + flightBean.setPath(fileName);
  64 + String massageId = id.substring(id.length()-6).trim();
  65 + flightBean.setMassageId(massageId);
  66 + }else
  67 + if (chiElement.getName().equals("BorderTransportMeans")) {
  68 + List<Element> list = chiElement.getChildren();
  69 + for (Element element1 : list) {
  70 + if (element1.getName().equals("JourneyID")) {
  71 + String flightNO = element1.getValue().trim();
  72 + String[] msg = flightNO.split("/");
  73 + flightBean.setFlightNO(msg[0]);
  74 + flightBean.setFlightData(msg[1]);
  75 + }
  76 + }
  77 + } else if (chiElement.getName().equals("Consignment")) {
  78 + List<Element> list = chiElement.getChildren();
  79 + for (Element element1 : list) {
  80 + if (element1.getName().equals("ConsignmentPackaging")) {
  81 + String orderPrice = element1.getValue().trim();
  82 + flightBean.setOrderPrice(orderPrice);
  83 + } else if (element1.getName().equals("TotalGrossMassMeasure")) {
  84 + double orderHeight = Double.parseDouble(element1.getValue());
  85 + flightBean.setOrderHeight(orderHeight);
  86 + } else if (element1.getName().equals("ConsignmentItem")) {
  87 + List<Element> Shippinglist = element1.getChildren();
  88 + for (Element element2 : Shippinglist) {
  89 + if (element2.getName().equals("ConsignmentItemPackaging")) {
  90 + String shippingBillPrice = element2.getValue().trim();
  91 + flightBean.setShippingBillPrice(shippingBillPrice);
  92 + } else if (element2.getName().equals("GoodsMeasure")) {
  93 + double shippingBillHeight = Double.parseDouble(element2.getValue());
  94 + flightBean.setShippingBillHeight(shippingBillHeight);
  95 + }
  96 + }
  97 + }else if (element1.getName().equals("TransportContractDocument")) {
  98 + List<Element> orderFormIds = element1.getChildren();
  99 + for (Element element2 : orderFormIds) {
  100 + if (element2.getName().equals("ID")) {
  101 + String orderFormId = element2.getValue();
  102 + flightBean.setOrderFormId(orderFormId);
  103 + }
  104 + }
  105 + }else if (element1.getName().equals("TransportSplitIndicator")) {
  106 + int struts = Integer.parseInt(element1.getValue());
  107 + flightBean.setIdentifying(struts);
  108 + }else if(element1.getName().equals("CustomsStatusCode")){
  109 + String customsStatusCode = element1.getValue().trim();
  110 + flightBean.setCustomsStatusCode(customsStatusCode);
  111 + }
  112 + }
  113 + }
  114 + }
  115 + }
  116 + } catch (Exception e) {
  117 + e.printStackTrace();
  118 + }
  119 + if(flightBean.getOrderPrice().equals(flightBean.getShippingBillPrice()) && Double.toString(flightBean.getOrderHeight()).equals(Double.toString(flightBean.getShippingBillHeight()))
  120 +
  121 + &&flightBean.getIdentifying() != 1 && flightBean.getCustomsStatusCode()!="002"){
  122 + sendFile s = new sendFile();
  123 + String patht = PropertiesUtils.readProperty("targetPath");
  124 + s.move(flightBean.getPath(), patht);
  125 + }else{
  126 + flightMsg.add(flightBean);
  127 + }
  128 + }
  129 + return flightMsg;
  130 +
  131 + }
  132 +
  133 + public static void main(String[] args) {
  134 +
  135 + // String fileName = "E:/xmlBean.xml";
  136 + String fileName = PropertiesUtils.readProperty("path");
  137 + // new ReadXML().fileName(fileName1);
  138 + List<String> path = new ReadXML().fileName("e:/");
  139 + List<flightMsg> xmlflightMsg = new ReadXML().getFlightMassage(path);
  140 + for (flightMsg flightBean : xmlflightMsg) {
  141 + System.out.println(flightBean);
  142 + }
  143 + }
  144 +
  145 + public List<String> fileName4(String fileName) {
  146 + File file = new File(fileName);
  147 + if(!file.exists()){//判断文件夹是否创建,没有创建则创建新文件夹
  148 + file.mkdirs();
  149 + }
  150 + File[] files = file.listFiles();
  151 + path = new ArrayList<String>();
  152 + for (int i = 0; i < files.length; i++) {
  153 + if (files[i].isFile()&&files[i].getPath().endsWith("xml")) {
  154 + String address = files[i].getPath();
  155 + String add = files[i].getName().substring(5, 9);
  156 + if(add.equals("2201")) {
  157 + path.add(address);
  158 + }
  159 + }
  160 + }
  161 + return path;
  162 + }
  163 +}
  1 +package com.tianbo.common;
  2 +
  3 +import java.io.File;
  4 +
  5 +import com.tianbo.util.PropertiesUtils;
  6 +
  7 +public class sendFile {
  8 +
  9 +
  10 + public void move(String fileName,String path) {
  11 +// String fileName="e://xmlBean.xml";
  12 +// String endPath = "d://";
  13 +
  14 + try {
  15 + File startFile = new File(fileName);
  16 + File tmpFile = new File(path);//获取文件夹路径
  17 + if(!tmpFile.exists()){//判断文件夹是否创建,没有创建则创建新文件夹
  18 + tmpFile.mkdirs();
  19 + }
  20 + System.out.println(path + startFile.getName());
  21 + if (startFile.renameTo(new File(path + startFile.getName()))) {
  22 + System.out.println("File is moved successful!");
  23 + } else {
  24 + System.out.println("File is failed to move!");
  25 + }
  26 + } catch (Exception e) {
  27 + e.printStackTrace();
  28 + }
  29 +
  30 +}
  31 +// public static void main(String[] args) {
  32 +// new sendFile().move("d://xmlBean.xml","e:/");
  33 +// }
  34 +}
  1 +package com.tianbo.controller;
  2 +
  3 +import java.util.List;
  4 +
  5 +import org.springframework.stereotype.Controller;
  6 +import org.springframework.web.bind.annotation.RequestMapping;
  7 +import org.springframework.web.servlet.ModelAndView;
  8 +
  9 +import com.tianbo.common.ReadXML;
  10 +import com.tianbo.util.PropertiesUtils;
  11 +import com.tianbo.util.dao.flightMsg;
  12 +
  13 +@Controller
  14 +public class CompareController {
  15 +
  16 + @RequestMapping("/compare1")
  17 + public ModelAndView dateCompare1() {
  18 + ModelAndView modelAndView = new ModelAndView();
  19 + String disk = PropertiesUtils.readProperty("path1");
  20 + List<String> path = new ReadXML().fileName(disk);
  21 + List<flightMsg> flightMsgs = new ReadXML().getFlightMassage(path);
  22 + modelAndView.addObject("list", flightMsgs);
  23 + modelAndView.setViewName("DateCompare");
  24 + return modelAndView;
  25 + }
  26 + @RequestMapping("/compareSDM")
  27 + public ModelAndView dateCompareSDM() {
  28 + ModelAndView modelAndView = new ModelAndView();
  29 + String disk = PropertiesUtils.readProperty("path2");
  30 + List<String> path = new ReadXML().fileName(disk);
  31 + List<flightMsg> flightMsgs = new ReadXML().getFlightMassage(path);
  32 + modelAndView.addObject("list", flightMsgs);
  33 + modelAndView.setViewName("DateCompare");
  34 + return modelAndView;
  35 + }
  36 + @RequestMapping("/compare3")
  37 + public ModelAndView dateCompare3() {
  38 + ModelAndView modelAndView = new ModelAndView();
  39 + String disk = PropertiesUtils.readProperty("path3");
  40 + List<String> path = new ReadXML().fileName(disk);
  41 + List<flightMsg> flightMsgs = new ReadXML().getFlightMassage(path);
  42 + modelAndView.addObject("list", flightMsgs);
  43 + modelAndView.setViewName("DateCompare");
  44 + return modelAndView;
  45 + }
  46 + @RequestMapping("/compare4")
  47 + public ModelAndView dateCompare4() {
  48 + ModelAndView modelAndView = new ModelAndView();
  49 + String disk = PropertiesUtils.readProperty("path4");
  50 + List<String> path = new ReadXML().fileName4(disk);
  51 + List<flightMsg> flightMsgs = new ReadXML().getFlightMassage(path);
  52 + modelAndView.addObject("list", flightMsgs);
  53 + modelAndView.setViewName("DateCompare");
  54 + return modelAndView;
  55 + }
  56 +}
  1 +package com.tianbo.controller;
  2 +
  3 +import java.text.SimpleDateFormat;
  4 +import java.util.Date;
  5 +import java.util.List;
  6 +import java.util.UUID;
  7 +
  8 +import javax.servlet.http.HttpServletRequest;
  9 +import javax.servlet.http.HttpSession;
  10 +
  11 +import org.springframework.beans.factory.annotation.Autowired;
  12 +import org.springframework.stereotype.Controller;
  13 +import org.springframework.ui.ModelMap;
  14 +import org.springframework.web.bind.annotation.RequestMapping;
  15 +import org.springframework.web.bind.annotation.RequestMethod;
  16 +import org.springframework.web.bind.annotation.RequestParam;
  17 +import org.springframework.web.bind.annotation.ResponseBody;
  18 +
  19 +import com.tianbo.model.Arrivedmaster;
  20 +import com.tianbo.model.Originmanifestmaster;
  21 +import com.tianbo.model.Originmanifestsecondary;
  22 +import com.tianbo.model.Preparemaster;
  23 +import com.tianbo.service.DataService;
  24 +import com.tianbo.service.imp.ArriveService;
  25 +import com.tianbo.service.imp.OriginmaniService;
  26 +import com.tianbo.service.imp.PreService;
  27 +import com.tianbo.util.DateUtils;
  28 +import com.tianbo.util.json.AjaxJson;
  29 +
  30 +/**
  31 + * 数据转预配Controller
  32 + * @author Promise
  33 + *
  34 + */
  35 +@Controller
  36 +@RequestMapping("/Data")
  37 +public class DataController {
  38 +
  39 + @Autowired
  40 + private DataService dataService;
  41 +
  42 +
  43 + @RequestMapping(value = "todata")
  44 + public String toTransForm() {
  45 + return "updateform";
  46 + }
  47 +
  48 + @RequestMapping(value = "toT")
  49 + public String toT() {
  50 + return "updateT";
  51 + }
  52 +
  53 + @RequestMapping(value = "updateMain", method = RequestMethod.POST)
  54 + @ResponseBody
  55 + public AjaxJson updateMain(HttpSession session,ModelMap modelMap,
  56 + @RequestParam String flightno,
  57 + @RequestParam String flightdate
  58 + )
  59 + {
  60 + String message = null;
  61 + AjaxJson j = new AjaxJson();
  62 +
  63 + try {
  64 + Originmanifestmaster mainfest = new Originmanifestmaster();
  65 + mainfest.setFlightno(flightno);
  66 + mainfest.setFlightDate(flightdate);
  67 + dataService.updateMain(mainfest);
  68 + j.setSuccess(true);
  69 + message = "主单更新完毕";
  70 + } catch (Exception e) {
  71 + j.setSuccess(false);
  72 + message = "主单更新失败";
  73 + // TODO Auto-generated catch block
  74 + e.printStackTrace();
  75 + }
  76 +
  77 + j.setMsg(message);
  78 + return j;
  79 + }
  80 +
  81 + @RequestMapping(value = "updateSecond", method = RequestMethod.POST)
  82 + @ResponseBody
  83 + public AjaxJson updateSecond(HttpSession session,ModelMap modelMap,
  84 + @RequestParam String flightno,
  85 + @RequestParam String flightdate
  86 + )
  87 + {
  88 +
  89 + String message = null;
  90 + AjaxJson j = new AjaxJson();
  91 +
  92 + try {
  93 + Originmanifestmaster mainfest = new Originmanifestmaster();
  94 + mainfest.setFlightno(flightno);
  95 + mainfest.setFlightDate(flightdate);
  96 + dataService.update(mainfest);
  97 + j.setSuccess(true);
  98 + message = "分单更新完成";
  99 + } catch (Exception e) {
  100 + j.setSuccess(false);
  101 + message = "分单更新失败";
  102 + // TODO Auto-generated catch block
  103 + e.printStackTrace();
  104 + }
  105 +
  106 + j.setMsg(message);
  107 + return j;
  108 + }
  109 +
  110 + @RequestMapping(value = "updateMainStatus", method = RequestMethod.POST)
  111 + @ResponseBody
  112 + public AjaxJson updateMainStatus(HttpSession session,ModelMap modelMap,
  113 + @RequestParam String flightno,
  114 + @RequestParam String flightdate
  115 + )
  116 + {
  117 + String message = null;
  118 + AjaxJson j = new AjaxJson();
  119 +
  120 + try {
  121 + Originmanifestmaster mainfest = new Originmanifestmaster();
  122 + mainfest.setFlightno(flightno);
  123 + mainfest.setFlightDate(flightdate);
  124 + dataService.updateMainStatus(mainfest);
  125 +
  126 + j.setSuccess(true);
  127 + message = "主单状态更新完成";
  128 + } catch (Exception e) {
  129 + j.setSuccess(false);
  130 + message = "主单状态更新失败";
  131 + e.printStackTrace();
  132 + }
  133 +
  134 + j.setMsg(message);
  135 + return j;
  136 + }
  137 +
  138 + @RequestMapping(value = "updateStatus", method = RequestMethod.POST)
  139 + @ResponseBody
  140 + public AjaxJson updateStatus(HttpSession session,ModelMap modelMap,
  141 + @RequestParam String flightno,
  142 + @RequestParam String flightdate
  143 + )
  144 + {
  145 + String message = null;
  146 + AjaxJson j = new AjaxJson();
  147 +
  148 + try {
  149 + Originmanifestmaster mainfest = new Originmanifestmaster();
  150 + mainfest.setFlightno(flightno);
  151 + mainfest.setFlightDate(flightdate);
  152 + dataService.updateStatus(mainfest);
  153 +
  154 + j.setSuccess(true);
  155 + message = "分单状态更新完成";
  156 + } catch (Exception e) {
  157 + j.setSuccess(false);
  158 + message = "分单状态更新失败";
  159 + // TODO Auto-generated catch block
  160 + e.printStackTrace();
  161 + }
  162 +
  163 + j.setMsg(message);
  164 + return j;
  165 + }
  166 +
  167 + @RequestMapping(value = "updateAllMainStatus", method = RequestMethod.POST)
  168 + @ResponseBody
  169 + public AjaxJson updateAllMainStatus(HttpSession session,ModelMap modelMap,
  170 + @RequestParam String flightno,
  171 + @RequestParam String flightdate
  172 + )
  173 + {
  174 + String message = null;
  175 + AjaxJson j = new AjaxJson();
  176 +
  177 + try {
  178 + Originmanifestmaster mainfest = new Originmanifestmaster();
  179 + mainfest.setFlightno(flightno);
  180 + mainfest.setFlightDate(flightdate);
  181 + dataService.updateAllMainStatus(mainfest);
  182 +
  183 + j.setSuccess(true);
  184 + message = "主单状态全部更新完成";
  185 + } catch (Exception e) {
  186 + j.setSuccess(false);
  187 + message = "主单状态全部更新失败";
  188 + e.printStackTrace();
  189 + }
  190 +
  191 + j.setMsg(message);
  192 + return j;
  193 + }
  194 +
  195 + @RequestMapping(value = "updateAllStatus", method = RequestMethod.POST)
  196 + @ResponseBody
  197 + public AjaxJson updateAllStatus(HttpSession session,ModelMap modelMap,
  198 + @RequestParam String flightno,
  199 + @RequestParam String flightdate
  200 + )
  201 + {
  202 + String message = null;
  203 + AjaxJson j = new AjaxJson();
  204 +
  205 + try {
  206 + Originmanifestmaster mainfest = new Originmanifestmaster();
  207 + mainfest.setFlightno(flightno);
  208 + mainfest.setFlightDate(flightdate);
  209 + dataService.updateAllStatus(mainfest);
  210 +
  211 + j.setSuccess(true);
  212 + message = "分单状态全部更新完成";
  213 + } catch (Exception e) {
  214 + j.setSuccess(false);
  215 + message = "分单状态全部更新失败";
  216 + // TODO Auto-generated catch block
  217 + e.printStackTrace();
  218 + }
  219 +
  220 + j.setMsg(message);
  221 + return j;
  222 + }
  223 +
  224 + @RequestMapping(value = "updateT", method = RequestMethod.POST)
  225 + @ResponseBody
  226 + public AjaxJson updateT(HttpSession session,ModelMap modelMap,@RequestParam String billNo)
  227 + {
  228 + String message = null;
  229 + AjaxJson j = new AjaxJson();
  230 +
  231 + try {
  232 + Originmanifestmaster mainfest = new Originmanifestmaster();
  233 + mainfest.setWaybillnomaster(billNo);
  234 + dataService.updateToT(mainfest);
  235 + j.setSuccess(true);
  236 + message = "分批标识更新完毕";
  237 + } catch (Exception e) {
  238 + j.setSuccess(false);
  239 + message = "分批标识更新失败,请检查单号或重试";
  240 + // TODO Auto-generated catch block
  241 + e.printStackTrace();
  242 + }
  243 +
  244 + j.setMsg(message);
  245 + return j;
  246 + }
  247 +}
  1 +package com.tianbo.controller;
  2 +
  3 +import com.tianbo.common.ModelAndPage;
  4 +import com.tianbo.service.EtlmessageService;
  5 +import com.tianbo.util.dao.Page;
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.stereotype.Controller;
  8 +import org.springframework.web.bind.annotation.ModelAttribute;
  9 +import org.springframework.web.bind.annotation.RequestMapping;
  10 +import org.springframework.web.servlet.ModelAndView;
  11 +
  12 +/**
  13 + * Created by Mr.Xu on 2017/9/14.
  14 + */
  15 +@Controller
  16 +@RequestMapping("/messagebak")
  17 +public class ETLMessageBakController {
  18 + @Autowired
  19 + private EtlmessageService etlmessageService;
  20 +
  21 + @RequestMapping("/showlist")
  22 + public ModelAndView findEtlMessage(@ModelAttribute Page page) throws Exception{
  23 + int pagelenth=10;
  24 + int start = 0;
  25 + if(page.getBegin()>=0){ start = page.getBegin(); }
  26 + if (page.getLength()>0){ pagelenth = page.getLength();}
  27 + ModelAndView modelAndView=new ModelAndView();
  28 + ModelAndPage modelAndPage=new ModelAndPage();
  29 + modelAndPage=etlmessageService.findEtlMessage(start,pagelenth);
  30 + modelAndView.addObject("modelAndPage",modelAndPage);
  31 + modelAndView.setViewName("messagebak/list");
  32 + return modelAndView;
  33 + }
  34 +
  35 + @RequestMapping("list")
  36 + public String list(){return "messagebak/list";}
  37 +}
  1 +package com.tianbo.controller;
  2 +
  3 +import org.springframework.stereotype.Controller;
  4 +import org.springframework.web.bind.annotation.RequestMapping;
  5 +
  6 +@Controller
  7 +public class IndexController {
  8 + @RequestMapping("/")
  9 + public String index(){
  10 + return "index";
  11 + }
  12 +
  13 + @RequestMapping("/index")
  14 + public String indexJSP(){
  15 + return "index";
  16 + }
  17 +}
  1 +package com.tianbo.controller;
  2 +
  3 +import com.tianbo.model.TKpiCargoWaybill;
  4 +import com.tianbo.service.KPICargoBillServcie;
  5 +import org.springframework.beans.factory.annotation.Autowired;
  6 +import org.springframework.stereotype.Controller;
  7 +import org.springframework.web.bind.annotation.RequestMapping;
  8 +import org.springframework.web.servlet.ModelAndView;
  9 +
  10 +/**
  11 + * 运单表
  12 + */
  13 +
  14 +@Controller
  15 +@RequestMapping("/kpi")
  16 +public class KPIController {
  17 +
  18 + @Autowired
  19 + KPICargoBillServcie kpiService;
  20 +
  21 + @RequestMapping("list")
  22 + public ModelAndView list(){
  23 + TKpiCargoWaybill waybill = new TKpiCargoWaybill();
  24 + return new ModelAndView("kpi/list","waybill",waybill);
  25 + }
  26 +}
  1 +package com.tianbo.controller;
  2 +
  3 +import com.tianbo.util.json.ResponseModel;
  4 +import org.slf4j.Logger;
  5 +import org.slf4j.LoggerFactory;
  6 +import org.apache.shiro.SecurityUtils;
  7 +import org.apache.shiro.authc.*;
  8 +import org.apache.shiro.authz.UnauthenticatedException;
  9 +import org.apache.shiro.subject.Subject;
  10 +import org.springframework.stereotype.Controller;
  11 +import org.springframework.transaction.annotation.Transactional;
  12 +import org.springframework.ui.Model;
  13 +import org.springframework.web.bind.annotation.RequestMapping;
  14 +import org.springframework.web.bind.annotation.RequestMethod;
  15 +import org.springframework.web.bind.annotation.ResponseBody;
  16 +import org.springframework.web.servlet.ModelAndView;
  17 +
  18 +
  19 +import javax.servlet.http.HttpServletRequest;
  20 +
  21 +/**
  22 + * Created by mrz on 2017/8/28.
  23 + */
  24 +@Controller
  25 +public class MainController {
  26 +
  27 + protected final Logger logger = LoggerFactory.getLogger(getClass());
  28 +
  29 + @RequestMapping("/login")
  30 + public String login(){
  31 + return "login";
  32 + }
  33 +
  34 + @RequestMapping("/main/info")
  35 + public String index(){
  36 + return "main/info";
  37 + }
  38 + @RequestMapping("/main")
  39 + public String main(){
  40 + return "main";
  41 + }
  42 +
  43 + @Transactional
  44 + @RequestMapping(value = "/doLogin", method = RequestMethod.POST)
  45 + @ResponseBody
  46 + public ResponseModel dologin(String username, String password, String captcha){
  47 +
  48 + ResponseModel md = new ResponseModel(200,"",null);
  49 +
  50 + String msg = "";
  51 + UsernamePasswordToken token = new UsernamePasswordToken(username,password);
  52 + token.setRememberMe(true);
  53 +
  54 + Subject subject = SecurityUtils.getSubject();
  55 +
  56 + logger.info("token="+token);
  57 + try {
  58 + subject.login(token);
  59 + if (subject.isAuthenticated()){
  60 + subject.getSession().setAttribute("username",username);
  61 + return md;
  62 + }
  63 + }catch (IncorrectCredentialsException e) {
  64 + msg = "登录密码错误. Password for account " + token.getPrincipal() + " was incorrect.";
  65 + md.setStatus(500);
  66 + System.out.println(msg);
  67 + } catch (ExcessiveAttemptsException e) {
  68 + msg = "登录失败次数过多";
  69 + md.setStatus(500);
  70 + System.out.println(msg);
  71 + } catch (LockedAccountException e) {
  72 + msg = "帐号已被锁定. The account for username " + token.getPrincipal() + " was locked.";
  73 + md.setStatus(500);
  74 +
  75 + System.out.println(msg);
  76 + } catch (DisabledAccountException e) {
  77 + msg = "帐号已被禁用. The account for username " + token.getPrincipal() + " was disabled.";
  78 + md.setStatus(500);
  79 + System.out.println(msg);
  80 + } catch (ExpiredCredentialsException e) {
  81 + msg = "帐号已过期. the account for username " + token.getPrincipal() + " was expired.";
  82 + md.setStatus(500);
  83 + System.out.println(msg);
  84 + } catch (UnknownAccountException e) {
  85 + msg = "帐号不存在. There is no user with username of " + token.getPrincipal();
  86 + md.setStatus(500);
  87 + System.out.println(msg);
  88 + } catch (UnauthenticatedException e) {
  89 + msg = "您没有得到相应的授权!" + e.getMessage();
  90 + md.setStatus(500);
  91 + System.out.println(msg);
  92 + }
  93 + md.setMsg(msg);
  94 + return md;
  95 + }
  96 +}
  1 +package com.tianbo.controller;
  2 +
  3 +import com.tianbo.model.TKpiCargoManifest;
  4 +import com.tianbo.service.ManiFestService;
  5 +import org.springframework.beans.factory.annotation.Autowired;
  6 +import org.springframework.stereotype.Controller;
  7 +import org.springframework.web.bind.annotation.RequestMapping;
  8 +import org.springframework.web.servlet.ModelAndView;
  9 +
  10 +/**
  11 + * 仓单表
  12 + */
  13 +
  14 +@Controller
  15 +@RequestMapping("/man")
  16 +public class ManiFestController {
  17 +
  18 + @Autowired
  19 + ManiFestService maniFestService;
  20 +
  21 + @RequestMapping("list")
  22 + public ModelAndView list(){
  23 + TKpiCargoManifest manifest = new TKpiCargoManifest();
  24 + return new ModelAndView("man/list","man",manifest);
  25 + }
  26 +}
  1 +package com.tianbo.controller;
  2 +
  3 +import com.tianbo.common.ModelAndPage;
  4 +import com.tianbo.model.TOlapColumn;
  5 +import com.tianbo.model.TOlapDataset;
  6 +import com.tianbo.service.OlapColumnService;
  7 +import com.tianbo.service.OlapDataSetService;
  8 +import com.tianbo.util.dao.Page;
  9 +import org.springframework.beans.factory.annotation.Autowired;
  10 +import org.springframework.stereotype.Controller;
  11 +import org.springframework.web.bind.annotation.ModelAttribute;
  12 +import org.springframework.web.bind.annotation.RequestMapping;
  13 +import org.springframework.web.servlet.ModelAndView;
  14 +import org.springframework.web.servlet.mvc.support.RedirectAttributes;
  15 +
  16 +import javax.servlet.http.HttpServletRequest;
  17 +import java.math.BigDecimal;
  18 +import java.util.List;
  19 +
  20 +/**
  21 + * Created by Mr.Xu on 2017/9/13.
  22 + */
  23 +@Controller
  24 +@RequestMapping("/olapcolumn")
  25 +public class OlapColumnController {
  26 + @Autowired
  27 + private OlapColumnService olapColumnService;
  28 + @Autowired
  29 + private OlapDataSetService olapDataSetService;
  30 + @RequestMapping("showlist")
  31 + public ModelAndView findOlapColumn(@ModelAttribute Page page) throws Exception{
  32 + int pagelenth=10;
  33 + int start=0;
  34 + if(page.getBegin()>=0){start=page.getBegin();}
  35 + if(page.getLength()>0){pagelenth=page.getLength();}
  36 + ModelAndView modelAndView=new ModelAndView();
  37 + ModelAndPage modelAndPage=new ModelAndPage();
  38 + modelAndPage=olapColumnService.findOlapColumn(start,pagelenth);
  39 + List<TOlapDataset> olapDatasetList=olapDataSetService.findOlapDataSet();
  40 +
  41 + modelAndView.addObject("modelAndPage",modelAndPage);
  42 + modelAndView.addObject("olapDatasetList",olapDatasetList);
  43 + modelAndView.setViewName("olapcolumn/list");
  44 + return modelAndView;
  45 + }
  46 + @RequestMapping("/selectlist")
  47 + public ModelAndView selectOlapColumn(HttpServletRequest request,BigDecimal datasetid)throws Exception{
  48 + String id=request.getParameter("datasetid");
  49 + BigDecimal bd=new BigDecimal(id);
  50 + ModelAndView modelAndView=new ModelAndView();
  51 + List<TOlapColumn> tOlapColumnList=olapColumnService.selectOlapColumn(bd);
  52 + TOlapDataset tOlapDataset=olapDataSetService.findByid(bd);
  53 + modelAndView.addObject("tOlapColumnList",tOlapColumnList);
  54 + modelAndView.addObject("tOlapDataset",tOlapDataset);
  55 + modelAndView.setViewName("olapcolumn/list");
  56 + return modelAndView;
  57 + }
  58 + @RequestMapping("/findByid")
  59 + public ModelAndView findByid(HttpServletRequest request,BigDecimal columnid) throws Exception{
  60 + ModelAndView modelAndView=new ModelAndView();
  61 + String id=request.getParameter("columnid");
  62 + BigDecimal bd=new BigDecimal(id);
  63 + TOlapColumn olapColumn=olapColumnService.findByid(bd);
  64 + List<TOlapDataset> olapDatasetList=olapDataSetService.findOlapDataSet();
  65 + modelAndView.addObject("olapDatasetList",olapDatasetList);
  66 + modelAndView.addObject("olapColumn",olapColumn);
  67 + modelAndView.setViewName("olapcolumn/edit");
  68 + return modelAndView;
  69 + }
  70 + @RequestMapping("/addColumn")
  71 + public String addOlapColumn(HttpServletRequest request,TOlapColumn olapColumn,RedirectAttributes attr){
  72 + String columnname=request.getParameter("columnname");
  73 + String datafield=request.getParameter("datafield");
  74 + String nodename=request.getParameter("nodename");
  75 + String active=request.getParameter("active");
  76 + String datasetid=request.getParameter("datasetid");
  77 + olapColumn.setActive(active);
  78 + olapColumn.setDatasetid(new BigDecimal(datasetid));
  79 + olapColumn.setNodename(nodename);
  80 + olapColumn.setColumnname(columnname);
  81 + olapColumn.setDatafield(datafield);
  82 + olapColumnService.addOlapColumn(olapColumn);
  83 + attr.addAttribute("datasetid",new BigDecimal(datasetid));
  84 + return "redirect:/olapcolumn/selectlist";
  85 + }
  86 + @RequestMapping("/deleteByPrimaryKey")
  87 + public String deleteByPrimaryKey(HttpServletRequest request,BigDecimal columnid,RedirectAttributes attr){
  88 + String id=request.getParameter("columnid");
  89 + String datasetid=request.getParameter("datasetid");
  90 + BigDecimal bd=new BigDecimal(id);
  91 + olapColumnService.deleteByPrimaryKey(bd);
  92 + attr.addAttribute("datasetid",new BigDecimal(datasetid));
  93 + return "redirect:/olapcolumn/selectlist";
  94 + }
  95 + @RequestMapping("/updateColumn")
  96 + public String updateColumn(HttpServletRequest request,TOlapColumn olapColumn,RedirectAttributes attr){
  97 + String id=request.getParameter("columnid");
  98 + BigDecimal bd=new BigDecimal(id);
  99 + String columnname=request.getParameter("columnname");
  100 + String datafield=request.getParameter("datafield");
  101 + String nodename=request.getParameter("nodename");
  102 + String datasetid=request.getParameter("datasetid");
  103 + String active=request.getParameter("active");
  104 + olapColumn.setColumnid(bd);
  105 + olapColumn.setColumnname(columnname);
  106 + olapColumn.setDatafield(datafield);
  107 + olapColumn.setNodename(nodename);
  108 + olapColumn.setDatasetid(new BigDecimal(datasetid));
  109 + olapColumn.setActive(active);
  110 + olapColumnService.updateOlapColumn(olapColumn);
  111 + attr.addAttribute("datasetid",new BigDecimal(datasetid));
  112 + return "redirect:/olapcolumn/selectlist";
  113 + }
  114 + @RequestMapping("list")
  115 + public String list(){return "olapcolumn/list";}
  116 +
  117 +}
  1 +package com.tianbo.controller;
  2 +
  3 +import com.tianbo.common.ModelAndPage;
  4 +import com.tianbo.model.TOlapDataset;
  5 +import com.tianbo.service.OlapColumnService;
  6 +import com.tianbo.service.OlapDataSetService;
  7 +import com.tianbo.util.dao.Page;
  8 +import org.springframework.beans.factory.annotation.Autowired;
  9 +import org.springframework.stereotype.Controller;
  10 +import org.springframework.web.bind.annotation.ModelAttribute;
  11 +import org.springframework.web.bind.annotation.RequestMapping;
  12 +import org.springframework.web.servlet.ModelAndView;
  13 +
  14 +import javax.servlet.http.HttpServletRequest;
  15 +import java.math.BigDecimal;
  16 +
  17 +/**
  18 + * Created by Mr.Xu on 2017/9/12.
  19 + */
  20 +@Controller
  21 +@RequestMapping("/olapdata")
  22 +public class OlapDataSetController {
  23 + @Autowired
  24 + private OlapDataSetService olapDataSetService;
  25 + @Autowired
  26 + private OlapColumnService olapColumnService;
  27 + @RequestMapping("/showlist")
  28 + public ModelAndView findOlapDataSet(@ModelAttribute Page page) throws Exception {
  29 + int pagelenth=10;
  30 + int start=0;
  31 + if(page.getBegin()>=0){start=page.getBegin();}
  32 + if(page.getLength()>0){pagelenth=page.getLength();}
  33 + ModelAndView modelAndView = new ModelAndView();
  34 + ModelAndPage modelAndPage=new ModelAndPage();
  35 +
  36 + modelAndPage= olapDataSetService.findOlapDataSet(start,pagelenth);
  37 + modelAndView.addObject("modelAndPage", modelAndPage);
  38 + modelAndView.setViewName("olapdata/list");
  39 + return modelAndView;
  40 + }
  41 + @RequestMapping("/addDataset")
  42 + public ModelAndView addOlapDataset(HttpServletRequest request,TOlapDataset olapDataset) throws Exception {
  43 + String datasetname=request.getParameter("datasetname");
  44 + String viewname=request.getParameter("viewname");
  45 + String active=request.getParameter("active");
  46 + olapDataset.setDatasetname(datasetname);
  47 + olapDataset.setViewname(viewname);
  48 + olapDataset.setActive(active);
  49 + olapDataSetService.addOlapDataSet(olapDataset);
  50 + ModelAndView modelAndView=new ModelAndView();
  51 + modelAndView.setViewName("redirect:/olapdata/showlist");
  52 + return modelAndView;
  53 + }
  54 + @RequestMapping("/deleteDataset")
  55 + public String deleteDataset(HttpServletRequest request, BigDecimal datasetid){
  56 + String id=request.getParameter("datasetid");
  57 + BigDecimal bd=new BigDecimal(id);
  58 + int result = olapColumnService.deleteOlapColumn(bd);
  59 + if(result>0){
  60 + olapDataSetService.deleteOlapDataset(bd);
  61 + return "redirect:/olapdata/showlist";
  62 + }else {
  63 + return "500";
  64 + }
  65 +
  66 + }
  67 + @RequestMapping("/findByid")
  68 + public ModelAndView findByid(HttpServletRequest request,BigDecimal datasetid)throws Exception{
  69 + ModelAndView modelAndView=new ModelAndView();
  70 + String id=request.getParameter("datasetid");
  71 + TOlapDataset olapDataset=olapDataSetService.findByid(new BigDecimal(id));
  72 + modelAndView.addObject("olapDataset",olapDataset);
  73 + modelAndView.setViewName("olapdata/edit");
  74 + return modelAndView;
  75 + }
  76 + @RequestMapping("/updateDateset")
  77 + public String updateDateset(HttpServletRequest request,TOlapDataset olapDataset){
  78 + String datasetid=request.getParameter("datasetid");
  79 + String datasetname=request.getParameter("datasetname");
  80 + String viewname=request.getParameter("viewname");
  81 + String active=request.getParameter("active");
  82 + olapDataset.setDatasetid(new BigDecimal(datasetid));
  83 + olapDataset.setDatasetname(datasetname);
  84 + olapDataset.setViewname(viewname);
  85 + olapDataset.setActive(active);
  86 + olapDataSetService.updateOlapDataset(olapDataset);
  87 + return "redirect:/olapdata/showlist";
  88 + }
  89 + @RequestMapping("list")
  90 + public String list() {
  91 + return "olapdata/list";
  92 + }
  93 +}
  1 +package com.tianbo.controller;
  2 +
  3 +import com.tianbo.common.ModelAndPage;
  4 +import com.tianbo.model.TOlapDataset;
  5 +import com.tianbo.model.TOlapXmldoc;
  6 +import com.tianbo.service.OlapDataSetService;
  7 +import com.tianbo.service.OlapXmldocService;
  8 +import com.tianbo.service.OlapXmlnodeService;
  9 +import com.tianbo.util.dao.Page;
  10 +import org.springframework.beans.factory.annotation.Autowired;
  11 +import org.springframework.stereotype.Controller;
  12 +import org.springframework.web.bind.annotation.ModelAttribute;
  13 +import org.springframework.web.bind.annotation.RequestMapping;
  14 +import org.springframework.web.servlet.ModelAndView;
  15 +
  16 +import javax.servlet.http.HttpServletRequest;
  17 +import java.math.BigDecimal;
  18 +import java.util.List;
  19 +
  20 +/**
  21 + * Created by Mr.Xu on 2017/9/14.
  22 + */
  23 +@Controller
  24 +@RequestMapping("/olapxmldoc")
  25 +public class OlapXmldocController {
  26 + @Autowired
  27 + private OlapXmldocService olapXmldocService;
  28 + @Autowired
  29 + private OlapDataSetService olapDataSetService;
  30 + @Autowired
  31 + private OlapXmlnodeService olapXmlnodeService;
  32 + @RequestMapping("showlist")
  33 + public ModelAndView findXmldoc(@ModelAttribute Page page)throws Exception{
  34 + int pagelenth=10;
  35 + int start=0;
  36 + if(page.getBegin()>=0){start=page.getBegin();}
  37 + if(page.getLength()>0){pagelenth=page.getLength();}
  38 + ModelAndView modelAndView=new ModelAndView();
  39 + ModelAndPage modelAndPage=new ModelAndPage();
  40 + modelAndPage=olapXmldocService.findXmldoc(start,pagelenth);
  41 + List<TOlapDataset> olapDatasetList=olapDataSetService.findOlapDataSet();
  42 + modelAndView.addObject("modelAndPage",modelAndPage);
  43 + modelAndView.addObject("olapDatasetList",olapDatasetList);
  44 + modelAndView.setViewName("olapxmldoc/list");
  45 + return modelAndView;
  46 + }
  47 + @RequestMapping("addxmldoc")
  48 + public String addXmldoc(HttpServletRequest request,TOlapXmldoc olapXmldoc){
  49 + String doctype=request.getParameter("doctype");
  50 + String docname=request.getParameter("docname");
  51 + String datasetid=request.getParameter("datasetid");
  52 + String active=request.getParameter("active");
  53 + olapXmldoc.setDoctype(doctype);
  54 + olapXmldoc.setDocname(docname);
  55 + olapXmldoc.setDatasetid(new BigDecimal(datasetid));
  56 + olapXmldoc.setActive(active);
  57 + olapXmldocService.addXmldoc(olapXmldoc);
  58 + return "redirect:/olapxmldoc/showlist";
  59 + }
  60 + @RequestMapping("findByid")
  61 + public ModelAndView findByid(HttpServletRequest request,BigDecimal docid) throws Exception{
  62 + ModelAndView modelAndView=new ModelAndView();
  63 + String id=request.getParameter("docid");
  64 + BigDecimal bd=new BigDecimal(id);
  65 + TOlapXmldoc olapXmldoc=olapXmldocService.findByid(bd);
  66 + List<TOlapDataset> olapDatasetList=olapDataSetService.findOlapDataSet();
  67 + modelAndView.addObject("olapDatasetList",olapDatasetList);
  68 + modelAndView.addObject("olapXmldoc",olapXmldoc);
  69 + modelAndView.setViewName("olapxmldoc/edit");
  70 + return modelAndView;
  71 + }
  72 + @RequestMapping("updateXmldoc")
  73 + public String updateXmldoc(HttpServletRequest request,TOlapXmldoc olapXmldoc){
  74 + String docid=request.getParameter("docid");
  75 + String doctype=request.getParameter("doctype");
  76 + String docname=request.getParameter("docname");
  77 + String datasetid=request.getParameter("datasetid");
  78 + String active=request.getParameter("active");
  79 + olapXmldoc.setActive(active);
  80 + olapXmldoc.setDatasetid(new BigDecimal(datasetid));
  81 + olapXmldoc.setDocname(docname);
  82 + olapXmldoc.setDoctype(doctype);
  83 + olapXmldoc.setDocid(new BigDecimal(docid));
  84 + olapXmldocService.updateXmldoc(olapXmldoc);
  85 + return "redirect:/olapxmldoc/showlist";
  86 + }
  87 + @RequestMapping("deleteXmldoc")
  88 + public String updateXmldoc(HttpServletRequest request,BigDecimal docid){
  89 + String id=request.getParameter("docid");
  90 + int result=olapXmlnodeService.deleteXmlnode(new BigDecimal(id));
  91 + if(result>0){
  92 + olapXmldocService.deleteXmldoc(new BigDecimal(id));
  93 + return "redirect:/olapxmldoc/showlist";
  94 + }else{
  95 + return "500";
  96 + }
  97 + }
  98 +}
  1 +package com.tianbo.controller;
  2 +
  3 +import com.tianbo.common.ModelAndPage;
  4 +import com.tianbo.model.TOlapColumn;
  5 +import com.tianbo.model.TOlapXmldoc;
  6 +import com.tianbo.model.TOlapXmlnode;
  7 +import com.tianbo.service.OlapColumnService;
  8 +import com.tianbo.service.OlapXmldocService;
  9 +import com.tianbo.service.OlapXmlnodeService;
  10 +import com.tianbo.util.dao.Page;
  11 +import org.springframework.beans.factory.annotation.Autowired;
  12 +import org.springframework.stereotype.Controller;
  13 +import org.springframework.web.bind.annotation.ModelAttribute;
  14 +import org.springframework.web.bind.annotation.RequestMapping;
  15 +import org.springframework.web.servlet.ModelAndView;
  16 +import org.springframework.web.servlet.mvc.support.RedirectAttributes;
  17 +
  18 +import javax.servlet.http.HttpServletRequest;
  19 +import java.math.BigDecimal;
  20 +import java.util.List;
  21 +
  22 +/**
  23 + * Created by Mr.Xu on 2017/9/14.
  24 + */
  25 +@Controller
  26 +@RequestMapping("/olapxmlnode")
  27 +public class OlapXmlnodeController {
  28 +
  29 + @Autowired
  30 + private OlapXmlnodeService olapXmlnodeService;
  31 + @Autowired
  32 + private OlapXmldocService olapXmldocService;
  33 + @Autowired
  34 + private OlapColumnService olapColumnService;
  35 + @RequestMapping("showlist")
  36 + public ModelAndView findXmlnode(@ModelAttribute Page page)throws Exception{
  37 + int pagelenth=10;
  38 + int start=0;
  39 + if(page.getBegin()>=0){start=page.getBegin();}
  40 + if(page.getLength()>0){pagelenth=page.getLength();}
  41 + ModelAndView modelAndView=new ModelAndView();
  42 + ModelAndPage modelAndPage=new ModelAndPage();
  43 + modelAndPage=olapXmlnodeService.findXmlnode(start,pagelenth);
  44 + List<TOlapXmldoc> olapXmldocList=olapXmldocService.findXmldoc();
  45 + List<TOlapColumn> olapColumnList=olapColumnService.findOlapColumn();
  46 + modelAndView.addObject("olapXmldocList",olapXmldocList);
  47 + modelAndView.addObject("olapColumnList",olapColumnList);
  48 + modelAndView.addObject("modelAndPage",modelAndPage);
  49 + modelAndView.setViewName("olapxmlnode/list");
  50 + return modelAndView;
  51 + }
  52 +
  53 + @RequestMapping("addXmlnode")
  54 + public String addXmlnode(HttpServletRequest request,TOlapXmlnode olapXmlnode,RedirectAttributes attr){
  55 + String docid=request.getParameter("docid");
  56 + String columnid=request.getParameter("columnid");
  57 + olapXmlnode.setDocid(new BigDecimal(docid));
  58 + olapXmlnode.setColumnid(new BigDecimal(columnid));
  59 + olapXmlnodeService.addXmlnode(olapXmlnode);
  60 + attr.addAttribute("docid",new BigDecimal(docid));
  61 + return "redirect:/olapxmlnode/selectlist";
  62 + }
  63 + @RequestMapping("findByid")
  64 + public ModelAndView findByid(HttpServletRequest request,BigDecimal nodeid)throws Exception{
  65 + ModelAndView modelAndView=new ModelAndView();
  66 + String id=request.getParameter("nodeid");
  67 + TOlapXmlnode olapXmlnode=olapXmlnodeService.findByid(new BigDecimal(id));
  68 + List<TOlapXmldoc> olapXmldocList=olapXmldocService.findXmldoc();
  69 + List<TOlapColumn> olapColumnList=olapColumnService.findOlapColumn();
  70 + modelAndView.addObject("olapXmldocList",olapXmldocList);
  71 + modelAndView.addObject("olapColumnList",olapColumnList);
  72 + modelAndView.addObject("olapXmlnode",olapXmlnode);
  73 + modelAndView.setViewName("olapxmlnode/edit");
  74 + return modelAndView;
  75 + }
  76 + @RequestMapping("selectlist")
  77 + public ModelAndView selectXmlnode(HttpServletRequest request,BigDecimal docid)throws Exception{
  78 + ModelAndView modelAndView=new ModelAndView();
  79 + String id=request.getParameter("docid");
  80 + BigDecimal bd=new BigDecimal(id);
  81 + List<TOlapXmlnode> tOlapXmlnodeList=olapXmlnodeService.selectXmlnode(bd);
  82 + TOlapXmldoc tOlapXmldoc=olapXmldocService.findByid(bd);
  83 + List<TOlapColumn> olapColumnList=olapColumnService.findOlapColumn();
  84 + modelAndView.addObject("tOlapXmlnodeList",tOlapXmlnodeList);
  85 + modelAndView.addObject("tOlapXmldoc",tOlapXmldoc);
  86 + modelAndView.addObject("olapColumnList",olapColumnList);
  87 + modelAndView.setViewName("olapxmlnode/list");
  88 + return modelAndView;
  89 + }
  90 + @RequestMapping("updateXmlnode")
  91 + public String updateXmlnode(HttpServletRequest request,TOlapXmlnode olapXmlnode,RedirectAttributes attr){
  92 + String nodeid=request.getParameter("nodeid");
  93 + String docid=request.getParameter("docid");
  94 + String columnid=request.getParameter("columnid");
  95 + olapXmlnode.setColumnid(new BigDecimal(columnid));
  96 + olapXmlnode.setDocid(new BigDecimal(docid));
  97 + olapXmlnode.setNodeid(new BigDecimal(nodeid));
  98 + olapXmlnodeService.updateXmlnode(olapXmlnode);
  99 + attr.addAttribute("docid",new BigDecimal(docid));
  100 + return "redirect:/olapxmlnode/selectlist";
  101 + }
  102 + @RequestMapping("deleteByPrimaryKey")
  103 + public String deleteByPrimaryKey(HttpServletRequest request,BigDecimal nodeid,RedirectAttributes attr){
  104 + String id=request.getParameter("nodeid");
  105 + String docid=request.getParameter("docid");
  106 + olapXmlnodeService.deleteByPrimaryKey(new BigDecimal(id));
  107 + attr.addAttribute("docid",new BigDecimal(docid));
  108 + return "redirect:/olapxmlnode/selectlist";
  109 + }
  110 + @RequestMapping("list")
  111 + public String list(){return "olapxmlnode/list";}
  112 +}
  1 +package com.tianbo.controller;
  2 +
  3 +import com.tianbo.model.Role;
  4 +import com.tianbo.model.Users;
  5 +import org.springframework.stereotype.Controller;
  6 +import org.springframework.web.bind.annotation.ModelAttribute;
  7 +import org.springframework.web.bind.annotation.RequestMapping;
  8 +import org.springframework.web.servlet.ModelAndView;
  9 +
  10 +@Controller
  11 +@RequestMapping("/permission")
  12 +public class PermissionController {
  13 +
  14 + @RequestMapping("list")
  15 + public ModelAndView listView(@ModelAttribute Role role){
  16 +
  17 + return new ModelAndView("permission/list","role",role);
  18 + }
  19 +}
  1 +package com.tianbo.controller;
  2 +
  3 +import java.text.SimpleDateFormat;
  4 +import java.util.Date;
  5 +import java.util.List;
  6 +import java.util.UUID;
  7 +
  8 +import javax.servlet.http.HttpServletRequest;
  9 +import javax.servlet.http.HttpSession;
  10 +
  11 +import org.springframework.beans.factory.annotation.Autowired;
  12 +import org.springframework.stereotype.Controller;
  13 +import org.springframework.ui.ModelMap;
  14 +import org.springframework.web.bind.annotation.RequestMapping;
  15 +import org.springframework.web.bind.annotation.RequestMethod;
  16 +import org.springframework.web.bind.annotation.RequestParam;
  17 +import org.springframework.web.bind.annotation.ResponseBody;
  18 +
  19 +import com.tianbo.model.Arrivedmaster;
  20 +import com.tianbo.model.Originmanifestmaster;
  21 +import com.tianbo.model.Originmanifestsecondary;
  22 +import com.tianbo.model.Preparemaster;
  23 +import com.tianbo.service.imp.ArriveService;
  24 +import com.tianbo.service.imp.OriginmaniService;
  25 +import com.tianbo.service.imp.PreService;
  26 +import com.tianbo.util.DateUtils;
  27 +import com.tianbo.util.json.AjaxJson;
  28 +
  29 +/**
  30 + * 数据转预配Controller
  31 + * @author Promise
  32 + *
  33 + */
  34 +@Controller
  35 +@RequestMapping("/Mainfest")
  36 +public class PreController {
  37 +
  38 + @Autowired
  39 + private OriginmaniService mainfestService;
  40 +
  41 + @Autowired
  42 + private PreService preService;
  43 +
  44 + @Autowired
  45 + private ArriveService arriveService;
  46 +
  47 +
  48 + @RequestMapping(value = "totransform")
  49 + public String toTransForm() {
  50 + return "transform";
  51 + }
  52 +
  53 +
  54 +
  55 + @RequestMapping(value = "pre", method = RequestMethod.POST)
  56 + @ResponseBody
  57 + public AjaxJson mainfestSearch(HttpSession session,ModelMap modelMap,
  58 + @RequestParam String flightno,
  59 + @RequestParam String flightdate,
  60 + @RequestParam String tflightno,
  61 + @RequestParam String tflightdate,
  62 + @RequestParam String destinationStation
  63 + )
  64 + {
  65 + String message = null;
  66 + AjaxJson j = new AjaxJson();
  67 +
  68 + try {
  69 + Originmanifestmaster mainfest = new Originmanifestmaster();
  70 + mainfest.setFlightno(flightno);
  71 + mainfest.setFlightDate(flightdate);
  72 + SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  73 + long flag = 18000000;
  74 + List<Originmanifestmaster> list = mainfestService.getList(mainfest);
  75 + if(list.size()!=0||!list.isEmpty()){
  76 + for (Originmanifestmaster originmanifestmaster : list) {
  77 + Preparemaster preparemaster = new Preparemaster();
  78 + preparemaster.setAutoid(UUID.randomUUID().toString()); //GUID
  79 + preparemaster.setWaybillnomaster(originmanifestmaster.getWaybillnomaster());//主单号
  80 + preparemaster.setCarrier(tflightno.substring(0, 2));//承运人
  81 + preparemaster.setFlightno(tflightno.substring(2));
  82 + preparemaster.setOriginatingstation(originmanifestmaster.getOriginatingstationBill());
  83 + preparemaster.setFlightdate(DateUtils.stringToDate(tflightdate, "yyyy-MM-dd"));
  84 + preparemaster.setCreatedate(DateUtils.DateToString(new Date(), "yyyy-MM-dd HH:mm:ss"));
  85 + preparemaster.setDestinationstation(destinationStation); //目的站
  86 + preparemaster.setTotalpiece(originmanifestmaster.getManifesttotalpiece());
  87 + preparemaster.setPreparetotalpiece(originmanifestmaster.getManifesttotalpiece());
  88 + preparemaster.setTotalweight(originmanifestmaster.getManifesttotalweight());
  89 + preparemaster.setPreparetotalweight(originmanifestmaster.getManifesttotalweight());
  90 + preparemaster.setProductname(originmanifestmaster.getProductname());//货物描述
  91 + preparemaster.setShippername(originmanifestmaster.getShippername());//发货人名称
  92 + preparemaster.setShipperCode(originmanifestmaster.getShipperCode());//发货人代码
  93 + preparemaster.setShipperaddress(originmanifestmaster.getShipperaddress());//发货人地址
  94 + preparemaster.setShipperCountrycode(originmanifestmaster.getShipperCountrycode());//发货人国家代码
  95 + preparemaster.setShipperPhone(originmanifestmaster.getShipperPhone());//发货人电话
  96 + preparemaster.setConsigneename(originmanifestmaster.getConsigneename());//收货人名称
  97 + preparemaster.setCustomscode(originmanifestmaster.getCustomscode());//关区代码
  98 + preparemaster.setCustomsstatus(originmanifestmaster.getCustomsstatus());//海关状态
  99 + preparemaster.setUnloadingstation(originmanifestmaster.getDestinationstationBill());//卸货地
  100 + Date date = new Date();
  101 + long dateParam =date.getTime()+flag;
  102 + String stowagedate =df.format(dateParam);
  103 + preparemaster.setStowagedate(stowagedate);
  104 + preparemaster.setPaymode(originmanifestmaster.getPaymode());//付费方式
  105 + preparemaster.setConsigneeCode(originmanifestmaster.getConsigneeCode());//收货人代码
  106 + preparemaster.setConsigneeaddress(originmanifestmaster.getConsigneeaddress());//收货人地址
  107 + preparemaster.setConsigneeCountrycode(originmanifestmaster.getConsigneeCountrycode());//收货人国家代码
  108 + preparemaster.setConsigneePhone(originmanifestmaster.getConsigneePhone());//收货人电话
  109 + preparemaster.setStatus("01");
  110 + preService.insert(preparemaster);
  111 + }
  112 + j.setSuccess(true);
  113 + message = "预配舱单转运完成";
  114 + }else {
  115 + j.setSuccess(true);
  116 + message = "未查询到原始舱单数据";
  117 + }
  118 + } catch (Exception e) {
  119 + j.setSuccess(false);
  120 + message = "预配舱单转运失败";
  121 + // TODO Auto-generated catch block
  122 + e.printStackTrace();
  123 + }
  124 +
  125 + j.setMsg(message);
  126 + return j;
  127 + }
  128 +
  129 + @RequestMapping(value = "arr", method = RequestMethod.POST)
  130 + @ResponseBody
  131 + public AjaxJson arrivefestSearch(HttpSession session,ModelMap modelMap,
  132 + @RequestParam String flightno,
  133 + @RequestParam String flightdate,
  134 + @RequestParam String tflightno,
  135 + @RequestParam String tflightdate,
  136 + @RequestParam String destinationStation
  137 + )
  138 + {
  139 + String message = null;
  140 + AjaxJson j = new AjaxJson();
  141 + try {
  142 + Originmanifestmaster mainfest = new Originmanifestmaster();
  143 + mainfest.setFlightno(flightno);
  144 + mainfest.setFlightDate(flightdate);
  145 +
  146 + List<Originmanifestmaster> list = mainfestService.getList(mainfest);
  147 + if(list.size()!=0||!list.isEmpty()){
  148 + for (Originmanifestmaster originmanifestmaster : list) {
  149 + Arrivedmaster arrivemaster = new Arrivedmaster();
  150 + arrivemaster.setAutoid(UUID.randomUUID().toString()); //GUID
  151 + arrivemaster.setWaybillnomaster(originmanifestmaster.getWaybillnomaster());
  152 + arrivemaster.setArrivedtotalpiece(originmanifestmaster.getManifesttotalpiece());
  153 + arrivemaster.setArrivedtotalweight(originmanifestmaster.getManifesttotalweight());
  154 + arrivemaster.setCustomscode(originmanifestmaster.getCustomscode());
  155 + arrivemaster.setArriveddate(DateUtils.DateToString(new Date(), "yyyy-MM-dd HH:mm:ss"));
  156 + arrivemaster.setCarrier(tflightno.substring(0, 2));//承运人
  157 + arrivemaster.setFlightno(tflightno.substring(2));
  158 + arrivemaster.setFlightdate(DateUtils.stringToDate(tflightdate, "yyyy-MM-dd"));
  159 + arrivemaster.setCreatedate(DateUtils.DateToString(new Date(), "yyyy-MM-dd HH:mm:ss"));
  160 + arrivemaster.setDestinationstation(originmanifestmaster.getDestinationstationBill()); //目的站
  161 + arrivemaster.setProductname(originmanifestmaster.getProductname());//货物描述
  162 + arrivemaster.setStatus("17");
  163 + arriveService.insert(arrivemaster);
  164 + }
  165 + j.setSuccess(true);
  166 + message = "运抵转运完成";
  167 + }else {
  168 + j.setSuccess(true);
  169 + message = "未查询到原始舱单数据";
  170 + }
  171 + } catch (Exception e) {
  172 + j.setSuccess(false);
  173 + message = "预配舱单转运失败";
  174 + // TODO Auto-generated catch block
  175 + e.printStackTrace();
  176 + }
  177 +
  178 + j.setMsg(message);
  179 + return j;
  180 + }
  181 +
  182 + @RequestMapping(value = "Transit", method = RequestMethod.POST)
  183 + @ResponseBody
  184 + public AjaxJson transitfestSearch(HttpSession session,ModelMap modelMap,
  185 + @RequestParam String flightno,
  186 + @RequestParam String flightdate,
  187 + @RequestParam String tflightno
  188 + )
  189 + {
  190 + String message = null;
  191 + AjaxJson j = new AjaxJson();
  192 + try {
  193 + Originmanifestmaster mainfest = new Originmanifestmaster();
  194 + mainfest.setFlightno(flightno);
  195 + mainfest.setFlightDate(flightdate);
  196 + mainfest.setPreCarrier(tflightno.substring(0,2));
  197 + mainfest.setPreFlightno(tflightno.substring(2));
  198 +
  199 + List<Originmanifestmaster> list = mainfestService.getList(mainfest);
  200 + if(list.size()!=0||!list.isEmpty()){
  201 + mainfestService.insertTransit(mainfest);
  202 + j.setSuccess(true);
  203 + message = "国际转运申请完成";
  204 + }else {
  205 + j.setSuccess(true);
  206 + message = "未查询到原始舱单数据";
  207 + }
  208 + } catch (Exception e) {
  209 + j.setSuccess(false);
  210 + message = "国际转运申请失败,详情请联系管理员";
  211 + // TODO Auto-generated catch block
  212 + e.printStackTrace();
  213 + }
  214 +
  215 + j.setMsg(message);
  216 + return j;
  217 + }
  218 +
  219 +}
  1 +package com.tianbo.controller;
  2 +
  3 +import com.tianbo.controller.base.BaseController;
  4 +import com.tianbo.model.Role;
  5 +import org.springframework.stereotype.Controller;
  6 +import org.springframework.web.bind.annotation.RequestMapping;
  7 +import org.springframework.web.servlet.ModelAndView;
  8 +
  9 +@Controller
  10 +@RequestMapping("/role")
  11 +public class RoleController {
  12 +
  13 +
  14 + @RequestMapping("list")
  15 + public String listView(){
  16 + return "role/list";
  17 + }
  18 +
  19 + @RequestMapping("add")
  20 + public ModelAndView add(){
  21 + Role role = new Role();
  22 +
  23 + return new ModelAndView("role/add","role",role) ;
  24 + }
  25 +}
  1 +package com.tianbo.controller;
  2 +
  3 +import com.tianbo.common.ModelAndPage;
  4 +import com.tianbo.model.Users;
  5 +import com.tianbo.model.UsersExample;
  6 +import com.tianbo.service.UserService;
  7 +import com.tianbo.util.dao.Page;
  8 +import com.tianbo.util.tools.MD5Tools;
  9 +import org.apache.shiro.SecurityUtils;
  10 +import org.apache.shiro.authz.annotation.RequiresPermissions;
  11 +import org.apache.shiro.authz.annotation.RequiresRoles;
  12 +import org.springframework.beans.factory.annotation.Autowired;
  13 +import org.springframework.stereotype.Controller;
  14 +import org.springframework.web.bind.annotation.*;
  15 +import org.springframework.web.servlet.ModelAndView;
  16 +
  17 +import javax.servlet.http.HttpServletRequest;
  18 +import javax.servlet.http.HttpServletResponse;
  19 +import java.math.BigDecimal;
  20 +import java.util.Date;
  21 +import java.util.HashMap;
  22 +import java.util.List;
  23 +import java.util.Map;
  24 +
  25 +/**
  26 + * Created by mrz on 2017/8/23.
  27 + */
  28 +@Controller
  29 +@RequestMapping("/user")
  30 +public class UserController {
  31 +
  32 + //service类
  33 + @Autowired
  34 + private UserService userService;
  35 +
  36 +
  37 +
  38 + @RequestMapping("add")
  39 + @RequiresRoles("admin")
  40 + public ModelAndView addUserV(){
  41 + Users newUser = new Users();
  42 + return new ModelAndView("user/add","user",newUser);
  43 + }
  44 +
  45 + @RequestMapping("/edit")
  46 + @RequiresRoles("admin")
  47 + @RequiresPermissions({"user:edit","user:find"})
  48 + public ModelAndView userId(@ModelAttribute Users user){
  49 +
  50 + String username = (String) SecurityUtils.getSubject().getSession().getAttribute("username");
  51 + //这里需要判断下,当前用户是可以编辑自己的资料的,或者再起一个ACTION,单独判断权限
  52 +
  53 + return new ModelAndView("user/edit","user",user);
  54 +
  55 + }
  56 +
  57 + @RequiresRoles("admin")
  58 + @RequestMapping("list")
  59 + public String list(){
  60 + return "user/list";
  61 + }
  62 +}
  1 +package com.tianbo.controller.base;
  2 +
  3 +public class BaseController {
  4 + public Integer defaultDataStart = 0;
  5 + public Integer defaultPerPage = 20;
  6 +
  7 +
  8 + public Boolean checkPropertyNull(String property){
  9 + if(property!=null && property!=""){
  10 + return Boolean.TRUE;
  11 + }else{
  12 + return Boolean.FALSE;
  13 + }
  14 + }
  15 +}
  1 +package com.tianbo.controller.billNo;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.HashMap;
  5 +import java.util.List;
  6 +import java.util.Map;
  7 +
  8 +import javax.servlet.http.HttpServletRequest;
  9 +
  10 +import org.springframework.beans.factory.annotation.Autowired;
  11 +import org.springframework.stereotype.Controller;
  12 +import org.springframework.ui.ModelMap;
  13 +import org.springframework.web.bind.annotation.RequestMapping;
  14 +import org.springframework.web.bind.annotation.ResponseBody;
  15 +import com.tianbo.model.Sendlog;
  16 +import com.tianbo.service.SendLogService;
  17 +import com.tianbo.util.json.JsonConversion;
  18 +
  19 +@Controller
  20 +public class BillController {
  21 +
  22 + @Autowired
  23 + private SendLogService sendLogService;
  24 +
  25 +
  26 + @RequestMapping(value = "searchArr")
  27 + public String searchArr() {
  28 +
  29 + return "searchArr";
  30 + }
  31 +
  32 +
  33 + @RequestMapping(value = "toBill")
  34 + public String toTransForm(ModelMap model,HttpServletRequest request) {
  35 + String parameter = request.getParameter("billNo");
  36 + String parameter2 = request.getParameter("billNoSecond");
  37 + model.put("bill", parameter);
  38 + model.put("billNoSecond", parameter2);
  39 + return "toBill";
  40 + }
  41 +
  42 + /**
  43 + * 获取运抵回执
  44 + */
  45 +
  46 + @ResponseBody
  47 + @RequestMapping(value = "getSendLog")
  48 + public String getList(HttpServletRequest request){
  49 + String billNo = request.getParameter("billNo");
  50 + List<Sendlog> sendLog = sendLogService.getSendLog(billNo);
  51 + Map<String,Object> map = new HashMap<>();
  52 + if(!sendLog.isEmpty()){
  53 + for (Sendlog sendlog : sendLog) {
  54 + sendlog.setFlightno(sendlog.getCarrier()+sendlog.getFlightno());
  55 + sendlog.setFlightdate(sendlog.getFlightdate().substring(0, 10));
  56 + }
  57 + map.put("code", 0);
  58 + map.put("msg", "success");
  59 + map.put("data", sendLog);
  60 + }else {
  61 + map.put("code", -1);
  62 + map.put("msg", "无此单运抵回执");
  63 + map.put("data", "");
  64 + }
  65 + return JsonConversion.writeMapJSON(map);
  66 + }
  67 +
  68 +
  69 + @ResponseBody
  70 + @RequestMapping(value = "getSendLogSecond")
  71 + public String getSendLogSecond(HttpServletRequest request){
  72 + String billNoSecond = request.getParameter("billNoSecond");
  73 + List<Sendlog> sendLogsecond = sendLogService.getSendLogSecond(billNoSecond);
  74 + Map<String,Object> map = new HashMap<>();
  75 + if(!sendLogsecond.isEmpty()){
  76 + for (Sendlog sendlog : sendLogsecond) {
  77 + sendlog.setFlightno(sendlog.getCarrier()+sendlog.getFlightno());
  78 + sendlog.setFlightdate(sendlog.getFlightdate().substring(0, 10));
  79 + }
  80 + map.put("code", 0);
  81 + map.put("msg", "success");
  82 + map.put("data", sendLogsecond);
  83 + }else {
  84 + map.put("code", -1);
  85 + map.put("msg", "无此单运抵回执");
  86 + map.put("data", "");
  87 + }
  88 + return JsonConversion.writeMapJSON(map);
  89 + }
  90 +
  91 + @ResponseBody
  92 + @RequestMapping(value = "getSendLogSecondByMain")
  93 + public String getSendLogSecondByMain(HttpServletRequest request){
  94 + String billNo= request.getParameter("billNo");
  95 + List<Sendlog> sendLogsecond = sendLogService.getSendLogSecondByMain(billNo);
  96 + for (Sendlog sendlog : sendLogsecond) {
  97 + if(!sendlog.getReceiption().contains("发送运抵报")){
  98 + sendlog.setCustomscode("");
  99 + sendlog.setWaybillnosecondary("");
  100 + }
  101 + }
  102 + Map<String,Object> map = new HashMap<>();
  103 + if(!sendLogsecond.isEmpty()){
  104 + for (Sendlog sendlog : sendLogsecond) {
  105 + sendlog.setFlightno(sendlog.getCarrier()+sendlog.getFlightno());
  106 + sendlog.setFlightdate(sendlog.getFlightdate().substring(0, 10));
  107 + }
  108 + map.put("code", 0);
  109 + map.put("msg", "success");
  110 + map.put("data", sendLogsecond);
  111 + }else {
  112 + map.put("code", -1);
  113 + map.put("msg", "无此单运抵回执");
  114 + map.put("data", "");
  115 + }
  116 + return JsonConversion.writeMapJSON(map);
  117 + }
  118 +
  119 +}
  1 +package com.tianbo.controller;
  2 +
  3 +import java.io.*;
  4 +import java.awt.*;
  5 +import java.awt.event.*;
  6 +
  7 +import javax.swing.*;
  8 +
  9 +class Win extends JFrame implements ActionListener//接口设置监听器
  10 +{
  11 + FileReader r_file;//字符文件输入流
  12 + FileWriter w_file;//字符文件输出流
  13 + BufferedReader buf_reader;//与FileReader类配合使用,将字符输入到缓冲区,使数据处理速度大大加快,提高读写的效率
  14 + BufferedWriter buf_writer;
  15 + JTextArea txt;
  16 + JButton btn1,btn2;
  17 + Win()
  18 + {
  19 + setSize(400,400);
  20 + setVisible(true);
  21 + txt = new JTextArea(10,10);
  22 + btn1 = new JButton("Read");
  23 + btn2 = new JButton("Write");
  24 + btn1.addActionListener(this);//建立监听器和事件源(按钮)之间的联系
  25 + btn2.addActionListener(this);
  26 + JPanel p = new JPanel();
  27 + add(txt,"Center");
  28 + add(p,"South");
  29 + p.setLayout(new FlowLayout());//设置窗体为浮动窗体
  30 + p.add(btn1);
  31 + p.add(btn2);
  32 + validate();//使窗体中的组件为可见
  33 + setDefaultCloseOperation(EXIT_ON_CLOSE);//设置关闭窗体,退出窗体
  34 + }
  35 + public void actionPerformed(ActionEvent e)
  36 + {
  37 + //当单击按钮对象btn时,按钮对象会产生一个ActionEvent事件,事件监听器监听到这个事件,把它作为实现ActionListener接口的actionPerformed方法的参数,在actionPerformed方法中处理动作事件。
  38 + if(e.getSource()==btn1)
  39 + {
  40 + readFile();
  41 + }
  42 + if(e.getSource()==btn2)
  43 + {
  44 + writeFile();
  45 + }
  46 + }
  47 + //读取文件
  48 + public void readFile()
  49 + {
  50 + String s;
  51 + try
  52 + {
  53 + File f=new File("C:\\A.txt");
  54 + r_file = new FileReader(f);//将文件f里面的内容给字符文件输入流
  55 + buf_reader = new BufferedReader(r_file);
  56 + }
  57 + catch(IOException ef)
  58 + {
  59 + System.out.print(ef);
  60 + }
  61 + try
  62 + {
  63 + int count =0;
  64 + double countK = 0;
  65 + String A = null;
  66 + while ((s = buf_reader.readLine())!=null)
  67 + {
  68 + String flag = s.substring(s.indexOf("/")+1,s.indexOf("K", s.indexOf("K")+1));
  69 + if(flag.contains("D")){
  70 + A=s.substring(s.indexOf("D")+1, s.indexOf("K", s.indexOf("K")+1));
  71 + }else if(flag.contains("S")){
  72 + A =s.substring(s.indexOf("S")+1, s.indexOf("K", s.indexOf("K")+1));
  73 + }
  74 +
  75 + txt.append(s+'\n');
  76 + String K =s.substring(s.indexOf("K", s.indexOf("K")+1)+1,s.indexOf("M"));
  77 + count += Integer.parseInt(A);
  78 + countK += Double.parseDouble(K);
  79 + }
  80 +
  81 + txt.append("总件数"+count);
  82 + txt.append("总重量"+countK);
  83 +
  84 + }
  85 + catch(IOException er)
  86 + {
  87 + System.out.print(er);
  88 + }
  89 + }
  90 + public void writeFile()
  91 + {
  92 + try
  93 + {
  94 + w_file = new FileWriter("C:\\x.txt");
  95 + buf_writer = new BufferedWriter(w_file);
  96 + String str = txt.getText();
  97 + buf_writer.write(str,0,str.length());
  98 + buf_writer.flush();//一般情况下,writer方法向输出流写数据时,先把数据存放在缓冲区,这时缓冲区的数据不会自动写入输出流,只有当缓冲区满时,才会一次性将缓冲区的数据写入输出流,即写入文件。为了把尚未填满的缓冲区中的数据送出去,这时就要使用flush方法。
  99 + }
  100 + catch(IOException ew)
  101 + {
  102 + System.out.print(ew);
  103 + }
  104 + }
  105 +}
  106 +public class e81
  107 +{
  108 + public static void main(String args[])
  109 + {
  110 + Win w = new Win();
  111 + }
  112 +}
  1 +/**
  2 + * Copyright &copy; 2015-2020 <a href="--版权信息--">JeePlus</a> All rights reserved.
  3 + */
  4 +package com.tianbo.controller.json;
  5 +
  6 +import java.util.HashMap;
  7 +import java.util.LinkedHashMap;
  8 +import java.util.List;
  9 +import java.util.Map;
  10 +
  11 +import com.fasterxml.jackson.annotation.JsonIgnore;
  12 +import com.tianbo.model.Sendlog;
  13 +
  14 +
  15 +/**
  16 + * $.ajax后需要接受的JSON
  17 + *
  18 + * @author
  19 + *
  20 + */
  21 +public class AjaxJson {
  22 +
  23 + private boolean success = true;// 是否成功
  24 + private String errorCode = "-1";//错误代码
  25 + private String msg = "操作成功";// 提示信息
  26 + //private LinkedHashMap<String, Object> body = new LinkedHashMap();//封装json的map
  27 + Map<String,Object> body = new HashMap();
  28 + public void setBody(List<Sendlog> sendLog){
  29 + this.body = (Map<String, Object>) sendLog;
  30 + }
  31 + public Map<String,Object> getBody() {
  32 + return body;
  33 + }
  34 + /*public LinkedHashMap<String, Object> getBody() {
  35 + return body;
  36 + }
  37 +
  38 + public void setBody(LinkedHashMap<String, Object> body) {
  39 + this.body = body;
  40 + }*/
  41 +
  42 + public void put(String key, Object value){//向json中添加属性,在js中访问,请调用data.map.key
  43 + body.put(key, value);
  44 + }
  45 +
  46 + public void remove(String key){
  47 + body.remove(key);
  48 + }
  49 +
  50 +
  51 + public String getMsg() {
  52 + return msg;
  53 + }
  54 +
  55 + public void setMsg(String msg) {//向json中添加属性,在js中访问,请调用data.msg
  56 + this.msg = msg;
  57 + }
  58 +
  59 +
  60 + public boolean isSuccess() {
  61 + return success;
  62 + }
  63 +
  64 + public void setSuccess(boolean success) {
  65 + this.success = success;
  66 + }
  67 +
  68 +
  69 + public void setErrorCode(String errorCode) {
  70 + this.errorCode = errorCode;
  71 + }
  72 +
  73 + public String getErrorCode() {
  74 + return errorCode;
  75 + }
  76 +}
  1 +package com.tianbo.controller.json;
  2 +
  3 +import com.tianbo.common.ModelAndPage;
  4 +import com.tianbo.controller.base.BaseController;
  5 +import com.tianbo.model.TKpiCargoWaybill;
  6 +import com.tianbo.model.TKpiCargoWaybillExample;
  7 +import com.tianbo.model.TKpiCargoWaybillExample.Criteria;
  8 +import com.tianbo.service.KPICargoBillServcie;
  9 +import com.tianbo.util.dao.Page;
  10 +import com.tianbo.util.dao.Totals;
  11 +import org.apache.shiro.authz.annotation.RequiresRoles;
  12 +import org.springframework.beans.factory.annotation.Autowired;
  13 +import org.springframework.stereotype.Controller;
  14 +import org.springframework.web.bind.annotation.*;
  15 +
  16 +import java.math.BigDecimal;
  17 +import java.util.List;
  18 +
  19 +@Controller
  20 +@RequestMapping("/kpi")
  21 +public class KPIJsonController extends BaseController{
  22 + @Autowired
  23 + KPICargoBillServcie kpiService;
  24 +
  25 + /**
  26 + * 查找所用用户控制器方法
  27 + * @return
  28 + * @throws Exception
  29 + */
  30 + @RequestMapping(value = "list.json",method = RequestMethod.POST)
  31 + @RequiresRoles("admin")
  32 + @ResponseBody
  33 + public ModelAndPage kpiList(@ModelAttribute Page frontPage, @ModelAttribute TKpiCargoWaybill kpi) throws Exception{
  34 +
  35 + if(frontPage.getBegin()>=0){
  36 + defaultDataStart = frontPage.getBegin();
  37 + }
  38 + if (frontPage.getLength()>0){
  39 + defaultPerPage = frontPage.getLength();
  40 + }
  41 +
  42 + //example
  43 + //调用mapper类中的selectByExample方法,如果传入类型为null,则表示无条件查找
  44 + TKpiCargoWaybillExample example = new TKpiCargoWaybillExample();
  45 + Criteria criteria = example.createCriteria();
  46 + Criteria criteria2= example.createCriteria();
  47 + Criteria criteria3= example.createCriteria();
  48 + Criteria criteria4= example.createCriteria();
  49 +
  50 + //根据国内国际搜索
  51 + if (checkPropertyNull(kpi.getDomint())){
  52 + criteria.andDomintEqualTo(kpi.getDomint());
  53 + criteria2.andDomintEqualTo(kpi.getDomint());
  54 + criteria3.andDomintEqualTo(kpi.getDomint());
  55 + criteria4.andDomintEqualTo(kpi.getDomint());
  56 + }
  57 +
  58 + //根据运单前缀,前缀有主单的情况是三位前缀,分单的情况是主单号
  59 + if(checkPropertyNull(kpi.getWaybillpre())){
  60 + criteria.andWaybillpreEqualTo(kpi.getWaybillpre());
  61 + criteria2.andWaybillpreEqualTo(kpi.getWaybillpre());
  62 + criteria3.andWaybillpreEqualTo(kpi.getWaybillpre());
  63 + criteria4.andWaybillpreEqualTo(kpi.getWaybillpre());
  64 + }
  65 + //根据运单类型
  66 + if(checkPropertyNull(kpi.getWaybilltype())){
  67 + criteria.andWaybilltypeEqualTo(kpi.getWaybilltype());
  68 + criteria2.andWaybilltypeEqualTo(kpi.getWaybilltype());
  69 + criteria3.andWaybilltypeEqualTo(kpi.getWaybilltype());
  70 + criteria4.andWaybilltypeEqualTo(kpi.getWaybilltype());
  71 + }
  72 +
  73 + //根据代理人id
  74 + if(checkPropertyNull(kpi.getAgentid())){
  75 + criteria.andAgentidEqualTo(kpi.getAgentid());
  76 + criteria2.andAgentidEqualTo(kpi.getAgentid());
  77 + criteria3.andAgentidEqualTo(kpi.getAgentid());
  78 + criteria4.andAgentidEqualTo(kpi.getAgentid());
  79 + }
  80 +
  81 + //根据货主
  82 + if(checkPropertyNull(kpi.getShprname())){
  83 + criteria.andShprnameEqualTo(kpi.getShprname());
  84 + criteria2.andAgentidEqualTo(kpi.getAgentid());
  85 + criteria3.andAgentidEqualTo(kpi.getAgentid());
  86 + criteria4.andAgentidEqualTo(kpi.getAgentid());
  87 + }
  88 + //根据货物id
  89 + if(checkPropertyNull(kpi.getProductid())){
  90 + criteria.andProductidEqualTo(kpi.getProductid());
  91 + criteria2.andAgentidEqualTo(kpi.getAgentid());
  92 + criteria3.andAgentidEqualTo(kpi.getAgentid());
  93 + criteria4.andAgentidEqualTo(kpi.getAgentid());
  94 + }
  95 + //根据货物名称
  96 + if(checkPropertyNull(kpi.getProductname())){
  97 + criteria.andProductnameEqualTo(kpi.getProductname());
  98 + criteria2.andProductnameEqualTo(kpi.getProductname());
  99 + criteria3.andProductnameEqualTo(kpi.getProductname());
  100 + criteria4.andProductnameEqualTo(kpi.getProductname());
  101 + }
  102 +
  103 + //根据进口
  104 + if(checkPropertyNull(kpi.getImp())){
  105 + criteria.andImpEqualTo(kpi.getImp());
  106 + criteria2.andImpEqualTo(kpi.getImp());
  107 + criteria3.andImpEqualTo(kpi.getImp());
  108 + criteria4.andImpEqualTo(kpi.getImp());
  109 + }
  110 + //根据出口
  111 + if(checkPropertyNull(kpi.getExp())){
  112 + criteria.andExpEqualTo(kpi.getExp());
  113 + criteria2.andExpEqualTo(kpi.getExp());
  114 + criteria3.andExpEqualTo(kpi.getExp());
  115 + criteria4.andExpEqualTo(kpi.getExp());
  116 + }
  117 + //根据时间段-年
  118 + if(kpi.getCuryear()!=null&&kpi.getEndyear()!=null){
  119 + criteria.andCuryearBetween(kpi.getCuryear(),kpi.getEndyear());
  120 + criteria2.andCuryearBetween(kpi.getCuryear(),kpi.getEndyear());
  121 + criteria3.andCuryearBetween(kpi.getCuryear(),kpi.getEndyear());
  122 + criteria4.andCuryearBetween(kpi.getCuryear(),kpi.getEndyear());
  123 + }
  124 +
  125 + //根据时间段-月
  126 + if(kpi.getCurmonth()!=null&&kpi.getEndmonth()!=null){
  127 + criteria.andCurmonthBetween(kpi.getCurmonth(),kpi.getEndmonth());
  128 + criteria2.andCurmonthBetween(kpi.getCurmonth(),kpi.getEndmonth());
  129 + criteria3.andCurmonthBetween(kpi.getCurmonth(),kpi.getEndmonth());
  130 + criteria4.andCurmonthBetween(kpi.getCurmonth(),kpi.getEndmonth());
  131 + }
  132 +
  133 + //根据时间段-日
  134 + if(kpi.getCurweek()!=null&&kpi.getEndweek()!=null){
  135 + criteria.andCurweekBetween(kpi.getCurweek(),kpi.getEndweek());
  136 + criteria2.andCurweekBetween(kpi.getCurweek(),kpi.getEndweek());
  137 + criteria3.andCurweekBetween(kpi.getCurweek(),kpi.getEndweek());
  138 + criteria4.andCurweekBetween(kpi.getCurweek(),kpi.getEndweek());
  139 + }
  140 +
  141 +
  142 + //根据承运人搜索
  143 + if (checkPropertyNull(kpi.getAirline1())){
  144 + String carrier = kpi.getAirline1();
  145 +
  146 + criteria.andAirline1EqualTo(carrier);
  147 + criteria2.andAirline2EqualTo(carrier);
  148 + criteria3.andAirline3EqualTo(carrier);
  149 + criteria4.andAirline4EqualTo(carrier);
  150 +
  151 +
  152 +
  153 + example.or(criteria2);
  154 + example.or(criteria3);
  155 + example.or(criteria4);
  156 + }
  157 +
  158 + //example.setOrderByClause("user_id"); //设置order 字段
  159 +
  160 + //没加入分页前的搜索总数据数
  161 + int count = kpiService.countByExample(example);
  162 + BigDecimal weight = kpiService.sumWeightByExample(example);
  163 + BigDecimal pcs= kpiService.sumPcsByExample(example);
  164 + BigDecimal vol= kpiService.sumVolByExample(example);
  165 + BigDecimal hbillqty= kpiService.sumHbillqtyByExample(example);
  166 + Totals totals = new Totals(weight,pcs,vol,hbillqty);
  167 +
  168 + Page page = new Page(defaultDataStart,defaultPerPage);
  169 + page.setCount(count);
  170 +
  171 + example.setPage(page); //oracle 用这个
  172 +
  173 + List<TKpiCargoWaybill> kpilist = kpiService.selectByExample(example);
  174 +
  175 + ModelAndPage<TKpiCargoWaybill> modelAndPage = new ModelAndPage(kpilist,page,totals);
  176 +
  177 + return modelAndPage;
  178 + }
  179 +}
  1 +package com.tianbo.controller.json;
  2 +
  3 +import com.tianbo.common.ModelAndPage;
  4 +import com.tianbo.controller.base.BaseController;
  5 +import com.tianbo.model.TKpiCargoManifest;
  6 +import com.tianbo.model.TKpiCargoManifestExample;
  7 +import com.tianbo.model.TKpiCargoManifestExample.Criteria;
  8 +import com.tianbo.service.ManiFestService;
  9 +import com.tianbo.util.dao.Page;
  10 +import com.tianbo.util.dao.Totals;
  11 +import org.apache.shiro.authz.annotation.RequiresRoles;
  12 +import org.springframework.beans.factory.annotation.Autowired;
  13 +import org.springframework.stereotype.Controller;
  14 +import org.springframework.web.bind.annotation.ModelAttribute;
  15 +import org.springframework.web.bind.annotation.RequestMapping;
  16 +import org.springframework.web.bind.annotation.RequestMethod;
  17 +import org.springframework.web.bind.annotation.ResponseBody;
  18 +import org.springframework.web.servlet.ModelAndView;
  19 +
  20 +import java.math.BigDecimal;
  21 +import java.util.List;
  22 +
  23 +@Controller
  24 +@RequestMapping("/man")
  25 +public class ManiFestJsonController extends BaseController{
  26 +
  27 + @Autowired
  28 + ManiFestService maniFestService;
  29 +
  30 +
  31 + @RequestMapping(value = "list.json",method = RequestMethod.POST)
  32 + @RequiresRoles("admin")
  33 + @ResponseBody
  34 + public ModelAndPage<TKpiCargoManifest> maniList(@ModelAttribute TKpiCargoManifest manifest, @ModelAttribute Page frontPage){
  35 + if(frontPage.getBegin()>=0){
  36 + defaultDataStart = frontPage.getBegin();
  37 + }
  38 + if (frontPage.getLength()>0){
  39 + defaultPerPage = frontPage.getLength();
  40 + }
  41 +
  42 + TKpiCargoManifestExample example = new TKpiCargoManifestExample();
  43 + Criteria criteria = example.createCriteria();
  44 +
  45 + //根据时间段-年
  46 + if(manifest.getCuryear()!=null&&manifest.getEndyear()!=null){
  47 + criteria.andCuryearBetween(manifest.getCuryear(),manifest.getEndyear());
  48 + }
  49 +
  50 + //根据时间段-月
  51 + if(manifest.getCurmonth()!=null&&manifest.getEndmonth()!=null){
  52 + criteria.andCurmonthBetween(manifest.getCurmonth(),manifest.getEndmonth());
  53 + }
  54 +
  55 + //根据时间段-日
  56 + if(manifest.getCurweek()!=null&&manifest.getEndweek()!=null){
  57 + criteria.andCurweekBetween(manifest.getCurweek(),manifest.getEndweek());
  58 + }
  59 +
  60 + //根据机号
  61 + if(checkPropertyNull(manifest.getPlaneno())){
  62 + criteria.andPlanenoEqualTo(manifest.getPlaneno());
  63 + }
  64 + //根据航班号
  65 + if(checkPropertyNull(manifest.getFlightno())){
  66 + criteria.andFlightnoEqualTo(manifest.getFlightno());
  67 + }
  68 + //根据机型
  69 + if(checkPropertyNull(manifest.getPlanetype())){
  70 + criteria.andPlanetypeEqualTo(manifest.getPlanetype());
  71 + }
  72 + //根据航空公司
  73 + if(checkPropertyNull(manifest.getAircorpid())){
  74 + criteria.andAircorpidEqualTo(manifest.getAircorpid());
  75 + }
  76 + //进出港
  77 + if(checkPropertyNull(manifest.getExpimp())){
  78 + criteria.andExpimpEqualTo(manifest.getExpimp());
  79 + }
  80 + //国内国际
  81 + if(checkPropertyNull(manifest.getDomint())){
  82 + criteria.andDomintEqualTo(manifest.getDomint());
  83 + }
  84 + //运单类型
  85 + if(checkPropertyNull(manifest.getWaybilltype())){
  86 + criteria.andWaybilltypeEqualTo(manifest.getWaybilltype());
  87 + }
  88 + //营业点
  89 + if(checkPropertyNull(manifest.getOperdepartid())){
  90 + criteria.andOperdepartidEqualTo(manifest.getOperdepartid());
  91 + }
  92 +
  93 + int count = maniFestService.countByExample(example);
  94 + BigDecimal weight = maniFestService.sumWeightByExample(example);
  95 + BigDecimal pcs= maniFestService.sumPcsByExample(example);
  96 + BigDecimal vol= maniFestService.sumVolByExample(example);
  97 + Totals totals = new Totals(weight,pcs,vol);
  98 +
  99 + Page page = new Page(defaultDataStart,defaultPerPage);
  100 + page.setCount(count);
  101 + example.setPage(page); //oracle 用这个
  102 +
  103 + List<TKpiCargoManifest> maniList = maniFestService.selectByExample(example);
  104 + ModelAndPage<TKpiCargoManifest> modelAndPage = new ModelAndPage<TKpiCargoManifest>(maniList,page,totals);
  105 + return modelAndPage;
  106 + }
  107 +}
  1 +package com.tianbo.controller.json;
  2 +
  3 +import com.tianbo.common.ModelAndPage;
  4 +import com.tianbo.model.*;
  5 +import com.tianbo.service.PermissionService;
  6 +import com.tianbo.service.RolePermissionService;
  7 +import com.tianbo.util.dao.Page;
  8 +import com.tianbo.util.json.ResponseModel;
  9 +import org.springframework.beans.factory.annotation.Autowired;
  10 +import org.springframework.stereotype.Controller;
  11 +import org.springframework.web.bind.annotation.*;
  12 +
  13 +import javax.servlet.http.HttpServletRequest;
  14 +import java.math.BigDecimal;
  15 +import java.util.List;
  16 +
  17 +@Controller
  18 +@RequestMapping("/permission")
  19 +public class PermissionJsonContorller {
  20 + //service类
  21 + @Autowired
  22 + private PermissionService permissionService;
  23 +
  24 + @Autowired
  25 + private RolePermissionService rolePermissionService;
  26 +
  27 + @RequestMapping("list.json")
  28 + @ResponseBody
  29 + public ModelAndPage Permissionlist(){ //所有权限列表
  30 + PermissionExample example = new PermissionExample();
  31 + //调用service方法得到用户列表
  32 + List<Permission> pms = permissionService.selectByExample(example);
  33 +
  34 + ModelAndPage modelAndPage = new ModelAndPage(pms,new Page());
  35 +
  36 + return modelAndPage;
  37 + }
  38 +
  39 + @RequestMapping(value = "listByRole.json",method = RequestMethod.POST)
  40 + @ResponseBody
  41 + public ModelAndPage listByRole(@RequestBody RolePermission rolePermission){ //角色权限列表
  42 + BigDecimal testID = new BigDecimal(1);
  43 + RolePermissionExample example = new RolePermissionExample();
  44 + example.createCriteria().andRoleIdEqualTo(testID);
  45 + //调用service方法得到用户列表
  46 + List<RolePermission> rp = rolePermissionService.selectByExample(example);
  47 +
  48 + ModelAndPage modelAndPage = new ModelAndPage(rp,new Page());
  49 +
  50 + return modelAndPage;
  51 + }
  52 +
  53 + @RequestMapping("update.json")
  54 + @ResponseBody
  55 + public ResponseModel insertByroleID(@RequestBody RolePermission rolePermission){
  56 + BigDecimal roleId = rolePermission.getRoleId();
  57 +
  58 + //先删除以前的权限绑定。
  59 + //再插入新的权限绑定.
  60 + RolePermissionExample delExample = new RolePermissionExample();
  61 +
  62 + delExample.createCriteria().andRoleIdEqualTo(roleId);
  63 + int delSuccess = rolePermissionService.deleteByExample(delExample);
  64 +
  65 + if (delSuccess>0){
  66 + //循环取出提交的已选择的Permission id列表,再插入
  67 + for(Integer PmsId:rolePermission.getPmList()){
  68 + RolePermission rolePermission1 = new RolePermission();
  69 + rolePermission1.setRoleId(roleId);
  70 + rolePermission1.setPermissionId(new BigDecimal(PmsId));
  71 + int i = rolePermissionService.insert(rolePermission1);
  72 +
  73 + if (i<=0){
  74 + return new ResponseModel(500,"权限更新失败");
  75 + }
  76 + }
  77 + }else {
  78 + return new ResponseModel(500,"权限更新失败");
  79 + }
  80 + return new ResponseModel(200,"权限更新成功");
  81 + }
  82 +
  83 + @RequestMapping("edit.json")
  84 + @ResponseBody
  85 + public ModelAndPage edit(){
  86 + PermissionExample example = new PermissionExample();
  87 + //调用service方法得到用户列表
  88 + List<Permission> pms = permissionService.selectByExample(example);
  89 +
  90 + ModelAndPage modelAndPage = new ModelAndPage(pms,new Page());
  91 +
  92 + return modelAndPage;
  93 + }
  94 +}
  1 +/**
  2 + * Copyright &copy; 2015-2020 <a href="--版权信息--">JeePlus</a> All rights reserved.
  3 + */
  4 +package com.tianbo.controller.json;
  5 +
  6 +import java.io.IOException;
  7 +import java.io.PrintWriter;
  8 +
  9 +import javax.servlet.http.HttpServletResponse;
  10 +
  11 +public class PrintJSON {
  12 +
  13 +
  14 + public static void write(HttpServletResponse response,String content) {
  15 + response.reset();
  16 + response.setContentType("application/json");
  17 + response.setHeader("Cache-Control", "no-store");
  18 + response.setCharacterEncoding("UTF-8");
  19 + try {
  20 + PrintWriter pw=response.getWriter();
  21 + pw.write(content);
  22 + pw.flush();
  23 + } catch (IOException e) {
  24 + e.printStackTrace();
  25 + }
  26 + }
  27 +
  28 +}
  1 +package com.tianbo.controller.json;
  2 +
  3 +import com.tianbo.common.ModelAndPage;
  4 +import com.tianbo.controller.base.BaseController;
  5 +import com.tianbo.model.Role;
  6 +import com.tianbo.model.RoleExample;
  7 +import com.tianbo.service.RoleService;
  8 +import com.tianbo.util.dao.Page;
  9 +import com.tianbo.util.json.ResponseModel;
  10 +import com.tianbo.util.tools.MD5Tools;
  11 +import org.apache.shiro.authz.annotation.RequiresRoles;
  12 +import org.springframework.beans.factory.annotation.Autowired;
  13 +import org.springframework.stereotype.Controller;
  14 +import org.springframework.web.bind.annotation.*;
  15 +
  16 +import java.util.Date;
  17 +import java.util.List;
  18 +
  19 +@Controller
  20 +@RequestMapping("/role")
  21 +public class RoleJsonController extends BaseController{
  22 +
  23 + //service类
  24 + @Autowired
  25 + private RoleService roleService;
  26 +
  27 + @RequestMapping("list.json")
  28 + @RequiresRoles("admin")
  29 + @ResponseBody
  30 + public ModelAndPage list(@ModelAttribute Page frontPage, @ModelAttribute Role role) throws Exception{
  31 +
  32 + RoleExample example = new RoleExample();
  33 + example.setOrderByClause("role_id");
  34 + //调用service方法得到用户列表
  35 + List<Role> roles = roleService.selectByExample(example);
  36 +
  37 + ModelAndPage modelAndPage = new ModelAndPage(roles,new Page());
  38 +
  39 + return modelAndPage;
  40 + }
  41 +
  42 + @RequestMapping("roleExamlpe.json")
  43 + @ResponseBody
  44 + public Role example(){
  45 + return new Role();
  46 + }
  47 +
  48 + @RequestMapping(value = "add.json",method = RequestMethod.POST)
  49 + @RequiresRoles("admin")
  50 + @ResponseBody
  51 + public ResponseModel add(@RequestBody Role role){
  52 +
  53 + ResponseModel responseModel = new ResponseModel();
  54 +
  55 + if (checkRole(role)){
  56 + int i = roleService.insert(role);
  57 + if(i>0){
  58 + responseModel.setStatus(200);
  59 + responseModel.setMsg("添加角色成功");
  60 + }else {
  61 + responseModel.setStatus(500);
  62 + responseModel.setMsg("添加角色失败");
  63 + }
  64 + }else {
  65 + responseModel.setStatus(500);
  66 + responseModel.setMsg("添加角色失败,已存在相同名称的角色");
  67 + }
  68 + return responseModel;
  69 +
  70 +
  71 +
  72 +
  73 + }
  74 +
  75 + private Boolean checkRole( Role role){
  76 + if (roleService.checkRole(role)){
  77 + return Boolean.FALSE; //存在用户,返回false
  78 + }else {
  79 + return Boolean.TRUE; //不存在用户,返回true,可以添加用户
  80 + }
  81 + }
  82 +
  83 +}
  1 +package com.tianbo.controller.json;
  2 +
  3 +import com.tianbo.common.ModelAndPage;
  4 +import com.tianbo.controller.base.BaseController;
  5 +import com.tianbo.model.Users;
  6 +import com.tianbo.model.UsersExample;
  7 +import com.tianbo.service.UserService;
  8 +import com.tianbo.util.dao.Page;
  9 +import com.tianbo.util.json.ResponseModel;
  10 +import com.tianbo.util.tools.MD5Tools;
  11 +import org.apache.shiro.authz.annotation.RequiresPermissions;
  12 +import org.apache.shiro.authz.annotation.RequiresRoles;
  13 +import org.springframework.beans.factory.annotation.Autowired;
  14 +import org.springframework.stereotype.Controller;
  15 +import org.springframework.web.bind.annotation.*;
  16 +import org.springframework.web.servlet.ModelAndView;
  17 +
  18 +import java.text.SimpleDateFormat;
  19 +import java.util.Date;
  20 +
  21 +/**
  22 + * Created by mrz on 2017/8/23.
  23 + */
  24 +@Controller
  25 +@RequestMapping("/user")
  26 +public class UserJsonController extends BaseController{
  27 +
  28 + //service类
  29 + @Autowired
  30 + private UserService userService;
  31 +
  32 + @RequestMapping("userExample.json")
  33 + @RequiresRoles("admin")
  34 + @ResponseBody
  35 + public Users userExample() {
  36 +
  37 + Users users = new Users();
  38 + return users;
  39 + }
  40 +
  41 + @RequestMapping("userById.json")
  42 + @RequiresRoles("admin")
  43 + @ResponseBody
  44 + public Users userList(@ModelAttribute Users user) throws Exception{
  45 +
  46 + Users users = userService.selectByUserId(user.getUserId());
  47 + return users;
  48 + }
  49 +
  50 +
  51 + /**
  52 + * 查找所用用户控制器方法
  53 + * @return
  54 + * @throws Exception
  55 + */
  56 + @RequestMapping("list.json")
  57 + @RequiresRoles("admin")
  58 + @ResponseBody
  59 + public ModelAndPage userList(@ModelAttribute Page frontPage,@ModelAttribute Users user) throws Exception{
  60 +
  61 + if(frontPage.getBegin()>=0){ defaultDataStart = frontPage.getBegin();}
  62 + if (frontPage.getLength()>0){ defaultPerPage = frontPage.getLength();}
  63 + //调用service方法得到用户列表
  64 + ModelAndPage users = userService.userList(defaultDataStart,defaultPerPage,user);
  65 +
  66 + return users;
  67 + }
  68 +
  69 + @RequestMapping(value = "baseUpdate.json",method = RequestMethod.POST)
  70 + @RequiresRoles("admin")
  71 + @RequiresPermissions("user:edit")
  72 + @ResponseBody
  73 + public ResponseModel baseUpdate(@RequestBody Users user){
  74 + user.setUpdatetime(new Date());
  75 + int n = userService.updateByPrimaryKey(user);
  76 + ResponseModel responseModel = new ResponseModel();
  77 +
  78 + if (n>0){
  79 + responseModel.setStatus(200);
  80 + responseModel.setMsg("用户资料更新成功");
  81 + return responseModel;
  82 + }else {
  83 + responseModel.setStatus(500);
  84 + responseModel.setMsg("用户资料更新失败");
  85 + return responseModel;
  86 + }
  87 +
  88 + }
  89 +
  90 + @RequestMapping(value = "add.json",method = RequestMethod.POST)
  91 + @RequiresRoles("admin")
  92 + @ResponseBody
  93 + public ResponseModel add(@RequestBody Users user){
  94 +
  95 + ResponseModel responseModel = new ResponseModel();
  96 +
  97 + if(checkUser(user)){
  98 + String userPW = user.getPassword();
  99 + String PWMD5 = MD5Tools.MD5(userPW);
  100 + user.setPassword(PWMD5);
  101 + user.setCreattime(new Date());
  102 + int n = userService.insert(user);
  103 +
  104 + if (n>0){
  105 + responseModel.setStatus(200);
  106 + responseModel.setMsg("用户添加成功");
  107 + }else {
  108 +
  109 + }
  110 + }else {
  111 + responseModel.setStatus(500);
  112 + responseModel.setMsg("用户添加失败,已存在用户");
  113 + }
  114 + return responseModel;
  115 + }
  116 +
  117 + @RequestMapping(value = "del.json",method = RequestMethod.POST)
  118 + @RequiresRoles("admin")
  119 + @ResponseBody
  120 + public ResponseModel del(@ModelAttribute Users user){
  121 +
  122 + ResponseModel responseModel = new ResponseModel();
  123 +
  124 + int n = userService.deleteByPrimaryKey(user.getUserId());
  125 +
  126 + if (n>0){
  127 + responseModel.setStatus(200);
  128 + responseModel.setMsg("用户删除成功");
  129 + }else {
  130 + responseModel.setStatus(500);
  131 + responseModel.setMsg("用户删除失败");
  132 + }
  133 + return responseModel;
  134 + }
  135 +
  136 + private Boolean checkUser( Users user){
  137 + if (userService.checkUser(user)){
  138 + return Boolean.FALSE; //存在用户,返回false
  139 + }else {
  140 + return Boolean.TRUE; //不存在用户,返回true,可以添加用户
  141 + }
  142 + }
  143 +
  144 +
  145 +}
  1 +package com.tianbo.controller;
  2 +
  3 +import org.springframework.stereotype.Controller;
  4 +import org.springframework.web.bind.annotation.RequestMapping;
  5 +import org.springframework.web.bind.annotation.ResponseBody;
  6 +
  7 +import com.tianbo.common.sendFile;
  8 +import com.tianbo.util.PropertiesUtils;
  9 +import com.tianbo.util.json.ResponseModel;
  10 +
  11 +@Controller
  12 +public class sendController {
  13 + @RequestMapping("/move")
  14 + @ResponseBody
  15 + public ResponseModel moveTo(String fileName) {
  16 + String path = PropertiesUtils.readProperty("targetPath");
  17 + new sendFile().move(fileName,path);
  18 + ResponseModel model = new ResponseModel();
  19 + model.setStatus(1);
  20 + return model;
  21 + }
  22 +}
  1 +package com.tianbo.controller.tally;
  2 +
  3 +import java.util.HashMap;
  4 +import java.util.Map;
  5 +
  6 +import javax.servlet.http.HttpServletRequest;
  7 +
  8 +import org.springframework.beans.factory.annotation.Autowired;
  9 +import org.springframework.stereotype.Controller;
  10 +import org.springframework.ui.ModelMap;
  11 +import org.springframework.web.bind.annotation.RequestMapping;
  12 +import org.springframework.web.bind.annotation.RequestParam;
  13 +import org.springframework.web.bind.annotation.ResponseBody;
  14 +
  15 +import com.tianbo.model.Originmanifestsecondary;
  16 +import com.tianbo.model.Tallymaster;
  17 +import com.tianbo.service.OriginmanifestsecondaryService;
  18 +import com.tianbo.service.TallymasterSecondService;
  19 +import com.tianbo.service.TallymasterService;
  20 +import com.tianbo.util.DateUtils;
  21 +import com.tianbo.util.json.JsonConversion;
  22 +
  23 +@Controller
  24 +@RequestMapping(value = "tally")
  25 +public class TallyController {
  26 +
  27 +
  28 + @Autowired
  29 + private TallymasterService tallymasterService;
  30 +
  31 + @Autowired
  32 + private TallymasterSecondService tallymasterSecondService;
  33 +
  34 + @Autowired
  35 + private OriginmanifestsecondaryService originmanifestsecondaryService;
  36 +
  37 + /**
  38 + * 到totally页面
  39 + * @return
  40 + */
  41 + @RequestMapping(value = "totally")
  42 + public String searchArr() {
  43 +
  44 + return "totally";
  45 + }
  46 + /**
  47 + * 分批标识修改页面
  48 + * @param model
  49 + * @param request
  50 + * @return
  51 + */
  52 + @RequestMapping(value = "toBatch")
  53 + public String toBatch(ModelMap model,HttpServletRequest request) {
  54 + String waybillnomaster = request.getParameter("waybillnomaster");
  55 + model.put("waybillnomaster", waybillnomaster);
  56 + return "batch";
  57 + }
  58 +
  59 + @ResponseBody
  60 + @RequestMapping(value = "insert")
  61 + public String toTransForm(ModelMap model,HttpServletRequest request) {
  62 + Map<String,Object> map = new HashMap<>();
  63 + String waybillnomaster = request.getParameter("waybillnomaster");
  64 + String flightno = request.getParameter("flightno");
  65 + String flightdate = request.getParameter("flightdate");
  66 + Tallymaster tallymaster = new Tallymaster();
  67 + tallymaster.setWaybillnomaster(waybillnomaster);
  68 + if(flightno!=null){
  69 + tallymaster.setFlightno(flightno);
  70 + }
  71 + if(flightdate!=null){
  72 + tallymaster.setFlightdate(DateUtils.stringToDate(flightdate, "yyyy-mm-dd"));
  73 + }
  74 + boolean AUTOID = tallymasterService.checkAUTOID(tallymaster);
  75 + Originmanifestsecondary Originmanifestsecondary = new Originmanifestsecondary();
  76 + Originmanifestsecondary.setWaybillnomaster(waybillnomaster);
  77 + boolean ORIGINMANIFESTSECONDARY = originmanifestsecondaryService.check(Originmanifestsecondary);
  78 + if(!AUTOID && ORIGINMANIFESTSECONDARY){
  79 + map.put("code", 0);
  80 + map.put("msg", "无此单号理货主单数据");
  81 + }else if(!ORIGINMANIFESTSECONDARY && AUTOID){
  82 + map.put("code", 0);
  83 + map.put("msg", "无此单号原始分单数据");
  84 + }else if(!AUTOID && !ORIGINMANIFESTSECONDARY){
  85 + map.put("code", 0);
  86 + map.put("msg", "无此单号原始分单数据与理货主单数据");
  87 + }else {
  88 + try {
  89 + tallymasterSecondService.insert(tallymaster);
  90 + map.put("code", 1);
  91 + map.put("msg", "原始分单数据已转理货分单");
  92 + } catch (Exception e) {
  93 + e.printStackTrace();
  94 + map.put("code", -1);
  95 + map.put("msg", "转换异常,请重试");
  96 + }
  97 + }
  98 + return JsonConversion.writeMapJSON(map);
  99 + }
  100 +
  101 +
  102 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import java.util.List;
  4 +import org.apache.ibatis.annotations.Param;
  5 +
  6 +import com.tianbo.model.Arrivedmaster;
  7 +import com.tianbo.model.ArrivedmasterExample;
  8 +
  9 +
  10 +public interface ArrivedmasterMapper {
  11 + int countByExample(ArrivedmasterExample example);
  12 +
  13 + int deleteByExample(ArrivedmasterExample example);
  14 +
  15 + int insert(Arrivedmaster record);
  16 +
  17 + int insertSelective(Arrivedmaster record);
  18 +
  19 + List<Arrivedmaster> selectByExample(ArrivedmasterExample example);
  20 +
  21 + int updateByExampleSelective(@Param("record") Arrivedmaster record, @Param("example") ArrivedmasterExample example);
  22 +
  23 + int updateByExample(@Param("record") Arrivedmaster record, @Param("example") ArrivedmasterExample example);
  24 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import com.tianbo.model.MessageBak;
  4 +import com.tianbo.model.MessageBakExample;
  5 +import java.util.List;
  6 +import org.apache.ibatis.annotations.Param;
  7 +import org.springframework.stereotype.Component;
  8 +
  9 +public interface MessageBakMapper {
  10 + int countByExample(MessageBakExample example);
  11 +
  12 + int deleteByExample(MessageBakExample example);
  13 +
  14 + int deleteByPrimaryKey(Short fid);
  15 +
  16 + int insert(MessageBak record);
  17 +
  18 + int insertSelective(MessageBak record);
  19 +
  20 + List<MessageBak> selectByExampleWithBLOBs(MessageBakExample example);
  21 +
  22 + List<MessageBak> selectByExample(MessageBakExample example);
  23 +
  24 + MessageBak selectByPrimaryKey(Short fid);
  25 +
  26 + int updateByExampleSelective(@Param("record") MessageBak record, @Param("example") MessageBakExample example);
  27 +
  28 + int updateByExampleWithBLOBs(@Param("record") MessageBak record, @Param("example") MessageBakExample example);
  29 +
  30 + int updateByExample(@Param("record") MessageBak record, @Param("example") MessageBakExample example);
  31 +
  32 + int updateByPrimaryKeySelective(MessageBak record);
  33 +
  34 + int updateByPrimaryKeyWithBLOBs(MessageBak record);
  35 +
  36 + int updateByPrimaryKey(MessageBak record);
  37 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import com.tianbo.model.Originmanifestmaster;
  4 +import com.tianbo.model.OriginmanifestmasterExample;
  5 +import java.util.List;
  6 +import org.apache.ibatis.annotations.Param;
  7 +
  8 +public interface OriginmanifestmasterMapper {
  9 + int countByExample(OriginmanifestmasterExample example);
  10 +
  11 + int deleteByExample(OriginmanifestmasterExample example);
  12 +
  13 + int insert(Originmanifestmaster record);
  14 +
  15 + int insertSelective(Originmanifestmaster record);
  16 +
  17 + List<Originmanifestmaster> selectByExample(OriginmanifestmasterExample example);
  18 +
  19 + int updateByExampleSelective(@Param("record") Originmanifestmaster record, @Param("example") OriginmanifestmasterExample example);
  20 +
  21 + int updateByExample(@Param("record") Originmanifestmaster record, @Param("example") OriginmanifestmasterExample example);
  22 +
  23 + List<Originmanifestmaster> getList(Originmanifestmaster mainfest);
  24 +
  25 + void updateMain(Originmanifestmaster mainfest);
  26 +
  27 + void updateToT(Originmanifestmaster mainfest);
  28 +
  29 + void updateSecond(Originmanifestmaster mainfest);
  30 +
  31 + void updateStatus(Originmanifestmaster mainfest);
  32 +
  33 + void updateMainStatus(Originmanifestmaster mainfest);
  34 +
  35 + void updateAllStatus(Originmanifestmaster mainfest);
  36 +
  37 + void updateAllMainStatus(Originmanifestmaster mainfest);
  38 +
  39 + void insertTransit(Originmanifestmaster mainfest);
  40 +
  41 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import java.util.List;
  4 +import org.apache.ibatis.annotations.Param;
  5 +
  6 +import com.tianbo.model.Originmanifestsecondary;
  7 +import com.tianbo.model.OriginmanifestsecondaryExample;
  8 +
  9 +
  10 +public interface OriginmanifestsecondaryMapper {
  11 + int countByExample(OriginmanifestsecondaryExample example);
  12 +
  13 + int deleteByExample(OriginmanifestsecondaryExample example);
  14 +
  15 + int insert(Originmanifestsecondary record);
  16 +
  17 + int insertSelective(Originmanifestsecondary record);
  18 +
  19 +
  20 + List<Originmanifestsecondary> getList(Originmanifestsecondary example);
  21 +
  22 + List<Originmanifestsecondary> selectByExample(OriginmanifestsecondaryExample example);
  23 +
  24 + int updateByExampleSelective(@Param("record") Originmanifestsecondary record, @Param("example") OriginmanifestsecondaryExample example);
  25 +
  26 + int updateByExample(@Param("record") Originmanifestsecondary record, @Param("example") OriginmanifestsecondaryExample example);
  27 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import com.tianbo.model.Permission;
  4 +import com.tianbo.model.PermissionExample;
  5 +import java.math.BigDecimal;
  6 +import java.util.List;
  7 +import org.apache.ibatis.annotations.Param;
  8 +
  9 +public interface PermissionMapper {
  10 + int countByExample(PermissionExample example);
  11 +
  12 + int deleteByExample(PermissionExample example);
  13 +
  14 + int deleteByPrimaryKey(BigDecimal permissionId);
  15 +
  16 + int insert(Permission record);
  17 +
  18 + int insertSelective(Permission record);
  19 +
  20 + List<Permission> selectByExample(PermissionExample example);
  21 +
  22 + Permission selectByPrimaryKey(BigDecimal permissionId);
  23 +
  24 + int updateByExampleSelective(@Param("record") Permission record, @Param("example") PermissionExample example);
  25 +
  26 + int updateByExample(@Param("record") Permission record, @Param("example") PermissionExample example);
  27 +
  28 + int updateByPrimaryKeySelective(Permission record);
  29 +
  30 + int updateByPrimaryKey(Permission record);
  31 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import java.util.List;
  4 +import org.apache.ibatis.annotations.Param;
  5 +
  6 +import com.tianbo.model.Preparemaster;
  7 +import com.tianbo.model.PreparemasterExample;
  8 +
  9 +
  10 +public interface PreparemasterMapper {
  11 + int countByExample(PreparemasterExample example);
  12 +
  13 + int deleteByExample(PreparemasterExample example);
  14 +
  15 + int insert(Preparemaster record);
  16 +
  17 + int insertSelective(Preparemaster record);
  18 +
  19 + List<Preparemaster> selectByExample(PreparemasterExample example);
  20 +
  21 + int updateByExampleSelective(@Param("record") Preparemaster record, @Param("example") PreparemasterExample example);
  22 +
  23 + int updateByExample(@Param("record") Preparemaster record, @Param("example") PreparemasterExample example);
  24 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import com.tianbo.model.Role;
  4 +import com.tianbo.model.RoleExample;
  5 +import java.math.BigDecimal;
  6 +import java.util.List;
  7 +import org.apache.ibatis.annotations.Param;
  8 +
  9 +public interface RoleMapper {
  10 + int countByExample(RoleExample example);
  11 +
  12 + int deleteByExample(RoleExample example);
  13 +
  14 + int deleteByPrimaryKey(BigDecimal roleId);
  15 +
  16 + int insert(Role record);
  17 +
  18 + int insertSelective(Role record);
  19 +
  20 + List<Role> selectByExample(RoleExample example);
  21 +
  22 + Role selectByPrimaryKey(BigDecimal roleId);
  23 +
  24 + int updateByExampleSelective(@Param("record") Role record, @Param("example") RoleExample example);
  25 +
  26 + int updateByExample(@Param("record") Role record, @Param("example") RoleExample example);
  27 +
  28 + int updateByPrimaryKeySelective(Role record);
  29 +
  30 + int updateByPrimaryKey(Role record);
  31 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import com.tianbo.model.RolePermission;
  4 +import com.tianbo.model.RolePermissionExample;
  5 +import java.math.BigDecimal;
  6 +import java.util.List;
  7 +import org.apache.ibatis.annotations.Param;
  8 +
  9 +public interface RolePermissionMapper {
  10 + int countByExample(RolePermissionExample example);
  11 +
  12 + int deleteByExample(RolePermissionExample example);
  13 +
  14 + int deleteByPrimaryKey(BigDecimal id);
  15 +
  16 + int insert(RolePermission record);
  17 +
  18 + int insertSelective(RolePermission record);
  19 +
  20 + List<RolePermission> selectByExample(RolePermissionExample example);
  21 +
  22 + RolePermission selectByPrimaryKey(BigDecimal id);
  23 +
  24 + int updateByExampleSelective(@Param("record") RolePermission record, @Param("example") RolePermissionExample example);
  25 +
  26 + int updateByExample(@Param("record") RolePermission record, @Param("example") RolePermissionExample example);
  27 +
  28 + int updateByPrimaryKeySelective(RolePermission record);
  29 +
  30 + int updateByPrimaryKey(RolePermission record);
  31 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import java.util.List;
  4 +import org.apache.ibatis.annotations.Param;
  5 +
  6 +import com.tianbo.model.Sendlog;
  7 +import com.tianbo.model.SendlogExample;
  8 +
  9 +
  10 +public interface SendlogMapper {
  11 + int countByExample(SendlogExample example);
  12 +
  13 + int deleteByExample(SendlogExample example);
  14 +
  15 + int insert(Sendlog record);
  16 +
  17 + int insertSelective(Sendlog record);
  18 +
  19 + List<Sendlog> selectByExample(SendlogExample example);
  20 +
  21 + int updateByExampleSelective(@Param("record") Sendlog record, @Param("example") SendlogExample example);
  22 +
  23 + int updateByExample(@Param("record") Sendlog record, @Param("example") SendlogExample example);
  24 +
  25 +
  26 + List<Sendlog> getSendLog(String billNo);
  27 +
  28 + List<Sendlog> getSendLogSecond(String billNoSecond);
  29 +
  30 + List<Sendlog> getSendLogSecondByMain(String billNo);
  31 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import com.tianbo.model.TEtlMessage;
  4 +import com.tianbo.model.TEtlMessageExample;
  5 +import java.math.BigDecimal;
  6 +import java.util.List;
  7 +import org.apache.ibatis.annotations.Param;
  8 +
  9 +public interface TEtlMessageMapper {
  10 + int countByExample(TEtlMessageExample example);
  11 +
  12 + int deleteByExample(TEtlMessageExample example);
  13 +
  14 + int deleteByPrimaryKey(BigDecimal fid);
  15 +
  16 + int insert(TEtlMessage record);
  17 +
  18 + int insertSelective(TEtlMessage record);
  19 +
  20 + List<TEtlMessage> selectByExampleWithBLOBs(TEtlMessageExample example);
  21 +
  22 + List<TEtlMessage> selectByExample(TEtlMessageExample example);
  23 +
  24 + TEtlMessage selectByPrimaryKey(BigDecimal fid);
  25 +
  26 + int updateByExampleSelective(@Param("record") TEtlMessage record, @Param("example") TEtlMessageExample example);
  27 +
  28 + int updateByExampleWithBLOBs(@Param("record") TEtlMessage record, @Param("example") TEtlMessageExample example);
  29 +
  30 + int updateByExample(@Param("record") TEtlMessage record, @Param("example") TEtlMessageExample example);
  31 +
  32 + int updateByPrimaryKeySelective(TEtlMessage record);
  33 +
  34 + int updateByPrimaryKeyWithBLOBs(TEtlMessage record);
  35 +
  36 + int updateByPrimaryKey(TEtlMessage record);
  37 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import com.tianbo.model.TKpiCargoManifest;
  4 +import com.tianbo.model.TKpiCargoManifestExample;
  5 +import java.math.BigDecimal;
  6 +import java.util.List;
  7 +import org.apache.ibatis.annotations.Param;
  8 +
  9 +public interface TKpiCargoManifestMapper {
  10 + int countByExample(TKpiCargoManifestExample example);
  11 +
  12 + int deleteByExample(TKpiCargoManifestExample example);
  13 +
  14 + int deleteByPrimaryKey(BigDecimal fid);
  15 +
  16 + int insert(TKpiCargoManifest record);
  17 +
  18 + int insertSelective(TKpiCargoManifest record);
  19 +
  20 + List<TKpiCargoManifest> selectByExample(TKpiCargoManifestExample example);
  21 +
  22 + TKpiCargoManifest selectByPrimaryKey(BigDecimal fid);
  23 +
  24 + int updateByExampleSelective(@Param("record") TKpiCargoManifest record, @Param("example") TKpiCargoManifestExample example);
  25 +
  26 + int updateByExample(@Param("record") TKpiCargoManifest record, @Param("example") TKpiCargoManifestExample example);
  27 +
  28 + int updateByPrimaryKeySelective(TKpiCargoManifest record);
  29 +
  30 + int updateByPrimaryKey(TKpiCargoManifest record);
  31 +
  32 + BigDecimal sumWeightByExample(TKpiCargoManifestExample example);
  33 +
  34 + BigDecimal sumPcsByExample(TKpiCargoManifestExample example);
  35 +
  36 + BigDecimal sumVolByExample(TKpiCargoManifestExample example);
  37 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import com.tianbo.model.TKpiCargoWaybill;
  4 +import com.tianbo.model.TKpiCargoWaybillExample;
  5 +import java.math.BigDecimal;
  6 +import java.util.List;
  7 +import org.apache.ibatis.annotations.Param;
  8 +
  9 +public interface TKpiCargoWaybillMapper {
  10 + int countByExample(TKpiCargoWaybillExample example);
  11 +
  12 + int deleteByExample(TKpiCargoWaybillExample example);
  13 +
  14 + int deleteByPrimaryKey(BigDecimal fid);
  15 +
  16 + int insert(TKpiCargoWaybill record);
  17 +
  18 + int insertSelective(TKpiCargoWaybill record);
  19 +
  20 + List<TKpiCargoWaybill> selectByExample(TKpiCargoWaybillExample example);
  21 +
  22 + TKpiCargoWaybill selectByPrimaryKey(BigDecimal fid);
  23 +
  24 + int updateByExampleSelective(@Param("record") TKpiCargoWaybill record, @Param("example") TKpiCargoWaybillExample example);
  25 +
  26 + int updateByExample(@Param("record") TKpiCargoWaybill record, @Param("example") TKpiCargoWaybillExample example);
  27 +
  28 + int updateByPrimaryKeySelective(TKpiCargoWaybill record);
  29 +
  30 + int updateByPrimaryKey(TKpiCargoWaybill record);
  31 +
  32 + BigDecimal sumWeightByExample(TKpiCargoWaybillExample example);
  33 +
  34 + BigDecimal sumPcsByExample(TKpiCargoWaybillExample example);
  35 +
  36 + BigDecimal sumVolByExample(TKpiCargoWaybillExample example);
  37 +
  38 + BigDecimal sumHbillqtyByExample(TKpiCargoWaybillExample example);
  39 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import com.tianbo.model.TOlapColumn;
  4 +import com.tianbo.model.TOlapColumnExample;
  5 +import java.math.BigDecimal;
  6 +import java.util.List;
  7 +import org.apache.ibatis.annotations.Param;
  8 +
  9 +public interface TOlapColumnMapper {
  10 + int countByExample(TOlapColumnExample example);
  11 +
  12 + int deleteByExample(TOlapColumnExample example);
  13 +
  14 + int deleteByPrimaryKey(BigDecimal columnid);
  15 +
  16 + int insert(TOlapColumn record);
  17 +
  18 + int insertSelective(TOlapColumn record);
  19 +
  20 + List<TOlapColumn> selectByExample(TOlapColumnExample example);
  21 +
  22 + TOlapColumn selectByPrimaryKey(BigDecimal columnid);
  23 +
  24 + int updateByExampleSelective(@Param("record") TOlapColumn record, @Param("example") TOlapColumnExample example);
  25 +
  26 + int updateByExample(@Param("record") TOlapColumn record, @Param("example") TOlapColumnExample example);
  27 +
  28 + int updateByPrimaryKeySelective(TOlapColumn record);
  29 +
  30 + int updateByPrimaryKey(TOlapColumn record);
  31 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import com.tianbo.model.TOlapDataset;
  4 +import com.tianbo.model.TOlapDatasetExample;
  5 +import java.math.BigDecimal;
  6 +import java.util.List;
  7 +import org.apache.ibatis.annotations.Param;
  8 +
  9 +public interface TOlapDatasetMapper {
  10 + int countByExample(TOlapDatasetExample example);
  11 +
  12 + int deleteByExample(TOlapDatasetExample example);
  13 +
  14 + int deleteByPrimaryKey(BigDecimal datasetid);
  15 +
  16 + int insert(TOlapDataset record);
  17 +
  18 + int insertSelective(TOlapDataset record);
  19 +
  20 + List<TOlapDataset> selectByExample(TOlapDatasetExample example);
  21 +
  22 + TOlapDataset selectByPrimaryKey(BigDecimal datasetid);
  23 +
  24 + int updateByExampleSelective(@Param("record") TOlapDataset record, @Param("example") TOlapDatasetExample example);
  25 +
  26 + int updateByExample(@Param("record") TOlapDataset record, @Param("example") TOlapDatasetExample example);
  27 +
  28 + int updateByPrimaryKeySelective(TOlapDataset record);
  29 +
  30 + int updateByPrimaryKey(TOlapDataset record);
  31 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import com.tianbo.model.TOlapXmldoc;
  4 +import com.tianbo.model.TOlapXmldocExample;
  5 +import java.math.BigDecimal;
  6 +import java.util.List;
  7 +import org.apache.ibatis.annotations.Param;
  8 +
  9 +public interface TOlapXmldocMapper {
  10 + int countByExample(TOlapXmldocExample example);
  11 +
  12 + int deleteByExample(TOlapXmldocExample example);
  13 +
  14 + int deleteByPrimaryKey(BigDecimal docid);
  15 +
  16 + int insert(TOlapXmldoc record);
  17 +
  18 + int insertSelective(TOlapXmldoc record);
  19 +
  20 + List<TOlapXmldoc> selectByExample(TOlapXmldocExample example);
  21 +
  22 + TOlapXmldoc selectByPrimaryKey(BigDecimal docid);
  23 +
  24 + int updateByExampleSelective(@Param("record") TOlapXmldoc record, @Param("example") TOlapXmldocExample example);
  25 +
  26 + int updateByExample(@Param("record") TOlapXmldoc record, @Param("example") TOlapXmldocExample example);
  27 +
  28 + int updateByPrimaryKeySelective(TOlapXmldoc record);
  29 +
  30 + int updateByPrimaryKey(TOlapXmldoc record);
  31 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import com.tianbo.model.TOlapXmlnode;
  4 +import com.tianbo.model.TOlapXmlnodeExample;
  5 +import java.math.BigDecimal;
  6 +import java.util.List;
  7 +import org.apache.ibatis.annotations.Param;
  8 +
  9 +public interface TOlapXmlnodeMapper {
  10 + int countByExample(TOlapXmlnodeExample example);
  11 +
  12 + int deleteByExample(TOlapXmlnodeExample example);
  13 +
  14 + int deleteByPrimaryKey(BigDecimal nodeid);
  15 +
  16 + int insert(TOlapXmlnode record);
  17 +
  18 + int insertSelective(TOlapXmlnode record);
  19 +
  20 + List<TOlapXmlnode> selectByExample(TOlapXmlnodeExample example);
  21 +
  22 + TOlapXmlnode selectByPrimaryKey(BigDecimal nodeid);
  23 +
  24 + int updateByExampleSelective(@Param("record") TOlapXmlnode record, @Param("example") TOlapXmlnodeExample example);
  25 +
  26 + int updateByExample(@Param("record") TOlapXmlnode record, @Param("example") TOlapXmlnodeExample example);
  27 +
  28 + int updateByPrimaryKeySelective(TOlapXmlnode record);
  29 +
  30 + int updateByPrimaryKey(TOlapXmlnode record);
  31 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import com.tianbo.model.Tallymaster;
  4 +import com.tianbo.model.TallymasterExample;
  5 +import java.util.List;
  6 +import org.apache.ibatis.annotations.Param;
  7 +
  8 +public interface TallymasterMapper {
  9 + int countByExample(TallymasterExample example);
  10 +
  11 + int deleteByExample(TallymasterExample example);
  12 +
  13 + int insert(Tallymaster record);
  14 +
  15 + int insertSelective(Tallymaster record);
  16 +
  17 + List<Tallymaster> selectByExample(TallymasterExample example);
  18 +
  19 + int updateByExampleSelective(@Param("record") Tallymaster record, @Param("example") TallymasterExample example);
  20 +
  21 + int updateByExample(@Param("record") Tallymaster record, @Param("example") TallymasterExample example);
  22 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import com.tianbo.model.Tallymaster;
  4 +import com.tianbo.model.Tallysecondary;
  5 +import com.tianbo.model.TallysecondaryExample;
  6 +import java.util.List;
  7 +import org.apache.ibatis.annotations.Param;
  8 +
  9 +public interface TallysecondaryMapper {
  10 + int countByExample(TallysecondaryExample example);
  11 +
  12 + int deleteByExample(TallysecondaryExample example);
  13 +
  14 + int insert(Tallysecondary record);
  15 +
  16 + int insertSelective(Tallysecondary record);
  17 +
  18 + void insertTallySecond(Tallymaster tallymaster);
  19 +
  20 + List<Tallysecondary> selectByExample(TallysecondaryExample example);
  21 +
  22 + int updateByExampleSelective(@Param("record") Tallysecondary record, @Param("example") TallysecondaryExample example);
  23 +
  24 + int updateByExample(@Param("record") Tallysecondary record, @Param("example") TallysecondaryExample example);
  25 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import com.tianbo.model.UserRole;
  4 +import com.tianbo.model.UserRoleExample;
  5 +import java.math.BigDecimal;
  6 +import java.util.List;
  7 +import org.apache.ibatis.annotations.Param;
  8 +
  9 +public interface UserRoleMapper {
  10 + int countByExample(UserRoleExample example);
  11 +
  12 + int deleteByExample(UserRoleExample example);
  13 +
  14 + int deleteByPrimaryKey(BigDecimal id);
  15 +
  16 + int insert(UserRole record);
  17 +
  18 + int insertSelective(UserRole record);
  19 +
  20 + List<UserRole> selectByExample(UserRoleExample example);
  21 +
  22 + UserRole selectByPrimaryKey(BigDecimal id);
  23 +
  24 + int updateByExampleSelective(@Param("record") UserRole record, @Param("example") UserRoleExample example);
  25 +
  26 + int updateByExample(@Param("record") UserRole record, @Param("example") UserRoleExample example);
  27 +
  28 + int updateByPrimaryKeySelective(UserRole record);
  29 +
  30 + int updateByPrimaryKey(UserRole record);
  31 +}
  1 +package com.tianbo.mapper;
  2 +
  3 +import com.tianbo.model.Users;
  4 +import com.tianbo.model.UsersExample;
  5 +import java.math.BigDecimal;
  6 +import java.util.List;
  7 +import org.apache.ibatis.annotations.Param;
  8 +
  9 +public interface UsersMapper {
  10 + int countByExample(UsersExample example);
  11 +
  12 + int deleteByExample(UsersExample example);
  13 +
  14 + int deleteByPrimaryKey(BigDecimal userId);
  15 +
  16 + int insert(Users record);
  17 +
  18 + int insertSelective(Users record);
  19 +
  20 + List<Users> selectByExample(UsersExample example);
  21 +
  22 + Users selectByPrimaryKey(BigDecimal userId);
  23 +
  24 + int updateByExampleSelective(@Param("record") Users record, @Param("example") UsersExample example);
  25 +
  26 + int updateByExample(@Param("record") Users record, @Param("example") UsersExample example);
  27 +
  28 + int updateByPrimaryKeySelective(Users record);
  29 +
  30 + int updateByPrimaryKey(Users record);
  31 +}
  1 +package com.tianbo.model;
  2 +
  3 +import java.util.Date;
  4 +
  5 +public class Arrivedmaster {
  6 + private String autoid;
  7 +
  8 + private String waybillnomaster;
  9 +
  10 + private String tcdName;
  11 +
  12 + private String tcdTypecode;
  13 +
  14 + private String flightno;
  15 +
  16 + private Date flightdate;
  17 +
  18 + private String carrier;
  19 +
  20 + private String originatingstation;
  21 +
  22 + private String oName;
  23 +
  24 + private String destinationstation;
  25 +
  26 + private String fdName;
  27 +
  28 + private String arrivedtotalpiece;
  29 +
  30 + private String totalpiecequantity;
  31 +
  32 + private String arrivedtotalweight;
  33 +
  34 + private String grossweightmeasureuc;
  35 +
  36 + private String totalgrossweightmeasure;
  37 +
  38 + private String totalgrossweightmeasureuc;
  39 +
  40 + private String chargeableweightmeasure;
  41 +
  42 + private String chargeableweightmeasureuc;
  43 +
  44 + private String arriveddate;
  45 +
  46 + private String transportsplitdescription;
  47 +
  48 + private String customscode;
  49 +
  50 + private String productname;
  51 +
  52 + private String status;
  53 +
  54 + private String receiptinformation;
  55 +
  56 + private String createdate;
  57 +
  58 + public String getAutoid() {
  59 + return autoid;
  60 + }
  61 +
  62 + public void setAutoid(String autoid) {
  63 + this.autoid = autoid == null ? null : autoid.trim();
  64 + }
  65 +
  66 + public String getWaybillnomaster() {
  67 + return waybillnomaster;
  68 + }
  69 +
  70 + public void setWaybillnomaster(String waybillnomaster) {
  71 + this.waybillnomaster = waybillnomaster == null ? null : waybillnomaster.trim();
  72 + }
  73 +
  74 + public String getTcdName() {
  75 + return tcdName;
  76 + }
  77 +
  78 + public void setTcdName(String tcdName) {
  79 + this.tcdName = tcdName == null ? null : tcdName.trim();
  80 + }
  81 +
  82 + public String getTcdTypecode() {
  83 + return tcdTypecode;
  84 + }
  85 +
  86 + public void setTcdTypecode(String tcdTypecode) {
  87 + this.tcdTypecode = tcdTypecode == null ? null : tcdTypecode.trim();
  88 + }
  89 +
  90 + public String getFlightno() {
  91 + return flightno;
  92 + }
  93 +
  94 + public void setFlightno(String flightno) {
  95 + this.flightno = flightno == null ? null : flightno.trim();
  96 + }
  97 +
  98 + public Date getFlightdate() {
  99 + return flightdate;
  100 + }
  101 +
  102 + public void setFlightdate(Date flightdate) {
  103 + this.flightdate = flightdate;
  104 + }
  105 +
  106 + public String getCarrier() {
  107 + return carrier;
  108 + }
  109 +
  110 + public void setCarrier(String carrier) {
  111 + this.carrier = carrier == null ? null : carrier.trim();
  112 + }
  113 +
  114 + public String getOriginatingstation() {
  115 + return originatingstation;
  116 + }
  117 +
  118 + public void setOriginatingstation(String originatingstation) {
  119 + this.originatingstation = originatingstation == null ? null : originatingstation.trim();
  120 + }
  121 +
  122 + public String getoName() {
  123 + return oName;
  124 + }
  125 +
  126 + public void setoName(String oName) {
  127 + this.oName = oName == null ? null : oName.trim();
  128 + }
  129 +
  130 + public String getDestinationstation() {
  131 + return destinationstation;
  132 + }
  133 +
  134 + public void setDestinationstation(String destinationstation) {
  135 + this.destinationstation = destinationstation == null ? null : destinationstation.trim();
  136 + }
  137 +
  138 + public String getFdName() {
  139 + return fdName;
  140 + }
  141 +
  142 + public void setFdName(String fdName) {
  143 + this.fdName = fdName == null ? null : fdName.trim();
  144 + }
  145 +
  146 + public String getArrivedtotalpiece() {
  147 + return arrivedtotalpiece;
  148 + }
  149 +
  150 + public void setArrivedtotalpiece(String arrivedtotalpiece) {
  151 + this.arrivedtotalpiece = arrivedtotalpiece == null ? null : arrivedtotalpiece.trim();
  152 + }
  153 +
  154 + public String getTotalpiecequantity() {
  155 + return totalpiecequantity;
  156 + }
  157 +
  158 + public void setTotalpiecequantity(String totalpiecequantity) {
  159 + this.totalpiecequantity = totalpiecequantity == null ? null : totalpiecequantity.trim();
  160 + }
  161 +
  162 + public String getArrivedtotalweight() {
  163 + return arrivedtotalweight;
  164 + }
  165 +
  166 + public void setArrivedtotalweight(String arrivedtotalweight) {
  167 + this.arrivedtotalweight = arrivedtotalweight == null ? null : arrivedtotalweight.trim();
  168 + }
  169 +
  170 + public String getGrossweightmeasureuc() {
  171 + return grossweightmeasureuc;
  172 + }
  173 +
  174 + public void setGrossweightmeasureuc(String grossweightmeasureuc) {
  175 + this.grossweightmeasureuc = grossweightmeasureuc == null ? null : grossweightmeasureuc.trim();
  176 + }
  177 +
  178 + public String getTotalgrossweightmeasure() {
  179 + return totalgrossweightmeasure;
  180 + }
  181 +
  182 + public void setTotalgrossweightmeasure(String totalgrossweightmeasure) {
  183 + this.totalgrossweightmeasure = totalgrossweightmeasure == null ? null : totalgrossweightmeasure.trim();
  184 + }
  185 +
  186 + public String getTotalgrossweightmeasureuc() {
  187 + return totalgrossweightmeasureuc;
  188 + }
  189 +
  190 + public void setTotalgrossweightmeasureuc(String totalgrossweightmeasureuc) {
  191 + this.totalgrossweightmeasureuc = totalgrossweightmeasureuc == null ? null : totalgrossweightmeasureuc.trim();
  192 + }
  193 +
  194 + public String getChargeableweightmeasure() {
  195 + return chargeableweightmeasure;
  196 + }
  197 +
  198 + public void setChargeableweightmeasure(String chargeableweightmeasure) {
  199 + this.chargeableweightmeasure = chargeableweightmeasure == null ? null : chargeableweightmeasure.trim();
  200 + }
  201 +
  202 + public String getChargeableweightmeasureuc() {
  203 + return chargeableweightmeasureuc;
  204 + }
  205 +
  206 + public void setChargeableweightmeasureuc(String chargeableweightmeasureuc) {
  207 + this.chargeableweightmeasureuc = chargeableweightmeasureuc == null ? null : chargeableweightmeasureuc.trim();
  208 + }
  209 +
  210 + public String getArriveddate() {
  211 + return arriveddate;
  212 + }
  213 +
  214 + public void setArriveddate(String arriveddate) {
  215 + this.arriveddate = arriveddate;
  216 + }
  217 +
  218 + public String getTransportsplitdescription() {
  219 + return transportsplitdescription;
  220 + }
  221 +
  222 + public void setTransportsplitdescription(String transportsplitdescription) {
  223 + this.transportsplitdescription = transportsplitdescription == null ? null : transportsplitdescription.trim();
  224 + }
  225 +
  226 + public String getCustomscode() {
  227 + return customscode;
  228 + }
  229 +
  230 + public void setCustomscode(String customscode) {
  231 + this.customscode = customscode == null ? null : customscode.trim();
  232 + }
  233 +
  234 + public String getProductname() {
  235 + return productname;
  236 + }
  237 +
  238 + public void setProductname(String productname) {
  239 + this.productname = productname == null ? null : productname.trim();
  240 + }
  241 +
  242 + public String getStatus() {
  243 + return status;
  244 + }
  245 +
  246 + public void setStatus(String status) {
  247 + this.status = status == null ? null : status.trim();
  248 + }
  249 +
  250 + public String getReceiptinformation() {
  251 + return receiptinformation;
  252 + }
  253 +
  254 + public void setReceiptinformation(String receiptinformation) {
  255 + this.receiptinformation = receiptinformation == null ? null : receiptinformation.trim();
  256 + }
  257 +
  258 + public String getCreatedate() {
  259 + return createdate;
  260 + }
  261 +
  262 + public void setCreatedate(String createdate) {
  263 + this.createdate = createdate;
  264 + }
  265 +}