kchh 2024-08-08 16:59:28 +08:00
parent c204c7a6bf
commit 793afa3e19
410 changed files with 15994 additions and 0 deletions

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="SonarLintModuleSettings">
<option name="uniqueId" value="9473e93d-658f-4f49-9c16-d6af95e681a9" />
</component>
</module>

91
interfaces/pom.xml 100644
View File

@ -0,0 +1,91 @@
<?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>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>top.jfunc.json</groupId>
<artifactId>Json-Gson</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,114 @@
package com.haitongauto.interfaces;
import com.haitongauto.models.ido.BasicDataIdo;
import com.haitongauto.models.ido.CustomerRes;
import com.haitongauto.models.ido.ShipVoyIdo;
import com.haitongauto.models.valid.cus.ValidCusVin;
import com.haitongauto.models.valid.cus.ValidRequest;
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 = "nuzar-customer-boss", url = "https://rtops4.haitongauto.com/tos/customer", configuration = {OauthFeignInterceptor.class})
@FeignClient(name = "nuzar-customer-boss", configuration = {OauthFeignInterceptor.class})
public interface CusOrderApi {
/**
*
* @return /
*
* basic-service/shipManage/queryAllShipManage
* 2024-4-2
* 2024-4-3沿
*/
@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("portAreaId")String portAreaId,
@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);
/**
*
* @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")
com.haitongauto.models.res.Response<List<ValidCusVin>> getCheckVinISValid(@RequestBody ValidRequest validRequest);
}

View File

@ -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 );
}

View File

@ -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 idid
* @return
*/
DepartureDetailIdo_DTO getDepartureDetailForId(String id);
/**
*
*
* @param idid
* @return
*/
boolean checkDepartureVehicle(String id);
}

View File

@ -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);
}

View File

@ -0,0 +1,9 @@
package com.haitongauto.interfaces;
import com.haitongauto.models.dto.EnterPortTypeDtol;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public interface EnterPortTypeInterface {
List<EnterPortTypeDtol> getEnterPortTypeList();
}

View File

@ -0,0 +1,167 @@
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.haitongauto.models.valid.naz.CargoInfoNaz;
import com.haitongauto.models.valid.naz.res.NarRes;
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-openapi", 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);
/**
* idopenid
*
* @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);
/**
* ()
*/
@PostMapping("/special/vehicleReserve")
NarRes vehicleReserve(@RequestBody CargoInfoNaz cargoInfoNaz);
/**
* ()
*
* @param orderno
* @return
*/
@PostMapping("/special/vehicleCancelReserve")
NarRes vehicleCancelReserve(@RequestParam("orderno") String orderno);
}

View File

@ -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();
}

View File

@ -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 idid
* @return
*/
ReceivingDetailIdo_DTO getReceivingDetailForId(String id);
/**
*
*
* @param idid
* @return
*/
boolean checkReceivingVehicle(String id);
}

View File

@ -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);
}

View File

@ -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 = "auth-server", url = "https://rtops4.haitongauto.com/auth", configuration = {OauthFeignInterceptor.class})
@FeignClient(name = "auth-server",url = "${auth-server}",configuration = {OauthFeignInterceptor.class})
public interface UsersApi {
/**
* idopenid
* @return
*/
@PostMapping("/saas/authorization/user/info")
@ResponseBody
CommonRes<UserInfoRes> getUserInfo();
}

View File

@ -0,0 +1,21 @@
package com.haitongauto.interfaces;
import com.haitongauto.models.dto.open.YardGoodsStateRespDTO;
import com.haitongauto.models.ido.CommonRes;
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 java.util.List;
//@FeignClient(name = "yard-service", url = "https://rtops4.haitongauto.com/tos/yard", configuration = {OauthFeignInterceptor.class})
@FeignClient(name = "yard-service", configuration = {OauthFeignInterceptor.class})
public interface YardOrderApi {
/**
*
* @param vins
* @return
*/
@PostMapping("/yardGoods/checkInYardFLag")
CommonRes<List<YardGoodsStateRespDTO>> checkInYardFLag(@RequestBody List<String> vins);
}

View File

@ -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;
}
}

View File

@ -0,0 +1,114 @@
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":
//用户权限过期
default:
departureVehicleIdo_dto.setStatus(status);
break;
}
return departureVehicleIdo_dto;
}
/**
*
*
* @param idid
* @return
*/
@Override
public DepartureDetailIdo_DTO getDepartureDetailForId(String id) {
//创建一个收车详情数据的实例(基本数据+明细列表)
DepartureDetailIdo_DTO departureDetailIdo_dto = new DepartureDetailIdo_DTO();
DepartureDetailIdo departureDetailIdo = null;
//接口数据转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 idid
* @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;
}
}

View File

@ -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
* APP_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;
}
/**
* DicViewModelDicDto
*
* @param dicList Dic
* @return ViewModelDicDto
*/
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 "";
}
}

View File

@ -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;
}
}

