commit bf1582dfba7cb173691a1f671cddc225d88136a2 Author: kchh <365619549@qq.com> Date: Mon Nov 6 09:23:52 2023 +0800 first diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..359bb53 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..cfc9d8f --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..e97eb0e --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..9394f4d --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..40a2eee --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..911d29d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,11 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..2b63946 --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/interfaces/pom.xml b/interfaces/pom.xml new file mode 100644 index 0000000..ee39bd8 --- /dev/null +++ b/interfaces/pom.xml @@ -0,0 +1,93 @@ + + + + rtos-wh + org.example + 1.0-SNAPSHOT + + 4.0.0 + + interfaces + + + 1.8 + 1.8 + + + + + org.springframework.boot + spring-boot-starter + + + + org.springframework.boot + spring-boot-starter-web + + + + com.alibaba + fastjson + 1.2.7 + + + + org.projectlombok + lombok + + + + org.example + models + 1.0-SNAPSHOT + + + + org.example + mapper + 1.0-SNAPSHOT + + + + org.example + utils + 1.0-SNAPSHOT + + + com.bestvike + linq + 3.1.0 + compile + + + + com.nuzar + rtops-openapi-client + 1.0-SNAPSHOT + compile + + + + com.github.pagehelper + pagehelper + 5.3.2 + compile + + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + com.nuzar + nuzar-security + 2.6.14.10-SNAPSHOT + compile + + + + + + \ No newline at end of file diff --git a/interfaces/src/main/java/com/haitongauto/interfaces/CusOrderApi.java b/interfaces/src/main/java/com/haitongauto/interfaces/CusOrderApi.java new file mode 100644 index 0000000..8bdf629 --- /dev/null +++ b/interfaces/src/main/java/com/haitongauto/interfaces/CusOrderApi.java @@ -0,0 +1,99 @@ +package com.haitongauto.interfaces; + +import com.haitongauto.models.ido.BasicDataIdo; +import com.haitongauto.models.ido.CustomerRes; +import com.haitongauto.models.ido.ShipVoyIdo; +import com.nuzar.common.security5.core.interceptor.OauthFeignInterceptor; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.List; + +@FeignClient(name = "customer", url = "https://rtops4.haitongauto.com/tos/customer", configuration = {OauthFeignInterceptor.class}) +//@FeignClient(name = "nuzar-customer-boss", configuration = {OauthFeignInterceptor.class}) +public interface CusOrderApi { + /** + * 内贸出口 船名 + * + * @return 返回 出口 船名/航次 + */ + @PostMapping("/dd/ship/all") + CustomerRes> getNEOutPlanShipList(@RequestParam("q") String q); + + /** + * 外贸出口 船名 + * @return 返回 出口 船名/航次 + */ + @PostMapping("/ee/plan/ship") + CustomerRes> getWEOutPlanShipList(@RequestParam("q") String q, @RequestParam("current") int current, @RequestParam("size") int size); + + /** + * 内贸出口港口 + * + * @return 返回出口港口 + */ + @PostMapping("/dd/port") + CustomerRes> getNEOutPlanPortsList(@RequestParam("q") String q); + + /** + * 外贸出口港口 + * + * @return 返回出口港口 + */ + @PostMapping("/ee/plan/port") + CustomerRes> getWEOutPlanPortsList(@RequestParam("q") String q, @RequestParam("shipId") String shipId, @RequestParam("current") int current, @RequestParam("size") int size); + + /** + * 内贸出口品牌 + * + * @return 返回出口品牌 / + */ + @PostMapping("/dd/brand") + CustomerRes> getNEOutPlanBrandsList(@RequestParam("q") String q); + + /** + * 外贸出口品牌 + * + * @return 返回出口品牌 /customer/dd/brand + */ + @PostMapping("/ee/voyage/brand") + CustomerRes> getWEOutPlanBrandsList(@RequestParam("q") String q, @RequestParam("shipName") String shipName, @RequestParam("current") int current, @RequestParam("size") int size); + + + /** + * 进口 船名/航次 + * + * @return 返回 进口 船名/航次 + */ + @PostMapping("/it/shipVoyage") + CustomerRes> getInPlanShipVoyList(@RequestParam("q") String q); + + /** + * 验证vin车架号是否被激活 + * + * @return 返回进口港口 + */ + @PostMapping("/it/shipVoyage") + CustomerRes> getInPlanPortsList(@RequestParam("q") String q); + + /** + * 进口品牌 + * + * @return 返回进口品牌 + */ + @PostMapping("/it/shipVoyage") + CustomerRes> getInPlanBrandsList(@RequestParam("q") String q, @RequestParam("shipName") String shipName, @RequestParam("voyage") String voyage); + + + /** + * 验证vins是否被激活 + * + * @return 返回未激活的vins + */ + @PostMapping("/spz/valid-vins") + CustomerRes getCheckVinISValid(@RequestBody List vins); + + +} diff --git a/interfaces/src/main/java/com/haitongauto/interfaces/CustomerServiceInterface.java b/interfaces/src/main/java/com/haitongauto/interfaces/CustomerServiceInterface.java new file mode 100644 index 0000000..6c0ca5f --- /dev/null +++ b/interfaces/src/main/java/com/haitongauto/interfaces/CustomerServiceInterface.java @@ -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 getBasicMapData(String param, Integer requestType); + + List getShipVoyIdoList(String param, Integer requestType); + + /** + * 获取提单号列表 + * + * @return 返回提单号列表 + */ + List getBillNumMapData(String q ); + +} diff --git a/interfaces/src/main/java/com/haitongauto/interfaces/DepartureVehicleInterface.java b/interfaces/src/main/java/com/haitongauto/interfaces/DepartureVehicleInterface.java new file mode 100644 index 0000000..c8cf4ba --- /dev/null +++ b/interfaces/src/main/java/com/haitongauto/interfaces/DepartureVehicleInterface.java @@ -0,0 +1,34 @@ +package com.haitongauto.interfaces; +import com.haitongauto.models.ido.departure.DepartureDetailIdo_DTO; +import com.haitongauto.models.ido.departure.DepartureVehicleIdo_DTO; + +/** + * 提车凭证接口 + */ +public interface DepartureVehicleInterface { + /** + * 获取提车凭证的分页数据 + * + * @param current 当前页码 + * @param size 数据条数(非必填 + * @return 返回提车凭证的分页数据 + */ + DepartureVehicleIdo_DTO getDepartureVehicleList(String printTicketTime, String query, Integer current, Integer size); + + /** + * 获取一条提车明细 + * + * @param id:提车id + * @return 返回一条提车明细 + */ + DepartureDetailIdo_DTO getDepartureDetailForId(String id); + + /** + * 完成提车核验 + * + * @param id:提车id + * @return 返回完成提车核验结果 + */ + boolean checkDepartureVehicle(String id); + +} diff --git a/interfaces/src/main/java/com/haitongauto/interfaces/DicInterface.java b/interfaces/src/main/java/com/haitongauto/interfaces/DicInterface.java new file mode 100644 index 0000000..56bacc6 --- /dev/null +++ b/interfaces/src/main/java/com/haitongauto/interfaces/DicInterface.java @@ -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 getDicList(String dic_sort); + + String picUpload(String pic); + +} diff --git a/interfaces/src/main/java/com/haitongauto/interfaces/EnterPortTypeInterface.java b/interfaces/src/main/java/com/haitongauto/interfaces/EnterPortTypeInterface.java new file mode 100644 index 0000000..f1e04a3 --- /dev/null +++ b/interfaces/src/main/java/com/haitongauto/interfaces/EnterPortTypeInterface.java @@ -0,0 +1,12 @@ +package com.haitongauto.interfaces; + +import com.haitongauto.models.dto.EnterPortTypeDto; +import com.haitongauto.models.dto.EnterPortTypeDtol; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public interface EnterPortTypeInterface { + List getEnterPortTypeList(); +} diff --git a/interfaces/src/main/java/com/haitongauto/interfaces/OrderApi.java b/interfaces/src/main/java/com/haitongauto/interfaces/OrderApi.java new file mode 100644 index 0000000..963e355 --- /dev/null +++ b/interfaces/src/main/java/com/haitongauto/interfaces/OrderApi.java @@ -0,0 +1,149 @@ +package com.haitongauto.interfaces; + +import com.haitongauto.models.dto.EnterPortTypeDto; +import com.haitongauto.models.ido.CheckRes; +import com.haitongauto.models.ido.CommonRes; +import com.haitongauto.models.ido.DictionaryIdo; +import com.haitongauto.models.ido.PortAreasIdo; +import com.haitongauto.models.ido.departure.DepartureDetailIdo; +import com.haitongauto.models.ido.departure.DepartureVehicleIdoPar; +import com.haitongauto.models.ido.departure.pc.DepartureVehicleIdoPar_pc; +import com.haitongauto.models.ido.login.*; +import com.haitongauto.models.ido.receiving.ReceivingDetailIdo; +import com.haitongauto.models.ido.receiving.ReceivingVehicleIdoPar; +import com.haitongauto.models.ido.receiving.pc.ReceivingVehicleIdoPar_pc; +import com.nuzar.common.security5.core.interceptor.OauthFeignInterceptor; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 通用数据字典表(数据源自RTOS) + * 运输方式 TRANSPORT_TYPE + * 进港类型 ENTER_PORT_TYPE + * 货物类型 CARGO_TYPE + * 操作模式 OPERATING_MODE + * 备 件 MACHINE_TYPE + */ +@FeignClient(name = "rtos-openapi1", url = "https://rtops4.haitongauto.com/tos/api", configuration = {OauthFeignInterceptor.class}) +//@FeignClient(name = "rtos-openapi", configuration = {OauthFeignInterceptor.class}) +public interface OrderApi { + /** + * 登录 + * + * @param loginRequest loginRequest + * @return 登录结果 + */ + @GetMapping("/miniapp/login") + @ResponseBody + CommonRes login(@RequestBody UserLoginOrRegisterRequest loginRequest); + + /** + * 获得用户id和用户openid + * + * @return 登录结果 + */ + @PutMapping("/miniapp/user/update") + @ResponseBody + CommonRes updateUser(@RequestBody UsersIdo usersIdo); + + //String updateUser(@RequestBody UsersIdo usersIdo); + + /** + * 字典数据 + * + * @return 返回字典数据 + */ + @GetMapping("/miniapp/typeRef/domain/{domain}") + CommonRes> dicData(@RequestParam("domain") String domain); + + /** + * 港区列表数据 + * + * @return 返回港区列表 + */ + @GetMapping("/miniapp/portAreaManage/getPortArea") + CommonRes> getPortAreasIdoList(@RequestParam("pamName") String pamName); + + /** + * 收车分页数据 + * + * @return 返回收车分页数据 + */ + @GetMapping("/miniapp/vehicleClose/collectCar/page") + CommonRes 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 getReceivingDetailForId(@RequestParam("id") String id); + + /** + * 收车核验 + * + * @return 返回收车核验 + */ + @PostMapping("/miniapp/vehicleClose/collectCar/confirm") + CommonRes checkReceivingVehicle(@RequestBody String id); + + /** + * 提(发)车分页数据 + * + * @return 返回提车分页数据 + */ + @GetMapping("/miniapp/delivery/pickUpCar/page") + CommonRes 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 getDepartureDetailForId(@RequestParam("id") String id); + + /** + * 提(发)车核验 + * + * @return 返回提(发)车核验 + */ + @PostMapping("/miniapp/delivery/pickUpCar/confirm") + CommonRes checkDepartureVehicle(@RequestBody String id); + + /** + * 获取进港类型和业务类型 + * + * @return 返回 + */ + @GetMapping("/miniapp/enterptType/dict") + CommonRes> getEnterPortType(); + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + /** + * 根据条件查询所有的收车凭证列表(海通后台使用) + * + * @param spmId 船名 + * @param bvmId 货物类型 + * @param query 关键字(手机号、板车号、编号) + * @return 返回 收车凭证列表 + */ + @GetMapping("/miniapp/vehicleClose/collect/cars/page") + CommonRes 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 getDepartureListByCondition(@RequestParam("spmId") String spmId, @RequestParam("bvmId") String bvmId, @RequestParam("query") String query, @RequestParam("current") Integer current, @RequestParam("size") Integer size); + + +} \ No newline at end of file diff --git a/interfaces/src/main/java/com/haitongauto/interfaces/PortAreaInterface.java b/interfaces/src/main/java/com/haitongauto/interfaces/PortAreaInterface.java new file mode 100644 index 0000000..201b5a9 --- /dev/null +++ b/interfaces/src/main/java/com/haitongauto/interfaces/PortAreaInterface.java @@ -0,0 +1,15 @@ +package com.haitongauto.interfaces; +import com.haitongauto.models.pojo.PortArea; +import java.util.List; + +/** + * 港区接口服务 + */ +public interface PortAreaInterface { + /** + * 获取RTOS港区列表数据 + * @return 返回港区列表数据 + */ + List getPortArea(); + +} diff --git a/interfaces/src/main/java/com/haitongauto/interfaces/ReceivingVehicleInterface.java b/interfaces/src/main/java/com/haitongauto/interfaces/ReceivingVehicleInterface.java new file mode 100644 index 0000000..5a262ee --- /dev/null +++ b/interfaces/src/main/java/com/haitongauto/interfaces/ReceivingVehicleInterface.java @@ -0,0 +1,39 @@ +package com.haitongauto.interfaces; +import com.haitongauto.models.ido.receiving.ReceivingDetailIdo_DTO; +import com.haitongauto.models.ido.receiving.ReceivingVehicleIdo_DTO; +/** + * 收车凭证接口服务 + */ +public interface ReceivingVehicleInterface { + /** + * 获取收车凭证的分页数据 + * + * @param current 当前页码 + * @param size 数据条数(非必填) + * @return 返回收车凭证的分页数据 + */ + ReceivingVehicleIdo_DTO getReceivingVehicleList(String printTime, String query, Integer current, Integer size); + + /** + * 获取一条收车明细 + * + * @param id:收车id + * @return 返回一条收车明细 + */ + ReceivingDetailIdo_DTO getReceivingDetailForId(String id); + + /** + * 完成收车核验 + * + * @param id:收车id + * @return 返回完成收车核验结果 + */ + boolean checkReceivingVehicle(String id); + + + + + + + +} diff --git a/interfaces/src/main/java/com/haitongauto/interfaces/UserInterface.java b/interfaces/src/main/java/com/haitongauto/interfaces/UserInterface.java new file mode 100644 index 0000000..58ebbfa --- /dev/null +++ b/interfaces/src/main/java/com/haitongauto/interfaces/UserInterface.java @@ -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); + +} diff --git a/interfaces/src/main/java/com/haitongauto/interfaces/UsersApi.java b/interfaces/src/main/java/com/haitongauto/interfaces/UsersApi.java new file mode 100644 index 0000000..12988e0 --- /dev/null +++ b/interfaces/src/main/java/com/haitongauto/interfaces/UsersApi.java @@ -0,0 +1,19 @@ +package com.haitongauto.interfaces; +import com.haitongauto.models.ido.CommonRes; +import com.haitongauto.models.ido.login.UserInfoRes; +import com.nuzar.common.security5.core.interceptor.OauthFeignInterceptor; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +//@FeignClient(name = "rtos-openapi", url = "https://rtops4.haitongauto.com/auth", configuration = {OauthFeignInterceptor.class}) +@FeignClient(name = "auth-server",url = "${auth-server}",configuration = {OauthFeignInterceptor.class}) +public interface UsersApi { + /** + * 获得用户id和用户openid + * @return 登录结果 + */ + @PostMapping("/saas/authorization/user/info") + @ResponseBody + CommonRes getUserInfo(); +} diff --git a/interfaces/src/main/java/com/haitongauto/interfaces/impl/CustomerServiceInterfaceImpl.java b/interfaces/src/main/java/com/haitongauto/interfaces/impl/CustomerServiceInterfaceImpl.java new file mode 100644 index 0000000..a266709 --- /dev/null +++ b/interfaces/src/main/java/com/haitongauto/interfaces/impl/CustomerServiceInterfaceImpl.java @@ -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 getBasicMapData(String param, Integer requestType) { + List 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 ship_map = new HashMap<>(); + //List myList = new ArrayList<>(); + //判断接口数据获取是否成功 + if (map.get("code").equals("200") || map.get("msg").equals("success")) { + //接口数据获取成功,将接口的Map的data数据转为接口对象数据 + //船名航次 + if (requestType.equals(1006)) { + List 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 getShipVoyIdoList(String param, Integer requestType) { + List 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 ship_map = new HashMap<>(); + //List 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 getBillNumMapData(String q) { + List 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 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; + } + +} diff --git a/interfaces/src/main/java/com/haitongauto/interfaces/impl/DepartureVehicleInterfaceImpl.java b/interfaces/src/main/java/com/haitongauto/interfaces/impl/DepartureVehicleInterfaceImpl.java new file mode 100644 index 0000000..18b8db3 --- /dev/null +++ b/interfaces/src/main/java/com/haitongauto/interfaces/impl/DepartureVehicleInterfaceImpl.java @@ -0,0 +1,124 @@ +package com.haitongauto.interfaces.impl; +import com.haitongauto.interfaces.DepartureVehicleInterface; +import com.haitongauto.interfaces.OrderApi; +import com.haitongauto.mapper.base.RequesterMapper; +import com.haitongauto.mapper.client.OtherExtendMapper; +import com.haitongauto.models.ido.CheckRes; +import com.haitongauto.models.ido.CommonRes; +import com.haitongauto.models.ido.departure.*; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; + +@Slf4j +@Service +public class DepartureVehicleInterfaceImpl implements DepartureVehicleInterface { + @Autowired + RequesterMapper requesterMapper; + @Autowired + OtherExtendMapper otherExtendMapper; + @Resource + private OrderApi orderApi; + + /** + * 获取提车凭证的分页数据 + * + * @param current 当前页码 + * @param size 数据条数(非必填 + * @return 返回提车凭证的分页数据 + */ + @Override + public DepartureVehicleIdo_DTO getDepartureVehicleList(String printTicketTime, String query, Integer current, Integer size) { + //创建一个提车凭证分页数据的实例(分页列表数据) + List mylist = null; + //接口数据转Map + CommonRes map = orderApi.getDepartureVehicleList(printTicketTime, query, current, size); + + //判断接口数据获取是否成功 + String status = map.getStatus(); + DepartureVehicleIdo_DTO departureVehicleIdo_dto = new DepartureVehicleIdo_DTO(); + switch (status) { + case "200": + //接口数据获取成功,将接口的Map的data数据转为接口对象的List + departureVehicleIdo_dto.setStatus(status); + DepartureVehicleIdoPar departureVehicleIdoPar = map.getData(); + if (departureVehicleIdoPar != null) { + mylist = departureVehicleIdoPar.getRecords(); + departureVehicleIdo_dto.setDepartureVehicleIdoList(mylist); + } + break; + case "401": + //用户权限过期 + departureVehicleIdo_dto.setStatus(status); + break; + default: + departureVehicleIdo_dto.setStatus(status); + break; + } + return departureVehicleIdo_dto; + } + + /** + * 获取一条提车明细 + * + * @param id:提车id + * @return 返回一条提车明细 + */ + @Override + public DepartureDetailIdo_DTO getDepartureDetailForId(String id) { + + //创建一个收车详情数据的实例(基本数据+明细列表) + DepartureDetailIdo_DTO departureDetailIdo_dto = new DepartureDetailIdo_DTO(); + DepartureDetailIdo departureDetailIdo = null; + + //接口数据转Map + //接口数据转Map + CommonRes map = orderApi.getDepartureDetailForId(id); + String status = map.getStatus(); + //判断接口数据获取是否成功 + if ("200".equals(status)) { + //接口数据获取成功,将接口的Map的data数据转为接口对象数据 + departureDetailIdo_dto.setStatus("200"); + departureDetailIdo = map.getData(); + if (departureDetailIdo != null) { + departureDetailIdo_dto.setDepartureDetailIdo(departureDetailIdo); + } + + } + if ("401".equals(status)) { + departureDetailIdo_dto.setStatus("401"); + } + return departureDetailIdo_dto; + } + + /** + * 完成提车核验 + * + * @param id:提车id + * @return 返回完成提车核验结果 + */ + @Override + public boolean checkDepartureVehicle(String id) { + + + if (id == null || id.isEmpty()) { + return false; + } + CommonRes 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; + } +} diff --git a/interfaces/src/main/java/com/haitongauto/interfaces/impl/DicInterfaceImpl.java b/interfaces/src/main/java/com/haitongauto/interfaces/impl/DicInterfaceImpl.java new file mode 100644 index 0000000..8501896 --- /dev/null +++ b/interfaces/src/main/java/com/haitongauto/interfaces/impl/DicInterfaceImpl.java @@ -0,0 +1,190 @@ +package com.haitongauto.interfaces.impl; +import com.bestvike.linq.Linq; +import com.haitongauto.interfaces.DicInterface; +import com.haitongauto.interfaces.OrderApi; +import com.haitongauto.mapper.base.DicMapper; +import com.haitongauto.mapper.base.RequesterMapper; +import com.haitongauto.models.dto.DicDto; +import com.haitongauto.models.ido.CommonRes; +import com.haitongauto.models.ido.DictionaryIdo; +import com.haitongauto.models.pojo.Dic; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * 通用数据字典表(数据源自RTOS) + * 运输方式 TRANSPORT_TYPE + * 进港类型 ENTER_PORT_TYPE + * 货物类型 CARGO_TYPE + * 操作模式 OPERATING_MODE + * 备 件 MACHINE_TYPE + */ +@Slf4j +@Service +public class DicInterfaceImpl implements DicInterface { + @Autowired + DicMapper dicMapper; + @Autowired + RequesterMapper requesterMapper; + @Resource + private OrderApi orderApi; + + /** + * 获取通用字典接口数据 + * + * @param dic_sort :数据类型字符串(该参数直接拼接到接口URL) + * 运输方式 TRANSPORT_TYPE + * 进港类型 ENTER_PORT_TYPE + * 货物类型 CARGO_TYPE + * 操作模式 OPERATING_MODE + * 备件 MACHINE_TYPE + * @return 返回通用字典接口数据 + */ + @Override + public List getDicList(String dic_sort) { + List dicDtoList = new ArrayList<>(); + //伪代码,测试使用 +// if (false) { +// try { +// List mylist = dicMapper.getDicListByDicSort(dic_sort); +// //接口字典数据Dic转ViewModel类数据DicDto +// dicDtoList = this.DicConvertToDicDto(mylist); +// } catch (Exception ignored) { +// } +// } + + if (true) { + //检查查询类型参数,定义类型描述 + String description = ""; + CommonRes> 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 mylist = dicMapper.getDicListByDicSort(dic_sort); + //通用字典的接口类型参数requestType=1002 + + //获取字典接口数据 + + if (map == null) { + //接口字典数据Dic转ViewModel类数据DicDto + dicDtoList = this.DicConvertToDicDto(mylist); + return dicDtoList; + } + + + //定义通用字典列表实例 + List dicList = new ArrayList<>(); + //判断接口数据获取是否成功 + if (map.getStatus().equals("200")) { + //接口数据获取成功,将接口的Map的data数据转为接口对象的List + List dataList = map.getData(); + if (dataList != null && dataList.size() > 0) { + //遍历data数据 + for (DictionaryIdo item : dataList) { + String dic_id = item.getPtrCode(); + //String dic_sort = item.getPamEfficient(); + if (dic_id != null && !Objects.equals(dic_id, "")) { + //定义一个字典的实例 + Dic dic = new Dic(); + //用接口数据给字典实例赋值 + dic.setDic_sort(dic_sort); //分类字符串 + dic.setId(dic_id); //字典id + dic.setContent(item.getPtrDesc()); //字典内容 + dic.setDescription(description); //字典描述 + dic.setIs_del(0); + //获取dic_id在本地数据库中对应实例的字典id + Dic myDic = Linq.of(mylist).firstOrDefault(a -> a.getId().equals(dic_id)); +// try { +// //更新到数据库 +// if (myDic != null && myDic.getId() != null) { +// //如果存在,则更新本地数据 +// int x = dicMapper.update(dic); +// if (x > 0) { +// System.out.println(description + "的接口数据已更新到本地数据库。"); +// } +// } else { +// //如果不存在,则新增本地数据 +// String id = dicMapper.insert(dic); +// if (id != null && id.length() > 0) { +// System.out.println(description + "的接口数据已添加到本地数据库。"); +// } +// } +// } catch (Exception ignored) { +// } + + //填充到dicList列表 + dicList.add(dic); + } + } + } + + } else { + //接口数据获取失败,则直接使用本地数据表 + dicList = mylist; + } + + //接口字典数据Dic转ViewModel类数据DicDto + dicDtoList = this.DicConvertToDicDto(dicList); + + } + return dicDtoList; + } + + /** + * 接口字典数据Dic转ViewModel类数据DicDto + * + * @param dicList 接口字典数据Dic列表 + * @return 返回ViewModel类数据DicDto列表 + */ + private List + DicConvertToDicDto(List dicList) { + List 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 ""; + } + +} diff --git a/interfaces/src/main/java/com/haitongauto/interfaces/impl/EnterPortTypeInterfaceImpl.java b/interfaces/src/main/java/com/haitongauto/interfaces/impl/EnterPortTypeInterfaceImpl.java new file mode 100644 index 0000000..31c002e --- /dev/null +++ b/interfaces/src/main/java/com/haitongauto/interfaces/impl/EnterPortTypeInterfaceImpl.java @@ -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 getEnterPortTypeList() { + CommonRes> data = orderApi.getEnterPortType(); + List enterPortTypeDtoList = null; + if (data != null) { + enterPortTypeDtoList = data.getData(); + } + List 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; + } + +} diff --git a/interfaces/src/main/java/com/haitongauto/interfaces/impl/PortAreaInterfaceImpl.java b/interfaces/src/main/java/com/haitongauto/interfaces/impl/PortAreaInterfaceImpl.java new file mode 100644 index 0000000..f6f82c7 --- /dev/null +++ b/interfaces/src/main/java/com/haitongauto/interfaces/impl/PortAreaInterfaceImpl.java @@ -0,0 +1,112 @@ +package com.haitongauto.interfaces.impl; + +import com.bestvike.linq.Linq; +import com.haitongauto.interfaces.OrderApi; +import com.haitongauto.interfaces.PortAreaInterface; +import com.haitongauto.mapper.base.PortAreasMapper; +import com.haitongauto.mapper.base.RequesterMapper; +import com.haitongauto.models.ido.CommonRes; +import com.haitongauto.models.ido.PortAreasIdo; +import com.haitongauto.models.pojo.PortArea; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +@Slf4j +@Service +public class PortAreaInterfaceImpl implements PortAreaInterface { + @Autowired + RequesterMapper requesterMapper; + @Autowired + PortAreasMapper portAreasMapper; + + @Resource + private OrderApi orderApi; + + /** + * 获取RTOS港区列表数据 + * + * @return 返回港区列表数据 + */ + @Override + public List getPortArea() { + //定义港区列表实例 + List portAreaList = new ArrayList<>(); + + //伪代码,测试使用 + if (false) { + try { + portAreaList = portAreasMapper.getList(); + } catch (Exception ignored) { + } + + } + + if (true) { + //获取本地库港区列表 + List mylist = portAreasMapper.getList(); + + CommonRes> map = orderApi.getPortAreasIdoList(""); + //定义港区列表实例 + // List portAreaList = new ArrayList<>(); + //判断接口数据获取是否成功 + if ("200".equals(map.getStatus())) { + //接口数据获取成功,将接口的Map的data数据转为接口对象的List + List 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; + + } + +} \ No newline at end of file diff --git a/interfaces/src/main/java/com/haitongauto/interfaces/impl/ReceivingVehicleInterfaceImpl.java b/interfaces/src/main/java/com/haitongauto/interfaces/impl/ReceivingVehicleInterfaceImpl.java new file mode 100644 index 0000000..ab46964 --- /dev/null +++ b/interfaces/src/main/java/com/haitongauto/interfaces/impl/ReceivingVehicleInterfaceImpl.java @@ -0,0 +1,119 @@ +package com.haitongauto.interfaces.impl; +import com.haitongauto.interfaces.OrderApi; +import com.haitongauto.interfaces.ReceivingVehicleInterface; +import com.haitongauto.mapper.base.RequesterMapper; +import com.haitongauto.models.ido.CheckRes; +import com.haitongauto.models.ido.CommonRes; +import com.haitongauto.models.ido.receiving.*; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; +@Slf4j +@Service +public class ReceivingVehicleInterfaceImpl implements ReceivingVehicleInterface { + @Autowired + RequesterMapper requesterMapper; + @Resource + private OrderApi orderApi; + + /** + * 获取收车凭证的分页数据(本用户数据) + * + * @param current 当前页码 + * @param size 数据条数(非必填 + * @return 返回收车凭证的分页数据 + */ + @Override + public ReceivingVehicleIdo_DTO getReceivingVehicleList(String printTicketTime, String query, Integer current, Integer size) { + //创建一个收车分页数据的实例(分页列表数据) + List mylist = null; + //接口数据转Map + CommonRes map = orderApi.getReceivingVehicleList(printTicketTime, query, current, size); + //判断接口数据获取是否成功 + String status = map.getStatus(); + ReceivingVehicleIdo_DTO receivingVehicleIdo_dto = new ReceivingVehicleIdo_DTO(); + switch (status) { + case "200": + //接口数据获取成功,将接口的Map的data数据转为接口对象的List + receivingVehicleIdo_dto.setStatus(status); + ReceivingVehicleIdoPar receivingVehicleIdoPar = map.getData(); + if (receivingVehicleIdoPar != null) { + mylist = receivingVehicleIdoPar.getRecords(); + receivingVehicleIdo_dto.setReceivingVehicleIdoList(mylist); + } + + break; + case "401": + //用户权限过期 + receivingVehicleIdo_dto.setStatus(status); + break; + default: + receivingVehicleIdo_dto.setStatus(status); + + break; + + } + + return receivingVehicleIdo_dto; + } + + /** + * 获取一条收车明细 + * + * @param id:收车id + * @return 返回一条收车明细 + */ + @Override + public ReceivingDetailIdo_DTO getReceivingDetailForId(String id) { + //创建一个收车详情数据的实例(基本数据+明细列表) + ReceivingDetailIdo receivingDetailIdo = new ReceivingDetailIdo(); + ReceivingDetailIdo_DTO receivingDetailIdo_dto = new ReceivingDetailIdo_DTO(); + //接口数据转Map + CommonRes map = orderApi.getReceivingDetailForId(id); + String status = map.getStatus(); + //判断接口数据获取是否成功 + if ("200".equals(status)) { + //接口数据获取成功,将接口的Map的data数据转为接口对象数据 + receivingDetailIdo_dto.setStatus("200"); + receivingDetailIdo = map.getData(); + if (receivingDetailIdo != null) { + receivingDetailIdo_dto.setReceivingDetailIdo(receivingDetailIdo); + } + + } + if ("401".equals(status)) { + receivingDetailIdo_dto.setStatus("401"); + } + return receivingDetailIdo_dto; + } + + /** + * 完成收车核验 + * + * @param id:收车id + * @return 返回完成收车核验结果 + */ + @Override + public boolean checkReceivingVehicle(String id) { + if (id == null || id.isEmpty()) { + return false; + } + CommonRes res = orderApi.checkReceivingVehicle(id); + //接口数据转Map + boolean result = false; + //判断接口数据获取是否成功 + if ("200".equals(res.getStatus())) { + //接口数据获取成功,将接口的Map的data数据转为接口对象数据,最后返回核验是否成功 true/false + /*{ + "errorMsg": "", //操作失败原因,成功则为 null + "result": true //操作结果 + }**/ + result = res.getData().isResult(); + + } + return result; + } + +} diff --git a/interfaces/src/main/java/com/haitongauto/interfaces/impl/UserInterfaceImpl.java b/interfaces/src/main/java/com/haitongauto/interfaces/impl/UserInterfaceImpl.java new file mode 100644 index 0000000..b53d26a --- /dev/null +++ b/interfaces/src/main/java/com/haitongauto/interfaces/impl/UserInterfaceImpl.java @@ -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; + } + +} diff --git a/interfaces/target/classes/com/haitongauto/interfaces/CusOrderApi.class b/interfaces/target/classes/com/haitongauto/interfaces/CusOrderApi.class new file mode 100644 index 0000000..ca9cb2f Binary files /dev/null and b/interfaces/target/classes/com/haitongauto/interfaces/CusOrderApi.class differ diff --git a/interfaces/target/classes/com/haitongauto/interfaces/CustomerServiceInterface.class b/interfaces/target/classes/com/haitongauto/interfaces/CustomerServiceInterface.class new file mode 100644 index 0000000..b8fcca6 Binary files /dev/null and b/interfaces/target/classes/com/haitongauto/interfaces/CustomerServiceInterface.class differ diff --git a/interfaces/target/classes/com/haitongauto/interfaces/DepartureVehicleInterface.class b/interfaces/target/classes/com/haitongauto/interfaces/DepartureVehicleInterface.class new file mode 100644 index 0000000..65fb259 Binary files /dev/null and b/interfaces/target/classes/com/haitongauto/interfaces/DepartureVehicleInterface.class differ diff --git a/interfaces/target/classes/com/haitongauto/interfaces/DicInterface.class b/interfaces/target/classes/com/haitongauto/interfaces/DicInterface.class new file mode 100644 index 0000000..be788d5 Binary files /dev/null and b/interfaces/target/classes/com/haitongauto/interfaces/DicInterface.class differ diff --git a/interfaces/target/classes/com/haitongauto/interfaces/EnterPortTypeInterface.class b/interfaces/target/classes/com/haitongauto/interfaces/EnterPortTypeInterface.class new file mode 100644 index 0000000..741bc3f Binary files /dev/null and b/interfaces/target/classes/com/haitongauto/interfaces/EnterPortTypeInterface.class differ diff --git a/interfaces/target/classes/com/haitongauto/interfaces/OrderApi.class b/interfaces/target/classes/com/haitongauto/interfaces/OrderApi.class new file mode 100644 index 0000000..a6add8f Binary files /dev/null and b/interfaces/target/classes/com/haitongauto/interfaces/OrderApi.class differ diff --git a/interfaces/target/classes/com/haitongauto/interfaces/PortAreaInterface.class b/interfaces/target/classes/com/haitongauto/interfaces/PortAreaInterface.class new file mode 100644 index 0000000..69ad5af Binary files /dev/null and b/interfaces/target/classes/com/haitongauto/interfaces/PortAreaInterface.class differ diff --git a/interfaces/target/classes/com/haitongauto/interfaces/ReceivingVehicleInterface.class b/interfaces/target/classes/com/haitongauto/interfaces/ReceivingVehicleInterface.class new file mode 100644 index 0000000..4f46dc5 Binary files /dev/null and b/interfaces/target/classes/com/haitongauto/interfaces/ReceivingVehicleInterface.class differ diff --git a/interfaces/target/classes/com/haitongauto/interfaces/UserInterface.class b/interfaces/target/classes/com/haitongauto/interfaces/UserInterface.class new file mode 100644 index 0000000..b72b63a Binary files /dev/null and b/interfaces/target/classes/com/haitongauto/interfaces/UserInterface.class differ diff --git a/interfaces/target/classes/com/haitongauto/interfaces/UsersApi.class b/interfaces/target/classes/com/haitongauto/interfaces/UsersApi.class new file mode 100644 index 0000000..6ca17de Binary files /dev/null and b/interfaces/target/classes/com/haitongauto/interfaces/UsersApi.class differ diff --git a/interfaces/target/classes/com/haitongauto/interfaces/impl/CustomerServiceInterfaceImpl.class b/interfaces/target/classes/com/haitongauto/interfaces/impl/CustomerServiceInterfaceImpl.class new file mode 100644 index 0000000..c7a4458 Binary files /dev/null and b/interfaces/target/classes/com/haitongauto/interfaces/impl/CustomerServiceInterfaceImpl.class differ diff --git a/interfaces/target/classes/com/haitongauto/interfaces/impl/DepartureVehicleInterfaceImpl.class b/interfaces/target/classes/com/haitongauto/interfaces/impl/DepartureVehicleInterfaceImpl.class new file mode 100644 index 0000000..70bde64 Binary files /dev/null and b/interfaces/target/classes/com/haitongauto/interfaces/impl/DepartureVehicleInterfaceImpl.class differ diff --git a/interfaces/target/classes/com/haitongauto/interfaces/impl/DicInterfaceImpl.class b/interfaces/target/classes/com/haitongauto/interfaces/impl/DicInterfaceImpl.class new file mode 100644 index 0000000..e936c5e Binary files /dev/null and b/interfaces/target/classes/com/haitongauto/interfaces/impl/DicInterfaceImpl.class differ diff --git a/interfaces/target/classes/com/haitongauto/interfaces/impl/EnterPortTypeInterfaceImpl.class b/interfaces/target/classes/com/haitongauto/interfaces/impl/EnterPortTypeInterfaceImpl.class new file mode 100644 index 0000000..24bf96f Binary files /dev/null and b/interfaces/target/classes/com/haitongauto/interfaces/impl/EnterPortTypeInterfaceImpl.class differ diff --git a/interfaces/target/classes/com/haitongauto/interfaces/impl/PortAreaInterfaceImpl.class b/interfaces/target/classes/com/haitongauto/interfaces/impl/PortAreaInterfaceImpl.class new file mode 100644 index 0000000..19ab18f Binary files /dev/null and b/interfaces/target/classes/com/haitongauto/interfaces/impl/PortAreaInterfaceImpl.class differ diff --git a/interfaces/target/classes/com/haitongauto/interfaces/impl/ReceivingVehicleInterfaceImpl.class b/interfaces/target/classes/com/haitongauto/interfaces/impl/ReceivingVehicleInterfaceImpl.class new file mode 100644 index 0000000..64f0b91 Binary files /dev/null and b/interfaces/target/classes/com/haitongauto/interfaces/impl/ReceivingVehicleInterfaceImpl.class differ diff --git a/interfaces/target/classes/com/haitongauto/interfaces/impl/UserInterfaceImpl.class b/interfaces/target/classes/com/haitongauto/interfaces/impl/UserInterfaceImpl.class new file mode 100644 index 0000000..9648cda Binary files /dev/null and b/interfaces/target/classes/com/haitongauto/interfaces/impl/UserInterfaceImpl.class differ diff --git a/interfaces/target/interfaces-1.0-SNAPSHOT.jar b/interfaces/target/interfaces-1.0-SNAPSHOT.jar new file mode 100644 index 0000000..76f9c6a Binary files /dev/null and b/interfaces/target/interfaces-1.0-SNAPSHOT.jar differ diff --git a/interfaces/target/maven-archiver/pom.properties b/interfaces/target/maven-archiver/pom.properties new file mode 100644 index 0000000..1292868 --- /dev/null +++ b/interfaces/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Mon Oct 30 20:58:41 CST 2023 +version=1.0-SNAPSHOT +groupId=org.example +artifactId=interfaces diff --git a/interfaces/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/interfaces/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..3f88ff5 --- /dev/null +++ b/interfaces/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,17 @@ +com\haitongauto\interfaces\UsersApi.class +com\haitongauto\interfaces\impl\UserInterfaceImpl.class +com\haitongauto\interfaces\impl\CustomerServiceInterfaceImpl.class +com\haitongauto\interfaces\PortAreaInterface.class +com\haitongauto\interfaces\EnterPortTypeInterface.class +com\haitongauto\interfaces\impl\DepartureVehicleInterfaceImpl.class +com\haitongauto\interfaces\ReceivingVehicleInterface.class +com\haitongauto\interfaces\impl\ReceivingVehicleInterfaceImpl.class +com\haitongauto\interfaces\impl\DicInterfaceImpl.class +com\haitongauto\interfaces\CusOrderApi.class +com\haitongauto\interfaces\impl\EnterPortTypeInterfaceImpl.class +com\haitongauto\interfaces\OrderApi.class +com\haitongauto\interfaces\UserInterface.class +com\haitongauto\interfaces\DicInterface.class +com\haitongauto\interfaces\DepartureVehicleInterface.class +com\haitongauto\interfaces\impl\PortAreaInterfaceImpl.class +com\haitongauto\interfaces\CustomerServiceInterface.class diff --git a/interfaces/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/interfaces/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..60c115b --- /dev/null +++ b/interfaces/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,17 @@ +F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\DepartureVehicleInterface.java +F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\EnterPortTypeInterface.java +F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\CustomerServiceInterface.java +F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\impl\PortAreaInterfaceImpl.java +F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\OrderApi.java +F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\impl\EnterPortTypeInterfaceImpl.java +F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\CusOrderApi.java +F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\impl\DicInterfaceImpl.java +F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\PortAreaInterface.java +F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\UsersApi.java +F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\impl\DepartureVehicleInterfaceImpl.java +F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\impl\ReceivingVehicleInterfaceImpl.java +F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\impl\CustomerServiceInterfaceImpl.java +F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\impl\UserInterfaceImpl.java +F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\DicInterface.java +F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\ReceivingVehicleInterface.java +F:\Codes\rtos\v3\interfaces\src\main\java\com\haitongauto\interfaces\UserInterface.java diff --git a/mapper/pom.xml b/mapper/pom.xml new file mode 100644 index 0000000..6469ed3 --- /dev/null +++ b/mapper/pom.xml @@ -0,0 +1,41 @@ + + + + rtos-wh + org.example + 1.0-SNAPSHOT + + 4.0.0 + + mapper + + + 1.8 + 1.8 + + + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + + 2.2.2 + + + + org.postgresql + postgresql + 42.5.4 + + + + org.example + models + 1.0-SNAPSHOT + + + + + \ No newline at end of file diff --git a/mapper/src/main/java/com/haitongauto/mapper/admin/AnnouncementAdminMapper.java b/mapper/src/main/java/com/haitongauto/mapper/admin/AnnouncementAdminMapper.java new file mode 100644 index 0000000..ab2f685 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/admin/AnnouncementAdminMapper.java @@ -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 getAuthorList(); + + /** + * 根据特定条件查询历史公告 + * @param tilKeywords:标题关键字 + * @param dateStart:日期范围之起始发布日期 + * @param dateEnd:日期范围之截止发布日期 + * @param sort:类别(1-小程序,2-客服平台) + * @param authors:作者/发布人/操作员 + * @return 返回特定条件查询历史公告 + */ + List AnnouncementListForCondition(@Param("tilKeywords") String tilKeywords, @Param("dateStart") Date dateStart, @Param("dateEnd") Date dateEnd, @Param("sort") Integer sort, @Param("list") List authors); + + List AnnouncementListForWeek(); + +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/admin/AppointmentAdminMapper.java b/mapper/src/main/java/com/haitongauto/mapper/admin/AppointmentAdminMapper.java new file mode 100644 index 0000000..d37de90 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/admin/AppointmentAdminMapper.java @@ -0,0 +1,37 @@ +package com.haitongauto.mapper.admin; + +import com.haitongauto.models.pojo.Appointment; +import com.haitongauto.models.pojo.AppointmentDetail; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +@Mapper +public interface AppointmentAdminMapper { + /** + * 车辆预约:通过港区、司机关键字、预约时间范围、进港类型、状态(1-已预约,0-已取消)、运输方式(0-自开/1-板车运输)单独或组合查询 + * @param port_area_id:港区id + * @param keywords:关键字(姓名、手机号、板车号) + * @param start_date:时间范围开始 + * @param end_date:时间范围结束 + * @param enter_type:进港类型(1-外贸出口,2-外贸进口,2-整车物流,3-特保区出口,4-特保区进口,5-内贸出口,6-内贸进口) + * @param appointment_state:预约状态(0-已取消,1-已预约) + * @param transport_type:运输方式(0-自开/1-板车运) + * @return 返回车辆预约 + */ + //List 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 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); + + ListAppointmentListExportyByIds(@Param("list") List ids); + + + /** + * 获取指定预约的货物明细 + * + * @param appointment_id 预约id + * @return 返回指定预约的货物明细 + */ + List appointmentGoodsDetail(@Param("appointment_id") String appointment_id); + +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/admin/FeedbackAdminMapper.java b/mapper/src/main/java/com/haitongauto/mapper/admin/FeedbackAdminMapper.java new file mode 100644 index 0000000..3863a4f --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/admin/FeedbackAdminMapper.java @@ -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 feedbackListForCondition(@Param("users_id") String users_id, @Param("linkTel") String linkTel, @Param("nikeName") String nikeName); +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/admin/NoviceIntroductionAdminMapper.java b/mapper/src/main/java/com/haitongauto/mapper/admin/NoviceIntroductionAdminMapper.java new file mode 100644 index 0000000..e6fa20f --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/admin/NoviceIntroductionAdminMapper.java @@ -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); + +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/admin/PunchClockAdminMapper.java b/mapper/src/main/java/com/haitongauto/mapper/admin/PunchClockAdminMapper.java new file mode 100644 index 0000000..91308f5 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/admin/PunchClockAdminMapper.java @@ -0,0 +1,31 @@ +package com.haitongauto.mapper.admin; + +import com.haitongauto.models.pojo.PunchClock; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +@Mapper +public interface PunchClockAdminMapper { + + /** + * 通过港区、业务类型、关键词、签到日期、签到状态(缺卡/正常)、打卡完成状态(缺卡/正常)单独或组合查询 + * + * @param port_area_id:港区id + * @param biz_type:业务类型 + * @param keywords:关键字(姓名、手机号、板车号) + * @param approach_date:进港日期 + * @param sign_in_state:签到状态(0-缺卡,1-正常) + * @param punch_state:完工打卡状态(0-缺卡,1-完工) + * @return 返回打卡记录列表 + */ + List PunchClockListForCondition(@Param("users_id") String users_id, @Param("port_area_id") String port_area_id, @Param("biz_type") Integer biz_type, @Param("keywords") String keywords, @Param("approach_date") String approach_date, @Param("sign_in_state") Integer sign_in_state, @Param("punch_state") Integer punch_state); + + /** + * 导出指定ids的打卡记录 + * @param ids 打卡记录ids + * @return 返回打卡记录 + */ + List getPunchClockListExportByIds(@Param("list") List ids); +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/admin/StatisticsAdminMapper.java b/mapper/src/main/java/com/haitongauto/mapper/admin/StatisticsAdminMapper.java new file mode 100644 index 0000000..1074a55 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/admin/StatisticsAdminMapper.java @@ -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); + +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/admin/UsersAdminMapper.java b/mapper/src/main/java/com/haitongauto/mapper/admin/UsersAdminMapper.java new file mode 100644 index 0000000..bb1e476 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/admin/UsersAdminMapper.java @@ -0,0 +1,18 @@ +package com.haitongauto.mapper.admin; +import com.haitongauto.models.pojo.Users; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +@Mapper +public interface UsersAdminMapper { + /** + * 根据用户ID、手机号、昵称、注册时间和用户状态查询小程序注册用户信息 + * @param keywords : 查询关键字(用户ID、手机号、昵称) + * @param registerDate:注册日期 + * @param usersState:用户状态 + * @return 注册用户信息列表 + */ + List usersListForCondition(@Param("keywords") String keywords, @Param("registerDate") String registerDate, @Param("usersState") Integer usersState); +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/AnnouncementMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/AnnouncementMapper.java new file mode 100644 index 0000000..2156790 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/AnnouncementMapper.java @@ -0,0 +1,20 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.Announcement; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 公告 + * + * @author : kchh + * @date : 2023-7-9 + */ +@Mapper +public interface AnnouncementMapper extends DataBaseMapper { + + //---BaseMapper继承自DataBaseMapper + List getListBySort(@Param("sort") Integer sort,@Param("keyWords") String keyWords); +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/AppointmentDetailMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/AppointmentDetailMapper.java new file mode 100644 index 0000000..2e1a305 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/AppointmentDetailMapper.java @@ -0,0 +1,38 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.AppointmentDetail; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 预约详细(详情) + * + * @author : kchh + * @date 2023-7-9 + */ +@Mapper +public interface AppointmentDetailMapper extends DataBaseMapper { + /** + * 根据预约id查询预约详情 + * + * @param appointment_id 预约id + * @return 返回预约详情 + */ + List getAppointmentDetailListByAppointmentId(@Param("appointment_id") String appointment_id); + + AppointmentDetail getAppointmentDetailByGoodVin(@Param("vin") String vin); + + List getAppointmentDetailByAppointmentIdList(@Param("list") List list); + + int deleteAppointmentDetailByAppointmentId(@Param("appointment_id") String appointment_id); + + List getAppointmentDetailListByGoodVinList(@Param("list") List list); + + /* 检查指定的VIN是否存在预约中 */ + Integer getVinAtAppointmentDetail(@Param("vin") String vin); + + List getAppointmentDetailListByVinList(@Param("list") List list); + +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/AppointmentMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/AppointmentMapper.java new file mode 100644 index 0000000..b3dca65 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/AppointmentMapper.java @@ -0,0 +1,74 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.Appointment; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; +import java.util.List; + +/** + * 预约信息 + * + * @author : kchh + * @date : 2023-7-9 + */ +@Mapper +public interface AppointmentMapper extends DataBaseMapper { + /** + * 根据车牌号查询预约信息列表 + * + * @param truck_number 车牌号 + * @return 返回预约信息列表 + */ + List getListByTruckName(@Param("truck_number") String truck_number); + + + /** + * 根据truck_vin查询预约信息列表 + * + * @param truck_vin truck_vin + * @return 返回预约信息列表 + */ + List 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 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 getAppointmentByIds(@Param("list") List list); + + /** + * 批量修改指令 + * + * @param list list + * @return aaa + */ + int batchUpdateAppointmentInstructState(@Param("list") List list); + + + List getAppointmentListByConditionf(@Param("startDate")Date startDate, + @Param("endDate")Date endDate, + @Param("portAreaId")String portAreaId, + @Param("truckNumber")String truckNumber, + @Param("shipId")String shipId, + @Param("instructState")Integer instructState, + @Param("brandId")String brandId); + + + Integer updateAppointmentPlateScanTime(@Param("appointment_id") String appointment_id); + + List getIdListNoInEn (); + + + Appointment getAppointmentByTruckName(@Param("truck_number") String truck_number); + +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/DataBaseMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/DataBaseMapper.java new file mode 100644 index 0000000..7125a06 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/DataBaseMapper.java @@ -0,0 +1,52 @@ +package com.haitongauto.mapper.base; + +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface DataBaseMapper { + + /** + * 插入 + * + * @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 getList(); +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/DepartureDetailMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/DepartureDetailMapper.java new file mode 100644 index 0000000..621f7b3 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/DepartureDetailMapper.java @@ -0,0 +1,12 @@ +package com.haitongauto.mapper.base; +import com.haitongauto.models.pojo.DepartureDetail; +import org.apache.ibatis.annotations.Mapper; + +/** + * 提车明细 + * @author : kchh + * @date : 2023-7-9 + */ +@Mapper +public interface DepartureDetailMapper extends DataBaseMapper { +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/DepartureVehicleMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/DepartureVehicleMapper.java new file mode 100644 index 0000000..61e09e5 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/DepartureVehicleMapper.java @@ -0,0 +1,12 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.DepartureVehicle; +import org.apache.ibatis.annotations.Mapper; +/** + * 提车信息 + * @author : kchh + * @date : 2023-7-9 + */ +@Mapper +public interface DepartureVehicleMapper extends DataBaseMapper { +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/DicMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/DicMapper.java new file mode 100644 index 0000000..1a8f588 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/DicMapper.java @@ -0,0 +1,27 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.Dic; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 通用数据字典表(数据源自RTOS) + * 运输方式 TRANSPORT_TYPE + * 进港类型 ENTER_PORT_TYPE + * 货物类型 CARGO_TYPE + * 操作模式 OPERATING_MODE + * 备 件 MACHINE_TYPE + * @author : kchh + * @date : 2023-7-9 + */ +@Mapper +public interface DicMapper extends DataBaseMapper{ + /** + * 根据字典分类参数获取字典数据列表 + * @param dic_sort:字典分类参数,如运输方式的 dic_sort=TRANSPORT_TYPE + * @return 返回字典数据列表 + */ + List getDicListByDicSort(@Param("dic_sort") String dic_sort); +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/EntryInstructMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/EntryInstructMapper.java new file mode 100644 index 0000000..12b2a59 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/EntryInstructMapper.java @@ -0,0 +1,13 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.EntryInstruct; +import org.apache.ibatis.annotations.Mapper; + +/** + * 进港指令 + * @author : kchh + * @date : 2023-7-9 + */ +@Mapper +public interface EntryInstructMapper extends DataBaseMapper{ +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/FeedbackMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/FeedbackMapper.java new file mode 100644 index 0000000..2bfc1a0 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/FeedbackMapper.java @@ -0,0 +1,14 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.Feedback; +import org.apache.ibatis.annotations.Mapper; + +/** + * 意见反馈 + * @author : kchh + * @date : 2023-7-9 + */ +@Mapper +public interface FeedbackMapper extends DataBaseMapper { + //---BaseMapper继承自DataBaseMapper +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/LoginLogMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/LoginLogMapper.java new file mode 100644 index 0000000..6389669 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/LoginLogMapper.java @@ -0,0 +1,11 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.LoginLog; +/** + * 用户登录日志 + * @author : kchh + * @date : 2023-7-9 + */ +public interface LoginLogMapper extends DataBaseMapper{ + //---LoginLogMapper继承自DataBaseMapper +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/MessageMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/MessageMapper.java new file mode 100644 index 0000000..c60293b --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/MessageMapper.java @@ -0,0 +1,26 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.Message; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +@Mapper +public interface MessageMapper extends DataBaseMapper { + List getMessageListByTruckNumber(@Param("truck_number") String truck_number); + + /** + * + * @return 返回结果 + */ + List getUnReadMessageListByTruckNumber(@Param("truck_number") String truck_number); + + /** + * 获得车辆最新消息 + * @param type 收车/发车 + * @param biz_id biz_id + * @return 返回消息 + */ + Message getLastMessageByTypeAndBizId(@Param("type") Integer type, @Param("biz_id") String biz_id); +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/NoviceIntroductionMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/NoviceIntroductionMapper.java new file mode 100644 index 0000000..f310347 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/NoviceIntroductionMapper.java @@ -0,0 +1,13 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.NoviceIntroduction; +import org.apache.ibatis.annotations.Mapper; +/** + * 新手攻略(小程序/客服平台/生产APP操作指南) + * @author : kchh + * @date : 2023-7-9 + */ +@Mapper +public interface NoviceIntroductionMapper extends DataBaseMapper { + //---BaseMapper继承自DataBaseMapper +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/PortAreasMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/PortAreasMapper.java new file mode 100644 index 0000000..ff0400c --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/PortAreasMapper.java @@ -0,0 +1,14 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.PortArea; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +/** + * 港区表(数据源自RTOS,请求时返回200,则使用数据,并更新表;否则,直接使用本表) + * @author : kchh + * @date : 2023-7-9 + */ +@Mapper +public interface PortAreasMapper extends DataBaseMapper { + //---BaseMapper继承自DataReqMapper +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/PunchClockMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/PunchClockMapper.java new file mode 100644 index 0000000..bbd7114 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/PunchClockMapper.java @@ -0,0 +1,32 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.PunchClock; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * (签到/完成)打卡信息 + * @author : kchh + * @date : 2023-7-9 + */ +@Mapper +public interface PunchClockMapper extends DataBaseMapper { + /** + * 根据预约id查询打卡记录 + * @param appointment_id 预约id + * @return 返回打卡记录 + */ + PunchClock getPunchClockByAppointmentId(@Param("appointment_id") String appointment_id ); + + /** + * 查询多个预约id 的打卡记录 + * @param appointmentIdList 预约id的集合 + * @return 返回打卡记录列表 + */ + List getPunchClockByAppointmentIdList(@Param("list") List appointmentIdList); + + + +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/ReceivingDetailMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/ReceivingDetailMapper.java new file mode 100644 index 0000000..eab99f9 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/ReceivingDetailMapper.java @@ -0,0 +1,13 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.ReceivingDetail; +import org.apache.ibatis.annotations.Mapper; + +/** + * 收车明细(数据源自RTOS) + * @author : kchh + * @date : 2023-7-9 + */ +@Mapper +public interface ReceivingDetailMapper extends DataBaseMapper{ +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/ReceivingVehicleMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/ReceivingVehicleMapper.java new file mode 100644 index 0000000..e6aa7eb --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/ReceivingVehicleMapper.java @@ -0,0 +1,20 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.ReceivingVehicle; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 收车信息(数据源自RTOS) + * @author : kchh + * @date : 2023-7-9 + */ +@Mapper +public interface ReceivingVehicleMapper extends DataBaseMapper{ + /** + * 根据凭证编号获取凭证id + * @param voucher_number 凭证编号 + * @return 返回凭证id + */ + ReceivingVehicle getIdByVoucherNo(@Param("voucher_number") String voucher_number); +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/RequesterMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/RequesterMapper.java new file mode 100644 index 0000000..f862661 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/RequesterMapper.java @@ -0,0 +1,16 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.Requester; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 请求第三方接口 + * @author : kchh + * @date 2023-7-9 + */ +@Mapper +public interface RequesterMapper extends DataBaseMapper { + //---BaseMapper继承自DataBaseMapper + Requester getRequesterForType(@Param("request_type") Integer request_type); +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/ServiceConfigMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/ServiceConfigMapper.java new file mode 100644 index 0000000..7947f9b --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/ServiceConfigMapper.java @@ -0,0 +1,14 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.ServiceConfig; + +import org.apache.ibatis.annotations.Mapper; + +/** + * 服务配置 + * @author : kchh + * @date : 2023-7-9 + */ +@Mapper +public interface ServiceConfigMapper extends DataBaseMapper { +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/TableHeadMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/TableHeadMapper.java new file mode 100644 index 0000000..efeca83 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/TableHeadMapper.java @@ -0,0 +1,20 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.TableHead; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 自定义表头(后台管理客户端可自定义勾选表头显示字段) + * @author : kchh + * @date : 2023-7-9 + */ +@Mapper +public interface TableHeadMapper extends DataBaseMapper{ + /** + * 根据表编号 + * @param table_code 表编号 + * @return 返回动态表头 + */ + TableHead queryByCode( @Param("table_code") String table_code); +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/TruckManagementMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/TruckManagementMapper.java new file mode 100644 index 0000000..5ebdef7 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/TruckManagementMapper.java @@ -0,0 +1,12 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.TruckManagement; +import org.apache.ibatis.annotations.Mapper; +/** + * 板车管理 + * @author :kchh + * @date : 2023-7-9 + */ +@Mapper +public interface TruckManagementMapper extends DataBaseMapper { +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/TruckMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/TruckMapper.java new file mode 100644 index 0000000..b0987e3 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/TruckMapper.java @@ -0,0 +1,27 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.Truck; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 板车信息(用户扫描行驶证获取) + * @author : kchh + * @date : 2023-7-9 + */ +@Mapper +public interface TruckMapper extends DataBaseMapper{ + /** + * 根据用户id查询板车信息 + * @param users_id:用户id + * @return 返回板车信息 + */ + Truck getTruckByUsersId(@Param("users_id")String users_id); + + /** + * 根据用户id查询板车信息 + * @param wx_openid:用户id + * @return 返回板车信息 + */ + Truck getTruckByOpenId(@Param("wx_openid")String wx_openid); +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/base/UsersMapper.java b/mapper/src/main/java/com/haitongauto/mapper/base/UsersMapper.java new file mode 100644 index 0000000..ef20ab6 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/base/UsersMapper.java @@ -0,0 +1,17 @@ +package com.haitongauto.mapper.base; + +import com.haitongauto.models.pojo.Users; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 用户(司机)信息 + * + * @author : kchh + * @date : 2023-7-9 + */ +@Mapper +public interface UsersMapper extends DataBaseMapper { + Users getByWxOpenid(@Param("wx_openid") String wx_openid); + +} \ No newline at end of file diff --git a/mapper/src/main/java/com/haitongauto/mapper/client/AppointmentExtendMapper.java b/mapper/src/main/java/com/haitongauto/mapper/client/AppointmentExtendMapper.java new file mode 100644 index 0000000..794cadd --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/client/AppointmentExtendMapper.java @@ -0,0 +1,103 @@ +package com.haitongauto.mapper.client; + +import com.haitongauto.models.pojo.Appointment; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.time.LocalDate; +import java.util.List; + +/** + * 预约类扩展Mapper + */ +@Mapper +public interface AppointmentExtendMapper { + /** + * 获取用户指定状态(1-已预约,2-已签到,3-已进港,5-操作中,6-已完成,7-已出港,4-已取消,9-异常)数据 + * + * @param users_id 用户id + * @param appointment_state 预约状态 + * @return 返回用户指定状态的预约信息列表 + */ + List getAppointmentListForAny(@Param("users_id") String users_id, @Param("appointment_state") Integer appointment_state); + + /** + * 我的预约信息列表 + * + * @param users_id 用户id + * @return 返回我的预约信息列表 + */ + List getMyAppointmentList(@Param("users_id") String users_id); + + /** + * 根据预约日期查询我的预约信息 + * + * @param users_id 用户id + * @param approach_date 进港日期 + * @return 返回预约信息 + */ + List 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 getMyAppointmentListForIdList(@Param("users_id") String users_id, @Param("id_list") List id_list); + + /** + * 获取指定用户预约未完成的数据(备注:appointment_state: 1-已预约,2-已签到,3-已进港,5-操作中,6-已完成,7-已出港,4-已取消,9-异常)数据 + * + * @param users_id 用户id + * @return 返回指定用户预约未完成的数据 + */ + Appointment getActiveAppointment(@Param("users_id") String users_id); + + /** + * 取消预约 + * + * @param cancel_time 取消时间 + * @param appointment_id 预约id + * @return 返回执行结果 + */ + Integer cancelAppointment(@Param("cancel_time") String cancel_time, @Param("appointment_id") String appointment_id); + + + Integer cancelAppointmentDetails(@Param("appointment_id") String appointment_id); + + /** + * 获取我的当前预约 + * + * @param users_id 用户id + * @return 返回我的当前预约 + */ + Appointment getMyAppointment(@Param("users_id") String users_id); + + /** + * 模糊查询(船名、航次),返回符合条件的预约记录明细Id列表 + * + * @param keywords 查询关键字(船名、航次) + * @return 返回预约id列表 + */ + List 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 getAppointmentListForCondition(@Param("users_id") String users_id, @Param("keywords") String keywords, @Param("approach_date") String approach_date); + + +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/client/OtherExtendMapper.java b/mapper/src/main/java/com/haitongauto/mapper/client/OtherExtendMapper.java new file mode 100644 index 0000000..b13ca4f --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/client/OtherExtendMapper.java @@ -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 getLastAnnouncementsList(); + + /** + * 获取发送给指定用户的(最近10条)指令信息 + * @param users_id 用户id + * @return 返回指定发送给指定用户的(最近10条)指令信息 + */ + List 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); +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/client/PunchClockExtendMapper.java b/mapper/src/main/java/com/haitongauto/mapper/client/PunchClockExtendMapper.java new file mode 100644 index 0000000..7c97d97 --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/client/PunchClockExtendMapper.java @@ -0,0 +1,66 @@ +package com.haitongauto.mapper.client; + +import com.haitongauto.models.pojo.PunchClock; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.time.LocalDate; +import java.util.Date; +import java.util.List; + +/** + * 打卡类扩展Mapper + */ +@Mapper +public interface PunchClockExtendMapper { + /** + * 根据预约Id获取获取打卡记录 + * + * @param appointment_id 预约id + * @return 返回打卡记录 + */ + PunchClock getPunchClockForAppintementId(@Param("appointment_id") String appointment_id); + + /** + * 获取指定日期的最后一个签到打卡编号 + * + * @param date 指定日期 + * @return 返回最后一个签到打卡编号 + */ + String getLastQueueNumber(@Param("date") Date date, @Param("port_area_id") String port_area_id); + + /** + * 查询指定司机某一天(指定日期)的打卡记录 + * + * @param date 指定日期 + * @param users_id 用户id + * @return 返回打卡记录 + */ + List getPunchClockForDate(@Param("date") String date, @Param("users_id") String users_id); + + /** + * 查询指定司机某年某月的打卡记录 + * + * @param users_id 用户id + * @return 返回打卡记录 + */ + List 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); +} diff --git a/mapper/src/main/java/com/haitongauto/mapper/client/TruckExtendMapper.java b/mapper/src/main/java/com/haitongauto/mapper/client/TruckExtendMapper.java new file mode 100644 index 0000000..4b4264c --- /dev/null +++ b/mapper/src/main/java/com/haitongauto/mapper/client/TruckExtendMapper.java @@ -0,0 +1,54 @@ +package com.haitongauto.mapper.client; + +import com.haitongauto.models.pojo.Truck; +import com.haitongauto.models.pojo.TruckManagement; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +@Mapper +public interface TruckExtendMapper{ + /** + * 根据用户Id查车牌号 + * @param users_id 用户id + * @return 返回车牌号 + */ + String getTruckNumberForUid(@Param("users_id") String users_id); + + /** + * 获取指定用户的板车信息 + * @param users_id 用户id + * @return 返回指定用户的板车信息 + */ + List 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 getMyTruckManagement(@Param("users_id") String users_id); + + /** + * 根据车牌号查用户信息 + * @param truck_number 车牌号 + * @return 返回用户信息 + */ + // + String getUidByTruckNo(String truck_number); +} diff --git a/mapper/src/main/resources/mappers/admin/AnnouncementAdminMapper.xml b/mapper/src/main/resources/mappers/admin/AnnouncementAdminMapper.xml new file mode 100644 index 0000000..72fced7 --- /dev/null +++ b/mapper/src/main/resources/mappers/admin/AnnouncementAdminMapper.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/admin/AppointmentAdminMapper.xml b/mapper/src/main/resources/mappers/admin/AppointmentAdminMapper.xml new file mode 100644 index 0000000..b35c961 --- /dev/null +++ b/mapper/src/main/resources/mappers/admin/AppointmentAdminMapper.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/admin/FeedbackAdminMapper.xml b/mapper/src/main/resources/mappers/admin/FeedbackAdminMapper.xml new file mode 100644 index 0000000..64c1dc4 --- /dev/null +++ b/mapper/src/main/resources/mappers/admin/FeedbackAdminMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/admin/NoviceIntroductionAdminMapper.xml b/mapper/src/main/resources/mappers/admin/NoviceIntroductionAdminMapper.xml new file mode 100644 index 0000000..51af3e7 --- /dev/null +++ b/mapper/src/main/resources/mappers/admin/NoviceIntroductionAdminMapper.xml @@ -0,0 +1,21 @@ + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/admin/PunchClockAdminMapper.xml b/mapper/src/main/resources/mappers/admin/PunchClockAdminMapper.xml new file mode 100644 index 0000000..b5a304d --- /dev/null +++ b/mapper/src/main/resources/mappers/admin/PunchClockAdminMapper.xml @@ -0,0 +1,72 @@ + + + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/admin/StatisticsAdminMapper.xml b/mapper/src/main/resources/mappers/admin/StatisticsAdminMapper.xml new file mode 100644 index 0000000..381f800 --- /dev/null +++ b/mapper/src/main/resources/mappers/admin/StatisticsAdminMapper.xml @@ -0,0 +1,340 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/admin/UsersAdminMapper.xml b/mapper/src/main/resources/mappers/admin/UsersAdminMapper.xml new file mode 100644 index 0000000..c6aa8de --- /dev/null +++ b/mapper/src/main/resources/mappers/admin/UsersAdminMapper.xml @@ -0,0 +1,36 @@ + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/AnnouncementMapper.xml b/mapper/src/main/resources/mappers/base/AnnouncementMapper.xml new file mode 100644 index 0000000..ae80dc4 --- /dev/null +++ b/mapper/src/main/resources/mappers/base/AnnouncementMapper.xml @@ -0,0 +1,134 @@ + + + + + + + + + update applet_announcement set is_del=1 where id=#{id} + + + + delete from applet_announcement where id=#{id} + + + + update applet_announcement + + + id = #{id}, + + + sort = #{sort}, + + + title = #{title}, + + + abstracts = #{abstracts}, + + + announcement = #{announcement}, + + + announcement_text = #{announcement_text}, + + + author = #{author}, + + + reading_volume = #{reading_volume}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/AppointmentDetailMapper.xml b/mapper/src/main/resources/mappers/base/AppointmentDetailMapper.xml new file mode 100644 index 0000000..3948bd3 --- /dev/null +++ b/mapper/src/main/resources/mappers/base/AppointmentDetailMapper.xml @@ -0,0 +1,160 @@ + + + + + + + + + update applet_appointment_detail set is_del=1 where id=#{id} + + + + delete from applet_appointment_detail + where id=#{id} + + + + update applet_appointment_detail + + + id = #{id}, + + + appointment_id = #{appointment_id}, + + + ship_id = #{ship_id}, + + + ship_name = #{ship_name}, + + + voy_number = #{voy_number}, + + + destination_port = #{destination_port}, + + + destination_port_id = #{destination_port_id}, + + + brand_id = #{brand_id}, + + + brand_name = #{brand_name}, + + + vin = #{vin}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time =current_timestamp + + where id = #{id} + + + + + + + + + + + + delete from applet_appointment_detail + where appointment_id=#{appointment_id} + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/AppointmentMapper.xml b/mapper/src/main/resources/mappers/base/AppointmentMapper.xml new file mode 100644 index 0000000..b341cc8 --- /dev/null +++ b/mapper/src/main/resources/mappers/base/AppointmentMapper.xml @@ -0,0 +1,346 @@ + + + + + + + + + update applet_appointment set is_del=1 where id=#{id} + + + + delete from applet_appointment where id=#{id} + + + + update applet_appointment + + + id = #{id}, + + + users_id = #{users_id}, + + + transport_type = #{transport_type}, + + + truck_number = #{truck_number}, + + + tel_number = #{tel_number}, + + + id_code = #{id_code}, + + + truck_vin = #{truck_vin}, + + + vehicle_weight = #{vehicle_weight}, + + + vehicle_frame_weight = #{vehicle_frame_weight}, + + + driving_license = #{driving_license}, + + + approach_date = #{approach_date}::date, + + + port_area_id = #{port_area_id}, + + + biz_type = #{biz_type}, + + + enter_type = #{enter_type}, + + + goods_type = #{goods_type}, + + + goods_quantity = #{goods_quantity}, + + + appointment_state = #{appointment_state}, + + + cancel_time = #{cancel_time}::timestamp, + + + create_time = #{create_time}::timestamp, + + + appointment_type = #{appointment_type}, + + + is_del = #{is_del}, + + + yard = #{yard}, + + + yard_name = #{yard_name}, + + + gate_canal_in = #{gate_canal_in}, + + + gate_canal_out = #{gate_canal_out}, + + + gate_canal_in_time= #{gate_canal_in_time}::timestamp, + + + gate_canal_out_time=#{gate_canal_out_time}::timestamp, + + + instruct_state = #{instruct_state}, + + + send_time =# {send_time}::timestamp, + + + sender = #{sender}, + + + check_in_time = #{check_in_time}::timestamp, + + + check_over_time = #{check_over_time}::timestamp, + + + plate_scan_time = #{plate_scan_time}::timestamp, + + + is_conventionality_in = #{is_conventionality_in}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + + + + + + + + + + + + + + + + + + update applet_appointment + + + id = #{item.id}, + + + yard = #{item.yard}, + + + sender = #{item.sender}, + + + yard_name = #{item.yard_name}, + + + gate_canal_in = #{item.gate_canal_in}, + + + instruct_state = #{item.instruct_state}, + + send_time =current_timestamp, + update_time = current_timestamp + + where id = #{item.id} + + + + + + update applet_appointment + + plate_scan_time = current_timestamp + + where id = #{appointment_id} + + + + + + + + + + diff --git a/mapper/src/main/resources/mappers/base/DepartureDetailMapper.xml b/mapper/src/main/resources/mappers/base/DepartureDetailMapper.xml new file mode 100644 index 0000000..3f9e3ea --- /dev/null +++ b/mapper/src/main/resources/mappers/base/DepartureDetailMapper.xml @@ -0,0 +1,118 @@ + + + + + + + + + update applet_departure_detail set is_del=1 where id=#{id} + + + + delete from applet_departure_detail where id=#{id} + + + + update applet_departure_detail + + + id = #{id}, + + + applet_departure_vehicle_id = #{applet_departure_vehicle_id}, + + + receiving_unit = #{receiving_unit}, + + + ship_name = #{ship_name}, + + + voy_number = #{voy_number}, + + + customs_clearance_nature = #{customs_clearance_nature}, + + + lading_no = #{lading_no}, + + + customs_declaration_no = #{customs_declaration_no}, + + + cargo_name = #{cargo_name}, + + + cargo_quantity = #{cargo_quantity}, + + + remarks = #{remarks}, + + + vin_list = #{vin_list}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/DepartureVehicleMapper.xml b/mapper/src/main/resources/mappers/base/DepartureVehicleMapper.xml new file mode 100644 index 0000000..03f45f2 --- /dev/null +++ b/mapper/src/main/resources/mappers/base/DepartureVehicleMapper.xml @@ -0,0 +1,175 @@ + + + + + + + + + update applet_departure_vehicle set is_del=1 where id=#{id} + + + + delete from applet_departure_vehicle where id=#{id} + + + + update applet_departure_vehicle + + + id = #{id}, + + + voucher_number = #{voucher_number}, + + + users_id = #{users_id}, + + + users_name = #{users_name}, + + + tel_number = #{tel_number}, + + + operators = #{operators}, + + + phone_number = #{phone_number}, + + + truck_number = #{truck_number}, + + + trade_type = #{trade_type}, + + + cargo_type = #{cargo_type}, + + + cargo_quantity = #{cargo_quantity}, + + + delivery_time = #{delivery_time}::timestamp, + + + checker = #{checker}, + + + check_status = #{check_status}, + + + check_time = #{check_time}::timestamp, + + + remarks = #{remarks}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/DicMapper.xml b/mapper/src/main/resources/mappers/base/DicMapper.xml new file mode 100644 index 0000000..d4df840 --- /dev/null +++ b/mapper/src/main/resources/mappers/base/DicMapper.xml @@ -0,0 +1,96 @@ + + + + + + + + + update applet_dic set is_del=1 where id=#{id} + + + + delete from applet_dic where id=#{id} + + + + update applet_dic + + + id = #{id}, + + + dic_sort = #{dic_sort}, + + + description = #{description}, + + + content = #{content}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time =current_timestamp + + where id = #{id} + + + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/EntryInstructMapper.xml b/mapper/src/main/resources/mappers/base/EntryInstructMapper.xml new file mode 100644 index 0000000..f078833 --- /dev/null +++ b/mapper/src/main/resources/mappers/base/EntryInstructMapper.xml @@ -0,0 +1,90 @@ + + + + + + + + + update applet_entry_instruct set is_del=1 where id=#{id} + + + + delete from applet_entry_instruct where id=#{id} + + + + update applet_entry_instruct + + + id = #{id}, + + + appointment_id = #{appointment_id}, + + + users_id = #{users_id}, + + + users_name = #{users_name}, + + + truck_number = #{truck_number}, + + + yard_name = #{yard_name}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/FeedbackMapper.xml b/mapper/src/main/resources/mappers/base/FeedbackMapper.xml new file mode 100644 index 0000000..612c4eb --- /dev/null +++ b/mapper/src/main/resources/mappers/base/FeedbackMapper.xml @@ -0,0 +1,95 @@ + + + + + + + + + update applet_feedback set is_del=1 where id=#{id} + + + + delete from applet_feedback where id=#{id} + + + + update applet_feedback + + + id = #{id}, + + + users_id = #{users_id}, + + + nike_name = #{nike_name}, + + + feedback_info = #{feedback_info}, + + + pictures = #{pictures}, + + + tel_number = #{tel_number}, + + + contact_info = #{contact_info}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/LoginLogMapper.xml b/mapper/src/main/resources/mappers/base/LoginLogMapper.xml new file mode 100644 index 0000000..ae18ad4 --- /dev/null +++ b/mapper/src/main/resources/mappers/base/LoginLogMapper.xml @@ -0,0 +1,43 @@ + + + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/MessageMapper.xml b/mapper/src/main/resources/mappers/base/MessageMapper.xml new file mode 100644 index 0000000..4de4021 --- /dev/null +++ b/mapper/src/main/resources/mappers/base/MessageMapper.xml @@ -0,0 +1,127 @@ + + + + + + + + + update applet_message set is_del=1 where id=#{id} + + + + delete from applet_message where id=#{id} + + + + update applet_message + + + id = #{id}, + + + type = #{type}, + + + type_content = #{type_content}, + + + + biz_id = #{biz_id}, + + + prc_id = #{prc_id}, + + + truck_number = #{truck_number}, + + + is_read = #{is_read}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp, + + where id=#{id} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/NoviceIntroductionMapper.xml b/mapper/src/main/resources/mappers/base/NoviceIntroductionMapper.xml new file mode 100644 index 0000000..f24c70b --- /dev/null +++ b/mapper/src/main/resources/mappers/base/NoviceIntroductionMapper.xml @@ -0,0 +1,84 @@ + + + + + + + + + update applet_novice_introduction set is_del=1 where id=#{id} + + + + delete from applet_novice_introduction where id=#{id} + + + + update applet_novice_introduction + + + id = #{id}, + + + sort = #{sort}, + + + title = #{title}, + + + content = #{content}, + + + sequence_number = #{sequence_number}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time =current_timestamp + + where id = #{id} + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/PortAreasMapper.xml b/mapper/src/main/resources/mappers/base/PortAreasMapper.xml new file mode 100644 index 0000000..f1cf423 --- /dev/null +++ b/mapper/src/main/resources/mappers/base/PortAreasMapper.xml @@ -0,0 +1,115 @@ + + + + + + + + + update applet_port_areas set is_del=1 where id=#{id} + + + + delete from applet_port_areas where id=#{id} + + + + update applet_port_areas + + + id = #{id}, + + + port_area_name = #{port_area_name}, + + + port_area_name_en = #{port_area_name_en}, + + + port_area_code = #{port_area_code}, + + + port_area_address = #{port_area_address}, + + + area_center_poi = #{area_center_poi}, + + + punch_range = #{punch_range}, + + + is_enable = #{is_enable}, + + + order_items = #{order_items}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/PunchClockMapper.xml b/mapper/src/main/resources/mappers/base/PunchClockMapper.xml new file mode 100644 index 0000000..58fd77b --- /dev/null +++ b/mapper/src/main/resources/mappers/base/PunchClockMapper.xml @@ -0,0 +1,142 @@ + + + + + + + + + update applet_punch_clock set is_del=1 where id=#{id} + + + + delete from applet_punch_clock where id=#{id} + + + + update applet_punch_clock + + + id = #{id}, + + + users_id = #{users_id}, + + + appointment_id = #{appointment_id}, + + + biz_type = #{biz_type}, + + + queue_number = #{queue_number}, + + + start_time = #{start_time}::timestamp, + + + over_time = #{over_time}::timestamp, + + + port_area_id = #{port_area_id}, + + + punch_address = #{punch_address}, + + + over_address = #{over_address}, + + + punch_clock_type = #{punch_clock_type}, + + + punch_clock_poi = #{punch_clock_poi}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/ReceivingDetailMapper.xml b/mapper/src/main/resources/mappers/base/ReceivingDetailMapper.xml new file mode 100644 index 0000000..2a96603 --- /dev/null +++ b/mapper/src/main/resources/mappers/base/ReceivingDetailMapper.xml @@ -0,0 +1,89 @@ + + + + + + + + + update applet_receiving_detail set is_del=1 where id=#{id} + + + + delete from applet_receiving_detail where id=#{id} + + + + update applet_receiving_detail + + + id = #{id}, + + + applet_receiving_vehicle_id = #{applet_receiving_vehicle_id}, + + + ship_name = #{ship_name}, + + + brand = #{brand}, + + + port_name = #{port_name}, + + + vin_list = #{vin_list}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/ReceivingVehicleMapper.xml b/mapper/src/main/resources/mappers/base/ReceivingVehicleMapper.xml new file mode 100644 index 0000000..dd1e8e5 --- /dev/null +++ b/mapper/src/main/resources/mappers/base/ReceivingVehicleMapper.xml @@ -0,0 +1,153 @@ + + + + + + + + + update applet_receiving_vehicle set is_del=1 where id=#{id} + + + + delete from applet_receiving_vehicle where id=#{id} + + + + update applet_receiving_vehicle + + + id = #{id}, + + + voucher_number = #{voucher_number}, + + + users_id = #{users_id}, + + + users_name = #{users_name}, + + + tel_number = #{tel_number}, + + + operators = #{operators}, + + + phone_number = #{phone_number}, + + + numbers = #{numbers}, + + + number_type = #{number_type}, + + + trade_type = #{trade_type}, + + + cargo_type = #{cargo_type}, + + + cargo_quantity = #{cargo_quantity}, + + + collect_time = #{collect_time}::timestamp, + + + checker = #{checker}, + + + check_status = #{check_status}, + + + check_time = #{check_time}::timestamp, + + + remarks = #{remarks}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time =current_timestamp + + where id = #{id} + + + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/RequesterMapper.xml b/mapper/src/main/resources/mappers/base/RequesterMapper.xml new file mode 100644 index 0000000..0f7e2e5 --- /dev/null +++ b/mapper/src/main/resources/mappers/base/RequesterMapper.xml @@ -0,0 +1,92 @@ + + + + + + + + + update applet_requester set is_del=1 where id=#{id} + + + + delete from applet_requester where id=#{id} + + + + update applet_requester + + + id = #{id}, + + + url = #{url}, + + + param_map = #{param_map}, + + + request_type = #{request_type}, + + + type_description = #{type_description}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp, + + where id = #{id} + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/ServiceConfigMapper.xml b/mapper/src/main/resources/mappers/base/ServiceConfigMapper.xml new file mode 100644 index 0000000..85ca82a --- /dev/null +++ b/mapper/src/main/resources/mappers/base/ServiceConfigMapper.xml @@ -0,0 +1,79 @@ + + + + + + + + + update applet_service_config set is_del=1 where id=#{id} + + + + delete from applet_service_config where id=#{id} + + + + update applet_service_config + + + id = #{id}, + + + config_name = #{config_name}, + + + config_code = #{config_code}, + + + config_content = #{config_content}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/TableHeadMapper.xml b/mapper/src/main/resources/mappers/base/TableHeadMapper.xml new file mode 100644 index 0000000..3119ea4 --- /dev/null +++ b/mapper/src/main/resources/mappers/base/TableHeadMapper.xml @@ -0,0 +1,90 @@ + + + + + + + + + update applet_table_head + set is_del=1 + where id=#{id} + + + + delete from applet_table_head where id=#{id} + + + + update applet_table_head + + + id = #{id}, + + + table_name = #{table_name}, + + + table_code = #{table_code}, + + + head_jason = #{head_jason}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/TruckManagementMapper.xml b/mapper/src/main/resources/mappers/base/TruckManagementMapper.xml new file mode 100644 index 0000000..e55ee46 --- /dev/null +++ b/mapper/src/main/resources/mappers/base/TruckManagementMapper.xml @@ -0,0 +1,105 @@ + + + + + + + + + + update applet_truck_management set is_del=1 where id=#{id} + + + + delete from applet_truck_management where id=#{id} + + + + update applet_truck_management + + + id = #{id}, + + + users_id = #{users_id}, + + + truck_number = #{truck_number}, + + + cause = #{cause}, + + + drivers_name = #{drivers_name}, + + + drivers_phone = #{drivers_phone}, + + + administrators_name = #{administrators_name}, + + + administrators_phone = #{administrators_phone}, + + + enter_time = #{enter_time}::timestamp, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time =current_timestamp + + where id = #{id} + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/TruckMapper.xml b/mapper/src/main/resources/mappers/base/TruckMapper.xml new file mode 100644 index 0000000..09234fa --- /dev/null +++ b/mapper/src/main/resources/mappers/base/TruckMapper.xml @@ -0,0 +1,175 @@ + + + + + + + + + + update applet_truck set is_del=1 where id=#{id} + + + + delete from applet_truck where id=#{id} + + + + update applet_truck + + + id = #{id}, + + + wx_openid = #{wx_openid}, + + + users_id = #{users_id}, + + + truck_number = #{truck_number}, + + + driving_license_id = #{driving_license_id}, + + + tel_number = #{tel_number}, + + + head_frame_number = #{head_frame_number}, + + + vehicle_weight = #{vehicle_weight}, + + + vehicle_frame_weight = #{vehicle_frame_weight}, + + + driving_license = #{driving_license}, + + + truck_state = #{truck_state}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/base/UsersMapper.xml b/mapper/src/main/resources/mappers/base/UsersMapper.xml new file mode 100644 index 0000000..01732c4 --- /dev/null +++ b/mapper/src/main/resources/mappers/base/UsersMapper.xml @@ -0,0 +1,170 @@ + + + + + + + + + update applet_users set is_del=1 where id=#{id} + + + + delete from applet_users where id=#{id} + + + + update applet_users + + + id = #{id}, + + + access_token = #{access_token}, + + + access_token_rtos = #{access_token_rtos}, + + + users_name = #{users_name}, + + + wx_openid = #{wx_openid}, + + + wx_unionid = #{wx_unionid}, + + + wx_nick = #{wx_nick}, + + + wx_sex = #{wx_sex}, + + + wx_head_sculpture = #{wx_head_sculpture}, + + + tel_number = #{tel_number}, + + + id_code = #{id_code}, + + + users_state = #{users_state}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/client/AppointmentExtendMapper.xml b/mapper/src/main/resources/mappers/client/AppointmentExtendMapper.xml new file mode 100644 index 0000000..9a7a79c --- /dev/null +++ b/mapper/src/main/resources/mappers/client/AppointmentExtendMapper.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + update applet_appointment + set + cancel_time = #{cancel_time}::timestamp, + appointment_state=4 + where id=#{appointment_id} + + + + update applet_appointment_detail + set is_del=1 + where id=#{appointment_id} + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/client/OtherExtendMapper.xml b/mapper/src/main/resources/mappers/client/OtherExtendMapper.xml new file mode 100644 index 0000000..def25c4 --- /dev/null +++ b/mapper/src/main/resources/mappers/client/OtherExtendMapper.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/client/PunchClockExtendMapper.xml b/mapper/src/main/resources/mappers/client/PunchClockExtendMapper.xml new file mode 100644 index 0000000..e29f739 --- /dev/null +++ b/mapper/src/main/resources/mappers/client/PunchClockExtendMapper.xml @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/mappers/client/TruckExtendMapper.xml b/mapper/src/main/resources/mappers/client/TruckExtendMapper.xml new file mode 100644 index 0000000..7ce818b --- /dev/null +++ b/mapper/src/main/resources/mappers/client/TruckExtendMapper.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + update applet_truck + set + truck_state=0 + where users_id=#{users_id} and truck_state<>4 + + + + + + + + + \ No newline at end of file diff --git a/mapper/src/main/resources/static/rtos-wx-applet.sql b/mapper/src/main/resources/static/rtos-wx-applet.sql new file mode 100644 index 0000000..f1e5c64 --- /dev/null +++ b/mapper/src/main/resources/static/rtos-wx-applet.sql @@ -0,0 +1,671 @@ +--RTOS小程序数据库 sql文档 + +-- Database: rtos-wx-applet +-- DROP DATABASE IF EXISTS rtos-wx-applet; + +CREATE DATABASE rtos_wx_applet + WITH + OWNER = postgres + ENCODING = 'UTF8' + LC_COLLATE = 'Chinese (Simplified)_China.936' + LC_CTYPE = 'Chinese (Simplified)_China.936' + TABLESPACE = pg_default + CONNECTION LIMIT = -1 + IS_TEMPLATE = False; +COMMENT ON DATABASE rtos_wx_applet IS 'RTOS小程序数据库'; + + +--1-用户(司机)信息 +CREATE TABLE IF NOT EXISTS public.applet_users( + id serial, + users_name varchar(32) DEFAULT NULL, + wx_openid varchar(32) DEFAULT NULL, + wx_unionid varchar(32) DEFAULT NULL, + wx_nick varchar(32) DEFAULT NULL, + wx_sex varchar(8) DEFAULT NULL, + wx_head_sculpture varchar(256) DEFAULT NULL, + tel_number varchar(32) NOT NULL, + id_code varchar(32) DEFAULT NULL, + users_state integer DEFAULT 0, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_users_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_users.id IS '用户id'; +COMMENT ON COLUMN applet_users.users_name IS '用户姓名,默认为微信昵称'; +COMMENT ON COLUMN applet_users.wx_openid IS '微信获取openid-用户小程序唯一标识'; +COMMENT ON COLUMN applet_users.wx_unionid IS '微信获取unionid-用户微信应用唯一标识'; +COMMENT ON COLUMN applet_users.wx_nick IS '微信获取昵称'; +COMMENT ON COLUMN applet_users.wx_sex IS '微信获取性别'; +COMMENT ON COLUMN applet_users.wx_head_sculpture IS '微信获取头像'; +COMMENT ON COLUMN applet_users.tel_number IS '手机号码'; +COMMENT ON COLUMN applet_users.id_code IS '用户身分证号码'; +COMMENT ON COLUMN applet_users.users_state IS '用户状态(0-正常,1-停用)'; +COMMENT ON COLUMN applet_users.create_time IS '创建时间'; +COMMENT ON COLUMN applet_users.update_time IS '更新时间'; +COMMENT ON COLUMN applet_users.is_del IS '是否软删除'; + + +--2-板车信息(用户扫描行驶证获取) +CREATE TABLE IF NOT EXISTS public.applet_truck( + id serial, + users_id integer, + truck_number varchar(16) DEFAULT NULL, + driving_license_id varchar(32) DEFAULT NULL, + tel_number varchar(16) DEFAULT NULL, + head_frame_number varchar(32) DEFAULT NULL, + vehicle_weight integer DEFAULT NULL, + vehicle_frame_weight integer DEFAULT NULL, + customs_declaration_no varchar(32) DEFAULT NULL, + driving_license varchar(256) DEFAULT NULL, + truck_state integer default 0, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_truck_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_truck.id IS '板车id'; +COMMENT ON COLUMN applet_truck.users_id IS '用户id'; +COMMENT ON COLUMN applet_truck.truck_number IS '车牌号(数据唯一性约束)'; +COMMENT ON COLUMN applet_truck.driving_license_id IS '行驶证ID'; +COMMENT ON COLUMN applet_truck.tel_number IS '司机电话'; +COMMENT ON COLUMN applet_truck.head_frame_number IS '车头车架号'; +COMMENT ON COLUMN applet_truck.vehicle_weight IS '车辆自重'; +COMMENT ON COLUMN applet_truck.vehicle_frame_weight IS '车架重'; +COMMENT ON COLUMN applet_truck.driving_license IS '行驶证(扫描件)'; +COMMENT ON COLUMN applet_truck.truck_state IS '板车状态(1-默认,0-其他,4-拉黑)'; +COMMENT ON COLUMN applet_truck.create_time IS '创建时间'; +COMMENT ON COLUMN applet_truck.update_time IS '更新时间'; +COMMENT ON COLUMN applet_truck.is_del IS '是否软删除'; + + +--3-公告信息(小程序/客服后台推送) +CREATE TABLE IF NOT EXISTS public.applet_announcements( + id serial, + title varchar(64) DEFAULT NULL, + abstracts varchar(256) DEFAULT NULL, + announcement text COLLATE pg_catalog."default" DEFAULT 'NULL::text', + author varchar(32) DEFAULT NULL, + reading_volume integer DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_announcements_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_announcements.id IS '公告id'; +COMMENT ON COLUMN applet_announcements.title IS '标题'; +COMMENT ON COLUMN applet_announcements.abstracts IS '摘要'; +COMMENT ON COLUMN applet_announcements.announcement IS '公告内容'; +COMMENT ON COLUMN applet_announcements.author IS '作者'; +COMMENT ON COLUMN applet_announcements.reading_volume IS '阅读量'; +COMMENT ON COLUMN applet_announcements.create_time IS '创建时间'; +COMMENT ON COLUMN applet_announcements.update_time IS '更新时间'; +COMMENT ON COLUMN applet_announcements.is_del IS '是否软删除'; + + +--4-预约信息 +CREATE TABLE IF NOT EXISTS public.applet_appointment( + id serial, + users_id integer DEFAULT NULL, + transport_type integer DEFAULT NULL, + truck_number varchar(16) DEFAULT NULL, + tel_number varchar(16) DEFAULT NULL, + + //head_frame_number varchar(32) DEFAULT NULL, + vehicle_weight integer, + vehicle_frame_weight integer, + driving_license varchar(32) DEFAULT NULL, + approach_date date DEFAULT NULL, + port_area_id integer DEFAULT NULL, + biz_type integer DEFAULT NULL, + enter_type integer DEFAULT NULL, + goods_type integer DEFAULT NULL, + goods_Quantity integer, + appointment_state integer default 0, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_appointment_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_appointment.id IS '预约信息id'; +COMMENT ON COLUMN applet_appointment.users_id IS '用户id'; +COMMENT ON COLUMN applet_appointment.transport_type IS '运输方式(1/2/3)';// +COMMENT ON COLUMN applet_appointment.truck_number IS '板车号';// +COMMENT ON COLUMN applet_appointment.tel_number IS '手机号';// +COMMENT ON COLUMN applet_appointment.head_frame_number IS '车头车架号';// +COMMENT ON COLUMN applet_appointment.vehicle_weight IS '板车自重(吨)';// +COMMENT ON COLUMN applet_appointment.vehicle_frame_weight IS '车架重(吨)';// +COMMENT ON COLUMN applet_appointment.driving_license IS '行驶证编号';// +COMMENT ON COLUMN applet_appointment.approach_date IS '预约进场日期';// +COMMENT ON COLUMN applet_punch_clock.biz_type IS '业务类型(1-全部,2-码头业务,3-整车物流,4-特保区预约)'; +COMMENT ON COLUMN applet_appointment.port_area_id IS '进港港区Id';// +COMMENT ON COLUMN applet_appointment.enter_type IS '进港类型(1-外贸出口,2-外贸进口,3-整车物流,4-特保区出口,5-特保区进口,6-内贸出口,7-内贸进口)';// +COMMENT ON COLUMN applet_appointment.goods_type IS '货物类型(1-商品车,2-设备,3-其他)';// +COMMENT ON COLUMN applet_appointment.goods_Quantity IS '货物数量(件数)';// +COMMENT ON COLUMN applet_appointment.appointment_state IS '预约打卡状态(1-已预约,2-已签到,3-已进港,5-操作中,6-已完成,7-已离港,4-已取消,9-异常:预期未完成操作的)';// +COMMENT ON COLUMN applet_appointment.create_time IS '创建时间'; +COMMENT ON COLUMN applet_appointment.update_time IS '更新时间'; +COMMENT ON COLUMN applet_appointment.is_del IS '是否软删除'; + 需要 司机生份证 + + +-- 5-预约明细 +CREATE TABLE IF NOT EXISTS public.applet_appointment_detail( + id serial, + appointment_id integer DEFAULT NULL, + ship_name varchar(16) DEFAULT NULL, + voy_number varchar(16) DEFAULT NULL, + destination_port varchar(32) DEFAULT NULL, + brand_name varchar(32) DEFAULT NULL, + vin varchar(32) DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_appointment_detail_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_appointment_detail.id IS '预约详细id'; +COMMENT ON COLUMN applet_appointment_detail.appointment_id IS '预约id'; +COMMENT ON COLUMN applet_appointment_detail.ship_name IS '船名';// +COMMENT ON COLUMN applet_appointment_detail.voy_number IS '航次号'; +COMMENT ON COLUMN applet_appointment_detail.destination_port IS '目的港';// +COMMENT ON COLUMN applet_appointment_detail.brand_name IS '品牌/名称';// +COMMENT ON COLUMN applet_appointment_detail.vin IS '车架号';// +COMMENT ON COLUMN applet_appointment_detail.create_time IS '创建时间'; +COMMENT ON COLUMN applet_appointment_detail.update_time IS '更新时间'; +COMMENT ON COLUMN applet_appointment_detail.is_del IS '是否软删除'; + + +--6-(签到/完成)打卡信息 +CREATE TABLE IF NOT EXISTS public.applet_punch_clock( + id serial, + users_id integer DEFAULT NULL, + appointment_id integer DEFAULT NULL, + biz_type integer DEFAULT NULL, + queue_number varchar(16), + --approach_date date DEFAULT NULL, + punch_start_time time DEFAULT NULL, + punch_over_time time DEFAULT NULL, + port_area_id integer DEFAULT NULL, + punch_address varchar(256) DEFAULT NULL, + over_address varchar(256) DEFAULT NULL, + punch_clock_type integer, + punch_clock_poi varchar(64) DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_punch_clock_pkey PRIMARY KEY (id) +); + +COMMENT ON COLUMN applet_punch_clock.id IS '打卡信息id'; +COMMENT ON COLUMN applet_punch_clock.users_id IS '用户id'; +COMMENT ON COLUMN applet_punch_clock.appointment_id IS '预约Id'; +COMMENT ON COLUMN applet_punch_clock.biz_type IS '业务类型(1-全部,2-码头业务,3-整车物流,4-特保区预约)'; +COMMENT ON COLUMN applet_punch_clock.queue_number IS '排队编号'; +--COMMENT ON COLUMN applet_punch_clock.approach_date IS '打卡日期'; +COMMENT ON COLUMN applet_punch_clock.start_time IS '签到日期时间'; +COMMENT ON COLUMN applet_punch_clock.punch_over_time IS '完成日期时间'; +COMMENT ON COLUMN applet_punch_clock.port_area_id IS '打卡港区(ID)'; +COMMENT ON COLUMN applet_punch_clock.punch_address IS '签到打卡地点'; +COMMENT ON COLUMN applet_punch_clock.over_address IS '完成打卡地点'; +COMMENT ON COLUMN applet_punch_clock.punch_clock_type IS '打卡类别(1-签到,2-已进港,3-操作中,4-已完成,5-已离港)'; +COMMENT ON COLUMN applet_punch_clock.punch_clock_poi IS '打卡(位置坐标){"1":poi2,"2",poi2}'; +COMMENT ON COLUMN applet_punch_clock.create_time IS '创建时间'; +COMMENT ON COLUMN applet_punch_clock.update_time IS '更新时间'; +COMMENT ON COLUMN applet_punch_clock.is_del IS '是否软删除'; + + +--7-收车信息 +CREATE TABLE IF NOT EXISTS public.applet_receiving_vehicle( + id serial, + users_id integer DEFAULT NULL, + ship_name varchar(64) DEFAULT NULL, + voy_number varchar(64) DEFAULT NULL, + complete_project_time timestamp(0) DEFAULT NULL, + task_number varchar(32) DEFAULT NULL, + transport_type varchar(64) DEFAULT NULL, + truck_number varchar(32) DEFAULT NULL, + enter_port_area varchar(32) DEFAULT NULL, + enter_port_time timestamp(0) DEFAULT NULL, + operation_team varchar(16) DEFAULT NULL, + goods_info text DEFAULT NULL, + vehicle_frame_data varchar(2048) DEFAULT NULL, + receiving_state integer DEFAULT 0, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_receiving_vehicle_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_receiving_vehicle.id IS '收车信息id'; +COMMENT ON COLUMN applet_receiving_vehicle.users_id IS '用户id'; +COMMENT ON COLUMN applet_receiving_vehicle.ship_name IS '船名'; +COMMENT ON COLUMN applet_receiving_vehicle.voy_number IS '航次'; +COMMENT ON COLUMN applet_receiving_vehicle.complete_project_time IS '完工日期时间'; +COMMENT ON COLUMN applet_receiving_vehicle.task_number IS '作业编号'; +COMMENT ON COLUMN applet_receiving_vehicle.transport_type IS '运输方式'; +COMMENT ON COLUMN applet_receiving_vehicle.truck_number IS '车牌号(板车号)'; +COMMENT ON COLUMN applet_receiving_vehicle.enter_port_area IS '进港港区'; +COMMENT ON COLUMN applet_receiving_vehicle.enter_port_time IS '进港日期时间'; +COMMENT ON COLUMN applet_receiving_vehicle.operation_team IS '作业工班'; +COMMENT ON COLUMN applet_receiving_vehicle.goods_info IS '货物信息(type:vehicle/others, +vehicle{品牌/型号/车型/数量/港口或国家/车辆类型/卸货方式:港区作业或客户自提,Json数据}, +others{货名/长/宽/高/重量/数量/港口、国家/卸货方式(港区作业/客户自卸)的Json数据})'; +COMMENT ON COLUMN applet_receiving_vehicle.vehicle_frame_data IS '车架号数据([品牌,车架号]的Json数据)'; +COMMENT ON COLUMN applet_receiving_vehicle.receiving_state IS '收车状态(0-默认,未收车,1-已收车,2-已核对)'; +COMMENT ON COLUMN applet_receiving_vehicle.create_time IS '创建时间'; +COMMENT ON COLUMN applet_receiving_vehicle.update_time IS '更新时间'; +COMMENT ON COLUMN applet_receiving_vehicle.is_del IS '是否软删除'; + + +--8-发车信息 +CREATE TABLE IF NOT EXISTS public.applet_departure_vehicle( + id serial, + users_id integer DEFAULT NULL, + ship_name varchar(64) DEFAULT NULL, + voy_number varchar(64) DEFAULT NULL, + complete_project_time timestamp(0) DEFAULT NULL, + task_number varchar(32) DEFAULT NULL, + truck_number varchar(32) DEFAULT NULL, + receiving_unit varchar(64) DEFAULT NULL, + lading_no varchar(64) DEFAULT NULL, + customs_clearance_nature varchar(32) DEFAULT NULL, + customs_declaration_no varchar(32) DEFAULT NULL, + vehicle_frame_data varchar(1024) DEFAULT NULL, + goods_name varchar(32) DEFAULT NULL, + goods_Quantity integer, + certificate_Preparation_date timestamp(0) DEFAULT NULL, + liberator varchar(32) DEFAULT NULL, + signee varchar(32) DEFAULT NULL, + remarks varchar(256) DEFAULT NULL, + departure_state integer default 0, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_departure_vehicle_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_departure_vehicle.id IS '发车信息Id'; +COMMENT ON COLUMN applet_departure_vehicle.users_id IS '用户id'; +COMMENT ON COLUMN applet_departure_vehicle.ship_name IS '船名'; +COMMENT ON COLUMN applet_departure_vehicle.voy_number IS '航次'; +COMMENT ON COLUMN applet_departure_vehicle.complete_project_time IS '完工日期时间'; +COMMENT ON COLUMN applet_departure_vehicle.task_number IS '作业编号'; +COMMENT ON COLUMN applet_departure_vehicle.truck_number IS '车牌号(板车号)'; +COMMENT ON COLUMN applet_departure_vehicle.receiving_unit IS '收货单位'; +COMMENT ON COLUMN applet_departure_vehicle.lading_no IS '提单号'; +COMMENT ON COLUMN applet_departure_vehicle.customs_clearance_nature IS '通关性质'; +COMMENT ON COLUMN applet_departure_vehicle.customs_declaration_no IS '报关单号'; +COMMENT ON COLUMN applet_departure_vehicle.vehicle_frame_data IS '车架号'; +COMMENT ON COLUMN applet_departure_vehicle.goods_name IS '货名'; +COMMENT ON COLUMN applet_departure_vehicle.goods_Quantity IS '件数'; +COMMENT ON COLUMN applet_departure_vehicle.certificate_Preparation_date IS '制证日期'; +COMMENT ON COLUMN applet_departure_vehicle.liberator IS '放行者'; +COMMENT ON COLUMN applet_departure_vehicle.signee IS '签收者'; +COMMENT ON COLUMN applet_departure_vehicle.remarks IS '备注'; +COMMENT ON COLUMN applet_departure_vehicle.departure_state IS '发车状态(0-默认,未发车,1-已收车,2-已核对)'; +COMMENT ON COLUMN applet_departure_vehicle.create_time IS '创建时间'; +COMMENT ON COLUMN applet_departure_vehicle.update_time IS '更新时间'; +COMMENT ON COLUMN applet_departure_vehicle.is_del IS '是否软删除'; + + +--9-意见反馈 +CREATE TABLE IF NOT EXISTS public.applet_feedback( + id serial, + users_id integer DEFAULT NULL, + nike_name varchar(32) DEFAULT NULL, + feedback_info varchar(1024) DEFAULT NULL, + pictures varchar(256) DEFAULT NULL, + tel_number varchar(64) DEFAULT NULL, + contact_info varchar(64) DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT feedback_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_feedback.id IS '意见反馈id'; +COMMENT ON COLUMN applet_feedback.users_id IS '用户id'; +COMMENT ON COLUMN applet_feedback.nike_name IS '昵称'; +COMMENT ON COLUMN applet_feedback.feedback_info IS '意见(限500字)'; +COMMENT ON COLUMN applet_feedback.pictures IS '图片文件名集合,逗号分隔'; +COMMENT ON COLUMN applet_feedback.tel_number IS '联系电话'; +COMMENT ON COLUMN applet_feedback.contact_info IS '联系方式(微信号/qq/邮箱)'; +COMMENT ON COLUMN applet_feedback.create_time IS '创建时间'; +COMMENT ON COLUMN applet_feedback.update_time IS '更新时间'; +COMMENT ON COLUMN applet_feedback.is_del IS '是否软删除'; + + +--10-新手攻略(小程序/客服平台/生产APP操作指南) +CREATE TABLE IF NOT EXISTS public.applet_novice_introduction( + id serial, + sort integer DEFAULT NULL, + title varchar(64) DEFAULT NULL, + content text DEFAULT NULL, + sequence_number int DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT novice_introduction_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_novice_introduction.id IS '攻略_id'; +COMMENT ON COLUMN applet_novice_introduction.sort IS '类别(1-小程序,2-客服平台,3-生产APP)'; +COMMENT ON COLUMN applet_novice_introduction.title IS '小标题'; +COMMENT ON COLUMN applet_novice_introduction.content IS '内容(html文本,允许包含图片标签)'; +COMMENT ON COLUMN applet_novice_introduction.sequence_number IS '顺序号'; +COMMENT ON COLUMN applet_novice_introduction.create_time IS '创建时间'; +COMMENT ON COLUMN applet_novice_introduction.update_time IS '更新时间'; +COMMENT ON COLUMN applet_novice_introduction.is_del IS '是否软删除'; + + +--11-运输方式 +CREATE TABLE IF NOT EXISTS public.applet_transport_types( + id serial, + transport_type_name varchar(64) DEFAULT NULL, + transport_type varchar(64) DEFAULT NULL, + sequence_number int DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT transport_types_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_transport_types.id IS '运输方式id'; +COMMENT ON COLUMN applet_transport_types.transport_type_name IS '运输方式名称(板车运输/自开)'; +COMMENT ON COLUMN applet_transport_types.transport_type IS '运输方式'; +COMMENT ON COLUMN applet_transport_types.sequence_number IS '顺序号'; +COMMENT ON COLUMN applet_transport_types.create_time IS '创建时间'; +COMMENT ON COLUMN applet_transport_types.update_time IS '更新时间'; +COMMENT ON COLUMN applet_transport_types.is_del IS '是否软删除'; + + +--12-港区 +CREATE TABLE IF NOT EXISTS public.applet_port_areas( + id serial, + port_area varchar(64) DEFAULT NULL, + area_center_poi varchar(32) DEFAULT NULL, + punch_range integer DEFAULT NULL, + sequence_number int DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT port_areas_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_port_areas.id IS '港区id'; +COMMENT ON COLUMN applet_port_areas.port_area IS '港区名'; +COMMENT ON COLUMN applet_port_areas.area_center_poi IS '港区坐标'; +COMMENT ON COLUMN applet_port_areas.punch_range IS '打卡范围(距离港区中心坐标的半径,米)'; +COMMENT ON COLUMN applet_port_areas.sequence_number IS '顺序号'; +COMMENT ON COLUMN applet_port_areas.create_time IS '创建时间'; +COMMENT ON COLUMN applet_port_areas.update_time IS '更新时间'; +COMMENT ON COLUMN applet_port_areas.is_del IS '是否软删除'; + + +--13-作业工班 +CREATE TABLE IF NOT EXISTS public.applet_operation_teams( + id serial, + operation_team varchar(64) DEFAULT NULL, + sequence_number int DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT operation_teams_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_operation_teams.id IS '作业工班id'; +COMMENT ON COLUMN applet_operation_teams.operation_team IS '作业工班'; +COMMENT ON COLUMN applet_operation_teams.sequence_number IS '顺序号'; +COMMENT ON COLUMN applet_operation_teams.create_time IS '创建时间'; +COMMENT ON COLUMN applet_operation_teams.update_time IS '更新时间'; +COMMENT ON COLUMN applet_operation_teams.is_del IS '是否软删除'; + + +--14-车辆管理 +CREATE TABLE IF NOT EXISTS public.applet_truck_management( + id serial, + users_id integer DEFAULT NULL, + truck_number varchar(32) DEFAULT NULL, + cause varchar(256) DEFAULT NULL, + drivers_name varchar(32) DEFAULT NULL, + drivers_phone varchar(32) DEFAULT NULL, + administrators_name varchar(32) DEFAULT NULL, + administrators_phone varchar(32) DEFAULT NULL, + enter_time timestamp(0) DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_truck_management_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_truck_management.id IS '车辆管理id'; +COMMENT ON COLUMN applet_truck_management.users_id IS '用户id'; +COMMENT ON COLUMN applet_truck_management.truck_number IS '(加入黑名单的)车牌号'; +COMMENT ON COLUMN applet_truck_management.cause IS '原因'; +COMMENT ON COLUMN applet_truck_management.drivers_name IS '司机姓名'; +COMMENT ON COLUMN applet_truck_management.drivers_phone IS '司机电话'; +COMMENT ON COLUMN applet_truck_management.administrators_name IS '管理员姓名'; +COMMENT ON COLUMN applet_truck_management.administrators_phone IS '管理员电话'; +COMMENT ON COLUMN applet_truck_management.enter_time IS '加入黑名单时间'; +COMMENT ON COLUMN applet_truck_management.create_time IS '创建时间'; +COMMENT ON COLUMN applet_truck_management.update_time IS '更新时间'; +COMMENT ON COLUMN applet_truck_management.is_del IS '是否软删除'; + + +--15-货物类型 +CREATE TABLE IF NOT EXISTS public.applet_goods_types( + id serial, + goods_type_name varchar(64) DEFAULT NULL, + goods_type integer DEFAULT NULL, + sequence_number integer, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT goods_types_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_goods_types.id IS '货物类型id'; +COMMENT ON COLUMN applet_goods_types.goods_type_name IS '货物类型(1-商品车/2-设备/3-其他...)'; +COMMENT ON COLUMN applet_goods_types.goods_type IS '货物类型(1-商品车/2-设备/3-其他...)'; +COMMENT ON COLUMN applet_goods_types.sequence_number IS '顺序号'; +COMMENT ON COLUMN applet_goods_types.create_time IS '创建时间'; +COMMENT ON COLUMN applet_goods_types.update_time IS '更新时间'; +COMMENT ON COLUMN applet_goods_types.is_del IS '是否软删除'; + + +--16-进港类型 +CREATE TABLE IF NOT EXISTS public.applet_enter_type( + id serial, + enter_port_type_name varchar(32) DEFAULT NULL, + enter_port_type integer DEFAULT NULL, + sequence_number integer, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_enter_types_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_enter_type.id IS '进港类型id'; +COMMENT ON COLUMN applet_enter_type.enter_port_type_name IS '进港类型名称(1-外贸出口/2-内贸出口/3-外贸进口/4-内贸进口/5-特保区出口/6-特保区进口...)'; +COMMENT ON COLUMN applet_enter_type.enter_port_type IS '进港类型(1/2/3/4/5/6/...)'; +COMMENT ON COLUMN applet_enter_type.sequence_number IS '顺序号'; +COMMENT ON COLUMN applet_enter_type.create_time IS '创建时间'; +COMMENT ON COLUMN applet_enter_type.update_time IS '更新时间'; +COMMENT ON COLUMN applet_enter_type.is_del IS '是否软删除'; + + +--17-船名航次 +CREATE TABLE IF NOT EXISTS public.applet_ship_voy( + id serial, + ship_name varchar(32) DEFAULT NULL, + voy_number varchar(32) DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_ship_voy_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_ship_voy.id IS '船名航次id'; +COMMENT ON COLUMN applet_ship_voy.ship_name IS '船名'; +COMMENT ON COLUMN applet_ship_voy.voy_number IS '航次编号'; +COMMENT ON COLUMN applet_ship_voy.create_time IS '创建时间'; +COMMENT ON COLUMN applet_ship_voy.update_time IS '更新时间'; +COMMENT ON COLUMN applet_ship_voy.is_del IS '是否软删除'; + + +--18-(运抵)港口 +CREATE TABLE IF NOT EXISTS public.applet_port( + id serial, + ship_voy_id integer DEFAULT NULL, + port_name varchar(64) DEFAULT NULL, + sequence_number int DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT ports_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_port.id IS '港口id'; +COMMENT ON COLUMN applet_port.ship_voy_id IS '船名航次id'; +COMMENT ON COLUMN applet_port.port_name IS '港口名称'; +COMMENT ON COLUMN applet_port.sequence_number IS '顺序号'; +COMMENT ON COLUMN applet_port.create_time IS '创建时间'; +COMMENT ON COLUMN applet_port.update_time IS '更新时间'; +COMMENT ON COLUMN applet_port.is_del IS '是否软删除'; + + +--19-商品车品牌 +CREATE TABLE IF NOT EXISTS public.applet_brand( + id serial, + ship_voy_id integer DEFAULT NULL, + brand varchar(64) DEFAULT NULL, + sequence_number int DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_brand_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_brand.id IS '品牌id'; +COMMENT ON COLUMN applet_brand.ship_voy_id IS '船名航次id'; +COMMENT ON COLUMN applet_brand.brand IS '品牌名称'; +COMMENT ON COLUMN applet_brand.sequence_number IS '顺序号'; +COMMENT ON COLUMN applet_brand.create_time IS '创建时间'; +COMMENT ON COLUMN applet_brand.update_time IS '更新时间'; +COMMENT ON COLUMN applet_brand.is_del IS '是否软删除'; + + +--20-进港指令 +CREATE TABLE IF NOT EXISTS public.applet_entry_instruct( + id serial, + appointment_id integer DEFAULT NULL, + users_id integer DEFAULT NULL, + users_name varchar(32) DEFAULT NULL, + truck_number varchar(32) DEFAULT NULL, + yard_name varchar(32) DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_entry_instruct_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_entry_instruct.id IS '进港指令id'; +COMMENT ON COLUMN applet_entry_instruct.appointment_id IS '预约id'; +COMMENT ON COLUMN applet_entry_instruct.users_id IS '司机id'; +COMMENT ON COLUMN applet_entry_instruct.users_name IS '司机姓名'; +COMMENT ON COLUMN applet_entry_instruct.truck_number IS '车牌号'; +COMMENT ON COLUMN applet_entry_instruct.yard_name IS '堆场'; +COMMENT ON COLUMN applet_entry_instruct.create_time IS '创建时间'; +COMMENT ON COLUMN applet_entry_instruct.update_time IS '更新时间'; +COMMENT ON COLUMN applet_entry_instruct.is_del IS '是否软删除'; + + +--21-服务配置 +CREATE TABLE IF NOT EXISTS public.applet_service_config( + id serial, + config_name varchar(32) default null, + config_code varchar(32) default null, + config_content varchar(256) default null, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_service_config_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_service_config.id IS '自增id'; +COMMENT ON COLUMN applet_service_config.config_name IS '配置名称(系统服务地址,图片文件存储路径,图片访问路径,小程序appid,小程序密钥secret)'; +COMMENT ON COLUMN applet_service_config.config_code IS '配置代码(100-系统服务地址,200-图片文件存储路径,300-图片访问路径,400-小程序appid,500-小程序密钥secret)'; +COMMENT ON COLUMN applet_service_config.config_content IS '配置信息(文本)'; +COMMENT ON COLUMN applet_service_config.create_time IS '创建时间'; +COMMENT ON COLUMN applet_service_config.update_time IS '更新时间'; +COMMENT ON COLUMN applet_service_config.is_del IS '是否软删除'; + +--22-请求第三方接口 +CREATE TABLE IF NOT EXISTS public.applet_requester( + id serial, + url varchar(256) default null, + param_map varchar(256) default null, + request_type integer default null, + type_description varchar(32) default null, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_requester_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_requester.id IS '自增id'; +COMMENT ON COLUMN applet_requester.url IS 'url(请求服务地址)'; +COMMENT ON COLUMN applet_requester.param_map IS '请求参数(值为空时,需要依赖实参传值。如小程序登录参数:{"appid":"","code":"","secret":"","grant_type":"authorization_code"})'; +COMMENT ON COLUMN applet_requester.request_type IS '请求类型(1001-1999)'; +COMMENT ON COLUMN applet_requester.type_description IS '类别说明'; +COMMENT ON COLUMN applet_requester.create_time IS '创建时间'; +COMMENT ON COLUMN applet_requester.update_time IS '更新时间'; +COMMENT ON COLUMN applet_requester.is_del IS '是否软删除'; + +--23-用户登录日志 +CREATE TABLE IF NOT EXISTS public.applet_login_log( + id serial, + wx_nike varchar(32), + wx_openid varchar(32) DEFAULT NULL, + login_time timestamp default null, + ip varchar(32) default null, + area varchar(32) default null, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_login_log_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_login_log.id IS '自增id'; +COMMENT ON COLUMN applet_login_log.wx_nike IS '微信昵称'; +COMMENT ON COLUMN applet_login_log.wx_openid IS '微信openid'; +COMMENT ON COLUMN applet_login_log.login_time IS '登录时间'; +COMMENT ON COLUMN applet_login_log.ip IS 'ip地址'; +COMMENT ON COLUMN applet_login_log.area IS '地区(省市)'; +COMMENT ON COLUMN applet_login_log.create_time IS '创建时间'; +COMMENT ON COLUMN applet_login_log.update_time IS '更新时间'; +COMMENT ON COLUMN applet_login_log.is_del IS '是否软删除'; + +--24-自定义表头 +CREATE TABLE IF NOT EXISTS public.applet_tb_head( + id serial, + table_name varchar(32), + table_code varchar(32) default null, + head_jason varchar(512) default null, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_tb_head PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_tb_head.id IS '自增id'; +COMMENT ON COLUMN applet_tb_head.table_name IS '表名'; +COMMENT ON COLUMN applet_tb_head.table_code IS '标识代码'; +COMMENT ON COLUMN applet_tb_head.head_jason IS '表头Json'; +COMMENT ON COLUMN applet_tb_head.create_time IS '创建时间'; +COMMENT ON COLUMN applet_tb_head.update_time IS '更新时间'; +COMMENT ON COLUMN applet_tb_head.is_del IS '是否软删除'; + + +--25--消息表 +CREATE TABLE IF NOT EXISTS public.applet_message( + id varchar(32), + type integer DEFAULT NULL, + type_content varchar(256)DEFAULT NULL, + truck_number varchar(32) DEFAULT NULL, + is_read integer DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0 +); +COMMENT ON COLUMN applet_message.id IS 'id'; +COMMENT ON COLUMN applet_message.type IS '1-收车 2-提车'; +COMMENT ON COLUMN applet_message.type_content IS '1-收车 2-提车'; +COMMENT ON COLUMN applet_message.truck_number IS '板车号'; +COMMENT ON COLUMN applet_message.is_read IS '0-未读 1-已读'; +COMMENT ON COLUMN applet_message.create_time IS '创建时间'; +COMMENT ON COLUMN applet_message.update_time IS '更新时间'; +COMMENT ON COLUMN applet_message.is_del IS '是否软删除'; \ No newline at end of file diff --git a/mapper/src/main/resources/static/tableUpdate.txt b/mapper/src/main/resources/static/tableUpdate.txt new file mode 100644 index 0000000..8163774 --- /dev/null +++ b/mapper/src/main/resources/static/tableUpdate.txt @@ -0,0 +1,3 @@ +1. 预约表applet_appointment head_frame_number 修改为 truck_vin +2. 预约表applet_punch_clock start_time 数据类型time 改为datetime + over_time 数据类型time 改为datetime diff --git a/mapper/target/classes/com/haitongauto/mapper/admin/AnnouncementAdminMapper.class b/mapper/target/classes/com/haitongauto/mapper/admin/AnnouncementAdminMapper.class new file mode 100644 index 0000000..1e53ea4 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/admin/AnnouncementAdminMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/admin/AppointmentAdminMapper.class b/mapper/target/classes/com/haitongauto/mapper/admin/AppointmentAdminMapper.class new file mode 100644 index 0000000..4b84be1 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/admin/AppointmentAdminMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/admin/FeedbackAdminMapper.class b/mapper/target/classes/com/haitongauto/mapper/admin/FeedbackAdminMapper.class new file mode 100644 index 0000000..cf2e34a Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/admin/FeedbackAdminMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/admin/NoviceIntroductionAdminMapper.class b/mapper/target/classes/com/haitongauto/mapper/admin/NoviceIntroductionAdminMapper.class new file mode 100644 index 0000000..7e87146 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/admin/NoviceIntroductionAdminMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/admin/PunchClockAdminMapper.class b/mapper/target/classes/com/haitongauto/mapper/admin/PunchClockAdminMapper.class new file mode 100644 index 0000000..2a46982 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/admin/PunchClockAdminMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/admin/StatisticsAdminMapper.class b/mapper/target/classes/com/haitongauto/mapper/admin/StatisticsAdminMapper.class new file mode 100644 index 0000000..4158732 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/admin/StatisticsAdminMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/admin/UsersAdminMapper.class b/mapper/target/classes/com/haitongauto/mapper/admin/UsersAdminMapper.class new file mode 100644 index 0000000..a1808d5 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/admin/UsersAdminMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/AnnouncementMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/AnnouncementMapper.class new file mode 100644 index 0000000..f5c4ffa Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/AnnouncementMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/AppointmentDetailMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/AppointmentDetailMapper.class new file mode 100644 index 0000000..ceee9eb Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/AppointmentDetailMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/AppointmentMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/AppointmentMapper.class new file mode 100644 index 0000000..6d3d6c3 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/AppointmentMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/DataBaseMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/DataBaseMapper.class new file mode 100644 index 0000000..6c1c9dd Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/DataBaseMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/DepartureDetailMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/DepartureDetailMapper.class new file mode 100644 index 0000000..0145165 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/DepartureDetailMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/DepartureVehicleMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/DepartureVehicleMapper.class new file mode 100644 index 0000000..f9939f9 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/DepartureVehicleMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/DicMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/DicMapper.class new file mode 100644 index 0000000..9b2b9b8 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/DicMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/EntryInstructMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/EntryInstructMapper.class new file mode 100644 index 0000000..0712944 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/EntryInstructMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/FeedbackMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/FeedbackMapper.class new file mode 100644 index 0000000..5c5d817 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/FeedbackMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/LoginLogMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/LoginLogMapper.class new file mode 100644 index 0000000..e0ca79f Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/LoginLogMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/MessageMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/MessageMapper.class new file mode 100644 index 0000000..b81d814 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/MessageMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/NoviceIntroductionMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/NoviceIntroductionMapper.class new file mode 100644 index 0000000..b9a4e1e Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/NoviceIntroductionMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/PortAreasMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/PortAreasMapper.class new file mode 100644 index 0000000..e13b81d Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/PortAreasMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/PunchClockMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/PunchClockMapper.class new file mode 100644 index 0000000..066f648 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/PunchClockMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/ReceivingDetailMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/ReceivingDetailMapper.class new file mode 100644 index 0000000..ad8a306 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/ReceivingDetailMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/ReceivingVehicleMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/ReceivingVehicleMapper.class new file mode 100644 index 0000000..b737917 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/ReceivingVehicleMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/RequesterMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/RequesterMapper.class new file mode 100644 index 0000000..c289c1f Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/RequesterMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/ServiceConfigMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/ServiceConfigMapper.class new file mode 100644 index 0000000..2fb8c7e Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/ServiceConfigMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/TableHeadMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/TableHeadMapper.class new file mode 100644 index 0000000..3a28bed Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/TableHeadMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/TruckManagementMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/TruckManagementMapper.class new file mode 100644 index 0000000..0c0702e Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/TruckManagementMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/TruckMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/TruckMapper.class new file mode 100644 index 0000000..2de0d67 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/TruckMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/base/UsersMapper.class b/mapper/target/classes/com/haitongauto/mapper/base/UsersMapper.class new file mode 100644 index 0000000..f1eae7a Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/base/UsersMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/client/AppointmentExtendMapper.class b/mapper/target/classes/com/haitongauto/mapper/client/AppointmentExtendMapper.class new file mode 100644 index 0000000..71b5ce5 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/client/AppointmentExtendMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/client/OtherExtendMapper.class b/mapper/target/classes/com/haitongauto/mapper/client/OtherExtendMapper.class new file mode 100644 index 0000000..0d94df4 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/client/OtherExtendMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/client/PunchClockExtendMapper.class b/mapper/target/classes/com/haitongauto/mapper/client/PunchClockExtendMapper.class new file mode 100644 index 0000000..d7ffd23 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/client/PunchClockExtendMapper.class differ diff --git a/mapper/target/classes/com/haitongauto/mapper/client/TruckExtendMapper.class b/mapper/target/classes/com/haitongauto/mapper/client/TruckExtendMapper.class new file mode 100644 index 0000000..928cf02 Binary files /dev/null and b/mapper/target/classes/com/haitongauto/mapper/client/TruckExtendMapper.class differ diff --git a/mapper/target/classes/mappers/admin/AnnouncementAdminMapper.xml b/mapper/target/classes/mappers/admin/AnnouncementAdminMapper.xml new file mode 100644 index 0000000..72fced7 --- /dev/null +++ b/mapper/target/classes/mappers/admin/AnnouncementAdminMapper.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/admin/AppointmentAdminMapper.xml b/mapper/target/classes/mappers/admin/AppointmentAdminMapper.xml new file mode 100644 index 0000000..b35c961 --- /dev/null +++ b/mapper/target/classes/mappers/admin/AppointmentAdminMapper.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/admin/FeedbackAdminMapper.xml b/mapper/target/classes/mappers/admin/FeedbackAdminMapper.xml new file mode 100644 index 0000000..64c1dc4 --- /dev/null +++ b/mapper/target/classes/mappers/admin/FeedbackAdminMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/admin/NoviceIntroductionAdminMapper.xml b/mapper/target/classes/mappers/admin/NoviceIntroductionAdminMapper.xml new file mode 100644 index 0000000..51af3e7 --- /dev/null +++ b/mapper/target/classes/mappers/admin/NoviceIntroductionAdminMapper.xml @@ -0,0 +1,21 @@ + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/admin/PunchClockAdminMapper.xml b/mapper/target/classes/mappers/admin/PunchClockAdminMapper.xml new file mode 100644 index 0000000..b5a304d --- /dev/null +++ b/mapper/target/classes/mappers/admin/PunchClockAdminMapper.xml @@ -0,0 +1,72 @@ + + + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/admin/StatisticsAdminMapper.xml b/mapper/target/classes/mappers/admin/StatisticsAdminMapper.xml new file mode 100644 index 0000000..381f800 --- /dev/null +++ b/mapper/target/classes/mappers/admin/StatisticsAdminMapper.xml @@ -0,0 +1,340 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/admin/UsersAdminMapper.xml b/mapper/target/classes/mappers/admin/UsersAdminMapper.xml new file mode 100644 index 0000000..c6aa8de --- /dev/null +++ b/mapper/target/classes/mappers/admin/UsersAdminMapper.xml @@ -0,0 +1,36 @@ + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/AnnouncementMapper.xml b/mapper/target/classes/mappers/base/AnnouncementMapper.xml new file mode 100644 index 0000000..ae80dc4 --- /dev/null +++ b/mapper/target/classes/mappers/base/AnnouncementMapper.xml @@ -0,0 +1,134 @@ + + + + + + + + + update applet_announcement set is_del=1 where id=#{id} + + + + delete from applet_announcement where id=#{id} + + + + update applet_announcement + + + id = #{id}, + + + sort = #{sort}, + + + title = #{title}, + + + abstracts = #{abstracts}, + + + announcement = #{announcement}, + + + announcement_text = #{announcement_text}, + + + author = #{author}, + + + reading_volume = #{reading_volume}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/AppointmentDetailMapper.xml b/mapper/target/classes/mappers/base/AppointmentDetailMapper.xml new file mode 100644 index 0000000..3948bd3 --- /dev/null +++ b/mapper/target/classes/mappers/base/AppointmentDetailMapper.xml @@ -0,0 +1,160 @@ + + + + + + + + + update applet_appointment_detail set is_del=1 where id=#{id} + + + + delete from applet_appointment_detail + where id=#{id} + + + + update applet_appointment_detail + + + id = #{id}, + + + appointment_id = #{appointment_id}, + + + ship_id = #{ship_id}, + + + ship_name = #{ship_name}, + + + voy_number = #{voy_number}, + + + destination_port = #{destination_port}, + + + destination_port_id = #{destination_port_id}, + + + brand_id = #{brand_id}, + + + brand_name = #{brand_name}, + + + vin = #{vin}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time =current_timestamp + + where id = #{id} + + + + + + + + + + + + delete from applet_appointment_detail + where appointment_id=#{appointment_id} + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/AppointmentMapper.xml b/mapper/target/classes/mappers/base/AppointmentMapper.xml new file mode 100644 index 0000000..b341cc8 --- /dev/null +++ b/mapper/target/classes/mappers/base/AppointmentMapper.xml @@ -0,0 +1,346 @@ + + + + + + + + + update applet_appointment set is_del=1 where id=#{id} + + + + delete from applet_appointment where id=#{id} + + + + update applet_appointment + + + id = #{id}, + + + users_id = #{users_id}, + + + transport_type = #{transport_type}, + + + truck_number = #{truck_number}, + + + tel_number = #{tel_number}, + + + id_code = #{id_code}, + + + truck_vin = #{truck_vin}, + + + vehicle_weight = #{vehicle_weight}, + + + vehicle_frame_weight = #{vehicle_frame_weight}, + + + driving_license = #{driving_license}, + + + approach_date = #{approach_date}::date, + + + port_area_id = #{port_area_id}, + + + biz_type = #{biz_type}, + + + enter_type = #{enter_type}, + + + goods_type = #{goods_type}, + + + goods_quantity = #{goods_quantity}, + + + appointment_state = #{appointment_state}, + + + cancel_time = #{cancel_time}::timestamp, + + + create_time = #{create_time}::timestamp, + + + appointment_type = #{appointment_type}, + + + is_del = #{is_del}, + + + yard = #{yard}, + + + yard_name = #{yard_name}, + + + gate_canal_in = #{gate_canal_in}, + + + gate_canal_out = #{gate_canal_out}, + + + gate_canal_in_time= #{gate_canal_in_time}::timestamp, + + + gate_canal_out_time=#{gate_canal_out_time}::timestamp, + + + instruct_state = #{instruct_state}, + + + send_time =# {send_time}::timestamp, + + + sender = #{sender}, + + + check_in_time = #{check_in_time}::timestamp, + + + check_over_time = #{check_over_time}::timestamp, + + + plate_scan_time = #{plate_scan_time}::timestamp, + + + is_conventionality_in = #{is_conventionality_in}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + + + + + + + + + + + + + + + + + + update applet_appointment + + + id = #{item.id}, + + + yard = #{item.yard}, + + + sender = #{item.sender}, + + + yard_name = #{item.yard_name}, + + + gate_canal_in = #{item.gate_canal_in}, + + + instruct_state = #{item.instruct_state}, + + send_time =current_timestamp, + update_time = current_timestamp + + where id = #{item.id} + + + + + + update applet_appointment + + plate_scan_time = current_timestamp + + where id = #{appointment_id} + + + + + + + + + + diff --git a/mapper/target/classes/mappers/base/DepartureDetailMapper.xml b/mapper/target/classes/mappers/base/DepartureDetailMapper.xml new file mode 100644 index 0000000..3f9e3ea --- /dev/null +++ b/mapper/target/classes/mappers/base/DepartureDetailMapper.xml @@ -0,0 +1,118 @@ + + + + + + + + + update applet_departure_detail set is_del=1 where id=#{id} + + + + delete from applet_departure_detail where id=#{id} + + + + update applet_departure_detail + + + id = #{id}, + + + applet_departure_vehicle_id = #{applet_departure_vehicle_id}, + + + receiving_unit = #{receiving_unit}, + + + ship_name = #{ship_name}, + + + voy_number = #{voy_number}, + + + customs_clearance_nature = #{customs_clearance_nature}, + + + lading_no = #{lading_no}, + + + customs_declaration_no = #{customs_declaration_no}, + + + cargo_name = #{cargo_name}, + + + cargo_quantity = #{cargo_quantity}, + + + remarks = #{remarks}, + + + vin_list = #{vin_list}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/DepartureVehicleMapper.xml b/mapper/target/classes/mappers/base/DepartureVehicleMapper.xml new file mode 100644 index 0000000..03f45f2 --- /dev/null +++ b/mapper/target/classes/mappers/base/DepartureVehicleMapper.xml @@ -0,0 +1,175 @@ + + + + + + + + + update applet_departure_vehicle set is_del=1 where id=#{id} + + + + delete from applet_departure_vehicle where id=#{id} + + + + update applet_departure_vehicle + + + id = #{id}, + + + voucher_number = #{voucher_number}, + + + users_id = #{users_id}, + + + users_name = #{users_name}, + + + tel_number = #{tel_number}, + + + operators = #{operators}, + + + phone_number = #{phone_number}, + + + truck_number = #{truck_number}, + + + trade_type = #{trade_type}, + + + cargo_type = #{cargo_type}, + + + cargo_quantity = #{cargo_quantity}, + + + delivery_time = #{delivery_time}::timestamp, + + + checker = #{checker}, + + + check_status = #{check_status}, + + + check_time = #{check_time}::timestamp, + + + remarks = #{remarks}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/DicMapper.xml b/mapper/target/classes/mappers/base/DicMapper.xml new file mode 100644 index 0000000..d4df840 --- /dev/null +++ b/mapper/target/classes/mappers/base/DicMapper.xml @@ -0,0 +1,96 @@ + + + + + + + + + update applet_dic set is_del=1 where id=#{id} + + + + delete from applet_dic where id=#{id} + + + + update applet_dic + + + id = #{id}, + + + dic_sort = #{dic_sort}, + + + description = #{description}, + + + content = #{content}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time =current_timestamp + + where id = #{id} + + + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/EntryInstructMapper.xml b/mapper/target/classes/mappers/base/EntryInstructMapper.xml new file mode 100644 index 0000000..f078833 --- /dev/null +++ b/mapper/target/classes/mappers/base/EntryInstructMapper.xml @@ -0,0 +1,90 @@ + + + + + + + + + update applet_entry_instruct set is_del=1 where id=#{id} + + + + delete from applet_entry_instruct where id=#{id} + + + + update applet_entry_instruct + + + id = #{id}, + + + appointment_id = #{appointment_id}, + + + users_id = #{users_id}, + + + users_name = #{users_name}, + + + truck_number = #{truck_number}, + + + yard_name = #{yard_name}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/FeedbackMapper.xml b/mapper/target/classes/mappers/base/FeedbackMapper.xml new file mode 100644 index 0000000..612c4eb --- /dev/null +++ b/mapper/target/classes/mappers/base/FeedbackMapper.xml @@ -0,0 +1,95 @@ + + + + + + + + + update applet_feedback set is_del=1 where id=#{id} + + + + delete from applet_feedback where id=#{id} + + + + update applet_feedback + + + id = #{id}, + + + users_id = #{users_id}, + + + nike_name = #{nike_name}, + + + feedback_info = #{feedback_info}, + + + pictures = #{pictures}, + + + tel_number = #{tel_number}, + + + contact_info = #{contact_info}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/LoginLogMapper.xml b/mapper/target/classes/mappers/base/LoginLogMapper.xml new file mode 100644 index 0000000..ae18ad4 --- /dev/null +++ b/mapper/target/classes/mappers/base/LoginLogMapper.xml @@ -0,0 +1,43 @@ + + + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/MessageMapper.xml b/mapper/target/classes/mappers/base/MessageMapper.xml new file mode 100644 index 0000000..4de4021 --- /dev/null +++ b/mapper/target/classes/mappers/base/MessageMapper.xml @@ -0,0 +1,127 @@ + + + + + + + + + update applet_message set is_del=1 where id=#{id} + + + + delete from applet_message where id=#{id} + + + + update applet_message + + + id = #{id}, + + + type = #{type}, + + + type_content = #{type_content}, + + + + biz_id = #{biz_id}, + + + prc_id = #{prc_id}, + + + truck_number = #{truck_number}, + + + is_read = #{is_read}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp, + + where id=#{id} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/NoviceIntroductionMapper.xml b/mapper/target/classes/mappers/base/NoviceIntroductionMapper.xml new file mode 100644 index 0000000..f24c70b --- /dev/null +++ b/mapper/target/classes/mappers/base/NoviceIntroductionMapper.xml @@ -0,0 +1,84 @@ + + + + + + + + + update applet_novice_introduction set is_del=1 where id=#{id} + + + + delete from applet_novice_introduction where id=#{id} + + + + update applet_novice_introduction + + + id = #{id}, + + + sort = #{sort}, + + + title = #{title}, + + + content = #{content}, + + + sequence_number = #{sequence_number}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time =current_timestamp + + where id = #{id} + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/PortAreasMapper.xml b/mapper/target/classes/mappers/base/PortAreasMapper.xml new file mode 100644 index 0000000..f1cf423 --- /dev/null +++ b/mapper/target/classes/mappers/base/PortAreasMapper.xml @@ -0,0 +1,115 @@ + + + + + + + + + update applet_port_areas set is_del=1 where id=#{id} + + + + delete from applet_port_areas where id=#{id} + + + + update applet_port_areas + + + id = #{id}, + + + port_area_name = #{port_area_name}, + + + port_area_name_en = #{port_area_name_en}, + + + port_area_code = #{port_area_code}, + + + port_area_address = #{port_area_address}, + + + area_center_poi = #{area_center_poi}, + + + punch_range = #{punch_range}, + + + is_enable = #{is_enable}, + + + order_items = #{order_items}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/PunchClockMapper.xml b/mapper/target/classes/mappers/base/PunchClockMapper.xml new file mode 100644 index 0000000..58fd77b --- /dev/null +++ b/mapper/target/classes/mappers/base/PunchClockMapper.xml @@ -0,0 +1,142 @@ + + + + + + + + + update applet_punch_clock set is_del=1 where id=#{id} + + + + delete from applet_punch_clock where id=#{id} + + + + update applet_punch_clock + + + id = #{id}, + + + users_id = #{users_id}, + + + appointment_id = #{appointment_id}, + + + biz_type = #{biz_type}, + + + queue_number = #{queue_number}, + + + start_time = #{start_time}::timestamp, + + + over_time = #{over_time}::timestamp, + + + port_area_id = #{port_area_id}, + + + punch_address = #{punch_address}, + + + over_address = #{over_address}, + + + punch_clock_type = #{punch_clock_type}, + + + punch_clock_poi = #{punch_clock_poi}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/ReceivingDetailMapper.xml b/mapper/target/classes/mappers/base/ReceivingDetailMapper.xml new file mode 100644 index 0000000..2a96603 --- /dev/null +++ b/mapper/target/classes/mappers/base/ReceivingDetailMapper.xml @@ -0,0 +1,89 @@ + + + + + + + + + update applet_receiving_detail set is_del=1 where id=#{id} + + + + delete from applet_receiving_detail where id=#{id} + + + + update applet_receiving_detail + + + id = #{id}, + + + applet_receiving_vehicle_id = #{applet_receiving_vehicle_id}, + + + ship_name = #{ship_name}, + + + brand = #{brand}, + + + port_name = #{port_name}, + + + vin_list = #{vin_list}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/ReceivingVehicleMapper.xml b/mapper/target/classes/mappers/base/ReceivingVehicleMapper.xml new file mode 100644 index 0000000..dd1e8e5 --- /dev/null +++ b/mapper/target/classes/mappers/base/ReceivingVehicleMapper.xml @@ -0,0 +1,153 @@ + + + + + + + + + update applet_receiving_vehicle set is_del=1 where id=#{id} + + + + delete from applet_receiving_vehicle where id=#{id} + + + + update applet_receiving_vehicle + + + id = #{id}, + + + voucher_number = #{voucher_number}, + + + users_id = #{users_id}, + + + users_name = #{users_name}, + + + tel_number = #{tel_number}, + + + operators = #{operators}, + + + phone_number = #{phone_number}, + + + numbers = #{numbers}, + + + number_type = #{number_type}, + + + trade_type = #{trade_type}, + + + cargo_type = #{cargo_type}, + + + cargo_quantity = #{cargo_quantity}, + + + collect_time = #{collect_time}::timestamp, + + + checker = #{checker}, + + + check_status = #{check_status}, + + + check_time = #{check_time}::timestamp, + + + remarks = #{remarks}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time =current_timestamp + + where id = #{id} + + + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/RequesterMapper.xml b/mapper/target/classes/mappers/base/RequesterMapper.xml new file mode 100644 index 0000000..0f7e2e5 --- /dev/null +++ b/mapper/target/classes/mappers/base/RequesterMapper.xml @@ -0,0 +1,92 @@ + + + + + + + + + update applet_requester set is_del=1 where id=#{id} + + + + delete from applet_requester where id=#{id} + + + + update applet_requester + + + id = #{id}, + + + url = #{url}, + + + param_map = #{param_map}, + + + request_type = #{request_type}, + + + type_description = #{type_description}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp, + + where id = #{id} + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/ServiceConfigMapper.xml b/mapper/target/classes/mappers/base/ServiceConfigMapper.xml new file mode 100644 index 0000000..85ca82a --- /dev/null +++ b/mapper/target/classes/mappers/base/ServiceConfigMapper.xml @@ -0,0 +1,79 @@ + + + + + + + + + update applet_service_config set is_del=1 where id=#{id} + + + + delete from applet_service_config where id=#{id} + + + + update applet_service_config + + + id = #{id}, + + + config_name = #{config_name}, + + + config_code = #{config_code}, + + + config_content = #{config_content}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/TableHeadMapper.xml b/mapper/target/classes/mappers/base/TableHeadMapper.xml new file mode 100644 index 0000000..3119ea4 --- /dev/null +++ b/mapper/target/classes/mappers/base/TableHeadMapper.xml @@ -0,0 +1,90 @@ + + + + + + + + + update applet_table_head + set is_del=1 + where id=#{id} + + + + delete from applet_table_head where id=#{id} + + + + update applet_table_head + + + id = #{id}, + + + table_name = #{table_name}, + + + table_code = #{table_code}, + + + head_jason = #{head_jason}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/TruckManagementMapper.xml b/mapper/target/classes/mappers/base/TruckManagementMapper.xml new file mode 100644 index 0000000..e55ee46 --- /dev/null +++ b/mapper/target/classes/mappers/base/TruckManagementMapper.xml @@ -0,0 +1,105 @@ + + + + + + + + + + update applet_truck_management set is_del=1 where id=#{id} + + + + delete from applet_truck_management where id=#{id} + + + + update applet_truck_management + + + id = #{id}, + + + users_id = #{users_id}, + + + truck_number = #{truck_number}, + + + cause = #{cause}, + + + drivers_name = #{drivers_name}, + + + drivers_phone = #{drivers_phone}, + + + administrators_name = #{administrators_name}, + + + administrators_phone = #{administrators_phone}, + + + enter_time = #{enter_time}::timestamp, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time =current_timestamp + + where id = #{id} + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/TruckMapper.xml b/mapper/target/classes/mappers/base/TruckMapper.xml new file mode 100644 index 0000000..09234fa --- /dev/null +++ b/mapper/target/classes/mappers/base/TruckMapper.xml @@ -0,0 +1,175 @@ + + + + + + + + + + update applet_truck set is_del=1 where id=#{id} + + + + delete from applet_truck where id=#{id} + + + + update applet_truck + + + id = #{id}, + + + wx_openid = #{wx_openid}, + + + users_id = #{users_id}, + + + truck_number = #{truck_number}, + + + driving_license_id = #{driving_license_id}, + + + tel_number = #{tel_number}, + + + head_frame_number = #{head_frame_number}, + + + vehicle_weight = #{vehicle_weight}, + + + vehicle_frame_weight = #{vehicle_frame_weight}, + + + driving_license = #{driving_license}, + + + truck_state = #{truck_state}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/base/UsersMapper.xml b/mapper/target/classes/mappers/base/UsersMapper.xml new file mode 100644 index 0000000..01732c4 --- /dev/null +++ b/mapper/target/classes/mappers/base/UsersMapper.xml @@ -0,0 +1,170 @@ + + + + + + + + + update applet_users set is_del=1 where id=#{id} + + + + delete from applet_users where id=#{id} + + + + update applet_users + + + id = #{id}, + + + access_token = #{access_token}, + + + access_token_rtos = #{access_token_rtos}, + + + users_name = #{users_name}, + + + wx_openid = #{wx_openid}, + + + wx_unionid = #{wx_unionid}, + + + wx_nick = #{wx_nick}, + + + wx_sex = #{wx_sex}, + + + wx_head_sculpture = #{wx_head_sculpture}, + + + tel_number = #{tel_number}, + + + id_code = #{id_code}, + + + users_state = #{users_state}, + + + create_time = #{create_time}::timestamp, + + + is_del = #{is_del}, + + update_time = current_timestamp + + where id = #{id} + + + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/client/AppointmentExtendMapper.xml b/mapper/target/classes/mappers/client/AppointmentExtendMapper.xml new file mode 100644 index 0000000..9a7a79c --- /dev/null +++ b/mapper/target/classes/mappers/client/AppointmentExtendMapper.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + update applet_appointment + set + cancel_time = #{cancel_time}::timestamp, + appointment_state=4 + where id=#{appointment_id} + + + + update applet_appointment_detail + set is_del=1 + where id=#{appointment_id} + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/client/OtherExtendMapper.xml b/mapper/target/classes/mappers/client/OtherExtendMapper.xml new file mode 100644 index 0000000..def25c4 --- /dev/null +++ b/mapper/target/classes/mappers/client/OtherExtendMapper.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/client/PunchClockExtendMapper.xml b/mapper/target/classes/mappers/client/PunchClockExtendMapper.xml new file mode 100644 index 0000000..e29f739 --- /dev/null +++ b/mapper/target/classes/mappers/client/PunchClockExtendMapper.xml @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/mappers/client/TruckExtendMapper.xml b/mapper/target/classes/mappers/client/TruckExtendMapper.xml new file mode 100644 index 0000000..7ce818b --- /dev/null +++ b/mapper/target/classes/mappers/client/TruckExtendMapper.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + update applet_truck + set + truck_state=0 + where users_id=#{users_id} and truck_state<>4 + + + + + + + + + \ No newline at end of file diff --git a/mapper/target/classes/static/rtos-wx-applet.sql b/mapper/target/classes/static/rtos-wx-applet.sql new file mode 100644 index 0000000..f1e5c64 --- /dev/null +++ b/mapper/target/classes/static/rtos-wx-applet.sql @@ -0,0 +1,671 @@ +--RTOS小程序数据库 sql文档 + +-- Database: rtos-wx-applet +-- DROP DATABASE IF EXISTS rtos-wx-applet; + +CREATE DATABASE rtos_wx_applet + WITH + OWNER = postgres + ENCODING = 'UTF8' + LC_COLLATE = 'Chinese (Simplified)_China.936' + LC_CTYPE = 'Chinese (Simplified)_China.936' + TABLESPACE = pg_default + CONNECTION LIMIT = -1 + IS_TEMPLATE = False; +COMMENT ON DATABASE rtos_wx_applet IS 'RTOS小程序数据库'; + + +--1-用户(司机)信息 +CREATE TABLE IF NOT EXISTS public.applet_users( + id serial, + users_name varchar(32) DEFAULT NULL, + wx_openid varchar(32) DEFAULT NULL, + wx_unionid varchar(32) DEFAULT NULL, + wx_nick varchar(32) DEFAULT NULL, + wx_sex varchar(8) DEFAULT NULL, + wx_head_sculpture varchar(256) DEFAULT NULL, + tel_number varchar(32) NOT NULL, + id_code varchar(32) DEFAULT NULL, + users_state integer DEFAULT 0, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_users_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_users.id IS '用户id'; +COMMENT ON COLUMN applet_users.users_name IS '用户姓名,默认为微信昵称'; +COMMENT ON COLUMN applet_users.wx_openid IS '微信获取openid-用户小程序唯一标识'; +COMMENT ON COLUMN applet_users.wx_unionid IS '微信获取unionid-用户微信应用唯一标识'; +COMMENT ON COLUMN applet_users.wx_nick IS '微信获取昵称'; +COMMENT ON COLUMN applet_users.wx_sex IS '微信获取性别'; +COMMENT ON COLUMN applet_users.wx_head_sculpture IS '微信获取头像'; +COMMENT ON COLUMN applet_users.tel_number IS '手机号码'; +COMMENT ON COLUMN applet_users.id_code IS '用户身分证号码'; +COMMENT ON COLUMN applet_users.users_state IS '用户状态(0-正常,1-停用)'; +COMMENT ON COLUMN applet_users.create_time IS '创建时间'; +COMMENT ON COLUMN applet_users.update_time IS '更新时间'; +COMMENT ON COLUMN applet_users.is_del IS '是否软删除'; + + +--2-板车信息(用户扫描行驶证获取) +CREATE TABLE IF NOT EXISTS public.applet_truck( + id serial, + users_id integer, + truck_number varchar(16) DEFAULT NULL, + driving_license_id varchar(32) DEFAULT NULL, + tel_number varchar(16) DEFAULT NULL, + head_frame_number varchar(32) DEFAULT NULL, + vehicle_weight integer DEFAULT NULL, + vehicle_frame_weight integer DEFAULT NULL, + customs_declaration_no varchar(32) DEFAULT NULL, + driving_license varchar(256) DEFAULT NULL, + truck_state integer default 0, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_truck_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_truck.id IS '板车id'; +COMMENT ON COLUMN applet_truck.users_id IS '用户id'; +COMMENT ON COLUMN applet_truck.truck_number IS '车牌号(数据唯一性约束)'; +COMMENT ON COLUMN applet_truck.driving_license_id IS '行驶证ID'; +COMMENT ON COLUMN applet_truck.tel_number IS '司机电话'; +COMMENT ON COLUMN applet_truck.head_frame_number IS '车头车架号'; +COMMENT ON COLUMN applet_truck.vehicle_weight IS '车辆自重'; +COMMENT ON COLUMN applet_truck.vehicle_frame_weight IS '车架重'; +COMMENT ON COLUMN applet_truck.driving_license IS '行驶证(扫描件)'; +COMMENT ON COLUMN applet_truck.truck_state IS '板车状态(1-默认,0-其他,4-拉黑)'; +COMMENT ON COLUMN applet_truck.create_time IS '创建时间'; +COMMENT ON COLUMN applet_truck.update_time IS '更新时间'; +COMMENT ON COLUMN applet_truck.is_del IS '是否软删除'; + + +--3-公告信息(小程序/客服后台推送) +CREATE TABLE IF NOT EXISTS public.applet_announcements( + id serial, + title varchar(64) DEFAULT NULL, + abstracts varchar(256) DEFAULT NULL, + announcement text COLLATE pg_catalog."default" DEFAULT 'NULL::text', + author varchar(32) DEFAULT NULL, + reading_volume integer DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_announcements_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_announcements.id IS '公告id'; +COMMENT ON COLUMN applet_announcements.title IS '标题'; +COMMENT ON COLUMN applet_announcements.abstracts IS '摘要'; +COMMENT ON COLUMN applet_announcements.announcement IS '公告内容'; +COMMENT ON COLUMN applet_announcements.author IS '作者'; +COMMENT ON COLUMN applet_announcements.reading_volume IS '阅读量'; +COMMENT ON COLUMN applet_announcements.create_time IS '创建时间'; +COMMENT ON COLUMN applet_announcements.update_time IS '更新时间'; +COMMENT ON COLUMN applet_announcements.is_del IS '是否软删除'; + + +--4-预约信息 +CREATE TABLE IF NOT EXISTS public.applet_appointment( + id serial, + users_id integer DEFAULT NULL, + transport_type integer DEFAULT NULL, + truck_number varchar(16) DEFAULT NULL, + tel_number varchar(16) DEFAULT NULL, + + //head_frame_number varchar(32) DEFAULT NULL, + vehicle_weight integer, + vehicle_frame_weight integer, + driving_license varchar(32) DEFAULT NULL, + approach_date date DEFAULT NULL, + port_area_id integer DEFAULT NULL, + biz_type integer DEFAULT NULL, + enter_type integer DEFAULT NULL, + goods_type integer DEFAULT NULL, + goods_Quantity integer, + appointment_state integer default 0, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_appointment_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_appointment.id IS '预约信息id'; +COMMENT ON COLUMN applet_appointment.users_id IS '用户id'; +COMMENT ON COLUMN applet_appointment.transport_type IS '运输方式(1/2/3)';// +COMMENT ON COLUMN applet_appointment.truck_number IS '板车号';// +COMMENT ON COLUMN applet_appointment.tel_number IS '手机号';// +COMMENT ON COLUMN applet_appointment.head_frame_number IS '车头车架号';// +COMMENT ON COLUMN applet_appointment.vehicle_weight IS '板车自重(吨)';// +COMMENT ON COLUMN applet_appointment.vehicle_frame_weight IS '车架重(吨)';// +COMMENT ON COLUMN applet_appointment.driving_license IS '行驶证编号';// +COMMENT ON COLUMN applet_appointment.approach_date IS '预约进场日期';// +COMMENT ON COLUMN applet_punch_clock.biz_type IS '业务类型(1-全部,2-码头业务,3-整车物流,4-特保区预约)'; +COMMENT ON COLUMN applet_appointment.port_area_id IS '进港港区Id';// +COMMENT ON COLUMN applet_appointment.enter_type IS '进港类型(1-外贸出口,2-外贸进口,3-整车物流,4-特保区出口,5-特保区进口,6-内贸出口,7-内贸进口)';// +COMMENT ON COLUMN applet_appointment.goods_type IS '货物类型(1-商品车,2-设备,3-其他)';// +COMMENT ON COLUMN applet_appointment.goods_Quantity IS '货物数量(件数)';// +COMMENT ON COLUMN applet_appointment.appointment_state IS '预约打卡状态(1-已预约,2-已签到,3-已进港,5-操作中,6-已完成,7-已离港,4-已取消,9-异常:预期未完成操作的)';// +COMMENT ON COLUMN applet_appointment.create_time IS '创建时间'; +COMMENT ON COLUMN applet_appointment.update_time IS '更新时间'; +COMMENT ON COLUMN applet_appointment.is_del IS '是否软删除'; + 需要 司机生份证 + + +-- 5-预约明细 +CREATE TABLE IF NOT EXISTS public.applet_appointment_detail( + id serial, + appointment_id integer DEFAULT NULL, + ship_name varchar(16) DEFAULT NULL, + voy_number varchar(16) DEFAULT NULL, + destination_port varchar(32) DEFAULT NULL, + brand_name varchar(32) DEFAULT NULL, + vin varchar(32) DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_appointment_detail_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_appointment_detail.id IS '预约详细id'; +COMMENT ON COLUMN applet_appointment_detail.appointment_id IS '预约id'; +COMMENT ON COLUMN applet_appointment_detail.ship_name IS '船名';// +COMMENT ON COLUMN applet_appointment_detail.voy_number IS '航次号'; +COMMENT ON COLUMN applet_appointment_detail.destination_port IS '目的港';// +COMMENT ON COLUMN applet_appointment_detail.brand_name IS '品牌/名称';// +COMMENT ON COLUMN applet_appointment_detail.vin IS '车架号';// +COMMENT ON COLUMN applet_appointment_detail.create_time IS '创建时间'; +COMMENT ON COLUMN applet_appointment_detail.update_time IS '更新时间'; +COMMENT ON COLUMN applet_appointment_detail.is_del IS '是否软删除'; + + +--6-(签到/完成)打卡信息 +CREATE TABLE IF NOT EXISTS public.applet_punch_clock( + id serial, + users_id integer DEFAULT NULL, + appointment_id integer DEFAULT NULL, + biz_type integer DEFAULT NULL, + queue_number varchar(16), + --approach_date date DEFAULT NULL, + punch_start_time time DEFAULT NULL, + punch_over_time time DEFAULT NULL, + port_area_id integer DEFAULT NULL, + punch_address varchar(256) DEFAULT NULL, + over_address varchar(256) DEFAULT NULL, + punch_clock_type integer, + punch_clock_poi varchar(64) DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_punch_clock_pkey PRIMARY KEY (id) +); + +COMMENT ON COLUMN applet_punch_clock.id IS '打卡信息id'; +COMMENT ON COLUMN applet_punch_clock.users_id IS '用户id'; +COMMENT ON COLUMN applet_punch_clock.appointment_id IS '预约Id'; +COMMENT ON COLUMN applet_punch_clock.biz_type IS '业务类型(1-全部,2-码头业务,3-整车物流,4-特保区预约)'; +COMMENT ON COLUMN applet_punch_clock.queue_number IS '排队编号'; +--COMMENT ON COLUMN applet_punch_clock.approach_date IS '打卡日期'; +COMMENT ON COLUMN applet_punch_clock.start_time IS '签到日期时间'; +COMMENT ON COLUMN applet_punch_clock.punch_over_time IS '完成日期时间'; +COMMENT ON COLUMN applet_punch_clock.port_area_id IS '打卡港区(ID)'; +COMMENT ON COLUMN applet_punch_clock.punch_address IS '签到打卡地点'; +COMMENT ON COLUMN applet_punch_clock.over_address IS '完成打卡地点'; +COMMENT ON COLUMN applet_punch_clock.punch_clock_type IS '打卡类别(1-签到,2-已进港,3-操作中,4-已完成,5-已离港)'; +COMMENT ON COLUMN applet_punch_clock.punch_clock_poi IS '打卡(位置坐标){"1":poi2,"2",poi2}'; +COMMENT ON COLUMN applet_punch_clock.create_time IS '创建时间'; +COMMENT ON COLUMN applet_punch_clock.update_time IS '更新时间'; +COMMENT ON COLUMN applet_punch_clock.is_del IS '是否软删除'; + + +--7-收车信息 +CREATE TABLE IF NOT EXISTS public.applet_receiving_vehicle( + id serial, + users_id integer DEFAULT NULL, + ship_name varchar(64) DEFAULT NULL, + voy_number varchar(64) DEFAULT NULL, + complete_project_time timestamp(0) DEFAULT NULL, + task_number varchar(32) DEFAULT NULL, + transport_type varchar(64) DEFAULT NULL, + truck_number varchar(32) DEFAULT NULL, + enter_port_area varchar(32) DEFAULT NULL, + enter_port_time timestamp(0) DEFAULT NULL, + operation_team varchar(16) DEFAULT NULL, + goods_info text DEFAULT NULL, + vehicle_frame_data varchar(2048) DEFAULT NULL, + receiving_state integer DEFAULT 0, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_receiving_vehicle_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_receiving_vehicle.id IS '收车信息id'; +COMMENT ON COLUMN applet_receiving_vehicle.users_id IS '用户id'; +COMMENT ON COLUMN applet_receiving_vehicle.ship_name IS '船名'; +COMMENT ON COLUMN applet_receiving_vehicle.voy_number IS '航次'; +COMMENT ON COLUMN applet_receiving_vehicle.complete_project_time IS '完工日期时间'; +COMMENT ON COLUMN applet_receiving_vehicle.task_number IS '作业编号'; +COMMENT ON COLUMN applet_receiving_vehicle.transport_type IS '运输方式'; +COMMENT ON COLUMN applet_receiving_vehicle.truck_number IS '车牌号(板车号)'; +COMMENT ON COLUMN applet_receiving_vehicle.enter_port_area IS '进港港区'; +COMMENT ON COLUMN applet_receiving_vehicle.enter_port_time IS '进港日期时间'; +COMMENT ON COLUMN applet_receiving_vehicle.operation_team IS '作业工班'; +COMMENT ON COLUMN applet_receiving_vehicle.goods_info IS '货物信息(type:vehicle/others, +vehicle{品牌/型号/车型/数量/港口或国家/车辆类型/卸货方式:港区作业或客户自提,Json数据}, +others{货名/长/宽/高/重量/数量/港口、国家/卸货方式(港区作业/客户自卸)的Json数据})'; +COMMENT ON COLUMN applet_receiving_vehicle.vehicle_frame_data IS '车架号数据([品牌,车架号]的Json数据)'; +COMMENT ON COLUMN applet_receiving_vehicle.receiving_state IS '收车状态(0-默认,未收车,1-已收车,2-已核对)'; +COMMENT ON COLUMN applet_receiving_vehicle.create_time IS '创建时间'; +COMMENT ON COLUMN applet_receiving_vehicle.update_time IS '更新时间'; +COMMENT ON COLUMN applet_receiving_vehicle.is_del IS '是否软删除'; + + +--8-发车信息 +CREATE TABLE IF NOT EXISTS public.applet_departure_vehicle( + id serial, + users_id integer DEFAULT NULL, + ship_name varchar(64) DEFAULT NULL, + voy_number varchar(64) DEFAULT NULL, + complete_project_time timestamp(0) DEFAULT NULL, + task_number varchar(32) DEFAULT NULL, + truck_number varchar(32) DEFAULT NULL, + receiving_unit varchar(64) DEFAULT NULL, + lading_no varchar(64) DEFAULT NULL, + customs_clearance_nature varchar(32) DEFAULT NULL, + customs_declaration_no varchar(32) DEFAULT NULL, + vehicle_frame_data varchar(1024) DEFAULT NULL, + goods_name varchar(32) DEFAULT NULL, + goods_Quantity integer, + certificate_Preparation_date timestamp(0) DEFAULT NULL, + liberator varchar(32) DEFAULT NULL, + signee varchar(32) DEFAULT NULL, + remarks varchar(256) DEFAULT NULL, + departure_state integer default 0, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_departure_vehicle_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_departure_vehicle.id IS '发车信息Id'; +COMMENT ON COLUMN applet_departure_vehicle.users_id IS '用户id'; +COMMENT ON COLUMN applet_departure_vehicle.ship_name IS '船名'; +COMMENT ON COLUMN applet_departure_vehicle.voy_number IS '航次'; +COMMENT ON COLUMN applet_departure_vehicle.complete_project_time IS '完工日期时间'; +COMMENT ON COLUMN applet_departure_vehicle.task_number IS '作业编号'; +COMMENT ON COLUMN applet_departure_vehicle.truck_number IS '车牌号(板车号)'; +COMMENT ON COLUMN applet_departure_vehicle.receiving_unit IS '收货单位'; +COMMENT ON COLUMN applet_departure_vehicle.lading_no IS '提单号'; +COMMENT ON COLUMN applet_departure_vehicle.customs_clearance_nature IS '通关性质'; +COMMENT ON COLUMN applet_departure_vehicle.customs_declaration_no IS '报关单号'; +COMMENT ON COLUMN applet_departure_vehicle.vehicle_frame_data IS '车架号'; +COMMENT ON COLUMN applet_departure_vehicle.goods_name IS '货名'; +COMMENT ON COLUMN applet_departure_vehicle.goods_Quantity IS '件数'; +COMMENT ON COLUMN applet_departure_vehicle.certificate_Preparation_date IS '制证日期'; +COMMENT ON COLUMN applet_departure_vehicle.liberator IS '放行者'; +COMMENT ON COLUMN applet_departure_vehicle.signee IS '签收者'; +COMMENT ON COLUMN applet_departure_vehicle.remarks IS '备注'; +COMMENT ON COLUMN applet_departure_vehicle.departure_state IS '发车状态(0-默认,未发车,1-已收车,2-已核对)'; +COMMENT ON COLUMN applet_departure_vehicle.create_time IS '创建时间'; +COMMENT ON COLUMN applet_departure_vehicle.update_time IS '更新时间'; +COMMENT ON COLUMN applet_departure_vehicle.is_del IS '是否软删除'; + + +--9-意见反馈 +CREATE TABLE IF NOT EXISTS public.applet_feedback( + id serial, + users_id integer DEFAULT NULL, + nike_name varchar(32) DEFAULT NULL, + feedback_info varchar(1024) DEFAULT NULL, + pictures varchar(256) DEFAULT NULL, + tel_number varchar(64) DEFAULT NULL, + contact_info varchar(64) DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT feedback_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_feedback.id IS '意见反馈id'; +COMMENT ON COLUMN applet_feedback.users_id IS '用户id'; +COMMENT ON COLUMN applet_feedback.nike_name IS '昵称'; +COMMENT ON COLUMN applet_feedback.feedback_info IS '意见(限500字)'; +COMMENT ON COLUMN applet_feedback.pictures IS '图片文件名集合,逗号分隔'; +COMMENT ON COLUMN applet_feedback.tel_number IS '联系电话'; +COMMENT ON COLUMN applet_feedback.contact_info IS '联系方式(微信号/qq/邮箱)'; +COMMENT ON COLUMN applet_feedback.create_time IS '创建时间'; +COMMENT ON COLUMN applet_feedback.update_time IS '更新时间'; +COMMENT ON COLUMN applet_feedback.is_del IS '是否软删除'; + + +--10-新手攻略(小程序/客服平台/生产APP操作指南) +CREATE TABLE IF NOT EXISTS public.applet_novice_introduction( + id serial, + sort integer DEFAULT NULL, + title varchar(64) DEFAULT NULL, + content text DEFAULT NULL, + sequence_number int DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT novice_introduction_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_novice_introduction.id IS '攻略_id'; +COMMENT ON COLUMN applet_novice_introduction.sort IS '类别(1-小程序,2-客服平台,3-生产APP)'; +COMMENT ON COLUMN applet_novice_introduction.title IS '小标题'; +COMMENT ON COLUMN applet_novice_introduction.content IS '内容(html文本,允许包含图片标签)'; +COMMENT ON COLUMN applet_novice_introduction.sequence_number IS '顺序号'; +COMMENT ON COLUMN applet_novice_introduction.create_time IS '创建时间'; +COMMENT ON COLUMN applet_novice_introduction.update_time IS '更新时间'; +COMMENT ON COLUMN applet_novice_introduction.is_del IS '是否软删除'; + + +--11-运输方式 +CREATE TABLE IF NOT EXISTS public.applet_transport_types( + id serial, + transport_type_name varchar(64) DEFAULT NULL, + transport_type varchar(64) DEFAULT NULL, + sequence_number int DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT transport_types_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_transport_types.id IS '运输方式id'; +COMMENT ON COLUMN applet_transport_types.transport_type_name IS '运输方式名称(板车运输/自开)'; +COMMENT ON COLUMN applet_transport_types.transport_type IS '运输方式'; +COMMENT ON COLUMN applet_transport_types.sequence_number IS '顺序号'; +COMMENT ON COLUMN applet_transport_types.create_time IS '创建时间'; +COMMENT ON COLUMN applet_transport_types.update_time IS '更新时间'; +COMMENT ON COLUMN applet_transport_types.is_del IS '是否软删除'; + + +--12-港区 +CREATE TABLE IF NOT EXISTS public.applet_port_areas( + id serial, + port_area varchar(64) DEFAULT NULL, + area_center_poi varchar(32) DEFAULT NULL, + punch_range integer DEFAULT NULL, + sequence_number int DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT port_areas_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_port_areas.id IS '港区id'; +COMMENT ON COLUMN applet_port_areas.port_area IS '港区名'; +COMMENT ON COLUMN applet_port_areas.area_center_poi IS '港区坐标'; +COMMENT ON COLUMN applet_port_areas.punch_range IS '打卡范围(距离港区中心坐标的半径,米)'; +COMMENT ON COLUMN applet_port_areas.sequence_number IS '顺序号'; +COMMENT ON COLUMN applet_port_areas.create_time IS '创建时间'; +COMMENT ON COLUMN applet_port_areas.update_time IS '更新时间'; +COMMENT ON COLUMN applet_port_areas.is_del IS '是否软删除'; + + +--13-作业工班 +CREATE TABLE IF NOT EXISTS public.applet_operation_teams( + id serial, + operation_team varchar(64) DEFAULT NULL, + sequence_number int DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT operation_teams_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_operation_teams.id IS '作业工班id'; +COMMENT ON COLUMN applet_operation_teams.operation_team IS '作业工班'; +COMMENT ON COLUMN applet_operation_teams.sequence_number IS '顺序号'; +COMMENT ON COLUMN applet_operation_teams.create_time IS '创建时间'; +COMMENT ON COLUMN applet_operation_teams.update_time IS '更新时间'; +COMMENT ON COLUMN applet_operation_teams.is_del IS '是否软删除'; + + +--14-车辆管理 +CREATE TABLE IF NOT EXISTS public.applet_truck_management( + id serial, + users_id integer DEFAULT NULL, + truck_number varchar(32) DEFAULT NULL, + cause varchar(256) DEFAULT NULL, + drivers_name varchar(32) DEFAULT NULL, + drivers_phone varchar(32) DEFAULT NULL, + administrators_name varchar(32) DEFAULT NULL, + administrators_phone varchar(32) DEFAULT NULL, + enter_time timestamp(0) DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_truck_management_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_truck_management.id IS '车辆管理id'; +COMMENT ON COLUMN applet_truck_management.users_id IS '用户id'; +COMMENT ON COLUMN applet_truck_management.truck_number IS '(加入黑名单的)车牌号'; +COMMENT ON COLUMN applet_truck_management.cause IS '原因'; +COMMENT ON COLUMN applet_truck_management.drivers_name IS '司机姓名'; +COMMENT ON COLUMN applet_truck_management.drivers_phone IS '司机电话'; +COMMENT ON COLUMN applet_truck_management.administrators_name IS '管理员姓名'; +COMMENT ON COLUMN applet_truck_management.administrators_phone IS '管理员电话'; +COMMENT ON COLUMN applet_truck_management.enter_time IS '加入黑名单时间'; +COMMENT ON COLUMN applet_truck_management.create_time IS '创建时间'; +COMMENT ON COLUMN applet_truck_management.update_time IS '更新时间'; +COMMENT ON COLUMN applet_truck_management.is_del IS '是否软删除'; + + +--15-货物类型 +CREATE TABLE IF NOT EXISTS public.applet_goods_types( + id serial, + goods_type_name varchar(64) DEFAULT NULL, + goods_type integer DEFAULT NULL, + sequence_number integer, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT goods_types_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_goods_types.id IS '货物类型id'; +COMMENT ON COLUMN applet_goods_types.goods_type_name IS '货物类型(1-商品车/2-设备/3-其他...)'; +COMMENT ON COLUMN applet_goods_types.goods_type IS '货物类型(1-商品车/2-设备/3-其他...)'; +COMMENT ON COLUMN applet_goods_types.sequence_number IS '顺序号'; +COMMENT ON COLUMN applet_goods_types.create_time IS '创建时间'; +COMMENT ON COLUMN applet_goods_types.update_time IS '更新时间'; +COMMENT ON COLUMN applet_goods_types.is_del IS '是否软删除'; + + +--16-进港类型 +CREATE TABLE IF NOT EXISTS public.applet_enter_type( + id serial, + enter_port_type_name varchar(32) DEFAULT NULL, + enter_port_type integer DEFAULT NULL, + sequence_number integer, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_enter_types_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_enter_type.id IS '进港类型id'; +COMMENT ON COLUMN applet_enter_type.enter_port_type_name IS '进港类型名称(1-外贸出口/2-内贸出口/3-外贸进口/4-内贸进口/5-特保区出口/6-特保区进口...)'; +COMMENT ON COLUMN applet_enter_type.enter_port_type IS '进港类型(1/2/3/4/5/6/...)'; +COMMENT ON COLUMN applet_enter_type.sequence_number IS '顺序号'; +COMMENT ON COLUMN applet_enter_type.create_time IS '创建时间'; +COMMENT ON COLUMN applet_enter_type.update_time IS '更新时间'; +COMMENT ON COLUMN applet_enter_type.is_del IS '是否软删除'; + + +--17-船名航次 +CREATE TABLE IF NOT EXISTS public.applet_ship_voy( + id serial, + ship_name varchar(32) DEFAULT NULL, + voy_number varchar(32) DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_ship_voy_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_ship_voy.id IS '船名航次id'; +COMMENT ON COLUMN applet_ship_voy.ship_name IS '船名'; +COMMENT ON COLUMN applet_ship_voy.voy_number IS '航次编号'; +COMMENT ON COLUMN applet_ship_voy.create_time IS '创建时间'; +COMMENT ON COLUMN applet_ship_voy.update_time IS '更新时间'; +COMMENT ON COLUMN applet_ship_voy.is_del IS '是否软删除'; + + +--18-(运抵)港口 +CREATE TABLE IF NOT EXISTS public.applet_port( + id serial, + ship_voy_id integer DEFAULT NULL, + port_name varchar(64) DEFAULT NULL, + sequence_number int DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT ports_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_port.id IS '港口id'; +COMMENT ON COLUMN applet_port.ship_voy_id IS '船名航次id'; +COMMENT ON COLUMN applet_port.port_name IS '港口名称'; +COMMENT ON COLUMN applet_port.sequence_number IS '顺序号'; +COMMENT ON COLUMN applet_port.create_time IS '创建时间'; +COMMENT ON COLUMN applet_port.update_time IS '更新时间'; +COMMENT ON COLUMN applet_port.is_del IS '是否软删除'; + + +--19-商品车品牌 +CREATE TABLE IF NOT EXISTS public.applet_brand( + id serial, + ship_voy_id integer DEFAULT NULL, + brand varchar(64) DEFAULT NULL, + sequence_number int DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_brand_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_brand.id IS '品牌id'; +COMMENT ON COLUMN applet_brand.ship_voy_id IS '船名航次id'; +COMMENT ON COLUMN applet_brand.brand IS '品牌名称'; +COMMENT ON COLUMN applet_brand.sequence_number IS '顺序号'; +COMMENT ON COLUMN applet_brand.create_time IS '创建时间'; +COMMENT ON COLUMN applet_brand.update_time IS '更新时间'; +COMMENT ON COLUMN applet_brand.is_del IS '是否软删除'; + + +--20-进港指令 +CREATE TABLE IF NOT EXISTS public.applet_entry_instruct( + id serial, + appointment_id integer DEFAULT NULL, + users_id integer DEFAULT NULL, + users_name varchar(32) DEFAULT NULL, + truck_number varchar(32) DEFAULT NULL, + yard_name varchar(32) DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_entry_instruct_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_entry_instruct.id IS '进港指令id'; +COMMENT ON COLUMN applet_entry_instruct.appointment_id IS '预约id'; +COMMENT ON COLUMN applet_entry_instruct.users_id IS '司机id'; +COMMENT ON COLUMN applet_entry_instruct.users_name IS '司机姓名'; +COMMENT ON COLUMN applet_entry_instruct.truck_number IS '车牌号'; +COMMENT ON COLUMN applet_entry_instruct.yard_name IS '堆场'; +COMMENT ON COLUMN applet_entry_instruct.create_time IS '创建时间'; +COMMENT ON COLUMN applet_entry_instruct.update_time IS '更新时间'; +COMMENT ON COLUMN applet_entry_instruct.is_del IS '是否软删除'; + + +--21-服务配置 +CREATE TABLE IF NOT EXISTS public.applet_service_config( + id serial, + config_name varchar(32) default null, + config_code varchar(32) default null, + config_content varchar(256) default null, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_service_config_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_service_config.id IS '自增id'; +COMMENT ON COLUMN applet_service_config.config_name IS '配置名称(系统服务地址,图片文件存储路径,图片访问路径,小程序appid,小程序密钥secret)'; +COMMENT ON COLUMN applet_service_config.config_code IS '配置代码(100-系统服务地址,200-图片文件存储路径,300-图片访问路径,400-小程序appid,500-小程序密钥secret)'; +COMMENT ON COLUMN applet_service_config.config_content IS '配置信息(文本)'; +COMMENT ON COLUMN applet_service_config.create_time IS '创建时间'; +COMMENT ON COLUMN applet_service_config.update_time IS '更新时间'; +COMMENT ON COLUMN applet_service_config.is_del IS '是否软删除'; + +--22-请求第三方接口 +CREATE TABLE IF NOT EXISTS public.applet_requester( + id serial, + url varchar(256) default null, + param_map varchar(256) default null, + request_type integer default null, + type_description varchar(32) default null, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_requester_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_requester.id IS '自增id'; +COMMENT ON COLUMN applet_requester.url IS 'url(请求服务地址)'; +COMMENT ON COLUMN applet_requester.param_map IS '请求参数(值为空时,需要依赖实参传值。如小程序登录参数:{"appid":"","code":"","secret":"","grant_type":"authorization_code"})'; +COMMENT ON COLUMN applet_requester.request_type IS '请求类型(1001-1999)'; +COMMENT ON COLUMN applet_requester.type_description IS '类别说明'; +COMMENT ON COLUMN applet_requester.create_time IS '创建时间'; +COMMENT ON COLUMN applet_requester.update_time IS '更新时间'; +COMMENT ON COLUMN applet_requester.is_del IS '是否软删除'; + +--23-用户登录日志 +CREATE TABLE IF NOT EXISTS public.applet_login_log( + id serial, + wx_nike varchar(32), + wx_openid varchar(32) DEFAULT NULL, + login_time timestamp default null, + ip varchar(32) default null, + area varchar(32) default null, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_login_log_pkey PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_login_log.id IS '自增id'; +COMMENT ON COLUMN applet_login_log.wx_nike IS '微信昵称'; +COMMENT ON COLUMN applet_login_log.wx_openid IS '微信openid'; +COMMENT ON COLUMN applet_login_log.login_time IS '登录时间'; +COMMENT ON COLUMN applet_login_log.ip IS 'ip地址'; +COMMENT ON COLUMN applet_login_log.area IS '地区(省市)'; +COMMENT ON COLUMN applet_login_log.create_time IS '创建时间'; +COMMENT ON COLUMN applet_login_log.update_time IS '更新时间'; +COMMENT ON COLUMN applet_login_log.is_del IS '是否软删除'; + +--24-自定义表头 +CREATE TABLE IF NOT EXISTS public.applet_tb_head( + id serial, + table_name varchar(32), + table_code varchar(32) default null, + head_jason varchar(512) default null, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0, + CONSTRAINT applet_tb_head PRIMARY KEY (id) +); +COMMENT ON COLUMN applet_tb_head.id IS '自增id'; +COMMENT ON COLUMN applet_tb_head.table_name IS '表名'; +COMMENT ON COLUMN applet_tb_head.table_code IS '标识代码'; +COMMENT ON COLUMN applet_tb_head.head_jason IS '表头Json'; +COMMENT ON COLUMN applet_tb_head.create_time IS '创建时间'; +COMMENT ON COLUMN applet_tb_head.update_time IS '更新时间'; +COMMENT ON COLUMN applet_tb_head.is_del IS '是否软删除'; + + +--25--消息表 +CREATE TABLE IF NOT EXISTS public.applet_message( + id varchar(32), + type integer DEFAULT NULL, + type_content varchar(256)DEFAULT NULL, + truck_number varchar(32) DEFAULT NULL, + is_read integer DEFAULT NULL, + create_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + update_time timestamp(3) default ('now'::text)::timestamp(0) with time zone, + is_del integer DEFAULT 0 +); +COMMENT ON COLUMN applet_message.id IS 'id'; +COMMENT ON COLUMN applet_message.type IS '1-收车 2-提车'; +COMMENT ON COLUMN applet_message.type_content IS '1-收车 2-提车'; +COMMENT ON COLUMN applet_message.truck_number IS '板车号'; +COMMENT ON COLUMN applet_message.is_read IS '0-未读 1-已读'; +COMMENT ON COLUMN applet_message.create_time IS '创建时间'; +COMMENT ON COLUMN applet_message.update_time IS '更新时间'; +COMMENT ON COLUMN applet_message.is_del IS '是否软删除'; \ No newline at end of file diff --git a/mapper/target/classes/static/tableUpdate.txt b/mapper/target/classes/static/tableUpdate.txt new file mode 100644 index 0000000..8163774 --- /dev/null +++ b/mapper/target/classes/static/tableUpdate.txt @@ -0,0 +1,3 @@ +1. 预约表applet_appointment head_frame_number 修改为 truck_vin +2. 预约表applet_punch_clock start_time 数据类型time 改为datetime + over_time 数据类型time 改为datetime diff --git a/mapper/target/mapper-1.0-SNAPSHOT.jar b/mapper/target/mapper-1.0-SNAPSHOT.jar new file mode 100644 index 0000000..9875c6e Binary files /dev/null and b/mapper/target/mapper-1.0-SNAPSHOT.jar differ diff --git a/mapper/target/maven-archiver/pom.properties b/mapper/target/maven-archiver/pom.properties new file mode 100644 index 0000000..befca91 --- /dev/null +++ b/mapper/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Mon Oct 30 20:58:37 CST 2023 +version=1.0-SNAPSHOT +groupId=org.example +artifactId=mapper diff --git a/mapper/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/mapper/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..921cbcb --- /dev/null +++ b/mapper/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,33 @@ +com\haitongauto\mapper\client\TruckExtendMapper.class +com\haitongauto\mapper\base\LoginLogMapper.class +com\haitongauto\mapper\base\PunchClockMapper.class +com\haitongauto\mapper\base\RequesterMapper.class +com\haitongauto\mapper\base\AppointmentDetailMapper.class +com\haitongauto\mapper\base\ReceivingDetailMapper.class +com\haitongauto\mapper\base\TruckManagementMapper.class +com\haitongauto\mapper\base\ServiceConfigMapper.class +com\haitongauto\mapper\base\PortAreasMapper.class +com\haitongauto\mapper\base\NoviceIntroductionMapper.class +com\haitongauto\mapper\base\ReceivingVehicleMapper.class +com\haitongauto\mapper\client\OtherExtendMapper.class +com\haitongauto\mapper\base\FeedbackMapper.class +com\haitongauto\mapper\base\DepartureDetailMapper.class +com\haitongauto\mapper\base\TableHeadMapper.class +com\haitongauto\mapper\admin\AnnouncementAdminMapper.class +com\haitongauto\mapper\base\EntryInstructMapper.class +com\haitongauto\mapper\base\DepartureVehicleMapper.class +com\haitongauto\mapper\admin\UsersAdminMapper.class +com\haitongauto\mapper\admin\FeedbackAdminMapper.class +com\haitongauto\mapper\base\UsersMapper.class +com\haitongauto\mapper\admin\StatisticsAdminMapper.class +com\haitongauto\mapper\base\TruckMapper.class +com\haitongauto\mapper\client\PunchClockExtendMapper.class +com\haitongauto\mapper\base\AnnouncementMapper.class +com\haitongauto\mapper\client\AppointmentExtendMapper.class +com\haitongauto\mapper\admin\PunchClockAdminMapper.class +com\haitongauto\mapper\base\AppointmentMapper.class +com\haitongauto\mapper\admin\NoviceIntroductionAdminMapper.class +com\haitongauto\mapper\base\MessageMapper.class +com\haitongauto\mapper\admin\AppointmentAdminMapper.class +com\haitongauto\mapper\base\DicMapper.class +com\haitongauto\mapper\base\DataBaseMapper.class diff --git a/mapper/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/mapper/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..1484cb7 --- /dev/null +++ b/mapper/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,33 @@ +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\client\TruckExtendMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\client\OtherExtendMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\UsersMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\admin\PunchClockAdminMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\ReceivingVehicleMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\TruckManagementMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\FeedbackMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\AnnouncementMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\TableHeadMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\admin\UsersAdminMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\AppointmentMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\admin\FeedbackAdminMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\admin\NoviceIntroductionAdminMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\admin\StatisticsAdminMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\client\AppointmentExtendMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\admin\AnnouncementAdminMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\DataBaseMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\client\PunchClockExtendMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\PunchClockMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\AppointmentDetailMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\ServiceConfigMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\RequesterMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\TruckMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\admin\AppointmentAdminMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\NoviceIntroductionMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\EntryInstructMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\DepartureVehicleMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\DicMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\DepartureDetailMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\LoginLogMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\ReceivingDetailMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\MessageMapper.java +F:\Codes\rtos\v3\mapper\src\main\java\com\haitongauto\mapper\base\PortAreasMapper.java diff --git a/models/pom.xml b/models/pom.xml new file mode 100644 index 0000000..5efb0f9 --- /dev/null +++ b/models/pom.xml @@ -0,0 +1,37 @@ + + + + rtos-wh + org.example + 1.0-SNAPSHOT + + 4.0.0 + + models + + + 1.8 + 1.8 + + + + + org.projectlombok + lombok + 1.18.26 + + + com.alibaba + easyexcel + 3.2.1 + compile + + + com.fasterxml.jackson.core + jackson-annotations + + + + \ No newline at end of file diff --git a/models/src/main/java/com/haitongauto/models/dto/AnnouncementsDto.java b/models/src/main/java/com/haitongauto/models/dto/AnnouncementsDto.java new file mode 100644 index 0000000..8978cde --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/AnnouncementsDto.java @@ -0,0 +1,20 @@ +package com.haitongauto.models.dto; + +import lombok.Data; + +import java.util.Date; +@Data +public class AnnouncementsDto { + private String id; //- '公告id'; + private String title; //- '标题'; + private Integer sort; //- '类别(1-小程序,2-客服平台)'; + private String sort_name; //- '类别名称(1-小程序,2-客服平台)'; + private String abstracts; //-'摘要'; + private String announcement; //-'公告内容'; + private String announcement_text; + private String author; //-'作者'; + private Integer reading_volume; //-'阅读量'; + private String create_time; //-'创建时间'; + private String update_time; //-'更新时间'; + private Integer is_del; //-'是否软删除'; +} diff --git a/models/src/main/java/com/haitongauto/models/dto/AppointmentDto.java b/models/src/main/java/com/haitongauto/models/dto/AppointmentDto.java new file mode 100644 index 0000000..e46a112 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/AppointmentDto.java @@ -0,0 +1,63 @@ +package com.haitongauto.models.dto; + +import lombok.Data; +import org.apache.poi.hpsf.Decimal; + +@Data +public class AppointmentDto { + /** 预约信息id */ + private String id ; + /** 用户id */ + private String users_id ; + /** 运输方式(1-板车运输,2-自开) */ + private String transport_type ; + /** 运输方式名称(1-板车运输,2-自开) */ + private String transport_type_name ; + /** 板车号 */ + private String truck_number ; + /** 身份证号 */ + private String id_code ; + /** 手机号 */ + private String tel_number ; + /** 车头车架号 */ + private String truck_vin ; + /** 板车自重(吨) */ + private Double vehicle_weight ; + /** 车架重(吨) */ + private Double vehicle_frame_weight ; + /** 行驶证编号 */ + private String driving_license ; + /** 预约进场日期 */ + private String approach_date ; + /** 进港港区Id */ + private String port_area_id ; + /** 进港港区名 */ + private String port_area_name; + /** 业务类型(1-全部,2-码头业务,3-整车物流,4-特保区预约)【该字段貌似已取消】 */ + private String biz_type ; + /** 进港类型(1-外贸出口,2-外贸进口,3-整车物流,4-特保区出口,5-特保区进口,6-内贸出口,7-内贸进口) */ + private String enter_type ; + /** 预约类型(1-普通码头预约,2-特保区预约) 新增字段 */ + private Integer appointment_type ; + /** 预约类型名称(1-普通码头预约,2-特保区预约) 新增字段 */ + private String appointment_type_name ; + + /** 进港类型名(1-外贸出口,2-外贸进口,3-整车物流,4-特保区出口,5-特保区进口,6-内贸出口,7-内贸进口) */ + private String enter_type_name ; + /** 货物类型(1-商品车,2-设备,3-其他) */ + private String goods_type ; + /** 货物类型名(1-商品车,2-设备,3-其他) */ + private String goods_type_name ; + /** 货物数量(件数) */ + private Integer goods_quantity ; + /** 预约打卡状态(1-已预约,2-已签到,3-已完成,4-已取消,9-异常:预期未完成操作的) */ + private Integer appointment_state ; + /** 取消预约时间 */ + private String cancel_time ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; +} diff --git a/models/src/main/java/com/haitongauto/models/dto/AppointmentPostDto.java b/models/src/main/java/com/haitongauto/models/dto/AppointmentPostDto.java new file mode 100644 index 0000000..ba99c1f --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/AppointmentPostDto.java @@ -0,0 +1,16 @@ +package com.haitongauto.models.dto; + +import com.haitongauto.models.pojo.Appointment; +import com.haitongauto.models.pojo.AppointmentDetail; +import lombok.Data; + +import java.util.List; + +@Data +public class AppointmentPostDto { + //private Appointment appointment; + private String appointment; + + // private List appointmentDetailList; + private String appointmentDetailList; +} diff --git a/models/src/main/java/com/haitongauto/models/dto/AppointmentQuery.java b/models/src/main/java/com/haitongauto/models/dto/AppointmentQuery.java new file mode 100644 index 0000000..3548136 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/AppointmentQuery.java @@ -0,0 +1,47 @@ +package com.haitongauto.models.dto; + +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Data; + +@Data +public class AppointmentQuery { + //进场预约类型,司机名称,司机手机号,身份证号,板车号,车头车架号,车自重,车架重,行驶证,进港港区,进港类型,运输方式,进场日期,货物类型,货物数量,预约状态,预约时间,操作人 + @ExcelProperty(value = "预约详细id") + private String appointment_id; //-'预约id'; + @ExcelProperty(value = "进场预约类型", order = 1) + private String biz_type_name; //-'进场预约类型(1-全部,2-码头业务,3-整车物流,4-特保区预约)'; + @ExcelProperty(value = "司机名称", order = 2) + private String users_name; //司机名称 + @ExcelProperty(value = "司机手机号", order = 3) + private String tel_number; //-'手机号'; + @ExcelProperty(value = "身份证号", order = 4) + private String id_code; //身份证号码 + @ExcelProperty(value = "板车号", order = 5) + private String truck_number; //-'板车号'; + @ExcelProperty(value = "车头车架号", order = 6) + private String head_frame_number; //-'车头车架号'; + @ExcelProperty(value = "板车自重" ,order = 7) + private Double vehicle_weight; //-'板车自重'; + @ExcelProperty(value = "车架重",order = 8) + private Double vehicle_frame_weight; //-'车架重'; + @ExcelProperty(value = "行驶证ID",order = 9) + private String driving_license_id; //-'行驶证ID'; + @ExcelProperty(value = "进港港区",order = 10) + private String port_area_name; //-'进港港区'; + @ExcelProperty(value = "进港类型",order = 11) + private String enter_type_name; //-'进港类型'; + @ExcelProperty(value = "运输方式",order = 12) + private String transport_type_name; //-'运输方式'; + @ExcelProperty(value = "进场日期",order = 13) + private String approach_date; //-'进场日期'; + @ExcelProperty(value = "货物类型",order = 14) + private String goods_type_name; //-'货物类型(商品车/设备...)'; + @ExcelProperty(value = "货物数量",order = 15) + private Integer goods_Quantity; //-'货物数量(件数)'; + @ExcelProperty(value = "预约状态",order = 16) + private String appointment_state; //-预约状态(1-已预约,2-已签到,3-已进港,5-操作中,6-已完成,7-已离港,4-已取消,9-异常); + @ExcelProperty(value = "预约时间",order = 17) + private String approach_time; //-'预约时间'; + @ExcelProperty(value = "操作人",order = 18) + private String operator; //-' 操作人'; +} diff --git a/models/src/main/java/com/haitongauto/models/dto/Appointment_Dto.java b/models/src/main/java/com/haitongauto/models/dto/Appointment_Dto.java new file mode 100644 index 0000000..0b0b47f --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/Appointment_Dto.java @@ -0,0 +1,21 @@ +package com.haitongauto.models.dto; + +import lombok.Data; + +@Data +public class Appointment_Dto { + private String arrivalType; + private String printStatus; + private String trailerNo; + + private String goodsAmount; + private String bvmId; + private String arrivePortTime; + + private String potId; + private String pamId; + private String phoneNumber; + + private String transType; + private String ttiId; +} diff --git a/models/src/main/java/com/haitongauto/models/dto/CurrentDayPunchClockDto.java b/models/src/main/java/com/haitongauto/models/dto/CurrentDayPunchClockDto.java new file mode 100644 index 0000000..74c676e --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/CurrentDayPunchClockDto.java @@ -0,0 +1,29 @@ +package com.haitongauto.models.dto; + +import com.haitongauto.models.pojo.PunchClock; +import lombok.Data; + +import java.util.List; + +/** + * 当天的打卡DTO + */ + +@Data +public class CurrentDayPunchClockDto { + /** + * 今天的打卡记录 + */ + private List punchClockList; + + /** + * 总工时 + */ + private double totalWorkingHours; + + /** + * 打卡次数 + */ + private Integer totalPunchClockCount; + +} diff --git a/models/src/main/java/com/haitongauto/models/dto/DataForMessage.java b/models/src/main/java/com/haitongauto/models/dto/DataForMessage.java new file mode 100644 index 0000000..5ab7e4c --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/DataForMessage.java @@ -0,0 +1,14 @@ +package com.haitongauto.models.dto; + +import lombok.Data; + +@Data +public class DataForMessage { + private String access_token; //接口调用凭证,该参数为 URL 参数,非 Body 参数。使用access_token或者authorizer_access_token + private String template_id; //所需下发的订阅模板id + private String page; //点击模板卡片后的跳转页面,仅限本小程序内的页面。支持带参数,(示例index?foo=bar)。该字段不填则模板无跳转 + private String touser; //接收者(用户)的 openid + private String data; //模板内容,格式形如 { "key1": { "value": any }, "key2": { "value": any } }的object + private String miniprogram_state; //跳转小程序类型:developer为开发版;trial为体验版;formal为正式版;默认为正式版 + private String lang; //进入小程序查看”的语言类型,支持zh_CN(简体中文)、en_US(英文)、zh_HK(繁体中文)、zh_TW(繁体中文),默认为zh_CN +} diff --git a/models/src/main/java/com/haitongauto/models/dto/Details.java b/models/src/main/java/com/haitongauto/models/dto/Details.java new file mode 100644 index 0000000..13974e9 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/Details.java @@ -0,0 +1,10 @@ +package com.haitongauto.models.dto; + +import lombok.Data; + +//商品车详情之品牌、车架号 +@Data +public class Details { + private String brand; //品牌 + private String vin; //车架号 +} diff --git a/models/src/main/java/com/haitongauto/models/dto/DicDto.java b/models/src/main/java/com/haitongauto/models/dto/DicDto.java new file mode 100644 index 0000000..1fa040c --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/DicDto.java @@ -0,0 +1,14 @@ +package com.haitongauto.models.dto; + +import lombok.Data; + +@Data +/** + * 字典DTO + */ +public class DicDto { + private String id; + private String text; + + +} diff --git a/models/src/main/java/com/haitongauto/models/dto/EnterPortTypeDto.java b/models/src/main/java/com/haitongauto/models/dto/EnterPortTypeDto.java new file mode 100644 index 0000000..d4ea2fe --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/EnterPortTypeDto.java @@ -0,0 +1,24 @@ +package com.haitongauto.models.dto; + +import lombok.Data; + +@Data +/** + * 进港类型Dto + */ +public class EnterPortTypeDto { + private String eteCode; + /** + * 进港类型值 + */ + private String eteType; + /** + * 进港类型名称 + */ + private String eteBusinesstp; + /** + * 业务类型名称 + */ + private String eteBusinesstpDesc; + +} diff --git a/models/src/main/java/com/haitongauto/models/dto/EnterPortTypeDtol.java b/models/src/main/java/com/haitongauto/models/dto/EnterPortTypeDtol.java new file mode 100644 index 0000000..a925f13 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/EnterPortTypeDtol.java @@ -0,0 +1,25 @@ +package com.haitongauto.models.dto; + +import lombok.Data; + +@Data +public class EnterPortTypeDtol { + + /** + * 进港类型值 + */ + private String id; + /** + * 进港类型名称 + */ + private String text; + + /** + * 进港类型值 + */ + private String eteBusinesstp; + /** + * 业务类型名称 + */ + private String eteBusinesstpDesc; +} diff --git a/models/src/main/java/com/haitongauto/models/dto/Pages.java b/models/src/main/java/com/haitongauto/models/dto/Pages.java new file mode 100644 index 0000000..23eb46f --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/Pages.java @@ -0,0 +1,17 @@ +package com.haitongauto.models.dto; + +import lombok.Data; + +/** + * 分页参数类 + */ +@Data +public class Pages { + private Integer pageNum; //当前页码 + private Integer pageSize; //每页记录条数 + private Integer pageCount; //总页数 + private long recordTotal; //记录总数 + + private Integer unReadSize; //未读条数 + +} diff --git a/models/src/main/java/com/haitongauto/models/dto/PalletTruckAndUsers.java b/models/src/main/java/com/haitongauto/models/dto/PalletTruckAndUsers.java new file mode 100644 index 0000000..0c41a5d --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/PalletTruckAndUsers.java @@ -0,0 +1,11 @@ +package com.haitongauto.models.dto; + +import com.haitongauto.models.pojo.Truck; +import com.haitongauto.models.pojo.Users; +import lombok.Data; + +@Data +public class PalletTruckAndUsers { + private Truck plateNumber; + private Users users; +} diff --git a/models/src/main/java/com/haitongauto/models/dto/PunchClockQuery.java b/models/src/main/java/com/haitongauto/models/dto/PunchClockQuery.java new file mode 100644 index 0000000..f4f5acd --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/PunchClockQuery.java @@ -0,0 +1,46 @@ +package com.haitongauto.models.dto; + +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Data; + +import java.time.LocalDate; +import java.time.LocalTime; + +@Data +public class PunchClockQuery { + //业务类型,进港类型,进场日期,进港港区,司机名称,手机号,板车号,预约时间,签到时间,完工打卡时间,签到状态(是否),完工打卡状态,签到地址,完工打卡地址,排队编号,前面车辆数 + @ExcelProperty(value = "打卡id") + private String punch_clock_id; //-'打卡id'; + @ExcelProperty(value = "业务类型") + private String biz_type_name; //-'业务类型(1-全部,2-码头业务,3-整车物流,4-特保区预约)';//貌似已经取消 + @ExcelProperty(value = "进港类型") + private String enter_type_name; //-'进港类型'; + @ExcelProperty(value = "进场日期") + private String approach_date; //-'预约进场日期'; + @ExcelProperty(value = "进港港区") + private String port_area_name; //-'进港港区'; + @ExcelProperty(value = "司机名称") + private String users_name; //司机名称 + @ExcelProperty(value = "手机号") + private String tel_number; //-'手机号'; + @ExcelProperty(value = "板车号") + private String truck_number; //-'板车号'; + @ExcelProperty(value = "预约时间") + private String approach_time; //-'预约时间'; + @ExcelProperty(value = "签到打卡时间") + private String punch_start_time; //-'签到打卡时间(HH:mm:ss)'; + @ExcelProperty(value = "完成打卡时间") + private String punch_over_time; //-'完成打卡时间(HH:mm:ss)'; + @ExcelProperty(value = "签到状态") + private String is_start; //-签到状态(正常/缺卡); + @ExcelProperty(value = "完卡状态") + private String is_over; //-完卡状态(正常/缺卡); + @ExcelProperty(value = "签到打卡地点") + private String punch_address; //-签到打卡地点 + @ExcelProperty(value = "完成打卡地点") + private String over_address; //-完成打卡地点 + @ExcelProperty(value = "排队编号") + private String queue_number; //-排队编号 + @ExcelProperty(value = "前面车辆数") + private Integer befor_num; //- 前面车辆数 +} diff --git a/models/src/main/java/com/haitongauto/models/dto/RecAndDepExcelDto.java b/models/src/main/java/com/haitongauto/models/dto/RecAndDepExcelDto.java new file mode 100644 index 0000000..2f72e2e --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/RecAndDepExcelDto.java @@ -0,0 +1,12 @@ +package com.haitongauto.models.dto; + +import lombok.Data; + +@Data +public class RecAndDepExcelDto { + + private String text1; + private String text2; + private String text3; + private String text4; +} diff --git a/models/src/main/java/com/haitongauto/models/dto/Responser.java b/models/src/main/java/com/haitongauto/models/dto/Responser.java new file mode 100644 index 0000000..47988ed --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/Responser.java @@ -0,0 +1,10 @@ +package com.haitongauto.models.dto; + +import lombok.Data; + +@Data +public class Responser { + private Integer code; + private String message; + private Object data; +} diff --git a/models/src/main/java/com/haitongauto/models/dto/VehicleDetails.java b/models/src/main/java/com/haitongauto/models/dto/VehicleDetails.java new file mode 100644 index 0000000..e4961d2 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/VehicleDetails.java @@ -0,0 +1,14 @@ +package com.haitongauto.models.dto; + +import lombok.Data; + +import java.util.List; + +//预约信息中的货物(商品车详情) +@Data +public class VehicleDetails { + private String ship_name; //船名 + private String port_name; //航次 + private List
Details; //{品牌,车架号} +} + diff --git a/models/src/main/java/com/haitongauto/models/dto/app/ChuanItem.java b/models/src/main/java/com/haitongauto/models/dto/app/ChuanItem.java new file mode 100644 index 0000000..29b08c2 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/app/ChuanItem.java @@ -0,0 +1,15 @@ +package com.haitongauto.models.dto.app; + +import lombok.Data; + +import java.util.List; + +@Data +public class ChuanItem { + private Boolean isOpen; + private String ship_name; + private String ship_id; + private String port_name; + private String port_name_id; + private List commercial_vehicle_details; +} diff --git a/models/src/main/java/com/haitongauto/models/dto/app/CommercialVehicleDetail.java b/models/src/main/java/com/haitongauto/models/dto/app/CommercialVehicleDetail.java new file mode 100644 index 0000000..82fe554 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/app/CommercialVehicleDetail.java @@ -0,0 +1,13 @@ +package com.haitongauto.models.dto.app; + +import lombok.Data; + +import java.util.List; + +@Data +public class CommercialVehicleDetail { + private Boolean isOpen; + private String brand; + private String brand_id; + private List vehicle_frame_num; +} diff --git a/models/src/main/java/com/haitongauto/models/dto/app/Vin.java b/models/src/main/java/com/haitongauto/models/dto/app/Vin.java new file mode 100644 index 0000000..0c7e27c --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/app/Vin.java @@ -0,0 +1,10 @@ +package com.haitongauto.models.dto.app; + +import lombok.Data; + +import java.util.List; + +@Data +public class Vin { + private String vin; +} diff --git a/models/src/main/java/com/haitongauto/models/dto/open/Appointment_Dto.java b/models/src/main/java/com/haitongauto/models/dto/open/Appointment_Dto.java new file mode 100644 index 0000000..50f89e6 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/open/Appointment_Dto.java @@ -0,0 +1,21 @@ +package com.haitongauto.models.dto.open; + +import lombok.Data; + +@Data +public class Appointment_Dto { + private String arrivalType; + private String printStatus; + private String trailerNo; + + private String goodsAmount; + private String bvmId; + private String arrivePortTime; + + private String potId; + private String pamId; + private String phoneNumber; + + private String transType; + private String ttiId; +} diff --git a/models/src/main/java/com/haitongauto/models/dto/open/GoodsInfo.java b/models/src/main/java/com/haitongauto/models/dto/open/GoodsInfo.java new file mode 100644 index 0000000..5493867 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/dto/open/GoodsInfo.java @@ -0,0 +1,13 @@ +package com.haitongauto.models.dto.open; + +import lombok.Data; + +@Data +public class GoodsInfo { + private String trdId; + private String ttiId; + private String spmId; + private String brdId; + private String vinCode; + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/AppointmentDetail_Ido.java b/models/src/main/java/com/haitongauto/models/ido/AppointmentDetail_Ido.java new file mode 100644 index 0000000..ef8303b --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/AppointmentDetail_Ido.java @@ -0,0 +1,21 @@ +package com.haitongauto.models.ido; + +import lombok.Data; + +@Data +public class AppointmentDetail_Ido { + /** + * 预约明细id + */ + private String trdId; + //板车预约信息主键ID + private String ttiId; + //船舶ID + private String spmId; + //港口ID + private String potId; + //品牌ID + private String brdId; + //vinCode + private String vinCode; +} diff --git a/models/src/main/java/com/haitongauto/models/ido/BasicDataIdo.java b/models/src/main/java/com/haitongauto/models/ido/BasicDataIdo.java new file mode 100644 index 0000000..9480a97 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/BasicDataIdo.java @@ -0,0 +1,23 @@ +package com.haitongauto.models.ido; + +import lombok.Data; + +/** + * 基础数据 (从客服平台获得) + * 适用于: + * 船名(全部) + * 船名(必须有旬度计划信息) + * 航次 + * 港口 + * 国家 + * 提单号 + * 品牌 + */ +@Data +public class BasicDataIdo { + /** * id */ + private String id; + /** * 名称 */ + private String text; + private String extra1; +} diff --git a/models/src/main/java/com/haitongauto/models/ido/CheckRes.java b/models/src/main/java/com/haitongauto/models/ido/CheckRes.java new file mode 100644 index 0000000..f295d50 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/CheckRes.java @@ -0,0 +1,10 @@ +package com.haitongauto.models.ido; + +import lombok.Data; + +@Data +public class CheckRes { + private String errorMsg; + private boolean result; + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/CommonRes.java b/models/src/main/java/com/haitongauto/models/ido/CommonRes.java new file mode 100644 index 0000000..e7d7b3c --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/CommonRes.java @@ -0,0 +1,36 @@ +package com.haitongauto.models.ido; + +import lombok.Data; +import org.apache.poi.ss.formula.functions.T; + +import java.io.Serializable; + +@Data +public class CommonRes implements Serializable { + private String status; + + private Integer result; + + private T data; + + /** + * 总数据条数 + */ + private int total; + /** + * 总页数 + */ + private int pages; + + /** + * 当前页码 + */ + private int current; + /** + * 单页数据条数 + */ + private int size; + + + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/CustomerRes.java b/models/src/main/java/com/haitongauto/models/ido/CustomerRes.java new file mode 100644 index 0000000..de50cba --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/CustomerRes.java @@ -0,0 +1,17 @@ +package com.haitongauto.models.ido; + +import lombok.Data; + +import java.io.Serializable; + + +@Data +public class CustomerRes implements Serializable { + private String code; + + private String msg; + + private T data; + +} + diff --git a/models/src/main/java/com/haitongauto/models/ido/DictionaryIdo.java b/models/src/main/java/com/haitongauto/models/ido/DictionaryIdo.java new file mode 100644 index 0000000..0c37897 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/DictionaryIdo.java @@ -0,0 +1,29 @@ +package com.haitongauto.models.ido; + +import lombok.Data; + +/** + * 通用数据字典表(数据源自RTOS) + * 运输方式 TRANSPORT_TYPE + * 进港类型 ENTER_PORT_TYPE + * 货物类型 CARGO_TYPE + * 操作模式 OPERATING_MODE + * 备 件 MACHINE_TYPE + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class DictionaryIdo { + /** * 编号 */ + private String ptrCode; + /** * 描述 */ + private String ptrDesc; + /** * 创建人 */ + private String createUser; + /** * 创建时间 */ + private String createTime; + /** * 修改人 */ + private String updateUser; + /** * 修改时间 */ + private String updateTime; +} diff --git a/models/src/main/java/com/haitongauto/models/ido/PicturePathIdo.java b/models/src/main/java/com/haitongauto/models/ido/PicturePathIdo.java new file mode 100644 index 0000000..8fa41b7 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/PicturePathIdo.java @@ -0,0 +1,42 @@ +package com.haitongauto.models.ido; + +import lombok.Data; + +/** + * 图片路径 + */ +@Data +public class PicturePathIdo { + //"data": "", + //"error": "", + //"error_description": "", + //"message": "", + //"path": "", + //"result": 0, + //"stack_info": "", + //"status": "", + //"time_stamp": "", + //"version": "" + + /** + * 数据 + */ + private String data; + /** * 错误 */ + private String error; + /** * 错误说明 */ + private String error_description; + /** * 消息 */ + private String message; + /** * 路径 */ + private String path; + /** * 结果 */ + private String result; + /** * 异常信息 */ + private String stack_info; + /** * 时间戳 */ + private String time_stamp; + /** * 版本 */ + private String version; + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/PortAreasIdo.java b/models/src/main/java/com/haitongauto/models/ido/PortAreasIdo.java new file mode 100644 index 0000000..6b44527 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/PortAreasIdo.java @@ -0,0 +1,58 @@ +package com.haitongauto.models.ido; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 资源港区 + */ +@Data +public class PortAreasIdo implements Serializable { + //{ + //"limit": null, + //"orderItems": null, + //"pamId": "9f31ae78aa252c972eb1267789a234d6", + //"pamNo": "421001", + //"pamName": "外高桥港区", + //"pamNameEn": "WGQGGQ", + //"pamAddress": "上海市浦东新区港建路1919号海通国际汽车码头有限公司嗯呢", + //"valid": "Y", + //"pamEfficient": "启用", + //"tenantId": "", + //"termcd": "", + //"createTime": "2023-04-03 16:11:21", + //"createUser": "", + //"updateUser": "", + //"updateTime": "2023-04-21 09:21:58" + // }, + + private String limit; + /** * 排序 */ + private String orderItems; + /** * 港区id */ + private String pamId; + /** * 港区编码 */ + private String pamNo; + /** * 港区名称 */ + private String pamName; + /** * 港区英文名称 */ + private String pamNameEn; + /** * 港区地址 */ + private String pamAddress; + + private String valid; + + /** + * 是否启用 + */ + private String pamEfficient; + private String tenantId; + private String termcd; + private String createTime; + + private String createUser; + private String updateUser; + private String updateTime; + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/RecAndDepInfoIdo.java b/models/src/main/java/com/haitongauto/models/ido/RecAndDepInfoIdo.java new file mode 100644 index 0000000..24e05fb --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/RecAndDepInfoIdo.java @@ -0,0 +1,31 @@ +package com.haitongauto.models.ido; + +import lombok.Data; + +@Data +public class RecAndDepInfoIdo { + + /** * 打印id*/ + private String prId; + + /** * 打印id类型 cprId-表示收车打印id ; pprId-表示提车打印id*/ + private String prIdType; + + /** * 编号 需要字段*/ + private String number; + /** * 打印小票时间/收车时间 需要的字段 */ + private String printTicketTime; + /** * 板车号 需要的字段 */ + private String trailerNo; + /** * 货物类型 需要的字段 */ + private String cargoType; + /** * 货物数量 需要的字段*/ + private String vehicleAmount; + /** * 核对 Y:已核对 N:未核对 */ + private String verifyStatus; + + + + + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/ShipVoyIdo.java b/models/src/main/java/com/haitongauto/models/ido/ShipVoyIdo.java new file mode 100644 index 0000000..7561261 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/ShipVoyIdo.java @@ -0,0 +1,13 @@ +package com.haitongauto.models.ido; + +import lombok.Data; + +@Data +public class ShipVoyIdo { + private String shipId; + private String shipName; + private String shipEnName; + private String voyageId; + private String voyage; + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/departure/DepDetailIdo.java b/models/src/main/java/com/haitongauto/models/ido/departure/DepDetailIdo.java new file mode 100644 index 0000000..6277abe --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/departure/DepDetailIdo.java @@ -0,0 +1,61 @@ +package com.haitongauto.models.ido.departure; + +import lombok.Data; + +import java.util.List; +/** + * 提车明细 + */ + +@Data +public class DepDetailIdo { + + /* + "detailList": [ + { + "amount": "件数", + "customProperty": "通关性质,可用值:CLEARANCE,BONDED,NONE", + "customsDeclareNo": "报关单号", + "goodsName": "货名", + "mnfBl": "提单号", + "receivingCompany": "收货单位", + "remark": "备注", + "vinList": + [ + { + "damageFlag": 是否有残损 true, + "number": "序号", + "vinCode": "车架号" + } + ], + "vslCnname": "船名", + "vvyName": "航次", + "yplId": "提货清单ID" + } + ], + + */ + + + /** * 收货单位 */ + private String receivingCompany; + /** * 船名 */ + private String vslCnname; + /** * 航次 */ + private String vvyName; + /** * 通关性质,可用值:CLEARANCE,BONDED,NONE */ + private String customProperty; + /** * 提单号 */ + private String mnfBl; + /** * 报关单号 */ + private String customsDeclareNo; + /** * 货名 */ + private String goodsName; + /** * 件数 */ + private String amount; + /** * 备注 */ + private String remark; + /** * vin列表 */ + private List vinList; + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/departure/DepVinIdo.java b/models/src/main/java/com/haitongauto/models/ido/departure/DepVinIdo.java new file mode 100644 index 0000000..729d73b --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/departure/DepVinIdo.java @@ -0,0 +1,28 @@ +package com.haitongauto.models.ido.departure; + +import lombok.Data; + +/** + * 提车Vin + */ +@Data +public class DepVinIdo { + /* + "vinList": + [ + { + "damageFlag": 是否有残损 true, + "number": "序号", + "vinCode": "车架号" + } + ], + */ + + /** * 序号 */ + private String number; + /** * 车架号 */ + private String vinCode; + /** * 是否有残损 */ + private Boolean damageFg; + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/departure/DepartureDetailIdo.java b/models/src/main/java/com/haitongauto/models/ido/departure/DepartureDetailIdo.java new file mode 100644 index 0000000..6efeaad --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/departure/DepartureDetailIdo.java @@ -0,0 +1,81 @@ +package com.haitongauto.models.ido.departure; + +import com.haitongauto.models.ido.receiving.RecDetailIdo; +import lombok.Data; + +import java.util.List; + +/** + * 提车详情 + */ +@Data +public class DepartureDetailIdo { + /* + { + "cargoType": "货物类型,可用值:CAR,LARGE,MACHINE", + "collectUser": "作业人员", + "collectUserMobile": "作业人员联系电话", + "createTime": "制证日期", + "detailList": [ + { + "amount": "件数", + "customProperty": "通关性质,可用值:CLEARANCE,BONDED,NONE", + "customsDeclareNo": "报关单号", + "goodsName": "货名", + "mnfBl": "提单号", + "receivingCompany": "收货单位", + "remark": "备注", + "vinList": + [ + { + "damageFlag": 是否有残损 true, + "number": "序号", + "vinCode": "车架号" + } + ], + "vslCnname": "船名", + "vvyName": "航次", + "yplId": "提货清单ID" + } + ], + "driverName": "司机名称", + "id": "", + "number": "编号", + "pallectType": 0, + "phoneNumber": "司机联系电话", + "printTime": "提车时间", + "tradeType": "贸易类型,可用值:DOMESTIC,EXTERNAL,OTHER", + "trailerNo": "板车号/身份证号", + "verifyStatus": "", + "yplId": "提货清单ID" + } + + */ + + /** * 编号 */ + private String number; + /** * 提车时间 */ + private String printTime; + /** * 作业人员 */ + private String collectUser; + /** * 作业人员电话 */ + private String collectUserMobile; + /** * 司机名称 */ + private String driverName; + /** * 司机电话 */ + private String phoneNumber; + /** * 板车号/身份证号 */ + private String trailerNo; + /** * 货物类型 */ + private String cargoType; + /** * 内外贸,可用值:DOMESTIC,EXTERNAL,OTHER */ + private String tradeType; + /** * 预约id */ + private String ttiId; + /** * 提车清单ID */ + private String yplId; + /** * 提车明细 列表 */ + private List detailList; + + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/departure/DepartureDetailIdo_DTO.java b/models/src/main/java/com/haitongauto/models/ido/departure/DepartureDetailIdo_DTO.java new file mode 100644 index 0000000..2252b7e --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/departure/DepartureDetailIdo_DTO.java @@ -0,0 +1,16 @@ +package com.haitongauto.models.ido.departure; + +import lombok.Data; + +@Data +public class DepartureDetailIdo_DTO { + /** + * 提车详情 + */ + private DepartureDetailIdo departureDetailIdo; + + /** + * 状态码 + */ + private String status; +} diff --git a/models/src/main/java/com/haitongauto/models/ido/departure/DepartureVehicleIdo.java b/models/src/main/java/com/haitongauto/models/ido/departure/DepartureVehicleIdo.java new file mode 100644 index 0000000..ddedc68 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/departure/DepartureVehicleIdo.java @@ -0,0 +1,67 @@ +package com.haitongauto.models.ido.departure; + +import lombok.Data; + +/** + * 分页查询提车凭证 实体 + */ +@Data +public class DepartureVehicleIdo { + /** * 发车清单ID 需要字段 */ + private String yplId; + /** * 提车打印记录ID 需要的字段*/ + private String pprId; + /** * 编号 需要字段*/ + private String number; + /** * 打印小票时间/收车时间 需要的字段 */ + private String printTicketTime; + /** * 板车号 需要的字段 */ + private String trailerNo; + /** * 货物类型 需要的字段 */ + private String cargoType; + /** * 货物数量 需要的字段*/ + private Integer vehicleAmount; + /** * 核对 Y:已核对 N:未核对 */ + private String verifyStatus; + + private String pallectType; + + + +// "yplId": "df500e082e20506da67d14e0c12ac218", +// "pprId": "9fec5ce13cf531bd52fb0364e1a7ffae", +// "trailerNo": "襄A22222", +// "number": "20230803161844006", +// "verifyStatus": "Y", +// "pallectType": null, +// "printTicketTime": "2023-08-03 16:18:44", +// "vehicleAmount": 1, +// "cargoType": null + + + + + +// /** * 司机名称 */ +// private String driverName; +// /** * 手机号 */ +// private String phoneNumber; +// /** * 板车号 */ +// private String trailerNo; +// /** * 贸易类型, 可用值:DOMESTIC,EXTERNAL,OTHER */ +// private String tradeType; +// /** * 货物类型 */ +// private String cargoType; +// /** * 作业人员 */ +// private String createUser; +// +// /** * 核对人 */ +// private String verifyUser; +// /** * 核对 Y:已核对 N:未核对 */ +// private String verifyStatus; +// /** * 核对时间 */ +// private String verifyTime; + + + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/departure/DepartureVehicleIdoPar.java b/models/src/main/java/com/haitongauto/models/ido/departure/DepartureVehicleIdoPar.java new file mode 100644 index 0000000..817a92b --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/departure/DepartureVehicleIdoPar.java @@ -0,0 +1,10 @@ +package com.haitongauto.models.ido.departure; + +import com.haitongauto.models.ido.receiving.ReceivingVehicleIdo; +import lombok.Data; + +import java.util.List; +@Data +public class DepartureVehicleIdoPar { + private List records; +} diff --git a/models/src/main/java/com/haitongauto/models/ido/departure/DepartureVehicleIdo_DTO.java b/models/src/main/java/com/haitongauto/models/ido/departure/DepartureVehicleIdo_DTO.java new file mode 100644 index 0000000..ad9892a --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/departure/DepartureVehicleIdo_DTO.java @@ -0,0 +1,18 @@ +package com.haitongauto.models.ido.departure; + +import lombok.Data; + +import java.util.List; + +@Data +public class DepartureVehicleIdo_DTO { + /** + * 分页提车凭证数据列表 + */ + private List departureVehicleIdoList; + /** + * 状态码 + */ + private String status; + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/departure/pc/DepartureVehicleIdoPar_pc.java b/models/src/main/java/com/haitongauto/models/ido/departure/pc/DepartureVehicleIdoPar_pc.java new file mode 100644 index 0000000..e89e11b --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/departure/pc/DepartureVehicleIdoPar_pc.java @@ -0,0 +1,8 @@ +package com.haitongauto.models.ido.departure.pc; +import lombok.Data; + +import java.util.List; +@Data +public class DepartureVehicleIdoPar_pc { + private List records; +} diff --git a/models/src/main/java/com/haitongauto/models/ido/departure/pc/DepartureVehicleIdo_pc.java b/models/src/main/java/com/haitongauto/models/ido/departure/pc/DepartureVehicleIdo_pc.java new file mode 100644 index 0000000..41d5dc2 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/departure/pc/DepartureVehicleIdo_pc.java @@ -0,0 +1,33 @@ +package com.haitongauto.models.ido.departure.pc; +import lombok.Data; + +@Data +public class DepartureVehicleIdo_pc { + /** * 编号 */ + private String number; + /** * 司机名称 */ + private String driverName; + /** * 手机号 */ + private String phoneNumber; + /** * 板车号 */ + private String trailerNo; + /** * 贸易类型*/ + private String tradeType; + /** * 货物类型 */ + private String cargoType; + /** * 作业人员 */ + private String createUser; + /** * 收车时间 */ + private String printTicketTime; + /** * 核对人 */ + private String verifyUser; + /** * 核对状态 */ + private String verifyStatus; + /** * 核对时间 */ + private String verifyTime; + /** * 打印小票记录id */ + private String pprId; + /** * 发车清单ID */ + private String yplId; + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/login/PostLoginRes.java b/models/src/main/java/com/haitongauto/models/ido/login/PostLoginRes.java new file mode 100644 index 0000000..8b76f15 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/login/PostLoginRes.java @@ -0,0 +1,20 @@ +package com.haitongauto.models.ido.login; + +import lombok.Data; + +@Data +public class PostLoginRes { + /** + * 用户id + */ + private String users_id; + /** + * 板车id + */ + private String truck_id; + /** + * Rtos权限访问令牌 + */ + private String access_token_rtos; + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/login/UserAuthResponseDto.java b/models/src/main/java/com/haitongauto/models/ido/login/UserAuthResponseDto.java new file mode 100644 index 0000000..8a4c6ec --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/login/UserAuthResponseDto.java @@ -0,0 +1,19 @@ +package com.haitongauto.models.ido.login; +import lombok.Data; + +import java.io.Serializable; + +@Data +public class UserAuthResponseDto implements Serializable { + private static final long serialVersionUID = 7755697998307514841L; + + private String accessToken; + + private String tokenType; + + private String refreshToken; + + private Long expiresIn; + + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/login/UserInfoRes.java b/models/src/main/java/com/haitongauto/models/ido/login/UserInfoRes.java new file mode 100644 index 0000000..3cbdc35 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/login/UserInfoRes.java @@ -0,0 +1,69 @@ +package com.haitongauto.models.ido.login; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class UserInfoRes implements Serializable { + private static final long serialVersionUID = 1L; + /** + * + */ + private String id; + + /** + * + */ + private String name; + + /** + * 需要打码 + */ + private String phone; + + /** + * + */ + private Integer phoneConfirmed; + + /** + * 需要打码 + */ + private String idCard; + + /** + * + */ + private Integer idCardConfirmed; + + /** + * + */ + private String tenantId; + + /** + * + */ + private String tenantName; + + /** + * + */ + private String empNumber; + /** + * + */ + private Integer passwordType; + + /** + * 头像上传地址 + */ + private String uploadUrl; + + /*** + * 小程序openId + */ + private String openId; + +} \ No newline at end of file diff --git a/models/src/main/java/com/haitongauto/models/ido/login/UserLoginOrRegisterRequest.java b/models/src/main/java/com/haitongauto/models/ido/login/UserLoginOrRegisterRequest.java new file mode 100644 index 0000000..4a4000c --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/login/UserLoginOrRegisterRequest.java @@ -0,0 +1,37 @@ +package com.haitongauto.models.ido.login; + +import lombok.Data; +/** + * 用户登录/注册 请求入参 + * 调用哪吒接口 + */ +@Data +public class UserLoginOrRegisterRequest { + /** + * 小程序appid (必填) + */ + private String appId; + + /** + * 渠道信息:app、小程序、pad、客户服务平台 (必填) + */ + private String mediaType; + + /** + * 手机号 (必填) + */ + private String mobile; + /** + * 小程序openid (必填) + */ + private String openId; + /** + * 小程序unionid (非必填) + */ + private String unionId; + + + + + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/login/UserLoginOrRegisterResponse.java b/models/src/main/java/com/haitongauto/models/ido/login/UserLoginOrRegisterResponse.java new file mode 100644 index 0000000..862b013 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/login/UserLoginOrRegisterResponse.java @@ -0,0 +1,30 @@ +package com.haitongauto.models.ido.login; + +import lombok.Data; + +/** + * 用户登录/注册 请求出参 + * 调用哪吒接口 + */ +@Data +public class UserLoginOrRegisterResponse { + /** + * 访问令牌 + */ + private String access_token; + /** + * 是否过期 + */ + private Integer expires_in; + /** + * 刷新令牌 + */ + private String refresh_token; + /** + * 令牌类型 + */ + private String token_type; + + //差一个userid + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/login/UsersIdo.java b/models/src/main/java/com/haitongauto/models/ido/login/UsersIdo.java new file mode 100644 index 0000000..2e778f6 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/login/UsersIdo.java @@ -0,0 +1,36 @@ +package com.haitongauto.models.ido.login; + +import lombok.Data; + +/** + * 用户 + */ +@Data +public class UsersIdo { + // id 用户id string + // idCard 身份证号 string + // name 姓名 string + // phone 手机号 string + // uploadUrl 头像地址 + + ///** * 用户id */ + // private String id; + /** + * 身份证号 + */ + private String idCard; + /** + * 姓名 + */ + private String name; + /** + * 手机号 + */ + private String phone; + /** + * 头像地址 + */ + private String uploadUrl; + + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/receiving/RecDetailIdo.java b/models/src/main/java/com/haitongauto/models/ido/receiving/RecDetailIdo.java new file mode 100644 index 0000000..a1b02fe --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/receiving/RecDetailIdo.java @@ -0,0 +1,48 @@ +package com.haitongauto.models.ido.receiving; + +import lombok.Data; + +import java.util.List; + +/** + * 收车明细 + */ +@Data +public class RecDetailIdo { + /* + "detailList": [ + { + "brdNname": "品牌", + "potCnname": "港口", + "vinList": [ + { + "number": "序号", + "vinCode": "vin码" + } + ], + "vslCnname": "船名" + } + ], + */ + + /** + * 品牌 + */ + private String brdNname; + + /** + * 港口 + */ + private String potCnname; + + /** + * 船名 + */ + private String vslCnname; + + /** + * 条形码或车架号 + */ + private List vinList; + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/receiving/RecVinIdo.java b/models/src/main/java/com/haitongauto/models/ido/receiving/RecVinIdo.java new file mode 100644 index 0000000..586cb8c --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/receiving/RecVinIdo.java @@ -0,0 +1,26 @@ +package com.haitongauto.models.ido.receiving; + +import lombok.Data; + +/** + * 收车Vin + */ +@Data +public class RecVinIdo { + + /* + "vinList": [ + { + "number": "序号", + "vinCode": "车架号" + } + ], + */ + + /** * 序号 */ + private String number; + /** * 车架号 */ + private String vinCode; + /** * 是否有残损 */ + private Boolean damageFg; +} diff --git a/models/src/main/java/com/haitongauto/models/ido/receiving/ReceivingDetailIdo.java b/models/src/main/java/com/haitongauto/models/ido/receiving/ReceivingDetailIdo.java new file mode 100644 index 0000000..84c743d --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/receiving/ReceivingDetailIdo.java @@ -0,0 +1,110 @@ +package com.haitongauto.models.ido.receiving; + +import lombok.Data; + +import java.util.List; + +/** + * 收车详情 + */ +@Data +public class ReceivingDetailIdo { + /* + { + "collectUser": "作业人员", + "collectUserMobile": "作业人员电话", + "detailList": [ + { + "brdNname": "品牌", + "potCnname": "港口", + "vinList": [ + { + "number": "序号", + "vinCode": "vin码" + } + ], + "vslCnname": "船名" + } + ], + "driverName": "司机名称", + "number": "编号", + "phoneNumber": "司机电话", + "printTicketTime": "收车时间", + "remark": "备注", + "tradeType": "内外贸,可用值:DOMESTIC,EXTERNAL,OTHER", + "trailerNo": "板车号", + "ttiId": "预约id", + "verifyStatus": "", + "yclId": "收车清单ID" + } + */ + + +/* + + + "data": { + "yclId": "43607c77292013b96c4157d17281f0bf", + "tradeType": "内贸", + "collectUser": null, + + "collectUserMobile": null, + "driverName": null, + "phoneNumber": "13900000001", + + "remark": null, + "trailerNo": "阳A99999", + "printTicketTime": "2023-08-04 13:41:27", + + "verifyStatus": null, + "number": "20230804133926003", + "ttiId": "c171b9b3-692d-4a13-b8d2-6b55fb61", + + "cargoType": null, + + "detailList": [ + { + "vslCnname": "山东号", + "brdNname": "宝马", + "potCnname": "南京港", + "vinList": [ + { + "number": 1, + "vinCode": "PNG99999" + } + ] + } + ] + }, + */ + + /** * 编号 */ + private String number; + /** * 收车时间 */ + private String printTicketTime; + /** * 作业人员 */ + private String collectUser; + /** * 作业人员电话 */ + private String collectUserMobile; + /** * 司机名称 */ + private String driverName; + /** * 司机电话 */ + private String phoneNumber; + /** * 板车号 */ + private String trailerNo; + /** * 备注 */ + private String remark; + /*** 货物类型 差货物类型*/ + private String cargoType; + /** * 内外贸,可用值:DOMESTIC,EXTERNAL,OTHER */ + private String tradeType; + /** * 预约id */ + private String ttiId; + /** * 收车清单ID */ + private String yclId; + /** + * 收车明细 列表 + */ + private List detailList; + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/receiving/ReceivingDetailIdo_DTO.java b/models/src/main/java/com/haitongauto/models/ido/receiving/ReceivingDetailIdo_DTO.java new file mode 100644 index 0000000..e9461b1 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/receiving/ReceivingDetailIdo_DTO.java @@ -0,0 +1,15 @@ +package com.haitongauto.models.ido.receiving; + +import lombok.Data; + +@Data +public class ReceivingDetailIdo_DTO { + /** + * 收车详情 + */ + private ReceivingDetailIdo receivingDetailIdo; + /** + * 状态码 + */ + private String status; +} diff --git a/models/src/main/java/com/haitongauto/models/ido/receiving/ReceivingVehicleIdo.java b/models/src/main/java/com/haitongauto/models/ido/receiving/ReceivingVehicleIdo.java new file mode 100644 index 0000000..851e595 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/receiving/ReceivingVehicleIdo.java @@ -0,0 +1,58 @@ +package com.haitongauto.models.ido.receiving; + +import lombok.Data; + +/** + * 分页查询收车凭证 实体 + */ +@Data +public class ReceivingVehicleIdo { + /** * 收车清单ID 需要的字段 */ + private String yclId; + /** * 收车打印记录ID 需要的字段*/ + private String cprId; + /** * 编号 需要的字段*/ + private String number; + /** * 板车号 需要的字段 */ + private String trailerNo; + /** * 打印小票时间/收车时间 需要的字段 */ + private String printTicketTime; + /** * 货物类型 需要的字段 */ + private String cargoType; + /** * 货物数量 需要的字段*/ + private Integer vehicleAmount; + /** * 核对 Y:已核对 N:未核对 */ + private String verifyStatus; + +// /** * 司机名称 */ +// private String driverName; +// /** * 手机号 */ +// private String phoneNumber; +// /** * 板车号 需要的字段 */ +// private String trailerNo; +// /** * 贸易类型, 可用值:DOMESTIC,EXTERNAL,OTHER */ +// private String tradeType; +// /** * 作业人员 */ +// private String createUser; +// /** * 核对人 */ +// private String verifyUser; +// /** * 核对 Y:已核对 N:未核对 */ +// private String verifyStatus; +// /** * 核对时间 */ +// private String verifyTime; + + + +// private String yclId; +// private String cprId; +// private String number; +// private String yclId; +// private String printTicketTime; +// private String bvmName; +// private String cargoType; +// private String vehicleAmount; +// private String verifyStatus; +// private String tradeType; + + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/receiving/ReceivingVehicleIdoPar.java b/models/src/main/java/com/haitongauto/models/ido/receiving/ReceivingVehicleIdoPar.java new file mode 100644 index 0000000..756aaa8 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/receiving/ReceivingVehicleIdoPar.java @@ -0,0 +1,11 @@ +package com.haitongauto.models.ido.receiving; +import com.haitongauto.models.ido.receiving.pc.ReceivingVehicleIdo_pc; +import lombok.Data; + +import java.util.List; + +@Data +public class ReceivingVehicleIdoPar { + private List records; + +} diff --git a/models/src/main/java/com/haitongauto/models/ido/receiving/ReceivingVehicleIdo_DTO.java b/models/src/main/java/com/haitongauto/models/ido/receiving/ReceivingVehicleIdo_DTO.java new file mode 100644 index 0000000..a693d0c --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/receiving/ReceivingVehicleIdo_DTO.java @@ -0,0 +1,17 @@ +package com.haitongauto.models.ido.receiving; + +import lombok.Data; + +import java.util.List; + +@Data +public class ReceivingVehicleIdo_DTO { + /** + * 收车凭证分页数据列表 + */ + private List receivingVehicleIdoList; + /** + * 状态码 + */ + private String status; +} diff --git a/models/src/main/java/com/haitongauto/models/ido/receiving/pc/ReceivingVehicleIdoPar_pc.java b/models/src/main/java/com/haitongauto/models/ido/receiving/pc/ReceivingVehicleIdoPar_pc.java new file mode 100644 index 0000000..6ae2df9 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/receiving/pc/ReceivingVehicleIdoPar_pc.java @@ -0,0 +1,7 @@ +package com.haitongauto.models.ido.receiving.pc; +import lombok.Data; +import java.util.List; +@Data +public class ReceivingVehicleIdoPar_pc { + private List records; +} diff --git a/models/src/main/java/com/haitongauto/models/ido/receiving/pc/ReceivingVehicleIdo_pc.java b/models/src/main/java/com/haitongauto/models/ido/receiving/pc/ReceivingVehicleIdo_pc.java new file mode 100644 index 0000000..ce181f1 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/ido/receiving/pc/ReceivingVehicleIdo_pc.java @@ -0,0 +1,88 @@ +package com.haitongauto.models.ido.receiving.pc; + +import lombok.Data; + +@Data +public class ReceivingVehicleIdo_pc { + /** * 编号 */ + private String number; + /** * 司机ID */ + private String driverId; + /** * 司机名称 */ + private String driverName; + /** * 手机号 */ + private String phoneNumber; + /** * 板车号 */ + private String trailerNo; + /** * 贸易类型,可用值:DOMESTIC,EXTERNAL,OTHER */ + private String tradeType; + /** * 货物类型 */ + private String bvmName; + /** * 作业人员 */ + private String createUser; + /** * 板车扫描时间(收车时间) */ + private String collectStartTime; + /** * 核对人 */ + private String verifyUser; + /** * 核对状态 Y:已核对 N:未核对 */ + private String verifyStatus; + /** * 核对时间 */ + private String verifyTime; + /** * 收车清单ID */ + private String yclId; + /** * 收车打印记录ID */ + private String cprId; + /** * 预约id */ + private String ttiId; + + + +///////////////////////其他多余字段//////////////////////////////////////////////////////////////////// + +// /** * 堆场操作员ID */ +// private String yardOperator; +// /** * 堆场操作员姓名 */ +// private String yardOperatorName; +// /** * 进港时间 */ +// private String arrivePortTime; +// /** * 品牌 */ +// private String brdName; +// /** * 联系电话 */ +// private String contactNumber; +// /** * 创建时间 */ +// private String createTime; +// /** * 版本号 */ +// private String dataVersion; +// /** * 完工打卡时间 */ +// private String finishSignTime; +// /** * 离港时间 */ +// private String leavePortTime; +// /** * 港口 */ +// private String potName; +// /** * 打印状态 待打印、已打印,可用值:WAIT,PRINTED */ +// private String printStatus; +// /** * 打印小票时间/收车时间 */ +// private String printTicketTime; +// /** * 预约时间 */ +// private String reserveTime; +// /** * 签到时间 */ +// private String startSignTime; +// /** * 租户ID */ +// private String tenantId; +// /** * 权限 */ +// private String termcd; +// /** * 运输方式,板车运输/自开,可用值:SCOOTER,DRIVE */ +// private String transType; +// /** * 更新时间 */ +// private String updateTime; +// /** * 更新人 */ +// private String updateUser; +// /** * 是否启用 */ +// private String valid; +// /** * 货物数量 */ +// private String vehicleAmount; +// /** * 船舶 */ +// private String vslCnname; + + +} diff --git a/models/src/main/java/com/haitongauto/models/open/AppointmentCmd.java b/models/src/main/java/com/haitongauto/models/open/AppointmentCmd.java new file mode 100644 index 0000000..8aee0bf --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/open/AppointmentCmd.java @@ -0,0 +1,30 @@ +package com.haitongauto.models.open; + +import lombok.Data; + +@Data +public class AppointmentCmd { + /** + * 预约id + */ + private String appointmentId; + /** + * 堆场id + */ + private String yardId; + /** + * 堆场名称 + */ + private String yardName; + + /** + * 通道号(特指进港道口号) + */ + private String gateCanal; + + /** + * 发送人 + */ + private String sender; + +} diff --git a/models/src/main/java/com/haitongauto/models/open/AppointmentDetailSort.java b/models/src/main/java/com/haitongauto/models/open/AppointmentDetailSort.java new file mode 100644 index 0000000..8486278 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/open/AppointmentDetailSort.java @@ -0,0 +1,78 @@ +package com.haitongauto.models.open; + +import lombok.Data; + +/** + * 用于板车管控,指令列表 + */ +@Data +public class AppointmentDetailSort { + + /** 预约id */ + private String appointment_id ; + + /** 用户id */ + private String users_id ; + /** 运输方式(1-板车运输,2-自开) */ + private String transport_type ; + /** 板车号 */ + private String truck_number ; + /** 手机号 */ + private String tel_number ; + /** 预约进场日期 */ + private String approach_date ; + /** 进港港区Id */ + private String port_area_id ; + /** 进港港区Id */ + private String port_area_name ; + /** 预约类型(1-普通码头预约,2-特保区预约) 新增字段 */ + private Integer appointment_type ; + /** 进港类型(1-外贸出口,2-外贸进口,3-整车物流,4-特保区出口,5-特保区进口,6-内贸出口,7-内贸进口) */ + private String enter_type ; + /** 货物类型(1-商品车,2-设备,3-其他) */ + private String goods_type ; + /** 货物类型名(1-商品车,2-设备,3-其他) */ + private String goods_type_name ; + /** 货物数量(件数) */ + private Integer goods_quantity ; + /** 预约打卡状态(1-已预约,2-已签到,3-已进港,5-操作中,6-已完成,7-已离港,4-已取消,9-异常:预期未完成操作的) */ + private Integer appointment_state ; + /** 堆场*/ + private String yard; + /** 进道口*/ + private String gate_canal_in; + /** 出道口*/ + private String gate_canal_out; + /** 进道口时间*/ + private String gate_canal_in_time; + /** 出道口时间*/ + private String gate_canal_out_time; + /** 指令状态 0-指令待发送 1-指令已发送*/ + private Integer instruct_state; + /** 发送时间 */ + private String send_time; + /** 发送人 */ + private String sender; + /** 打卡签到时间*/ + private String check_in_time; + /** 打卡完工时间 */ + private String check_over_time; + /** 船名 */ + private String ship_name; + /** 船舶id **/ + private String ship_id; + /** 品牌id */ + private String brand_id; + /** 品牌 */ + private String brand_name ; + /** 排队号 */ + private String queue_number ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; + + +} diff --git a/models/src/main/java/com/haitongauto/models/open/AppointmentDetail_Ido.java b/models/src/main/java/com/haitongauto/models/open/AppointmentDetail_Ido.java new file mode 100644 index 0000000..47e4bd7 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/open/AppointmentDetail_Ido.java @@ -0,0 +1,21 @@ +package com.haitongauto.models.open; + +import lombok.Data; + +@Data +public class AppointmentDetail_Ido { + /** + * 预约明细id + */ + private String trdId; + //板车预约信息主键ID + private String ttiId; + //船舶ID + private String spmId; + //港口ID + private String potId; + //品牌ID + private String brdId; + //vinCode + private String vinCode; +} diff --git a/models/src/main/java/com/haitongauto/models/open/Appointment_Ido.java b/models/src/main/java/com/haitongauto/models/open/Appointment_Ido.java new file mode 100644 index 0000000..ee2dbff --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/open/Appointment_Ido.java @@ -0,0 +1,106 @@ +package com.haitongauto.models.open; + +import lombok.Data; + +@Data +public class Appointment_Ido { + /** 预约信息id */ + private String id ; + + /** 运输方式(1-板车运输,2-自开) */ + private String transportType ; + /** 板车号 */ + private String truckNumber ; + /** 手机号 */ + private String telNumber ; + /** 身份证 */ + private String idCode ; + + /** 车头车架号 */ + private String truckVin ; + /** 板车自重(吨) */ + private Double vehicleWeight ; + /** 车架重(吨) */ + private Double vehicleFrameWeight ; + /** 行驶证编号 */ + private String drivingLicense ; + /** 预约进场日期 */ + private String approachDate ; + /** 进港港区Id */ + private String portAreaId ; + /** 预约类型(1-普通码头预约,2-特保区预约) 新增字段 */ + private Integer appointmentType ; + ///** 业务类型(1-全部,2-码头业务,3-整车物流,4-特保区预约)【该字段貌似已取消】 */ + //private String biz_type ; + /** 进港类型(1-外贸出口,2-外贸进口,3-整车物流,4-特保区出口,5-特保区进口,6-内贸出口,7-内贸进口) */ + private String enterPortType; + /** 货物类型(1-商品车,2-设备,3-其他) */ + private String cargoType ; + /** 货物数量(件数) */ + private Integer goodsQuantity ; + /** 预约打卡状态(1-已预约,2-已签到,3-已进港,5-操作中,6-已完成,7-已离港,4-已取消,9-异常:预期未完成操作的) */ + private Integer appointmentState ; + + /** 取消预约时间 */ + private String cancelTime ; + + /** 创建时间 */ + private String createTime ; + /** 更新时间 */ + private String updateTime ; + ///** 是否软删除 */ + //private Integer is_del ; + + /** 堆场*/ + private String yard; + /** 进道口*/ + private String gateCanalIn; + /** 出道口*/ + private String gateCanalOut; + /** 指令状态 */ + private Integer instructState; + /** 发送时间 */ + private String sendTime; + /** 发送人 */ + private String sender; + + /** 打卡签到时间*/ + private String checkInTime; + /** 打卡完工时间 */ + private String checkOverTime; + + /** 进港时间*/ + private String gateCanalInTime; + + /** 出港时间*/ + private String gateCanalOutTime; + + /** 排队号*/ + private String queueNumber; + + /** 船名*/ + private String shipName; + /** 船名*/ + private String shipId; + + /** 品牌id*/ + private String brandIds; + /** 品牌*/ + private String brands; + /** + * 用户id(司机id) + */ + private String userId ; + + /** + * 用户名称 (司机名称) + */ + private String userName ; + + private String plateScanTime; + + ///** 用户id */ + //private String users_id ; + + +} diff --git a/models/src/main/java/com/haitongauto/models/open/QueryCondition.java b/models/src/main/java/com/haitongauto/models/open/QueryCondition.java new file mode 100644 index 0000000..74c6af4 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/open/QueryCondition.java @@ -0,0 +1,54 @@ +package com.haitongauto.models.open; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.util.Date; + +@Data +public class QueryCondition { + + /** + * 开始日期(必填) + */ + @JsonFormat(pattern = "yyyy-MM-dd") + private Date startDate; + + /** + * 结束日期(必填) + */ + @JsonFormat(pattern = "yyyy-MM-dd") + private Date endDate; + + /** + * 港区id (必填) + */ + private String portAreaId; + + /** + * 班车号(模糊条件) (非必填) + */ + private String truckNum; + + /** + * 船id (非必填) + */ + private String shipId; + + /** + * 指令状态 (非必填) + */ + private Integer instructState; + + /** + * 品牌id (非必填) + */ + private String brandId; + + + private Integer pageNum; + + private Integer pageSize; + + +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/Announcement.java b/models/src/main/java/com/haitongauto/models/pojo/Announcement.java new file mode 100644 index 0000000..518b74d --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/Announcement.java @@ -0,0 +1,35 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; +/** + * 公告 + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class Announcement { + /** 公告id */ + private String id ; + /** 分类(1-小程序,2-客服平台) */ + private Integer sort ; + /** 标题 */ + private String title ; + /** 摘要 */ + private String abstracts ; + /** 公告内容 */ + private String announcement ; + + /** 公告文本 */ + private String announcement_text ; + + /** 作者 */ + private String author ; + /** 阅读量 */ + private int reading_volume ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private int is_del ; +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/Appointment.java b/models/src/main/java/com/haitongauto/models/pojo/Appointment.java new file mode 100644 index 0000000..e12ba9b --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/Appointment.java @@ -0,0 +1,82 @@ +package com.haitongauto.models.pojo; +import lombok.Data; + +/** + * 预约信息 + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class Appointment { + /** 预约信息id */ + private String id ; + /** 用户id */ + private String users_id ; + /** 运输方式(1-板车运输,2-自开) */ + private String transport_type ; + /** 板车号 */ + private String truck_number ; + /** 手机号 */ + private String tel_number ; + /** 身份证号 */ + private String id_code; + /** 车头车架号 */ + private String truck_vin ; + /** 板车自重(吨) */ + private Double vehicle_weight ; + /** 车架重(吨) */ + private Double vehicle_frame_weight ; + /** 行驶证编号 */ + private String driving_license ; + /** 预约进场日期 */ + private String approach_date ; + /** 进港港区Id */ + private String port_area_id ; + /** 预约类型(1-普通码头预约,2-特保区预约) 新增字段 */ + private Integer appointment_type ; + /** 业务类型(1-全部,2-码头业务,3-整车物流,4-特保区预约)【该字段貌似已取消】 */ + private String biz_type ; + /** 进港类型(1-外贸出口,2-外贸进口,3-整车物流,4-特保区出口,5-特保区进口,6-内贸出口,7-内贸进口) */ + private String enter_type ; + /** 货物类型(1-商品车,2-设备,3-其他) */ + private String goods_type ; + /** 货物数量(件数) */ + private Integer goods_quantity ; + /** 预约打卡状态(1-已预约,2-已签到,3-已进港,5-操作中,6-已完成,7-已离港,4-已取消,9-异常:预期未完成操作的) */ + private Integer appointment_state ; + /** 取消预约时间 */ + private String cancel_time ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; + /** 堆场*/ + private String yard; + /** 堆场名*/ + private String yard_name; + /** 进道口*/ + private String gate_canal_in; + /** 出道口*/ + private String gate_canal_out; + /** 进道口时间*/ + private String gate_canal_in_time; + /** 出道口*/ + private String gate_canal_out_time; + /** 指令状态 0-指令待发送 1-指令已发送*/ + private Integer instruct_state; + /** 发送时间 */ + private String send_time; + /** 发送人 */ + private String sender; + /** 打卡签到时间*/ + private String check_in_time; + /** 打卡完工时间 */ + private String check_over_time; + /** 板车扫描时间 */ + private String plate_scan_time; + /** 是否常规进闸(0-是常规自动进闸,1-是非常规人工抬杆进闸) */ + private Integer is_conventionality_in; + +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/AppointmentDetail.java b/models/src/main/java/com/haitongauto/models/pojo/AppointmentDetail.java new file mode 100644 index 0000000..3636632 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/AppointmentDetail.java @@ -0,0 +1,38 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; + +/** + * 预约详细(详情) + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class AppointmentDetail { + /** 预约详细id */ + private String id ; + /** 预约id */ + private String appointment_id ; + /** 船id */ + private String ship_id ; + /** 船名 */ + private String ship_name ; + /** 航次号 */ + private String voy_number ; + /** 目的港Id */ + private String destination_port_id ; + /** 目的港 */ + private String destination_port ; + /** 品牌id */ + private String brand_id; + /** 品牌 */ + private String brand_name ; + /** 车架号 */ + private String vin ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/DepartureDetail.java b/models/src/main/java/com/haitongauto/models/pojo/DepartureDetail.java new file mode 100644 index 0000000..040fe83 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/DepartureDetail.java @@ -0,0 +1,41 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; +/** + * 提车明细 + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class DepartureDetail { + /** 明细id */ + private String id ; + /** 提车id */ + private String applet_departure_vehicle_id ; + /** 收货单位 */ + private String receiving_unit ; + /** 船名 */ + private String ship_name ; + /** 航次 */ + private String voy_number ; + /** 通关性质 */ + private String customs_clearance_nature ; + /** 提单号 */ + private String lading_no ; + /** 报关单号 */ + private String customs_declaration_no ; + /** 货名 */ + private String cargo_name ; + /** 件数 */ + private Integer cargoQuantity ; + /** 备注 */ + private String remarks ; + /** 车架号列表(逗号分隔) */ + private String vinList ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/DepartureVehicle.java b/models/src/main/java/com/haitongauto/models/pojo/DepartureVehicle.java new file mode 100644 index 0000000..3e80ec8 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/DepartureVehicle.java @@ -0,0 +1,50 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; + +/** + * 提车信息 + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class DepartureVehicle { + /** 发车Id */ + private String id ; + /** 编号 */ + private String voucher_number ; + /** 司机id */ + private String users_id ; + /** 司机姓名 */ + private String users_name ; + /** 司机电话 */ + private String tel_number ; + /** 作业人员 */ + private String operators ; + /** 联系电话 */ + private String phone_number ; + /** 板车号 */ + private String truck_number ; + /** 贸易类型(内贸/外贸) */ + private String trade_type ; + /** 货物类型 */ + private String cargo_type ; + /** 货物数量 */ + private Integer cargo_quantity ; + /** 提车时间 */ + private String delivery_time ; + /** 核对人(小程序中收到该凭证的司机,实际上就是操作司机)=== */ + private String checker ; + /** 核对状态(0-待核对,1-已核对)=== */ + private String check_status ; + /** 核对时间(核对操作时生成的日期时间)=== */ + private String check_time ; + /** 备注=== */ + private String remarks ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/Dic.java b/models/src/main/java/com/haitongauto/models/pojo/Dic.java new file mode 100644 index 0000000..60f6007 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/Dic.java @@ -0,0 +1,32 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; + +/** + * 通用数据字典表(数据源自RTOS) + * 运输方式 TRANSPORT_TYPE + * 进港类型 ENTER_PORT_TYPE + * 货物类型 CARGO_TYPE + * 操作模式 OPERATING_MODE + * 备 件 MACHINE_TYPE + * + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class Dic { + /** 字典id */ + private String id ; + /** 内容 */ + private String content ; + /** 分类 */ + private String dic_sort ; + /** 分类描述 */ + private String description ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/EntryInstruct.java b/models/src/main/java/com/haitongauto/models/pojo/EntryInstruct.java new file mode 100644 index 0000000..25b48b9 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/EntryInstruct.java @@ -0,0 +1,30 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; + +/** + * 进港指令 + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class EntryInstruct { + /** 进港指令id */ + private String id ; + /** 预约id */ + private String appointment_id ; + /** 司机id */ + private String users_id ; + /** 司机姓名 */ + private String users_name ; + /** 车牌号 */ + private String truck_number ; + /** 堆场 */ + private String yard_name ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/Feedback.java b/models/src/main/java/com/haitongauto/models/pojo/Feedback.java new file mode 100644 index 0000000..2a8ec91 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/Feedback.java @@ -0,0 +1,32 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; + +/** + * 意见反馈 + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class Feedback { + /** 意见反馈id */ + private String id ; + /** 用户id */ + private String users_id ; + /** 昵称 */ + private String nike_name ; + /** 意见(限500字) */ + private String feedback_info ; + /** 图片文件名集合,逗号分隔 */ + private String pictures ; + /** 联系电话 */ + private String tel_number ; + /** 联系方式(微信号/qq/邮箱) */ + private String contact_info ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/LoginLog.java b/models/src/main/java/com/haitongauto/models/pojo/LoginLog.java new file mode 100644 index 0000000..0100b1c --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/LoginLog.java @@ -0,0 +1,30 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; + +/** + * 用户登录日志 + * @author : KeChanghui + */ +@Data +public class LoginLog { + /** 自增id */ + private String id ; + /** 微信昵称 */ + private String wx_nike ; + /** 微信openid */ + private String wx_openid ; + /** 登录时间 */ + private String login_time ; + /** ip地址 */ + private String ip ; + /** 地区(省市) */ + private String area ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; + +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/Message.java b/models/src/main/java/com/haitongauto/models/pojo/Message.java new file mode 100644 index 0000000..9bf5017 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/Message.java @@ -0,0 +1,35 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; + +@Data +public class Message { + + /** id*/ + private String id; + /** 1-收车 2-提车*/ + private Integer type; + + /** + * 小票id + */ + private String prc_id; + + /** */ + private String biz_id; + + /** 1-收车 2-提车*/ + private String type_content; + + /** 板车号*/ + private String truck_number; + /** 0-未读 1-已读*/ + private Integer is_read; + /** 创建时间*/ + private String create_time; + /** 修改时间*/ + private String update_time; + /** 是否删除*/ + private Integer is_del; + +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/NoviceIntroduction.java b/models/src/main/java/com/haitongauto/models/pojo/NoviceIntroduction.java new file mode 100644 index 0000000..cc27bfb --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/NoviceIntroduction.java @@ -0,0 +1,28 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; + +/** + * 新手攻略(小程序/客服平台/生产APP操作指南) + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class NoviceIntroduction { + /** 攻略_id */ + private String id ; + /** 类别(1-小程序,2-客服平台,3-生产APP) */ + private Integer sort ; + /** 小标题 */ + private String title ; + /** 内容(html文本,允许包含图片标签) */ + private String content ; + /** 顺序号 */ + private Integer sequence_number ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/PortArea.java b/models/src/main/java/com/haitongauto/models/pojo/PortArea.java new file mode 100644 index 0000000..5918f0b --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/PortArea.java @@ -0,0 +1,36 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; + +/** + * 港区表(数据源自RTOS,请求时返回200,则使用数据,并更新表;否则,直接使用本表) + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class PortArea { + /** 港区id */ + private String id ; + /** 港区名 */ + private String port_area_name ; + /** 港区英文名 */ + private String port_area_name_en ; + /** 港区编码 */ + private String port_area_code ; + /** 港区地址 */ + private String port_area_address ; + /** 港区坐标 */ + private String area_center_poi ; + /** 打卡范围(距离港区中心坐标的半径,米) */ + private Integer punch_range ; + /** 是否启用(0-未启用,1-启用,默认) */ + private Integer is_enable ; + /** 排序 */ + private Integer order_items ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/PunchClock.java b/models/src/main/java/com/haitongauto/models/pojo/PunchClock.java new file mode 100644 index 0000000..8a903a6 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/PunchClock.java @@ -0,0 +1,41 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; +/** + * (签到/完成)打卡信息 + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class PunchClock { + /** 打卡信息id */ + private String id ; + /** 用户id */ + private String users_id ; + /** 预约Id */ + private String appointment_id ; + /** 业务类型(1-全部,2-码头业务,3-整车物流,4-特保区预约)【该字段貌似已取消】 */ + private Integer biz_type ; + /** 排队编号 */ + private String queue_number ; + /** 签到日期时间【该字段添加日期】 */ + private String start_time ; + /** 完成日期时间【该字段添加日期】 */ + private String over_time ; + /** 打卡港区(ID) */ + private String port_area_id ; + /** 签到打卡地点 */ + private String punch_address ; + /** 完成打卡地点 */ + private String over_address ; + /** 打卡类别(0-预约未签到,1-签到,2-已进港,3-操作中,4-已完成,5-已离港) */ + private Integer punch_clock_type ; + /** 打卡(位置坐标){"1":poi2,"2",poi2} */ + private String punch_clock_poi ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/ReceivingDetail.java b/models/src/main/java/com/haitongauto/models/pojo/ReceivingDetail.java new file mode 100644 index 0000000..72c9801 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/ReceivingDetail.java @@ -0,0 +1,30 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; + +/** + * 收车明细(数据源自RTOS) + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class ReceivingDetail { + /** 明细Id */ + private String id ; + /** 收车Id */ + private String applet_receiving_vehicle_id ; + /** 船名 */ + private String ship_name ; + /** 品牌名称 */ + private String brand ; + /** 港口(目的港) */ + private String port_name ; + /** 车架号数据(逗号分隔) */ + private String vin_list ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/ReceivingVehicle.java b/models/src/main/java/com/haitongauto/models/pojo/ReceivingVehicle.java new file mode 100644 index 0000000..c71752c --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/ReceivingVehicle.java @@ -0,0 +1,51 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; +/** + * 收车信息(数据源自RTOS) + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class ReceivingVehicle { + /** 收车id */ + private String id ; + /** 收车数据id */ + private String receiving_vehicl_id ; + /** 收车(凭证)编号 */ + private String voucher_number ; + /** 司机id */ + private String users_id ; + /** 司机姓名 */ + private String users_name ; + /** 司机电话 */ + private String tel_number ; + /** 作业人员(堆场作业班组安排的该车作业人员),=== */ + private String operators ; + /** 联系电话 */ + private String phone_number ; + /** 板车号 */ + private String truck_number ; + /** 贸易类型(内贸/外贸/其他:DOMESTIC,EXTERNAL,OTHER) */ + private String trade_type ; + /** 货物类型(取自字典表,源于RTOS字典接口,如:CARGO_TYPE,111,商品车) */ + private String cargo_type ; + /** 货物数量 */ + private Integer cargoQuantity ; + /** 收车时间 */ + private String collect_time ; + /** 核对人(小程序中收到该凭证的司机,实际上就是操作司机)=== */ + private String checker ; + /** 核对状态(N-待核对,Y-已核对)=== */ + private String check_status ; + /** 核对时间:核对操作时生成的日期时间=== */ + private String check_time ; + /** 备注=== */ + private String remarks ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/Requester.java b/models/src/main/java/com/haitongauto/models/pojo/Requester.java new file mode 100644 index 0000000..2b175ef --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/Requester.java @@ -0,0 +1,29 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; + +/** + * 请求第三方接口 + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class Requester { + /** 自增id */ + private String id ; + /** url(请求服务地址) */ + private String url ; + /** 请求参数(值为空时,需要依赖实参传值。如小程序登录参数:{"appid":"","code":"","secret":"","grant_type":"authorization_code"}) */ + private String param_map ; + /** 请求类型(1001-1999) */ + private Integer request_type ; + /** 类别说明 */ + private String type_description ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; + +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/ServiceConfig.java b/models/src/main/java/com/haitongauto/models/pojo/ServiceConfig.java new file mode 100644 index 0000000..21ee08a --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/ServiceConfig.java @@ -0,0 +1,26 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; + +/** + * 服务配置 + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class ServiceConfig { + /** 自增id */ + private String id ; + /** 配置名称(系统服务地址,图片文件存储路径,图片访问路径,小程序appid,小程序密钥secret) */ + private String config_name ; + /** 配置代码(100-系统服务地址,200-图片文件存储路径,300-图片访问路径,400-小程序appid,500-小程序密钥secret) */ + private String config_code ; + /** 配置信息(文本) */ + private String config_content ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer isDel ; +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/TableHead.java b/models/src/main/java/com/haitongauto/models/pojo/TableHead.java new file mode 100644 index 0000000..9c27a66 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/TableHead.java @@ -0,0 +1,27 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; + +/** + * 自定义表头(后台管理客户端可自定义勾选表头显示字段) + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class TableHead { + /** 自增id */ + private String id ; + /** 表名 */ + private String table_name ; + /** 标识代码 */ + private String table_code ; + /** 表头Json */ + private String head_jason ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; + +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/Truck.java b/models/src/main/java/com/haitongauto/models/pojo/Truck.java new file mode 100644 index 0000000..b557cdf --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/Truck.java @@ -0,0 +1,43 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; +import org.apache.poi.hpsf.Decimal; + +/** + * 板车信息(用户扫描行驶证获取) + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class Truck { + /** 板车id */ + private String id ; + /** 微信openid */ + private String wx_openid; + + /** 用户id */ + private String users_id ; + /** 车牌号 */ + private String truck_number ; + /** 行驶证ID */ + private String driving_license_id ; + /** 司机电话 */ + private String tel_number ; + /** 车头车架号 */ + private String head_frame_number ; + /** 车辆自重 */ + private Double vehicle_weight ; + /** 车架重 */ + private Double vehicle_frame_weight ; + + /** 行驶证(扫描件) */ + private String driving_license ; + /** 板车状态(1-默认,0-其他,4-拉黑) */ + private Integer truck_state ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/TruckManagement.java b/models/src/main/java/com/haitongauto/models/pojo/TruckManagement.java new file mode 100644 index 0000000..0bd2761 --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/TruckManagement.java @@ -0,0 +1,36 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; + +/** + * 板车管理 + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class TruckManagement { + /** 车辆管理id */ + private String id ; + /** 用户id */ + private String users_id ; + /** (加入黑名单的)车牌号 */ + private String truck_number ; + /** 原因 */ + private String cause ; + /** 司机姓名 */ + private String drivers_name ; + /** 司机电话 */ + private String drivers_phone ; + /** 管理员姓名 */ + private String administrators_name ; + /** 管理员电话 */ + private String administrators_phone ; + /** 加入黑名单时间 */ + private String enter_time ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; +} diff --git a/models/src/main/java/com/haitongauto/models/pojo/Users.java b/models/src/main/java/com/haitongauto/models/pojo/Users.java new file mode 100644 index 0000000..c6aa8fe --- /dev/null +++ b/models/src/main/java/com/haitongauto/models/pojo/Users.java @@ -0,0 +1,44 @@ +package com.haitongauto.models.pojo; + +import lombok.Data; + +/** + * 用户(司机)信息 + * @author : KeChanghui + * @date : 2023-7-9 + */ +@Data +public class Users { + private String access_token ; + + private String access_token_rtos ; + + /** 用户id */ + private String id ; + /** 用户姓名,默认为微信昵称 */ + private String users_name ; + /** 微信获取openid-用户小程序唯一标识 */ + private String wx_openid ; + /** 微信获取unionid-用户微信应用唯一标识 */ + private String wx_unionid ; + /** 微信获取昵称 */ + private String wx_nick ; + /** 微信获取性别 */ + private String wx_sex ; + /** 微信获取头像 */ + private String wx_head_sculpture ; + /** 手机号码 */ + private String tel_number ; + /** 用户身分证号码 */ + private String id_code ; + /** 用户状态(0-正常,1-停用) */ + private Integer users_state ; + /** 创建时间 */ + private String create_time ; + /** 更新时间 */ + private String update_time ; + /** 是否软删除 */ + private Integer is_del ; + + +} diff --git a/models/target/classes/com/haitongauto/models/dto/AnnouncementsDto.class b/models/target/classes/com/haitongauto/models/dto/AnnouncementsDto.class new file mode 100644 index 0000000..a209db9 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/AnnouncementsDto.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/AppointmentDto.class b/models/target/classes/com/haitongauto/models/dto/AppointmentDto.class new file mode 100644 index 0000000..d7534d6 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/AppointmentDto.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/AppointmentPostDto.class b/models/target/classes/com/haitongauto/models/dto/AppointmentPostDto.class new file mode 100644 index 0000000..8364015 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/AppointmentPostDto.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/AppointmentQuery.class b/models/target/classes/com/haitongauto/models/dto/AppointmentQuery.class new file mode 100644 index 0000000..6eae73a Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/AppointmentQuery.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/Appointment_Dto.class b/models/target/classes/com/haitongauto/models/dto/Appointment_Dto.class new file mode 100644 index 0000000..390c758 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/Appointment_Dto.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/CurrentDayPunchClockDto.class b/models/target/classes/com/haitongauto/models/dto/CurrentDayPunchClockDto.class new file mode 100644 index 0000000..8a8d298 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/CurrentDayPunchClockDto.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/DataForMessage.class b/models/target/classes/com/haitongauto/models/dto/DataForMessage.class new file mode 100644 index 0000000..5d5acf2 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/DataForMessage.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/Details.class b/models/target/classes/com/haitongauto/models/dto/Details.class new file mode 100644 index 0000000..01a2f1b Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/Details.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/DicDto.class b/models/target/classes/com/haitongauto/models/dto/DicDto.class new file mode 100644 index 0000000..d59e67e Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/DicDto.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/EnterPortTypeDto.class b/models/target/classes/com/haitongauto/models/dto/EnterPortTypeDto.class new file mode 100644 index 0000000..a57dabe Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/EnterPortTypeDto.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/EnterPortTypeDtol.class b/models/target/classes/com/haitongauto/models/dto/EnterPortTypeDtol.class new file mode 100644 index 0000000..30aced2 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/EnterPortTypeDtol.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/Pages.class b/models/target/classes/com/haitongauto/models/dto/Pages.class new file mode 100644 index 0000000..1f875d7 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/Pages.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/PalletTruckAndUsers.class b/models/target/classes/com/haitongauto/models/dto/PalletTruckAndUsers.class new file mode 100644 index 0000000..0649753 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/PalletTruckAndUsers.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/PunchClockQuery.class b/models/target/classes/com/haitongauto/models/dto/PunchClockQuery.class new file mode 100644 index 0000000..cf560c1 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/PunchClockQuery.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/RecAndDepExcelDto.class b/models/target/classes/com/haitongauto/models/dto/RecAndDepExcelDto.class new file mode 100644 index 0000000..1445ad4 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/RecAndDepExcelDto.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/Responser.class b/models/target/classes/com/haitongauto/models/dto/Responser.class new file mode 100644 index 0000000..feba503 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/Responser.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/VehicleDetails.class b/models/target/classes/com/haitongauto/models/dto/VehicleDetails.class new file mode 100644 index 0000000..7e5b156 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/VehicleDetails.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/app/ChuanItem.class b/models/target/classes/com/haitongauto/models/dto/app/ChuanItem.class new file mode 100644 index 0000000..ab33c6e Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/app/ChuanItem.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/app/CommercialVehicleDetail.class b/models/target/classes/com/haitongauto/models/dto/app/CommercialVehicleDetail.class new file mode 100644 index 0000000..df80ee6 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/app/CommercialVehicleDetail.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/app/Vin.class b/models/target/classes/com/haitongauto/models/dto/app/Vin.class new file mode 100644 index 0000000..30cda0c Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/app/Vin.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/open/Appointment_Dto.class b/models/target/classes/com/haitongauto/models/dto/open/Appointment_Dto.class new file mode 100644 index 0000000..a00b162 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/open/Appointment_Dto.class differ diff --git a/models/target/classes/com/haitongauto/models/dto/open/GoodsInfo.class b/models/target/classes/com/haitongauto/models/dto/open/GoodsInfo.class new file mode 100644 index 0000000..18ea18a Binary files /dev/null and b/models/target/classes/com/haitongauto/models/dto/open/GoodsInfo.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/AppointmentDetail_Ido.class b/models/target/classes/com/haitongauto/models/ido/AppointmentDetail_Ido.class new file mode 100644 index 0000000..cf2ec01 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/AppointmentDetail_Ido.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/BasicDataIdo.class b/models/target/classes/com/haitongauto/models/ido/BasicDataIdo.class new file mode 100644 index 0000000..caf0ab5 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/BasicDataIdo.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/CheckRes.class b/models/target/classes/com/haitongauto/models/ido/CheckRes.class new file mode 100644 index 0000000..88b4fd8 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/CheckRes.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/CommonRes.class b/models/target/classes/com/haitongauto/models/ido/CommonRes.class new file mode 100644 index 0000000..322dd91 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/CommonRes.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/CustomerRes.class b/models/target/classes/com/haitongauto/models/ido/CustomerRes.class new file mode 100644 index 0000000..5f38114 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/CustomerRes.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/DictionaryIdo.class b/models/target/classes/com/haitongauto/models/ido/DictionaryIdo.class new file mode 100644 index 0000000..ade5c49 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/DictionaryIdo.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/PicturePathIdo.class b/models/target/classes/com/haitongauto/models/ido/PicturePathIdo.class new file mode 100644 index 0000000..46a6311 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/PicturePathIdo.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/PortAreasIdo.class b/models/target/classes/com/haitongauto/models/ido/PortAreasIdo.class new file mode 100644 index 0000000..8c40ac9 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/PortAreasIdo.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/RecAndDepInfoIdo.class b/models/target/classes/com/haitongauto/models/ido/RecAndDepInfoIdo.class new file mode 100644 index 0000000..2810854 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/RecAndDepInfoIdo.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/ShipVoyIdo.class b/models/target/classes/com/haitongauto/models/ido/ShipVoyIdo.class new file mode 100644 index 0000000..c3a735f Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/ShipVoyIdo.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/departure/DepDetailIdo.class b/models/target/classes/com/haitongauto/models/ido/departure/DepDetailIdo.class new file mode 100644 index 0000000..092b672 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/departure/DepDetailIdo.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/departure/DepVinIdo.class b/models/target/classes/com/haitongauto/models/ido/departure/DepVinIdo.class new file mode 100644 index 0000000..7e75295 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/departure/DepVinIdo.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/departure/DepartureDetailIdo.class b/models/target/classes/com/haitongauto/models/ido/departure/DepartureDetailIdo.class new file mode 100644 index 0000000..15c90d0 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/departure/DepartureDetailIdo.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/departure/DepartureDetailIdo_DTO.class b/models/target/classes/com/haitongauto/models/ido/departure/DepartureDetailIdo_DTO.class new file mode 100644 index 0000000..3c92d64 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/departure/DepartureDetailIdo_DTO.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/departure/DepartureVehicleIdo.class b/models/target/classes/com/haitongauto/models/ido/departure/DepartureVehicleIdo.class new file mode 100644 index 0000000..faea6dc Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/departure/DepartureVehicleIdo.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/departure/DepartureVehicleIdoPar.class b/models/target/classes/com/haitongauto/models/ido/departure/DepartureVehicleIdoPar.class new file mode 100644 index 0000000..f336c96 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/departure/DepartureVehicleIdoPar.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/departure/DepartureVehicleIdo_DTO.class b/models/target/classes/com/haitongauto/models/ido/departure/DepartureVehicleIdo_DTO.class new file mode 100644 index 0000000..b0deb76 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/departure/DepartureVehicleIdo_DTO.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/departure/pc/DepartureVehicleIdoPar_pc.class b/models/target/classes/com/haitongauto/models/ido/departure/pc/DepartureVehicleIdoPar_pc.class new file mode 100644 index 0000000..da1522f Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/departure/pc/DepartureVehicleIdoPar_pc.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/departure/pc/DepartureVehicleIdo_pc.class b/models/target/classes/com/haitongauto/models/ido/departure/pc/DepartureVehicleIdo_pc.class new file mode 100644 index 0000000..10c354a Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/departure/pc/DepartureVehicleIdo_pc.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/login/PostLoginRes.class b/models/target/classes/com/haitongauto/models/ido/login/PostLoginRes.class new file mode 100644 index 0000000..bdc1e1d Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/login/PostLoginRes.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/login/UserAuthResponseDto.class b/models/target/classes/com/haitongauto/models/ido/login/UserAuthResponseDto.class new file mode 100644 index 0000000..af3a6f4 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/login/UserAuthResponseDto.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/login/UserInfoRes.class b/models/target/classes/com/haitongauto/models/ido/login/UserInfoRes.class new file mode 100644 index 0000000..30b2781 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/login/UserInfoRes.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/login/UserLoginOrRegisterRequest.class b/models/target/classes/com/haitongauto/models/ido/login/UserLoginOrRegisterRequest.class new file mode 100644 index 0000000..fe00534 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/login/UserLoginOrRegisterRequest.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/login/UserLoginOrRegisterResponse.class b/models/target/classes/com/haitongauto/models/ido/login/UserLoginOrRegisterResponse.class new file mode 100644 index 0000000..8bd07ec Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/login/UserLoginOrRegisterResponse.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/login/UsersIdo.class b/models/target/classes/com/haitongauto/models/ido/login/UsersIdo.class new file mode 100644 index 0000000..5405038 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/login/UsersIdo.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/receiving/RecDetailIdo.class b/models/target/classes/com/haitongauto/models/ido/receiving/RecDetailIdo.class new file mode 100644 index 0000000..e7b1878 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/receiving/RecDetailIdo.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/receiving/RecVinIdo.class b/models/target/classes/com/haitongauto/models/ido/receiving/RecVinIdo.class new file mode 100644 index 0000000..33b1098 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/receiving/RecVinIdo.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/receiving/ReceivingDetailIdo.class b/models/target/classes/com/haitongauto/models/ido/receiving/ReceivingDetailIdo.class new file mode 100644 index 0000000..d7f6f57 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/receiving/ReceivingDetailIdo.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/receiving/ReceivingDetailIdo_DTO.class b/models/target/classes/com/haitongauto/models/ido/receiving/ReceivingDetailIdo_DTO.class new file mode 100644 index 0000000..7b68ba4 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/receiving/ReceivingDetailIdo_DTO.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/receiving/ReceivingVehicleIdo.class b/models/target/classes/com/haitongauto/models/ido/receiving/ReceivingVehicleIdo.class new file mode 100644 index 0000000..db9efb8 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/receiving/ReceivingVehicleIdo.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/receiving/ReceivingVehicleIdoPar.class b/models/target/classes/com/haitongauto/models/ido/receiving/ReceivingVehicleIdoPar.class new file mode 100644 index 0000000..1270888 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/receiving/ReceivingVehicleIdoPar.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/receiving/ReceivingVehicleIdo_DTO.class b/models/target/classes/com/haitongauto/models/ido/receiving/ReceivingVehicleIdo_DTO.class new file mode 100644 index 0000000..c30250b Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/receiving/ReceivingVehicleIdo_DTO.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/receiving/pc/ReceivingVehicleIdoPar_pc.class b/models/target/classes/com/haitongauto/models/ido/receiving/pc/ReceivingVehicleIdoPar_pc.class new file mode 100644 index 0000000..e77293c Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/receiving/pc/ReceivingVehicleIdoPar_pc.class differ diff --git a/models/target/classes/com/haitongauto/models/ido/receiving/pc/ReceivingVehicleIdo_pc.class b/models/target/classes/com/haitongauto/models/ido/receiving/pc/ReceivingVehicleIdo_pc.class new file mode 100644 index 0000000..f58f0c4 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/ido/receiving/pc/ReceivingVehicleIdo_pc.class differ diff --git a/models/target/classes/com/haitongauto/models/open/AppointmentCmd.class b/models/target/classes/com/haitongauto/models/open/AppointmentCmd.class new file mode 100644 index 0000000..f02cd34 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/open/AppointmentCmd.class differ diff --git a/models/target/classes/com/haitongauto/models/open/AppointmentDetailSort.class b/models/target/classes/com/haitongauto/models/open/AppointmentDetailSort.class new file mode 100644 index 0000000..1bdb205 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/open/AppointmentDetailSort.class differ diff --git a/models/target/classes/com/haitongauto/models/open/AppointmentDetail_Ido.class b/models/target/classes/com/haitongauto/models/open/AppointmentDetail_Ido.class new file mode 100644 index 0000000..34b68cd Binary files /dev/null and b/models/target/classes/com/haitongauto/models/open/AppointmentDetail_Ido.class differ diff --git a/models/target/classes/com/haitongauto/models/open/Appointment_Ido.class b/models/target/classes/com/haitongauto/models/open/Appointment_Ido.class new file mode 100644 index 0000000..61835d9 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/open/Appointment_Ido.class differ diff --git a/models/target/classes/com/haitongauto/models/open/QueryCondition.class b/models/target/classes/com/haitongauto/models/open/QueryCondition.class new file mode 100644 index 0000000..e99cd45 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/open/QueryCondition.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/Announcement.class b/models/target/classes/com/haitongauto/models/pojo/Announcement.class new file mode 100644 index 0000000..db2686f Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/Announcement.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/Appointment.class b/models/target/classes/com/haitongauto/models/pojo/Appointment.class new file mode 100644 index 0000000..e75ffdf Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/Appointment.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/AppointmentDetail.class b/models/target/classes/com/haitongauto/models/pojo/AppointmentDetail.class new file mode 100644 index 0000000..24df26b Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/AppointmentDetail.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/DepartureDetail.class b/models/target/classes/com/haitongauto/models/pojo/DepartureDetail.class new file mode 100644 index 0000000..1fdaab7 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/DepartureDetail.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/DepartureVehicle.class b/models/target/classes/com/haitongauto/models/pojo/DepartureVehicle.class new file mode 100644 index 0000000..c6ae66e Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/DepartureVehicle.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/Dic.class b/models/target/classes/com/haitongauto/models/pojo/Dic.class new file mode 100644 index 0000000..6e5e9a7 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/Dic.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/EntryInstruct.class b/models/target/classes/com/haitongauto/models/pojo/EntryInstruct.class new file mode 100644 index 0000000..a4db45d Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/EntryInstruct.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/Feedback.class b/models/target/classes/com/haitongauto/models/pojo/Feedback.class new file mode 100644 index 0000000..c83f736 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/Feedback.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/LoginLog.class b/models/target/classes/com/haitongauto/models/pojo/LoginLog.class new file mode 100644 index 0000000..77a8914 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/LoginLog.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/Message.class b/models/target/classes/com/haitongauto/models/pojo/Message.class new file mode 100644 index 0000000..98646fb Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/Message.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/NoviceIntroduction.class b/models/target/classes/com/haitongauto/models/pojo/NoviceIntroduction.class new file mode 100644 index 0000000..fe59c1d Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/NoviceIntroduction.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/PortArea.class b/models/target/classes/com/haitongauto/models/pojo/PortArea.class new file mode 100644 index 0000000..d7227fe Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/PortArea.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/PunchClock.class b/models/target/classes/com/haitongauto/models/pojo/PunchClock.class new file mode 100644 index 0000000..151fdab Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/PunchClock.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/ReceivingDetail.class b/models/target/classes/com/haitongauto/models/pojo/ReceivingDetail.class new file mode 100644 index 0000000..c651b8c Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/ReceivingDetail.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/ReceivingVehicle.class b/models/target/classes/com/haitongauto/models/pojo/ReceivingVehicle.class new file mode 100644 index 0000000..3a38f3d Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/ReceivingVehicle.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/Requester.class b/models/target/classes/com/haitongauto/models/pojo/Requester.class new file mode 100644 index 0000000..7da9516 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/Requester.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/ServiceConfig.class b/models/target/classes/com/haitongauto/models/pojo/ServiceConfig.class new file mode 100644 index 0000000..c1144be Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/ServiceConfig.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/TableHead.class b/models/target/classes/com/haitongauto/models/pojo/TableHead.class new file mode 100644 index 0000000..1c74acd Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/TableHead.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/Truck.class b/models/target/classes/com/haitongauto/models/pojo/Truck.class new file mode 100644 index 0000000..24d3785 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/Truck.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/TruckManagement.class b/models/target/classes/com/haitongauto/models/pojo/TruckManagement.class new file mode 100644 index 0000000..e24032d Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/TruckManagement.class differ diff --git a/models/target/classes/com/haitongauto/models/pojo/Users.class b/models/target/classes/com/haitongauto/models/pojo/Users.class new file mode 100644 index 0000000..9642412 Binary files /dev/null and b/models/target/classes/com/haitongauto/models/pojo/Users.class differ diff --git a/utils/pom.xml b/utils/pom.xml new file mode 100644 index 0000000..45f3669 --- /dev/null +++ b/utils/pom.xml @@ -0,0 +1,102 @@ + + + + rtos-wh + org.example + 1.0-SNAPSHOT + + 4.0.0 + + utils + + + 1.8 + 1.8 + UTF-8 + + + + + + org.springframework.boot + spring-boot-starter + 2.7.8 + + + + org.springframework.boot + spring-boot-starter-web + 2.7.8 + + + + + + com.itextpdf + html2pdf + 3.0.2 + + + + com.itextpdf + font-asian + 7.1.13 + + + + org.projectlombok + lombok + 1.18.26 + compile + + + + org.example + models + 1.0-SNAPSHOT + compile + + + + + com.alibaba + easyexcel + 3.0.2 + + + + cglib + cglib + 3.1 + + + + + io.minio + minio + 6.0.11 + + + + com.alibaba + fastjson + 1.2.7 + + + junit + junit + test + + + com.bestvike + linq + 3.1.0 + + + + + + + \ No newline at end of file diff --git a/utils/src/main/java/com/haitongauto/utils/CorsConfig.java b/utils/src/main/java/com/haitongauto/utils/CorsConfig.java new file mode 100644 index 0000000..99fbc47 --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/CorsConfig.java @@ -0,0 +1,51 @@ +package com.haitongauto.utils; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * 跨域配置:重写WebMvcConfigurer即可 + */ +@Configuration +public class CorsConfig implements WebMvcConfigurer { + /** + * 跨域支持方法 + * @param registry 开启跨域注册 + */ + @Override + public void addCorsMappings(CorsRegistry registry){ + //addMapping 添加可跨域的请求地址 + registry.addMapping("/**") + //设置跨域 域名权限 规定由某一个指定的域名+端口能访问跨域项目 + .allowedOrigins("*") + //.allowedOrigins("http://localhost:8080") + //是否开启cookie跨域 + .allowCredentials(false) + //规定能够跨域访问的方法类型 + .allowedMethods("GET","POST","DELETE","PUT","OPTIONS") + //添加验证请求头信息 token + .allowedHeaders("*") + //预请求存活时间,在此期间不在发送预请求 + .maxAge(3600); + } + + /** + * 请求拦截:将请求路径映射到安全的目标路径 + * @param registry 注册实例 + */ + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + ////addResourceHandler:请求路径 + ////addResourceLocations:映射路径 + //registry.addResourceHandler("/**") + // .addResourceLocations("classpath:/static/"); + //registry.addResourceHandler("swagger-ui.html") + // .addResourceLocations("classpath:/META-INF/resources/"); + //registry.addResourceHandler("doc.html") + // .addResourceLocations("classpath:/META-INF/resources/"); + //registry.addResourceHandler("/webjars/**") + // .addResourceLocations("classpath:/META-INF/resources/webjars/"); + } +} diff --git a/utils/src/main/java/com/haitongauto/utils/DateTimeHelper.java b/utils/src/main/java/com/haitongauto/utils/DateTimeHelper.java new file mode 100644 index 0000000..f815f85 --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/DateTimeHelper.java @@ -0,0 +1,73 @@ +package com.haitongauto.utils; + +import java.text.ParsePosition; +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.util.Date; + +public class DateTimeHelper { + /** + * 字符串转日期时间 + * @param my_date_time my_date_time + * @return return + */ + public static Date DateStrToDateTime(String my_date_time){ + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + ParsePosition pos = new ParsePosition(0); + return sdf.parse(my_date_time,pos); + } + + /** + * 字符串转日期 + * @param my_date my_date + * @return return + */ + public static Date DateStrToDate(String my_date){ + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + ParsePosition pos = new ParsePosition(0); + return sdf.parse(my_date,pos); + } + + /** + * 字符串转时间 + * @param my_date my_date + * @return return + */ + public static Date DateStrToTime(String my_date){ + SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); + ParsePosition pos = new ParsePosition(0); + return sdf.parse(my_date,pos); + } + + + /** + * 字符串转LoaclDateTime + * @param my_date:日期时间字符串 + * @return 日期时间对象 + */ + public static LocalDateTime DateTimeStrToLocalDateTime(String my_date){ + my_date=my_date.replace(" ","T"); + return LocalDateTime.parse(my_date); + } + + /** + * 字符串转LocalDate + * @param my_date my_date + * @return return + */ + public static LocalDate DateStrToLocalDate(String my_date){ + return LocalDate.parse(my_date); + } + + /** + * 字符串转LocalTime + * @param my_date my_date + * @return return + */ + public static LocalTime DateStrToLocalTime(String my_date){ + return LocalTime.parse(my_date); + } + +} diff --git a/utils/src/main/java/com/haitongauto/utils/FileDownloadUtil.java b/utils/src/main/java/com/haitongauto/utils/FileDownloadUtil.java new file mode 100644 index 0000000..a2c87ae --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/FileDownloadUtil.java @@ -0,0 +1,90 @@ +package com.haitongauto.utils; + +import javax.servlet.http.HttpServletResponse; +import java.io.*; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.ProtocolException; +import java.net.URL; + +public class FileDownloadUtil { + + /** + * 从服务器获得一个输入流 + * @param urlPath 路径 + * @return 返回输入流 + */ + public static InputStream getInputStream(String urlPath) { + InputStream inputStream = null; + HttpURLConnection httpURLConnection = null; + try { + URL url = new URL(urlPath); + httpURLConnection = (HttpURLConnection) url.openConnection(); + // 设置网络连接超时时间 + httpURLConnection.setConnectTimeout(3000); + // 设置应用程序要从网络连接读取数据 + httpURLConnection.setDoInput(true); + httpURLConnection.setRequestMethod("GET"); + int responseCode = httpURLConnection.getResponseCode(); + System.out.println("responseCode is:" + responseCode); + if (responseCode == HttpURLConnection.HTTP_OK) { + // 从服务器返回一个输入流 + inputStream = httpURLConnection.getInputStream(); + } else { + inputStream = httpURLConnection.getErrorStream(); + } + } catch (MalformedURLException e) { + e.printStackTrace(); + } catch (IOException e) { + throw new RuntimeException(e); + } + return inputStream; + } + + /** + * @param resp resp + * @param inputStream inputStream + * @description: 将输入流输出到页面 + */ + public static void writeFile(HttpServletResponse resp, InputStream inputStream) { + OutputStream out = null; + try { + out = resp.getOutputStream(); + int len = 0; + byte[] b = new byte[1024]; + while ((len = inputStream.read(b)) != -1) { + out.write(b, 0, len); + } + out.flush(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + //inputStream.close(); + if (out != null) { + out.close(); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + + /** + * 获得输入流 + * @param filePath 完整的文夹路径名 + * @return 返回输入流 + */ + public static InputStream fileToInputStream(String filePath) { + File file = new File(filePath); + FileInputStream fileInputStream = null; + try { + fileInputStream = new FileInputStream(file); + } catch (FileNotFoundException e) { + throw new RuntimeException(e); + } + return fileInputStream; + } + +} \ No newline at end of file diff --git a/utils/src/main/java/com/haitongauto/utils/FormatDateTime.java b/utils/src/main/java/com/haitongauto/utils/FormatDateTime.java new file mode 100644 index 0000000..05bd666 --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/FormatDateTime.java @@ -0,0 +1,352 @@ +package com.haitongauto.utils; + +import java.text.ParsePosition; +import java.text.SimpleDateFormat; +import java.time.Instant; +import java.time.LocalDate; +import java.time.ZoneId; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.concurrent.TimeUnit; + +public class FormatDateTime { + /** + * 日期加一天 + * + * @return 返回时间类型 yyyy-MM-dd HH:mm:ss + */ + public static Date getDateAddOne(Date myDate) { + Date currentTime = myDate; + Calendar calendar = new GregorianCalendar(); + calendar.setTime(currentTime); + calendar.add(Calendar.DATE, 1); + currentTime = calendar.getTime(); + return currentTime; + } + + /** + * 获取今天文件夹日期 + * + * @return 返回时间类型 yyyy-MM-dd HH:mm:ss + */ + public static String getTodayStr() { + Date currentTime = new Date(); + SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd"); + String dateString = formatter.format(currentTime); + return dateString; + } + + /** + * 获取昨天文件夹日期 + * + * @return 返回时间类型 yyyy-MM-dd HH:mm:ss + */ + public static String getYesTodayStr() { + Date currentTime = new Date(); + Calendar calendar = new GregorianCalendar(); + calendar.setTime(currentTime); + calendar.add(Calendar.DATE, -1); + currentTime = calendar.getTime(); + SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd"); + String dateString = formatter.format(currentTime); + return dateString; + } + + + /** + * 获取现在时间 + * + * @return 返回时间类型 yyyy-MM-dd HH:mm:ss + */ + public static Date getNowDate() { + Date currentTime = new Date(); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String dateString = formatter.format(currentTime); + ParsePosition pos = new ParsePosition(8); + return formatter.parse(dateString, pos); + } + + /** + * 获取现在时间 + * + * @return 返回字符串格式 yyyy-MM-dd HH:mm:ss + */ + public static String getStringDate() { + Date currentTime = new Date(); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + return formatter.format(currentTime); + } + + /** + * 获取现在时间 + * + * @return 返回短时间字符串格式yyyy-MM-dd + */ + public static String getStringDateShort() { + Date currentTime = new Date(); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + return formatter.format(currentTime); + } + + /** + * 获取时间 小时:分;秒 HH:mm:ss + * + * @return 返回字符串格式 HH:mm:ss + */ + public static String getTimeShort() { + SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss"); + Date currentTime = new Date(); + return formatter.format(currentTime); + } + + /** + * 将长时间格式字符串转换为时间 yyyy-MM-dd HH:mm:ss + * + * @param strDateTime strDateTime + * @return 长时间格式字符串转换为时间 yyyy-MM-dd HH:mm:ss + */ + public static Date strToDateTime(String strDateTime) { + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + ParsePosition pos = new ParsePosition(0); + return formatter.parse(strDateTime, pos); + } + + /** + * 将换长时间格式时间转为字符串 yyyy-MM-dd HH:mm:ss + * + * @param dateDate dateDate + * @return 换长时间格式时间转为字符串 yyyy-MM-dd HH:mm:ss + */ + public static String dateTimeToStr(Date dateDate) { + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + return formatter.format(dateDate); + } + + /** + * 将短时间格式时间转换为字符串 yyyy-MM-dd + * + * @param dateDate dateDate + * @return 短时间格式时间转换为字符串 yyyy-MM-dd + */ + public static String dateToStr(Date dateDate) { + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + return formatter.format(dateDate); + } + + /** + * 将短时间格式字符串转换为时间 yyyy-MM-dd + * + * @param strDate strDate + * @return return + */ + public static Date strToDate(String strDate) { + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + ParsePosition pos = new ParsePosition(0); + return formatter.parse(strDate, pos); + } + + /** + * 得到现在时间 + * + * @return return + */ + public static Date getNow() { + return new Date(); + } + + /** + * 提取一个月中的最后一天 + * + * @param day day + * @return 一个月中的最后一天 + */ + public static Date getLastDate(long day) { + Date date = new Date(); + long date_3_hm = date.getTime() - 3600000 * 34 * day; + return new Date(date_3_hm); + } + + /** + * 得到现在时间 + * + * @return 字符串 yyyyMMdd HHmmss + */ + public static String getStringToday() { + Date currentTime = new Date(); + SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd HHmmss"); + return formatter.format(currentTime); + } + + /** + * 得到现在小时 + */ + public static String getHour() { + Date currentTime = new Date(); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String dateString = formatter.format(currentTime); + String hour; + hour = dateString.substring(11, 13); + return hour; + } + + /** + * 得到现在分钟 + * + * @return return + */ + public static String getTime() { + Date currentTime = new Date(); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String dateString = formatter.format(currentTime); + String min; + min = dateString.substring(14, 16); + return min; + } + + /** + * 根据用户传入的时间表示格式,返回当前时间的格式 如果是yyyyMMdd,注意字母y不能大写。 + * + * @param sformat yyyyMMddhhmmss + * @return return + */ + public static String getUserDate(String sformat) { + Date currentTime = new Date(); + SimpleDateFormat formatter = new SimpleDateFormat(sformat); + return formatter.format(currentTime); + } + + public static Date getDateFromLocalDate(LocalDate localDate) { + ZoneId zone = ZoneId.systemDefault(); + Instant instant = localDate.atStartOfDay().atZone(zone).toInstant(); + return Date.from(instant); + } + + + /** + * 获取两个时间字符串的时间差 + * + * @param startTimeStr 开始时间 + * @param endTimeStr 结束时间 + * @return 时间差 (秒数) + */ + public static long getTimeCha(String startTimeStr, String endTimeStr) { + if (startTimeStr == null || startTimeStr.isEmpty()) { + return 0; + } + if (endTimeStr == null || endTimeStr.isEmpty()) { + return 0; + } + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + long diffInMilliseconds = 0; + //long diffInMinutes = 0; + //long diffInHour = 0; + try { + Date startTime = format.parse(startTimeStr); + Date endTime = format.parse(endTimeStr); + diffInMilliseconds = endTime.getTime() - startTime.getTime(); + //diffInMinutes = TimeUnit.MILLISECONDS.toMinutes(diffInMilliseconds); + //diffInHour=TimeUnit.MILLISECONDS.toHours(diffInMilliseconds); + System.out.println("Time difference in minutes: " + diffInMilliseconds); + + } catch (Exception e) { + e.printStackTrace(); + } + return diffInMilliseconds; + } + + + /** + * 将日期字符串转化为星期 + * @param dateString 日期字符串 + * @return 星期 + */ + public static String getWeekDayStringByDateString(String dateString) { + if (dateString == null || dateString.isEmpty()) { + return null; + } + String weekDayString = ""; + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); + try { + Date date = dateFormat.parse(dateString); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + int weekDay = calendar.get(Calendar.DAY_OF_WEEK); + switch (weekDay) { + case Calendar.SUNDAY: + weekDayString = "星期日"; + break; + case Calendar.MONDAY: + weekDayString = "星期一"; + break; + case Calendar.TUESDAY: + weekDayString = "星期二"; + break; + case Calendar.WEDNESDAY: + weekDayString = "星期三"; + break; + case Calendar.THURSDAY: + weekDayString = "星期四"; + break; + case Calendar.FRIDAY: + weekDayString = "星期五"; + break; + case Calendar.SATURDAY: + weekDayString = "星期六"; + break; + } + + } catch (Exception e) { + e.printStackTrace(); + } + return weekDayString; + } + + /** + * 将日期时间字符串转化为星期 + * @param dateTimeString 日期时间字符串 + * @return 星期 + */ + public static String getWeekDayStringByDateTimeString(String dateTimeString) { + if (dateTimeString == null || dateTimeString.isEmpty()) { + return ""; + } + //String dateTimeString = "2023-10-18 09:13:40"; + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String weekDayString = ""; + try { + Date dateTime = dateFormat.parse(dateTimeString); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(dateTime); + int weekDay = calendar.get(Calendar.DAY_OF_WEEK); + switch (weekDay) { + case Calendar.SUNDAY: + weekDayString = "星期日"; + break; + case Calendar.MONDAY: + weekDayString = "星期一"; + break; + case Calendar.TUESDAY: + weekDayString = "星期二"; + break; + case Calendar.WEDNESDAY: + weekDayString = "星期三"; + break; + case Calendar.THURSDAY: + weekDayString = "星期四"; + break; + case Calendar.FRIDAY: + weekDayString = "星期五"; + break; + case Calendar.SATURDAY: + weekDayString = "星期六"; + break; + } + System.out.println(weekDayString); + } catch (Exception e) { + e.printStackTrace(); + } + return weekDayString; + } + +} diff --git a/utils/src/main/java/com/haitongauto/utils/GetDateTime.java b/utils/src/main/java/com/haitongauto/utils/GetDateTime.java new file mode 100644 index 0000000..43c0cd8 --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/GetDateTime.java @@ -0,0 +1,103 @@ +package com.haitongauto.utils; + +import org.springframework.stereotype.Component; + +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.util.Calendar; +import java.util.Date; +import java.util.TimeZone; + +@Component +public class GetDateTime { + /** + * 生成当前日期 + * + * @return 当前日期 + */ + public static Date nowDate() { + LocalDateTime localDateTime = LocalDateTime.now(); + return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant()); + } + + /** + * 原始日期时间型格式转换为标准字符串型(yyyy-MM-dd HH:mm:ss) + * + * @param dateVal 原始日期时间 + * @return 标准字符串型数据 + */ + public static String getDateTimeToString(Date dateVal) { + //创建SimpleDateFormat对象,指定样式,如:2022-03-23 22:56:30 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + //格式转换 + + return sdf.format(dateVal); + } + + /** + * 显示本系统当前时区 + * @param args args + */ + public static void getSystemTimeArea(String[] args) { + Calendar ca = Calendar.getInstance(); + TimeZone tz = ca.getTimeZone(); + System.out.println(tz.getID()); //现在显示为:GMT+08:00,为中国时间(东八区)时间,所以,数据库连接的时区需要修改为:serverTimezone=Asia/Shanghai或者serverTimezone=GMT%2B8 + } + + /** + * 将日期转换为星期 + */ + public static String dateToWeek(String datetime) throws ParseException { + String[] weekDays = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"}; + Date date = new SimpleDateFormat("yyyy-MM-dd").parse(datetime); + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + int w = Math.max(cal.get(Calendar.DAY_OF_WEEK) - 1, 0); + return weekDays[w]; + } + + /** + * 日期加减天数获得新日期 + * @date 原始日期 + * @n 增减天数,减为负数 */ + public static Date getNewDate(Date date,int n){ + //定义日期时间格式 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + + Calendar calstart = Calendar.getInstance(); + + calstart.setTime(date);//放入所要修改的日期 + + calstart.add(Calendar.DAY_OF_WEEK, n);//进行加减运算 + + System.out.println(sdf.format(calstart.getTime())); + + return calstart.getTime(); + } + + /** + * 计算两个日期相差的天数 + * @param date1 较小的日期 + * @param date2 较大的日期 + */ + public static Integer getDaysForTwoDate(Date date1, Date date2){ + DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); + int x =0; + try { + Date star = df.parse(df.format(date1));//开始时间 + Date endDay = df.parse(df.format(date2));//结束时间 + Long starTime=star.getTime(); + Long endTime=endDay.getTime(); + Long num=endTime-starTime;//时间戳相差的毫秒数 + //计算为天数 + x =(int)(num/(24*60*60*1000)); + System.out.println("相差天数为:"+ x); + } catch (ParseException e) { + e.printStackTrace(); + } + return x; + } +} diff --git a/utils/src/main/java/com/haitongauto/utils/HtmlToPdfUtils.java b/utils/src/main/java/com/haitongauto/utils/HtmlToPdfUtils.java new file mode 100644 index 0000000..37b6ed4 --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/HtmlToPdfUtils.java @@ -0,0 +1,183 @@ +package com.haitongauto.utils; + +import com.itextpdf.html2pdf.ConverterProperties; +import com.itextpdf.html2pdf.HtmlConverter; +import com.itextpdf.io.source.ByteArrayOutputStream; +import com.itextpdf.kernel.events.PdfDocumentEvent; +import com.itextpdf.kernel.font.PdfFont; + +import com.itextpdf.kernel.font.PdfFontFactory; +import com.itextpdf.kernel.geom.PageSize; +import com.itextpdf.kernel.pdf.PdfDocument; +import com.itextpdf.kernel.pdf.PdfWriter; +import com.itextpdf.layout.font.FontProvider; +//import io.micrometer.common.util.StringUtils; +import lombok.extern.slf4j.Slf4j; + +import java.io.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Itext7转换工具类 + */ +@Slf4j +public class HtmlToPdfUtils { + + + /** + * html文件转化为 pdf文件 + * @param htmlFile html文件所在相对路径 如 "C:/Users/lenovo/Desktop/teee/myTest.html"; + * @param pdfFile pdf文件存储相对路径 如 "C:/Users/lenovo/Desktop/teee/x6.pdf"; + * @param waterMarkText 自定义水印 + */ + public static void htmlToPdf(String htmlFile,String pdfFile,String waterMarkText) { + if (htmlFile.isEmpty()||pdfFile.isEmpty()) + { + log.error("错误信息:{html文件所在相对路径不能为空,且pdf文件存储相对路径不能为空}"); + return; + } + + if (waterMarkText==null){ + waterMarkText = ""; + } + long startTime = System.currentTimeMillis(); + InputStream inputStream = null; + try { + inputStream = new FileInputStream(htmlFile); + } catch (FileNotFoundException e) { + throw new RuntimeException(e); + } + OutputStream outputStream = null; + try { + outputStream = new FileOutputStream(pdfFile); + } catch (FileNotFoundException e) { + throw new RuntimeException(e); + } + //微软雅黑在windows系统里的位置如下,linux系统直接拷贝该文件放在linux目录下即可 + // String fontPath = "src/main/resources/font/STHeiti Light.ttc,0"; + String fontPath = "src/main/resources/font/simsun.ttc,0"; + HtmlToPdfUtils.convertToPdf(inputStream, waterMarkText, fontPath, outputStream); + } + + + + /** + * html转pdf + * + * @param inputStream 输入流 + * @param waterMark 水印 + * @param fontPath 字体路径,ttc后缀的字体需要添加,0 + * @param outputStream 输出流 + * @date : 2021/1/15 14:07 + */ + public static void convertToPdf(InputStream inputStream, String waterMark, String fontPath, OutputStream outputStream) { + PdfWriter pdfWriter = new PdfWriter(outputStream); + PdfDocument pdfDocument = new PdfDocument(pdfWriter); + //设置为A4大小 + pdfDocument.setDefaultPageSize(PageSize.A4); + //添加水印 + pdfDocument.addEventHandler(PdfDocumentEvent.END_PAGE, new WaterMarkEventHandler(waterMark)); + + //添加中文字体支持 + ConverterProperties properties = new ConverterProperties(); + FontProvider fontProvider = new FontProvider(); + + + // 设置字体 + PdfFont sysFont = null; + try { + sysFont = PdfFontFactory.createFont("STSongStd-Light", "UniGB-UCS2-H", false); + } catch (IOException e) { + throw new RuntimeException(e); + } + fontProvider.addFont(sysFont.getFontProgram(), "UniGB-UCS2-H"); + + //添加自定义字体,例如微软雅黑 +// if (StringUtils.isNotBlank(fontPath)) { +// PdfFont microsoft = PdfFontFactory.createFont(fontPath, PdfEncodings.IDENTITY_H, false); +// fontProvider.addFont(microsoft.getFontProgram(), PdfEncodings.IDENTITY_H); +// } + + properties.setFontProvider(fontProvider); + // 读取Html文件流,查找出当中的 或出现类似的符号空格字符 + inputStream = readInputStrem(inputStream); + if (inputStream != null) { + // 生成pdf文档 + try { + HtmlConverter.convertToPdf(inputStream, pdfDocument, properties); + } catch (IOException e) { + throw new RuntimeException(e); + } + try { + pdfWriter.close(); + } catch (IOException e) { + throw new RuntimeException(e); + } + pdfDocument.close(); + return; + } else { + log.error("转换失败!"); + } + } + + /** + * 读取HTML 流文件,并查询当中的 或类似符号直接替换为空格 + * + * @param inputStream + * @return + */ + private static InputStream readInputStrem(InputStream inputStream) { + // 定义一些特殊字符的正则表达式 如: + String regEx_special = "\\&[a-zA-Z]{1,10};"; + try { + //<1>创建字节数组输出流,用来输出读取到的内容 + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + //<2>创建缓存大小 + byte[] buffer = new byte[1024]; // 1KB + //每次读取到内容的长度 + int len = -1; + //<3>开始读取输入流中的内容 + while ((len = inputStream.read(buffer)) != -1) { //当等于-1说明没有数据可以读取了 + baos.write(buffer, 0, len); //把读取到的内容写到输出流中 + } + //<4> 把字节数组转换为字符串 + String content = baos.toString(); + //<5>关闭输入流和输出流 + // inputStream.close(); + baos.close(); + // log.info("读取的内容:{}", content); + // 判断HTML内容是否具有HTML的特殊字符标记 + Pattern compile = Pattern.compile(regEx_special, Pattern.CASE_INSENSITIVE); + Matcher matcher = compile.matcher(content); + String replaceAll = matcher.replaceAll(""); + // log.info("替换后的内容:{}", replaceAll); + // 将字符串转化为输入流返回 + InputStream stringStream = getStringStream(replaceAll); + //<6>返回结果 + return stringStream; + } catch (Exception e) { + e.printStackTrace(); + log.error("错误信息:{}", e.getMessage()); + return null; + } + } + + /** + * 将一个字符串转化为输入流 + * @param sInputString 字符串 + * @return + */ + public static InputStream getStringStream(String sInputString) { + if (sInputString != null && !sInputString.trim().equals("")) { + try { + ByteArrayInputStream tInputStringStream = new ByteArrayInputStream(sInputString.getBytes()); + return tInputStringStream; + } catch (Exception e) { + e.printStackTrace(); + } + } + return null; + } + +} \ No newline at end of file diff --git a/utils/src/main/java/com/haitongauto/utils/HttpRequest.java b/utils/src/main/java/com/haitongauto/utils/HttpRequest.java new file mode 100644 index 0000000..26ca69c --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/HttpRequest.java @@ -0,0 +1,252 @@ +package com.haitongauto.utils; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.PrintWriter; +import java.net.URL; +import java.net.URLConnection; +import java.util.List; +import java.util.Map; + +public class HttpRequest { + + /** + * 向指定URL发送GET方法的请求 + * + * @param access_token 权限请求头 必须项 + * @param url 发送请求的URL + * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。 + * @return URL 所代表远程资源的响应结果 + */ + public static String sendGet(String access_token, String url, String param) { + StringBuilder result = new StringBuilder(); + BufferedReader in = null; + try { + String urlNameString = url + "?" + param; + URL realUrl = new URL(urlNameString); + // 打开和URL之间的连接 + URLConnection connection = realUrl.openConnection(); + // 设置通用的请求属性 + connection.setRequestProperty("accept", "*/*"); + connection.setRequestProperty("connection", "Keep-Alive"); + connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); + //设置权限请求头 access_token 必须项 + if (access_token != null && !access_token.equals("")) { + String myToken = "Bearer " + access_token; + connection.setRequestProperty("authorization", myToken); + } + //设置连接超时时间 + connection.setConnectTimeout(10000); + //设置读取超时时间 + connection.setReadTimeout(10000); + // 建立实际的连接 + connection.connect(); + // 获取所有响应头字段 + Map> map = connection.getHeaderFields(); + // 遍历所有的响应头字段 + for (String key : map.keySet()) { + System.out.println(key + "--->" + map.get(key)); + } + // 定义 BufferedReader输入流来读取URL的响应 + in = new BufferedReader(new InputStreamReader( + connection.getInputStream())); + String line; + while ((line = in.readLine()) != null) { + result.append(line); + } + } catch (Exception e) { + System.out.println("发送GET请求出现异常!" + e); + e.printStackTrace(); + } + // 使用finally块来关闭输入流 + finally { + try { + if (in != null) { + in.close(); + } + } catch (Exception e2) { + e2.printStackTrace(); + } + } + return result.toString(); + } + + + /** + * 向指定URL发送GET方法的请求 + * + * @param url 发送请求的URL + * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。 + * @return URL 所代表远程资源的响应结果 + */ + public static String sendGet(String url, String param) { + StringBuilder result = new StringBuilder(); + BufferedReader in = null; + try { + String urlNameString = url + "?" + param; + URL realUrl = new URL(urlNameString); + // 打开和URL之间的连接 + URLConnection connection = realUrl.openConnection(); + // 设置通用的请求属性 + connection.setRequestProperty("accept", "*/*"); + connection.setRequestProperty("connection", "Keep-Alive"); + connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); + + //设置连接超时时间 + connection.setConnectTimeout(10000); + //设置读取超时时间 + connection.setReadTimeout(10000); + // 建立实际的连接 + connection.connect(); + // 获取所有响应头字段 + Map> map = connection.getHeaderFields(); + // 遍历所有的响应头字段 + for (String key : map.keySet()) { + System.out.println(key + "--->" + map.get(key)); + } + // 定义 BufferedReader输入流来读取URL的响应 + in = new BufferedReader(new InputStreamReader( + connection.getInputStream())); + String line; + while ((line = in.readLine()) != null) { + result.append(line); + } + } catch (Exception e) { + System.out.println("发送GET请求出现异常!" + e); + e.printStackTrace(); + } + // 使用finally块来关闭输入流 + finally { + try { + if (in != null) { + in.close(); + } + } catch (Exception e2) { + e2.printStackTrace(); + } + } + return result.toString(); + } + + /** + * 向指定 URL 发送POST方法的请求 + * + * @param url 发送请求的 URL + * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。 + * @return 所代表远程资源的响应结果 + */ + public static String sendPost(String access_token, String url, String param) { + PrintWriter out = null; + BufferedReader in = null; + StringBuilder result = new StringBuilder(); + try { + URL realUrl = new URL(url); + // 打开和URL之间的连接 + URLConnection conn = realUrl.openConnection(); + // 设置通用的请求属性 + conn.setRequestProperty("accept", "*/*"); + conn.setRequestProperty("connection", "Keep-Alive"); + conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); + //设置权限请求头 access_token 必须项 + if (access_token != null && !access_token.equals("")) { + String myToken = "Bearer " + access_token; + conn.setRequestProperty("authorization", myToken); + } + //设置连接超时时间 + conn.setConnectTimeout(15000); + //设置读取超时时间 + conn.setReadTimeout(15000); + // 发送POST请求必须设置如下两行 + conn.setDoOutput(true); + conn.setDoInput(true); + // 获取URLConnection对象对应的输出流 + out = new PrintWriter(conn.getOutputStream()); + // 发送请求参数 + out.print(param); + // flush输出流的缓冲 + out.flush(); + // 定义BufferedReader输入流来读取URL的响应 + in = new BufferedReader(new InputStreamReader(conn.getInputStream())); + String line; + while ((line = in.readLine()) != null) { + result.append(line); + } + } catch (Exception e) { + System.out.println("发送 POST 请求出现异常!" + e); + e.printStackTrace(); + } + //使用finally块来关闭输出流、输入流 + finally { + try { + if (out != null) { + out.close(); + } + if (in != null) { + in.close(); + } + } catch (IOException ex) { + ex.printStackTrace(); + } + } + return result.toString(); + } + + /** + * 向指定 URL 发送POST方法的请求 + * + * @param url 发送请求的 URL + * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。 + * @return 所代表远程资源的响应结果 + */ + public static String sendPost(String url, String param) { + PrintWriter out = null; + BufferedReader in = null; + StringBuilder result = new StringBuilder(); + try { + URL realUrl = new URL(url); + // 打开和URL之间的连接 + URLConnection conn = realUrl.openConnection(); + // 设置通用的请求属性 + conn.setRequestProperty("accept", "*/*"); + conn.setRequestProperty("connection", "Keep-Alive"); + conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); + //设置连接超时时间 + conn.setConnectTimeout(15000); + //设置读取超时时间 + conn.setReadTimeout(15000); + // 发送POST请求必须设置如下两行 + conn.setDoOutput(true); + conn.setDoInput(true); + // 获取URLConnection对象对应的输出流 + out = new PrintWriter(conn.getOutputStream()); + // 发送请求参数 + out.print(param); + // flush输出流的缓冲 + out.flush(); + // 定义BufferedReader输入流来读取URL的响应 + in = new BufferedReader(new InputStreamReader(conn.getInputStream())); + String line; + while ((line = in.readLine()) != null) { + result.append(line); + } + } catch (Exception e) { + System.out.println("发送 POST 请求出现异常!" + e); + e.printStackTrace(); + } + //使用finally块来关闭输出流、输入流 + finally { + try { + if (out != null) { + out.close(); + } + if (in != null) { + in.close(); + } + } catch (IOException ex) { + ex.printStackTrace(); + } + } + return result.toString(); + } +} \ No newline at end of file diff --git a/utils/src/main/java/com/haitongauto/utils/HttpTemplate.java b/utils/src/main/java/com/haitongauto/utils/HttpTemplate.java new file mode 100644 index 0000000..634989e --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/HttpTemplate.java @@ -0,0 +1,236 @@ +package com.haitongauto.utils; + +import org.springframework.lang.Nullable; + +import java.io.*; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; +import java.nio.charset.StandardCharsets; + +/** + * 文件名: ${file_name} + * 版权: Copyright by wsnet + * 描述: + * 修改人: kch + * 修改时间:2023/6/13 + * 跟踪单号: + * 修改单号: + * 修改内容: + */ + +public class HttpTemplate { + /** + * http get请求 + * + * @param httpUrl 链接 + * @return 响应数据 + */ + public static String doGet(String httpUrl) { + //链接 + HttpURLConnection connection = null; + InputStream is = null; + BufferedReader br = null; + StringBuilder result = new StringBuilder(); + try { + //创建连接 + URL url = new URL(httpUrl); + connection = (HttpURLConnection) url.openConnection(); + //设置请求方式 + connection.setRequestMethod("GET"); + //设置连接超时时间 + connection.setConnectTimeout(10000); + //设置读取超时时间 + connection.setReadTimeout(15000); + //开始连接 + connection.connect(); + //获取响应数据 + if (connection.getResponseCode() == 200) { + //获取返回的数据 + is = connection.getInputStream(); + if (is != null) { + br = new BufferedReader(new InputStreamReader(is, "UTF-8")); + String temp = null; + while ((temp = br.readLine()) != null) { + result.append(temp); + } + } + } + } catch (IOException e) { + e.printStackTrace(); + } finally { + if (br != null) { + try { + br.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (is != null) { + try { + is.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + assert connection != null; + connection.disconnect();// 关闭远程连接 + } + return result.toString(); + } + + /** + * post请求 + * + * @param httpUrl 链接 + * @param param 参数 + * @return 返回请求结果 + */ + public static String doPost(String httpUrl, @Nullable String param) { + StringBuilder result = new StringBuilder(); + //连接 + HttpURLConnection connection = null; + OutputStream os = null; + InputStream is = null; + BufferedReader br = null; + try { + //创建连接对象 + URL url = new URL(httpUrl); + //创建连接 + connection = (HttpURLConnection) url.openConnection(); + //设置请求方法 + connection.setRequestMethod("POST"); + //设置连接超时时间 + connection.setConnectTimeout(15000); + //设置读取超时时间 + connection.setReadTimeout(15000); + //设置是否可读取 + connection.setDoOutput(true); + //设置响应是否可读取 + connection.setDoInput(true); + //设置参数类型 + connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); + //拼装参数 + if (param != null && !param.equals("")) { + //设置参数 + os = connection.getOutputStream(); + //拼装参数 + os.write(param.getBytes(StandardCharsets.UTF_8)); + } + //设置权限 + //设置请求头等 + //开启连接 + //connection.connect(); + //读取响应 + if (connection.getResponseCode() == 200) { + is = connection.getInputStream(); + if (is != null) { + br = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8)); + String temp = null; + if ((temp = br.readLine()) != null) { + result.append(temp); + } + } + } + //关闭连接 + } catch (IOException e) { + e.printStackTrace(); + } finally { + if (br != null) { + try { + br.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (os != null) { + try { + os.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (is != null) { + try { + is.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + //关闭连接 + assert connection != null; + connection.disconnect(); + } + return result.toString(); + } + + /** + * http get请求 + * + * @param httpUrl 链接 + * @return 响应数据 + */ + public static String doPicUpload(String httpUrl) { + //链接 + HttpURLConnection connection = null; + InputStream is = null; + BufferedReader br = null; + StringBuilder result = new StringBuilder(); + try { + //创建连接 + URL url = new URL(httpUrl); + connection = (HttpURLConnection) url.openConnection(); + //设置请求方式 + connection.setRequestMethod("GET"); + //设置连接超时时间 + connection.setConnectTimeout(10000); + //设置读取超时时间 + connection.setReadTimeout(15000); + +// DataInputStream in = new DataInputStream(new FileInputStream(file)); +// int bytes = 0; +// byte[] bufferOut = new byte[2048]; +// while ((bytes = in.read(bufferOut)) != -1) { +// out.write(bufferOut, 0, bytes); +// } + //in.close(); + + + //开始连接 + connection.connect(); + //获取响应数据 + if (connection.getResponseCode() == 200) { + //获取返回的数据 + is = connection.getInputStream(); + if (is != null) { + br = new BufferedReader(new InputStreamReader(is, "UTF-8")); + String temp = null; + while ((temp = br.readLine()) != null) { + result.append(temp); + } + } + } + } catch (IOException e) { + e.printStackTrace(); + } finally { + if (br != null) { + try { + br.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (is != null) { + try { + is.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + assert connection != null; + connection.disconnect();// 关闭远程连接 + } + return result.toString(); + } + +} \ No newline at end of file diff --git a/utils/src/main/java/com/haitongauto/utils/IpHelper.java b/utils/src/main/java/com/haitongauto/utils/IpHelper.java new file mode 100644 index 0000000..8010f91 --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/IpHelper.java @@ -0,0 +1,49 @@ +package com.haitongauto.utils; + +import javax.servlet.http.HttpServletRequest; +import java.net.InetAddress; +import java.net.UnknownHostException; + +/** + * @author G1F + * @date 2019/12/23 9:02 + * @description 获取请求真实IP + */ +public class IpHelper { + // + public static String getIpAddr(HttpServletRequest request) { + String ipAddress = null; + try { + ipAddress = request.getHeader("x-forwarded-for"); + if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("Proxy-Client-IP"); + } + if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("WL-Proxy-Client-IP"); + } + if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getRemoteAddr(); + if (ipAddress.equals("127.0.0.1")) { + // 根据网卡取本机配置的IP + InetAddress inet = null; + try { + inet = InetAddress.getLocalHost(); + } catch (UnknownHostException e) { + e.printStackTrace(); + } + assert inet != null; + ipAddress = inet.getHostAddress(); + } + } + // 对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割 + if (ipAddress != null && ipAddress.length() > 15) { // "***.***.***.***".length() + if (ipAddress.indexOf(",") > 0) { + ipAddress = ipAddress.substring(0, ipAddress.indexOf(",")); + } + } + } catch (Exception e) { + ipAddress = ""; + } + return ipAddress; + } +} \ No newline at end of file diff --git a/utils/src/main/java/com/haitongauto/utils/PageEventHandler.java b/utils/src/main/java/com/haitongauto/utils/PageEventHandler.java new file mode 100644 index 0000000..c4fac03 --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/PageEventHandler.java @@ -0,0 +1,49 @@ +package com.haitongauto.utils; + +import com.itextpdf.kernel.events.Event; +import com.itextpdf.kernel.events.IEventHandler; +import com.itextpdf.kernel.events.PdfDocumentEvent; +import com.itextpdf.kernel.font.PdfFont; +import com.itextpdf.kernel.font.PdfFontFactory; +import com.itextpdf.kernel.geom.Rectangle; +import com.itextpdf.kernel.pdf.PdfDocument; +import com.itextpdf.kernel.pdf.PdfPage; +import com.itextpdf.kernel.pdf.canvas.PdfCanvas; +import com.itextpdf.layout.Canvas; +import com.itextpdf.layout.element.Paragraph; +import com.itextpdf.layout.property.TextAlignment; +import org.springframework.stereotype.Component; + +import java.io.IOException; + +/** + * 页码 + */ +@Component +public class PageEventHandler implements IEventHandler { + + @Override + public void handleEvent(Event event) { + PdfDocumentEvent documentEvent = (PdfDocumentEvent) event; + PdfDocument document = documentEvent.getDocument(); + PdfPage page = documentEvent.getPage(); + Rectangle pageSize = page.getPageSize(); + + PdfFont pdfFont = null; + try { + pdfFont = PdfFontFactory.createFont("STSongStd-Light", "UniGB-UCS2-H", false); + } catch (IOException e) { + e.printStackTrace(); + } + + PdfCanvas pdfCanvas = new PdfCanvas(page.getLastContentStream(), page.getResources(), document); + Canvas canvas = new Canvas(pdfCanvas, pageSize); + float x = (pageSize.getLeft() + pageSize.getRight()) / 2; + float y = pageSize.getBottom() + 15; + Paragraph paragraph = new Paragraph("第" + document.getPageNumber(page) + "页/共" + document.getNumberOfPages() + "页") + .setFontSize(10) + .setFont(pdfFont); + canvas.showTextAligned(paragraph, x, y, TextAlignment.CENTER); + canvas.close(); + } +} \ No newline at end of file diff --git a/utils/src/main/java/com/haitongauto/utils/PdfUtils.java b/utils/src/main/java/com/haitongauto/utils/PdfUtils.java new file mode 100644 index 0000000..513768e --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/PdfUtils.java @@ -0,0 +1,119 @@ +package com.haitongauto.utils; + +//import com.itextpdf.text.*; +//import com.itextpdf.text.pdf.*; +//import org.apache.commons.io.FileUtils; +//import org.apache.commons.io.IOUtils; +//import org.apache.commons.lang3.StringUtils; +//import org.apache.tomcat.util.http.fileupload.FileUtils; +//import org.apache.tomcat.util.http.fileupload.IOUtils; +//import org.junit.Test; +//import pojo.user; +//import java.io.*; +//import java.util.*; +public class PdfUtils { +// /** +// * @param map 需要填充的字段 +// * @param sourceFile 原文件路径 +// * @param targetFile 目标文件路径 +// * @param imgURLMap 填充图片路径 +// * @throws IOException +// */ +// public static void genPdf(Map map, String sourceFile, String targetFile) throws IOException { +// File templateFile = new File(sourceFile); +// fillParam(map, FileUtils.readFileToByteArray(templateFile), targetFile); +// } +// +// /** +// *使用map中的参数填充pdf,map中的key和pdf表单中的field对应 +// * @param fieldValueMap +// * @param file +// * @param contractFileName +// * @param imgURLMap //这边暂时吧图片给注释了,如需填充图片直接加参数即可 +// */ +// public static void fillParam(Map fieldValueMap,byte[] file, String contractFileName) { +// //输出流 +// FileOutputStream fos = null; +// try { +// fos = new FileOutputStream(contractFileName); +// //获取PdfReader对象,获取模板位置 +// PdfReader reader = null; +// /* 将要生成的目标PDF文件名称 */ +// PdfStamper stamper = null; +// BaseFont base = null; +// //取出模板中的所有字段 +// AcroFields acroFields = null; +// // 获取存在resources目录下的pdf模板位置 URL +// //URL file = PdfUtils.class.getClassLoader().getResource("CONTRACT.pdf"); +// try { +// reader = new PdfReader(file); +// stamper = new PdfStamper(reader, fos); +// stamper.setFormFlattening(true); +// //简体中文字体 +// base = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED); +// acroFields = stamper.getAcroFields(); +// +// //如果图片放在resources目录下需要这么写 +// // String imgUrl = new ClassPathResource("static/IMG_5809.JPG").getURL().getPath(); +// //循环添加公章图片 +// //for(String key : imgURLMap.keySet()) { +// // String value = imgURLMap.get(key).toString(); +// // //获取图片域名 +// // AcroFields.FieldPosition position = acroFields.getFieldPositions(key).get(0); +// // //通过域名获取所在页和坐标,左下角为起点 +// // int pageNo = position.page; +// // Rectangle signRect = position.position; +// // float x = signRect.getLeft(); +// // float y = signRect.getBottom(); +// // //读图片 +// // Image image = Image.getInstance(value); +// // //获取操作页面 +// // PdfContentByte under = stamper.getOverContent(pageNo); +// // //根据域的大小缩放图片 +// // image.scaleToFit(signRect.getWidth(),signRect.getHeight()); +// // //添加图片 +// // image.setAbsolutePosition(x,y); +// // under.addImage(image); +// // System.out.println("--"+key+"---"+value); +// //} +// for (String key : acroFields.getFields().keySet()) { +// acroFields.setFieldProperty(key, "textfont", base, null); +// //字体大小 +// acroFields.setFieldProperty(key, "textsize", new Float(12), null); +// } +// if (fieldValueMap != null) { +// for (String fieldName : fieldValueMap.keySet()) { +// +// if (StringUtils.isNotBlank(fieldValueMap.get(fieldName))) { +// //获取map中key对应的Value是否为On,若是则勾选复选框 +// if (fieldValueMap.get(fieldName).equals("On") || fieldValueMap.get(fieldName) == "On") { +// acroFields.setField(fieldName, fieldValueMap.get(fieldName),"true"); +// }else{ +// acroFields.setField(fieldName, fieldValueMap.get(fieldName)); +// } +// } +// } +// } +// } catch (Exception e) { +// e.printStackTrace(); +// } finally { +// if (stamper != null) { +// try { +// stamper.close(); +// } catch (Exception e) { +// e.printStackTrace(); +// } +// } +// if (reader != null) { +// reader.close(); +// } +// } +// +// } catch (Exception e) { +// System.out.println("填充参数异常"); +// e.printStackTrace(); +// } finally { +// IOUtils.closeQuietly(fos); +// } +// } +} diff --git a/utils/src/main/java/com/haitongauto/utils/PostFiles.java b/utils/src/main/java/com/haitongauto/utils/PostFiles.java new file mode 100644 index 0000000..6cde763 --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/PostFiles.java @@ -0,0 +1,47 @@ +package com.haitongauto.utils; + +public class PostFiles { + +// public static void saveFile( MultipartFile filecontent){ +// OutputStream os = null; +// InputStream inputStream = null; +// String fileName = null; +// try { +// inputStream = filecontent.getInputStream(); +// fileName = fileconteXKfIbmTzZDnt.getOriginalFilename(); +// //fileName = fileconteXKfIbmTzZDnt.getOriginalFilename(); +// } catch (IOException e) { +// e.printStackTrace(); +// } +// try { +// String path = "C:\\test\\"; +// // 2、保存到临时文件 +// // 1K的数据缓冲 +// byte[] bs = new byte[1024]; +// // 读取到的数据长度 +// int len; +// // 输出的文件流保存到本地文件 +// File tempFile = new File(path); +// if (!tempFile.exists()) { +// tempFile.mkdirs(); +// } +// os = new FileOutputStream(tempFile.getPath() + File.separator + fileName); +// // 开始读取 +// while ((len = inputStream.read(bs)) != -1) { +// os.write(bs, 0, len); +// } +// } catch (IOException e) { +// e.printStackTrace(); +// } catch (Exception e) { +// e.printStackTrace(); +// } finally { +// // 完毕,关闭所有链接 +// try { +// os.close(); +// inputStream.close(); +// } catch (IOException e) { +// e.printStackTrace(); +// } +// } +// } +} \ No newline at end of file diff --git a/utils/src/main/java/com/haitongauto/utils/QueueNumberHelper.java b/utils/src/main/java/com/haitongauto/utils/QueueNumberHelper.java new file mode 100644 index 0000000..c4f2540 --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/QueueNumberHelper.java @@ -0,0 +1,51 @@ +package com.haitongauto.utils; + +import java.text.SimpleDateFormat; +import java.util.Date; + +/** + * 排队号帮助类 + */ +public class QueueNumberHelper { + + /** + * 获得新排队号 + * @param lastQueueNumber 前排队号 + * @return 返回排队号 + */ + public static String getNewQueueNumber(String lastQueueNumber) { + String queueNumber = ""; + if (lastQueueNumber == null || lastQueueNumber.length() < 10) { + queueNumber = getTodayStr() + "0001"; + return queueNumber; + } + String lastDateStr = lastQueueNumber.substring(0, 6); + String todayStr = getTodayStr(); + //同一天 + if (lastDateStr.equals(todayStr)) { + try { + long res = Long.parseLong(lastQueueNumber); + res = res + 1; + queueNumber = Long.toString(res); + } catch (Exception ignored) { + } + + } else { + //日期转钟的处理 + queueNumber = getTodayStr() + "0001"; + } + return queueNumber; + } + + + /** + * 获取今天文件夹日期 + * + * @return 返回时间类型 yyyyMMdd + */ + private static String getTodayStr() { + Date currentTime = new Date(); + SimpleDateFormat formatter = new SimpleDateFormat("yyMMdd"); + return formatter.format(currentTime); + } +} diff --git a/utils/src/main/java/com/haitongauto/utils/StringHelper.java b/utils/src/main/java/com/haitongauto/utils/StringHelper.java new file mode 100644 index 0000000..3ed194a --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/StringHelper.java @@ -0,0 +1,21 @@ +package com.haitongauto.utils; + +public class StringHelper { + /** + * htmlStr 转化位纯文本 + * @param htmlStr htmlStr + * @return txt + */ + public static String getTxtByHtml(String htmlStr) { + do { + int a = htmlStr.indexOf("<"); + int b = htmlStr.indexOf(">"); + if (a != -1 && b != -1) { + htmlStr = htmlStr.substring(0, a) + htmlStr.substring(b + 1); + } + } while (htmlStr.indexOf("<") != -1 && htmlStr.indexOf(">") != -1); + + return htmlStr; + } + +} diff --git a/utils/src/main/java/com/haitongauto/utils/WaterMarkEventHandler.java b/utils/src/main/java/com/haitongauto/utils/WaterMarkEventHandler.java new file mode 100644 index 0000000..7b41bbf --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/WaterMarkEventHandler.java @@ -0,0 +1,84 @@ +package com.haitongauto.utils; + + +import com.itextpdf.kernel.colors.WebColors; +import com.itextpdf.kernel.events.Event; +import com.itextpdf.kernel.events.IEventHandler; +import com.itextpdf.kernel.events.PdfDocumentEvent; +import com.itextpdf.kernel.font.PdfFont; +import com.itextpdf.kernel.font.PdfFontFactory; +import com.itextpdf.kernel.geom.Rectangle; +import com.itextpdf.kernel.pdf.PdfDocument; +import com.itextpdf.kernel.pdf.PdfPage; +import com.itextpdf.kernel.pdf.canvas.PdfCanvas; +import com.itextpdf.layout.Canvas; +import com.itextpdf.layout.element.Paragraph; +import com.itextpdf.layout.property.TextAlignment; +import com.itextpdf.layout.property.VerticalAlignment; +import org.springframework.stereotype.Component; + +import java.io.IOException; + +/** + * 水印 + */ +@Component +public class WaterMarkEventHandler implements IEventHandler { + + /** + * 水印内容 + */ + private final String waterMarkContent; + + /** + * 一页中有几列水印 + */ + private final int waterMarkX; + + /** + * 一页中每列有多少水印 + */ + private final int waterMarkY; + + public WaterMarkEventHandler(String waterMarkContent) { + this(waterMarkContent, 5, 5); + } + + public WaterMarkEventHandler(String waterMarkContent, int waterMarkX, int waterMarkY) { + this.waterMarkContent = waterMarkContent; + this.waterMarkX = waterMarkX; + this.waterMarkY = waterMarkY; + } + + @Override + public void handleEvent(Event event) { + + PdfDocumentEvent documentEvent = (PdfDocumentEvent) event; + PdfDocument document = documentEvent.getDocument(); + PdfPage page = documentEvent.getPage(); + Rectangle pageSize = page.getPageSize(); + + PdfFont pdfFont = null; + try { + pdfFont = PdfFontFactory.createFont(); + } catch (IOException e) { + e.printStackTrace(); + } + + PdfCanvas pdfCanvas = new PdfCanvas(page.newContentStreamAfter(), page.getResources(), document); + + Paragraph waterMark = new Paragraph(waterMarkContent).setOpacity(0.5f); + Canvas canvas = new Canvas(pdfCanvas, pageSize) + .setFontColor(WebColors.getRGBColor("lightgray")) + .setFontSize(16) + .setFont(pdfFont); + + for (int i = 0; i < waterMarkX; i++) { + for (int j = 0; j < waterMarkY; j++) { + canvas.showTextAligned(waterMark, (150 + i * 300), (160 + j * 150), document.getNumberOfPages(), + TextAlignment.CENTER, VerticalAlignment.BOTTOM, 120); + } + } + canvas.close(); + } +} \ No newline at end of file diff --git a/utils/src/main/java/com/haitongauto/utils/check/CheckHelper.java b/utils/src/main/java/com/haitongauto/utils/check/CheckHelper.java new file mode 100644 index 0000000..387020c --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/check/CheckHelper.java @@ -0,0 +1,68 @@ +package com.haitongauto.utils.check; + +import com.bestvike.linq.Linq; + +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class CheckHelper { + /** + * 验证vins受否狗17位 + * 返回验证不通过的vins + */ + public static List CheckVinLength(List vinlist) { + if (vinlist == null || vinlist.size() == 0) { + return null; + } + List vins = new ArrayList<>(); + vins = Linq.of(vinlist).where(o -> o.length() < 17).toList(); + return vins; + } + + /** + * 验证vins只能包含数字或英文字母 digit + * 返回验证不通过的vins + */ + public static List CheckVinContainEnOrDi(List vinlist) { + if (vinlist == null || vinlist.size() == 0) { + return null; + } + List vins = new ArrayList<>(); + //包含字母或数字的正则 + String pattern = "^[a-zA-Z0-9]+$"; + //找出有不包含字母或数字的 + vins = Linq.of(vinlist).where(o -> !o.matches(pattern)).toList(); + return vins; + } + + /** + * 验证手机号码 + * + * @param phoneNumber 你要验证的手机号 + * @return 返回 + */ + public static Boolean checkTelPhoneNumber(String phoneNumber) { + Boolean res = false; + if (phoneNumber == null || phoneNumber.isEmpty()) { + return false; + } + // 定义手机号的正则表达式 + String regex = "^(13\\d|14[5-9]|15[0-3,5-9]|16[2,5,6]|17[0-8]|18\\d|19[0-3,5-9])\\d{8}$"; + // 创建 Pattern 对象 + Pattern pattern = Pattern.compile(regex); + // 创建 Matcher 对象 + Matcher matcher = pattern.matcher(phoneNumber); + // 判断手机号是否符合正则表达式 + if(matcher.matches()) { + res = true; + System.out.println("手机号验证通过"); + } else { + res = false; + System.out.println("手机号验证不通过"); + } + return res; + } + +} diff --git a/utils/src/main/java/com/haitongauto/utils/excel/ExcelCustomCellWriteHeightConfig.java b/utils/src/main/java/com/haitongauto/utils/excel/ExcelCustomCellWriteHeightConfig.java new file mode 100644 index 0000000..d1dc533 --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/excel/ExcelCustomCellWriteHeightConfig.java @@ -0,0 +1,61 @@ +package com.haitongauto.utils.excel; + +import com.alibaba.excel.write.style.row.AbstractRowHeightStyleStrategy; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.CellType; +import org.apache.poi.ss.usermodel.Row; + +import java.util.Iterator; + +public class ExcelCustomCellWriteHeightConfig extends AbstractRowHeightStyleStrategy { + /** + * 默认高度 + */ + private static final Integer DEFAULT_HEIGHT = 300; + + /** + * + * @param row row + * @param relativeRowIndex relativeRowIndex + */ + @Override + protected void setHeadColumnHeight(Row row, int relativeRowIndex) { + } + + /** + * + * @param row row + * @param relativeRowIndex relativeRowIndex + */ + @Override + protected void setContentColumnHeight(Row row, int relativeRowIndex) { + Iterator cellIterator = row.cellIterator(); + if (!cellIterator.hasNext()) { + return; + } + // 默认为 1行高度 + int maxHeight = 1; + while (cellIterator.hasNext()) { + Cell cell = cellIterator.next(); + if (cell.getCellTypeEnum() == CellType.STRING) { + String value = cell.getStringCellValue(); + int len = value.length(); + int num = 0; + if (len > 50) { + num = len % 50 > 0 ? len / 50 : len / 2 - 1; + } + if (num > 0) { + for (int i = 0; i < num; i++) { + value = value.substring(0, (i + 1) * 50 + i) + "\n" + value.substring((i + 1) * 50 + i, len + i); + } + } + if (value.contains("\n")) { + int length = value.split("\n").length; + maxHeight = Math.max(maxHeight, length) + 1; + } + } + } + row.setHeight((short) ((maxHeight) * DEFAULT_HEIGHT)); + } + +} \ No newline at end of file diff --git a/utils/src/main/java/com/haitongauto/utils/excel/ExcelCustomCellWriteWidthConfig.java b/utils/src/main/java/com/haitongauto/utils/excel/ExcelCustomCellWriteWidthConfig.java new file mode 100644 index 0000000..094de57 --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/excel/ExcelCustomCellWriteWidthConfig.java @@ -0,0 +1,87 @@ +package com.haitongauto.utils.excel; +import com.alibaba.excel.enums.CellDataTypeEnum; +import com.alibaba.excel.metadata.Head; +import com.alibaba.excel.metadata.data.CellData; +import com.alibaba.excel.metadata.data.WriteCellData; +import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; +import com.alibaba.excel.write.style.column.AbstractColumnWidthStyleStrategy; +//import org.apache.commons.collections.CollectionUtils; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.Sheet; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +public class ExcelCustomCellWriteWidthConfig extends AbstractColumnWidthStyleStrategy { + + private final Map> CACHE = new HashMap<>(); + + /** + * + * @param writeSheetHolder writeSheetHolder + * @param cellDataList cellDataList + * @param cell cell + * @param head head + * @param integer integer + * @param isHead isHead + */ + @Override + protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List> cellDataList, Cell cell, Head head, Integer integer, Boolean isHead) { + //boolean needSetWidth = isHead || !CollectionUtils.isEmpty(cellDataList); + boolean needSetWidth = isHead ||cellDataList!=null||cellDataList.size()>0; + if (needSetWidth) { + Map maxColumnWidthMap = CACHE.computeIfAbsent(writeSheetHolder.getSheetNo(), k -> new HashMap<>()); + + Integer columnWidth = this.dataLength(cellDataList, cell, isHead); + // 单元格文本长度大于60换行 + if (columnWidth >= 0) { + if (columnWidth > 60) { + columnWidth = 60; + } + Integer maxColumnWidth = maxColumnWidthMap.get(cell.getColumnIndex()); + if (maxColumnWidth == null || columnWidth > maxColumnWidth) { + maxColumnWidthMap.put(cell.getColumnIndex(), columnWidth); + Sheet sheet = writeSheetHolder.getSheet(); + sheet.setColumnWidth(cell.getColumnIndex(), columnWidth * 256); + } + } + } + } + + /** + * 计算长度 + * + * @param cellDataList cellDataList + * @param cell cell + * @param isHead isHead + * @return return + */ + private Integer dataLength(List> cellDataList, Cell cell, Boolean isHead) { + if (isHead) { + return cell.getStringCellValue().getBytes().length; + } else { + CellData cellData = cellDataList.get(0); + CellDataTypeEnum type = cellData.getType(); + if (type == null) { + return -1; + } else { + switch (type) { + case STRING: + // 换行符(数据需要提前解析好) + int index = cellData.getStringValue().indexOf("\n"); + return index != -1 ? + cellData.getStringValue().substring(0, index).getBytes().length + 1 : cellData.getStringValue().getBytes().length + 1; + case BOOLEAN: + return cellData.getBooleanValue().toString().getBytes().length; + case NUMBER: + return cellData.getNumberValue().toString().getBytes().length; + default: + return -1; + } + } + } + } + +} \ No newline at end of file diff --git a/utils/src/main/java/com/haitongauto/utils/excel/ExcelGenerateHelper.java b/utils/src/main/java/com/haitongauto/utils/excel/ExcelGenerateHelper.java new file mode 100644 index 0000000..64f6612 --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/excel/ExcelGenerateHelper.java @@ -0,0 +1,244 @@ +package com.haitongauto.utils.excel; + +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.ExcelWriter; +import com.alibaba.excel.write.metadata.WriteSheet; +import com.haitongauto.utils.FormatDateTime; + +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.List; +import java.util.UUID; + +public class ExcelGenerateHelper { + /** + * 导出 Excel 文件, 有表头 + * + * @param dateList 想要导出的数据列表 + * @param clazz 待导出数据的类型 + * @param filePath 导出后的excel文件的存储路径 + * @param 类型 + */ + public static void outPutExcel(List dateList, Class clazz, String filePath) { + + // 默认导出地址 obj.getClass().getName() 使用反射获取类的名称 + //String fileName = "C:\\Users\\lenovo\\Desktop\\图片工具" + "\\" + clazz.getSimpleName() + ".xlsx"; + String fileName = ""; + if (filePath != null && !filePath.isEmpty()) { + fileName = filePath + clazz.getSimpleName() + ".xlsx"; + } else { + return; + } + + + System.out.println("Excel文件: " + clazz.getSimpleName() + ".xlsx 开始生成"); + + // 创建一个输出流,将文件输出 + FileOutputStream outputStream = null; + + try { + outputStream = new FileOutputStream(fileName); + // EasyExcel.write(outputStream) 为了使用流将数据导出 + ExcelWriter writer = EasyExcel.write(outputStream).build(); + // writerSheet 中 sheetNo 表示导出的是 Excel 中第几页数据,sheetName 表示导出的该页数据名称 + // head 表示 Excel 数据需要映射的类 + WriteSheet sheet = EasyExcel.writerSheet(0, "Excel表第0页的名称") + .registerWriteHandler(new ExcelCustomCellWriteWidthConfig()) /*自适应列宽*/ + .registerWriteHandler(new ExcelCustomCellWriteHeightConfig()) /*自适应行高(根据自己情况选择使用,我这里没用到)*/ + .head(clazz)//根据实体类设置表头 + .build(); + + // 开始写入数据 + writer.write(dateList, sheet); + // 刷新数据 + writer.finish(); + outputStream.flush(); + System.out.println("Excel文件生成成功 ---> 生成位置: " + fileName); + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + if (outputStream != null) { + // 关闭流 + outputStream.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + /** + * @param dateList 数据 + * @param clazz 类型 + * @param filePath 文件路径 + * @param 类型 + * @return 返回文件名(全路径) + */ + public static String outPutExcelReturnFileName(List dateList, Class clazz, String filePath) { + + // 默认导出地址 obj.getClass().getName() 使用反射获取类的名称 + //String fileName = "C:\\Users\\lenovo\\Desktop\\图片工具" + "\\" + clazz.getSimpleName() + ".xlsx"; + String fileName = ""; + if (filePath != null && !filePath.isEmpty()) { + fileName = filePath + clazz.getSimpleName() + FormatDateTime.getStringDate() + ".xlsx"; + } else { + return fileName; + } + + + System.out.println("Excel文件: " + clazz.getSimpleName() + ".xlsx 开始生成"); + + // 创建一个输出流,将文件输出 + FileOutputStream outputStream = null; + + try { + outputStream = new FileOutputStream(fileName); + // EasyExcel.write(outputStream) 为了使用流将数据导出 + ExcelWriter writer = EasyExcel.write(outputStream).build(); + // writerSheet 中 sheetNo 表示导出的是 Excel 中第几页数据,sheetName 表示导出的该页数据名称 + // head 表示 Excel 数据需要映射的类 + WriteSheet sheet = EasyExcel.writerSheet(0, "Excel表第0页的名称") + .registerWriteHandler(new ExcelCustomCellWriteWidthConfig()) /*自适应列宽*/ + .registerWriteHandler(new ExcelCustomCellWriteHeightConfig()) /*自适应行高(根据自己情况选择使用,我这里没用到)*/ + .head(clazz)//根据实体类设置表头 + .build(); + + // 开始写入数据 + writer.write(dateList, sheet); + // 刷新数据 + writer.finish(); + outputStream.flush(); + System.out.println("Excel文件生成成功 ---> 生成位置: " + fileName); + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + if (outputStream != null) { + // 关闭流 + outputStream.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + + return fileName; + + } + + + /** + * 导出 Excel 文件, 不带表头的 + * + * @param dateList 想要导出的数据列表 + * @param clazz 待导出数据的类型 + * @param filePath 导出后的excel文件的存储路径 + * @param 类型 + */ + public static void outPutExcelUnHear(List dateList, Class clazz, String filePath) { + + // 默认导出地址 obj.getClass().getName() 使用反射获取类的名称 + //String fileName = "C:\\Users\\lenovo\\Desktop\\图片工具" + "\\" + clazz.getSimpleName() + ".xlsx"; + String fileName = ""; + if (filePath != null && !filePath.isEmpty()) { + fileName = filePath + clazz.getSimpleName() + ".xlsx"; + } else { + return; + } + + System.out.println("Excel文件: " + clazz.getSimpleName() + ".xlsx 开始生成"); + + // 创建一个输出流,将文件输出 + FileOutputStream outputStream = null; + + try { + outputStream = new FileOutputStream(fileName); + // EasyExcel.write(outputStream) 为了使用流将数据导出 + ExcelWriter writer = EasyExcel.write(outputStream).build(); + // writerSheet 中 sheetNo 表示导出的是 Excel 中第几页数据,sheetName 表示导出的该页数据名称 + // head 表示 Excel 数据需要映射的类 + WriteSheet sheet = EasyExcel.writerSheet(0, "Excel表第0页的名称") + .registerWriteHandler(new ExcelCustomCellWriteWidthConfig()) /*自适应列宽*/ + .registerWriteHandler(new ExcelCustomCellWriteHeightConfig()) /*自适应行高(根据自己情况选择使用,我这里没用到)*/ + //.head(clazz) + .build(); + + // 开始写入数据 + writer.write(dateList, sheet); + // 刷新数据 + writer.finish(); + outputStream.flush(); + System.out.println("Excel文件生成成功 ---> 生成位置: " + fileName); + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + if (outputStream != null) { + // 关闭流 + outputStream.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + /** + * @param dateList 数据 + * @param clazz 类型 + * @param filePath 文件路径 + * @param 类型 + * @return 文件名(全路径) + */ + public static String outPutExcelUnHearReturnFileName(List dateList, Class clazz, String filePath) { + + // 默认导出地址 obj.getClass().getName() 使用反射获取类的名称 + String fileName = ""; + if (filePath != null && !filePath.isEmpty()) { + fileName = filePath + clazz.getSimpleName() + FormatDateTime.getStringDate() + ".xlsx"; + } else { + return fileName; + } + + System.out.println("Excel文件: " + clazz.getSimpleName() + ".xlsx 开始生成"); + + // 创建一个输出流,将文件输出 + FileOutputStream outputStream = null; + + try { + outputStream = new FileOutputStream(fileName); + // EasyExcel.write(outputStream) 为了使用流将数据导出 + ExcelWriter writer = EasyExcel.write(outputStream).build(); + // writerSheet 中 sheetNo 表示导出的是 Excel 中第几页数据,sheetName 表示导出的该页数据名称 + // head 表示 Excel 数据需要映射的类 + WriteSheet sheet = EasyExcel.writerSheet(0, "Excel表第0页的名称") + .registerWriteHandler(new ExcelCustomCellWriteWidthConfig()) /*自适应列宽*/ + .registerWriteHandler(new ExcelCustomCellWriteHeightConfig()) /*自适应行高(根据自己情况选择使用,我这里没用到)*/ + //.head(clazz) + .build(); + + // 开始写入数据 + writer.write(dateList, sheet); + // 刷新数据 + writer.finish(); + outputStream.flush(); + System.out.println("Excel文件生成成功 ---> 生成位置: " + fileName); + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + if (outputStream != null) { + // 关闭流 + outputStream.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + + return fileName; + } + + +} diff --git a/utils/src/main/java/com/haitongauto/utils/minio/MinioProp.java b/utils/src/main/java/com/haitongauto/utils/minio/MinioProp.java new file mode 100644 index 0000000..ed7691d --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/minio/MinioProp.java @@ -0,0 +1,26 @@ +package com.haitongauto.utils.minio; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +@Data +public class MinioProp { + /** + * 连接url + */ + private String endpoint; + /** + * 用户名 + */ + private String accesskey; + /** + * 密码 + */ + private String secretKey; + /** + * 桶名称 + */ + private String bucket; + +} diff --git a/utils/src/main/java/com/haitongauto/utils/minio/MinioUtils.java b/utils/src/main/java/com/haitongauto/utils/minio/MinioUtils.java new file mode 100644 index 0000000..cdbf522 --- /dev/null +++ b/utils/src/main/java/com/haitongauto/utils/minio/MinioUtils.java @@ -0,0 +1,113 @@ +package com.haitongauto.utils.minio; + +import com.alibaba.fastjson.JSON; +import io.minio.MinioClient; +import io.minio.errors.*; +import org.springframework.stereotype.Component; +import org.springframework.web.multipart.MultipartFile; +import org.xmlpull.v1.XmlPullParserException; +import org.yaml.snakeyaml.Yaml; + +import java.io.DataInputStream; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.util.Map; + +@Component +public class MinioUtils { + + public MinioUtils() { + } + + private static MinioClient client; + + private static MinioProp minioProp; + + /** + * 创建bucket + * + * @param bucketName bucket名称 + */ + + public static void createBucket(String bucketName) throws InvalidBucketNameException, InsufficientDataException, XmlPullParserException, ErrorResponseException, NoSuchAlgorithmException, IOException, NoResponseException, InvalidKeyException, InvalidResponseException, InternalException, RegionConflictException { + if (!client.bucketExists(bucketName)) { + client.makeBucket(bucketName); + } + } + + /** + * 上传文件 + * + * @param file 文件 + * @return 返回结果 + */ + public static String uploadFile(MultipartFile file) throws InvalidPortException, InvalidEndpointException { + + // 判断上传文件是否为空 + if (null == file || 0 == file.getSize()) { + try { + throw new Exception("上传文件不能为空"); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + String fileUrl = ""; + //minio服务配置 + if (minioProp == null||minioProp.getEndpoint()==null||minioProp.getEndpoint().equals("")) { + minioProp = ymlReader(); + } + //minio客户端访问对象 + if (client == null) { + client = new MinioClient(minioProp.getEndpoint()); + } + + try { + // 判断存储桶是否存在,如果不存在创建桶 + createBucket(minioProp.getBucket()); + // 文件名 + String originalFilename = file.getOriginalFilename(); + // 新的文件名 = 存储桶名称_时间戳+【10000-99999】随机数字.后缀名 + //Random random = new Random(); + //String fileName = minioProp.getBucket() + "_" + System.currentTimeMillis() + (random.nextInt(99999 - 10000) + 10000 + 1) + originalFilename.substring(originalFilename.lastIndexOf(".")); + String fileName = "img_" + file.getOriginalFilename(); + // 开始上传 + client.putObject(minioProp.getBucket(), fileName, file.getInputStream(), file.getContentType()); + fileUrl = minioProp.getEndpoint() + "/" + minioProp.getBucket() + "/" + fileName; + return fileUrl; + } catch (Exception ex) { + fileUrl=""; + throw new RuntimeException(ex); + } + } + + + /** + * @return 返回配置 + */ + public static MinioProp ymlReader() { + MinioProp minioProp = new MinioProp(); + try { + Yaml yaml = new Yaml(); + final File initialFile = new File("utils/src/main/resources/utils.yml"); + final InputStream in = new DataInputStream(Files.newInputStream(initialFile.toPath())); + Map map = yaml.load(in); + Object minio = map.get("minio"); + if (minio != null && !minio.equals("")) { + minioProp = JSON.parseObject(JSON.toJSONString(minio), MinioProp.class); + } + System.out.println(map); + } catch (Exception e) { + e.printStackTrace(); + } + return minioProp; + } + + +} + + + diff --git a/utils/src/main/resources/utils.yml b/utils/src/main/resources/utils.yml new file mode 100644 index 0000000..a9bb130 --- /dev/null +++ b/utils/src/main/resources/utils.yml @@ -0,0 +1,15 @@ +# minio 文件存储配置信息 https://rtops4.haitongauto.com/minio/ +minio: + endpoint: http://192.168.61.130:20001 + accesskey: hfyth + secretKey: hfyth2022 + bucket: rtos-saas-dev + +# minio 文件存储配置信息(本地) +#minio: +# endpoint: http://192.168.0.16:9000 +# accesskey: admin +# secretKey: admin@123 +# bucket: rtos-saas-dev + + diff --git a/utils/src/test/java/QueueNumTest.java b/utils/src/test/java/QueueNumTest.java new file mode 100644 index 0000000..cc621ea --- /dev/null +++ b/utils/src/test/java/QueueNumTest.java @@ -0,0 +1,10 @@ +import com.haitongauto.utils.QueueNumberHelper; +import org.junit.Test; + +public class QueueNumTest { + @Test + public void geQueueNum() { + String queueNum = QueueNumberHelper.getNewQueueNumber("2308211003"); + + } +} diff --git a/utils/target/classes/com/haitongauto/utils/CorsConfig.class b/utils/target/classes/com/haitongauto/utils/CorsConfig.class new file mode 100644 index 0000000..909fec9 Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/CorsConfig.class differ diff --git a/utils/target/classes/com/haitongauto/utils/DateTimeHelper.class b/utils/target/classes/com/haitongauto/utils/DateTimeHelper.class new file mode 100644 index 0000000..3500e96 Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/DateTimeHelper.class differ diff --git a/utils/target/classes/com/haitongauto/utils/FileDownloadUtil.class b/utils/target/classes/com/haitongauto/utils/FileDownloadUtil.class new file mode 100644 index 0000000..3fc28e7 Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/FileDownloadUtil.class differ diff --git a/utils/target/classes/com/haitongauto/utils/FormatDateTime.class b/utils/target/classes/com/haitongauto/utils/FormatDateTime.class new file mode 100644 index 0000000..4261048 Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/FormatDateTime.class differ diff --git a/utils/target/classes/com/haitongauto/utils/GetDateTime.class b/utils/target/classes/com/haitongauto/utils/GetDateTime.class new file mode 100644 index 0000000..f35016c Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/GetDateTime.class differ diff --git a/utils/target/classes/com/haitongauto/utils/HtmlToPdfUtils.class b/utils/target/classes/com/haitongauto/utils/HtmlToPdfUtils.class new file mode 100644 index 0000000..ae9582c Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/HtmlToPdfUtils.class differ diff --git a/utils/target/classes/com/haitongauto/utils/HttpRequest.class b/utils/target/classes/com/haitongauto/utils/HttpRequest.class new file mode 100644 index 0000000..e14e545 Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/HttpRequest.class differ diff --git a/utils/target/classes/com/haitongauto/utils/HttpTemplate.class b/utils/target/classes/com/haitongauto/utils/HttpTemplate.class new file mode 100644 index 0000000..4c2855e Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/HttpTemplate.class differ diff --git a/utils/target/classes/com/haitongauto/utils/IpHelper.class b/utils/target/classes/com/haitongauto/utils/IpHelper.class new file mode 100644 index 0000000..1b2b140 Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/IpHelper.class differ diff --git a/utils/target/classes/com/haitongauto/utils/PageEventHandler.class b/utils/target/classes/com/haitongauto/utils/PageEventHandler.class new file mode 100644 index 0000000..abc6c8b Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/PageEventHandler.class differ diff --git a/utils/target/classes/com/haitongauto/utils/PdfUtils.class b/utils/target/classes/com/haitongauto/utils/PdfUtils.class new file mode 100644 index 0000000..73b79be Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/PdfUtils.class differ diff --git a/utils/target/classes/com/haitongauto/utils/PostFiles.class b/utils/target/classes/com/haitongauto/utils/PostFiles.class new file mode 100644 index 0000000..b93cae8 Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/PostFiles.class differ diff --git a/utils/target/classes/com/haitongauto/utils/QueueNumberHelper.class b/utils/target/classes/com/haitongauto/utils/QueueNumberHelper.class new file mode 100644 index 0000000..2ee7390 Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/QueueNumberHelper.class differ diff --git a/utils/target/classes/com/haitongauto/utils/StringHelper.class b/utils/target/classes/com/haitongauto/utils/StringHelper.class new file mode 100644 index 0000000..9d9ef4d Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/StringHelper.class differ diff --git a/utils/target/classes/com/haitongauto/utils/WaterMarkEventHandler.class b/utils/target/classes/com/haitongauto/utils/WaterMarkEventHandler.class new file mode 100644 index 0000000..5360100 Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/WaterMarkEventHandler.class differ diff --git a/utils/target/classes/com/haitongauto/utils/check/CheckHelper.class b/utils/target/classes/com/haitongauto/utils/check/CheckHelper.class new file mode 100644 index 0000000..4293be4 Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/check/CheckHelper.class differ diff --git a/utils/target/classes/com/haitongauto/utils/excel/ExcelCustomCellWriteHeightConfig.class b/utils/target/classes/com/haitongauto/utils/excel/ExcelCustomCellWriteHeightConfig.class new file mode 100644 index 0000000..1fa369b Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/excel/ExcelCustomCellWriteHeightConfig.class differ diff --git a/utils/target/classes/com/haitongauto/utils/excel/ExcelCustomCellWriteWidthConfig$1.class b/utils/target/classes/com/haitongauto/utils/excel/ExcelCustomCellWriteWidthConfig$1.class new file mode 100644 index 0000000..b2f6155 Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/excel/ExcelCustomCellWriteWidthConfig$1.class differ diff --git a/utils/target/classes/com/haitongauto/utils/excel/ExcelCustomCellWriteWidthConfig.class b/utils/target/classes/com/haitongauto/utils/excel/ExcelCustomCellWriteWidthConfig.class new file mode 100644 index 0000000..18297ca Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/excel/ExcelCustomCellWriteWidthConfig.class differ diff --git a/utils/target/classes/com/haitongauto/utils/excel/ExcelGenerateHelper.class b/utils/target/classes/com/haitongauto/utils/excel/ExcelGenerateHelper.class new file mode 100644 index 0000000..a560c7c Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/excel/ExcelGenerateHelper.class differ diff --git a/utils/target/classes/com/haitongauto/utils/minio/MinioProp.class b/utils/target/classes/com/haitongauto/utils/minio/MinioProp.class new file mode 100644 index 0000000..080b0d4 Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/minio/MinioProp.class differ diff --git a/utils/target/classes/com/haitongauto/utils/minio/MinioUtils.class b/utils/target/classes/com/haitongauto/utils/minio/MinioUtils.class new file mode 100644 index 0000000..5058906 Binary files /dev/null and b/utils/target/classes/com/haitongauto/utils/minio/MinioUtils.class differ diff --git a/utils/target/classes/utils.yml b/utils/target/classes/utils.yml new file mode 100644 index 0000000..a9bb130 --- /dev/null +++ b/utils/target/classes/utils.yml @@ -0,0 +1,15 @@ +# minio 文件存储配置信息 https://rtops4.haitongauto.com/minio/ +minio: + endpoint: http://192.168.61.130:20001 + accesskey: hfyth + secretKey: hfyth2022 + bucket: rtos-saas-dev + +# minio 文件存储配置信息(本地) +#minio: +# endpoint: http://192.168.0.16:9000 +# accesskey: admin +# secretKey: admin@123 +# bucket: rtos-saas-dev + + diff --git a/utils/target/maven-archiver/pom.properties b/utils/target/maven-archiver/pom.properties new file mode 100644 index 0000000..f6ce101 --- /dev/null +++ b/utils/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Mon Oct 30 20:58:34 CST 2023 +version=1.0-SNAPSHOT +groupId=org.example +artifactId=utils diff --git a/utils/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/utils/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..115ba41 --- /dev/null +++ b/utils/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,22 @@ +com\haitongauto\utils\WaterMarkEventHandler.class +com\haitongauto\utils\StringHelper.class +com\haitongauto\utils\GetDateTime.class +com\haitongauto\utils\minio\MinioUtils.class +com\haitongauto\utils\FileDownloadUtil.class +com\haitongauto\utils\PostFiles.class +com\haitongauto\utils\FormatDateTime.class +com\haitongauto\utils\PdfUtils.class +com\haitongauto\utils\IpHelper.class +com\haitongauto\utils\minio\MinioProp.class +com\haitongauto\utils\check\CheckHelper.class +com\haitongauto\utils\DateTimeHelper.class +com\haitongauto\utils\excel\ExcelCustomCellWriteWidthConfig.class +com\haitongauto\utils\HttpTemplate.class +com\haitongauto\utils\excel\ExcelGenerateHelper.class +com\haitongauto\utils\PageEventHandler.class +com\haitongauto\utils\QueueNumberHelper.class +com\haitongauto\utils\HttpRequest.class +com\haitongauto\utils\CorsConfig.class +com\haitongauto\utils\excel\ExcelCustomCellWriteHeightConfig.class +com\haitongauto\utils\excel\ExcelCustomCellWriteWidthConfig$1.class +com\haitongauto\utils\HtmlToPdfUtils.class diff --git a/utils/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/utils/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..7352b09 --- /dev/null +++ b/utils/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,21 @@ +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\excel\ExcelCustomCellWriteHeightConfig.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\WaterMarkEventHandler.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\PostFiles.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\PdfUtils.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\StringHelper.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\excel\ExcelGenerateHelper.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\HttpTemplate.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\minio\MinioProp.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\DateTimeHelper.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\minio\MinioUtils.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\IpHelper.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\FormatDateTime.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\excel\ExcelCustomCellWriteWidthConfig.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\GetDateTime.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\QueueNumberHelper.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\CorsConfig.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\check\CheckHelper.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\HttpRequest.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\FileDownloadUtil.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\HtmlToPdfUtils.java +F:\Codes\rtos\v3\utils\src\main\java\com\haitongauto\utils\PageEventHandler.java diff --git a/utils/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/utils/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst new file mode 100644 index 0000000..0d2d4de --- /dev/null +++ b/utils/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst @@ -0,0 +1 @@ +QueueNumTest.class diff --git a/utils/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/utils/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst new file mode 100644 index 0000000..0fcb9d3 --- /dev/null +++ b/utils/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst @@ -0,0 +1 @@ +F:\Codes\rtos\v3\utils\src\test\java\QueueNumTest.java diff --git a/utils/target/test-classes/QueueNumTest.class b/utils/target/test-classes/QueueNumTest.class new file mode 100644 index 0000000..7098945 Binary files /dev/null and b/utils/target/test-classes/QueueNumTest.class differ diff --git a/utils/target/utils-1.0-SNAPSHOT.jar b/utils/target/utils-1.0-SNAPSHOT.jar new file mode 100644 index 0000000..2a559e2 Binary files /dev/null and b/utils/target/utils-1.0-SNAPSHOT.jar differ diff --git a/wx-applet/Dockerfile b/wx-applet/Dockerfile new file mode 100644 index 0000000..810ebc7 --- /dev/null +++ b/wx-applet/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:8 +LABEL name="rtosac" version="1.0.0" author="wsnet" maintainer="wsnet@wsmis.com" +COPY target/com.haitongauto.rtosac.jar rtosac-image.jar +CMD ["java","-jar","rtosac-image.jar"] \ No newline at end of file diff --git a/wx-applet/pom.xml b/wx-applet/pom.xml new file mode 100644 index 0000000..09c3131 --- /dev/null +++ b/wx-applet/pom.xml @@ -0,0 +1,220 @@ + + + + rtos-wh + org.example + 1.0-SNAPSHOT + + 4.0.0 + + wx-applet + + + 1.8 + 1.8 + + + + + org.springframework.boot + spring-boot-starter-web + + + + + + + + org.springframework.boot + spring-boot-starter-logging + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + + org.projectlombok + lombok + 1.18.20 + + + com.alibaba + fastjson + 1.2.7 + + + org.springframework.boot + spring-boot-maven-plugin + 2.6.6 + + + + + com.github.pagehelper + pagehelper-spring-boot-starter + 1.4.2 + + + com.github.pagehelper + pagehelper + 5.3.0 + + + com.bestvike + linq + 3.1.0 + + + org.example + models + 1.0-SNAPSHOT + + + org.example + utils + 1.0-SNAPSHOT + + + org.example + mapper + 1.0-SNAPSHOT + + + mybatis-spring-boot-starter + org.mybatis.spring.boot + + + + + org.example + interfaces + 1.0-SNAPSHOT + + + + + com.nuzar + rtops-openapi-client + 1.0-SNAPSHOT + + + + com.nuzar + nuzar-security + 2.6.14.10-SNAPSHOT + + + + org.springframework.security + spring-security-web + 5.6.9 + + + + org.springframework.security + spring-security-config + 5.6.9 + + + + + org.springframework.boot + spring-boot-starter-oauth2-resource-server + 2.6.14 + + + + org.springframework.boot + spring-boot-starter-oauth2-client + 2.6.14 + + + + org.springframework.security + spring-security-oauth2-resource-server + 5.6.9 + + + org.springframework.security + spring-security-oauth2-client + 5.6.9 + + + + org.springframework.security + spring-security-core + 5.6.9 + + + org.springframework.cloud + spring-cloud-starter-bootstrap + + + + org.springframework.cloud + spring-cloud-starter-loadbalancer + + + + + + io.springfox + springfox-swagger2 + 2.9.2 + + + io.springfox + springfox-swagger-ui + 2.9.2 + + + + + + com.haitongauto.rtosac + + + src/main/resources + + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.2.2.RELEASE + + + + repackage + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.1 + + + + + org.springframework.boot + spring-boot-configuration-processor + + + + + + + + \ No newline at end of file diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/ApplicationApplet.java b/wx-applet/src/main/java/com/haitongauto/rtosac/ApplicationApplet.java new file mode 100644 index 0000000..17d9d67 --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/ApplicationApplet.java @@ -0,0 +1,23 @@ +package com.haitongauto.rtosac; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.openfeign.EnableFeignClients; + +import java.util.UUID; + + +@MapperScan("com.haitongauto.mapper") +@EnableFeignClients(basePackages = {"com.haitongauto.interfaces"}) +@SpringBootApplication(scanBasePackages = {"com.haitongauto.interfaces","com.haitongauto.rtosac"}) +public class ApplicationApplet { + /** + * 启动微信小程序服务入口 + * @param args args + */ + public static void main(String[] args){ + SpringApplication.run(ApplicationApplet.class,args); + } +} \ No newline at end of file diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/SwaggerConfig.java b/wx-applet/src/main/java/com/haitongauto/rtosac/SwaggerConfig.java new file mode 100644 index 0000000..184dd52 --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/SwaggerConfig.java @@ -0,0 +1,21 @@ +package com.haitongauto.rtosac; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + +//@Configuration +//@EnableSwagger2 +public class SwaggerConfig { +// @Bean +// public Docket api() { +// return new Docket(DocumentationType.SWAGGER_2) +// .enable(true)//是否启动swagger +// .select() +// .apis(RequestHandlerSelectors.basePackage("com.haitongauto.rtosac.api")) +// //.paths(PathSelectors.any()) +// .build(); +// } +} \ No newline at end of file diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/api/AppointmentController.java b/wx-applet/src/main/java/com/haitongauto/rtosac/api/AppointmentController.java new file mode 100644 index 0000000..6f6cae2 --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/api/AppointmentController.java @@ -0,0 +1,1415 @@ +package com.haitongauto.rtosac.api; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.bestvike.linq.Linq; +import com.haitongauto.interfaces.*; +import com.haitongauto.interfaces.impl.EnterPortTypeInterfaceImpl; +import com.haitongauto.models.dto.*; +import com.haitongauto.models.dto.app.ChuanItem; +import com.haitongauto.models.dto.app.CommercialVehicleDetail; +import com.haitongauto.models.dto.app.Vin; +import com.haitongauto.models.ido.BasicDataIdo; +import com.haitongauto.models.ido.CustomerRes; +import com.haitongauto.models.ido.ShipVoyIdo; +import com.haitongauto.models.pojo.*; +import com.haitongauto.rtosac.service.AppointmentService; +import com.haitongauto.rtosac.service.PunchClockService; +import com.haitongauto.rtosac.service.Response; +import com.haitongauto.utils.DateTimeHelper; +import com.haitongauto.utils.FormatDateTime; +import com.haitongauto.utils.check.CheckHelper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.time.LocalDateTime; +import java.util.*; +import java.util.stream.Collectors; + +@RestController +@RequestMapping("/appointment") +public class AppointmentController { + @Autowired + AppointmentService appointmentService; + @Autowired + PunchClockService punchClockService; + @Autowired + Response response; + @Autowired + DicInterface dicInterface; + @Autowired + PortAreaInterface portAreaInterface; + @Resource + CusOrderApi cusOrderApi; + @Autowired + EnterPortTypeInterfaceImpl enterPortTypeInterface; + + @RequestMapping("/getCheckVinISValid") + public String getCheckVinISValid(@RequestBody List chekvinlist) { + String msg = ""; + CustomerRes aaa = cusOrderApi.getCheckVinISValid(chekvinlist); + msg = aaa.getMsg(); + //创建返回数据 + return msg; + } + + /** + * (发起预约时)获取用户注册的板车信息 + * + * @param users_id 司机id + * @return 返回用户注册的板车信息 + */ + @RequestMapping("/getPalletTruckInfo") + public String getPalletTruckInfo(@RequestParam("users_id") String users_id) { + String msg = ""; + if (users_id == null || users_id.isEmpty()) { + msg = "用户id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + + Truck truck = appointmentService.getPalletTruck(users_id); + //判断请求是否成功 + Boolean bl = truck != null; + Map data = new HashMap<>(); + data.put("PalletTruckInfo", truck); + //创建返回数据 + return response.getResponseData(bl, data); + } + + /** + * 港区列表 + * + * @return 返回港区列表 + */ + @RequestMapping("/getPortAreaList") + public String getPortAreaList() { + List portAreaList = portAreaInterface.getPortArea(); + //判断请求是否成功 + Boolean bl = portAreaList != null; + //创建返回数据 + Map data = new HashMap<>(); + data.put("PortAreaList", portAreaList); + //封装返回数据 + return response.getResponseData(bl, data); + } + + /** + * 进港类型列表 + * + * @return 返回进港类型 + */ + @RequestMapping("/getEnterPortTypesList") + public String getEnterPortTypesList() { + List enterPortTypesList = enterPortTypeInterface.getEnterPortTypeList(); + //判断请求是否成功 + Boolean bl = true; + //创建返回数据 + Map data = new HashMap<>(); + data.put("EnterPortTypesList", enterPortTypesList); + //封装返回数据 + //返回 + return response.getResponseData(bl, data); + } + + /** + * 运输方式 TRANSPORT_TYPE + * + * @return 返回运输方式 + */ + @RequestMapping("/getTransportTypeList") + public String getTransportTypeList() { + //通过外部接口获取 + List myList = dicInterface.getDicList("TRANSPORT_TYPE"); + List list = new ArrayList<>(); + for (DicDto dicDto : myList) { + if (dicDto.getText().contains("板车")) { + list.add(dicDto); + } + } + for (DicDto dicDto : myList) { + if (!dicDto.getText().contains("板车")) { + list.add(dicDto); + } + } + + //判断请求是否成功 + Boolean bl = myList.size() > 0; + //创建返回数据 + Map data = new HashMap<>(); + data.put("TransportTypesList", list); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * 货物类型 CARGO_TYPE + * + * @return 返回货物类型 + */ + @RequestMapping("/getGoodsTypesList") + public String getGoodsTypesList() { + //通过外部接口获取 + List myList = dicInterface.getDicList("APP_CARGO_TYPE"); + //判断请求是否成功 + Boolean bl = myList != null && myList.size() > 0; + //创建返回数据 + Map data = new HashMap<>(); + data.put("GoodsTypesList", myList); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * 提交预约信息 + * + * @return 返回提交结果 + */ + @RequestMapping("/postAppointment") + public String postAppointment(AppointmentPostDto appointmentPostDto) { + String msg = ""; + String appointmentStr = appointmentPostDto.getAppointment(); + String appointmentDetailListStr = appointmentPostDto.getAppointmentDetailList(); + if (appointmentStr == null || appointmentStr.isEmpty()) { + msg = "预约信息不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + Appointment appointment = null; + List appointmentDetailList = null; + try { + appointment = JSONObject.parseObject(appointmentStr, Appointment.class); + Integer appointment_type = appointment.getAppointment_type(); + //如果是特保区预约,港区则绑定到临港 + if (appointment_type != null && appointment_type.equals(2)) { + List portAreaList = portAreaInterface.getPortArea(); + if (portAreaList != null && portAreaList.size() > 0) { + PortArea portArea = Linq.of(portAreaList).firstOrDefault(o -> o.getPort_area_name().contains("临港")); + if (portArea != null) { + appointment.setPort_area_id(portArea.getId()); + } + } + } + + } catch (Exception ex) { + msg = "反序列化预约信息为实体失败。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + + //进港类型 + String enter_type = appointment.getEnter_type(); + String goods_type = appointment.getGoods_type(); + if (true) { + if (appointmentDetailListStr == null || appointmentDetailListStr.isEmpty()) { + if (appointment.getEnter_type() != null) { + //if ("WE".equals(appointment.getEnter_type()) || "NE".equals(appointment.getEnter_type())) { + if ("NE".equals(enter_type)) { + //货物类型商品车 + if ("C".equals(goods_type)) { + msg = "内贸出口,预约明细信息不能为空。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + } + } + // 预约类型(1-普通码头预约,2-特保区预约) 新增字段 + Integer appointment_type = appointment.getAppointment_type(); + if (appointment_type != null && appointment_type.equals(2)) { + msg = "特保区预约,预约明细信息不能为空。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + } + if (appointmentDetailListStr != null && !appointmentDetailListStr.isEmpty()) { + try { + appointmentDetailList = JSONArray.parseArray(appointmentDetailListStr, AppointmentDetail.class); + } catch (Exception ex) { + msg = "反序列化预约明细信息为实体失败。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + + List vinlist = new ArrayList<>(); + if (appointmentDetailList != null && appointmentDetailList.size() > 0) { + //验证提交的Vins是否有重复的 + List myallVins = Linq.of(appointmentDetailList).select(AppointmentDetail::getVin).toList(); + List duplicatedElements = myallVins.stream() + .collect(Collectors.groupingBy(e -> e)) + .entrySet() + .stream() + .filter(entry -> entry.getValue().size() > 1) + .map(Map.Entry::getKey) + .collect(Collectors.toList()); + if (duplicatedElements.size() > 0) { + String myVins = String.join(",", duplicatedElements); + msg = "vin:" + myVins + "重复提交。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + + //内贸出口的品牌不能为空(商品车) + if ("NE".equals(enter_type) && "C".equals(goods_type)) { + List vinss = Linq.of(appointmentDetailList).where(p -> p.getBrand_id() != null && !p.getBrand_id().isEmpty()).select(AppointmentDetail::getBrand_id).distinct().toList(); + if (vinss != null && vinss.size() > 0) { + String myVins = String.join(",", vinss); + msg = "内贸出口,vin:" + myVins + "预约明细的品牌不能为空。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + + } + + //验证vin是否被预约过 + vinlist = Linq.of(appointmentDetailList).select(AppointmentDetail::getVin).toList(); + if (vinlist != null && vinlist.size() > 0) { + //验证vin是否是17位 + List vinlistckl = CheckHelper.CheckVinLength(vinlist); + if (vinlistckl != null && vinlistckl.size() > 0) { + String myVins = String.join(",", vinlistckl); + msg = "vin:" + myVins + "长度小于17位。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + //验证vin只能是字母或数据组成 + List vinlistckcon = CheckHelper.CheckVinContainEnOrDi(vinlist); + if (vinlistckcon != null && vinlistckcon.size() > 0) { + String myVins = String.join(",", vinlistckcon); + msg = "vin只能是字母或数据组成," + "vin:" + myVins + "不符合。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + + + //根据 Vin列表查询匹配的商品车明细,并筛选出不属于已取消和异常的预约的 + List mylist = appointmentService.getAppointmentDetailListByVinList(vinlist); + //取Vin的列表 + //List myVinlist = (mylist != null) ? mylist.stream().map(AppointmentDetail::getVin).collect(Collectors.toList()) : null; + List myVinlist = null; + if (mylist != null && mylist.size() > 0) { + myVinlist = Linq.of(mylist).select(AppointmentDetail::getVin).toList(); + } + + if (myVinlist != null && myVinlist.size() > 0) { + String myVins = String.join(",", myVinlist); + msg = "vin:" + myVins + "已经被预约过。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + + } + //特保区,验证vin是否激活 + if (appointment.getAppointment_type() != null && appointment.getAppointment_type().equals(2)) { + List chekvinlist = Linq.of(appointmentDetailList).select(AppointmentDetail::getVin).toList(); + String onpasschekvinlist = cusOrderApi.getCheckVinISValid(chekvinlist).getMsg(); + if (onpasschekvinlist != null && !onpasschekvinlist.isEmpty()) { + msg = "vin:" + onpasschekvinlist + "未被激活。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + + //特保区智云验证,待哪吒接口 + } + + } + } + } + + + Appointment myAppointment = null; + Date dateNow = new Date(); + if (appointment.getUsers_id() != null && !appointment.getUsers_id().isEmpty()) { + myAppointment = appointmentService.getActiveAppointment(appointment.getUsers_id()); + Date apprDate = null; + if (myAppointment != null) { + if (myAppointment.getApproach_date() != null && !myAppointment.getApproach_date().isEmpty()) { + apprDate = FormatDateTime.getDateAddOne(FormatDateTime.strToDate(myAppointment.getApproach_date())); + } + } + if (myAppointment != null && apprDate != null && apprDate.compareTo(dateNow) >= 0) { + msg = "用户存在未完成预约,且预约期限有效的预约,不能再预约。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + } +// if (appointment.getTruck_number() == null || appointment.getTruck_number().isEmpty()) { +// msg = "车牌号不能为空"; +// //判断请求是否成功 +// Boolean bl = false; +// //创建返回数据 +// Map data = new HashMap<>(); +// //返回 +// return response.getResponseData(bl, data, msg); +// } + + if (appointment.getUsers_id() == null || appointment.getUsers_id().isEmpty()) { + msg = "用户id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + if (appointment.getAppointment_type() != null && appointment.getAppointment_type().equals(1)) { + if (appointment.getPort_area_id() == null || appointment.getPort_area_id().isEmpty()) { + msg = "预约港区不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + } + if (appointment.getApproach_date() == null || appointment.getApproach_date().isEmpty()) { + msg = "预约进场日期不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + //查询改用户关于该车辆是否存在已预约但未完成预约信息 + Integer x = null; + //提交保存 + x = appointmentService.postAppointment(appointment); + if (appointmentDetailList != null && appointmentDetailList.size() > 0) { + int x1 = appointmentService.postAppointmentDetailList(appointment, appointmentDetailList); + } + //判断请求是否成功 + Boolean bl = x > 0; + //创建返回数据 + Map data = new HashMap<>(); + data.put("result", x); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + + /** + * 修改预约信息 + * + * @return 返回提交结果 + */ + @RequestMapping("/updateAppointment") + public String updateAppointment(AppointmentPostDto appointmentPostDto) { + String msg = ""; + String appointmentStr = appointmentPostDto.getAppointment(); + String appointmentDetailListStr = appointmentPostDto.getAppointmentDetailList(); + if (appointmentStr == null || appointmentStr.isEmpty()) { + msg = "预约信息不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + Appointment appointment = null; + List appointmentDetailList = null; + try { + appointment = JSONObject.parseObject(appointmentStr, Appointment.class); + Integer appointment_type = appointment.getAppointment_type(); + String port_area_id = appointment.getPort_area_id(); + //如果是特保区预约,港区则绑定到临港 + if (appointment_type != null && appointment_type.equals(2)) { + List portAreaList = portAreaInterface.getPortArea(); + if (portAreaList != null && portAreaList.size() > 0) { + PortArea portArea = Linq.of(portAreaList).firstOrDefault(o -> o.getPort_area_name().contains("临港")); + if (portArea != null) { + appointment.setPort_area_id(portArea.getId()); + } + } + } + + } catch (Exception ex) { + msg = "将预约反序列化为实体失败。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + if (appointment == null) { + msg = "预约信息实体转化失败"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + String enter_type = appointment.getEnter_type(); + String goods_type = appointment.getGoods_type(); + if (appointmentDetailListStr == null || appointmentDetailListStr.isEmpty()) { + if (enter_type != null) { + if ("NE".equals(enter_type)) { + if ("C".equals(goods_type)) { + msg = "内贸出口,预约明细信息不能为空。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + } + } + // 预约类型(1-普通码头预约,2-特保区预约) 新增字段 + Integer appointment_type = appointment.getAppointment_type(); + if (appointment_type != null && appointment_type.equals(2)) { + msg = "特保区预约,预约明细信息不能为空。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + + } + if (appointmentDetailListStr != null && !appointmentDetailListStr.isEmpty()) { + try { + appointmentDetailList = JSONArray.parseArray(appointmentDetailListStr, AppointmentDetail.class); + List vinlist = new ArrayList<>(); + if (appointmentDetailList != null && appointmentDetailList.size() > 0) { + //验证提交的Vins是否有重复的 + List myallVins = Linq.of(appointmentDetailList).select(AppointmentDetail::getVin).toList(); + List duplicatedElements = myallVins.stream() + .collect(Collectors.groupingBy(e -> e)) + .entrySet() + .stream() + .filter(entry -> entry.getValue().size() > 1) + .map(Map.Entry::getKey) + .collect(Collectors.toList()); + if (duplicatedElements.size() > 0) { + String myVins = String.join(",", duplicatedElements); + msg = "vin:" + myVins + "重复提交。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + + //内贸出口的品牌不能为空 + if ("NE".equals(enter_type) && "C".equals(goods_type)) { + List vinss = Linq.of(appointmentDetailList).where(p -> p.getBrand_id() != null && !p.getBrand_id().isEmpty()).select(AppointmentDetail::getBrand_id).distinct().toList(); + if (vinss != null && vinss.size() > 0) { + String myVins = String.join(",", vinss); + msg = "内贸出口,vin:" + myVins + "预约明细的品牌不能为空。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + + } + + vinlist = Linq.of(appointmentDetailList).select(AppointmentDetail::getVin).toList(); + //验证vin是否是17位 + List vinlistckl = CheckHelper.CheckVinLength(vinlist); + if (vinlistckl != null && vinlistckl.size() > 0) { + String myVins = String.join(",", vinlistckl); + msg = "vin:" + myVins + "长度小于17位。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + //验证vin只能是字母或数据组成 + List vinlistckcon = CheckHelper.CheckVinContainEnOrDi(vinlist); + if (vinlistckcon != null && vinlistckcon.size() > 0) { + String myVins = String.join(",", vinlistckcon); + msg = "vin只能是字母或数据组成," + "vin:" + myVins + "不符合。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + + //验证vin是否被预约过 (修改不需要这个判断) +// +// if (vinlist != null && vinlist.size() > 0) { +// List myVinlist = appointmentService.getAppointmentDetailListByGoodVinList(vinlist); +// if (myVinlist != null && myVinlist.size() > 0) { +// String myVins = String.join(",", myVinlist); +// msg = "vin:" + myVins + "已经被预约过。"; +// //判断请求是否成功 +// Boolean bl = false; +// //创建返回数据 +// Map data = new HashMap<>(); +// //返回 +// return response.getResponseData(bl, data, msg); +// } +// +// } + + //特保区,验证vin是否激活 + if (appointment.getAppointment_type() != null && appointment.getAppointment_type().equals(2)) { + //特保区,验证vin是否激活 + List chekvinlist = Linq.of(appointmentDetailList).select(AppointmentDetail::getVin).toList(); + String onpasschekvinlist = cusOrderApi.getCheckVinISValid(chekvinlist).getMsg(); + if (onpasschekvinlist != null && !onpasschekvinlist.isEmpty()) { + msg = "vin:" + onpasschekvinlist + "未被激活。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + //特保区智云验证,待哪吒接口 + } + + } + + } catch (Exception ex) { + msg = "将预约明细反序列化为实体失败。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + + } + } + Appointment myAppointment = null; +// Date dateNow = new Date(); +// if (appointment.getUsers_id() != null && !appointment.getUsers_id().isEmpty()) { +// myAppointment = appointmentService.getActiveAppointment(appointment.getUsers_id()); +// Date apprDate = null; +// if (myAppointment != null) { +// apprDate = FormatDateTime.getDateAddOne(FormatDateTime.strToDate(myAppointment.getApproach_date())); +// } +// if (myAppointment != null && apprDate.compareTo(dateNow) >= 0) { +// msg = "用户存在未完成预约,且预约期限有效的预约,不能再预约。"; +// //判断请求是否成功 +// Boolean bl = false; +// //创建返回数据 +// Map data = new HashMap<>(); +// //返回 +// return response.getResponseData(bl, data, msg); +// } +// } +// if (appointment.getTruck_number() == null || appointment.getTruck_number().isEmpty()) { +// msg = "车牌号不能为空"; +// //判断请求是否成功 +// Boolean bl = false; +// //创建返回数据 +// Map data = new HashMap<>(); +// //返回 +// return response.getResponseData(bl, data, msg); +// } + if (appointment.getUsers_id() == null || appointment.getUsers_id().isEmpty()) { + msg = "用户id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + if (appointment.getAppointment_type() != null && appointment.getAppointment_type().equals(1)) { + if (appointment.getPort_area_id() == null || appointment.getPort_area_id().isEmpty()) { + msg = "预约港区不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + } + if (appointment.getApproach_date() == null || appointment.getApproach_date().isEmpty()) { + msg = "预约进场日期不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + //查询改用户关于该车辆是否存在已预约但未完成预约信息 + Integer x = null; + //提交保存 + x = appointmentService.updateAppointment(appointment); + if (appointmentDetailList != null && appointmentDetailList.size() > 0) { + int x1 = appointmentService.updateAppointmentDetailList(appointment, appointmentDetailList); + } else { + //修改的时候,没有填vin,则要清除原来的vin + int x2 = appointmentService.deleteAppointmentDetailByAppointmentId(appointment.getId()); + } + + //判断请求是否成功 + Boolean bl = x > 0; + //创建返回数据 + Map data = new HashMap<>(); + data.put("result", x); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + + /** + * 查询指定用户是否存在已预约但未完成预约信息 + * + * @param users_id 司机id + * @return 返回查询结果 + */ + @RequestMapping("getActiveAppointment") + public String getActiveAppointment(@RequestParam("users_id") String users_id) { + String msg = ""; + if (users_id == null || users_id.isEmpty()) { + msg = "用户Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + + //获取该用户的全部预约数据 + Appointment appointment = appointmentService.getActiveAppointment(users_id); + Date dateNow = new Date(); + if (appointment != null && !appointment.getUsers_id().isEmpty()) { + Date apprDate = null; + if (appointment.getApproach_date() != null && !appointment.getApproach_date().isEmpty()) { + apprDate = FormatDateTime.getDateAddOne(FormatDateTime.strToDate(appointment.getApproach_date())); + } + assert apprDate != null; + if (!(apprDate.compareTo(dateNow) >= 0)) { + //将改预约设置未异常 + appointment.setAppointment_state(9); + int res = appointmentService.updateAppointment(appointment); + msg = "用户存在未打卡完成预约,但已经超时,可以再预约。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + } + + String portAreaName = ""; + + if (appointment == null) { + msg = "不存在用户Id" + users_id + "未完成的预约"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + + String appointment_id = appointment.getId(); + //获取该预约的打卡信息 + PunchClock mypunchClock = (appointment_id != null) ? punchClockService.getPunchClockForAppintementId(appointment_id) : null; + //读取打卡的时间和地址信息 + String punch_start_time = ""; + String punch_over_time = ""; + String punch_start_address = ""; + String punch_over_address = ""; + LocalDateTime start_time = null; + LocalDateTime over_time = null; + if (mypunchClock != null) { + if (mypunchClock.getStart_time() != null && !mypunchClock.getStart_time().isEmpty()) { + start_time = DateTimeHelper.DateTimeStrToLocalDateTime(mypunchClock.getStart_time()); + } + if (mypunchClock.getOver_time() != null && !mypunchClock.getOver_time().isEmpty()) { + over_time = DateTimeHelper.DateTimeStrToLocalDateTime(mypunchClock.getOver_time()); + } + if (start_time != null) { + punch_start_time = start_time.getHour() + ":" + start_time.getMinute() + ":" + start_time.getSecond(); + } + if (over_time != null) { + punch_over_time = over_time.getHour() + ":" + over_time.getMinute() + ":" + over_time.getSecond(); + } + punch_start_address = mypunchClock.getPunch_address(); + punch_over_address = mypunchClock.getOver_address(); + } + + //判断请求是否成功 + Boolean bl = true; + //创建返回数据 + Map data = new HashMap<>(); + data.put("punch_start_time", punch_start_time); + data.put("punch_over_time", punch_over_time); + data.put("punch_start_address", punch_start_address); + data.put("punch_over_address", punch_over_address); + data.put("portArea", portAreaName); + data.put("appointment", appointment); + //封装数据 + //返回 + return response.getResponseData(bl, data); + } + + /** + * 取消预约 + * + * @param appointment_id 预约id + * @return 返回执行取消预约的结果 + */ + @RequestMapping("/cancelAppointment") + public String cancelAppointment(@RequestParam("appointment_id") String appointment_id) { + String msg = ""; + if (appointment_id == null || appointment_id.isEmpty()) { + msg = "预约Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + Appointment myAppointment = appointmentService.getAppointmentById(appointment_id); + if (myAppointment != null) { + Integer appointment_state = myAppointment.getAppointment_state(); + if (appointment_state != null && appointment_state >= 6) { + msg = "预约已经完成,不能取消预约。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + + String plate_scan_time = myAppointment.getPlate_scan_time(); + if (plate_scan_time != null && !plate_scan_time.isEmpty()) { + msg = "预约已经进入收车扫描,不能取消预约。"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + } + + Integer x = appointmentService.cancelAppointment(appointment_id); + //判断请求是否成功 + Boolean bl = x != null && x > 0; + //创建返回数据 + Map data = new HashMap<>(); + data.put("result", x); + //封装数据 + //返回 + return response.getResponseData(bl, data); + } + + /** + * 无计划收车取消预约(app端无计划收车使用) + * + * @param appointment_id 预约id + * @return 返回执行取消预约的结果 + */ + @RequestMapping("/cancelAppointmentUnPlan") + public String cancelAppointmentUnPlan(@RequestParam("appointment_id") String appointment_id) { + String msg = ""; + if (appointment_id == null || appointment_id.isEmpty()) { + msg = "预约Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + + Integer x = appointmentService.cancelAppointment(appointment_id); + //判断请求是否成功 + Boolean bl = x != null && x > 0; + //创建返回数据 + Map data = new HashMap<>(); + data.put("result", x); + //封装数据 + //返回 + return response.getResponseData(bl, data); + } + + /** + * 获取特保区进场车架号 + * + * @return 返回特保区进场车架号 + */ + public String getSpecialProtectionZoneVIN() { + //通过接口从客服平台数据库获取,模拟数据如下 + List vinData = new ArrayList<>(); + for (int i = 0; i < 20; i++) { + String x = (i < 10) ? "0" + i : "" + i; + String vin = "abcdefghijklmno" + x; + vinData.add(vin); + } + //判断请求是否成功 + Boolean bl = true; + //创建返回数据 + Map data = new HashMap<>(); + data.put("vinData", vinData); + //封装数据 + //返回 + return response.getResponseData(bl, data); + } + + /** + * 根据预约id查询预约信息和预约明细列表 + * + * @param appointment_id 预约id + * @return 返回预约信息和预约明细 + */ + @RequestMapping("/getAppointmentAndAppointmentDetailList") + public String getAppointmentAndAppointmentDetailList(@RequestParam("appointment_id") String appointment_id) { + String msg = ""; + if (appointment_id == null || appointment_id.isEmpty()) { + msg = "预约不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + Appointment appointment = appointmentService.getAppointmentById(appointment_id); + List appointmentDetailList = appointmentService.getAppointmentDetailListByAppointmentId(appointment_id); + + //判断请求是否成功 + Boolean bl = appointment != null; + //创建返回数据 + Map data = new HashMap<>(); + data.put("appointment", appointment); + data.put("appointmentDetailList", appointmentDetailList); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * 根据预约id查询预约信息 + * + * @param appointment_id 预约id + * @return 返回预约信息 + */ + @RequestMapping("/getAppointmentDtoByAppointmentId") + public String getAppointmentDtoByAppointmentId(@RequestParam("appointment_id") String appointment_id) { + String msg = ""; + if (appointment_id == null || appointment_id.isEmpty()) { + msg = "预约不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + AppointmentDto appointmentDto = appointmentService.getAppointmentDtoById(appointment_id); + List appointmentDetailList = appointmentService.getAppointmentDetailListByAppointmentId(appointment_id); + List chuanItemList = null; + try { + chuanItemList = covertChuanItemListDto1(appointmentDetailList); + } catch (Exception ex) { + } + + //判断请求是否成功 + Boolean bl = appointmentDto != null; + //创建返回数据 + Map data = new HashMap<>(); + data.put("appointmentDto", appointmentDto); + data.put("appointmentDetailList", appointmentDetailList); + data.put("chuanItemList", chuanItemList); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * (出口/出口)进场计划船名/航次(计划审核通过) + * + * @param code 进港类型 + * @return 返回船名/航次(计划审核通过) + */ + @RequestMapping("/getPlanShipVoyList") + public String getPlanShipVoyList(@RequestParam("code") String code, @RequestParam("current") Integer current, @RequestParam("size") Integer size) { + List dataList = new ArrayList<>(); + switch (code) { + case "NE": { + //内贸出口 + CustomerRes> data = cusOrderApi.getNEOutPlanShipList(""); + List mydataList = data.getData(); + if (mydataList != null && mydataList.size() > 0) { + for (BasicDataIdo basicDataIdo : mydataList) { + ShipVoyIdo shipVoyIdo = new ShipVoyIdo(); + shipVoyIdo.setShipId(basicDataIdo.getId()); + shipVoyIdo.setShipName(basicDataIdo.getText() + "/" + basicDataIdo.getExtra1()); + shipVoyIdo.setShipEnName(basicDataIdo.getExtra1()); + dataList.add(shipVoyIdo); + } + } + break; + } + case "WE"://外贸出口 + { + CustomerRes> data = cusOrderApi.getWEOutPlanShipList("", current, size); + dataList = data.getData(); + for (ShipVoyIdo ship : dataList) { + ship.setShipName(ship.getShipName() + "/" + ship.getShipEnName()); + } + break; + } + case "NI"://内贸进口 + case "WI"://外贸进口 + { + //CustomerRes> data = cusOrderApi.getInPlanShipVoyList(""); + //dataList = data.getData(); + } + break; + case "BC": { + break; + } + + } + //判断请求是否成功 + Boolean bl = true; + //创建返回数据 + Map data = new HashMap<>(); + data.put("ShipList", dataList); + //封装数据 + //返回 + return response.getResponseData(bl, data); + } + + /** + * (出口/出口)进场计划品牌 (计划审核通过) + * + * @param code 进港类型 + * @return 返回品牌 (计划审核通过) + */ + @RequestMapping("/getPlanBrandsList") + public String getPlanBrandsList(@RequestParam("code") String code, @RequestParam("shipName") String shipName, @RequestParam("voyage") String voyage) { + String msg = ""; + if (shipName == null || shipName.isEmpty()) { + msg = "船名不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + //取船名的中文名 + shipName = shipName.split("/")[0]; + List dataList = null; + switch (code) { + case "NE"://内贸出口 + { + CustomerRes> data = cusOrderApi.getNEOutPlanBrandsList(""); + dataList = data.getData(); + if (dataList != null && dataList.size() > 0) { + for (BasicDataIdo item : dataList) { + String extra1 = item.getExtra1(); + if (extra1 != null && !extra1.isEmpty()) { + item.setText(item.getText() + "/" + extra1); + } else { + item.setText(item.getText() + "/"); + } + } + } + + break; + } + case "WE"://外贸出口 + { + CustomerRes> data = cusOrderApi.getWEOutPlanBrandsList("", shipName, 1, 100); + dataList = data.getData(); + if (dataList != null && dataList.size() > 0) { + for (BasicDataIdo item : dataList) { + String extra1 = item.getExtra1(); + if (extra1 != null && !extra1.isEmpty()) { + item.setText(item.getText() + "/" + extra1); + } + } + } + break; + } + case "NI"://内贸进口 + case "WI"://外贸进口 + { + CustomerRes> data = cusOrderApi.getInPlanBrandsList("", shipName, voyage); + dataList = data.getData(); + } + break; + case "BC": { + break; + } + } + //判断请求是否成功 + Boolean bl = dataList != null; + //创建返回数据 + Map data = new HashMap<>(); + data.put("BrandsList", dataList); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * (出口/出口)进场计划港口(计划审核通过) + * + * @return 返回 港口(计划审核通过) + */ + @RequestMapping("/getPlanPortsList") + public String getPlanPortsList(@RequestParam("code") String code, @RequestParam("shipId") String shipId) { + String msg = ""; + if (shipId == null || shipId.isEmpty()) { + msg = "船舶id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + List dataList = null; + switch (code) { + case "NE"://内贸出口 + { + CustomerRes> data = cusOrderApi.getNEOutPlanPortsList(""); + dataList = data.getData(); + if (dataList != null && dataList.size() > 0) { + for (BasicDataIdo item : dataList) { + String extra1 = item.getExtra1(); + if (extra1 != null && !extra1.isEmpty()) { + item.setText(item.getText() + "/" + extra1); + } else { + item.setText(item.getText() + "/"); + } + } + } + break; + } + case "WE"://外贸出口 出口进场计划的港口 + { + CustomerRes> data = cusOrderApi.getWEOutPlanPortsList("", shipId, 1, 100); + dataList = data.getData(); + if (dataList != null && dataList.size() > 0) { + for (BasicDataIdo port : dataList) { + String extra1 = port.getExtra1(); + if (extra1 != null && !extra1.isEmpty()) { + port.setText(port.getText() + "/" + extra1); + } else { + port.setText(port.getText() + "/"); + } + } + } + break; + } + case "NI"://内贸进口 + case "WI"://外贸进口 + { + CustomerRes> data = cusOrderApi.getInPlanPortsList(""); + dataList = data.getData(); + } + break; + case "BC": { + break; + } + + } + //判断请求是否成功 + Boolean bl = true; + //创建返回数据 + Map data = new HashMap<>(); + data.put("PortsList", dataList); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * (出口/出口)进场计划港口(计划审核通过) + * + * @return 返回 港口(计划审核通过) + */ + @RequestMapping("/getGroupPlanPortsList") + public String getGroupPlanPortsList(@RequestParam("code") String code, @RequestParam("shipIds") String shipIds) { + String msg = ""; + if (shipIds == null || shipIds.isEmpty()) { + msg = "船舶id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + List shipIdlist = Linq.of(shipIds.split(",")).toList(); + Dictionary> myGroupdata = new Hashtable<>(); + List dataList = null; + switch (code) { + case "NE"://内贸出口 + { + CustomerRes> data = cusOrderApi.getNEOutPlanPortsList(""); + dataList = data.getData(); + if (dataList != null && dataList.size() > 0) { + for (BasicDataIdo item : dataList) { + String extra1 = item.getExtra1(); + if (extra1 != null && !extra1.isEmpty()) { + item.setText(item.getText() + "/" + extra1); + } + } + } + + for (String shipId : shipIdlist) { + myGroupdata.put(shipId, dataList); + } + break; + } + case "WE"://外贸出口 + { + for (String shipId : shipIdlist) { + CustomerRes> data = cusOrderApi.getWEOutPlanPortsList("", shipId, 1, 100); + dataList = data.getData(); + myGroupdata.put(shipId, dataList); + } + break; + } + } + //判断请求是否成功 + Boolean bl = true; + //创建返回数据 + Map data = new HashMap<>(); + data.put("groupPortsList", myGroupdata); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * App 收车扫描板车号(潘子航调用) + * + * @param appointmentId 预约id + * @return 结果 + */ + @PostMapping("/plateTruckScan") + public String plateTruckScan(@RequestParam("appointmentId") String appointmentId) { + String msg = ""; + if (appointmentId == null || appointmentId.isEmpty()) { + msg = "预约id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + int res = appointmentService.updateAppointmentPlateScanTime(appointmentId); + //判断请求是否成功 + Boolean bl = res > 0; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + return response.getResponseData(bl, data, msg); + } + + @PostMapping("/checkVinsISInShip") + public String checkVinsISInShipAndInPlan(@RequestParam("shipId") String shipId, @RequestParam("vins") String vins) { + String msg = ""; + if (shipId == null || shipId.isEmpty()) { + msg = "船舶id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + if (vins == null || vins.isEmpty()) { + msg = "船舶id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + String oncvins = "";//需要 + if (oncvins == null || oncvins.isEmpty()) { + msg = "vin" + oncvins + "不属于该船,或者不在作业计划内"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //返回 + return response.getResponseData(bl, data, msg); + } + //判断请求是否成功 + Boolean bl = true; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + + } + + public List covertChuanItemListDto(List appointmentDetailList) { + if (appointmentDetailList == null || appointmentDetailList.size() == 0) { + return null; + } + List chuanItemList = new ArrayList<>(); + List shipIds = Linq.of(appointmentDetailList).select(AppointmentDetail::getShip_id).distinct().toList(); + for (String shipId : shipIds) { + ChuanItem chuanItem = new ChuanItem(); + AppointmentDetail appointmentDetailsh = Linq.of(appointmentDetailList).firstOrDefault(p -> p.getShip_id().equals(shipId)); + chuanItem.setIsOpen(true); + chuanItem.setShip_id(shipId); + chuanItem.setShip_name(appointmentDetailsh.getShip_name()); + chuanItem.setPort_name(appointmentDetailsh.getDestination_port()); + chuanItem.setPort_name_id(appointmentDetailsh.getDestination_port_id()); + //获得该船下所有的商品明细 + List commercialVehicleDetailslist = new ArrayList<>(); + List appointmentDetailListForShip = Linq.of(appointmentDetailList).where(p -> p.getShip_id().equals(shipId)).toList(); + List brandIds = Linq.of(appointmentDetailListForShip).select(AppointmentDetail::getBrand_id).distinct().toList(); + for (String brandId : brandIds) { + CommercialVehicleDetail commercialVehicleDetail = new CommercialVehicleDetail(); + AppointmentDetail appointmentDetailBr = Linq.of(appointmentDetailListForShip).firstOrDefault(p -> p.getBrand_id().equals(brandId)); + List appointmentDetailList1 = Linq.of(appointmentDetailListForShip).where(p -> p.getBrand_id().equals(brandId)).toList(); + List vins = Linq.of(appointmentDetailList1).select(AppointmentDetail::getVin).distinct().toList(); + commercialVehicleDetail.setIsOpen(true); + commercialVehicleDetail.setBrand_id(appointmentDetailBr.getBrand_id()); + commercialVehicleDetail.setBrand(appointmentDetailBr.getBrand_name()); + List vinList = new ArrayList<>(); + for (String vin : vins) { + Vin myvin = new Vin(); + myvin.setVin(vin); + vinList.add(myvin); + } + commercialVehicleDetail.setVehicle_frame_num(vinList); + commercialVehicleDetailslist.add(commercialVehicleDetail); + } + chuanItem.setCommercial_vehicle_details(commercialVehicleDetailslist); + chuanItemList.add(chuanItem); + } + return chuanItemList; + } + + public List covertChuanItemListDto1(List appointmentDetailList) { + if (appointmentDetailList == null || appointmentDetailList.size() == 0) { + return null; + } + List chuanItemList = new ArrayList<>(); + List shipIds = Linq.of(appointmentDetailList).select(AppointmentDetail::getShip_id).distinct().toList(); + for (String shipId : shipIds) { + List ports = Linq.of(appointmentDetailList).where(p -> p.getShip_id().equals(shipId)).select(AppointmentDetail::getDestination_port_id).distinct().toList(); + for (String port : ports) { + ChuanItem chuanItem = new ChuanItem(); + AppointmentDetail appointmentDetailsh = Linq.of(appointmentDetailList).firstOrDefault(p -> p.getShip_id().equals(shipId) && p.getDestination_port_id().equals(port)); + chuanItem.setIsOpen(false); + chuanItem.setShip_id(shipId); + chuanItem.setShip_name(appointmentDetailsh.getShip_name()); + chuanItem.setPort_name(appointmentDetailsh.getDestination_port()); + chuanItem.setPort_name_id(appointmentDetailsh.getDestination_port_id()); + //获得该船下所有的商品明细 + List commercialVehicleDetailslist = new ArrayList<>(); + List appointmentDetailListForShipAndPort = Linq.of(appointmentDetailList).where(p -> p.getShip_id().equals(shipId) && p.getDestination_port_id().equals(port)).toList(); + List brandIds = Linq.of(appointmentDetailListForShipAndPort).select(AppointmentDetail::getBrand_id).distinct().toList(); + for (String brandId : brandIds) { + CommercialVehicleDetail commercialVehicleDetail = new CommercialVehicleDetail(); + AppointmentDetail appointmentDetailBr = Linq.of(appointmentDetailListForShipAndPort).firstOrDefault(p -> p.getBrand_id().equals(brandId)); + List appointmentDetailList1 = Linq.of(appointmentDetailListForShipAndPort).where(p -> p.getBrand_id().equals(brandId)).toList(); + List vins = Linq.of(appointmentDetailList1).select(AppointmentDetail::getVin).distinct().toList(); + commercialVehicleDetail.setIsOpen(false); + commercialVehicleDetail.setBrand_id(appointmentDetailBr.getBrand_id()); + commercialVehicleDetail.setBrand(appointmentDetailBr.getBrand_name()); + List vinList = new ArrayList<>(); + for (String vin : vins) { + Vin myvin = new Vin(); + myvin.setVin(vin); + vinList.add(myvin); + } + commercialVehicleDetail.setVehicle_frame_num(vinList); + commercialVehicleDetailslist.add(commercialVehicleDetail); + } + chuanItem.setCommercial_vehicle_details(commercialVehicleDetailslist); + chuanItemList.add(chuanItem); + } + } + return chuanItemList; + } + + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/api/HomeController.java b/wx-applet/src/main/java/com/haitongauto/rtosac/api/HomeController.java new file mode 100644 index 0000000..bd7ae2f --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/api/HomeController.java @@ -0,0 +1,369 @@ +package com.haitongauto.rtosac.api; + +import com.haitongauto.interfaces.OrderApi; +import com.haitongauto.interfaces.UsersApi; +import com.haitongauto.models.ido.CommonRes; +import com.haitongauto.models.ido.PortAreasIdo; +import com.haitongauto.models.ido.login.UserInfoRes; +import com.haitongauto.models.ido.login.UserLoginOrRegisterRequest; +import com.haitongauto.models.ido.login.UserLoginOrRegisterResponse; +import com.haitongauto.models.pojo.Announcement; +import com.haitongauto.models.pojo.Truck; +import com.haitongauto.models.pojo.Users; +import com.haitongauto.rtosac.service.Response; +import com.haitongauto.models.dto.DataForMessage; +import com.haitongauto.models.dto.Pages; +import com.haitongauto.rtosac.service.HomeService; +import com.haitongauto.rtosac.service.UsersService; +import com.haitongauto.utils.IpHelper; +import com.haitongauto.utils.minio.MinioUtils; +import io.minio.errors.InvalidEndpointException; +import io.minio.errors.InvalidPortException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.github.pagehelper.PageInfo; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import java.io.File; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@RestController +@RequestMapping("/home") +public class HomeController { + /** + * 头部信息 + */ + @Autowired + HttpServletRequest servletRequest; + @Autowired + HomeService homeService; + @Autowired + Response response; + @Autowired + UsersService usersService; + @Resource + private UsersApi usersApi; + @Resource + private OrderApi orderApi; + @GetMapping("/test") + @ResponseBody + public CommonRes> get(@RequestParam String q) { + return orderApi.getPortAreasIdoList(q); + } + + /** + * 用户登录:提交用户信息(users信息要保持完整:open_id、session_key、access_token,及用户),登陆RTOS系统:需要RTOS系统排除拦截 + * + * @param users 用户信息 + * @return 返回 + */ + @PostMapping("/onLogin") + public String onLogin(@RequestBody Users users) { + //请求哪吒接口获得用户信息 + CommonRes userInfoResCommonRes = usersApi.getUserInfo(); + UserInfoRes userInfoRes = userInfoResCommonRes.getData(); + String msg = ""; + //检查本地数据库是否有该用户 + Users my_users = null; + if (userInfoRes != null && userInfoRes.getId() != null && !userInfoRes.getId().isEmpty()) { + users.setId(userInfoRes.getId()); + users.setWx_openid(userInfoRes.getOpenId()); + my_users = homeService.getUsersForId(userInfoRes.getId()); + } + if (my_users != null) { + users.setId(my_users.getId()); + //users.setUsers_name(my_users.getUsers_name()); + //users.setId_code(my_users.getId_code()); + //users.setTel_number(my_users.getTel_number()); + if (users.getUsers_name() == null || users.getUsers_name().isEmpty()) { + users.setUsers_name(my_users.getUsers_name()); + } + if (users.getId_code() == null || users.getId_code().isEmpty()) { + users.setId_code(my_users.getId_code()); + } + if (users.getTel_number() == null || users.getTel_number().isEmpty()) { + users.setTel_number(my_users.getTel_number()); + } + } + String users_id = (my_users != null) ? my_users.getId() : null; + //更新到入本地数据库(保存用户的openid和rtos的token) + if (users_id != null && !users_id.isEmpty()) { + Integer x = usersService.update(users); + } else { + String id = usersService.insert(users); + users.setId(id); + } + + Truck myTruck = null; + myTruck = usersService.getTruckByWxOpenID(users.getWx_openid()); + if (myTruck != null && my_users != null) { + users.setId(users.getId()); + users.setUsers_name(my_users.getUsers_name()); + } + + assert userInfoRes != null; + my_users = homeService.getUsersForId(userInfoRes.getId()); + + //1-先获取用户登录IP + String ip = IpHelper.getIpAddr(servletRequest); + //2-登录日志写如数据库 + homeService.loginLogAdd(users.getWx_openid(), ip); + + //判断请求是否成功 + Boolean bl = true; + //创建返回数据 + Map data = new HashMap<>(); + data.put("users", my_users); + data.put("truck", myTruck); + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * 保存前端提交车辆信息 + * + * @param truck 车辆信息 + * @return 返回 + */ + @PostMapping("/truckBanding") + public String truckBanding(@RequestBody Truck truck) { + if (truck == null || truck.getTruck_number().isEmpty()) { + String msg = "用户车辆信息不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + Truck myTruck = null; + String openid = ""; + if (truck.getWx_openid() != null && !truck.getWx_openid().isEmpty()) { + openid = truck.getWx_openid(); + myTruck = usersService.getTruckByWxOpenID(openid); + if (myTruck != null) { + truck.setUsers_id(myTruck.getUsers_id()); + truck.setId(myTruck.getId()); + truck.setWx_openid(openid); + } + } else { + //请求哪吒接口获得用户信息 + CommonRes userInfoResCommonRes = usersApi.getUserInfo(); + UserInfoRes userInfoRes = userInfoResCommonRes.getData(); + openid = userInfoRes.getOpenId(); + truck.setWx_openid(openid); + truck.setUsers_id(userInfoRes.getId()); + } + + String truck_id = ""; + if (myTruck != null) { + truck_id = myTruck.getId(); + } + + //更新到数据库 + if (truck_id != null && !truck_id.isEmpty()) { + Integer x = homeService.updateTruck(truck); + truck_id = truck.getId(); + } else { + truck_id = homeService.insertTruck(truck); + truck.setId(truck_id); + } + + Boolean bl = truck_id != null && !truck_id.isEmpty(); + //创建返回数据 + Map data = new HashMap<>(); + data.put("truck", truck); + + //返回 + return response.getResponseData(bl, data); + } + + /** + * 分页读取每页10条公告数据 + * + * @return 返回分页公告数据 + */ + @RequestMapping("/getAnnouncementsList") + public String getAnnouncementsList(Pages pages, Integer sort, String keyWords) { + //解析分页参数 + Integer pageNum = (pages != null && pages.getPageNum() != null && pages.getPageNum() > 0) ? pages.getPageNum() : 1; + Integer pageSize = (pages != null) && pages.getPageSize() != null && pages.getPageSize() > 0 ? pages.getPageSize() : 10; + //调用Service分页方法,获取分页数据对象PageInfo + PageInfo pagesInfo = homeService.getAnnouncementsList(pageNum, pageSize, sort, keyWords); + //读取分页结果 + int pageCount = 0; //总页数 + long recordTotal = 0; //记录总数 + List myList = null; //当前页的列表数据 + if (pagesInfo != null) { + pageCount = pagesInfo.getPages(); //总页数 + recordTotal = pagesInfo.getTotal(); //记录总数 + myList = pagesInfo.getList(); //当前页的列表数据 + } + //定义返回数据 + Map data = new HashMap<>(); + data.put("pageNum", pageNum); + data.put("pageCount", pageCount); + data.put("recordTotal", recordTotal); + data.put("dataJson", myList); + Boolean bl = myList != null; + return response.getResponseDataJavaJson(bl, data); + } + + /** + * 根据公告id获得公告 + * + * @param announcement_id 公告id + * @return 返回公告信息 + */ + @RequestMapping("/getAnnouncementById") + public String getAnnouncementById(@RequestParam("announcement_id") String announcement_id) { + String msg = ""; + if (announcement_id == null || announcement_id.isEmpty()) { + msg = "公告id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + //调用Service分页方法,获取分页数据对象PageInfo + Announcement announcement = homeService.getAnnouncementById(announcement_id); + Boolean bl = announcement != null; + //定义返回数据 + Map data = new HashMap<>(); + data.put("announcementInfo", announcement); + return response.getResponseDataJavaJson(bl, data); + } + + /** + * 文件上传 + * + * @param myFile 文件 + * @return 返回上传结果 + */ + @RequestMapping("/myPostImgFile") + public String myPostImgFile(MultipartFile myFile) { + //定义图片保存状态 + boolean bl = false; + //获取系统服务路径 + String servicePath = homeService.getServiceBaseUrl(); + //获取图片访问基本路径 + String acccessPath = homeService.getImgAccessUrl() + "/"; + if (myFile != null) { + //获取后缀 + String suffixName = homeService.getImagePath(myFile); + //获取新的文件名 + String newFileName = homeService.getNewFileName(suffixName); + //保存图片的路径 + String imgPath = homeService.getNewImagePath(newFileName); + //保存图片 + File file = new File(imgPath); + bl = homeService.saveImage(myFile, file); + //补全图片访问路径 + acccessPath += newFileName; + } + //创建返回数据 + Map data = new HashMap<>(); + data.put("imagePath", acccessPath); + //封装到dataJson + return response.getResponseData(bl, data); + } + + /** + * 文件上传 + * + * @param myFile 文件 + * @return 返回上传结果 + */ + @RequestMapping("/PostImgFile") + public String PostImgFile(MultipartFile myFile) throws InvalidPortException, InvalidEndpointException { + //图片上传到图片服务器 + String imageUrl = MinioUtils.uploadFile(myFile); + boolean bl = !"".equals(imageUrl); + //创建返回数据 + Map data = new HashMap<>(); + data.put("imagePath", imageUrl); + //封装到dataJson + return response.getResponseData(bl, data); + } + + /** + * 系统访问路径 + * + * @return 返回系统访问路径 + */ + @RequestMapping("/getSystemPath") + public String getSystemPath() { + //获取系统服务路径 + String servicePath = homeService.getServiceBaseUrl(); + Boolean bl = servicePath != null && !"".equals(servicePath); + //创建返回数据 + Map data = new HashMap<>(); + data.put("servicePath", servicePath); + //封装到 + //返回 + return response.getResponseData(bl, data); + } + + /** + * 获取官方小程序的AccessToken + * + * @return 返回官方小程序的AccessToken + */ + @RequestMapping("/getAccessToken") + public String getAccessToken() { + //获取小程序登录参数 + String appid = homeService.getServiceConfigForCode("400"); + String secret = homeService.getServiceConfigForCode("500"); + if (appid == null || secret == null) { + //小程序的应用Id和密钥(此处为测试备用数据,上线后修改为正式小程序的值) + appid = "wxb5fe43c6c0f0a8da"; + secret = "ba67c8be0ab5fb8000c169a3c2ef4b79"; + } + //添加到 myParamMap + Map myParamMap = new HashMap<>(); + myParamMap.put("appid", appid); + myParamMap.put("secret", secret); + //获取小程序官方接口的返回值对象(assess_token等) + String access_token_json = homeService.getExternalInterfaceData(1002, myParamMap); //homeService.getAccessToken(); + //创建返回数据 + Boolean bl = access_token_json != null; + //data + Map data = new HashMap<>(); + data.put("access_token_json", access_token_json); + //封装到 + //返回 + return response.getResponseData(bl, data); + } + + /** + * 发送订阅消息 + * + * @param dataForMessage :小程序订阅消息发送数据 + * @return :错误信息 + */ + @RequestMapping("/sendMessage") + public String sendMessage(DataForMessage dataForMessage) { + + //发送订阅消息 + String error = homeService.sendMessage(dataForMessage); + //创建返回数据 + Boolean bl = error != null && !error.isEmpty(); + Map data = new HashMap<>(); + data.put("error", error); + //封装到 + //返回 + return response.getResponseData(bl, data); + } + + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/api/MessageController.java b/wx-applet/src/main/java/com/haitongauto/rtosac/api/MessageController.java new file mode 100644 index 0000000..1e6b78a --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/api/MessageController.java @@ -0,0 +1,157 @@ +package com.haitongauto.rtosac.api; + +import com.bestvike.linq.Linq; +import com.github.pagehelper.PageInfo; +import com.haitongauto.models.dto.Pages; +import com.haitongauto.models.pojo.Message; +import com.haitongauto.rtosac.service.MessageService; +import com.haitongauto.rtosac.service.Response; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@RestController +@RequestMapping("/message") +public class MessageController { + @Autowired + MessageService messageService; + + @Autowired + Response response; + + /** + * 哪吒打印的时候向小程序发送消息(哪吒请求接口) + * + * @param message 消息实体 + * @return 返回结果 + */ + @PostMapping("/realMessage") + public String realMessage(@RequestBody Message message) { + //判断请求是否成功 + Boolean bl = messageService.receiveMessage(message); + //创建返回数据 + Map data = new HashMap<>(); + data.put("result", bl); + return response.getResponseData(bl, data); + } + + /** + * 微信小程序前端打开界面,获得未消息列表, + * + * @param open_id 板车号 + * @return 返回结果 + */ + @GetMapping("/getUnReadMessageListByOpenId") + public String getUnReadMessageListByOpenId(@RequestParam("open_id") String open_id, @RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize) { + pageNum = (pageNum != null) ? pageNum : 1; + pageSize = (pageSize != null) ? pageSize : 10; + //判断请求是否成功 + PageInfo pagesInfo = messageService.getUnReadMessageListByWxOpenid(open_id, pageNum, pageSize); + //读取分页结果 + Integer pageCount = pagesInfo.getPages(); //总页数 + long recordTotal = pagesInfo.getTotal(); //记录总数 + + List myList = new ArrayList<>(); //当前页的列表数据 + Pages pages = new Pages(); + int noReadSize = 0; + if (pageNum <= pageCount) { + myList = pagesInfo.getList(); //当前页的列表数据 + noReadSize = Linq.of(myList).where(p -> p.getIs_read().equals(0)).count(); + pages.setUnReadSize(noReadSize); + } + + //分页数据添加到pages + pages.setPageNum(pageNum); + pages.setPageSize(pageSize); + pages.setPageCount(pageCount); + pages.setRecordTotal(recordTotal); + + //判断请求是否成功 + Boolean bl = myList != null; + //创建返回数据data + Map data = new HashMap<>(); + data.put("pages", pages); + data.put("messageList", myList); + //添加到返回对象 + //返回 + return response.getResponseDataJavaJson(bl, data); + + } + + /** + * 微信小程序前端打开界面,获得所有消息列表, + * + * @param open_id 板车号 + * @return 返回结果 + */ + @GetMapping("/getMessageListByOpenId") + public String getMessageListByOpenId(@RequestParam("open_id") String open_id, @RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize) { + pageNum = (pageNum != null) ? pageNum : 1; + pageSize = (pageSize != null) ? pageSize : 10; + //判断请求是否成功 + PageInfo pagesInfo = messageService.getMessageListByWxOpenid(open_id, pageNum, pageSize); + //读取分页结果 + Integer pageCount = pagesInfo.getPages(); //总页数 + long recordTotal = pagesInfo.getTotal(); //记录总数 + List myList = new ArrayList<>(); //当前页的列表数据 + + Pages pages = new Pages(); + int noReadSize = 0; + if (pageNum <= pageCount) { + myList = pagesInfo.getList(); //当前页的列表数据 + noReadSize = Linq.of(myList).where(p -> p.getIs_read().equals(0)).count(); + pages.setUnReadSize(noReadSize); + } + + //分页数据添加到pages + pages.setPageNum(pageNum); + pages.setPageSize(pageSize); + pages.setPageCount(pageCount); + pages.setRecordTotal(recordTotal); + + //判断请求是否成功 + Boolean bl = myList != null; + //创建返回数据data + Map data = new HashMap<>(); + data.put("pages", pages); + data.put("messageList", myList); + //添加到返回对象 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * 微信小程序前端点看信息后,修改信息状态为已看, + * + * @param id id + * @return 返回结果 + */ + @PostMapping("/setHavingLookMessageState") + public String setHavingLookMessageState(@RequestParam("id") String id) { + String msg = ""; + if (id == null || id.isEmpty()) { + msg = "Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + Message message = new Message(); + message.setId(id); + message.setIs_read(1); + int res = messageService.update(message); + //判断请求是否成功 + Boolean bl = res > 0; + Map data = new HashMap<>(); + return response.getResponseData(bl, data); + } + + +} \ No newline at end of file diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/api/MineController.java b/wx-applet/src/main/java/com/haitongauto/rtosac/api/MineController.java new file mode 100644 index 0000000..401d621 --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/api/MineController.java @@ -0,0 +1,727 @@ +package com.haitongauto.rtosac.api; + +import com.bestvike.linq.Linq; +import com.github.pagehelper.PageInfo; +import com.haitongauto.interfaces.OrderApi; +import com.haitongauto.models.dto.CurrentDayPunchClockDto; +import com.haitongauto.models.dto.Pages; +import com.haitongauto.models.ido.login.UsersIdo; +import com.haitongauto.models.pojo.*; +import com.haitongauto.rtosac.service.MineService; +import com.haitongauto.rtosac.service.PunchClockService; +import com.haitongauto.utils.DateTimeHelper; +import com.haitongauto.rtosac.service.AppointmentService; +import com.haitongauto.rtosac.service.Response; +import com.haitongauto.utils.FormatDateTime; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +@RestController +@RequestMapping("/mine") +public class MineController { + @Autowired + MineService mineService; + @Autowired + PunchClockService punchClockService; + @Autowired + AppointmentService appointmentService; + @Autowired + Response response; + @Resource + OrderApi orderApi; + + /** + * 获取个人资料 + * + * @param users_id:司机用户id + * @return 返回完整的个人信息 + */ + @RequestMapping("/getUsersInfo") + public String getUsersInfo(@RequestParam("users_id") String users_id) { + String msg = ""; + if (users_id == null || users_id.isEmpty()) { + msg = "用户Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + Users myusers = mineService.getUsersById(users_id); + //判断请求是否成功 + Boolean bl = myusers != null; + //创建返回数据 + Map data = new HashMap<>(); + data.put("Users", myusers); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * 个人资料修改 + * + * @param users:修改后的个人信息 + * @return 是否修改成功 + */ + @PostMapping("/postUsersInfo") + public String postUsersInfo(@RequestBody Users users) { + String msg = ""; + if (users.getTel_number() == null || users.getTel_number().isEmpty()) { + msg = "手机号不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + if (users.getId_code() == null || users.getId_code().isEmpty()) { + msg = "身份证号码不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + if (users.getId_code().length() < 18) { + msg = "身份证号码不能少于18位"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + //保存本地数据库 + Integer x = mineService.postMyUsers(users); + //将用户提交为哪吒 + UsersIdo usersIdo = new UsersIdo(); + usersIdo.setIdCard(users.getId_code()); + usersIdo.setName(users.getUsers_name()); + usersIdo.setPhone(users.getTel_number()); + //待开放 + // CommonRes res = orderApi.updateUser(usersIdo); + // String res = orderApi.updateUser(usersIdo); + // System.out.print(res); + //判断请求是否成功 + Boolean bl = x != null; + //创建返回数据 + Map data = new HashMap<>(); + data.put("result", x); + //封装数据 + //返回 + return response.getResponseData(bl, data); + } + + /** + * 获取我的板车信息 pallet_truck + * @param users_id:司机用户id + * @return 返回我的板车信息 pallet_truck + */ + @RequestMapping("/getMyPalletTruck") + public String getMyPalletTruck(@RequestParam("users_id") String users_id) { + String msg = ""; + if (users_id == null || users_id.isEmpty()) { + msg = "用户Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + //获取我的板车信息(含被列入黑名单的最新信息) + List myPalletTruckList = mineService.getMyPalletTruck(users_id); + //判断请求是否成功 + Boolean bl = myPalletTruckList != null; + //创建返回数据 + Map data = new HashMap<>(); + data.put("PalletTruckList", myPalletTruckList); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * 修改我的板车信息 + * @param palletTruck:修改后的我的板车信息 + * @return 是否修改成功 + */ + @RequestMapping("/postMyPalletTruck") + public String postMyPalletTruck(Truck palletTruck) { + String users_id = palletTruck.getUsers_id(); + String truck_number = palletTruck.getTruck_number(); + String msg = ""; + if (users_id == null || users_id.isEmpty()) { + msg = "用户Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + if (truck_number == null || truck_number.isEmpty()) { + msg = "板车号不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + Integer x = mineService.postMyPalletTruck(palletTruck); + //判断请求是否成功 + Boolean bl = x != null; + //创建返回数据 + Map data = new HashMap<>(); + data.put("result", x); + //封装数据 + //返回 + return response.getResponseData(bl, data); + } + + /** + * 删除我的板车信息 + * + * @param palletTruck_id:板车id + * @return 返回是否删除成功 + */ + @RequestMapping("/delMyPalletTruck") + public String delMyPalletTruck(@RequestParam("palletTruck_id") String palletTruck_id) { + String msg = ""; + if (palletTruck_id == null || palletTruck_id.isEmpty()) { + msg = "板车Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + Integer x = mineService.delMyPalletTruck(palletTruck_id); + //判断请求是否成功 + Boolean bl = x != null; + //创建返回数据 + Map data = new HashMap<>(); + data.put("result", x); + //封装数据 + //返回 + return response.getResponseData(bl, data); + } + + /** + * 我的车辆黑名单信息 truck_management(该接口仅用于访问哪吒的接口) + * + * @param users_id:司机用户id + * @return 返回我的车辆黑名单列表 + */ + @RequestMapping("/getMyTruckManagement") + public String getMyTruckManagement(@RequestParam("users_id") String users_id) { + String msg = ""; + if (users_id == null || users_id.isEmpty()) { + msg = "用户Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + List myTruckManagementList = mineService.getMyTruckManagement(users_id); + //判断请求是否成功 + Boolean bl = myTruckManagementList != null; + //创建返回数据 + Map data = new HashMap<>(); + data.put("myTruckManagementList", myTruckManagementList); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * 提交反馈意见 feedback + * + * @param feedback:包含反馈意见的数据 + * @return 返回是否提交成功 + */ + @RequestMapping("/postFeedback") + public String postFeedback(Feedback feedback) { + Integer x = mineService.postFeedback(feedback); + //判断请求是否成功 + Boolean bl = x != null && x > 0; + //创建返回数据 + Map data = new HashMap<>(); + data.put("result", x); + //封装数据 + //返回 + return response.getResponseData(bl, data); + } + + /** + * 我的预约信息列表 + * + * @param users_id:司机用户id + * @return 我的预约信息列表 + */ + @RequestMapping("/getMyAppointmentList") + public String getMyAppointment(@RequestParam("users_id") String users_id) { + String msg = ""; + if (users_id == null || users_id.isEmpty()) { + msg = "用户Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + List myAppointmentList = mineService.getMyAppointmentList(users_id); + //创建返回数据 + Integer code = (myAppointmentList != null) ? 200 : 0; + String message = (myAppointmentList != null) ? "request success" : "request fail"; + //判断请求是否成功 + Boolean bl = myAppointmentList != null; + //创建返回数据 + Map data = new HashMap<>(); + data.put("AppointmentList", myAppointmentList); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * 我的预约信息按日期查询分页列表 + * + * @param users_id 司机id + * @param approach_date 预约进场时间 + * @param pages 页签实体 + * @return 返回我的预约信息分页数据 + */ + @RequestMapping("/getMyAppointmentListByDateForPage") + public String getMyAppointmentListByDate(@RequestParam("users_id") String users_id, @RequestParam("approach_date") String approach_date, Pages pages) { + String msg = ""; + if (users_id == null || users_id.isEmpty()) { + msg = "用户Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + //解析分页参数 + Integer pageNum = (pages != null && pages.getPageNum() != null && pages.getPageNum() > 0) ? pages.getPageNum() : 1; + Integer pageSize = (pages != null && pages.getPageSize() != null && pages.getPageSize() > 0) ? pages.getPageSize() : 10; + + //调用Service分页方法,获取分页数据对象 PageInfo + PageInfo pagesInfo = mineService.getMyAppointmentListByDateForPage(users_id, approach_date, pageNum, pageSize); + //读取分页结果 + int pageCount = pagesInfo.getPages(); //总页数 + long recordTotal = pagesInfo.getTotal(); //记录总数 + List myList = pagesInfo.getList(); //当前页的列表数据 + //判断请求是否成功 + Boolean bl = myList != null; + //创建返回数据 + Map data = new HashMap<>(); + data.put("pageNum", pageNum); + data.put("pageCount", pageCount); + data.put("recordTotal", recordTotal); + data.put("dataJson", myList); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * 模糊查询我的预约信息,并按每页10条数据分页显示(作废) + * + * @param users_id:司机用户id + * @param keywords:查询关键字 + * @param approach_date:查询日期 + * @return 模糊查询结果 getAppointmentDetailListForKeyWords + */ + @RequestMapping("/getMyAppointmentListForPage_old") + public String getMyAppointmentListForPage_old(@RequestParam("users_id") String users_id, @RequestParam("keywords") String keywords, @RequestParam("approach_date") String approach_date, Pages pages) { + String msg = ""; + if (users_id == null || users_id.isEmpty()) { + msg = "用户Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + //解析分页参数 + Integer pageNum = (pages != null && pages.getPageNum() != null && pages.getPageNum() > 0) ? pages.getPageNum() : 1; + Integer pageSize = (pages != null && pages.getPageSize() != null && pages.getPageSize() > 0) ? pages.getPageSize() : 10; + //调用Service分页方法,获取分页数据对象 PageInfo + PageInfo pagesInfo = mineService.getMyAppointmentListForPage(users_id, keywords, approach_date, pageNum, pageSize); + //读取分页结果 + int pageCount = pagesInfo.getPages(); //总页数 + long recordTotal = pagesInfo.getTotal(); //记录总数 + List myList = pagesInfo.getList(); //当前页的列表数据 + //判断请求是否成功 + Boolean bl = myList != null; + //创建返回数据 + Map data = new HashMap<>(); + data.put("pageNum", pageNum); + data.put("pageCount", pageCount); + data.put("recordTotal", recordTotal); + data.put("dataJson", myList); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + + @RequestMapping("/getMyAppointmentListForPage") + public String getMyAppointmentListForPage(@RequestParam("users_id") String users_id, @RequestParam("keywords") String keywords, @RequestParam("approach_date") String approach_date, Pages pages) { + String msg = ""; + if (users_id == null || users_id.isEmpty()) { + msg = "用户Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + //解析分页参数 + Integer pageNum = (pages != null && pages.getPageNum() != null && pages.getPageNum() > 0) ? pages.getPageNum() : 1; + Integer pageSize = (pages != null && pages.getPageSize() != null && pages.getPageSize() > 0) ? pages.getPageSize() : 10; + //调用Service分页方法,获取分页数据对象 PageInfo + PageInfo pagesInfo = mineService.getMyAppointmentListForPageNew(users_id, keywords, approach_date, pageNum, pageSize); + //读取分页结果 + int pageCount = pagesInfo.getPages(); //总页数 + long recordTotal = pagesInfo.getTotal(); //记录总数 + List myList = pagesInfo.getList(); //当前页的列表数据 + if (pages == null) { + pages = new Pages(); + } + pages.setPageNum(pageNum); + pages.setPageSize(pageSize); + pages.setPageCount(pageCount); + pages.setRecordTotal(recordTotal); + //判断请求是否成功 + Boolean bl = true; + //创建返回数据 + Map data = new HashMap<>(); + data.put("pages", pages); + data.put("list", myList); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + + /** + * 新手攻略 + * + * @return 返回新手攻略 + */ + @RequestMapping("/getNoviceIntroduction") + public String getNoviceIntroduction(@RequestParam("sort") Integer sort) { + List noviceIntroductionList = mineService.getNoviceIntroduction(); + List mynoviceIntroductionList = Linq.of(noviceIntroductionList).where(p -> p.getSort() != null && p.getSort().equals(sort)).toList(); + //判断请求是否成功 + Boolean bl = noviceIntroductionList != null; + //创建返回数据 + Map data = new HashMap<>(); + data.put("NoviceIntroduction", mynoviceIntroductionList); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * 我的打卡记录(查询指定日期,默认当天) + * + * @param my_date 指定日期 + * @param users_id 司机id + * @return 返回我的打卡记录 + */ + @RequestMapping("/getPunchClockForDate") + public String getPunchClockForDate(@RequestParam("my_date") String my_date, @RequestParam("users_id") String users_id) { + String msg = ""; + if (users_id == null || users_id.isEmpty()) { + msg = "用户Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + LocalDate myDate = DateTimeHelper.DateStrToLocalDate(my_date); //LocalDate.parse(my_date); + //修改返回,未完工打卡, + List mylist = punchClockService.getPunchClockForDate(my_date, users_id); + CurrentDayPunchClockDto currentDayPunchClockDto = new CurrentDayPunchClockDto(); + //总工时 + long totalWorkingSeconds = 0; + long totalWorkingHours = 0; + //打卡次数 + int totalPunchClockCount = 0; + if (mylist != null && mylist.size() > 0) { + for (PunchClock punchClock : mylist) { + String start_time = punchClock.getStart_time(); + String over_time = punchClock.getOver_time(); + //统计次数 + //if (start_time != null && !start_time.isEmpty()) { + // totalPunchClockCount = totalPunchClockCount + 1; + //} + //if (over_time != null && !over_time.isEmpty()) { + // totalPunchClockCount = totalPunchClockCount + 1; + //} + if ((start_time != null && !start_time.isEmpty()) || (over_time != null && !over_time.isEmpty())) { + totalPunchClockCount = totalPunchClockCount + 1; + } + //计算签到打卡时间与完成打卡时间的时间差(单位秒数) + long timechaSeconds = FormatDateTime.getTimeCha(start_time, over_time); + //统计工时 + if (timechaSeconds > 0) { + //累加打卡的工时 + totalWorkingSeconds = totalWorkingSeconds + timechaSeconds; + } + } + } + //将总秒数转化为总小时数据 + totalWorkingHours = TimeUnit.MILLISECONDS.toHours(totalWorkingSeconds); + currentDayPunchClockDto.setPunchClockList(mylist); + currentDayPunchClockDto.setTotalPunchClockCount(totalPunchClockCount); + currentDayPunchClockDto.setTotalWorkingHours(totalWorkingHours); + //判断请求是否成功 + Boolean bl = true; + //创建返回数据 + Map data = new HashMap<>(); + data.put("CurrentDayPunchClock", currentDayPunchClockDto); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + + } + + + /** + * 我的打卡记录(查询指定司机某年某月的打卡记录) + * + * @param year 年 + * @param month 月 + * @param users_id 司机id + * @return 返回我的打卡记录 + */ + @RequestMapping("/getPunchClockForYM") + public String getPunchClockForYM(@RequestParam("year") Integer year, @RequestParam("month") Integer month, @RequestParam("users_id") String users_id) { + String msg = ""; + if (users_id == null || users_id.isEmpty()) { + msg = "用户Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + List mylist = punchClockService.getPunchClockForYM(year, month, users_id); + List myappointmentList = mineService.getMyAppointmentList(users_id); + //找到对应的预约进港时间 (王琛需要) + //未完成的预约进港日期 + List approachDateList_ww = new ArrayList<>(); + //已完成的预约进港日期 + List approachDateList_yw = new ArrayList<>(); + + //查出未完成的预约进港日期 + List mylist1 = null; + if (mylist != null && mylist.size() > 0) { + //查询当月未完工打卡的记录() + mylist1 = Linq.of(mylist).where(p -> p.getPunch_clock_type() < 4).toList(); + List appointmentIdList1; + if (mylist1 != null && mylist1.size() > 0) { + appointmentIdList1 = Linq.of(mylist1).select(PunchClock::getAppointment_id).toList(); + if (appointmentIdList1 != null && appointmentIdList1.size() > 0) { + if (myappointmentList != null && myappointmentList.size() > 0) { + //未完成的 + List myappointmentList1 = Linq.of(myappointmentList).where(o -> appointmentIdList1.contains(o.getId())).toList(); + if (myappointmentList1 != null && myappointmentList1.size() > 0) { + approachDateList_ww = Linq.of(myappointmentList1).select(Appointment::getApproach_date).distinct().toList(); + } + } + } + } + } + + //查出已完成的预约进港日期 + List mylist2 = null; + if (mylist != null && mylist.size() > 0) { + //查询当月未完工打卡的记录(不关心预约是否取消) + mylist2 = Linq.of(mylist).where(p -> p.getPunch_clock_type() >= 4).toList(); + List appointmentIdList2; + if (mylist2 != null && mylist2.size() > 0) { + appointmentIdList2 = Linq.of(mylist2).select(PunchClock::getAppointment_id).toList(); + if (appointmentIdList2 != null && appointmentIdList2.size() > 0) { + if (myappointmentList != null && myappointmentList.size() > 0) { + //未完成的 + List myappointmentList2 = Linq.of(myappointmentList).where(o -> appointmentIdList2.contains(o.getId())).toList(); + if (myappointmentList2 != null && myappointmentList2.size() > 0) { + approachDateList_yw = Linq.of(myappointmentList2).select(Appointment::getApproach_date).distinct().toList(); + List finalApproachDateList_ww = approachDateList_ww; + + approachDateList_yw = Linq.of(approachDateList_yw).where(o -> !finalApproachDateList_ww.contains(o)).toList(); + } + } + } + } + } + + //获得打卡记录的预约信息 + //判断请求是否成功 + Boolean bl = true; + //创建返回数据 + Map data = new HashMap<>(); + //data.put("PunchClockList", mylist); + data.put("approachDateList_ww", approachDateList_ww); + data.put("approachDateList_yw", approachDateList_yw); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * 获取当前排队前面还剩多少车辆未进港 + * + * @param users_id 司机id + * @return 返回我前面的排队待进港的车辆数 + */ + @RequestMapping("/getNumberBeforeMe") + public String getNumberBeforeMe(@RequestParam("users_id") String users_id) { + String msg = ""; + if (users_id == null || users_id.isEmpty()) { + msg = "用户Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + //-1-首先查找我的当前预约 + Appointment myAppointment = mineService.getMyAppointment(users_id); + if (myAppointment == null) { + msg = "不存在用户Id" + users_id + "的预约"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + //-2-读取预约关键数据 + String appointment_id = myAppointment.getId(); + String port_area_id = myAppointment.getPort_area_id(); + //LocalDate approach_date = LocalDate.parse(myAppointment.getApproach_date()); + String approach_date = myAppointment.getApproach_date(); + + //-3-获取预约排队编号 + String queueNumber = punchClockService.getQueueNumber(appointment_id); + String queue_number = (queueNumber.isEmpty()) ? queueNumber : null; + + //-4-获取当前排队前面还剩多少车辆未进港(条件:相同的进港日期和进港港区、且尚未进港的车辆数量中,排队编号比我小的车辆数量 + Integer x = (queue_number != null) ? punchClockService.getNumberBefore(approach_date, port_area_id, queue_number) : null; + + //判断请求是否成功 + Boolean bl = x != null; + //创建返回数据 + Map data = new HashMap<>(); + data.put("number_before_me", x); + //封装数据 + //返回 + return response.getResponseData(bl, data); + } + + /** + * 获取我的排队号 + * + * @param users_id 用户id + * @return 获取我的排队号 + */ + @RequestMapping("/getNumberForMe") + public String getNumberForMe(@RequestParam("users_id") String users_id) { + String msg = ""; + if (users_id == null || users_id.isEmpty()) { + msg = "用户Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + //-1-首先查找我的当前预约 + Appointment myAppointment = mineService.getMyAppointment(users_id); + if (myAppointment == null) { + msg = "不存在用户Id" + users_id + "的预约"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + //-2-读取预约关键数据 + String appointment_id = myAppointment.getId(); + //-3-获取预约排队编号 + String queueNumber = punchClockService.getQueueNumber(appointment_id); + //判断请求是否成功 + Boolean bl = queueNumber != null && !queueNumber.isEmpty(); + //创建返回数据 + Map data = new HashMap<>(); + data.put("queueNumber", queueNumber); + //封装数据 + //返回 + return response.getResponseData(bl, data); + } + + /** + * RTOS提交黑名单车辆 + * + * @param truck_number 车牌号 + * @return 返回提交黑名单车辆执行结果 + */ + @RequestMapping("/postTruckBlacklist") + public String postTruckBlacklist(@RequestParam("truck_number") String truck_number) { + //此处接收哪吒rtos提交的黑名单车辆信息数据,更新到板车数据表,并发送一条的消息。 + return ""; + } + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/api/NewsController.java b/wx-applet/src/main/java/com/haitongauto/rtosac/api/NewsController.java new file mode 100644 index 0000000..2cfee95 --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/api/NewsController.java @@ -0,0 +1,475 @@ +package com.haitongauto.rtosac.api; + +import com.alibaba.fastjson.JSON; +import com.haitongauto.mapper.base.PunchClockMapper; +import com.haitongauto.models.pojo.*; +import com.haitongauto.rtosac.service.*; +import com.haitongauto.models.dto.DataForMessage; +import com.haitongauto.utils.DateTimeHelper; +import com.haitongauto.utils.FormatDateTime; +import com.haitongauto.utils.QueueNumberHelper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 指令消息 + */ +@RestController +@RequestMapping("/news") +public class NewsController { + @Autowired + NewsService newsService; + @Autowired + HomeService homePageService; + @Autowired + Response response; + @Autowired + AppointmentService appointmentService; + @Autowired + PunchClockService punchClockService; + @Autowired + HomeService homeService; + + /** + * 获取发送给指定用户的(最近10条)指令信息 + * + * @param users_id 用户id + * @return 返回指令信息 + */ + @RequestMapping("/getEntryInstructionsForUsers") + public String getEntryInstructionsForUsers(@RequestParam("users_id") String users_id) { + String msg = ""; + if (users_id == null || users_id.isEmpty()) { + msg = "用户Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + List myEntryInstructions = newsService.getEntryInstructionsForUsers(users_id); + + //判断请求是否成功 + Boolean bl = myEntryInstructions != null; + //创建返回数据 + Map data = new HashMap<>(); + data.put("myEntryInstructionsList", myEntryInstructions); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * RTOS向小程序提交收发车凭证待核验信息,用于向小程序用户发送订阅消息 + * + * @param voucher_type:收发车凭证类型,1-收车,2-发车/提车 + * @return 返回提交结果 + */ + @RequestMapping("/sendReceiptDepartureVoucher") + public String sendReceiptDepartureVoucher(@RequestParam("voucher_type") Integer voucher_type, @RequestParam("appointment_id") String appointment_id) { + String msg = ""; + if (voucher_type == null) { + msg = "收发车凭证类型不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + if (appointment_id == null || appointment_id.isEmpty()) { + msg = "openid不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + //接收哪吒提交的数据,定义消息模板数据 + String voucherType = (voucher_type == 1) ? "收车" : "提车"; + Appointment appointment = appointmentService.getAppointmentById(appointment_id); + String truck_number = ""; + if (appointment != null) { + truck_number = appointment.getTruck_number(); + } + String dataVal = truck_number + "的车主,您好!您有新的" + voucherType + "凭证待核验,请点击此处前往核验。"; + String index = "/vehicle/getVehicleReceivingList?=" + truck_number; + Map valMap = new HashMap<>(); + valMap.put("value", dataVal); + Map dataMap = new HashMap<>(); + dataMap.put("收发车凭证核验消息", valMap); + //添加到实例 + DataForMessage dataForMessage = new DataForMessage(); + assert appointment != null; + Users users = homeService.getUsersForId(appointment.getUsers_id()); + //Users users = homeService.getUsersForOpenId(openid); + String token = ""; + //dataForMessage.setAccess_token("access_token"); //接口调用凭证,该参数为 URL 参数,非 Body 参数。使用access_token或者authorizer_access_token + if (users != null && users.getAccess_token() != null && !users.getAccess_token().isEmpty()) { + dataForMessage.setAccess_token(users.getAccess_token()); + token = users.getAccess_token(); + } + //收发车凭证通知 模板id + Requester requester = newsService.getRequesterForType(1030); + String template_id = "rGgqJedgnNY4qQ7vtV08eqsso_yK-caSfyZQ93cWQz4"; + if (requester != null) { + Map map = JSON.parseObject(requester.getParam_map(), Map.class); + template_id = map.get("template_id1").toString(); + } + dataForMessage.setTemplate_id(template_id); //所需下发的订阅模板id + dataForMessage.setPage(index); //点击模板卡片后的跳转页面,仅限本小程序内的页面。支持带参数,(示例index?foo=bar)。该字段不填则模板无跳转 + assert users != null; + dataForMessage.setAccess_token(users.getAccess_token()); + dataForMessage.setTouser(users.getWx_openid()); //接收者(用户)的 openid + dataForMessage.setData(JSON.toJSONString(dataMap));//模板内容,格式形如 { "key1": { "value": any }, "key2": { "value": any } }的object + dataForMessage.setMiniprogram_state("developer"); //跳转小程序类型:developer为开发版;trial为体验版;formal为正式版;默认为正式版 + dataForMessage.setLang("zh_CN"); //进入小程序查看”的语言类型,支持zh_CN(简体中文)、en_US(英文)、zh_HK(繁体中文)、zh_TW(繁体中文),默认为zh_CN + + //调用发送消息接口 + String myData = homePageService.sendMessage(dataForMessage); + + //解析返回参数 + Integer errCode = Integer.parseInt(JSON.parseObject(myData).getString("errcode")); + //判断请求是否成功 + Boolean bl = errCode.equals(0); + //创建返回数据 + Map data = new HashMap<>(); + data.put("dataJson", myData); + data.put("template_id", template_id); + data.put("access_token", token); + //封装数据 + //返回 + return response.getResponseData(bl, data); + } + + /** + * RTOS向小程序提交车辆过闸信息(正常过闸) + * + * @param pass_type:车辆过闸类型,1-进闸,2-出闸 + * @param truck_number:板车号 + * @param gate_canal:道口号 + * @return 返回提交结果 + */ + @RequestMapping("/sendTruckThroughGateInfo") + public String sendTruckThroughGateInfo(@RequestParam("pass_type") Integer pass_type, @RequestParam("truck_number") String truck_number, @RequestParam("gate_canal") String gate_canal) { + String msg = ""; + if (pass_type == null) { + msg = "车辆过闸类型,不能为空,1-进闸,2-出闸"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + data.put("result", bl); + String message = "request fail"; + data.put("message", message); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + if (truck_number == null) { + msg = "板车号不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + data.put("result", bl); + String message = "request fail"; + data.put("message", message); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + Appointment appointment = appointmentService.getAppointmentByTruckNo(truck_number); + if (appointment == null) { + msg = "板车号" + truck_number + "当前不存在有效预约"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + data.put("result", bl); + String message = "request fail"; + data.put("message", message); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + Date date = new Date(); + //进闸口 + if (pass_type == 1) { + appointment.setIs_conventionality_in(0);//正常自动过闸口 + appointment.setGate_canal_in(gate_canal); + //签到打卡时间 + if (appointment.getCheck_in_time() == null || appointment.getCheck_in_time().isEmpty()) { + appointment.setCheck_in_time(FormatDateTime.dateTimeToStr(date)); + } + //进闸口时间 + appointment.setGate_canal_in_time(FormatDateTime.dateTimeToStr(date)); + } + //出闸口 + if (pass_type == 2) { + appointment.setGate_canal_out(gate_canal); + //完工打卡时间 + if (appointment.getCheck_over_time() == null || appointment.getCheck_over_time().isEmpty()) { + appointment.setCheck_over_time(FormatDateTime.dateTimeToStr(date)); + } + //出闸口时间 + appointment.setGate_canal_out_time(FormatDateTime.dateTimeToStr(date)); + } + //定义该车牌用户的当前预约打卡状态 + Integer appointment_state = (pass_type == 1) ? 3 : 7; //3-进港,7-离港 + Integer punch_clock_type = (pass_type == 1) ? 2 : 5; //2-已进港,5-已离港 + //更新预约状态 + + appointment.setAppointment_state(appointment_state); + appointment.setUpdate_time(FormatDateTime.dateTimeToStr(new Date())); + Integer x = appointmentService.updateAppointment(appointment); + //更新打卡状态 + if (x > 0) { + String appointment_id = appointment.getId(); + PunchClock punchClock = punchClockService.getPunchClockForAppintementId(appointment_id); + if (punchClock != null) { + punchClock.setPunch_clock_type(punch_clock_type); + //进闸口 + if (pass_type == 1) { + //如果未打签到卡,则打签到卡; + String start_time = punchClock.getStart_time(); + if (start_time == null || start_time.isEmpty()) { + punchClock.setStart_time(FormatDateTime.dateTimeToStr(date)); + } + //生成新的排队编号 + //排队号需求变更,格式"2308210001" + String queue_number = punchClock.getQueue_number(); + if (queue_number == null || queue_number.isEmpty()) { + //获取当前日期最后一个排队编号 + String last_queue_number = punchClockService.getLastQueueNumber(date, appointment.getPort_area_id()); + queue_number = QueueNumberHelper.getNewQueueNumber(last_queue_number); + punchClock.setQueue_number(queue_number); + } + //签到打卡地点 + String punch_address = punchClock.getPunch_address(); + if (punch_address == null || punch_address.isEmpty()) { + PortArea portArea = punchClockService.getPortAreaForId(appointment.getPort_area_id()); + if (portArea != null) { + punchClock.setPunch_address(portArea.getPort_area_address()); + } + } + } else {//出闸口 + //完工打卡时间 + String over_time = punchClock.getOver_time(); + if (over_time == null || over_time.isEmpty()) { + punchClock.setOver_time(FormatDateTime.dateTimeToStr(date)); + } + //完工打卡地点 + String over_address = punchClock.getOver_address(); + if (over_address == null || over_address.isEmpty()) { + PortArea portArea = punchClockService.getPortAreaForId(appointment.getPort_area_id()); + if (portArea != null) { + punchClock.setOver_address(portArea.getPort_area_address()); + } + } + } + punchClock.setUpdate_time(FormatDateTime.dateTimeToStr(new Date())); + int myx = punchClockService.updatePunchClock(punchClock); + } + } + if (pass_type == 1) { + msg = "板车" + truck_number + "进闸成功"; + } + if (pass_type == 2) { + msg = "板车" + truck_number + "出闸成功"; + } + //判断请求是否成功 + Boolean bl = true; + //创建返回数据 + Map data = new HashMap<>(); + data.put("result", bl); + String message = (bl) ? "request success" : "request fail"; + data.put("message", message); + if (bl) { + data.put("code", "200"); + } + + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + + } + + /** + * RTOS向小程序提交车辆过闸信息(人工过闸) + * + * @param pass_type:车辆过闸类型,1-进闸,2-出闸 + * @param truck_number:板车号 + * @param gate_canal:道口号 + * @return 返回提交结果 + */ + @RequestMapping("/sendTruckThroughGateInfoUnconventionality") + public String sendTruckThroughGateInfoUnconventionality(@RequestParam("pass_type") Integer pass_type, @RequestParam("truck_number") String truck_number, @RequestParam("gate_canal") String gate_canal) { + String msg = ""; + if (pass_type == null) { + msg = "车辆过闸类型,不能为空,1-进闸,2-出闸"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + data.put("result", bl); + String message = (bl) ? "request success" : "request fail"; + data.put("message", message); + if (bl) { + data.put("code", "200"); + } + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + if (truck_number == null) { + msg = "板车号不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + data.put("result", bl); + String message = (bl) ? "request success" : "request fail"; + data.put("message", message); + if (bl) { + data.put("code", "200"); + } + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + Appointment appointment = appointmentService.getAppointmentByTruckNo(truck_number); + if (appointment == null) { + msg = "板车号" + truck_number + "当前不存在有效预约"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + data.put("result", bl); + String message = (bl) ? "request success" : "request fail"; + data.put("message", message); + if (bl) { + data.put("code", "200"); + } + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + + Date date = new Date(); + //进闸口 + if (pass_type == 1) { + appointment.setIs_conventionality_in(1);//非正常的过闸口 + appointment.setGate_canal_in(gate_canal); + //签到打卡时间 + if (appointment.getCheck_in_time() == null || appointment.getCheck_in_time().isEmpty()) { + appointment.setCheck_in_time(FormatDateTime.dateTimeToStr(date)); + } + //进闸口时间 + appointment.setGate_canal_in_time(FormatDateTime.dateTimeToStr(date)); + } + //出闸口 + if (pass_type == 2) { + appointment.setGate_canal_out(gate_canal); + //完工打卡时间 + if (appointment.getCheck_over_time() == null || appointment.getCheck_over_time().isEmpty()) { + appointment.setCheck_over_time(FormatDateTime.dateTimeToStr(date)); + } + //出闸口时间 + appointment.setGate_canal_out_time(FormatDateTime.dateTimeToStr(date)); + } + + //定义该车牌用户的当前预约打卡状态 + Integer appointment_state = (pass_type == 1) ? 3 : 7; //3-进港,7-离港 + Integer punch_clock_type = (pass_type == 1) ? 2 : 5; //2-已进港,5-已离港 + //更新预约状态 + + appointment.setAppointment_state(appointment_state); + appointment.setUpdate_time(FormatDateTime.dateTimeToStr(new Date())); + Integer x = appointmentService.updateAppointment(appointment); + //更新打卡状态 + if (x > 0) { + String appointment_id = appointment.getId(); + PunchClock punchClock = punchClockService.getPunchClockForAppintementId(appointment_id); + if (punchClock != null) { + punchClock.setPunch_clock_type(punch_clock_type); + //进闸口 + if (pass_type == 1) { + //如果未打签到卡,则打签到卡; + String start_time = punchClock.getStart_time(); + if (start_time == null || start_time.isEmpty()) { + punchClock.setStart_time(FormatDateTime.dateTimeToStr(date)); + } + //生成新的排队编号 + //排队号需求变更,格式"2308210001" + String queue_number = punchClock.getQueue_number(); + if (queue_number == null || queue_number.isEmpty()) { + //获取当前日期最后一个排队编号 + String last_queue_number = punchClockService.getLastQueueNumber(date, appointment.getPort_area_id()); + queue_number = QueueNumberHelper.getNewQueueNumber(last_queue_number); + punchClock.setQueue_number(queue_number); + } + //签到打卡地点 + String punch_address = punchClock.getPunch_address(); + if (punch_address == null || punch_address.isEmpty()) { + PortArea portArea = punchClockService.getPortAreaForId(appointment.getPort_area_id()); + if (portArea != null) { + punchClock.setPunch_address(portArea.getPort_area_address()); + } + } + } else {//出闸口 + //完工打卡时间 + String over_time = punchClock.getOver_time(); + if (over_time == null || over_time.isEmpty()) { + punchClock.setOver_time(FormatDateTime.dateTimeToStr(date)); + } + //完工打卡地点 + String over_address = punchClock.getOver_address(); + if (over_address == null || over_address.isEmpty()) { + PortArea portArea = punchClockService.getPortAreaForId(appointment.getPort_area_id()); + if (portArea != null) { + punchClock.setOver_address(portArea.getPort_area_address()); + } + } + } + punchClock.setUpdate_time(FormatDateTime.dateTimeToStr(new Date())); + int myx = punchClockService.updatePunchClock(punchClock); + } + } + + if (pass_type == 1) { + msg = "板车" + truck_number + "进闸成功"; + } + if (pass_type == 2) { + msg = "板车" + truck_number + "出闸成功"; + } + //判断请求是否成功 + Boolean bl = true; + //创建返回数据 + Map data = new HashMap<>(); + + data.put("result", bl); + String message = (bl) ? "request success" : "request fail"; + data.put("message", message); + if (bl) { + data.put("code", "200"); + } + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/api/PunchClockController.java b/wx-applet/src/main/java/com/haitongauto/rtosac/api/PunchClockController.java new file mode 100644 index 0000000..e352c46 --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/api/PunchClockController.java @@ -0,0 +1,591 @@ +package com.haitongauto.rtosac.api; + +import com.bestvike.linq.Linq; +import com.haitongauto.models.dto.CurrentDayPunchClockDto; +import com.haitongauto.models.pojo.*; +import com.haitongauto.rtosac.service.*; +import com.haitongauto.utils.DateTimeHelper; +import com.haitongauto.utils.FormatDateTime; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.time.LocalDate; +import java.util.*; +import java.util.concurrent.TimeUnit; + +/** + * 打卡操作 + */ +@RestController +@RequestMapping("/punchclock") +public class PunchClockController { + @Autowired + AppointmentService appointmentService; + @Autowired + PunchClockService punchClockService; + @Autowired + VehicleService vehicleService; + @Autowired + MineService mineService; + + @Autowired + Response response; + + /** + * 检查是否有未完成预约 + * + * @param users_id 用户id + * @return 返回完成预约 + */ + @RequestMapping("/getIincompleteAppointment") + public String getIincompleteAppointment(@RequestParam("users_id") String users_id) { + String msg = ""; + if (users_id == null || users_id.isEmpty()) { + msg = "用户Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + //获取未完成预约 + Appointment appointment = punchClockService.getIincompleteAppointment(users_id); + String appointment_id = (appointment != null) ? appointment.getId() : null; + //获取该预约的打卡信息 + PunchClock mypunchClock = (appointment_id != null) ? punchClockService.getPunchClockForAppintementId(appointment_id) : null; + + //读取打卡的时间和地址信息 + Integer appointment_type = (appointment != null) ? appointment.getAppointment_type() : null; + String punch_start_time = (mypunchClock != null) ? mypunchClock.getStart_time() : ""; + String punch_over_time = (mypunchClock != null) ? mypunchClock.getOver_time() : ""; + String punch_start_address = (mypunchClock != null) ? mypunchClock.getPunch_address() : ""; + String punch_over_address = (mypunchClock != null) ? mypunchClock.getOver_address() : ""; + + //读取进港港区Id + String port_area_id = (appointment != null) ? appointment.getPort_area_id() : null; + //进港港区信息 + PortArea portArea = punchClockService.getPortAreaForId(port_area_id); + //进港港区中心坐标 + String poi = (portArea != null) ? portArea.getArea_center_poi() : ""; + //打卡范围 + Integer punch_range = (portArea != null && portArea.getPunch_range() != null) ? portArea.getPunch_range() : 0; + //判断请求是否成功 + Boolean bl = true; + //创建返回数据对象 + Map data = new HashMap<>(); + data.put("appointment_type", appointment_type); + data.put("poi", poi); + data.put("punch_range", punch_range); + data.put("punch_start_time", punch_start_time); + data.put("punch_over_time", punch_over_time); + data.put("punch_start_address", punch_start_address); + data.put("punch_over_address", punch_over_address); + data.put("appointment", appointment); + //封装数据 + //返回 + return response.getResponseData(bl, data); + } + + /** + * 签到打卡提交 + * + * @param users_id 用户id + * @param appointment_id 预约id + * @param port_area_id 港区id + * @param punch_poi 坐标 + * @return 返回提交结果 + */ + @RequestMapping("/postPunchClockStart") + public String postPunchClockStart(@RequestParam("users_id") String users_id, @RequestParam("appointment_id") String appointment_id, @RequestParam("port_area_id") String port_area_id, @RequestParam("punch_poi") String punch_poi, @RequestParam("punch_address") String punch_address) { + String msg = ""; + if (users_id == null || users_id.isEmpty()) { + msg = "用户Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + if (appointment_id == null || appointment_id.isEmpty()) { + msg = "预约Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + if (port_area_id == null || port_area_id.isEmpty()) { + msg = "港区Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + if (punch_poi == null || punch_poi.isEmpty()) { + msg = "坐标不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + if (punch_address == null || punch_address.isEmpty()) { + msg = "打卡地点不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + + //写入打卡数据 + PunchClock punchClock = punchClockService.postPunchClockStart(users_id, appointment_id, port_area_id, punch_poi, punch_address); + String punch_clock_id = ""; + String queue_number = ""; + String punch_date_time = ""; + if (punchClock == null) { + msg = "不在该预约信息"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + + } else { + punch_clock_id = punchClock.getId(); + queue_number = punchClock.getQueue_number(); + //获取签到打卡的日期时间(年月日小时分钟秒) + //转换为两位数格式字符串 + String punch_date = punchClock.getStart_time().split(" ")[0]; + String punch_time = punchClock.getStart_time().split(" ")[1]; + punch_date_time = punch_date + " " + punch_time; + } + + Appointment appointment = appointmentService.getAppointmentById(appointment_id); + Integer x = null; + if (queue_number != null && !queue_number.isEmpty() && appointment != null) { + //获取当前排队前面还剩多少位 + x = punchClockService.getNumberBefore(appointment.getApproach_date(), appointment.getPort_area_id(), queue_number); + } + + //判断请求是否成功 + Boolean bl = punch_clock_id != null && !punch_clock_id.isEmpty(); + //创建返回数据 + Map data = new HashMap<>(); + data.put("punch_clock_id", punch_clock_id); + data.put("NumberBeforeCount", x); + data.put("queue_number", queue_number); + data.put("punch_time", punch_date_time); + data.put("punch_address", punch_address); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + + /** + * 完成打卡提交 + * + * @param appointment_id 预约id + * @param punch_clock_id 打卡id + * @return 返回完成打卡提交执行结果 + */ + @RequestMapping("/postPunchClockOver") + public String postPunchClockOver(@RequestParam("appointment_id") String appointment_id, @RequestParam("punch_clock_id") String punch_clock_id, @RequestParam("punch_address") String punch_address) { + //打卡信息更新到数据库 + String msg = ""; + if (appointment_id == null || appointment_id.isEmpty()) { + msg = "预约id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + return response.getResponseData(bl, data, msg); + } + if (punch_clock_id == null || punch_clock_id.isEmpty()) { + msg = "预约打卡记录id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + return response.getResponseData(bl, data, msg); + } + if (punch_address == null || punch_address.isEmpty()) { + msg = "打卡地点不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + return response.getResponseData(bl, data, msg); + } + Appointment myAppointment = appointmentService.getAppointmentById(appointment_id); + PunchClock myPunchClock = punchClockService.getPunchClockForAppintementId(appointment_id); + if (myAppointment == null) { + msg = "不存预约Id为" + appointment_id + "的预约信息"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + return response.getResponseData(bl, data, msg); + } + if (myPunchClock == null) { + msg = "不存预约Id为" + appointment_id + "的打卡记录信息"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + return response.getResponseData(bl, data, msg); + } + + PunchClock punchClock = punchClockService.postPunchClockOver(appointment_id, punch_clock_id, punch_address); + //获取签到打卡的日期时间(年月日小时分钟秒) + String punch_date = ""; + String punch_time = ""; + String punch_date_time = ""; + if (punchClock != null) { + String[] strArray = punchClock.getOver_time().split(" "); + //转换为两位数格式字符串 + punch_date = strArray[0]; + punch_time = strArray[1]; + punch_date_time = punch_date + " " + punch_time; + } + //注意:此处还需追加完成打卡后生成指令,并提交到哪吒接口 + + //判断请求是否成功 + Boolean bl = true; + //创建返回数据 + Map data = new HashMap<>(); + data.put("punch_time", punch_date_time); + data.put("punch_address", punch_address); + //封装数据 + //返回 + return response.getResponseData(bl, data); + } + + /** + * 根据预约Id获取打卡记录状态 + * + * @param appointment_id 预约id + * @return 返回打卡记录 + */ + @RequestMapping("getPunchState") + public String getPunchState(@RequestParam("appointment_id") String appointment_id) { + String msg = ""; + if (appointment_id == null || appointment_id.isEmpty()) { + msg = "预约Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + //获取指定预约的打卡记录 + PunchClock punchClock = punchClockService.getPunchClockForAppintementId(appointment_id); + if (punchClock == null) { + msg = "不存在预约Id为" + appointment_id + "的打卡记录"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + //读取该预约的打卡状态 + Integer punch_clock_type = punchClock.getPunch_clock_type(); + //判断请求是否成功 + Boolean bl = punch_clock_type != null && punch_clock_type > 0; + //创建返回数据 + Map data = new HashMap<>(); + data.put("appointment_id", appointment_id); + data.put("punch_clock_type", punch_clock_type); + //封装数据 + //返回 + return response.getResponseData(bl, data); + + } + + /** + * 我的打卡记录(查询指定日期,默认当天) + * + * @param my_date 指定日期 + * @param users_id 司机id + * @return 返回我的打卡记录 + */ + @RequestMapping("/getPunchClockForDate") + public String getPunchClockForDate(@RequestParam("my_date") String my_date, @RequestParam("users_id") String users_id) { + String msg = ""; + if (users_id == null || users_id.isEmpty()) { + msg = "用户Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + LocalDate myDate = DateTimeHelper.DateStrToLocalDate(my_date); //LocalDate.parse(my_date); + List mylist = punchClockService.getPunchClockForDate(my_date, users_id); + CurrentDayPunchClockDto currentDayPunchClockDto = new CurrentDayPunchClockDto(); + //总工时 + long totalWorkingSeconds = 0;//秒 + //long totalWorkingHours = 0;//小时 + double totalWorkingHours = 0;//小时 + //打卡次数 + int totalPunchClockCount = 0; + if (mylist != null && mylist.size() > 0) { + for (PunchClock punchClock : mylist) { + String start_time = punchClock.getStart_time(); + String over_time = punchClock.getOver_time(); + //统计次数 + //if (start_time != null && !start_time.isEmpty()) { + // totalPunchClockCount = totalPunchClockCount + 1; + //} + //if (over_time != null && !over_time.isEmpty()) { + // totalPunchClockCount = totalPunchClockCount + 1; + //} + + //签到打卡统计,累加次数 + if (start_time != null && !start_time.isEmpty() ) { + totalPunchClockCount = totalPunchClockCount + 1; + } + //完工打卡打卡统计,累加次数 + if (over_time != null && !over_time.isEmpty() ) { + totalPunchClockCount = totalPunchClockCount + 1; + } + + //计算签到打卡时间与完成打卡时间的时间差(单位秒数) + long timechaSeconds = FormatDateTime.getTimeCha(start_time, over_time); + //统计工时 + if (timechaSeconds > 0) { + //累加打卡的工时 + totalWorkingSeconds = totalWorkingSeconds + timechaSeconds; + } + } + } + //将总秒数转化为总小时数据 + if (totalWorkingSeconds > 0) { + //totalWorkingHours = TimeUnit.MILLISECONDS.toHours(totalWorkingSeconds); + totalWorkingHours = (double) totalWorkingSeconds / 3600; + //小时数据保留四位小数 + totalWorkingHours = Math.round(totalWorkingHours * 10000) / 10000.0; + } + + currentDayPunchClockDto.setPunchClockList(mylist); + currentDayPunchClockDto.setTotalPunchClockCount(totalPunchClockCount); + currentDayPunchClockDto.setTotalWorkingHours(totalWorkingHours); + //判断请求是否成功 + Boolean bl = true; + //创建返回数据 + Map data = new HashMap<>(); + data.put("CurrentDayPunchClock", currentDayPunchClockDto); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + + } + + /** + * 我的打卡记录(查询指定司机某年某月的打卡记录) + * + * @param year 年 + * @param month 月 + * @param users_id 司机id + * @return 返回我的打卡记录 + */ + @RequestMapping("/getPunchClockForYM") + public String getPunchClockForYM(@RequestParam("year") Integer year, @RequestParam("month") Integer month, @RequestParam("users_id") String users_id) { + String msg = ""; + if (users_id == null || users_id.isEmpty()) { + msg = "用户Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + List mylist = punchClockService.getPunchClockForYM(year, month, users_id); + List myappointmentList = mineService.getMyAppointmentList(users_id); + //找到对应的预约进港时间 (王琛需要) + //未完成的预约进港日期 + List approachDateList_ww = new ArrayList<>(); + //已完成的预约进港日期 + List approachDateList_yw = new ArrayList<>(); + + //查出未完成的预约进港日期 + List mylist1 = null; + if (mylist != null && mylist.size() > 0) { + //查询当月未完工打卡的记录(不关心预约是否取消) + //mylist1 = Linq.of(mylist).where(p -> p.getPunch_clock_type() < 4 && p.getStart_time() != null).toList(); + mylist1 = Linq.of(mylist).where(p -> p.getPunch_clock_type() < 4).toList(); + List appointmentIdList1; + if (mylist1 != null && mylist1.size() > 0) { + appointmentIdList1 = Linq.of(mylist1).select(PunchClock::getAppointment_id).toList(); + if (appointmentIdList1 != null && appointmentIdList1.size() > 0) { + if (myappointmentList != null && myappointmentList.size() > 0) { + //未完成的 + List myappointmentList1 = Linq.of(myappointmentList).where(o -> appointmentIdList1.contains(o.getId())).toList(); + if (myappointmentList1 != null && myappointmentList1.size() > 0) { + approachDateList_ww = Linq.of(myappointmentList1).select(Appointment::getApproach_date).distinct().toList(); + } + } + } + } + } + + //查出已完成的预约进港日期 + List mylist2 = null; + if (mylist != null && mylist.size() > 0) { + //查询当月未完工打卡的记录(不关心预约是否取消) + mylist2 = Linq.of(mylist).where(p -> p.getPunch_clock_type() >= 4).toList(); + List appointmentIdList2; + if (mylist2 != null && mylist2.size() > 0) { + appointmentIdList2 = Linq.of(mylist2).select(PunchClock::getAppointment_id).toList(); + if (appointmentIdList2 != null && appointmentIdList2.size() > 0) { + if (myappointmentList != null && myappointmentList.size() > 0) { + //未完成的 + List myappointmentList2 = Linq.of(myappointmentList).where(o -> appointmentIdList2.contains(o.getId())).toList(); + if (myappointmentList2 != null && myappointmentList2.size() > 0) { + approachDateList_yw = Linq.of(myappointmentList2).select(Appointment::getApproach_date).distinct().toList(); + List finalApproachDateList_ww = approachDateList_ww; + approachDateList_yw = Linq.of(approachDateList_yw).where(o -> !finalApproachDateList_ww.contains(o)).toList(); + } + } + } + } + } + + //获得打卡记录的预约信息 + //判断请求是否成功 + Boolean bl = true; + //创建返回数据 + Map data = new HashMap<>(); + //data.put("PunchClockList", mylist); + data.put("approachDateList_ww", approachDateList_ww); + data.put("approachDateList_yw", approachDateList_yw); + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + + /** + * 获取港区中心点坐标 + * + * @param port_area_id 港区id + * @return 返回港区中心坐标 + */ + @RequestMapping("/getPortAreaPoi") + public String getPortAreaPoi(@RequestParam("port_area_id") String port_area_id) { + String msg = ""; + if (port_area_id == null || port_area_id.isEmpty()) { + msg = "港区Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + String poi = punchClockService.getPortAreaPoi(port_area_id); + //判断请求是否成功 + Boolean bl = poi != null && !poi.isEmpty(); + //创建返回数据 + Map data = new HashMap<>(); + data.put("poi", poi); + //封装数据 + //返回 + return response.getResponseData(bl, data); + } + + /** + * 获取排队编号 + * + * @param appointment_id : 预约编号 + * @return 返回排队编号 + */ + @RequestMapping("/getQueueNumber") + public String getQueueNumber(@RequestParam("appointment_id") String appointment_id) { + String msg = ""; + if (appointment_id == null || appointment_id.isEmpty()) { + msg = "预约Id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + String queue_number = punchClockService.getQueueNumber(appointment_id); + Appointment appointment = appointmentService.getAppointmentById(appointment_id); + + Integer x = null; + if (queue_number != null && !queue_number.isEmpty() && appointment != null) { + x = punchClockService.getNumberBefore(appointment.getApproach_date(), appointment.getPort_area_id(), queue_number); + } + + //判断请求是否成功 + Boolean bl = true; + //创建返回数据 + Map data = new HashMap<>(); + data.put("NumberBeforeCount", x); + data.put("queue_number", queue_number); + //封装数据 + //返回 + return response.getResponseData(bl, data); + } + + + /** + * 获取用户排队时前面还剩余多少位 + * + * @param approach_date:预约日期 + * @param port_area_id:进港港区 + * @param queue_number:排队编号 + * @return 返回结果 + */ + @RequestMapping("/getNumberBefore") + public String getNumberBefore(@RequestParam("approach_date") String approach_date, @RequestParam("port_area_id") String port_area_id, @RequestParam("queue_number") String queue_number) { + Integer x = punchClockService.getNumberBefore(approach_date, port_area_id, queue_number); + //判断请求是否成功 + Boolean bl = x != null; + //创建返回数据 + Map data = new HashMap<>(); + data.put("NumberBeforeCount", x); + data.put("queue_number", queue_number); + //封装数据 + //返回 + return response.getResponseData(bl, data); + } + + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/api/VehicleController.java b/wx-applet/src/main/java/com/haitongauto/rtosac/api/VehicleController.java new file mode 100644 index 0000000..8594a53 --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/api/VehicleController.java @@ -0,0 +1,362 @@ +package com.haitongauto.rtosac.api; + +import com.haitongauto.interfaces.OrderApi; +import com.haitongauto.models.ido.CheckRes; +import com.haitongauto.models.ido.CommonRes; +import com.haitongauto.models.ido.departure.DepartureDetailIdo; +import com.haitongauto.models.ido.departure.DepartureDetailIdo_DTO; +import com.haitongauto.models.ido.departure.DepartureVehicleIdo; +import com.haitongauto.models.ido.departure.DepartureVehicleIdo_DTO; +import com.haitongauto.models.ido.receiving.ReceivingDetailIdo; +import com.haitongauto.models.ido.receiving.ReceivingDetailIdo_DTO; +import com.haitongauto.models.ido.receiving.ReceivingVehicleIdo; +import com.haitongauto.models.ido.receiving.ReceivingVehicleIdo_DTO; +import com.haitongauto.models.pojo.Appointment; +import com.haitongauto.models.pojo.PunchClock; +import com.haitongauto.rtosac.service.AppointmentService; +import com.haitongauto.rtosac.service.PunchClockService; +import com.haitongauto.rtosac.service.Response; +import com.haitongauto.rtosac.service.VehicleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.*; + +@RestController +@RequestMapping("/vehicle") +public class VehicleController { + @Autowired + VehicleService vehicleService; + @Autowired + Response response; + @Autowired + AppointmentService appointmentService; + @Autowired + PunchClockService punchClockService; + @Resource + OrderApi orderApi; + + /** + * 获取收车凭证的分页数据(从Rtos请求数据) + * + * @param users_id 当前页码 + * @return 返回收车凭证的分页数据 + */ + @GetMapping("/getVehicleReceivingList") + public String getVehicleReceivingList(@RequestParam("users_id") String users_id, @RequestParam("printTicketTime") String printTicketTime, @RequestParam("query") String query, @RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize) { + //解析分页参数 + pageNum = (pageNum != null && pageNum > 0) ? pageNum : 1; + pageSize = (pageSize != null && pageSize > 0) ? pageSize : 10; + List myList = null; + + //通过RTOS接口读取收车凭证分页数据 + ReceivingVehicleIdo_DTO receivingVehicleIdo_dto = vehicleService.getVehicleReceivingList(printTicketTime, query, pageNum, pageSize); //当前页的列表数据 + String status = receivingVehicleIdo_dto.getStatus(); + //用户权限过期 + if ("401".equals(status)) { + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getRtosResponseData(bl, data, "401"); + } + + if ("200".equals(status)) { + myList = receivingVehicleIdo_dto.getReceivingVehicleIdoList(); + } + //判断请求是否成功 + Boolean bl = "200".equals(status); + //创建返回数据对象 + Map data = new HashMap<>(); + data.put("pageNum", pageNum); + if (myList != null && myList.size() > 0) { + //data.put("pageSize", pageSize); + data.put("pageSize", myList.size()); + data.put("ReceivingVehicleIdoList", myList); + } else { + data.put("pageSize", 0); + data.put("ReceivingVehicleIdoList", null); + } + + + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * 收车凭证详细信息(从Rtos请求数据) + * + * @param vehicle_receiving_id:收车id + * @return 返回收车凭证详细信息 + */ + @GetMapping("/getVehicleReceivingInfo") + public String getVehicleReceivingInfo(@RequestParam("vehicle_receiving_id") String vehicle_receiving_id) { + String msg = ""; + if (vehicle_receiving_id == null || vehicle_receiving_id.isEmpty()) { + msg = "收车凭证id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + return response.getResponseData(bl, data, msg); + } + //外部接口获取凭证数据 + ReceivingDetailIdo receivingDetailIdo = null; + ReceivingDetailIdo_DTO receivingDetailIdo_dto = vehicleService.getVehicleReceivingInfo(vehicle_receiving_id); + String status = receivingDetailIdo_dto.getStatus(); + //用户权限过期 + if ("401".equals(status)) { + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getRtosResponseData(bl, data, "401"); + } + if ("200".equals(status)) { + receivingDetailIdo = receivingDetailIdo_dto.getReceivingDetailIdo(); + } + //判断请求是否成功 + Boolean bl = "200".equals(status); + + //创建返回数据data + Map data = new HashMap<>(); + data.put("receivingDetailIdo", receivingDetailIdo); + //添加到返回对象 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * 完成收车核对 + * + * @param vehicle_receiving_id:收车id + * @param ttiId:预约id + * @return 返回收车核对结果 + */ + @GetMapping("/vehicleReceivingOver") + public String vehicleReceivingOver(@RequestParam("vehicle_receiving_id") String vehicle_receiving_id, @RequestParam("ttiId") String ttiId) { + String msg = null; + if (vehicle_receiving_id == null || vehicle_receiving_id.isEmpty()) { + msg = "收车凭证id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + return response.getResponseData(bl, data, msg); + } + if (ttiId == null || ttiId.isEmpty()) { + msg = "预约id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + return response.getResponseData(bl, data, msg); + } + //向哪吒提交完成收车核对请求 + //boolean res = vehicleService.vehicleReceivingOver(vehicle_receiving_id); + CommonRes res = orderApi.checkReceivingVehicle(vehicle_receiving_id); + //判断请求是否成功 + CheckRes myData = null; + //判断请求是否成功 + boolean bl = false; + if (res != null) { + myData = res.getData(); + bl = myData.isResult(); + msg = myData.getErrorMsg(); + } + + //如果核对成功,则修改预约/打卡状态 + if (bl) { + Appointment myAppointment = appointmentService.getAppointmentById(ttiId); + if (myAppointment == null) { + msg = "当前收车凭证id为 " + vehicle_receiving_id + ", 预约id为" + ttiId + ",但未找到对应的预约信息,无法进行完工打卡"; + //判断请求是否成功 + bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + return response.getResponseData(bl, data, msg); + } + + PunchClock myPunchClock = punchClockService.getPunchClockForAppintementId(ttiId); + if (myPunchClock != null && myPunchClock.getId() != null && !myPunchClock.getId().isEmpty()) { + PunchClock punchClock = punchClockService.postPunchClockOver(ttiId, myPunchClock.getId(), myPunchClock.getOver_address()); + } + } + + //创建返回数据对象 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + + /** + * 提车凭证分页列表数据(从Rtos请求数据) + * + * @param users_id 当前页码 + * @return 分页数据 + */ + @GetMapping("/getVehicleDepartureInfoList") + public String getVehicleDepartureInfoList(@RequestParam("users_id") String users_id, @RequestParam("printTicketTime") String printTicketTime, @RequestParam("query") String query, @RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize) { + String msg = ""; + //解析分页参数 + pageNum = (pageNum != null && pageNum > 0) ? pageNum : 1; + pageSize = (pageSize != null && pageSize > 0) ? pageSize : 10; + System.out.print("当前页码:" + pageNum + ",数据条数:" + pageSize); + //通过RTOS接口读取提车凭证分页数据 + List myList = null; + //通过RTOS接口读取收车凭证分页数据 + DepartureVehicleIdo_DTO departureVehicleIdo_dto = vehicleService.getVehicleDepartureInfoList(printTicketTime, query, pageNum, pageSize); //当前页的列表数据 + String status = departureVehicleIdo_dto.getStatus(); + //用户权限过期 + if ("401".equals(status)) { + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getRtosResponseData(bl, data, "401"); + } + if ("200".equals(status)) { + myList = departureVehicleIdo_dto.getDepartureVehicleIdoList(); + } + //判断请求是否成功 + Boolean bl = "200".equals(status); + //创建返回数据对象 + Map data = new HashMap<>(); + data.put("pageNum", pageNum); + if (myList != null && myList.size() > 0) { + data.put("pageSize", myList.size()); + data.put("departureVehicleIdoList", myList); + } else { + data.put("pageSize", 0); + data.put("departureVehicleIdoList", null); + } + + //封装数据 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * 提车凭证详细信息(从Rtos请求数据) + * + * @param vehicle_departure_id 提车凭证详id + * @return 返回提车凭证详细信息 + */ + @GetMapping("/getVehicleDepartureInfo") + public String getVehicleDepartureInfo(@RequestParam("vehicle_departure_id") String vehicle_departure_id) { + String msg = ""; + if (vehicle_departure_id == null || vehicle_departure_id.isEmpty()) { + msg = "提车凭证id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + return response.getResponseData(bl, data, msg); + } + DepartureDetailIdo departureDetailIdo = null; + //获取指定发车信息 + DepartureDetailIdo_DTO departureDetailIdo_dto = vehicleService.getVehicleDepartureInfo(vehicle_departure_id); + //判断请求是否成功 + String status = departureDetailIdo_dto.getStatus(); + //用户权限过期 + if ("401".equals(status)) { + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getRtosResponseData(bl, data, "401"); + } + if ("200".equals(status)) { + departureDetailIdo = departureDetailIdo_dto.getDepartureDetailIdo(); + } + //判断请求是否成功 + Boolean bl = "200".equals(status); + //创建返回数据data + Map data = new HashMap<>(); + data.put("departureDetailIdo", departureDetailIdo); + //添加到返回对象 + //返回 + return response.getResponseDataJavaJson(bl, data); + } + + /** + * 完成提车核对 + * + * @param vehicle_departure_id 提车凭证id + * @param ttiId:预约id + * @return 返回完成提车核对结果 + */ + @GetMapping("/VehicleDepartureOver") + public String VehicleDepartureOver(@RequestParam("vehicle_departure_id") String vehicle_departure_id, @RequestParam("ttiId") String ttiId) { + String msg = ""; + if (vehicle_departure_id == null || vehicle_departure_id.isEmpty()) { + msg = "提车凭证id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + return response.getResponseData(bl, data, msg); + } + if (ttiId == null || ttiId.isEmpty()) { + msg = "预约id不能为空"; + //判断请求是否成功 + Boolean bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + return response.getResponseData(bl, data, msg); + } + //向哪吒提交完成提车核对请求 + CommonRes res = orderApi.checkDepartureVehicle(vehicle_departure_id); + CheckRes myData = null; + //判断请求是否成功 + boolean bl = false; + if (res != null) { + myData = res.getData(); + bl = myData.isResult(); + msg = myData.getErrorMsg(); + } + + //如果核对成功,则修改预约/打卡状态 + if (bl) { + Appointment myAppointment = appointmentService.getAppointmentById(ttiId); + if (myAppointment == null) { + msg = "当前发车凭证id为 " + vehicle_departure_id + ", 预约id为" + ttiId + ",但未找到对应的预约信息,无法进行完工打卡"; + //判断请求是否成功 + bl = false; + //创建返回数据 + Map data = new HashMap<>(); + //封装数据 + return response.getResponseData(bl, data, msg); + } + PunchClock myPunchClock = punchClockService.getPunchClockForAppintementId(ttiId); + if (myPunchClock != null && myPunchClock.getId() != null && !myPunchClock.getId().isEmpty()) { + PunchClock punchClock = punchClockService.postPunchClockOver(ttiId, myPunchClock.getId(), myPunchClock.getOver_address()); + } + } + //创建返回数据对象 + Map data = new HashMap<>(); + //封装数据 + //返回 + return response.getResponseData(bl, data, msg); + } + + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/service/AppointmentService.java b/wx-applet/src/main/java/com/haitongauto/rtosac/service/AppointmentService.java new file mode 100644 index 0000000..f3879c9 --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/service/AppointmentService.java @@ -0,0 +1,109 @@ +package com.haitongauto.rtosac.service; + +import com.haitongauto.models.dto.AppointmentDto; +import com.haitongauto.models.pojo.*; + +import java.util.List; + +public interface AppointmentService { + + /** + * 发起预约,根据用户Id获取用户板车注册信息 + * + * @param users_id 用户id + * @return 返回用户板车注册信息 + */ + Truck getPalletTruck(String users_id); + + /** + * 提交预约信息 + * + * @param appointment 预约数据实体 + * @return 返回提交结果 + */ + Integer postAppointment(Appointment appointment); + + /** + * 提交预约信息 + * + * @param appointment 预约数据实体 + * @return 返回提交结果 + */ + Integer postAppointmentDetailList(Appointment appointment, List appointmentDetailList); + + /** + * 查询指定用户是否存在已预约但未完成预约信息 + * + * @param users_id 司机id + * @return 返回查询结果 + */ + Appointment getActiveAppointment(String users_id); + + /** + * 取消预约 + * + * @param appointment_id 预约id + * @return 返回执行取消预约的结果 + */ + Integer cancelAppointment(String appointment_id); + + /** + * 根据车牌号获取该用户的当前预约 + * + * @param truck_number 车牌号 + * @return 返回当前预约 + */ + Appointment getAppointmentByTruckNo(String truck_number); + + /** + * 通过更新一条预约信息,实现预约记录的进出港状态更新 + * + * @param appointment 预约数据实体 + * @return 返回更新执行结果 + */ + Integer updateAppointment(Appointment appointment); + + Integer updateAppointmentDetailList(Appointment appointment, List appointmentDetailList); + + /** + * 查询指定用户和指定车辆是否存在已预约但未完成预约信息 + * + * @param users_id 用户id + * @param truck_number 车牌号 + * @return 返回查询结果 + */ + Appointment getActiveAppointmentByUserAndTruck(String users_id, String truck_number); + + /** + * 根据id获得预约信息 + * + * @param id 预约id + * @return 返回预约信息 + */ + Appointment getAppointmentById(String id); + + List getAppointmentDetailListByAppointmentId(String appointment_id); + + AppointmentDto getAppointmentDtoById(String id); + + + /** + * 查询用户当天在外高桥港区未离港的预约 + * + * @param users_id 用户id + * @param port_area_id 港区id + * @param approach_date 进港日期 + * @return 返回预约信息 + */ + Appointment getAppointmentByUserIdAndPortAreaIdAndApproachDate(String users_id, String port_area_id, String approach_date); + + Integer updateAppointmentPlateScanTime(String appointment_id); + + List getAppointmentDetailListByGoodVinList(List vinlist); + + //根据 Vin列表查询匹配的商品车明细,并筛选出不属于已取消和异常的预约的 + List getAppointmentDetailListByVinList(List vinlist); + + Integer deleteAppointmentDetailByAppointmentId(String appointment_id); + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/service/HomeService.java b/wx-applet/src/main/java/com/haitongauto/rtosac/service/HomeService.java new file mode 100644 index 0000000..23a3517 --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/service/HomeService.java @@ -0,0 +1,132 @@ +package com.haitongauto.rtosac.service; + +import com.github.pagehelper.PageInfo; +import com.haitongauto.models.dto.DataForMessage; +import com.haitongauto.models.ido.login.PostLoginRes; +import com.haitongauto.models.pojo.Users; +import com.haitongauto.models.pojo.Truck; +import com.haitongauto.models.pojo.Announcement; +import org.springframework.web.multipart.MultipartFile; + +import java.io.File; +import java.util.Map; + +public interface HomeService { + + Users getUsersForId(String id); + + /** + * 根据用户的小程序 openid 获取用户在数据库里的数据 + * + * @param wx_openid 微信openid + * @return 返回用户信息 + */ + Users getUsersForOpenId(String wx_openid); + + String insertTruck(Truck truck); + + Integer updateTruck(Truck truck); + + /** + * 用户/车辆注册 + * + * @param users 用户 + * @return 返回执行结果 + */ + PostLoginRes postLogin(Users users); + + /** + * 写入登录日志 + * + * @param wx_openid wx_openid + * @param ip ip地址 + */ + void loginLogAdd(String wx_openid, String ip); + + /** + * 分页读取每页10条公告数据 + * + * @param pageNum 页码 + * @param pageSize 数据条数 + * @return 返回分页数据 + */ + PageInfo getAnnouncementsList(Integer pageNum, Integer pageSize,Integer sort,String keyWords); + + /** + * 根据公告id获得公告 + * @param announcement_id 公告id + * @return 返回公告信息 + */ + Announcement getAnnouncementById(String announcement_id); + + /** + * 读取系统服务路径 + * @return 返回系统服务路径 + */ + String getServiceBaseUrl(); + + /** + * 读取图片访问路径 + * @return 返回图片路径 + */ + String getImgAccessUrl(); + + /** + * 根据配置编号获取配置值 + * + * @param config_code 配置编号 + * @return 返回配置值 + */ + String getServiceConfigForCode(String config_code); + + /** + * 获取外部接口数据 + * + * @param request_type : 请求类型参数,取值于Requester表 + * @param myParamMap :实时传值,其键值对与 Requester表param字段的键值对对应 + * @return 返回外部接口数据 + */ + String getExternalInterfaceData(Integer request_type, Map myParamMap); + + /** + * 发送订阅消息 + * + * @param dataForMessage:订阅消息发送数据类的实例 + * @return 发送失败的错误信息 + */ + String sendMessage(DataForMessage dataForMessage); + + /** + * 返回文件后缀 + * + * @param file 文件 + * @return 返回文件后缀 + */ + String getImagePath(MultipartFile file); + + /** + * 保存图片 + * + * @param mfile 文件 + * @param file 文件 + * @return 返回执行结果 + */ + boolean saveImage(MultipartFile mfile, File file); + + /** + * 新文件名 + * + * @param suffix suffix + * @return 返回文件名 + */ + String getNewFileName(String suffix); + + /** + * 返回图片保存地址 + * + * @param name 文件名 + * @return 返回图片保存地址 + */ + String getNewImagePath(String name); + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/service/MessageService.java b/wx-applet/src/main/java/com/haitongauto/rtosac/service/MessageService.java new file mode 100644 index 0000000..a28e132 --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/service/MessageService.java @@ -0,0 +1,31 @@ +package com.haitongauto.rtosac.service; +import com.github.pagehelper.PageInfo; +import com.haitongauto.models.pojo.Message; + +public interface MessageService { + + String insert(Message message); + + int update(Message message); + + /** + * 哪吒打印的时候向小程序发送消息(哪吒请求接口) + * + * @param message 消息实体 + * @return 返回结果 + */ + boolean receiveMessage(Message message); + + /** + * 根据板车号获得该板车最新消息 + * + * @param type 收车/发车 + * @return 返回消息 + */ + Message getLastMessageByTypeAndBizId(Integer type, String biz_id); + + PageInfo getUnReadMessageListByWxOpenid(String wxOpenid, Integer pageNum, Integer pageSize ) ; + + PageInfo getMessageListByWxOpenid(String wxOpenid,Integer pageNum,Integer pageSize ) ; + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/service/MineService.java b/wx-applet/src/main/java/com/haitongauto/rtosac/service/MineService.java new file mode 100644 index 0000000..4ca091d --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/service/MineService.java @@ -0,0 +1,101 @@ +package com.haitongauto.rtosac.service; + +import com.github.pagehelper.PageInfo; +import com.haitongauto.models.pojo.*; +import java.util.List; + +public interface MineService { + + /** + * 个人资料修改 + * @param users 用户(司机) + * @return 返回修改结果 + */ + Integer postMyUsers(Users users); + + /** + * 获取我的板车信息 + * @param users_id 司机id + * @return 返回我的板车信息 + */ + List getMyPalletTruck(String users_id); + + /** + * 修改或添加我的板车信息 + * @param palletTruck 板车数据实体 + * @return 返回执行结果 + */ + Integer postMyPalletTruck(Truck palletTruck); + + /** + * 删除我的板车信息 + * @param palletTruck_id 板车id + * @return 返回执行结果 + */ + Integer delMyPalletTruck(String palletTruck_id); + + /** + * 我的车辆黑名单信息 truck_management + * @param users_id 司机id + * @return 返回我的车辆黑名单信息 + */ + List getMyTruckManagement(String users_id); + + /** + * 提交反馈意见 + * @param feedback 反馈意见数据实体 + * @return 返回执行结果 + */ + Integer postFeedback(Feedback feedback); + + /** + * 我的预约信息列表 + * @param users_id 司机id + * @return 返回我的预约信息列表 + */ + List getMyAppointmentList(String users_id); + + /** + * 我的预约信息模糊查询分页列表 + * @param users_id 司机id + * @param keywords 查询关键字 + * @param approach_date 进场日期 + * @param pageNum 页码 + * @param pageSize 数据条数 + * @return 返回我的预约信息模糊查询分页列表 + */ + PageInfo getMyAppointmentListForPage(String users_id, String keywords, String approach_date, Integer pageNum, Integer pageSize); + + PageInfo getMyAppointmentListForPageNew(String users_id, String keywords, String approach_date, Integer pageNum, Integer pageSize); + + /** + * 我的预约信息按日期查询分页列表 + * @param users_id 司机id + * @param approach_date 预约进场日期 + * @param pageNum 页码 + * @param pageSize 数据条数 + * @return 返回我的预约信息按日期查询分页列表 + */ + PageInfo getMyAppointmentListByDateForPage(String users_id,String approach_date, Integer pageNum, Integer pageSize); + + /** + * 新手攻略 + * @return 返回新手攻略 + */ + List getNoviceIntroduction(); + + /** + * 获取我的当前预约 + * @param users_id 用户id + * @return 返回获取我的当前预约 + */ + Appointment getMyAppointment(String users_id); + + /** + * 根据Id获取用户信息 + * @param users_id 用户id + * @return 返回用户信息 + */ + Users getUsersById(String users_id); + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/service/NewsService.java b/wx-applet/src/main/java/com/haitongauto/rtosac/service/NewsService.java new file mode 100644 index 0000000..7d47415 --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/service/NewsService.java @@ -0,0 +1,17 @@ +package com.haitongauto.rtosac.service; +import com.haitongauto.models.pojo.EntryInstruct; +import com.haitongauto.models.pojo.Requester; +import java.util.List; + +public interface NewsService { + + /** + * 获取发送给指定用户的(最近10条)指令信息 + * @param users_id 用户id + * @return 返回定用户的(最近10条)指令信息 + */ + List getEntryInstructionsForUsers(String users_id); + + Requester getRequesterForType(Integer requestType); + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/service/PunchClockService.java b/wx-applet/src/main/java/com/haitongauto/rtosac/service/PunchClockService.java new file mode 100644 index 0000000..4ec818f --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/service/PunchClockService.java @@ -0,0 +1,110 @@ +package com.haitongauto.rtosac.service; + +import com.haitongauto.models.pojo.Appointment; +import com.haitongauto.models.pojo.PortArea; +import com.haitongauto.models.pojo.PunchClock; + +import javax.xml.crypto.Data; +import java.util.Date; +import java.util.List; + +public interface PunchClockService { + /** + * 检查是否有预约(查询是否存在有预约待签到)的预约数据 + * + * @param users_id 用户id + * @return 返回预约信息 + */ + Appointment getIincompleteAppointment(String users_id); + + /** + * 签到打卡提交 + * + * @param users_id 用户id + * @param appointment_id 预约id + * @param port_area_id 港区id + * @param punch_poi 坐标 + * @return 返回提交结果 + */ + PunchClock postPunchClockStart(String users_id, String appointment_id, String port_area_id, String punch_poi, String punch_address); + + /** + * 完成打卡提交 + * + * @param appointment_id 预约id + * @param punch_clock_id 打卡id + * @param over_address 打卡地址 + * @return 返回完成打卡提交执行结果 + */ + PunchClock postPunchClockOver(String appointment_id, String punch_clock_id, String over_address); + + /** + * 根据预约Id获取获取打卡记录 + * + * @param appointment_id 预约id + * @return 返回打卡记录 + */ + PunchClock getPunchClockForAppintementId(String appointment_id); + + /** + * 查询指定司机某一天(指定日期)的打卡记录 + * + * @param date 指定日期 + * @param users_id 用户id + * @return 返回打卡记录列表 + */ + List getPunchClockForDate(String date, String users_id); + + /** + * 查询指定司机某年某月的打卡记录 + * + * @param year 年 + * @param month 月 + * @param users_id 用户id + * @return 返回打卡记录列表 + */ + List getPunchClockForYM(Integer year, Integer month, String users_id); + + /** + * 获取港区 + * + * @param port_area_id 港区id + * @return 返回港区信息 + */ + PortArea getPortAreaForId(String port_area_id); + + /** + * 获取港区中心点坐标 + * + * @param port_area_id 港区id + * @return 返回港区中心点坐标 + */ + String getPortAreaPoi(String port_area_id); + + /** + * 获取签到打卡排队序号 + * + * @param appointment_id 预约id + * @return 返回签到打卡排队序号 + */ + String getQueueNumber(String appointment_id); + + /** + * 获取当前排队前面还剩多少车辆未进港 + * + * @param approach_date 进场日期 + * @param port_area_id 港区id + * @param queue_number 排队号 + * @return 返回查询结果 + */ + Integer getNumberBefore(String approach_date, String port_area_id, String queue_number); + + Integer updatePunchClock(PunchClock punchClock); + + + String getLastQueueNumber(Date date, String port_area_id); + + + + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/service/Response.java b/wx-applet/src/main/java/com/haitongauto/rtosac/service/Response.java new file mode 100644 index 0000000..5c271d8 --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/service/Response.java @@ -0,0 +1,42 @@ +package com.haitongauto.rtosac.service; + +public interface Response { + /** + * 封装为返回Json对象 + * + * @param bl:请求是否成功 + * @param data:返回数据 + * @return 返回Json对象 + */ + String getResponseData(Boolean bl, Object data); + + /** + * 封装为返回Json对象 + * + * @param bl 请求是否成功 + * @param data 返回数据 + * @param msg 消息 + * @return 返回Json对象 + */ + String getResponseData(Boolean bl, Object data, String msg); + + /** + * 封装为返回Json对象(带null) + * @param bl:请求是否成功 + * @param data:返回数据 + * @return 返回Json对象 + */ + String getResponseDataJavaJson(Boolean bl,Object data); + + + /** + * 封装为返回Json对象(带null) + * @param bl:请求是否成功 + * @param data:返回数据 + * @return 返回Json对象 + */ + String getRtosResponseData(Boolean bl,Object data,String errorCode); + + + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/service/UsersService.java b/wx-applet/src/main/java/com/haitongauto/rtosac/service/UsersService.java new file mode 100644 index 0000000..05b3c90 --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/service/UsersService.java @@ -0,0 +1,13 @@ +package com.haitongauto.rtosac.service; +import com.haitongauto.models.pojo.Truck; +import com.haitongauto.models.pojo.Users; + +public interface UsersService { + String insert(Users users); + + Integer update(Users users); + + Truck getTruckByWxOpenID(String wx_openid); + + Truck getTruckByUserId(String userId); +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/service/VehicleService.java b/wx-applet/src/main/java/com/haitongauto/rtosac/service/VehicleService.java new file mode 100644 index 0000000..b1ab4ad --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/service/VehicleService.java @@ -0,0 +1,59 @@ +package com.haitongauto.rtosac.service; +import com.haitongauto.models.ido.departure.DepartureDetailIdo_DTO; +import com.haitongauto.models.ido.departure.DepartureVehicleIdo_DTO; +import com.haitongauto.models.ido.receiving.ReceivingDetailIdo_DTO; +import com.haitongauto.models.ido.receiving.ReceivingVehicleIdo_DTO; +public interface VehicleService { + /** + * 获取收车凭证的分页数据 + * + * @param current 当前页码 + * @param size 数据条数(非必填) + * @return 返回收车凭证的分页数据 + */ + ReceivingVehicleIdo_DTO getVehicleReceivingList(String printTicketTime, String query, Integer current, Integer size); + //ReceivingVehicleIdo_DTO getVehicleReceivingList(String access_token, Integer current, Integer size); + + /** + * 获取指定id的待核对收车凭证信息 + * access_token 访问令牌(根据该用户access_token权限获得该用户的收车凭证)用户登录后前端会保存access_token + * + * @param id 收车凭证id + * @return 返回收车凭证信息 + */ + ReceivingDetailIdo_DTO getVehicleReceivingInfo(String id); + + /** + * 完成收车核对 + * + * @param id 收车凭证id + * @return 返回核对结果 + */ + boolean vehicleReceivingOver(String id); + + /** + * 获取提车凭证的分页数据 + * + * @param current 当前页码 + * @param size 数据条数(非必填) + * @return 返回提车凭证的分页数据 + */ + DepartureVehicleIdo_DTO getVehicleDepartureInfoList(String printTicketTime, String query, Integer current, Integer size); + + /** + * 获取指定id的待核对提车信息 + * + * @param id 待提车id + * @return 返回指定id的待核对提车信息 + */ + DepartureDetailIdo_DTO getVehicleDepartureInfo(String id); + + /** + * 完成发车核对 + * + * @param id 提车凭证id + * @return 返回提车凭证id的提车信息 + */ + boolean VehicleDepartureOver(String id); + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/AppointmentServiceImpl.java b/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/AppointmentServiceImpl.java new file mode 100644 index 0000000..cca883f --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/AppointmentServiceImpl.java @@ -0,0 +1,468 @@ +package com.haitongauto.rtosac.service.impl; + +import com.bestvike.linq.Linq; +import com.haitongauto.interfaces.DicInterface; +import com.haitongauto.interfaces.EnterPortTypeInterface; +import com.haitongauto.interfaces.PortAreaInterface; +import com.haitongauto.mapper.base.*; +import com.haitongauto.mapper.client.PunchClockExtendMapper; +import com.haitongauto.mapper.client.TruckExtendMapper; +import com.haitongauto.models.dto.AppointmentDto; +import com.haitongauto.models.dto.DicDto; +import com.haitongauto.models.dto.EnterPortTypeDtol; +import com.haitongauto.models.pojo.*; +import com.haitongauto.rtosac.service.AppointmentService; +import com.haitongauto.mapper.client.AppointmentExtendMapper; +import com.haitongauto.utils.FormatDateTime; +import com.haitongauto.utils.QueueNumberHelper; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; +import java.util.UUID; + +@Slf4j +@Service +public class AppointmentServiceImpl implements AppointmentService { + @Autowired + PunchClockExtendMapper punchClockExtendMapper; + @Autowired + PunchClockMapper punchClockMapper; + @Autowired + TruckMapper truckMapper; + @Autowired + PortAreasMapper portAreasMapper; + @Autowired + AppointmentMapper appointmentMapper; + @Autowired + AppointmentDetailMapper appointmentDetailMapper; + @Autowired + AppointmentExtendMapper appointmentExtendMapper; + @Autowired + TruckExtendMapper truckExtendMapper; + @Autowired + PortAreaInterface portAreaInterface; + @Autowired + DicInterface dicInterface; + @Autowired + EnterPortTypeInterface enterPortTypeInterface; + @Autowired + UsersMapper usersMapper; + + + /** + * (发起预约时)获取用户注册的板车信息 + * + * @param users_id 司机id + * @return 返回用户注册的板车信息 + */ + @Override + public Truck getPalletTruck(String users_id) { + //获取该用户的板车信息 + return truckMapper.getTruckByUsersId(users_id); + } + + /** + * 提交预约信息 + * + * @param appointment 预约数据实体 + * @return 返回提交结果 + */ + @Override + public Integer postAppointment(Appointment appointment) { + Integer res = 0; + String id = appointment.getId(); + if (id == null || id.isEmpty()) { + //插入 + String uuid = UUID.randomUUID().toString().replace("-", "").toLowerCase(); + appointment.setId(uuid); + //数据补全 + String myDate = FormatDateTime.dateTimeToStr(new Date()); + appointment.setAppointment_state(1); + appointment.setCreate_time(myDate); + appointment.setUpdate_time(myDate); + appointment.setIs_del(0); + //写入 + String myId = appointmentMapper.insert(appointment); + res = (myId != null && myId.length() > 0) ? 1 : null; + //插入打卡记录 + if (res != null) { + PunchClock punchClock = new PunchClock(); + punchClock.setId(UUID.randomUUID().toString().replace("-", "").toLowerCase()); + punchClock.setPunch_clock_type(0); + punchClock.setPort_area_id(appointment.getPort_area_id()); + punchClock.setAppointment_id(appointment.getId()); + punchClock.setUsers_id(appointment.getUsers_id()); + punchClock.setIs_del(0); + String punchClockId = punchClockMapper.insert(punchClock); + } + + } else { + //修改 + res = appointmentMapper.update(appointment); + if (res != null) { + PunchClock myPunchClock = punchClockMapper.getPunchClockByAppointmentId(appointment.getId()); + if (myPunchClock != null) { + myPunchClock.setPort_area_id(appointment.getPort_area_id()); + myPunchClock.setAppointment_id(appointment.getId()); + myPunchClock.setUsers_id(appointment.getUsers_id()); + myPunchClock.setIs_del(0); + Integer x = punchClockMapper.update(myPunchClock); + } + } + + } + //返回 + return res; + } + + /** + * 预约明细提交 + * + * @param appointment 预约数据实体 + * @param appointmentDetailList 明细列表 + * @return 返回执行影响条数 + */ + @Override + public Integer postAppointmentDetailList(Appointment appointment, List appointmentDetailList) { + int res = 0; + if (appointment == null || appointmentDetailList == null || appointmentDetailList.size() == 0) { + return res; + } + List myAppointmentDetailList = appointmentDetailMapper.getAppointmentDetailListByAppointmentId(appointment.getId()); + for (AppointmentDetail appointmentDetail : appointmentDetailList) { + AppointmentDetail myAppointmentDetail = null; + if (myAppointmentDetailList != null && myAppointmentDetailList.size() > 0) { + myAppointmentDetail = Linq.of(myAppointmentDetailList).firstOrDefault(p -> p.getVin().equals(appointmentDetail.getVin())); + } + //新增 + if (myAppointmentDetail == null) { + appointmentDetail.setAppointment_id(appointment.getId()); + appointmentDetail.setId(UUID.randomUUID().toString().replace("-", "").toLowerCase()); + appointmentDetail.setIs_del(0); + String r = appointmentDetailMapper.insert(appointmentDetail); + if (r != null && !r.equals("")) { + res = res + 1; + } + } else { + //修改 + appointmentDetail.setIs_del(0); + int x = appointmentDetailMapper.update(appointmentDetail); + res = res + x; + } + } + return res; + } + + /** + * 查询指定用户是否存在已预约但未完成预约信息 + * + * @param users_id 司机id + * @return 返回查询结果 + */ + @Override + public Appointment getActiveAppointment(String users_id) { + // Users users = usersMapper.getById(users_id); + return appointmentExtendMapper.getActiveAppointment(users_id); + } + + /** + * 取消预约 + * + * @param appointment_id 预约id + * @return 返回执行取消预约的结果 + */ + @Override + public Integer cancelAppointment(String appointment_id) { + String cancel_time = FormatDateTime.dateTimeToStr(new Date()); + int x = 0; + //取消预约 + x = appointmentExtendMapper.cancelAppointment(cancel_time, appointment_id); + //取消对应的预约明细 + //int count = appointmentExtendMapper.cancelAppointmentDetails(appointment_id); + + return x; + } + + /** + * 根据车牌号获取该用户的当前预约 + * + * @param truck_number 车牌号 + * @return 返回当前预约 + */ + @Override + public Appointment getAppointmentByTruckNo(String truck_number) { + Appointment appointment = null; + List appointmentList = appointmentList = appointmentMapper.getListByTruckName(truck_number); + if (appointmentList != null && appointmentList.size() > 0) { + appointment = Linq.of(appointmentList).firstOrDefault(); + } + return appointment; + } + + /** + * 通过更新一条预约信息,实现预约记录的进出港状态更新 + * + * @param appointment 预约数据实体 + * @return 返回更新执行结果 + */ + @Override + public Integer updateAppointment(Appointment appointment) { + return appointmentMapper.update(appointment); + } + + /** + * 预约明细提交 + * + * @param appointment 预约数据实体 + * @param appointmentDetailList 明细列表 + * @return 返回执行影响条数 + */ + @Override + public Integer updateAppointmentDetailList(Appointment appointment, List appointmentDetailList) { + int res = 0; + if (appointment == null || appointmentDetailList == null || appointmentDetailList.size() == 0) { + return res; + } + String appointmentId = appointment.getId(); + if (appointmentId == null || appointmentId.isEmpty()) { + return res; + } + + //删除修改前的预约明细 + int result = appointmentDetailMapper.deleteAppointmentDetailByAppointmentId(appointmentId); + for (AppointmentDetail appointmentDetail : appointmentDetailList) { + //新增 + if (appointmentDetail != null) { + appointmentDetail.setAppointment_id(appointment.getId()); + appointmentDetail.setId(UUID.randomUUID().toString().replace("-", "").toLowerCase()); + appointmentDetail.setIs_del(0); + String r = appointmentDetailMapper.insert(appointmentDetail); + if (r != null && !r.isEmpty()) { + res = res + 1; + } + } + + } + return res; + } + + /** + * 查询指定用户和指定车辆是否存在已预约但未完成预约信息 + * + * @param users_id 用户id + * @param truck_number 车牌号 + * @return 返回查询结果 + */ + @Override + public Appointment getActiveAppointmentByUserAndTruck(String users_id, String truck_number) { + return appointmentExtendMapper.getActiveAppointmentByUserAndTruck(users_id, truck_number); + } + + /** + * 根据id获得预约信息 + * + * @param id 预约id + * @return 返回预约信息 + */ + @Override + public Appointment getAppointmentById(String id) { + return appointmentMapper.getById(id); + } + + @Override + public List getAppointmentDetailListByAppointmentId(String appointment_id) { + return appointmentDetailMapper.getAppointmentDetailListByAppointmentId(appointment_id); + } + + @Override + public AppointmentDto getAppointmentDtoById(String id) { + Appointment appointment = appointmentMapper.getById(id); + if (appointment == null) { + return null; + } + AppointmentDto appointmentDto = new AppointmentDto(); + //港区 + String port_area_id = appointment.getPort_area_id(); + List portAreaList = portAreaInterface.getPortArea(); + PortArea portArea = null; + if (portAreaList != null) { + portArea = Linq.of(portAreaList).firstOrDefault(p -> p.getId().equals(port_area_id)); + } + //运输方式 + String transport_type = appointment.getTransport_type(); + List transportTypelist = dicInterface.getDicList("TRANSPORT_TYPE"); + DicDto transportType = null; + if (transportTypelist != null) { + transportType = Linq.of(transportTypelist).firstOrDefault(p -> p.getId().equals(transport_type)); + } + //进港类型 + String enter_type = appointment.getEnter_type(); + List enterTypelist = enterPortTypeInterface.getEnterPortTypeList(); + EnterPortTypeDtol enterType = null; + if (enterTypelist != null) { + enterType = Linq.of(enterTypelist).firstOrDefault(p -> p.getId().equals(enter_type)); + } + //货物类型 + String goods_type = appointment.getGoods_type(); + List goodsTypelist = dicInterface.getDicList("APP_CARGO_TYPE"); + DicDto goodsType = null; + if (goodsTypelist != null) { + goodsType = Linq.of(goodsTypelist).firstOrDefault(p -> p.getId().equals(goods_type)); + } + + appointmentDto.setId(appointment.getId()); + appointmentDto.setBiz_type(appointment.getBiz_type()); + appointmentDto.setUsers_id(appointment.getUsers_id()); + appointmentDto.setTruck_number(appointment.getTruck_number()); + appointmentDto.setId_code(appointment.getId_code()); + appointmentDto.setTel_number(appointment.getTel_number()); + appointmentDto.setTruck_vin(appointment.getTruck_vin()); + appointmentDto.setVehicle_weight(appointment.getVehicle_weight()); + appointmentDto.setVehicle_frame_weight(appointment.getVehicle_frame_weight()); + appointmentDto.setDriving_license(appointment.getDriving_license()); + appointmentDto.setApproach_date(appointment.getApproach_date()); + appointmentDto.setGoods_quantity(appointment.getGoods_quantity()); + appointmentDto.setAppointment_state(appointment.getAppointment_state()); + appointmentDto.setCancel_time(appointment.getCancel_time()); + appointmentDto.setCreate_time(appointment.getCreate_time()); + appointmentDto.setUpdate_time(appointment.getUpdate_time()); + appointmentDto.setIs_del(appointment.getIs_del()); + appointmentDto.setPort_area_id(appointment.getPort_area_id()); + appointmentDto.setAppointment_type(appointment.getAppointment_type()); + if (appointmentDto.getAppointment_state().equals(1)) { + appointmentDto.setAppointment_type_name("普通码头预约"); + } + if (appointmentDto.getAppointment_state().equals(2)) { + appointmentDto.setAppointment_type_name("特保区预约"); + } + if (portArea != null) { + appointmentDto.setPort_area_name(portArea.getPort_area_name()); + } + appointmentDto.setEnter_type(appointment.getEnter_type()); + if (enterType != null) { + appointmentDto.setEnter_type_name(enterType.getText()); + } + appointmentDto.setGoods_type(appointment.getGoods_type()); + if (goodsType != null) { + appointmentDto.setGoods_type_name(goodsType.getText()); + } + appointmentDto.setTransport_type(appointment.getTransport_type()); + if (transportType != null) { + appointmentDto.setTransport_type_name(transportType.getText()); + } + + return appointmentDto; + } + + + /** + * 查询用户当天在外高桥港区未离港的预约 + * + * @param users_id 用户id + * @param port_area_id 港区id + * @param approach_date 进港日期 + * @return 返回预约信息 + */ + @Override + public Appointment getAppointmentByUserIdAndPortAreaIdAndApproachDate(String users_id, String port_area_id, String approach_date) { + return appointmentMapper.getAppointmentByUserIdAndPortAreaIdAndApproachDate(users_id, port_area_id, approach_date); + } + + /** + * 修改预约板车扫描时间 + * + * @param appointment_id 预约id + * @return 结果 + */ + @Override + public Integer updateAppointmentPlateScanTime(String appointment_id) { + //板车扫描时间: 如果未进港,改成已进港,同时记录进港时间 + Appointment appointment = appointmentMapper.getById(appointment_id); + if (appointment == null) { + return 0; + } + Date now = new Date(); + //签到时间 + if (appointment.getCheck_in_time() == null || appointment.getCheck_in_time().isEmpty()) { + appointment.setCheck_in_time(FormatDateTime.dateTimeToStr(now)); + } + //进闸口时间 + if (appointment.getGate_canal_in_time() == null || appointment.getGate_canal_in_time().isEmpty()) { + appointment.setGate_canal_in_time(FormatDateTime.dateTimeToStr(now)); + } + //收车扫描,状态可以改为作业中(5) + if (appointment.getAppointment_state() < 5) { + appointment.setAppointment_state(5); + } + //收车扫描时间 + appointment.setPlate_scan_time(FormatDateTime.dateTimeToStr(now)); + + int res = appointmentMapper.update(appointment); + //完善签到打卡() + if (res > 0) { + PunchClock punchClock = punchClockMapper.getPunchClockByAppointmentId(appointment_id); + if (punchClock != null) { + String start_time = punchClock.getStart_time(); + String queue_number = punchClock.getQueue_number(); + String punch_address = punchClock.getPunch_address(); + Integer punch_clock_type = punchClock.getPunch_clock_type(); + + if (start_time == null || start_time.isEmpty()) { + start_time = FormatDateTime.dateTimeToStr(now); + punchClock.setStart_time(start_time); + } + if (queue_number == null || queue_number.isEmpty()) { + String last_queue_number = punchClockExtendMapper.getLastQueueNumber(now, appointment.getPort_area_id()); + //生成新的排队编号 + //排队号需求变更,格式"2308210001" + queue_number = QueueNumberHelper.getNewQueueNumber(last_queue_number); + punchClock.setQueue_number(queue_number); + } + if (punch_address == null || punch_address.isEmpty()) { + PortArea portArea = portAreasMapper.getById(appointment.getPort_area_id()); + if (portArea!=null){ + punchClock.setPunch_address(portArea.getPort_area_address()); + } + } + //扫码收车,可以设置打卡状态为操作中(3) + punchClock.setPunch_clock_type(3); + punchClock.setUpdate_time(FormatDateTime.dateTimeToStr(now)); + int x=punchClockMapper.update(punchClock); + } + } + + return res; + } + + @Override + public List getAppointmentDetailListByGoodVinList(List vinlist) { + return appointmentDetailMapper.getAppointmentDetailListByGoodVinList(vinlist); + } + + /** + * 根据 Vin列表查询匹配的商品车明细,并筛选出不属于已取消和异常的预约的 + * + * @param vinlist vinlist + * @return vinlist + */ + @Override + public List getAppointmentDetailListByVinList(List vinlist) { + //获取与vinList匹配的商品车明细 + List detailList = appointmentDetailMapper.getAppointmentDetailListByVinList(vinlist); + //获取已取消和异常的预约的Id列表 + List mylist = appointmentMapper.getIdListNoInEn(); + if (detailList != null && detailList.size() > 0) { + detailList = Linq.of(detailList).where(p -> !mylist.contains(p.getAppointment_id())).toList(); + } + + return detailList; + } + + @Override + public Integer deleteAppointmentDetailByAppointmentId(String appointment_id) { + return appointmentDetailMapper.deleteAppointmentDetailByAppointmentId(appointment_id); + } +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/HomeServiceImpl.java b/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/HomeServiceImpl.java new file mode 100644 index 0000000..4c4eed4 --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/HomeServiceImpl.java @@ -0,0 +1,464 @@ +package com.haitongauto.rtosac.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.bestvike.linq.Linq; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.haitongauto.interfaces.OrderApi; +import com.haitongauto.interfaces.UserInterface; +import com.haitongauto.mapper.base.*; +import com.haitongauto.models.ido.CommonRes; +import com.haitongauto.models.ido.login.UserLoginOrRegisterRequest; +import com.haitongauto.models.ido.login.PostLoginRes; +import com.haitongauto.models.ido.login.UserLoginOrRegisterResponse; +import com.haitongauto.models.pojo.*; +import com.haitongauto.models.pojo.Announcement; +import com.haitongauto.rtosac.service.HomeService; +import com.haitongauto.models.dto.DataForMessage; +import com.haitongauto.utils.FormatDateTime; +import com.haitongauto.utils.HttpRequest; +import com.haitongauto.mapper.client.OtherExtendMapper; +import com.haitongauto.utils.HttpTemplate; +import com.haitongauto.utils.StringHelper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; +import javax.annotation.Resource; +import java.io.File; +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.*; + +@Service +public class HomeServiceImpl implements HomeService { + + @Autowired + AnnouncementMapper announcementsMapper; + @Autowired + UsersMapper usersMapper; + @Autowired + TruckMapper truckMapper; + @Autowired + ServiceConfigMapper serviceConfigMapper; + @Autowired + RequesterMapper requesterMapper; + @Autowired + OtherExtendMapper otherExtendMapper; + @Autowired + LoginLogMapper loginLogMapper; + @Autowired + UserInterface userInterface; + private String users_id; + @Resource + OrderApi orderApi; + + /** + * 根据id查询用户 + * + * @param id 用户id + * @return 返回用户 + */ + @Override + public Users getUsersForId(String id) { + return (Users) usersMapper.getById(id); + } + + /** + * 根据用户的小程序 openid 获取用户在数据库里的数据 + * + * @param wx_openid 微信openid + * @return 返回用户信息 + */ + @Override + public Users getUsersForOpenId(String wx_openid) { + return otherExtendMapper.getUsersForOpenId(wx_openid); + } + + /** + * 用户登录 + * + * @param users 用户 + * @return 返回执行结果 + */ + @Override + public PostLoginRes postLogin(Users users) { + //初始变量 + String users_id = users.getId(); + String truck_id = ""; + String access_token_rtos = ""; + PostLoginRes postLoginRes = new PostLoginRes(); + //将用户信息提交给哪吒 哪吒入参 + String appId = ""; + appId = getServiceConfigForCode("400"); + String mobile = users.getTel_number(); + String openId = users.getWx_openid(); + String unionId = users.getWx_unionid(); + + //请求哪吒注册登录 + if (true) { + UserLoginOrRegisterRequest request = new UserLoginOrRegisterRequest(); + request.setAppId(appId); + request.setMobile(mobile); + request.setOpenId(openId); + request.setUnionId(unionId); + request.setMediaType("小程序"); + //用户信息提交外部接口(哪吒) 返回参数缺少userId,需要补充 + //本地测试注释,正式环境需要解开 + CommonRes myResponse = orderApi.login(request); + if (myResponse != null) { + UserLoginOrRegisterResponse response = myResponse.getData(); + if (response != null) { + access_token_rtos = response.getAccess_token(); + System.out.print("Rtos登录注册接口Token:" + access_token_rtos); + } + } + } + + String date = FormatDateTime.dateTimeToStr(new Date()); + //添加用户司机信息 + if (!Objects.equals(users.getWx_openid(), "")) { + Users myusers = this.getUsersForOpenId(openId); + if (myusers != null) { + users.setId(myusers.getId()); + users.setIs_del(0); + users.setAccess_token(myusers.getAccess_token()); + } + String users_name = users.getUsers_name(); + users.setWx_nick(users_name); + users.setCreate_time(date); + users.setUpdate_time(date); + users.setUsers_state(0); + users.setAccess_token_rtos(access_token_rtos); + users.setIs_del(0); + + if (users.getId() == null || users.getId().isEmpty()) { + users.setId(UUID.randomUUID().toString().replace("-", "").toLowerCase()); + //更新到数据库,返回当前id + users_id = usersMapper.insert(users); + } else { + Integer x = usersMapper.update(users); + } + } + + postLoginRes.setUsers_id(users_id); + postLoginRes.setTruck_id(truck_id); + postLoginRes.setAccess_token_rtos(access_token_rtos); + + return postLoginRes; + } + + /** + * 用户登录 + * + * @param truck 板车 + * @return 返回执行结果 + */ + @Override + public String insertTruck(Truck truck) { + String id = truck.getId(); + if (id == null || id.isEmpty()) { + id = UUID.randomUUID().toString().replace("-", "").toLowerCase(); + truck.setId(id); + id = truckMapper.insert(truck); + } + return id; + } + + /** + * 用户登录 + * + * @param truck 板车 + * @return 返回执行结果 + */ + @Override + public Integer updateTruck(Truck truck) { + Integer x = truckMapper.update(truck); + return x; + } + + /** + * 写入登录日志 + * + * @param wx_openid wx_openid + * @param ip ip地址 + */ + @Override + public void loginLogAdd(String wx_openid, String ip) { + //获取IP所在的城市,异步调用外部接口 + String url = "http://ip.360.cn/IPQuery/ipquery?ip=" + ip; + new Thread(new Runnable() { + @Override + public void run() { + int i = 0; + String res = HttpTemplate.doGet(url); + while (res.isEmpty()) { + res = HttpTemplate.doGet(url); + i++; + if (i > 20 && res.isEmpty()) { + return; + } + } + Map maps = (Map) JSON.parse(res); + String area = maps.get("data").toString().split("\t")[0]; + //控制台打印 + System.out.println(maps.get("data").toString().split("\t")[0]); + //数据封装到LoginLog + String date = FormatDateTime.dateTimeToStr(new Date()); + LoginLog loginLog = new LoginLog(); + loginLog.setWx_openid(wx_openid); + loginLog.setIp(ip); + loginLog.setArea(area); + loginLog.setLogin_time(date); + loginLog.setCreate_time(date); + loginLog.setUpdate_time(date); + loginLog.setIs_del(0); + String uuid = UUID.randomUUID().toString().replace("-", "").toLowerCase(); + loginLog.setId(uuid); + //写入数据库 + loginLogMapper.insert(loginLog); + } + }).start(); + } + + /** + * 分页读取每页10条公告数据 + * + * @param pageNum 页码 + * @param pageSize 数据条数 + * @return 返回分页数据 + */ + @Override + public PageInfo getAnnouncementsList(Integer pageNum, Integer pageSize, Integer sort,String keyWords) { + //初始化PageHelper + PageHelper.startPage(pageNum, pageSize,true,false,false); + //立即查询 + List mylist = announcementsMapper.getListBySort(sort,keyWords); + if (mylist != null && mylist.size() > 0) { + for (Announcement item : mylist) { + String announcement = item.getAnnouncement(); + String announcement_text = ""; + if (announcement != null && !announcement.isEmpty()) { + announcement_text = StringHelper.getTxtByHtml(announcement); + } + item.setAnnouncement_text(announcement_text); + } + } + + //获取分页数据 + + assert mylist != null; + return new PageInfo(mylist); + } + + /** + * 根据公告id获得公告 + * + * @param announcement_id 公告id + * @return 返回公告信息 + */ + @Override + public Announcement getAnnouncementById(String announcement_id) { + Announcement announcement = null; + announcement = announcementsMapper.getById(announcement_id); + + String announcementStr = announcement.getAnnouncement(); + String announcement_text = ""; + if (announcementStr != null && !announcementStr.isEmpty()) { + announcement_text = StringHelper.getTxtByHtml(announcementStr); + } + announcement.setAnnouncement_text(announcement_text); + + return announcement; + } + + /** + * 读取系统服务路径 + * + * @return 返回系统服务路径 + */ + @Override + public String getServiceBaseUrl() { + List mylist = serviceConfigMapper.getList(); + String servicePath = ""; + if (mylist != null && mylist.size() > 0) { + servicePath = mylist.stream().filter(a -> a.getConfig_code().equals("100")).findFirst().get().getConfig_content(); + } + + return servicePath; + } + + /** + * 读取图片访问路径 + * + * @return 返回图片路径 + */ + @Override + public String getImgAccessUrl() { + List mylist = serviceConfigMapper.getList(); + String imgServicePath = ""; + if (mylist != null && mylist.size() > 0) { + ServiceConfig serviceConfig = Linq.of(mylist).firstOrDefault(p -> p.getConfig_code().equals("300")); + if (serviceConfig != null) { + imgServicePath = serviceConfig.getConfig_content(); + } + } + return imgServicePath; + } + + /** + * 根据配置编号获取配置值 + * + * @param config_code 配置编号 + * @return 返回配置值 + */ + @Override + public String getServiceConfigForCode(String config_code) { + return otherExtendMapper.getServiceConfigForCode(config_code); + } + + /** + * 获取外部接口数据 + * + * @param request_type : 请求类型参数,取值于Requester表 + * @param myParamMap :实时传值,其键值对与 Requester表param字段的键值对对应 + * @return 返回外部接口数据 + */ + @Override + public String getExternalInterfaceData(Integer request_type, Map myParamMap) { + //根据请求类型获取一条请求配置数据 + Requester requester = otherExtendMapper.getRequesterForType(request_type); + //解析请求配置 + String url = requester.getUrl(); + StringBuilder param = new StringBuilder(); + Map paramMap = JSONObject.parseObject(requester.getParam_map()); + if (requester.getParam_map() != null && !requester.getParam_map().isEmpty()) { + for (Map.Entry item : paramMap.entrySet()) { + String key = item.getKey(); + Object value; + //遍历配置参数 + if (item.getValue().equals("")) { + value = myParamMap.get(key); //当key的value为空字符串时,key参数取值myParamMap传值中的key对应的值 + } else { + value = item.getValue(); //当key与value不相等时,key参数取值value + } + param.append((param.toString().equals("")) ? key + "=" + value : "&" + key + "=" + value); + } + } + + //发送请求 + String dataJson = ""; + try { + dataJson = HttpRequest.sendGet(url, param.toString()); + } catch (Exception e) { + System.out.println("请求异常!" + e); + e.printStackTrace(); + } + return dataJson; + } + + /** + * 发送订阅消息 + * + * @param dataForMessage:订阅消息发送数据类的实例 + * @return 发送失败的错误信息 + */ + @Override + public String sendMessage(DataForMessage dataForMessage) { + /* + //解析订阅消息发送数据类的实例 + String access_token = dataForMessage.getAccess_token(); //接口调用凭证,该参数为 URL 参数,非 Body 参数。使用access_token或者authorizer_access_token + String template_id = dataForMessage.getTemplate_id(); //所需下发的订阅模板id + String page = dataForMessage.getPage(); //点击模板卡片后的跳转页面,仅限本小程序内的页面。支持带参数,(示例index?foo=bar)。该字段不填则模板无跳转 + String touser = dataForMessage.getTouser(); //接收者(用户)的 openid + String data = dataForMessage.getData(); //模板内容,格式形如 { "key1": { "value": any }, "key2": { "value": any } }的object + String miniprogram_state = dataForMessage.getMiniprogram_state(); //跳转小程序类型:developer为开发版;trial为体验版;formal为正式版;默认为正式版 + */ + //请求参数 + String access_token = dataForMessage.getAccess_token(); + String url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=" + access_token; + String param = JSON.toJSONString(dataForMessage); + + //发送请求(参考微信官方:https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/mp-message-management/subscribe-message/sendMessage.html) + String dataJson = ""; + try { + dataJson = HttpRequest.sendPost(url, param); + } catch (Exception e) { + System.out.println("请求异常!" + e); + e.printStackTrace(); + } + return dataJson; + } + + /** + * 返回文件后缀 + * + * @param file 文件 + * @return 返回文件后缀 + */ + @Override + public String getImagePath(MultipartFile file) { + String fileName = (file != null) ? file.getOriginalFilename() : "";//获取原文件名 + int index; + if ((!Objects.equals(fileName, ""))) { + assert fileName != null; + index = fileName.indexOf("."); + } else { + index = 0; + } + return fileName.substring(index); + } + + /** + * 保存图片 + * + * @param mfile 文件 + * @param file 文件 + * @return 返回执行结果 + */ + @Override + public boolean saveImage(MultipartFile mfile, File file) { + //查看文件是否存在,不存在则创建 + if (!file.getParentFile().exists()) { + file.getParentFile().mkdirs(); + } + try { + //使用此方法保存必须要绝对路径且文件夹必须已存在,否则报错 + mfile.transferTo(file); + return true; + } catch (IllegalStateException | IOException e) { + e.printStackTrace(); + } + return false; + } + + /** + * 新文件名 + * + * @param suffix suffix + * @return 返回文件名 + */ + @Override + public String getNewFileName(String suffix) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); + String date = sdf.format(new Date()); + return date + UUID.randomUUID() + suffix; + } + + /** + * 返回图片保存地址 + * + * @param name 文件名 + * @return 返回图片保存地址 + */ + @Override + public String getNewImagePath(String name) { + List mylist = serviceConfigMapper.getList(); + String imgPath = ""; + if (mylist != null && mylist.size() > 0) { + imgPath = mylist.stream().filter(a -> a.getConfig_code().equals("200")).findFirst().get().getConfig_content(); + } + return imgPath + "/" + name; + } + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/MessageServiceImpl.java b/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/MessageServiceImpl.java new file mode 100644 index 0000000..6487254 --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/MessageServiceImpl.java @@ -0,0 +1,131 @@ +package com.haitongauto.rtosac.service.impl; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.haitongauto.mapper.base.MessageMapper; +import com.haitongauto.mapper.base.TruckMapper; +import com.haitongauto.mapper.base.UsersMapper; +import com.haitongauto.models.pojo.Feedback; +import com.haitongauto.models.pojo.Message; +import com.haitongauto.models.pojo.Truck; +import com.haitongauto.models.pojo.Users; +import com.haitongauto.rtosac.service.MessageService; +import com.haitongauto.rtosac.service.UsersService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +@Service +public class MessageServiceImpl implements MessageService { + @Autowired + MessageMapper messageMapper; + @Autowired + UsersMapper usersMapper; + @Autowired + TruckMapper truckMapper; + @Override + public String insert(Message message) { + return messageMapper.insert(message); + } + + @Override + public int update(Message message) { + return messageMapper.update(message); + } + + /** + * @param message 消息实体 + * @return 返回结果 + */ + @Override + public boolean receiveMessage(Message message) { + boolean b = false; + if (message == null) { + return b; + } + Message myMessage = null; + Integer type = message.getType(); + String biz_id = message.getBiz_id(); + myMessage = messageMapper.getLastMessageByTypeAndBizId(type, biz_id); + if (myMessage == null) { + message.setId(UUID.randomUUID().toString().replace("-", "").toLowerCase()); + String id = messageMapper.insert(message); + if (id != null && !id.isEmpty()) { + b = true; + } + } else { + message.setId(myMessage.getId()); + int id = messageMapper.update(message); + if (id > 0) { + b = true; + } + } + return b; + } + + /** + * 获得车辆最新消息 + * + * @param type 收车/发车 + * @param biz_id biz_id + * @return 返回消息 + */ + @Override + public Message getLastMessageByTypeAndBizId(Integer type, String biz_id) { + return messageMapper.getLastMessageByTypeAndBizId(type, biz_id); + } + + /** + * 获得未读消息 + * + * @param wxOpenid 微信openid + * @param pageNum 页码 + * @param pageSize 数据条数 + * @return 返回结果 + */ + @Override + public PageInfo getUnReadMessageListByWxOpenid(String wxOpenid, Integer pageNum, Integer pageSize) { + Truck truck = truckMapper.getTruckByOpenId(wxOpenid); + String truck_number = null; + if (truck != null) { + truck_number = truck.getTruck_number(); + } + List messageList = new ArrayList<>(); + if (truck_number != null && !truck_number.isEmpty()) { + PageHelper.startPage(pageNum, pageSize,true,false,false); + messageList = messageMapper.getUnReadMessageListByTruckNumber(truck_number); + if (messageList == null) { + messageList = new ArrayList<>(); + } + } + return new PageInfo(messageList); + } + + /** + * 获得读消息 + * + * @param wxOpenid 微信openid + * @param pageNum 页码 + * @param pageSize 数据条数 + * @return 返回结果 + */ + @Override + public PageInfo getMessageListByWxOpenid(String wxOpenid, Integer pageNum, Integer pageSize) { + List messageList = null; + Truck truck = truckMapper.getTruckByOpenId(wxOpenid); + String truck_number = null; + if (truck != null) { + truck_number = truck.getTruck_number(); + } + if (truck_number != null && !truck_number.isEmpty()) { + PageHelper.startPage(pageNum, pageSize,true,false,false); + messageList = messageMapper.getMessageListByTruckNumber(truck_number); + } + assert messageList != null; + return new PageInfo(messageList); + } + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/MineServiceImpl.java b/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/MineServiceImpl.java new file mode 100644 index 0000000..9bb4e03 --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/MineServiceImpl.java @@ -0,0 +1,296 @@ +package com.haitongauto.rtosac.service.impl; + + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.haitongauto.mapper.base.*; +import com.haitongauto.models.pojo.*; +import com.haitongauto.rtosac.service.MineService; +import com.haitongauto.mapper.client.OtherExtendMapper; +import com.haitongauto.mapper.client.TruckExtendMapper; +import com.haitongauto.mapper.client.AppointmentExtendMapper; +import com.haitongauto.utils.FormatDateTime; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.time.LocalDate; +import java.util.*; + +@Service +public class MineServiceImpl implements MineService { + @Autowired + UsersMapper usersMapper; + @Autowired + TruckMapper truckMapper; + @Autowired + FeedbackMapper feedbackMapper; + @Autowired + AppointmentMapper appointmentMapper; + @Autowired + NoviceIntroductionMapper noviceIntroductionMapper; + @Autowired + AppointmentDetailMapper appointmentDetailMapper; + @Autowired + OtherExtendMapper otherExtendMapper; + @Autowired + TruckExtendMapper truckExtendMapper; + @Autowired + AppointmentExtendMapper appointmentExtendMapper; + + /** + * 个人资料修改 + * + * @param users 用户(司机) + * @return 返回修改结果 + */ + @Override + public Integer postMyUsers(Users users) { + String users_id = users.getId(); + Integer x = (users_id != null && users_id.length() > 0) ? usersMapper.update(users) : null; + return x; + } + + /** + * 获取我的板车信息 + * + * @param users_id 司机id + * @return 返回我的板车信息 + */ + @Override + public List getMyPalletTruck(String users_id) { + //访问哪吒接口,先获取并更新我的车辆可能被列入黑名单的信息 + List myTruckManagementList = truckExtendMapper.getMyTruckManagement(users_id); + if (myTruckManagementList != null && myTruckManagementList.size() > 0) { + for (TruckManagement item : myTruckManagementList) { + String truck_number = item.getTruck_number(); + Truck myPalletTruck = truckExtendMapper.getPalletTruckForNumber(truck_number); + if (myPalletTruck.getTruck_state() != 4) { + myPalletTruck.setTruck_state(4); + truckMapper.update(myPalletTruck); + } + } + } + //再获取我的车辆信息(含最新更新的被列入黑名单信息) + return truckExtendMapper.getPalletTruckForUsers(users_id); + } + + /** + * 修改或添加我的板车信息 + * + * @param palletTruck 板车数据实体 + * @return 返回执行结果 + */ + @Override + public Integer postMyPalletTruck(Truck palletTruck) { + if (palletTruck == null) { + return 0; + } + //判断板车id是否存在 + String id = palletTruck.getId(); + //检查是否设置为默认车辆 + Integer truck_state = palletTruck.getTruck_state(); + //如果truck_state=1 + if (truck_state == 1) { + String users_id = palletTruck.getUsers_id(); + //重置其他所有车辆的状态为0,除非被列为黑名单(truck_state=4) + int x = truckExtendMapper.setTruckSateToGeneral(users_id); + } + //将数据更新信息定义为返回值 + Integer x = 0; + if (id != null && id.length() > 0) { + Truck myPalletTruck = (Truck) truckMapper.getById(id); + //修改 + palletTruck.setCreate_time(myPalletTruck.getCreate_time()); + palletTruck.setUpdate_time(FormatDateTime.dateToStr(new Date())); + palletTruck.setIs_del(0); + x = truckMapper.update(palletTruck); + + } else { + //添加 + palletTruck.setId(UUID.randomUUID().toString().replace("-", "").toLowerCase(Locale.ROOT)); + palletTruck.setCreate_time(FormatDateTime.dateToStr(new Date())); + palletTruck.setUpdate_time(FormatDateTime.dateToStr(new Date())); + palletTruck.setTruck_state(1); + palletTruck.setIs_del(0); + truckMapper.insert(palletTruck); + x = 1; + } + return x; + } + + /** + * 删除我的板车信息 + * + * @param palletTruck_id 板车id + * @return 返回执行结果 + */ + @Override + public Integer delMyPalletTruck(String palletTruck_id) { + return truckMapper.logicDel(palletTruck_id); + } + + /** + * 我的车辆黑名单信息 truck_management + * + * @param users_id 司机id + * @return 返回我的车辆黑名单信息 + */ + @Override + public List getMyTruckManagement(String users_id) { + return truckExtendMapper.getMyTruckManagement(users_id); + } + + /** + * 提交反馈意见 + * + * @param feedback 反馈意见数据实体 + * @return 返回执行结果 + */ + @Override + public Integer postFeedback(Feedback feedback) { + //数据补全 + Date date = new Date(); + feedback.setId(UUID.randomUUID().toString().replace("-", "").toLowerCase()); + feedback.setCreate_time(FormatDateTime.dateToStr(date)); + feedback.setUpdate_time(FormatDateTime.dateToStr(date)); + feedback.setIs_del(0); + //写入到数据库 + String id = feedbackMapper.insert(feedback); + return (id != null && id.length() > 0) ? 1 : 0; + } + + /** + * 我的预约信息列表 + * + * @param users_id 司机id + * @return 返回我的预约信息列表 + */ + @Override + public List getMyAppointmentList(String users_id) { + return appointmentExtendMapper.getMyAppointmentList(users_id); + } + + /** + * 我的预约信息模糊查询分页列表 + * + * @param users_id 司机id + * @param keywords 查询关键字 + * @param approach_date 进场日期 + * @param pageNum 页码 + * @param pageSize 数据条数 + * @return 返回我的预约信息模糊查询分页列表 + */ + @Override + public PageInfo getMyAppointmentListForPage(String users_id, String keywords, String approach_date, Integer pageNum, Integer pageSize) { + + //初始化PageHelper + pageNum = (pageNum != null) ? pageNum : 1; //当前页码 + pageSize = (pageSize != null) ? pageSize : 10; //每页记录条数 + List mylist = new ArrayList<>(); + //根据预约日期查询 + if (approach_date != null && approach_date.length() == 10) { + LocalDate myApproach_date = LocalDate.parse(approach_date); + //初始化PageHelper + PageHelper.startPage(pageNum, pageSize,true,false,false); + mylist = appointmentExtendMapper.getMyAppointmentListForDate(users_id, myApproach_date); + } + //根据关键字查询 + if (keywords != null && keywords.length() > 0) { + // keywords 船名或航次的关键字 + //获取关键字匹配的 appointment_id 值的列表 + List id_list = appointmentExtendMapper.getAppointmentDetailListForKeyWords(keywords); + //去重 + Set my_id_list = new HashSet<>(id_list); + id_list = new ArrayList<>(my_id_list); + + //初始化PageHelper + PageHelper.startPage(pageNum, pageSize,true,false,false); + //根据idList查询我的预约记录 + mylist = appointmentExtendMapper.getMyAppointmentListForIdList(users_id, id_list); + } + //无条件参数时,查询全部 + if ((keywords == null || keywords.length() == 0) && (approach_date == null || approach_date.length() == 0)) { + //初始化PageHelper + PageHelper.startPage(pageNum, pageSize,true,false,false); + mylist = appointmentExtendMapper.getMyAppointmentList(users_id); + } + //获取分页数据 + return new PageInfo(mylist); + } + + @Override + public PageInfo getMyAppointmentListForPageNew(String users_id, String keywords, String approach_date, Integer pageNum, Integer pageSize) { + //初始化PageHelper + pageNum = (pageNum != null) ? pageNum : 1; //当前页码 + pageSize = (pageSize != null) ? pageSize : 10; + List mylist = new ArrayList<>(); + PageHelper.startPage(pageNum, pageSize,true,false,false); + mylist = appointmentExtendMapper.getAppointmentListForCondition(users_id, keywords, approach_date); + return new PageInfo(mylist); + } + + /** + * 我的预约信息按日期查询分页列表 + * + * @param users_id 司机id + * @param approach_date 预约进场日期 + * @param pageNum 页码 + * @param pageSize 数据条数 + * @return 返回我的预约信息按日期查询分页列表 + */ + @Override + public PageInfo getMyAppointmentListByDateForPage(String users_id, String approach_date, Integer pageNum, Integer pageSize) { + //初始化PageHelper + pageNum = (pageNum != null) ? pageNum : 1; //当前页码 + pageSize = (pageSize != null) ? pageSize : 10; //每页记录条数 + List mylist = new ArrayList<>(); + //根据预约日期查询 + if (approach_date != null && approach_date.length() == 10) { + LocalDate myApproach_date = LocalDate.parse(approach_date); + //初始化PageHelper + PageHelper.startPage(pageNum, pageSize,true,false,false); + mylist = appointmentExtendMapper.getMyAppointmentListForDate(users_id, myApproach_date); + } + //无条件参数时,查询全部 + if ((approach_date == null || approach_date.length() == 0)) { + //初始化PageHelper + PageHelper.startPage(pageNum, pageSize,true,false,false); + mylist = appointmentExtendMapper.getMyAppointmentList(users_id); + } + //获取分页数据 + return new PageInfo(mylist); + } + + /** + * 新手攻略 + * + * @return 返回新手攻略 + */ + @Override + public List getNoviceIntroduction() { + return noviceIntroductionMapper.getList(); + } + + /** + * 获取我的当前预约 + * + * @param users_id 用户id + * @return 返回获取我的当前预约 + */ + @Override + public Appointment getMyAppointment(String users_id) { + return appointmentExtendMapper.getMyAppointment(users_id); + } + + /** + * 根据Id获取用户信息 + * + * @param users_id 用户id + * @return 返回用户信息 + */ + @Override + public Users getUsersById(String users_id) { + return usersMapper.getById(users_id); + } + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/NewsServiceImpl.java b/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/NewsServiceImpl.java new file mode 100644 index 0000000..76fed2f --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/NewsServiceImpl.java @@ -0,0 +1,35 @@ +package com.haitongauto.rtosac.service.impl; +import com.haitongauto.mapper.base.RequesterMapper; +import com.haitongauto.models.pojo.EntryInstruct; +import com.haitongauto.models.pojo.Requester; +import com.haitongauto.rtosac.service.NewsService; +import com.haitongauto.mapper.client.OtherExtendMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import java.util.List; + +@Service +public class NewsServiceImpl implements NewsService { + @Autowired + OtherExtendMapper otherExtendMapper; + + @Autowired + RequesterMapper requesterMapper; + + /** + * 获取发送给指定用户的(最近10条)指令信息 + * @param users_id 用户id + * @return 返回定用户的(最近10条)指令信息 + */ + @Override + public List getEntryInstructionsForUsers(@Param("users_id") String users_id){ + return otherExtendMapper.getEntryInstructionsForUsers(users_id); + } + + @Override + public Requester getRequesterForType(Integer requestType) { + return requesterMapper.getRequesterForType(requestType); + } + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/PunchClockServiceImpl.java b/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/PunchClockServiceImpl.java new file mode 100644 index 0000000..eb25807 --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/PunchClockServiceImpl.java @@ -0,0 +1,273 @@ +package com.haitongauto.rtosac.service.impl; + +import com.bestvike.linq.Linq; +import com.haitongauto.interfaces.PortAreaInterface; +import com.haitongauto.mapper.base.AppointmentMapper; +import com.haitongauto.mapper.base.PunchClockMapper; +import com.haitongauto.mapper.base.PortAreasMapper; +import com.haitongauto.models.pojo.Appointment; +import com.haitongauto.models.pojo.PortArea; +import com.haitongauto.models.pojo.PunchClock; +import com.haitongauto.rtosac.service.PunchClockService; +import com.haitongauto.mapper.client.AppointmentExtendMapper; +import com.haitongauto.mapper.client.PunchClockExtendMapper; +import com.haitongauto.utils.DateTimeHelper; +import com.haitongauto.utils.FormatDateTime; +import com.haitongauto.utils.QueueNumberHelper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.time.LocalTime; +import java.util.Date; +import java.util.List; + +@Service +public class PunchClockServiceImpl implements PunchClockService { + @Autowired + PortAreaInterface portAreaInterface; + @Autowired + AppointmentMapper appointmentMapper; + @Autowired + PunchClockMapper punchClockMapper; + @Autowired + PortAreasMapper portAreasMapper; + @Autowired + AppointmentExtendMapper appointmentExtendMapper; + @Autowired + PunchClockExtendMapper punchClockExtendMapper; + + /** + * 检查是否有预约(查询是否存在有预约待签到)的预约数据 + * + * @param users_id 用户id + * @return 返回预约信息 + */ + @Override + public Appointment getIincompleteAppointment(String users_id) { + return appointmentExtendMapper.getActiveAppointment(users_id); + } + + /** + * 签到打卡提交 + * + * @param users_id 用户id + * @param appointment_id 预约id + * @param port_area_id 港区id + * @param punch_poi 坐标 + * @return 返回提交结果 + */ + @Override + public PunchClock postPunchClockStart(String users_id, String appointment_id, String port_area_id, String punch_poi, String punch_address) { + //获取当前日期时间 + Date datetime = new Date(); + //更新预约状态 + Appointment appointment = appointmentMapper.getById(appointment_id); + if (appointment == null) { + return null; + } + + if (appointment.getAppointment_state().equals(2)) { + return null; + } + + //普通预约签到 + if (appointment.getAppointment_type() != null) { + if (appointment.getAppointment_type().equals(1)) { + appointment.setAppointment_state(2); + appointment.setCheck_in_time(FormatDateTime.dateTimeToStr(datetime)); + appointment.setUpdate_time(FormatDateTime.dateToStr(datetime)); + } + //特保区预约签到 + if (appointment.getAppointment_type().equals(2)) { + appointment.setAppointment_state(2); + appointment.setCheck_in_time(FormatDateTime.dateTimeToStr(datetime)); + appointment.setUpdate_time(FormatDateTime.dateToStr(datetime)); + } + } else { + appointment.setAppointment_state(2); + appointment.setCheck_in_time(FormatDateTime.dateTimeToStr(datetime)); + appointment.setUpdate_time(FormatDateTime.dateToStr(datetime)); + } + + Integer x = appointmentMapper.update(appointment); + PunchClock myPunchClock = null; + myPunchClock = punchClockMapper.getPunchClockByAppointmentId(appointment.getId()); + if (x > 0) { + //更改打卡记录 + if (myPunchClock != null) { + //获取当前日期 + Date date = new Date(); + //获取当前日期最后一个排队编号 + String last_queue_number = punchClockExtendMapper.getLastQueueNumber(date, appointment.getPort_area_id()); + //生成新的排队编号 + //排队号需求变更,格式"2308210001" + String queue_number = QueueNumberHelper.getNewQueueNumber(last_queue_number); + //添加打卡信息 + myPunchClock.setUsers_id(users_id); //'用户id' + myPunchClock.setAppointment_id(appointment_id); //'预约Id' + myPunchClock.setQueue_number(queue_number); //排队编号(1000-9999) + myPunchClock.setStart_time(FormatDateTime.dateTimeToStr(datetime)); //'签到打卡日期时间' + myPunchClock.setPort_area_id(port_area_id); //'打卡港区' + myPunchClock.setPunch_address(punch_address); + myPunchClock.setPunch_clock_type(1); //'打卡类别(0-预约未签到,1-签到,2-已进港,3-操作中,4-已完成,5-已离港)' + myPunchClock.setPunch_clock_poi(punch_poi); //'打卡位置(位置坐标)' + myPunchClock.setUpdate_time(FormatDateTime.dateTimeToStr(datetime)); //'更新时间' + myPunchClock.setIs_del(0); //'是否软删除' + //更新到数据库 + Integer res = punchClockMapper.update(myPunchClock); + } + } + return myPunchClock; + } + + /** + * 完成打卡提交 + * + * @param appointment_id 预约id + * @param punch_clock_id 打卡id + * @param over_address 打卡地址 + * @return 返回完成打卡提交执行结果 + */ + @Override + public PunchClock postPunchClockOver(String appointment_id, String punch_clock_id, String over_address) { + //获取当前日期时间 + Date datetime = new Date(); + LocalTime time = LocalTime.now(); //获取当前时间 + //更新预约状态 + Appointment appointment = appointmentMapper.getById(appointment_id); + if (appointment != null) { + appointment.setAppointment_state(6); + appointment.setCheck_over_time(FormatDateTime.dateTimeToStr(datetime)); + appointment.setGate_canal_out_time(FormatDateTime.dateTimeToStr(datetime)); + appointment.setUpdate_time(FormatDateTime.dateTimeToStr(datetime)); + Integer x = appointmentMapper.update(appointment); + } + //更新打卡状态为完成状态 + //PunchClock punchClock = punchClockMapper.getById(punch_clock_id); + PunchClock punchClock = punchClockMapper.getPunchClockByAppointmentId(appointment_id); + if (punchClock != null) { + punchClock.setOver_time(FormatDateTime.dateTimeToStr(datetime)); + punchClock.setOver_address(over_address); + punchClock.setPunch_clock_type(4); + punchClock.setUpdate_time(FormatDateTime.dateTimeToStr(datetime)); + punchClockMapper.update(punchClock); + } + + + return punchClock; + } + + /** + * 根据预约Id获取获取打卡记录 + * + * @param appointment_id 预约id + * @return 返回打卡记录 + */ + @Override + public PunchClock getPunchClockForAppintementId(String appointment_id) { + return punchClockExtendMapper.getPunchClockForAppintementId(appointment_id); + } + + /** + * 查询指定司机某一天(指定日期)的打卡记录 + * + * @param date 指定日期 + * @param users_id 用户id + * @return 返回打卡记录列表 + */ + @Override + public List getPunchClockForDate(String date, String users_id) { + return punchClockExtendMapper.getPunchClockForDate(date, users_id); + } + + /** + * 查询指定司机某年某月的打卡记录 + * + * @param year 年 + * @param month 月 + * @param users_id 用户id + * @return 返回打卡记录列表 + */ + @Override + public List getPunchClockForYM(Integer year, Integer month, String users_id) { + //获取该用户的所有打卡记录 + List mylist = punchClockExtendMapper.getPunchClockForYM(users_id, year, month); + if (users_id == null || users_id.isEmpty()) { + return null; + } + return mylist; + } + + /** + * 获取港区 + * + * @param port_area_id 港区id + * @return 返回港区信息 + */ + @Override + public PortArea getPortAreaForId(String port_area_id) { + return portAreasMapper.getById(port_area_id); + } + + /** + * 获取港区中心点坐标 + * + * @param port_area_id 港区id + * @return 返回港区中心点坐标 + */ + @Override + public String getPortAreaPoi(String port_area_id) { + PortArea portAreas = (PortArea) portAreasMapper.getById(port_area_id); + //从哪吒接口拿,哪吒接口缺少字段 港区中心点坐标Area_center_poi + if (portAreas == null) { + //哪吒接口 + List portAreaList = portAreaInterface.getPortArea(); + if (portAreaList != null) { + portAreas = Linq.of(portAreaList).firstOrDefault(p -> p.getId().equals(port_area_id)); + } + } + String area_center_poi = ""; + if (portAreas != null) { + area_center_poi = portAreas.getArea_center_poi(); + } + return area_center_poi; + } + + /** + * 获取签到打卡排队序号 + * + * @param appointment_id 预约id + * @return 返回签到打卡排队序号 + */ + @Override + public String getQueueNumber(String appointment_id) { + //根据预约id和签到日期即可获得签到排队顺序号 + return punchClockExtendMapper.getQueueNumberForIdDate(appointment_id); + } + + /** + * 获取当前排队前面还剩多少车辆未进港 + * + * @param approach_date 进场日期 + * @param port_area_id 港区id + * @param queue_number 排队号 + * @return 返回查询结果 + */ + @Override + public Integer getNumberBefore(String approach_date, String port_area_id, String queue_number) { + return punchClockExtendMapper.getNumberBeforeMe(approach_date, port_area_id, queue_number); + } + + @Override + public Integer updatePunchClock(PunchClock punchClock) { + return punchClockMapper.update(punchClock); + } + + @Override + public String getLastQueueNumber(Date data,String port_area_id) { + return punchClockExtendMapper.getLastQueueNumber(data,port_area_id); + } + + + +} \ No newline at end of file diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/ResponseImpl.java b/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/ResponseImpl.java new file mode 100644 index 0000000..9e95e56 --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/ResponseImpl.java @@ -0,0 +1,119 @@ +package com.haitongauto.rtosac.service.impl; + +import com.alibaba.fastjson.JSON; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.haitongauto.rtosac.service.Response; +import com.haitongauto.models.dto.Responser; +import org.springframework.stereotype.Service; + +@Service +public class ResponseImpl implements Response { + + /** + * 封装为返回Json对象 + * + * @param bl:请求是否成功 + * @param data:返回数据 + * @return 返回Json对象 + */ + @Override + public String getResponseData(Boolean bl, Object data) { + //创建返回数据 + Integer code = (bl) ? 200 : 404; + String message = (bl) ? "request success" : "request fail"; + //添加到返回对象 + Responser responser = new Responser(); + responser.setCode(code); + responser.setMessage(message); + responser.setData(data); + //解析为Json字符串 + //返回 + return JSON.toJSONString(responser); + } + + + /** + * 封装为返回Json对象 + * + * @param bl:请求是否成功 + * @param data:返回数据 + * @return 返回Json对象 + */ + @Override + public String getResponseData(Boolean bl, Object data, String msg) { + //创建返回数据 + Integer code = (bl) ? 200 : 404; + String message; + if (msg != null && !msg.isEmpty()) { + message = msg; + } else { + message = (bl) ? "request success" : "request fail"; + } + //添加到返回对象 + Responser responser = new Responser(); + responser.setCode(code); + responser.setMessage(message); + responser.setData(data); + //解析为Json字符串 + //返回 + return JSON.toJSONString(responser); + } + + + /** + * 封装为返回Json对象(带null) + * @param bl:请求是否成功 + * @param data:返回数据 + * @return 返回Json对象 + */ + @Override + public String getResponseDataJavaJson(Boolean bl,Object data){ + //创建返回数据 + Integer code = (bl) ? 200 : 404; + String message = (bl) ? "request success" : "request fail"; + //添加到返回对象 + Responser responser = new Responser(); + responser.setCode(code); + responser.setMessage(message); + responser.setData(data); + //解析为Json字符串 + // 将对象转换为 JSON 字符串 + ObjectMapper objectMapper = new ObjectMapper(); + //String json = objectMapper.writeValueAsString(data); + String json = null; + try { + json = objectMapper.writeValueAsString(responser); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + //返回 + return json; + } + + @Override + public String getRtosResponseData(Boolean bl, Object data, String errorCode) { + //创建返回数据 + Integer code = (bl) ? 200 : 404; + String message=""; + if (errorCode != null && !errorCode.isEmpty()) { + code = Integer.parseInt(errorCode); + } + if (code.equals(401)){ + message="用户权限过期,请重新登录"; + } + else { + message = (bl) ? "request success" : "request fail"; + } + //添加到返回对象 + Responser responser = new Responser(); + responser.setCode(code); + responser.setMessage(message); + responser.setData(data); + //解析为Json字符串 + //返回 + return JSON.toJSONString(responser); + } + + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/UsersServiceImpl.java b/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/UsersServiceImpl.java new file mode 100644 index 0000000..bca079b --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/UsersServiceImpl.java @@ -0,0 +1,33 @@ +package com.haitongauto.rtosac.service.impl; +import com.haitongauto.mapper.base.TruckMapper; +import com.haitongauto.mapper.base.UsersMapper; +import com.haitongauto.models.pojo.Truck; +import com.haitongauto.models.pojo.Users; +import com.haitongauto.rtosac.service.UsersService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +@Service +public class UsersServiceImpl implements UsersService { + @Autowired + UsersMapper usersMapper; + @Autowired + TruckMapper truckMapper; + + @Override + public String insert(Users users) { + return usersMapper.insert(users); + } + @Override + public Integer update(Users users) { + return usersMapper.update(users); + } + @Override + public Truck getTruckByWxOpenID(String wx_openid) { + return truckMapper.getTruckByOpenId(wx_openid); + } + @Override + public Truck getTruckByUserId(String userId) { + return truckMapper.getTruckByUsersId(userId); + } + +} diff --git a/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/VehicleServiceImpl.java b/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/VehicleServiceImpl.java new file mode 100644 index 0000000..1c78866 --- /dev/null +++ b/wx-applet/src/main/java/com/haitongauto/rtosac/service/impl/VehicleServiceImpl.java @@ -0,0 +1,92 @@ +package com.haitongauto.rtosac.service.impl; +import com.haitongauto.models.ido.departure.DepartureDetailIdo_DTO; +import com.haitongauto.models.ido.departure.DepartureVehicleIdo_DTO; +import com.haitongauto.models.ido.receiving.ReceivingDetailIdo_DTO; +import com.haitongauto.models.ido.receiving.ReceivingVehicleIdo_DTO; +import com.haitongauto.rtosac.service.VehicleService; +import com.haitongauto.interfaces.ReceivingVehicleInterface; +import com.haitongauto.interfaces.DepartureVehicleInterface; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class VehicleServiceImpl implements VehicleService { + @Autowired + ReceivingVehicleInterface receivingVehicleInterface; + @Autowired + DepartureVehicleInterface departureVehicleInterface; + + /** + * 获取收车凭证的分页数据 + * + * @param current 当前页码 + * @param size 数据条数(非必填) + * @return 返回收车凭证的分页数据 + */ + @Override + public ReceivingVehicleIdo_DTO getVehicleReceivingList(String printTicketTime, String query, Integer current, Integer size) { + //通过外部接口获取收车分页数据 + return receivingVehicleInterface.getReceivingVehicleList(printTicketTime, query, current, size); + } + + /** + * 获取指定id的待核对收车凭证信息 + * + * @param id 收车凭证id + * @return 返回收车凭证信息 + */ + @Override + public ReceivingDetailIdo_DTO getVehicleReceivingInfo(String id) { + return receivingVehicleInterface.getReceivingDetailForId(id); + } + + /** + * 完成收车核对 + * + * @param id 收车凭证id + * @return 返回核对结果 + */ + @Override + public boolean vehicleReceivingOver(String id) { + //状态更新到数据库 + return receivingVehicleInterface.checkReceivingVehicle(id); + } + + /** + * 获取提车凭证的分页数据 + * + * @param current 当前页码 + * @param size 数据条数(非必填) + * @return 返回提车凭证的分页数据 + */ + @Override + public DepartureVehicleIdo_DTO getVehicleDepartureInfoList(String printTicketTime, String query, Integer current, Integer size) { + return departureVehicleInterface.getDepartureVehicleList(printTicketTime, query, current, size); + } + + + /** + * 获取指定id的提车明细 + * + * @param id 指定明细id + * @return 返回提车明细 + */ + @Override + public DepartureDetailIdo_DTO getVehicleDepartureInfo(String id) { + //提醒:此处不应该使用提车信息类,而应该使用提车明细类 + return departureVehicleInterface.getDepartureDetailForId(id); + } + + /** + * 完成提车核对 + * + * @param id 记录id + * @return 返回核对执行结果 + */ + @Override + public boolean VehicleDepartureOver(String id) { + //获取发车数据 + return departureVehicleInterface.checkDepartureVehicle(id); + } + +} diff --git a/wx-applet/src/main/resources/back/111.yml b/wx-applet/src/main/resources/back/111.yml new file mode 100644 index 0000000..e211fef --- /dev/null +++ b/wx-applet/src/main/resources/back/111.yml @@ -0,0 +1,98 @@ + +# 微信小程序服务配置 +# postgresql数据源配置 +#spring: +# redis: +# database: 0 +# host: 192.168.61.130 +# port: 6379 +# connect-timeout: 1 +# password: Nuzar123456_ +# security: +# oauth2: +# resourceserver: +# opaquetoken: +# client-secret: bossnine +# client-id: trusted-bbw-tally +# introspection-uri: ${auth-server}/saas/token/info +# profiles: +# active: pre +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://localhost:5432/rtos_wx_applet?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: postgres +# password: wsnet_906 #Fineidc@2023 #wsnet_906 + +# # 丰网服务器环境:IP:61.184.202.72; port:5432; db:rtos_applet_v2; user: postgres password: Fineidc@2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://61.184.202.72:5432/rtos_applet_v2?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: postgres +# password: Fineidc@2023 #Fineidc@2023 #wsnet_906 + +# 海通测试环境:IP:192.168.61.114; port:5432; db:rtos_wh; user: rtops_wh password: wh#2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://192.168.61.114:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: rtops_wh +# password: wh#2023 + + +# 开发库本地(公司):IP:192.168.0.16; port:5432; db:rtops_wh; user: rtos_wh password: wh#2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://192.168.0.16:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: rtops_wh +# password: wh#2023 + +# 开发库本地:IP:localhost; port:5432; db:rtos_wh; user: postgres password: wsnet906 + +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://localhost:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: postgres +# password: wsnet906 + +# # 华为云测试环境:IP:116.205.142.169; port:5432; db:rtos_wh; user: rtops_wh password: wh#2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://116.205.142.169:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: rtops_wh +# password: wh#2023 + +# mybatis配置 +#mybatis: +# mapper-locations: classpath:mappers/*/*.xml +# +## pagehelper 分页插件 +#pagehelper: +# helperDialect: postgresql +# reasonable: true +# supportMethodsArguments: true +# rowBoundsWithCount: true +# params: count=countSql +# +#logging: +# level: +# root: info +# com: +# nuzar: DEBUG +#nuzar: +# cloud: +# jasypt: +# password: RTOS_HTGJ +# security: +# #mode: none +# mode: classic +# saas: +# enabled: true +# #enabled: false +# +# +#mybatis-plus: +# type-enums-package: com.nuzar.rtos.common.enumeration +# +# +## auth-server: http://127.0.0.1:20880 # 认证服务器地址 +#auth-server: https://rtops4.haitongauto.com/auth +##auth-server: http://10.166.1.27:32500/auth/ # 认证服务器地址 \ No newline at end of file diff --git a/wx-applet/src/main/resources/back/bannerX.txt b/wx-applet/src/main/resources/back/bannerX.txt new file mode 100644 index 0000000..737ea48 --- /dev/null +++ b/wx-applet/src/main/resources/back/bannerX.txt @@ -0,0 +1,22 @@ +//////////////////////////////////////////////////////////////////// +// _ooOoo_ // +// o8888888o // +// 88" . "88 // +// (| ^_^ |) // +// O\ = /O // +// ____/`---'\____ // +// .' \\| |// `. // +// / \\||| : |||// \ // +// / _||||| -:- |||||- \ // +// | | \\\ - /// | | // +// | \_| ''\---/'' | | // +// \ .-\__ `-` ___/-. / // +// ___`. .' /--.--\ `. . ___ // +// ."" '< `.___\_<|>_/___.' >'"". // +// | | : `- \`.;`\ _ /`;.`/ - ` : | | // +// \ \ `-. \_ __\ /__ _/ .-` / / // +// ========`-.____`-.___\_____/___.-`____.-'======== // +// `=---=' // +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// 佛祖保佑 永不宕机 永无BUG // +//////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/wx-applet/src/main/resources/back/logback-spring.xml b/wx-applet/src/main/resources/back/logback-spring.xml new file mode 100644 index 0000000..17a4480 --- /dev/null +++ b/wx-applet/src/main/resources/back/logback-spring.xml @@ -0,0 +1,19 @@ + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + + + + \ No newline at end of file diff --git a/wx-applet/src/main/resources/back/本地调试.txt b/wx-applet/src/main/resources/back/本地调试.txt new file mode 100644 index 0000000..55003f9 --- /dev/null +++ b/wx-applet/src/main/resources/back/本地调试.txt @@ -0,0 +1,61 @@ +# 微信小程序服务配置 +server: + port: 8891 + +# postgresql数据源配置 +spring: +# profiles: +# active: pre +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://localhost:5432/rtos_wx_applet?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: postgres +# password: wsnet_906 #Fineidc@2023 #wsnet_906 + +# # 丰网服务器环境:IP:61.184.202.72; port:5432; db:rtos_applet_v2; user: postgres password: Fineidc@2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://61.184.202.72:5432/rtos_applet_v2?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: postgres +# password: Fineidc@2023 #Fineidc@2023 #wsnet_906 + +# 海通测试环境:IP:192.168.61.114; port:5432; db:rtos_wh; user: rtops_wh password: wh#2023 + datasource: + driver-class-name: org.postgresql.Driver + url: jdbc:postgresql://192.168.61.114:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 + username: rtops_wh + password: wh#2023 + + + # 开发库本地(公司):IP:192.168.0.16; port:5432; db:rtops_wh; user: rtos_wh password: wh#2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://192.168.0.16:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: rtops_wh +# password: wh#2023 + + # 开发库本地:IP:localhost; port:5432; db:rtos_wh; user: postgres password: wsnet906 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://localhost:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: postgres +# password: wsnet906 + +# # 华为云测试环境:IP:116.205.142.169; port:5432; db:rtos_wh; user: rtops_wh password: wh#2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://116.205.142.169:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: rtops_wh +# password: wh#2023 + +# mybatis配置 +mybatis: + mapper-locations: classpath:mappers/*/*.xml + +# pagehelper 分页插件 +pagehelper: + helperDialect: postgresql + reasonable: true + supportMethodsArguments: true + rowBoundsWithCount: true +# params: count=countSql \ No newline at end of file diff --git a/wx-applet/src/main/resources/back/远程.yml b/wx-applet/src/main/resources/back/远程.yml new file mode 100644 index 0000000..3308788 --- /dev/null +++ b/wx-applet/src/main/resources/back/远程.yml @@ -0,0 +1,8 @@ +# 微信小程序服务配置 +server: + port: 8891 + +# postgresql数据源配置 +spring: + profiles: + active: pre diff --git a/wx-applet/src/main/resources/bootstrap-pre.yml b/wx-applet/src/main/resources/bootstrap-pre.yml new file mode 100644 index 0000000..00bc618 --- /dev/null +++ b/wx-applet/src/main/resources/bootstrap-pre.yml @@ -0,0 +1,27 @@ +spring: + cloud: + nacos: + server-addr: 192.168.61.130:8848 + discovery: + enabled: true + server-addr: 192.168.61.130:8848 + namespace: 4f38d093-5ff8-46f0-974f-08453b0980f4 + file-extension: yaml + config: + enabled: true + server-addr: 192.168.61.130:8848 + namespace: 4f38d093-5ff8-46f0-974f-08453b0980f4 + file-extension: yaml + group: DEFAULT_GROUP_WH + prefix: ${spring.application.name} + shared-configs: + - data-id: rtops-st.yaml + username: nacos + password: Nuzar123456_#QWE +nuzar: + cloud: + security: + permit-all: /swagger-resources/**,/webjars/**,/swagger-ui.html/*,/swagger-ui.html,/v2/** + + +# - data-id: rtops-st.yaml diff --git a/wx-applet/src/main/resources/bootstrap.yml b/wx-applet/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..e2bfb06 --- /dev/null +++ b/wx-applet/src/main/resources/bootstrap.yml @@ -0,0 +1,69 @@ +# 微信小程序服务配置 +server: + port: 8891 + + +# postgresql数据源配置 +spring: + application: + name: rtos-mini + profiles: + active: pre + +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://localhost:5432/rtos_wx_applet?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: postgres +# password: wsnet_906 #Fineidc@2023 #wsnet_906 + +# # 丰网服务器环境:IP:61.184.202.72; port:5432; db:rtos_applet_v2; user: postgres password: Fineidc@2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://61.184.202.72:5432/rtos_applet_v2?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: postgres +# password: Fineidc@2023 #Fineidc@2023 #wsnet_906 + +# 海通测试环境:IP:192.168.61.114; port:5432; db:rtos_wh; user: rtops_wh password: wh#2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://192.168.61.114:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: rtops_wh +# password: wh#2023 + + +# 开发库本地(公司):IP:192.168.0.16; port:5432; db:rtops_wh; user: rtos_wh password: wh#2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://192.168.0.16:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: rtops_wh +# password: wh#2023 + +# # 开发库本地:IP:localhost; port:5432; db:rtos_wh; user: postgres password: wsnet906 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://localhost:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: postgres +# password: wsnet906 + +# 华为云测试环境:IP:116.205.142.169; port:5432; db:rtos_wh; user: rtops_wh password: wh#2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://116.205.142.169:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: rtops_wh +# password: wh#2023 + +# mybatis配置 +#mybatis: +#mapper-locations: classpath:mappers/*/*.xml + +# +## pagehelper 分页插件 +#pagehelper: +#helperDialect: postgresql +#reasonable: true +#supportMethodsArguments: true +#rowBoundsWithCount: true + + +#params: count=countSql + diff --git a/wx-applet/src/main/resources/static/client_img/20230427b40efe1e-462f-42df-8c3d-a56e4b3c34ce.jpg b/wx-applet/src/main/resources/static/client_img/20230427b40efe1e-462f-42df-8c3d-a56e4b3c34ce.jpg new file mode 100644 index 0000000..527e65a Binary files /dev/null and b/wx-applet/src/main/resources/static/client_img/20230427b40efe1e-462f-42df-8c3d-a56e4b3c34ce.jpg differ diff --git a/wx-applet/src/main/resources/static/client_img/20230508f463bc91-85c6-46df-a1a3-67af8b0d3525.jpg b/wx-applet/src/main/resources/static/client_img/20230508f463bc91-85c6-46df-a1a3-67af8b0d3525.jpg new file mode 100644 index 0000000..527e65a Binary files /dev/null and b/wx-applet/src/main/resources/static/client_img/20230508f463bc91-85c6-46df-a1a3-67af8b0d3525.jpg differ diff --git a/wx-applet/src/main/resources/static/client_img/aaa.txt b/wx-applet/src/main/resources/static/client_img/aaa.txt new file mode 100644 index 0000000..42d8ebe --- /dev/null +++ b/wx-applet/src/main/resources/static/client_img/aaa.txt @@ -0,0 +1 @@ +ok? \ No newline at end of file diff --git a/wx-applet/src/main/resources/本地.yml b/wx-applet/src/main/resources/本地.yml new file mode 100644 index 0000000..9fa40cf --- /dev/null +++ b/wx-applet/src/main/resources/本地.yml @@ -0,0 +1,66 @@ +# 微信小程序服务配置 + server: + port: 8891 + + + # postgresql数据源配置 + spring: + # profiles: + # active: pre + + # datasource: + # driver-class-name: org.postgresql.Driver + # url: jdbc:postgresql://localhost:5432/rtos_wx_applet?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 + # username: postgres + # password: wsnet_906 #Fineidc@2023 #wsnet_906 + + # # 丰网服务器环境:IP:61.184.202.72; port:5432; db:rtos_applet_v2; user: postgres password: Fineidc@2023 + # datasource: + # driver-class-name: org.postgresql.Driver + # url: jdbc:postgresql://61.184.202.72:5432/rtos_applet_v2?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 + # username: postgres + # password: Fineidc@2023 #Fineidc@2023 #wsnet_906 + + # 海通测试环境:IP:192.168.61.114; port:5432; db:rtos_wh; user: rtops_wh password: wh#2023 + datasource: + driver-class-name: org.postgresql.Driver + url: jdbc:postgresql://192.168.61.114:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 + username: rtops_wh + password: wh#2023 + + + # 开发库本地(公司):IP:192.168.0.16; port:5432; db:rtops_wh; user: rtos_wh password: wh#2023 + # datasource: + # driver-class-name: org.postgresql.Driver + # url: jdbc:postgresql://192.168.0.16:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 + # username: rtops_wh + # password: wh#2023 + + # # 开发库本地:IP:localhost; port:5432; db:rtos_wh; user: postgres password: wsnet906 + # datasource: + # driver-class-name: org.postgresql.Driver + # url: jdbc:postgresql://localhost:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 + # username: postgres + # password: wsnet906 + + # 华为云测试环境:IP:116.205.142.169; port:5432; db:rtos_wh; user: rtops_wh password: wh#2023 + # datasource: + # driver-class-name: org.postgresql.Driver + # url: jdbc:postgresql://116.205.142.169:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 + # username: rtops_wh + # password: wh#2023 + + # mybatis配置 + mybatis: + mapper-locations: classpath:mappers/*/*.xml + + # pagehelper 分页插件 + pagehelper: + helperDialect: postgresql + reasonable: true + supportMethodsArguments: true + rowBoundsWithCount: true + + + #params: count=countSql + diff --git a/wx-applet/src/main/resources/远程.yml b/wx-applet/src/main/resources/远程.yml new file mode 100644 index 0000000..1847320 --- /dev/null +++ b/wx-applet/src/main/resources/远程.yml @@ -0,0 +1,10 @@ +server: + port: 8891 +spring: + profiles: + active: pre + datasource: + driver-class-name: org.postgresql.Driver + url: jdbc:postgresql://192.168.61.114:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 + username: rtops_wh + password: wh#2023 diff --git a/wx-applet/target/classes/back/111.yml b/wx-applet/target/classes/back/111.yml new file mode 100644 index 0000000..e211fef --- /dev/null +++ b/wx-applet/target/classes/back/111.yml @@ -0,0 +1,98 @@ + +# 微信小程序服务配置 +# postgresql数据源配置 +#spring: +# redis: +# database: 0 +# host: 192.168.61.130 +# port: 6379 +# connect-timeout: 1 +# password: Nuzar123456_ +# security: +# oauth2: +# resourceserver: +# opaquetoken: +# client-secret: bossnine +# client-id: trusted-bbw-tally +# introspection-uri: ${auth-server}/saas/token/info +# profiles: +# active: pre +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://localhost:5432/rtos_wx_applet?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: postgres +# password: wsnet_906 #Fineidc@2023 #wsnet_906 + +# # 丰网服务器环境:IP:61.184.202.72; port:5432; db:rtos_applet_v2; user: postgres password: Fineidc@2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://61.184.202.72:5432/rtos_applet_v2?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: postgres +# password: Fineidc@2023 #Fineidc@2023 #wsnet_906 + +# 海通测试环境:IP:192.168.61.114; port:5432; db:rtos_wh; user: rtops_wh password: wh#2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://192.168.61.114:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: rtops_wh +# password: wh#2023 + + +# 开发库本地(公司):IP:192.168.0.16; port:5432; db:rtops_wh; user: rtos_wh password: wh#2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://192.168.0.16:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: rtops_wh +# password: wh#2023 + +# 开发库本地:IP:localhost; port:5432; db:rtos_wh; user: postgres password: wsnet906 + +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://localhost:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: postgres +# password: wsnet906 + +# # 华为云测试环境:IP:116.205.142.169; port:5432; db:rtos_wh; user: rtops_wh password: wh#2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://116.205.142.169:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: rtops_wh +# password: wh#2023 + +# mybatis配置 +#mybatis: +# mapper-locations: classpath:mappers/*/*.xml +# +## pagehelper 分页插件 +#pagehelper: +# helperDialect: postgresql +# reasonable: true +# supportMethodsArguments: true +# rowBoundsWithCount: true +# params: count=countSql +# +#logging: +# level: +# root: info +# com: +# nuzar: DEBUG +#nuzar: +# cloud: +# jasypt: +# password: RTOS_HTGJ +# security: +# #mode: none +# mode: classic +# saas: +# enabled: true +# #enabled: false +# +# +#mybatis-plus: +# type-enums-package: com.nuzar.rtos.common.enumeration +# +# +## auth-server: http://127.0.0.1:20880 # 认证服务器地址 +#auth-server: https://rtops4.haitongauto.com/auth +##auth-server: http://10.166.1.27:32500/auth/ # 认证服务器地址 \ No newline at end of file diff --git a/wx-applet/target/classes/back/bannerX.txt b/wx-applet/target/classes/back/bannerX.txt new file mode 100644 index 0000000..737ea48 --- /dev/null +++ b/wx-applet/target/classes/back/bannerX.txt @@ -0,0 +1,22 @@ +//////////////////////////////////////////////////////////////////// +// _ooOoo_ // +// o8888888o // +// 88" . "88 // +// (| ^_^ |) // +// O\ = /O // +// ____/`---'\____ // +// .' \\| |// `. // +// / \\||| : |||// \ // +// / _||||| -:- |||||- \ // +// | | \\\ - /// | | // +// | \_| ''\---/'' | | // +// \ .-\__ `-` ___/-. / // +// ___`. .' /--.--\ `. . ___ // +// ."" '< `.___\_<|>_/___.' >'"". // +// | | : `- \`.;`\ _ /`;.`/ - ` : | | // +// \ \ `-. \_ __\ /__ _/ .-` / / // +// ========`-.____`-.___\_____/___.-`____.-'======== // +// `=---=' // +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// 佛祖保佑 永不宕机 永无BUG // +//////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/wx-applet/target/classes/back/logback-spring.xml b/wx-applet/target/classes/back/logback-spring.xml new file mode 100644 index 0000000..17a4480 --- /dev/null +++ b/wx-applet/target/classes/back/logback-spring.xml @@ -0,0 +1,19 @@ + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + + + + \ No newline at end of file diff --git a/wx-applet/target/classes/back/本地调试.txt b/wx-applet/target/classes/back/本地调试.txt new file mode 100644 index 0000000..55003f9 --- /dev/null +++ b/wx-applet/target/classes/back/本地调试.txt @@ -0,0 +1,61 @@ +# 微信小程序服务配置 +server: + port: 8891 + +# postgresql数据源配置 +spring: +# profiles: +# active: pre +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://localhost:5432/rtos_wx_applet?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: postgres +# password: wsnet_906 #Fineidc@2023 #wsnet_906 + +# # 丰网服务器环境:IP:61.184.202.72; port:5432; db:rtos_applet_v2; user: postgres password: Fineidc@2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://61.184.202.72:5432/rtos_applet_v2?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: postgres +# password: Fineidc@2023 #Fineidc@2023 #wsnet_906 + +# 海通测试环境:IP:192.168.61.114; port:5432; db:rtos_wh; user: rtops_wh password: wh#2023 + datasource: + driver-class-name: org.postgresql.Driver + url: jdbc:postgresql://192.168.61.114:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 + username: rtops_wh + password: wh#2023 + + + # 开发库本地(公司):IP:192.168.0.16; port:5432; db:rtops_wh; user: rtos_wh password: wh#2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://192.168.0.16:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: rtops_wh +# password: wh#2023 + + # 开发库本地:IP:localhost; port:5432; db:rtos_wh; user: postgres password: wsnet906 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://localhost:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: postgres +# password: wsnet906 + +# # 华为云测试环境:IP:116.205.142.169; port:5432; db:rtos_wh; user: rtops_wh password: wh#2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://116.205.142.169:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: rtops_wh +# password: wh#2023 + +# mybatis配置 +mybatis: + mapper-locations: classpath:mappers/*/*.xml + +# pagehelper 分页插件 +pagehelper: + helperDialect: postgresql + reasonable: true + supportMethodsArguments: true + rowBoundsWithCount: true +# params: count=countSql \ No newline at end of file diff --git a/wx-applet/target/classes/back/远程.yml b/wx-applet/target/classes/back/远程.yml new file mode 100644 index 0000000..3308788 --- /dev/null +++ b/wx-applet/target/classes/back/远程.yml @@ -0,0 +1,8 @@ +# 微信小程序服务配置 +server: + port: 8891 + +# postgresql数据源配置 +spring: + profiles: + active: pre diff --git a/wx-applet/target/classes/bootstrap-pre.yml b/wx-applet/target/classes/bootstrap-pre.yml new file mode 100644 index 0000000..00bc618 --- /dev/null +++ b/wx-applet/target/classes/bootstrap-pre.yml @@ -0,0 +1,27 @@ +spring: + cloud: + nacos: + server-addr: 192.168.61.130:8848 + discovery: + enabled: true + server-addr: 192.168.61.130:8848 + namespace: 4f38d093-5ff8-46f0-974f-08453b0980f4 + file-extension: yaml + config: + enabled: true + server-addr: 192.168.61.130:8848 + namespace: 4f38d093-5ff8-46f0-974f-08453b0980f4 + file-extension: yaml + group: DEFAULT_GROUP_WH + prefix: ${spring.application.name} + shared-configs: + - data-id: rtops-st.yaml + username: nacos + password: Nuzar123456_#QWE +nuzar: + cloud: + security: + permit-all: /swagger-resources/**,/webjars/**,/swagger-ui.html/*,/swagger-ui.html,/v2/** + + +# - data-id: rtops-st.yaml diff --git a/wx-applet/target/classes/bootstrap.yml b/wx-applet/target/classes/bootstrap.yml new file mode 100644 index 0000000..e2bfb06 --- /dev/null +++ b/wx-applet/target/classes/bootstrap.yml @@ -0,0 +1,69 @@ +# 微信小程序服务配置 +server: + port: 8891 + + +# postgresql数据源配置 +spring: + application: + name: rtos-mini + profiles: + active: pre + +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://localhost:5432/rtos_wx_applet?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: postgres +# password: wsnet_906 #Fineidc@2023 #wsnet_906 + +# # 丰网服务器环境:IP:61.184.202.72; port:5432; db:rtos_applet_v2; user: postgres password: Fineidc@2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://61.184.202.72:5432/rtos_applet_v2?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: postgres +# password: Fineidc@2023 #Fineidc@2023 #wsnet_906 + +# 海通测试环境:IP:192.168.61.114; port:5432; db:rtos_wh; user: rtops_wh password: wh#2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://192.168.61.114:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: rtops_wh +# password: wh#2023 + + +# 开发库本地(公司):IP:192.168.0.16; port:5432; db:rtops_wh; user: rtos_wh password: wh#2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://192.168.0.16:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: rtops_wh +# password: wh#2023 + +# # 开发库本地:IP:localhost; port:5432; db:rtos_wh; user: postgres password: wsnet906 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://localhost:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: postgres +# password: wsnet906 + +# 华为云测试环境:IP:116.205.142.169; port:5432; db:rtos_wh; user: rtops_wh password: wh#2023 +# datasource: +# driver-class-name: org.postgresql.Driver +# url: jdbc:postgresql://116.205.142.169:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 +# username: rtops_wh +# password: wh#2023 + +# mybatis配置 +#mybatis: +#mapper-locations: classpath:mappers/*/*.xml + +# +## pagehelper 分页插件 +#pagehelper: +#helperDialect: postgresql +#reasonable: true +#supportMethodsArguments: true +#rowBoundsWithCount: true + + +#params: count=countSql + diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/ApplicationApplet.class b/wx-applet/target/classes/com/haitongauto/rtosac/ApplicationApplet.class new file mode 100644 index 0000000..68364b9 Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/ApplicationApplet.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/SwaggerConfig.class b/wx-applet/target/classes/com/haitongauto/rtosac/SwaggerConfig.class new file mode 100644 index 0000000..7f11178 Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/SwaggerConfig.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/api/AppointmentController.class b/wx-applet/target/classes/com/haitongauto/rtosac/api/AppointmentController.class new file mode 100644 index 0000000..bc3d3f9 Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/api/AppointmentController.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/api/HomeController.class b/wx-applet/target/classes/com/haitongauto/rtosac/api/HomeController.class new file mode 100644 index 0000000..483fa87 Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/api/HomeController.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/api/MessageController.class b/wx-applet/target/classes/com/haitongauto/rtosac/api/MessageController.class new file mode 100644 index 0000000..3f5b84f Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/api/MessageController.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/api/MineController.class b/wx-applet/target/classes/com/haitongauto/rtosac/api/MineController.class new file mode 100644 index 0000000..b22e5a3 Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/api/MineController.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/api/NewsController.class b/wx-applet/target/classes/com/haitongauto/rtosac/api/NewsController.class new file mode 100644 index 0000000..f538705 Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/api/NewsController.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/api/PunchClockController.class b/wx-applet/target/classes/com/haitongauto/rtosac/api/PunchClockController.class new file mode 100644 index 0000000..e0b2b44 Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/api/PunchClockController.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/api/VehicleController.class b/wx-applet/target/classes/com/haitongauto/rtosac/api/VehicleController.class new file mode 100644 index 0000000..24e1113 Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/api/VehicleController.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/service/AppointmentService.class b/wx-applet/target/classes/com/haitongauto/rtosac/service/AppointmentService.class new file mode 100644 index 0000000..10d741e Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/service/AppointmentService.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/service/HomeService.class b/wx-applet/target/classes/com/haitongauto/rtosac/service/HomeService.class new file mode 100644 index 0000000..1ab23d6 Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/service/HomeService.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/service/MessageService.class b/wx-applet/target/classes/com/haitongauto/rtosac/service/MessageService.class new file mode 100644 index 0000000..8b6f641 Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/service/MessageService.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/service/MineService.class b/wx-applet/target/classes/com/haitongauto/rtosac/service/MineService.class new file mode 100644 index 0000000..02e90bb Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/service/MineService.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/service/NewsService.class b/wx-applet/target/classes/com/haitongauto/rtosac/service/NewsService.class new file mode 100644 index 0000000..00cbc89 Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/service/NewsService.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/service/PunchClockService.class b/wx-applet/target/classes/com/haitongauto/rtosac/service/PunchClockService.class new file mode 100644 index 0000000..797b0cb Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/service/PunchClockService.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/service/Response.class b/wx-applet/target/classes/com/haitongauto/rtosac/service/Response.class new file mode 100644 index 0000000..7f3f698 Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/service/Response.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/service/UsersService.class b/wx-applet/target/classes/com/haitongauto/rtosac/service/UsersService.class new file mode 100644 index 0000000..301a6d4 Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/service/UsersService.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/service/VehicleService.class b/wx-applet/target/classes/com/haitongauto/rtosac/service/VehicleService.class new file mode 100644 index 0000000..14bc9b4 Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/service/VehicleService.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/AppointmentServiceImpl.class b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/AppointmentServiceImpl.class new file mode 100644 index 0000000..a57e665 Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/AppointmentServiceImpl.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/HomeServiceImpl$1.class b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/HomeServiceImpl$1.class new file mode 100644 index 0000000..3a06fac Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/HomeServiceImpl$1.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/HomeServiceImpl.class b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/HomeServiceImpl.class new file mode 100644 index 0000000..ae95a6c Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/HomeServiceImpl.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/MessageServiceImpl.class b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/MessageServiceImpl.class new file mode 100644 index 0000000..164dc16 Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/MessageServiceImpl.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/MineServiceImpl.class b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/MineServiceImpl.class new file mode 100644 index 0000000..2b5d3fa Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/MineServiceImpl.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/NewsServiceImpl.class b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/NewsServiceImpl.class new file mode 100644 index 0000000..0f2a73e Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/NewsServiceImpl.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/PunchClockServiceImpl.class b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/PunchClockServiceImpl.class new file mode 100644 index 0000000..1b2a6c7 Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/PunchClockServiceImpl.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/ResponseImpl.class b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/ResponseImpl.class new file mode 100644 index 0000000..b224286 Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/ResponseImpl.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/UsersServiceImpl.class b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/UsersServiceImpl.class new file mode 100644 index 0000000..a7d4e05 Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/UsersServiceImpl.class differ diff --git a/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/VehicleServiceImpl.class b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/VehicleServiceImpl.class new file mode 100644 index 0000000..da229ea Binary files /dev/null and b/wx-applet/target/classes/com/haitongauto/rtosac/service/impl/VehicleServiceImpl.class differ diff --git a/wx-applet/target/classes/static/client_img/20230427b40efe1e-462f-42df-8c3d-a56e4b3c34ce.jpg b/wx-applet/target/classes/static/client_img/20230427b40efe1e-462f-42df-8c3d-a56e4b3c34ce.jpg new file mode 100644 index 0000000..527e65a Binary files /dev/null and b/wx-applet/target/classes/static/client_img/20230427b40efe1e-462f-42df-8c3d-a56e4b3c34ce.jpg differ diff --git a/wx-applet/target/classes/static/client_img/20230508f463bc91-85c6-46df-a1a3-67af8b0d3525.jpg b/wx-applet/target/classes/static/client_img/20230508f463bc91-85c6-46df-a1a3-67af8b0d3525.jpg new file mode 100644 index 0000000..527e65a Binary files /dev/null and b/wx-applet/target/classes/static/client_img/20230508f463bc91-85c6-46df-a1a3-67af8b0d3525.jpg differ diff --git a/wx-applet/target/classes/static/client_img/aaa.txt b/wx-applet/target/classes/static/client_img/aaa.txt new file mode 100644 index 0000000..42d8ebe --- /dev/null +++ b/wx-applet/target/classes/static/client_img/aaa.txt @@ -0,0 +1 @@ +ok? \ No newline at end of file diff --git a/wx-applet/target/classes/本地.yml b/wx-applet/target/classes/本地.yml new file mode 100644 index 0000000..9fa40cf --- /dev/null +++ b/wx-applet/target/classes/本地.yml @@ -0,0 +1,66 @@ +# 微信小程序服务配置 + server: + port: 8891 + + + # postgresql数据源配置 + spring: + # profiles: + # active: pre + + # datasource: + # driver-class-name: org.postgresql.Driver + # url: jdbc:postgresql://localhost:5432/rtos_wx_applet?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 + # username: postgres + # password: wsnet_906 #Fineidc@2023 #wsnet_906 + + # # 丰网服务器环境:IP:61.184.202.72; port:5432; db:rtos_applet_v2; user: postgres password: Fineidc@2023 + # datasource: + # driver-class-name: org.postgresql.Driver + # url: jdbc:postgresql://61.184.202.72:5432/rtos_applet_v2?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 + # username: postgres + # password: Fineidc@2023 #Fineidc@2023 #wsnet_906 + + # 海通测试环境:IP:192.168.61.114; port:5432; db:rtos_wh; user: rtops_wh password: wh#2023 + datasource: + driver-class-name: org.postgresql.Driver + url: jdbc:postgresql://192.168.61.114:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 + username: rtops_wh + password: wh#2023 + + + # 开发库本地(公司):IP:192.168.0.16; port:5432; db:rtops_wh; user: rtos_wh password: wh#2023 + # datasource: + # driver-class-name: org.postgresql.Driver + # url: jdbc:postgresql://192.168.0.16:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 + # username: rtops_wh + # password: wh#2023 + + # # 开发库本地:IP:localhost; port:5432; db:rtos_wh; user: postgres password: wsnet906 + # datasource: + # driver-class-name: org.postgresql.Driver + # url: jdbc:postgresql://localhost:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 + # username: postgres + # password: wsnet906 + + # 华为云测试环境:IP:116.205.142.169; port:5432; db:rtos_wh; user: rtops_wh password: wh#2023 + # datasource: + # driver-class-name: org.postgresql.Driver + # url: jdbc:postgresql://116.205.142.169:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 + # username: rtops_wh + # password: wh#2023 + + # mybatis配置 + mybatis: + mapper-locations: classpath:mappers/*/*.xml + + # pagehelper 分页插件 + pagehelper: + helperDialect: postgresql + reasonable: true + supportMethodsArguments: true + rowBoundsWithCount: true + + + #params: count=countSql + diff --git a/wx-applet/target/classes/远程.yml b/wx-applet/target/classes/远程.yml new file mode 100644 index 0000000..1847320 --- /dev/null +++ b/wx-applet/target/classes/远程.yml @@ -0,0 +1,10 @@ +server: + port: 8891 +spring: + profiles: + active: pre + datasource: + driver-class-name: org.postgresql.Driver + url: jdbc:postgresql://192.168.61.114:5432/rtos_wh?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8 + username: rtops_wh + password: wh#2023 diff --git a/wx-applet/target/com.haitongauto.rtosac.jar b/wx-applet/target/com.haitongauto.rtosac.jar new file mode 100644 index 0000000..ad25e16 Binary files /dev/null and b/wx-applet/target/com.haitongauto.rtosac.jar differ diff --git a/wx-applet/target/com.haitongauto.rtosac.jar.original b/wx-applet/target/com.haitongauto.rtosac.jar.original new file mode 100644 index 0000000..5cf40fc Binary files /dev/null and b/wx-applet/target/com.haitongauto.rtosac.jar.original differ diff --git a/wx-applet/target/maven-archiver/pom.properties b/wx-applet/target/maven-archiver/pom.properties new file mode 100644 index 0000000..66112b0 --- /dev/null +++ b/wx-applet/target/maven-archiver/pom.properties @@ -0,0 +1,3 @@ +artifactId=wx-applet +groupId=org.example +version=1.0-SNAPSHOT diff --git a/wx-applet/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/wx-applet/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..0cd7ab5 --- /dev/null +++ b/wx-applet/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,27 @@ +com\haitongauto\rtosac\service\impl\AppointmentServiceImpl.class +com\haitongauto\rtosac\service\HomeService.class +com\haitongauto\rtosac\service\impl\MineServiceImpl.class +com\haitongauto\rtosac\service\impl\MessageServiceImpl.class +com\haitongauto\rtosac\service\AppointmentService.class +com\haitongauto\rtosac\service\impl\HomeServiceImpl$1.class +com\haitongauto\rtosac\api\PunchClockController.class +com\haitongauto\rtosac\ApplicationApplet.class +com\haitongauto\rtosac\service\MessageService.class +com\haitongauto\rtosac\service\impl\NewsServiceImpl.class +com\haitongauto\rtosac\service\NewsService.class +com\haitongauto\rtosac\api\NewsController.class +com\haitongauto\rtosac\api\AppointmentController.class +com\haitongauto\rtosac\service\impl\UsersServiceImpl.class +com\haitongauto\rtosac\api\MineController.class +com\haitongauto\rtosac\service\Response.class +com\haitongauto\rtosac\api\VehicleController.class +com\haitongauto\rtosac\service\impl\HomeServiceImpl.class +com\haitongauto\rtosac\service\VehicleService.class +com\haitongauto\rtosac\service\MineService.class +com\haitongauto\rtosac\api\HomeController.class +com\haitongauto\rtosac\api\MessageController.class +com\haitongauto\rtosac\service\PunchClockService.class +com\haitongauto\rtosac\service\impl\ResponseImpl.class +com\haitongauto\rtosac\service\impl\VehicleServiceImpl.class +com\haitongauto\rtosac\service\UsersService.class +com\haitongauto\rtosac\service\impl\PunchClockServiceImpl.class diff --git a/wx-applet/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/wx-applet/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..d0280ba --- /dev/null +++ b/wx-applet/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,26 @@ +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\service\impl\MessageServiceImpl.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\service\HomeService.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\api\HomeController.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\service\MineService.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\service\Response.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\service\impl\MineServiceImpl.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\service\PunchClockService.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\api\NewsController.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\service\AppointmentService.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\api\AppointmentController.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\service\UsersService.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\api\PunchClockController.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\ApplicationApplet.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\service\impl\HomeServiceImpl.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\api\MineController.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\service\impl\VehicleServiceImpl.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\service\MessageService.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\service\impl\PunchClockServiceImpl.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\api\MessageController.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\service\impl\NewsServiceImpl.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\service\impl\UsersServiceImpl.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\service\impl\ResponseImpl.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\service\impl\AppointmentServiceImpl.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\service\VehicleService.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\api\VehicleController.java +F:\Codes\rtos\v3\wx-applet\src\main\java\com\haitongauto\rtosac\service\NewsService.java