Commit e6518dab9e34cd912043f09be97ead5545ba7564

Authored by yeqianyong
2 parents 5915dd53 473dd986

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

Showing 32 changed files with 177 additions and 203 deletions
... ... @@ -401,6 +401,12 @@ public class GetContractDistributorStandardBo extends BaseBo<ContractDistributor
401 401 @ApiModelProperty(value = "双方盖章合同名称")
402 402 private String signedContractFileName;
403 403
  404 + /**
  405 + * 是否已完成锁价/锁规
  406 + */
  407 + @ApiModelProperty(value = "是否已完成锁价/锁规")
  408 + private Boolean priceSpecLocked;
  409 +
404 410 public GetContractDistributorStandardBo() {
405 411
406 412 }
... ...
... ... @@ -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
... ...
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 com.lframework.starter.common.constants.StringPool;
5 6 import com.lframework.starter.web.core.bo.BaseBo;
... ... @@ -33,13 +34,6 @@ public class GetDraftRequestCarTicketBo extends BaseBo<DraftRequestCarTicket> {
33 34 private String purchaseOrderId;
34 35
35 36 /**
36   - * 要车日期
37   - */
38   - @ApiModelProperty("要车日期")
39   - @JsonFormat(pattern = StringPool.DATE_PATTERN)
40   - private LocalDate requestCarData;
41   -
42   - /**
43 37 * 要车办事处
44 38 */
45 39 @ApiModelProperty("要车办事处")
... ... @@ -77,10 +71,16 @@ public class GetDraftRequestCarTicketBo extends BaseBo<DraftRequestCarTicket> {
77 71 private String orderNo;
78 72
79 73 /**
80   - * 客户名称【简称】
  74 + * 客户ID
  75 + */
  76 + @ApiModelProperty("订货单位ID")
  77 + private String orderingUnit;
  78 +
  79 + /**
  80 + * 客户名称
81 81 */
82   - @ApiModelProperty("客户名称【简称】")
83   - private String customerShortName;
  82 + @ApiModelProperty("订货单位名称")
  83 + private String orderingUnitName;
84 84
85 85 /**
86 86 * 卸货地点
... ... @@ -131,12 +131,6 @@ public class GetDraftRequestCarTicketBo extends BaseBo<DraftRequestCarTicket> {
131 131 private String externalAuditorName;
132 132
133 133 /**
134   - * 装货时间
135   - */
136   - @ApiModelProperty("装货时间")
137   - private String loadingTime;
138   -
139   - /**
140 134 * 装货特别要求/需求
141 135 */
142 136 @ApiModelProperty("装货特别要求/需求")
... ... @@ -178,6 +172,12 @@ public class GetDraftRequestCarTicketBo extends BaseBo<DraftRequestCarTicket> {
178 172 @ApiModelProperty("是否为草稿要车单创建人")
179 173 private boolean draftCreateBy;
180 174
  175 + /**
  176 + * 是否展示审核按钮
  177 + */
  178 + @TableField(exist = false)
  179 + private boolean showExamine;
  180 +
181 181 public GetDraftRequestCarTicketBo() {
182 182
183 183 }
... ...
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 * 卸货地点
... ...
... ... @@ -137,13 +137,13 @@ public class SpecLockDelayApplicationController extends DefaultBaseController {
137 137 SysDept sysDept = sysDeptMap.get(contractDistributorStandard.getDeptId());
138 138 Workshop workshop = workshopMap.get(contractDistributorStandard.getWorkshopId());
139 139 result.setContractCode(contractDistributorStandard.getCode());
140   - result.setDeptName(sysDept.getName());
  140 + result.setDeptName(sysDept == null ? "" : sysDept.getName());
141 141 result.setContractDocumentDate(contractDistributorStandard.getCreateTime().toLocalDate());
142 142 result.setOrderDate(contractDistributorStandard.getOrderDate());
143   - result.setCustomerName(customer.getName());
  143 + result.setCustomerName(customer == null ? "" : customer.getName());
144 144 result.setApprovalStatusName(auditName);
145 145 result.setContractType(contractDistributorStandard.getType());
146   - result.setWorkshopName(workshop.getName());
  146 + result.setWorkshopName(workshop == null ? "" : workshop.getName());
147 147 result.setTotalQuantity(contractDistributorStandard.getTotalQuantity());
148 148 });
149 149
... ... @@ -175,13 +175,13 @@ public class SpecLockDelayApplicationController extends DefaultBaseController {
175 175 SysDataDicItem sysDataDicItem = sysDataDicItemService.findByCode(AUDIT_STATUS_DIC_CODE, result.getApprovalStatus());
176 176 Workshop workshop = workshopService.findById(contractDistributorStandard.getWorkshopId());
177 177 result.setContractCode(contractDistributorStandard.getCode());
178   - result.setDeptName(sysDept.getName());
  178 + result.setDeptName(sysDept == null ? "" : sysDept.getName());
179 179 result.setContractDocumentDate(contractDistributorStandard.getCreateTime().toLocalDate());
180 180 result.setOrderDate(contractDistributorStandard.getOrderDate());
181   - result.setCustomerName(customer.getName());
  181 + result.setCustomerName(customer == null ? "" : customer.getName());
182 182 result.setApprovalStatusName(sysDataDicItem.getName());
183 183 result.setContractType(contractDistributorStandard.getType());
184   - result.setWorkshopName(workshop.getName());
  184 + result.setWorkshopName(workshop == null ? "" : workshop.getName());
185 185 result.setTotalQuantity(contractDistributorStandard.getTotalQuantity());
186 186
187 187 return InvokeResultBuilder.success(result);
... ...
... ... @@ -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
... ...
... ... @@ -34,7 +34,7 @@ public class CarRequestPlan extends BaseEntity implements BaseDto {
34 34 /**
35 35 * 要车日期
36 36 */
37   - private LocalDate requestCarData;
  37 + private LocalDate requestCarDate;
38 38
39 39 /**
40 40 * 装货厂别ID
... ...
... ... @@ -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 * 卸货地点
... ...
... ... @@ -175,26 +175,26 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic
175 175 private void handleReplenishmentOrderStatus(String flowStatus, String businessId) {
176 176 if (FlowInstanceStatus.APPROVE_PASS.getCode().equals(flowStatus)
177 177 || FlowInstanceStatus.FINISH.getCode().equals(flowStatus)) {
178   - specLockDelayApplicationService.updateAuditStatus(businessId, "PASS");
  178 + replenishmentOrderService.updateStatus(businessId, "PASS");
179 179 } else if (FlowInstanceStatus.REVOKE.getCode().equals(flowStatus)
180 180 || FlowInstanceStatus.REFUSE.getCode().equals(flowStatus)
181 181 || FlowInstanceStatus.TERMINATION.getCode().equals(flowStatus)) {
182   - specLockDelayApplicationService.updateAuditStatus(businessId, "REFUSE");
  182 + replenishmentOrderService.updateStatus(businessId, "REFUSE");
183 183 } else if (FlowInstanceStatus.UNDO.getCode().equals(flowStatus)) {
184   - specLockDelayApplicationService.updateAuditStatus(businessId, "REFUSE");
  184 + replenishmentOrderService.updateStatus(businessId, "REFUSE");
185 185 }
186 186 }
187 187
188 188 private void handleSpecLockDelayAuditData(String flowStatus, String businessId) {
189 189 if (FlowInstanceStatus.APPROVE_PASS.getCode().equals(flowStatus)
190 190 || FlowInstanceStatus.FINISH.getCode().equals(flowStatus)) {
191   - replenishmentOrderService.updateStatus(businessId, "PASS");
  191 + specLockDelayApplicationService.updateAuditStatus(businessId, "PASS");
192 192 } else if (FlowInstanceStatus.REVOKE.getCode().equals(flowStatus)
193 193 || FlowInstanceStatus.REFUSE.getCode().equals(flowStatus)
194 194 || FlowInstanceStatus.TERMINATION.getCode().equals(flowStatus)) {
195   - replenishmentOrderService.updateStatus(businessId, "REFUSE");
  195 + specLockDelayApplicationService.updateAuditStatus(businessId, "REFUSE");
196 196 } else if (FlowInstanceStatus.UNDO.getCode().equals(flowStatus)) {
197   - replenishmentOrderService.updateStatus(businessId, "REFUSE");
  197 + specLockDelayApplicationService.updateAuditStatus(businessId, "REFUSE");
198 198 }
199 199 }
200 200
... ...
... ... @@ -82,8 +82,9 @@ public class SpecLockDelayApplicationServiceImpl extends BaseMpServiceImpl<SpecL
82 82 // 获取当前人员的待办任务数据
83 83 List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId());
84 84 if (CollectionUtils.isEmpty(flowTaskList)) {
85   - return new PageResult<>();
  85 + return PageResultUtil.convert(new PageInfo<>(datas));
86 86 }
  87 +
87 88 List<String> ids = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList());
88 89 for (SpecLockDelayApplication specLockDelayApplication : datas) {
89 90 specLockDelayApplication.setShowExamine(ids.contains(specLockDelayApplication.getId()));
... ...
... ... @@ -128,7 +128,6 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM
128 128 return getBaseMapper().query(vo);
129 129 }
130 130
131   - @Cacheable(value = CustomerCredit.CACHE_NAME, key = "@cacheVariables.tenantId() + #id", unless = "#result == null")
132 131 @Override
133 132 public CustomerCredit findById(String id) {
134 133
... ... @@ -1561,7 +1560,6 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM
1561 1560 .orElseThrow(() -> new DefaultClientException("办事处 " + prefix + " 的编号已用尽 (001-999)"));
1562 1561 }
1563 1562
1564   - @CacheEvict(value = CustomerCredit.CACHE_NAME, key = "@cacheVariables.tenantId() + #key")
1565 1563 @Override
1566 1564 public void cleanCacheByKey(Serializable key) {
1567 1565
... ...
... ... @@ -378,6 +378,11 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde
378 378 .set(PurchaseOrderInfo::getStatus, "ISSUED")//已下发
379 379 .eq(PurchaseOrderInfo::getId, id);
380 380 getBaseMapper().update(updateWrapper);
  381 + } else if ("WAIT".equals(status)) {
  382 + LambdaUpdateWrapper<PurchaseOrderInfo> updateWrapper = Wrappers.lambdaUpdate(PurchaseOrderInfo.class)
  383 + .set(PurchaseOrderInfo::getStatus, status)
  384 + .eq(PurchaseOrderInfo::getId, id);
  385 + getBaseMapper().update(updateWrapper);
381 386 } else {
382 387 LambdaUpdateWrapper<PurchaseOrderInfo> updateWrapper = Wrappers.lambdaUpdate(PurchaseOrderInfo.class)
383 388 .set(PurchaseOrderInfo::getExamineStatus, status)
... ...
... ... @@ -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());
... ...
... ... @@ -22,6 +22,7 @@ import com.lframework.starter.web.core.utils.PageResultUtil;
22 22 import com.lframework.starter.web.inner.components.oplog.OtherOpLogType;
23 23 import com.lframework.xingyun.sc.entity.DraftRequestCarTicket;
24 24 import com.lframework.xingyun.sc.mappers.DraftRequestCarTicketMapper;
  25 +import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService;
25 26 import com.lframework.xingyun.sc.service.shipments.car.DraftRequestCarTicketService;
26 27 import com.lframework.xingyun.sc.vo.shipments.car.*;
27 28 import org.apache.commons.collections.CollectionUtils;
... ... @@ -41,6 +42,8 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq
41 42 private FlowInstanceWrapperService flowInstanceWrapperService;
42 43 @Resource
43 44 private FlowTaskWrapperMapper flowTaskWrapperMapper;
  45 + @Resource
  46 + private PurchaseOrderInfoService purchaseOrderInfoService;
44 47
45 48 @Override
46 49 public PageResult<DraftRequestCarTicket> query(Integer pageIndex, Integer pageSize, QueryDraftRequestCarTicketVo vo) {
... ... @@ -93,29 +96,29 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq
93 96 if (CollectionUtils.isNotEmpty(query)) {
94 97 return query.get(0).getId();
95 98 }
  99 + if (StringUtils.isNotEmpty(vo.getPurchaseOrderId())) {
  100 + purchaseOrderInfoService.updateStatus(vo.getPurchaseOrderId(), "WAIT");
  101 + }
96 102
97 103 DraftRequestCarTicket data = new DraftRequestCarTicket();
98 104 data.setId(IdUtil.getId());
99 105 if (!StringUtil.isBlank(vo.getPurchaseOrderId())) {
100 106 data.setPurchaseOrderId(vo.getPurchaseOrderId());
101 107 }
102   - if (vo.getRequestCarData() != null) {
103   - data.setRequestCarData(vo.getRequestCarData());
104   - }
105 108 if (!StringUtil.isBlank(vo.getDeptId())) {
106 109 data.setDeptId(vo.getDeptId());
107 110 }
108   -// if (vo.getDeliveryDate() != null) {
109   -// data.setDeliveryDate(vo.getDeliveryDate());
110   -// }
  111 + if (vo.getDeliveryDate() != null) {
  112 + data.setDeliveryDate(vo.getDeliveryDate());
  113 + }
111 114 if (!StringUtil.isBlank(vo.getWorkshopId())) {
112 115 data.setWorkshopId(vo.getWorkshopId());
113 116 }
114 117 if (!StringUtil.isBlank(vo.getOrderNo())) {
115 118 data.setOrderNo(vo.getOrderNo());
116 119 }
117   - if (!StringUtil.isBlank(vo.getCustomerShortName())) {
118   - data.setCustomerShortName(vo.getCustomerShortName());
  120 + if (!StringUtil.isBlank(vo.getOrderingUnit())) {
  121 + data.setOrderingUnit(vo.getOrderingUnit());
119 122 }
120 123 if (!StringUtil.isBlank(vo.getDestination())) {
121 124 data.setDestination(vo.getDestination());
... ... @@ -138,9 +141,6 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq
138 141 if (!StringUtil.isBlank(vo.getExternalAuditor())) {
139 142 data.setExternalAuditor(vo.getExternalAuditor());
140 143 }
141   -// if (!StringUtil.isBlank(vo.getLoadingTime())) {
142   -// data.setLoadingTime(vo.getLoadingTime());
143   -// }
144 144 if (!StringUtil.isBlank(vo.getSpecialLoadingRequirement())) {
145 145 data.setSpecialLoadingRequirement(vo.getSpecialLoadingRequirement());
146 146 }
... ... @@ -152,6 +152,8 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq
152 152 }
153 153 if (!StringUtil.isBlank(vo.getStatus())) {
154 154 data.setStatus(vo.getStatus());
  155 + } else {
  156 + data.setStatus("AUDIT");
155 157 }
156 158
157 159 getBaseMapper().insert(data);
... ... @@ -177,12 +179,11 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq
177 179
178 180 LambdaUpdateWrapper<DraftRequestCarTicket> updateWrapper = Wrappers.lambdaUpdate(DraftRequestCarTicket.class)
179 181 .set(DraftRequestCarTicket::getPurchaseOrderId, StringUtil.isBlank(vo.getPurchaseOrderId()) ? null : vo.getPurchaseOrderId())
180   - .set(DraftRequestCarTicket::getRequestCarData, vo.getRequestCarData() == null ? null : vo.getRequestCarData())
181 182 .set(DraftRequestCarTicket::getDeptId, StringUtil.isBlank(vo.getDeptId()) ? null : vo.getDeptId())
182   -// .set(DraftRequestCarTicket::getDeliveryDate, vo.getDeliveryDate() == null ? null : vo.getDeliveryDate())
  183 + .set(DraftRequestCarTicket::getDeliveryDate, vo.getDeliveryDate() == null ? null : vo.getDeliveryDate())
183 184 .set(DraftRequestCarTicket::getWorkshopId, StringUtil.isBlank(vo.getWorkshopId()) ? null : vo.getWorkshopId())
184 185 .set(DraftRequestCarTicket::getOrderNo, StringUtil.isBlank(vo.getOrderNo()) ? null : vo.getOrderNo())
185   - .set(DraftRequestCarTicket::getCustomerShortName, StringUtil.isBlank(vo.getCustomerShortName()) ? null : vo.getCustomerShortName())
  186 + .set(DraftRequestCarTicket::getOrderingUnit, StringUtil.isBlank(vo.getOrderingUnit()) ? null : vo.getOrderingUnit())
186 187 .set(DraftRequestCarTicket::getDestination, StringUtil.isBlank(vo.getDestination()) ? null : vo.getDestination())
187 188 .set(DraftRequestCarTicket::getQuantity, vo.getQuantity() == null ? null : vo.getQuantity())
188 189 .set(DraftRequestCarTicket::getConsignee, StringUtil.isBlank(vo.getConsignee()) ? null : vo.getConsignee())
... ... @@ -190,11 +191,10 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq
190 191 .set(DraftRequestCarTicket::getReturnPlanArrangement, StringUtil.isBlank(vo.getReturnPlanArrangement()) ? null : vo.getReturnPlanArrangement())
191 192 .set(DraftRequestCarTicket::getOther, StringUtil.isBlank(vo.getOther()) ? null : vo.getOther())
192 193 .set(DraftRequestCarTicket::getExternalAuditor, StringUtil.isBlank(vo.getExternalAuditor()) ? null : vo.getExternalAuditor())
193   -// .set(DraftRequestCarTicket::getLoadingTime, StringUtil.isBlank(vo.getLoadingTime()) ? null : vo.getLoadingTime())
194 194 .set(DraftRequestCarTicket::getSpecialLoadingRequirement, StringUtil.isBlank(vo.getSpecialLoadingRequirement()) ? null : vo.getSpecialLoadingRequirement())
195 195 .set(DraftRequestCarTicket::getBusinessOfficeAuditor, StringUtil.isBlank(vo.getBusinessOfficeAuditor()) ? null : vo.getBusinessOfficeAuditor())
196 196 .set(DraftRequestCarTicket::getOperationsDepartmentAuditor, StringUtil.isBlank(vo.getOperationsDepartmentAuditor()) ? null : vo.getOperationsDepartmentAuditor())
197   - .set(DraftRequestCarTicket::getStatus, StringUtil.isBlank(vo.getStatus()) ? null : vo.getStatus())
  197 + .set(DraftRequestCarTicket::getStatus, StringUtil.isBlank(vo.getStatus()) ? "AUDIT" : vo.getStatus())
198 198 .eq(DraftRequestCarTicket::getId, vo.getId());
199 199
200 200 getBaseMapper().update(updateWrapper);
... ...
... ... @@ -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"})
... ...
... ... @@ -18,7 +18,7 @@ public class CreateCarRequestPlanVo implements BaseVo, Serializable {
18 18 */
19 19 @ApiModelProperty("要车日期")
20 20 @TypeMismatch(message = "要车日期格式有误!")
21   - private LocalDate requestCarData;
  21 + private LocalDate requestCarDate;
22 22
23 23 /**
24 24 * 装货厂别
... ...
... ... @@ -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 /**
... ...
... ... @@ -26,7 +26,7 @@ public class UpdateCarRequestPlanVo implements BaseVo, Serializable {
26 26 */
27 27 @ApiModelProperty("要车日期")
28 28 @TypeMismatch(message = "要车日期格式有误!")
29   - private LocalDate requestCarData;
  29 + private LocalDate requestCarDate;
30 30
31 31 /**
32 32 * 装货厂别
... ...
... ... @@ -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 * 卸货地点
... ...
... ... @@ -53,6 +53,7 @@
53 53 </foreach>
54 54 </if>
55 55 </where>
  56 + order by create_time desc
56 57 </select>
57 58
58 59 <select id="selectLatestPassedByContractIds" resultMap="SpecLockDelayApplication">
... ...
... ... @@ -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},'%')
... ... @@ -107,7 +98,7 @@
107 98 AND tb.purchase_order_id = #{vo.purchaseOrderId}
108 99 </if>
109 100 </where>
110   - ORDER BY tb.update_time DESC
  101 + ORDER BY tb.create_time DESC
111 102 </select>
112 103
113 104 <select id="findById" resultType="com.lframework.xingyun.sc.entity.DraftRequestCarTicket">
... ...
... ... @@ -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},'%')
... ... @@ -111,7 +113,7 @@
111 113 AND tb.plan_id = #{vo.planId}
112 114 </if>
113 115 </where>
114   - ORDER BY tb.update_time DESC
  116 + ORDER BY tb.create_time DESC
115 117 </select>
116 118
117 119 <select id="findById" resultType="com.lframework.xingyun.sc.entity.RequestCarTicket">
... ...