View File

@ -0,0 +1,109 @@
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;
}
}

View File

@ -0,0 +1,105 @@
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":
//用户权限过期
default:
receivingVehicleIdo_dto.setStatus(status);
break;
}
return receivingVehicleIdo_dto;
}
/**
*
* @param idid
* @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 idid
* @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
result = res.getData().isResult();
}
return result;
}
}

View File

@ -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.

View File

@ -0,0 +1,5 @@
#Generated by Maven
#Wed Jul 24 13:26:05 CST 2024
version=1.0-SNAPSHOT
groupId=org.example
artifactId=interfaces

View File

@ -0,0 +1,18 @@
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\YardOrderApi.class
com\haitongauto\interfaces\impl\PortAreaInterfaceImpl.class
com\haitongauto\interfaces\CustomerServiceInterface.class

View File

@ -0,0 +1,18 @@
F:\Codes\rtos\v4\mini-service-v4\interfaces\src\main\java\com\haitongauto\interfaces\DepartureVehicleInterface.java
F:\Codes\rtos\v4\mini-service-v4\interfaces\src\main\java\com\haitongauto\interfaces\impl\DepartureVehicleInterfaceImpl.java
F:\Codes\rtos\v4\mini-service-v4\interfaces\src\main\java\com\haitongauto\interfaces\impl\DicInterfaceImpl.java
F:\Codes\rtos\v4\mini-service-v4\interfaces\src\main\java\com\haitongauto\interfaces\UsersApi.java
F:\Codes\rtos\v4\mini-service-v4\interfaces\src\main\java\com\haitongauto\interfaces\impl\UserInterfaceImpl.java
F:\Codes\rtos\v4\mini-service-v4\interfaces\src\main\java\com\haitongauto\interfaces\DicInterface.java
F:\Codes\rtos\v4\mini-service-v4\interfaces\src\main\java\com\haitongauto\interfaces\CustomerServiceInterface.java
F:\Codes\rtos\v4\mini-service-v4\interfaces\src\main\java\com\haitongauto\interfaces\UserInterface.java
F:\Codes\rtos\v4\mini-service-v4\interfaces\src\main\java\com\haitongauto\interfaces\EnterPortTypeInterface.java
F:\Codes\rtos\v4\mini-service-v4\interfaces\src\main\java\com\haitongauto\interfaces\impl\ReceivingVehicleInterfaceImpl.java
F:\Codes\rtos\v4\mini-service-v4\interfaces\src\main\java\com\haitongauto\interfaces\CusOrderApi.java
F:\Codes\rtos\v4\mini-service-v4\interfaces\src\main\java\com\haitongauto\interfaces\impl\CustomerServiceInterfaceImpl.java
F:\Codes\rtos\v4\mini-service-v4\interfaces\src\main\java\com\haitongauto\interfaces\OrderApi.java
F:\Codes\rtos\v4\mini-service-v4\interfaces\src\main\java\com\haitongauto\interfaces\impl\PortAreaInterfaceImpl.java
F:\Codes\rtos\v4\mini-service-v4\interfaces\src\main\java\com\haitongauto\interfaces\impl\EnterPortTypeInterfaceImpl.java
F:\Codes\rtos\v4\mini-service-v4\interfaces\src\main\java\com\haitongauto\interfaces\ReceivingVehicleInterface.java
F:\Codes\rtos\v4\mini-service-v4\interfaces\src\main\java\com\haitongauto\interfaces\PortAreaInterface.java
F:\Codes\rtos\v4\mini-service-v4\interfaces\src\main\java\com\haitongauto\interfaces\YardOrderApi.java

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="SonarLintModuleSettings">
<option name="uniqueId" value="a2b72a74-ad72-43d5-9dff-3eac0d4808e9" />
</component>
</module>

44
mapper/pom.xml 100644
View File

@ -0,0 +1,44 @@
<?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>
<dependency>
<groupId>top.jfunc.json</groupId>
<artifactId>Json-Gson</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</project>

View File

@ -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 sort1-2-
* @param authors//
* @return
*/
List<Announcement> AnnouncementListForCondition(@Param("tilKeywords") String tilKeywords, @Param("dateStart") String dateStart, @Param("dateEnd") String dateEnd, @Param("sort") Integer sort, @Param("list") List<String> authors);
List<Announcement> AnnouncementListForWeek();
}

View File

@ -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_type1-,2-,2-,3-,4-,5-,6-
* @param appointment_state0-1-
* @param transport_type0-/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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -0,0 +1,37 @@
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 sign_in_state0-1-
* @param punch_state0-1-
* @return
*/
List<PunchClock> PunchClockListForCondition(@Param("users_id") String users_id,
@Param("port_area_id") String port_area_id,
@Param("biz_type") String biz_type,
@Param("keywords") String keywords,
@Param("approach_date_start") String approach_date_start,
@Param("approach_date_end") String approach_date_end,
@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);
}

View File

@ -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);
}

