Commit 24d83b2f by zhouhang

合并1.40.0分支代码

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@35126 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 6f429c8b
Showing 57 changed files with 1436 additions and 445 deletions
......@@ -72,6 +72,12 @@
<artifactId>jasypt</artifactId>
<version>1.9.3</version>
</dependency>
<dependency>
<groupId>org.oreframework</groupId>
<artifactId>ore-jms</artifactId>
<version>2.2.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
......
package com.glsx.ordercenter.component;
import com.alibaba.fastjson.JSON;
import com.glsx.common.utils.PropertiesUtil;
import com.glsx.common.utils.StringUtils;
import com.glsx.ordercenter.dto.VinAndSnDto;
import com.glsx.ordercenter.mapper.SysOrderDeviceMapper;
import com.glsx.ordercenter.mapper.SysOrderFileMapper;
import com.glsx.ordercenter.mapper.SysOrderMapper;
import com.glsx.ordercenter.pojo.SysOrder;
import com.glsx.ordercenter.pojo.SysOrderDevice;
import com.glsx.ordercenter.pojo.SysOrderFile;
import kafka.javaapi.producer.Producer;
import kafka.producer.KeyedMessage;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
@Slf4j
@Component
public class OcrComponent {
/**
* kafka发送
*/
@Resource
private Producer<String, String> producer;
@Autowired
private SysOrderFileMapper orderFileMapper;
@Autowired
private SysOrderDeviceMapper orderDeviceMapper;
@Autowired
private SysOrderMapper orderMapper;
@Async("taskExecutor")
public void pushFileInfo(Integer id){
log.debug("pushFileInfo id:"+id);
try {
String fileName = PropertiesUtil.getProperty("ocr.file.name", "三码合一");
String snFileName = PropertiesUtil.getProperty("ocr.file.name.sn", "sn照片");
List<SysOrderFile> orderFileList = orderFileMapper.selectByOrderId(id);
List<SysOrderFile> fileList = orderFileList.stream().filter(i -> fileName.equals(i.getFileName())).collect(Collectors.toList());
List<SysOrderFile> snFileList = orderFileList.stream().filter(i -> snFileName.equals(i.getFileName())).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(fileList)) {
SysOrderFile orderFile = fileList.get(0);
VinAndSnDto dto = paramBuild(id, orderFile);
String topic = PropertiesUtil.getProperty("ocr.kafka.producer.topic","ocr_topic");
//转为json格式传输kafka
String jsonString = JSON.toJSONString(dto);
KeyedMessage<String, String> keyedMessage = new KeyedMessage<>(topic, jsonString);
producer.send(keyedMessage);
log.debug("pushFileInfo ===> send Kafka info:" + jsonString);
}
if (CollectionUtils.isNotEmpty(snFileList)){
SysOrderFile orderFile = snFileList.get(0);
VinAndSnDto dto = paramBuild(id, orderFile);
String topic = PropertiesUtil.getProperty("ocr.kafka.producer.topic","ocr_topic");
//转为json格式传输kafka
String jsonString = JSON.toJSONString(dto);
KeyedMessage<String, String> keyedMessage = new KeyedMessage<>(topic, jsonString);
producer.send(keyedMessage);
log.debug("pushFileInfo ===> send Kafka info:" + jsonString);
}
} catch (Exception e) {
log.error("pushFileInfo异步处推送异常:", e);
}
}
private VinAndSnDto paramBuild(Integer id, SysOrderFile orderFile){
String fileName = PropertiesUtil.getProperty("ocr.file.name", "三码合一");
String snFileName = PropertiesUtil.getProperty("ocr.file.name.sn", "sn照片");
VinAndSnDto dto = new VinAndSnDto();
dto.setOrderId(id);
dto.setFileId(orderFile.getId());
dto.setFilePath(orderFile.getFilePath());
SysOrderDevice device = SysOrderDevice.builder().orderId(id).build();
List<SysOrderDevice> orderDeviceList = orderDeviceMapper.selectByOrderDevice(device);
List<String> list = orderDeviceList.stream().map(SysOrderDevice::getDeviceNo).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(list)) {
String sns = StringUtils.join(list, ",");
dto.setSns(sns);
}
SysOrder order = orderMapper.selectByPrimaryKey(id);
dto.setVin(order.getVinNo());
if (fileName.equals(orderFile.getFileName())) {
dto.setFileType(0);
} else if (snFileName.equals(orderFile.getFileName())) {
dto.setFileType(1);
}else {
throw new RuntimeException("没有匹配到对应文件名");
}
return dto;
}
}
package com.glsx.ordercenter.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
@Configuration
@ImportResource(locations = {
"classpath:config/biz-kafka-product.xml",
})
public class Config {
}
......@@ -51,7 +51,7 @@ public class CarOrderController extends BaseController {
req.setUserId(UserUtils.getCurrentUserId());
req.setUserType(UserUtils.getCurrentUserType());
Map<String, Integer> statusCountMap = this.carOrderService.countByStatus(req);
Map<String, Object> statusCountMap = this.carOrderService.countByStatus(req);
R result = R.ok().data(statusCountMap);
super.logInfo("==== /carOrder/countByStatus result", result);
......
package com.glsx.ordercenter.controller;
import com.glsx.common.annotation.AuthCheck;
import com.glsx.ordercenter.dto.VinAndSnDto;
import com.glsx.ordercenter.service.OcrResultService;
import com.glsx.plat.core.web.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
@AuthCheck
@RestController
@RequestMapping("/ocr")
public class OcrResultController extends BaseController {
@Autowired
private OcrResultService ocrResultService;
/**
* 查询ocr识别结果
*/
@RequestMapping(value = "/getOcrResultByOrderId", method = {RequestMethod.POST, RequestMethod.GET})
public R getOcrResultByOrderId(Integer orderId) {
super.logInfo("==== /ocr/getOcrResultByOrderId param", orderId);
Map<String, Object> resultMap = ocrResultService.getOcrResultByOrderId(orderId);
R result = R.ok().data(resultMap);
super.logInfo("==== /ocr/getOcrResultByOrderId result", result);
return result;
}
@RequestMapping(value = "/manualOcrRecognition", method = {RequestMethod.POST, RequestMethod.GET})
public R manualOcrRecognition(@RequestBody VinAndSnDto dto) {
super.logInfo("==== /ocr/manualOcrRecognition param", dto);
ocrResultService.manualOcrRecognition(dto);
R result = R.ok();
super.logInfo("==== /ocr/manualOcrRecognition result", result);
return result;
}
}
package com.glsx.ordercenter.controller;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.StopWatch;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
......@@ -228,7 +229,8 @@ public class OrderController extends BaseController {
@RequestMapping(value = "/getOrdersByClientType", method = {RequestMethod.GET, RequestMethod.POST})
public ResultObject getOrdersByClientType(HttpServletRequest request, String keyWord, @RequestParam(defaultValue = "0") Integer orderStatus,
@RequestParam(defaultValue = "1") int pageIndex, @RequestParam(defaultValue = "10") int pageSize) {
StopWatch sw = new StopWatch();
sw.start("getOrdersByClientType");
Map<String, Object> result = new HashMap<>();
Page page = new Page(pageIndex, pageSize);
// 获取当前用户信息 根据用户角色筛选订单
......@@ -244,6 +246,8 @@ public class OrderController extends BaseController {
page.setTotalCount((int) pages.getTotal());
result.put("page", page);
result.put("items", list);
sw.stop();
logger.info(sw.getLastTaskName() + "获取订单详情耗时:" + sw.getTotalTimeMillis() + "ms");
return new ResultObject(ResultCodeEnum.SUCCESS.getCode(), ResultCodeEnum.SUCCESS.getMsg(), result);
}
......@@ -313,7 +317,7 @@ public class OrderController extends BaseController {
@AuthCheck
@RequestMapping(value = "/checkIn", method = {RequestMethod.GET, RequestMethod.POST})
public ResultObject checkIn(HttpServletRequest request, Integer id, String overdueReason, String overdueRemark,
String checkInAddress,Float longitude,Float latitude) {
String checkInAddress, Float longitude, Float latitude) {
Integer userId = UserUtils.getUserId(request);
SysOrder sysOrder = orderService.selectByPrimaryKey(id);
int i = 0;
......
......@@ -856,6 +856,7 @@ public class ReportController extends BaseReportController {
CarOrderVo vo = this.convertCarOrderVo(carOrderVo, order);
AuditCarOrderVo auditCarOrderVo = new AuditCarOrderVo();
BeanUtils.copyProperties(vo,auditCarOrderVo);
auditCarOrderVo.setMortgageTime(order.getMortgageTime() != null ? order.getMortgageTime() : order.getCompleteTime());
if (b) {
//第三方退回
......@@ -866,6 +867,7 @@ public class ReportController extends BaseReportController {
if (Objects.equals(order.getAuditStatus(),AuditStatusEnum.NORMALLY_PASSED.getCode())
&& Objects.equals(order.getVolvoApprovedStatus(), VolvoApprovedTypeEnum.PASSED.getCode())){
auditCarOrderVo.setAuditStatus(ThirdPartyEnum.AuditStatusEnum.OTHER_PASSED.getText());
auditCarOrderVo.setVolvoApprovedTime(order.getVolvoApprovedTime());
}
}
......
......@@ -19,6 +19,9 @@ public class AuditCarOrderVo extends CarOrderVo{
@ExcelColumn(index = 35, value = "提交审核时间",pattern = "yyyy-MM-dd HH:mm:ss")
private Date auditTime;
// @ExcelColumn(index = 36, value = "退回次数")
// private Byte auditCount;
@ExcelColumn(index = 36, value = "抵押日期")
private Date mortgageTime;
@ExcelColumn(index = 37, value = "第三方审核通过时间",pattern = "yyyy-MM-dd HH:mm:ss")
private Date volvoApprovedTime;
}
package com.glsx.ordercenter.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author Yanglinlong
* @date 2024/1/22 15:34
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class FullAreaAndIdDto {
private Integer areaId;
private String fullArea;
}
package com.glsx.ordercenter.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author Yanglinlong
* @date 2024/1/22 19:57
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OrderRepairDto {
/**
* 工单ID
*/
private Integer orderId;
/**
* ordersn
*/
private String orderSn;
/**
* 数量
*/
private Integer num;
}
package com.glsx.ordercenter.dto;
import lombok.Data;
import java.io.Serializable;
@Data
public class VinAndSnDto implements Serializable {
private static final long serialVersionUID = -358848964110184169L;
private Integer orderId;
private Integer fileId;
private String filePath;
private String fileName;
private Integer fileType;
/**
* 设备号
*/
private String sns;
/**
* 车架号
*/
private String vin;
}
package com.glsx.ordercenter.mapper;
import java.util.List;
import com.glsx.ordercenter.pojo.DictionaryData;
import org.apache.ibatis.annotations.Param;
/**
*
* @author zhanghj
* @version 1.0.0
* @Title DictionaryDataMapper.java
* @Package com.glsx.manager.mapper
* @Description TODO 字典数据mapper
* @author zhanghj
* @date 2019年1月22日 下午5:48:21
* @version 1.0.0
*/
public interface DictionaryDataMapper {
/**
*
* @author zhanghj
* @Title: save
* @Description: TODO 保存字典数据
* @param dictionaryData
* @return
* int
*
*/
int save(DictionaryData dictionaryData);
/**
* @param dictionaryData
* @return int
* @author zhanghj
* @Title: save
* @Description: TODO 保存字典数据
*/
int save(DictionaryData dictionaryData);
/**
* @param dictionaryData
* @return int
* @author zhanghj
* @Title: update
* @Description: TODO 更新字典数据
*/
int update(DictionaryData dictionaryData);
/**
*
* @author zhanghj
* @Title: update
* @Description: TODO 更新字典数据
* @param dictionaryData
* @return
* int
*
*/
int update(DictionaryData dictionaryData);
/**
* @param dictionaryData
* @return int
* @author zhanghj
* @Title: delete
* @Description: TODO 删除字典数据
*/
int delete(DictionaryData dictionaryData);
/**
*
* @author zhanghj
* @Title: delete
* @Description: TODO 删除字典数据
* @param dictionaryData
* @return
* int
*
*/
int delete(DictionaryData dictionaryData);
/**
* @param id
* @return DictionaryData
* @author zhanghj
* @Title: get
* @Description: TODO 通过id获取字典数据
*/
DictionaryData get(Integer id);
/**
*
* @author zhanghj
* @Title: get
* @Description: TODO 通过id获取字典数据
* @param id
* @return
* DictionaryData
*
*/
DictionaryData get(Integer id);
/**
* 获取数据列表
*
* @param dictionaryData
* @return
*/
List<DictionaryData> getList(DictionaryData dictionaryData);
/**
* 获取数据列表
* @param dictionaryData
* @return
*/
List<DictionaryData> getList(DictionaryData dictionaryData);
/**
* @param dictionaryData
* @return List<DictionaryData>
* @author zhanghj
* @Title: list
* @Description: TODO 获取字典数据列表
*/
List<DictionaryData> list(DictionaryData dictionaryData);
/**
*
* @author zhanghj
* @Title: list
* @Description: TODO 获取字典数据列表
* @param dictionaryData
* @return
* List<DictionaryData>
*
*/
List<DictionaryData> list(DictionaryData dictionaryData);
/**
* @param dictionaryData
* @return int
* @author zhanghj
* @Title: deleteByDictType 通过字典类型删除字典数据
* @Description: TODO
*/
int deleteByDictType(DictionaryData dictionaryData);
/**
*
* @author zhanghj
* @Title: deleteByDictType 通过字典类型删除字典数据
* @Description: TODO
* @param dictionaryData
* @return
* int
*
*/
int deleteByDictType(DictionaryData dictionaryData);
/**
* @param dataKey
* @return int
* @author duanht
* @Title: deleteByDictType 根据字典键值获取值
* @Description: TODO
*/
String getDictValueByKey(String dataKey);
/**
*
* @author duanht
* @Title: deleteByDictType 根据字典键值获取值
* @Description: TODO
* @param dataKey
* @return
* int
*
*/
String getDictValueByKey(String dataKey);
List<DictionaryData> getListByType(@Param("dictType") String dictType);
List<DictionaryData> getListByType(@Param("dictType") String dictType);
String getDataByTypeAndKey(@Param("dictType") String dictType,
@Param("dataKey") String dataKey);
String getDataByTypeAndKey(@Param("dictType") String dictType,
@Param("dataKey") String dataKey);
/**
* 根据字典类型和字典键值获取值
*
* @param installDeviceTypeList key值
* @return
*/
List<DictionaryData> getDictValueByKeyList(@Param("installDeviceTypeList") List<String> installDeviceTypeList);
}
......@@ -2,6 +2,7 @@ package com.glsx.ordercenter.mapper;
import java.util.List;
import com.glsx.ordercenter.dto.FullAreaAndIdDto;
import com.glsx.ordercenter.dto.FullAreaDto;
import com.glsx.ordercenter.pojo.SysArea;
import com.glsx.ordercenter.pojo.SysAreaExample;
......@@ -44,4 +45,11 @@ public interface SysAreaMapper {
FullAreaDto getFullAreaByAreaCode(@Param("districtId") Integer districtId);
String getSeperatedArea(Integer districtId);
/**
* 获取区域ID和地址映射关系
*
* @return
*/
List<FullAreaAndIdDto> getFullAreaAndAreaId();
}
......@@ -64,4 +64,10 @@ public interface SysCarOrderMapper {
List<SysOrder> selectAuditList(CarOrderQueryReq req);
HashMap<String, Object> countAuditList(CarOrderQueryReq req);
HashMap<String, Object> countByAdmin(CarOrderQueryReq req);
HashMap<String, Object> countByMerchant(CarOrderQueryReq req);
HashMap<String, Object> countByShop(CarOrderQueryReq req);
}
package com.glsx.ordercenter.mapper;
import java.util.List;
import java.util.Set;
import org.apache.ibatis.annotations.Param;
......@@ -24,4 +25,11 @@ public interface SysChannelOrgMapper {
int updateByPrimaryKey(SysChannelOrg record);
/**
* 根据渠道获取渠道列表
*
* @param channelList 渠道列表
* @return
*/
List<SysChannelOrg> getChannelOrgListByChannelList(@Param("channelList") Set<String> channelList);
}
\ No newline at end of file
......@@ -2,6 +2,7 @@ package com.glsx.ordercenter.mapper;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.ibatis.annotations.Param;
......@@ -27,26 +28,31 @@ public interface SysOrderBiddingRecordsMapper {
int updateByPrimaryKeySelective(SysOrderBiddingRecords record);
int updateByPrimaryKey(SysOrderBiddingRecords record);
List<BiddingOrderResp> selectBiddingList(@Param("orderId") Integer orderId,@Param("keyWord") String keyWord,@Param("isSelectByPhone")int isSelectByPhone);
List<BiddingOrderResp> selectBiddingList(@Param("orderId") Integer orderId, @Param("keyWord") String keyWord, @Param("isSelectByPhone") int isSelectByPhone);
List<String> selectUserServiceItems(@Param("userId") Integer userId);
List<SysOrder> selectBiddingOrders(@Param("serviceId") Integer serviceId, @Param("keyWord")String keyWord);
List<VisibleServiceProviderVo> getVisableSPbyOrderId(Integer orderId);
List<String> selectFilesByOrderId( @Param("orderId")Integer orderId, @Param("fileType")Integer fileType);
List<SysOrder> selectBiddingOrders(@Param("serviceId") Integer serviceId, @Param("keyWord") String keyWord);
List<VisibleServiceProviderVo> getVisableSPbyOrderId(Integer orderId);
List<String> selectFilesByOrderId(@Param("orderId") Integer orderId, @Param("fileType") Integer fileType);
/**
*
* @author zhanghj
* @Title: insertOrderBiddingRecords
* @param visiableService void
* @author zhanghj
* @Title: insertOrderBiddingRecords
* @Description: TODO 批量插入可竞价服务商列表
* @param visiableService
* void
*/
void insertOrderBiddingRecords(@Param("visiableServiceList") List<Map<String, Object>> visiableServiceList);
/**
* 根据订单ID和用户ID查询竞价单
*
* @param orderIdList 工单Id集合
* @param userId 用户ID
* @return
*/
void insertOrderBiddingRecords(@Param("visiableServiceList")List<Map<String, Object>> visiableServiceList);
List<SysOrderBiddingRecords> selectByOrderIdAndUserId(@Param("orderIdList") Set<Integer> orderIdList, @Param("userId") Integer userId);
}
\ No newline at end of file
package com.glsx.ordercenter.mapper;
import com.glsx.ordercenter.pojo.SysOrderDevice;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
public interface SysOrderDeviceMapper {
int deleteByPrimaryKey(Integer id);
......@@ -18,14 +20,11 @@ public interface SysOrderDeviceMapper {
int updateByPrimaryKey(SysOrderDevice record);
/**
*
* @param record
* @return List<SysOrderDevice>
* @author zhanghj
* @Title: getOrderDeviceList
* @Description: 获取某个订单的设备列表
* @param record
* @return
* List<SysOrderDevice>
*
*/
List<SysOrderDevice> getOrderDeviceList(SysOrderDevice record);
......@@ -33,4 +32,12 @@ public interface SysOrderDeviceMapper {
List<SysOrderDevice> selectByOrderDevice(SysOrderDevice record);
int deleteByRecord(SysOrderDevice record);
/**
* 根据订单id获取设备列表
*
* @param orderIdList 工单ID
* @return
*/
List<SysOrderDevice> getOrderDeviceListByOrderIds(@Param("orderIdList") Set<Integer> orderIdList);
}
......@@ -4,6 +4,7 @@ import com.glsx.ordercenter.pojo.SysOrderFile;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
public interface SysOrderFileMapper {
......@@ -21,23 +22,33 @@ public interface SysOrderFileMapper {
int updateByPrimaryKey(SysOrderFile record);
/**
* 增加订单文件列表
* @param fileList
* @return
*/
int addOrderFileList(@Param("fileList")List<SysOrderFile> fileList);
/**
* 增加订单文件列表
*
* @param fileList
* @return
*/
int addOrderFileList(@Param("fileList") List<SysOrderFile> fileList);
int countByOrderIdAndFilePath(@Param("orderId") Integer orderId, @Param("filePath") String filePath,
@Param("fileType") Integer fileType);
int countByOrderIdAndFilePath(@Param("orderId") Integer orderId, @Param("filePath") String filePath,
@Param("fileType") Integer fileType);
List<SysOrderFile> selectByOrderIdAndFileType(@Param("orderId") Integer orderId,
@Param("fileType") Integer fileType);
List<SysOrderFile> selectByOrderIdAndFileType(@Param("orderId") Integer orderId,
@Param("fileType") Integer fileType);
List<SysOrderFile> selectByOrderId(@Param("orderId") Integer orderId);
List<SysOrderFile> selectByOrderId(@Param("orderId") Integer orderId);
List<SysOrderFile> selectOrderFile(@Param("orderId") Integer orderId,@Param("sort") Integer sort);
List<SysOrderFile> selectOrderFile(@Param("orderId") Integer orderId, @Param("sort") Integer sort);
List<SysOrderFile> selectListByRecord(SysOrderFile orderFile);
List<SysOrderFile> selectListByRecord(SysOrderFile orderFile);
/**
* 通过工单ID集合获取照片集合
*
* @param orderIds 工单Id集合
* @param fileType 照片类型
* @return
*/
List<SysOrderFile> selectByOrderIds(@Param("orderIds") Set<Integer> orderIds, @Param("fileType") Integer fileType);
}
......@@ -7,8 +7,10 @@ import com.glsx.ordercenter.pojo.SysOrderExample;
import com.glsx.ordercenter.pojo.SysUserOrder;
import org.apache.ibatis.annotations.Param;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
public interface SysOrderMapper {
......@@ -212,4 +214,19 @@ public interface SysOrderMapper {
* @return
*/
List<SysOrder> queryOrderByWorkOrderNoAndChannel(SysOrder order);
HashMap<String, Object> countByAdmin(QueryOrderReq queryOrderReq);
HashMap<String, Object> countByMerchant(QueryOrderReq queryOrderReq);
HashMap<String, Object> countByShop(QueryOrderReq queryOrderReq);
/**
* 根据工单ID或者ordersn集合查询维修单数据
*
* @param orderIds 工单ID
* @param ordersnList ordersn集合
* @return
*/
List<OrderRepairDto> getAfterSaleNumByOrderIdsOrOrdersnList(@Param("orderIds") Set<Integer> orderIds, @Param("ordersnList") Set<String> ordersnList);
}
package com.glsx.ordercenter.mapper;
import com.glsx.ordercenter.pojo.SysOrderOcrSnResult;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface SysOrderOcrSnResultMapper {
List<SysOrderOcrSnResult> selectByOrderId(@Param("orderId") Integer orderId);
}
\ No newline at end of file
package com.glsx.ordercenter.mapper;
import com.glsx.ordercenter.pojo.SysOrderOcrVinResult;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface SysOrderOcrVinResultMapper {
List<SysOrderOcrVinResult> selectByOrderId(@Param("orderId") Integer orderId);
}
\ No newline at end of file
package com.glsx.ordercenter.mapper;
import java.util.List;
import java.util.Set;
import com.glsx.ordercenter.pojo.SysOrderRepair;
import com.glsx.ordercenter.pojo.SysOrderRepairExample;
import org.apache.ibatis.annotations.Param;
public interface SysOrderRepairMapper {
long countByExample(SysOrderRepairExample example);
int deleteByPrimaryKey(Integer id);
int insert(SysOrderRepair record);
int insert(SysOrderRepair record);
int insertSelective(SysOrderRepair record);
......@@ -21,18 +23,31 @@ public interface SysOrderRepairMapper {
int updateByPrimaryKeySelective(SysOrderRepair record);
int updateByPrimaryKey(SysOrderRepair record);
int deleteByOrderId(Integer id);
/**
*
* @author zhanghj
* @Title: getLrderRepair
* @Description: TODO 查询售后记录列表
* @param sysOrderRepair
* @return List<SysOrderRepair>
* @author zhanghj
* @Title: getLrderRepair
* @Description: TODO 查询售后记录列表
*/
List<SysOrderRepair> getOrderRepairList(SysOrderRepair sysOrderRepair);
/**
* 通过工单Id获取所有维修单记录
*
* @param orderIdList 工单Id列表
* @return
* List<SysOrderRepair>
*/
List<SysOrderRepair> selectByOrderIds(@Param("orderIdList") Set<Integer> orderIdList);
/**
* 通过子工单Id获取所有维修单记录
*
* @param subOrderIdList 工单Id列表
* @return
*/
List<SysOrderRepair> getOrderRepairList(SysOrderRepair sysOrderRepair);
List<SysOrderRepair> selectBySubOrderIds(@Param("subOrderIdList") Set<Integer> subOrderIdList);
}
\ No newline at end of file
package com.glsx.ordercenter.mapper;
import java.util.List;
import java.util.Set;
import org.apache.ibatis.annotations.Param;
......@@ -22,17 +23,14 @@ public interface SysOrderServiceTypeMapper {
int updateById(SysOrderServiceType record);
/**
*
* @author zhanghj
* @Title: addServiceTypeList
* @Description: TODO 增加多个
* @param orderId
* @param serviceTypeArray
* @return
* int
*
* @return int
* @author zhanghj
* @Title: addServiceTypeList
* @Description: TODO 增加多个
*/
int addServiceTypeList(@Param("orderId")Integer orderId, @Param("serviceTypeArray")String[] serviceTypeArray);
int addServiceTypeList(@Param("orderId") Integer orderId, @Param("serviceTypeArray") String[] serviceTypeArray);
/**
......@@ -41,7 +39,7 @@ public interface SysOrderServiceTypeMapper {
* @param id
* @return
*/
List<SysOrderServiceType> selectOrderServiceItems(@Param("orderId")Integer orderId);
List<SysOrderServiceType> selectOrderServiceItems(@Param("orderId") Integer orderId);
/**
* 删除指定ORDERiD的竞价单服务类型
......@@ -50,4 +48,12 @@ public interface SysOrderServiceTypeMapper {
* @return
*/
Integer deleteOrderServiceTypeByOrderId(Integer orderId);
/**
* 根据工单ID获取服务项目集合
*
* @param orderIdList 工单Id集合
* @return
*/
List<SysOrderServiceType> selectOrderServiceItemsByOrderIds(@Param("orderIdList") Set<Integer> orderIdList);
}
\ No newline at end of file
......@@ -4,6 +4,7 @@ import com.glsx.ordercenter.pojo.SysOrderStatus;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
public interface SysOrderStatusMapper {
......@@ -21,14 +22,23 @@ public interface SysOrderStatusMapper {
/**
* 获取订单进度列表
*
* @param orderId
* @return
*/
List<SysOrderStatus> getOrderProgress(@Param("orderId")Integer orderId);
SysOrderStatus getLastOrderStatus(@Param("orderId")Integer orderId);
List<SysOrderStatus> getOrderProgress(@Param("orderId") Integer orderId);
int updateRemark(SysOrderStatus record);
SysOrderStatus getLastOrderStatus(@Param("orderId") Integer orderId);
SysOrderStatus selectByOrderIdAndStatus(@Param("orderId")Integer orderId, @Param("activeStatus")byte activeStatus);
int updateRemark(SysOrderStatus record);
SysOrderStatus selectByOrderIdAndStatus(@Param("orderId") Integer orderId, @Param("activeStatus") byte activeStatus);
/**
* 通过工单ID集合查询订单进度
*
* @param orderIds 工单ID集合
* @return
*/
List<SysOrderStatus> getOrderProgressListByOrderIds(@Param("orderIds") Set<Integer> orderIds);
}
\ No newline at end of file
package com.glsx.ordercenter.mapper;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.ibatis.annotations.Param;
......@@ -12,7 +13,6 @@ import com.glsx.ordercenter.pojo.SysOrganizationExample;
public interface SysOrganizationMapper {
long countByExample(SysOrganizationExample example);
List<SysOrganization> selectByExample(SysOrganizationExample example);
......@@ -20,21 +20,28 @@ public interface SysOrganizationMapper {
int updateByPrimaryKeySelective(SysOrganization record);
@SuppressWarnings("rawtypes")
List<SysOrganization> findOrgByParams(Map map);
List<SysOrganization> findOrgByParentId(@Param("id")Integer id);
List<SysOrganization> getAllGroupByParentId(@Param("id")Integer id,@Param("parentId")Integer parentId);
@SuppressWarnings("rawtypes")
List<SysOrganization> findOrgByParams(Map map);
List<SysOrganization> findOrgByParentId(@Param("id") Integer id);
List<SysOrganization> getAllGroupByParentId(@Param("id") Integer id, @Param("parentId") Integer parentId);
SysOrganization selectDetailById(Integer id);
List<Integer> selectOrgByUserId(@Param("userId")Integer userId);
List<SysOrganization> getOrderChannel(@Param("userId")Integer userId);
List<Integer> getDataRight(@Param("userId")Integer userId,@Param("groupId")Integer groupId);
List<Integer> selectOrgByUserId(@Param("userId") Integer userId);
List<SysOrganization> getOrderChannel(@Param("userId") Integer userId);
List<Integer> getDataRight(@Param("userId") Integer userId, @Param("groupId") Integer groupId);
/**
* 通过id集合获取组织数据
*
* @param idList
* @return
*/
List<SysOrganization> selectByIds(@Param("idList") Set<Integer> idList);
}
\ No newline at end of file
package com.glsx.ordercenter.mapper;
import java.util.List;
import java.util.Set;
import com.glsx.ordercenter.dto.ServiceItem;
import com.glsx.ordercenter.pojo.SysServiceItem;
import org.apache.ibatis.annotations.Param;
/**
*
* @author zhanghj
* @version 1.0.0
* @Title SysServiceItemMapper.java
* @Package com.glsx.ordercenter.mapper
* @Description 服务项目mapper
* @author zhanghj
* @date 2019年9月27日 下午5:32:43
* @version 1.0.0
*/
public interface SysServiceItemMapper {
......@@ -53,4 +55,12 @@ public interface SysServiceItemMapper {
* @return
*/
SysServiceItem getServiceItemByServiceName(@Param("serviceName") String serviceName);
/**
* 通过serviceCode 获取服务项目
*
* @param serviceCodeList 服务项目list
* @return
*/
List<SysServiceItem> selectByServiceCodes(@Param("serviceCodeList") Set<String> serviceCodeList);
}
......@@ -2,6 +2,7 @@ package com.glsx.ordercenter.mapper;
import java.util.List;
import java.util.Set;
import com.glsx.ordercenter.pojo.user.SysUser;
import com.glsx.ordercenter.pojo.user.SysUserExample;
......@@ -30,4 +31,12 @@ public interface SysUserMapper {
void updateActualPhoneNumberByUserId(@Param("userId") Integer userId, @Param("actualPhoneNumber") String actualPhoneNumber);
String getActualPhoneNumber(@Param("userId") int userId);
/**
* 根据shopId获取用户列表
*
* @param shopIdList shopid列表
* @return
*/
List<SysUser> selectByIdList(@Param("shopIdList") Set<Integer> shopIdList);
}
\ No newline at end of file
......@@ -151,6 +151,11 @@ public class SysOrder implements Serializable {
private String vinHash;
/**
* 解密后的车架号
*/
private String vinNoDecode;
/**
* 是否需要验证车架号
*/
private Byte isVerifyVin;
......
package com.glsx.ordercenter.pojo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Table(name = "sys_order_ocr_sn_result")
public class SysOrderOcrSnResult implements Serializable {
private static final long serialVersionUID = 3476124113160340276L;
/**
* 自增主键
*/
@Id
private Integer id;
/**
* 工单id
*/
@Column(name = "order_id")
private Integer orderId;
/**
* 照片Id
*/
@Column(name = "file_id")
private Integer fileId;
/**
* 数据库设备号
*/
@Column(name = "db_sn")
private String dbSn;
/**
* OCR识别设备号
*/
@Column(name = "ocr_sn")
private String ocrSn;
/**
* 创建时间
*/
@Column(name = "create_time")
private Date createTime;
/**
* 更新时间
*/
@Column(name = "update_time")
private Date updateTime;
}
\ No newline at end of file
package com.glsx.ordercenter.pojo;
import lombok.*;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Table(name = "sys_order_ocr_vin_result")
public class SysOrderOcrVinResult implements Serializable {
private static final long serialVersionUID = 2109003180026064466L;
/**
* 自增主键
* -- GETTER --
* 获取自增主键
*
* @return id - 自增主键
*/
@Id
private Integer id;
/**
* 工单id
* -- GETTER --
* 获取工单id
*
* @return order_id - 工单id
*/
@Column(name = "order_id")
private Integer orderId;
/**
* 照片Id
* -- GETTER --
* 获取照片Id
*
* @return file_id - 照片Id
*/
@Column(name = "file_id")
private Integer fileId;
/**
* 数据库车架号
* -- GETTER --
* 获取数据库车架号
*
* @return db_vin - 数据库车架号
*/
@Column(name = "db_vin")
private String dbVin;
/**
* OCR识别车架号
* -- GETTER --
* 获取OCR识别车架号
*
* @return ocr_vin - OCR识别车架号
*/
@Column(name = "ocr_vin")
private String ocrVin;
/**
* 创建时间
* -- GETTER --
* 获取创建时间
*
* @return create_time - 创建时间
*/
@Column(name = "create_time")
private Date createTime;
/**
* 更新时间
* -- GETTER --
* 获取更新时间
*
* @return update_time - 更新时间
*/
@Column(name = "update_time")
private Date updateTime;
}
\ No newline at end of file
......@@ -22,7 +22,7 @@ import com.glsx.plat.core.web.R;
* @date 2020-08-26
*/
public interface CarOrderService {
Map<String, Integer> countByStatus(CarOrderQueryReq req);
Map<String, Object> countByStatus(CarOrderQueryReq req);
List<Map<String, Object>> countByServiceItem(CarOrderQueryReq req);
......
......@@ -269,7 +269,7 @@ public interface IOrderService {
void indertSysOrderWechatMsg(SysOrder sysOrder, Integer userId, Byte msgType, String remark,
Integer recever);
Map<String, Integer> countByOrderStatusAndUserType(QueryOrderReq oueryOrderReq);
Map<String, Object> countByOrderStatusAndUserType(QueryOrderReq oueryOrderReq);
List<MechanicBusiness> getMechanicList(Integer page, Integer pageSize, Integer orderId,
String keyWord, String orderBy, Integer userId);
......
package com.glsx.ordercenter.service;
import com.glsx.ordercenter.dto.VinAndSnDto;
import java.util.Map;
public interface OcrResultService {
Map<String, Object> getOcrResultByOrderId(Integer orderId);
void manualOcrRecognition(VinAndSnDto dto);
}
......@@ -116,85 +116,29 @@ public class CarOrderServiceImpl extends BaseOrderService implements CarOrderSer
* @return 结果
*/
@Override
public Map<String, Integer> countByStatus(CarOrderQueryReq req) {
Map<String, Integer> statusCountMap = new HashMap<>(8);
public Map<String, Object> countByStatus(CarOrderQueryReq req) {
Map<String, Object> countMap = new HashMap<>();
Byte userType = req.getUserType();
int totalCount = 0;
long totalCount=0;
this.wrapReqUserType(req);
req.setPageIndex(null);
req.setPageSize(null);
if (BizConstants.USER_TYPE_ADMIN == userType) {
// 运营角色
// 待指派
req.setStatus(OrderActiveStatusEnum.ORDER_ACTIVE_STATUS_MERCHANT_HAS_SENT
.getActiveStatus());
PagedResp<SysOrder> waitAssignResp = this.getList(req);
statusCountMap.put("waitAssign", waitAssignResp.getItems().size());
totalCount += waitAssignResp.getItems().size();
// 服务商已接单
req.setStatus(OrderActiveStatusEnum.ORDER_ACTIVE_STATUS_NOT_ASSIGN_MECHANIC
.getActiveStatus());
PagedResp<SysOrder> providerAcceptedResp = this.getList(req);
statusCountMap.put("providerAccepted", providerAcceptedResp.getItems().size());
totalCount += providerAcceptedResp.getItems().size();
// 服务商已指派
req.setStatus(OrderActiveStatusEnum.ORDER_ACTIVE_STATUS_MECHANIC_NOT_ACCEPT
.getActiveStatus());
PagedResp<SysOrder> providerAssignedResp = this.getList(req);
statusCountMap.put("providerAssigned", providerAssignedResp.getItems().size());
totalCount += providerAssignedResp.getItems().size();
// 技工已接未约
req.setStatus(OrderActiveStatusEnum.ORDER_ACTIVE_STATUS_MECHANIC_WITHOUT_APPOINTMENT
.getActiveStatus());
PagedResp<SysOrder> mechanicAcceptedResp = this.getList(req);
statusCountMap.put("mechanicAccepted", mechanicAcceptedResp.getItems().size());
totalCount += mechanicAcceptedResp.getItems().size();
// 技工已约未装
req.setStatus(OrderActiveStatusEnum.ORDER_ACTIVE_STATUS_MECHANIC_NOT_FINISH
.getActiveStatus());
PagedResp<SysOrder> notFinishResp = this.getList(req);
statusCountMap.put("notFinish", notFinishResp.getItems().size());
totalCount += notFinishResp.getItems().size();
// 已完成
req.setStatus(OrderActiveStatusEnum.ORDER_ACTIVE_STATUS_FINISH
.getActiveStatus());
PagedResp<SysOrder> finishedResp = this.getList(req);
statusCountMap.put("finished", finishedResp.getItems().size());
totalCount += finishedResp.getItems().size();
// 已取消
req.setStatus((byte) 20);
PagedResp<SysOrder> canceledResp = this.getList(req);
statusCountMap.put("canceled", canceledResp.getItems().size());
totalCount += canceledResp.getItems().size();
countMap = carOrderMapper.countByAdmin(req);
} else if (BizConstants.USER_TYPE_MERCHANT == userType) {
countMap = carOrderMapper.countByMerchant(req);
} else if (BizConstants.USER_TYPE_SHOP == userType) {
countMap = carOrderMapper.countByShop(req);
}
} else {
// 服务商、商户角色
// 服务商:待指派,商户:待接单
req.setStatus((byte) 0);
PagedResp<SysOrder> waitAssignResp = this.getList(req);
statusCountMap.put("waitAssign", waitAssignResp.getItems().size());
totalCount += waitAssignResp.getItems().size();
// 已完成
req.setStatus((byte) 1);
PagedResp<SysOrder> finishedResp = this.getList(req);
statusCountMap.put("finished", finishedResp.getItems().size());
totalCount += finishedResp.getItems().size();
// 待完成
req.setStatus((byte) 2);
PagedResp<SysOrder> notFinishResp = this.getList(req);
statusCountMap.put("notFinish", notFinishResp.getItems().size());
totalCount += notFinishResp.getItems().size();
// 已取消
req.setStatus((byte) 20);
PagedResp<SysOrder> canceledResp = this.getList(req);
statusCountMap.put("canceled", canceledResp.getItems().size());
totalCount += canceledResp.getItems().size();
if (!countMap.isEmpty()){
totalCount = countMap.values().stream().mapToLong(i->Long.parseLong(String.valueOf(i))).sum();
}
statusCountMap.put("all", totalCount);
countMap.put("all", totalCount);
return statusCountMap;
return countMap;
}
/**
......@@ -1098,13 +1042,22 @@ public class CarOrderServiceImpl extends BaseOrderService implements CarOrderSer
List<SysOrderFile> deleteList = (List<SysOrderFile>) CollectionUtils.subtract(oldList, newList);
List<SysOrderFile> updateList = (List<SysOrderFile>) CollectionUtils.intersection(oldList, newList);
if (CollectionUtils.isNotEmpty(addList)) {
addList.forEach(i -> {
i.setOrderId(order.getId());
i.setSubOrderId(order.getSubOrderList().get(0).getId());
i.setFileType(12);
i.setCreateBy(order.getUserId());
i.setCreateTime(now);
});
int idx=0;
ArrayList<Integer> original = new ArrayList<>();
for (int i = 0; i < 30; i++) {
original.add(i);
}
List<Integer> saved = updateList.stream().map(SysOrderFile::getSort).collect(Collectors.toList());
List<Integer> usable = original.stream().filter(i -> !saved.contains(i)).collect(Collectors.toList());
for (SysOrderFile orderFile : addList) {
orderFile.setOrderId(order.getId());
orderFile.setSubOrderId(order.getSubOrderList().get(0).getId());
orderFile.setFileType(12);
orderFile.setCreateBy(order.getUserId());
orderFile.setCreateTime(now);
orderFile.setSort(usable.get(idx));
idx++;
}
orderFileMapper.addOrderFileList(addList);
}
......
package com.glsx.ordercenter.service.impl;
import com.alibaba.fastjson.JSON;
import com.glsx.common.utils.PropertiesUtil;
import com.glsx.common.utils.StringUtils;
import com.glsx.ordercenter.dto.VinAndSnDto;
import com.glsx.ordercenter.mapper.SysOrderOcrSnResultMapper;
import com.glsx.ordercenter.mapper.SysOrderOcrVinResultMapper;
import com.glsx.ordercenter.pojo.SysOrderOcrSnResult;
import com.glsx.ordercenter.pojo.SysOrderOcrVinResult;
import com.glsx.ordercenter.service.OcrResultService;
import kafka.javaapi.producer.Producer;
import kafka.producer.KeyedMessage;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Slf4j
@Service
public class OcrResultServiceImpl implements OcrResultService {
@Resource
private Producer<String, String> producer;
@Autowired
private SysOrderOcrSnResultMapper sysOrderOcrSnResultMapper;
@Autowired
private SysOrderOcrVinResultMapper sysOrderOcrVinResultMapper;
@Override
public Map<String, Object> getOcrResultByOrderId(Integer orderId) {
Map<String, Object> map = new HashMap<>();
List<SysOrderOcrSnResult> snResultList = sysOrderOcrSnResultMapper.selectByOrderId(orderId);
if (CollectionUtils.isEmpty(snResultList)) {
map.put("snResult", null);
} else {
SysOrderOcrSnResult snResult = snResultList.get(0);
String[] split = snResult.getDbSn().split(",");
List<String> sns = Arrays.asList(split);
List<SysOrderOcrSnResult> resultList = snResultList.stream().filter(i -> StringUtils.isNotBlank(i.getOcrSn()) && sns.contains(i.getOcrSn())).collect(Collectors.toList());
boolean a = sns.size() == resultList.size();
map.put("snResult", a);
}
List<SysOrderOcrVinResult> vinResultList = sysOrderOcrVinResultMapper.selectByOrderId(orderId);
if (CollectionUtils.isEmpty(vinResultList)) {
map.put("vinResult", null);
} else {
SysOrderOcrVinResult vinResult = vinResultList.get(0);
boolean b = vinResult.getDbVin().equals(vinResult.getOcrVin());
map.put("vinResult", b);
}
return map;
}
@Override
public void manualOcrRecognition(VinAndSnDto dto) {
String fileName = PropertiesUtil.getProperty("ocr.file.name", "三码合一");
String snFileName = PropertiesUtil.getProperty("ocr.file.name.sn", "sn照片");
if (fileName.equals(dto.getFileName())) {
dto.setFileType(0);
} else if (snFileName.equals(dto.getFileName())) {
dto.setFileType(1);
}else {
log.info("没有匹配到对应文件名return");
return;
}
String topic = PropertiesUtil.getProperty("ocr.kafka.producer.topic","ocr_topic");
String jsonString = JSON.toJSONString(dto);
KeyedMessage<String, String> keyedMessage = new KeyedMessage<>(topic, jsonString);
producer.send(keyedMessage);
log.info("manualOcrRecognition ===>send Kafka info:" + jsonString);
}
}
......@@ -100,6 +100,9 @@ public class EdunOrderSyncStrategy extends BaseOrderSyncStrategy {
// 车辆信息
req.put("vin", order.getVinNo());
if (BizConstants.PINGAN_ORDERSOURCE.equals(order.getOrderSource())){
req.put("vin", order.getVinNoDecode());
}
// 新车架号,没有
req.put("newStandNo", "");
// 车主性别,没有
......
......@@ -2,7 +2,7 @@ spring.application.name=car-service-ordercenter
server.port=8094
#nacos\u914D\u7F6E
spring.cloud.nacos.config.group=BHG_GROUP
spring.cloud.nacos.config.server-addr=192.168.0.63:8858
spring.cloud.nacos.config.server-addr=192.168.3.102:8858
#configClient
#spring.cloud.config.name=${spring.application.name}
#spring.cloud.config.profile=local
......
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
<bean id="producerProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="properties">
<props>
<prop key="serializer.class">kafka.serializer.StringEncoder</prop>
<prop key="metadata.broker.list">${kafka.metadata.broker.list}</prop>
<prop key="producer.type">async</prop>
</props>
</property>
</bean>
<bean id="producerConfig" class="kafka.producer.ProducerConfig">
<constructor-arg index="0" ref="producerProperties" />
</bean>
<bean id="producer" class="kafka.javaapi.producer.Producer">
<constructor-arg index="0" ref="producerConfig" />
</bean>
</beans>
\ No newline at end of file
......@@ -193,4 +193,19 @@
AND data_key = #{dataKey,jdbcType=VARCHAR}
AND data_status = 1
</select>
<select id="getDictValueByKeyList" resultMap="baseResultMap">
select
<include refid="base_Column"/>
from sys_dict_data
<where>
<if test="installDeviceTypeList != null and installDeviceTypeList.size() > 0">
and data_key in
<foreach close=")" collection="installDeviceTypeList" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
AND data_status = 1
</where>
</select>
</mapper>
......@@ -187,4 +187,12 @@
left join sys_area p on c.parent_id = p.id
where d.id = #{districtId,jdbcType=INTEGER};
</select>
<select id="getFullAreaAndAreaId" resultType="com.glsx.ordercenter.dto.FullAreaAndIdDto">
SELECT sa.id AS areaId,
CONCAT_WS('', sa2.area_name, sa1.area_name, sa.area_name) AS fullArea
FROM sys_area sa
LEFT JOIN sys_area sa1 ON sa.parent_id = sa1.id
LEFT JOIN sys_area sa2 ON sa1.parent_id = sa2.id
</select>
</mapper>
......@@ -862,7 +862,8 @@
o.reserve_man, o.reserve_man_phone, o.is_check_in, o.overdue_remark,
o.mechanic_address, o.check_in_time, o.check_in_address, o.longitude, o.latitude,
o.quote_last_time, o.reference_price, o.service_code, o.settlement_status,
o.install_mode, o.receive_time,o.audit_status,o.audit_count,o.volvo_approved_status,
o.install_mode, o.receive_time,o.audit_status,o.audit_count,o.mortgage_time,
o.volvo_approved_status,o.volvo_approved_time,
<!-- 服务项目名称 -->
o.service_item_name serviceItemName,
<!-- 商户信息 -->
......@@ -1508,10 +1509,39 @@
<update id="updateVolvoApprovedStatusByOrderId">
update sys_order
set volvo_approved_status = #{volvoApprovedStatus,jdbcType=INTEGER},
volvo_approved_time = sysdate()
<set>
volvo_approved_status = #{volvoApprovedStatus,jdbcType=INTEGER},
<if test="volvoApprovedStatus != null and volvoApprovedStatus==1">
<!-- 第三方审核通过时间 -->
volvo_approved_time = sysdate()
</if>
</set>
where id = #{orderId,jdbcType=INTEGER}
</update>
<select id="countByAdmin" parameterType="com.glsx.ordercenter.dto.req.CarOrderQueryReq" resultType="hashmap">
select IFNULL(sum(if(active_status = 1 and canceled = 1, 1, 0)),0) waitAssign,
IFNULL(sum(if(active_status = 2 and canceled = 1, 1, 0)),0) providerAccepted,
IFNULL(sum(if(active_status = 4 and canceled = 1, 1, 0)),0) providerAssigned,
IFNULL(sum(if(active_status = 6 and canceled = 1, 1, 0)),0) mechanicAccepted,
IFNULL(sum(if(active_status = 7 and canceled = 1, 1, 0)),0) notFinish,
IFNULL(sum(if(active_status = 8 and canceled = 1, 1, 0)),0) finished,
IFNULL(sum(if(canceled = 0, 1, 0)),0) canceled
from sys_order o
<where>
<if test="providerId != null">
<!-- 服务商,查找指派给自己的订单 -->
and o.merchant_id = #{userId,jdbcType=INTEGER}
</if>
<if test="shopId != null">
<!-- 商户,查找自己发起的订单 -->
and o.shop_id = #{userId,jdbcType=INTEGER}
</if>
<!-- 不查找已删除的 -->
and o.active_status != 9
<!-- 只查找车务单 -->
and o.order_type = 6
</where>
</select>
<select id="selectCanUseByWorkOrderNo" resultMap="BaseResultMap">
select
......@@ -1521,4 +1551,46 @@
and order_source = #{orderSource,jdbcType=VARCHAR}
and canceled = 1 limit 1
</select>
<select id="countByMerchant" parameterType="com.glsx.ordercenter.dto.req.CarOrderQueryReq" resultType="hashmap">
select IFNULL(sum(if(active_status in (1, 2, 5) and canceled = 1, 1, 0)),0) waitAssign,
IFNULL(sum(if(active_status in (4, 6, 7) and canceled = 1, 1, 0)),0) notFinish,
IFNULL(sum(if(active_status = 8 and canceled = 1, 1, 0)),0) finished,
IFNULL(sum(if(canceled = 0, 1, 0)),0) canceled
from sys_order o
<where>
<if test="providerId != null">
<!-- 服务商,查找指派给自己的订单 -->
and o.merchant_id = #{userId,jdbcType=INTEGER}
</if>
<if test="shopId != null">
<!-- 商户,查找自己发起的订单 -->
and o.shop_id = #{userId,jdbcType=INTEGER}
</if>
<!-- 不查找已删除的 -->
and o.active_status != 9
<!-- 只查找车务单 -->
and o.order_type = 6
</where>
</select>
<select id="countByShop" parameterType="com.glsx.ordercenter.dto.req.CarOrderQueryReq" resultType="hashmap">
select IFNULL(sum(if(active_status in (1, 2, 3, 4, 5) and canceled = 1, 1, 0)),0) waitAssign,
IFNULL(sum(if(active_status in (6, 7) and canceled = 1, 1, 0)),0) notFinish,
IFNULL(sum(if(active_status = 8 and canceled = 1, 1, 0)),0) finished,
IFNULL(sum(if(canceled = 0, 1, 0)),0) canceled
from sys_order o
<where>
<if test="providerId != null">
<!-- 服务商,查找指派给自己的订单 -->
and o.merchant_id = #{userId,jdbcType=INTEGER}
</if>
<if test="shopId != null">
<!-- 商户,查找自己发起的订单 -->
and o.shop_id = #{userId,jdbcType=INTEGER}
</if>
<!-- 不查找已删除的 -->
and o.active_status != 9
<!-- 只查找车务单 -->
and o.order_type = 6
</where>
</select>
</mapper>
......@@ -257,7 +257,24 @@
where order_id = #{orderId} and file_type = #{fileType} and LENGTH(trim(file_path))>0
</select>
<insert id="insertOrderBiddingRecords" parameterType="list">
<select id="selectByOrderIdAndUserId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_order_bidding_records
<where>
<if test="orderIdList != null and orderIdList.size() > 0">
and order_id in
<foreach close=")" collection="orderIdList" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
<if test="userId != null">
and service_id = #{userId}
</if>
</where>
</select>
<insert id="insertOrderBiddingRecords" parameterType="list">
insert into sys_order_bidding_records
(service_id, order_id, create_time, update_time)
values
......
......@@ -63,10 +63,10 @@
SELECT LAST_INSERT_ID()
</selectKey>
insert into sys_order_device (order_id, device_no, device_type,
install_location, sort)
install_location, sort)
values (#{orderId,jdbcType=INTEGER}, #{deviceNo,jdbcType=VARCHAR},
#{deviceType,jdbcType=VARCHAR},
#{installLocation,jdbcType=VARCHAR}, #{sort})
#{deviceType,jdbcType=VARCHAR},
#{installLocation,jdbcType=VARCHAR}, #{sort})
</insert>
<insert id="insertSelective" parameterType="com.glsx.ordercenter.pojo.SysOrderDevice">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
......@@ -150,21 +150,51 @@
</update>
<update id="updateByPrimaryKey" parameterType="com.glsx.ordercenter.pojo.SysOrderDevice">
update sys_order_device
set order_id = #{orderId,jdbcType=INTEGER},
device_no = #{deviceNo,jdbcType=VARCHAR},
device_type = #{deviceType,jdbcType=VARCHAR},
set order_id = #{orderId,jdbcType=INTEGER},
device_no = #{deviceNo,jdbcType=VARCHAR},
device_type = #{deviceType,jdbcType=VARCHAR},
install_location = #{installLocation,jdbcType=VARCHAR},
sort = #{sort}
sort = #{sort}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="getOrderDeviceList" parameterType="com.glsx.ordercenter.pojo.SysOrderDevice"
resultMap="BaseResultMap">
select sod.id, sod.order_id, sod.device_no, sod.device_type, sod.install_location, sod.sort,
sdd.data_value as deviceTypeName, sod.repair_type, sod.old_device_no
select sod.id,
sod.order_id,
sod.device_no,
sod.device_type,
sod.install_location,
sod.sort,
sdd.data_value as deviceTypeName,
sod.repair_type,
sod.old_device_no
from sys_order_device sod
LEFT JOIN sys_dict_data sdd ON sod.device_type = sdd.data_key
LEFT JOIN sys_dict_data sdd ON sod.device_type = sdd.data_key
where order_id = #{orderId,jdbcType=INTEGER}
order by sort asc, id desc
</select>
<select id="getOrderDeviceListByOrderIds" resultMap="BaseResultMap">
select sod.id,
sod.order_id,
sod.device_no,
sod.device_type,
sod.install_location,
sod.sort,
sdd.data_value as deviceTypeName,
sod.repair_type,
sod.old_device_no
from sys_order_device sod
LEFT JOIN sys_dict_data sdd ON sod.device_type = sdd.data_key
<where>
<if test="orderIdList != null and orderIdList.size() > 0">
and order_id in
<foreach close=")" collection="orderIdList" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
</where>
order by sort asc, id desc
</select>
</mapper>
......@@ -238,4 +238,19 @@
</if>
</where>
</select>
<select id="selectByOrderIds" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_order_file
<where>
<if test="orderIds != null and orderIds.size() > 0">
and order_id in
<foreach close=")" collection="orderIds" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
and file_type = #{fileType} and LENGTH(trim(file_path))>0
</where>
</select>
</mapper>
......@@ -18,6 +18,7 @@
<result column="car_type" jdbcType="VARCHAR" property="carType"/>
<result column="vin_no" jdbcType="VARCHAR" property="vinNo"/>
<result column="vin_hash" jdbcType="VARCHAR" property="vinHash"/>
<result column="vin_no_decode" jdbcType="VARCHAR" property="vinNoDecode"/>
<result column="car_color" jdbcType="VARCHAR" property="carColor"/>
<result column="expect_install_time" jdbcType="TIMESTAMP" property="expectInstallTime"/>
<result column="service_type" jdbcType="VARCHAR" property="serviceType"/>
......@@ -123,7 +124,8 @@
work_order_no, work_order_number, channel, order_source,mechanic_address,
merchant_name,reassign_mechanic_time,reserve_install_reason,connect_location_picture,surrounding_picture,is_check_in,
check_in_time,reserve_man,reserve_man_phone,quote_last_time,service_code,longitude,latitude,
receive_time, audit_status, audit_count, audit_time,install_contacts,install_contact_number,volvo_approved_status,volvo_approved_time
receive_time, audit_status, audit_count, audit_time,install_contacts,install_contact_number,volvo_approved_status,volvo_approved_time,
vin_no_decode
</sql>
<select id="selectByExample" parameterType="com.glsx.ordercenter.pojo.SysOrderExample" resultMap="BaseResultMap">
......@@ -621,6 +623,9 @@
<if test="vinHash != null">
vin_hash = #{vinHash,jdbcType=VARCHAR},
</if>
<if test="vinNoDecode != null">
vin_no_decode = #{vinNoDecode,jdbcType=VARCHAR},
</if>
<if test="carColor != null">
car_color = #{carColor,jdbcType=VARCHAR},
</if>
......@@ -2019,5 +2024,78 @@
AND active_status &lt;&gt; 9
order by id ,create_time desc
</select>
<select id="countByAdmin" resultType="hashmap">
select IFNULL(sum(if(active_status = 1 and canceled = 1, 1, 0)),0) waitAssign,
IFNULL(sum(if(active_status = 2 and canceled = 1, 1, 0)),0) notAssignMechanic,
IFNULL(sum(if(active_status = 4 and canceled = 1, 1, 0)),0) mechanicNotAccept,
IFNULL(sum(if(active_status = 6 and canceled = 1, 1, 0)),0) mechanicWithoutAppointment,
IFNULL(sum(if(active_status = 7 and canceled = 1, 1, 0)),0) notFinish,
IFNULL(sum(if(active_status = 8 and canceled = 1, 1, 0)),0) finished,
IFNULL(sum(if(canceled = 0, 1, 0)),0) canceled
FROM
<choose>
<!--超级管理员 -->
<when test="userId == 0">
sys_order so WHERE so.active_status &lt;&gt; 9
</when>
<!--运营角色 -->
<when test="userType == 0">
sys_user_org suo LEFT JOIN sys_user u ON suo.org_id = u.org_id
LEFT JOIN sys_order so ON so.shop_id = u.id AND u.user_type = 2
WHERE suo.user_id = #{userId} AND so.active_status &lt;&gt; 9
</when>
</choose>
AND so.order_type IN (1,2,3)
</select>
<select id="countByMerchant" resultType="hashmap">
select IFNULL(sum(if(active_status in (1, 2, 5) and canceled = 1, 1, 0)),0) waitAssign,
IFNULL(sum(if(active_status in (4, 6, 7) and canceled = 1, 1, 0)),0) finishing,
IFNULL(sum(if(active_status = 8 and canceled = 1, 1, 0)),0) finished,
IFNULL(sum(if(canceled = 0, 1, 0)),0) canceled
FROM
sys_order so where so.merchant_id = #{userId} and so.active_status &lt;&gt;9
AND so.order_type IN (1,2,3)
</select>
<select id="countByShop" resultType="hashmap">
select IFNULL(sum(if(active_status in (1, 2, 3, 4, 5) and canceled = 1, 1, 0)),0) waitAssign,
IFNULL(sum(if(active_status in (6, 7) and canceled = 1, 1, 0)),0) finishing,
IFNULL(sum(if(active_status = 8 and canceled = 1, 1, 0)),0) finished,
IFNULL(sum(if(canceled = 0, 1, 0)),0) canceled
FROM
sys_user_org suo
LEFT JOIN sys_user u ON suo.org_id = u.org_id
LEFT JOIN sys_order so ON so.shop_id = u.id AND u.user_type = 2
WHERE suo.user_id = #{userId} AND so.active_status &lt;&gt; 9 AND so.shop_id = #{userId}
AND so.order_type IN (1,2,3)
</select>
<select id="getAfterSaleNumByOrderIdsOrOrdersnList" resultType="com.glsx.ordercenter.dto.OrderRepairDto">
select
sor.order_id orderId,
so.order_sn orderSn,
count(1) num
from
sys_order_repair sor
LEFT JOIN sys_order so on sor.sub_order_id = so.id
LEFT JOIN sys_order so2 on sor.order_id = so2.id
<where>
<if test="orderIds != null and orderIds.size() > 0">
and sor.order_id in
<foreach close=")" collection="orderIds" item="item" open="(" separator=",">
#{item}
</foreach>
and so.canceled = 1
and so.active_status !=8
and so.order_type != 1
</if>
<if test="ordersnList != null and ordersnList.size() > 0">
and so.order_sn in
<foreach close=")" collection="ordersnList" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
</where>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glsx.ordercenter.mapper.SysOrderOcrSnResultMapper">
<resultMap id="BaseResultMap" type="com.glsx.ordercenter.pojo.SysOrderOcrSnResult">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="order_id" jdbcType="INTEGER" property="orderId" />
<result column="file_id" jdbcType="INTEGER" property="fileId" />
<result column="db_sn" jdbcType="VARCHAR" property="dbSn" />
<result column="ocr_sn" jdbcType="VARCHAR" property="ocrSn" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, order_id, file_id, db_sn, ocr_sn, create_time, update_time
</sql>
<select id="selectByOrderId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_order_ocr_sn_result
where order_id = #{orderId,jdbcType=INTEGER}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glsx.ordercenter.mapper.SysOrderOcrVinResultMapper">
<resultMap id="BaseResultMap" type="com.glsx.ordercenter.pojo.SysOrderOcrVinResult">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="order_id" jdbcType="INTEGER" property="orderId" />
<result column="file_id" jdbcType="INTEGER" property="fileId" />
<result column="db_vin" jdbcType="VARCHAR" property="dbVin" />
<result column="ocr_vin" jdbcType="VARCHAR" property="ocrVin" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, order_id, file_id, db_vin, ocr_vin, create_time, update_time
</sql>
<select id="selectByOrderId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_order_ocr_vin_result
where order_id = #{orderId,jdbcType=INTEGER}
</select>
</mapper>
\ No newline at end of file
......@@ -81,6 +81,19 @@
where st.order_id = #{orderId}
</select>
<select id="selectOrderServiceItemsByOrderIds" resultType="com.glsx.ordercenter.pojo.SysOrderServiceType">
select st.order_id orderId,st.service_type serviceType,dd.data_value serviceTypeName
from sys_order_service_type st left join sys_dict_data dd on dd.data_key=st.service_type
<where>
<if test="orderIdList != null and orderIdList.size() > 0">
and st.order_id in
<foreach close=")" collection="orderIdList" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
</where>
</select>
<delete id="deleteOrderServiceTypeByOrderId">
delete from sys_order_service_type where order_id = #{orderId};
</delete>
......
......@@ -47,7 +47,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, parent_id, `name`, org_status, org_type, sort, create_time, update_time, remark,
id
, parent_id, `name`, org_status, org_type, sort, create_time, update_time, remark,
update_by, create_by, label, org_group
</sql>
<select id="selectByExample" parameterType="com.glsx.ordercenter.pojo.SysOrganizationExample"
......@@ -73,7 +74,8 @@
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
DELETE FROM sys_organization
DELETE
FROM sys_organization
WHERE id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.glsx.ordercenter.pojo.SysOrganization">
......@@ -267,83 +269,90 @@
</select>
<select id="getAllGroupByParentId" resultType="com.glsx.ordercenter.pojo.SysOrganization">
SELECT
so.id id,
so.name name,
so.org_type orgType
FROM
sys_organization so
WHERE
so.parent_id = #{parentId,jdbcType=TINYINT}
AND so.org_status = 1
SELECT so.id id,
so.name name,
so.org_type orgType
FROM sys_organization so
WHERE so.parent_id = #{parentId,jdbcType=TINYINT}
AND so.org_status = 1
</select>
<select id="selectDetailById" resultType="com.glsx.ordercenter.pojo.SysOrganization">
SELECT
sor.*,
so.name parentName
SELECT sor.*,
so.name parentName
FROM sys_organization so
INNER JOIN sys_organization sor ON so.id = sor.parent_id
WHERE sor.id = #{id}
</select>
<select id="selectOrgByUserId" resultType="Integer">
SELECT so.id
FROM sys_organization so
LEFT JOIN sys_user_org suo ON so.id = suo.org_id
WHERE so.org_status in (1, 2)
and suo.user_id = #{userId}
</select>
<select id="getOrderChannel" resultType="com.glsx.ordercenter.pojo.SysOrganization">
SELECT DISTINCT
sys_organization.id,sys_organization.name
FROM
sys_organization so
INNER JOIN sys_organization sor ON so.id = sor.parent_id
sys_organization
LEFT JOIN sys_user_org ON sys_user_org.org_id = sys_organization.id
WHERE
sor.id = #{id}
sys_organization.parent_id = 0
<if test="userId !=null ">
and sys_user_org.user_id = #{userId}
</if>
ORDER BY
sys_organization.id ASC
</select>
<select id="selectOrgByUserId" resultType="Integer">
SELECT so.id
FROM sys_organization so
LEFT JOIN sys_user_org suo ON so.id=suo.org_id
WHERE
so.org_status in(1,2)
and suo.user_id= #{userId}
</select>
<select id="getOrderChannel" resultType="com.glsx.ordercenter.pojo.SysOrganization">
SELECT DISTINCT
sys_organization.id,sys_organization.name
FROM
sys_organization
LEFT JOIN sys_user_org ON sys_user_org.org_id = sys_organization.id
WHERE
sys_organization.parent_id = 0
<if test="userId !=null ">
and sys_user_org.user_id = #{userId}
</if>
ORDER BY
sys_organization.id ASC
</select>
<select id="getDataRightTest" resultType="Integer">
SELECT sys_user.id from sys_user
where user_type=2
<if test="groupId !=null ">
and sys_user.group_id = #{groupId}
</if>
and sys_user.org_id in(
SELECT DISTINCT
sys_organization.id
FROM
sys_organization
LEFT JOIN sys_user_org ON sys_user_org.org_id = sys_organization.id
WHERE
sys_organization.parent_id != 0
<if test="userId !=null ">
and sys_user_org.id = #{userId}
</if>
ORDER BY
sys_organization.id ASC
)
</select>
<select id="getDataRight" resultType="Integer">
SELECT DISTINCT su.id from
sys_user_org suo
LEFT JOIN sys_user su ON suo.org_id = su.org_id
WHERE su.user_type=2
<if test="userId !=null ">
and suo.user_id = #{userId}
</if>
<if test="groupId !=null ">
and group_id = #{groupId}
</if>
</select>
<select id="getDataRightTest" resultType="Integer">
SELECT sys_user.id from sys_user
where user_type=2
<if test="groupId !=null ">
and sys_user.group_id = #{groupId}
</if>
and sys_user.org_id in(
SELECT DISTINCT
sys_organization.id
FROM
sys_organization
LEFT JOIN sys_user_org ON sys_user_org.org_id = sys_organization.id
WHERE
sys_organization.parent_id != 0
<if test="userId !=null ">
and sys_user_org.id = #{userId}
</if>
ORDER BY
sys_organization.id ASC
)
</select>
<select id="getDataRight" resultType="Integer">
SELECT DISTINCT su.id from
sys_user_org suo
LEFT JOIN sys_user su ON suo.org_id = su.org_id
WHERE su.user_type=2
<if test="userId !=null ">
and suo.user_id = #{userId}
</if>
<if test="groupId !=null ">
and group_id = #{groupId}
</if>
</select>
<select id="selectByIds" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
from sys_organization
<where>
<if test="idList != null and idList.size() > 0">
and id in
<foreach close=")" collection="idList" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
</where>
</select>
</mapper>
\ No newline at end of file
......@@ -339,4 +339,19 @@
from sys_service_item
where service_name = #{serviceName,jdbcType=VARCHAR} limit 1
</select>
<select id="selectByServiceCodes" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_service_item
<where>
<if test="serviceCodeList != null and serviceCodeList.size() > 0">
and service_code in
<foreach close=")" collection="serviceCodeList" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
</where>
order by id
</select>
</mapper>
......@@ -279,6 +279,20 @@
WHERE su.id = #{id}
</select>
<select id="selectByIdList" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM sys_user su
<where>
<if test="shopIdList != null and shopIdList.size() > 0">
and su.id in
<foreach close=")" collection="shopIdList" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
</where>
</select>
<update id="updateActualPhoneNumberByUserId">
UPDATE sys_user
SET actual_phone_number = #{actualPhoneNumber}
......
......@@ -211,11 +211,16 @@ public class CarOrderServiceTest extends AppTest {
subOrder1.setVinNo("粤B3234323");
order.setSubOrderList(Arrays.asList(subOrder1));
SysOrderFile sysOrderFile1 = new SysOrderFile();
sysOrderFile1.setId(3149);
sysOrderFile1.setId(3196);
sysOrderFile1.setFilePath("http://qcimg01.glsx.com.cn/group1/M00/00/1C/wKgD3mC7IU6AQuHcAAGj77vgWrU091.jpg");
sysOrderFile1.setSort(0);
SysOrderFile sysOrderFile2 = new SysOrderFile();
sysOrderFile2.setFilePath("http://qcimg01.glsx.com.cn/");
order.setOrderFileList(Arrays.asList(sysOrderFile1,sysOrderFile2));
sysOrderFile2.setFilePath("http://qcimg03.glsx.com.cn/");
SysOrderFile sysOrderFile3 = new SysOrderFile();
sysOrderFile3.setId(3199);
sysOrderFile3.setFilePath("http://qcimg02.glsx.com.cn/");
sysOrderFile3.setSort(2);
order.setOrderFileList(Arrays.asList(sysOrderFile1,sysOrderFile2,sysOrderFile3));
super.printJson(this.carOrderService.audit(order));
}
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<!--<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.6.RELEASE</version>
<relativePath/> &lt;!&ndash; lookup parent from repository &ndash;&gt;
</parent>-->
<parent>
<groupId>com.glsx</groupId>
<artifactId>rest-framework-admin</artifactId>
<version>1.2.0-SNAPSHOT</version>
<relativePath/>
</parent>
<artifactId>car-service</artifactId>
<version>1.0.1</version>
<packaging>pom</packaging>
<modelVersion>4.0.0</modelVersion>
<name>car-service</name>
<url>http://bhg.glsx.com.cn</url>
<description>汽车服务共享平台</description>
<modules>
<module>car-service-manager</module>
<module>car-service-common</module>
<module>car-service-generator</module>
<module>car-service-usercenter</module>
<module>car-service-ordercenter</module>
<module>car-service-publicservice</module>
<module>car-service-task</module>
<module>car-service-gateway</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<slf4j.version>1.7.36</slf4j.version>
<rest-admin-framework.version>1.2.0-SNAPSHOT</rest-admin-framework.version>
<local.nexus.snapshots.url>http://192.168.3.233/nexus/content/repositories/snapshots/</local.nexus.snapshots.url>
<local.nexus.releases.url>http://192.168.3.233/nexus/content/repositories/releases/</local.nexus.releases.url>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Hoxton.SR9</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!--rest-admin-framework-->
<dependency>
<groupId>com.glsx</groupId>
<artifactId>rest-admin-framework-dependencies</artifactId>
<version>${rest-admin-framework.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- 日志工具-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-pool2 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.11.1</version>
</dependency>
<!-- Spring 配置处理器,用于生成 @ConfigurationProperties 类的信息,供 IDEA 提示用 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.2.6.RELEASE</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.5</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<!--<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.6.RELEASE</version>
<relativePath/> &lt;!&ndash; lookup parent from repository &ndash;&gt;
</parent>-->
<parent>
<groupId>com.glsx</groupId>
<artifactId>rest-framework-admin</artifactId>
<version>1.2.0-SNAPSHOT</version>
<relativePath/>
</parent>
<artifactId>car-service</artifactId>
<version>1.0.1</version>
<packaging>pom</packaging>
<modelVersion>4.0.0</modelVersion>
<name>car-service</name>
<url>http://bhg.glsx.com.cn</url>
<description>汽车服务共享平台</description>
<modules>
<module>car-service-manager</module>
<module>car-service-common</module>
<module>car-service-generator</module>
<module>car-service-usercenter</module>
<module>car-service-ordercenter</module>
<module>car-service-publicservice</module>
<module>car-service-task</module>
<module>car-service-gateway</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<slf4j.version>1.7.36</slf4j.version>
<rest-admin-framework.version>1.2.0-SNAPSHOT</rest-admin-framework.version>
<local.nexus.snapshots.url>http://192.168.3.233/nexus/content/repositories/snapshots/</local.nexus.snapshots.url>
<local.nexus.releases.url>http://192.168.3.233/nexus/content/repositories/releases/</local.nexus.releases.url>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Hoxton.SR9</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!--rest-admin-framework-->
<dependency>
<groupId>com.glsx</groupId>
<artifactId>rest-admin-framework-dependencies</artifactId>
<version>${rest-admin-framework.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- 日志工具-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-pool2 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.11.1</version>
</dependency>
<!-- Spring 配置处理器,用于生成 @ConfigurationProperties 类的信息,供 IDEA 提示用 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.2.6.RELEASE</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.5</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!