Commit 7cad1a013f8cf45be37f14834fbab342190b62da
Merge remote-tracking branch 'origin/master_0929' into master_0929
Showing
21 changed files
with
535 additions
and
48 deletions
| ... | ... | @@ -280,9 +280,15 @@ create table `tbl_replenishment_order_line` |
| 280 | 280 | `replenishment_order_id` varchar(32) NOT NULL COMMENT '补货单', |
| 281 | 281 | `purchase_order_line_id` varchar(32) NOT NULL COMMENT '订货单表物料行ID', |
| 282 | 282 | `brand` varchar(100) COMMENT '牌号', |
| 283 | - `thickness` decimal(10, 4) COMMENT '厚度', | |
| 284 | - `width` decimal(10, 4) COMMENT '宽度', | |
| 285 | - `length` decimal(10, 4) COMMENT '长度', | |
| 283 | + `thickness` DECIMAL(10, 4) COMMENT '厚度', | |
| 284 | + `thickness_tol_pos` DECIMAL(10, 4) COMMENT '厚度公差正', | |
| 285 | + `thickness_tol_neg` DECIMAL(10, 4) COMMENT '厚度公差负', | |
| 286 | + `width` DECIMAL(10, 4) COMMENT '宽度', | |
| 287 | + `width_tol_pos` DECIMAL(10, 4) COMMENT '宽度公差正', | |
| 288 | + `width_tol_neg` DECIMAL(10, 4) COMMENT '宽度公差负', | |
| 289 | + `length` DECIMAL(10, 4) COMMENT '长度', | |
| 290 | + `length_tol_pos` DECIMAL(10, 4) COMMENT '长度公差正', | |
| 291 | + `length_tol_neg` DECIMAL(10, 4) COMMENT '长度公差负', | |
| 286 | 292 | `status` varchar(50) COMMENT '状态', |
| 287 | 293 | `quantity` decimal(15, 4) COMMENT '需发(t)', |
| 288 | 294 | `shipped_quantity` decimal(15, 4) COMMENT '实发(t)', | ... | ... |
| ... | ... | @@ -49,18 +49,54 @@ public class GetReplenishmentOrderLineBo extends BaseBo<ReplenishmentOrderLine> |
| 49 | 49 | private BigDecimal thickness; |
| 50 | 50 | |
| 51 | 51 | /** |
| 52 | + * 厚度公差正 | |
| 53 | + */ | |
| 54 | + @ApiModelProperty("厚度公差正") | |
| 55 | + private BigDecimal thicknessTolPos; | |
| 56 | + | |
| 57 | + /** | |
| 58 | + * 厚度公差负 | |
| 59 | + */ | |
| 60 | + @ApiModelProperty("厚度公差负") | |
| 61 | + private BigDecimal thicknessTolNeg; | |
| 62 | + | |
| 63 | + /** | |
| 52 | 64 | * 宽度 |
| 53 | 65 | */ |
| 54 | 66 | @ApiModelProperty("宽度") |
| 55 | 67 | private BigDecimal width; |
| 56 | 68 | |
| 57 | 69 | /** |
| 70 | + * 宽度公差正 | |
| 71 | + */ | |
| 72 | + @ApiModelProperty("宽度公差正") | |
| 73 | + private BigDecimal widthTolPos; | |
| 74 | + | |
| 75 | + /** | |
| 76 | + * 宽度公差负 | |
| 77 | + */ | |
| 78 | + @ApiModelProperty("宽度公差负") | |
| 79 | + private BigDecimal widthTolNeg; | |
| 80 | + | |
| 81 | + /** | |
| 58 | 82 | * 长度 |
| 59 | 83 | */ |
| 60 | 84 | @ApiModelProperty("长度") |
| 61 | 85 | private BigDecimal length; |
| 62 | 86 | |
| 63 | 87 | /** |
| 88 | + * 长度公差正 | |
| 89 | + */ | |
| 90 | + @ApiModelProperty("长度公差正") | |
| 91 | + private BigDecimal lengthTolPos; | |
| 92 | + | |
| 93 | + /** | |
| 94 | + * 长度公差负 | |
| 95 | + */ | |
| 96 | + @ApiModelProperty("长度公差负") | |
| 97 | + private BigDecimal lengthTolNeg; | |
| 98 | + | |
| 99 | + /** | |
| 64 | 100 | * 状态 |
| 65 | 101 | */ |
| 66 | 102 | @ApiModelProperty("状态") | ... | ... |
| ... | ... | @@ -64,6 +64,20 @@ public class GetDelayedShipmentBo extends BaseBo<DelayedShipment> { |
| 64 | 64 | @ApiModelProperty("延期发货详情") |
| 65 | 65 | private List<DelayedShipmentDetail> delayedShipmentDetailList; |
| 66 | 66 | |
| 67 | + /** | |
| 68 | + * 是否展示审核按钮(非持久化字段) | |
| 69 | + */ | |
| 70 | + @ApiModelProperty("是否展示审核按钮") | |
| 71 | + private Boolean showExamine; | |
| 72 | + | |
| 73 | + /** | |
| 74 | + * 是否是创建人(非持久化字段) | |
| 75 | + */ | |
| 76 | + @ApiModelProperty("是否展示审核按钮") | |
| 77 | + private Boolean delayedCreateBy; | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 67 | 81 | public GetDelayedShipmentBo() { |
| 68 | 82 | |
| 69 | 83 | } | ... | ... |
| ... | ... | @@ -55,6 +55,7 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| 55 | 55 | import org.apache.poi.ss.usermodel.*; |
| 56 | 56 | import org.apache.poi.util.IOUtils; |
| 57 | 57 | import org.springframework.beans.factory.annotation.Autowired; |
| 58 | +import org.springframework.scheduling.annotation.Scheduled; | |
| 58 | 59 | import org.springframework.validation.annotation.Validated; |
| 59 | 60 | import org.springframework.web.bind.annotation.*; |
| 60 | 61 | |
| ... | ... | @@ -613,6 +614,14 @@ public class ContractDistributorStandardController extends DefaultBaseController |
| 613 | 614 | return InvokeResultBuilder.success(); |
| 614 | 615 | } |
| 615 | 616 | |
| 617 | + @ApiModelProperty("合同规范补充提醒") | |
| 618 | + @GetMapping("/supplementContractSpecReminder") | |
| 619 | + @Scheduled(cron = "0 20 0 * * ?") | |
| 620 | + public InvokeResult<Void> supplementContractSpecReminder() { | |
| 621 | + contractDistributorStandardService.supplementContractSpecReminder(); | |
| 622 | + return InvokeResultBuilder.success(); | |
| 623 | + } | |
| 624 | + | |
| 616 | 625 | /** |
| 617 | 626 | * 标准合同模版打印 |
| 618 | 627 | */ | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/order/PurchaseOrderInfoController.java
| ... | ... | @@ -199,7 +199,7 @@ public class PurchaseOrderInfoController extends DefaultBaseController { |
| 199 | 199 | * 新增 |
| 200 | 200 | */ |
| 201 | 201 | @ApiOperation("新增") |
| 202 | - @HasPermission({"purchaseOrderInfo:purchaseorderinfo:add"}) | |
| 202 | + @HasPermission({"order-manage:order-list:add"}) | |
| 203 | 203 | @PostMapping("/create") |
| 204 | 204 | public InvokeResult<Void> create(@Valid @RequestBody CreatePurchaseOrderInfoVo vo) { |
| 205 | 205 | |
| ... | ... | @@ -240,7 +240,7 @@ public class PurchaseOrderInfoController extends DefaultBaseController { |
| 240 | 240 | */ |
| 241 | 241 | @ApiOperation("根据ID删除") |
| 242 | 242 | @ApiImplicitParam(value = "id", name = "id", paramType = "query", required = true) |
| 243 | - @HasPermission({"purchaseOrderInfo:purchaseorderinfo:delete"}) | |
| 243 | + @HasPermission({"order-manage:order-list:delete"}) | |
| 244 | 244 | @DeleteMapping("/deleteById") |
| 245 | 245 | public InvokeResult<Void> deleteById(@NotBlank(message = "id不能为空!") String id) { |
| 246 | 246 | ... | ... |
| ... | ... | @@ -67,7 +67,7 @@ public class CarRequestPlanController extends DefaultBaseController { |
| 67 | 67 | * 查询列表 |
| 68 | 68 | */ |
| 69 | 69 | @ApiOperation("查询列表") |
| 70 | - @HasPermission({"carRequestPlan:carrequestplan:query"}) | |
| 70 | + @HasPermission({"shipping-plan-manage:car-request-plan:query"}) | |
| 71 | 71 | @GetMapping("/query") |
| 72 | 72 | public InvokeResult<PageResult<GetCarRequestPlanBo>> query(@Valid QueryCarRequestPlanVo vo) { |
| 73 | 73 | |
| ... | ... | @@ -88,7 +88,7 @@ public class CarRequestPlanController extends DefaultBaseController { |
| 88 | 88 | */ |
| 89 | 89 | @ApiOperation("根据ID查询") |
| 90 | 90 | @ApiImplicitParam(value = "id", name = "id", paramType = "query", required = true) |
| 91 | - @HasPermission({"carRequestPlan:carrequestplan:query"}) | |
| 91 | + @HasPermission({"shipping-plan-manage:car-request-plan:query"}) | |
| 92 | 92 | @GetMapping |
| 93 | 93 | public InvokeResult<GetCarRequestPlanBo> get(@NotBlank(message = "id不能为空!") String id) { |
| 94 | 94 | |
| ... | ... | @@ -106,7 +106,7 @@ public class CarRequestPlanController extends DefaultBaseController { |
| 106 | 106 | * 新增 |
| 107 | 107 | */ |
| 108 | 108 | @ApiOperation("新增") |
| 109 | - @HasPermission({"carRequestPlan:carrequestplan:add"}) | |
| 109 | + @HasPermission({"shipping-plan-manage:car-request-plan:add"}) | |
| 110 | 110 | @PostMapping |
| 111 | 111 | public InvokeResult<Void> create(@Valid @RequestBody CreateCarRequestPlanVo vo) { |
| 112 | 112 | |
| ... | ... | @@ -119,7 +119,7 @@ public class CarRequestPlanController extends DefaultBaseController { |
| 119 | 119 | * 修改 |
| 120 | 120 | */ |
| 121 | 121 | @ApiOperation("修改") |
| 122 | - @HasPermission({"carRequestPlan:carrequestplan:modify"}) | |
| 122 | + @HasPermission({"shipping-plan-manage:car-request-plan:modify", "shipping-plan-manage:car-request-plan:remark"}) | |
| 123 | 123 | @PutMapping |
| 124 | 124 | public InvokeResult<Void> update(@Valid @RequestBody UpdateCarRequestPlanVo vo) { |
| 125 | 125 | |
| ... | ... | @@ -133,7 +133,7 @@ public class CarRequestPlanController extends DefaultBaseController { |
| 133 | 133 | */ |
| 134 | 134 | @ApiOperation("根据ID删除") |
| 135 | 135 | @ApiImplicitParam(value = "id", name = "id", paramType = "query", required = true) |
| 136 | - @HasPermission({"carRequestPlan:carrequestplan:delete"}) | |
| 136 | + @HasPermission({"shipping-plan-manage:car-request-plan:delete"}) | |
| 137 | 137 | @DeleteMapping |
| 138 | 138 | public InvokeResult<Void> deleteById(@NotBlank(message = "id不能为空!") String id) { |
| 139 | 139 | ... | ... |
| ... | ... | @@ -44,7 +44,7 @@ public class RequestCarTicketController extends DefaultBaseController { |
| 44 | 44 | * 查询列表 |
| 45 | 45 | */ |
| 46 | 46 | @ApiOperation("查询列表") |
| 47 | - @HasPermission({"requestCarTicket:requestcarticket:query"}) | |
| 47 | + @HasPermission({"shipping-plan-manage:car-request-order:query"}) | |
| 48 | 48 | @GetMapping("/query") |
| 49 | 49 | public InvokeResult<PageResult<GetRequestCarTicketBo>> query(@Valid QueryRequestCarTicketVo vo) { |
| 50 | 50 | |
| ... | ... | @@ -65,7 +65,7 @@ public class RequestCarTicketController extends DefaultBaseController { |
| 65 | 65 | */ |
| 66 | 66 | @ApiOperation("根据ID查询") |
| 67 | 67 | @ApiImplicitParam(value = "id", name = "id", paramType = "query", required = true) |
| 68 | - @HasPermission({"requestCarTicket:requestcarticket:query"}) | |
| 68 | + @HasPermission({"shipping-plan-manage:car-request-order:query"}) | |
| 69 | 69 | @GetMapping |
| 70 | 70 | public InvokeResult<GetRequestCarTicketBo> get(@NotBlank(message = "id不能为空!") String id) { |
| 71 | 71 | |
| ... | ... | @@ -83,7 +83,7 @@ public class RequestCarTicketController extends DefaultBaseController { |
| 83 | 83 | * 新增 |
| 84 | 84 | */ |
| 85 | 85 | @ApiOperation("新增") |
| 86 | - @HasPermission({"requestCarTicket:requestcarticket:add"}) | |
| 86 | + @HasPermission({"shipping-plan-manage:car-request-order:add"}) | |
| 87 | 87 | @PostMapping |
| 88 | 88 | public InvokeResult<Void> create(@Valid @RequestBody CreateRequestCarTicketVo vo) { |
| 89 | 89 | |
| ... | ... | @@ -96,7 +96,7 @@ public class RequestCarTicketController extends DefaultBaseController { |
| 96 | 96 | * 修改 |
| 97 | 97 | */ |
| 98 | 98 | @ApiOperation("修改") |
| 99 | - @HasPermission({"requestCarTicket:requestcarticket:modify"}) | |
| 99 | + @HasPermission({"shipping-plan-manage:car-request-order:modify"}) | |
| 100 | 100 | @PutMapping |
| 101 | 101 | public InvokeResult<Void> update(@Valid @RequestBody UpdateRequestCarTicketVo vo) { |
| 102 | 102 | |
| ... | ... | @@ -109,7 +109,7 @@ public class RequestCarTicketController extends DefaultBaseController { |
| 109 | 109 | * 取消 |
| 110 | 110 | */ |
| 111 | 111 | @ApiOperation("取消") |
| 112 | - @HasPermission({"purchaseOrderRevoke:purchaseorderrevoke:cancel"}) | |
| 112 | + @HasPermission({"shipping-plan-manage:car-request-order:cancel"}) | |
| 113 | 113 | @GetMapping("/cancel") |
| 114 | 114 | public InvokeResult<Void> cancel(@NotBlank(message = "id不能为空!") String id) { |
| 115 | 115 | |
| ... | ... | @@ -123,7 +123,7 @@ public class RequestCarTicketController extends DefaultBaseController { |
| 123 | 123 | */ |
| 124 | 124 | @ApiOperation("根据ID删除") |
| 125 | 125 | @ApiImplicitParam(value = "id", name = "id", paramType = "query", required = true) |
| 126 | - @HasPermission({"requestCarTicket:requestcarticket:delete"}) | |
| 126 | + @HasPermission({"shipping-plan-manage:car-request-order:delete"}) | |
| 127 | 127 | @DeleteMapping |
| 128 | 128 | public InvokeResult<Void> deleteById(@NotBlank(message = "id不能为空!") String id) { |
| 129 | 129 | ... | ... |
| 1 | 1 | package com.lframework.xingyun.sc.controller.shipments.delay; |
| 2 | 2 | |
| 3 | 3 | import com.lframework.starter.web.core.annotations.security.HasPermission; |
| 4 | +import com.lframework.starter.web.core.components.security.SecurityUtil; | |
| 4 | 5 | import com.lframework.starter.web.core.controller.DefaultBaseController; |
| 5 | 6 | import com.lframework.starter.web.core.utils.PageResultUtil; |
| 6 | 7 | import com.lframework.starter.web.core.components.resp.PageResult; |
| ... | ... | @@ -48,7 +49,7 @@ public class DelayedShipmentController extends DefaultBaseController { |
| 48 | 49 | * 查询列表 |
| 49 | 50 | */ |
| 50 | 51 | @ApiOperation("查询列表") |
| 51 | - @HasPermission({"delayedShipment:delayedshipment:query"}) | |
| 52 | + @HasPermission({"shipping-plan-manage:delay-invoice:query"}) | |
| 52 | 53 | @GetMapping("/query") |
| 53 | 54 | public InvokeResult<PageResult<GetDelayedShipmentBo>> query(@Valid QueryDelayedShipmentVo vo) { |
| 54 | 55 | |
| ... | ... | @@ -58,7 +59,18 @@ public class DelayedShipmentController extends DefaultBaseController { |
| 58 | 59 | List<GetDelayedShipmentBo> results = null; |
| 59 | 60 | |
| 60 | 61 | if (!CollectionUtil.isEmpty(datas)) { |
| 61 | - results = datas.stream().map(GetDelayedShipmentBo::new).collect(Collectors.toList()); | |
| 62 | + String currentUserId = SecurityUtil.getCurrentUser().getId(); | |
| 63 | + | |
| 64 | + results = datas.stream().map(delayedShipment -> { | |
| 65 | + GetDelayedShipmentBo bo = new GetDelayedShipmentBo(delayedShipment); | |
| 66 | + // 判断 createById 是否等于当前用户 ID | |
| 67 | + boolean isCreateBy = false; | |
| 68 | + if (currentUserId.equals(delayedShipment.getCreateById())) { | |
| 69 | + isCreateBy = true; | |
| 70 | + } | |
| 71 | + bo.setDelayedCreateBy(isCreateBy); | |
| 72 | + return bo; | |
| 73 | + }).collect(Collectors.toList()); | |
| 62 | 74 | } |
| 63 | 75 | |
| 64 | 76 | return InvokeResultBuilder.success(PageResultUtil.rebuild(pageResult, results)); |
| ... | ... | @@ -69,7 +81,9 @@ public class DelayedShipmentController extends DefaultBaseController { |
| 69 | 81 | */ |
| 70 | 82 | @ApiOperation("根据ID查询") |
| 71 | 83 | @ApiImplicitParam(value = "id", name = "id", paramType = "query", required = true) |
| 72 | - @HasPermission({"delayedShipment:delayedshipment:query"}) | |
| 84 | + @HasPermission({"shipping-plan-manage:delay-invoice:query", | |
| 85 | + "shipping-plan-manage:delay-invoice:approve", | |
| 86 | + "shipping-plan-manage:delay-invoice:review"}) | |
| 73 | 87 | @GetMapping |
| 74 | 88 | public InvokeResult<GetDelayedShipmentBo> get(@NotBlank(message = "id不能为空!") String id) { |
| 75 | 89 | |
| ... | ... | @@ -91,7 +105,7 @@ public class DelayedShipmentController extends DefaultBaseController { |
| 91 | 105 | * 新增 |
| 92 | 106 | */ |
| 93 | 107 | @ApiOperation("新增") |
| 94 | - @HasPermission({"delayedShipment:delayedshipment:add"}) | |
| 108 | + @HasPermission({"shipping-plan-manage:delay-invoice:add"}) | |
| 95 | 109 | @PostMapping |
| 96 | 110 | public InvokeResult<Void> create(@Valid @RequestBody CreateDelayedShipmentVo vo) { |
| 97 | 111 | |
| ... | ... | @@ -104,7 +118,7 @@ public class DelayedShipmentController extends DefaultBaseController { |
| 104 | 118 | * 修改 |
| 105 | 119 | */ |
| 106 | 120 | @ApiOperation("修改") |
| 107 | - @HasPermission({"delayedShipment:delayedshipment:modify"}) | |
| 121 | + @HasPermission({"shipping-plan-manage:delay-invoice:modify"}) | |
| 108 | 122 | @PutMapping |
| 109 | 123 | public InvokeResult<Void> update(@Valid @RequestBody UpdateDelayedShipmentVo vo) { |
| 110 | 124 | |
| ... | ... | @@ -114,11 +128,24 @@ public class DelayedShipmentController extends DefaultBaseController { |
| 114 | 128 | } |
| 115 | 129 | |
| 116 | 130 | /** |
| 131 | + * 取消 | |
| 132 | + */ | |
| 133 | + @ApiOperation("取消") | |
| 134 | + @HasPermission({"shipping-plan-manage:delay-invoice:cancel"}) | |
| 135 | + @GetMapping("/cancel") | |
| 136 | + public InvokeResult<Void> cancel(@NotBlank(message = "id不能为空!") String id) { | |
| 137 | + | |
| 138 | + delayedShipmentService.updateStatus(id, "CANCEL"); | |
| 139 | + | |
| 140 | + return InvokeResultBuilder.success(); | |
| 141 | + } | |
| 142 | + | |
| 143 | + /** | |
| 117 | 144 | * 根据ID删除 |
| 118 | 145 | */ |
| 119 | 146 | @ApiOperation("根据ID删除") |
| 120 | 147 | @ApiImplicitParam(value = "id", name = "id", paramType = "query", required = true) |
| 121 | - @HasPermission({"delayedShipment:delayedshipment:delete"}) | |
| 148 | + @HasPermission({"shipping-plan-manage:delay-invoice:delete"}) | |
| 122 | 149 | @DeleteMapping |
| 123 | 150 | public InvokeResult<Void> deleteById(@NotBlank(message = "id不能为空!") String id) { |
| 124 | 151 | ... | ... |
| ... | ... | @@ -66,6 +66,12 @@ public class DelayedShipment extends BaseEntity implements BaseDto { |
| 66 | 66 | private List<DelayedShipmentDetail> delayedShipmentDetailList; |
| 67 | 67 | |
| 68 | 68 | /** |
| 69 | + * 是否展示审核按钮(非持久化字段) | |
| 70 | + */ | |
| 71 | + @TableField(exist = false) | |
| 72 | + private Boolean showExamine = false; | |
| 73 | + | |
| 74 | + /** | |
| 69 | 75 | * 创建人ID |
| 70 | 76 | */ |
| 71 | 77 | @TableField(fill = FieldFill.INSERT) | ... | ... |
| ... | ... | @@ -117,6 +117,12 @@ public class DelayedShipmentDetail extends BaseEntity implements BaseDto { |
| 117 | 117 | private String delayReason; |
| 118 | 118 | |
| 119 | 119 | /** |
| 120 | + * 合同创建人 | |
| 121 | + */ | |
| 122 | + @TableField(exist = false) | |
| 123 | + private String contractCreateById; | |
| 124 | + | |
| 125 | + /** | |
| 120 | 126 | * 创建人ID |
| 121 | 127 | */ |
| 122 | 128 | @TableField(fill = FieldFill.INSERT) | ... | ... |
| ... | ... | @@ -50,16 +50,46 @@ public class ReplenishmentOrderLine extends BaseEntity implements BaseDto { |
| 50 | 50 | private BigDecimal thickness; |
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | + * 厚度公差正 | |
| 54 | + */ | |
| 55 | + private BigDecimal thicknessTolPos; | |
| 56 | + | |
| 57 | + /** | |
| 58 | + * 厚度公差负 | |
| 59 | + */ | |
| 60 | + private BigDecimal thicknessTolNeg; | |
| 61 | + | |
| 62 | + /** | |
| 53 | 63 | * 宽度 |
| 54 | 64 | */ |
| 55 | 65 | private BigDecimal width; |
| 56 | 66 | |
| 57 | 67 | /** |
| 68 | + * 宽度公差正 | |
| 69 | + */ | |
| 70 | + private BigDecimal widthTolPos; | |
| 71 | + | |
| 72 | + /** | |
| 73 | + * 宽度公差负 | |
| 74 | + */ | |
| 75 | + private BigDecimal widthTolNeg; | |
| 76 | + | |
| 77 | + /** | |
| 58 | 78 | * 长度 |
| 59 | 79 | */ |
| 60 | 80 | private BigDecimal length; |
| 61 | 81 | |
| 62 | 82 | /** |
| 83 | + * 长度公差正 | |
| 84 | + */ | |
| 85 | + private BigDecimal lengthTolPos; | |
| 86 | + | |
| 87 | + /** | |
| 88 | + * 长度公差负 | |
| 89 | + */ | |
| 90 | + private BigDecimal lengthTolNeg; | |
| 91 | + | |
| 92 | + /** | |
| 63 | 93 | * 状态 |
| 64 | 94 | */ |
| 65 | 95 | private String status; | ... | ... |
| ... | ... | @@ -9,9 +9,14 @@ import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; |
| 9 | 9 | import com.lframework.starter.bpm.service.FlowInstanceWrapperService; |
| 10 | 10 | import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo; |
| 11 | 11 | import com.lframework.starter.common.utils.StringUtil; |
| 12 | +import com.lframework.starter.mq.core.service.MqProducerService; | |
| 12 | 13 | import com.lframework.starter.web.core.components.security.SecurityUtil; |
| 14 | +import com.lframework.starter.web.inner.dto.message.SysSiteMessageDto; | |
| 13 | 15 | import com.lframework.starter.web.inner.entity.SysDataDicItem; |
| 14 | 16 | import com.lframework.starter.web.inner.service.system.SysDataDicItemService; |
| 17 | +import com.lframework.starter.web.inner.service.system.SysUserRoleService; | |
| 18 | +import com.lframework.xingyun.basedata.entity.Workshop; | |
| 19 | +import com.lframework.xingyun.basedata.service.workshop.WorkshopService; | |
| 15 | 20 | import com.lframework.xingyun.sc.controller.contract.ContractDistributorStandardController; |
| 16 | 21 | import com.lframework.xingyun.sc.entity.*; |
| 17 | 22 | import com.lframework.starter.web.core.impl.BaseMpServiceImpl; |
| ... | ... | @@ -81,6 +86,12 @@ public class ContractDistributorStandardServiceImpl extends |
| 81 | 86 | private ContractFrameworkService contractFrameworkService; |
| 82 | 87 | @Resource |
| 83 | 88 | private SysDataDicItemService sysDataDicItemService; |
| 89 | + @Resource | |
| 90 | + private SysUserRoleService sysUserRoleService; | |
| 91 | + @Resource | |
| 92 | + private WorkshopService workshopService; | |
| 93 | + @Autowired | |
| 94 | + private MqProducerService mqProducerService; | |
| 84 | 95 | |
| 85 | 96 | @Override |
| 86 | 97 | public PageResult<ContractDistributorStandard> query(Integer pageIndex, Integer pageSize, QueryContractDistributorStandardVo vo) { |
| ... | ... | @@ -1037,6 +1048,112 @@ public class ContractDistributorStandardServiceImpl extends |
| 1037 | 1048 | return getBaseMapper().getContractSigned(buyerList); |
| 1038 | 1049 | } |
| 1039 | 1050 | |
| 1051 | + @Override | |
| 1052 | + public void supplementContractSpecReminder() { | |
| 1053 | + Wrapper<ContractDistributorStandard> wrapper = Wrappers.lambdaQuery(ContractDistributorStandard.class) | |
| 1054 | + .in(ContractDistributorStandard::getFormalApproved, Arrays.asList("REFUSE", "CANCEL")) | |
| 1055 | + .or() | |
| 1056 | + .in(ContractDistributorStandard::getStandardApproved, Arrays.asList("REFUSE", "CANCEL")); | |
| 1057 | + List<ContractDistributorStandard> contractDistributorStandardList = list(wrapper); | |
| 1058 | + if (CollectionUtils.isEmpty(contractDistributorStandardList)) { | |
| 1059 | + return; | |
| 1060 | + } | |
| 1061 | + | |
| 1062 | + Set<String> workshopIds = contractDistributorStandardList | |
| 1063 | + .stream() | |
| 1064 | + .map(ContractDistributorStandard::getWorkshopId) | |
| 1065 | + .collect(Collectors.toSet()); | |
| 1066 | + List<Workshop> workshopList = workshopService.listByIds(workshopIds); | |
| 1067 | + Map<String, String> workshopIdAndCodeMap = CollectionUtils.emptyIfNull(workshopList) | |
| 1068 | + .stream() | |
| 1069 | + .collect(Collectors.toMap(Workshop::getId, Workshop::getCode)); | |
| 1070 | + Map<String, String> workshopCodeAndJybzgCodeMap = new HashMap<>(4); | |
| 1071 | + workshopCodeAndJybzgCodeMap.put("yfc", "yfcjybzg"); // 一分厂 | |
| 1072 | + workshopCodeAndJybzgCodeMap.put("efc", "efcjybzg"); // 二分厂 | |
| 1073 | + workshopCodeAndJybzgCodeMap.put("sfc", "sfcjybzg"); // 三分厂 | |
| 1074 | + workshopCodeAndJybzgCodeMap.put("ztfc", "ztcjybzg"); // 四分厂 | |
| 1075 | + Map<String, List<String>> jybzgCodeAndUserIdMap = new HashMap<>(4); | |
| 1076 | + jybzgCodeAndUserIdMap.put("yfcjybzg", sysUserRoleService.listUserIdByRoleCodes(Collections.singletonList("yfcjybzg"))); | |
| 1077 | + jybzgCodeAndUserIdMap.put("efcjybzg", sysUserRoleService.listUserIdByRoleCodes(Collections.singletonList("efcjybzg"))); | |
| 1078 | + jybzgCodeAndUserIdMap.put("sfcjybzg", sysUserRoleService.listUserIdByRoleCodes(Collections.singletonList("sfcjybzg"))); | |
| 1079 | + jybzgCodeAndUserIdMap.put("ztcjybzg", sysUserRoleService.listUserIdByRoleCodes(Collections.singletonList("ztcjybzg"))); | |
| 1080 | + | |
| 1081 | + List<String> bsczgUserIdList = sysUserRoleService.listUserIdByRoleCodes(Collections.singletonList("bsczg")); | |
| 1082 | + contractDistributorStandardList.forEach(contractDistributorStandard -> { | |
| 1083 | + try { | |
| 1084 | + StringBuilder stringBuilder = new StringBuilder("您的"); | |
| 1085 | + if ("DISTRIB_STD".equals(contractDistributorStandard.getType())) { | |
| 1086 | + stringBuilder.append("经销标准合同"); | |
| 1087 | + } else if ("DIST_STOCK_CONTRACT".equals(contractDistributorStandard.getType())) { | |
| 1088 | + stringBuilder.append("经销库存合同"); | |
| 1089 | + } else if ("DRAFT_DIST_AGMT".equals(contractDistributorStandard.getType())) { | |
| 1090 | + stringBuilder.append("经销未锁规合同"); | |
| 1091 | + } else if ("INTL_STD_CONTRACT".equals(contractDistributorStandard.getType())) { | |
| 1092 | + stringBuilder.append("外贸标准合同"); | |
| 1093 | + } else if ("INTL_INVENTORY_AGMT".equals(contractDistributorStandard.getType())) { | |
| 1094 | + stringBuilder.append("外贸库存合同"); | |
| 1095 | + } else if ("INTL_OPEN_SPEC_AGMT".equals(contractDistributorStandard.getType())) { | |
| 1096 | + stringBuilder.append("外贸未锁规格合同"); | |
| 1097 | + } else if ("PROCESS_STD_AGMT".equals(contractDistributorStandard.getType())) { | |
| 1098 | + stringBuilder.append("加工标准合同"); | |
| 1099 | + } | |
| 1100 | + | |
| 1101 | + stringBuilder.append("("); | |
| 1102 | + LocalDate lastApprovedTime = LocalDate.now(); | |
| 1103 | + if ("FORMAL".equals(contractDistributorStandard.getStatus())) { | |
| 1104 | + if (!"REFUSE".equals(contractDistributorStandard.getFormalApproved()) | |
| 1105 | + && !"CANCEL".equals(contractDistributorStandard.getFormalApproved())) { | |
| 1106 | + return; | |
| 1107 | + } | |
| 1108 | + | |
| 1109 | + stringBuilder.append("正式合同)"); | |
| 1110 | + lastApprovedTime = contractDistributorStandard.getFormalTime().toLocalDate(); | |
| 1111 | + } | |
| 1112 | + | |
| 1113 | + if ("STANDARD".equals(contractDistributorStandard.getStatus())) { | |
| 1114 | + if (!"REFUSE".equals(contractDistributorStandard.getStandardApproved()) | |
| 1115 | + && !"CANCEL".equals(contractDistributorStandard.getStandardApproved())) { | |
| 1116 | + return; | |
| 1117 | + } | |
| 1118 | + | |
| 1119 | + stringBuilder.append("标准合同)"); | |
| 1120 | + lastApprovedTime = contractDistributorStandard.getStandardTime().toLocalDate(); | |
| 1121 | + } | |
| 1122 | + | |
| 1123 | + stringBuilder.append(",合同号:").append(contractDistributorStandard.getCode()); | |
| 1124 | + stringBuilder.append(",请尽快补充规范合同。"); | |
| 1125 | + List<String> userIdList = new ArrayList<>(); | |
| 1126 | + userIdList.add(contractDistributorStandard.getCreateById()); | |
| 1127 | + | |
| 1128 | + LocalDate currentDate = LocalDate.now(); | |
| 1129 | + // 如果最后批准时间加3天还在当前时间之前,说明超过3天 | |
| 1130 | + if (lastApprovedTime.plusDays(3).isBefore(currentDate)) { | |
| 1131 | + Optional.ofNullable(contractDistributorStandard.getWorkshopId()) | |
| 1132 | + .map(workshopIdAndCodeMap::get) | |
| 1133 | + .filter(StringUtils::isNotBlank) | |
| 1134 | + .map(workshopCodeAndJybzgCodeMap::get) | |
| 1135 | + .filter(StringUtils::isNotBlank) | |
| 1136 | + .map(jybzgCodeAndUserIdMap::get) | |
| 1137 | + .ifPresent(userIdList::addAll); | |
| 1138 | + | |
| 1139 | + userIdList.addAll(bsczgUserIdList); | |
| 1140 | + } | |
| 1141 | + | |
| 1142 | + // 发送消息 | |
| 1143 | + SysSiteMessageDto messageDto = new SysSiteMessageDto(); | |
| 1144 | + messageDto.setUserIdList(userIdList); | |
| 1145 | + messageDto.setTitle("补充规范合同通知"); | |
| 1146 | + messageDto.setContent(stringBuilder.toString()); | |
| 1147 | + messageDto.setBizKey(IdUtil.getId()); | |
| 1148 | + messageDto.setCreateUserId(null); | |
| 1149 | + | |
| 1150 | + mqProducerService.createSysSiteMessage(messageDto); | |
| 1151 | + } catch (Exception e) { | |
| 1152 | + log.error("发送消息报错", e); | |
| 1153 | + } | |
| 1154 | + }); | |
| 1155 | + } | |
| 1156 | + | |
| 1040 | 1157 | @CacheEvict(value = ContractDistributorStandard.CACHE_NAME, key = "@cacheVariables.tenantId() + #key") |
| 1041 | 1158 | @Override |
| 1042 | 1159 | public void cleanCacheByKey(Serializable key) { | ... | ... |
| ... | ... | @@ -310,7 +310,7 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde |
| 310 | 310 | if (StringUtils.isNotEmpty(data.getWorkshopId())) { |
| 311 | 311 | Workshop workshop = workshopService.findById(data.getWorkshopId()); |
| 312 | 312 | if (workshop != null) { |
| 313 | - data.setWorkshopName(workshop.getName()); | |
| 313 | + data.setWorkshopCode(workshop.getCode()); | |
| 314 | 314 | } |
| 315 | 315 | } |
| 316 | 316 | flowInstanceWrapperService.startInstance(BPM_FLAG, data.getId(), BPM_FLAG, data); | ... | ... |
| ... | ... | @@ -67,8 +67,14 @@ public class ReplenishmentOrderLineServiceImpl extends BaseMpServiceImpl<Repleni |
| 67 | 67 | data.setPurchaseOrderLineId(vo.getPurchaseOrderLineId()); |
| 68 | 68 | data.setBrand(vo.getBrand()); |
| 69 | 69 | data.setThickness(vo.getThickness()); |
| 70 | + data.setThicknessTolPos(vo.getThicknessTolPos()); | |
| 71 | + data.setThicknessTolNeg(vo.getThicknessTolNeg()); | |
| 70 | 72 | data.setWidth(vo.getWidth()); |
| 73 | + data.setWidthTolPos(vo.getWidthTolPos()); | |
| 74 | + data.setWidthTolNeg(vo.getWidthTolNeg()); | |
| 71 | 75 | data.setLength(vo.getLength()); |
| 76 | + data.setLengthTolPos(vo.getLengthTolPos()); | |
| 77 | + data.setLengthTolNeg(vo.getLengthTolNeg()); | |
| 72 | 78 | data.setStatus(vo.getStatus()); |
| 73 | 79 | data.setQuantity(vo.getQuantity()); |
| 74 | 80 | data.setShippedQuantity(vo.getShippedQuantity()); |
| ... | ... | @@ -101,8 +107,14 @@ public class ReplenishmentOrderLineServiceImpl extends BaseMpServiceImpl<Repleni |
| 101 | 107 | .set(ReplenishmentOrderLine::getPurchaseOrderLineId, vo.getPurchaseOrderLineId()) |
| 102 | 108 | .set(ReplenishmentOrderLine::getBrand, vo.getBrand()) |
| 103 | 109 | .set(ReplenishmentOrderLine::getThickness, vo.getThickness()) |
| 110 | + .set(ReplenishmentOrderLine::getThicknessTolPos, vo.getThicknessTolPos()) | |
| 111 | + .set(ReplenishmentOrderLine::getThicknessTolNeg, vo.getThicknessTolNeg()) | |
| 104 | 112 | .set(ReplenishmentOrderLine::getWidth, vo.getWidth()) |
| 113 | + .set(ReplenishmentOrderLine::getWidthTolPos, vo.getWidthTolPos()) | |
| 114 | + .set(ReplenishmentOrderLine::getWidthTolNeg, vo.getWidthTolNeg()) | |
| 105 | 115 | .set(ReplenishmentOrderLine::getLength, vo.getLength()) |
| 116 | + .set(ReplenishmentOrderLine::getLengthTolPos, vo.getLengthTolPos()) | |
| 117 | + .set(ReplenishmentOrderLine::getLengthTolNeg, vo.getLengthTolNeg()) | |
| 106 | 118 | .set(ReplenishmentOrderLine::getStatus, vo.getStatus()) |
| 107 | 119 | .set(ReplenishmentOrderLine::getQuantity, vo.getQuantity()) |
| 108 | 120 | .set(ReplenishmentOrderLine::getShippedQuantity, vo.getShippedQuantity()) | ... | ... |
| ... | ... | @@ -170,8 +170,14 @@ public class ReplenishmentOrderServiceImpl extends BaseMpServiceImpl<Replenishme |
| 170 | 170 | createReplenishmentOrderLineVo.setPurchaseOrderLineId(updateReplenishmentOrderLineVo.getPurchaseOrderLineId()); |
| 171 | 171 | createReplenishmentOrderLineVo.setBrand(updateReplenishmentOrderLineVo.getBrand()); |
| 172 | 172 | createReplenishmentOrderLineVo.setThickness(updateReplenishmentOrderLineVo.getThickness()); |
| 173 | + createReplenishmentOrderLineVo.setThicknessTolPos(updateReplenishmentOrderLineVo.getThicknessTolPos()); | |
| 174 | + createReplenishmentOrderLineVo.setThicknessTolNeg(updateReplenishmentOrderLineVo.getThicknessTolNeg()); | |
| 173 | 175 | createReplenishmentOrderLineVo.setWidth(updateReplenishmentOrderLineVo.getWidth()); |
| 176 | + createReplenishmentOrderLineVo.setWidthTolPos(updateReplenishmentOrderLineVo.getWidthTolPos()); | |
| 177 | + createReplenishmentOrderLineVo.setWidthTolNeg(updateReplenishmentOrderLineVo.getWidthTolNeg()); | |
| 174 | 178 | createReplenishmentOrderLineVo.setLength(updateReplenishmentOrderLineVo.getLength()); |
| 179 | + createReplenishmentOrderLineVo.setLengthTolPos(updateReplenishmentOrderLineVo.getLengthTolPos()); | |
| 180 | + createReplenishmentOrderLineVo.setLengthTolNeg(updateReplenishmentOrderLineVo.getLengthTolNeg()); | |
| 175 | 181 | createReplenishmentOrderLineVo.setStatus(updateReplenishmentOrderLineVo.getStatus()); |
| 176 | 182 | createReplenishmentOrderLineVo.setQuantity(updateReplenishmentOrderLineVo.getQuantity()); |
| 177 | 183 | createReplenishmentOrderLineVo.setShippedQuantity(updateReplenishmentOrderLineVo.getShippedQuantity()); | ... | ... |
| ... | ... | @@ -3,9 +3,13 @@ package com.lframework.xingyun.sc.impl.shipments.delay; |
| 3 | 3 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| 4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 5 | 5 | import com.github.pagehelper.PageInfo; |
| 6 | +import com.lframework.starter.bpm.dto.FlowTaskDto; | |
| 7 | +import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; | |
| 6 | 8 | import com.lframework.starter.bpm.service.FlowInstanceWrapperService; |
| 9 | +import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo; | |
| 7 | 10 | import com.lframework.starter.common.utils.CollectionUtil; |
| 8 | 11 | import com.lframework.starter.common.utils.StringUtil; |
| 12 | +import com.lframework.starter.mq.core.service.MqProducerService; | |
| 9 | 13 | import com.lframework.starter.web.core.components.security.SecurityUtil; |
| 10 | 14 | import com.lframework.starter.web.core.impl.BaseMpServiceImpl; |
| 11 | 15 | import com.lframework.starter.web.core.utils.PageResultUtil;; |
| ... | ... | @@ -20,16 +24,20 @@ import com.lframework.starter.web.core.utils.PageHelperUtil; |
| 20 | 24 | import com.lframework.starter.common.utils.Assert; |
| 21 | 25 | import com.lframework.starter.web.inner.bo.usercenter.UserInfoBo; |
| 22 | 26 | import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; |
| 27 | +import com.lframework.starter.web.inner.dto.message.SysSiteMessageDto; | |
| 23 | 28 | import com.lframework.starter.web.inner.dto.system.UserInfoDto; |
| 29 | +import com.lframework.starter.web.inner.service.system.SysUserRoleService; | |
| 24 | 30 | import com.lframework.starter.web.inner.service.system.SysUserService; |
| 25 | 31 | import com.lframework.xingyun.sc.entity.DelayedShipment; |
| 26 | 32 | import com.lframework.xingyun.sc.entity.DelayedShipmentDetail; |
| 33 | +import com.lframework.xingyun.sc.handlers.TransactorHandler; | |
| 27 | 34 | import com.lframework.xingyun.sc.mappers.DelayedShipmentMapper; |
| 28 | 35 | import com.lframework.xingyun.sc.service.order.PurchaseOrderLineService; |
| 29 | 36 | import com.lframework.xingyun.sc.service.shipments.ShipmentsPlanDetailService; |
| 30 | 37 | import com.lframework.xingyun.sc.service.shipments.delay.DelayedShipmentDetailService; |
| 31 | 38 | import com.lframework.xingyun.sc.service.shipments.delay.DelayedShipmentService; |
| 32 | 39 | import com.lframework.xingyun.sc.vo.shipments.delay.*; |
| 40 | +import org.apache.commons.collections.CollectionUtils; | |
| 33 | 41 | import org.springframework.transaction.annotation.Transactional; |
| 34 | 42 | import org.springframework.stereotype.Service; |
| 35 | 43 | import javax.annotation.Resource; |
| ... | ... | @@ -37,6 +45,7 @@ import java.time.LocalDate; |
| 37 | 45 | import java.time.temporal.ChronoUnit; |
| 38 | 46 | import java.util.ArrayList; |
| 39 | 47 | import java.util.List; |
| 48 | +import java.util.stream.Collectors; | |
| 40 | 49 | |
| 41 | 50 | @Service |
| 42 | 51 | public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmentMapper, DelayedShipment> implements DelayedShipmentService { |
| ... | ... | @@ -51,6 +60,14 @@ public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmen |
| 51 | 60 | private SysUserService sysUserService; |
| 52 | 61 | @Resource |
| 53 | 62 | private PurchaseOrderLineService purchaseOrderLineService; |
| 63 | + @Resource | |
| 64 | + private MqProducerService mqProducerService; | |
| 65 | + @Resource | |
| 66 | + private SysUserRoleService sysUserRoleService; | |
| 67 | + @Resource | |
| 68 | + private TransactorHandler transactorHandler; | |
| 69 | + @Resource | |
| 70 | + private FlowTaskWrapperMapper flowTaskWrapperMapper; | |
| 54 | 71 | |
| 55 | 72 | @Override |
| 56 | 73 | public PageResult<DelayedShipment> query(Integer pageIndex, Integer pageSize, QueryDelayedShipmentVo vo) { |
| ... | ... | @@ -60,6 +77,21 @@ public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmen |
| 60 | 77 | |
| 61 | 78 | PageHelperUtil.startPage(pageIndex, pageSize); |
| 62 | 79 | List<DelayedShipment> datas = this.query(vo); |
| 80 | + if (CollectionUtils.isNotEmpty(datas)) { | |
| 81 | + // 获取当前人员的待办任务数据 | |
| 82 | + List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); | |
| 83 | + if (org.apache.commons.collections4.CollectionUtils.isEmpty(flowTaskList)) { | |
| 84 | + return PageResultUtil.convert(new PageInfo<>(datas)); | |
| 85 | + } | |
| 86 | + List<String> ids = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList()); | |
| 87 | + for (DelayedShipment delayedShipment : datas) { | |
| 88 | + if (ids.contains(delayedShipment.getId())) { | |
| 89 | + delayedShipment.setShowExamine(true); | |
| 90 | + } else { | |
| 91 | + delayedShipment.setShowExamine(false); | |
| 92 | + } | |
| 93 | + } | |
| 94 | + } | |
| 63 | 95 | |
| 64 | 96 | return PageResultUtil.convert(new PageInfo<>(datas)); |
| 65 | 97 | } |
| ... | ... | @@ -160,9 +192,9 @@ public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmen |
| 160 | 192 | newRoleCodes.add("sfcsckjhy"); |
| 161 | 193 | newRoleCodes.add("ztfcsckjhy"); |
| 162 | 194 | boolean hasAny = newRoleCodes.stream().anyMatch(roleCodes::contains); |
| 195 | + DelayedShipmentDetail delayedShipmentDetail = delayedShipmentDetailService.findById(id); | |
| 163 | 196 | if (delayedExceedOneDay && !hasAny) { |
| 164 | 197 | //开启审核 |
| 165 | - DelayedShipmentDetail delayedShipmentDetail = delayedShipmentDetailService.findById(id); | |
| 166 | 198 | vo.setWorkshopCode(delayedShipmentDetail.getWorkshopCode()); |
| 167 | 199 | |
| 168 | 200 | flowInstanceWrapperService.startInstance(BPM_FLAG, data.getId(), BPM_FLAG, vo); |
| ... | ... | @@ -174,14 +206,68 @@ public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmen |
| 174 | 206 | vo1.setDelayedShipmentId(data.getId()); |
| 175 | 207 | List<DelayedShipmentDetail> query = delayedShipmentDetailService.query(vo1); |
| 176 | 208 | if (CollectionUtil.isNotEmpty(query)) { |
| 177 | - for (DelayedShipmentDetail delayedShipmentDetail : query) { | |
| 178 | - purchaseOrderLineService.updateDeliveryDate(delayedShipmentDetail.getOrderSpecId(), | |
| 179 | - delayedShipmentDetail.getApplyShipmentDate()); | |
| 209 | + for (DelayedShipmentDetail detail : query) { | |
| 210 | + purchaseOrderLineService.updateDeliveryDate(detail.getOrderSpecId(), detail.getApplyShipmentDate()); | |
| 180 | 211 | } |
| 181 | 212 | } |
| 182 | 213 | } |
| 183 | - //todo 消息通知 | |
| 184 | - | |
| 214 | + //todo 消息通知经营办计划员、经营办发货员、业务员、办事处内勤和经营办主管。 | |
| 215 | + List<String> userIdList = new ArrayList<>(); | |
| 216 | + List<String> codeList = new ArrayList<>(); | |
| 217 | + String workshopCode = delayedShipmentDetail.getWorkshopCode(); | |
| 218 | + //业务员 | |
| 219 | + String contractCreateById = delayedShipmentDetail.getContractCreateById(); | |
| 220 | + userIdList.add(contractCreateById); | |
| 221 | + //办事处内勤 | |
| 222 | + List<String> list1 = transactorHandler.listTransactorsByRoleCode("bscnq", contractCreateById); | |
| 223 | + if (CollectionUtils.isNotEmpty(list1)) { | |
| 224 | + userIdList.addAll(list1); | |
| 225 | + } | |
| 226 | + if ("yfc".equals(workshopCode)) { | |
| 227 | + //经营办计划员、经营办发货员、经营办主管 | |
| 228 | + codeList.add("yfcjybjhy"); | |
| 229 | + codeList.add("yfcjybfhy"); | |
| 230 | + codeList.add("yfcjybzg"); | |
| 231 | + List<String> userIds = sysUserRoleService.listUserIdByRoleCodes(codeList); | |
| 232 | + if (CollectionUtils.isNotEmpty(userIds)) { | |
| 233 | + userIdList.addAll(userIds); | |
| 234 | + } | |
| 235 | + } else if ("efc".equals(workshopCode)) { | |
| 236 | + //经营办计划员、经营办发货员、经营办主管 | |
| 237 | + codeList.add("efcjybjhy"); | |
| 238 | + codeList.add("efcjybfhy"); | |
| 239 | + codeList.add("efcjybzg"); | |
| 240 | + List<String> userIds = sysUserRoleService.listUserIdByRoleCodes(codeList); | |
| 241 | + if (CollectionUtils.isNotEmpty(userIds)) { | |
| 242 | + userIdList.addAll(userIds); | |
| 243 | + } | |
| 244 | + } else if ("sfc".equals(workshopCode)) { | |
| 245 | + //经营办计划员、经营办发货员、经营办主管 | |
| 246 | + codeList.add("sfcjybjhy"); | |
| 247 | + codeList.add("sfcjybfhy"); | |
| 248 | + codeList.add("sfcjybzg"); | |
| 249 | + List<String> userIds = sysUserRoleService.listUserIdByRoleCodes(codeList); | |
| 250 | + if (CollectionUtils.isNotEmpty(userIds)) { | |
| 251 | + userIdList.addAll(userIds); | |
| 252 | + } | |
| 253 | + } else if ("sfc".equals(workshopCode)) { | |
| 254 | + //经营办计划员、经营办发货员、经营办主管 | |
| 255 | + codeList.add("ztfcjybjhy"); | |
| 256 | + codeList.add("ztfcjybfhy"); | |
| 257 | + codeList.add("ztcjybzg"); | |
| 258 | + List<String> userIds = sysUserRoleService.listUserIdByRoleCodes(codeList); | |
| 259 | + if (CollectionUtils.isNotEmpty(userIds)) { | |
| 260 | + userIdList.addAll(userIds); | |
| 261 | + } | |
| 262 | + } | |
| 263 | + SysSiteMessageDto messageDto = new SysSiteMessageDto(); | |
| 264 | + messageDto.setUserIdList(userIdList); | |
| 265 | + messageDto.setTitle("延期发货通知"); | |
| 266 | + messageDto.setContent("延期发货通知!"); | |
| 267 | + messageDto.setBizKey(IdUtil.getId()); | |
| 268 | + //如果是空表示由系统自动发起 | |
| 269 | + messageDto.setCreateUserId(null); | |
| 270 | + mqProducerService.createSysSiteMessage(messageDto); | |
| 185 | 271 | return data.getId(); |
| 186 | 272 | } |
| 187 | 273 | |
| ... | ... | @@ -256,9 +342,9 @@ public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmen |
| 256 | 342 | newRoleCodes.add("sfcsckjhy"); |
| 257 | 343 | newRoleCodes.add("ztfcsckjhy"); |
| 258 | 344 | boolean hasAny = newRoleCodes.stream().anyMatch(roleCodes::contains); |
| 345 | + DelayedShipmentDetail delayedShipmentDetail = delayedShipmentDetailService.findById(id); | |
| 259 | 346 | if (delayedExceedOneDay && !hasAny) { |
| 260 | 347 | //开启审核 |
| 261 | - DelayedShipmentDetail delayedShipmentDetail = delayedShipmentDetailService.findById(id); | |
| 262 | 348 | vo.setWorkshopCode(delayedShipmentDetail.getWorkshopCode()); |
| 263 | 349 | |
| 264 | 350 | flowInstanceWrapperService.startInstance(BPM_FLAG, vo.getId(), BPM_FLAG, vo); |
| ... | ... | @@ -270,13 +356,68 @@ public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmen |
| 270 | 356 | vo1.setDelayedShipmentId(data.getId()); |
| 271 | 357 | List<DelayedShipmentDetail> query = delayedShipmentDetailService.query(vo1); |
| 272 | 358 | if (CollectionUtil.isNotEmpty(query)) { |
| 273 | - for (DelayedShipmentDetail delayedShipmentDetail : query) { | |
| 274 | - purchaseOrderLineService.updateDeliveryDate(delayedShipmentDetail.getOrderSpecId(), | |
| 275 | - delayedShipmentDetail.getApplyShipmentDate()); | |
| 359 | + for (DelayedShipmentDetail detail : query) { | |
| 360 | + purchaseOrderLineService.updateDeliveryDate(detail.getOrderSpecId(), detail.getApplyShipmentDate()); | |
| 276 | 361 | } |
| 277 | 362 | } |
| 278 | 363 | } |
| 279 | - //todo 消息通知 | |
| 364 | + //todo 消息通知经营办计划员、经营办发货员、业务员、办事处内勤和经营办主管。 | |
| 365 | + List<String> userIdList = new ArrayList<>(); | |
| 366 | + List<String> codeList = new ArrayList<>(); | |
| 367 | + String workshopCode = delayedShipmentDetail.getWorkshopCode(); | |
| 368 | + //业务员 | |
| 369 | + String contractCreateById = delayedShipmentDetail.getContractCreateById(); | |
| 370 | + userIdList.add(contractCreateById); | |
| 371 | + //办事处内勤 | |
| 372 | + List<String> list1 = transactorHandler.listTransactorsByRoleCode("bscnq", contractCreateById); | |
| 373 | + if (CollectionUtils.isNotEmpty(list1)) { | |
| 374 | + userIdList.addAll(list1); | |
| 375 | + } | |
| 376 | + if ("yfc".equals(workshopCode)) { | |
| 377 | + //经营办计划员、经营办发货员、经营办主管 | |
| 378 | + codeList.add("yfcjybjhy"); | |
| 379 | + codeList.add("yfcjybfhy"); | |
| 380 | + codeList.add("yfcjybzg"); | |
| 381 | + List<String> userIds = sysUserRoleService.listUserIdByRoleCodes(codeList); | |
| 382 | + if (CollectionUtils.isNotEmpty(userIds)) { | |
| 383 | + userIdList.addAll(userIds); | |
| 384 | + } | |
| 385 | + } else if ("efc".equals(workshopCode)) { | |
| 386 | + //经营办计划员、经营办发货员、经营办主管 | |
| 387 | + codeList.add("efcjybjhy"); | |
| 388 | + codeList.add("efcjybfhy"); | |
| 389 | + codeList.add("efcjybzg"); | |
| 390 | + List<String> userIds = sysUserRoleService.listUserIdByRoleCodes(codeList); | |
| 391 | + if (CollectionUtils.isNotEmpty(userIds)) { | |
| 392 | + userIdList.addAll(userIds); | |
| 393 | + } | |
| 394 | + } else if ("sfc".equals(workshopCode)) { | |
| 395 | + //经营办计划员、经营办发货员、经营办主管 | |
| 396 | + codeList.add("sfcjybjhy"); | |
| 397 | + codeList.add("sfcjybfhy"); | |
| 398 | + codeList.add("sfcjybzg"); | |
| 399 | + List<String> userIds = sysUserRoleService.listUserIdByRoleCodes(codeList); | |
| 400 | + if (CollectionUtils.isNotEmpty(userIds)) { | |
| 401 | + userIdList.addAll(userIds); | |
| 402 | + } | |
| 403 | + } else if ("ztfc".equals(workshopCode)) { | |
| 404 | + //经营办计划员、经营办发货员、经营办主管 | |
| 405 | + codeList.add("ztfcjybjhy"); | |
| 406 | + codeList.add("ztfcjybfhy"); | |
| 407 | + codeList.add("ztcjybzg"); | |
| 408 | + List<String> userIds = sysUserRoleService.listUserIdByRoleCodes(codeList); | |
| 409 | + if (CollectionUtils.isNotEmpty(userIds)) { | |
| 410 | + userIdList.addAll(userIds); | |
| 411 | + } | |
| 412 | + } | |
| 413 | + SysSiteMessageDto messageDto = new SysSiteMessageDto(); | |
| 414 | + messageDto.setUserIdList(userIdList); | |
| 415 | + messageDto.setTitle("延期发货通知"); | |
| 416 | + messageDto.setContent("延期发货通知!"); | |
| 417 | + messageDto.setBizKey(IdUtil.getId()); | |
| 418 | + //如果是空表示由系统自动发起 | |
| 419 | + messageDto.setCreateUserId(null); | |
| 420 | + mqProducerService.createSysSiteMessage(messageDto); | |
| 280 | 421 | } |
| 281 | 422 | |
| 282 | 423 | @OpLog(type = OtherOpLogType.class, name = "修改状态,ID:{}", params = {"#id"}) | ... | ... |
| ... | ... | @@ -120,4 +120,9 @@ public interface ContractDistributorStandardService extends BaseMpService<Contra |
| 120 | 120 | * @return 一年内未签订合同的企业 |
| 121 | 121 | */ |
| 122 | 122 | List<String> getContractSigned(List<String> buyerList); |
| 123 | + | |
| 124 | + /** | |
| 125 | + * 合同规范补充提醒 | |
| 126 | + */ | |
| 127 | + void supplementContractSpecReminder(); | |
| 123 | 128 | } | ... | ... |
| 1 | 1 | package com.lframework.xingyun.sc.vo.purchase; |
| 2 | 2 | |
| 3 | -import com.lframework.starter.web.core.components.validation.IsNumberPrecision; | |
| 4 | 3 | import com.lframework.starter.web.core.components.validation.TypeMismatch; |
| 5 | 4 | import com.lframework.starter.web.core.vo.BaseVo; |
| 6 | 5 | import io.swagger.annotations.ApiModelProperty; |
| 7 | 6 | import lombok.Data; |
| 8 | -import org.hibernate.validator.constraints.Length; | |
| 9 | 7 | |
| 10 | 8 | |
| 11 | 9 | import java.io.Serializable; |
| ... | ... | @@ -21,21 +19,18 @@ public class CreateReplenishmentOrderLineVo implements BaseVo, Serializable { |
| 21 | 19 | * 补货单 |
| 22 | 20 | */ |
| 23 | 21 | @ApiModelProperty(value = "补货单") |
| 24 | - @Length(message = "补货单最多允许32个字符!") | |
| 25 | 22 | private String replenishmentOrderId; |
| 26 | 23 | |
| 27 | 24 | /** |
| 28 | 25 | * 订货单表物料行ID |
| 29 | 26 | */ |
| 30 | 27 | @ApiModelProperty(value = "订货单表物料行ID") |
| 31 | - @Length(message = "订货单表物料行ID最多允许32个字符!") | |
| 32 | 28 | private String purchaseOrderLineId; |
| 33 | 29 | |
| 34 | 30 | /** |
| 35 | 31 | * 牌号 |
| 36 | 32 | */ |
| 37 | 33 | @ApiModelProperty(value = "牌号") |
| 38 | - @Length(message = "牌号最多允许100个字符!") | |
| 39 | 34 | private String brand; |
| 40 | 35 | |
| 41 | 36 | /** |
| ... | ... | @@ -43,30 +38,62 @@ public class CreateReplenishmentOrderLineVo implements BaseVo, Serializable { |
| 43 | 38 | */ |
| 44 | 39 | @ApiModelProperty(value = "厚度") |
| 45 | 40 | @TypeMismatch(message = "厚度格式有误!") |
| 46 | - @IsNumberPrecision(message = "厚度最多允许4位小数!", value = 4) | |
| 47 | 41 | private BigDecimal thickness; |
| 48 | 42 | |
| 49 | 43 | /** |
| 44 | + * 厚度公差正 | |
| 45 | + */ | |
| 46 | + @ApiModelProperty("厚度公差正") | |
| 47 | + private BigDecimal thicknessTolPos; | |
| 48 | + | |
| 49 | + /** | |
| 50 | + * 厚度公差负 | |
| 51 | + */ | |
| 52 | + @ApiModelProperty("厚度公差负") | |
| 53 | + private BigDecimal thicknessTolNeg; | |
| 54 | + | |
| 55 | + /** | |
| 50 | 56 | * 宽度 |
| 51 | 57 | */ |
| 52 | 58 | @ApiModelProperty(value = "宽度") |
| 53 | 59 | @TypeMismatch(message = "宽度格式有误!") |
| 54 | - @IsNumberPrecision(message = "宽度最多允许4位小数!", value = 4) | |
| 55 | 60 | private BigDecimal width; |
| 56 | 61 | |
| 57 | 62 | /** |
| 63 | + * 宽度公差正 | |
| 64 | + */ | |
| 65 | + @ApiModelProperty("宽度公差正") | |
| 66 | + private BigDecimal widthTolPos; | |
| 67 | + | |
| 68 | + /** | |
| 69 | + * 宽度公差负 | |
| 70 | + */ | |
| 71 | + @ApiModelProperty("宽度公差负") | |
| 72 | + private BigDecimal widthTolNeg; | |
| 73 | + | |
| 74 | + /** | |
| 58 | 75 | * 长度 |
| 59 | 76 | */ |
| 60 | 77 | @ApiModelProperty(value = "长度") |
| 61 | 78 | @TypeMismatch(message = "长度格式有误!") |
| 62 | - @IsNumberPrecision(message = "长度最多允许4位小数!", value = 4) | |
| 63 | 79 | private BigDecimal length; |
| 64 | 80 | |
| 65 | 81 | /** |
| 82 | + * 长度公差正 | |
| 83 | + */ | |
| 84 | + @ApiModelProperty("长度公差正") | |
| 85 | + private BigDecimal lengthTolPos; | |
| 86 | + | |
| 87 | + /** | |
| 88 | + * 长度公差负 | |
| 89 | + */ | |
| 90 | + @ApiModelProperty("长度公差负") | |
| 91 | + private BigDecimal lengthTolNeg; | |
| 92 | + | |
| 93 | + /** | |
| 66 | 94 | * 状态 |
| 67 | 95 | */ |
| 68 | 96 | @ApiModelProperty(value = "状态") |
| 69 | - @Length(message = "状态最多允许50个字符!") | |
| 70 | 97 | private String status; |
| 71 | 98 | |
| 72 | 99 | /** |
| ... | ... | @@ -74,7 +101,6 @@ public class CreateReplenishmentOrderLineVo implements BaseVo, Serializable { |
| 74 | 101 | */ |
| 75 | 102 | @ApiModelProperty(value = "需发(t)") |
| 76 | 103 | @TypeMismatch(message = "需发(t)格式有误!") |
| 77 | - @IsNumberPrecision(message = "需发(t)最多允许4位小数!", value = 4) | |
| 78 | 104 | private BigDecimal quantity; |
| 79 | 105 | |
| 80 | 106 | /** |
| ... | ... | @@ -82,7 +108,6 @@ public class CreateReplenishmentOrderLineVo implements BaseVo, Serializable { |
| 82 | 108 | */ |
| 83 | 109 | @ApiModelProperty(value = "实发(t)") |
| 84 | 110 | @TypeMismatch(message = "实发(t)格式有误!") |
| 85 | - @IsNumberPrecision(message = "实发(t)最多允许4位小数!", value = 4) | |
| 86 | 111 | private BigDecimal shippedQuantity; |
| 87 | 112 | |
| 88 | 113 | /** |
| ... | ... | @@ -90,7 +115,6 @@ public class CreateReplenishmentOrderLineVo implements BaseVo, Serializable { |
| 90 | 115 | */ |
| 91 | 116 | @ApiModelProperty(value = "需求补发(t/件)") |
| 92 | 117 | @TypeMismatch(message = "需求补发(t/件)格式有误!") |
| 93 | - @IsNumberPrecision(message = "需求补发(t/件)最多允许4位小数!", value = 4) | |
| 94 | 118 | private BigDecimal supplementaryQuantity; |
| 95 | 119 | |
| 96 | 120 | /** |
| ... | ... | @@ -104,14 +128,12 @@ public class CreateReplenishmentOrderLineVo implements BaseVo, Serializable { |
| 104 | 128 | * 备注 |
| 105 | 129 | */ |
| 106 | 130 | @ApiModelProperty(value = "备注") |
| 107 | - @Length(message = "备注最多允许65,535个字符!") | |
| 108 | 131 | private String remarks; |
| 109 | 132 | |
| 110 | 133 | /** |
| 111 | 134 | * 排序 |
| 112 | 135 | */ |
| 113 | 136 | @ApiModelProperty(value = "排序") |
| 114 | - @TypeMismatch(message = "排序格式有误!") | |
| 115 | 137 | private Integer showOrder; |
| 116 | 138 | |
| 117 | 139 | /** | ... | ... |
| ... | ... | @@ -44,18 +44,54 @@ public class UpdateReplenishmentOrderLineVo implements BaseVo, Serializable { |
| 44 | 44 | private BigDecimal thickness; |
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | + * 厚度公差正 | |
| 48 | + */ | |
| 49 | + @ApiModelProperty("厚度公差正") | |
| 50 | + private BigDecimal thicknessTolPos; | |
| 51 | + | |
| 52 | + /** | |
| 53 | + * 厚度公差负 | |
| 54 | + */ | |
| 55 | + @ApiModelProperty("厚度公差负") | |
| 56 | + private BigDecimal thicknessTolNeg; | |
| 57 | + | |
| 58 | + /** | |
| 47 | 59 | * 宽度 |
| 48 | 60 | */ |
| 49 | 61 | @ApiModelProperty(value = "宽度") |
| 50 | 62 | private BigDecimal width; |
| 51 | 63 | |
| 52 | 64 | /** |
| 65 | + * 宽度公差正 | |
| 66 | + */ | |
| 67 | + @ApiModelProperty("宽度公差正") | |
| 68 | + private BigDecimal widthTolPos; | |
| 69 | + | |
| 70 | + /** | |
| 71 | + * 宽度公差负 | |
| 72 | + */ | |
| 73 | + @ApiModelProperty("宽度公差负") | |
| 74 | + private BigDecimal widthTolNeg; | |
| 75 | + | |
| 76 | + /** | |
| 53 | 77 | * 长度 |
| 54 | 78 | */ |
| 55 | 79 | @ApiModelProperty(value = "长度") |
| 56 | 80 | private BigDecimal length; |
| 57 | 81 | |
| 58 | 82 | /** |
| 83 | + * 长度公差正 | |
| 84 | + */ | |
| 85 | + @ApiModelProperty("长度公差正") | |
| 86 | + private BigDecimal lengthTolPos; | |
| 87 | + | |
| 88 | + /** | |
| 89 | + * 长度公差负 | |
| 90 | + */ | |
| 91 | + @ApiModelProperty("长度公差负") | |
| 92 | + private BigDecimal lengthTolNeg; | |
| 93 | + | |
| 94 | + /** | |
| 59 | 95 | * 状态 |
| 60 | 96 | */ |
| 61 | 97 | @ApiModelProperty(value = "状态") | ... | ... |
| ... | ... | @@ -8,8 +8,14 @@ |
| 8 | 8 | <result column="purchase_order_line_id" property="purchaseOrderLineId"/> |
| 9 | 9 | <result column="brand" property="brand"/> |
| 10 | 10 | <result column="thickness" property="thickness"/> |
| 11 | + <result column="thickness_tol_pos" property="thicknessTolPos"/> | |
| 12 | + <result column="thickness_tol_neg" property="thicknessTolNeg"/> | |
| 11 | 13 | <result column="width" property="width"/> |
| 14 | + <result column="width_tol_pos" property="widthTolPos"/> | |
| 15 | + <result column="width_tol_neg" property="widthTolNeg"/> | |
| 12 | 16 | <result column="length" property="length"/> |
| 17 | + <result column="length_tol_pos" property="lengthTolPos"/> | |
| 18 | + <result column="length_tol_neg" property="lengthTolNeg"/> | |
| 13 | 19 | <result column="status" property="status"/> |
| 14 | 20 | <result column="quantity" property="quantity"/> |
| 15 | 21 | <result column="shipped_quantity" property="shippedQuantity"/> |
| ... | ... | @@ -31,8 +37,14 @@ |
| 31 | 37 | tb.purchase_order_line_id, |
| 32 | 38 | tb.brand, |
| 33 | 39 | tb.thickness, |
| 40 | + tb.thickness_tol_pos, | |
| 41 | + tb.thickness_tol_neg, | |
| 34 | 42 | tb.width, |
| 43 | + tb.width_tol_pos, | |
| 44 | + tb.width_tol_neg, | |
| 35 | 45 | tb.length, |
| 46 | + tb.length_tol_pos, | |
| 47 | + tb.length_tol_neg, | |
| 36 | 48 | tb.status, |
| 37 | 49 | tb.quantity, |
| 38 | 50 | tb.shipped_quantity, | ... | ... |
| ... | ... | @@ -20,6 +20,7 @@ |
| 20 | 20 | <result column="apply_count" property="applyCount"/> |
| 21 | 21 | <result column="quantity" property="quantity"/> |
| 22 | 22 | <result column="delay_reason" property="delayReason"/> |
| 23 | + <result column="contract_create_by_id" property="contractCreateById"/> | |
| 23 | 24 | <result column="create_by_id" property="createById"/> |
| 24 | 25 | <result column="create_by" property="createBy"/> |
| 25 | 26 | <result column="update_by_id" property="updateById"/> |
| ... | ... | @@ -52,6 +53,7 @@ |
| 52 | 53 | tb.apply_count, |
| 53 | 54 | tb.quantity, |
| 54 | 55 | tb.delay_reason, |
| 56 | + o.contract_create_by_id, | |
| 55 | 57 | tb.create_by_id, |
| 56 | 58 | tb.create_by, |
| 57 | 59 | tb.update_by_id, | ... | ... |