View File

@ -0,0 +1,22 @@
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 registerDateStart
* @param registerDateEnd
* @param usersState
* @return
*/
List<Users> usersListForCondition(@Param("keywords") String keywords,
@Param("registerDateStart") String registerDateStart,
@Param("registerDateEnd") String registerDateEnd,
@Param("usersState") Integer usersState);
}

View File

@ -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
* &#064;date : 2023-7-9
*/
@Mapper
public interface AnnouncementMapper extends DataBaseMapper<Announcement> {
//---BaseMapper继承自DataBaseMapper
List<Announcement> getListBySort(@Param("sort") Integer sort,@Param("keyWords") String keyWords);
}

View File

@ -0,0 +1,41 @@
package com.haitongauto.mapper.base;
import com.haitongauto.models.dto.Pages;
import com.haitongauto.models.pojo.AppointmentDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* ()
*
* @author : kchh
* &#064;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);
List<AppointmentDetail> getAppointmentDetailsByConditionf(@Param("appointment_id") String appointment_id, @Param("ship_id") String ship_id, @Param("brand_id") String brand_id);
}

View File

@ -0,0 +1,106 @@
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.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
/**
*
*
* @author : kchh
* &#064;date : 2023-7-9
*/
@Mapper
public interface AppointmentMapper extends DataBaseMapper<Appointment> {
/**
*
*
* @param truck_number
* @return
*/
List<Appointment> getListByTruckName(@Param("truck_number") String truck_number);
/**
* ()
*
* @param truck_number
* @return
*/
Appointment getAppointmentByTruckNoForOutGate(@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);
/**
*
* @param startDate ()
* @param endDate ()
* @param portAreaId id()
* @param truckNumber ()
* @param shipId id()
* @param instructState ()
* @param brandId id()
* @return
*/
List<Appointment> getAppointmentListByConditionf(@Param("startDate") LocalDateTime startDate,
@Param("endDate") LocalDateTime 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);
/**
* id
* @param port_area_id
* @return
*/
List<String> getIdListNoInEn(@Param("port_area_id") String port_area_id);
/**
* id
* @return
*/
List<String> getIdListNoInEnNew();
Appointment getAppointmentByTruckName(@Param("truck_number") String truck_number);
}

View File

@ -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();
}

View File

@ -0,0 +1,12 @@
package com.haitongauto.mapper.base;
import com.haitongauto.models.pojo.DepartureDetail;
import org.apache.ibatis.annotations.Mapper;
/**
*
* @author : kchh
* &#064;date : 2023-7-9
*/
@Mapper
public interface DepartureDetailMapper extends DataBaseMapper<DepartureDetail> {
}

View File

@ -0,0 +1,12 @@
package com.haitongauto.mapper.base;
import com.haitongauto.models.pojo.DepartureVehicle;
import org.apache.ibatis.annotations.Mapper;
/**
*
* @author : kchh
* &#064;date : 2023-7-9
*/
@Mapper
public interface DepartureVehicleMapper extends DataBaseMapper<DepartureVehicle> {
}

View File

@ -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
* APP_CARGO_TYPE
* OPERATING_MODE
* MACHINE_TYPE
* @author : kchh
* &#064;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);
}

View File

@ -0,0 +1,13 @@
package com.haitongauto.mapper.base;
import com.haitongauto.models.pojo.EntryInstruct;
import org.apache.ibatis.annotations.Mapper;
/**
*
* @author : kchh
* &#064;date : 2023-7-9
*/
@Mapper
public interface EntryInstructMapper extends DataBaseMapper<EntryInstruct>{
}

View File

@ -0,0 +1,14 @@
package com.haitongauto.mapper.base;
import com.haitongauto.models.pojo.Feedback;
import org.apache.ibatis.annotations.Mapper;
/**
*
* @author : kchh
* &#064;date : 2023-7-9
*/
@Mapper
public interface FeedbackMapper extends DataBaseMapper<Feedback> {
//---BaseMapper继承自DataBaseMapper
}

View File

@ -0,0 +1,11 @@
package com.haitongauto.mapper.base;
import com.haitongauto.models.pojo.LoginLog;
/**
*
* @author : kchh
* &#064;date : 2023-7-9
*/
public interface LoginLogMapper extends DataBaseMapper<LoginLog>{
//---LoginLogMapper继承自DataBaseMapper
}

View File

@ -0,0 +1,29 @@
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> {
Integer sumUnread(@Param("list") List<String> truckNumberList);
List<Message> getMessageListByTruckNumber(@Param("list") List<String> truckNumberList);
/**
* @return
*/
List<Message> getUnReadMessageListByTruckNumber(@Param("list") List<String> truckNumberList);
/**
*
*
* @param type /
* @param biz_id biz_id
* @return
*/
Message getLastMessageByTypeAndBizId(@Param("type") Integer type, @Param("biz_id") String biz_id);
}

View File

