Commit a9cfb21ae42d45b1cf3e84ffccc6ffad515e9a2d
Merge branch 'master_after0506' into master_after0506_0626
# Conflicts: # xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/contract/GetContractDistributorStandardBo.java # xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/contract/QueryContractDistributorStandardBo.java # xingyun-sc/src/main/java/com/lframework/xingyun/sc/entity/ContractDistributorStandard.java # xingyun-sc/src/main/java/com/lframework/xingyun/sc/impl/contract/ContractDistributorStandardServiceImpl.java
Showing
10 changed files
with
94 additions
and
154 deletions
xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/contract/GetContractDistributorStandardBo.java
| @@ -504,12 +504,6 @@ public class GetContractDistributorStandardBo extends BaseBo<ContractDistributor | @@ -504,12 +504,6 @@ public class GetContractDistributorStandardBo extends BaseBo<ContractDistributor | ||
| 504 | private Boolean canCreateChange; | 504 | private Boolean canCreateChange; |
| 505 | 505 | ||
| 506 | /** | 506 | /** |
| 507 | - * 是否可锁价 | ||
| 508 | - */ | ||
| 509 | - @ApiModelProperty(value = "是否可锁价") | ||
| 510 | - private Boolean canPriceLock; | ||
| 511 | - | ||
| 512 | - /** | ||
| 513 | * 是否可锁规 | 507 | * 是否可锁规 |
| 514 | */ | 508 | */ |
| 515 | @ApiModelProperty(value = "是否可锁规") | 509 | @ApiModelProperty(value = "是否可锁规") |
| @@ -522,6 +516,12 @@ public class GetContractDistributorStandardBo extends BaseBo<ContractDistributor | @@ -522,6 +516,12 @@ public class GetContractDistributorStandardBo extends BaseBo<ContractDistributor | ||
| 522 | private Boolean canCreateSpecLockDelay; | 516 | private Boolean canCreateSpecLockDelay; |
| 523 | 517 | ||
| 524 | /** | 518 | /** |
| 519 | + * 是否可锁价 | ||
| 520 | + */ | ||
| 521 | + @ApiModelProperty(value = "是否可锁价") | ||
| 522 | + private Boolean canPriceLock; | ||
| 523 | + | ||
| 524 | + /** | ||
| 525 | * 创建人 | 525 | * 创建人 |
| 526 | */ | 526 | */ |
| 527 | @ApiModelProperty(value = "创建人") | 527 | @ApiModelProperty(value = "创建人") |
| @@ -277,12 +277,6 @@ public class QueryContractDistributorStandardBo extends BaseBo<ContractDistribut | @@ -277,12 +277,6 @@ public class QueryContractDistributorStandardBo extends BaseBo<ContractDistribut | ||
| 277 | private Boolean canCreateChange; | 277 | private Boolean canCreateChange; |
| 278 | 278 | ||
| 279 | /** | 279 | /** |
| 280 | - * 是否可锁价 | ||
| 281 | - */ | ||
| 282 | - @ApiModelProperty(value = "是否可锁价") | ||
| 283 | - private Boolean canPriceLock; | ||
| 284 | - | ||
| 285 | - /** | ||
| 286 | * 是否可锁规 | 280 | * 是否可锁规 |
| 287 | */ | 281 | */ |
| 288 | @ApiModelProperty(value = "是否可锁规") | 282 | @ApiModelProperty(value = "是否可锁规") |
| @@ -294,6 +288,12 @@ public class QueryContractDistributorStandardBo extends BaseBo<ContractDistribut | @@ -294,6 +288,12 @@ public class QueryContractDistributorStandardBo extends BaseBo<ContractDistribut | ||
| 294 | @ApiModelProperty(value = "是否可发起锁规延期申请") | 288 | @ApiModelProperty(value = "是否可发起锁规延期申请") |
| 295 | private Boolean canCreateSpecLockDelay; | 289 | private Boolean canCreateSpecLockDelay; |
| 296 | 290 | ||
| 291 | + /** | ||
| 292 | + * 是否可锁价 | ||
| 293 | + */ | ||
| 294 | + @ApiModelProperty(value = "是否可锁价") | ||
| 295 | + private Boolean canPriceLock; | ||
| 296 | + | ||
| 297 | 297 | ||
| 298 | public QueryContractDistributorStandardBo() { | 298 | public QueryContractDistributorStandardBo() { |
| 299 | 299 |
| 1 | package com.lframework.xingyun.sc.bo.order; | 1 | package com.lframework.xingyun.sc.bo.order; |
| 2 | 2 | ||
| 3 | +import com.baomidou.mybatisplus.annotation.FieldFill; | ||
| 3 | import com.baomidou.mybatisplus.annotation.TableField; | 4 | import com.baomidou.mybatisplus.annotation.TableField; |
| 4 | import com.fasterxml.jackson.annotation.JsonFormat; | 5 | import com.fasterxml.jackson.annotation.JsonFormat; |
| 5 | import com.lframework.starter.common.constants.StringPool; | 6 | import com.lframework.starter.common.constants.StringPool; |
| @@ -7,6 +8,7 @@ import com.lframework.starter.web.core.bo.BaseBo; | @@ -7,6 +8,7 @@ import com.lframework.starter.web.core.bo.BaseBo; | ||
| 7 | 8 | ||
| 8 | import java.math.BigDecimal; | 9 | import java.math.BigDecimal; |
| 9 | import java.time.LocalDate; | 10 | import java.time.LocalDate; |
| 11 | +import java.time.LocalDateTime; | ||
| 10 | import java.util.List; | 12 | import java.util.List; |
| 11 | 13 | ||
| 12 | import com.lframework.xingyun.sc.entity.PurchaseOrderInfo; | 14 | import com.lframework.xingyun.sc.entity.PurchaseOrderInfo; |
| @@ -350,6 +352,12 @@ public class GetPurchaseOrderInfoBo extends BaseBo<PurchaseOrderInfo> { | @@ -350,6 +352,12 @@ public class GetPurchaseOrderInfoBo extends BaseBo<PurchaseOrderInfo> { | ||
| 350 | @ApiModelProperty("是否展示上传按钮") | 352 | @ApiModelProperty("是否展示上传按钮") |
| 351 | private boolean showUpload = false; | 353 | private boolean showUpload = false; |
| 352 | 354 | ||
| 355 | + /** | ||
| 356 | + * 创建时间 | ||
| 357 | + */ | ||
| 358 | + @ApiModelProperty("创建时间") | ||
| 359 | + private LocalDateTime createTime; | ||
| 360 | + | ||
| 353 | 361 | ||
| 354 | public GetPurchaseOrderInfoBo() { | 362 | public GetPurchaseOrderInfoBo() { |
| 355 | 363 |
| @@ -266,6 +266,11 @@ public class OrderChangeRecordBo extends BaseBo<OrderInfoChangeRecord> { | @@ -266,6 +266,11 @@ public class OrderChangeRecordBo extends BaseBo<OrderInfoChangeRecord> { | ||
| 266 | @ApiModelProperty("合同类型") | 266 | @ApiModelProperty("合同类型") |
| 267 | private String contractType; | 267 | private String contractType; |
| 268 | 268 | ||
| 269 | + /** | ||
| 270 | + * 订货单状态 | ||
| 271 | + */ | ||
| 272 | + @ApiModelProperty("订货单状态") | ||
| 273 | + private String status; | ||
| 269 | 274 | ||
| 270 | public OrderChangeRecordBo() { | 275 | public OrderChangeRecordBo() { |
| 271 | 276 |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/order/OrderChangeRecordController.java
| @@ -107,6 +107,7 @@ public class OrderChangeRecordController extends DefaultBaseController { | @@ -107,6 +107,7 @@ public class OrderChangeRecordController extends DefaultBaseController { | ||
| 107 | result.setContractType(contractDistributorStandard.getType()); | 107 | result.setContractType(contractDistributorStandard.getType()); |
| 108 | } | 108 | } |
| 109 | } | 109 | } |
| 110 | + result.setStatus(purchaseOrderInfo.getStatus()); | ||
| 110 | } | 111 | } |
| 111 | 112 | ||
| 112 | return InvokeResultBuilder.success(result); | 113 | return InvokeResultBuilder.success(result); |
| @@ -442,9 +443,17 @@ public class OrderChangeRecordController extends DefaultBaseController { | @@ -442,9 +443,17 @@ public class OrderChangeRecordController extends DefaultBaseController { | ||
| 442 | return true; | 443 | return true; |
| 443 | } | 444 | } |
| 444 | return "UPDATE".equals(line.getType()) && (line.getBrandChange() | 445 | return "UPDATE".equals(line.getType()) && (line.getBrandChange() |
| 446 | + || line.getIndustryChange() | ||
| 447 | + || line.getQualityChange() | ||
| 445 | || line.getLengthChange() | 448 | || line.getLengthChange() |
| 449 | + || line.getLengthTolNegChange() | ||
| 450 | + || line.getLengthTolPosChange() | ||
| 446 | || line.getWidthChange() | 451 | || line.getWidthChange() |
| 452 | + || line.getWidthTolNegChange() | ||
| 453 | + || line.getWidthTolPosChange() | ||
| 447 | || line.getThicknessChange() | 454 | || line.getThicknessChange() |
| 455 | + || line.getThicknessTolNegChange() | ||
| 456 | + || line.getThicknessTolPosChange() | ||
| 448 | || line.getStatusChange() | 457 | || line.getStatusChange() |
| 449 | || line.getQuantityChange() | 458 | || line.getQuantityChange() |
| 450 | || line.getSalesPriceChange() | 459 | || line.getSalesPriceChange() |
| @@ -385,12 +385,6 @@ public class ContractDistributorStandard extends BaseEntity implements BaseDto { | @@ -385,12 +385,6 @@ public class ContractDistributorStandard extends BaseEntity implements BaseDto { | ||
| 385 | private Boolean canCreateChange; | 385 | private Boolean canCreateChange; |
| 386 | 386 | ||
| 387 | /** | 387 | /** |
| 388 | - * 是否可锁价 | ||
| 389 | - */ | ||
| 390 | - @TableField(exist = false) | ||
| 391 | - private Boolean canPriceLock; | ||
| 392 | - | ||
| 393 | - /** | ||
| 394 | * 是否可锁规 | 388 | * 是否可锁规 |
| 395 | */ | 389 | */ |
| 396 | @TableField(exist = false) | 390 | @TableField(exist = false) |
| @@ -403,6 +397,12 @@ public class ContractDistributorStandard extends BaseEntity implements BaseDto { | @@ -403,6 +397,12 @@ public class ContractDistributorStandard extends BaseEntity implements BaseDto { | ||
| 403 | private Boolean canCreateSpecLockDelay; | 397 | private Boolean canCreateSpecLockDelay; |
| 404 | 398 | ||
| 405 | /** | 399 | /** |
| 400 | + * 是否可锁价 | ||
| 401 | + */ | ||
| 402 | + @TableField(exist = false) | ||
| 403 | + private Boolean canPriceLock; | ||
| 404 | + | ||
| 405 | + /** | ||
| 406 | * 剩余锁规数量 | 406 | * 剩余锁规数量 |
| 407 | */ | 407 | */ |
| 408 | @TableField(exist = false) | 408 | @TableField(exist = false) |
| @@ -224,7 +224,8 @@ public class ContractDistributorStandardServiceImpl extends | @@ -224,7 +224,8 @@ public class ContractDistributorStandardServiceImpl extends | ||
| 224 | public List<ContractDistributorStandard> query(QueryContractDistributorStandardVo vo) { | 224 | public List<ContractDistributorStandard> query(QueryContractDistributorStandardVo vo) { |
| 225 | 225 | ||
| 226 | List<ContractDistributorStandard> datas = getBaseMapper().query(vo); | 226 | List<ContractDistributorStandard> datas = getBaseMapper().query(vo); |
| 227 | - CollectionUtils.emptyIfNull(datas).forEach(this::fillContractOperationPermissions); | 227 | + CollectionUtils.emptyIfNull(datas).forEach(data -> data.setCanSplit(isCanSplit(data))); |
| 228 | + fillCanPriceLock(datas); | ||
| 228 | return datas; | 229 | return datas; |
| 229 | } | 230 | } |
| 230 | 231 | ||
| @@ -245,7 +246,7 @@ public class ContractDistributorStandardServiceImpl extends | @@ -245,7 +246,7 @@ public class ContractDistributorStandardServiceImpl extends | ||
| 245 | } | 246 | } |
| 246 | data.setCanEdit(canEdit); | 247 | data.setCanEdit(canEdit); |
| 247 | fillRemainingQuantity(data); | 248 | fillRemainingQuantity(data); |
| 248 | - fillContractOperationPermissions(data); | 249 | + fillCanPriceLock(data); |
| 249 | 250 | ||
| 250 | // 获取当前人员的待办任务数据 | 251 | // 获取当前人员的待办任务数据 |
| 251 | List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); | 252 | List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); |
| @@ -316,50 +317,43 @@ public class ContractDistributorStandardServiceImpl extends | @@ -316,50 +317,43 @@ public class ContractDistributorStandardServiceImpl extends | ||
| 316 | } | 317 | } |
| 317 | 318 | ||
| 318 | /** | 319 | /** |
| 319 | - * 填充合同操作权限字段 | 320 | + * 批量回填是否可锁价 |
| 320 | * | 321 | * |
| 321 | - * @param data 合同 | 322 | + * @param datas 合同列表 |
| 322 | */ | 323 | */ |
| 323 | - private void fillContractOperationPermissions(ContractDistributorStandard data) { | ||
| 324 | - if (data == null) { | 324 | + private void fillCanPriceLock(List<ContractDistributorStandard> datas) { |
| 325 | + if (CollectionUtils.isEmpty(datas)) { | ||
| 325 | return; | 326 | return; |
| 326 | } | 327 | } |
| 327 | - data.setCanSplit(isCanSplit(data)); | ||
| 328 | - data.setCanCreateChange(isCanCreateChange(data)); | ||
| 329 | - data.setCanPriceLock(isCanPriceLock(data)); | ||
| 330 | - data.setCanSpecLock(isCanSpecLock(data)); | ||
| 331 | - data.setCanCreateSpecLockDelay(isCanCreateSpecLockDelay(data)); | 328 | + |
| 329 | + List<ContractDistributorStandard> inventoryContracts = CollectionUtils.emptyIfNull(datas).stream() | ||
| 330 | + .filter(Objects::nonNull) | ||
| 331 | + .filter(this::isInventoryContract) | ||
| 332 | + .collect(Collectors.toList()); | ||
| 333 | + if (CollectionUtils.isEmpty(inventoryContracts)) { | ||
| 334 | + CollectionUtils.emptyIfNull(datas).stream() | ||
| 335 | + .filter(Objects::nonNull) | ||
| 336 | + .forEach(data -> data.setCanPriceLock(false)); | ||
| 337 | + return; | ||
| 338 | + } | ||
| 339 | + | ||
| 340 | + CollectionUtils.emptyIfNull(datas).stream() | ||
| 341 | + .filter(Objects::nonNull) | ||
| 342 | + .forEach(data -> data.setCanPriceLock( | ||
| 343 | + isCanPriceLock(data))); | ||
| 332 | } | 344 | } |
| 333 | 345 | ||
| 334 | /** | 346 | /** |
| 335 | - * 判断是否可发起合同变更 | 347 | + * 回填是否可锁价 |
| 336 | * | 348 | * |
| 337 | * @param data 合同 | 349 | * @param data 合同 |
| 338 | - * @return 是否可发起合同变更 | ||
| 339 | */ | 350 | */ |
| 340 | - private boolean isCanCreateChange(ContractDistributorStandard data) { | ||
| 341 | - if (data == null || StringUtils.isBlank(data.getType()) || StringUtils.isBlank(data.getStatus())) { | ||
| 342 | - return false; | ||
| 343 | - } | ||
| 344 | - if (hasUnfinishedContractChange(data) || hasUnfinishedSpecLockDelay(data)) { | ||
| 345 | - return false; | ||
| 346 | - } | ||
| 347 | - if ("DISTRIB_STD".equals(data.getType()) | ||
| 348 | - || "DRAFT_DIST_AGMT".equals(data.getType()) | ||
| 349 | - || "INTL_STD_CONTRACT".equals(data.getType()) | ||
| 350 | - || "INTL_OPEN_SPEC_AGMT".equals(data.getType()) | ||
| 351 | - || "PROCESS_STD_AGMT".equals(data.getType())) { | ||
| 352 | - return "STANDARD".equals(data.getStatus()) && CustomerDevelopStatus.PASS.name().equals(data.getStandardApproved()); | ||
| 353 | - } | ||
| 354 | - if ("DIST_STOCK_CONTRACT".equals(data.getType()) || "INTL_INVENTORY_AGMT".equals(data.getType())) { | ||
| 355 | - if ("FORMAL".equals(data.getStatus())) { | ||
| 356 | - return CustomerDevelopStatus.PASS.name().equals(data.getFormalApproved()); | ||
| 357 | - } | ||
| 358 | - if ("STANDARD".equals(data.getStatus())) { | ||
| 359 | - return CustomerDevelopStatus.PASS.name().equals(data.getStandardApproved()); | ||
| 360 | - } | 351 | + private void fillCanPriceLock(ContractDistributorStandard data) { |
| 352 | + if (data == null || StringUtils.isBlank(data.getId())) { | ||
| 353 | + return; | ||
| 361 | } | 354 | } |
| 362 | - return false; | 355 | + |
| 356 | + data.setCanPriceLock(isCanPriceLock(data)); | ||
| 363 | } | 357 | } |
| 364 | 358 | ||
| 365 | /** | 359 | /** |
| @@ -369,111 +363,24 @@ public class ContractDistributorStandardServiceImpl extends | @@ -369,111 +363,24 @@ public class ContractDistributorStandardServiceImpl extends | ||
| 369 | * @return 是否可锁价 | 363 | * @return 是否可锁价 |
| 370 | */ | 364 | */ |
| 371 | private boolean isCanPriceLock(ContractDistributorStandard data) { | 365 | private boolean isCanPriceLock(ContractDistributorStandard data) { |
| 372 | - if (data == null) { | ||
| 373 | - return false; | ||
| 374 | - } | ||
| 375 | - if (!"DIST_STOCK_CONTRACT".equals(data.getType()) && !"INTL_INVENTORY_AGMT".equals(data.getType())) { | ||
| 376 | - return false; | ||
| 377 | - } | ||
| 378 | - if (!"FORMAL".equals(data.getStatus())) { | ||
| 379 | - return false; | ||
| 380 | - } | ||
| 381 | - if (!CustomerDevelopStatus.PASS.name().equals(data.getFormalApproved())) { | ||
| 382 | - return false; | ||
| 383 | - } | ||
| 384 | - if (Boolean.TRUE.equals(data.getPriceSpecLocked())) { | ||
| 385 | - return false; | ||
| 386 | - } | ||
| 387 | - if (hasUnfinishedContractChange(data)) { | ||
| 388 | - return false; | ||
| 389 | - } | ||
| 390 | - Wrapper<PurchaseOrderInfo> orderInfoWrapper = Wrappers.lambdaQuery(PurchaseOrderInfo.class) | ||
| 391 | - .eq(PurchaseOrderInfo::getContractId, data.getId()) | ||
| 392 | - .eq(PurchaseOrderInfo::getType, "PRODUCTION") | ||
| 393 | - .eq(PurchaseOrderInfo::getExamineStatus, CustomerDevelopStatus.PASS.name()); | ||
| 394 | - return purchaseOrderInfoService.count(orderInfoWrapper) > 0; | ||
| 395 | - } | ||
| 396 | - | ||
| 397 | - /** | ||
| 398 | - * 判断是否可锁规 | ||
| 399 | - * | ||
| 400 | - * @param data 合同 | ||
| 401 | - * @return 是否可锁规 | ||
| 402 | - */ | ||
| 403 | - private boolean isCanSpecLock(ContractDistributorStandard data) { | ||
| 404 | - if (data == null) { | ||
| 405 | - return false; | ||
| 406 | - } | ||
| 407 | - if (!"DRAFT_DIST_AGMT".equals(data.getType()) && !"INTL_OPEN_SPEC_AGMT".equals(data.getType())) { | ||
| 408 | - return false; | ||
| 409 | - } | ||
| 410 | - if (!"STANDARD".equals(data.getStatus())) { | ||
| 411 | - return false; | ||
| 412 | - } | ||
| 413 | - if (!CustomerDevelopStatus.PASS.name().equals(data.getStandardApproved())) { | 366 | + if (!isInventoryContract(data)) { |
| 414 | return false; | 367 | return false; |
| 415 | } | 368 | } |
| 416 | if (Boolean.TRUE.equals(data.getPriceSpecLocked())) { | 369 | if (Boolean.TRUE.equals(data.getPriceSpecLocked())) { |
| 417 | return false; | 370 | return false; |
| 418 | } | 371 | } |
| 419 | - return !hasUnfinishedContractChange(data); | ||
| 420 | - } | ||
| 421 | - | ||
| 422 | - /** | ||
| 423 | - * 判断是否可发起锁规延期申请 | ||
| 424 | - * | ||
| 425 | - * @param data 合同 | ||
| 426 | - * @return 是否可发起锁规延期申请 | ||
| 427 | - */ | ||
| 428 | - private boolean isCanCreateSpecLockDelay(ContractDistributorStandard data) { | ||
| 429 | - if (!isCanSpecLock(data)) { | ||
| 430 | - return false; | ||
| 431 | - } | ||
| 432 | - return !hasUnfinishedSpecLockDelay(data); | ||
| 433 | - } | ||
| 434 | - | ||
| 435 | - /** | ||
| 436 | - * 是否存在未结束的合同变更 | ||
| 437 | - * | ||
| 438 | - * @param data 合同 | ||
| 439 | - * @return 是否存在未结束的合同变更 | ||
| 440 | - */ | ||
| 441 | - private boolean hasUnfinishedContractChange(ContractDistributorStandard data) { | ||
| 442 | - if (data == null) { | ||
| 443 | - return false; | ||
| 444 | - } | ||
| 445 | - String rootContractId = StringUtils.isBlank(data.getParentId()) ? data.getId() : data.getParentId(); | ||
| 446 | - return contractChangeApplicationService.hasUnfinishedApplication(rootContractId); | 372 | + return true; |
| 447 | } | 373 | } |
| 448 | 374 | ||
| 449 | /** | 375 | /** |
| 450 | - * 是否存在未结束的锁规延期申请 | 376 | + * 判断是否为库存合同 |
| 451 | * | 377 | * |
| 452 | * @param data 合同 | 378 | * @param data 合同 |
| 453 | - * @return 是否存在未结束的锁规延期申请 | 379 | + * @return 是否为库存合同 |
| 454 | */ | 380 | */ |
| 455 | - private boolean hasUnfinishedSpecLockDelay(ContractDistributorStandard data) { | ||
| 456 | - if (data == null) { | ||
| 457 | - return false; | ||
| 458 | - } | ||
| 459 | - String rootContractId = StringUtils.isBlank(data.getParentId()) ? data.getId() : data.getParentId(); | ||
| 460 | - Wrapper<ContractDistributorStandard> contractWrapper = Wrappers.lambdaQuery(ContractDistributorStandard.class) | ||
| 461 | - .select(ContractDistributorStandard::getId) | ||
| 462 | - .eq(ContractDistributorStandard::getId, rootContractId) | ||
| 463 | - .or() | ||
| 464 | - .eq(ContractDistributorStandard::getParentId, rootContractId); | ||
| 465 | - List<String> contractIds = CollectionUtils.emptyIfNull(getBaseMapper().selectList(contractWrapper)) | ||
| 466 | - .stream() | ||
| 467 | - .map(ContractDistributorStandard::getId) | ||
| 468 | - .collect(Collectors.toList()); | ||
| 469 | - if (!contractIds.contains(rootContractId)) { | ||
| 470 | - contractIds.add(rootContractId); | ||
| 471 | - } | ||
| 472 | - Wrapper<SpecLockDelayApplication> wrapper = Wrappers.lambdaQuery(SpecLockDelayApplication.class) | ||
| 473 | - .in(SpecLockDelayApplication::getContractId, contractIds) | ||
| 474 | - .notIn(SpecLockDelayApplication::getApprovalStatus, | ||
| 475 | - Arrays.asList(CustomerDevelopStatus.PASS.name(), CustomerDevelopStatus.CANCEL.name())); | ||
| 476 | - return specLockDelayApplicationMapper.selectCount(wrapper) > 0; | 381 | + private boolean isInventoryContract(ContractDistributorStandard data) { |
| 382 | + return data != null && ("DIST_STOCK_CONTRACT".equals(data.getType()) | ||
| 383 | + || "INTL_INVENTORY_AGMT".equals(data.getType())); | ||
| 477 | } | 384 | } |
| 478 | 385 | ||
| 479 | @OpLog(type = OtherOpLogType.class, name = "新增合同,ID:{}", params = {"#id"}) | 386 | @OpLog(type = OtherOpLogType.class, name = "新增合同,ID:{}", params = {"#id"}) |
| @@ -1459,9 +1366,6 @@ public class ContractDistributorStandardServiceImpl extends | @@ -1459,9 +1366,6 @@ public class ContractDistributorStandardServiceImpl extends | ||
| 1459 | if (ObjectUtil.isNull(data)) { | 1366 | if (ObjectUtil.isNull(data)) { |
| 1460 | throw new DefaultClientException("合同不存在!"); | 1367 | throw new DefaultClientException("合同不存在!"); |
| 1461 | } | 1368 | } |
| 1462 | - if (!isCanPriceLock(data)) { | ||
| 1463 | - throw new DefaultClientException("当前合同存在未结束的合同变更流程,或未满足锁价条件,不允许锁价!"); | ||
| 1464 | - } | ||
| 1465 | 1369 | ||
| 1466 | List<UpdateContractDistributorLineVo> lineVoList = vo.getContractDistributorLineList(); | 1370 | List<UpdateContractDistributorLineVo> lineVoList = vo.getContractDistributorLineList(); |
| 1467 | if (CollectionUtils.isEmpty(lineVoList)) { | 1371 | if (CollectionUtils.isEmpty(lineVoList)) { |
| @@ -1590,9 +1494,6 @@ public class ContractDistributorStandardServiceImpl extends | @@ -1590,9 +1494,6 @@ public class ContractDistributorStandardServiceImpl extends | ||
| 1590 | if (ObjectUtil.isNull(data)) { | 1494 | if (ObjectUtil.isNull(data)) { |
| 1591 | throw new DefaultClientException("合同不存在!"); | 1495 | throw new DefaultClientException("合同不存在!"); |
| 1592 | } | 1496 | } |
| 1593 | - if (!isCanSpecLock(data)) { | ||
| 1594 | - throw new DefaultClientException("当前合同存在未结束的合同变更流程,或未满足锁规条件,不允许锁规!"); | ||
| 1595 | - } | ||
| 1596 | 1497 | ||
| 1597 | List<UpdateContractDistributorLineVo> lineVoList = vo.getContractDistributorLineList(); | 1498 | List<UpdateContractDistributorLineVo> lineVoList = vo.getContractDistributorLineList(); |
| 1598 | if (CollectionUtils.isEmpty(lineVoList)) { | 1499 | if (CollectionUtils.isEmpty(lineVoList)) { |
| @@ -409,6 +409,7 @@ public class OrderChangeRecordServiceImpl extends BaseMpServiceImpl<OrderChangeR | @@ -409,6 +409,7 @@ public class OrderChangeRecordServiceImpl extends BaseMpServiceImpl<OrderChangeR | ||
| 409 | List<PurchaseOrderLine> afterChangeSpecList = record.getAfterChangeSpecList(); | 409 | List<PurchaseOrderLine> afterChangeSpecList = record.getAfterChangeSpecList(); |
| 410 | if (CollectionUtils.isNotEmpty(afterChangeSpecList)) { | 410 | if (CollectionUtils.isNotEmpty(afterChangeSpecList)) { |
| 411 | orderInfo.setStockUpCompanyName(purchaseOrderInfo.getStockUpCompanyName()); | 411 | orderInfo.setStockUpCompanyName(purchaseOrderInfo.getStockUpCompanyName()); |
| 412 | + orderInfo.setType(purchaseOrderInfo.getType()); | ||
| 412 | for (PurchaseOrderLine line : afterChangeSpecList) { | 413 | for (PurchaseOrderLine line : afterChangeSpecList) { |
| 413 | createOrderDetailReport(line, orderDetailReport, orderInfo, standard, null | 414 | createOrderDetailReport(line, orderDetailReport, orderInfo, standard, null |
| 414 | , purchaseOrderInfo.getContractCreateById()); | 415 | , purchaseOrderInfo.getContractCreateById()); |
| @@ -514,6 +515,7 @@ public class OrderChangeRecordServiceImpl extends BaseMpServiceImpl<OrderChangeR | @@ -514,6 +515,7 @@ public class OrderChangeRecordServiceImpl extends BaseMpServiceImpl<OrderChangeR | ||
| 514 | PurchaseOrderInfo orderInfo, ContractDistributorStandard standard, String type1, | 515 | PurchaseOrderInfo orderInfo, ContractDistributorStandard standard, String type1, |
| 515 | String contractCreateById) { | 516 | String contractCreateById) { |
| 516 | CreateOrderDetailReportVo vo = new CreateOrderDetailReportVo(); | 517 | CreateOrderDetailReportVo vo = new CreateOrderDetailReportVo(); |
| 518 | + vo.setOrderingUnitName(orderDetailReport.getOrderingUnitName()); | ||
| 517 | if ("offset".equals(type1)) { | 519 | if ("offset".equals(type1)) { |
| 518 | vo.setPurchaseOrderLineId(line.getId()); | 520 | vo.setPurchaseOrderLineId(line.getId()); |
| 519 | vo.setQuantity(line.getQuantity().negate()); | 521 | vo.setQuantity(line.getQuantity().negate()); |
| @@ -524,13 +526,13 @@ public class OrderChangeRecordServiceImpl extends BaseMpServiceImpl<OrderChangeR | @@ -524,13 +526,13 @@ public class OrderChangeRecordServiceImpl extends BaseMpServiceImpl<OrderChangeR | ||
| 524 | vo.setPurchaseOrderLineId(line.getId()); | 526 | vo.setPurchaseOrderLineId(line.getId()); |
| 525 | } | 527 | } |
| 526 | vo.setQuantity(line.getQuantity()); | 528 | vo.setQuantity(line.getQuantity()); |
| 529 | + vo.setOrderingUnitName(orderInfo.getOrderingUnitName()); | ||
| 527 | } | 530 | } |
| 528 | vo.setOrderNo(orderDetailReport.getOrderNo()); | 531 | vo.setOrderNo(orderDetailReport.getOrderNo()); |
| 529 | vo.setOrderDate(orderDetailReport.getOrderDate()); | 532 | vo.setOrderDate(orderDetailReport.getOrderDate()); |
| 530 | vo.setWorkshopId(orderDetailReport.getWorkshopId()); | 533 | vo.setWorkshopId(orderDetailReport.getWorkshopId()); |
| 531 | vo.setDeptName(orderDetailReport.getDeptName()); | 534 | vo.setDeptName(orderDetailReport.getDeptName()); |
| 532 | vo.setRegionName(orderDetailReport.getRegionName()); | 535 | vo.setRegionName(orderDetailReport.getRegionName()); |
| 533 | - vo.setOrderingUnitName(orderDetailReport.getOrderingUnitName()); | ||
| 534 | vo.setIndustry(line.getIndustry()); | 536 | vo.setIndustry(line.getIndustry()); |
| 535 | vo.setBrand(line.getBrand()); | 537 | vo.setBrand(line.getBrand()); |
| 536 | vo.setThickness(line.getThickness()); | 538 | vo.setThickness(line.getThickness()); |
| @@ -168,4 +168,11 @@ public class QueryPurchaseOrderInfoVo extends PageVo implements BaseVo, Serializ | @@ -168,4 +168,11 @@ public class QueryPurchaseOrderInfoVo extends PageVo implements BaseVo, Serializ | ||
| 168 | */ | 168 | */ |
| 169 | @ApiModelProperty("导出类型") | 169 | @ApiModelProperty("导出类型") |
| 170 | private String templateType; | 170 | private String templateType; |
| 171 | + | ||
| 172 | + /** | ||
| 173 | + * 操作时间 | ||
| 174 | + */ | ||
| 175 | + @ApiModelProperty("操作时间") | ||
| 176 | + private String createTimeStart; | ||
| 177 | + private String createTimeEnd; | ||
| 171 | } | 178 | } |
| @@ -204,6 +204,14 @@ | @@ -204,6 +204,14 @@ | ||
| 204 | #{id} | 204 | #{id} |
| 205 | </foreach> | 205 | </foreach> |
| 206 | </if> | 206 | </if> |
| 207 | + <if test="vo.createTimeStart != null"> | ||
| 208 | + AND tb.create_time >= #{vo.createTimeStart} | ||
| 209 | + </if> | ||
| 210 | + <if test="vo.createTimeEnd != null"> | ||
| 211 | + <![CDATA[ | ||
| 212 | + AND tb.create_time < DATE_ADD(#{vo.createTimeEnd}, INTERVAL 1 DAY) | ||
| 213 | + ]]> | ||
| 214 | + </if> | ||
| 207 | </where> | 215 | </where> |
| 208 | ORDER BY tb.create_time DESC | 216 | ORDER BY tb.create_time DESC |
| 209 | </select> | 217 | </select> |