Commit 9ca06afb422902b0d1af0182b1cc1e7271153ec0

Authored by liujun001
1 parent 14347a7c

优化车辆信息,将客户的数据拉入我们的库

trash-garbage/src/main/java/com/trash/garbage/mapper/GarOrderMapper.java
@@ -41,7 +41,7 @@ public interface GarOrderMapper extends BaseMapper<GarOrder> { @@ -41,7 +41,7 @@ public interface GarOrderMapper extends BaseMapper<GarOrder> {
41 41
42 String queryCompanyIdByPhone(@Param("phone")String phone); 42 String queryCompanyIdByPhone(@Param("phone")String phone);
43 43
44 - List<DockingQRCodeEntity> queryReportByCarCode(@Param("carCode") String carCode); 44 + List<DockingQRCodeEntity> queryReportByCarCode(@Param("carCode") String carCode,@Param("dateStr") String dateStr);
45 } 45 }
46 46
47 47
trash-garbage/src/main/java/com/trash/garbage/pojo/vo/DispatchDriverVo.java
@@ -2,9 +2,11 @@ package com.trash.garbage.pojo.vo; @@ -2,9 +2,11 @@ package com.trash.garbage.pojo.vo;
2 2
3 import lombok.EqualsAndHashCode; 3 import lombok.EqualsAndHashCode;
4 import lombok.ToString; 4 import lombok.ToString;
  5 +import org.apache.commons.lang3.StringUtils;
5 6
6 import java.util.Collection; 7 import java.util.Collection;
7 import java.util.List; 8 import java.util.List;
  9 +import java.util.Objects;
8 10
9 /** 11 /**
10 * @author 20412 12 * @author 20412
@@ -25,6 +27,8 @@ public class DispatchDriverVo { @@ -25,6 +27,8 @@ public class DispatchDriverVo {
25 27
26 private Collection<Personnel> personnelInfo; 28 private Collection<Personnel> personnelInfo;
27 29
  30 + private Integer sortValue;
  31 +
28 /** 32 /**
29 * 人员信息 33 * 人员信息
30 */ 34 */
@@ -105,5 +109,18 @@ public class DispatchDriverVo { @@ -105,5 +109,18 @@ public class DispatchDriverVo {
105 this.licensePlateNumber = licensePlateNumber; 109 this.licensePlateNumber = licensePlateNumber;
106 } 110 }
107 111
108 - 112 + public Integer getSortValue() {
  113 + if (Objects.isNull(sortValue)) {
  114 + if (StringUtils.equals(StringUtils.trim(containerVolume), "轻型货车") || StringUtils.equals(StringUtils.trim(containerVolume), "4方车")) {
  115 + sortValue = 1;
  116 + } else if (StringUtils.equals(StringUtils.trim(containerVolume), "中型货车") || StringUtils.equals(StringUtils.trim(containerVolume), "6方车")) {
  117 + sortValue = 2;
  118 + } else if (StringUtils.equals(StringUtils.trim(containerVolume), "中大型货车") || StringUtils.equals(StringUtils.trim(containerVolume), "8方车")) {
  119 + sortValue = 3;
  120 + } else {
  121 + sortValue = Integer.MAX_VALUE;
  122 + }
  123 + }
  124 + return sortValue;
  125 + }