@ -0,0 +1,13 @@
package com.haitongauto.mapper.base;
import com.haitongauto.models.pojo.NoviceIntroduction;
import org.apache.ibatis.annotations.Mapper;
/**
* //APP
* @author : kchh
* &#064;date : 2023-7-9
*/
@Mapper
public interface NoviceIntroductionMapper extends DataBaseMapper<NoviceIntroduction> {
//---BaseMapper继承自DataBaseMapper
}

View File

@ -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;
/**
* RTOS200使使
* @author : kchh
* &#064;date : 2023-7-9
*/
@Mapper
public interface PortAreasMapper extends DataBaseMapper<PortArea> {
//---BaseMapper继承自DataReqMapper
}

View File

@ -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
* &#064;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);
}

View File

@ -0,0 +1,13 @@
package com.haitongauto.mapper.base;
import com.haitongauto.models.pojo.ReceivingDetail;
import org.apache.ibatis.annotations.Mapper;
/**
* RTOS
* @author : kchh
* &#064;date : 2023-7-9
*/
@Mapper
public interface ReceivingDetailMapper extends DataBaseMapper<ReceivingDetail>{
}

View File

@ -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
* &#064;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);
}

View File

@ -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
* &#064;date 2023-7-9
*/
@Mapper
public interface RequesterMapper extends DataBaseMapper<Requester> {
//---BaseMapper继承自DataBaseMapper
Requester getRequesterForType(@Param("request_type") Integer request_type);
}

View File

@ -0,0 +1,14 @@
package com.haitongauto.mapper.base;
import com.haitongauto.models.pojo.ServiceConfig;
import org.apache.ibatis.annotations.Mapper;
/**
*
* @author : kchh
* &#064;date : 2023-7-9
*/
@Mapper
public interface ServiceConfigMapper extends DataBaseMapper<ServiceConfig> {
}

View File

@ -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
* &#064;date : 2023-7-9
*/
@Mapper
public interface TableHeadMapper extends DataBaseMapper<TableHead>{
/**
*
* @param table_code
* @return
*/
TableHead queryByCode( @Param("table_code") String table_code);
}

View File

@ -0,0 +1,12 @@
package com.haitongauto.mapper.base;
import com.haitongauto.models.pojo.TruckManagement;
import org.apache.ibatis.annotations.Mapper;
/**
*
* @author :kchh
* &#064;date : 2023-7-9
*/
@Mapper
public interface TruckManagementMapper extends DataBaseMapper<TruckManagement> {
}

View File

@ -0,0 +1,34 @@
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
* &#064;date : 2023-7-9
*/
@Mapper
public interface TruckMapper extends DataBaseMapper<Truck>{
Integer updateEX(Truck truck);
/**
* id
* @param users_idid
* @return
*/
Truck getTruckByUsersId(@Param("users_id")String users_id);
/**
* id
* @param wx_openidid
* @return
*/
Truck getTruckByOpenId(@Param("wx_openid")String wx_openid);
Truck getPalletTruckByTruckNo(@Param("truck_number")String truck_number);
Integer deleteTruckByUsersId(@Param("users_id")String users_id);
}

View File

@ -0,0 +1,21 @@
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
* &#064;date : 2023-7-9
*/
@Mapper
public interface UsersMapper extends DataBaseMapper<Users> {
Users getByWxOpenid(@Param("wx_openid") String wx_openid);
Users getByIdCode(@Param("id_code") String id_code);
}

View File

@ -0,0 +1,107 @@
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);
Appointment getActiveAppointmentNew(@Param("truck_number") String truck_number);
Appointment getActiveAppointmentByTruckNumber(@Param("truck_number") String truck_number);
/**
*
*
* @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);
}

View File

@ -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);
}

View File

@ -0,0 +1,67 @@
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);
}

View File

@ -0,0 +1,56 @@
package com.haitongauto.mapper.client;
import com.haitongauto.models.pojo.Truck;
import com.haitongauto.models.pojo.Users;
import com.haitongauto.models.pojo.TruckManagement;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.poi.ss.formula.functions.T;
import java.util.List;
@Mapper
public interface TruckExtendMapper{
/**
* Id
* @param users_id id
* @return
*/
Truck 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
*/
//
Users getUidByTruckNo(String truck_number);
}

View File

@ -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 to_char(update_time,'yyyy-mm-dd')&gt;=#{dateStart}
</if>
<if test="dateEnd!=null and dateEnd!=null">
and to_char(update_time,'yyyy-mm-dd')&lt;=#{dateEnd}
</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>

View File

@ -0,0 +1,104 @@
<?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 to_char(applet_appointment.create_time,'yyyy-mm-dd')&gt;=#{start_date}
</if>
<if test="end_date!=null and end_date!=''">
and to_char(applet_appointment.create_time,'yyyy-mm-dd')&lt;=#{end_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 &lt;&gt;4 and appointment_state&lt;&gt;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>

View File

@ -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>

View File

@ -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>

View File

