Showing
25 changed files
with
133 additions
and
185 deletions
| ... | ... | @@ -272,6 +272,12 @@ public class GetPurchaseOrderInfoBo extends BaseBo<PurchaseOrderInfo> { |
| 272 | 272 | @ApiModelProperty("是否展示审核按钮") |
| 273 | 273 | private Boolean showExamine; |
| 274 | 274 | |
| 275 | + /** | |
| 276 | + * 交货日期(取物料行最近的日期) | |
| 277 | + */ | |
| 278 | + @ApiModelProperty("交货日期") | |
| 279 | + private LocalDate deliveryDate; | |
| 280 | + | |
| 275 | 281 | |
| 276 | 282 | public GetPurchaseOrderInfoBo() { |
| 277 | 283 | ... | ... |
| ... | ... | @@ -32,7 +32,7 @@ public class GetCarRequestPlanBo extends BaseBo<CarRequestPlan> { |
| 32 | 32 | */ |
| 33 | 33 | @ApiModelProperty("要车日期") |
| 34 | 34 | @JsonFormat(pattern = StringPool.DATE_PATTERN) |
| 35 | - private LocalDate requestCarData; | |
| 35 | + private LocalDate requestCarDate; | |
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | 38 | * 装货厂别ID | ... | ... |
| ... | ... | @@ -33,13 +33,6 @@ public class GetDraftRequestCarTicketBo extends BaseBo<DraftRequestCarTicket> { |
| 33 | 33 | private String purchaseOrderId; |
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | - * 要车日期 | |
| 37 | - */ | |
| 38 | - @ApiModelProperty("要车日期") | |
| 39 | - @JsonFormat(pattern = StringPool.DATE_PATTERN) | |
| 40 | - private LocalDate requestCarData; | |
| 41 | - | |
| 42 | - /** | |
| 43 | 36 | * 要车办事处 |
| 44 | 37 | */ |
| 45 | 38 | @ApiModelProperty("要车办事处") |
| ... | ... | @@ -77,10 +70,16 @@ public class GetDraftRequestCarTicketBo extends BaseBo<DraftRequestCarTicket> { |
| 77 | 70 | private String orderNo; |
| 78 | 71 | |
| 79 | 72 | /** |
| 80 | - * 客户名称【简称】 | |
| 73 | + * 客户ID | |
| 74 | + */ | |
| 75 | + @ApiModelProperty("订货单位ID") | |
| 76 | + private String orderingUnit; | |
| 77 | + | |
| 78 | + /** | |
| 79 | + * 客户名称 | |
| 81 | 80 | */ |
| 82 | - @ApiModelProperty("客户名称【简称】") | |
| 83 | - private String customerShortName; | |
| 81 | + @ApiModelProperty("订货单位名称") | |
| 82 | + private String orderingUnitName; | |
| 84 | 83 | |
| 85 | 84 | /** |
| 86 | 85 | * 卸货地点 |
| ... | ... | @@ -131,12 +130,6 @@ public class GetDraftRequestCarTicketBo extends BaseBo<DraftRequestCarTicket> { |
| 131 | 130 | private String externalAuditorName; |
| 132 | 131 | |
| 133 | 132 | /** |
| 134 | - * 装货时间 | |
| 135 | - */ | |
| 136 | - @ApiModelProperty("装货时间") | |
| 137 | - private String loadingTime; | |
| 138 | - | |
| 139 | - /** | |
| 140 | 133 | * 装货特别要求/需求 |
| 141 | 134 | */ |
| 142 | 135 | @ApiModelProperty("装货特别要求/需求") | ... | ... |
| 1 | 1 | package com.lframework.xingyun.sc.bo.shipments.car; |
| 2 | 2 | |
| 3 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 3 | 4 | import com.fasterxml.jackson.annotation.JsonFormat; |
| 4 | 5 | import java.math.BigDecimal; |
| 5 | 6 | import com.lframework.starter.common.constants.StringPool; |
| ... | ... | @@ -48,7 +49,7 @@ public class GetRequestCarTicketBo extends BaseBo<RequestCarTicket> { |
| 48 | 49 | */ |
| 49 | 50 | @ApiModelProperty("要车日期") |
| 50 | 51 | @JsonFormat(pattern = StringPool.DATE_PATTERN) |
| 51 | - private LocalDate requestCarData; | |
| 52 | + private LocalDate requestCarDate; | |
| 52 | 53 | |
| 53 | 54 | /** |
| 54 | 55 | * 要车办事处 |
| ... | ... | @@ -88,10 +89,16 @@ public class GetRequestCarTicketBo extends BaseBo<RequestCarTicket> { |
| 88 | 89 | private String orderNo; |
| 89 | 90 | |
| 90 | 91 | /** |
| 91 | - * 客户名称【简称】 | |
| 92 | + * 客户ID | |
| 92 | 93 | */ |
| 93 | - @ApiModelProperty("客户名称【简称】") | |
| 94 | - private String customerShortName; | |
| 94 | + @ApiModelProperty("客户ID") | |
| 95 | + private String orderingUnit; | |
| 96 | + | |
| 97 | + /** | |
| 98 | + * 客户名称 | |
| 99 | + */ | |
| 100 | + @ApiModelProperty("客户名称") | |
| 101 | + private String orderingUnitName; | |
| 95 | 102 | |
| 96 | 103 | /** |
| 97 | 104 | * 卸货地点 | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/order/PurchaseOrderInfoController.java
| ... | ... | @@ -34,7 +34,6 @@ import io.swagger.annotations.ApiOperation; |
| 34 | 34 | import lombok.extern.slf4j.Slf4j; |
| 35 | 35 | import org.apache.commons.collections4.CollectionUtils; |
| 36 | 36 | import org.apache.commons.lang3.StringUtils; |
| 37 | -import org.apache.poi.hssf.usermodel.HSSFWorkbook; | |
| 38 | 37 | import org.apache.poi.ss.usermodel.*; |
| 39 | 38 | import org.apache.poi.ss.util.CellRangeAddress; |
| 40 | 39 | import org.apache.poi.util.IOUtils; |
| ... | ... | @@ -48,7 +47,6 @@ import javax.servlet.http.HttpServletResponse; |
| 48 | 47 | import javax.validation.Valid; |
| 49 | 48 | import javax.validation.constraints.NotBlank; |
| 50 | 49 | import java.io.FileNotFoundException; |
| 51 | -import java.io.FileOutputStream; | |
| 52 | 50 | import java.io.IOException; |
| 53 | 51 | import java.io.InputStream; |
| 54 | 52 | import java.math.BigDecimal; |
| ... | ... | @@ -56,10 +54,7 @@ import java.math.RoundingMode; |
| 56 | 54 | import java.net.URLEncoder; |
| 57 | 55 | import java.time.LocalDate; |
| 58 | 56 | import java.time.format.DateTimeFormatter; |
| 59 | -import java.util.ArrayList; | |
| 60 | -import java.util.HashMap; | |
| 61 | -import java.util.List; | |
| 62 | -import java.util.Map; | |
| 57 | +import java.util.*; | |
| 63 | 58 | import java.util.stream.Collectors; |
| 64 | 59 | |
| 65 | 60 | /** |
| ... | ... | @@ -184,6 +179,16 @@ public class PurchaseOrderInfoController extends DefaultBaseController { |
| 184 | 179 | result.setShowExamine(businessIds.contains(result.getId())); |
| 185 | 180 | } |
| 186 | 181 | result.setPurchaseOrderLineList(purchaseOrderLineList); |
| 182 | + | |
| 183 | + Optional<LocalDate> latestDate = purchaseOrderLineList.stream() | |
| 184 | + .map(PurchaseOrderLine::getDeliveryDate) // 假设 getDeliveryDate() 返回 LocalDate | |
| 185 | + .filter(java.util.Objects::nonNull) // 过滤掉 null 值 | |
| 186 | + .max(Comparator.naturalOrder()); | |
| 187 | + | |
| 188 | + if (latestDate.isPresent()) { | |
| 189 | + LocalDate mostRecent = latestDate.get(); | |
| 190 | + result.setDeliveryDate(mostRecent); | |
| 191 | + } | |
| 187 | 192 | } |
| 188 | 193 | |
| 189 | 194 | ... | ... |
| ... | ... | @@ -151,7 +151,7 @@ public class CarRequestPlanController extends DefaultBaseController { |
| 151 | 151 | public void printCarRequestPlan(@NotBlank(message = "id不能为空") String id, HttpServletResponse response) throws IOException { |
| 152 | 152 | CarRequestPlan data = carRequestPlanService.findById(id); |
| 153 | 153 | // 设置响应头 |
| 154 | - setupResponse(response, data.getWorkshopName() + "-" + data.getRequestCarData() + "-要车计划打印.xlsx"); | |
| 154 | + setupResponse(response, data.getWorkshopName() + "-" + data.getRequestCarDate() + "-要车计划打印.xlsx"); | |
| 155 | 155 | |
| 156 | 156 | QueryRequestCarTicketVo vo = new QueryRequestCarTicketVo(); |
| 157 | 157 | vo.setPlanId(id); |
| ... | ... | @@ -181,7 +181,7 @@ public class CarRequestPlanController extends DefaultBaseController { |
| 181 | 181 | setCellValue(sheet, startRow, 2, requestCarTicket.getDeliveryDate() == null ? "" : requestCarTicket.getDeliveryDate().format(dateFormatter), borderedStyle); |
| 182 | 182 | setCellValue(sheet, startRow, 3, requestCarTicket.getWorkshopName(), borderedStyle); |
| 183 | 183 | setCellValue(sheet, startRow, 4, requestCarTicket.getOrderNo(), borderedStyle); |
| 184 | - setCellValue(sheet, startRow, 5, requestCarTicket.getCustomerShortName(), borderedStyle); | |
| 184 | + setCellValue(sheet, startRow, 5, requestCarTicket.getOrderingUnitName(), borderedStyle); | |
| 185 | 185 | setCellValue(sheet, startRow, 6, requestCarTicket.getDestination(), borderedStyle); |
| 186 | 186 | setCellValue(sheet, startRow, 7, requestCarTicket.getQuantity(), borderedStyle); |
| 187 | 187 | totalQuantity = totalQuantity.add(requestCarTicket.getQuantity()); |
| ... | ... | @@ -237,7 +237,7 @@ public class CarRequestPlanController extends DefaultBaseController { |
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | Map<String, Object> dataMap = new HashMap<>(); |
| 240 | - dataMap.put("requestCarData", data.getRequestCarData() == null ? "" : data.getRequestCarData().format(dateFormatter)); | |
| 240 | + dataMap.put("requestCarDate", data.getRequestCarDate() == null ? "" : data.getRequestCarDate().format(dateFormatter)); | |
| 241 | 241 | |
| 242 | 242 | processTemplate(workbook, dataMap); |
| 243 | 243 | ... | ... |
| ... | ... | @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField; |
| 5 | 5 | import com.baomidou.mybatisplus.annotation.TableName; |
| 6 | 6 | import com.lframework.starter.web.core.dto.BaseDto; |
| 7 | 7 | import com.lframework.starter.web.core.entity.BaseEntity; |
| 8 | +import io.swagger.annotations.ApiModelProperty; | |
| 8 | 9 | import lombok.Data; |
| 9 | 10 | |
| 10 | 11 | import java.math.BigDecimal; |
| ... | ... | @@ -36,11 +37,6 @@ public class DraftRequestCarTicket extends BaseEntity implements BaseDto { |
| 36 | 37 | private String purchaseOrderId; |
| 37 | 38 | |
| 38 | 39 | /** |
| 39 | - * 要车日期 | |
| 40 | - */ | |
| 41 | - private LocalDate requestCarData; | |
| 42 | - | |
| 43 | - /** | |
| 44 | 40 | * 要车办事处 |
| 45 | 41 | */ |
| 46 | 42 | private String deptId; |
| ... | ... | @@ -73,9 +69,16 @@ public class DraftRequestCarTicket extends BaseEntity implements BaseDto { |
| 73 | 69 | private String orderNo; |
| 74 | 70 | |
| 75 | 71 | /** |
| 76 | - * 客户名称【简称】 | |
| 72 | + * 客户ID | |
| 77 | 73 | */ |
| 78 | - private String customerShortName; | |
| 74 | + private String orderingUnit; | |
| 75 | + | |
| 76 | + /** | |
| 77 | + * 客户名称 | |
| 78 | + */ | |
| 79 | + @TableField(exist = false) | |
| 80 | + private String orderingUnitName; | |
| 81 | + | |
| 79 | 82 | |
| 80 | 83 | /** |
| 81 | 84 | * 卸货地点 |
| ... | ... | @@ -83,7 +86,7 @@ public class DraftRequestCarTicket extends BaseEntity implements BaseDto { |
| 83 | 86 | private String destination; |
| 84 | 87 | |
| 85 | 88 | /** |
| 86 | - * 计划吨位 | |
| 89 | + * 计划吨位(吨) | |
| 87 | 90 | */ |
| 88 | 91 | private BigDecimal quantity; |
| 89 | 92 | |
| ... | ... | @@ -119,11 +122,6 @@ public class DraftRequestCarTicket extends BaseEntity implements BaseDto { |
| 119 | 122 | private String externalAuditorName; |
| 120 | 123 | |
| 121 | 124 | /** |
| 122 | - * 装货时间 | |
| 123 | - */ | |
| 124 | - private String loadingTime; | |
| 125 | - | |
| 126 | - /** | |
| 127 | 125 | * 装货特别要求/需求 |
| 128 | 126 | */ |
| 129 | 127 | private String specialLoadingRequirement; | ... | ... |
| ... | ... | @@ -48,7 +48,7 @@ public class RequestCarTicket extends BaseEntity implements BaseDto { |
| 48 | 48 | /** |
| 49 | 49 | * 要车日期 |
| 50 | 50 | */ |
| 51 | - private LocalDate requestCarData; | |
| 51 | + private LocalDate requestCarDate; | |
| 52 | 52 | |
| 53 | 53 | /** |
| 54 | 54 | * 要车办事处 |
| ... | ... | @@ -83,9 +83,15 @@ public class RequestCarTicket extends BaseEntity implements BaseDto { |
| 83 | 83 | private String orderNo; |
| 84 | 84 | |
| 85 | 85 | /** |
| 86 | - * 客户名称【简称】 | |
| 86 | + * 客户ID | |
| 87 | 87 | */ |
| 88 | - private String customerShortName; | |
| 88 | + private String orderingUnit; | |
| 89 | + | |
| 90 | + /** | |
| 91 | + * 客户名称 | |
| 92 | + */ | |
| 93 | + @TableField(exist = false) | |
| 94 | + private String orderingUnitName; | |
| 89 | 95 | |
| 90 | 96 | /** |
| 91 | 97 | * 卸货地点 | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/impl/shipments/car/CarRequestPlanServiceImpl.java
| ... | ... | @@ -66,12 +66,12 @@ public class CarRequestPlanServiceImpl extends BaseMpServiceImpl<CarRequestPlanM |
| 66 | 66 | //新增要车计划时先判断当前日期+装货厂别是否已经存在要车计划,不再存在再新增 |
| 67 | 67 | QueryCarRequestPlanVo vo1 = new QueryCarRequestPlanVo(); |
| 68 | 68 | vo1.setWorkshopId(vo.getWorkshopId()); |
| 69 | - LocalDate date = vo.getRequestCarData(); | |
| 69 | + LocalDate date = vo.getRequestCarDate(); | |
| 70 | 70 | if (date != null) { |
| 71 | 71 | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| 72 | 72 | String dateString = date.format(formatter); // LocalDate 自带 format 方法 |
| 73 | - vo1.setRequestCarDataStart(dateString); | |
| 74 | - vo1.setRequestCarDataEnd(dateString); | |
| 73 | + vo1.setRequestCarDateStart(dateString); | |
| 74 | + vo1.setRequestCarDateEnd(dateString); | |
| 75 | 75 | } |
| 76 | 76 | List<CarRequestPlan> carRequestPlanList = this.query(vo1); |
| 77 | 77 | if (CollectionUtil.isNotEmpty(carRequestPlanList)) { |
| ... | ... | @@ -81,8 +81,8 @@ public class CarRequestPlanServiceImpl extends BaseMpServiceImpl<CarRequestPlanM |
| 81 | 81 | |
| 82 | 82 | CarRequestPlan data = new CarRequestPlan(); |
| 83 | 83 | data.setId(IdUtil.getId()); |
| 84 | - if (vo.getRequestCarData() != null) { | |
| 85 | - data.setRequestCarData(vo.getRequestCarData()); | |
| 84 | + if (vo.getRequestCarDate() != null) { | |
| 85 | + data.setRequestCarDate(vo.getRequestCarDate()); | |
| 86 | 86 | } |
| 87 | 87 | if (!StringUtil.isBlank(vo.getWorkshopId())) { |
| 88 | 88 | data.setWorkshopId(vo.getWorkshopId()); |
| ... | ... | @@ -110,7 +110,7 @@ public class CarRequestPlanServiceImpl extends BaseMpServiceImpl<CarRequestPlanM |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | LambdaUpdateWrapper<CarRequestPlan> updateWrapper = Wrappers.lambdaUpdate(CarRequestPlan.class) |
| 113 | - .set(CarRequestPlan::getRequestCarData, vo.getRequestCarData() == null ? null : vo.getRequestCarData()) | |
| 113 | + .set(CarRequestPlan::getRequestCarDate, vo.getRequestCarDate() == null ? null : vo.getRequestCarDate()) | |
| 114 | 114 | .set(CarRequestPlan::getWorkshopId, StringUtil.isBlank(vo.getWorkshopId()) ? null : vo.getWorkshopId()) |
| 115 | 115 | .set(CarRequestPlan::getRemarks, StringUtil.isBlank(vo.getRemarks()) ? null : vo.getRemarks()) |
| 116 | 116 | .eq(CarRequestPlan::getId, vo.getId()); | ... | ... |
| ... | ... | @@ -99,23 +99,20 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq |
| 99 | 99 | if (!StringUtil.isBlank(vo.getPurchaseOrderId())) { |
| 100 | 100 | data.setPurchaseOrderId(vo.getPurchaseOrderId()); |
| 101 | 101 | } |
| 102 | - if (vo.getRequestCarData() != null) { | |
| 103 | - data.setRequestCarData(vo.getRequestCarData()); | |
| 104 | - } | |
| 105 | 102 | if (!StringUtil.isBlank(vo.getDeptId())) { |
| 106 | 103 | data.setDeptId(vo.getDeptId()); |
| 107 | 104 | } |
| 108 | -// if (vo.getDeliveryDate() != null) { | |
| 109 | -// data.setDeliveryDate(vo.getDeliveryDate()); | |
| 110 | -// } | |
| 105 | + if (vo.getDeliveryDate() != null) { | |
| 106 | + data.setDeliveryDate(vo.getDeliveryDate()); | |
| 107 | + } | |
| 111 | 108 | if (!StringUtil.isBlank(vo.getWorkshopId())) { |
| 112 | 109 | data.setWorkshopId(vo.getWorkshopId()); |
| 113 | 110 | } |
| 114 | 111 | if (!StringUtil.isBlank(vo.getOrderNo())) { |
| 115 | 112 | data.setOrderNo(vo.getOrderNo()); |
| 116 | 113 | } |
| 117 | - if (!StringUtil.isBlank(vo.getCustomerShortName())) { | |
| 118 | - data.setCustomerShortName(vo.getCustomerShortName()); | |
| 114 | + if (!StringUtil.isBlank(vo.getOrderingUnit())) { | |
| 115 | + data.setOrderingUnit(vo.getOrderingUnit()); | |
| 119 | 116 | } |
| 120 | 117 | if (!StringUtil.isBlank(vo.getDestination())) { |
| 121 | 118 | data.setDestination(vo.getDestination()); |
| ... | ... | @@ -138,9 +135,6 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq |
| 138 | 135 | if (!StringUtil.isBlank(vo.getExternalAuditor())) { |
| 139 | 136 | data.setExternalAuditor(vo.getExternalAuditor()); |
| 140 | 137 | } |
| 141 | -// if (!StringUtil.isBlank(vo.getLoadingTime())) { | |
| 142 | -// data.setLoadingTime(vo.getLoadingTime()); | |
| 143 | -// } | |
| 144 | 138 | if (!StringUtil.isBlank(vo.getSpecialLoadingRequirement())) { |
| 145 | 139 | data.setSpecialLoadingRequirement(vo.getSpecialLoadingRequirement()); |
| 146 | 140 | } |
| ... | ... | @@ -177,12 +171,11 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq |
| 177 | 171 | |
| 178 | 172 | LambdaUpdateWrapper<DraftRequestCarTicket> updateWrapper = Wrappers.lambdaUpdate(DraftRequestCarTicket.class) |
| 179 | 173 | .set(DraftRequestCarTicket::getPurchaseOrderId, StringUtil.isBlank(vo.getPurchaseOrderId()) ? null : vo.getPurchaseOrderId()) |
| 180 | - .set(DraftRequestCarTicket::getRequestCarData, vo.getRequestCarData() == null ? null : vo.getRequestCarData()) | |
| 181 | 174 | .set(DraftRequestCarTicket::getDeptId, StringUtil.isBlank(vo.getDeptId()) ? null : vo.getDeptId()) |
| 182 | -// .set(DraftRequestCarTicket::getDeliveryDate, vo.getDeliveryDate() == null ? null : vo.getDeliveryDate()) | |
| 175 | + .set(DraftRequestCarTicket::getDeliveryDate, vo.getDeliveryDate() == null ? null : vo.getDeliveryDate()) | |
| 183 | 176 | .set(DraftRequestCarTicket::getWorkshopId, StringUtil.isBlank(vo.getWorkshopId()) ? null : vo.getWorkshopId()) |
| 184 | 177 | .set(DraftRequestCarTicket::getOrderNo, StringUtil.isBlank(vo.getOrderNo()) ? null : vo.getOrderNo()) |
| 185 | - .set(DraftRequestCarTicket::getCustomerShortName, StringUtil.isBlank(vo.getCustomerShortName()) ? null : vo.getCustomerShortName()) | |
| 178 | + .set(DraftRequestCarTicket::getOrderingUnit, StringUtil.isBlank(vo.getOrderingUnit()) ? null : vo.getOrderingUnit()) | |
| 186 | 179 | .set(DraftRequestCarTicket::getDestination, StringUtil.isBlank(vo.getDestination()) ? null : vo.getDestination()) |
| 187 | 180 | .set(DraftRequestCarTicket::getQuantity, vo.getQuantity() == null ? null : vo.getQuantity()) |
| 188 | 181 | .set(DraftRequestCarTicket::getConsignee, StringUtil.isBlank(vo.getConsignee()) ? null : vo.getConsignee()) |
| ... | ... | @@ -190,7 +183,6 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq |
| 190 | 183 | .set(DraftRequestCarTicket::getReturnPlanArrangement, StringUtil.isBlank(vo.getReturnPlanArrangement()) ? null : vo.getReturnPlanArrangement()) |
| 191 | 184 | .set(DraftRequestCarTicket::getOther, StringUtil.isBlank(vo.getOther()) ? null : vo.getOther()) |
| 192 | 185 | .set(DraftRequestCarTicket::getExternalAuditor, StringUtil.isBlank(vo.getExternalAuditor()) ? null : vo.getExternalAuditor()) |
| 193 | -// .set(DraftRequestCarTicket::getLoadingTime, StringUtil.isBlank(vo.getLoadingTime()) ? null : vo.getLoadingTime()) | |
| 194 | 186 | .set(DraftRequestCarTicket::getSpecialLoadingRequirement, StringUtil.isBlank(vo.getSpecialLoadingRequirement()) ? null : vo.getSpecialLoadingRequirement()) |
| 195 | 187 | .set(DraftRequestCarTicket::getBusinessOfficeAuditor, StringUtil.isBlank(vo.getBusinessOfficeAuditor()) ? null : vo.getBusinessOfficeAuditor()) |
| 196 | 188 | .set(DraftRequestCarTicket::getOperationsDepartmentAuditor, StringUtil.isBlank(vo.getOperationsDepartmentAuditor()) ? null : vo.getOperationsDepartmentAuditor()) | ... | ... |
| ... | ... | @@ -32,9 +32,6 @@ import java.util.List; |
| 32 | 32 | |
| 33 | 33 | @Service |
| 34 | 34 | public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTicketMapper, RequestCarTicket> implements RequestCarTicketService { |
| 35 | - private static final String BPM_FLAG = "REQUEST_CAR_TICKET"; | |
| 36 | - @Resource | |
| 37 | - private FlowInstanceWrapperService flowInstanceWrapperService; | |
| 38 | 35 | |
| 39 | 36 | @Override |
| 40 | 37 | public PageResult<RequestCarTicket> query(Integer pageIndex, Integer pageSize, QueryRequestCarTicketVo vo) { |
| ... | ... | @@ -76,8 +73,8 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic |
| 76 | 73 | if (!StringUtil.isBlank(vo.getPurchaseOrderId())) { |
| 77 | 74 | data.setPurchaseOrderId(vo.getPurchaseOrderId()); |
| 78 | 75 | } |
| 79 | - if (vo.getRequestCarData() != null) { | |
| 80 | - data.setRequestCarData(vo.getRequestCarData()); | |
| 76 | + if (vo.getRequestCarDate() != null) { | |
| 77 | + data.setRequestCarDate(vo.getRequestCarDate()); | |
| 81 | 78 | } |
| 82 | 79 | if (!StringUtil.isBlank(vo.getDeptId())) { |
| 83 | 80 | data.setDeptId(vo.getDeptId()); |
| ... | ... | @@ -91,8 +88,8 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic |
| 91 | 88 | if (!StringUtil.isBlank(vo.getOrderNo())) { |
| 92 | 89 | data.setOrderNo(vo.getOrderNo()); |
| 93 | 90 | } |
| 94 | - if (!StringUtil.isBlank(vo.getCustomerShortName())) { | |
| 95 | - data.setCustomerShortName(vo.getCustomerShortName()); | |
| 91 | + if (!StringUtil.isBlank(vo.getOrderingUnit())) { | |
| 92 | + data.setOrderingUnit(vo.getOrderingUnit()); | |
| 96 | 93 | } |
| 97 | 94 | if (!StringUtil.isBlank(vo.getDestination())) { |
| 98 | 95 | data.setDestination(vo.getDestination()); |
| ... | ... | @@ -135,9 +132,6 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic |
| 135 | 132 | |
| 136 | 133 | OpLogUtil.setVariable("id", data.getId()); |
| 137 | 134 | OpLogUtil.setExtra(vo); |
| 138 | - //开启审核 | |
| 139 | -// data.setUpdateById(SecurityUtil.getCurrentUser().getId()); | |
| 140 | -// flowInstanceWrapperService.startInstance(BPM_FLAG, data.getId(), BPM_FLAG, data); | |
| 141 | 135 | |
| 142 | 136 | return data.getId(); |
| 143 | 137 | } |
| ... | ... | @@ -156,12 +150,12 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic |
| 156 | 150 | .set(RequestCarTicket::getDraftId, StringUtil.isBlank(vo.getDraftId()) ? null : vo.getDraftId()) |
| 157 | 151 | .set(RequestCarTicket::getPlanId, StringUtil.isBlank(vo.getPlanId()) ? null : vo.getPlanId()) |
| 158 | 152 | .set(RequestCarTicket::getPurchaseOrderId, StringUtil.isBlank(vo.getPurchaseOrderId()) ? null : vo.getPurchaseOrderId()) |
| 159 | - .set(RequestCarTicket::getRequestCarData, vo.getRequestCarData() == null ? null : vo.getRequestCarData()) | |
| 153 | + .set(RequestCarTicket::getRequestCarDate, vo.getRequestCarDate() == null ? null : vo.getRequestCarDate()) | |
| 160 | 154 | .set(RequestCarTicket::getDeptId, StringUtil.isBlank(vo.getDeptId()) ? null : vo.getDeptId()) |
| 161 | 155 | .set(RequestCarTicket::getDeliveryDate, vo.getDeliveryDate() == null ? null : vo.getDeliveryDate()) |
| 162 | 156 | .set(RequestCarTicket::getWorkshopId, StringUtil.isBlank(vo.getWorkshopId()) ? null : vo.getWorkshopId()) |
| 163 | 157 | .set(RequestCarTicket::getOrderNo, StringUtil.isBlank(vo.getOrderNo()) ? null : vo.getOrderNo()) |
| 164 | - .set(RequestCarTicket::getCustomerShortName, StringUtil.isBlank(vo.getCustomerShortName()) ? null : vo.getCustomerShortName()) | |
| 158 | + .set(RequestCarTicket::getOrderingUnit, StringUtil.isBlank(vo.getOrderingUnit()) ? null : vo.getOrderingUnit()) | |
| 165 | 159 | .set(RequestCarTicket::getDestination, StringUtil.isBlank(vo.getDestination()) ? null : vo.getDestination()) |
| 166 | 160 | .set(RequestCarTicket::getQuantity, vo.getQuantity() == null ? null : vo.getQuantity()) |
| 167 | 161 | .set(RequestCarTicket::getConsignee, StringUtil.isBlank(vo.getConsignee()) ? null : vo.getConsignee()) |
| ... | ... | @@ -180,9 +174,6 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic |
| 180 | 174 | |
| 181 | 175 | OpLogUtil.setVariable("id", data.getId()); |
| 182 | 176 | OpLogUtil.setExtra(vo); |
| 183 | - //开启审核 | |
| 184 | -// RequestCarTicket requestCarTicket = getBaseMapper().selectById(vo.getId()); | |
| 185 | -// flowInstanceWrapperService.startInstance(BPM_FLAG, requestCarTicket.getId(), BPM_FLAG, requestCarTicket); | |
| 186 | 177 | } |
| 187 | 178 | |
| 188 | 179 | @OpLog(type = OtherOpLogType.class, name = "修改要车单状态,ID:{}", params = {"#id"}) | ... | ... |
| ... | ... | @@ -23,13 +23,6 @@ public class CreateDraftRequestCarTicketVo implements BaseVo, Serializable { |
| 23 | 23 | private String purchaseOrderId; |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | - * 要车日期 | |
| 27 | - */ | |
| 28 | - @ApiModelProperty("要车日期") | |
| 29 | - @TypeMismatch(message = "要车日期格式有误!") | |
| 30 | - private LocalDate requestCarData; | |
| 31 | - | |
| 32 | - /** | |
| 33 | 26 | * 要车办事处 |
| 34 | 27 | */ |
| 35 | 28 | @ApiModelProperty("要车办事处") |
| ... | ... | @@ -58,11 +51,10 @@ public class CreateDraftRequestCarTicketVo implements BaseVo, Serializable { |
| 58 | 51 | private String orderNo; |
| 59 | 52 | |
| 60 | 53 | /** |
| 61 | - * 客户名称【简称】 | |
| 54 | + * 客户ID | |
| 62 | 55 | */ |
| 63 | - @ApiModelProperty("客户名称【简称】") | |
| 64 | - @Length(message = "客户名称【简称】最多允许100个字符!") | |
| 65 | - private String customerShortName; | |
| 56 | + @ApiModelProperty("客户ID") | |
| 57 | + private String orderingUnit; | |
| 66 | 58 | |
| 67 | 59 | /** |
| 68 | 60 | * 卸货地点 |
| ... | ... | @@ -115,13 +107,6 @@ public class CreateDraftRequestCarTicketVo implements BaseVo, Serializable { |
| 115 | 107 | private String externalAuditor; |
| 116 | 108 | |
| 117 | 109 | /** |
| 118 | - * 装货时间 | |
| 119 | - */ | |
| 120 | - @ApiModelProperty("装货时间") | |
| 121 | - @Length(message = "装货时间最多允许20个字符!") | |
| 122 | - private String loadingTime; | |
| 123 | - | |
| 124 | - /** | |
| 125 | 110 | * 装货特别要求/需求 |
| 126 | 111 | */ |
| 127 | 112 | @ApiModelProperty("装货特别要求/需求") | ... | ... |
| ... | ... | @@ -38,7 +38,7 @@ public class CreateRequestCarTicketVo implements BaseVo, Serializable { |
| 38 | 38 | */ |
| 39 | 39 | @ApiModelProperty("要车日期") |
| 40 | 40 | @TypeMismatch(message = "要车日期格式有误!") |
| 41 | - private LocalDate requestCarData; | |
| 41 | + private LocalDate requestCarDate; | |
| 42 | 42 | |
| 43 | 43 | /** |
| 44 | 44 | * 要车办事处 |
| ... | ... | @@ -69,11 +69,10 @@ public class CreateRequestCarTicketVo implements BaseVo, Serializable { |
| 69 | 69 | private String orderNo; |
| 70 | 70 | |
| 71 | 71 | /** |
| 72 | - * 客户名称【简称】 | |
| 72 | + * 客户ID | |
| 73 | 73 | */ |
| 74 | - @ApiModelProperty("客户名称【简称】") | |
| 75 | - @Length(message = "客户名称【简称】最多允许100个字符!") | |
| 76 | - private String customerShortName; | |
| 74 | + @ApiModelProperty("客户ID") | |
| 75 | + private String orderingUnit; | |
| 77 | 76 | |
| 78 | 77 | /** |
| 79 | 78 | * 卸货地点 | ... | ... |
| ... | ... | @@ -17,13 +17,13 @@ public class QueryCarRequestPlanVo extends PageVo implements BaseVo, Serializabl |
| 17 | 17 | * 要车日期开始 |
| 18 | 18 | */ |
| 19 | 19 | @ApiModelProperty("要车日期开始") |
| 20 | - private String requestCarDataStart; | |
| 20 | + private String requestCarDateStart; | |
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * 要车日期结束 |
| 24 | 24 | */ |
| 25 | 25 | @ApiModelProperty("要车日期结束") |
| 26 | - private String requestCarDataEnd; | |
| 26 | + private String requestCarDateEnd; | |
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * 装货厂别 | ... | ... |
| ... | ... | @@ -19,18 +19,6 @@ public class QueryDraftRequestCarTicketVo extends PageVo implements BaseVo, Seri |
| 19 | 19 | private String deptName; |
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | - * 要车日期开始 | |
| 23 | - */ | |
| 24 | - @ApiModelProperty("要车日期开始") | |
| 25 | - private String requestCarDataStart; | |
| 26 | - | |
| 27 | - /** | |
| 28 | - * 要车日期结束 | |
| 29 | - */ | |
| 30 | - @ApiModelProperty("要车日期结束") | |
| 31 | - private String requestCarDataEnd; | |
| 32 | - | |
| 33 | - /** | |
| 34 | 22 | * 装货厂别 |
| 35 | 23 | */ |
| 36 | 24 | @ApiModelProperty("装货厂别") |
| ... | ... | @@ -43,10 +31,10 @@ public class QueryDraftRequestCarTicketVo extends PageVo implements BaseVo, Seri |
| 43 | 31 | private String orderNo; |
| 44 | 32 | |
| 45 | 33 | /** |
| 46 | - * 客户名称【简称】 | |
| 34 | + * 客户名称 | |
| 47 | 35 | */ |
| 48 | - @ApiModelProperty("客户名称【简称】") | |
| 49 | - private String customerShortName; | |
| 36 | + @ApiModelProperty("客户名称") | |
| 37 | + private String orderingUnitName; | |
| 50 | 38 | |
| 51 | 39 | |
| 52 | 40 | /** | ... | ... |
| ... | ... | @@ -21,13 +21,13 @@ public class QueryRequestCarTicketVo extends PageVo implements BaseVo, Serializa |
| 21 | 21 | * 要车日期开始 |
| 22 | 22 | */ |
| 23 | 23 | @ApiModelProperty("要车日期开始") |
| 24 | - private String requestCarDataStart; | |
| 24 | + private String requestCarDateStart; | |
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * 要车日期结束 |
| 28 | 28 | */ |
| 29 | 29 | @ApiModelProperty("要车日期结束") |
| 30 | - private String requestCarDataEnd; | |
| 30 | + private String requestCarDateEnd; | |
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * 装货厂别 |
| ... | ... | @@ -42,10 +42,10 @@ public class QueryRequestCarTicketVo extends PageVo implements BaseVo, Serializa |
| 42 | 42 | private String orderNo; |
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | - * 客户名称【简称】 | |
| 45 | + * 客户名称 | |
| 46 | 46 | */ |
| 47 | - @ApiModelProperty("客户名称【简称】") | |
| 48 | - private String customerShortName; | |
| 47 | + @ApiModelProperty("客户名称") | |
| 48 | + private String orderingUnitName; | |
| 49 | 49 | |
| 50 | 50 | |
| 51 | 51 | /** | ... | ... |
| ... | ... | @@ -32,13 +32,6 @@ public class UpdateDraftRequestCarTicketVo implements BaseVo, Serializable { |
| 32 | 32 | private String purchaseOrderId; |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | - * 要车日期 | |
| 36 | - */ | |
| 37 | - @ApiModelProperty("要车日期") | |
| 38 | - @TypeMismatch(message = "要车日期格式有误!") | |
| 39 | - private LocalDate requestCarData; | |
| 40 | - | |
| 41 | - /** | |
| 42 | 35 | * 要车办事处 |
| 43 | 36 | */ |
| 44 | 37 | @ApiModelProperty("要车办事处") |
| ... | ... | @@ -67,11 +60,10 @@ public class UpdateDraftRequestCarTicketVo implements BaseVo, Serializable { |
| 67 | 60 | private String orderNo; |
| 68 | 61 | |
| 69 | 62 | /** |
| 70 | - * 客户名称【简称】 | |
| 63 | + * 客户ID | |
| 71 | 64 | */ |
| 72 | - @ApiModelProperty("客户名称【简称】") | |
| 73 | - @Length(message = "客户名称【简称】最多允许100个字符!") | |
| 74 | - private String customerShortName; | |
| 65 | + @ApiModelProperty("客户ID") | |
| 66 | + private String orderingUnit; | |
| 75 | 67 | |
| 76 | 68 | /** |
| 77 | 69 | * 卸货地点 |
| ... | ... | @@ -124,13 +116,6 @@ public class UpdateDraftRequestCarTicketVo implements BaseVo, Serializable { |
| 124 | 116 | private String externalAuditor; |
| 125 | 117 | |
| 126 | 118 | /** |
| 127 | - * 装货时间 | |
| 128 | - */ | |
| 129 | - @ApiModelProperty("装货时间") | |
| 130 | - @Length(message = "装货时间最多允许20个字符!") | |
| 131 | - private String loadingTime; | |
| 132 | - | |
| 133 | - /** | |
| 134 | 119 | * 装货特别要求/需求 |
| 135 | 120 | */ |
| 136 | 121 | @ApiModelProperty("装货特别要求/需求") | ... | ... |
| ... | ... | @@ -46,7 +46,7 @@ public class UpdateRequestCarTicketVo implements BaseVo, Serializable { |
| 46 | 46 | */ |
| 47 | 47 | @ApiModelProperty("要车日期") |
| 48 | 48 | @TypeMismatch(message = "要车日期格式有误!") |
| 49 | - private LocalDate requestCarData; | |
| 49 | + private LocalDate requestCarDate; | |
| 50 | 50 | |
| 51 | 51 | /** |
| 52 | 52 | * 要车办事处 |
| ... | ... | @@ -77,11 +77,11 @@ public class UpdateRequestCarTicketVo implements BaseVo, Serializable { |
| 77 | 77 | private String orderNo; |
| 78 | 78 | |
| 79 | 79 | /** |
| 80 | - * 客户名称【简称】 | |
| 80 | + * 客户ID | |
| 81 | 81 | */ |
| 82 | - @ApiModelProperty("客户名称【简称】") | |
| 83 | - @Length(message = "客户名称【简称】最多允许100个字符!") | |
| 84 | - private String customerShortName; | |
| 82 | + @ApiModelProperty("客户ID") | |
| 83 | + private String orderingUnit; | |
| 84 | + | |
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | 87 | * 卸货地点 | ... | ... |
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | |
| 5 | 5 | <resultMap id="CarRequestPlan" type="com.lframework.xingyun.sc.entity.CarRequestPlan"> |
| 6 | 6 | <id column="id" property="id"/> |
| 7 | - <result column="request_car_data" property="requestCarData"/> | |
| 7 | + <result column="request_car_date" property="requestCarDate"/> | |
| 8 | 8 | <result column="workshop_id" property="workshopId"/> |
| 9 | 9 | <result column="workshop_name" property="workshopName"/> |
| 10 | 10 | <result column="remarks" property="remarks"/> |
| ... | ... | @@ -19,7 +19,7 @@ |
| 19 | 19 | <sql id="CarRequestPlan_sql"> |
| 20 | 20 | SELECT |
| 21 | 21 | tb.id, |
| 22 | - tb.request_car_data, | |
| 22 | + tb.request_car_date, | |
| 23 | 23 | tb.workshop_id, |
| 24 | 24 | ws.name AS workshop_name, |
| 25 | 25 | tb.remarks, |
| ... | ... | @@ -36,19 +36,19 @@ |
| 36 | 36 | <select id="query" resultMap="CarRequestPlan"> |
| 37 | 37 | <include refid="CarRequestPlan_sql"/> |
| 38 | 38 | <where> |
| 39 | - <if test="vo.requestCarDataStart != null"> | |
| 40 | - AND tb.request_car_data >= #{vo.requestCarDataStart} | |
| 39 | + <if test="vo.requestCarDateStart != null"> | |
| 40 | + AND tb.request_car_date >= #{vo.requestCarDateStart} | |
| 41 | 41 | </if> |
| 42 | - <if test="vo.requestCarDataEnd != null"> | |
| 42 | + <if test="vo.requestCarDateEnd != null"> | |
| 43 | 43 | <![CDATA[ |
| 44 | - AND tb.request_car_data <= #{vo.requestCarDataEnd} | |
| 44 | + AND tb.request_car_date <= #{vo.requestCarDateEnd} | |
| 45 | 45 | ]]> |
| 46 | 46 | </if> |
| 47 | 47 | <if test="vo.workshopId != null and vo.workshopId != ''"> |
| 48 | 48 | AND tb.workshop_id = #{vo.workshopId} |
| 49 | 49 | </if> |
| 50 | 50 | </where> |
| 51 | - ORDER BY tb.request_car_data DESC | |
| 51 | + ORDER BY tb.request_car_date DESC | |
| 52 | 52 | </select> |
| 53 | 53 | |
| 54 | 54 | <select id="findById" resultType="com.lframework.xingyun.sc.entity.CarRequestPlan"> | ... | ... |
| ... | ... | @@ -5,14 +5,14 @@ |
| 5 | 5 | <resultMap id="DraftRequestCarTicket" type="com.lframework.xingyun.sc.entity.DraftRequestCarTicket"> |
| 6 | 6 | <id column="id" property="id"/> |
| 7 | 7 | <result column="purchase_order_id" property="purchaseOrderId"/> |
| 8 | - <result column="request_car_data" property="requestCarData"/> | |
| 9 | 8 | <result column="dept_id" property="deptId"/> |
| 10 | 9 | <result column="dept_name" property="deptName"/> |
| 11 | 10 | <result column="delivery_date" property="deliveryDate"/> |
| 12 | 11 | <result column="workshop_id" property="workshopId"/> |
| 13 | 12 | <result column="workshop_name" property="workshopName"/> |
| 14 | 13 | <result column="order_no" property="orderNo"/> |
| 15 | - <result column="customer_short_name" property="customerShortName"/> | |
| 14 | + <result column="ordering_unit" property="orderingUnit"/> | |
| 15 | + <result column="ordering_unit_name" property="orderingUnitName"/> | |
| 16 | 16 | <result column="destination" property="destination"/> |
| 17 | 17 | <result column="quantity" property="quantity"/> |
| 18 | 18 | <result column="consignee" property="consignee"/> |
| ... | ... | @@ -21,7 +21,6 @@ |
| 21 | 21 | <result column="other" property="other"/> |
| 22 | 22 | <result column="external_auditor" property="externalAuditor"/> |
| 23 | 23 | <result column="external_auditor_name" property="externalAuditorName"/> |
| 24 | - <result column="loading_time" property="loadingTime"/> | |
| 25 | 24 | <result column="special_loading_requirement" property="specialLoadingRequirement"/> |
| 26 | 25 | <result column="business_office_auditor" property="businessOfficeAuditor"/> |
| 27 | 26 | <result column="business_office_auditor_name" property="businessOfficeAuditorName"/> |
| ... | ... | @@ -40,14 +39,14 @@ |
| 40 | 39 | SELECT |
| 41 | 40 | tb.id, |
| 42 | 41 | tb.purchase_order_id, |
| 43 | - tb.request_car_data, | |
| 44 | 42 | tb.dept_id, |
| 45 | 43 | sd.name AS dept_name, |
| 46 | 44 | tb.delivery_date, |
| 47 | 45 | tb.workshop_id, |
| 48 | 46 | ws.name AS workshop_name, |
| 49 | 47 | tb.order_no, |
| 50 | - tb.customer_short_name, | |
| 48 | + tb.ordering_unit, | |
| 49 | + cu.name AS ordering_unit_name, | |
| 51 | 50 | tb.destination, |
| 52 | 51 | tb.quantity, |
| 53 | 52 | tb.consignee, |
| ... | ... | @@ -56,7 +55,6 @@ |
| 56 | 55 | tb.other, |
| 57 | 56 | tb.external_auditor, |
| 58 | 57 | su.name AS external_auditor_name, |
| 59 | - tb.loading_time, | |
| 60 | 58 | tb.special_loading_requirement, |
| 61 | 59 | tb.business_office_auditor, |
| 62 | 60 | su1.name AS business_office_auditor_name, |
| ... | ... | @@ -72,6 +70,7 @@ |
| 72 | 70 | FROM draft_request_car_ticket AS tb |
| 73 | 71 | left join sys_dept as sd on sd.id = tb.dept_id |
| 74 | 72 | left join base_data_workshop as ws on ws.id = tb.workshop_id |
| 73 | + left join base_data_customer as cu on cu.id = tb.ordering_unit | |
| 75 | 74 | left join sys_user as su on su.id = tb.external_auditor |
| 76 | 75 | left join sys_user as su1 on su1.id = tb.business_office_auditor |
| 77 | 76 | left join sys_user as su2 on su2.id = tb.operations_department_auditor |
| ... | ... | @@ -80,22 +79,14 @@ |
| 80 | 79 | <select id="query" resultMap="DraftRequestCarTicket"> |
| 81 | 80 | <include refid="DraftRequestCarTicket_sql"/> |
| 82 | 81 | <where> |
| 83 | - <if test="vo.requestCarDataStart != null"> | |
| 84 | - AND tb.request_car_data >= #{vo.requestCarDataStart} | |
| 85 | - </if> | |
| 86 | - <if test="vo.requestCarDataEnd != null"> | |
| 87 | - <![CDATA[ | |
| 88 | - AND tb.request_car_data <= #{vo.requestCarDataEnd} | |
| 89 | - ]]> | |
| 90 | - </if> | |
| 91 | 82 | <if test="vo.workshopId != null and vo.workshopId != ''"> |
| 92 | 83 | AND tb.workshop_id = #{vo.workshopId} |
| 93 | 84 | </if> |
| 94 | 85 | <if test="vo.orderNo != null and vo.orderNo != ''"> |
| 95 | 86 | AND tb.order_no LIKE CONCAT('%', #{vo.orderNo},'%') |
| 96 | 87 | </if> |
| 97 | - <if test="vo.customerShortName != null and vo.customerShortName != ''"> | |
| 98 | - AND tb.customer_short_name LIKE CONCAT('%', #{vo.customerShortName},'%') | |
| 88 | + <if test="vo.orderingUnitName != null and vo.orderingUnitName != ''"> | |
| 89 | + AND cu.name LIKE CONCAT('%', #{vo.orderingUnitName},'%') | |
| 99 | 90 | </if> |
| 100 | 91 | <if test="vo.deptName != null and vo.deptName != ''"> |
| 101 | 92 | AND sd.name LIKE CONCAT('%', #{vo.deptName},'%') | ... | ... |
| ... | ... | @@ -7,7 +7,7 @@ |
| 7 | 7 | <result column="draft_id" property="draftId"/> |
| 8 | 8 | <result column="plan_id" property="planId"/> |
| 9 | 9 | <result column="purchase_order_id" property="purchaseOrderId"/> |
| 10 | - <result column="request_car_data" property="requestCarData"/> | |
| 10 | + <result column="request_car_date" property="requestCarDate"/> | |
| 11 | 11 | <result column="dept_id" property="deptId"/> |
| 12 | 12 | <result column="dept_name" property="deptName"/> |
| 13 | 13 | <result column="delivery_date" property="deliveryDate"/> |
| ... | ... | @@ -44,14 +44,15 @@ |
| 44 | 44 | tb.draft_id, |
| 45 | 45 | tb.plan_id, |
| 46 | 46 | tb.purchase_order_id, |
| 47 | - tb.request_car_data, | |
| 47 | + tb.request_car_date, | |
| 48 | 48 | tb.dept_id, |
| 49 | 49 | sd.name AS dept_name, |
| 50 | 50 | tb.delivery_date, |
| 51 | 51 | tb.workshop_id, |
| 52 | 52 | ws.name AS workshop_name, |
| 53 | 53 | tb.order_no, |
| 54 | - tb.customer_short_name, | |
| 54 | + tb.ordering_unit, | |
| 55 | + cu.name AS ordering_unit_name, | |
| 55 | 56 | tb.destination, |
| 56 | 57 | tb.quantity, |
| 57 | 58 | tb.consignee, |
| ... | ... | @@ -76,6 +77,7 @@ |
| 76 | 77 | FROM request_car_ticket AS tb |
| 77 | 78 | left join sys_dept as sd on sd.id = tb.dept_id |
| 78 | 79 | left join base_data_workshop as ws on ws.id = tb.workshop_id |
| 80 | + left join base_data_customer as cu on cu.id = tb.ordering_unit | |
| 79 | 81 | left join sys_user as su on su.id = tb.external_auditor |
| 80 | 82 | left join sys_user as su1 on su1.id = tb.business_office_auditor |
| 81 | 83 | left join sys_user as su2 on su2.id = tb.operations_department_auditor |
| ... | ... | @@ -84,12 +86,12 @@ |
| 84 | 86 | <select id="query" resultMap="RequestCarTicket"> |
| 85 | 87 | <include refid="RequestCarTicket_sql"/> |
| 86 | 88 | <where> |
| 87 | - <if test="vo.requestCarDataStart != null"> | |
| 88 | - AND tb.request_car_data >= #{vo.requestCarDataStart} | |
| 89 | + <if test="vo.requestCarDateStart != null"> | |
| 90 | + AND tb.request_car_date >= #{vo.requestCarDateStart} | |
| 89 | 91 | </if> |
| 90 | - <if test="vo.requestCarDataEnd != null"> | |
| 92 | + <if test="vo.requestCarDateEnd != null"> | |
| 91 | 93 | <![CDATA[ |
| 92 | - AND tb.request_car_data <= #{vo.requestCarDataEnd} | |
| 94 | + AND tb.request_car_date <= #{vo.requestCarDateEnd} | |
| 93 | 95 | ]]> |
| 94 | 96 | </if> |
| 95 | 97 | <if test="vo.workshopId != null and vo.workshopId != ''"> |
| ... | ... | @@ -98,8 +100,8 @@ |
| 98 | 100 | <if test="vo.orderNo != null and vo.orderNo != ''"> |
| 99 | 101 | AND tb.order_no LIKE CONCAT('%', #{vo.orderNo},'%') |
| 100 | 102 | </if> |
| 101 | - <if test="vo.customerShortName != null and vo.customerShortName != ''"> | |
| 102 | - AND tb.customer_short_name LIKE CONCAT('%', #{vo.customerShortName},'%') | |
| 103 | + <if test="vo.orderingUnitName != null and vo.orderingUnitName != ''"> | |
| 104 | + AND cu.name LIKE CONCAT('%', #{vo.orderingUnitName},'%') | |
| 103 | 105 | </if> |
| 104 | 106 | <if test="vo.deptName != null and vo.deptName != ''"> |
| 105 | 107 | AND sd.name LIKE CONCAT('%', #{vo.deptName},'%') | ... | ... |
No preview for this file type