Commit f43b9c8c3311df744403156cb3aecd778e195569
Merge branch 'master_0929' into master_after20
# Conflicts: # xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/contract/ContractDistributorStandardController.java
Showing
17 changed files
with
215 additions
and
44 deletions
xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/contract/GetContractDistributorStandardBo.java
| @@ -449,6 +449,12 @@ public class GetContractDistributorStandardBo extends BaseBo<ContractDistributor | @@ -449,6 +449,12 @@ public class GetContractDistributorStandardBo extends BaseBo<ContractDistributor | ||
| 449 | @ApiModelProperty(value = "是否展示标准合同审核按钮") | 449 | @ApiModelProperty(value = "是否展示标准合同审核按钮") |
| 450 | private Boolean standardShowExamine; | 450 | private Boolean standardShowExamine; |
| 451 | 451 | ||
| 452 | + /** | ||
| 453 | + * 合同状态 | ||
| 454 | + */ | ||
| 455 | + @ApiModelProperty(value = "合同状态") | ||
| 456 | + private String shippingStatusName; | ||
| 457 | + | ||
| 452 | public GetContractDistributorStandardBo() { | 458 | public GetContractDistributorStandardBo() { |
| 453 | 459 | ||
| 454 | } | 460 | } |
| @@ -192,9 +192,9 @@ public class QueryContractDistributorStandardBo extends BaseBo<ContractDistribut | @@ -192,9 +192,9 @@ public class QueryContractDistributorStandardBo extends BaseBo<ContractDistribut | ||
| 192 | private Boolean standardShowExamine; | 192 | private Boolean standardShowExamine; |
| 193 | 193 | ||
| 194 | /** | 194 | /** |
| 195 | - * 发货状态 | 195 | + * 合同状态 |
| 196 | */ | 196 | */ |
| 197 | - @ApiModelProperty(value = "发货状态") | 197 | + @ApiModelProperty(value = "合同状态") |
| 198 | private String shippingStatusName; | 198 | private String shippingStatusName; |
| 199 | 199 | ||
| 200 | /** | 200 | /** |
| @@ -31,18 +31,17 @@ import com.lframework.xingyun.sc.bo.contract.GetContractDistributorStandardBo; | @@ -31,18 +31,17 @@ import com.lframework.xingyun.sc.bo.contract.GetContractDistributorStandardBo; | ||
| 31 | import com.lframework.xingyun.sc.bo.contract.GetContractStdProcessingLineBo; | 31 | import com.lframework.xingyun.sc.bo.contract.GetContractStdProcessingLineBo; |
| 32 | import com.lframework.xingyun.sc.bo.contract.QueryContractDistributorStandardBo; | 32 | import com.lframework.xingyun.sc.bo.contract.QueryContractDistributorStandardBo; |
| 33 | import com.lframework.xingyun.sc.components.code.GenerateCodeTypePool; | 33 | import com.lframework.xingyun.sc.components.code.GenerateCodeTypePool; |
| 34 | -import com.lframework.xingyun.sc.entity.ContractDistributorLine; | ||
| 35 | -import com.lframework.xingyun.sc.entity.ContractDistributorStandard; | ||
| 36 | -import com.lframework.xingyun.sc.entity.ContractFramework; | ||
| 37 | -import com.lframework.xingyun.sc.entity.ContractStdProcessingLine; | 34 | +import com.lframework.xingyun.sc.entity.*; |
| 38 | import com.lframework.xingyun.sc.service.contract.ContractDistributorLineService; | 35 | import com.lframework.xingyun.sc.service.contract.ContractDistributorLineService; |
| 39 | import com.lframework.xingyun.sc.service.contract.ContractDistributorStandardService; | 36 | import com.lframework.xingyun.sc.service.contract.ContractDistributorStandardService; |
| 40 | import com.lframework.xingyun.sc.service.contract.ContractFrameworkService; | 37 | import com.lframework.xingyun.sc.service.contract.ContractFrameworkService; |
| 41 | import com.lframework.xingyun.sc.service.contract.ContractStdProcessingLineService; | 38 | import com.lframework.xingyun.sc.service.contract.ContractStdProcessingLineService; |
| 39 | +import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; | ||
| 42 | import com.lframework.xingyun.sc.utils.LatexFormulaExcelExporterUtil; | 40 | import com.lframework.xingyun.sc.utils.LatexFormulaExcelExporterUtil; |
| 43 | import com.lframework.xingyun.sc.vo.contract.createVo.CreateContractDistributorStandardVo; | 41 | import com.lframework.xingyun.sc.vo.contract.createVo.CreateContractDistributorStandardVo; |
| 44 | import com.lframework.xingyun.sc.vo.contract.queryVo.QueryContractDistributorStandardVo; | 42 | import com.lframework.xingyun.sc.vo.contract.queryVo.QueryContractDistributorStandardVo; |
| 45 | import com.lframework.xingyun.sc.vo.contract.updateVo.UpdateContractDistributorStandardVo; | 43 | import com.lframework.xingyun.sc.vo.contract.updateVo.UpdateContractDistributorStandardVo; |
| 44 | +import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderInfoVo; | ||
| 46 | import io.swagger.annotations.Api; | 45 | import io.swagger.annotations.Api; |
| 47 | import io.swagger.annotations.ApiImplicitParam; | 46 | import io.swagger.annotations.ApiImplicitParam; |
| 48 | import io.swagger.annotations.ApiModelProperty; | 47 | import io.swagger.annotations.ApiModelProperty; |
| @@ -59,6 +58,7 @@ import org.springframework.scheduling.annotation.Scheduled; | @@ -59,6 +58,7 @@ import org.springframework.scheduling.annotation.Scheduled; | ||
| 59 | import org.springframework.validation.annotation.Validated; | 58 | import org.springframework.validation.annotation.Validated; |
| 60 | import org.springframework.web.bind.annotation.*; | 59 | import org.springframework.web.bind.annotation.*; |
| 61 | 60 | ||
| 61 | +import javax.annotation.Resource; | ||
| 62 | import javax.servlet.http.HttpServletResponse; | 62 | import javax.servlet.http.HttpServletResponse; |
| 63 | import javax.validation.Valid; | 63 | import javax.validation.Valid; |
| 64 | import javax.validation.constraints.NotBlank; | 64 | import javax.validation.constraints.NotBlank; |
| @@ -107,6 +107,8 @@ public class ContractDistributorStandardController extends DefaultBaseController | @@ -107,6 +107,8 @@ public class ContractDistributorStandardController extends DefaultBaseController | ||
| 107 | private ContractFrameworkService contractFrameworkService; | 107 | private ContractFrameworkService contractFrameworkService; |
| 108 | @Autowired | 108 | @Autowired |
| 109 | private ContractStdProcessingLineService contractStdProcessingLineService; | 109 | private ContractStdProcessingLineService contractStdProcessingLineService; |
| 110 | + @Resource | ||
| 111 | + private PurchaseOrderInfoService purchaseOrderInfoService; | ||
| 110 | 112 | ||
| 111 | 113 | ||
| 112 | public static final String SUPPLIER_DIC_CODE = "SUPPLIER"; // 所属单位/供方 | 114 | public static final String SUPPLIER_DIC_CODE = "SUPPLIER"; // 所属单位/供方 |
| @@ -255,6 +257,55 @@ public class ContractDistributorStandardController extends DefaultBaseController | @@ -255,6 +257,55 @@ public class ContractDistributorStandardController extends DefaultBaseController | ||
| 255 | Customer customer = customerMap.get(bo.getStockUpCompanyId()); | 257 | Customer customer = customerMap.get(bo.getStockUpCompanyId()); |
| 256 | bo.setStockUpCompanyName(customer == null ? "" : customer.getName()); | 258 | bo.setStockUpCompanyName(customer == null ? "" : customer.getName()); |
| 257 | } | 259 | } |
| 260 | + //合同状态(标准合同列表展示) | ||
| 261 | + if (vo != null && "STANDARD".equals(vo.getStatus())) { | ||
| 262 | + //合同ID | ||
| 263 | + String id = bo.getId(); | ||
| 264 | + QueryPurchaseOrderInfoVo vo1 = new QueryPurchaseOrderInfoVo(); | ||
| 265 | + vo1.setContractId(id); | ||
| 266 | + vo1.setExamineStatus("AUDIT"); | ||
| 267 | + vo1.setType("PRODUCTION"); | ||
| 268 | + List<PurchaseOrderInfo> query1 = purchaseOrderInfoService.query(vo1); | ||
| 269 | + if (CollectionUtils.isNotEmpty(query1)) { | ||
| 270 | + bo.setShippingStatusName("审批中"); | ||
| 271 | + } else { | ||
| 272 | + QueryPurchaseOrderInfoVo vo2 = new QueryPurchaseOrderInfoVo(); | ||
| 273 | + vo2.setContractId(id); | ||
| 274 | + vo2.setStatus("ISSUED"); | ||
| 275 | + vo2.setType("PRODUCTION"); | ||
| 276 | + List<PurchaseOrderInfo> query2 = purchaseOrderInfoService.query(vo2); | ||
| 277 | + if (CollectionUtils.isNotEmpty(query2)) { | ||
| 278 | + bo.setShippingStatusName("生产中"); | ||
| 279 | + } else { | ||
| 280 | + QueryPurchaseOrderInfoVo vo3 = new QueryPurchaseOrderInfoVo(); | ||
| 281 | + vo3.setContractId(id); | ||
| 282 | + vo3.setStatus("TRANSIT"); | ||
| 283 | + vo3.setType("PRODUCTION"); | ||
| 284 | + List<PurchaseOrderInfo> query3 = purchaseOrderInfoService.query(vo3); | ||
| 285 | + if (CollectionUtils.isNotEmpty(query3)) { | ||
| 286 | + bo.setShippingStatusName("已发货"); | ||
| 287 | + } else { | ||
| 288 | + QueryPurchaseOrderInfoVo vo4 = new QueryPurchaseOrderInfoVo(); | ||
| 289 | + vo4.setContractId(id); | ||
| 290 | + vo4.setStatus("SHIPPED"); | ||
| 291 | + vo4.setType("PRODUCTION"); | ||
| 292 | + List<PurchaseOrderInfo> query4 = purchaseOrderInfoService.query(vo4); | ||
| 293 | + if (CollectionUtils.isNotEmpty(query4)) { | ||
| 294 | + bo.setShippingStatusName("已发货"); | ||
| 295 | + } else { | ||
| 296 | + QueryPurchaseOrderInfoVo vo5 = new QueryPurchaseOrderInfoVo(); | ||
| 297 | + vo5.setContractId(id); | ||
| 298 | + vo5.setStatus("DELIVERED"); | ||
| 299 | + vo5.setType("PRODUCTION"); | ||
| 300 | + List<PurchaseOrderInfo> query5 = purchaseOrderInfoService.query(vo5); | ||
| 301 | + if (CollectionUtils.isNotEmpty(query5)) { | ||
| 302 | + bo.setShippingStatusName("已签收"); | ||
| 303 | + } | ||
| 304 | + } | ||
| 305 | + } | ||
| 306 | + } | ||
| 307 | + } | ||
| 308 | + } | ||
| 258 | }); | 309 | }); |
| 259 | 310 | ||
| 260 | boPageResult.setDatas(boList); | 311 | boPageResult.setDatas(boList); |
| @@ -364,6 +415,53 @@ public class ContractDistributorStandardController extends DefaultBaseController | @@ -364,6 +415,53 @@ public class ContractDistributorStandardController extends DefaultBaseController | ||
| 364 | Customer customer1 = customerService.findById(result.getStockUpCompanyId()); | 415 | Customer customer1 = customerService.findById(result.getStockUpCompanyId()); |
| 365 | result.setStockUpCompanyName(customer1 == null ? null : customer1.getName()); | 416 | result.setStockUpCompanyName(customer1 == null ? null : customer1.getName()); |
| 366 | } | 417 | } |
| 418 | + //合同状态(标准合同列表展示) | ||
| 419 | + if ("STANDARD".equals(data.getStatus())) { | ||
| 420 | + QueryPurchaseOrderInfoVo vo1 = new QueryPurchaseOrderInfoVo(); | ||
| 421 | + vo1.setContractId(id); | ||
| 422 | + vo1.setExamineStatus("AUDIT"); | ||
| 423 | + vo1.setType("PRODUCTION"); | ||
| 424 | + List<PurchaseOrderInfo> query1 = purchaseOrderInfoService.query(vo1); | ||
| 425 | + if (CollectionUtils.isNotEmpty(query1)) { | ||
| 426 | + result.setShippingStatusName("审批中"); | ||
| 427 | + } else { | ||
| 428 | + QueryPurchaseOrderInfoVo vo2 = new QueryPurchaseOrderInfoVo(); | ||
| 429 | + vo2.setContractId(id); | ||
| 430 | + vo2.setStatus("ISSUED"); | ||
| 431 | + vo2.setType("PRODUCTION"); | ||
| 432 | + List<PurchaseOrderInfo> query2 = purchaseOrderInfoService.query(vo2); | ||
| 433 | + if (CollectionUtils.isNotEmpty(query2)) { | ||
| 434 | + result.setShippingStatusName("生产中"); | ||
| 435 | + } else { | ||
| 436 | + QueryPurchaseOrderInfoVo vo3 = new QueryPurchaseOrderInfoVo(); | ||
| 437 | + vo3.setContractId(id); | ||
| 438 | + vo3.setStatus("TRANSIT"); | ||
| 439 | + vo3.setType("PRODUCTION"); | ||
| 440 | + List<PurchaseOrderInfo> query3 = purchaseOrderInfoService.query(vo3); | ||
| 441 | + if (CollectionUtils.isNotEmpty(query3)) { | ||
| 442 | + result.setShippingStatusName("已发货"); | ||
| 443 | + } else { | ||
| 444 | + QueryPurchaseOrderInfoVo vo4 = new QueryPurchaseOrderInfoVo(); | ||
| 445 | + vo4.setContractId(id); | ||
| 446 | + vo4.setStatus("SHIPPED"); | ||
| 447 | + vo4.setType("PRODUCTION"); | ||
| 448 | + List<PurchaseOrderInfo> query4 = purchaseOrderInfoService.query(vo4); | ||
| 449 | + if (CollectionUtils.isNotEmpty(query4)) { | ||
| 450 | + result.setShippingStatusName("已发货"); | ||
| 451 | + } else { | ||
| 452 | + QueryPurchaseOrderInfoVo vo5 = new QueryPurchaseOrderInfoVo(); | ||
| 453 | + vo5.setContractId(id); | ||
| 454 | + vo5.setStatus("DELIVERED"); | ||
| 455 | + vo5.setType("PRODUCTION"); | ||
| 456 | + List<PurchaseOrderInfo> query5 = purchaseOrderInfoService.query(vo5); | ||
| 457 | + if (CollectionUtils.isNotEmpty(query5)) { | ||
| 458 | + result.setShippingStatusName("已签收"); | ||
| 459 | + } | ||
| 460 | + } | ||
| 461 | + } | ||
| 462 | + } | ||
| 463 | + } | ||
| 464 | + } | ||
| 367 | 465 | ||
| 368 | return InvokeResultBuilder.success(result); | 466 | return InvokeResultBuilder.success(result); |
| 369 | } | 467 | } |
| @@ -11,15 +11,19 @@ import com.lframework.starter.web.core.controller.DefaultBaseController; | @@ -11,15 +11,19 @@ import com.lframework.starter.web.core.controller.DefaultBaseController; | ||
| 11 | import com.lframework.starter.web.core.utils.PageResultUtil; | 11 | import com.lframework.starter.web.core.utils.PageResultUtil; |
| 12 | import com.lframework.xingyun.sc.bo.shipments.car.GetDraftRequestCarTicketBo; | 12 | import com.lframework.xingyun.sc.bo.shipments.car.GetDraftRequestCarTicketBo; |
| 13 | import com.lframework.xingyun.sc.entity.DraftRequestCarTicket; | 13 | import com.lframework.xingyun.sc.entity.DraftRequestCarTicket; |
| 14 | +import com.lframework.xingyun.sc.entity.PurchaseOrderInfo; | ||
| 15 | +import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; | ||
| 14 | import com.lframework.xingyun.sc.service.shipments.car.DraftRequestCarTicketService; | 16 | import com.lframework.xingyun.sc.service.shipments.car.DraftRequestCarTicketService; |
| 15 | import com.lframework.xingyun.sc.vo.shipments.car.*; | 17 | import com.lframework.xingyun.sc.vo.shipments.car.*; |
| 16 | import io.swagger.annotations.Api; | 18 | import io.swagger.annotations.Api; |
| 17 | import io.swagger.annotations.ApiImplicitParam; | 19 | import io.swagger.annotations.ApiImplicitParam; |
| 18 | import io.swagger.annotations.ApiOperation; | 20 | import io.swagger.annotations.ApiOperation; |
| 21 | +import org.apache.commons.lang3.StringUtils; | ||
| 19 | import org.springframework.beans.factory.annotation.Autowired; | 22 | import org.springframework.beans.factory.annotation.Autowired; |
| 20 | import org.springframework.validation.annotation.Validated; | 23 | import org.springframework.validation.annotation.Validated; |
| 21 | import org.springframework.web.bind.annotation.*; | 24 | import org.springframework.web.bind.annotation.*; |
| 22 | 25 | ||
| 26 | +import javax.annotation.Resource; | ||
| 23 | import javax.validation.Valid; | 27 | import javax.validation.Valid; |
| 24 | import javax.validation.constraints.NotBlank; | 28 | import javax.validation.constraints.NotBlank; |
| 25 | import java.util.List; | 29 | import java.util.List; |
| @@ -37,7 +41,8 @@ public class DraftRequestCarTicketController extends DefaultBaseController { | @@ -37,7 +41,8 @@ public class DraftRequestCarTicketController extends DefaultBaseController { | ||
| 37 | 41 | ||
| 38 | @Autowired | 42 | @Autowired |
| 39 | private DraftRequestCarTicketService draftRequestCarTicketService; | 43 | private DraftRequestCarTicketService draftRequestCarTicketService; |
| 40 | - | 44 | + @Resource |
| 45 | + private PurchaseOrderInfoService purchaseOrderInfoService; | ||
| 41 | /** | 46 | /** |
| 42 | * 查询列表 | 47 | * 查询列表 |
| 43 | */ | 48 | */ |
| @@ -56,9 +61,13 @@ public class DraftRequestCarTicketController extends DefaultBaseController { | @@ -56,9 +61,13 @@ public class DraftRequestCarTicketController extends DefaultBaseController { | ||
| 56 | 61 | ||
| 57 | results = datas.stream().map(draftRequestCarTicket -> { | 62 | results = datas.stream().map(draftRequestCarTicket -> { |
| 58 | GetDraftRequestCarTicketBo bo = new GetDraftRequestCarTicketBo(draftRequestCarTicket); | 63 | GetDraftRequestCarTicketBo bo = new GetDraftRequestCarTicketBo(draftRequestCarTicket); |
| 64 | + PurchaseOrderInfo purchaseOrderInfo = null; | ||
| 65 | + if (StringUtils.isNotEmpty(draftRequestCarTicket.getPurchaseOrderId())) { | ||
| 66 | + purchaseOrderInfo = purchaseOrderInfoService.findById(draftRequestCarTicket.getPurchaseOrderId()); | ||
| 67 | + } | ||
| 59 | // 判断 createById 是否等于当前用户 ID | 68 | // 判断 createById 是否等于当前用户 ID |
| 60 | boolean isCreateBy = false; | 69 | boolean isCreateBy = false; |
| 61 | - if (currentUserId.equals(draftRequestCarTicket.getCreateById())) { | 70 | + if (purchaseOrderInfo != null && currentUserId.equals(purchaseOrderInfo.getContractCreateById())) { |
| 62 | isCreateBy = true; | 71 | isCreateBy = true; |
| 63 | } | 72 | } |
| 64 | bo.setDraftCreateBy(isCreateBy); | 73 | bo.setDraftCreateBy(isCreateBy); |
| @@ -87,6 +96,14 @@ public class DraftRequestCarTicketController extends DefaultBaseController { | @@ -87,6 +96,14 @@ public class DraftRequestCarTicketController extends DefaultBaseController { | ||
| 87 | } | 96 | } |
| 88 | 97 | ||
| 89 | GetDraftRequestCarTicketBo result = new GetDraftRequestCarTicketBo(data); | 98 | GetDraftRequestCarTicketBo result = new GetDraftRequestCarTicketBo(data); |
| 99 | + result.setDraftCreateBy(false); | ||
| 100 | + if (StringUtils.isNotEmpty(result.getPurchaseOrderId())) { | ||
| 101 | + String currentUserId = SecurityUtil.getCurrentUser().getId(); | ||
| 102 | + PurchaseOrderInfo purchaseOrderInfo = purchaseOrderInfoService.findById(result.getPurchaseOrderId()); | ||
| 103 | + if (purchaseOrderInfo != null && currentUserId.equals(purchaseOrderInfo.getContractCreateById())) { | ||
| 104 | + result.setDraftCreateBy(true); | ||
| 105 | + } | ||
| 106 | + } | ||
| 90 | 107 | ||
| 91 | return InvokeResultBuilder.success(result); | 108 | return InvokeResultBuilder.success(result); |
| 92 | } | 109 | } |
| @@ -65,6 +65,18 @@ public class SpecLockDelayApplication extends BaseEntity implements BaseDto { | @@ -65,6 +65,18 @@ public class SpecLockDelayApplication extends BaseEntity implements BaseDto { | ||
| 65 | private LocalDateTime approvedAt; | 65 | private LocalDateTime approvedAt; |
| 66 | 66 | ||
| 67 | /** | 67 | /** |
| 68 | + * 生产厂编码(非持久化字段) | ||
| 69 | + */ | ||
| 70 | + @TableField(exist = false) | ||
| 71 | + private String workshopCode; | ||
| 72 | + | ||
| 73 | + /** | ||
| 74 | + * 办事处编码(非持久化字段) | ||
| 75 | + */ | ||
| 76 | + @TableField(exist = false) | ||
| 77 | + private String deptCode; | ||
| 78 | + | ||
| 79 | + /** | ||
| 68 | * 创建人ID | 80 | * 创建人ID |
| 69 | */ | 81 | */ |
| 70 | @TableField(fill = FieldFill.INSERT) | 82 | @TableField(fill = FieldFill.INSERT) |
| @@ -57,9 +57,9 @@ public class ContractFrameworkExportModel extends BaseBo<ContractFramework> impl | @@ -57,9 +57,9 @@ public class ContractFrameworkExportModel extends BaseBo<ContractFramework> impl | ||
| 57 | private String materialTypeName; | 57 | private String materialTypeName; |
| 58 | 58 | ||
| 59 | /** | 59 | /** |
| 60 | - * 授信截止日期 | 60 | + * 授时截止日期 |
| 61 | */ | 61 | */ |
| 62 | - @ExcelProperty("授信截止日期") | 62 | + @ExcelProperty("授时截止日期") |
| 63 | @DateTimeFormat(StringPool.DATE_PATTERN) | 63 | @DateTimeFormat(StringPool.DATE_PATTERN) |
| 64 | private Date validityTime; | 64 | private Date validityTime; |
| 65 | 65 |
| @@ -77,7 +77,7 @@ public class ContractFrameworkImportListener extends ExcelImportListener<Contrac | @@ -77,7 +77,7 @@ public class ContractFrameworkImportListener extends ExcelImportListener<Contrac | ||
| 77 | 77 | ||
| 78 | if (null == data.getValidityTime()) { | 78 | if (null == data.getValidityTime()) { |
| 79 | throw new DefaultClientException( | 79 | throw new DefaultClientException( |
| 80 | - "第" + context.readRowHolder().getRowIndex() + "行授信截止日期不可为空"); | 80 | + "第" + context.readRowHolder().getRowIndex() + "行授时截止日期不可为空"); |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | if (StringUtils.isBlank(data.getMaterialTypeName())) { | 83 | if (StringUtils.isBlank(data.getMaterialTypeName())) { |
| @@ -60,11 +60,11 @@ public class ContractFrameworkImportModel implements ExcelModel { | @@ -60,11 +60,11 @@ public class ContractFrameworkImportModel implements ExcelModel { | ||
| 60 | private String materialTypId; | 60 | private String materialTypId; |
| 61 | 61 | ||
| 62 | /** | 62 | /** |
| 63 | - * 授信截止日期 | 63 | + * 授时截止日期 |
| 64 | */ | 64 | */ |
| 65 | @ExcelRequired | 65 | @ExcelRequired |
| 66 | @DateTimeFormat(StringPool.DATE_PATTERN) | 66 | @DateTimeFormat(StringPool.DATE_PATTERN) |
| 67 | - @ExcelProperty("授信截止日期") | 67 | + @ExcelProperty("授时截止日期") |
| 68 | private Date validityTime; | 68 | private Date validityTime; |
| 69 | 69 | ||
| 70 | } | 70 | } |
| @@ -22,7 +22,11 @@ import com.lframework.starter.web.core.utils.PageHelperUtil; | @@ -22,7 +22,11 @@ import com.lframework.starter.web.core.utils.PageHelperUtil; | ||
| 22 | import com.lframework.starter.web.core.utils.PageResultUtil; | 22 | import com.lframework.starter.web.core.utils.PageResultUtil; |
| 23 | import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; | 23 | import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; |
| 24 | import com.lframework.starter.web.inner.dto.message.SysSiteMessageDto; | 24 | import com.lframework.starter.web.inner.dto.message.SysSiteMessageDto; |
| 25 | +import com.lframework.starter.web.inner.entity.SysDept; | ||
| 26 | +import com.lframework.starter.web.inner.service.system.SysDeptService; | ||
| 25 | import com.lframework.starter.web.inner.service.system.SysUserRoleService; | 27 | import com.lframework.starter.web.inner.service.system.SysUserRoleService; |
| 28 | +import com.lframework.xingyun.basedata.entity.Workshop; | ||
| 29 | +import com.lframework.xingyun.basedata.service.workshop.WorkshopService; | ||
| 26 | import com.lframework.xingyun.sc.entity.ContractDistributorStandard; | 30 | import com.lframework.xingyun.sc.entity.ContractDistributorStandard; |
| 27 | import com.lframework.xingyun.sc.entity.SpecLockDelayApplication; | 31 | import com.lframework.xingyun.sc.entity.SpecLockDelayApplication; |
| 28 | import com.lframework.xingyun.sc.enums.CustomerDevelopStatus; | 32 | import com.lframework.xingyun.sc.enums.CustomerDevelopStatus; |
| @@ -58,7 +62,7 @@ public class SpecLockDelayApplicationServiceImpl extends BaseMpServiceImpl<SpecL | @@ -58,7 +62,7 @@ public class SpecLockDelayApplicationServiceImpl extends BaseMpServiceImpl<SpecL | ||
| 58 | 62 | ||
| 59 | @Autowired | 63 | @Autowired |
| 60 | private FlowInstanceWrapperService flowInstanceWrapperService; | 64 | private FlowInstanceWrapperService flowInstanceWrapperService; |
| 61 | - @Autowired | 65 | + @Resource |
| 62 | private FlowTaskWrapperMapper flowTaskWrapperMapper; | 66 | private FlowTaskWrapperMapper flowTaskWrapperMapper; |
| 63 | @Autowired | 67 | @Autowired |
| 64 | private ContractDistributorStandardService contractDistributorStandardService; | 68 | private ContractDistributorStandardService contractDistributorStandardService; |
| @@ -68,6 +72,10 @@ public class SpecLockDelayApplicationServiceImpl extends BaseMpServiceImpl<SpecL | @@ -68,6 +72,10 @@ public class SpecLockDelayApplicationServiceImpl extends BaseMpServiceImpl<SpecL | ||
| 68 | private MqProducerService mqProducerService; | 72 | private MqProducerService mqProducerService; |
| 69 | @Resource | 73 | @Resource |
| 70 | private SysUserRoleService sysUserRoleService; | 74 | private SysUserRoleService sysUserRoleService; |
| 75 | + @Resource | ||
| 76 | + private WorkshopService workshopService; | ||
| 77 | + @Resource | ||
| 78 | + private SysDeptService sysDeptService; | ||
| 71 | 79 | ||
| 72 | @Override | 80 | @Override |
| 73 | public PageResult<SpecLockDelayApplication> query(Integer pageIndex, Integer pageSize, QuerySpecLockDelayApplicationVo vo) { | 81 | public PageResult<SpecLockDelayApplication> query(Integer pageIndex, Integer pageSize, QuerySpecLockDelayApplicationVo vo) { |
| @@ -127,6 +135,14 @@ public class SpecLockDelayApplicationServiceImpl extends BaseMpServiceImpl<SpecL | @@ -127,6 +135,14 @@ public class SpecLockDelayApplicationServiceImpl extends BaseMpServiceImpl<SpecL | ||
| 127 | OpLogUtil.setExtra(vo); | 135 | OpLogUtil.setExtra(vo); |
| 128 | 136 | ||
| 129 | // 开启审核 | 137 | // 开启审核 |
| 138 | + data.setCreateById(SecurityUtil.getCurrentUser().getId()); | ||
| 139 | + ContractDistributorStandard standard = contractDistributorStandardService.findById(vo.getContractId()); | ||
| 140 | + if (standard != null) { | ||
| 141 | + Workshop workshop = workshopService.findById(standard.getWorkshopId()); | ||
| 142 | + data.setWorkshopCode(workshop == null ? "" : workshop.getCode()); | ||
| 143 | + SysDept sysDept = sysDeptService.findById(standard.getDeptId()); | ||
| 144 | + data.setDeptCode(sysDept == null ? "" : sysDept.getCode()); | ||
| 145 | + } | ||
| 130 | flowInstanceWrapperService.startInstance(SPEC_LOCK_DELAY_FLAY, data.getId(), SPEC_LOCK_DELAY_FLAY, data); | 146 | flowInstanceWrapperService.startInstance(SPEC_LOCK_DELAY_FLAY, data.getId(), SPEC_LOCK_DELAY_FLAY, data); |
| 131 | return data.getId(); | 147 | return data.getId(); |
| 132 | } | 148 | } |
| @@ -176,6 +192,13 @@ public class SpecLockDelayApplicationServiceImpl extends BaseMpServiceImpl<SpecL | @@ -176,6 +192,13 @@ public class SpecLockDelayApplicationServiceImpl extends BaseMpServiceImpl<SpecL | ||
| 176 | OpLogUtil.setExtra(vo); | 192 | OpLogUtil.setExtra(vo); |
| 177 | 193 | ||
| 178 | // 编辑完成再次开启审核 | 194 | // 编辑完成再次开启审核 |
| 195 | + ContractDistributorStandard standard = contractDistributorStandardService.findById(data.getContractId()); | ||
| 196 | + if (standard != null) { | ||
| 197 | + Workshop workshop = workshopService.findById(standard.getWorkshopId()); | ||
| 198 | + data.setWorkshopCode(workshop == null ? "" : workshop.getCode()); | ||
| 199 | + SysDept sysDept = sysDeptService.findById(standard.getDeptId()); | ||
| 200 | + data.setDeptCode(sysDept == null ? "" : sysDept.getCode()); | ||
| 201 | + } | ||
| 179 | flowInstanceWrapperService.startInstance(SPEC_LOCK_DELAY_FLAY, data.getId(), SPEC_LOCK_DELAY_FLAY, data); | 202 | flowInstanceWrapperService.startInstance(SPEC_LOCK_DELAY_FLAY, data.getId(), SPEC_LOCK_DELAY_FLAY, data); |
| 180 | } | 203 | } |
| 181 | 204 |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/impl/customer/CustomerDevelopPlanServiceImpl.java
| @@ -81,13 +81,22 @@ public class CustomerDevelopPlanServiceImpl extends BaseMpServiceImpl<CustomerDe | @@ -81,13 +81,22 @@ public class CustomerDevelopPlanServiceImpl extends BaseMpServiceImpl<CustomerDe | ||
| 81 | // 厂房类型处理 | 81 | // 厂房类型处理 |
| 82 | String workshopType = vo.getWorkshopType(); | 82 | String workshopType = vo.getWorkshopType(); |
| 83 | if ("TYPE_1".equals(workshopType)) { | 83 | if ("TYPE_1".equals(workshopType)) { |
| 84 | - vo.setWorkshopCode("yfc"); | 84 | + // 一、二分厂 |
| 85 | + List<String> workshopNameList = new ArrayList<>(); | ||
| 86 | + workshopNameList.add("一分厂"); | ||
| 87 | + workshopNameList.add("二分厂"); | ||
| 88 | + vo.setWorkshopNames(workshopNameList); | ||
| 85 | } else if ("TYPE_2".equals(workshopType)) { | 89 | } else if ("TYPE_2".equals(workshopType)) { |
| 86 | - vo.setWorkshopCode("efc"); | 90 | + // 三、四分厂 |
| 91 | + List<String> workshopNameList = new ArrayList<>(); | ||
| 92 | + workshopNameList.add("三分厂"); | ||
| 93 | + workshopNameList.add("四分厂"); | ||
| 94 | + vo.setWorkshopNames(workshopNameList); | ||
| 87 | } else if ("TYPE_3".equals(workshopType)) { | 95 | } else if ("TYPE_3".equals(workshopType)) { |
| 88 | - vo.setWorkshopCode("sfc"); | ||
| 89 | - } else if ("TYPE_4".equals(workshopType)) { | ||
| 90 | - vo.setWorkshopCode("ztfc"); | 96 | + // 紫铜分厂 |
| 97 | + List<String> workshopNameList = new ArrayList<>(); | ||
| 98 | + workshopNameList.add("紫铜分厂"); | ||
| 99 | + vo.setWorkshopNames(workshopNameList); | ||
| 91 | } | 100 | } |
| 92 | // 待办类型 | 101 | // 待办类型 |
| 93 | String todoType = vo.getTodoType(); | 102 | String todoType = vo.getTodoType(); |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/impl/shipments/ShipmentsOrderInfoServiceImpl.java
| @@ -326,7 +326,7 @@ public class ShipmentsOrderInfoServiceImpl extends BaseMpServiceImpl<ShipmentsOr | @@ -326,7 +326,7 @@ public class ShipmentsOrderInfoServiceImpl extends BaseMpServiceImpl<ShipmentsOr | ||
| 326 | } else { | 326 | } else { |
| 327 | List<String> planDetailIds = vo.getPlanDetailIds(); | 327 | List<String> planDetailIds = vo.getPlanDetailIds(); |
| 328 | if (CollectionUtils.isEmpty(planDetailIds)) { | 328 | if (CollectionUtils.isEmpty(planDetailIds)) { |
| 329 | - throw new DefaultClientException("发货明细id不能为空!"); | 329 | + throw new DefaultClientException("请在列表中勾选发货明细!"); |
| 330 | } | 330 | } |
| 331 | QueryShipmentsPlanDetailVo planDetailVo = new QueryShipmentsPlanDetailVo(); | 331 | QueryShipmentsPlanDetailVo planDetailVo = new QueryShipmentsPlanDetailVo(); |
| 332 | planDetailVo.setIds(planDetailIds); | 332 | planDetailVo.setIds(planDetailIds); |
| @@ -172,8 +172,17 @@ public class ShipmentsPlanDetailServiceImpl extends BaseMpServiceImpl<ShipmentsP | @@ -172,8 +172,17 @@ public class ShipmentsPlanDetailServiceImpl extends BaseMpServiceImpl<ShipmentsP | ||
| 172 | } | 172 | } |
| 173 | vo.setWorkshopId(plan.getWorkshopId()); | 173 | vo.setWorkshopId(plan.getWorkshopId()); |
| 174 | // 获取已经存在的明细数据 | 174 | // 获取已经存在的明细数据 |
| 175 | - List<String> orderSpecIds = getBaseMapper().getExistsOrderSpecIds(plan.getAfTomoPreShipDate()); | ||
| 176 | - if (CollectionUtils.isNotEmpty(orderSpecIds)) { | 175 | + LambdaQueryWrapper<ShipmentsPlanDetail> queryWrapper = Wrappers.lambdaQuery(ShipmentsPlanDetail.class); |
| 176 | + queryWrapper.eq(ShipmentsPlanDetail::getPreShipments, Boolean.FALSE) | ||
| 177 | + .eq(ShipmentsPlanDetail::getDelFlag, Boolean.FALSE); | ||
| 178 | + List<ShipmentsPlanDetail> detailList = getBaseMapper().selectList(queryWrapper); | ||
| 179 | + if (CollectionUtils.isNotEmpty(detailList)) { | ||
| 180 | + List<String> orderSpecIds = detailList.stream().map(ShipmentsPlanDetail::getOrderSpecId).collect(Collectors.toList()); | ||
| 181 | + vo.setOrderSpecIds(orderSpecIds); | ||
| 182 | + } | ||
| 183 | + detailList = listByPlanId(plan.getId(), true); | ||
| 184 | + if (CollectionUtils.isNotEmpty(detailList)) { | ||
| 185 | + List<String> orderSpecIds = detailList.stream().map(ShipmentsPlanDetail::getOrderSpecId).collect(Collectors.toList()); | ||
| 177 | vo.setOrderSpecIds(orderSpecIds); | 186 | vo.setOrderSpecIds(orderSpecIds); |
| 178 | } | 187 | } |
| 179 | // 开启分页 | 188 | // 开启分页 |
| @@ -254,10 +263,12 @@ public class ShipmentsPlanDetailServiceImpl extends BaseMpServiceImpl<ShipmentsP | @@ -254,10 +263,12 @@ public class ShipmentsPlanDetailServiceImpl extends BaseMpServiceImpl<ShipmentsP | ||
| 254 | orderIds.add(orderId); | 263 | orderIds.add(orderId); |
| 255 | } | 264 | } |
| 256 | } | 265 | } |
| 257 | - QueryShipmentsPlanDetailVo detailVo = new QueryShipmentsPlanDetailVo(); | ||
| 258 | - detailVo.setOrderSpecIds(orderSpecIds); | ||
| 259 | - detailVo.setCompleted(Boolean.TRUE); | ||
| 260 | - List<ShipmentsPlanDetail> detailList = query(detailVo); | 266 | + // 获取已经加入过发货计划中的数据 |
| 267 | + LambdaQueryWrapper<ShipmentsPlanDetail> queryWrapper = Wrappers.lambdaQuery(ShipmentsPlanDetail.class); | ||
| 268 | + queryWrapper.in(ShipmentsPlanDetail::getOrderSpecId, orderSpecIds) | ||
| 269 | + .eq(ShipmentsPlanDetail::getDelFlag, Boolean.FALSE) | ||
| 270 | + .eq(ShipmentsPlanDetail::getPreShipments, Boolean.FALSE); | ||
| 271 | + List<ShipmentsPlanDetail> detailList = getBaseMapper().selectList(queryWrapper); | ||
| 261 | if (CollectionUtils.isNotEmpty(detailList)) { | 272 | if (CollectionUtils.isNotEmpty(detailList)) { |
| 262 | List<String> orderSpecIdList = detailList.stream().map(ShipmentsPlanDetail::getOrderSpecId).distinct().collect(Collectors.toList()); | 273 | List<String> orderSpecIdList = detailList.stream().map(ShipmentsPlanDetail::getOrderSpecId).distinct().collect(Collectors.toList()); |
| 263 | // 过滤掉已发货的数据 | 274 | // 过滤掉已发货的数据 |
| @@ -64,13 +64,4 @@ public interface ShipmentsPlanDetailMapper extends BaseMapper<ShipmentsPlanDetai | @@ -64,13 +64,4 @@ public interface ShipmentsPlanDetailMapper extends BaseMapper<ShipmentsPlanDetai | ||
| 64 | * @return ShipmentsPlanDetail | 64 | * @return ShipmentsPlanDetail |
| 65 | */ | 65 | */ |
| 66 | ShipmentsPlanDetail findById(@Param("id") String id); | 66 | ShipmentsPlanDetail findById(@Param("id") String id); |
| 67 | - | ||
| 68 | - /** | ||
| 69 | - * 获取已经存在的规格ID | ||
| 70 | - * 包含预发数据 | ||
| 71 | - * | ||
| 72 | - * @param shipmentsDate 发货日期 | ||
| 73 | - * @return List<String> | ||
| 74 | - */ | ||
| 75 | - List<String> getExistsOrderSpecIds(LocalDate shipmentsDate); | ||
| 76 | } | 67 | } |
| @@ -107,4 +107,7 @@ public class QueryPurchaseOrderInfoVo extends PageVo implements BaseVo, Serializ | @@ -107,4 +107,7 @@ public class QueryPurchaseOrderInfoVo extends PageVo implements BaseVo, Serializ | ||
| 107 | */ | 107 | */ |
| 108 | @ApiModelProperty("搜索关键字") | 108 | @ApiModelProperty("搜索关键字") |
| 109 | private String searchKey; | 109 | private String searchKey; |
| 110 | + | ||
| 111 | + @ApiModelProperty("合同") | ||
| 112 | + private String contractId; | ||
| 110 | } | 113 | } |
| @@ -82,8 +82,11 @@ | @@ -82,8 +82,11 @@ | ||
| 82 | <if test="vo.status != null and vo.status != ''"> | 82 | <if test="vo.status != null and vo.status != ''"> |
| 83 | AND tb.status = #{vo.status} | 83 | AND tb.status = #{vo.status} |
| 84 | </if> | 84 | </if> |
| 85 | - <if test="vo.workshopCode != null and vo.workshopCode != ''"> | ||
| 86 | - AND w.code = #{vo.workshopCode} | 85 | + <if test = "vo.workshopType != null and vo.workshopType != ''"> |
| 86 | + AND w.name in | ||
| 87 | + <foreach collection="vo.workshopNames" open="(" separator="," close=")" item="item"> | ||
| 88 | + #{item} | ||
| 89 | + </foreach> | ||
| 87 | </if> | 90 | </if> |
| 88 | <if test="vo.createStartTime != null"> | 91 | <if test="vo.createStartTime != null"> |
| 89 | AND tb.create_time >= #{vo.createStartTime} | 92 | AND tb.create_time >= #{vo.createStartTime} |
| @@ -157,6 +157,9 @@ | @@ -157,6 +157,9 @@ | ||
| 157 | AND (cu.name LIKE CONCAT('%', #{vo.orderingUnitNameOrOrderNo},'%') | 157 | AND (cu.name LIKE CONCAT('%', #{vo.orderingUnitNameOrOrderNo},'%') |
| 158 | or tb.order_no LIKE CONCAT('%', #{vo.orderingUnitNameOrOrderNo},'%')) | 158 | or tb.order_no LIKE CONCAT('%', #{vo.orderingUnitNameOrOrderNo},'%')) |
| 159 | </if> | 159 | </if> |
| 160 | + <if test="vo.contractId != null and vo.contractId != ''"> | ||
| 161 | + AND tb.contract_id = #{vo.contractId} | ||
| 162 | + </if> | ||
| 160 | </where> | 163 | </where> |
| 161 | ORDER BY tb.update_time DESC | 164 | ORDER BY tb.update_time DESC |
| 162 | </select> | 165 | </select> |
| @@ -185,7 +185,8 @@ | @@ -185,7 +185,8 @@ | ||
| 185 | ol.length, | 185 | ol.length, |
| 186 | ol.length_tol_pos, | 186 | ol.length_tol_pos, |
| 187 | ol.length_tol_neg, | 187 | ol.length_tol_neg, |
| 188 | - ol.quantity | 188 | + ol.quantity, |
| 189 | + ol.delivery_date as shipments_date | ||
| 189 | from tbl_purchase_order_line ol | 190 | from tbl_purchase_order_line ol |
| 190 | inner join purchase_order_info o on ol.purchase_order_id = o.id | 191 | inner join purchase_order_info o on ol.purchase_order_id = o.id |
| 191 | left join base_data_customer c on o.ordering_unit = c.id | 192 | left join base_data_customer c on o.ordering_unit = c.id |
| @@ -296,10 +297,4 @@ | @@ -296,10 +297,4 @@ | ||
| 296 | </if> | 297 | </if> |
| 297 | </where> | 298 | </where> |
| 298 | </select> | 299 | </select> |
| 299 | - | ||
| 300 | - <select id="getExistsOrderSpecIds" resultType="java.lang.String"> | ||
| 301 | - select distinct tb.order_spec_id | ||
| 302 | - from shipments_plan_detail tb | ||
| 303 | - where tb.pre_shipments = false or (tb.pre_shipments = true and tb.shipments_date = #{shipmentsDate}) | ||
| 304 | - </select> | ||
| 305 | </mapper> | 300 | </mapper> |