@ -0,0 +1,101 @@
<?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 applet_punch_clock.port_area_id=#{port_area_id}
</if>
<if test="biz_type!=null and biz_type!=''">
and applet_appointment.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_start!=null and approach_date_start!=''">
and to_char(applet_appointment.check_in_time,'yyyy-mm-dd')&gt;=#{approach_date_start}
</if>
<if test="approach_date_end!=null and approach_date_end!=''">
and to_char(applet_appointment.check_in_time,'yyyy-mm-dd')&lt;=#{approach_date_end}
</if>
<!--无条件-->
<if test="sign_in_state==null and punch_state==null">
and 0=0
</if>
<!--未完成的-->
<if test="sign_in_state==null and punch_state==0">
and applet_punch_clock.punch_clock_type &lt;4
</if>
<!--已完成的-->
<if test="sign_in_state==null and punch_state==1 ">
and applet_punch_clock.punch_clock_type &gt;=4 and over_time is not null
</if>
<!--未签到的-->
<if test="sign_in_state==0 and punch_state==null">
and (applet_punch_clock.punch_clock_type=0 or start_time is null)
</if>
<!--未签到和未完成的-->
<if test="sign_in_state==0 and punch_state==0">
and applet_punch_clock.punch_clock_type&lt;4 and start_time is null
</if>
<!--未签到和已完成的-->
<if test="sign_in_state==0 and punch_state==1 ">
and applet_punch_clock.punch_clock_type &gt;=4 and start_time is null and over_time is not null
</if>
<!--已签到的-->
<if test="sign_in_state==1 and punch_state==null ">
and applet_punch_clock.punch_clock_type&gt;=1 and start_time is not null
</if>
<!--已签到和未完成的-->
<if test="sign_in_state==1 and punch_state==0 ">
and (applet_punch_clock.punch_clock_type=1 or applet_punch_clock.punch_clock_type=2 or
applet_punch_clock.punch_clock_type=3) and start_time is not null
</if>
<!--已签到和已完成的-->
<if test="sign_in_state==1 and punch_state==1 ">
and applet_punch_clock.punch_clock_type &gt;=4 and start_time is not null and over_time is not null
</if>
order by applet_punch_clock.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>

View File

@ -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 &gt;= #{start_time}::date
</if>
<if test="end_time!=null and end_time!=''">
and applet_appointment.create_time &lt;= #{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 &gt;= #{start_time}::date
</if>
<if test="end_time!=null and end_time!=''">
and create_time &lt;= #{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 &gt;= #{start_time}::date
</if>
<if test="end_time!=null and end_time!=''">
and create_time &lt;= #{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 &lt;&gt; 4
and appointment_state &lt;&gt; 9
and appointment_state &gt;=6
<if test="start_time!=null and start_time!=''">
and create_time &gt;= #{start_time}::date
</if>
<if test="end_time!=null and end_time!=''">
and create_time &lt;= #{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 &gt;= #{start_time}::date
</if>
<if test="end_time!=null and end_time!=''">
and create_time &lt;= #{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 &lt;&gt; 4
and appointment_state &lt;&gt; 9
and enter_type ='WE'
<if test="start_time!=null and start_time!=''">
and create_time &gt;= #{start_time}::date
</if>
<if test="end_time!=null and end_time!=''">
and create_time &lt;= #{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 &lt;&gt; 4
and appointment_state &lt;&gt; 9
and enter_type ='WI'
<if test="start_time!=null and start_time!=''">
and create_time &gt;= #{start_time}::date
</if>
<if test="end_time!=null and end_time!=''">
and create_time &lt;= #{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 &lt;&gt; 4
and appointment_state &lt;&gt; 9
and enter_type ='NE'
<if test="start_time!=null and start_time!=''">
and create_time &gt;= #{start_time}::date
</if>
<if test="end_time!=null and end_time!=''">
and create_time &lt;= #{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 &lt;&gt; 4
and appointment_state &lt;&gt; 9
and enter_type ='NI'
<if test="start_time!=null and start_time!=''">
and create_time &gt;= #{start_time}::date
</if>
<if test="end_time!=null and end_time!=''">
and create_time &lt;= #{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 &gt;= #{start_time}::date
</if>
<if test="end_time!=null and end_time!=''">
and create_time &lt;= #{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 &gt;= #{start_time}::date
</if>
<if test="end_time!=null and end_time!=''">
and create_time &lt;= #{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 &gt;= #{start_time}::date
</if>
<if test="end_time!=null and end_time!=''">
and create_time &lt;= #{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 &gt;= #{start_time}::date
</if>
<if test="end_time!=null and end_time!=''">
and create_time &lt;= #{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 &lt;&gt; 4
and appointment_state &lt;&gt; 9
<if test="start_time!=null and start_time!=''">
and create_time &gt;= #{start_time}::date
</if>
<if test="end_time!=null and end_time!=''">
and create_time &lt;= #{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 &gt;=3
and appointment_state &lt;6
and appointment_state &lt;&gt; 4
and appointment_state &lt;&gt; 9
<if test="start_time!=null and start_time!=''">
and create_time &gt;= #{start_time}::date
</if>
<if test="end_time!=null and end_time!=''">
and create_time &lt;= #{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 &gt;=6
and appointment_state &lt;&gt; 4
and appointment_state &lt;&gt; 9
<if test="start_time!=null and start_time!=''">
and create_time &gt;= #{start_time}::date
</if>
<if test="end_time!=null and end_time!=''">
and create_time &lt;= #{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 &gt;= #{start_date}::date and approach_date &lt;= #{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 &lt;&gt;4 and appointment_state&lt;&gt;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>

View File

@ -0,0 +1,41 @@
<?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="registerDateStart!=null and registerDateStart!=''">
and to_char(create_time,'yyyy-mm-dd')&gt;=#{registerDateStart}
</if>
<if test="registerDateEnd!=null and registerDateEnd!=''">
and to_char(create_time,'yyyy-mm-dd')&lt;=#{registerDateEnd}
</if>
<if test="usersState!=null">
and users_state=#{usersState}
</if>
order by create_time desc
</select>
</mapper>

View File

@ -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>

View File

@ -0,0 +1,174 @@
<?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>
<select id="getAppointmentDetailsByConditionf" resultType="com.haitongauto.models.pojo.AppointmentDetail">
select *
from applet_appointment_detail
where is_del=0
<if test="appointment_id != null and appointment_id != ''">
and appointment_id = #{appointment_id}
</if>
<if test="ship_id != null and ship_id != ''">
and ship_id = #{ship_id}
</if>
<if test="brand_id != null and brand_id != ''">
and brand_id = #{brand_id}
</if>
</select>
</mapper>

View File

@ -0,0 +1,370 @@
<?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,
push_ids
)
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,
#{create_time}::timestamp,
#{update_time}::timestamp,
#{appointment_type},
#{is_del},
#{yard},
#{gate_canal_in},
#{gate_canal_out},
0,
#{sender},
#{is_conventionality_in},
#{push_ids}
)
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="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>
<if test="push_ids!=null">
push_ids = #{push_ids},
</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 &gt;= #{approach_date}::date
and appointment_state &lt; 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 DISTINCT t1.*
from applet_appointment t1 join applet_appointment_detail t2
on t1.id=t2.appointment_id
where t1.is_del=0
and t1.create_time &gt;= #{startDate}
and t1.create_time &lt;= #{endDate}
and t1.port_area_id= #{portAreaId}
<if test="truckNumber!=null and truckNumber!=''">
and t1.truck_number like concat('%',#{truckNumber},'%')
</if>
<if test="instructState!=null">
and t1.instruct_state= #{instructState}
</if>
<if test="shipId!=null and shipId!=''">
and t2.ship_id =#{shipId})
</if>
<if test="brandId!=null and brandId!=''">
and t2.brand_id =#{brandId})
</if>
order by t1.create_time desc
</select>
<!--数据列表-->
<select id="getIdListNoInEn" resultType="String">
select id from applet_appointment
where is_del=0
and appointment_state&lt;&gt;4
and appointment_state&lt;&gt;9
and appointment_state&lt;6
and port_area_id=#{port_area_id}
</select>
<select id="getIdListNoInEnNew" resultType="String">
select id from applet_appointment
where is_del=0
and appointment_state&lt;&gt;4
and appointment_state&lt;&gt;9
and appointment_state&lt;6
</select>
<select id="getAppointmentByVin" resultType="com.haitongauto.models.pojo.Appointment"></select>
<select id="getAppointmentByTruckNoForOutGate" 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=6 and appointment_state=7)
order by create_time desc
limit 1
</select>
</mapper>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -0,0 +1,144 @@
<?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 IN
<foreach item="truck_number" collection="list" open="(" separator="," close=")">
#{truck_number}
</foreach>
order by create_time desc
</select>
<select id="getUnReadMessageListByTruckNumber" resultType="com.haitongauto.models.pojo.Message">
select *
from applet_message
where is_del=0 and is_read=0
and truck_number IN
<foreach item="truck_number" collection="list" open="(" separator="," close=")">
#{truck_number}
</foreach>
order by create_time desc
</select>
<select id="sumUnread" resultType="java.lang.Integer">
select count(*)
from applet_message
where is_del=0 and is_read=0 and
truck_number IN
<foreach item="truck_number" collection="list" open="(" separator="," close=")">
#{truck_number}
</foreach>
</select>
</mapper>

View File

@ -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>

View File

@ -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>

View File

@ -0,0 +1,139 @@
<?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.PunchClockMapper">
<!--添加数据并返回Id-->
<select id="insert" parameterType="com.haitongauto.models.pojo.PunchClock" resultType="String">
insert into applet_punch_clock
(
id,
users_id,
appointment_id,
biz_type,
queue_number,
start_time,
over_time,
port_area_id,
punch_address,
over_address,
punch_clock_type,
punch_clock_poi,
create_time,
update_time,
is_del
)
values
(
#{id},
#{users_id},
#{appointment_id},
#{biz_type},
#{queue_number},
#{start_time}::timestamp,
#{over_time}::timestamp,
#{port_area_id},
#{punch_address},
#{over_address},
#{punch_clock_type},
#{punch_clock_poi},
#{create_time}::timestamp,
#{update_time}::timestamp,
0
)
returning id
</select>
<!--软删除-->
<update id="logicDel" parameterType="String">
update applet_punch_clock set is_del=1 where id=#{id}
</update>
<!--硬删除-->
<delete id="delete" parameterType="String">
delete from applet_punch_clock where id=#{id}
</delete>
<!--数据更新-->
<update id="update" parameterType="com.haitongauto.models.pojo.PunchClock">
update applet_punch_clock
<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="appointment_id != null and appointment_id != ''">
appointment_id = #{appointment_id},
</if>
<if test="biz_type != null">
biz_type = #{biz_type},
</if>
<if test="queue_number != null and queue_number != ''">
queue_number = #{queue_number},
</if>
<if test="start_time != null and start_time != ''">
start_time = #{start_time}::timestamp,
</if>
<if test="over_time != null and over_time != ''">
over_time = #{over_time}::timestamp,
</if>
<if test="port_area_id != null and port_area_id != ''">
port_area_id = #{port_area_id},
</if>
<if test="punch_address != null and punch_address != ''">
punch_address = #{punch_address},
</if>
<if test="over_address != null and over_address != ''">
over_address = #{over_address},
</if>
<if test="punch_clock_type != null">
punch_clock_type = #{punch_clock_type},
</if>
<if test="punch_clock_poi != null and punch_clock_poi != ''">
punch_clock_poi = #{punch_clock_poi},
</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.PunchClock">
select
id,users_id,appointment_id,biz_type,queue_number,start_time,over_time,port_area_id,punch_address,over_address,punch_clock_type,punch_clock_poi,create_time,update_time,is_del
from applet_punch_clock
where id=#{id} and is_del=0
</select>
<!--数据列表-->
<select id="getList" resultType="com.haitongauto.models.pojo.PunchClock">
select
id,users_id,appointment_id,biz_type,queue_number,start_time,over_time,port_area_id,punch_address,over_address,punch_clock_type,punch_clock_poi,create_time,update_time,is_del
from applet_punch_clock
where is_del=0
order by create_time desc
</select>
<!--指定appointment_id的记录-->
<select id="getPunchClockByAppointmentId" parameterType="String" resultType="com.haitongauto.models.pojo.PunchClock">
select *
from applet_punch_clock
where
appointment_id=#{appointment_id}
and is_del=0
limit 1
</select>
<!--指定appointment_id的记录-->
<select id="getPunchClockByAppointmentIdList" parameterType="String" resultType="com.haitongauto.models.pojo.PunchClock">
select *
from applet_punch_clock
where is_del=0
and appointment_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
</mapper>

View File

@ -0,0 +1,89 @@
<?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.ReceivingDetailMapper">
<!--添加-->
<select id="insert" parameterType="com.haitongauto.models.pojo.ReceivingDetail" resultType="String">
insert into applet_receiving_detail
(
id,
applet_receiving_vehicle_id,
ship_name,brand,
port_name,
vin_list,
create_time,
update_time,
is_del
)
values
(
#{id},
#{applet_receiving_vehicle_id},
#{ship_name},
#{brand},
#{port_name},
#{vin_list},
current_timestamp,
current_timestamp,
0
)
returning id
</select>
<!--软删除-->
<update id="logicDel" parameterType="String">
update applet_receiving_detail set is_del=1 where id=#{id}
</update>
<!--硬删除-->
<delete id="delete" parameterType="String">
delete from applet_receiving_detail where id=#{id}
</delete>
<!--数据更新-->
<update id="update" parameterType="com.haitongauto.models.pojo.ReceivingDetail">
update applet_receiving_detail
<set>
<if test="id != null and id != ''">
id = #{id},
</if>
<if test="applet_receiving_vehicle_id != null and applet_receiving_vehicle_id != ''">
applet_receiving_vehicle_id = #{applet_receiving_vehicle_id},
</if>
<if test="ship_name != null and ship_name != ''">
ship_name = #{ship_name},
</if>
<if test="brand != null and brand != ''">
brand = #{brand},
</if>
<if test="port_name != null and port_name != ''">
port_name = #{port_name},
</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.ReceivingDetail">
select
id,applet_receiving_vehicle_id,ship_name,brand,port_name,vin_list,create_time,update_time,is_del
from applet_receiving_detail
where id=#{id} and is_del=0
</select>
<!--数据列表-->
<select id="getList" resultType="com.haitongauto.models.pojo.ReceivingDetail">
select
id,applet_receiving_vehicle_id,ship_name,brand,port_name,vin_list,create_time,update_time,is_del
from applet_receiving_detail
where is_del=0
order by create_time desc
</select>
</mapper>

