Commit 4be7358a52982e33a0e55e14491fab26100adb40

Authored by yeqianyong
1 parent 09ee20c5

楚江erp: 1、发货单列表增加混合搜索;2、生成要车计划、要车单逻辑调整

... ... @@ -102,9 +102,6 @@ public class CarRequestPlanServiceImpl extends BaseMpServiceImpl<CarRequestPlanM
102 102
103 103 getBaseMapper().insert(data);
104 104
105   - OpLogUtil.setVariable("id", data.getId());
106   - OpLogUtil.setExtra(vo);
107   -
108 105 return data.getId();
109 106 }
110 107
... ... @@ -161,8 +158,14 @@ public class CarRequestPlanServiceImpl extends BaseMpServiceImpl<CarRequestPlanM
161 158 , (v1, v2) -> v2));
162 159 for (PurchaseOrderInfo orderInfo : orderInfoList) {
163 160 // 生成要车计划
  161 + LocalDate requestCarDate = LocalDate.now();
164 162 CreateCarRequestPlanVo planCreateVo = new CreateCarRequestPlanVo();
165   - planCreateVo.setRequestCarDate(LocalDate.now());
  163 + if (BooleanUtils.isTrue(shipmentsOrderInfo.getOnTimeShipment())) {
  164 + requestCarDate = shipmentsOrderInfo.getShipmentsDate();
  165 + } else if (BooleanUtils.isFalse(shipmentsOrderInfo.getOnTimeShipment())) {
  166 + requestCarDate = shipmentsOrderInfo.getNewShipmentDate();
  167 + }
  168 + planCreateVo.setRequestCarDate(requestCarDate);
166 169 planCreateVo.setWorkshopId(orderInfo.getWorkshopId());
167 170 String requestCarPlanId = create(planCreateVo);
168 171 // 生成要车单
... ... @@ -174,7 +177,7 @@ public class CarRequestPlanServiceImpl extends BaseMpServiceImpl<CarRequestPlanM
174 177 ticketVo.setDraftId(draftTicket.getId());
175 178 ticketVo.setPlanId(requestCarPlanId);
176 179 ticketVo.setPurchaseOrderId(orderInfo.getId());
177   - ticketVo.setRequestCarDate(LocalDate.now());
  180 + ticketVo.setRequestCarDate(requestCarDate);
178 181 ticketVo.setDeptId(orderInfo.getDeptId());
179 182 if (BooleanUtils.isFalse(shipmentsOrderInfo.getOnTimeShipment())) {
180 183 ticketVo.setDeliveryDate(shipmentsOrderInfo.getNewShipmentDate());
... ...
... ... @@ -59,4 +59,11 @@ public class QueryShipmentsOrderInfoVo extends PageVo implements BaseVo, Seriali
59 59 @ApiModelProperty("状态")
60 60 private String status;
61 61
  62 + /**
  63 + * 搜索关键字
  64 + * 移动端使用
  65 + * 根据发货单编号和订货单位模糊搜索
  66 + */
  67 + @ApiModelProperty("搜索关键字")
  68 + private String searchKey;
62 69 }
... ...
... ... @@ -73,10 +73,16 @@
73 73 AND tb.status = #{vo.status}
74 74 </if>
75 75 <if test="vo.customerName != null and vo.customerName != ''">
76   - AND c.name like concat('%', #{vo.customerName}, '%')
  76 + AND c.name LIKE CONCAT('%', #{vo.customerName}, '%')
77 77 </if>
78 78 <if test="vo.code != null and vo.code != ''">
79   - AND tb.code like concat('%', #{vo.code}, '%')
  79 + AND tb.code LIKE CONCAT('%', #{vo.code}, '%')
  80 + </if>
  81 + <if test="vo.searchKey != null and vo.searchKey != ''">
  82 + AND (
  83 + tb.code LIKE CONCAT('%', #{vo.searchKey}, '%')
  84 + OR c.name LIKE CONCAT('%', #{vo.searchKey}, '%')
  85 + )
80 86 </if>
81 87 </where>
82 88 ORDER BY tb.create_time DESC
... ...