109 } 126 }
trash-garbage/src/main/java/com/trash/garbage/pojo/vo/LoginVo.java
@@ -9,8 +9,17 @@ import java.util.List; @@ -9,8 +9,17 @@ import java.util.List;
9 @EqualsAndHashCode 9 @EqualsAndHashCode
10 public class LoginVo { 10 public class LoginVo {
11 private String token; 11 private String token;
  12 + private String name;
12 private List<RuleVo> ruleVos; 13 private List<RuleVo> ruleVos;
13 14
  15 + public String getName() {
  16 + return name;
  17 + }
  18 +
  19 + public void setName(String name) {
  20 + this.name = name;
  21 + }
  22 +
14 public String getToken() { 23 public String getToken() {
15 return token; 24 return token;
16 } 25 }
trash-garbage/src/main/java/com/trash/garbage/service/GarUserService.java
@@ -40,4 +40,5 @@ public interface GarUserService extends IService&lt;GarUser&gt; { @@ -40,4 +40,5 @@ public interface GarUserService extends IService&lt;GarUser&gt; {
40 List<GarUser> queryListByUser(GarUser garUser); 40 List<GarUser> queryListByUser(GarUser garUser);
41 41
42 LoginVo queryRole(); 42 LoginVo queryRole();
  43 + GarUser queryGarUserByTel(String tel);
43 } 44 }
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarOrderServiceImpl.java
@@ -34,6 +34,8 @@ import com.trash.garbage.utils.SMSUtils; @@ -34,6 +34,8 @@ import com.trash.garbage.utils.SMSUtils;
34 import com.trash.garbage.utils.ValidateCodeUtil; 34 import com.trash.garbage.utils.ValidateCodeUtil;
35 import org.apache.commons.collections4.CollectionUtils; 35 import org.apache.commons.collections4.CollectionUtils;
36 import org.apache.commons.lang3.StringUtils; 36 import org.apache.commons.lang3.StringUtils;
  37 +import org.apache.commons.lang3.time.DateUtils;
  38 +import org.apache.commons.lang3.time.FastDateFormat;
37 import org.apache.http.client.utils.HttpClientUtils; 39 import org.apache.http.client.utils.HttpClientUtils;
38 import org.springframework.beans.BeanUtils; 40 import org.springframework.beans.BeanUtils;
39 import org.springframework.beans.factory.annotation.Autowired; 41 import org.springframework.beans.factory.annotation.Autowired;
@@ -98,6 +100,7 @@ public class GarOrderServiceImpl extends ServiceImpl&lt;GarOrderMapper, GarOrder&gt; @@ -98,6 +100,7 @@ public class GarOrderServiceImpl extends ServiceImpl&lt;GarOrderMapper, GarOrder&gt;
98 private String authorization; 100 private String authorization;
99 @Value("${trash.remotePath}") 101 @Value("${trash.remotePath}")
100 private String remotePath; 102 private String remotePath;
  103 + private FastDateFormat fastDateFormat = FastDateFormat.getInstance("yyyy-MM-dd");
101 104
102 @Override 105 @Override
103 @Transactional(rollbackFor = Exception.class) 106 @Transactional(rollbackFor = Exception.class)
@@ -661,6 +664,12 @@ public class GarOrderServiceImpl extends ServiceImpl&lt;GarOrderMapper, GarOrder&gt; @@ -661,6 +664,12 @@ public class GarOrderServiceImpl extends ServiceImpl&lt;GarOrderMapper, GarOrder&gt;
661 vo.setGarOrderHandleName(driverVos.get(0).getName()); 664 vo.setGarOrderHandleName(driverVos.get(0).getName());
662 vo.setGarOrderHandleTel(driverVos.get(0).getPhoneNo()); 665 vo.setGarOrderHandleTel(driverVos.get(0).getPhoneNo());
663 } 666 }
  667 + } else if (StringUtils.isNotEmpty(vo.getGarOrderCompanyTel())) {
  668 + TransportationEnterprise enterprise = transportationEnterpriseService.queryByServerPhone(vo.getGarOrderCompanyTel());
  669 + if(Objects.nonNull(enterprise)){
  670 + vo.setGarOrderHandleName(enterprise.getLegalRepresentative());
  671 + vo.setGarOrderHandleTel(enterprise.getLegalRepresentativePhone());
  672 + }
664 } 673 }
665 // 获取车辆信息 674 // 获取车辆信息
666 LambdaQueryWrapper<GarOrderCar> qwc = new LambdaQueryWrapper<>(); 675 LambdaQueryWrapper<GarOrderCar> qwc = new LambdaQueryWrapper<>();
@@ -768,6 +777,8 @@ public class GarOrderServiceImpl extends ServiceImpl&lt;GarOrderMapper, GarOrder&gt; @@ -768,6 +777,8 @@ public class GarOrderServiceImpl extends ServiceImpl&lt;GarOrderMapper, GarOrder&gt;
768 if (opt.isPresent()) { 777 if (opt.isPresent()) {
769 JSONObject jsonObject = (JSONObject) opt.get(); 778 JSONObject jsonObject = (JSONObject) opt.get();
770 params.put("adCodes", jsonObject.getString("code")); 779 params.put("adCodes", jsonObject.getString("code"));
  780 + } else {
  781 + params.put("adCodes", "no found");
771 } 782 }
772 } 783 }
773 } 784 }
@@ -880,17 +891,21 @@ public class GarOrderServiceImpl extends ServiceImpl&lt;GarOrderMapper, GarOrder&gt; @@ -880,17 +891,21 @@ public class GarOrderServiceImpl extends ServiceImpl&lt;GarOrderMapper, GarOrder&gt;
880 if (Objects.isNull(source)) { 891 if (Objects.isNull(source)) {
881 transportationEnterpriseService.save(transportationEnterprise); 892 transportationEnterpriseService.save(transportationEnterprise);
882 } else { 893 } else {
  894 + TransportationEnterprise target = new TransportationEnterprise();
  895 + BeanUtils.copyProperties(transportationEnterprise, target);
883 TransportationEnterprise source1 = new TransportationEnterprise(); 896 TransportationEnterprise source1 = new TransportationEnterprise();
884 source1.setId(source.getId()); 897 source1.setId(source.getId());
885 //transportationEnterprise.setId(jsonObject.get("id").toString()); 898 //transportationEnterprise.setId(jsonObject.get("id").toString());
886 source1.setName(source.getName()); 899 source1.setName(source.getName());
887 source1.setAbbreviation(source.getAbbreviation()); 900 source1.setAbbreviation(source.getAbbreviation());
888 source1.setOfficeAddress(source.getOfficeAddress()); 901 source1.setOfficeAddress(source.getOfficeAddress());
889 - source1.setServicePhone(source.getServicePhone()); 902 + // source1.setServicePhone(source.getServicePhone());
890 source1.setLegalRepresentative(source.getLegalRepresentative()); 903 source1.setLegalRepresentative(source.getLegalRepresentative());
891 source1.setLegalRepresentativePhone(source.getLegalRepresentativePhone()); 904 source1.setLegalRepresentativePhone(source.getLegalRepresentativePhone());
892 source1.setCarNumber(0); 905 source1.setCarNumber(0);
893 - if (Objects.equals(JSON.toJSONString(source1), JSON.toJSONString(transportationEnterprise))) { 906 + target.setServicePhone(null);
  907 +
  908 + if (Objects.equals(JSON.toJSONString(source1), JSON.toJSONString(target))) {
894 continue; 909 continue;
895 } else { 910 } else {
896 transportationEnterpriseService.updateById(transportationEnterprise); 911 transportationEnterpriseService.updateById(transportationEnterprise);
@@ -1078,7 +1093,17 @@ public class GarOrderServiceImpl extends ServiceImpl&lt;GarOrderMapper, GarOrder&gt; @@ -1078,7 +1093,17 @@ public class GarOrderServiceImpl extends ServiceImpl&lt;GarOrderMapper, GarOrder&gt;
1078 List<GarOrderCar> carList = garOrderCarService.list(qwc); 1093 List<GarOrderCar> carList = garOrderCarService.list(qwc);
1079 if (CollectionUtils.isNotEmpty(carList)) { 1094 if (CollectionUtils.isNotEmpty(carList)) {
1080 Set<String> carTypes = carList.stream().map(GarOrderCar::getGarOrderCarType).collect(Collectors.toSet()); 1095 Set<String> carTypes = carList.stream().map(GarOrderCar::getGarOrderCarType).collect(Collectors.toSet());
1081 - voList = voList.stream().filter(v -> carTypes.contains(v.getContainerVolume())).collect(Collectors.toList()); 1096 + if (CollectionUtils.isNotEmpty(carTypes)) {
  1097 + String[] carTypeStrs = {"4方车", "6方车", "8方车"};
  1098 + String[] carTypeStrs1 = {"轻型货车", "中型货车", "中大型货车"};
  1099 + int size = carTypeStrs.length;
  1100 + for (int i = 0; i < size; i++) {
  1101 + if (carTypes.contains(carTypeStrs[i])) {
  1102 + carTypes.add(carTypeStrs1[i]);
  1103 + }
  1104 + }
  1105 + }
  1106 + voList = voList.stream().filter(v -> carTypes.contains(v.getContainerVolume())).sorted(Comparator.comparing(DispatchDriverVo::getLicensePlateNumber)).sorted(Comparator.comparing(DispatchDriverVo::getSortValue)).collect(Collectors.toList());
1082 } 1107 }
1083 1108
1084 return voList; 1109 return voList;
@@ -1269,6 +1294,9 @@ public class GarOrderServiceImpl extends ServiceImpl&lt;GarOrderMapper, GarOrder&gt; @@ -1269,6 +1294,9 @@ public class GarOrderServiceImpl extends ServiceImpl&lt;GarOrderMapper, GarOrder&gt;
1269 // String tel = SecurityUtils.getLoginUser().getUser().getPhonenumber(); 1294 // String tel = SecurityUtils.getLoginUser().getUser().getPhonenumber();
1270 // 选中的司机处理场所 1295 // 选中的司机处理场所
1271 List<DispatchDisposalVo> voList = disposalService.queryDisposalListWithDispatchStatus(orderId); 1296 List<DispatchDisposalVo> voList = disposalService.queryDisposalListWithDispatchStatus(orderId);
  1297 + if (CollectionUtils.isNotEmpty(voList)) {
  1298 + voList = voList.stream().sorted(Comparator.comparing(DispatchDisposalVo::getGarOrderDisposalCompanyName)).collect(Collectors.toList());
  1299 + }
1272 return voList; 1300 return voList;
1273 } 1301 }
1274 1302
@@ -1516,7 +1544,8 @@ public class GarOrderServiceImpl extends ServiceImpl&lt;GarOrderMapper, GarOrder&gt; @@ -1516,7 +1544,8 @@ public class GarOrderServiceImpl extends ServiceImpl&lt;GarOrderMapper, GarOrder&gt;
1516 1544
1517 @Override 1545 @Override
1518 public List<DockingQRCodeEntity> queryReportByCarCode(String carCode) { 1546 public List<DockingQRCodeEntity> queryReportByCarCode(String carCode) {
1519 - return baseMapper.queryReportByCarCode(carCode); 1547 + String dateStr = fastDateFormat.format(DateUtils.addDays(new Date(), -1));
  1548 + return baseMapper.queryReportByCarCode(carCode, dateStr);
1520 } 1549 }
1521 1550
1522 1551
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarUserServiceImpl.java
@@ -19,6 +19,7 @@ import com.trash.disposalSite.domain.DisposalSite; @@ -19,6 +19,7 @@ import com.trash.disposalSite.domain.DisposalSite;
19 import com.trash.disposalSite.service.IDisposalSiteService; 19 import com.trash.disposalSite.service.IDisposalSiteService;
20 import com.trash.garbage.utils.SMSUtils; 20 import com.trash.garbage.utils.SMSUtils;
21 import org.apache.commons.codec.binary.Base64; 21 import org.apache.commons.codec.binary.Base64;
  22 +import org.apache.commons.collections4.CollectionUtils;
22 import org.springframework.beans.factory.annotation.Autowired; 23 import org.springframework.beans.factory.annotation.Autowired;
23 import org.springframework.security.core.authority.SimpleGrantedAuthority; 24 import org.springframework.security.core.authority.SimpleGrantedAuthority;
24 import org.springframework.security.core.userdetails.UsernameNotFoundException; 25 import org.springframework.security.core.userdetails.UsernameNotFoundException;
@@ -167,6 +168,7 @@ public class GarUserServiceImpl extends ServiceImpl&lt;GarUserMapper, GarUser&gt; @@ -167,6 +168,7 @@ public class GarUserServiceImpl extends ServiceImpl&lt;GarUserMapper, GarUser&gt;
167 ruleVo.setTransportCompanyName(enterprise.getName()); 168 ruleVo.setTransportCompanyName(enterprise.getName());
168 ruleVo.setUserType(GlobalStatus.GarUserStatusEnum.DRIVER_USER.getDescription()); 169 ruleVo.setUserType(GlobalStatus.GarUserStatusEnum.DRIVER_USER.getDescription());
169 vo.getRuleVos().add(ruleVo); 170 vo.getRuleVos().add(ruleVo);
  171 + vo.setName(driverVo.getName());
170 } 172 }
171 173
172 // 企业负责人 TODO 174 // 企业负责人 TODO
@@ -179,6 +181,8 @@ public class GarUserServiceImpl extends ServiceImpl&lt;GarUserMapper, GarUser&gt; @@ -179,6 +181,8 @@ public class GarUserServiceImpl extends ServiceImpl&lt;GarUserMapper, GarUser&gt;
179 ruleVo.setTransportCompanyName(enterprise.getName()); 181 ruleVo.setTransportCompanyName(enterprise.getName());
180 ruleVo.setUserType(GlobalStatus.GarUserStatusEnum.RESPONSIBLE_USER.getDescription()); 182 ruleVo.setUserType(GlobalStatus.GarUserStatusEnum.RESPONSIBLE_USER.getDescription());
181 vo.getRuleVos().add(ruleVo); 183 vo.getRuleVos().add(ruleVo);
  184 +
  185 + // vo.setName(enterprise.getName());
