first
commit
bf1582dfba
|
@ -0,0 +1,3 @@
|
|||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="models" />
|
||||
<module name="interfaces" />
|
||||
<module name="mapper" />
|
||||
<module name="wx-applet-admin" />
|
||||
<module name="utils" />
|
||||
<module name="wx-applet" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel target="8" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/utils/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/utils/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,8 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="AutoCloseableResource" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="METHOD_MATCHER_CONFIG" value="java.util.Formatter,format,java.io.Writer,append,com.google.common.base.Preconditions,checkNotNull,org.hibernate.Session,close,java.io.PrintWriter,printf,java.io.PrintStream,printf,com.github.pagehelper.page.PageMethod,startPage" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="http://maven.aliyun.com/nexus/content/repositories/central/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,11 @@
|
|||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||
</project>
|
|
@ -0,0 +1,124 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,93 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>rtos-wh</artifactId>
|
||||
<groupId>org.example</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>interfaces</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>models</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>mapper</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>utils</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.bestvike</groupId>
|
||||
<artifactId>linq</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.nuzar</groupId>
|
||||
<artifactId>rtops-openapi-client</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper</artifactId>
|
||||
<version>5.3.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nuzar</groupId>
|
||||
<artifactId>nuzar-security</artifactId>
|
||||
<version>2.6.14.10-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,99 @@
|
|||
package com.haitongauto.interfaces;
|
||||
|
||||
import com.haitongauto.models.ido.BasicDataIdo;
|
||||
import com.haitongauto.models.ido.CustomerRes;
|
||||
import com.haitongauto.models.ido.ShipVoyIdo;
|
||||
import com.nuzar.common.security5.core.interceptor.OauthFeignInterceptor;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = "customer", url = "https://rtops4.haitongauto.com/tos/customer", configuration = {OauthFeignInterceptor.class})
|
||||
//@FeignClient(name = "nuzar-customer-boss", configuration = {OauthFeignInterceptor.class})
|
||||
public interface CusOrderApi {
|
||||
/**
|
||||
* 内贸出口 船名
|
||||
*
|
||||
* @return 返回 出口 船名/航次
|
||||
*/
|
||||
@PostMapping("/dd/ship/all")
|
||||
CustomerRes<List<BasicDataIdo>> getNEOutPlanShipList(@RequestParam("q") String q);
|
||||
|
||||
/**
|
||||
* 外贸出口 船名
|
||||
* @return 返回 出口 船名/航次
|
||||
*/
|
||||
@PostMapping("/ee/plan/ship")
|
||||
CustomerRes<List<ShipVoyIdo>> getWEOutPlanShipList(@RequestParam("q") String q, @RequestParam("current") int current, @RequestParam("size") int size);
|
||||
|
||||
/**
|
||||
* 内贸出口港口
|
||||
*
|
||||
* @return 返回出口港口
|
||||
*/
|
||||
@PostMapping("/dd/port")
|
||||
CustomerRes<List<BasicDataIdo>> getNEOutPlanPortsList(@RequestParam("q") String q);
|
||||
|
||||
/**
|
||||
* 外贸出口港口
|
||||
*
|
||||
* @return 返回出口港口
|
||||
*/
|
||||
@PostMapping("/ee/plan/port")
|
||||
CustomerRes<List<BasicDataIdo>> getWEOutPlanPortsList(@RequestParam("q") String q, @RequestParam("shipId") String shipId, @RequestParam("current") int current, @RequestParam("size") int size);
|
||||
|
||||
/**
|
||||
* 内贸出口品牌
|
||||
*
|
||||
* @return 返回出口品牌 /
|
||||
*/
|
||||
@PostMapping("/dd/brand")
|
||||
CustomerRes<List<BasicDataIdo>> getNEOutPlanBrandsList(@RequestParam("q") String q);
|
||||
|
||||
/**
|
||||
* 外贸出口品牌
|
||||
*
|
||||
* @return 返回出口品牌 /customer/dd/brand
|
||||
*/
|
||||
@PostMapping("/ee/voyage/brand")
|
||||
CustomerRes<List<BasicDataIdo>> getWEOutPlanBrandsList(@RequestParam("q") String q, @RequestParam("shipName") String shipName, @RequestParam("current") int current, @RequestParam("size") int size);
|
||||
|
||||
|
||||
/**
|
||||
* 进口 船名/航次
|
||||
*
|
||||
* @return 返回 进口 船名/航次
|
||||
*/
|
||||
@PostMapping("/it/shipVoyage")
|
||||
CustomerRes<List<ShipVoyIdo>> getInPlanShipVoyList(@RequestParam("q") String q);
|
||||
|
||||
/**
|
||||
* 验证vin车架号是否被激活
|
||||
*
|
||||
* @return 返回进口港口
|
||||
*/
|
||||
@PostMapping("/it/shipVoyage")
|
||||
CustomerRes<List<BasicDataIdo>> getInPlanPortsList(@RequestParam("q") String q);
|
||||
|
||||
/**
|
||||
* 进口品牌
|
||||
*
|
||||
* @return 返回进口品牌
|
||||
*/
|
||||
@PostMapping("/it/shipVoyage")
|
||||
CustomerRes<List<BasicDataIdo>> getInPlanBrandsList(@RequestParam("q") String q, @RequestParam("shipName") String shipName, @RequestParam("voyage") String voyage);
|
||||
|
||||
|
||||
/**
|
||||
* 验证vins是否被激活
|
||||
*
|
||||
* @return 返回未激活的vins
|
||||
*/
|
||||
@PostMapping("/spz/valid-vins")
|
||||
CustomerRes<String> getCheckVinISValid(@RequestBody List<String> vins);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.haitongauto.interfaces;
|
||||
import com.haitongauto.models.ido.BasicDataIdo;
|
||||
import com.haitongauto.models.ido.ShipVoyIdo;
|
||||
import java.util.List;
|
||||
|
||||
public interface CustomerServiceInterface {
|
||||
/**
|
||||
* 获取 船名/航次/品牌/港口/国家数据列表
|
||||
* @param requestType 请求类型
|
||||
* @return 返回数据
|
||||
*/
|
||||
List<BasicDataIdo> getBasicMapData(String param, Integer requestType);
|
||||
|
||||
List<ShipVoyIdo> getShipVoyIdoList(String param, Integer requestType);
|
||||
|
||||
/**
|
||||
* 获取提单号列表
|
||||
*
|
||||
* @return 返回提单号列表
|
||||
*/
|
||||
List<String> getBillNumMapData(String q );
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.haitongauto.interfaces;
|
||||
import com.haitongauto.models.ido.departure.DepartureDetailIdo_DTO;
|
||||
import com.haitongauto.models.ido.departure.DepartureVehicleIdo_DTO;
|
||||
|
||||
/**
|
||||
* 提车凭证接口
|
||||
*/
|
||||
public interface DepartureVehicleInterface {
|
||||
/**
|
||||
* 获取提车凭证的分页数据
|
||||
*
|
||||
* @param current 当前页码
|
||||
* @param size 数据条数(非必填
|
||||
* @return 返回提车凭证的分页数据
|
||||
*/
|
||||
DepartureVehicleIdo_DTO getDepartureVehicleList(String printTicketTime, String query, Integer current, Integer size);
|
||||
|
||||
/**
|
||||
* 获取一条提车明细
|
||||
*
|
||||
* @param id:提车id
|
||||
* @return 返回一条提车明细
|
||||
*/
|
||||
DepartureDetailIdo_DTO getDepartureDetailForId(String id);
|
||||
|
||||
/**
|
||||
* 完成提车核验
|
||||
*
|
||||
* @param id:提车id
|
||||
* @return 返回完成提车核验结果
|
||||
*/
|
||||
boolean checkDepartureVehicle(String id);
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.haitongauto.interfaces;
|
||||
import com.haitongauto.models.dto.DicDto;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 通用数据字典表(数据源自RTOS)
|
||||
* 运输方式 TRANSPORT_TYPE
|
||||
* 进港类型 ENTER_PORT_TYPE
|
||||
* 货物类型 APP_CARGO_TYPE
|
||||
* 操作模式 OPERATING_MODE
|
||||
* 备 件 MACHINE_TYPE
|
||||
*/
|
||||
public interface DicInterface {
|
||||
/**
|
||||
* 获取通用字典接口数据
|
||||
*
|
||||
* @param dic_sort :数据类型字符串(该参数直接拼接到接口URL)
|
||||
* 运输方式 TRANSPORT_TYPE
|
||||
* 进港类型 ENTER_PORT_TYPE
|
||||
* 货物类型 APP_CARGO_TYPE
|
||||
* 操作模式 OPERATING_MODE
|
||||
* 备件 MACHINE_TYPE
|
||||
* @return 返回通用字典接口数据
|
||||
*/
|
||||
List<DicDto> getDicList(String dic_sort);
|
||||
|
||||
String picUpload(String pic);
|
||||
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.haitongauto.interfaces;
|
||||
|
||||
import com.haitongauto.models.dto.EnterPortTypeDto;
|
||||
import com.haitongauto.models.dto.EnterPortTypeDtol;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public interface EnterPortTypeInterface {
|
||||
List<EnterPortTypeDtol> getEnterPortTypeList();
|
||||
}
|
|
@ -0,0 +1,149 @@
|
|||
package com.haitongauto.interfaces;
|
||||
|
||||
import com.haitongauto.models.dto.EnterPortTypeDto;
|
||||
import com.haitongauto.models.ido.CheckRes;
|
||||
import com.haitongauto.models.ido.CommonRes;
|
||||
import com.haitongauto.models.ido.DictionaryIdo;
|
||||
import com.haitongauto.models.ido.PortAreasIdo;
|
||||
import com.haitongauto.models.ido.departure.DepartureDetailIdo;
|
||||
import com.haitongauto.models.ido.departure.DepartureVehicleIdoPar;
|
||||
import com.haitongauto.models.ido.departure.pc.DepartureVehicleIdoPar_pc;
|
||||
import com.haitongauto.models.ido.login.*;
|
||||
import com.haitongauto.models.ido.receiving.ReceivingDetailIdo;
|
||||
import com.haitongauto.models.ido.receiving.ReceivingVehicleIdoPar;
|
||||
import com.haitongauto.models.ido.receiving.pc.ReceivingVehicleIdoPar_pc;
|
||||
import com.nuzar.common.security5.core.interceptor.OauthFeignInterceptor;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 通用数据字典表(数据源自RTOS)
|
||||
* 运输方式 TRANSPORT_TYPE
|
||||
* 进港类型 ENTER_PORT_TYPE
|
||||
* 货物类型 CARGO_TYPE
|
||||
* 操作模式 OPERATING_MODE
|
||||
* 备 件 MACHINE_TYPE
|
||||
*/
|
||||
@FeignClient(name = "rtos-openapi1", url = "https://rtops4.haitongauto.com/tos/api", configuration = {OauthFeignInterceptor.class})
|
||||
//@FeignClient(name = "rtos-openapi", configuration = {OauthFeignInterceptor.class})
|
||||
public interface OrderApi {
|
||||
/**
|
||||
* 登录
|
||||
*
|
||||
* @param loginRequest loginRequest
|
||||
* @return 登录结果
|
||||
*/
|
||||
@GetMapping("/miniapp/login")
|
||||
@ResponseBody
|
||||
CommonRes<UserLoginOrRegisterResponse> login(@RequestBody UserLoginOrRegisterRequest loginRequest);
|
||||
|
||||
/**
|
||||
* 获得用户id和用户openid
|
||||
*
|
||||
* @return 登录结果
|
||||
*/
|
||||
@PutMapping("/miniapp/user/update")
|
||||
@ResponseBody
|
||||
CommonRes<Boolean> updateUser(@RequestBody UsersIdo usersIdo);
|
||||
|
||||
//String updateUser(@RequestBody UsersIdo usersIdo);
|
||||
|
||||
/**
|
||||
* 字典数据
|
||||
*
|
||||
* @return 返回字典数据
|
||||
*/
|
||||
@GetMapping("/miniapp/typeRef/domain/{domain}")
|
||||
CommonRes<List<DictionaryIdo>> dicData(@RequestParam("domain") String domain);
|
||||
|
||||
/**
|
||||
* 港区列表数据
|
||||
*
|
||||
* @return 返回港区列表
|
||||
*/
|
||||
@GetMapping("/miniapp/portAreaManage/getPortArea")
|
||||
CommonRes<List<PortAreasIdo>> getPortAreasIdoList(@RequestParam("pamName") String pamName);
|
||||
|
||||
/**
|
||||
* 收车分页数据
|
||||
*
|
||||
* @return 返回收车分页数据
|
||||
*/
|
||||
@GetMapping("/miniapp/vehicleClose/collectCar/page")
|
||||
CommonRes<ReceivingVehicleIdoPar> getReceivingVehicleList(@RequestParam("printTicketTime") String printTicketTime, @RequestParam("query") String query, @RequestParam("current") Integer current, @RequestParam("size") Integer size);
|
||||
|
||||
/**
|
||||
* 收车详情
|
||||
*
|
||||
* @return 返回收车详情
|
||||
*/
|
||||
@GetMapping("/miniapp/vehicleClose/collectCar/detail/{id}")
|
||||
CommonRes<ReceivingDetailIdo> getReceivingDetailForId(@RequestParam("id") String id);
|
||||
|
||||
/**
|
||||
* 收车核验
|
||||
*
|
||||
* @return 返回收车核验
|
||||
*/
|
||||
@PostMapping("/miniapp/vehicleClose/collectCar/confirm")
|
||||
CommonRes<CheckRes> checkReceivingVehicle(@RequestBody String id);
|
||||
|
||||
/**
|
||||
* 提(发)车分页数据
|
||||
*
|
||||
* @return 返回提车分页数据
|
||||
*/
|
||||
@GetMapping("/miniapp/delivery/pickUpCar/page")
|
||||
CommonRes<DepartureVehicleIdoPar> getDepartureVehicleList(@RequestParam("printTicketTime") String printTicketTime, @RequestParam("query") String query, @RequestParam("current") Integer current, @RequestParam("size") Integer size);
|
||||
|
||||
/**
|
||||
* 提(发)车详情
|
||||
*
|
||||
* @return 返回提车详情
|
||||
*/
|
||||
@GetMapping("/miniapp/delivery/pickUpCar/detail/{id}")
|
||||
CommonRes<DepartureDetailIdo> getDepartureDetailForId(@RequestParam("id") String id);
|
||||
|
||||
/**
|
||||
* 提(发)车核验
|
||||
*
|
||||
* @return 返回提(发)车核验
|
||||
*/
|
||||
@PostMapping("/miniapp/delivery/pickUpCar/confirm")
|
||||
CommonRes<CheckRes> checkDepartureVehicle(@RequestBody String id);
|
||||
|
||||
/**
|
||||
* 获取进港类型和业务类型
|
||||
*
|
||||
* @return 返回
|
||||
*/
|
||||
@GetMapping("/miniapp/enterptType/dict")
|
||||
CommonRes<List<EnterPortTypeDto>> getEnterPortType();
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* 根据条件查询所有的收车凭证列表(海通后台使用)
|
||||
*
|
||||
* @param spmId 船名
|
||||
* @param bvmId 货物类型
|
||||
* @param query 关键字(手机号、板车号、编号)
|
||||
* @return 返回 收车凭证列表
|
||||
*/
|
||||
@GetMapping("/miniapp/vehicleClose/collect/cars/page")
|
||||
CommonRes<ReceivingVehicleIdoPar_pc> getReceiveListByCondition(@RequestParam("spmId") String spmId, @RequestParam("bvmId") String bvmId, @RequestParam("query") String query, @RequestParam("current") Integer current, @RequestParam("size") Integer size);
|
||||
|
||||
/**
|
||||
* 根据条件查询所有的发车凭证列表(海通后台使用)
|
||||
*
|
||||
* @param spmId 船名
|
||||
* @param bvmId 货物类型
|
||||
* @param query 关键字(手机号、板车号、编号)
|
||||
* @return 返回 收车凭证列表
|
||||
*/
|
||||
@GetMapping("/miniapp/delivery/pickUp/cars/page")
|
||||
CommonRes<DepartureVehicleIdoPar_pc> getDepartureListByCondition(@RequestParam("spmId") String spmId, @RequestParam("bvmId") String bvmId, @RequestParam("query") String query, @RequestParam("current") Integer current, @RequestParam("size") Integer size);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.haitongauto.interfaces;
|
||||
import com.haitongauto.models.pojo.PortArea;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 港区接口服务
|
||||
*/
|
||||
public interface PortAreaInterface {
|
||||
/**
|
||||
* 获取RTOS港区列表数据
|
||||
* @return 返回港区列表数据
|
||||
*/
|
||||
List<PortArea> getPortArea();
|
||||
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package com.haitongauto.interfaces;
|
||||
import com.haitongauto.models.ido.receiving.ReceivingDetailIdo_DTO;
|
||||
import com.haitongauto.models.ido.receiving.ReceivingVehicleIdo_DTO;
|
||||
/**
|
||||
* 收车凭证接口服务
|
||||
*/
|
||||
public interface ReceivingVehicleInterface {
|
||||
/**
|
||||
* 获取收车凭证的分页数据
|
||||
*
|
||||
* @param current 当前页码
|
||||
* @param size 数据条数(非必填)
|
||||
* @return 返回收车凭证的分页数据
|
||||
*/
|
||||
ReceivingVehicleIdo_DTO getReceivingVehicleList(String printTime, String query, Integer current, Integer size);
|
||||
|
||||
/**
|
||||
* 获取一条收车明细
|
||||
*
|
||||
* @param id:收车id
|
||||
* @return 返回一条收车明细
|
||||
*/
|
||||
ReceivingDetailIdo_DTO getReceivingDetailForId(String id);
|
||||
|
||||
/**
|
||||
* 完成收车核验
|
||||
*
|
||||
* @param id:收车id
|
||||
* @return 返回完成收车核验结果
|
||||
*/
|
||||
boolean checkReceivingVehicle(String id);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.haitongauto.interfaces;
|
||||
import com.haitongauto.models.ido.login.UserLoginOrRegisterRequest;
|
||||
import com.haitongauto.models.ido.login.UserLoginOrRegisterResponse;
|
||||
/**
|
||||
* 用户登录/注册
|
||||
* 调用哪吒接口
|
||||
*/
|
||||
public interface UserInterface {
|
||||
/**
|
||||
* 用户登录/注册
|
||||
*
|
||||
* @param request 请求入参
|
||||
* @return 返回出参实体
|
||||
*/
|
||||
UserLoginOrRegisterResponse userLoginOrRegister(UserLoginOrRegisterRequest request);
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.haitongauto.interfaces;
|
||||
import com.haitongauto.models.ido.CommonRes;
|
||||
import com.haitongauto.models.ido.login.UserInfoRes;
|
||||
import com.nuzar.common.security5.core.interceptor.OauthFeignInterceptor;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
//@FeignClient(name = "rtos-openapi", url = "https://rtops4.haitongauto.com/auth", configuration = {OauthFeignInterceptor.class})
|
||||
@FeignClient(name = "auth-server",url = "${auth-server}",configuration = {OauthFeignInterceptor.class})
|
||||
public interface UsersApi {
|
||||
/**
|
||||
* 获得用户id和用户openid
|
||||
* @return 登录结果
|
||||
*/
|
||||
@PostMapping("/saas/authorization/user/info")
|
||||
@ResponseBody
|
||||
CommonRes<UserInfoRes> getUserInfo();
|
||||
}
|
|
@ -0,0 +1,250 @@
|
|||
package com.haitongauto.interfaces.impl;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.haitongauto.interfaces.CustomerServiceInterface;
|
||||
import com.haitongauto.mapper.base.RequesterMapper;
|
||||
import com.haitongauto.models.ido.BasicDataIdo;
|
||||
import com.haitongauto.models.ido.ShipVoyIdo;
|
||||
import com.haitongauto.models.pojo.Requester;
|
||||
import com.haitongauto.utils.HttpRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@Slf4j
|
||||
@Service
|
||||
public class CustomerServiceInterfaceImpl implements CustomerServiceInterface {
|
||||
@Autowired
|
||||
RequesterMapper requesterMapper;
|
||||
|
||||
/**
|
||||
* 获取 船名/航次/品牌/港口/国家数据列表
|
||||
*
|
||||
* @param param 入参
|
||||
* @param requestType 请求类型 船名 = 1006 / 航次 = 1007 / 品牌 = 1008 / 港口 = 1009 / 国家 = 1010
|
||||
* @return 返回数据
|
||||
*/
|
||||
@Override
|
||||
public List<BasicDataIdo> getBasicMapData(String param, Integer requestType) {
|
||||
List<BasicDataIdo> myList = new ArrayList<>();
|
||||
if (true) {
|
||||
//获取港区外部接口及参数(航次接口类型参数requestType=1007)
|
||||
Requester requester = requesterMapper.getRequesterForType(requestType);
|
||||
if (requester == null || requester.getUrl() == null || requester.getUrl().equals("")) {
|
||||
System.out.println("请在小程序数据库外部请求接口表添加【船名/航次/品牌/港口/国家等的接口数据】");
|
||||
log.error("请在数据库配置【船名/航次/品牌/港口/国家等的接口】的url及入参!");
|
||||
return null;
|
||||
}
|
||||
//请求参数
|
||||
String url = requester.getUrl();
|
||||
String myParam = param;
|
||||
|
||||
//获取接口数据
|
||||
String res = HttpRequest.sendPost(url, myParam);
|
||||
if (res == null || res.isEmpty()) {
|
||||
log.error("RTOS接口请求【船名/航次/品牌/港口/国家】数据失败!");
|
||||
return null;
|
||||
}
|
||||
//接口数据转Map
|
||||
Map map = JSONObject.parseObject(res, Map.class);
|
||||
|
||||
Map<String, Object> ship_map = new HashMap<>();
|
||||
//List<BasicDataIdo> myList = new ArrayList<>();
|
||||
//判断接口数据获取是否成功
|
||||
if (map.get("code").equals("200") || map.get("msg").equals("success")) {
|
||||
//接口数据获取成功,将接口的Map的data数据转为接口对象数据
|
||||
//船名航次
|
||||
if (requestType.equals(1006)) {
|
||||
List<ShipVoyIdo> shipVoyIdoList = JSONArray.parseArray(map.get("data").toString(), ShipVoyIdo.class);
|
||||
|
||||
} else {
|
||||
myList = JSONArray.parseArray(map.get("data").toString(), BasicDataIdo.class);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//伪代码,测试使用
|
||||
if (false) {
|
||||
//请求类型,船名 = 1006 / 航次 = 1007 / 品牌 = 1008 / 港口 = 1009 / 国家 = 1010
|
||||
switch (requestType) {
|
||||
case 1006: {
|
||||
BasicDataIdo basicDataIdo1 = new BasicDataIdo();
|
||||
basicDataIdo1.setId("1");
|
||||
basicDataIdo1.setText("长江1号");
|
||||
BasicDataIdo basicDataIdo2 = new BasicDataIdo();
|
||||
basicDataIdo2.setId("2");
|
||||
basicDataIdo2.setText("长江2号");
|
||||
BasicDataIdo basicDataIdo3 = new BasicDataIdo();
|
||||
basicDataIdo3.setId("3");
|
||||
basicDataIdo3.setText("长江3号");
|
||||
myList.add(basicDataIdo1);
|
||||
myList.add(basicDataIdo2);
|
||||
myList.add(basicDataIdo3);
|
||||
break;
|
||||
}
|
||||
case 1007: {
|
||||
BasicDataIdo basicDataIdo4 = new BasicDataIdo();
|
||||
basicDataIdo4.setId("4");
|
||||
basicDataIdo4.setText("hangCi1");
|
||||
BasicDataIdo basicDataIdo5 = new BasicDataIdo();
|
||||
basicDataIdo5.setId("5");
|
||||
basicDataIdo5.setText("hangCi2");
|
||||
BasicDataIdo basicDataIdo6 = new BasicDataIdo();
|
||||
basicDataIdo6.setId("6");
|
||||
basicDataIdo6.setText("hangCi3");
|
||||
myList.add(basicDataIdo4);
|
||||
myList.add(basicDataIdo5);
|
||||
myList.add(basicDataIdo6);
|
||||
break;
|
||||
}
|
||||
|
||||
case 1008: {
|
||||
BasicDataIdo basicDataIdo7 = new BasicDataIdo();
|
||||
basicDataIdo7.setId("7");
|
||||
basicDataIdo7.setText("测试品牌1");
|
||||
BasicDataIdo basicDataIdo8 = new BasicDataIdo();
|
||||
basicDataIdo8.setId("8");
|
||||
basicDataIdo8.setText("测试品牌2");
|
||||
BasicDataIdo basicDataIdo9 = new BasicDataIdo();
|
||||
basicDataIdo9.setId("9");
|
||||
basicDataIdo9.setText("测试品牌3");
|
||||
myList.add(basicDataIdo7);
|
||||
myList.add(basicDataIdo8);
|
||||
myList.add(basicDataIdo9);
|
||||
break;
|
||||
}
|
||||
|
||||
case 1009: {
|
||||
BasicDataIdo basicDataIdo10 = new BasicDataIdo();
|
||||
basicDataIdo10.setId("10");
|
||||
basicDataIdo10.setText("武汉港");
|
||||
BasicDataIdo basicDataIdo11 = new BasicDataIdo();
|
||||
basicDataIdo11.setId("11");
|
||||
basicDataIdo11.setText("上海港");
|
||||
BasicDataIdo basicDataIdo12 = new BasicDataIdo();
|
||||
basicDataIdo12.setId("12");
|
||||
basicDataIdo12.setText("大连港");
|
||||
BasicDataIdo basicDataIdo13 = new BasicDataIdo();
|
||||
basicDataIdo13.setId("13");
|
||||
basicDataIdo13.setText("迪拜港");
|
||||
myList.add(basicDataIdo10);
|
||||
myList.add(basicDataIdo11);
|
||||
myList.add(basicDataIdo12);
|
||||
myList.add(basicDataIdo13);
|
||||
break;
|
||||
}
|
||||
|
||||
case 1010: {
|
||||
BasicDataIdo basicDataIdo14 = new BasicDataIdo();
|
||||
basicDataIdo14.setId("14");
|
||||
basicDataIdo14.setText("中国");
|
||||
BasicDataIdo basicDataIdo15 = new BasicDataIdo();
|
||||
basicDataIdo15.setId("15");
|
||||
basicDataIdo15.setText("韩国");
|
||||
BasicDataIdo basicDataIdo16 = new BasicDataIdo();
|
||||
basicDataIdo16.setId("16");
|
||||
basicDataIdo16.setText("新加坡");
|
||||
myList.add(basicDataIdo14);
|
||||
myList.add(basicDataIdo15);
|
||||
myList.add(basicDataIdo16);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return myList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取 船名/航次/品牌/港口/国家数据列表
|
||||
*
|
||||
* @param param 入参
|
||||
* @param requestType 请求类型 船名 = 1006 / 航次 = 1007 / 品牌 = 1008 / 港口 = 1009 / 国家 = 1010
|
||||
* @return 返回数据
|
||||
*/
|
||||
@Override
|
||||
public List<ShipVoyIdo> getShipVoyIdoList(String param, Integer requestType) {
|
||||
List<ShipVoyIdo> myList = new ArrayList<>();
|
||||
//获取港区外部接口及参数(航次接口类型参数requestType=1007)
|
||||
Requester requester = requesterMapper.getRequesterForType(requestType);
|
||||
if (requester == null || requester.getUrl() == null || requester.getUrl().equals("")) {
|
||||
System.out.println("请在小程序数据库外部请求接口表添加【船名/航次/品牌/港口/国家等的接口数据】");
|
||||
log.error("请在数据库配置【船名/航次/品牌/港口/国家等的接口】的url及入参!");
|
||||
return null;
|
||||
}
|
||||
//请求参数
|
||||
String url = requester.getUrl();
|
||||
String myParam = param;
|
||||
//获取接口数据
|
||||
String res = HttpRequest.sendPost(url, myParam);
|
||||
if (res == null || res.isEmpty()) {
|
||||
log.error("RTOS接口请求【船名/航次/品牌/港口/国家】数据失败!");
|
||||
return null;
|
||||
}
|
||||
//接口数据转Map
|
||||
Map map = JSONObject.parseObject(res, Map.class);
|
||||
Map<String, Object> ship_map = new HashMap<>();
|
||||
//List<BasicDataIdo> myList = new ArrayList<>();
|
||||
//判断接口数据获取是否成功
|
||||
if (map.get("code").equals("200") || map.get("msg").equals("success")) {
|
||||
//接口数据获取成功,将接口的Map的data数据转为接口对象数据
|
||||
//船名航次
|
||||
myList = JSONArray.parseArray(map.get("data").toString(), ShipVoyIdo.class);
|
||||
}
|
||||
return myList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取提单号列表
|
||||
*
|
||||
* @return 返回提单号列表
|
||||
*/
|
||||
@Override
|
||||
public List<String> getBillNumMapData(String q) {
|
||||
List<String> myList = new ArrayList<>();
|
||||
if (true) {
|
||||
//获取港区外部接口及参数(提单接口类型参数requestType=1011)
|
||||
Requester requester = requesterMapper.getRequesterForType(1011);
|
||||
if (requester == null || requester.getUrl() == null || requester.getUrl().equals("")) {
|
||||
System.out.println("请在小程序数据库外部请求接口表添加【提单接口】");
|
||||
log.error("请在数据库配置【提单接口】的url及入参!");
|
||||
return null;
|
||||
}
|
||||
//请求参数
|
||||
String url = requester.getUrl();
|
||||
String param = requester.getParam_map();
|
||||
//获取接口数据
|
||||
String res = HttpRequest.sendPost(url, param);
|
||||
if (res == null) {
|
||||
log.error("RTOS接口请求【提单】数据失败!");
|
||||
return null;
|
||||
}
|
||||
//接口数据转Map
|
||||
Map map = JSONObject.parseObject(res, Map.class);
|
||||
// List<String> myList = new ArrayList<>();
|
||||
//判断接口数据获取是否成功
|
||||
if (map.get("code") == "200") {
|
||||
//接口数据获取成功,将接口的Map的data数据转为接口对象数据
|
||||
myList = JSONArray.parseArray(map.get("data").toString(), String.class);
|
||||
}
|
||||
}
|
||||
|
||||
//伪代码,测试使用
|
||||
if (false) {
|
||||
myList.add("ceshitidanhao121");
|
||||
myList.add("ceshitidanhao122");
|
||||
myList.add("ceshitidanhao123");
|
||||
myList.add("ceshitidanhao124");
|
||||
myList.add("ceshitidanhao125");
|
||||
}
|
||||
|
||||
return myList;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,124 @@
|
|||
package com.haitongauto.interfaces.impl;
|
||||
import com.haitongauto.interfaces.DepartureVehicleInterface;
|
||||
import com.haitongauto.interfaces.OrderApi;
|
||||
import com.haitongauto.mapper.base.RequesterMapper;
|
||||
import com.haitongauto.mapper.client.OtherExtendMapper;
|
||||
import com.haitongauto.models.ido.CheckRes;
|
||||
import com.haitongauto.models.ido.CommonRes;
|
||||
import com.haitongauto.models.ido.departure.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class DepartureVehicleInterfaceImpl implements DepartureVehicleInterface {
|
||||
@Autowired
|
||||
RequesterMapper requesterMapper;
|
||||
@Autowired
|
||||
OtherExtendMapper otherExtendMapper;
|
||||
@Resource
|
||||
private OrderApi orderApi;
|
||||
|
||||
/**
|
||||
* 获取提车凭证的分页数据
|
||||
*
|
||||
* @param current 当前页码
|
||||
* @param size 数据条数(非必填
|
||||
* @return 返回提车凭证的分页数据
|
||||
*/
|
||||
@Override
|
||||
public DepartureVehicleIdo_DTO getDepartureVehicleList(String printTicketTime, String query, Integer current, Integer size) {
|
||||
//创建一个提车凭证分页数据的实例(分页列表数据)
|
||||
List<DepartureVehicleIdo> mylist = null;
|
||||
//接口数据转Map
|
||||
CommonRes<DepartureVehicleIdoPar> map = orderApi.getDepartureVehicleList(printTicketTime, query, current, size);
|
||||
|
||||
//判断接口数据获取是否成功
|
||||
String status = map.getStatus();
|
||||
DepartureVehicleIdo_DTO departureVehicleIdo_dto = new DepartureVehicleIdo_DTO();
|
||||
switch (status) {
|
||||
case "200":
|
||||
//接口数据获取成功,将接口的Map的data数据转为接口对象的List
|
||||
departureVehicleIdo_dto.setStatus(status);
|
||||
DepartureVehicleIdoPar departureVehicleIdoPar = map.getData();
|
||||
if (departureVehicleIdoPar != null) {
|
||||
mylist = departureVehicleIdoPar.getRecords();
|
||||
departureVehicleIdo_dto.setDepartureVehicleIdoList(mylist);
|
||||
}
|
||||
break;
|
||||
case "401":
|
||||
//用户权限过期
|
||||
departureVehicleIdo_dto.setStatus(status);
|
||||
break;
|
||||
default:
|
||||
departureVehicleIdo_dto.setStatus(status);
|
||||
break;
|
||||
}
|
||||
return departureVehicleIdo_dto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取一条提车明细
|
||||
*
|
||||
* @param id:提车id
|
||||
* @return 返回一条提车明细
|
||||
*/
|
||||
@Override
|
||||
public DepartureDetailIdo_DTO getDepartureDetailForId(String id) {
|
||||
|
||||
//创建一个收车详情数据的实例(基本数据+明细列表)
|
||||
DepartureDetailIdo_DTO departureDetailIdo_dto = new DepartureDetailIdo_DTO();
|
||||
DepartureDetailIdo departureDetailIdo = null;
|
||||
|
||||
//接口数据转Map
|
||||
//接口数据转Map
|
||||
CommonRes<DepartureDetailIdo> map = orderApi.getDepartureDetailForId(id);
|
||||
String status = map.getStatus();
|
||||
//判断接口数据获取是否成功
|
||||
if ("200".equals(status)) {
|
||||
//接口数据获取成功,将接口的Map的data数据转为接口对象数据
|
||||
departureDetailIdo_dto.setStatus("200");
|
||||
departureDetailIdo = map.getData();
|
||||
if (departureDetailIdo != null) {
|
||||
departureDetailIdo_dto.setDepartureDetailIdo(departureDetailIdo);
|
||||
}
|
||||
|
||||
}
|
||||
if ("401".equals(status)) {
|
||||
departureDetailIdo_dto.setStatus("401");
|
||||
}
|
||||
return departureDetailIdo_dto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 完成提车核验
|
||||
*
|
||||
* @param id:提车id
|
||||
* @return 返回完成提车核验结果
|
||||
*/
|
||||
@Override
|
||||
public boolean checkDepartureVehicle(String id) {
|
||||
|
||||
|
||||
if (id == null || id.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
CommonRes<CheckRes> res = orderApi.checkDepartureVehicle(id);
|
||||
//接口数据转Map
|
||||
boolean result = false;
|
||||
//判断接口数据获取是否成功
|
||||
if ("200".equals(res.getStatus())) {
|
||||
//接口数据获取成功,将接口的Map的data数据转为接口对象数据,最后返回核验是否成功 true/false
|
||||
result = res.getData().isResult();
|
||||
/*{
|
||||
"errorMsg": "", //操作失败原因,成功则为 null
|
||||
"result": true //操作结果
|
||||
}**/
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,190 @@
|
|||
package com.haitongauto.interfaces.impl;
|
||||
import com.bestvike.linq.Linq;
|
||||
import com.haitongauto.interfaces.DicInterface;
|
||||
import com.haitongauto.interfaces.OrderApi;
|
||||
import com.haitongauto.mapper.base.DicMapper;
|
||||
import com.haitongauto.mapper.base.RequesterMapper;
|
||||
import com.haitongauto.models.dto.DicDto;
|
||||
import com.haitongauto.models.ido.CommonRes;
|
||||
import com.haitongauto.models.ido.DictionaryIdo;
|
||||
import com.haitongauto.models.pojo.Dic;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 通用数据字典表(数据源自RTOS)
|
||||
* 运输方式 TRANSPORT_TYPE
|
||||
* 进港类型 ENTER_PORT_TYPE
|
||||
* 货物类型 CARGO_TYPE
|
||||
* 操作模式 OPERATING_MODE
|
||||
* 备 件 MACHINE_TYPE
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class DicInterfaceImpl implements DicInterface {
|
||||
@Autowired
|
||||
DicMapper dicMapper;
|
||||
@Autowired
|
||||
RequesterMapper requesterMapper;
|
||||
@Resource
|
||||
private OrderApi orderApi;
|
||||
|
||||
/**
|
||||
* 获取通用字典接口数据
|
||||
*
|
||||
* @param dic_sort :数据类型字符串(该参数直接拼接到接口URL)
|
||||
* 运输方式 TRANSPORT_TYPE
|
||||
* 进港类型 ENTER_PORT_TYPE
|
||||
* 货物类型 CARGO_TYPE
|
||||
* 操作模式 OPERATING_MODE
|
||||
* 备件 MACHINE_TYPE
|
||||
* @return 返回通用字典接口数据
|
||||
*/
|
||||
@Override
|
||||
public List<DicDto> getDicList(String dic_sort) {
|
||||
List<DicDto> dicDtoList = new ArrayList<>();
|
||||
//伪代码,测试使用
|
||||
// if (false) {
|
||||
// try {
|
||||
// List<Dic> mylist = dicMapper.getDicListByDicSort(dic_sort);
|
||||
// //接口字典数据Dic转ViewModel类数据DicDto
|
||||
// dicDtoList = this.DicConvertToDicDto(mylist);
|
||||
// } catch (Exception ignored) {
|
||||
// }
|
||||
// }
|
||||
|
||||
if (true) {
|
||||
//检查查询类型参数,定义类型描述
|
||||
String description = "";
|
||||
CommonRes<List<DictionaryIdo>> map = null;
|
||||
if (dic_sort != null && !Objects.equals(dic_sort, "")) {
|
||||
switch (dic_sort) {
|
||||
case "TRANSPORT_TYPE":
|
||||
description = "运输方式";
|
||||
//map = orderApi.getTransportTypeList();
|
||||
map=orderApi.dicData("TRANSPORT_TYPE");
|
||||
break;
|
||||
case "ENTER_PORT_TYPE":
|
||||
map = orderApi.dicData("ENTER_PORT_TYPE");
|
||||
description = "进港类型";
|
||||
break;
|
||||
case "APP_CARGO_TYPE":
|
||||
description = "货物类型";
|
||||
map = orderApi.dicData("APP_CARGO_TYPE");
|
||||
break;
|
||||
case "OPERATING_MODE":
|
||||
description = "操作模式";
|
||||
map=orderApi.dicData("OPERATING_MODE");
|
||||
break;
|
||||
case "MACHINE_TYPE":
|
||||
description = "备件";
|
||||
map=orderApi.dicData("MACHINE_TYPE");
|
||||
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
//获取本地库对应类别的字典数据列表
|
||||
List<Dic> mylist = dicMapper.getDicListByDicSort(dic_sort);
|
||||
//通用字典的接口类型参数requestType=1002
|
||||
|
||||
//获取字典接口数据
|
||||
|
||||
if (map == null) {
|
||||
//接口字典数据Dic转ViewModel类数据DicDto
|
||||
dicDtoList = this.DicConvertToDicDto(mylist);
|
||||
return dicDtoList;
|
||||
}
|
||||
|
||||
|
||||
//定义通用字典列表实例
|
||||
List<Dic> dicList = new ArrayList<>();
|
||||
//判断接口数据获取是否成功
|
||||
if (map.getStatus().equals("200")) {
|
||||
//接口数据获取成功,将接口的Map的data数据转为接口对象的List
|
||||
List<DictionaryIdo> dataList = map.getData();
|
||||
if (dataList != null && dataList.size() > 0) {
|
||||
//遍历data数据
|
||||
for (DictionaryIdo item : dataList) {
|
||||
String dic_id = item.getPtrCode();
|
||||
//String dic_sort = item.getPamEfficient();
|
||||
if (dic_id != null && !Objects.equals(dic_id, "")) {
|
||||
//定义一个字典的实例
|
||||
Dic dic = new Dic();
|
||||
//用接口数据给字典实例赋值
|
||||
dic.setDic_sort(dic_sort); //分类字符串
|
||||
dic.setId(dic_id); //字典id
|
||||
dic.setContent(item.getPtrDesc()); //字典内容
|
||||
dic.setDescription(description); //字典描述
|
||||
dic.setIs_del(0);
|
||||
//获取dic_id在本地数据库中对应实例的字典id
|
||||
Dic myDic = Linq.of(mylist).firstOrDefault(a -> a.getId().equals(dic_id));
|
||||
// try {
|
||||
// //更新到数据库
|
||||
// if (myDic != null && myDic.getId() != null) {
|
||||
// //如果存在,则更新本地数据
|
||||
// int x = dicMapper.update(dic);
|
||||
// if (x > 0) {
|
||||
// System.out.println(description + "的接口数据已更新到本地数据库。");
|
||||
// }
|
||||
// } else {
|
||||
// //如果不存在,则新增本地数据
|
||||
// String id = dicMapper.insert(dic);
|
||||
// if (id != null && id.length() > 0) {
|
||||
// System.out.println(description + "的接口数据已添加到本地数据库。");
|
||||
// }
|
||||
// }
|
||||
// } catch (Exception ignored) {
|
||||
// }
|
||||
|
||||
//填充到dicList列表
|
||||
dicList.add(dic);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
//接口数据获取失败,则直接使用本地数据表
|
||||
dicList = mylist;
|
||||
}
|
||||
|
||||
//接口字典数据Dic转ViewModel类数据DicDto
|
||||
dicDtoList = this.DicConvertToDicDto(dicList);
|
||||
|
||||
}
|
||||
return dicDtoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 接口字典数据Dic转ViewModel类数据DicDto
|
||||
*
|
||||
* @param dicList 接口字典数据Dic列表
|
||||
* @return 返回ViewModel类数据DicDto列表
|
||||
*/
|
||||
private List<DicDto>
|
||||
DicConvertToDicDto(List<Dic> dicList) {
|
||||
List<DicDto> dicDtoList = new ArrayList<>();
|
||||
if (dicList != null && dicList.size() > 0) {
|
||||
for (Dic item : dicList) {
|
||||
DicDto dicDto = new DicDto();
|
||||
dicDto.setId(item.getId());
|
||||
dicDto.setText(item.getContent());
|
||||
dicDtoList.add(dicDto);
|
||||
}
|
||||
}
|
||||
return dicDtoList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String picUpload(String pic) {
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package com.haitongauto.interfaces.impl;
|
||||
import com.haitongauto.interfaces.EnterPortTypeInterface;
|
||||
import com.haitongauto.interfaces.OrderApi;
|
||||
import com.haitongauto.models.dto.EnterPortTypeDto;
|
||||
import com.haitongauto.models.dto.EnterPortTypeDtol;
|
||||
import com.haitongauto.models.ido.CommonRes;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 进港类型接口
|
||||
*/
|
||||
@Service
|
||||
public class EnterPortTypeInterfaceImpl implements EnterPortTypeInterface {
|
||||
@Resource
|
||||
private OrderApi orderApi;
|
||||
|
||||
@Override
|
||||
public List<EnterPortTypeDtol> getEnterPortTypeList() {
|
||||
CommonRes<List<EnterPortTypeDto>> data = orderApi.getEnterPortType();
|
||||
List<EnterPortTypeDto> enterPortTypeDtoList = null;
|
||||
if (data != null) {
|
||||
enterPortTypeDtoList = data.getData();
|
||||
}
|
||||
List<EnterPortTypeDtol> enterPortTypeDtolList = new ArrayList<>();
|
||||
if (enterPortTypeDtoList != null && enterPortTypeDtoList.size() > 0) {
|
||||
for (EnterPortTypeDto item : enterPortTypeDtoList) {
|
||||
EnterPortTypeDtol enterPortTypeDtol = new EnterPortTypeDtol();
|
||||
enterPortTypeDtol.setId(item.getEteCode());
|
||||
enterPortTypeDtol.setText(item.getEteType());
|
||||
enterPortTypeDtol.setEteBusinesstp(item.getEteBusinesstp());
|
||||
enterPortTypeDtol.setEteBusinesstpDesc(item.getEteBusinesstpDesc());
|
||||
enterPortTypeDtolList.add(enterPortTypeDtol);
|
||||
}
|
||||
}
|
||||
return enterPortTypeDtolList;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
package com.haitongauto.interfaces.impl;
|
||||
|
||||
import com.bestvike.linq.Linq;
|
||||
import com.haitongauto.interfaces.OrderApi;
|
||||
import com.haitongauto.interfaces.PortAreaInterface;
|
||||
import com.haitongauto.mapper.base.PortAreasMapper;
|
||||
import com.haitongauto.mapper.base.RequesterMapper;
|
||||
import com.haitongauto.models.ido.CommonRes;
|
||||
import com.haitongauto.models.ido.PortAreasIdo;
|
||||
import com.haitongauto.models.pojo.PortArea;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class PortAreaInterfaceImpl implements PortAreaInterface {
|
||||
@Autowired
|
||||
RequesterMapper requesterMapper;
|
||||
@Autowired
|
||||
PortAreasMapper portAreasMapper;
|
||||
|
||||
@Resource
|
||||
private OrderApi orderApi;
|
||||
|
||||
/**
|
||||
* 获取RTOS港区列表数据
|
||||
*
|
||||
* @return 返回港区列表数据
|
||||
*/
|
||||
@Override
|
||||
public List<PortArea> getPortArea() {
|
||||
//定义港区列表实例
|
||||
List<PortArea> portAreaList = new ArrayList<>();
|
||||
|
||||
//伪代码,测试使用
|
||||
if (false) {
|
||||
try {
|
||||
portAreaList = portAreasMapper.getList();
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (true) {
|
||||
//获取本地库港区列表
|
||||
List<PortArea> mylist = portAreasMapper.getList();
|
||||
|
||||
CommonRes<List<PortAreasIdo>> map = orderApi.getPortAreasIdoList("");
|
||||
//定义港区列表实例
|
||||
// List<PortArea> portAreaList = new ArrayList<>();
|
||||
//判断接口数据获取是否成功
|
||||
if ("200".equals(map.getStatus())) {
|
||||
//接口数据获取成功,将接口的Map的data数据转为接口对象的List
|
||||
List<PortAreasIdo> dataList = map.getData();
|
||||
//遍历data数据
|
||||
for (PortAreasIdo item : dataList) {
|
||||
String pam_id = item.getPamId();
|
||||
String is_enable = item.getPamEfficient();
|
||||
if (pam_id != null && !Objects.equals(pam_id, "") && "启用".equals(is_enable)) {
|
||||
//定义一个港区实例
|
||||
PortArea portArea = new PortArea();
|
||||
//用接口数据给实例赋值
|
||||
portArea.setId(item.getPamId());
|
||||
portArea.setPort_area_address(item.getPamAddress());
|
||||
portArea.setPort_area_code(item.getPamNo());
|
||||
portArea.setPort_area_name(item.getPamName());
|
||||
portArea.setIs_enable(("启用".equals(item.getPamEfficient())) ? 1 : 0);
|
||||
portArea.setIs_del(0);
|
||||
//还有一些字段值欠缺,如:港区坐标位置(poi)、打卡范围....
|
||||
|
||||
//获取pam_id在本地数据库中对应实例的港区id
|
||||
//PortArea myPortAreax = portAreasMapper.getByPamId(pam_id);
|
||||
|
||||
PortArea myPortArea = Linq.of(mylist).firstOrDefault(a -> a.getId().equals(pam_id));
|
||||
//更新到数据库
|
||||
if (myPortArea != null && myPortArea.getId() != null) {
|
||||
myPortArea.setPort_area_code(item.getPamNo());
|
||||
myPortArea.setPort_area_name(item.getPamName());
|
||||
myPortArea.setIs_enable(("启用".equals(item.getPamEfficient())) ? 1 : 0);
|
||||
myPortArea.setIs_del(0);
|
||||
String port_area_address = myPortArea.getPort_area_address();
|
||||
if (port_area_address == null || port_area_address.isEmpty()) {
|
||||
myPortArea.setPort_area_address(item.getPamAddress());
|
||||
}
|
||||
|
||||
//如果存在,则更新本地数据
|
||||
int x = portAreasMapper.update(myPortArea);
|
||||
} else {
|
||||
//如果不存在,则新增本地数据,返回新值的id
|
||||
String id = portAreasMapper.insert(portArea);
|
||||
}
|
||||
//填充到列表
|
||||
portAreaList.add(portArea);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//接口数据获取失败,则直接使用本地数据表
|
||||
portAreaList = mylist;
|
||||
}
|
||||
}
|
||||
|
||||
return portAreaList;
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
package com.haitongauto.interfaces.impl;
|
||||
import com.haitongauto.interfaces.OrderApi;
|
||||
import com.haitongauto.interfaces.ReceivingVehicleInterface;
|
||||
import com.haitongauto.mapper.base.RequesterMapper;
|
||||
import com.haitongauto.models.ido.CheckRes;
|
||||
import com.haitongauto.models.ido.CommonRes;
|
||||
import com.haitongauto.models.ido.receiving.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ReceivingVehicleInterfaceImpl implements ReceivingVehicleInterface {
|
||||
@Autowired
|
||||
RequesterMapper requesterMapper;
|
||||
@Resource
|
||||
private OrderApi orderApi;
|
||||
|
||||
/**
|
||||
* 获取收车凭证的分页数据(本用户数据)
|
||||
*
|
||||
* @param current 当前页码
|
||||
* @param size 数据条数(非必填
|
||||
* @return 返回收车凭证的分页数据
|
||||
*/
|
||||
@Override
|
||||
public ReceivingVehicleIdo_DTO getReceivingVehicleList(String printTicketTime, String query, Integer current, Integer size) {
|
||||
//创建一个收车分页数据的实例(分页列表数据)
|
||||
List<ReceivingVehicleIdo> mylist = null;
|
||||
//接口数据转Map
|
||||
CommonRes<ReceivingVehicleIdoPar> map = orderApi.getReceivingVehicleList(printTicketTime, query, current, size);
|
||||
//判断接口数据获取是否成功
|
||||
String status = map.getStatus();
|
||||
ReceivingVehicleIdo_DTO receivingVehicleIdo_dto = new ReceivingVehicleIdo_DTO();
|
||||
switch (status) {
|
||||
case "200":
|
||||
//接口数据获取成功,将接口的Map的data数据转为接口对象的List
|
||||
receivingVehicleIdo_dto.setStatus(status);
|
||||
ReceivingVehicleIdoPar receivingVehicleIdoPar = map.getData();
|
||||
if (receivingVehicleIdoPar != null) {
|
||||
mylist = receivingVehicleIdoPar.getRecords();
|
||||
receivingVehicleIdo_dto.setReceivingVehicleIdoList(mylist);
|
||||
}
|
||||
|
||||
break;
|
||||
case "401":
|
||||
//用户权限过期
|
||||
receivingVehicleIdo_dto.setStatus(status);
|
||||
break;
|
||||
default:
|
||||
receivingVehicleIdo_dto.setStatus(status);
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return receivingVehicleIdo_dto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取一条收车明细
|
||||
*
|
||||
* @param id:收车id
|
||||
* @return 返回一条收车明细
|
||||
*/
|
||||
@Override
|
||||
public ReceivingDetailIdo_DTO getReceivingDetailForId(String id) {
|
||||
//创建一个收车详情数据的实例(基本数据+明细列表)
|
||||
ReceivingDetailIdo receivingDetailIdo = new ReceivingDetailIdo();
|
||||
ReceivingDetailIdo_DTO receivingDetailIdo_dto = new ReceivingDetailIdo_DTO();
|
||||
//接口数据转Map
|
||||
CommonRes<ReceivingDetailIdo> map = orderApi.getReceivingDetailForId(id);
|
||||
String status = map.getStatus();
|
||||
//判断接口数据获取是否成功
|
||||
if ("200".equals(status)) {
|
||||
//接口数据获取成功,将接口的Map的data数据转为接口对象数据
|
||||
receivingDetailIdo_dto.setStatus("200");
|
||||
receivingDetailIdo = map.getData();
|
||||
if (receivingDetailIdo != null) {
|
||||
receivingDetailIdo_dto.setReceivingDetailIdo(receivingDetailIdo);
|
||||
}
|
||||
|
||||
}
|
||||
if ("401".equals(status)) {
|
||||
receivingDetailIdo_dto.setStatus("401");
|
||||
}
|
||||
return receivingDetailIdo_dto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 完成收车核验
|
||||
*
|
||||
* @param id:收车id
|
||||
* @return 返回完成收车核验结果
|
||||
*/
|
||||
@Override
|
||||
public boolean checkReceivingVehicle(String id) {
|
||||
if (id == null || id.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
CommonRes<CheckRes> res = orderApi.checkReceivingVehicle(id);
|
||||
//接口数据转Map
|
||||
boolean result = false;
|
||||
//判断接口数据获取是否成功
|
||||
if ("200".equals(res.getStatus())) {
|
||||
//接口数据获取成功,将接口的Map的data数据转为接口对象数据,最后返回核验是否成功 true/false
|
||||
/*{
|
||||
"errorMsg": "", //操作失败原因,成功则为 null
|
||||
"result": true //操作结果
|
||||
}**/
|
||||
result = res.getData().isResult();
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
package com.haitongauto.interfaces.impl;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.haitongauto.interfaces.UserInterface;
|
||||
import com.haitongauto.mapper.base.RequesterMapper;
|
||||
import com.haitongauto.models.ido.login.UserLoginOrRegisterRequest;
|
||||
import com.haitongauto.models.ido.login.UserLoginOrRegisterResponse;
|
||||
import com.haitongauto.models.pojo.Requester;
|
||||
import com.haitongauto.utils.HttpRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 用户登录/注册
|
||||
* 调用哪吒接口
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class UserInterfaceImpl implements UserInterface {
|
||||
@Autowired
|
||||
RequesterMapper requesterMapper;
|
||||
|
||||
/**
|
||||
* 用户登录/注册
|
||||
*
|
||||
* @param request 请求入参
|
||||
* @return 返回出参实体
|
||||
*/
|
||||
@Override
|
||||
public UserLoginOrRegisterResponse userLoginOrRegister(UserLoginOrRegisterRequest request) {
|
||||
String myParam = "appId=" + request.getAppId() +
|
||||
"&mobile=" + request.getMobile() +
|
||||
"&openId=" + request.getOpenId() +
|
||||
"&unionId=" + request.getUnionId() ;
|
||||
// +"&mediaType=" + request.getMediaType();
|
||||
//获取 用户提交 外部接口及参数(用户提交接口类型参数requestType=1017)
|
||||
Requester requester = requesterMapper.getRequesterForType(1017);
|
||||
if (requester == null || requester.getUrl() == null || requester.getUrl().isEmpty()) {
|
||||
System.out.println("请在小程序数据库外部请求接口表添加 用户登录或注册 接口定义数据。");
|
||||
log.error("请在数据库配置 用户登录或注册 的url及入参!");
|
||||
return null;
|
||||
}
|
||||
String url = requester.getUrl();
|
||||
//获取接口数据
|
||||
String res = HttpRequest.sendGet(url, myParam);
|
||||
if (res.isEmpty()) {
|
||||
System.out.println("请求哪吒 用户登录或注册 接口失败");
|
||||
log.error("请求哪吒 用户登录或注册 接口失败");
|
||||
return null;
|
||||
}
|
||||
Map map = JSONObject.parseObject(res, Map.class);
|
||||
UserLoginOrRegisterResponse response = null;
|
||||
if (map != null) {
|
||||
response = JSONObject.parseObject(map.get("data").toString(), UserLoginOrRegisterResponse.class);
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,5 @@
|
|||
#Generated by Maven
|
||||
#Mon Oct 30 20:58:41 CST 2023
|
||||
version=1.0-SNAPSHOT
|
||||
groupId=org.example
|
||||
artifactId=interfaces
|
|
@ -0,0 +1,17 @@
|
|||
com\haitongauto\interfaces\UsersApi.class
|
||||
com\haitongauto\interfaces\impl\UserInterfaceImpl.class
|
||||
com\haitongauto\interfaces\impl\CustomerServiceInterfaceImpl.class
|
||||
com\haitongauto\interfaces\PortAreaInterface.class
|
||||
com\haitongauto\interfaces\EnterPortTypeInterface.class
|
||||
com\haitongauto\interfaces\impl\DepartureVehicleInterfaceImpl.class
|
||||
com\haitongauto\interfaces\ReceivingVehicleInterface.class
|
||||
com\haitongauto\interfaces\impl\ReceivingVehicleInterfaceImpl.class
|
||||
com\haitongauto\interfaces\impl\DicInterfaceImpl.class
|
||||
com\haitongauto\interfaces\CusOrderApi.class
|
||||
com\haitongauto\interfaces\impl\EnterPortTypeInterfaceImpl.class
|
||||
com\haitongauto\interfaces\OrderApi.class
|
||||
com\haitongauto\interfaces\UserInterface.class
|
||||
com\haitongauto\interfaces\DicInterface.class
|
||||
com\haitongauto\interfaces\DepartureVehicleInterface.class
|
||||
com\haitongauto\interfaces\impl\PortAreaInterfaceImpl.class
|
||||
com\haitongauto\interfaces\CustomerServiceInterface.class
|
|
@ -0,0 +1,17 @@
|
|||
F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\DepartureVehicleInterface.java
|
||||
F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\EnterPortTypeInterface.java
|
||||
F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\CustomerServiceInterface.java
|
||||
F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\impl\PortAreaInterfaceImpl.java
|
||||
F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\OrderApi.java
|
||||
F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\impl\EnterPortTypeInterfaceImpl.java
|
||||
F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\CusOrderApi.java
|
||||
F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\impl\DicInterfaceImpl.java
|
||||
F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\PortAreaInterface.java
|
||||
F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\UsersApi.java
|
||||
F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\impl\DepartureVehicleInterfaceImpl.java
|
||||
F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\impl\ReceivingVehicleInterfaceImpl.java
|
||||
F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\impl\CustomerServiceInterfaceImpl.java
|
||||
F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\impl\UserInterfaceImpl.java
|
||||
F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\DicInterface.java
|
||||
F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\ReceivingVehicleInterface.java
|
||||
F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\UserInterface.java
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>rtos-wh</artifactId>
|
||||
<groupId>org.example</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>mapper</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<!-- <version>3.0.2</version>-->
|
||||
<version>2.2.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.5.4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>models</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,32 @@
|
|||
package com.haitongauto.mapper.admin;
|
||||
|
||||
import com.haitongauto.models.pojo.Announcement;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface AnnouncementAdminMapper {
|
||||
/**
|
||||
* 发布人员(作者)去重列表
|
||||
* @return 返回发布人员(作者)
|
||||
*/
|
||||
List<String> getAuthorList();
|
||||
|
||||
/**
|
||||
* 根据特定条件查询历史公告
|
||||
* @param tilKeywords:标题关键字
|
||||
* @param dateStart:日期范围之起始发布日期
|
||||
* @param dateEnd:日期范围之截止发布日期
|
||||
* @param sort:类别(1-小程序,2-客服平台)
|
||||
* @param authors:作者/发布人/操作员
|
||||
* @return 返回特定条件查询历史公告
|
||||
*/
|
||||
List<Announcement> AnnouncementListForCondition(@Param("tilKeywords") String tilKeywords, @Param("dateStart") Date dateStart, @Param("dateEnd") Date dateEnd, @Param("sort") Integer sort, @Param("list") List<String> authors);
|
||||
|
||||
List<Announcement> AnnouncementListForWeek();
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.haitongauto.mapper.admin;
|
||||
|
||||
import com.haitongauto.models.pojo.Appointment;
|
||||
import com.haitongauto.models.pojo.AppointmentDetail;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface AppointmentAdminMapper {
|
||||
/**
|
||||
* 车辆预约:通过港区、司机关键字、预约时间范围、进港类型、状态(1-已预约,0-已取消)、运输方式(0-自开/1-板车运输)单独或组合查询
|
||||
* @param port_area_id:港区id
|
||||
* @param keywords:关键字(姓名、手机号、板车号)
|
||||
* @param start_date:时间范围开始
|
||||
* @param end_date:时间范围结束
|
||||
* @param enter_type:进港类型(1-外贸出口,2-外贸进口,2-整车物流,3-特保区出口,4-特保区进口,5-内贸出口,6-内贸进口)
|
||||
* @param appointment_state:预约状态(0-已取消,1-已预约)
|
||||
* @param transport_type:运输方式(0-自开/1-板车运)
|
||||
* @return 返回车辆预约
|
||||
*/
|
||||
//List<Appointment> AppointmentListForCondition(@Param("port_area_id") Integer port_area_id, @Param("keywords") String keywords, @Param("start_date") String start_date, @Param("end_date") String end_date, @Param("enter_type") Integer enter_type, @Param("appointment_state") Integer appointment_state, @Param("transport_type") Integer transport_type);
|
||||
List<Appointment> AppointmentListForCondition(@Param("users_id") String users_id, @Param("port_area_id") String port_area_id, @Param("keywords") String keywords, @Param("start_date") String start_date, @Param("end_date") String end_date, @Param("enter_type") String enter_type, @Param("appointment_state") Integer appointment_state, @Param("transport_type") String transport_type);
|
||||
|
||||
List<Appointment>AppointmentListExportyByIds(@Param("list") List<String> ids);
|
||||
|
||||
|
||||
/**
|
||||
* 获取指定预约的货物明细
|
||||
*
|
||||
* @param appointment_id 预约id
|
||||
* @return 返回指定预约的货物明细
|
||||
*/
|
||||
List<AppointmentDetail> appointmentGoodsDetail(@Param("appointment_id") String appointment_id);
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.haitongauto.mapper.admin;
|
||||
|
||||
import com.haitongauto.models.pojo.Feedback;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface FeedbackAdminMapper {
|
||||
/**
|
||||
* 根据联系方式、用户名称查询意见反馈
|
||||
*
|
||||
* @param linkTel 联系方式
|
||||
* @param nikeName 用户名称
|
||||
* @return 返回意见反馈
|
||||
*/
|
||||
List<Feedback> feedbackListForCondition(@Param("users_id") String users_id, @Param("linkTel") String linkTel, @Param("nikeName") String nikeName);
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.haitongauto.mapper.admin;
|
||||
|
||||
import com.haitongauto.models.pojo.NoviceIntroduction;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@Mapper
|
||||
public interface NoviceIntroductionAdminMapper {
|
||||
/**
|
||||
* 根据分类sort获取操作说明
|
||||
* @param sort:(1-小程序,2-客服平台,3-App)
|
||||
* @return 返回操作说明
|
||||
*/
|
||||
NoviceIntroduction getNoviceIntroductionBySort(@Param("sort") Integer sort);
|
||||
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package com.haitongauto.mapper.admin;
|
||||
|
||||
import com.haitongauto.models.pojo.PunchClock;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface PunchClockAdminMapper {
|
||||
|
||||
/**
|
||||
* 通过港区、业务类型、关键词、签到日期、签到状态(缺卡/正常)、打卡完成状态(缺卡/正常)单独或组合查询
|
||||
*
|
||||
* @param port_area_id:港区id
|
||||
* @param biz_type:业务类型
|
||||
* @param keywords:关键字(姓名、手机号、板车号)
|
||||
* @param approach_date:进港日期
|
||||
* @param sign_in_state:签到状态(0-缺卡,1-正常)
|
||||
* @param punch_state:完工打卡状态(0-缺卡,1-完工)
|
||||
* @return 返回打卡记录列表
|
||||
*/
|
||||
List<PunchClock> PunchClockListForCondition(@Param("users_id") String users_id, @Param("port_area_id") String port_area_id, @Param("biz_type") Integer biz_type, @Param("keywords") String keywords, @Param("approach_date") String approach_date, @Param("sign_in_state") Integer sign_in_state, @Param("punch_state") Integer punch_state);
|
||||
|
||||
/**
|
||||
* 导出指定ids的打卡记录
|
||||
* @param ids 打卡记录ids
|
||||
* @return 返回打卡记录
|
||||
*/
|
||||
List<PunchClock> getPunchClockListExportByIds(@Param("list") List<String> ids);
|
||||
}
|
|
@ -0,0 +1,165 @@
|
|||
package com.haitongauto.mapper.admin;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@Mapper
|
||||
public interface StatisticsAdminMapper {
|
||||
|
||||
/**
|
||||
* 已预约车辆数
|
||||
*
|
||||
* @param start_time 开始时间
|
||||
* @param end_time 结束时间
|
||||
* @param port_area_id 港区id
|
||||
* @return 返回已预约车辆数
|
||||
*/
|
||||
Integer getAppointmentedCount(@Param("start_time") String start_time, @Param("end_time") String end_time, @Param("port_area_id") String port_area_id);
|
||||
|
||||
|
||||
/**
|
||||
* 取消预约车辆数
|
||||
*
|
||||
* @param start_time 开始时间
|
||||
* @param end_time 结束时间
|
||||
* @param port_area_id 港区id
|
||||
* @return 返回取消预约车辆数
|
||||
*/
|
||||
Integer getAppointmentCancelCount(@Param("start_time") String start_time, @Param("end_time") String end_time, @Param("port_area_id") String port_area_id);
|
||||
|
||||
/**
|
||||
* 预约已签到车辆数
|
||||
*
|
||||
* @param start_time 开始时间
|
||||
* @param end_time 结束时间
|
||||
* @param port_area_id 港区id
|
||||
* @return 返回预约已签到车辆数
|
||||
*/
|
||||
Integer getAppointmentSignInCount(@Param("start_time") String start_time, @Param("end_time") String end_time, @Param("port_area_id") String port_area_id);
|
||||
|
||||
/**
|
||||
* 完成打卡车辆数
|
||||
*
|
||||
* @param start_time 开始时间
|
||||
* @param end_time 结束时间
|
||||
* @param port_area_id 港区id
|
||||
* @return 返回完成打卡车辆数
|
||||
*/
|
||||
Integer getPunchClockOverCount(@Param("start_time") String start_time, @Param("end_time") String end_time, @Param("port_area_id") String port_area_id);
|
||||
|
||||
/**
|
||||
* 指令已发送车辆数
|
||||
*
|
||||
* @param start_time 开始时间
|
||||
* @param end_time 结束时间
|
||||
* @param port_area_id 港区id
|
||||
* @return 指令已发送车辆数
|
||||
*/
|
||||
Integer getInstructHavaSendCount(@Param("start_time") String start_time, @Param("end_time") String end_time, @Param("port_area_id") String port_area_id);
|
||||
|
||||
/**
|
||||
* 外贸出口卡车辆数
|
||||
*
|
||||
* @param start_time 开始时间
|
||||
* @param end_time 结束时间
|
||||
* @param port_area_id 港区id
|
||||
* @return 返回外贸出口卡车辆数
|
||||
*/
|
||||
Integer getForeignTradeExportsCount(@Param("start_time") String start_time, @Param("end_time") String end_time, @Param("port_area_id") String port_area_id);
|
||||
|
||||
/**
|
||||
* 外贸进口卡车辆数
|
||||
*
|
||||
* @param start_time 开始时间
|
||||
* @param end_time 结束时间
|
||||
* @param port_area_id 港区id
|
||||
* @return 返回外贸进口卡车辆数
|
||||
*/
|
||||
Integer getForeignTradeImportsCount(@Param("start_time") String start_time, @Param("end_time") String end_time, @Param("port_area_id") String port_area_id);
|
||||
|
||||
/**
|
||||
* 内贸出口卡车辆数
|
||||
*
|
||||
* @param start_time 开始时间
|
||||
* @param end_time 结束时间
|
||||
* @param port_area_id 港区id
|
||||
* @return 返回内贸出口卡车辆数
|
||||
*/
|
||||
Integer getDomesticTradeExportCount(@Param("start_time") String start_time, @Param("end_time") String end_time, @Param("port_area_id") String port_area_id);
|
||||
|
||||
/**
|
||||
* 内贸进口卡车辆数
|
||||
*
|
||||
* @param start_time 开始时间
|
||||
* @param end_time 结束时间
|
||||
* @param port_area_id 港区id
|
||||
* @return 返回内贸进口卡车辆数
|
||||
*/
|
||||
Integer getDomesticImportsExportCount(@Param("start_time") String start_time, @Param("end_time") String end_time, @Param("port_area_id") String port_area_id);
|
||||
|
||||
/**
|
||||
* 某进道口的辆数
|
||||
* @param start_time 开始时间
|
||||
* @param end_time 结束时间
|
||||
* @param port_area_id 港区id
|
||||
* @param gate_canal_in 道口号(进)
|
||||
* @return 某进道口的辆数
|
||||
*/
|
||||
Integer getInGateCanalCodeCount(@Param("start_time") String start_time, @Param("end_time") String end_time, @Param("port_area_id") String port_area_id, @Param("gate_canal_in") String gate_canal_in);
|
||||
|
||||
/**
|
||||
* 某出道口的辆数
|
||||
* @param start_time 开始时间
|
||||
* @param end_time 结束时间
|
||||
* @param port_area_id 港区id
|
||||
* @param gate_canal_out 道口号(进)
|
||||
* @return 某出道口的辆数
|
||||
*/
|
||||
Integer getOutGateCanalCodeCount(@Param("start_time") String start_time, @Param("end_time") String end_time, @Param("port_area_id") String port_area_id, @Param("gate_canal_out") String gate_canal_out);
|
||||
|
||||
/**
|
||||
* 自动进闸口板车数
|
||||
* @param start_time 开始时间
|
||||
* @param end_time 结束时间
|
||||
* @param port_area_id 港区id
|
||||
* @return 自动进闸口板车数
|
||||
*/
|
||||
Integer getConventionalityInGateCount(@Param("start_time") String start_time, @Param("end_time") String end_time, @Param("port_area_id") String port_area_id);
|
||||
|
||||
/**
|
||||
* 人工抬杆进闸口板车数
|
||||
* @param start_time 开始时间
|
||||
* @param end_time 结束时间
|
||||
* @param port_area_id 港区id
|
||||
* @return 人工抬杆进闸口板车数
|
||||
*/
|
||||
Integer getUnConventionalityInGateCount(@Param("start_time") String start_time, @Param("end_time") String end_time, @Param("port_area_id") String port_area_id);
|
||||
|
||||
/**
|
||||
* 待进港通行板车数 (已签到未进港的)
|
||||
* @param start_time 开始时间
|
||||
* @param end_time 结束时间
|
||||
* @param port_area_id 港区id
|
||||
* @return 待进港通行板车数 (已签到未进港的)
|
||||
*/
|
||||
Integer getWellInGateCount(@Param("start_time") String start_time, @Param("end_time") String end_time, @Param("port_area_id") String port_area_id);
|
||||
|
||||
/**
|
||||
* 已进港板车数 (已进港但未完成-离港的)
|
||||
* @param start_time 开始时间
|
||||
* @param end_time 结束时间
|
||||
* @param port_area_id 港区id
|
||||
* @return 已进港板车数 (已进港但未完成-离港的)
|
||||
*/
|
||||
Integer getHaveInGateCount(@Param("start_time") String start_time, @Param("end_time") String end_time, @Param("port_area_id") String port_area_id);
|
||||
|
||||
/**
|
||||
* 已离港板车数 (已进港但未完成-离港的)
|
||||
* @param start_time 开始时间
|
||||
* @param end_time 结束时间
|
||||
* @param port_area_id 港区id
|
||||
* @return 已离港板车数 (已进港但未完成-离港的)
|
||||
*/
|
||||
Integer getHavaOutGateCount(@Param("start_time") String start_time, @Param("end_time") String end_time, @Param("port_area_id") String port_area_id);
|
||||
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.haitongauto.mapper.admin;
|
||||
import com.haitongauto.models.pojo.Users;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface UsersAdminMapper {
|
||||
/**
|
||||
* 根据用户ID、手机号、昵称、注册时间和用户状态查询小程序注册用户信息
|
||||
* @param keywords : 查询关键字(用户ID、手机号、昵称)
|
||||
* @param registerDate:注册日期
|
||||
* @param usersState:用户状态
|
||||
* @return 注册用户信息列表
|
||||
*/
|
||||
List<Users> usersListForCondition(@Param("keywords") String keywords, @Param("registerDate") String registerDate, @Param("usersState") Integer usersState);
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.Announcement;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公告
|
||||
*
|
||||
* @author : kchh
|
||||
* @date : 2023-7-9
|
||||
*/
|
||||
@Mapper
|
||||
public interface AnnouncementMapper extends DataBaseMapper<Announcement> {
|
||||
|
||||
//---BaseMapper继承自DataBaseMapper
|
||||
List<Announcement> getListBySort(@Param("sort") Integer sort,@Param("keyWords") String keyWords);
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.AppointmentDetail;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 预约详细(详情)
|
||||
*
|
||||
* @author : kchh
|
||||
* @date 2023-7-9
|
||||
*/
|
||||
@Mapper
|
||||
public interface AppointmentDetailMapper extends DataBaseMapper<AppointmentDetail> {
|
||||
/**
|
||||
* 根据预约id查询预约详情
|
||||
*
|
||||
* @param appointment_id 预约id
|
||||
* @return 返回预约详情
|
||||
*/
|
||||
List<AppointmentDetail> getAppointmentDetailListByAppointmentId(@Param("appointment_id") String appointment_id);
|
||||
|
||||
AppointmentDetail getAppointmentDetailByGoodVin(@Param("vin") String vin);
|
||||
|
||||
List<AppointmentDetail> getAppointmentDetailByAppointmentIdList(@Param("list") List<String> list);
|
||||
|
||||
int deleteAppointmentDetailByAppointmentId(@Param("appointment_id") String appointment_id);
|
||||
|
||||
List<String> getAppointmentDetailListByGoodVinList(@Param("list") List<String> list);
|
||||
|
||||
/* 检查指定的VIN是否存在预约中 */
|
||||
Integer getVinAtAppointmentDetail(@Param("vin") String vin);
|
||||
|
||||
List<AppointmentDetail> getAppointmentDetailListByVinList(@Param("list") List<String> list);
|
||||
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.Appointment;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 预约信息
|
||||
*
|
||||
* @author : kchh
|
||||
* @date : 2023-7-9
|
||||
*/
|
||||
@Mapper
|
||||
public interface AppointmentMapper extends DataBaseMapper<Appointment> {
|
||||
/**
|
||||
* 根据车牌号查询预约信息列表
|
||||
*
|
||||
* @param truck_number 车牌号
|
||||
* @return 返回预约信息列表
|
||||
*/
|
||||
List<Appointment> getListByTruckName(@Param("truck_number") String truck_number);
|
||||
|
||||
|
||||
/**
|
||||
* 根据truck_vin查询预约信息列表
|
||||
*
|
||||
* @param truck_vin truck_vin
|
||||
* @return 返回预约信息列表
|
||||
*/
|
||||
List<Appointment> getAppointmentByVin(@Param("truck_vin") String truck_vin);
|
||||
|
||||
/**
|
||||
* 查询用户当天在外高桥港区未离港的预约
|
||||
*
|
||||
* @param users_id 用户id
|
||||
* @param port_area_id 港区id
|
||||
* @param approach_date 进港日期
|
||||
* @return 返回预约信息
|
||||
*/
|
||||
Appointment getAppointmentByUserIdAndPortAreaIdAndApproachDate(@Param("users_id") String users_id, @Param("port_area_id") String port_area_id, @Param("approach_date") String approach_date);
|
||||
|
||||
List<Appointment> getAppointmentListByCondition(@Param("truck_number") String truck_number, @Param("ship_id") String ship_id, @Param("instruct_state") Integer instruct_state, @Param("brand_name") String brand_name);
|
||||
|
||||
List<Appointment> getAppointmentByIds(@Param("list") List<String> list);
|
||||
|
||||
/**
|
||||
* 批量修改指令
|
||||
*
|
||||
* @param list list
|
||||
* @return aaa
|
||||
*/
|
||||
int batchUpdateAppointmentInstructState(@Param("list") List<Appointment> list);
|
||||
|
||||
|
||||
List<Appointment> getAppointmentListByConditionf(@Param("startDate")Date startDate,
|
||||
@Param("endDate")Date endDate,
|
||||
@Param("portAreaId")String portAreaId,
|
||||
@Param("truckNumber")String truckNumber,
|
||||
@Param("shipId")String shipId,
|
||||
@Param("instructState")Integer instructState,
|
||||
@Param("brandId")String brandId);
|
||||
|
||||
|
||||
Integer updateAppointmentPlateScanTime(@Param("appointment_id") String appointment_id);
|
||||
|
||||
List<String> getIdListNoInEn ();
|
||||
|
||||
|
||||
Appointment getAppointmentByTruckName(@Param("truck_number") String truck_number);
|
||||
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface DataBaseMapper<T> {
|
||||
|
||||
/**
|
||||
* 插入
|
||||
*
|
||||
* @param t 表数据实体
|
||||
* @return 返回受影响记录条数
|
||||
*/
|
||||
String insert(T t);
|
||||
|
||||
/**
|
||||
* 逻辑删除
|
||||
*
|
||||
* @param id 记录id
|
||||
* @return 返回受影响记录条数
|
||||
*/
|
||||
Integer logicDel(@Param("id") String id);
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param id 记录id
|
||||
* @return 返回受影响记录条数
|
||||
*/
|
||||
Integer delete(@Param("id") String id);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param t 表数据实体
|
||||
* @return 返回受影响记录条数
|
||||
*/
|
||||
Integer update(T t);
|
||||
|
||||
/**
|
||||
* 根据记录id查询一条数据记录
|
||||
* @param id 记录id
|
||||
* @return 返回表数据实体
|
||||
*/
|
||||
T getById(@Param("id") String id);
|
||||
|
||||
/**
|
||||
* 查询所有数据记录
|
||||
* @return 返回所有数据列表
|
||||
*/
|
||||
List<T> getList();
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
import com.haitongauto.models.pojo.DepartureDetail;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 提车明细
|
||||
* @author : kchh
|
||||
* @date : 2023-7-9
|
||||
*/
|
||||
@Mapper
|
||||
public interface DepartureDetailMapper extends DataBaseMapper<DepartureDetail> {
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.DepartureVehicle;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
/**
|
||||
* 提车信息
|
||||
* @author : kchh
|
||||
* @date : 2023-7-9
|
||||
*/
|
||||
@Mapper
|
||||
public interface DepartureVehicleMapper extends DataBaseMapper<DepartureVehicle> {
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.Dic;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 通用数据字典表(数据源自RTOS)
|
||||
* 运输方式 TRANSPORT_TYPE
|
||||
* 进港类型 ENTER_PORT_TYPE
|
||||
* 货物类型 CARGO_TYPE
|
||||
* 操作模式 OPERATING_MODE
|
||||
* 备 件 MACHINE_TYPE
|
||||
* @author : kchh
|
||||
* @date : 2023-7-9
|
||||
*/
|
||||
@Mapper
|
||||
public interface DicMapper extends DataBaseMapper<Dic>{
|
||||
/**
|
||||
* 根据字典分类参数获取字典数据列表
|
||||
* @param dic_sort:字典分类参数,如运输方式的 dic_sort=TRANSPORT_TYPE
|
||||
* @return 返回字典数据列表
|
||||
*/
|
||||
List<Dic> getDicListByDicSort(@Param("dic_sort") String dic_sort);
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.EntryInstruct;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 进港指令
|
||||
* @author : kchh
|
||||
* @date : 2023-7-9
|
||||
*/
|
||||
@Mapper
|
||||
public interface EntryInstructMapper extends DataBaseMapper<EntryInstruct>{
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.Feedback;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 意见反馈
|
||||
* @author : kchh
|
||||
* @date : 2023-7-9
|
||||
*/
|
||||
@Mapper
|
||||
public interface FeedbackMapper extends DataBaseMapper<Feedback> {
|
||||
//---BaseMapper继承自DataBaseMapper
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.LoginLog;
|
||||
/**
|
||||
* 用户登录日志
|
||||
* @author : kchh
|
||||
* @date : 2023-7-9
|
||||
*/
|
||||
public interface LoginLogMapper extends DataBaseMapper<LoginLog>{
|
||||
//---LoginLogMapper继承自DataBaseMapper
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.Message;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface MessageMapper extends DataBaseMapper<Message> {
|
||||
List<Message> getMessageListByTruckNumber(@Param("truck_number") String truck_number);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return 返回结果
|
||||
*/
|
||||
List<Message> getUnReadMessageListByTruckNumber(@Param("truck_number") String truck_number);
|
||||
|
||||
/**
|
||||
* 获得车辆最新消息
|
||||
* @param type 收车/发车
|
||||
* @param biz_id biz_id
|
||||
* @return 返回消息
|
||||
*/
|
||||
Message getLastMessageByTypeAndBizId(@Param("type") Integer type, @Param("biz_id") String biz_id);
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.NoviceIntroduction;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
/**
|
||||
* 新手攻略(小程序/客服平台/生产APP操作指南)
|
||||
* @author : kchh
|
||||
* @date : 2023-7-9
|
||||
*/
|
||||
@Mapper
|
||||
public interface NoviceIntroductionMapper extends DataBaseMapper<NoviceIntroduction> {
|
||||
//---BaseMapper继承自DataBaseMapper
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.PortArea;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
/**
|
||||
* 港区表(数据源自RTOS,请求时返回200,则使用数据,并更新表;否则,直接使用本表)
|
||||
* @author : kchh
|
||||
* @date : 2023-7-9
|
||||
*/
|
||||
@Mapper
|
||||
public interface PortAreasMapper extends DataBaseMapper<PortArea> {
|
||||
//---BaseMapper继承自DataReqMapper
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.PunchClock;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (签到/完成)打卡信息
|
||||
* @author : kchh
|
||||
* @date : 2023-7-9
|
||||
*/
|
||||
@Mapper
|
||||
public interface PunchClockMapper extends DataBaseMapper<PunchClock> {
|
||||
/**
|
||||
* 根据预约id查询打卡记录
|
||||
* @param appointment_id 预约id
|
||||
* @return 返回打卡记录
|
||||
*/
|
||||
PunchClock getPunchClockByAppointmentId(@Param("appointment_id") String appointment_id );
|
||||
|
||||
/**
|
||||
* 查询多个预约id 的打卡记录
|
||||
* @param appointmentIdList 预约id的集合
|
||||
* @return 返回打卡记录列表
|
||||
*/
|
||||
List<PunchClock> getPunchClockByAppointmentIdList(@Param("list") List<String> appointmentIdList);
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.ReceivingDetail;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 收车明细(数据源自RTOS)
|
||||
* @author : kchh
|
||||
* @date : 2023-7-9
|
||||
*/
|
||||
@Mapper
|
||||
public interface ReceivingDetailMapper extends DataBaseMapper<ReceivingDetail>{
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.ReceivingVehicle;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 收车信息(数据源自RTOS)
|
||||
* @author : kchh
|
||||
* @date : 2023-7-9
|
||||
*/
|
||||
@Mapper
|
||||
public interface ReceivingVehicleMapper extends DataBaseMapper<ReceivingVehicle>{
|
||||
/**
|
||||
* 根据凭证编号获取凭证id
|
||||
* @param voucher_number 凭证编号
|
||||
* @return 返回凭证id
|
||||
*/
|
||||
ReceivingVehicle getIdByVoucherNo(@Param("voucher_number") String voucher_number);
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.Requester;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 请求第三方接口
|
||||
* @author : kchh
|
||||
* @date 2023-7-9
|
||||
*/
|
||||
@Mapper
|
||||
public interface RequesterMapper extends DataBaseMapper<Requester> {
|
||||
//---BaseMapper继承自DataBaseMapper
|
||||
Requester getRequesterForType(@Param("request_type") Integer request_type);
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.ServiceConfig;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 服务配置
|
||||
* @author : kchh
|
||||
* @date : 2023-7-9
|
||||
*/
|
||||
@Mapper
|
||||
public interface ServiceConfigMapper extends DataBaseMapper<ServiceConfig> {
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.TableHead;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 自定义表头(后台管理客户端可自定义勾选表头显示字段)
|
||||
* @author : kchh
|
||||
* @date : 2023-7-9
|
||||
*/
|
||||
@Mapper
|
||||
public interface TableHeadMapper extends DataBaseMapper<TableHead>{
|
||||
/**
|
||||
* 根据表编号
|
||||
* @param table_code 表编号
|
||||
* @return 返回动态表头
|
||||
*/
|
||||
TableHead queryByCode( @Param("table_code") String table_code);
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.TruckManagement;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
/**
|
||||
* 板车管理
|
||||
* @author :kchh
|
||||
* @date : 2023-7-9
|
||||
*/
|
||||
@Mapper
|
||||
public interface TruckManagementMapper extends DataBaseMapper<TruckManagement> {
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.Truck;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 板车信息(用户扫描行驶证获取)
|
||||
* @author : kchh
|
||||
* @date : 2023-7-9
|
||||
*/
|
||||
@Mapper
|
||||
public interface TruckMapper extends DataBaseMapper<Truck>{
|
||||
/**
|
||||
* 根据用户id查询板车信息
|
||||
* @param users_id:用户id
|
||||
* @return 返回板车信息
|
||||
*/
|
||||
Truck getTruckByUsersId(@Param("users_id")String users_id);
|
||||
|
||||
/**
|
||||
* 根据用户id查询板车信息
|
||||
* @param wx_openid:用户id
|
||||
* @return 返回板车信息
|
||||
*/
|
||||
Truck getTruckByOpenId(@Param("wx_openid")String wx_openid);
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.haitongauto.mapper.base;
|
||||
|
||||
import com.haitongauto.models.pojo.Users;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 用户(司机)信息
|
||||
*
|
||||
* @author : kchh
|
||||
* @date : 2023-7-9
|
||||
*/
|
||||
@Mapper
|
||||
public interface UsersMapper extends DataBaseMapper<Users> {
|
||||
Users getByWxOpenid(@Param("wx_openid") String wx_openid);
|
||||
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
package com.haitongauto.mapper.client;
|
||||
|
||||
import com.haitongauto.models.pojo.Appointment;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 预约类扩展Mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface AppointmentExtendMapper {
|
||||
/**
|
||||
* 获取用户指定状态(1-已预约,2-已签到,3-已进港,5-操作中,6-已完成,7-已出港,4-已取消,9-异常)数据
|
||||
*
|
||||
* @param users_id 用户id
|
||||
* @param appointment_state 预约状态
|
||||
* @return 返回用户指定状态的预约信息列表
|
||||
*/
|
||||
List<Appointment> getAppointmentListForAny(@Param("users_id") String users_id, @Param("appointment_state") Integer appointment_state);
|
||||
|
||||
/**
|
||||
* 我的预约信息列表
|
||||
*
|
||||
* @param users_id 用户id
|
||||
* @return 返回我的预约信息列表
|
||||
*/
|
||||
List<Appointment> getMyAppointmentList(@Param("users_id") String users_id);
|
||||
|
||||
/**
|
||||
* 根据预约日期查询我的预约信息
|
||||
*
|
||||
* @param users_id 用户id
|
||||
* @param approach_date 进港日期
|
||||
* @return 返回预约信息
|
||||
*/
|
||||
List<Appointment> getMyAppointmentListForDate(@Param("users_id") String users_id, @Param("approach_date") LocalDate approach_date);
|
||||
|
||||
/**
|
||||
* 根据id_list获取我的预约列表
|
||||
*
|
||||
* @param users_id 用户id
|
||||
* @param id_list 预约id列表
|
||||
* @return 返回获取我的预约列表
|
||||
*/
|
||||
List<Appointment> getMyAppointmentListForIdList(@Param("users_id") String users_id, @Param("id_list") List<String> id_list);
|
||||
|
||||
/**
|
||||
* 获取指定用户预约未完成的数据(备注:appointment_state: 1-已预约,2-已签到,3-已进港,5-操作中,6-已完成,7-已出港,4-已取消,9-异常)数据
|
||||
*
|
||||
* @param users_id 用户id
|
||||
* @return 返回指定用户预约未完成的数据
|
||||
*/
|
||||
Appointment getActiveAppointment(@Param("users_id") String users_id);
|
||||
|
||||
/**
|
||||
* 取消预约
|
||||
*
|
||||
* @param cancel_time 取消时间
|
||||
* @param appointment_id 预约id
|
||||
* @return 返回执行结果
|
||||
*/
|
||||
Integer cancelAppointment(@Param("cancel_time") String cancel_time, @Param("appointment_id") String appointment_id);
|
||||
|
||||
|
||||
Integer cancelAppointmentDetails(@Param("appointment_id") String appointment_id);
|
||||
|
||||
/**
|
||||
* 获取我的当前预约
|
||||
*
|
||||
* @param users_id 用户id
|
||||
* @return 返回我的当前预约
|
||||
*/
|
||||
Appointment getMyAppointment(@Param("users_id") String users_id);
|
||||
|
||||
/**
|
||||
* 模糊查询(船名、航次),返回符合条件的预约记录明细Id列表
|
||||
*
|
||||
* @param keywords 查询关键字(船名、航次)
|
||||
* @return 返回预约id列表
|
||||
*/
|
||||
List<String> getAppointmentDetailListForKeyWords(@Param("keywords") String keywords);
|
||||
|
||||
/**
|
||||
* 查询指定用户和指定车辆是否存在已预约但未完成预约信息
|
||||
*
|
||||
* @param users_id 用户id
|
||||
* @param truck_number 车牌号
|
||||
* @return 返回指定用户和指定车辆是否存在已预约但未完成预约信息
|
||||
*/
|
||||
Appointment getActiveAppointmentByUserAndTruck(@Param("users_id") String users_id, @Param("truck_number") String truck_number);
|
||||
|
||||
/**
|
||||
* @param keywords 查询关键字(船名、航次)
|
||||
* @param approach_date 进场日期
|
||||
* @return 返回预约列表
|
||||
*/
|
||||
List<Appointment> getAppointmentListForCondition(@Param("users_id") String users_id, @Param("keywords") String keywords, @Param("approach_date") String approach_date);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package com.haitongauto.mapper.client;
|
||||
|
||||
import com.haitongauto.models.pojo.Requester;
|
||||
import com.haitongauto.models.pojo.Announcement;
|
||||
import com.haitongauto.models.pojo.EntryInstruct;
|
||||
import com.haitongauto.models.pojo.Users;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface OtherExtendMapper {
|
||||
/**
|
||||
* 读取最近10条公告数据
|
||||
* @return 返回最近10条公告数据
|
||||
*/
|
||||
List<Announcement> getLastAnnouncementsList();
|
||||
|
||||
/**
|
||||
* 获取发送给指定用户的(最近10条)指令信息
|
||||
* @param users_id 用户id
|
||||
* @return 返回指定发送给指定用户的(最近10条)指令信息
|
||||
*/
|
||||
List<EntryInstruct> getEntryInstructionsForUsers(@Param("users_id") String users_id);
|
||||
|
||||
/***
|
||||
* 根据请求类型获取一条请求配置数据
|
||||
* @param request_type 请求类型
|
||||
* @return 返回配置数据
|
||||
*/
|
||||
Requester getRequesterForType(@Param("request_type") Integer request_type);
|
||||
|
||||
/**
|
||||
* 根据配置编号code代码获取配置结果数据
|
||||
* @param config_code 配置编码
|
||||
* @return 返回配置结果数据
|
||||
*/
|
||||
String getServiceConfigForCode(@Param("config_code") String config_code);
|
||||
|
||||
/**
|
||||
* 根据用户的小程序 openid 获取用户在数据库里的数据
|
||||
* @param wx_openid wx_openid
|
||||
* @return 返回用户在数据库里的数据
|
||||
*/
|
||||
Users getUsersForOpenId(@Param("wx_openid") String wx_openid);
|
||||
|
||||
/**
|
||||
* 根据板车号查用户信息
|
||||
* @param truck_number 车牌号
|
||||
* @return 返回查用户信息
|
||||
*/
|
||||
Users getUsersByTruckNo(@Param("truck_number") String truck_number);
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
package com.haitongauto.mapper.client;
|
||||
|
||||
import com.haitongauto.models.pojo.PunchClock;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 打卡类扩展Mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface PunchClockExtendMapper {
|
||||
/**
|
||||
* 根据预约Id获取获取打卡记录
|
||||
*
|
||||
* @param appointment_id 预约id
|
||||
* @return 返回打卡记录
|
||||
*/
|
||||
PunchClock getPunchClockForAppintementId(@Param("appointment_id") String appointment_id);
|
||||
|
||||
/**
|
||||
* 获取指定日期的最后一个签到打卡编号
|
||||
*
|
||||
* @param date 指定日期
|
||||
* @return 返回最后一个签到打卡编号
|
||||
*/
|
||||
String getLastQueueNumber(@Param("date") Date date, @Param("port_area_id") String port_area_id);
|
||||
|
||||
/**
|
||||
* 查询指定司机某一天(指定日期)的打卡记录
|
||||
*
|
||||
* @param date 指定日期
|
||||
* @param users_id 用户id
|
||||
* @return 返回打卡记录
|
||||
*/
|
||||
List<PunchClock> getPunchClockForDate(@Param("date") String date, @Param("users_id") String users_id);
|
||||
|
||||
/**
|
||||
* 查询指定司机某年某月的打卡记录
|
||||
*
|
||||
* @param users_id 用户id
|
||||
* @return 返回打卡记录
|
||||
*/
|
||||
List<PunchClock> getPunchClockForYM(@Param("users_id") String users_id, @Param("year") Integer year, @Param("month") Integer month);
|
||||
|
||||
/**
|
||||
* 获取指定预约的签到打卡排队序号
|
||||
*
|
||||
* @param appointment_id 预约id
|
||||
* @return 返回指定预约的签到打卡排队序号
|
||||
*/
|
||||
String getQueueNumberForIdDate(@Param("appointment_id") String appointment_id);
|
||||
|
||||
/**
|
||||
* 获取当前排队前面还剩多少车辆未进港
|
||||
*
|
||||
* @param approach_date 进场日期
|
||||
* @param port_area_id 港区id
|
||||
* @param queue_number 排队号
|
||||
* @return 返回前排队前面还剩多少车辆未进港的数量
|
||||
*/
|
||||
Integer getNumberBeforeMe(@Param("approach_date") String approach_date, @Param("port_area_id") String port_area_id, @Param("queue_number") String queue_number);
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package com.haitongauto.mapper.client;
|
||||
|
||||
import com.haitongauto.models.pojo.Truck;
|
||||
import com.haitongauto.models.pojo.TruckManagement;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface TruckExtendMapper{
|
||||
/**
|
||||
* 根据用户Id查车牌号
|
||||
* @param users_id 用户id
|
||||
* @return 返回车牌号
|
||||
*/
|
||||
String getTruckNumberForUid(@Param("users_id") String users_id);
|
||||
|
||||
/**
|
||||
* 获取指定用户的板车信息
|
||||
* @param users_id 用户id
|
||||
* @return 返回指定用户的板车信息
|
||||
*/
|
||||
List<Truck> getPalletTruckForUsers(@Param("users_id") String users_id);
|
||||
|
||||
/**
|
||||
* 根据车牌号查车辆信息
|
||||
* @param truck_number 车牌号
|
||||
* @return 返回车辆信息
|
||||
*/
|
||||
Truck getPalletTruckForNumber(@Param("truck_number") String truck_number);
|
||||
|
||||
/**
|
||||
* 将指定用户的板车状态全部置为0,除非被列入黑名单的车辆
|
||||
* @param users_id 用户id
|
||||
* @return 返回执行结果
|
||||
*/
|
||||
Integer setTruckSateToGeneral(@Param("users_id") String users_id);
|
||||
|
||||
/**
|
||||
* 我的车辆黑名单信息 truck_management
|
||||
* @param users_id 用户id
|
||||
* @return 返回我的车辆黑名单信息
|
||||
*/
|
||||
List<TruckManagement> getMyTruckManagement(@Param("users_id") String users_id);
|
||||
|
||||
/**
|
||||
* 根据车牌号查用户信息
|
||||
* @param truck_number 车牌号
|
||||
* @return 返回用户信息
|
||||
*/
|
||||
//
|
||||
String getUidByTruckNo(String truck_number);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.haitongauto.mapper.admin.AnnouncementAdminMapper">
|
||||
<!--获取发布人员(作者)去重列表-->
|
||||
<select id="getAuthorList" resultType="String">
|
||||
select
|
||||
distinct author
|
||||
from applet_announcement
|
||||
where is_del=0
|
||||
</select>
|
||||
|
||||
<!--根据特定条件查询历史公告:(tilKeywords, dateStart,dateEnd,sort,author);-->
|
||||
<select id="AnnouncementListForCondition" resultType="com.haitongauto.models.pojo.Announcement">
|
||||
select
|
||||
id,
|
||||
title,
|
||||
abstracts,
|
||||
sort,
|
||||
announcement,
|
||||
announcement_text,
|
||||
author,
|
||||
reading_volume,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
from applet_announcement
|
||||
where is_del=0
|
||||
<if test="tilKeywords!=null and tilKeywords != ''">
|
||||
and title like concat('%',#{tilKeywords},'%')
|
||||
</if>
|
||||
<if test="dateStart!=null and dateStart!=null">
|
||||
and create_time >= #{dateStart}::timesTamp
|
||||
</if>
|
||||
<if test="dateEnd!=null and dateEnd!=null">
|
||||
and create_time <= #{dateEnd}::timesTamp
|
||||
</if>
|
||||
<if test="sort!=null">
|
||||
and sort =#{sort}
|
||||
</if>
|
||||
<if test="list!=null">
|
||||
and author in
|
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!--根据特定条件查询历史公告:(tilKeywords, dateStart,dateEnd,sort,author);-->
|
||||
<select id="AnnouncementListForWeek" resultType="com.haitongauto.models.pojo.Announcement">
|
||||
select
|
||||
*
|
||||
from applet_announcement
|
||||
where is_del=0
|
||||
and create_time >= now() - interval '1 week'
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,112 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.haitongauto.mapper.admin.AppointmentAdminMapper">
|
||||
<!--预约条件查询-->
|
||||
<select id="AppointmentListForCondition" resultType="com.haitongauto.models.pojo.Appointment">
|
||||
select
|
||||
applet_appointment.id,
|
||||
applet_appointment.users_id,
|
||||
transport_type,
|
||||
truck_number,
|
||||
applet_appointment.tel_number,
|
||||
vehicle_weight,
|
||||
vehicle_frame_weight,
|
||||
driving_license,
|
||||
approach_date,
|
||||
port_area_id,
|
||||
enter_type,
|
||||
goods_type,
|
||||
goods_Quantity,
|
||||
biz_type,
|
||||
appointment_state,
|
||||
cancel_time,
|
||||
applet_appointment.create_time,
|
||||
applet_appointment.update_time,
|
||||
applet_appointment.appointment_type,
|
||||
applet_appointment.is_del,
|
||||
yard,
|
||||
gate_canal_in,
|
||||
gate_canal_out,
|
||||
gate_canal_in_time,
|
||||
gate_canal_out_time,
|
||||
instruct_state,
|
||||
send_time,
|
||||
sender,
|
||||
check_in_time,
|
||||
check_over_time
|
||||
from applet_appointment join applet_users on applet_appointment.users_id=applet_users.id
|
||||
where applet_appointment.is_del=0
|
||||
<if test="users_id!=null and users_id!=''">
|
||||
and applet_appointment.users_id=#{users_id}
|
||||
</if>
|
||||
<if test="port_area_id!=null and port_area_id!=''" >
|
||||
and port_area_id=#{port_area_id}
|
||||
</if>
|
||||
<if test="keywords!=null and keywords!=''">
|
||||
and (applet_users.users_name like concat('%',#{keywords},'%') or truck_number like concat('%',#{keywords},'%') or applet_appointment.tel_number like concat('%',#{keywords},'%'))
|
||||
</if>
|
||||
|
||||
<if test="start_date!=null and start_date!=''">
|
||||
and approach_date >= #{start_date}::date
|
||||
</if>
|
||||
<if test="end_date!=null and end_date!=''">
|
||||
and approach_date <= #{end_date}::date
|
||||
</if>
|
||||
<if test="start_date!=null and start_date!=''">
|
||||
and approach_date >= #{start_date}::date
|
||||
</if>
|
||||
<if test="end_date!=null and end_date!=''">
|
||||
and approach_date <= #{end_date}::date
|
||||
</if>
|
||||
<if test="enter_type!=null and enter_type!=''">
|
||||
and enter_type=#{enter_type}
|
||||
</if>
|
||||
<if test="appointment_state==0">
|
||||
and appointment_state = 4
|
||||
</if>
|
||||
<if test="appointment_state==1">
|
||||
and appointment_state <>4 and appointment_state<>9
|
||||
</if>
|
||||
<if test="transport_type!=null and transport_type!=''">
|
||||
and transport_type=#{transport_type}
|
||||
</if>
|
||||
order by applet_appointment.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="AppointmentListExportyByIds" resultType="com.haitongauto.models.pojo.Appointment">
|
||||
select *
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
<if test="list!=null">
|
||||
and id in
|
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!--获取指定预约的货物明细-->
|
||||
<select id="appointmentGoodsDetail" resultType="com.haitongauto.models.pojo.AppointmentDetail">
|
||||
select
|
||||
id,
|
||||
appointment_id,
|
||||
ship_id,
|
||||
ship_name,
|
||||
voy_number,
|
||||
destination_port,
|
||||
destination_port_id,
|
||||
brand_id,
|
||||
brand_name,
|
||||
vin,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
from applet_appointment_detail
|
||||
where is_del=0 and appointment_id=#{appointment_id}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.haitongauto.mapper.admin.FeedbackAdminMapper">
|
||||
<!---->
|
||||
<select id="feedbackListForCondition" resultType="com.haitongauto.models.pojo.Feedback">
|
||||
select
|
||||
id,
|
||||
users_id,
|
||||
nike_name,
|
||||
feedback_info,
|
||||
pictures,
|
||||
tel_number,
|
||||
contact_info,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
from applet_feedback
|
||||
where is_del=0
|
||||
<if test="users_id!=null and users_id!=''">
|
||||
and users_id =#{users_id}
|
||||
</if>
|
||||
<if test="linkTel!=null and linkTel!=''">
|
||||
and (tel_number like concat('%',#{linkTel},'%') or contact_info like concat('%',#{linkTel},'%'))
|
||||
</if>
|
||||
<if test="nikeName!=null and nikeName!=''">
|
||||
and nike_name like concat('%',#{nikeName},'%')
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.haitongauto.mapper.admin.NoviceIntroductionAdminMapper">
|
||||
<!--根据分类sort获取操作说明: sort-->
|
||||
<select id="getNoviceIntroductionBySort" resultType="com.haitongauto.models.pojo.NoviceIntroduction">
|
||||
select
|
||||
id,
|
||||
sort,
|
||||
title,
|
||||
content,
|
||||
sequence_number,
|
||||
create_time
|
||||
from applet_novice_introduction
|
||||
where is_del=0 and sort=#{sort}
|
||||
order by create_time desc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,72 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.haitongauto.mapper.admin.PunchClockAdminMapper">
|
||||
<!--打卡条件查询-->
|
||||
<select id="PunchClockListForCondition" resultType="com.haitongauto.models.pojo.PunchClock">
|
||||
select
|
||||
applet_punch_clock.id,
|
||||
applet_punch_clock.users_id,
|
||||
appointment_id,
|
||||
applet_punch_clock.biz_type,
|
||||
queue_number,
|
||||
start_time,
|
||||
over_time,
|
||||
applet_punch_clock.port_area_id,
|
||||
punch_address,
|
||||
over_address,
|
||||
punch_clock_type,
|
||||
punch_clock_poi,
|
||||
applet_punch_clock.create_time,
|
||||
applet_punch_clock.update_time,
|
||||
applet_punch_clock.is_del
|
||||
from applet_punch_clock
|
||||
join applet_appointment on applet_punch_clock.appointment_id=applet_appointment.id
|
||||
join applet_users on applet_punch_clock.users_id=applet_users.id
|
||||
join applet_truck on applet_punch_clock.users_id=applet_truck.users_id
|
||||
where applet_punch_clock.is_del=0
|
||||
<if test="users_id!=null and users_id!=''">
|
||||
and applet_punch_clock.users_id=#{users_id}
|
||||
</if>
|
||||
<if test="port_area_id!=null and port_area_id!=''">
|
||||
and port_area_id=#{port_area_id}
|
||||
</if>
|
||||
<if test="biz_type!=null and biz_type!=''">
|
||||
and biz_type=#{biz_type}
|
||||
</if>
|
||||
<if test="keywords!=null and keywords!=''">
|
||||
and (applet_users.users_name like concat('%',#{keywords},'%') or applet_truck.truck_number like concat('%',#{keywords},'%') or applet_users.tel_number like concat('%',#{keywords},'%'))
|
||||
</if>
|
||||
<if test="approach_date!=null and approach_date!=''">
|
||||
and to_char(applet_appointment.approach_date,'yyyy-mm-dd')=#{approach_date}
|
||||
</if>
|
||||
<if test="sign_in_state==0">
|
||||
and ISNULL(punch_clock_type)
|
||||
</if>
|
||||
<if test="sign_in_state==1">
|
||||
and punch_clock_type >= 1
|
||||
</if>
|
||||
<if test="punch_state==0">
|
||||
and punch_clock_type<4
|
||||
</if>
|
||||
<if test="punch_state==1">
|
||||
and (punch_clock_type=4 or punch_clock_type=5)
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="getPunchClockListExportByIds" resultType="com.haitongauto.models.pojo.PunchClock">
|
||||
select *
|
||||
from applet_punch_clock
|
||||
where is_del=0
|
||||
<if test="list!=null">
|
||||
and id in
|
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,340 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.haitongauto.mapper.admin.StatisticsAdminMapper">
|
||||
<!--已预约车辆数 -->
|
||||
<select id="getAppointmentedCount" resultType="Integer">
|
||||
select
|
||||
count(*) as count
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and appointment_state=1
|
||||
<if test="start_time!=null and start_time!=''">
|
||||
and applet_appointment.create_time >= #{start_time}::date
|
||||
</if>
|
||||
<if test="end_time!=null and end_time!=''">
|
||||
and applet_appointment.create_time <= #{end_time}::date
|
||||
</if>
|
||||
<if test=" port_area_id!=null and port_area_id!=''">
|
||||
and port_area_id = #{port_area_id}
|
||||
</if>
|
||||
</select>
|
||||
<!--取消约车辆数 -->
|
||||
<select id="getAppointmentCancelCount" resultType="Integer">
|
||||
select
|
||||
count(*) as count
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and appointment_state=4
|
||||
<if test="start_time!=null and start_time!=''">
|
||||
and create_time >= #{start_time}::date
|
||||
</if>
|
||||
<if test="end_time!=null and end_time!=''">
|
||||
and create_time <= #{end_time}::date
|
||||
</if>
|
||||
<if test=" port_area_id!=null and port_area_id!=''">
|
||||
and port_area_id = #{port_area_id}
|
||||
</if>
|
||||
</select>
|
||||
<!--已签到车辆数 -->
|
||||
<select id="getAppointmentSignInCount" resultType="Integer">
|
||||
select
|
||||
count(*) as count
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and appointment_state=2
|
||||
<if test="start_time!=null and start_time!=''">
|
||||
and create_time >= #{start_time}::date
|
||||
</if>
|
||||
<if test="end_time!=null and end_time!=''">
|
||||
and create_time <= #{end_time}::date
|
||||
</if>
|
||||
<if test=" port_area_id!=null and port_area_id!=''">
|
||||
and port_area_id = #{port_area_id}
|
||||
</if>
|
||||
</select>
|
||||
<!--完成打卡车辆数 -->
|
||||
<select id="getPunchClockOverCount" resultType="Integer">
|
||||
select
|
||||
count(*) as count
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and appointment_state <> 4
|
||||
and appointment_state <> 9
|
||||
and appointment_state >=6
|
||||
<if test="start_time!=null and start_time!=''">
|
||||
and create_time >= #{start_time}::date
|
||||
</if>
|
||||
<if test="end_time!=null and end_time!=''">
|
||||
and create_time <= #{end_time}::date
|
||||
</if>
|
||||
<if test=" port_area_id!=null and port_area_id!=''">
|
||||
and port_area_id = #{port_area_id}
|
||||
</if>
|
||||
</select>
|
||||
<!--已发送指令板车数-->
|
||||
<select id="getInstructHavaSendCount" resultType="Integer">
|
||||
select
|
||||
count(*) as count
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and instruct_state =1
|
||||
<if test="start_time!=null and start_time!=''">
|
||||
and create_time >= #{start_time}::date
|
||||
</if>
|
||||
<if test="end_time!=null and end_time!=''">
|
||||
and create_time <= #{end_time}::date
|
||||
</if>
|
||||
<if test=" port_area_id!=null and port_area_id!=''">
|
||||
and port_area_id = #{port_area_id}
|
||||
</if>
|
||||
</select>
|
||||
<!--外贸出口板车辆数 -->
|
||||
<select id="getForeignTradeExportsCount" resultType="Integer">
|
||||
select
|
||||
count(*) as count
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and appointment_state <> 4
|
||||
and appointment_state <> 9
|
||||
and enter_type ='WE'
|
||||
<if test="start_time!=null and start_time!=''">
|
||||
and create_time >= #{start_time}::date
|
||||
</if>
|
||||
<if test="end_time!=null and end_time!=''">
|
||||
and create_time <= #{end_time}::date
|
||||
</if>
|
||||
<if test=" port_area_id!=null and port_area_id!=''">
|
||||
and port_area_id = #{port_area_id}
|
||||
</if>
|
||||
</select>
|
||||
<!--外贸进口板车数 -->
|
||||
<select id="getForeignTradeImportsCount" resultType="Integer">
|
||||
select
|
||||
count(*) as count
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and appointment_state <> 4
|
||||
and appointment_state <> 9
|
||||
and enter_type ='WI'
|
||||
<if test="start_time!=null and start_time!=''">
|
||||
and create_time >= #{start_time}::date
|
||||
</if>
|
||||
<if test="end_time!=null and end_time!=''">
|
||||
and create_time <= #{end_time}::date
|
||||
</if>
|
||||
<if test=" port_area_id!=null and port_area_id!=''">
|
||||
and port_area_id = #{port_area_id}
|
||||
</if>
|
||||
</select>
|
||||
<!--内贸出口板车数 -->
|
||||
<select id="getDomesticTradeExportCount" resultType="Integer">
|
||||
select
|
||||
count(*) as count
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and appointment_state <> 4
|
||||
and appointment_state <> 9
|
||||
and enter_type ='NE'
|
||||
<if test="start_time!=null and start_time!=''">
|
||||
and create_time >= #{start_time}::date
|
||||
</if>
|
||||
<if test="end_time!=null and end_time!=''">
|
||||
and create_time <= #{end_time}::date
|
||||
</if>
|
||||
<if test=" port_area_id!=null and port_area_id!=''">
|
||||
and port_area_id = #{port_area_id}
|
||||
</if>
|
||||
</select>
|
||||
<!--内贸进口板车数 -->
|
||||
<select id="getDomesticImportsExportCount" resultType="Integer">
|
||||
select
|
||||
count(*) as count
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and appointment_state <> 4
|
||||
and appointment_state <> 9
|
||||
and enter_type ='NI'
|
||||
<if test="start_time!=null and start_time!=''">
|
||||
and create_time >= #{start_time}::date
|
||||
</if>
|
||||
<if test="end_time!=null and end_time!=''">
|
||||
and create_time <= #{end_time}::date
|
||||
</if>
|
||||
<if test=" port_area_id!=null and port_area_id!=''">
|
||||
and port_area_id = #{port_area_id}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--某进道口的辆数 -->
|
||||
<select id="getInGateCanalCodeCount" resultType="Integer">
|
||||
select
|
||||
count(*) as count
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and gate_canal_in =#{gate_canal_in}
|
||||
<if test="start_time!=null and start_time!=''">
|
||||
and create_time >= #{start_time}::date
|
||||
</if>
|
||||
<if test="end_time!=null and end_time!=''">
|
||||
and create_time <= #{end_time}::date
|
||||
</if>
|
||||
<if test=" port_area_id!=null and port_area_id!=''">
|
||||
and port_area_id = #{port_area_id}
|
||||
</if>
|
||||
</select>
|
||||
<!--某出道口的辆数 -->
|
||||
<select id="getOutGateCanalCodeCount" resultType="Integer">
|
||||
select
|
||||
count(*) as count
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and gate_canal_out =#{gate_canal_out}
|
||||
<if test="start_time!=null and start_time!=''">
|
||||
and create_time >= #{start_time}::date
|
||||
</if>
|
||||
<if test="end_time!=null and end_time!=''">
|
||||
and create_time <= #{end_time}::date
|
||||
</if>
|
||||
<if test=" port_area_id!=null and port_area_id!=''">
|
||||
and port_area_id = #{port_area_id}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--自动进闸口板车数 -->
|
||||
<select id="getConventionalityInGateCount" resultType="Integer">
|
||||
select
|
||||
count(*) as count
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and is_conventionality_in =0
|
||||
<if test="start_time!=null and start_time!=''">
|
||||
and create_time >= #{start_time}::date
|
||||
</if>
|
||||
<if test="end_time!=null and end_time!=''">
|
||||
and create_time <= #{end_time}::date
|
||||
</if>
|
||||
<if test=" port_area_id!=null and port_area_id!=''">
|
||||
and port_area_id = #{port_area_id}
|
||||
</if>
|
||||
</select>
|
||||
<!--人工抬杆进闸口板车数 -->
|
||||
<select id="getUnConventionalityInGateCount" resultType="Integer">
|
||||
select
|
||||
count(*) as count
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and is_conventionality_in =1
|
||||
<if test="start_time!=null and start_time!=''">
|
||||
and create_time >= #{start_time}::date
|
||||
</if>
|
||||
<if test="end_time!=null and end_time!=''">
|
||||
and create_time <= #{end_time}::date
|
||||
</if>
|
||||
<if test=" port_area_id!=null and port_area_id!=''">
|
||||
and port_area_id = #{port_area_id}
|
||||
</if>
|
||||
</select>
|
||||
<!--待进港通行板车数 (已签到未进港的)-->
|
||||
<select id="getWellInGateCount" resultType="Integer">
|
||||
select
|
||||
count(*) as count
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and appointment_state =2
|
||||
and appointment_state <> 4
|
||||
and appointment_state <> 9
|
||||
<if test="start_time!=null and start_time!=''">
|
||||
and create_time >= #{start_time}::date
|
||||
</if>
|
||||
<if test="end_time!=null and end_time!=''">
|
||||
and create_time <= #{end_time}::date
|
||||
</if>
|
||||
<if test=" port_area_id!=null and port_area_id!=''">
|
||||
and port_area_id = #{port_area_id}
|
||||
</if>
|
||||
</select>
|
||||
<!--已进港板车数 (已进港但未完成-离港的)-->
|
||||
<select id="getHaveInGateCount" resultType="Integer">
|
||||
select
|
||||
count(*) as count
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and appointment_state >=3
|
||||
and appointment_state <6
|
||||
and appointment_state <> 4
|
||||
and appointment_state <> 9
|
||||
<if test="start_time!=null and start_time!=''">
|
||||
and create_time >= #{start_time}::date
|
||||
</if>
|
||||
<if test="end_time!=null and end_time!=''">
|
||||
and create_time <= #{end_time}::date
|
||||
</if>
|
||||
<if test=" port_area_id!=null and port_area_id!=''">
|
||||
and port_area_id = #{port_area_id}
|
||||
</if>
|
||||
</select>
|
||||
<!--已离港板车数-->
|
||||
<select id="getHavaOutGateCount" resultType="Integer">
|
||||
select
|
||||
count(*) as count
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and appointment_state >=6
|
||||
and appointment_state <> 4
|
||||
and appointment_state <> 9
|
||||
<if test="start_time!=null and start_time!=''">
|
||||
and create_time >= #{start_time}::date
|
||||
</if>
|
||||
<if test="end_time!=null and end_time!=''">
|
||||
and create_time <= #{end_time}::date
|
||||
</if>
|
||||
<if test=" port_area_id!=null and port_area_id!=''">
|
||||
and port_area_id = #{port_area_id}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="AppointmentListForCondition" resultType="com.haitongauto.models.pojo.Appointment">
|
||||
select
|
||||
applet_appointment.id,
|
||||
users_id,
|
||||
transport_type,
|
||||
truck_number,
|
||||
applet_appointment.tel_number,
|
||||
head_frame_number,
|
||||
vehicle_weight,
|
||||
vehicle_frame_weight,
|
||||
driving_license,
|
||||
approach_date,
|
||||
port_area_id,
|
||||
pam_id,
|
||||
enter_type,
|
||||
goods_type,
|
||||
goods_Quantity,
|
||||
biz_type,
|
||||
appointment_state,
|
||||
applet_appointment.create_time,
|
||||
applet_appointment.update_time,
|
||||
applet_appointment.is_del,
|
||||
Yard,
|
||||
gate_canal_in,
|
||||
gate_canal_out,
|
||||
instruct_state,
|
||||
send_time,
|
||||
sender
|
||||
from applet_appointment join applet_users on applet_appointment.users_id=applet_users.id
|
||||
where applet_appointment.is_del=0
|
||||
<if test="pam_id!=null and pam_id!=''" >and pam_id=#{pam_id}</if>
|
||||
<if test="keywords!=null and keywords!=''">and (applet_users.users_name like concat('%',#{keywords},'%') or truck_number like concat('%',#{keywords},'%') or applet_appointment.tel_number like concat('%',#{keywords},'%'))</if>
|
||||
<if test="start_date!=null and start_date!='' and end_date!=null and end_date!=''">and approach_date >= #{start_date}::date and approach_date <= #{end_date}::date</if>
|
||||
<if test="enter_type!=null and enter_type!=''">and enter_type=#{enter_type}</if>
|
||||
<if test="appointment_state==0">and appointment_state = 4</if>
|
||||
<if test="appointment_state==1">and appointment_state <>4 and appointment_state<>9</if>
|
||||
<if test="transport_type!=null and transport_type!=''">and transport_type=#{transport_type}</if>
|
||||
order by applet_appointment.create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.haitongauto.mapper.admin.UsersAdminMapper">
|
||||
<!--根据用户ID、手机号、昵称、注册时间和用户状态查询小程序注册用户信息: keywords, registerDate,usersState-->
|
||||
<select id="usersListForCondition" resultType="com.haitongauto.models.pojo.Users">
|
||||
select
|
||||
id,
|
||||
access_token,
|
||||
access_token_rtos,
|
||||
users_name,
|
||||
wx_openid,
|
||||
wx_unionid,
|
||||
wx_nick,
|
||||
wx_sex,
|
||||
wx_head_sculpture,
|
||||
tel_number,
|
||||
id_code,
|
||||
users_state,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
from applet_users
|
||||
where is_del=0
|
||||
<if test="keywords!=null and keywords!=''" >
|
||||
and (id_code like concat('%',#{keywords},'%') or tel_number like concat('%',#{keywords},'%') or wx_nick like concat('%',#{keywords},'%') or users_name like concat('%',#{keywords},'%'))
|
||||
</if>
|
||||
<if test="registerDate!=null and registerDate!=''">
|
||||
and to_char(create_time,'yyyy-mm-dd')=#{registerDate}
|
||||
</if>
|
||||
<if test="usersState!=null and usersState!=''">and users_state=#{usersState}</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,134 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.haitongauto.mapper.base.AnnouncementMapper">
|
||||
<!--添加数据-->
|
||||
<select id="insert" parameterType="com.haitongauto.models.pojo.Announcement" resultType="String">
|
||||
insert into applet_announcement
|
||||
(
|
||||
id,
|
||||
sort,
|
||||
title,
|
||||
abstracts,
|
||||
announcement,
|
||||
announcement_text,
|
||||
author,
|
||||
reading_volume,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
)
|
||||
values
|
||||
(
|
||||
#{id},
|
||||
#{sort},
|
||||
#{title},
|
||||
#{abstracts},
|
||||
#{announcement},
|
||||
#{announcement_text},
|
||||
#{author},
|
||||
#{reading_volume},
|
||||
current_timestamp,
|
||||
current_timestamp,
|
||||
0
|
||||
)
|
||||
returning id
|
||||
</select>
|
||||
<!--软删除-->
|
||||
<update id="logicDel" parameterType="String">
|
||||
update applet_announcement set is_del=1 where id=#{id}
|
||||
</update>
|
||||
<!--硬删除-->
|
||||
<delete id="delete" parameterType="String">
|
||||
delete from applet_announcement where id=#{id}
|
||||
</delete>
|
||||
<!--数据更新-->
|
||||
<update id="update" parameterType="com.haitongauto.models.pojo.Announcement">
|
||||
update applet_announcement
|
||||
<set>
|
||||
<if test="id != null and id != ''">
|
||||
id = #{id},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort = #{sort},
|
||||
</if>
|
||||
<if test="title != null and title != ''">
|
||||
title = #{title},
|
||||
</if>
|
||||
<if test="abstracts != null and abstracts != ''">
|
||||
abstracts = #{abstracts},
|
||||
</if>
|
||||
<if test="announcement != null and announcement != ''">
|
||||
announcement = #{announcement},
|
||||
</if>
|
||||
<if test="announcement_text != null and announcement_text != ''">
|
||||
announcement_text = #{announcement_text},
|
||||
</if>
|
||||
<if test="author != null and author != ''">
|
||||
author = #{author},
|
||||
</if>
|
||||
<if test="reading_volume != null">
|
||||
reading_volume = #{reading_volume},
|
||||
</if>
|
||||
<if test="create_time != null and create_time != ''">
|
||||
create_time = #{create_time}::timestamp,
|
||||
</if>
|
||||
<if test="is_del != null">
|
||||
is_del = #{is_del},
|
||||
</if>
|
||||
update_time = current_timestamp
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!--指定Id的记录-->
|
||||
<select id="getById" parameterType="String" resultType="com.haitongauto.models.pojo.Announcement">
|
||||
select
|
||||
id,
|
||||
sort,
|
||||
title,
|
||||
abstracts,
|
||||
announcement,
|
||||
announcement_text,
|
||||
author,
|
||||
reading_volume,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
from applet_announcement
|
||||
where id = #{id}
|
||||
</select>
|
||||
<!--数据列表-->
|
||||
<select id="getList" resultType="com.haitongauto.models.pojo.Announcement">
|
||||
select
|
||||
id,
|
||||
sort,
|
||||
title,
|
||||
abstracts,
|
||||
announcement,
|
||||
announcement_text,
|
||||
author,
|
||||
reading_volume,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
from applet_announcement
|
||||
where is_del=0
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="getListBySort" resultType="com.haitongauto.models.pojo.Announcement">
|
||||
select
|
||||
*
|
||||
from applet_announcement
|
||||
where is_del=0
|
||||
<if test="sort!=null ">
|
||||
and sort =#{sort}
|
||||
</if>
|
||||
<if test="keyWords!=null and keyWords!=''">
|
||||
and (title like concat('%',#{keyWords},'%') or announcement like concat('%',#{keyWords},'%'))
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,160 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.haitongauto.mapper.base.AppointmentDetailMapper">
|
||||
<!--添加数据-->
|
||||
<select id="insert" parameterType="com.haitongauto.models.pojo.AppointmentDetail" resultType="String">
|
||||
insert into applet_appointment_detail
|
||||
(
|
||||
id,
|
||||
appointment_id,
|
||||
ship_id,
|
||||
ship_name,
|
||||
voy_number,
|
||||
destination_port,
|
||||
destination_port_id,
|
||||
brand_id,
|
||||
brand_name,
|
||||
vin,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
)
|
||||
values
|
||||
(
|
||||
#{id},
|
||||
#{appointment_id},
|
||||
#{ship_id},
|
||||
#{ship_name},
|
||||
#{voy_number},
|
||||
#{destination_port},
|
||||
#{destination_port_id},
|
||||
#{brand_id},
|
||||
#{brand_name},
|
||||
#{vin},
|
||||
current_timestamp,
|
||||
current_timestamp,
|
||||
0
|
||||
)
|
||||
returning id
|
||||
</select>
|
||||
<!--逻辑删除-->
|
||||
<update id="logicDel" parameterType="String">
|
||||
update applet_appointment_detail set is_del=1 where id=#{id}
|
||||
</update>
|
||||
<!--彻底删除-->
|
||||
<delete id="delete" parameterType="String">
|
||||
delete from applet_appointment_detail
|
||||
where id=#{id}
|
||||
</delete>
|
||||
<!--数据更新-->
|
||||
<update id="update" parameterType="com.haitongauto.models.pojo.AppointmentDetail">
|
||||
update applet_appointment_detail
|
||||
<set>
|
||||
<if test="id != null and id != ''">
|
||||
id = #{id},
|
||||
</if>
|
||||
<if test="appointment_id != null and appointment_id != ''">
|
||||
appointment_id = #{appointment_id},
|
||||
</if>
|
||||
<if test="ship_id != null and ship_id != ''">
|
||||
ship_id = #{ship_id},
|
||||
</if>
|
||||
<if test="ship_name != null and ship_name != ''">
|
||||
ship_name = #{ship_name},
|
||||
</if>
|
||||
<if test="voy_number != null and voy_number != ''">
|
||||
voy_number = #{voy_number},
|
||||
</if>
|
||||
<if test="destination_port != null and destination_port != ''">
|
||||
destination_port = #{destination_port},
|
||||
</if>
|
||||
<if test="destination_port_id != null and destination_port_id != ''">
|
||||
destination_port_id = #{destination_port_id},
|
||||
</if>
|
||||
<if test="brand_id != null and brand_id != ''">
|
||||
brand_id = #{brand_id},
|
||||
</if>
|
||||
<if test="brand_name != null and brand_name != ''">
|
||||
brand_name = #{brand_name},
|
||||
</if>
|
||||
<if test="vin != null and vin != ''">
|
||||
vin = #{vin},
|
||||
</if>
|
||||
<if test="create_time != null and create_time != ''">
|
||||
create_time = #{create_time}::timestamp,
|
||||
</if>
|
||||
<if test="is_del != null">
|
||||
is_del = #{is_del},
|
||||
</if>
|
||||
update_time =current_timestamp
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!--指定Id的记录-->
|
||||
<select id="getById" parameterType="String" resultType="com.haitongauto.models.pojo.AppointmentDetail">
|
||||
select
|
||||
id,appointment_id,ship_id,ship_name,voy_number,destination_port,destination_port_id,brand_id,brand_name,vin,create_time,update_time,is_del
|
||||
from applet_appointment_detail
|
||||
where id = #{id}
|
||||
limit 1
|
||||
</select>
|
||||
<!--数据列表-->
|
||||
<select id="getList" resultType="com.haitongauto.models.pojo.AppointmentDetail">
|
||||
select
|
||||
id,appointment_id,ship_id,ship_name,voy_number,destination_port,destination_port_id,brand_id,brand_name,vin,create_time,update_time,is_del
|
||||
from applet_appointment_detail
|
||||
where is_del=0
|
||||
order by create_time desc
|
||||
</select>
|
||||
<!--指定appointment_id的记录-->
|
||||
<select id="getAppointmentDetailListByAppointmentId" parameterType="String" resultType="com.haitongauto.models.pojo.AppointmentDetail">
|
||||
select
|
||||
id,appointment_id,ship_id,ship_name,voy_number,destination_port,destination_port_id,brand_id,brand_name,vin,create_time,update_time,is_del
|
||||
from applet_appointment_detail
|
||||
where appointment_id = #{appointment_id}
|
||||
</select>
|
||||
<!--指定appointment_id的记录-->
|
||||
<select id="getAppointmentDetailByGoodVin" parameterType="String" resultType="com.haitongauto.models.pojo.AppointmentDetail">
|
||||
select
|
||||
id,appointment_id,ship_id,ship_name,voy_number,destination_port,destination_port_id,brand_id,brand_name,vin,create_time,update_time,is_del
|
||||
from applet_appointment_detail
|
||||
where vin = #{vin}
|
||||
limit 1
|
||||
</select>
|
||||
<select id="getAppointmentDetailByAppointmentIdList" resultType="com.haitongauto.models.pojo.AppointmentDetail">
|
||||
select
|
||||
id,appointment_id,ship_id,ship_name,voy_number,destination_port,destination_port_id,brand_id,brand_name,vin,create_time,update_time,is_del
|
||||
from applet_appointment_detail
|
||||
where is_del=0
|
||||
and appointment_id in
|
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<delete id="deleteAppointmentDetailByAppointmentId" parameterType="String">
|
||||
delete from applet_appointment_detail
|
||||
where appointment_id=#{appointment_id}
|
||||
</delete>
|
||||
<select id="getAppointmentDetailListByGoodVinList" resultType="String">
|
||||
select
|
||||
distinct vin
|
||||
from applet_appointment_detail
|
||||
where is_del=0
|
||||
and vin in
|
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="getAppointmentDetailListByVinList" resultType="com.haitongauto.models.pojo.AppointmentDetail">
|
||||
select
|
||||
id,appointment_id,ship_id,ship_name,voy_number,destination_port,destination_port_id,brand_id,brand_name,vin,create_time,update_time,is_del
|
||||
from applet_appointment_detail
|
||||
where is_del=0
|
||||
and vin in
|
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,346 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.haitongauto.mapper.base.AppointmentMapper">
|
||||
<!--添加数据-->
|
||||
<select id="insert" parameterType="com.haitongauto.models.pojo.Appointment" resultType="String">
|
||||
insert into
|
||||
applet_appointment
|
||||
(
|
||||
id,
|
||||
users_id,
|
||||
transport_type,
|
||||
truck_number,
|
||||
tel_number,
|
||||
id_code,
|
||||
truck_vin,
|
||||
vehicle_weight,
|
||||
vehicle_frame_weight,
|
||||
driving_license,
|
||||
approach_date,
|
||||
port_area_id,
|
||||
biz_type,
|
||||
enter_type,
|
||||
goods_type,
|
||||
goods_quantity,
|
||||
appointment_state,
|
||||
cancel_time,
|
||||
create_time,
|
||||
update_time,
|
||||
appointment_type,
|
||||
is_del,
|
||||
yard,
|
||||
gate_canal_in,
|
||||
gate_canal_out,
|
||||
instruct_state,
|
||||
sender,
|
||||
is_conventionality_in
|
||||
)
|
||||
values
|
||||
(
|
||||
#{id},
|
||||
#{users_id},
|
||||
#{transport_type},
|
||||
#{truck_number},
|
||||
#{tel_number},
|
||||
#{id_code},
|
||||
#{truck_vin},
|
||||
#{vehicle_weight},
|
||||
#{vehicle_frame_weight},
|
||||
#{driving_license},
|
||||
#{approach_date}::timestamp,
|
||||
#{port_area_id},
|
||||
#{biz_type},
|
||||
#{enter_type},
|
||||
#{goods_type},
|
||||
#{goods_quantity},
|
||||
#{appointment_state},
|
||||
#{cancel_time}::timestamp,
|
||||
current_timestamp,
|
||||
current_timestamp,
|
||||
#{appointment_type},
|
||||
#{is_del},
|
||||
#{yard},
|
||||
#{gate_canal_in},
|
||||
#{gate_canal_out},
|
||||
0,
|
||||
#{sender},
|
||||
#{is_conventionality_in}
|
||||
)
|
||||
returning id
|
||||
</select>
|
||||
<!--软删除-->
|
||||
<update id="logicDel" parameterType="String">
|
||||
update applet_appointment set is_del=1 where id=#{id}
|
||||
</update>
|
||||
<!--硬删除-->
|
||||
<delete id="delete" parameterType="String">
|
||||
delete from applet_appointment where id=#{id}
|
||||
</delete>
|
||||
<!--数据更新-->
|
||||
<update id="update" parameterType="com.haitongauto.models.pojo.Appointment">
|
||||
update applet_appointment
|
||||
<set>
|
||||
<if test="id != null and id != ''">
|
||||
id = #{id},
|
||||
</if>
|
||||
<if test="users_id != null and users_id != ''">
|
||||
users_id = #{users_id},
|
||||
</if>
|
||||
<if test="transport_type != null and transport_type != ''">
|
||||
transport_type = #{transport_type},
|
||||
</if>
|
||||
<if test="truck_number != null and truck_number != ''">
|
||||
truck_number = #{truck_number},
|
||||
</if>
|
||||
<if test="tel_number != null and tel_number != ''">
|
||||
tel_number = #{tel_number},
|
||||
</if>
|
||||
<if test="id_code != null and id_code != ''">
|
||||
id_code = #{id_code},
|
||||
</if>
|
||||
<if test="truck_vin != null and truck_vin != ''">
|
||||
truck_vin = #{truck_vin},
|
||||
</if>
|
||||
<if test="vehicle_weight != null">
|
||||
vehicle_weight = #{vehicle_weight},
|
||||
</if>
|
||||
<if test="vehicle_frame_weight != null">
|
||||
vehicle_frame_weight = #{vehicle_frame_weight},
|
||||
</if>
|
||||
<if test="driving_license != null and driving_license != ''">
|
||||
driving_license = #{driving_license},
|
||||
</if>
|
||||
<if test="approach_date != null and approach_date != ''">
|
||||
approach_date = #{approach_date}::date,
|
||||
</if>
|
||||
<if test="port_area_id != null and port_area_id != ''">
|
||||
port_area_id = #{port_area_id},
|
||||
</if>
|
||||
<if test="biz_type != null and biz_type != ''">
|
||||
biz_type = #{biz_type},
|
||||
</if>
|
||||
<if test="enter_type != null and enter_type != ''">
|
||||
enter_type = #{enter_type},
|
||||
</if>
|
||||
<if test="goods_type != null and goods_type != ''">
|
||||
goods_type = #{goods_type},
|
||||
</if>
|
||||
<if test="goods_quantity != null">
|
||||
goods_quantity = #{goods_quantity},
|
||||
</if>
|
||||
<if test="appointment_state != null">
|
||||
appointment_state = #{appointment_state},
|
||||
</if>
|
||||
<if test="cancel_time != null and cancel_time != ''">
|
||||
cancel_time = #{cancel_time}::timestamp,
|
||||
</if>
|
||||
<if test="create_time != null and create_time != ''">
|
||||
create_time = #{create_time}::timestamp,
|
||||
</if>
|
||||
<if test="appointment_type != null">
|
||||
appointment_type = #{appointment_type},
|
||||
</if>
|
||||
<if test="is_del != null">
|
||||
is_del = #{is_del},
|
||||
</if>
|
||||
<if test="yard!=null and yard!=''">
|
||||
yard = #{yard},
|
||||
</if>
|
||||
<if test="yard_name!=null and yard_name!=''">
|
||||
yard_name = #{yard_name},
|
||||
</if>
|
||||
<if test="gate_canal_in!=null and gate_canal_in!=''">
|
||||
gate_canal_in = #{gate_canal_in},
|
||||
</if>
|
||||
<if test="gate_canal_out!=null and gate_canal_out!=''">
|
||||
gate_canal_out = #{gate_canal_out},
|
||||
</if>
|
||||
<if test="gate_canal_in_time!=null and gate_canal_in_time!=''">
|
||||
gate_canal_in_time= #{gate_canal_in_time}::timestamp,
|
||||
</if>
|
||||
<if test="gate_canal_out_time!=null and gate_canal_out_time!=''">
|
||||
gate_canal_out_time=#{gate_canal_out_time}::timestamp,
|
||||
</if>
|
||||
<if test="instruct_state!=null">
|
||||
instruct_state = #{instruct_state},
|
||||
</if>
|
||||
<if test="send_time!=null and send_time!=''">
|
||||
send_time =# {send_time}::timestamp,
|
||||
</if>
|
||||
<if test="sender!=null and sender!=''">
|
||||
sender = #{sender},
|
||||
</if>
|
||||
<if test="check_in_time!=null and check_in_time!=''">
|
||||
check_in_time = #{check_in_time}::timestamp,
|
||||
</if>
|
||||
<if test="check_over_time!=null and check_over_time!=''">
|
||||
check_over_time = #{check_over_time}::timestamp,
|
||||
</if>
|
||||
<if test="plate_scan_time!=null and plate_scan_time!=''">
|
||||
plate_scan_time = #{plate_scan_time}::timestamp,
|
||||
</if>
|
||||
<if test="is_conventionality_in!=null">
|
||||
is_conventionality_in = #{is_conventionality_in},
|
||||
</if>
|
||||
update_time = current_timestamp
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!--指定Id的记录-->
|
||||
<select id="getById" parameterType="String" resultType="com.haitongauto.models.pojo.Appointment">
|
||||
select *
|
||||
from applet_appointment
|
||||
where id = #{id}
|
||||
and is_del=0
|
||||
limit 1
|
||||
</select>
|
||||
<!--数据列表-->
|
||||
<select id="getList" resultType="com.haitongauto.models.pojo.Appointment">
|
||||
select *
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!--根据拖车号数据列表 预约打卡状态(1-已预约,2-已签到,3-已进港,5-操作中,6-已完成,7-已离港,4-已取消,9-异常:预期未完成操作的)-->
|
||||
<select id="getListByTruckName" resultType="com.haitongauto.models.pojo.Appointment">
|
||||
select *
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and (truck_number=#{truck_number} or id_code=#{truck_number})
|
||||
and appointment_state!=4
|
||||
and appointment_state!=6
|
||||
and appointment_state!=7
|
||||
and appointment_state!=9
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!--根据拖车号数据列表 预约打卡状态(1-已预约,2-已签到,3-已进港,5-操作中,6-已完成,7-已离港,4-已取消,9-异常:预期未完成操作的)-->
|
||||
<select id="getAppointmentByUserIdAndPortAreaIdAndApproachDate"
|
||||
resultType="com.haitongauto.models.pojo.Appointment">
|
||||
select *
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and users_id=#{users_id}
|
||||
and port_area_id=#{port_area_id}
|
||||
and approach_date >= #{approach_date}::date
|
||||
and appointment_state < 7
|
||||
and appointment_state != 4
|
||||
order by create_time desc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<!--根据拖车号数据列表 预约打卡状态(1-已预约,2-已签到,3-已进港,5-操作中,6-已完成,7-已离港,4-已取消,9-异常:预期未完成操作的)-->
|
||||
<select id="getAppointmentListByCondition" resultType="com.haitongauto.models.pojo.Appointment">
|
||||
select *
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
<if test="truck_number!=null and truck_number!=''">
|
||||
and truck_number=#{truck_number}
|
||||
</if>
|
||||
<if test="ship_id!=null and ship_id!=''">
|
||||
and id in (select distinct appointment_id from applet_appointment_detail where ship_id= #{ship_id})
|
||||
</if>
|
||||
<if test="instruct_state!=null and instruct_state!=''">
|
||||
and instruct_state=#{instruct_state}
|
||||
</if>
|
||||
<!-- <if test="brand_name!=null and brand_name!=''">-->
|
||||
<!-- and id in (select distinct appointment_id from applet_appointment_detail where brand_name= #{brand_name})-->
|
||||
<!-- </if>-->
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="getAppointmentByIds" resultType="com.haitongauto.models.pojo.Appointment">
|
||||
select *
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and id in
|
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!--根据拖车号数据列表 预约打卡状态(1-已预约,2-已签到,3-已进港,5-操作中,6-已完成,7-已离港,4-已取消,9-异常:预期未完成操作的)-->
|
||||
<select id="getAppointmentByTruckName" resultType="com.haitongauto.models.pojo.Appointment">
|
||||
select *
|
||||
from applet_appointment
|
||||
where is_del=0
|
||||
and (truck_number=#{truck_number} or id_code=#{truck_number})
|
||||
order by create_time desc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<!--修改预约指令状态-->
|
||||
<update id="batchUpdateAppointmentInstructState" parameterType="java.util.List">
|
||||
<foreach collection="list" item="item" open="" close="" separator=";">
|
||||
update applet_appointment
|
||||
<set>
|
||||
<if test="item.id!=null and item.id!=''">
|
||||
id = #{item.id},
|
||||
</if>
|
||||
<if test="item.yard!=null and item.yard!=''">
|
||||
yard = #{item.yard},
|
||||
</if>
|
||||
<if test="item.sender!=null and item.sender!=''">
|
||||
sender = #{item.sender},
|
||||
</if>
|
||||
<if test="item.yard_name!=null and item.yard_name!=''">
|
||||
yard_name = #{item.yard_name},
|
||||
</if>
|
||||
<if test="item.gate_canal_in!=null and item.gate_canal_in!=''">
|
||||
gate_canal_in = #{item.gate_canal_in},
|
||||
</if>
|
||||
<if test="item.instruct_state!=null">
|
||||
instruct_state = #{item.instruct_state},
|
||||
</if>
|
||||
send_time =current_timestamp,
|
||||
update_time = current_timestamp
|
||||
</set>
|
||||
where id = #{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!--修改预约指令状态-->
|
||||
<update id="updateAppointmentPlateScanTime">
|
||||
update applet_appointment
|
||||
<set>
|
||||
plate_scan_time = current_timestamp
|
||||
</set>
|
||||
where id = #{appointment_id}
|
||||
</update>
|
||||
|
||||
<!--板车监控-->
|
||||
<select id="getAppointmentListByConditionf" resultType="com.haitongauto.models.pojo.Appointment">
|
||||
select applet_appointment.*
|
||||
from applet_appointment
|
||||
where applet_appointment.is_del=0
|
||||
and applet_appointment.appointment_state != 4
|
||||
and applet_appointment.create_time >= #{startDate}
|
||||
and applet_appointment.create_time <= #{endDate}
|
||||
and applet_appointment.port_area_id= #{portAreaId}
|
||||
<if test="truckNumber!=null and truckNumber!=''">
|
||||
and applet_appointment.truck_number like concat('%',#{truckNumber},'%')
|
||||
</if>
|
||||
<if test="instructState!=null">
|
||||
and applet_appointment.instruct_state= #{instructState}
|
||||
</if>
|
||||
<if test="shipId!=null and shipId!=''">
|
||||
and applet_appointment.id in (select appointment_id from applet_appointment_detail where ship_id =#{shipId})
|
||||
</if>
|
||||
<if test="brandId!=null and brandId!=''">
|
||||
and applet_appointment.id in (select appointment_id from applet_appointment_detail where brand_id =#{brandId})
|
||||
</if>
|
||||
order by applet_appointment.create_time desc
|
||||
</select>
|
||||
|
||||
<!--数据列表-->
|
||||
<select id="getIdListNoInEn" resultType="String">
|
||||
select id from applet_appointment
|
||||
where is_del=0 and (appointment_state=4 or appointment_state=9)
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.haitongauto.mapper.base.DepartureDetailMapper">
|
||||
<!--添加-->
|
||||
<select id="insert" parameterType="com.haitongauto.models.pojo.DepartureDetail" resultType="String">
|
||||
insert into applet_departure_detail
|
||||
(
|
||||
id,
|
||||
applet_departure_vehicle_id,
|
||||
receiving_unit,ship_name,
|
||||
voy_number,
|
||||
customs_clearance_nature,
|
||||
lading_no,
|
||||
customs_declaration_no,
|
||||
cargo_name,
|
||||
cargo_quantity,
|
||||
remarks,
|
||||
vin_list,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del)
|
||||
values
|
||||
(
|
||||
#{id},
|
||||
#{applet_departure_vehicle_id},
|
||||
#{receiving_unit},#{ship_name},
|
||||
#{voy_number},
|
||||
#{customs_clearance_nature},
|
||||
#{lading_no},
|
||||
#{customs_declaration_no},
|
||||
#{cargo_name},
|
||||
#{cargo_quantity},
|
||||
#{remarks},
|
||||
#{vin_list},
|
||||
current_timestamp,
|
||||
current_timestamp,
|
||||
0
|
||||
)
|
||||
returning id
|
||||
</select>
|
||||
<!--软删除-->
|
||||
<update id="logicDel" parameterType="String">
|
||||
update applet_departure_detail set is_del=1 where id=#{id}
|
||||
</update>
|
||||
<!--硬删除-->
|
||||
<delete id="delete" parameterType="String">
|
||||
delete from applet_departure_detail where id=#{id}
|
||||
</delete>
|
||||
<!--数据更新-->
|
||||
<update id="update" parameterType="com.haitongauto.models.pojo.DepartureDetail">
|
||||
update applet_departure_detail
|
||||
<set>
|
||||
<if test="id != null and id != ''">
|
||||
id = #{id},
|
||||
</if>
|
||||
<if test="applet_departure_vehicle_id != null and applet_departure_vehicle_id != ''">
|
||||
applet_departure_vehicle_id = #{applet_departure_vehicle_id},
|
||||
</if>
|
||||
<if test="receiving_unit != null and receiving_unit != ''">
|
||||
receiving_unit = #{receiving_unit},
|
||||
</if>
|
||||
<if test="ship_name != null and ship_name != ''">
|
||||
ship_name = #{ship_name},
|
||||
</if>
|
||||
<if test="voy_number != null and voy_number != ''">
|
||||
voy_number = #{voy_number},
|
||||
</if>
|
||||
<if test="customs_clearance_nature != null and customs_clearance_nature != ''">
|
||||
customs_clearance_nature = #{customs_clearance_nature},
|
||||
</if>
|
||||
<if test="lading_no != null and lading_no != ''">
|
||||
lading_no = #{lading_no},
|
||||
</if>
|
||||
<if test="customs_declaration_no != null and customs_declaration_no != ''">
|
||||
customs_declaration_no = #{customs_declaration_no},
|
||||
</if>
|
||||
<if test="cargo_name != null and cargo_name != ''">
|
||||
cargo_name = #{cargo_name},
|
||||
</if>
|
||||
<if test="cargo_quantity != null">
|
||||
cargo_quantity = #{cargo_quantity},
|
||||
</if>
|
||||
<if test="remarks != null and remarks != ''">
|
||||
remarks = #{remarks},
|
||||
</if>
|
||||
<if test="vin_list != null and vin_list != ''">
|
||||
vin_list = #{vin_list},
|
||||
</if>
|
||||
<if test="create_time != null and create_time != ''">
|
||||
create_time = #{create_time}::timestamp,
|
||||
</if>
|
||||
<if test="is_del != null">
|
||||
is_del = #{is_del},
|
||||
</if>
|
||||
update_time = current_timestamp
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!--指定Id的记录-->
|
||||
<select id="getById" parameterType="String" resultType="com.haitongauto.models.pojo.DepartureDetail">
|
||||
select
|
||||
id,applet_departure_vehicle_id,receiving_unit,ship_name,voy_number,customs_clearance_nature,lading_no,customs_declaration_no,cargo_name,cargo_quantity,remarks,vin_list,create_time,update_time,is_del
|
||||
from applet_departure_detail
|
||||
where id=#{id}
|
||||
and is_del=0
|
||||
</select>
|
||||
<!--数据列表-->
|
||||
<select id="getList" resultType="com.haitongauto.models.pojo.DepartureDetail">
|
||||
select
|
||||
id,applet_departure_vehicle_id,receiving_unit,ship_name,voy_number,customs_clearance_nature,lading_no,customs_declaration_no,cargo_name,cargo_quantity,remarks,vin_list,create_time,update_time,is_del
|
||||
from applet_departure_detail
|
||||
where is_del=0
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,175 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.haitongauto.mapper.base.DepartureVehicleMapper">
|
||||
<!--添加-->
|
||||
<select id="insert" parameterType="com.haitongauto.models.pojo.DepartureVehicle" resultType="String">
|
||||
insert into applet_departure_vehicle
|
||||
(
|
||||
id,
|
||||
voucher_number,
|
||||
users_id,users_name,
|
||||
tel_number,operators,
|
||||
phone_number,
|
||||
truck_number,
|
||||
trade_type,
|
||||
cargo_type,
|
||||
cargo_quantity,
|
||||
delivery_time,
|
||||
checker,
|
||||
check_status,
|
||||
check_time,
|
||||
remarks,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
)
|
||||
values
|
||||
(
|
||||
#{id},
|
||||
#{voucher_number},
|
||||
#{users_id},
|
||||
#{users_name},
|
||||
#{tel_number},
|
||||
#{operators},
|
||||
#{phone_number},
|
||||
#{truck_number},
|
||||
#{trade_type},
|
||||
#{cargo_type},
|
||||
#{cargo_quantity},
|
||||
#{delivery_time}::timestamp,
|
||||
#{checker},
|
||||
#{check_status},
|
||||
#{check_time}::timestamp,
|
||||
#{remarks},
|
||||
current_timestamp,
|
||||
current_timestamp,
|
||||
0
|
||||
)
|
||||
returning id
|
||||
</select>
|
||||
<!--软删除-->
|
||||
<update id="logicDel" parameterType="String">
|
||||
update applet_departure_vehicle set is_del=1 where id=#{id}
|
||||
</update>
|
||||
<!--硬删除-->
|
||||
<delete id="delete" parameterType="String">
|
||||
delete from applet_departure_vehicle where id=#{id}
|
||||
</delete>
|
||||
<!--数据更新-->
|
||||
<update id="update" parameterType="com.haitongauto.models.pojo.DepartureVehicle">
|
||||
update applet_departure_vehicle
|
||||
<set>
|
||||
<if test="id != null and id != ''">
|
||||
id = #{id},
|
||||
</if>
|
||||
<if test="voucher_number != null and voucher_number != ''">
|
||||
voucher_number = #{voucher_number},
|
||||
</if>
|
||||
<if test="users_id != null and users_id != ''">
|
||||
users_id = #{users_id},
|
||||
</if>
|
||||
<if test="users_name != null and users_name != ''">
|
||||
users_name = #{users_name},
|
||||
</if>
|
||||
<if test="tel_number != null and tel_number != ''">
|
||||
tel_number = #{tel_number},
|
||||
</if>
|
||||
<if test="operators != null and operators != ''">
|
||||
operators = #{operators},
|
||||
</if>
|
||||
<if test="phone_number != null and phone_number != ''">
|
||||
phone_number = #{phone_number},
|
||||
</if>
|
||||
<if test="truck_number != null and truck_number != ''">
|
||||
truck_number = #{truck_number},
|
||||
</if>
|
||||
<if test="trade_type != null and trade_type != ''">
|
||||
trade_type = #{trade_type},
|
||||
</if>
|
||||
<if test="cargo_type != null and cargo_type != ''">
|
||||
cargo_type = #{cargo_type},
|
||||
</if>
|
||||
<if test="cargo_quantity != null">
|
||||
cargo_quantity = #{cargo_quantity},
|
||||
</if>
|
||||
<if test="delivery_time != null and delivery_time != ''">
|
||||
delivery_time = #{delivery_time}::timestamp,
|
||||
</if>
|
||||
<if test="checker != null and checker != ''">
|
||||
checker = #{checker},
|
||||
</if>
|
||||
<if test="check_status != null and check_status != ''">
|
||||
check_status = #{check_status},
|
||||
</if>
|
||||
<if test="check_time != null and check_time != ''">
|
||||
check_time = #{check_time}::timestamp,
|
||||
</if>
|
||||
<if test="remarks != null and remarks != ''">
|
||||
remarks = #{remarks},
|
||||
</if>
|
||||
<if test="create_time != null and create_time != ''">
|
||||
create_time = #{create_time}::timestamp,
|
||||
</if>
|
||||
<if test="is_del != null">
|
||||
is_del = #{is_del},
|
||||
</if>
|
||||
update_time = current_timestamp
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!--指定Id的记录-->
|
||||
<select id="getById" parameterType="String" resultType="com.haitongauto.models.pojo.DepartureVehicle">
|
||||
select
|
||||
id,
|
||||
voucher_number,
|
||||
users_id,
|
||||
users_name,
|
||||
tel_number,
|
||||
operators,
|
||||
phone_number,
|
||||
truck_number,
|
||||
trade_type,
|
||||
cargo_type,
|
||||
cargo_quantity,
|
||||
delivery_time,
|
||||
checker,
|
||||
check_status,
|
||||
check_time,
|
||||
remarks,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
from applet_departure_vehicle
|
||||
where id=#{id}
|
||||
and is_del=0
|
||||
</select>
|
||||
<!--数据列表-->
|
||||
<select id="getList" resultType="com.haitongauto.models.pojo.DepartureVehicle">
|
||||
select
|
||||
id,
|
||||
voucher_number,
|
||||
users_id,
|
||||
users_name,
|
||||
tel_number,
|
||||
operators,
|
||||
phone_number,
|
||||
truck_number,
|
||||
trade_type,
|
||||
cargo_type,
|
||||
cargo_quantity,
|
||||
delivery_time,
|
||||
checker,
|
||||
check_status,
|
||||
check_time,
|
||||
remarks,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
from applet_departure_vehicle
|
||||
where is_del=0
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,96 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.haitongauto.mapper.base.DicMapper">
|
||||
<!--添加-->
|
||||
<select id="insert" parameterType="com.haitongauto.models.pojo.Dic" resultType="String">
|
||||
insert into applet_dic
|
||||
(
|
||||
id,
|
||||
dic_sort,
|
||||
description,
|
||||
content,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
)
|
||||
values
|
||||
(
|
||||
#{id},
|
||||
#{dic_sort},
|
||||
#{description},
|
||||
#{content},
|
||||
current_timestamp,
|
||||
current_timestamp,
|
||||
0
|
||||
)
|
||||
returning id
|
||||
</select>
|
||||
<!--软删除-->
|
||||
<update id="logicDel" parameterType="String">
|
||||
update applet_dic set is_del=1 where id=#{id}
|
||||
</update>
|
||||
<!--硬删除-->
|
||||
<delete id="delete" parameterType="String">
|
||||
delete from applet_dic where id=#{id}
|
||||
</delete>
|
||||
<!--数据更新-->
|
||||
<update id="update" parameterType="com.haitongauto.models.pojo.Dic">
|
||||
update applet_dic
|
||||
<set>
|
||||
<if test="id != null and id != ''">
|
||||
id = #{id},
|
||||
</if>
|
||||
<if test="dic_sort != null and dic_sort != ''">
|
||||
dic_sort = #{dic_sort},
|
||||
</if>
|
||||
<if test="description != null and description != ''">
|
||||
description = #{description},
|
||||
</if>
|
||||
<if test="content != null and content != ''">
|
||||
content = #{content},
|
||||
</if>
|
||||
<if test="create_time != null and create_time != ''">
|
||||
create_time = #{create_time}::timestamp,
|
||||
</if>
|
||||
<if test="is_del != null">
|
||||
is_del = #{is_del},
|
||||
</if>
|
||||
update_time =current_timestamp
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!--指定Id的记录-->
|
||||
<select id="getById" parameterType="String" resultType="com.haitongauto.models.pojo.Dic">
|
||||
select
|
||||
id,dic_sort,description,content,create_time,update_time,is_del
|
||||
from applet_dic
|
||||
where id=#{id}
|
||||
and is_del=0
|
||||
</select>
|
||||
<!--数据列表-->
|
||||
<select id="getList" resultType="com.haitongauto.models.pojo.Dic">
|
||||
select
|
||||
id,dic_sort,description,content,create_time,update_time,is_del
|
||||
from applet_dic
|
||||
where is_del=0
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<!--根据字典分类参数获取字典数据列表-->
|
||||
<select id="getDicListByDicSort" resultType="com.haitongauto.models.pojo.Dic">
|
||||
select
|
||||
id,
|
||||
dic_sort,
|
||||
description,
|
||||
content,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
from applet_dic
|
||||
where is_del=0
|
||||
and dic_sort=#{dic_sort}
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,90 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.haitongauto.mapper.base.EntryInstructMapper">
|
||||
<!--添加-->
|
||||
<select id="insert" parameterType="com.haitongauto.models.pojo.EntryInstruct" resultType="String">
|
||||
insert into applet_entry_instruct
|
||||
(
|
||||
id,
|
||||
appointment_id,
|
||||
users_id,
|
||||
users_name,
|
||||
truck_number,
|
||||
yard_name,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
)
|
||||
values
|
||||
(
|
||||
#{id},
|
||||
#{appointment_id},
|
||||
#{users_id},
|
||||
#{users_name},
|
||||
#{truck_number},
|
||||
#{yard_name},
|
||||
current_timestamp,
|
||||
current_timestamp,
|
||||
#{is_del}
|
||||
)
|
||||
returning id
|
||||
</select>
|
||||
<!--软删除-->
|
||||
<update id="logicDel" parameterType="String">
|
||||
update applet_entry_instruct set is_del=1 where id=#{id}
|
||||
</update>
|
||||
<!--硬删除-->
|
||||
<delete id="delete" parameterType="String">
|
||||
delete from applet_entry_instruct where id=#{id}
|
||||
</delete>
|
||||
<!--数据更新-->
|
||||
<update id="update" parameterType="com.haitongauto.models.pojo.EntryInstruct">
|
||||
update applet_entry_instruct
|
||||
<set>
|
||||
<if test="id != null and id != ''">
|
||||
id = #{id},
|
||||
</if>
|
||||
<if test="appointment_id != null and appointment_id != ''">
|
||||
appointment_id = #{appointment_id},
|
||||
</if>
|
||||
<if test="users_id != null and users_id != ''">
|
||||
users_id = #{users_id},
|
||||
</if>
|
||||
<if test="users_name != null and users_name != ''">
|
||||
users_name = #{users_name},
|
||||
</if>
|
||||
<if test="truck_number != null and truck_number != ''">
|
||||
truck_number = #{truck_number},
|
||||
</if>
|
||||
<if test="yard_name != null and yard_name != ''">
|
||||
yard_name = #{yard_name},
|
||||
</if>
|
||||
<if test="is_del != null and is_del != ''">
|
||||
create_time = #{create_time}::timestamp,
|
||||
</if>
|
||||
<if test="is_del != null">
|
||||
is_del = #{is_del},
|
||||
</if>
|
||||
update_time = current_timestamp
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!--指定Id的记录current_timestamp-->
|
||||
<select id="getById" parameterType="String" resultType="com.haitongauto.models.pojo.EntryInstruct">
|
||||
select
|
||||
id,appointment_id,users_id,users_name,truck_number,yard_name,create_time,update_time,is_del
|
||||
from applet_entry_instruct
|
||||
where id=#{id} and is_del=0
|
||||
</select>
|
||||
<!--数据列表-->
|
||||
<select id="getList" resultType="com.haitongauto.models.pojo.EntryInstruct">
|
||||
select
|
||||
id,appointment_id,users_id,users_name,truck_number,yard_name,create_time,update_time,is_del
|
||||
from applet_entry_instruct
|
||||
where is_del=0
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,95 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.haitongauto.mapper.base.FeedbackMapper">
|
||||
<!--添加-->
|
||||
<select id="insert" parameterType="com.haitongauto.models.pojo.Feedback" resultType="String">
|
||||
insert into applet_feedback
|
||||
(
|
||||
id,
|
||||
users_id,
|
||||
nike_name,
|
||||
feedback_info,
|
||||
pictures,
|
||||
tel_number,
|
||||
contact_info,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
)
|
||||
values
|
||||
(
|
||||
#{id},
|
||||
#{users_id},
|
||||
#{nike_name},
|
||||
#{feedback_info},
|
||||
#{pictures},
|
||||
#{tel_number},
|
||||
#{contact_info},
|
||||
current_timestamp,
|
||||
current_timestamp,
|
||||
0
|
||||
)
|
||||
returning id
|
||||
</select>
|
||||
<!--软删除-->
|
||||
<update id="logicDel" parameterType="String">
|
||||
update applet_feedback set is_del=1 where id=#{id}
|
||||
</update>
|
||||
<!--硬删除-->
|
||||
<delete id="delete" parameterType="String">
|
||||
delete from applet_feedback where id=#{id}
|
||||
</delete>
|
||||
<!--数据更新-->
|
||||
<update id="update" parameterType="com.haitongauto.models.pojo.Feedback">
|
||||
update applet_feedback
|
||||
<set>
|
||||
<if test="id != null and id != ''">
|
||||
id = #{id},
|
||||
</if>
|
||||
<if test="users_id != null and users_id != ''">
|
||||
users_id = #{users_id},
|
||||
</if>
|
||||
<if test="nike_name != null and nike_name != ''">
|
||||
nike_name = #{nike_name},
|
||||
</if>
|
||||
<if test="feedback_info != null and feedback_info != ''">
|
||||
feedback_info = #{feedback_info},
|
||||
</if>
|
||||
<if test="pictures != null and pictures != ''">
|
||||
pictures = #{pictures},
|
||||
</if>
|
||||
<if test="tel_number != null and tel_number != ''">
|
||||
tel_number = #{tel_number},
|
||||
</if>
|
||||
<if test="contact_info != null and contact_info != ''">
|
||||
contact_info = #{contact_info},
|
||||
</if>
|
||||
<if test="create_time != null and create_time != ''">
|
||||
create_time = #{create_time}::timestamp,
|
||||
</if>
|
||||
<if test="is_del != null">
|
||||
is_del = #{is_del},
|
||||
</if>
|
||||
update_time = current_timestamp
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!--指定Id的记录-->
|
||||
<select id="getById" parameterType="String" resultType="com.haitongauto.models.pojo.Feedback">
|
||||
select
|
||||
id,users_id,nike_name,feedback_info,pictures,tel_number,contact_info,create_time,update_time,is_del
|
||||
from applet_feedback
|
||||
where id=#{id} and is_del=0
|
||||
</select>
|
||||
<!--数据列表-->
|
||||
<select id="getList" resultType="com.haitongauto.models.pojo.Feedback">
|
||||
select
|
||||
id,users_id,nike_name,feedback_info,pictures,tel_number,contact_info,create_time,update_time,is_del
|
||||
from applet_feedback
|
||||
where is_del=0
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.haitongauto.mapper.base.LoginLogMapper">
|
||||
<!--新增数据-->
|
||||
<select id="insert" parameterType="com.haitongauto.models.pojo.LoginLog" resultType="String">
|
||||
insert into applet_login_log
|
||||
(
|
||||
id,
|
||||
wx_nike,
|
||||
wx_openid,
|
||||
login_time,
|
||||
ip,
|
||||
area,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
)
|
||||
values
|
||||
(
|
||||
#{id},
|
||||
#{wx_nike},
|
||||
#{wx_openid},
|
||||
current_timestamp,
|
||||
#{ip},
|
||||
#{area},
|
||||
current_timestamp,
|
||||
current_timestamp,
|
||||
0
|
||||
)
|
||||
returning id
|
||||
</select>
|
||||
<!--查询列表-->
|
||||
<select id="getList" parameterType="String" resultType="com.haitongauto.models.pojo.LoginLog">
|
||||
select
|
||||
id,wx_nike,wx_openid,login_time,ip,area,create_time,update_time,is_del
|
||||
from applet_login_log
|
||||
where is_del=0
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,127 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.haitongauto.mapper.base.MessageMapper">
|
||||
<!--添加数据-->
|
||||
<select id="insert" parameterType="com.haitongauto.models.pojo.Message" resultType="String">
|
||||
insert into applet_message
|
||||
(
|
||||
id,
|
||||
type,
|
||||
type_content,
|
||||
biz_id,
|
||||
prc_id,
|
||||
truck_number,
|
||||
is_read,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
)
|
||||
values
|
||||
(
|
||||
#{id},
|
||||
#{type},
|
||||
#{type_content},
|
||||
#{biz_id},
|
||||
#{prc_id},
|
||||
#{truck_number},
|
||||
0,
|
||||
current_timestamp,
|
||||
current_timestamp,
|
||||
0
|
||||
)
|
||||
returning id
|
||||
</select>
|
||||
<!--软删除-->
|
||||
<update id="logicDel" parameterType="String">
|
||||
update applet_message set is_del=1 where id=#{id}
|
||||
</update>
|
||||
<!--硬删除-->
|
||||
<delete id="delete" parameterType="String">
|
||||
delete from applet_message where id=#{id}
|
||||
</delete>
|
||||
<!--数据更新-->
|
||||
<update id="update" parameterType="com.haitongauto.models.pojo.Message">
|
||||
update applet_message
|
||||
<set>
|
||||
<if test="id != null and id != ''">
|
||||
id = #{id},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type},
|
||||
</if>
|
||||
<if test="type_content != null and type_content != ''">
|
||||
type_content = #{type_content},
|
||||
</if>
|
||||
|
||||
<if test="biz_id != null and biz_id != ''">
|
||||
biz_id = #{biz_id},
|
||||
</if>
|
||||
<if test="prc_id != null and prc_id != ''">
|
||||
prc_id = #{prc_id},
|
||||
</if>
|
||||
<if test="truck_number != null and truck_number != ''">
|
||||
truck_number = #{truck_number},
|
||||
</if>
|
||||
<if test="is_read != null">
|
||||
is_read = #{is_read},
|
||||
</if>
|
||||
<if test="create_time != null and create_time != ''">
|
||||
create_time = #{create_time}::timestamp,
|
||||
</if>
|
||||
<if test="is_del != null">
|
||||
is_del = #{is_del},
|
||||
</if>
|
||||
update_time = current_timestamp,
|
||||
</set>
|
||||
where id=#{id}
|
||||
<!-- where type = #{type}-->
|
||||
<!-- and biz_id = #{biz_id}-->
|
||||
</update>
|
||||
<!--指定Id的记录-->
|
||||
<select id="getById" parameterType="String" resultType="com.haitongauto.models.pojo.Message">
|
||||
select *
|
||||
from applet_message
|
||||
where id=#{id} and is_del=0
|
||||
</select>
|
||||
<!--数据列表-->
|
||||
<select id="getList" resultType="com.haitongauto.models.pojo.Message">
|
||||
select
|
||||
id,
|
||||
type,
|
||||
biz_id,
|
||||
truck_number,
|
||||
is_read,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
from applet_message
|
||||
where is_del=0
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="getLastMessageByTypeAndBizId" resultType="com.haitongauto.models.pojo.Message">
|
||||
select *
|
||||
from applet_message
|
||||
where type=#{type}
|
||||
and biz_id=#{biz_id}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="getMessageListByTruckNumber" resultType="com.haitongauto.models.pojo.Message">
|
||||
select *
|
||||
from applet_message
|
||||
where is_del=0
|
||||
and truck_number=#{truck_number}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="getUnReadMessageListByTruckNumber" resultType="com.haitongauto.models.pojo.Message">
|
||||
select *
|
||||
from applet_message
|
||||
where truck_number=#{truck_number}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,84 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.haitongauto.mapper.base.NoviceIntroductionMapper">
|
||||
<!--添加-->
|
||||
<select id="insert" parameterType="com.haitongauto.models.pojo.NoviceIntroduction" resultType="String">
|
||||
insert into applet_novice_introduction
|
||||
(
|
||||
id,
|
||||
sort,
|
||||
title,
|
||||
content,
|
||||
sequence_number,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
)
|
||||
values
|
||||
(
|
||||
#{id},
|
||||
#{sort},
|
||||
#{title},
|
||||
#{content},
|
||||
#{sequence_number},
|
||||
current_timestamp,
|
||||
current_timestamp,
|
||||
0
|
||||
)
|
||||
returning id
|
||||
</select>
|
||||
<!--软删除-->
|
||||
<update id="logicDel" parameterType="String">
|
||||
update applet_novice_introduction set is_del=1 where id=#{id}
|
||||
</update>
|
||||
<!--硬删除-->
|
||||
<delete id="delete" parameterType="String">
|
||||
delete from applet_novice_introduction where id=#{id}
|
||||
</delete>
|
||||
<!--数据更新-->
|
||||
<update id="update" parameterType="com.haitongauto.models.pojo.NoviceIntroduction">
|
||||
update applet_novice_introduction
|
||||
<set>
|
||||
<if test="id != null and id != ''">
|
||||
id = #{id},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort = #{sort},
|
||||
</if>
|
||||
<if test="title != null and title != ''">
|
||||
title = #{title},
|
||||
</if>
|
||||
<if test="content != null and content != ''">
|
||||
content = #{content},
|
||||
</if>
|
||||
<if test="sequence_number != null and sequence_number != ''">
|
||||
sequence_number = #{sequence_number},
|
||||
</if>
|
||||
<if test="create_time != null and create_time != ''">
|
||||
create_time = #{create_time}::timestamp,
|
||||
</if>
|
||||
<if test="is_del != null">
|
||||
is_del = #{is_del},
|
||||
</if>
|
||||
update_time =current_timestamp
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!--指定Id的记录current_timestamp-->
|
||||
<select id="getById" parameterType="String" resultType="com.haitongauto.models.pojo.NoviceIntroduction">
|
||||
select
|
||||
id,sort,title,content,sequence_number,create_time,update_time,is_del
|
||||
from applet_novice_introduction
|
||||
where id=#{id} and is_del=0
|
||||
</select>
|
||||
<!--数据列表-->
|
||||
<select id="getList" resultType="com.haitongauto.models.pojo.NoviceIntroduction">
|
||||
select
|
||||
id,sort,title,content,sequence_number,create_time,update_time,is_del
|
||||
from applet_novice_introduction
|
||||
where is_del=0
|
||||
order by create_time desc
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,115 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.haitongauto.mapper.base.PortAreasMapper">
|
||||
<!--添加数据-->
|
||||
<select id="insert" parameterType="com.haitongauto.models.pojo.PortArea" resultType="String">
|
||||
insert into applet_port_areas
|
||||
(
|
||||
id,
|
||||
port_area_name,
|
||||
port_area_name_en,
|
||||
port_area_code,
|
||||
port_area_address,
|
||||
area_center_poi,
|
||||
punch_range,
|
||||
is_enable,
|
||||
order_items,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
)
|
||||
values
|
||||
(
|
||||
#{id},
|
||||
#{port_area_name},
|
||||
#{port_area_name_en},
|
||||
#{port_area_code},
|
||||
#{port_area_address},
|
||||
#{area_center_poi},
|
||||
#{punch_range},
|
||||
#{is_enable},
|
||||
#{order_items},
|
||||
current_timestamp,
|
||||
current_timestamp,
|
||||
0
|
||||
)
|
||||
returning id
|
||||
</select>
|
||||
<!--软删除-->
|
||||
<update id="logicDel" parameterType="String">
|
||||
update applet_port_areas set is_del=1 where id=#{id}
|
||||
</update>
|
||||
<!--硬删除-->
|
||||
<delete id="delete" parameterType="String">
|
||||
delete from applet_port_areas where id=#{id}
|
||||
</delete>
|
||||
<!--数据更新-->
|
||||
<update id="update" parameterType="com.haitongauto.models.pojo.PortArea">
|
||||
update applet_port_areas
|
||||
<set>
|
||||
<if test="id != null and id != ''">
|
||||
id = #{id},
|
||||
</if>
|
||||
<if test="port_area_name != null and port_area_name != ''">
|
||||
port_area_name = #{port_area_name},
|
||||
</if>
|
||||
<if test="port_area_name_en != null and port_area_name_en != ''">
|
||||
port_area_name_en = #{port_area_name_en},
|
||||
</if>
|
||||
<if test="port_area_code != null and port_area_code != ''">
|
||||
port_area_code = #{port_area_code},
|
||||
</if>
|
||||
<if test="port_area_address != null and port_area_address != ''">
|
||||
port_area_address = #{port_area_address},
|
||||
</if>
|
||||
<if test="area_center_poi != null and area_center_poi != ''">
|
||||
area_center_poi = #{area_center_poi},
|
||||
</if>
|
||||
<if test="punch_range != null">
|
||||
punch_range = #{punch_range},
|
||||
</if>
|
||||
<if test="is_enable != null">
|
||||
is_enable = #{is_enable},
|
||||
</if>
|
||||
<if test="order_items != null and order_items != ''">
|
||||
order_items = #{order_items},
|
||||
</if>
|
||||
<if test="create_time != null and create_time != ''">
|
||||
create_time = #{create_time}::timestamp,
|
||||
</if>
|
||||
<if test="is_del != null">
|
||||
is_del = #{is_del},
|
||||
</if>
|
||||
update_time = current_timestamp
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!--指定Id的记录-->
|
||||
<select id="getById" parameterType="String" resultType="com.haitongauto.models.pojo.PortArea">
|
||||
select
|
||||
id,port_area_name,port_area_name_en,port_area_code,port_area_address,area_center_poi,punch_range,is_enable,order_items,create_time,update_time,is_del
|
||||
from applet_port_areas
|
||||
where id=#{id} and is_del=0
|
||||
</select>
|
||||
<!--数据列表-->
|
||||
<select id="getList" resultType="com.haitongauto.models.pojo.PortArea">
|
||||
select
|
||||
id,
|
||||
port_area_name,
|
||||
port_area_name_en,
|
||||
port_area_code,
|
||||
port_area_address,
|
||||
area_center_poi,
|
||||
punch_range,
|
||||
is_enable,
|
||||
order_items,
|
||||
create_time,
|
||||
update_time,
|
||||
is_del
|
||||
from applet_port_areas
|
||||
where is_del=0
|
||||
order by create_time desc
|
||||
</select>
|
||||
</mapper>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue