Commit 6686f831e8e46fd635d14c76d505077d716b465c
Merge remote-tracking branch 'origin/dev' into dev
Showing
18 changed files
with
106 additions
and
90 deletions
trash-admin/src/main/java/com/trash/Application.java
| @@ -3,10 +3,6 @@ package com.trash; | @@ -3,10 +3,6 @@ package com.trash; | ||
| 3 | import org.springframework.boot.SpringApplication; | 3 | import org.springframework.boot.SpringApplication; |
| 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; | 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| 5 | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; | 5 | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; |
| 6 | -import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer; | ||
| 7 | -import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; | ||
| 8 | -import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory; | ||
| 9 | -import org.springframework.context.annotation.Bean; | ||
| 10 | import org.springframework.scheduling.annotation.EnableScheduling; | 6 | import org.springframework.scheduling.annotation.EnableScheduling; |
| 11 | 7 | ||
| 12 | /** | 8 | /** |
| @@ -20,15 +16,8 @@ public class Application | @@ -20,15 +16,8 @@ public class Application | ||
| 20 | { | 16 | { |
| 21 | public static void main(String[] args) | 17 | public static void main(String[] args) |
| 22 | { | 18 | { |
| 23 | - System.setProperty("spring.devtools.restart.enabled", "true"); | 19 | + // System.setProperty("spring.devtools.restart.enabled", "false"); |
| 24 | SpringApplication.run(Application.class, args); | 20 | SpringApplication.run(Application.class, args); |
| 25 | System.out.println("Application start success"); | 21 | System.out.println("Application start success"); |
| 26 | } | 22 | } |
| 27 | - | ||
| 28 | - @Bean | ||
| 29 | - public ConfigurableServletWebServerFactory webServerFactory() { | ||
| 30 | - TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory(); | ||
| 31 | - factory.addConnectorCustomizers((TomcatConnectorCustomizer) connector -> connector.setProperty("relaxedQueryChars", "|{}[]\\")); | ||
| 32 | - return factory; | ||
| 33 | - } | ||
| 34 | } | 23 | } |
trash-admin/src/main/resources/application-dev.yml
| @@ -9,8 +9,8 @@ trash: | @@ -9,8 +9,8 @@ trash: | ||
| 9 | # 实例演示开关 | 9 | # 实例演示开关 |
| 10 | demoEnabled: true | 10 | demoEnabled: true |
| 11 | # 文件路径 示例( Windows配置D:/trash/uploadPath,Linux配置 /home/trash/uploadPath,存储桶 trash/uploadPath,nginx配置 /trash/upload) | 11 | # 文件路径 示例( Windows配置D:/trash/uploadPath,Linux配置 /home/trash/uploadPath,存储桶 trash/uploadPath,nginx配置 /trash/upload) |
| 12 | - #profile: /home/trash/uploadPath | ||
| 13 | - profile: E:/trash/uploadPath | 12 | + profile: /home/trash/uploadPath |
| 13 | +# profile: E:/trash/uploadPath | ||
| 14 | # profile: F:/work/project/Documents/uploadPath/trash | 14 | # profile: F:/work/project/Documents/uploadPath/trash |
| 15 | # 获取ip地址开关 | 15 | # 获取ip地址开关 |
| 16 | addressEnabled: false | 16 | addressEnabled: false |
| @@ -33,7 +33,7 @@ spring: | @@ -33,7 +33,7 @@ spring: | ||
| 33 | # 主库数据源 | 33 | # 主库数据源 |
| 34 | master: | 34 | master: |
| 35 | # url: jdbc:mysql://localhost:3306/trash?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true | 35 | # url: jdbc:mysql://localhost:3306/trash?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true |
| 36 | - url: jdbc:mysql://localhost:3306/trash?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true | 36 | + url: jdbc:mysql://192.168.168.141:3306/trash?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true |
| 37 | username: root | 37 | username: root |
| 38 | password: root | 38 | password: root |
| 39 | # 从库数据源 | 39 | # 从库数据源 |
trash-admin/src/main/resources/application-local.yml
trash-admin/src/main/resources/static/car_2.png
trash-admin/src/main/resources/static/car_2.png1
0 → 100644
No preview for this file type
trash-admin/src/main/resources/static/type-guide.1.png
0 → 100644
1.94 MB
trash-framework/src/main/java/com/trash/framework/web/service/SysLoginService.java
| 1 | package com.trash.framework.web.service; | 1 | package com.trash.framework.web.service; |
| 2 | 2 | ||
| 3 | -import java.util.ArrayList; | ||
| 4 | -import java.util.HashSet; | ||
| 5 | -import java.util.List; | ||
| 6 | -import java.util.Set; | ||
| 7 | - | ||
| 8 | -import javax.annotation.Resource; | ||
| 9 | - | ||
| 10 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 11 | -import org.springframework.security.authentication.AuthenticationManager; | ||
| 12 | -import org.springframework.security.authentication.BadCredentialsException; | ||
| 13 | -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; | ||
| 14 | -import org.springframework.security.core.Authentication; | ||
| 15 | -import org.springframework.security.core.authority.SimpleGrantedAuthority; | ||
| 16 | -import org.springframework.security.core.userdetails.UserDetailsService; | ||
| 17 | -import org.springframework.stereotype.Component; | ||
| 18 | - | ||
| 19 | import com.alibaba.fastjson.JSON; | 3 | import com.alibaba.fastjson.JSON; |
| 20 | import com.alibaba.fastjson.JSONArray; | 4 | import com.alibaba.fastjson.JSONArray; |
| 21 | import com.alibaba.fastjson.JSONObject; | 5 | import com.alibaba.fastjson.JSONObject; |
| @@ -34,9 +18,22 @@ import com.trash.common.utils.RemoteServerUtils; | @@ -34,9 +18,22 @@ import com.trash.common.utils.RemoteServerUtils; | ||
| 34 | import com.trash.framework.manager.AsyncManager; | 18 | import com.trash.framework.manager.AsyncManager; |
| 35 | import com.trash.framework.manager.factory.AsyncFactory; | 19 | import com.trash.framework.manager.factory.AsyncFactory; |
| 36 | import com.trash.system.mapper.SysTempMapper; | 20 | import com.trash.system.mapper.SysTempMapper; |
| 37 | - | ||
| 38 | import okhttp3.OkHttpClient; | 21 | import okhttp3.OkHttpClient; |
| 39 | import okhttp3.Request; | 22 | import okhttp3.Request; |
| 23 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 24 | +import org.springframework.security.authentication.AuthenticationManager; | ||
| 25 | +import org.springframework.security.authentication.BadCredentialsException; | ||
| 26 | +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; | ||
| 27 | +import org.springframework.security.core.Authentication; | ||
| 28 | +import org.springframework.security.core.authority.SimpleGrantedAuthority; | ||
| 29 | +import org.springframework.security.core.userdetails.UserDetailsService; | ||
| 30 | +import org.springframework.stereotype.Component; | ||
| 31 | + | ||
| 32 | +import javax.annotation.Resource; | ||
| 33 | +import java.util.ArrayList; | ||
| 34 | +import java.util.HashSet; | ||
| 35 | +import java.util.List; | ||
| 36 | +import java.util.Set; | ||
| 40 | 37 | ||
| 41 | /** | 38 | /** |
| 42 | * 登录校验方法 | 39 | * 登录校验方法 |
| @@ -106,6 +103,7 @@ public class SysLoginService | @@ -106,6 +103,7 @@ public class SysLoginService | ||
| 106 | throw new CustomException(e.getMessage()); | 103 | throw new CustomException(e.getMessage()); |
| 107 | } | 104 | } |
| 108 | } | 105 | } |
| 106 | + | ||
| 109 | AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"))); | 107 | AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"))); |
| 110 | LoginUser loginUser = (LoginUser) authentication.getPrincipal(); | 108 | LoginUser loginUser = (LoginUser) authentication.getPrincipal(); |
| 111 | // 生成token | 109 | // 生成token |
trash-garbage/src/main/java/com/trash/garbage/controller/GarbageOrderController.java
| @@ -94,7 +94,7 @@ public class GarbageOrderController { | @@ -94,7 +94,7 @@ public class GarbageOrderController { | ||
| 94 | // 上传并返回新文件名称 | 94 | // 上传并返回新文件名称 |
| 95 | fileName = FileUploadUtils.upload(filePath, file); | 95 | fileName = FileUploadUtils.upload(filePath, file); |
| 96 | } catch (IOException e) { | 96 | } catch (IOException e) { |
| 97 | -// log.error("上传图片异常",e); | 97 | + log.error("上传图片异常",e); |
| 98 | throw new BizException(ResultCode.CODE_400, ResultCode.CODE_400.getMsg()); | 98 | throw new BizException(ResultCode.CODE_400, ResultCode.CODE_400.getMsg()); |
| 99 | } | 99 | } |
| 100 | String url = serverConfig.getUrl() + fileName; | 100 | String url = serverConfig.getUrl() + fileName; |
trash-garbage/src/main/java/com/trash/garbage/pojo/domain/GarOrder.java
| @@ -169,6 +169,8 @@ public class GarOrder implements Serializable { | @@ -169,6 +169,8 @@ public class GarOrder implements Serializable { | ||
| 169 | 169 | ||
| 170 | private Integer garTimeOutFlag; | 170 | private Integer garTimeOutFlag; |
| 171 | 171 | ||
| 172 | + private String garEstimatedCost; | ||
| 173 | + | ||
| 172 | /** | 174 | /** |
| 173 | * 是否有用户的评价,默认值是0,默认没有 | 175 | * 是否有用户的评价,默认值是0,默认没有 |
| 174 | * | 176 | * |
| @@ -471,4 +473,12 @@ public class GarOrder implements Serializable { | @@ -471,4 +473,12 @@ public class GarOrder implements Serializable { | ||
| 471 | public void setHaveEvaluateOfClient(Integer haveEvaluateOfClient) { | 473 | public void setHaveEvaluateOfClient(Integer haveEvaluateOfClient) { |
| 472 | this.haveEvaluateOfClient = haveEvaluateOfClient; | 474 | this.haveEvaluateOfClient = haveEvaluateOfClient; |
| 473 | } | 475 | } |
| 476 | + | ||
| 477 | + public String getGarEstimatedCost() { | ||
| 478 | + return garEstimatedCost; | ||
| 479 | + } | ||
| 480 | + | ||
| 481 | + public void setGarEstimatedCost(String garEstimatedCost) { | ||
| 482 | + this.garEstimatedCost = garEstimatedCost; | ||
| 483 | + } | ||
| 474 | } | 484 | } |
| 475 | \ No newline at end of file | 485 | \ No newline at end of file |
trash-garbage/src/main/java/com/trash/garbage/pojo/domain/GarOrderCar.java
| @@ -55,23 +55,7 @@ public class GarOrderCar implements Serializable { | @@ -55,23 +55,7 @@ public class GarOrderCar implements Serializable { | ||
| 55 | @TableField(fill = FieldFill.INSERT) | 55 | @TableField(fill = FieldFill.INSERT) |
| 56 | private String garCreateBy; | 56 | private String garCreateBy; |
| 57 | 57 | ||
| 58 | - public Integer getCarId() { | ||
| 59 | - return carId; | ||
| 60 | - } | ||
| 61 | - | ||
| 62 | - public void setCarId(Integer carId) { | ||
| 63 | - this.carId = carId; | ||
| 64 | - } | ||
| 65 | - | ||
| 66 | - public String getContainerVolume() { | ||
| 67 | - return containerVolume; | ||
| 68 | - } | ||
| 69 | - | ||
| 70 | - public void setContainerVolume(String containerVolume) { | ||
| 71 | - this.containerVolume = containerVolume; | ||
| 72 | - } | ||
| 73 | - | ||
| 74 | - /** | 58 | + /** |
| 75 | * | 59 | * |
| 76 | */ | 60 | */ |
| 77 | @TableField(fill = FieldFill.INSERT_UPDATE) | 61 | @TableField(fill = FieldFill.INSERT_UPDATE) |
trash-garbage/src/main/java/com/trash/garbage/pojo/dto/OrderDto.java
| @@ -91,6 +91,8 @@ public class OrderDto { | @@ -91,6 +91,8 @@ public class OrderDto { | ||
| 91 | 91 | ||
| 92 | private List<CarInfo> garCarInfoList; | 92 | private List<CarInfo> garCarInfoList; |
| 93 | 93 | ||
| 94 | + private String garEstimatedCost; | ||
| 95 | + | ||
| 94 | @ToString | 96 | @ToString |
| 95 | @EqualsAndHashCode | 97 | @EqualsAndHashCode |
| 96 | public static class CarInfo { | 98 | public static class CarInfo { |
| @@ -107,8 +109,6 @@ public class OrderDto { | @@ -107,8 +109,6 @@ public class OrderDto { | ||
| 107 | private String garOrderCarType; | 109 | private String garOrderCarType; |
| 108 | 110 | ||
| 109 | private String containerVolume; | 111 | private String containerVolume; |
| 110 | - | ||
| 111 | - | ||
| 112 | 112 | ||
| 113 | public Integer getGarOrderCarNumber() { | 113 | public Integer getGarOrderCarNumber() { |
| 114 | return garOrderCarNumber; | 114 | return garOrderCarNumber; |
| @@ -281,6 +281,14 @@ public class OrderDto { | @@ -281,6 +281,14 @@ public class OrderDto { | ||
| 281 | this.garInCarStore = garInCarStore; | 281 | this.garInCarStore = garInCarStore; |
| 282 | } | 282 | } |
| 283 | 283 | ||
| 284 | + public String getGarEstimatedCost() { | ||
| 285 | + return garEstimatedCost; | ||
| 286 | + } | ||
| 287 | + | ||
| 288 | + public void setGarEstimatedCost(String garEstimatedCost) { | ||
| 289 | + this.garEstimatedCost = garEstimatedCost; | ||
| 290 | + } | ||
| 291 | + | ||
| 284 | @Override | 292 | @Override |
| 285 | public String toString() { | 293 | public String toString() { |
| 286 | return "OrderDto{" + | 294 | return "OrderDto{" + |
trash-garbage/src/main/java/com/trash/garbage/pojo/vo/OrderDetailVo.java
| @@ -159,6 +159,8 @@ public class OrderDetailVo { | @@ -159,6 +159,8 @@ public class OrderDetailVo { | ||
| 159 | */ | 159 | */ |
| 160 | private Integer haveEvaluateOfClient = 0; | 160 | private Integer haveEvaluateOfClient = 0; |
| 161 | 161 | ||
| 162 | + private String garEstimatedCost; | ||
| 163 | + | ||
| 162 | public OrderDetailVo() { | 164 | public OrderDetailVo() { |
| 163 | this.currentImages = new ArrayList<>(); | 165 | this.currentImages = new ArrayList<>(); |
| 164 | this.putDownImages = new ArrayList<>(); | 166 | this.putDownImages = new ArrayList<>(); |
| @@ -441,4 +443,12 @@ public class OrderDetailVo { | @@ -441,4 +443,12 @@ public class OrderDetailVo { | ||
| 441 | public void setHaveEvaluateOfClient(Integer haveEvaluateOfClient) { | 443 | public void setHaveEvaluateOfClient(Integer haveEvaluateOfClient) { |
| 442 | this.haveEvaluateOfClient = haveEvaluateOfClient; | 444 | this.haveEvaluateOfClient = haveEvaluateOfClient; |
| 443 | } | 445 | } |
| 446 | + | ||
| 447 | + public String getGarEstimatedCost() { | ||
| 448 | + return garEstimatedCost; | ||
| 449 | + } | ||
| 450 | + | ||
| 451 | + public void setGarEstimatedCost(String garEstimatedCost) { | ||
| 452 | + this.garEstimatedCost = garEstimatedCost; | ||
| 453 | + } | ||
| 444 | } | 454 | } |
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarOrderServiceImpl.java
| @@ -96,6 +96,8 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> | @@ -96,6 +96,8 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> | ||
| 96 | // 预估车辆等于用户选择得车辆 | 96 | // 预估车辆等于用户选择得车辆 |
| 97 | order.setGarRealCarCount(dto.getGarCarInfoList().stream().mapToInt(OrderDto.CarInfo::getGarOrderCarNumber).sum()); | 97 | order.setGarRealCarCount(dto.getGarCarInfoList().stream().mapToInt(OrderDto.CarInfo::getGarOrderCarNumber).sum()); |
| 98 | order.setGarTimeOutFlag(GlobalStatus.GarOrderStatus.ORDER_TIME_OUT_FLAG_NO.getValue()); | 98 | order.setGarTimeOutFlag(GlobalStatus.GarOrderStatus.ORDER_TIME_OUT_FLAG_NO.getValue()); |
| 99 | + order.setGarEstimatedCost(dto.getGarEstimatedCost()); | ||
| 100 | + | ||
| 99 | save(order); | 101 | save(order); |
| 100 | 102 | ||
| 101 | // 保存车辆信息 | 103 | // 保存车辆信息 |
trash-unit/src/main/java/com/trash/carInfo/controller/CarInfoController.java
| 1 | package com.trash.carInfo.controller; | 1 | package com.trash.carInfo.controller; |
| 2 | 2 | ||
| 3 | -import java.io.IOException; | ||
| 4 | -import java.util.List; | ||
| 5 | - | 3 | +import com.trash.carInfo.domain.CarInfo; |
| 6 | import com.trash.carInfo.domain.vo.CarInfoVo; | 4 | import com.trash.carInfo.domain.vo.CarInfoVo; |
| 7 | -import org.springframework.security.access.prepost.PreAuthorize; | ||
| 8 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | -import org.springframework.web.bind.annotation.*; | 5 | +import com.trash.carInfo.service.ICarInfoService; |
| 10 | import com.trash.common.annotation.Log; | 6 | import com.trash.common.annotation.Log; |
| 11 | import com.trash.common.core.controller.BaseController; | 7 | import com.trash.common.core.controller.BaseController; |
| 12 | import com.trash.common.core.domain.AjaxResult; | 8 | import com.trash.common.core.domain.AjaxResult; |
| 9 | +import com.trash.common.core.page.TableDataInfo; | ||
| 13 | import com.trash.common.enums.BusinessType; | 10 | import com.trash.common.enums.BusinessType; |
| 14 | -import com.trash.carInfo.domain.CarInfo; | ||
| 15 | -import com.trash.carInfo.service.ICarInfoService; | ||
| 16 | import com.trash.common.utils.poi.ExcelUtil; | 11 | import com.trash.common.utils.poi.ExcelUtil; |
| 17 | -import com.trash.common.core.page.TableDataInfo; | 12 | +import org.apache.commons.collections4.CollectionUtils; |
| 13 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 14 | +import org.springframework.security.access.prepost.PreAuthorize; | ||
| 15 | +import org.springframework.web.bind.annotation.*; | ||
| 18 | import org.springframework.web.multipart.MultipartFile; | 16 | import org.springframework.web.multipart.MultipartFile; |
| 19 | 17 | ||
| 18 | +import java.io.IOException; | ||
| 19 | +import java.util.List; | ||
| 20 | +import java.util.Objects; | ||
| 21 | +import java.util.stream.Collectors; | ||
| 22 | + | ||
| 20 | /** | 23 | /** |
| 21 | * 运输车辆管理Controller | 24 | * 运输车辆管理Controller |
| 22 | * | 25 | * |
| @@ -38,8 +41,24 @@ public class CarInfoController extends BaseController | @@ -38,8 +41,24 @@ public class CarInfoController extends BaseController | ||
| 38 | public TableDataInfo list(CarInfoVo carInfo) | 41 | public TableDataInfo list(CarInfoVo carInfo) |
| 39 | { | 42 | { |
| 40 | startPage(); | 43 | startPage(); |
| 41 | - carInfo.setIsDel(1); | 44 | + carInfo.setIsDel("1"); |
| 42 | List<CarInfoVo> list = carInfoService.selectCarInfoList(carInfo); | 45 | List<CarInfoVo> list = carInfoService.selectCarInfoList(carInfo); |
| 46 | + if(CollectionUtils.isNotEmpty(list)){ | ||
| 47 | + list = list.stream().map(car->{ | ||
| 48 | + if(Objects.equals(car.getCarType(),"轻型货车")){ | ||
| 49 | + car.setCarLeft("car_1.png"); | ||
| 50 | + car.setRemark("箱体长2.6m,宽1.7m,高1.5m;最多可容纳约90袋装修垃圾(75cm*5cm每袋)"); | ||
| 51 | + }else if(Objects.equals(car.getCarType(),"中型货车")){ | ||
| 52 | + car.setCarLeft("car_2.png"); | ||
| 53 | + car.setRemark("箱体长3.2m,宽1.5m,高1.5m;最多可容纳约110袋装修垃圾(75cm*45cm每袋)"); | ||
| 54 | + }else if(Objects.equals(car.getCarType(),"大中型货车")){ | ||
| 55 | + car.setCarLeft("car_3.png"); | ||
| 56 | + car.setRemark("箱体长3.2m,宽1.9m,高1.9m;最多可容纳约150袋装修垃圾(75cm*45cm每袋)"); | ||
| 57 | + } | ||
| 58 | + return car; | ||
| 59 | + }).collect(Collectors.toList()); | ||
| 60 | + } | ||
| 61 | + | ||
| 43 | return getDataTable(list); | 62 | return getDataTable(list); |
| 44 | } | 63 | } |
| 45 | 64 | ||
| @@ -51,7 +70,6 @@ public class CarInfoController extends BaseController | @@ -51,7 +70,6 @@ public class CarInfoController extends BaseController | ||
| 51 | @GetMapping("/export") | 70 | @GetMapping("/export") |
| 52 | public AjaxResult export(CarInfoVo carInfo) | 71 | public AjaxResult export(CarInfoVo carInfo) |
| 53 | { | 72 | { |
| 54 | - carInfo.setIsDel(1); | ||
| 55 | List<CarInfoVo> list = carInfoService.selectCarInfoList(carInfo); | 73 | List<CarInfoVo> list = carInfoService.selectCarInfoList(carInfo); |
| 56 | ExcelUtil<CarInfoVo> util = new ExcelUtil<CarInfoVo>(CarInfoVo.class); | 74 | ExcelUtil<CarInfoVo> util = new ExcelUtil<CarInfoVo>(CarInfoVo.class); |
| 57 | return util.exportExcel(list, "carInfo"); | 75 | return util.exportExcel(list, "carInfo"); |
trash-unit/src/main/java/com/trash/carInfo/domain/CarInfo.java
| @@ -119,16 +119,6 @@ public class CarInfo extends BaseEntity | @@ -119,16 +119,6 @@ public class CarInfo extends BaseEntity | ||
| 119 | @Excel(name = "二维码") | 119 | @Excel(name = "二维码") |
| 120 | private String qrCode; | 120 | private String qrCode; |
| 121 | 121 | ||
| 122 | - private int isDel; | ||
| 123 | - | ||
| 124 | - public int getIsDel() { | ||
| 125 | - return isDel; | ||
| 126 | - } | ||
| 127 | - | ||
| 128 | - public void setIsDel(int isDel) { | ||
| 129 | - this.isDel = isDel; | ||
| 130 | - } | ||
| 131 | - | ||
| 132 | public String getLengthWidthHeight() { | 122 | public String getLengthWidthHeight() { |
| 133 | return lengthWidthHeight; | 123 | return lengthWidthHeight; |
| 134 | } | 124 | } |
trash-unit/src/main/java/com/trash/carInfo/domain/vo/CarInfoVo.java
| @@ -7,6 +7,8 @@ public class CarInfoVo extends CarInfo { | @@ -7,6 +7,8 @@ public class CarInfoVo extends CarInfo { | ||
| 7 | 7 | ||
| 8 | private String driversName; | 8 | private String driversName; |
| 9 | 9 | ||
| 10 | + private String isDel; | ||
| 11 | + | ||
| 10 | public String getCompanyName() { | 12 | public String getCompanyName() { |
| 11 | return companyName; | 13 | return companyName; |
| 12 | } | 14 | } |
| @@ -22,4 +24,12 @@ public class CarInfoVo extends CarInfo { | @@ -22,4 +24,12 @@ public class CarInfoVo extends CarInfo { | ||
| 22 | public void setDriversName(String driversName) { | 24 | public void setDriversName(String driversName) { |
| 23 | this.driversName = driversName; | 25 | this.driversName = driversName; |
| 24 | } | 26 | } |
| 27 | + | ||
| 28 | + public String getIsDel() { | ||
| 29 | + return isDel; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + public void setIsDel(String isDel) { | ||
| 33 | + this.isDel = isDel; | ||
| 34 | + } | ||
| 25 | } | 35 | } |
trash-unit/src/main/java/com/trash/enterprise/domain/TransportationEnterprise.java
| @@ -117,7 +117,7 @@ public class TransportationEnterprise extends BaseEntity | @@ -117,7 +117,7 @@ public class TransportationEnterprise extends BaseEntity | ||
| 117 | private Long parentId; | 117 | private Long parentId; |
| 118 | 118 | ||
| 119 | /** 公司类型(0经营单位,1运输公司) */ | 119 | /** 公司类型(0经营单位,1运输公司) */ |
| 120 | -// @Excel(name = "公司类型", readConverterExp = "0=投放点信息,1运输公司") | 120 | + @Excel(name = "公司类型", readConverterExp = "0=经营单位,1运输公司") |
| 121 | private Integer companyType; | 121 | private Integer companyType; |
| 122 | 122 | ||
| 123 | /** 信用状态 */ | 123 | /** 信用状态 */ |
trash-unit/src/main/resources/mapper/unit/CarInfoMapper.xml
| @@ -35,7 +35,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -35,7 +35,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 35 | <result property="updateBy" column="update_by" /> | 35 | <result property="updateBy" column="update_by" /> |
| 36 | <result property="creditStatus" column="credit_status" /> | 36 | <result property="creditStatus" column="credit_status" /> |
| 37 | <result property="qrCode" column="qr_code" /> | 37 | <result property="qrCode" column="qr_code" /> |
| 38 | - <result property="isDel" column="is_del" /> | ||
| 39 | </resultMap> | 38 | </resultMap> |
| 40 | 39 | ||
| 41 | <resultMap type="CarInfoVo" id="CarInfoVoResult"> | 40 | <resultMap type="CarInfoVo" id="CarInfoVoResult"> |
| @@ -71,10 +70,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -71,10 +70,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 71 | <result property="qrCode" column="qr_code" /> | 70 | <result property="qrCode" column="qr_code" /> |
| 72 | <result property="companyName" column="companyName" /> | 71 | <result property="companyName" column="companyName" /> |
| 73 | <result property="driversName" column="driversName" /> | 72 | <result property="driversName" column="driversName" /> |
| 73 | + <result property="is_del" column="isDel" /> | ||
| 74 | </resultMap> | 74 | </resultMap> |
| 75 | 75 | ||
| 76 | <sql id="selectCarInfoVo"> | 76 | <sql id="selectCarInfoVo"> |
| 77 | - select id, company_id, car_type, car_code, car_brank, emission_standard, road_transport_date, driving_license_date, enter_date, farme_number, car_identification, container_volume, car_color, car_equipment, remark, road_transport, driving_license, car_front, car_left, car_behind, car_right, drivers, status, create_time, create_by, update_time, update_by, credit_status, qr_code,is_del from car_info | 77 | + select id, company_id, car_type, car_code, car_brank, emission_standard, road_transport_date, driving_license_date, enter_date, farme_number, car_identification, container_volume, car_color, car_equipment, remark, road_transport, driving_license, car_front, car_left, car_behind, car_right, drivers, status, create_time, create_by, update_time, update_by, credit_status, qr_code from car_info |
| 78 | </sql> | 78 | </sql> |
| 79 | 79 | ||
| 80 | <sql id="selectCarInfoForCompanyVo"> | 80 | <sql id="selectCarInfoForCompanyVo"> |
| @@ -120,7 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -120,7 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 120 | 120 | ||
| 121 | <select id="selectCarInfoList" parameterType="CarInfoVo" resultMap="CarInfoVoResult"> | 121 | <select id="selectCarInfoList" parameterType="CarInfoVo" resultMap="CarInfoVoResult"> |
| 122 | <include refid="selectCarInfoForCompanyVo"/> | 122 | <include refid="selectCarInfoForCompanyVo"/> |
| 123 | - <where> | 123 | + <where> |
| 124 | <if test="companyName != null and companyName != ''"> and c.name like concat('%',#{companyName},'%')</if> | 124 | <if test="companyName != null and companyName != ''"> and c.name like concat('%',#{companyName},'%')</if> |
| 125 | <if test="carType != null and carType != ''"> and car_type = #{carType}</if> | 125 | <if test="carType != null and carType != ''"> and car_type = #{carType}</if> |
| 126 | <if test="carCode != null and carCode != ''"> and car_code like concat('%',#{carCode},'%')</if> | 126 | <if test="carCode != null and carCode != ''"> and car_code like concat('%',#{carCode},'%')</if> |
| @@ -143,19 +143,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -143,19 +143,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 143 | <if test="drivers != null and drivers != ''"> and drivers = #{drivers}</if> | 143 | <if test="drivers != null and drivers != ''"> and drivers = #{drivers}</if> |
| 144 | <if test="status != null "> and car.status = #{status}</if> | 144 | <if test="status != null "> and car.status = #{status}</if> |
| 145 | <if test="creditStatus != null and creditStatus != ''"> and car.credit_status = #{creditStatus}</if> | 145 | <if test="creditStatus != null and creditStatus != ''"> and car.credit_status = #{creditStatus}</if> |
| 146 | - <if test="isDel != null and isDel != ''"> and car.is_del = #{isDel}</if> | 146 | + <if test="isDel != null and isDel != ''"> and car.is_del = #{isDel}</if> |
| 147 | </where> | 147 | </where> |
| 148 | </select> | 148 | </select> |
| 149 | 149 | ||
| 150 | <select id="selectCarInfoById" parameterType="Long" resultMap="CarInfoResult"> | 150 | <select id="selectCarInfoById" parameterType="Long" resultMap="CarInfoResult"> |
| 151 | <include refid="selectCarInfoVo"/> | 151 | <include refid="selectCarInfoVo"/> |
| 152 | - where id = #{id} and is_del = 1 | 152 | + where id = #{id} |
| 153 | </select> | 153 | </select> |
| 154 | 154 | ||
| 155 | 155 | ||
| 156 | <select id="selectByCompanyId" parameterType="Long" resultMap="CarInfoVoResult"> | 156 | <select id="selectByCompanyId" parameterType="Long" resultMap="CarInfoVoResult"> |
| 157 | <include refid="selectCarInfoForCompanyVo"/> | 157 | <include refid="selectCarInfoForCompanyVo"/> |
| 158 | - where car.company_id=#{companyId} and is_del = 1 | 158 | + where car.company_id=#{companyId} |
| 159 | </select> | 159 | </select> |
| 160 | 160 | ||
| 161 | 161 | ||
| @@ -191,7 +191,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -191,7 +191,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 191 | <if test="creditStatus != null">credit_status,</if> | 191 | <if test="creditStatus != null">credit_status,</if> |
| 192 | <if test="qrCode != null">qr_code,</if> | 192 | <if test="qrCode != null">qr_code,</if> |
| 193 | <if test="lengthWidthHeight != null">length_width_height,</if> | 193 | <if test="lengthWidthHeight != null">length_width_height,</if> |
| 194 | - <if test="isDel != null">is_del,</if> | ||
| 195 | </trim> | 194 | </trim> |
| 196 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 195 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 197 | <if test="companyId != null">#{companyId},</if> | 196 | <if test="companyId != null">#{companyId},</if> |
| @@ -223,7 +222,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -223,7 +222,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 223 | <if test="creditStatus != null">#{creditStatus},</if> | 222 | <if test="creditStatus != null">#{creditStatus},</if> |
| 224 | <if test="qrCode != null">#{qrCode},</if> | 223 | <if test="qrCode != null">#{qrCode},</if> |
| 225 | <if test="lengthWidthHeight != null">#{lengthWidthHeight},</if> | 224 | <if test="lengthWidthHeight != null">#{lengthWidthHeight},</if> |
| 226 | - <if test="isDel != null">#{isDel},</if> | ||
| 227 | </trim> | 225 | </trim> |
| 228 | </insert> | 226 | </insert> |
| 229 | 227 | ||
| @@ -259,21 +257,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -259,21 +257,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 259 | <if test="creditStatus != null">credit_status = #{creditStatus},</if> | 257 | <if test="creditStatus != null">credit_status = #{creditStatus},</if> |
| 260 | <if test="qrCode != null">qr_code = #{qrCode},</if> | 258 | <if test="qrCode != null">qr_code = #{qrCode},</if> |
| 261 | <if test="lengthWidthHeight != null">length_width_height = #{lengthWidthHeight},</if> | 259 | <if test="lengthWidthHeight != null">length_width_height = #{lengthWidthHeight},</if> |
| 262 | - <if test="isDel != null">is_del = #{isDel},</if> | ||
| 263 | </trim> | 260 | </trim> |
| 264 | where id = #{id} | 261 | where id = #{id} |
| 265 | </update> | 262 | </update> |
| 266 | 263 | ||
| 267 | - <update id="deleteCarInfoById" parameterType="Long"> | ||
| 268 | - update car_info set is_del = 0 where id = #{id} | ||
| 269 | - </update> | 264 | + <delete id="deleteCarInfoById" parameterType="Long"> |
| 265 | + delete from car_info where id = #{id} | ||
| 266 | + </delete> | ||
| 270 | 267 | ||
| 271 | - <update id="deleteCarInfoByIds" parameterType="String"> | ||
| 272 | - update car_info set is_del = 0 where id in | 268 | + <delete id="deleteCarInfoByIds" parameterType="String"> |
| 269 | + delete from car_info where id in | ||
| 273 | <foreach item="id" collection="array" open="(" separator="," close=")"> | 270 | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| 274 | #{id} | 271 | #{id} |
| 275 | </foreach> | 272 | </foreach> |
| 276 | - </update> | 273 | + </delete> |
| 277 | 274 | ||
| 278 | 275 | ||
| 279 | <insert id="addCarDriverRelation" parameterType="CarDriverRelation"> | 276 | <insert id="addCarDriverRelation" parameterType="CarDriverRelation"> |