Commit a0e3a2c1 by zhanghj

V1.5.0--提交历史订单数据处理代码

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@24652 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 6fa527cc
package com.glsx.common.pojo; package com.glsx.common.pojo;
import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -13,7 +14,12 @@ import java.util.List; ...@@ -13,7 +14,12 @@ import java.util.List;
* @date 2019年11月1日 下午3:16:16 * @date 2019年11月1日 下午3:16:16
* @version 1.0.0 * @version 1.0.0
*/ */
public class MerchantReq { public class MerchantReq implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
/** /**
* 用户登录名 * 用户登录名
...@@ -145,4 +151,14 @@ public class MerchantReq { ...@@ -145,4 +151,14 @@ public class MerchantReq {
this.phoneNumber = phoneNumber; this.phoneNumber = phoneNumber;
} }
@Override
public String toString() {
return "MerchantReq [username=" + username + ", password=" + password
+ ", name=" + name + ", phoneNumber=" + phoneNumber
+ ", district=" + district + ", address=" + address
+ ", shopName=" + shopName + ", orgId=" + orgId
+ ", serviceType=" + serviceType + ", serviceKeyList="
+ serviceKeyList + "]";
}
} }
package com.glsx.ordercenter.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.glsx.common.constants.ResultObject;
import com.glsx.ordercenter.constants.ResultCodeEnum;
import com.glsx.ordercenter.dto.HistoricalOrderReq;
import com.glsx.ordercenter.service.HistoricalDataProcessingService;
/**
*
* @Title HistoricalDataProcessing.java
* @Package com.glsx.ordercenter.controller
* @Description TODO 历史数据处理
* @author zhanghj
* @date 2019年11月5日 下午3:05:17
* @version 1.0.0
*/
@RestController
@RequestMapping(value="/historyData")
public class HistoricalDataProcessingController {
@Autowired
private HistoricalDataProcessingService historicalDataProcessingService;
@RequestMapping(value="/processOrderServiceItem")
public ResultObject processOrderServiceItem(HistoricalOrderReq historicalOrderReq) {
historicalDataProcessingService.processOrderServiceItem(historicalOrderReq);
return new ResultObject(ResultCodeEnum.SUCCESS.getCode(), ResultCodeEnum.SUCCESS.getMsg());
}
}
package com.glsx.ordercenter.dto;
public class HistoricalOrderReq {
private String workOrderNo;
/**
* 查询:开始时间
*/
private String beginDate;
/**
* 查询:结束时间
*/
private String endDate;
public String getWorkOrderNo() {
return workOrderNo;
}
public void setWorkOrderNo(String workOrderNo) {
this.workOrderNo = workOrderNo;
}
public String getBeginDate() {
return beginDate;
}
public void setBeginDate(String beginDate) {
this.beginDate = beginDate;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
}
package com.glsx.ordercenter.mapper;
import java.util.List;
import org.springframework.stereotype.Repository;
import com.glsx.ordercenter.dto.HistoricalOrderReq;
import com.glsx.ordercenter.pojo.SysOrder;
@Repository
public interface HistoricalDataProcessingMapper {
/**
*
* @author zhanghj
* @Title: getThirdChannelOrderList
* @Description: TODO 获取第三方待处理订单列表
* @param historicalOrderReq
* @return
* List<SysOrder>
* @version
*/
List<SysOrder> getThirdChannelOrderList(
HistoricalOrderReq historicalOrderReq);
}
...@@ -2,11 +2,15 @@ package com.glsx.ordercenter.pojo; ...@@ -2,11 +2,15 @@ package com.glsx.ordercenter.pojo;
import java.util.Date; import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.groups.Default;
public class SysServiceItemDeviceConfig { public class SysServiceItemDeviceConfig {
private Integer id; private Integer id;
private Integer serviceItemId; private Integer serviceItemId;
@NotBlank(message="{param.not.null}", groups={Default.class, GroupA.class})
private String deviceType; private String deviceType;
private Boolean isVerifyStock; private Boolean isVerifyStock;
......
package com.glsx.ordercenter.service;
import com.glsx.ordercenter.dto.HistoricalOrderReq;
public interface HistoricalDataProcessingService {
/**
*
* @author zhanghj
* @Title: processOrderServiceItem
* @Description: TODO 处理历史数据的服务项目数据
* @param historicalOrderReq
* void
* @version
*/
void processOrderServiceItem(HistoricalOrderReq historicalOrderReq);
}
package com.glsx.ordercenter.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.glsx.ordercenter.dto.HistoricalOrderReq;
import com.glsx.ordercenter.mapper.HistoricalDataProcessingMapper;
import com.glsx.ordercenter.pojo.SysOrder;
import com.glsx.ordercenter.service.HistoricalDataProcessingService;
@Service
public class HistoricalDataProcessingServiceImpl implements
HistoricalDataProcessingService {
@Autowired
private HistoricalDataProcessingMapper historicalDataProcessingDao;
@Override
public void processOrderServiceItem(HistoricalOrderReq historicalOrderReq) {
// TODO Auto-generated method stub
List<SysOrder> orderList = historicalDataProcessingDao.getThirdChannelOrderList(historicalOrderReq);
}
}
<?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.HistoricalDataProcessingMapper">
<resultMap id="BaseResultMap" type="com.glsx.ordercenter.pojo.SysOrder">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="order_sn" jdbcType="VARCHAR" property="orderSn"/>
<result column="active_status" jdbcType="TINYINT" property="activeStatus"/>
<result column="canceled" jdbcType="TINYINT" property="canceled"/>
<result column="order_type" jdbcType="TINYINT" property="orderType"/>
<result column="shop_id" jdbcType="INTEGER" property="shopId"/>
<result column="district" jdbcType="INTEGER" property="district"/>
<result column="address" jdbcType="VARCHAR" property="address"/>
<result column="contact" jdbcType="VARCHAR" property="contact"/>
<result column="phone_number" jdbcType="VARCHAR" property="phoneNumber"/>
<result column="car_brand" jdbcType="INTEGER" property="carBrand"/>
<result column="car_series" jdbcType="INTEGER" property="carSeries"/>
<result column="car_type" jdbcType="VARCHAR" property="carType"/>
<result column="vin_no" jdbcType="VARCHAR" property="vinNo"/>
<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"/>
<result column="car_owner" jdbcType="VARCHAR" property="carOwner"/>
<result column="car_owner_phone" jdbcType="VARCHAR" property="carOwnerPhone"/>
<result column="cancel_time" jdbcType="TIMESTAMP" property="cancelTime"/>
<result column="active_status_array" jdbcType="VARCHAR" property="activeStatusArray"/>
<result column="merchant_id" jdbcType="INTEGER" property="merchantId"/>
<result column="mechanic_id" jdbcType="INTEGER" property="mechanicId"/>
<result column="repair_reason" jdbcType="VARCHAR" property="repairReason"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="create_by" jdbcType="INTEGER" property="createBy"/>
<result column="update_by" jdbcType="INTEGER" property="updateBy"/>
<result column="device_no" jdbcType="VARCHAR" property="deviceNo"/>
<result column="install_location" jdbcType="VARCHAR" property="installLocation"/>
<result column="overdue_reason" jdbcType="VARCHAR" property="overdueReason"/>
<result column="repair_type" jdbcType="TINYINT" property="repairType"/>
<result column="car_picture" jdbcType="VARCHAR" property="carPicture"/>
<result column="vin_no_picture" jdbcType="VARCHAR" property="vinNoPicture"/>
<result column="install_location_picture" jdbcType="VARCHAR" property="installLocationPicture"/>
<result column="complete_time" jdbcType="TIMESTAMP" property="completeTime"/>
<result column="install_remark" jdbcType="VARCHAR" property="installRemark"/>
<result column="install_device_type" jdbcType="VARCHAR" property="installDeviceType"/>
<result column="after_sale_type" jdbcType="INTEGER" property="afterSaleType"/>
<result column="reserve_install_time" jdbcType="TIMESTAMP" property="reserveInstallTime"/>
<result column="work_order_no" jdbcType="VARCHAR" property="workOrderNo"/>
<result column="channel" jdbcType="VARCHAR" property="channel"/>
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName"/>
<result column="reassign_mechanic_time" jdbcType="TIMESTAMP" property="reassignMechanicTime"/>
<result column="province" jdbcType="VARCHAR" property="province"/>
<result column="city" jdbcType="VARCHAR" property="city"/>
<result column="installDeviceTypeName" jdbcType="VARCHAR" property="installDeviceTypeName"/>
<result column="orgName" jdbcType="VARCHAR" property="rootOrgName"/>
<result column="orderChannelOrgId" jdbcType="INTEGER" property="orderChannelOrgId"/>
<result column="reserve_install_reason" jdbcType="VARCHAR" property="reserveInstallReason"/>
<result column="connect_location_picture" jdbcType="VARCHAR" property="connectLocationPicture"/>
<result column="surrounding_picture" jdbcType="VARCHAR" property="surroundingPicture"/>
<result column="is_check_in" jdbcType="INTEGER" property="isCheckIn"/>
<result column="check_in_time" jdbcType="TIMESTAMP" property="checkInTime"/>
<result column="reserve_man" jdbcType="VARCHAR" property="reserveMan"/>
<result column="reserve_man_phone" jdbcType="VARCHAR" property="reserveManPhone"/>
<result column="quote_last_time" jdbcType="TIMESTAMP" property="quoteLastTime"/>
<result column="service_code" jdbcType="VARCHAR" property="serviceCode"/>
<result column="oldVinNo" jdbcType="VARCHAR" property="oldVinNo"/>
</resultMap>
<select id="getThirdChannelOrderList" parameterType="com.glsx.ordercenter.dto.HistoricalOrderReq" resultMap="BaseResultMap">
SELECT
*
FROM
sys_order so
<where>
service_code = ''
AND so.work_order_no != ''
<if test="">
AND so.create_time &gt;= '2019-09-01 00:00:00'
</if>
<if test="">
AND so.create_time &lt;= '2019-09-30 23:59:59'
</if>
</where>
ORDER BY so.id ASC
</select>
</mapper>
\ No newline at end of file \ No newline at end of file
...@@ -255,7 +255,7 @@ public class UserController extends BaseController { ...@@ -255,7 +255,7 @@ public class UserController extends BaseController {
@RequestMapping(value = "/saveSysMerchant", method = {RequestMethod.GET, RequestMethod.POST}) @RequestMapping(value = "/saveSysMerchant", method = {RequestMethod.GET, RequestMethod.POST})
@ResponseBody @ResponseBody
public ResultObject saveSysMerchant(@Validated(value = { Default.class }) SysMerchant sysMerchant, public ResultObject saveSysMerchant(@Validated(value = { Default.class }) SysMerchant sysMerchant,
BindingResult bindingResult, MerchantReq merchantReq) { BindingResult bindingResult, @RequestBody MerchantReq merchantReq) {
logger.info("(新增, 编辑)商户传入的参数为" + sysMerchant.toString()); logger.info("(新增, 编辑)商户传入的参数为" + sysMerchant.toString());
logger.info("派单自动创建商户通过feign接口调用merchantReq===" + merchantReq.toString()); logger.info("派单自动创建商户通过feign接口调用merchantReq===" + merchantReq.toString());
if (merchantReq != null) { if (merchantReq != null) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!