提交 95ad3623 作者: panda

服务订单接口-列表条件筛选

上级 8c4318c1
...@@ -22,5 +22,5 @@ public interface ServiceOrderTaskDao extends BaseMapper<ServiceOrderTaskDO> { ...@@ -22,5 +22,5 @@ public interface ServiceOrderTaskDao extends BaseMapper<ServiceOrderTaskDO> {
Integer conditionCount(@Param("param") ServiceOrderTaskQO param, @Param("userAccountId") Integer userAccountId); Integer conditionCount(@Param("param") ServiceOrderTaskQO param, @Param("userAccountId") Integer userAccountId);
List<ServiceOrderTaskDO> queryPageByLimit(ServiceOrderTaskQO param, Integer userAccountId); List<ServiceOrderTaskDO> queryPageByLimit(@Param("param") ServiceOrderTaskQO param, @Param("userAccountId") Integer userAccountId);
} }
...@@ -31,6 +31,9 @@ public class ServiceOrderTaskDTO implements Serializable { ...@@ -31,6 +31,9 @@ public class ServiceOrderTaskDTO implements Serializable {
private static final long serialVersionUID = -178678654L; private static final long serialVersionUID = -178678654L;
@ApiModelProperty(value = "订单id")
private Integer id;
@ApiModelProperty(value = "订单编号") @ApiModelProperty(value = "订单编号")
private String orderNo; private String orderNo;
...@@ -52,6 +55,9 @@ public class ServiceOrderTaskDTO implements Serializable { ...@@ -52,6 +55,9 @@ public class ServiceOrderTaskDTO implements Serializable {
@ApiModelProperty(value = "用户名称") @ApiModelProperty(value = "用户名称")
private String userName; private String userName;
@ApiModelProperty(value = "用户id")
private Integer userId;
@ApiModelProperty(value = "服务项ID",example = "1") @ApiModelProperty(value = "服务项ID",example = "1")
@NotNull(message = "新增服务-id不能为空", groups = {Create.class}) @NotNull(message = "新增服务-id不能为空", groups = {Create.class})
private Integer inspectionId; private Integer inspectionId;
......
...@@ -30,10 +30,21 @@ public class ServiceOrderTaskQO implements Serializable { ...@@ -30,10 +30,21 @@ public class ServiceOrderTaskQO implements Serializable {
private static final long serialVersionUID = -17878654L; private static final long serialVersionUID = -17878654L;
@ApiModelProperty(value = "订单名称或编号")
private String orderNameOrNo;
@ApiModelProperty(value = "用户id")
private String userId;
@ApiModelProperty(value = "订单状态:0 待分配运营") @ApiModelProperty(value = "订单状态:0 待分配运营")
private Integer orderStatus; private Integer orderStatus;
@ApiModelProperty(value = "开始时间")
private String startTime;
@ApiModelProperty(value = "结束时间")
private String endTime;
@ApiModelProperty(value = "页码", required = true) @ApiModelProperty(value = "页码", required = true)
@NotNull( @NotNull(
message = "页码不能为空", message = "页码不能为空",
......
...@@ -151,7 +151,9 @@ public class ServiceOrderTaskServiceImpl ...@@ -151,7 +151,9 @@ public class ServiceOrderTaskServiceImpl
// 订单省市信息 // 订单省市信息
BeanCopyUtils.properties(provinceCityMap.get(item.getId()), orderTaskDTO); BeanCopyUtils.properties(provinceCityMap.get(item.getId()), orderTaskDTO);
// 用户信息 // 用户信息
BeanCopyUtils.properties(userMap.get(item.getUserAccountId()), orderTaskDTO); UserAccountSimpleDTO userAccountSimpleDTO = userMap.get(item.getUserAccountId());
BeanCopyUtils.properties(userAccountSimpleDTO, orderTaskDTO);
orderTaskDTO.setUserId(userAccountSimpleDTO.getId());
List<ServiceOrderTaskImageDO> imageDOList = imageMap.get(item.getId()); List<ServiceOrderTaskImageDO> imageDOList = imageMap.get(item.getId());
List<String> images = null; List<String> images = null;
if (CollectionUtils.isNotEmpty(imageDOList)) { if (CollectionUtils.isNotEmpty(imageDOList)) {
...@@ -161,6 +163,7 @@ public class ServiceOrderTaskServiceImpl ...@@ -161,6 +163,7 @@ public class ServiceOrderTaskServiceImpl
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
orderTaskDTO.setImages(images); orderTaskDTO.setImages(images);
orderTaskDTO.setId(item.getId());
return orderTaskDTO; return orderTaskDTO;
} }
......
...@@ -13,6 +13,18 @@ ...@@ -13,6 +13,18 @@
<if test="userAccountId != null"> <if test="userAccountId != null">
and user_account_id = #{userAccountId} and user_account_id = #{userAccountId}
</if> </if>
<if test="param.orderNameOrNo != null and param.orderNameOrNo != ''">
and (order_no like CONCAT('%',#{param.orderNameOrNo},'%')
</if>
<if test="param.orderNameOrNo != null and param.orderNameOrNo != ''">
or order_name like CONCAT('%',#{param.orderNameOrNo},'%'))
</if>
<if test="param.startTime != null">
and created_time &gt;= #{param.startTime}
</if>
<if test="param.endTime != null">
and created_time &lt;= #{param.endTime}
</if>
</where> </where>
</select> </select>
...@@ -29,6 +41,18 @@ ...@@ -29,6 +41,18 @@
<if test="userAccountId != null"> <if test="userAccountId != null">
and user_account_id = #{userAccountId} and user_account_id = #{userAccountId}
</if> </if>
<if test="param.orderNameOrNo != null and param.orderNameOrNo != ''">
and (order_no like CONCAT('%',#{param.orderNameOrNo},'%')
</if>
<if test="param.orderNameOrNo != null and param.orderNameOrNo != ''">
or order_name like CONCAT('%',#{param.orderNameOrNo},'%'))
</if>
<if test="param.startTime != null">
and created_time &gt;= #{param.startTime}
</if>
<if test="param.endTime != null">
and created_time &lt;= #{param.endTime}
</if>
</where> </where>
order by created_time desc order by created_time desc
limit #{param.pageNo}, #{param.pageSize} limit #{param.pageNo}, #{param.pageSize}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论