Commit 3b097fed by wubh

包活干V2.0.0-修改:子车务单没有服务项目的问题

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@28389 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 58b3c9db
...@@ -19,6 +19,14 @@ public class SysSubOrder implements Serializable { ...@@ -19,6 +19,14 @@ public class SysSubOrder implements Serializable {
*/ */
private Byte userType; private Byte userType;
/** /**
* 服务项目类型
*/
private String serviceCode;
/**
* 服务项目名
*/
private String serviceName;
/**
* 子车务单文件 * 子车务单文件
*/ */
private List<SysOrderFile> orderFileList; private List<SysOrderFile> orderFileList;
...@@ -103,6 +111,22 @@ public class SysSubOrder implements Serializable { ...@@ -103,6 +111,22 @@ public class SysSubOrder implements Serializable {
this.userType = userType; this.userType = userType;
} }
public String getServiceCode() {
return serviceCode;
}
public void setServiceCode(String serviceCode) {
this.serviceCode = serviceCode;
}
public String getServiceName() {
return serviceName;
}
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
public List<SysOrderFile> getOrderFileList() { public List<SysOrderFile> getOrderFileList() {
return orderFileList; return orderFileList;
} }
...@@ -212,6 +236,8 @@ public class SysSubOrder implements Serializable { ...@@ -212,6 +236,8 @@ public class SysSubOrder implements Serializable {
return "SysSubOrder{" + return "SysSubOrder{" +
"userId=" + userId + "userId=" + userId +
", userType=" + userType + ", userType=" + userType +
", serviceCode='" + serviceCode + '\'' +
", serviceName='" + serviceName + '\'' +
", orderFileList=" + orderFileList + ", orderFileList=" + orderFileList +
", id=" + id + ", id=" + id +
", orderId=" + orderId + ", orderId=" + orderId +
......
...@@ -115,7 +115,7 @@ public class DeliveryServiceImpl extends BaseOrderService implements DeliverySer ...@@ -115,7 +115,7 @@ public class DeliveryServiceImpl extends BaseOrderService implements DeliverySer
if (Boolean.TRUE.equals(req.getNeedDetail())) { if (Boolean.TRUE.equals(req.getNeedDetail())) {
// 需要详细信息 // 需要详细信息
for (SysDelivery delivery : deliveryList) { for (SysDelivery delivery : deliveryList) {
this.wrapUserType(delivery); this.wrapDeliveryUserType(delivery);
this.wrapDeliveryType(req, delivery); this.wrapDeliveryType(req, delivery);
} }
} }
...@@ -139,7 +139,7 @@ public class DeliveryServiceImpl extends BaseOrderService implements DeliverySer ...@@ -139,7 +139,7 @@ public class DeliveryServiceImpl extends BaseOrderService implements DeliverySer
ResultCodeEnum.DELIVERY_NOT_EXIST.getMsg()); ResultCodeEnum.DELIVERY_NOT_EXIST.getMsg());
} }
this.wrapUserType(delivery); this.wrapDeliveryUserType(delivery);
this.wrapDeliveryType(req, delivery); this.wrapDeliveryType(req, delivery);
this.wrapDeliveryDistrict(delivery); this.wrapDeliveryDistrict(delivery);
this.wrapDeliveryFile(delivery); this.wrapDeliveryFile(delivery);
...@@ -373,7 +373,7 @@ public class DeliveryServiceImpl extends BaseOrderService implements DeliverySer ...@@ -373,7 +373,7 @@ public class DeliveryServiceImpl extends BaseOrderService implements DeliverySer
* @param delivery 快递单 * @param delivery 快递单
* @return 结果 * @return 结果
*/ */
private SysDelivery wrapUserType(SysDelivery delivery) { private SysDelivery wrapDeliveryUserType(SysDelivery delivery) {
Integer senderId = delivery.getSenderId(); Integer senderId = delivery.getSenderId();
JSONObject senderInfo = UserUtils.getUserInfo(senderId); JSONObject senderInfo = UserUtils.getUserInfo(senderId);
Byte senderType = senderInfo.getByte("userType"); Byte senderType = senderInfo.getByte("userType");
......
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="create_by" jdbcType="INTEGER" property="createBy"/> <result column="create_by" jdbcType="INTEGER" property="createBy"/>
<result column="update_by" jdbcType="INTEGER" property="updateBy"/> <result column="update_by" jdbcType="INTEGER" property="updateBy"/>
<result column="serviceCode" jdbcType="VARCHAR" property="serviceCode"/>
<result column="serviceName" jdbcType="VARCHAR" property="serviceName"/>
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
...@@ -88,39 +91,54 @@ ...@@ -88,39 +91,54 @@
<select id="selectList" parameterType="com.glsx.ordercenter.dto.req.SubOrderQueryReq" <select id="selectList" parameterType="com.glsx.ordercenter.dto.req.SubOrderQueryReq"
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select <include refid="Base_Column_List"/> select so.id, so.order_id, so.vehicle_no, so.vin_no, so.car_owner, so.car_owner_phone,
from sys_sub_order so.status, so.remark, so.create_time, so.update_time, so.create_by, so.update_by,
<!-- 服务项目 -->
si.service_code serviceCode, si.service_name serviceName
from sys_sub_order so
left join sys_order o on o.id = so.order_id
left join sys_service_item si on si.service_code = o.service_code
<where> <where>
<if test="orderId != null"> <if test="orderId != null">
and order_id = #{orderId,jdbcType=INTEGER} and so.order_id = #{orderId,jdbcType=INTEGER}
</if> </if>
<if test="status != null"> <if test="status != null">
and status = #{status,jdbcType=TINYINT} and so.status = #{status,jdbcType=TINYINT}
</if> </if>
</where> </where>
order by create_time desc order by so.create_time desc
</select> </select>
<select id="selectOne" parameterType="com.glsx.ordercenter.dto.req.SubOrderQueryReq" <select id="selectOne" parameterType="com.glsx.ordercenter.dto.req.SubOrderQueryReq"
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select <include refid="Base_Column_List"/> select so.id, so.order_id, so.vehicle_no, so.vin_no, so.car_owner, so.car_owner_phone,
from sys_sub_order so.status, so.remark, so.create_time, so.update_time, so.create_by, so.update_by,
<!-- 服务项目 -->
si.service_code serviceCode, si.service_name serviceName
from sys_sub_order so
left join sys_order o on o.id = so.order_id
left join sys_service_item si on si.service_code = o.service_code
<where> <where>
id = #{id,jdbcType=INTEGER} so.id = #{id,jdbcType=INTEGER}
<if test="orderId != null"> <if test="orderId != null">
and order_id = #{orderId,jdbcType=INTEGER} and so.order_id = #{orderId,jdbcType=INTEGER}
</if> </if>
<if test="status != null"> <if test="status != null">
and status = #{status,jdbcType=TINYINT} and so.status = #{status,jdbcType=TINYINT}
</if> </if>
</where> </where>
</select> </select>
<select id="selectByOrderId" parameterType="integer" resultMap="BaseResultMap"> <select id="selectByOrderId" parameterType="integer" resultMap="BaseResultMap">
select <include refid="Base_Column_List"/> select so.id, so.order_id, so.vehicle_no, so.vin_no, so.car_owner, so.car_owner_phone,
from sys_sub_order so.status, so.remark, so.create_time, so.update_time, so.create_by, so.update_by,
where order_id = #{orderId,jdbcType=INTEGER} <!-- 服务项目 -->
order by create_time desc si.service_code serviceCode, si.service_name serviceName
from sys_sub_order so
left join sys_order o on o.id = so.order_id
left join sys_service_item si on si.service_code = o.service_code
where so.order_id = #{orderId,jdbcType=INTEGER}
order by so.create_time desc
</select> </select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!