Commit 4be7358a52982e33a0e55e14491fab26100adb40
1 parent
09ee20c5
楚江erp: 1、发货单列表增加混合搜索;2、生成要车计划、要车单逻辑调整
Showing
3 changed files
with
23 additions
and
7 deletions
xingyun-sc/src/main/java/com/lframework/xingyun/sc/impl/shipments/car/CarRequestPlanServiceImpl.java
| @@ -102,9 +102,6 @@ public class CarRequestPlanServiceImpl extends BaseMpServiceImpl<CarRequestPlanM | @@ -102,9 +102,6 @@ public class CarRequestPlanServiceImpl extends BaseMpServiceImpl<CarRequestPlanM | ||
| 102 | 102 | ||
| 103 | getBaseMapper().insert(data); | 103 | getBaseMapper().insert(data); |
| 104 | 104 | ||
| 105 | - OpLogUtil.setVariable("id", data.getId()); | ||
| 106 | - OpLogUtil.setExtra(vo); | ||
| 107 | - | ||
| 108 | return data.getId(); | 105 | return data.getId(); |
| 109 | } | 106 | } |
| 110 | 107 | ||
| @@ -161,8 +158,14 @@ public class CarRequestPlanServiceImpl extends BaseMpServiceImpl<CarRequestPlanM | @@ -161,8 +158,14 @@ public class CarRequestPlanServiceImpl extends BaseMpServiceImpl<CarRequestPlanM | ||
| 161 | , (v1, v2) -> v2)); | 158 | , (v1, v2) -> v2)); |
| 162 | for (PurchaseOrderInfo orderInfo : orderInfoList) { | 159 | for (PurchaseOrderInfo orderInfo : orderInfoList) { |
| 163 | // 生成要车计划 | 160 | // 生成要车计划 |
| 161 | + LocalDate requestCarDate = LocalDate.now(); | ||
| 164 | CreateCarRequestPlanVo planCreateVo = new CreateCarRequestPlanVo(); | 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 | planCreateVo.setWorkshopId(orderInfo.getWorkshopId()); | 169 | planCreateVo.setWorkshopId(orderInfo.getWorkshopId()); |
| 167 | String requestCarPlanId = create(planCreateVo); | 170 | String requestCarPlanId = create(planCreateVo); |
| 168 | // 生成要车单 | 171 | // 生成要车单 |
| @@ -174,7 +177,7 @@ public class CarRequestPlanServiceImpl extends BaseMpServiceImpl<CarRequestPlanM | @@ -174,7 +177,7 @@ public class CarRequestPlanServiceImpl extends BaseMpServiceImpl<CarRequestPlanM | ||
| 174 | ticketVo.setDraftId(draftTicket.getId()); | 177 | ticketVo.setDraftId(draftTicket.getId()); |
| 175 | ticketVo.setPlanId(requestCarPlanId); | 178 | ticketVo.setPlanId(requestCarPlanId); |
| 176 | ticketVo.setPurchaseOrderId(orderInfo.getId()); | 179 | ticketVo.setPurchaseOrderId(orderInfo.getId()); |
| 177 | - ticketVo.setRequestCarDate(LocalDate.now()); | 180 | + ticketVo.setRequestCarDate(requestCarDate); |
| 178 | ticketVo.setDeptId(orderInfo.getDeptId()); | 181 | ticketVo.setDeptId(orderInfo.getDeptId()); |
| 179 | if (BooleanUtils.isFalse(shipmentsOrderInfo.getOnTimeShipment())) { | 182 | if (BooleanUtils.isFalse(shipmentsOrderInfo.getOnTimeShipment())) { |
| 180 | ticketVo.setDeliveryDate(shipmentsOrderInfo.getNewShipmentDate()); | 183 | ticketVo.setDeliveryDate(shipmentsOrderInfo.getNewShipmentDate()); |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/vo/shipments/order/QueryShipmentsOrderInfoVo.java
| @@ -59,4 +59,11 @@ public class QueryShipmentsOrderInfoVo extends PageVo implements BaseVo, Seriali | @@ -59,4 +59,11 @@ public class QueryShipmentsOrderInfoVo extends PageVo implements BaseVo, Seriali | ||
| 59 | @ApiModelProperty("状态") | 59 | @ApiModelProperty("状态") |
| 60 | private String status; | 60 | private String status; |
| 61 | 61 | ||
| 62 | + /** | ||
| 63 | + * 搜索关键字 | ||
| 64 | + * 移动端使用 | ||
| 65 | + * 根据发货单编号和订货单位模糊搜索 | ||
| 66 | + */ | ||
| 67 | + @ApiModelProperty("搜索关键字") | ||
| 68 | + private String searchKey; | ||
| 62 | } | 69 | } |
| @@ -73,10 +73,16 @@ | @@ -73,10 +73,16 @@ | ||
| 73 | AND tb.status = #{vo.status} | 73 | AND tb.status = #{vo.status} |
| 74 | </if> | 74 | </if> |
| 75 | <if test="vo.customerName != null and vo.customerName != ''"> | 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 | </if> | 77 | </if> |
| 78 | <if test="vo.code != null and vo.code != ''"> | 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 | </if> | 86 | </if> |
| 81 | </where> | 87 | </where> |
| 82 | ORDER BY tb.create_time DESC | 88 | ORDER BY tb.create_time DESC |