182 } 186 }
183 187
184 // 处理场所 TODO 188 // 处理场所 TODO
@@ -192,6 +196,8 @@ public class GarUserServiceImpl extends ServiceImpl&lt;GarUserMapper, GarUser&gt; @@ -192,6 +196,8 @@ public class GarUserServiceImpl extends ServiceImpl&lt;GarUserMapper, GarUser&gt;
192 ruleVo.setTransportCompanyName(disposalSite.getName()); 196 ruleVo.setTransportCompanyName(disposalSite.getName());
193 ruleVo.setUserType(GlobalStatus.GarUserStatusEnum.DISPOSAL_SITE_USER.getDescription()); 197 ruleVo.setUserType(GlobalStatus.GarUserStatusEnum.DISPOSAL_SITE_USER.getDescription());
194 vo.getRuleVos().add(ruleVo); 198 vo.getRuleVos().add(ruleVo);
  199 +
  200 + // vo.setName(disposalSite.getConstructionUnitPerson());
195 } 201 }
196 return vo; 202 return vo;
197 } 203 }
@@ -364,6 +370,14 @@ public class GarUserServiceImpl extends ServiceImpl&lt;GarUserMapper, GarUser&gt; @@ -364,6 +370,14 @@ public class GarUserServiceImpl extends ServiceImpl&lt;GarUserMapper, GarUser&gt;
364 return vo; 370 return vo;
365 } 371 }
366 372
  373 + @Override
  374 + public GarUser queryGarUserByTel(String tel) {
  375 + LambdaQueryWrapper<GarUser> wrapper = new LambdaQueryWrapper<>();
  376 + wrapper.eq(GarUser::getGarUserTel, tel);
  377 + List<GarUser> garUsers = list(wrapper);
  378 + return CollectionUtils.isEmpty(garUsers) ? null : garUsers.get(0);
  379 + }
  380 +
