Commit ecbd603f6e46c41dd2f2099d1f69fe6bc54dee88

Authored by yeqianyong
2 parents b2eb37ee c9bb4249

Merge remote-tracking branch 'origin/master_0929' into master_0929

@@ -39,6 +39,12 @@ public class GetRequestCarTicketBo extends BaseBo<RequestCarTicket> { @@ -39,6 +39,12 @@ public class GetRequestCarTicketBo extends BaseBo<RequestCarTicket> {
39 private String deptId; 39 private String deptId;
40 40
41 /** 41 /**
  42 + * 要车办事处名称
  43 + */
  44 + @ApiModelProperty("要车办事处名称")
  45 + private String deptName;
  46 +
  47 + /**
42 * 计划装货日期 48 * 计划装货日期
43 */ 49 */
44 @ApiModelProperty("计划装货日期") 50 @ApiModelProperty("计划装货日期")
@@ -52,6 +58,12 @@ public class GetRequestCarTicketBo extends BaseBo<RequestCarTicket> { @@ -52,6 +58,12 @@ public class GetRequestCarTicketBo extends BaseBo<RequestCarTicket> {
52 private String workshopId; 58 private String workshopId;
53 59
54 /** 60 /**
  61 + * 装货厂别名称
  62 + */
  63 + @ApiModelProperty("装货厂别名称")
  64 + private String workshopName;
  65 +
  66 + /**
55 * 订单编号 67 * 订单编号
56 */ 68 */
57 @ApiModelProperty("订单编号") 69 @ApiModelProperty("订单编号")
@@ -106,6 +118,12 @@ public class GetRequestCarTicketBo extends BaseBo<RequestCarTicket> { @@ -106,6 +118,12 @@ public class GetRequestCarTicketBo extends BaseBo<RequestCarTicket> {
106 private String externalAuditor; 118 private String externalAuditor;
107 119
108 /** 120 /**
  121 + * 外办审核人名称
  122 + */
  123 + @ApiModelProperty("外办审核人名称")
  124 + private String externalAuditorName;
  125 +
  126 + /**
109 * 装货时间 127 * 装货时间
110 */ 128 */
111 @ApiModelProperty("装货时间") 129 @ApiModelProperty("装货时间")
@@ -124,11 +142,29 @@ public class GetRequestCarTicketBo extends BaseBo<RequestCarTicket> { @@ -124,11 +142,29 @@ public class GetRequestCarTicketBo extends BaseBo<RequestCarTicket> {
124 private String businessOfficeAuditor; 142 private String businessOfficeAuditor;
125 143
126 /** 144 /**
  145 + * 经营办审核人名称
  146 + */
  147 + @ApiModelProperty("经营办审核人名称")
  148 + private String businessOfficeAuditorName;
  149 +
  150 + /**
127 * 运作科审核人 151 * 运作科审核人
128 */ 152 */
129 @ApiModelProperty("运作科审核人") 153 @ApiModelProperty("运作科审核人")
130 private String operationsDepartmentAuditor; 154 private String operationsDepartmentAuditor;
131 155
  156 + /**
  157 + * 运作科审核人名称
  158 + */
  159 + @ApiModelProperty("运作科审核人名称")
  160 + private String operationsDepartmentAuditorName;
  161 +
  162 + /**
  163 + * 审核状态
  164 + */
  165 + @ApiModelProperty("审核状态")
  166 + private String status;
  167 +
132 public GetRequestCarTicketBo() { 168 public GetRequestCarTicketBo() {
133 169
134 } 170 }
@@ -85,7 +85,7 @@ public class RequestCarTicketController extends DefaultBaseController { @@ -85,7 +85,7 @@ public class RequestCarTicketController extends DefaultBaseController {
85 @ApiOperation("新增") 85 @ApiOperation("新增")
86 @HasPermission({"requestCarTicket:requestcarticket:add"}) 86 @HasPermission({"requestCarTicket:requestcarticket:add"})
87 @PostMapping 87 @PostMapping
88 - public InvokeResult<Void> create(@Valid CreateRequestCarTicketVo vo) { 88 + public InvokeResult<Void> create(@Valid @RequestBody CreateRequestCarTicketVo vo) {
89 89
90 requestCarTicketService.create(vo); 90 requestCarTicketService.create(vo);
91 91
@@ -98,7 +98,7 @@ public class RequestCarTicketController extends DefaultBaseController { @@ -98,7 +98,7 @@ public class RequestCarTicketController extends DefaultBaseController {
98 @ApiOperation("修改") 98 @ApiOperation("修改")
99 @HasPermission({"requestCarTicket:requestcarticket:modify"}) 99 @HasPermission({"requestCarTicket:requestcarticket:modify"})
100 @PutMapping 100 @PutMapping
101 - public InvokeResult<Void> update(@Valid UpdateRequestCarTicketVo vo) { 101 + public InvokeResult<Void> update(@Valid @RequestBody UpdateRequestCarTicketVo vo) {
102 102
103 requestCarTicketService.update(vo); 103 requestCarTicketService.update(vo);
104 104
@@ -106,6 +106,19 @@ public class RequestCarTicketController extends DefaultBaseController { @@ -106,6 +106,19 @@ public class RequestCarTicketController extends DefaultBaseController {
106 } 106 }
107 107
108 /** 108 /**
  109 + * 取消
  110 + */
  111 + @ApiOperation("取消")
  112 + @HasPermission({"purchaseOrderRevoke:purchaseorderrevoke:cancel"})
  113 + @GetMapping("/cancel")
  114 + public InvokeResult<Void> cancel(@NotBlank(message = "id不能为空!") String id) {
  115 +
  116 + requestCarTicketService.updateStatus(id, "CANCEL");
  117 +
  118 + return InvokeResultBuilder.success();
  119 + }
  120 +
  121 + /**
109 * 根据ID删除 122 * 根据ID删除
110 */ 123 */
111 @ApiOperation("根据ID删除") 124 @ApiOperation("根据ID删除")
@@ -40,6 +40,12 @@ public class RequestCarTicket extends BaseEntity implements BaseDto { @@ -40,6 +40,12 @@ public class RequestCarTicket extends BaseEntity implements BaseDto {
40 private String deptId; 40 private String deptId;
41 41
42 /** 42 /**
  43 + * 要车办事处名称(非持久化字段)
  44 + */
  45 + @TableField(exist = false)
  46 + private String deptName;
  47 +
  48 + /**
43 * 计划装货日期 49 * 计划装货日期
44 */ 50 */
45 private LocalDate deliveryDate; 51 private LocalDate deliveryDate;
@@ -50,6 +56,12 @@ public class RequestCarTicket extends BaseEntity implements BaseDto { @@ -50,6 +56,12 @@ public class RequestCarTicket extends BaseEntity implements BaseDto {
50 private String workshopId; 56 private String workshopId;
51 57
52 /** 58 /**
  59 + * 装货厂别名称(非持久化字段)
  60 + */
  61 + @TableField(exist = false)
  62 + private String workshopName;
  63 +
  64 + /**
53 * 订单编号 65 * 订单编号
54 */ 66 */
55 private String orderNo; 67 private String orderNo;
@@ -95,6 +107,12 @@ public class RequestCarTicket extends BaseEntity implements BaseDto { @@ -95,6 +107,12 @@ public class RequestCarTicket extends BaseEntity implements BaseDto {
95 private String externalAuditor; 107 private String externalAuditor;
96 108
97 /** 109 /**
  110 + * 外办审核人名称(非持久化字段)
  111 + */
  112 + @TableField(exist = false)
  113 + private String externalAuditorName;
  114 +
  115 + /**
98 * 装货时间 116 * 装货时间
99 */ 117 */
100 private String loadingTime; 118 private String loadingTime;
@@ -110,11 +128,28 @@ public class RequestCarTicket extends BaseEntity implements BaseDto { @@ -110,11 +128,28 @@ public class RequestCarTicket extends BaseEntity implements BaseDto {
110 private String businessOfficeAuditor; 128 private String businessOfficeAuditor;
111 129
112 /** 130 /**
  131 + * 经营办审核人名称(非持久化字段)
  132 + */
  133 + @TableField(exist = false)
  134 + private String businessOfficeAuditorName;
  135 +
  136 + /**
113 * 运作科审核人 137 * 运作科审核人
114 */ 138 */
115 private String operationsDepartmentAuditor; 139 private String operationsDepartmentAuditor;
116 140
117 /** 141 /**
  142 + * 运作科审核人名称(非持久化字段)
  143 + */
  144 + @TableField(exist = false)
  145 + private String operationsDepartmentAuditorName;
  146 +
  147 + /**
  148 + * 审核状态
  149 + */
  150 + private String status;
  151 +
  152 + /**
118 * 创建人ID 153 * 创建人ID
119 */ 154 */
120 @TableField(fill = FieldFill.INSERT) 155 @TableField(fill = FieldFill.INSERT)
@@ -22,6 +22,7 @@ import com.lframework.xingyun.sc.service.shipments.car.RequestCarTicketService; @@ -22,6 +22,7 @@ import com.lframework.xingyun.sc.service.shipments.car.RequestCarTicketService;
22 import com.lframework.xingyun.sc.vo.shipments.car.CreateRequestCarTicketVo; 22 import com.lframework.xingyun.sc.vo.shipments.car.CreateRequestCarTicketVo;
23 import com.lframework.xingyun.sc.vo.shipments.car.QueryRequestCarTicketVo; 23 import com.lframework.xingyun.sc.vo.shipments.car.QueryRequestCarTicketVo;
24 import com.lframework.xingyun.sc.vo.shipments.car.UpdateRequestCarTicketVo; 24 import com.lframework.xingyun.sc.vo.shipments.car.UpdateRequestCarTicketVo;
  25 +import org.apache.commons.lang3.StringUtils;
25 import org.springframework.transaction.annotation.Transactional; 26 import org.springframework.transaction.annotation.Transactional;
26 import org.springframework.stereotype.Service; 27 import org.springframework.stereotype.Service;
27 28
@@ -51,7 +52,7 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic @@ -51,7 +52,7 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic
51 @Override 52 @Override
52 public RequestCarTicket findById(String id) { 53 public RequestCarTicket findById(String id) {
53 54
54 - return getBaseMapper().selectById(id); 55 + return getBaseMapper().findById(id);
55 } 56 }
56 57
57 @OpLog(type = OtherOpLogType.class, name = "新增要车单表,ID:{}", params = {"#id"}) 58 @OpLog(type = OtherOpLogType.class, name = "新增要车单表,ID:{}", params = {"#id"})
@@ -112,6 +113,9 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic @@ -112,6 +113,9 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic
112 if (!StringUtil.isBlank(vo.getOperationsDepartmentAuditor())) { 113 if (!StringUtil.isBlank(vo.getOperationsDepartmentAuditor())) {
113 data.setOperationsDepartmentAuditor(vo.getOperationsDepartmentAuditor()); 114 data.setOperationsDepartmentAuditor(vo.getOperationsDepartmentAuditor());
114 } 115 }
  116 + if (!StringUtil.isBlank(vo.getStatus())) {
  117 + data.setStatus(vo.getStatus());
  118 + }
115 119
116 getBaseMapper().insert(data); 120 getBaseMapper().insert(data);
117 121
@@ -149,6 +153,7 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic @@ -149,6 +153,7 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic
149 .set(RequestCarTicket::getSpecialLoadingRequirement, StringUtil.isBlank(vo.getSpecialLoadingRequirement()) ? null : vo.getSpecialLoadingRequirement()) 153 .set(RequestCarTicket::getSpecialLoadingRequirement, StringUtil.isBlank(vo.getSpecialLoadingRequirement()) ? null : vo.getSpecialLoadingRequirement())
150 .set(RequestCarTicket::getBusinessOfficeAuditor, StringUtil.isBlank(vo.getBusinessOfficeAuditor()) ? null : vo.getBusinessOfficeAuditor()) 154 .set(RequestCarTicket::getBusinessOfficeAuditor, StringUtil.isBlank(vo.getBusinessOfficeAuditor()) ? null : vo.getBusinessOfficeAuditor())
151 .set(RequestCarTicket::getOperationsDepartmentAuditor, StringUtil.isBlank(vo.getOperationsDepartmentAuditor()) ? null : vo.getOperationsDepartmentAuditor()) 155 .set(RequestCarTicket::getOperationsDepartmentAuditor, StringUtil.isBlank(vo.getOperationsDepartmentAuditor()) ? null : vo.getOperationsDepartmentAuditor())
  156 + .set(RequestCarTicket::getStatus, StringUtil.isBlank(vo.getStatus()) ? null : vo.getStatus())
152 .eq(RequestCarTicket::getId, vo.getId()); 157 .eq(RequestCarTicket::getId, vo.getId());
153 158
154 getBaseMapper().update(updateWrapper); 159 getBaseMapper().update(updateWrapper);
@@ -157,6 +162,27 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic @@ -157,6 +162,27 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic
157 OpLogUtil.setExtra(vo); 162 OpLogUtil.setExtra(vo);
158 } 163 }
159 164
  165 + @OpLog(type = OtherOpLogType.class, name = "修改草稿要车单状态,ID:{}", params = {"#id"})
  166 + @Transactional(rollbackFor = Exception.class)
  167 + @Override
  168 + public void updateStatus(String id, String status) {
  169 + if (StringUtils.isBlank(id) || StringUtils.isBlank(status)) {
  170 + return;
  171 + }
  172 + RequestCarTicket data = getBaseMapper().findById(id);
  173 + if (ObjectUtil.isNull(data)) {
  174 + throw new DefaultClientException("草稿要车单不存在!");
  175 + }
  176 + LambdaUpdateWrapper<RequestCarTicket> updateWrapper = Wrappers.lambdaUpdate(RequestCarTicket.class)
  177 + .set(RequestCarTicket::getStatus, status)
  178 + .eq(RequestCarTicket::getId, id);
  179 +
  180 + getBaseMapper().update(updateWrapper);
  181 +
  182 + OpLogUtil.setVariable("id", data.getId());
  183 + OpLogUtil.setExtra(id);
  184 + }
  185 +
160 @OpLog(type = OtherOpLogType.class, name = "删除要车单表,ID:{}", params = {"#id"}) 186 @OpLog(type = OtherOpLogType.class, name = "删除要车单表,ID:{}", params = {"#id"})
161 @Transactional(rollbackFor = Exception.class) 187 @Transactional(rollbackFor = Exception.class)
162 @Override 188 @Override
@@ -21,4 +21,13 @@ public interface RequestCarTicketMapper extends BaseMapper<RequestCarTicket> { @@ -21,4 +21,13 @@ public interface RequestCarTicketMapper extends BaseMapper<RequestCarTicket> {
21 * @return 21 * @return
22 */ 22 */
23 List<RequestCarTicket> query(@Param("vo") QueryRequestCarTicketVo vo); 23 List<RequestCarTicket> query(@Param("vo") QueryRequestCarTicketVo vo);
  24 +
  25 +
  26 + /**
  27 + * 草稿要车单
  28 + *
  29 + * @param id 主键
  30 + * @return RequestCarTicket
  31 + */
  32 + RequestCarTicket findById(@Param("id") String id);
24 } 33 }
@@ -47,6 +47,14 @@ public interface RequestCarTicketService extends BaseMpService<RequestCarTicket> @@ -47,6 +47,14 @@ public interface RequestCarTicketService extends BaseMpService<RequestCarTicket>
47 void update(UpdateRequestCarTicketVo vo); 47 void update(UpdateRequestCarTicketVo vo);
48 48
49 /** 49 /**
  50 + * 修改状态
  51 + *
  52 + * @param id 主键
  53 + * @param status 状态
  54 + */
  55 + void updateStatus(String id, String status);
  56 +
  57 + /**
50 * 根据ID删除 58 * 根据ID删除
51 * @param id 59 * @param id
52 * @return 60 * @return
@@ -135,4 +135,10 @@ public class CreateRequestCarTicketVo implements BaseVo, Serializable { @@ -135,4 +135,10 @@ public class CreateRequestCarTicketVo implements BaseVo, Serializable {
135 @Length(message = "运作科审核人最多允许50个字符!") 135 @Length(message = "运作科审核人最多允许50个字符!")
136 private String operationsDepartmentAuditor; 136 private String operationsDepartmentAuditor;
137 137
  138 + /**
  139 + * 审核状态
  140 + */
  141 + @ApiModelProperty("审核状态")
  142 + private String status;
  143 +
138 } 144 }
@@ -2,9 +2,7 @@ package com.lframework.xingyun.sc.vo.shipments.car; @@ -2,9 +2,7 @@ package com.lframework.xingyun.sc.vo.shipments.car;
2 2
3 import lombok.Data; 3 import lombok.Data;
4 import com.lframework.starter.web.core.vo.PageVo; 4 import com.lframework.starter.web.core.vo.PageVo;
5 -import java.time.LocalDate;  
6 import com.lframework.starter.web.core.vo.BaseVo; 5 import com.lframework.starter.web.core.vo.BaseVo;
7 -import com.lframework.starter.web.core.components.validation.TypeMismatch;  
8 import io.swagger.annotations.ApiModelProperty; 6 import io.swagger.annotations.ApiModelProperty;
9 import java.io.Serializable; 7 import java.io.Serializable;
10 8
@@ -14,11 +12,22 @@ public class QueryRequestCarTicketVo extends PageVo implements BaseVo, Serializa @@ -14,11 +12,22 @@ public class QueryRequestCarTicketVo extends PageVo implements BaseVo, Serializa
14 private static final long serialVersionUID = 1L; 12 private static final long serialVersionUID = 1L;
15 13
16 /** 14 /**
17 - * 要车日期 15 + * 要车办事处名称
18 */ 16 */
19 - @ApiModelProperty("要车日期")  
20 - @TypeMismatch(message = "要车日期格式有误!")  
21 - private LocalDate requestCarData; 17 + @ApiModelProperty("要车办事处名称")
  18 + private String deptName;
  19 +
  20 + /**
  21 + * 要车日期开始
  22 + */
  23 + @ApiModelProperty("要车日期开始")
  24 + private String requestCarDataStart;
  25 +
  26 + /**
  27 + * 要车日期结束
  28 + */
  29 + @ApiModelProperty("要车日期结束")
  30 + private String requestCarDataEnd;
22 31
23 /** 32 /**
24 * 装货厂别 33 * 装货厂别
@@ -38,4 +47,11 @@ public class QueryRequestCarTicketVo extends PageVo implements BaseVo, Serializa @@ -38,4 +47,11 @@ public class QueryRequestCarTicketVo extends PageVo implements BaseVo, Serializa
38 @ApiModelProperty("客户名称【简称】") 47 @ApiModelProperty("客户名称【简称】")
39 private String customerShortName; 48 private String customerShortName;
40 49
  50 +
  51 + /**
  52 + * 状态
  53 + */
  54 + @ApiModelProperty("状态")
  55 + private String status;
  56 +
41 } 57 }
@@ -143,4 +143,10 @@ public class UpdateRequestCarTicketVo implements BaseVo, Serializable { @@ -143,4 +143,10 @@ public class UpdateRequestCarTicketVo implements BaseVo, Serializable {
143 @Length(message = "运作科审核人最多允许50个字符!") 143 @Length(message = "运作科审核人最多允许50个字符!")
144 private String operationsDepartmentAuditor; 144 private String operationsDepartmentAuditor;
145 145
  146 + /**
  147 + * 审核状态
  148 + */
  149 + @ApiModelProperty("审核状态")
  150 + private String status;
  151 +
146 } 152 }
@@ -6,8 +6,10 @@ @@ -6,8 +6,10 @@
6 <id column="id" property="id"/> 6 <id column="id" property="id"/>
7 <result column="request_car_data" property="requestCarData"/> 7 <result column="request_car_data" property="requestCarData"/>
8 <result column="dept_id" property="deptId"/> 8 <result column="dept_id" property="deptId"/>
  9 + <result column="dept_name" property="deptName"/>
9 <result column="delivery_date" property="deliveryDate"/> 10 <result column="delivery_date" property="deliveryDate"/>
10 <result column="workshop_id" property="workshopId"/> 11 <result column="workshop_id" property="workshopId"/>
  12 + <result column="workshop_name" property="workshopName"/>
11 <result column="order_no" property="orderNo"/> 13 <result column="order_no" property="orderNo"/>
12 <result column="customer_short_name" property="customerShortName"/> 14 <result column="customer_short_name" property="customerShortName"/>
13 <result column="destination" property="destination"/> 15 <result column="destination" property="destination"/>
@@ -17,10 +19,14 @@ @@ -17,10 +19,14 @@
17 <result column="return_plan_arrangement" property="returnPlanArrangement"/> 19 <result column="return_plan_arrangement" property="returnPlanArrangement"/>
18 <result column="other" property="other"/> 20 <result column="other" property="other"/>
19 <result column="external_auditor" property="externalAuditor"/> 21 <result column="external_auditor" property="externalAuditor"/>
  22 + <result column="external_auditor_name" property="externalAuditorName"/>
20 <result column="loading_time" property="loadingTime"/> 23 <result column="loading_time" property="loadingTime"/>
21 <result column="special_loading_requirement" property="specialLoadingRequirement"/> 24 <result column="special_loading_requirement" property="specialLoadingRequirement"/>
22 <result column="business_office_auditor" property="businessOfficeAuditor"/> 25 <result column="business_office_auditor" property="businessOfficeAuditor"/>
  26 + <result column="business_office_auditor_name" property="businessOfficeAuditorName"/>
23 <result column="operations_department_auditor" property="operationsDepartmentAuditor"/> 27 <result column="operations_department_auditor" property="operationsDepartmentAuditor"/>
  28 + <result column="operations_department_auditor_name" property="operationsDepartmentAuditorName"/>
  29 + <result column="status" property="status"/>
24 <result column="create_by_id" property="createById"/> 30 <result column="create_by_id" property="createById"/>
25 <result column="create_by" property="createBy"/> 31 <result column="create_by" property="createBy"/>
26 <result column="update_by_id" property="updateById"/> 32 <result column="update_by_id" property="updateById"/>
@@ -34,8 +40,10 @@ @@ -34,8 +40,10 @@
34 tb.id, 40 tb.id,
35 tb.request_car_data, 41 tb.request_car_data,
36 tb.dept_id, 42 tb.dept_id,
  43 + sd.name AS dept_name,
37 tb.delivery_date, 44 tb.delivery_date,
38 tb.workshop_id, 45 tb.workshop_id,
  46 + ws.name AS workshop_name,
39 tb.order_no, 47 tb.order_no,
40 tb.customer_short_name, 48 tb.customer_short_name,
41 tb.destination, 49 tb.destination,
@@ -45,10 +53,14 @@ @@ -45,10 +53,14 @@
45 tb.return_plan_arrangement, 53 tb.return_plan_arrangement,
46 tb.other, 54 tb.other,
47 tb.external_auditor, 55 tb.external_auditor,
  56 + su.name AS external_auditor_name,
48 tb.loading_time, 57 tb.loading_time,
49 tb.special_loading_requirement, 58 tb.special_loading_requirement,
50 tb.business_office_auditor, 59 tb.business_office_auditor,
  60 + su1.name AS business_office_auditor_name,
51 tb.operations_department_auditor, 61 tb.operations_department_auditor,
  62 + su2.name AS operations_department_auditor_name,
  63 + tb.status,
52 tb.create_by_id, 64 tb.create_by_id,
53 tb.create_by, 65 tb.create_by,
54 tb.update_by_id, 66 tb.update_by_id,
@@ -56,24 +68,49 @@ @@ -56,24 +68,49 @@
56 tb.create_time, 68 tb.create_time,
57 tb.update_time 69 tb.update_time
58 FROM request_car_ticket AS tb 70 FROM request_car_ticket AS tb
  71 + left join sys_dept as sd on sd.id = tb.dept_id
  72 + left join base_data_workshop as ws on ws.id = tb.workshop_id
  73 + left join sys_user as su on su.id = tb.external_auditor
  74 + left join sys_user as su1 on su1.id = tb.business_office_auditor
  75 + left join sys_user as su2 on su2.id = tb.operations_department_auditor
59 </sql> 76 </sql>
60 77
61 <select id="query" resultMap="RequestCarTicket"> 78 <select id="query" resultMap="RequestCarTicket">
62 <include refid="RequestCarTicket_sql"/> 79 <include refid="RequestCarTicket_sql"/>
63 <where> 80 <where>
64 - <if test="vo.requestCarData != null">  
65 - AND tb.request_car_data = #{vo.requestCarData} 81 + <if test="vo.requestCarDataStart != null">
  82 + AND tb.request_car_data >= #{vo.requestCarDataStart}
  83 + </if>
  84 + <if test="vo.requestCarDataEnd != null">
  85 + <![CDATA[
  86 + AND tb.request_car_data <= #{vo.requestCarDataEnd}
  87 + ]]>
66 </if> 88 </if>
67 <if test="vo.workshopId != null and vo.workshopId != ''"> 89 <if test="vo.workshopId != null and vo.workshopId != ''">
68 AND tb.workshop_id = #{vo.workshopId} 90 AND tb.workshop_id = #{vo.workshopId}
69 </if> 91 </if>
70 <if test="vo.orderNo != null and vo.orderNo != ''"> 92 <if test="vo.orderNo != null and vo.orderNo != ''">
71 - AND tb.order_no = #{vo.orderNo} 93 + AND tb.order_no LIKE CONCAT('%', #{vo.orderNo},'%')
72 </if> 94 </if>
73 <if test="vo.customerShortName != null and vo.customerShortName != ''"> 95 <if test="vo.customerShortName != null and vo.customerShortName != ''">
74 - AND tb.customer_short_name LIKE CONCAT('%', #{vo.customerShortName}) 96 + AND tb.customer_short_name LIKE CONCAT('%', #{vo.customerShortName},'%')
  97 + </if>
  98 + <if test="vo.deptName != null and vo.deptName != ''">
  99 + AND sd.name LIKE CONCAT('%', #{vo.deptName},'%')
  100 + </if>
  101 + <if test="vo.status != null and vo.status != ''">
  102 + AND tb.status = #{vo.status}
75 </if> 103 </if>
76 </where> 104 </where>
77 ORDER BY tb.update_time DESC 105 ORDER BY tb.update_time DESC
78 </select> 106 </select>
  107 +
  108 + <select id="findById" resultType="com.lframework.xingyun.sc.entity.RequestCarTicket">
  109 + <include refid="RequestCarTicket_sql"/>
  110 + <where>
  111 + <if test="id != null and id != ''">
  112 + AND tb.id = #{id}
  113 + </if>
  114 + </where>
  115 + </select>
79 </mapper> 116 </mapper>