View File

@ -0,0 +1,153 @@
<?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.ReceivingVehicleMapper">
<!--添加-->
<select id="insert" parameterType="com.haitongauto.models.pojo.ReceivingVehicle" resultType="String">
insert into applet_receiving_vehicle
(
id,
voucher_number,
users_id,
users_name,
tel_number,
operators,
phone_number,
numbers,
number_type,
trade_type,
cargo_type,
cargo_quantity,
collect_time,
checker,
check_status,
check_time,
remarks,
create_time,
update_time,
is_del
)
values
(
#{id},
#{voucherNumber},
#{users_id},
#{users_name},
#{tel_number},
#{operators},
#{phone_number},
#{numbers},
#{number_type},
#{trade_type},
#{cargo_type},
#{cargo_quantity},
#{collect_time}::timestamp,
#{checker},
#{check_status},
#{check_time}::timestamp,
#{remarks},
current_timestamp,
current_timestamp,
0
)
returning id
</select>
<!--软删除-->
<update id="logicDel" parameterType="String">
update applet_receiving_vehicle set is_del=1 where id=#{id}
</update>
<!--硬删除-->
<delete id="delete" parameterType="String">
delete from applet_receiving_vehicle where id=#{id}
</delete>
<!--数据更新-->
<update id="update" parameterType="com.haitongauto.models.pojo.ReceivingVehicle">
update applet_receiving_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="numbers != null and numbers != ''">
numbers = #{numbers},
</if>
<if test="number_type != null and number_type != ''">
number_type = #{number_type},
</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="collect_time != null and collect_time != ''">
collect_time = #{collect_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.ReceivingVehicle">
select
id,voucher_number,users_id,users_name,tel_number,operators,phone_number,numbers,number_type,trade_type,cargo_type,cargo_quantity,collect_time,checker,check_status,check_time,remarks,create_time,update_time,is_del
from applet_receiving_vehicle
where id=#{id} and is_del=0
</select>
<!--数据列表-->
<select id="getList" resultType="com.haitongauto.models.pojo.ReceivingVehicle">
select
id,voucher_number,users_id,users_name,tel_number,operators,phone_number,numbers,number_type,trade_type,cargo_type,cargo_quantity,collect_time,checker,check_status,check_time,remarks,create_time,update_time,is_del
from applet_receiving_vehicle
where is_del=0
order by create_time desc
</select>
<!--根据凭证编号获取凭证数据-->
<select id="getIdByVoucherNo" resultType="com.haitongauto.models.pojo.ReceivingVehicle">
select
id,voucher_number,users_id,users_name,tel_number,operators,phone_number,numbers,number_type,trade_type,cargo_type,cargo_quantity,collect_time,checker,check_status,check_time,remarks,create_time,update_time,is_del
where is_del=0 and voucher_number=#{voucher_number}
limit 1
</select>
</mapper>

View File

@ -0,0 +1,92 @@
<?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.RequesterMapper">
<!--添加数据-->
<select id="insert" parameterType="com.haitongauto.models.pojo.Requester" resultType="String">
insert into applet_requester
(
id,
url,
param_map,
request_type,
type_description,
create_time,
update_time,
is_del
)
values
(
#{id},
#{url},
#{param_map},
#{request_type},
#{type_description},
current_timestamp,
current_timestamp,
0
)
returning id
</select>
<!--软删除-->
<update id="logicDel" parameterType="String">
update applet_requester set is_del=1 where id=#{id}
</update>
<!--硬删除-->
<delete id="delete" parameterType="String">
delete from applet_requester where id=#{id}
</delete>
<!--数据更新-->
<update id="update" parameterType="com.haitongauto.models.pojo.Requester">
update applet_requester
<set>
<if test="id != null and id != ''">
id = #{id},
</if>
<if test="url != null and url != ''">
url = #{url},
</if>
<if test="param_map != null and param_map != ''">
param_map = #{param_map},
</if>
<if test="request_type != null">
request_type = #{request_type},
</if>
<if test="type_description != null and type_description != ''">
type_description = #{type_description},
</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.Requester">
select
id,url,param_map,request_type,type_description,create_time,update_time,is_del
from applet_requester
where id=#{id} and is_del=0
</select>
<!--数据列表-->
<select id="getList" resultType="com.haitongauto.models.pojo.Requester">
select
id,url,param_map,request_type,type_description,create_time,update_time,is_del
from applet_requester
where is_del=0
order by create_time desc
</select>
<select id="getRequesterForType" resultType="com.haitongauto.models.pojo.Requester">
select
id,url,param_map,request_type,type_description,create_time,update_time,is_del
from applet_requester
where is_del=0
and request_type=#{request_type}
</select>
</mapper>

Some files were not shown because too many files have changed in this diff Show More