367 private LambdaQueryWrapper<GarUser> createQueryWrapperByUser(GarUser garUser) { 381 private LambdaQueryWrapper<GarUser> createQueryWrapperByUser(GarUser garUser) {
368 return new LambdaQueryWrapper<GarUser>() 382 return new LambdaQueryWrapper<GarUser>()
369 .eq(StringUtils.isNotEmpty(garUser.getGarUserId()), GarUser::getGarUserId, garUser.getGarUserId()) 383 .eq(StringUtils.isNotEmpty(garUser.getGarUserId()), GarUser::getGarUserId, garUser.getGarUserId())
trash-garbage/src/main/resources/mapper/GarOrderMapper.xml
@@ -268,6 +268,7 @@ @@ -268,6 +268,7 @@
268 left join disposal_site ds on ds.id = gomd.gar_order_disposal_company_id 268 left join disposal_site ds on ds.id = gomd.gar_order_disposal_company_id
269 left join gar_order_match_handler gomh on gomh.gar_order_id =go2.gar_order_id 269 left join gar_order_match_handler gomh on gomh.gar_order_id =go2.gar_order_id
270 where gomh.gar_handler_car_code=#{carCode} 270 where gomh.gar_handler_car_code=#{carCode}
271 - and gomh.gar_order_handler_status = 1 AND gomh.gar_cancel_flag = 0 271 + AND gomh.gar_cancel_flag = 0
  272 + and (go2.gar_create_time <![CDATA[ >= ]]>#{dateStr} or go2.gar_order_handler_status in(0,1))
272 </select> 273 </select>
273 </mapper> 274 </mapper>
trash-unit/src/main/java/com/trash/enterprise/mapper/TransportationEnterpriseMapper.java
1 package com.trash.enterprise.mapper; 1 package com.trash.enterprise.mapper;
2 2
3 import com.trash.enterprise.domain.TransportationEnterprise; 3 import com.trash.enterprise.domain.TransportationEnterprise;
  4 +import org.apache.ibatis.annotations.Param;
4 5
5 import java.util.List; 6 import java.util.List;
6 7
@@ -22,6 +23,8 @@ public interface TransportationEnterpriseMapper @@ -22,6 +23,8 @@ public interface TransportationEnterpriseMapper
22 23
23 TransportationEnterprise selectTransportationEnterpriseByIdStr(String id); 24 TransportationEnterprise selectTransportationEnterpriseByIdStr(String id);
24 25
  26 + List<TransportationEnterprise> queryByServerPhone(@Param("serverPhone") String serverPhone);
  27 +
25 /** 28 /**
26 * 查询运输企业管理列表 29 * 查询运输企业管理列表
27 * 30 *
trash-unit/src/main/java/com/trash/enterprise/service/ITransportationEnterpriseService.java
@@ -22,6 +22,7 @@ public interface ITransportationEnterpriseService @@ -22,6 +22,7 @@ public interface ITransportationEnterpriseService
22 TransportationEnterprise selectTransportationEnterpriseById(String id); 22 TransportationEnterprise selectTransportationEnterpriseById(String id);
23 23
24 TransportationEnterprise selectTransportationEnterpriseByIdStr(String id); 24 TransportationEnterprise selectTransportationEnterpriseByIdStr(String id);
  25 + TransportationEnterprise queryByServerPhone(String phone);
25 26
26 /** 27 /**
27 * 查询运输企业管理列表 28 * 查询运输企业管理列表
trash-unit/src/main/java/com/trash/enterprise/service/impl/TransportationEnterpriseServiceImpl.java
@@ -6,6 +6,7 @@ import java.util.List; @@ -6,6 +6,7 @@ import java.util.List;
6 import com.trash.common.config.trashConfig; 6 import com.trash.common.config.trashConfig;
7 import com.trash.common.utils.DateUtils; 7 import com.trash.common.utils.DateUtils;
8 import com.trash.common.utils.SecurityUtils; 8 import com.trash.common.utils.SecurityUtils;
  9 +import org.apache.commons.collections4.CollectionUtils;
9 import org.springframework.beans.factory.annotation.Autowired; 10 import org.springframework.beans.factory.annotation.Autowired;
10 import org.springframework.stereotype.Service; 11 import org.springframework.stereotype.Service;
11 import com.trash.enterprise.mapper.TransportationEnterpriseMapper; 12 import com.trash.enterprise.mapper.TransportationEnterpriseMapper;
@@ -42,6 +43,12 @@ public class TransportationEnterpriseServiceImpl implements ITransportationEnter @@ -42,6 +43,12 @@ public class TransportationEnterpriseServiceImpl implements ITransportationEnter
42 return transportationEnterpriseMapper.selectTransportationEnterpriseByIdStr(id); 43 return transportationEnterpriseMapper.selectTransportationEnterpriseByIdStr(id);
43 } 44 }
44 45
  46 + @Override
  47 + public TransportationEnterprise queryByServerPhone(String phone) {
  48 + List<TransportationEnterprise> enterprises = transportationEnterpriseMapper.queryByServerPhone(phone);
  49 + return CollectionUtils.isEmpty(enterprises) ? null : enterprises.get(0);
  50 + }
  51 +
45 /** 52 /**
46 * 查询运输企业管理列表 53 * 查询运输企业管理列表
47 * 54 *
trash-unit/src/main/resources/mapper/unit/TransportationEnterpriseMapper.xml
@@ -47,6 +47,10 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -47,6 +47,10 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
47 <sql id="selectTransportationEnterpriseVo"> 47 <sql id="selectTransportationEnterpriseVo">
48 select id, name, abbreviation, registration_area, transport_permission_date, enter_date, business_license_date, office_address, parking_lot_location, parking_area, (select count(id) from car_info where company_id = te.id) car_number, safety_manager_name, safety_manager_phone, social_uniform_credit_code_number, legal_representative, legal_representative_phone, safety_people_name, remark, transport_permission, enterprise_business_license, safety_officer_qualification_certificate, safety_certificate, car_park_panorama, business_unit, status, create_time, create_by, update_time, update_by, parent_id, company_type, credit_status, qr_code,service_phone,office_address_gps,offer,company_logo from transportation_enterprise te 48 select id, name, abbreviation, registration_area, transport_permission_date, enter_date, business_license_date, office_address, parking_lot_location, parking_area, (select count(id) from car_info where company_id = te.id) car_number, safety_manager_name, safety_manager_phone, social_uniform_credit_code_number, legal_representative, legal_representative_phone, safety_people_name, remark, transport_permission, enterprise_business_license, safety_officer_qualification_certificate, safety_certificate, car_park_panorama, business_unit, status, create_time, create_by, update_time, update_by, parent_id, company_type, credit_status, qr_code,service_phone,office_address_gps,offer,company_logo from transportation_enterprise te
49 </sql> 49 </sql>
  50 + <sql id="selectTransportationEnterpriseVo1">
  51 + select id, name, abbreviation, registration_area, transport_permission_date, enter_date, business_license_date, office_address, parking_lot_location, parking_area, safety_manager_name, safety_manager_phone, social_uniform_credit_code_number, legal_representative, legal_representative_phone, safety_people_name, remark, transport_permission, enterprise_business_license, safety_officer_qualification_certificate, safety_certificate, car_park_panorama, business_unit, status, create_time, create_by, update_time, update_by, parent_id, company_type, credit_status, qr_code,service_phone,office_address_gps,offer,company_logo from transportation_enterprise te
  52 + </sql>
  53 +
50 54
51 <select id="selectTransportationEnterpriseList" parameterType="TransportationEnterprise" resultMap="TransportationEnterpriseResult"> 55 <select id="selectTransportationEnterpriseList" parameterType="TransportationEnterprise" resultMap="TransportationEnterpriseResult">
52 <include refid="selectTransportationEnterpriseVo"/> 56 <include refid="selectTransportationEnterpriseVo"/>
@@ -92,7 +96,11 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -92,7 +96,11 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
92 <include refid="selectTransportationEnterpriseVo"/> 96 <include refid="selectTransportationEnterpriseVo"/>
93 where id = #{id} 97 where id = #{id}
94 </select> 98 </select>
95 - 99 + <select id="queryByServerPhone" resultType="com.trash.enterprise.domain.TransportationEnterprise">
  100 + <include refid="selectTransportationEnterpriseVo1"/>
  101 + where service_phone = #{serverPhone}
  102 + </select>
  103 +
96 <insert id="insertTransportationEnterprise" parameterType="TransportationEnterprise" useGeneratedKeys="true" keyProperty="id"> 104 <insert id="insertTransportationEnterprise" parameterType="TransportationEnterprise" useGeneratedKeys="true" keyProperty="id">
97 insert into transportation_enterprise 105 insert into transportation_enterprise
98 <trim prefix="(" suffix=")" suffixOverrides=","> 106 <trim prefix="(" suffix=")" suffixOverrides=",">