From 83d6f4c408b962a6be577f48cc8d72d97620c65e Mon Sep 17 00:00:00 2001 From: God <10745413@qq.com> Date: Fri, 6 Sep 2024 18:02:10 +0800 Subject: [PATCH] 1 --- .../AppOldpartreturnApplyDetailsVo.java | 76 ++++ .../AppOldpartreturnApplyFeign.java | 64 +++ .../AppOldpartreturnDetailsVo.java | 81 ++++ .../flowable/AppDelegateQuery.java | 25 ++ .../flowable/AppFlowDto.java | 37 ++ .../flowable/AppFlowQuery.java | 28 ++ .../flowable/AppFlowTaskQuery.java | 47 ++ .../AppInventoryAllocateBillDetailsVoNew.java | 109 +++++ ...ventoryAllocatebillDetailDetailsVoNew.java | 103 +++++ .../AppInventoryAllocatebillFeign.java | 58 +++ .../flowable/AppDelegateQuery.java | 25 ++ .../flowable/AppFlowDto.java | 37 ++ .../flowable/AppFlowQuery.java | 28 ++ .../flowable/AppFlowTaskQuery.java | 47 ++ .../anrui/terminal/TerminalApplication.java | 2 +- .../AppOldpartreturnApplyRest.java | 85 ++++ .../AppOldpartreturnApplyService.java | 186 ++++++++ .../AppInventoryAllocatebillRest.java | 85 ++++ .../AppInventoryAllocatebillService.java | 172 ++++++++ .../AsOldpartreturnApplyDetailsVo.java | 94 ++++ .../AsOldpartreturnApplyFegin.java | 59 +++ .../AsOldpartreturnDetailsVo.java | 89 ++++ .../AsOldpartreturnApplyCompleteDto.java | 37 ++ .../AsOldpartreturnApplyDelegateQuery.java | 26 ++ .../AsOldpartreturnApplyNodeQuery.java | 25 ++ .../flowable/AsOldpartreturnApplyNodeVo.java | 26 ++ .../AsOldpartreturnApplyTaskQuery.java | 48 ++ .../WmsInventoryAllocateBillDetailsVoNew.java | 109 +++++ ...ventoryAllocatebillDetailDetailsVoNew.java | 103 +++++ .../WmsInventoryAllocatebillFeign.java | 58 +++ .../flowable/CompleteFlowDto.java | 35 ++ .../flowable/FlowDelegateQuery.java | 23 + .../flowable/FlowNodeQuery.java | 18 + .../flowable/FlowNodeVo.java | 24 + .../flowable/FlowTaskQuery.java | 43 ++ ...WmsInventoryAllocateBillLogisticsRest.java | 60 +++ .../WmsInventoryAllocatebillRest.java | 85 +++- .../WmsInventoryAlloSelectList.java | 8 +- .../WmsInventoryAlloSelectQuery.java | 20 +- .../wmsinventory/WmsInventoryMapper.xml | 10 +- .../wmsinventory/WmsInventoryService.java | 77 ++-- .../WmsInventoryAllocateBillDetailsVoNew.java | 3 + .../WmsInventoryAllocateBillMapper.java | 5 +- .../WmsInventoryAllocateBillMapper.xml | 29 +- .../WmsInventoryAllocateBillQueryNew.java | 6 + .../WmsInventoryAllocateBillService.java | 413 +++++++++++++++++- .../WmsInventoryAllocateBillVoNew.java | 7 + .../flowable/CompleteFlowDto.java | 35 ++ .../flowable/FlowDelegateQuery.java | 23 + .../flowable/FlowNodeQuery.java | 18 + .../flowable/FlowNodeVo.java | 24 + .../flowable/FlowTaskQuery.java | 43 ++ .../flowable/SubmitFlowDto.java | 20 + .../WmsInventoryAllocateBillDetail.java | 13 +- .../WmsInventoryAllocateBillDetailDtoNew.java | 2 + .../WmsInventoryAllocateBillDetailMapper.xml | 16 +- ...ventoryAllocatebillDetailDetailsVoNew.java | 2 + .../WmsInventoryAllocateBillLogistics.java | 72 +++ ...ventoryAllocateBillLogisticsDetailsVo.java | 71 +++ .../WmsInventoryAllocateBillLogisticsDto.java | 75 ++++ ...sInventoryAllocateBillLogisticsMapper.java | 42 ++ ...msInventoryAllocateBillLogisticsMapper.xml | 6 + ...InventoryAllocateBillLogisticsService.java | 60 +++ 63 files changed, 3243 insertions(+), 114 deletions(-) create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/AppOldpartreturnApplyDetailsVo.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/AppOldpartreturnApplyFeign.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/AppOldpartreturnDetailsVo.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/flowable/AppDelegateQuery.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/flowable/AppFlowDto.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/flowable/AppFlowQuery.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/flowable/AppFlowTaskQuery.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/AppInventoryAllocateBillDetailsVoNew.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/AppInventoryAllocatebillDetailDetailsVoNew.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/AppInventoryAllocatebillFeign.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/flowable/AppDelegateQuery.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/flowable/AppFlowDto.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/flowable/AppFlowQuery.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/flowable/AppFlowTaskQuery.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/as/oldpartreturnapply/AppOldpartreturnApplyRest.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/as/oldpartreturnapply/AppOldpartreturnApplyService.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/wms/inventoryallocatebill/AppInventoryAllocatebillRest.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/wms/inventoryallocatebill/AppInventoryAllocatebillService.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/AsOldpartreturnApplyDetailsVo.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/AsOldpartreturnApplyFegin.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/AsOldpartreturnDetailsVo.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyCompleteDto.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyDelegateQuery.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyNodeQuery.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyNodeVo.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyTaskQuery.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/WmsInventoryAllocateBillDetailsVoNew.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/WmsInventoryAllocatebillDetailDetailsVoNew.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/WmsInventoryAllocatebillFeign.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/CompleteFlowDto.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/FlowDelegateQuery.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/FlowNodeQuery.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/FlowNodeVo.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/FlowTaskQuery.java create mode 100644 yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryAllocateBillLogisticsRest.java create mode 100644 yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/CompleteFlowDto.java create mode 100644 yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/FlowDelegateQuery.java create mode 100644 yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/FlowNodeQuery.java create mode 100644 yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/FlowNodeVo.java create mode 100644 yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/FlowTaskQuery.java create mode 100644 yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/SubmitFlowDto.java create mode 100644 yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogistics.java create mode 100644 yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsDetailsVo.java create mode 100644 yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsDto.java create mode 100644 yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsMapper.java create mode 100644 yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsMapper.xml create mode 100644 yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsService.java diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/AppOldpartreturnApplyDetailsVo.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/AppOldpartreturnApplyDetailsVo.java new file mode 100644 index 0000000000..30fc6d2217 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/AppOldpartreturnApplyDetailsVo.java @@ -0,0 +1,76 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.terminal.api.as.oldpartreturnapply; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * Project: anrui-as(旧件返厂)
+ * File: AsOldpartreturnApplyVo.java
+ * Class: com.yxt.anrui.as.api.asoldpartreturnapply.AsOldpartreturnApplyVo
+ * Description: 旧件返厂申请 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-17 10:29:50
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "旧件返厂申请 视图数据详情", description = "旧件返厂申请 视图数据详情") +public class AppOldpartreturnApplyDetailsVo implements Vo { + + private String sid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("发起部门名称") + private String createDeptName; + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty("申请日期") + private Date createTime; + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("附件路径") + private List files = new ArrayList<>(); + @ApiModelProperty("流程实例的sid") + private String procInsId; + @ApiModelProperty("任务id") + private String taskId; + @ApiModelProperty("返厂旧件列表") + private List asOldpartreturnList; + @ApiModelProperty("合计") + private String total; +} \ No newline at end of file diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/AppOldpartreturnApplyFeign.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/AppOldpartreturnApplyFeign.java new file mode 100644 index 0000000000..e057a71661 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/AppOldpartreturnApplyFeign.java @@ -0,0 +1,64 @@ +package com.yxt.anrui.terminal.api.as.oldpartreturnapply; + +import com.yxt.anrui.terminal.api.as.oldpartreturnapply.flowable.AppDelegateQuery; +import com.yxt.anrui.terminal.api.as.oldpartreturnapply.flowable.AppFlowDto; +import com.yxt.anrui.terminal.api.as.oldpartreturnapply.flowable.AppFlowQuery; +import com.yxt.anrui.terminal.api.as.oldpartreturnapply.flowable.AppFlowTaskQuery; +import com.yxt.common.core.result.ResultBean; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.cloud.openfeign.SpringQueryMap; +import org.springframework.web.bind.annotation.*; + +/** + * @Author + * @Date + * @Description + */ +@FeignClient( + contextId = "terminal-AppOldpartreturnApply", + name = "anrui-terminal", + path = "v1/oldpartreturnapply") +public interface AppOldpartreturnApplyFeign { + + @ApiOperation("详情") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid); + + /**********************************************流程********************************************/ + + @ApiOperation("办理") + @PutMapping("/agreeCreditInfo") + @ResponseBody + ResultBean agreeCreditInfo(@RequestBody AppFlowDto dto); + + @ApiOperation("驳回") + @PutMapping("/rejectCreditInfo") + @ResponseBody + ResultBean rejectCreditInfo(@RequestBody AppFlowTaskQuery query); + + @ApiOperation("撤回") + @PutMapping("/recallCreditInfo") + @ResponseBody + ResultBean recallCreditInfo(@RequestBody AppFlowTaskQuery query); + + @ApiOperation("终止") + @PutMapping("/stopCreditInfo") + @ResponseBody + ResultBean stopCreditInfo(@RequestBody AppFlowTaskQuery query); + + @ApiOperation("获取流程操作标题") + @GetMapping("/getFlowOperateTitle") + @ResponseBody + ResultBean getFlowOperateTitle(@SpringQueryMap AppFlowQuery query); + + @ApiOperation(value = "加签") + @PutMapping(value = "/delegate") + @ResponseBody + public ResultBean delegate(@RequestBody AppDelegateQuery delegateQuery); + + @ApiOperation(value = "转办") + @PutMapping(value = "/assignTask") + @ResponseBody + public ResultBean assignTask(@RequestBody AppDelegateQuery delegateQuery); +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/AppOldpartreturnDetailsVo.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/AppOldpartreturnDetailsVo.java new file mode 100644 index 0000000000..c4c7ee16fe --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/AppOldpartreturnDetailsVo.java @@ -0,0 +1,81 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.terminal.api.as.oldpartreturnapply; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: anrui-as(旧件返厂)
+ * File: AsOldpartreturnVo.java
+ * Class: com.yxt.anrui.as.api.asoldpartreturn.AsOldpartreturnVo
+ * Description: 返厂旧件列表 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-17 10:29:50
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "返厂旧件列表 视图数据详情", description = "返厂旧件列表 视图数据详情") +public class AppOldpartreturnDetailsVo implements Vo { + + @ApiModelProperty("商品sku名称") + private String goodsSkuTitle; + @ApiModelProperty("商品sku名称") + private String goodsSkuName; + @ApiModelProperty("图号") + private String goodsSkuCode; + @ApiModelProperty("厂家名称") + private String manufacturerName; + @ApiModelProperty("规格") + private String goodsSkuOwnSpec; + @ApiModelProperty("单位") + private String unit; + @ApiModelProperty("车架号") + private String vinNo; + @ApiModelProperty("维修单号") + private String sourceBillNo; + @ApiModelProperty("索赔单号") + private String claimBillNo; + @ApiModelProperty("需返厂数量") + private BigDecimal needReturnCount; + @ApiModelProperty("实际返厂数量") + private BigDecimal actualReturnCount; + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("是否迟返(1是0否)") + private String isCf; + @ApiModelProperty("是否迟返(1是0否)") + private String isCf2; +} \ No newline at end of file diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/flowable/AppDelegateQuery.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/flowable/AppDelegateQuery.java new file mode 100644 index 0000000000..a5ec8a0ae9 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/flowable/AppDelegateQuery.java @@ -0,0 +1,25 @@ +package com.yxt.anrui.terminal.api.as.oldpartreturnapply.flowable; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Administrator + * @description + * @date 2023/9/28 10:16 + */ +@Data +public class AppDelegateQuery { + @ApiModelProperty + private String userSid; + @ApiModelProperty("流程实例id") + @JsonProperty("procInsId") + private String instanceId; + @ApiModelProperty("任务Id") + private String taskId; + @ApiModelProperty("审批人sid") + private String assignee; + @ApiModelProperty("填写意见") + private String views; +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/flowable/AppFlowDto.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/flowable/AppFlowDto.java new file mode 100644 index 0000000000..9378df1fd2 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/flowable/AppFlowDto.java @@ -0,0 +1,37 @@ +package com.yxt.anrui.terminal.api.as.oldpartreturnapply.flowable; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @Author dimengzhe + * @Date 2022/8/9 14:09 + * @Description + */ +@Data +public class AppFlowDto implements Dto { + private static final long serialVersionUID = 3626473483180150495L; + + @ApiModelProperty(value = "任务id") + @NotBlank(message = "参数错误:taskId") + private String taskId; + @ApiModelProperty(value = "流程id") + @NotBlank(message = "参数错误:procInsId") + @JsonProperty("procInsId") + private String instanceId; + @ApiModelProperty(value = "意见") + private String comment; + @ApiModelProperty(value = "业务sid") + @NotBlank(message = "参数错误:businessSid") + private String businessSid; + @ApiModelProperty(value = "用户sid") + @NotBlank(message = "参数错误:userSid") + private String userSid; + @ApiModelProperty(value = "节点id") + @NotBlank(message = "参数错误:taskDefKey") + private String taskDefKey; +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/flowable/AppFlowQuery.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/flowable/AppFlowQuery.java new file mode 100644 index 0000000000..a394d00606 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/flowable/AppFlowQuery.java @@ -0,0 +1,28 @@ +package com.yxt.anrui.terminal.api.as.oldpartreturnapply.flowable; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; + +/** + * @Author dimengzhe + * @Date 2022/8/9 14:15 + * @Description + */ +@Data +public class AppFlowQuery implements Query { + private static final long serialVersionUID = 5514095179438249641L; + + @ApiModelProperty(value = "节点key") + private String taskDefKey; + @ApiModelProperty(value = "业务sid") + private String businessSid; + @ApiModelProperty(value = "0 上一环节 1下一环节") + @NotNull(message = "参数错误:next") + private Integer next; + + @ApiModelProperty("组织机构全路径") + private String orgPath; +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/flowable/AppFlowTaskQuery.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/flowable/AppFlowTaskQuery.java new file mode 100644 index 0000000000..f2d4a6c580 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/as/oldpartreturnapply/flowable/AppFlowTaskQuery.java @@ -0,0 +1,47 @@ +package com.yxt.anrui.terminal.api.as.oldpartreturnapply.flowable; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @Author dimengzhe + * @Date 2022/8/9 14:11 + * @Description + */ +@Data +public class AppFlowTaskQuery implements Query { + private static final long serialVersionUID = -7082170710942810289L; + + /** + * 终止、驳回、撤回 + */ + @ApiModelProperty("任务Id") + @NotBlank(message = "参数错误:taskId") + private String taskId; + /** + * 终止、驳回、撤回 + */ + @ApiModelProperty("业务sid") + @NotBlank(message = "参数错误:businessSid") + private String businessSid; + /** + * 终止、驳回 + */ + @ApiModelProperty("任务意见") + private String comment; + /** + * 终止、撤回、驳回 + */ + @ApiModelProperty("用户Sid") + private String userSid; + /** + * 终止 + */ + @ApiModelProperty("流程实例Id") + @JsonProperty("procInsId") + private String instanceId; +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/AppInventoryAllocateBillDetailsVoNew.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/AppInventoryAllocateBillDetailsVoNew.java new file mode 100644 index 0000000000..ff6880a2df --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/AppInventoryAllocateBillDetailsVoNew.java @@ -0,0 +1,109 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.terminal.api.wms.inventoryallocatebill; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * Project: yxt-wms(调拨单)
+ * File: WmsInventoryAllocatebillVo.java
+ * Class: com.yxt.wms.api.wmsinventoryallocatebill.WmsInventoryAllocatebillVo
+ * Description: (调拨单)-调出方操作 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-25 16:04:08
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "(调拨单)-调出方操作 视图数据详情", description = "(调拨单)-调出方操作 视图数据详情") +public class AppInventoryAllocateBillDetailsVoNew implements Vo { + + private String sid; + + @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @ApiModelProperty("申请日期") + private Date createTime; + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("申请部门sid") + private String deptSid; + @ApiModelProperty("申请部门名称") + private String deptName; + @ApiModelProperty("调出站sid") + private String outPlatSid; + @ApiModelProperty("调出站名称") + private String outPlatName; + @ApiModelProperty("调入站sid") + private String inPlatSid; + @ApiModelProperty("调入站名称") + private String inPlatName; + @ApiModelProperty("调入分公司sid") + private String inOrgSid; + @ApiModelProperty("调入分公司sid") + private String inOrgName; + @ApiModelProperty("确认人sid") + private String confirmSid; + @ApiModelProperty("确认人姓名") + private String confirmName; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("完成时间") + private Date finishTime; + @ApiModelProperty("创建组织") + private String createOrgName; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("流程定义的id") + private String procDefId; // 流程定义的id + @ApiModelProperty("环节定义的sid") + private String nodeId; // 环节定义的sid + @ApiModelProperty("流程实例的sid") + private String procInsId; // 流程实例的sid + @ApiModelProperty("流程状态") + private String nodeState; // 流程状态 + @ApiModelProperty("任务id") + private String taskId; // 任务id + @ApiModelProperty("调拨等级(1一级站内,2分公司内,3集团内)") + private Integer grade; + @ApiModelProperty("调拨单商品明细") + private List wmsInventoryAllocateBillDetailNewList; +} \ No newline at end of file diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/AppInventoryAllocatebillDetailDetailsVoNew.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/AppInventoryAllocatebillDetailDetailsVoNew.java new file mode 100644 index 0000000000..d8e41b8efb --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/AppInventoryAllocatebillDetailDetailsVoNew.java @@ -0,0 +1,103 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.terminal.api.wms.inventoryallocatebill; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-wms(调拨单)
+ * File: WmsInventoryAllocatebillDetailVo.java
+ * Class: com.yxt.wms.api.wmsinventoryallocatebilldetail.WmsInventoryAllocatebillDetailVo
+ * Description: (调拨单-明细) 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-25 16:04:08
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "(调拨单-明细) 视图数据详情", description = "(调拨单-明细) 视图数据详情") +public class AppInventoryAllocatebillDetailDetailsVoNew implements Vo { + + private String sid; + + @ApiModelProperty("主表sid") + private String billSid; + @ApiModelProperty("商品库存sid") + private String inventorySid; + @ApiModelProperty("商品ID") + private String goodsID; + @ApiModelProperty("商品spuSid") + private String goodsSpuSid; + @ApiModelProperty("商品spu名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品sku名称") + private String goodsSkuTitle; + @ApiModelProperty("图号") + private String goodsSkuCode; + @ApiModelProperty("规格") + private String goodsSkuOwnSpec; + @ApiModelProperty("厂家sid") + private String manufacturerSid; + @ApiModelProperty("厂家名称") + private String manufacturerName; + @ApiModelProperty("单位") + private String unit; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库区sid") + private String warehouseAreaSid; + @ApiModelProperty("库区名称") + private String warehouseArea; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位编码") + private String warehouseRackCode; + @ApiModelProperty("库存数量") + private BigDecimal stockCount; + @ApiModelProperty("成本价") + private BigDecimal taxPrice; + @ApiModelProperty("加价比例(%)") + private BigDecimal markUpRatio; + @ApiModelProperty("调拔单价") + private BigDecimal requAmount; + @ApiModelProperty("调拨数量") + private BigDecimal count; + @ApiModelProperty("调拨金额(调拨数量*含税价)") + private BigDecimal amount; +} \ No newline at end of file diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/AppInventoryAllocatebillFeign.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/AppInventoryAllocatebillFeign.java new file mode 100644 index 0000000000..dd8e2ca2b6 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/AppInventoryAllocatebillFeign.java @@ -0,0 +1,58 @@ +package com.yxt.anrui.terminal.api.wms.inventoryallocatebill; + +import com.yxt.anrui.terminal.api.wms.inventoryallocatebill.flowable.AppDelegateQuery; +import com.yxt.anrui.terminal.api.wms.inventoryallocatebill.flowable.AppFlowDto; +import com.yxt.anrui.terminal.api.wms.inventoryallocatebill.flowable.AppFlowQuery; +import com.yxt.anrui.terminal.api.wms.inventoryallocatebill.flowable.AppFlowTaskQuery; +import com.yxt.common.core.result.ResultBean; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.cloud.openfeign.SpringQueryMap; +import org.springframework.web.bind.annotation.*; + +@FeignClient( + contextId = "terminal-AppInventoryAllocatebill", + name = "anrui-terminal", + path = "v1/inventoryallocatebill") +public interface AppInventoryAllocatebillFeign { + + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid); + + /**********************************************流程********************************************/ + + @ApiOperation("办理") + @PutMapping("/agreeCreditInfo") + @ResponseBody + ResultBean agreeCreditInfo(@RequestBody AppFlowDto dto); + + @ApiOperation("驳回") + @PutMapping("/rejectCreditInfo") + @ResponseBody + ResultBean rejectCreditInfo(@RequestBody AppFlowTaskQuery query); + + @ApiOperation("撤回") + @PutMapping("/recallCreditInfo") + @ResponseBody + ResultBean recallCreditInfo(@RequestBody AppFlowTaskQuery query); + + @ApiOperation("终止") + @PutMapping("/stopCreditInfo") + @ResponseBody + ResultBean stopCreditInfo(@RequestBody AppFlowTaskQuery query); + + @ApiOperation("获取流程操作标题") + @GetMapping("/getFlowOperateTitle") + @ResponseBody + ResultBean getFlowOperateTitle(@SpringQueryMap AppFlowQuery query); + + @ApiOperation(value = "加签") + @PutMapping(value = "/delegate") + @ResponseBody + public ResultBean delegate(@RequestBody AppDelegateQuery delegateQuery); + + @ApiOperation(value = "转办") + @PutMapping(value = "/assignTask") + @ResponseBody + public ResultBean assignTask(@RequestBody AppDelegateQuery delegateQuery); +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/flowable/AppDelegateQuery.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/flowable/AppDelegateQuery.java new file mode 100644 index 0000000000..6092de71a9 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/flowable/AppDelegateQuery.java @@ -0,0 +1,25 @@ +package com.yxt.anrui.terminal.api.wms.inventoryallocatebill.flowable; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Administrator + * @description + * @date 2023/9/28 10:16 + */ +@Data +public class AppDelegateQuery { + @ApiModelProperty + private String userSid; + @ApiModelProperty("流程实例id") + @JsonProperty("procInsId") + private String instanceId; + @ApiModelProperty("任务Id") + private String taskId; + @ApiModelProperty("审批人sid") + private String assignee; + @ApiModelProperty("填写意见") + private String views; +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/flowable/AppFlowDto.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/flowable/AppFlowDto.java new file mode 100644 index 0000000000..0d3dd8abd5 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/flowable/AppFlowDto.java @@ -0,0 +1,37 @@ +package com.yxt.anrui.terminal.api.wms.inventoryallocatebill.flowable; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @Author dimengzhe + * @Date 2022/8/9 14:09 + * @Description + */ +@Data +public class AppFlowDto implements Dto { + private static final long serialVersionUID = 3626473483180150495L; + + @ApiModelProperty(value = "任务id") + @NotBlank(message = "参数错误:taskId") + private String taskId; + @ApiModelProperty(value = "流程id") + @NotBlank(message = "参数错误:procInsId") + @JsonProperty("procInsId") + private String instanceId; + @ApiModelProperty(value = "意见") + private String comment; + @ApiModelProperty(value = "业务sid") + @NotBlank(message = "参数错误:businessSid") + private String businessSid; + @ApiModelProperty(value = "用户sid") + @NotBlank(message = "参数错误:userSid") + private String userSid; + @ApiModelProperty(value = "节点id") + @NotBlank(message = "参数错误:taskDefKey") + private String taskDefKey; +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/flowable/AppFlowQuery.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/flowable/AppFlowQuery.java new file mode 100644 index 0000000000..bd62ef2d11 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/flowable/AppFlowQuery.java @@ -0,0 +1,28 @@ +package com.yxt.anrui.terminal.api.wms.inventoryallocatebill.flowable; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; + +/** + * @Author dimengzhe + * @Date 2022/8/9 14:15 + * @Description + */ +@Data +public class AppFlowQuery implements Query { + private static final long serialVersionUID = 5514095179438249641L; + + @ApiModelProperty(value = "节点key") + private String taskDefKey; + @ApiModelProperty(value = "业务sid") + private String businessSid; + @ApiModelProperty(value = "0 上一环节 1下一环节") + @NotNull(message = "参数错误:next") + private Integer next; + + @ApiModelProperty("组织机构全路径") + private String orgPath; +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/flowable/AppFlowTaskQuery.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/flowable/AppFlowTaskQuery.java new file mode 100644 index 0000000000..003094e17d --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/wms/inventoryallocatebill/flowable/AppFlowTaskQuery.java @@ -0,0 +1,47 @@ +package com.yxt.anrui.terminal.api.wms.inventoryallocatebill.flowable; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @Author dimengzhe + * @Date 2022/8/9 14:11 + * @Description + */ +@Data +public class AppFlowTaskQuery implements Query { + private static final long serialVersionUID = -7082170710942810289L; + + /** + * 终止、驳回、撤回 + */ + @ApiModelProperty("任务Id") + @NotBlank(message = "参数错误:taskId") + private String taskId; + /** + * 终止、驳回、撤回 + */ + @ApiModelProperty("业务sid") + @NotBlank(message = "参数错误:businessSid") + private String businessSid; + /** + * 终止、驳回 + */ + @ApiModelProperty("任务意见") + private String comment; + /** + * 终止、撤回、驳回 + */ + @ApiModelProperty("用户Sid") + private String userSid; + /** + * 终止 + */ + @ApiModelProperty("流程实例Id") + @JsonProperty("procInsId") + private String instanceId; +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/TerminalApplication.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/TerminalApplication.java index 390d5a2623..e1c563e966 100644 --- a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/TerminalApplication.java +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/TerminalApplication.java @@ -15,7 +15,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients; "com.yxt.anrui.terminal", "com.yxt.common.base.config" },exclude = {DataSourceAutoConfiguration.class}) -@EnableFeignClients(basePackages = {"com.yxt.anrui.portal", "com.yxt.anrui.crm", "com.yxt.anrui.base", "com.yxt.anrui.riskcenter","com.yxt.anrui.flowable","com.yxt.anrui.buscenter","com.yxt.anrui.scm","com.yxt.anrui.fin", "com.yxt.anrui.terminal.fegin.wmsinventorycheckbill","com.yxt.anrui.terminal.fegin.wmsinventoryprofitin","com.yxt.anrui.terminal.fegin.wmsinventoryprofitout","com.yxt.anrui.terminal.fegin.basegoodssku","com.yxt.anrui.terminal.fegin.basesupplierinfo","com.yxt.anrui.terminal.fegin.wmsInventory","com.yxt.anrui.terminal.fegin.asbusrepairbill","com.yxt.anrui.terminal.fegin.pmspurchasebill","com.yxt.anrui.terminal.fegin.pmspurchasebackbill","com.yxt.anrui.terminal.fegin.smspricestrategybill","com.yxt.anrui.terminal.fegin.astechtitleapply","com.yxt.anrui.terminal.fegin.asserviceaccommapply","com.yxt.anrui.terminal.fegin.asbusclaiminvoicebill"}) +@EnableFeignClients(basePackages = {"com.yxt.anrui.portal", "com.yxt.anrui.crm", "com.yxt.anrui.base", "com.yxt.anrui.riskcenter","com.yxt.anrui.flowable","com.yxt.anrui.buscenter","com.yxt.anrui.scm","com.yxt.anrui.fin", "com.yxt.anrui.terminal.fegin.wmsinventorycheckbill","com.yxt.anrui.terminal.fegin.wmsinventoryprofitin","com.yxt.anrui.terminal.fegin.wmsinventoryprofitout","com.yxt.anrui.terminal.fegin.basegoodssku","com.yxt.anrui.terminal.fegin.basesupplierinfo","com.yxt.anrui.terminal.fegin.wmsInventory","com.yxt.anrui.terminal.fegin.asbusrepairbill","com.yxt.anrui.terminal.fegin.pmspurchasebill","com.yxt.anrui.terminal.fegin.pmspurchasebackbill","com.yxt.anrui.terminal.fegin.smspricestrategybill","com.yxt.anrui.terminal.fegin.astechtitleapply","com.yxt.anrui.terminal.fegin.asserviceaccommapply","com.yxt.anrui.terminal.fegin.asbusclaiminvoicebill","com.yxt.anrui.terminal.fegin.wmsinventoryallocatebill","com.yxt.anrui.terminal.fegin.asoldpartreturnapply"}) public class TerminalApplication { public static void main(String[] args) { diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/as/oldpartreturnapply/AppOldpartreturnApplyRest.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/as/oldpartreturnapply/AppOldpartreturnApplyRest.java new file mode 100644 index 0000000000..210dc5cd9a --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/as/oldpartreturnapply/AppOldpartreturnApplyRest.java @@ -0,0 +1,85 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.terminal.biz.as.oldpartreturnapply; + +import com.yxt.anrui.terminal.api.as.oldpartreturnapply.AppOldpartreturnApplyDetailsVo; +import com.yxt.anrui.terminal.api.as.oldpartreturnapply.AppOldpartreturnApplyFeign; +import com.yxt.anrui.terminal.api.as.oldpartreturnapply.flowable.AppDelegateQuery; +import com.yxt.anrui.terminal.api.as.oldpartreturnapply.flowable.AppFlowDto; +import com.yxt.anrui.terminal.api.as.oldpartreturnapply.flowable.AppFlowQuery; +import com.yxt.anrui.terminal.api.as.oldpartreturnapply.flowable.AppFlowTaskQuery; +import com.yxt.common.core.result.ResultBean; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("v1/oldpartreturnapply") +public class AppOldpartreturnApplyRest implements AppOldpartreturnApplyFeign { + + @Autowired + private AppOldpartreturnApplyService appOldpartreturnApplyService; + + @Override + public ResultBean fetchDetailsBySid(String sid) { + return appOldpartreturnApplyService.fetchDetailsBySid(sid); + } + + @Override + public ResultBean agreeCreditInfo(AppFlowDto dto) { + return appOldpartreturnApplyService.agreeCreditInfo(dto); + } + + @Override + public ResultBean rejectCreditInfo(AppFlowTaskQuery query) { + return appOldpartreturnApplyService.rejectCreditInfo(query); + } + + @Override + public ResultBean recallCreditInfo(AppFlowTaskQuery query) { + return appOldpartreturnApplyService.recallCreditInfo(query); + } + + @Override + public ResultBean stopCreditInfo(AppFlowTaskQuery query) { + return appOldpartreturnApplyService.stopCreditInfo(query); + } + + @Override + public ResultBean getFlowOperateTitle(AppFlowQuery query) { + return appOldpartreturnApplyService.getFlowOperateTitle(query); + } + + @Override + public ResultBean delegate(AppDelegateQuery delegateQuery) { + return appOldpartreturnApplyService.delegate(delegateQuery); + } + + @Override + public ResultBean assignTask(AppDelegateQuery delegateQuery) { + return appOldpartreturnApplyService.assignTask(delegateQuery); + } +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/as/oldpartreturnapply/AppOldpartreturnApplyService.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/as/oldpartreturnapply/AppOldpartreturnApplyService.java new file mode 100644 index 0000000000..ff72622f55 --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/as/oldpartreturnapply/AppOldpartreturnApplyService.java @@ -0,0 +1,186 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.terminal.biz.as.oldpartreturnapply; + +import cn.hutool.core.bean.BeanUtil; +import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg; +import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; +import com.yxt.anrui.portal.api.sysuser.SysUserFeign; +import com.yxt.anrui.portal.api.sysuser.SysUserVo; +import com.yxt.anrui.terminal.api.as.oldpartreturnapply.AppOldpartreturnApplyDetailsVo; +import com.yxt.anrui.terminal.api.as.oldpartreturnapply.AppOldpartreturnDetailsVo; +import com.yxt.anrui.terminal.api.as.oldpartreturnapply.flowable.AppDelegateQuery; +import com.yxt.anrui.terminal.api.as.oldpartreturnapply.flowable.AppFlowDto; +import com.yxt.anrui.terminal.api.as.oldpartreturnapply.flowable.AppFlowQuery; +import com.yxt.anrui.terminal.api.as.oldpartreturnapply.flowable.AppFlowTaskQuery; +import com.yxt.anrui.terminal.fegin.asoldpartreturnapply.AsOldpartreturnApplyDetailsVo; +import com.yxt.anrui.terminal.fegin.asoldpartreturnapply.AsOldpartreturnApplyFegin; +import com.yxt.anrui.terminal.fegin.asoldpartreturnapply.flowable.*; +import com.yxt.anrui.terminal.fegin.astechtitleapply.flowable.*; +import com.yxt.common.core.result.ResultBean; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +@Service +public class AppOldpartreturnApplyService { + + @Resource + private AsOldpartreturnApplyFegin asOldpartreturnApplyFegin; + @Autowired + private SysStaffOrgFeign sysStaffOrgFeign; + @Autowired + private SysUserFeign sysUserFeign; + + public ResultBean fetchDetailsBySid(String sid) { + ResultBean rb = ResultBean.fireFail(); + AsOldpartreturnApplyDetailsVo data = asOldpartreturnApplyFegin.fetchDetailsBySid(sid).getData(); + AppOldpartreturnApplyDetailsVo appOldpartreturnApplyDetailsVo = new AppOldpartreturnApplyDetailsVo(); + BeanUtil.copyProperties(data,appOldpartreturnApplyDetailsVo); + appOldpartreturnApplyDetailsVo.setProcInsId(data.getProcInstId()); + appOldpartreturnApplyDetailsVo.setCreateDeptName(data.getDeptName()); + List filePaths = data.getFilePaths(); + ArrayList files = new ArrayList<>(); + for (String path : filePaths) { + files.add(path); + } + appOldpartreturnApplyDetailsVo.setFiles(files); + List asOldpartreturnList = appOldpartreturnApplyDetailsVo.getAsOldpartreturnList(); + for (AppOldpartreturnDetailsVo appOldpartreturnDetailsVo : asOldpartreturnList) { + appOldpartreturnDetailsVo.setGoodsSkuName(appOldpartreturnDetailsVo.getGoodsSkuTitle()); + appOldpartreturnDetailsVo.setIsCf2(appOldpartreturnDetailsVo.getIsCf().equals("1") ? "是" : "否"); + } + return rb.success().setData(appOldpartreturnApplyDetailsVo); + } + + public ResultBean agreeCreditInfo(AppFlowDto dto) { + ResultBean rb = ResultBean.fireFail(); + //根据用户sid获取staffSid + ResultBean userVoResultBean = sysUserFeign.fetchBySid(dto.getUserSid()); + if (!userVoResultBean.getSuccess()) { + return rb.setMsg(userVoResultBean.getMsg()); + } + //根据staffSid获取用户的组织全路径 + ResultBean staffOrgResultBean = sysStaffOrgFeign.getOrgByStaffSid(userVoResultBean.getData().getStaffSid()); + if (!staffOrgResultBean.getSuccess()) { + return rb.setMsg(staffOrgResultBean.getMsg()); + } + //用户的组织全路径 + String orgSidPath = staffOrgResultBean.getData().getOrgSidPath(); + AsOldpartreturnApplyCompleteDto asOldpartreturnApplyCompleteDto = new AsOldpartreturnApplyCompleteDto(); + BeanUtil.copyProperties(dto, asOldpartreturnApplyCompleteDto); + asOldpartreturnApplyCompleteDto.setOrgPath(orgSidPath); + ResultBean resultBean = asOldpartreturnApplyFegin.complete(asOldpartreturnApplyCompleteDto); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success().setData(resultBean.getData()); + } + + public ResultBean rejectCreditInfo(AppFlowTaskQuery query) { + ResultBean rb = ResultBean.fireFail(); + AsOldpartreturnApplyTaskQuery asOldpartreturnApplyTaskQuery = new AsOldpartreturnApplyTaskQuery(); + BeanUtil.copyProperties(query, asOldpartreturnApplyTaskQuery); + ResultBean resultBean = asOldpartreturnApplyFegin.taskReject(asOldpartreturnApplyTaskQuery); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success().setData(resultBean.getData()); + } + + public ResultBean recallCreditInfo(AppFlowTaskQuery query) { + ResultBean rb = ResultBean.fireFail(); + AsOldpartreturnApplyTaskQuery asOldpartreturnApplyTaskQuery = new AsOldpartreturnApplyTaskQuery(); + BeanUtil.copyProperties(query, asOldpartreturnApplyTaskQuery); + ResultBean resultBean = asOldpartreturnApplyFegin.revokeProcess(asOldpartreturnApplyTaskQuery); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success().setData(resultBean.getData()); + } + + public ResultBean stopCreditInfo(AppFlowTaskQuery query) { + ResultBean rb = ResultBean.fireFail(); + AsOldpartreturnApplyTaskQuery asOldpartreturnApplyTaskQuery = new AsOldpartreturnApplyTaskQuery(); + BeanUtil.copyProperties(query, asOldpartreturnApplyTaskQuery); + ResultBean resultBean = asOldpartreturnApplyFegin.breakProcess(asOldpartreturnApplyTaskQuery); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success().setData(resultBean.getData()); + } + + public ResultBean getFlowOperateTitle(AppFlowQuery query) { + ResultBean rb = ResultBean.fireFail(); + //0 上一环节 1下一环节 + int next = query.getNext(); + AsOldpartreturnApplyNodeQuery getNodeQuery = new AsOldpartreturnApplyNodeQuery(); + BeanUtil.copyProperties(query, getNodeQuery); + String data = ""; + if (next == 0) { + ResultBean> getPreviousNodesForReject = asOldpartreturnApplyFegin.getPreviousNodesForReject(getNodeQuery); + if (getPreviousNodesForReject.getSuccess()) { + getPreviousNodesForReject.getData().removeAll(Collections.singleton(null)); + data = getPreviousNodesForReject.getData().get(0).getName(); + } else { + return rb.setMsg(getPreviousNodesForReject.getMsg()); + } + } else if (next == 1) { + ResultBean> getNextNodesForSubmit = asOldpartreturnApplyFegin.getNextNodesForSubmit(getNodeQuery); + if (getNextNodesForSubmit.getSuccess()) { + getNextNodesForSubmit.getData().removeAll(Collections.singleton(null)); + data = getNextNodesForSubmit.getData().get(0).getName(); + } else { + return rb.setMsg(getNextNodesForSubmit.getMsg()); + } + } else { + return rb.setMsg("参数错误:next"); + } + return rb.success().setData(data); + } + + public ResultBean delegate(AppDelegateQuery delegateQuery) { + ResultBean rb = ResultBean.fireFail(); + AsOldpartreturnApplyDelegateQuery delegateQuery1 = new + AsOldpartreturnApplyDelegateQuery(); + BeanUtil.copyProperties(delegateQuery, delegateQuery1); + asOldpartreturnApplyFegin.delegate(delegateQuery1); + return rb.success(); + } + + public ResultBean assignTask(AppDelegateQuery delegateQuery) { + ResultBean rb = ResultBean.fireFail(); + AsOldpartreturnApplyDelegateQuery delegateQuery1 = new + AsOldpartreturnApplyDelegateQuery(); + BeanUtil.copyProperties(delegateQuery, delegateQuery1); + asOldpartreturnApplyFegin.assignTask(delegateQuery1); + return rb.success(); + } +} \ No newline at end of file diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/wms/inventoryallocatebill/AppInventoryAllocatebillRest.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/wms/inventoryallocatebill/AppInventoryAllocatebillRest.java new file mode 100644 index 0000000000..1de7ba9aa0 --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/wms/inventoryallocatebill/AppInventoryAllocatebillRest.java @@ -0,0 +1,85 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.terminal.biz.wms.inventoryallocatebill; + +import com.yxt.anrui.terminal.api.wms.inventoryallocatebill.AppInventoryAllocateBillDetailsVoNew; +import com.yxt.anrui.terminal.api.wms.inventoryallocatebill.flowable.AppDelegateQuery; +import com.yxt.anrui.terminal.api.wms.inventoryallocatebill.flowable.AppFlowDto; +import com.yxt.anrui.terminal.api.wms.inventoryallocatebill.flowable.AppFlowQuery; +import com.yxt.anrui.terminal.api.wms.inventoryallocatebill.flowable.AppFlowTaskQuery; +import com.yxt.anrui.terminal.api.wms.inventoryallocatebill.AppInventoryAllocatebillFeign; +import com.yxt.common.core.result.ResultBean; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("v1/inventoryallocatebill") +public class AppInventoryAllocatebillRest implements AppInventoryAllocatebillFeign { + + @Autowired + private AppInventoryAllocatebillService appInventoryAllocatebillService; + + @Override + public ResultBean fetchDetailsBySid(String sid) { + return appInventoryAllocatebillService.fetchDetailsBySid(sid); + } + + @Override + public ResultBean agreeCreditInfo(AppFlowDto dto) { + return appInventoryAllocatebillService.agreeCreditInfo(dto); + } + + @Override + public ResultBean rejectCreditInfo(AppFlowTaskQuery query) { + return appInventoryAllocatebillService.rejectCreditInfo(query); + } + + @Override + public ResultBean recallCreditInfo(AppFlowTaskQuery query) { + return appInventoryAllocatebillService.recallCreditInfo(query); + } + + @Override + public ResultBean stopCreditInfo(AppFlowTaskQuery query) { + return appInventoryAllocatebillService.stopCreditInfo(query); + } + + @Override + public ResultBean getFlowOperateTitle(AppFlowQuery query) { + return appInventoryAllocatebillService.getFlowOperateTitle(query); + } + + @Override + public ResultBean delegate(AppDelegateQuery delegateQuery) { + return appInventoryAllocatebillService.delegate(delegateQuery); + } + + @Override + public ResultBean assignTask(AppDelegateQuery delegateQuery) { + return appInventoryAllocatebillService.assignTask(delegateQuery); + } +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/wms/inventoryallocatebill/AppInventoryAllocatebillService.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/wms/inventoryallocatebill/AppInventoryAllocatebillService.java new file mode 100644 index 0000000000..e76a9f3ee5 --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/wms/inventoryallocatebill/AppInventoryAllocatebillService.java @@ -0,0 +1,172 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.terminal.biz.wms.inventoryallocatebill; + +import cn.hutool.core.bean.BeanUtil; +import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg; +import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; +import com.yxt.anrui.portal.api.sysuser.SysUserFeign; +import com.yxt.anrui.portal.api.sysuser.SysUserVo; +import com.yxt.anrui.terminal.api.wms.inventoryallocatebill.flowable.AppDelegateQuery; +import com.yxt.anrui.terminal.api.wms.inventoryallocatebill.flowable.AppFlowDto; +import com.yxt.anrui.terminal.api.wms.inventoryallocatebill.flowable.AppFlowQuery; +import com.yxt.anrui.terminal.api.wms.inventoryallocatebill.flowable.AppFlowTaskQuery; +import com.yxt.anrui.terminal.api.wms.inventoryallocatebill.AppInventoryAllocateBillDetailsVoNew; +import com.yxt.anrui.terminal.fegin.wmsinventoryallocatebill.WmsInventoryAllocateBillDetailsVoNew; +import com.yxt.anrui.terminal.fegin.wmsinventoryallocatebill.WmsInventoryAllocatebillFeign; +import com.yxt.anrui.terminal.fegin.wmsinventoryallocatebill.flowable.*; +import com.yxt.common.core.result.ResultBean; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +@Service +public class AppInventoryAllocatebillService { + + @Resource + private WmsInventoryAllocatebillFeign wmsInventoryAllocatebillFeign; + @Autowired + private SysStaffOrgFeign sysStaffOrgFeign; + @Autowired + private SysUserFeign sysUserFeign; + + public ResultBean fetchDetailsBySid(String sid) { + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBillDetailsVoNew data = wmsInventoryAllocatebillFeign.fetchDetailsBySid(sid).getData(); + AppInventoryAllocateBillDetailsVoNew appInventoryAllocateBillDetailsVoNew = new AppInventoryAllocateBillDetailsVoNew(); + BeanUtil.copyProperties(data,appInventoryAllocateBillDetailsVoNew); + appInventoryAllocateBillDetailsVoNew.setProcInsId(data.getProcInstId()); + return rb.success().setData(appInventoryAllocateBillDetailsVoNew); + } + + public ResultBean agreeCreditInfo(AppFlowDto dto) { + ResultBean rb = ResultBean.fireFail(); + //根据用户sid获取staffSid + ResultBean userVoResultBean = sysUserFeign.fetchBySid(dto.getUserSid()); + if (!userVoResultBean.getSuccess()) { + return rb.setMsg(userVoResultBean.getMsg()); + } + //根据staffSid获取用户的组织全路径 + ResultBean staffOrgResultBean = sysStaffOrgFeign.getOrgByStaffSid(userVoResultBean.getData().getStaffSid()); + if (!staffOrgResultBean.getSuccess()) { + return rb.setMsg(staffOrgResultBean.getMsg()); + } + //用户的组织全路径 + String orgSidPath = staffOrgResultBean.getData().getOrgSidPath(); + CompleteFlowDto completeFlowDto = new CompleteFlowDto(); + BeanUtil.copyProperties(dto, completeFlowDto); + completeFlowDto.setOrgSidPath(orgSidPath); + ResultBean resultBean = wmsInventoryAllocatebillFeign.complete(completeFlowDto); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success().setData(resultBean.getData()); + } + + public ResultBean rejectCreditInfo(AppFlowTaskQuery query) { + ResultBean rb = ResultBean.fireFail(); + FlowTaskQuery flowTaskQuery = new FlowTaskQuery(); + BeanUtil.copyProperties(query, flowTaskQuery); + ResultBean resultBean = wmsInventoryAllocatebillFeign.taskReject(flowTaskQuery); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success().setData(resultBean.getData()); + } + + public ResultBean recallCreditInfo(AppFlowTaskQuery query) { + ResultBean rb = ResultBean.fireFail(); + FlowTaskQuery flowTaskQuery = new FlowTaskQuery(); + BeanUtil.copyProperties(query, flowTaskQuery); + ResultBean resultBean = wmsInventoryAllocatebillFeign.revokeProcess(flowTaskQuery); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success().setData(resultBean.getData()); + } + + public ResultBean stopCreditInfo(AppFlowTaskQuery query) { + ResultBean rb = ResultBean.fireFail(); + FlowTaskQuery flowTaskQuery = new FlowTaskQuery(); + BeanUtil.copyProperties(query, flowTaskQuery); + ResultBean resultBean = wmsInventoryAllocatebillFeign.breakProcess(flowTaskQuery); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success().setData(resultBean.getData()); + } + + public ResultBean getFlowOperateTitle(AppFlowQuery query) { + ResultBean rb = ResultBean.fireFail(); + //0 上一环节 1下一环节 + int next = query.getNext(); + FlowNodeQuery getNodeQuery = new FlowNodeQuery(); + BeanUtil.copyProperties(query, getNodeQuery); + String data = ""; + if (next == 0) { + ResultBean> getPreviousNodesForReject = wmsInventoryAllocatebillFeign.getPreviousNodesForReject(getNodeQuery); + if (getPreviousNodesForReject.getSuccess()) { + getPreviousNodesForReject.getData().removeAll(Collections.singleton(null)); + data = getPreviousNodesForReject.getData().get(0).getName(); + } else { + return rb.setMsg(getPreviousNodesForReject.getMsg()); + } + } else if (next == 1) { + ResultBean> getNextNodesForSubmit = wmsInventoryAllocatebillFeign.getNextNodesForSubmit(getNodeQuery); + if (getNextNodesForSubmit.getSuccess()) { + getNextNodesForSubmit.getData().removeAll(Collections.singleton(null)); + data = getNextNodesForSubmit.getData().get(0).getName(); + } else { + return rb.setMsg(getNextNodesForSubmit.getMsg()); + } + } else { + return rb.setMsg("参数错误:next"); + } + return rb.success().setData(data); + } + + public ResultBean delegate(AppDelegateQuery delegateQuery) { + ResultBean rb = ResultBean.fireFail(); + FlowDelegateQuery delegateQuery1 = new + FlowDelegateQuery(); + BeanUtil.copyProperties(delegateQuery, delegateQuery1); + wmsInventoryAllocatebillFeign.delegate(delegateQuery1); + return rb.success(); + } + + public ResultBean assignTask(AppDelegateQuery delegateQuery) { + ResultBean rb = ResultBean.fireFail(); + FlowDelegateQuery delegateQuery1 = new + FlowDelegateQuery(); + BeanUtil.copyProperties(delegateQuery, delegateQuery1); + wmsInventoryAllocatebillFeign.assignTask(delegateQuery1); + return rb.success(); + } +} \ No newline at end of file diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/AsOldpartreturnApplyDetailsVo.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/AsOldpartreturnApplyDetailsVo.java new file mode 100644 index 0000000000..e9411748b5 --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/AsOldpartreturnApplyDetailsVo.java @@ -0,0 +1,94 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.terminal.fegin.asoldpartreturnapply; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * Project: anrui-as(旧件返厂)
+ * File: AsOldpartreturnApplyVo.java
+ * Class: com.yxt.anrui.as.api.asoldpartreturnapply.AsOldpartreturnApplyVo
+ * Description: 旧件返厂申请 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-17 10:29:50
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "旧件返厂申请 视图数据详情", description = "旧件返厂申请 视图数据详情") +public class AsOldpartreturnApplyDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; // 制单人姓名 + @ApiModelProperty("发起部门sid") + private String deptSid; // 发起部门sid + @ApiModelProperty("发起部门名称") + private String deptName; // 发起部门名称 + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty("申请日期") + private Date createTime; + @ApiModelProperty("单据编号") + private String billNo; // 单据编号 + @ApiModelProperty("附件路径") + private List filePaths = new ArrayList<>(); + @ApiModelProperty("分公司sid") + private String useOrgSid; // 分公司sid + @ApiModelProperty("分公司名称") + private String useOrgName; // 分公司名称 + @ApiModelProperty("流程定义的id") + private String procDefId; // 流程定义的id + @ApiModelProperty("环节定义的sid") + private String nodeId; // 环节定义的sid + @ApiModelProperty("流程实例的sid") + private String procInstId; // 流程实例的sid + @ApiModelProperty("流程状态") + private String nodeState; // 流程状态 + @ApiModelProperty("任务id") + private String taskId; // 任务id + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("办结时间") + private Date finishTime; // 办结时间 + @ApiModelProperty("返厂旧件列表") + private List asOldpartreturnList; +} \ No newline at end of file diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/AsOldpartreturnApplyFegin.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/AsOldpartreturnApplyFegin.java new file mode 100644 index 0000000000..1b6b29991e --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/AsOldpartreturnApplyFegin.java @@ -0,0 +1,59 @@ +package com.yxt.anrui.terminal.fegin.asoldpartreturnapply; + +import com.yxt.anrui.terminal.fegin.asoldpartreturnapply.flowable.*; +import com.yxt.anrui.terminal.fegin.astechtitleapply.AsTechTitleApplyDetailsVo; +import com.yxt.anrui.terminal.fegin.astechtitleapply.flowable.*; +import com.yxt.common.core.result.ResultBean; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.cloud.openfeign.SpringQueryMap; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import java.util.List; + +@FeignClient( + contextId = "yxt-as-AsOldpartreturnApply", + name = "yxt-as", + path = "v1/asoldpartreturnapply" +) +public interface AsOldpartreturnApplyFegin { + + @ApiOperation("详情") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid); + + @ApiOperation(value = "办理(同意)") + @PostMapping("/complete") + public ResultBean complete(@Valid @RequestBody AsOldpartreturnApplyCompleteDto query); + + @ApiOperation(value = "获取上一个环节") + @GetMapping(value = "/getPreviousNodesForReject") + ResultBean> getPreviousNodesForReject(@Valid @SpringQueryMap AsOldpartreturnApplyNodeQuery query); + + @ApiOperation(value = "获取下一个环节") + @GetMapping(value = "/getNextNodesForSubmit") + ResultBean> getNextNodesForSubmit(@Valid @SpringQueryMap AsOldpartreturnApplyNodeQuery query); + + @ApiOperation(value = "驳回任务") + @PostMapping(value = "/reject") + public ResultBean taskReject(@Valid @RequestBody AsOldpartreturnApplyTaskQuery query); + + @ApiOperation(value = "撤回流程") + @PostMapping(value = "/revokeProcess") + public ResultBean revokeProcess(@Valid @RequestBody AsOldpartreturnApplyTaskQuery query); + + @ApiOperation(value = "终止任务") + @PostMapping(value = "/breakProcess") + public ResultBean breakProcess(@Valid @RequestBody AsOldpartreturnApplyTaskQuery query); + + @ApiOperation(value = "加签") + @PostMapping(value = "/delegate") + @ResponseBody + public ResultBean delegate(@RequestBody AsOldpartreturnApplyDelegateQuery query); + + @ApiOperation(value = "转办") + @PutMapping(value = "/assignTask") + @ResponseBody + public ResultBean assignTask(@RequestBody AsOldpartreturnApplyDelegateQuery query); +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/AsOldpartreturnDetailsVo.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/AsOldpartreturnDetailsVo.java new file mode 100644 index 0000000000..4945e32465 --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/AsOldpartreturnDetailsVo.java @@ -0,0 +1,89 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.terminal.fegin.asoldpartreturnapply; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: anrui-as(旧件返厂)
+ * File: AsOldpartreturnVo.java
+ * Class: com.yxt.anrui.as.api.asoldpartreturn.AsOldpartreturnVo
+ * Description: 返厂旧件列表 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-04-17 10:29:50
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "返厂旧件列表 视图数据详情", description = "返厂旧件列表 视图数据详情") +public class AsOldpartreturnDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("主表sid") + private String mainSid; + @ApiModelProperty("车架号") + private String vinNo; + @ApiModelProperty("商品spuSid") + private String goodsSpuSid; + @ApiModelProperty("商品spu名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品sku名称") + private String goodsSkuTitle; + @ApiModelProperty("图号") + private String goodsSkuCode; + @ApiModelProperty("规格") + private String goodsSkuOwnSpec; + @ApiModelProperty("厂家sid") + private String manufacturerSid; + @ApiModelProperty("厂家名称") + private String manufacturerName; + @ApiModelProperty("单位") + private String unit; + @ApiModelProperty("维修单号") + private String sourceBillNo; + @ApiModelProperty("索赔单号") + private String claimBillNo; + @ApiModelProperty("是否迟返(1是0否)") + private String isCf; + @ApiModelProperty("需返厂数量") + private BigDecimal needReturnCount; // 需返厂数量 + @ApiModelProperty("实际返厂数量") + private BigDecimal actualReturnCount; // 实际返厂数量 +} \ No newline at end of file diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyCompleteDto.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyCompleteDto.java new file mode 100644 index 0000000000..1b0985ca38 --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyCompleteDto.java @@ -0,0 +1,37 @@ +package com.yxt.anrui.terminal.fegin.asoldpartreturnapply.flowable; + +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @Author dimengzhe + * @Date 2022/9/6 14:57 + * @Description + */ +@Data +public class AsOldpartreturnApplyCompleteDto implements Dto { + private static final long serialVersionUID = 6378752532534735663L; + + @ApiModelProperty(value = "用户sid") + private String userSid; + @ApiModelProperty(value = "节点id") + @NotBlank(message = "参数错误:taskDefKey") + private String taskDefKey; + @ApiModelProperty(value = "任务id") + @NotBlank(message = "参数错误:taskId") + private String taskId; + @ApiModelProperty(value = "流程id(PC)") + private String instanceId; + @ApiModelProperty(value = "流程id(移动)") + private String procInsId; + @ApiModelProperty(value = "意见") + private String comment; + @ApiModelProperty(value = "业务sid") + @NotBlank(message = "参数错误:businessSid") + private String businessSid; + + private String orgPath; +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyDelegateQuery.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyDelegateQuery.java new file mode 100644 index 0000000000..1474f2e0cd --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyDelegateQuery.java @@ -0,0 +1,26 @@ +package com.yxt.anrui.terminal.fegin.asoldpartreturnapply.flowable; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Administrator + * @description + * @date 2023/9/28 9:28 + */ +@Data +public class AsOldpartreturnApplyDelegateQuery { + @ApiModelProperty + private String userSid; + @ApiModelProperty("流程实例id") +// @JsonProperty("procInsId") + private String instanceId; + @ApiModelProperty("任务Id") + private String taskId; + @ApiModelProperty("审批人sid") + private String assignee; + @ApiModelProperty("填写意见") + private String views; + + +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyNodeQuery.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyNodeQuery.java new file mode 100644 index 0000000000..afe1ae024c --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyNodeQuery.java @@ -0,0 +1,25 @@ +package com.yxt.anrui.terminal.fegin.asoldpartreturnapply.flowable; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @Author dimengzhe + * @Date 2022/9/6 15:04 + * @Description + */ +@Data +public class AsOldpartreturnApplyNodeQuery implements Query { + private static final long serialVersionUID = 9117613683840483366L; + + @ApiModelProperty(value = "环节定义id") + @NotBlank(message = "参数错误:taskDefKey") + private String taskDefKey; + @ApiModelProperty(value = "业务sid") + private String businessSid; + @ApiModelProperty(value = "0 上一环节 1下一环节") + private Integer next; +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyNodeVo.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyNodeVo.java new file mode 100644 index 0000000000..b4b61d1037 --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyNodeVo.java @@ -0,0 +1,26 @@ +package com.yxt.anrui.terminal.fegin.asoldpartreturnapply.flowable; + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @Author dimengzhe + * @Date 2022/9/6 15:03 + * @Description + */ +@Data +public class AsOldpartreturnApplyNodeVo implements Vo { + private static final long serialVersionUID = -833419512294877848L; + + @ApiModelProperty(value = "节点名称") + private String name; + @ApiModelProperty(value = "节点id") + private String id; + @ApiModelProperty(value = "审批组") + private List candidateGroups; + @ApiModelProperty(value = "是否是最后环节") + private String endTask; +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyTaskQuery.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyTaskQuery.java new file mode 100644 index 0000000000..df0179be0b --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/asoldpartreturnapply/flowable/AsOldpartreturnApplyTaskQuery.java @@ -0,0 +1,48 @@ +package com.yxt.anrui.terminal.fegin.asoldpartreturnapply.flowable; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @Author dimengzhe + * @Date 2022/9/6 15:06 + * @Description + */ +@Data +public class AsOldpartreturnApplyTaskQuery implements Query { + private static final long serialVersionUID = 1288615499873178778L; + + /** + * 终止、驳回、撤回 + */ + @ApiModelProperty("任务Id") + @NotBlank(message = "参数错误:taskId") + private String taskId; + /** + * 终止、驳回、撤回 + */ + @ApiModelProperty("业务sid") + @NotBlank(message = "参数错误:businessSid") + private String businessSid; + /** + * 终止、驳回 + */ + @ApiModelProperty("任务意见") + private String comment; + /** + * 终止、撤回、驳回 + */ + @ApiModelProperty("用户Sid") + private String userSid; + /** + * 终止 + */ + @ApiModelProperty("流程实例Id(PC)") + private String instanceId; + + @ApiModelProperty("流程实例Id(移动)") + private String procInsId; +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/WmsInventoryAllocateBillDetailsVoNew.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/WmsInventoryAllocateBillDetailsVoNew.java new file mode 100644 index 0000000000..144a35b6df --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/WmsInventoryAllocateBillDetailsVoNew.java @@ -0,0 +1,109 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.terminal.fegin.wmsinventoryallocatebill; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * Project: yxt-wms(调拨单)
+ * File: WmsInventoryAllocatebillVo.java
+ * Class: com.yxt.wms.api.wmsinventoryallocatebill.WmsInventoryAllocatebillVo
+ * Description: (调拨单)-调出方操作 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-25 16:04:08
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "(调拨单)-调出方操作 视图数据详情", description = "(调拨单)-调出方操作 视图数据详情") +public class WmsInventoryAllocateBillDetailsVoNew implements Vo { + + private String sid; + + @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @ApiModelProperty("申请日期") + private Date createTime; + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("制单人sid") + private String createBySid; + @ApiModelProperty("制单人姓名") + private String createByName; + @ApiModelProperty("单据编号") + private String billNo; + @ApiModelProperty("申请部门sid") + private String deptSid; + @ApiModelProperty("申请部门名称") + private String deptName; + @ApiModelProperty("调出站sid") + private String outPlatSid; + @ApiModelProperty("调出站名称") + private String outPlatName; + @ApiModelProperty("调入站sid") + private String inPlatSid; + @ApiModelProperty("调入站名称") + private String inPlatName; + @ApiModelProperty("调入分公司sid") + private String inOrgSid; + @ApiModelProperty("调入分公司sid") + private String inOrgName; + @ApiModelProperty("确认人sid") + private String confirmSid; + @ApiModelProperty("确认人姓名") + private String confirmName; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @ApiModelProperty("完成时间") + private Date finishTime; + @ApiModelProperty("创建组织") + private String createOrgName; + @ApiModelProperty("创建组织sid") + private String createOrgSid; + @ApiModelProperty("流程定义的id") + private String procDefId; // 流程定义的id + @ApiModelProperty("环节定义的sid") + private String nodeId; // 环节定义的sid + @ApiModelProperty("流程实例的sid") + private String procInstId; // 流程实例的sid + @ApiModelProperty("流程状态") + private String nodeState; // 流程状态 + @ApiModelProperty("任务id") + private String taskId; // 任务id + @ApiModelProperty("调拨等级(1一级站内,2分公司内,3集团内)") + private Integer grade; + @ApiModelProperty("调拨单商品明细") + private List wmsInventoryAllocateBillDetailNewList; +} \ No newline at end of file diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/WmsInventoryAllocatebillDetailDetailsVoNew.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/WmsInventoryAllocatebillDetailDetailsVoNew.java new file mode 100644 index 0000000000..33275673e5 --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/WmsInventoryAllocatebillDetailDetailsVoNew.java @@ -0,0 +1,103 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.terminal.fegin.wmsinventoryallocatebill; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * Project: yxt-wms(调拨单)
+ * File: WmsInventoryAllocatebillDetailVo.java
+ * Class: com.yxt.wms.api.wmsinventoryallocatebilldetail.WmsInventoryAllocatebillDetailVo
+ * Description: (调拨单-明细) 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-03-25 16:04:08
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "(调拨单-明细) 视图数据详情", description = "(调拨单-明细) 视图数据详情") +public class WmsInventoryAllocatebillDetailDetailsVoNew implements Vo { + + private String sid; + + @ApiModelProperty("主表sid") + private String billSid; + @ApiModelProperty("商品库存sid") + private String inventorySid; + @ApiModelProperty("商品ID") + private String goodsID; + @ApiModelProperty("商品spuSid") + private String goodsSpuSid; + @ApiModelProperty("商品spu名称") + private String goodsSpuName; + @ApiModelProperty("商品Skusid") + private String goodsSkuSid; + @ApiModelProperty("商品sku名称") + private String goodsSkuTitle; + @ApiModelProperty("图号") + private String goodsSkuCode; + @ApiModelProperty("规格") + private String goodsSkuOwnSpec; + @ApiModelProperty("厂家sid") + private String manufacturerSid; + @ApiModelProperty("厂家名称") + private String manufacturerName; + @ApiModelProperty("单位") + private String unit; + @ApiModelProperty("仓库sid") + private String warehouseSid; + @ApiModelProperty("仓库名称") + private String warehouseName; + @ApiModelProperty("库区sid") + private String warehouseAreaSid; + @ApiModelProperty("库区名称") + private String warehouseArea; + @ApiModelProperty("库位sid") + private String warehouseRackSid; + @ApiModelProperty("库位编码") + private String warehouseRackCode; + @ApiModelProperty("库存数量") + private BigDecimal stockCount; + @ApiModelProperty("成本价") + private BigDecimal taxPrice; + @ApiModelProperty("加价比例(%)") + private BigDecimal markUpRatio; + @ApiModelProperty("调拔单价") + private BigDecimal requAmount; + @ApiModelProperty("调拨数量") + private BigDecimal count; + @ApiModelProperty("调拨金额(调拨数量*含税价)") + private BigDecimal amount; +} \ No newline at end of file diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/WmsInventoryAllocatebillFeign.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/WmsInventoryAllocatebillFeign.java new file mode 100644 index 0000000000..dd336501d0 --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/WmsInventoryAllocatebillFeign.java @@ -0,0 +1,58 @@ +package com.yxt.anrui.terminal.fegin.wmsinventoryallocatebill; + +import com.yxt.anrui.terminal.fegin.wmsinventoryallocatebill.flowable.*; +import com.yxt.anrui.terminal.fegin.wmsinventoryprofitin.WmsInventoryProfitinDetailsVo; +import com.yxt.anrui.terminal.fegin.wmsinventoryprofitin.flowable.*; +import com.yxt.common.core.result.ResultBean; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.cloud.openfeign.SpringQueryMap; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import java.util.List; + +@FeignClient( + contextId = "yxt-wms-WmsInventoryAllocatebill", + name = "yxt-wms", + path = "apiadmin/inventory/wmsinventoryallocatebill") +public interface WmsInventoryAllocatebillFeign { + + @ApiOperation("详情") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid); + + @ApiOperation(value = "办理(同意)") + @PostMapping("/complete") + public ResultBean complete(@Valid @RequestBody CompleteFlowDto query); + + @ApiOperation(value = "获取上一个环节") + @GetMapping(value = "/getPreviousNodesForReject") + ResultBean> getPreviousNodesForReject(@Valid @SpringQueryMap FlowNodeQuery query); + + @ApiOperation(value = "获取下一个环节") + @GetMapping(value = "/getNextNodesForSubmit") + ResultBean> getNextNodesForSubmit(@Valid @SpringQueryMap FlowNodeQuery query); + + @ApiOperation(value = "驳回任务") + @PostMapping(value = "/reject") + public ResultBean taskReject(@Valid @RequestBody FlowTaskQuery query); + + @ApiOperation(value = "撤回流程") + @PostMapping(value = "/revokeProcess") + public ResultBean revokeProcess(@Valid @RequestBody FlowTaskQuery query); + + @ApiOperation(value = "终止任务") + @PostMapping(value = "/breakProcess") + public ResultBean breakProcess(@Valid @RequestBody FlowTaskQuery query); + + @ApiOperation(value = "加签") + @PostMapping(value = "/delegate") + @ResponseBody + public ResultBean delegate(@RequestBody FlowDelegateQuery query); + + @ApiOperation(value = "转办") + @PutMapping(value = "/assignTask") + @ResponseBody + public ResultBean assignTask(@RequestBody FlowDelegateQuery query); +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/CompleteFlowDto.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/CompleteFlowDto.java new file mode 100644 index 0000000000..b74a42ba23 --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/CompleteFlowDto.java @@ -0,0 +1,35 @@ +package com.yxt.anrui.terminal.fegin.wmsinventoryallocatebill.flowable; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/5/11 + **/ +@Data +public class CompleteFlowDto { + + @ApiModelProperty(value = "用户sid") + @NotBlank(message = "参数错误:userSid") + private String userSid; + @ApiModelProperty(value = "用户全路径sid") + private String orgSidPath; + @ApiModelProperty(value = "节点id") + @NotBlank(message = "参数错误:taskDefKey") + private String taskDefKey; + @ApiModelProperty(value = "任务id") + @NotBlank(message = "参数错误:taskId") + private String taskId; + @ApiModelProperty(value = "流程id") + @NotBlank(message = "参数错误:instanceId") + private String instanceId; + @ApiModelProperty(value = "意见") + private String comment; + @ApiModelProperty(value = "业务sid") + @NotBlank(message = "参数错误:businessSid") + private String businessSid; +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/FlowDelegateQuery.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/FlowDelegateQuery.java new file mode 100644 index 0000000000..ffc1833260 --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/FlowDelegateQuery.java @@ -0,0 +1,23 @@ +package com.yxt.anrui.terminal.fegin.wmsinventoryallocatebill.flowable; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/5/11 + **/ +@Data +public class FlowDelegateQuery { + + private String userSid; + @ApiModelProperty("流程实例id") + private String instanceId; + @ApiModelProperty("任务Id") + private String taskId; + @ApiModelProperty("审批人sid") + private String assignee; + @ApiModelProperty("填写意见") + private String views; +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/FlowNodeQuery.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/FlowNodeQuery.java new file mode 100644 index 0000000000..87fbb3fca5 --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/FlowNodeQuery.java @@ -0,0 +1,18 @@ +package com.yxt.anrui.terminal.fegin.wmsinventoryallocatebill.flowable; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/5/11 + **/ +@Data +public class FlowNodeQuery { + + @ApiModelProperty(value = "环节定义id") + private String taskDefKey; + @ApiModelProperty(value = "业务sid") + private String businessSid; +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/FlowNodeVo.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/FlowNodeVo.java new file mode 100644 index 0000000000..9338206da5 --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/FlowNodeVo.java @@ -0,0 +1,24 @@ +package com.yxt.anrui.terminal.fegin.wmsinventoryallocatebill.flowable; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/5/11 + **/ +@Data +public class FlowNodeVo { + + @ApiModelProperty(value = "节点名称") + private String name; + @ApiModelProperty(value = "节点id") + private String id; + @ApiModelProperty(value = "审批组") + private List candidateGroups; + @ApiModelProperty(value = "是否是最后环节") + private String endTask; +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/FlowTaskQuery.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/FlowTaskQuery.java new file mode 100644 index 0000000000..83bd33431e --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/wmsinventoryallocatebill/flowable/FlowTaskQuery.java @@ -0,0 +1,43 @@ +package com.yxt.anrui.terminal.fegin.wmsinventoryallocatebill.flowable; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/5/11 + **/ +@Data +public class FlowTaskQuery { + + /** + * 终止、驳回、撤回 + */ + @ApiModelProperty("任务Id") + @NotBlank(message = "参数错误:taskId") + private String taskId; + /** + * 终止、驳回、撤回 + */ + @ApiModelProperty("业务sid") + @NotBlank(message = "参数错误:businessSid") + private String businessSid; + /** + * 终止、驳回 + */ + @ApiModelProperty("任务意见") + private String comment; + /** + * 终止、撤回、驳回 + */ + @ApiModelProperty("用户Sid") + private String userSid; + /** + * 终止 + */ + @ApiModelProperty("流程实例Id") + private String instanceId; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryAllocateBillLogisticsRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryAllocateBillLogisticsRest.java new file mode 100644 index 0000000000..e93e1ded6d --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryAllocateBillLogisticsRest.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.apiadmin.inventroy; + +import com.yxt.common.core.result.ResultBean; +import com.yxt.wms.biz.inventory.wmsinventoryallocatebilllogistics.WmsInventoryAllocateBillLogisticsDetailsVo; +import com.yxt.wms.biz.inventory.wmsinventoryallocatebilllogistics.WmsInventoryAllocateBillLogisticsDto; +import com.yxt.wms.biz.inventory.wmsinventoryallocatebilllogistics.WmsInventoryAllocateBillLogisticsService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +@Api(tags = "(调拨单-物流信息)") +@RestController +@RequestMapping("v1/wmsinventoryallocatebilllogistics") +public class WmsInventoryAllocateBillLogisticsRest { + + @Autowired + private WmsInventoryAllocateBillLogisticsService wmsInventoryAllocateBillLogisticsService; + + @ApiOperation("新增或修改") + @PostMapping("/saveLogisticsInfo") + public ResultBean saveLogisticsInfo(@RequestBody WmsInventoryAllocateBillLogisticsDto dto){ + ResultBean rb = ResultBean.fireFail(); + wmsInventoryAllocateBillLogisticsService.saveLogisticsInfo(dto); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + WmsInventoryAllocateBillLogisticsDetailsVo vo = wmsInventoryAllocateBillLogisticsService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryAllocatebillRest.java b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryAllocatebillRest.java index 13a36116b9..ef5badacf3 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryAllocatebillRest.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryAllocatebillRest.java @@ -25,28 +25,22 @@ *********************************************************/ package com.yxt.wms.apiadmin.inventroy; +import cn.hutool.core.bean.BeanUtil; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; import com.yxt.wms.biz.inventory.wmsinventoryallocatebill.*; +import com.yxt.wms.biz.inventory.wmsinventoryallocatebill.flowable.*; +import com.yxt.wms.feign.flowable.flow.BusinessVariables; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cloud.openfeign.SpringQueryMap; import org.springframework.web.bind.annotation.*; -/** - * Project: yxt-wms(调拨单)
- * File: WmsInventoryAllocatebillFeignFallback.java
- * Class: com.yxt.wms.biz.wmsinventoryallocatebill.WmsInventoryAllocatebillRest
- * Description: (调拨单)-调出方操作.
- * Copyright: Copyright (c) 2011
- * Company: https://gitee.com/liuzp315
- * Makedate: 2024-03-25 16:04:08
- * - * @author liupopo - * @version 1.0 - * @since 1.0 - */ +import javax.validation.Valid; +import java.util.List; + @Api(tags = "(调拨单)-调出方操作") @RestController @RequestMapping("/apiadmin/inventory/wmsinventoryallocatebill") @@ -87,11 +81,64 @@ public class WmsInventoryAllocatebillRest { return rb.success().setData(vo); } - @ApiOperation("调拨") - @PostMapping("/allocation") - public ResultBean allocation(@RequestBody WmsInventoryAllocateBillDtoNew dto){ - ResultBean rb = ResultBean.fireFail(); - wmsInventoryAllocateBillService.allocation(dto); - return rb.success(); + /*********************************************************流程************************************************************/ + + @ApiOperation("提交") + @PostMapping("/submitApply") + public ResultBean submitApply(@Valid @RequestBody SubmitFlowDto dto) { + return wmsInventoryAllocateBillService.submitApply(dto); + } + + @ApiOperation(value = "办理(同意)") + @PostMapping("/complete") + public ResultBean complete(@Valid @RequestBody CompleteFlowDto query) { + BusinessVariables bv = new BusinessVariables(); + BeanUtil.copyProperties(query, bv); + bv.setModelId(""); + return wmsInventoryAllocateBillService.complete(bv); + } + + @ApiOperation(value = "获取上一个环节") + @GetMapping(value = "/getPreviousNodesForReject") + ResultBean> getPreviousNodesForReject(@Valid @SpringQueryMap FlowNodeQuery query) { + return wmsInventoryAllocateBillService.getPreviousNodesForReject(query); + } + + @ApiOperation(value = "获取下一个环节") + @GetMapping(value = "/getNextNodesForSubmit") + ResultBean> getNextNodesForSubmit(@Valid @SpringQueryMap FlowNodeQuery query) { + return wmsInventoryAllocateBillService.getNextNodesForSubmit(query); + } + + @ApiOperation(value = "驳回任务") + @PostMapping(value = "/reject") + public ResultBean taskReject(@Valid @RequestBody FlowTaskQuery query) { + return wmsInventoryAllocateBillService.taskReject(query); + } + + @ApiOperation(value = "撤回流程") + @PostMapping(value = "/revokeProcess") + public ResultBean revokeProcess(@Valid @RequestBody FlowTaskQuery query) { + return wmsInventoryAllocateBillService.revokeProcess(query); + } + + @ApiOperation(value = "终止任务") + @PostMapping(value = "/breakProcess") + public ResultBean breakProcess(@Valid @RequestBody FlowTaskQuery query) { + return wmsInventoryAllocateBillService.breakProcess(query); + } + + @ApiOperation(value = "加签") + @PostMapping(value = "/delegate") + @ResponseBody + public ResultBean delegate(@RequestBody FlowDelegateQuery query) { + return wmsInventoryAllocateBillService.delegate(query); + } + + @ApiOperation(value = "转办") + @PostMapping(value = "/assignTask") + @ResponseBody + public ResultBean assignTask(@RequestBody FlowDelegateQuery query){ + return wmsInventoryAllocateBillService.assignTask(query); } } diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAlloSelectList.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAlloSelectList.java index 0638752bf2..d39ef4ed79 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAlloSelectList.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAlloSelectList.java @@ -11,7 +11,9 @@ import lombok.Data; public class WmsInventoryAlloSelectList { //sid - private String sid; + private String inventorySid; + //商品ID + private String goodsID; //商品spuSid private String goodsSpuSid; //商品spu名称 @@ -35,7 +37,7 @@ public class WmsInventoryAlloSelectList { //仓库名称 private String warehouseName; //库区sid - private String warehouseAreasid; + private String warehouseAreaSid; //库区名称 private String warehouseArea; //库位sid @@ -44,4 +46,6 @@ public class WmsInventoryAlloSelectList { private String warehouseRackCode; //库存数量 private String count; + //入库单价 + private String taxPrice; } diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAlloSelectQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAlloSelectQuery.java index 74306e8e56..15d328bf44 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAlloSelectQuery.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryAlloSelectQuery.java @@ -11,20 +11,12 @@ import lombok.Data; @Data public class WmsInventoryAlloSelectQuery implements Query { - //组织sid - private String orgSid; + //商品ID + private String goodsID; //商品名称 - private String goodsName; - //商品类别sid - private String goodsTypeSid; - //商品拼音 - private String goodsPY; - //品牌sid - private String brandSid; - //零件号 + private String goodsSkuTitle; + //商品编码 private String goodsSkuCode; - //规格 - private String title; - //其他查询条件 - private String otherQuery; + //部门sid + private String deptSid; } diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryMapper.xml index cf1504dfd1..26580d3083 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryMapper.xml +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryMapper.xml @@ -237,7 +237,8 @@ - select * from wms_inventory_allocate_bill + SELECT + wb.*, + SUM(wd.count) AS count, + SUM(wd.amount) AS amount + FROM + wms_inventory_allocate_bill wb + LEFT JOIN wms_inventory_allocate_bill_detail wd + ON wb.sid = wd.billSid + LEFT JOIN anrui_portal.sys_organization AS s + ON wb.deptSid = s.sid ${ew.sqlSegment} @@ -18,4 +27,22 @@ order by billNo desc limit 1 + + + UPDATE wms_inventory_allocate_bill + SET nodeState=#{nodeState}, nodeId=#{taskDefKey} + + , finishTime = NOW() + + + , procDefId=#{procDefId} + + + , procInstId=#{procInsId} + + + , taskId=#{taskId} + + WHERE sid=#{sid} + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillQueryNew.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillQueryNew.java index ea00a4c719..5ff9b40d22 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillQueryNew.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillQueryNew.java @@ -39,4 +39,10 @@ public class WmsInventoryAllocateBillQueryNew implements Query { private String inPlatName; @ApiModelProperty("经办人") private String confirmName; + @ApiModelProperty("调拨等级") + private String grade; + + private String userSid; + private String orgPath; + private String menuUrl; } diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillService.java index d901833b9c..35c2b23cb5 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillService.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillService.java @@ -1,27 +1,44 @@ package com.yxt.wms.biz.inventory.wmsinventoryallocatebill; import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateUtil; +import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.yxt.common.base.service.MybatisBaseService; import com.yxt.common.base.utils.PagerUtil; import com.yxt.common.base.utils.StringUtils; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; +import com.yxt.wms.biz.inventory.wmsinventoryallocatebill.flowable.*; import com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail.WmsInventoryAllocateBillDetailDtoNew; import com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail.WmsInventoryAllocateBillDetailService; import com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail.WmsInventoryAllocatebillDetailDetailsVoNew; +import com.yxt.wms.feign.flowable.flow.BusinessVariables; +import com.yxt.wms.feign.flowable.flow.FlowableFeign; +import com.yxt.wms.feign.flowable.flow.ProcDefEnum; +import com.yxt.wms.feign.flowable.flow.UpdateFlowFieldVo; +import com.yxt.wms.feign.flowable.flow2.FlowFeign; +import com.yxt.wms.feign.flowable.flowtask.FlowTaskFeign; +import com.yxt.wms.feign.flowable.flowtask.FlowTaskVo; +import com.yxt.wms.feign.flowable.flowtask.LatestTaskVo; +import com.yxt.wms.feign.message.MessageFeign; +import com.yxt.wms.feign.message.MessageFlowVo; +import com.yxt.wms.feign.message.MessageFlowableQuery; +import com.yxt.wms.feign.portal.privilege.PrivilegeQuery; import com.yxt.wms.feign.portal.sysorganization.SysOrganizationFeign; import com.yxt.wms.feign.portal.sysorganization.SysOrganizationVo; +import com.yxt.wms.feign.portal.sysuser.SysUserFeign; import com.yxt.wms.utils.Rule; +import org.apache.tomcat.util.threads.ThreadPoolExecutor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.Date; -import java.util.List; +import java.util.*; +import java.util.concurrent.*; +import java.util.stream.Collectors; /** * @author wangpengfei @@ -34,44 +51,95 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService listPageVo(PagerQuery pq) { WmsInventoryAllocateBillQueryNew query = pq.getParams(); QueryWrapper qw = new QueryWrapper<>(); + //========================================数据授权开始 + if (StringUtils.isNotBlank(query.getMenuUrl())) { + PrivilegeQuery privilegeQuery = new PrivilegeQuery(); + privilegeQuery.setOrgPath(query.getOrgPath()); + privilegeQuery.setMenuUrl(query.getMenuUrl()); + privilegeQuery.setUserSid(query.getUserSid()); + ResultBean defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); + if (StringUtils.isNotBlank(defaultIdReltBean.getData())) { + //数据权限ID(1集团、2事业部、3分公司、4部门、5个人) + String orgSidPath = query.getOrgPath(); + orgSidPath = orgSidPath + "/"; + int i1 = orgSidPath.indexOf("/"); + int i2 = orgSidPath.indexOf("/", i1 + 1); + int i3 = orgSidPath.indexOf("/", i2 + 1); + int i4 = orgSidPath.indexOf("/", i3 + 1); + String orgLevelKey = defaultIdReltBean.getData(); + if ("1".equals(orgLevelKey)) { + orgSidPath = orgSidPath.substring(0, i1); + qw.like("s.orgSidPath", orgSidPath); + } else if ("2".equals(orgLevelKey)) { + orgSidPath = orgSidPath.substring(0, i2); + qw.like("s.orgSidPath", orgSidPath); + } else if ("3".equals(orgLevelKey)) { + orgSidPath = orgSidPath.substring(0, i3); + qw.like("s.orgSidPath", orgSidPath); + } else if ("4".equals(orgLevelKey)) { + orgSidPath = orgSidPath.substring(0, i4); + qw.like("s.orgSidPath", orgSidPath); + } else if ("5".equals(orgLevelKey)) { + qw.eq("wb.createBySid", query.getUserSid()); + } else { + PagerVo p = new PagerVo<>(); + return p; + } + } else { + PagerVo p = new PagerVo<>(); + return p; + } + } + qw.eq("wb.grade",query.getGrade()); if (StringUtils.isNotBlank(query.getOutOrgName())){ - qw.like("createOrgName",query.getOutOrgName()); + qw.like("wb.createOrgName",query.getOutOrgName()); } if (StringUtils.isNotBlank(query.getDeptName())){ - qw.like("deptName",query.getDeptName()); + qw.like("wb.deptName",query.getDeptName()); } if (StringUtils.isNotBlank(query.getCreateByName())){ - qw.like("createByName",query.getCreateByName()); + qw.like("wb.createByName",query.getCreateByName()); } if (StringUtils.isNotBlank(query.getBillNo())){ - qw.like("billNo",query.getBillNo()); + qw.like("wb.billNo",query.getBillNo()); } if (StringUtils.isNotBlank(query.getOutPlatName())){ - qw.like("outPlatName",query.getOutPlatName()); + qw.like("wb.outPlatName",query.getOutPlatName()); } if (StringUtils.isNotBlank(query.getInOrgName())){ - qw.like("inOrgName",query.getInOrgName()); + qw.like("wb.inOrgName",query.getInOrgName()); } if (StringUtils.isNotBlank(query.getInPlatName())){ - qw.like("inPlatName",query.getInPlatName()); + qw.like("wb.inPlatName",query.getInPlatName()); } if (StringUtils.isNotBlank(query.getConfirmName())){ - qw.like("confirmName",query.getConfirmName()); + qw.like("wb.confirmName",query.getConfirmName()); } String createStartTime = query.getCreateStartTime(); String createEndTime = query.getCreateEndTime(); - qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')"). - apply(org.apache.commons.lang3.StringUtils.isNotEmpty(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')" + qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(createStartTime), "date_format (wb.createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')"). + apply(org.apache.commons.lang3.StringUtils.isNotEmpty(createEndTime), "date_format (wb.createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')" ); String finishStartTime = query.getFinishStartTime(); String finishEndTime = query.getFinishEndTime(); - qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(finishStartTime), "date_format (finishTime,'%Y-%m-%d') >= date_format('" + finishStartTime + "','%Y-%m-%d')"). - apply(org.apache.commons.lang3.StringUtils.isNotEmpty(finishEndTime), "date_format (finishTime,'%Y-%m-%d') <= date_format('" + finishEndTime + "','%Y-%m-%d')" + qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(finishStartTime), "date_format (wb.finishTime,'%Y-%m-%d') >= date_format('" + finishStartTime + "','%Y-%m-%d')"). + apply(org.apache.commons.lang3.StringUtils.isNotEmpty(finishEndTime), "date_format (wb.finishTime,'%Y-%m-%d') <= date_format('" + finishEndTime + "','%Y-%m-%d')" ); + qw.groupBy("wb.sid"); IPage page = PagerUtil.queryToPage(pq); IPage pagging = baseMapper.selectPageVo(page, qw); PagerVo p = PagerUtil.pageToVo(pagging, null); @@ -130,6 +198,7 @@ public class WmsInventoryAllocateBillService extends MybatisBaseService variables = new HashMap<>(); + Map appMap = new HashMap<>(); + appMap.put("sid", businessSid); + variables.put("app", appMap); + //用户的部门全路径sid + SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(wmsInventoryAllocateBill.getDeptSid()).getData(); + if (sysOrganization != null) { + bv.setOrgSidPath(sysOrganization.getOrgSidPath()); + } + bv.setBusinessSid(businessSid); + bv.setUserSid(dto.getCreateBySid()); + bv.setFormVariables(variables); + if (r == 1) { + //ToDo:流程定义id + bv.setModelId(ProcDefEnum.WMSINVENCHECKREPORT.getProDefId()); + ResultBean voResultBean = flowFeign.startProcess(bv); + if (!voResultBean.getSuccess()) { + return rb.setMsg(voResultBean.getMsg()); + } + UpdateFlowFieldVo ufVo = voResultBean.getData(); + updateFlowFiled(BeanUtil.beanToMap(ufVo)); + wmsInventoryAllocateBill = fetchBySid(businessSid); + //==================================添加线程 + try { + ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() + .setNameFormat("demo-pool-%d").build(); + ExecutorService pool = new ThreadPoolExecutor(2, 100, + 0L, TimeUnit.MILLISECONDS, + new LinkedBlockingQueue(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); + WmsInventoryAllocateBill finalWmsInventoryAllocateBill = wmsInventoryAllocateBill; + Future future1 = pool.submit(() -> { + //极光推送 + MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); + MessageFlowVo messageFlowVo = new MessageFlowVo(); + BeanUtil.copyProperties(ufVo, messageFlowVo); + messageFlowableQuery.setUfVo(messageFlowVo); + messageFlowableQuery.setAppMap(appMap); + messageFlowableQuery.setBusinessSid(businessSid); + messageFlowableQuery.setModuleName("调拨申请"); + messageFlowableQuery.setMsgContent(finalWmsInventoryAllocateBill.getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); + messageFlowableQuery.setMsgTitle("调拨申请"); + ResultBean stringResultBean = messageFeign.pushMessage(messageFlowableQuery); + }); + } catch (Exception e) { + e.printStackTrace(); + } + //==================================添加线程 + return voResultBean; + } + if (r == 2) { + // ToDo:驳回到发起人后再次提交 + if (org.apache.commons.lang3.StringUtils.isBlank(dto.getInstanceId())) { + return rb.setMsg("参数错误:instanceId"); + } + bv.setTaskId(wmsInventoryAllocateBill.getTaskId()); + bv.setTaskDefKey(wmsInventoryAllocateBill.getNodeId()); + bv.setComment("重新提交"); + bv.setInstanceId(dto.getInstanceId()); + return complete(bv); + } + return rb; + } + + private int updateFlowFiled(Map beanToMap) { + return baseMapper.updateFlowFiled(beanToMap); + } + + + private int submitBusinessData(SubmitFlowDto dto, WmsInventoryAllocateBill wmsInventoryAllocateBill) { + int r = 0; + if (org.apache.commons.lang3.StringUtils.isBlank(dto.getSid())) { + r = 1; + } else { + if (wmsInventoryAllocateBill != null) { + String businessTaskId = wmsInventoryAllocateBill.getTaskId(); + if (StringUtils.isBlank(businessTaskId) && StringUtils.isBlank(dto.getTaskId())) { + //新提交 + r = 1; + } else if (StringUtils.isNotBlank(businessTaskId) && businessTaskId.equals(dto.getTaskId())) { + //二次提交//只有数据一致的时候才能进行下一步 + r = 2; + } + } else { + r = 3; + } + } + return r; + } + + public ResultBean complete(BusinessVariables bv) { + ResultBean rb = ResultBean.fireFail(); + String businessSid = bv.getBusinessSid(); + WmsInventoryAllocateBill wmsInventoryAllocateBill = fetchBySid(businessSid); + Map variables = new HashMap<>(); + Map appMap = new HashMap<>(); + appMap.put("sid", businessSid); + variables.put("app", appMap); + bv.setFormVariables(variables); + SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(wmsInventoryAllocateBill.getDeptSid()).getData(); + if (sysOrganization != null) { + bv.setOrgSidPath(sysOrganization.getOrgSidPath()); + } + bv.setModelId(wmsInventoryAllocateBill.getProcDefId()); + if (bv.getTaskId().equals(wmsInventoryAllocateBill.getTaskId())) { + ResultBean resultBean = flowFeign.handleProsess(bv); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + UpdateFlowFieldVo ufVo = resultBean.getData(); + updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); + if ("Event_end".equals(resultBean.getData().getTaskDefKey())) { + + } else { + //极光推送 + wmsInventoryAllocateBill = fetchBySid(businessSid); + MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); + MessageFlowVo messageFlowVo = new MessageFlowVo(); + BeanUtil.copyProperties(ufVo, messageFlowVo); + messageFlowVo.setProcDefId(wmsInventoryAllocateBill.getProcDefId()); + messageFlowVo.setProcInsId(wmsInventoryAllocateBill.getProcInstId()); + messageFlowableQuery.setUfVo(messageFlowVo); + messageFlowableQuery.setAppMap(appMap); + messageFlowableQuery.setBusinessSid(businessSid); + messageFlowableQuery.setModuleName("调拨申请"); + messageFlowableQuery.setMsgContent(wmsInventoryAllocateBill.getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); + messageFlowableQuery.setMsgTitle("调拨申请"); + ResultBean stringResultBean = messageFeign.pushMessage(messageFlowableQuery); + } + return rb.success().setData(resultBean.getData()); + } else { + return rb.setMsg("操作失败!提交的数据不一致"); + } + } + + public ResultBean> getPreviousNodesForReject(FlowNodeQuery query) { + ResultBean> rb = ResultBean.fireFail(); + BusinessVariables bv = new BusinessVariables(); + BeanUtil.copyProperties(query, bv); + WmsInventoryAllocateBill wmsInventoryAllocateBill = fetchBySid(query.getBusinessSid()); + bv.setModelId(wmsInventoryAllocateBill.getProcDefId()); + ResultBean>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv); + //判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给TemplateApplyNodeVo + List voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), FlowNodeVo.class)).collect(Collectors.toList()); + return rb.success().setData(voList); + } + + public ResultBean> getNextNodesForSubmit(FlowNodeQuery query) { + ResultBean> rb = ResultBean.fireFail(); + BusinessVariables bv = new BusinessVariables(); + BeanUtil.copyProperties(query, bv); + WmsInventoryAllocateBill wmsInventoryAllocateBill = fetchBySid(query.getBusinessSid()); + bv.setModelId(wmsInventoryAllocateBill.getProcDefId()); + ResultBean>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv); + //判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给TemplateApplyNodeVo + List voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), FlowNodeVo.class)).collect(Collectors.toList()); + return rb.success().setData(voList); + } + + public ResultBean taskReject(FlowTaskQuery query) { + ResultBean rb = ResultBean.fireFail(); + String businessSid = query.getBusinessSid(); + WmsInventoryAllocateBill wmsInventoryAllocateBill = fetchBySid(businessSid); + if (wmsInventoryAllocateBill == null) { + return rb.setMsg("该申请不存在"); + } + String businessTaskId = wmsInventoryAllocateBill.getTaskId(); + if (org.apache.commons.lang3.StringUtils.isNotBlank(businessTaskId)) { + if (businessTaskId.equals(query.getTaskId())) { + if (org.apache.commons.lang3.StringUtils.isBlank(query.getComment())) { + return rb.setMsg("请填写意见"); + } + if (org.apache.commons.lang3.StringUtils.isBlank(query.getUserSid())) { + return rb.setMsg("参数错误:userSid"); + } + FlowTaskVo flowTaskVo = new FlowTaskVo(); + BeanUtil.copyProperties(query, flowTaskVo); + Map variables = new HashMap<>(); + Map appMap = new HashMap<>(); + appMap.put("sid", businessSid); + variables.put("app", appMap); + ResultBean resultBean = flowableFeign.taskReject(flowTaskVo); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + UpdateFlowFieldVo ufVo = resultBean.getData(); + Map map = BeanUtil.beanToMap(ufVo); + //更新业务中的流程相关的参数 + updateFlowFiled(map); + //极光推送 + wmsInventoryAllocateBill = fetchBySid(businessSid); + MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); + MessageFlowVo messageFlowVo = new MessageFlowVo(); + BeanUtil.copyProperties(ufVo, messageFlowVo); + String procId = wmsInventoryAllocateBill.getProcInstId(); + messageFlowVo.setProcInsId(procId); + messageFlowVo.setProcDefId(wmsInventoryAllocateBill.getProcDefId()); + messageFlowableQuery.setUfVo(messageFlowVo); + messageFlowableQuery.setAppMap(appMap); + messageFlowableQuery.setBusinessSid(businessSid); + messageFlowableQuery.setModuleName("调拨申请"); + ResultBean> listResultBean = flowTaskFeign.getLatestTasks(procId); + String nextName = listResultBean.getData().get(0).getName_(); + String nextNodeUserSids = listResultBean.getData().get(0).getASSIGNEE_(); + if ("发起申请".equals(nextName)) { + messageFlowableQuery.setMsgContent("您提交的" + messageFlowableQuery.getModuleName() + "已被驳回,请重新提交"); + } else { + messageFlowableQuery.setMsgContent(wmsInventoryAllocateBill.getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); + } + + messageFlowableQuery.setMsgTitle("调拨申请"); + ResultBean stringResultBean = messageFeign.pushMessage(messageFlowableQuery); + return rb.success(); + } + } + return rb.setMsg("操作失败!提交的数据不一致!"); + } + + public ResultBean revokeProcess(FlowTaskQuery query) { + ResultBean rb = ResultBean.fireFail(); + if (org.apache.commons.lang3.StringUtils.isBlank(query.getUserSid())) { + return rb.setMsg("参数错误:userSid"); + } + WmsInventoryAllocateBill wmsInventoryAllocateBill = fetchBySid(query.getBusinessSid()); + String businessTaskId = wmsInventoryAllocateBill.getTaskId(); + if (StringUtils.isNotBlank(businessTaskId)) { + if (businessTaskId.equals(query.getTaskId())) { + FlowTaskVo flowTaskVo = new FlowTaskVo(); + BeanUtil.copyProperties(query, flowTaskVo); + ResultBean resultBean = flowableFeign.revokeProcess(flowTaskVo); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); + return rb.success().setData(resultBean.getData()); + } + } + return rb.setMsg("操作失败,提交的数据不一致!"); + } + + public ResultBean breakProcess(FlowTaskQuery query) { + ResultBean rb = ResultBean.fireFail(); + if (org.apache.commons.lang3.StringUtils.isBlank(query.getInstanceId())) { + return rb.setMsg("参数错误:instanceId"); + } + if (org.apache.commons.lang3.StringUtils.isBlank(query.getUserSid())) { + return rb.setMsg("参数错误:userSid"); + } + if (org.apache.commons.lang3.StringUtils.isBlank(query.getComment())) { + return rb.setMsg("请填写意见"); + } + WmsInventoryAllocateBill wmsInventoryAllocateBill = fetchBySid(query.getBusinessSid()); + String businessTaskId = wmsInventoryAllocateBill.getTaskId(); + if (StringUtils.isNotBlank(businessTaskId)) { + if (query.getUserSid().equals(wmsInventoryAllocateBill.getCreateBySid())) { + FlowTaskVo flowTaskVo = new FlowTaskVo(); + BeanUtil.copyProperties(query, flowTaskVo); + ResultBean resultBean = flowableFeign.breakProcess(flowTaskVo); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + Map map = BeanUtil.beanToMap(resultBean.getData()); + updateFlowFiled(map); + return rb.success().setData(resultBean.getData()); + } else { + if (businessTaskId.equals(query.getTaskId())) { + FlowTaskVo flowTaskVo = new FlowTaskVo(); + BeanUtil.copyProperties(query, flowTaskVo); + ResultBean resultBean = flowableFeign.breakProcess(flowTaskVo); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + Map map = BeanUtil.beanToMap(resultBean.getData()); + updateFlowFiled(map); + return rb.success().setData(resultBean.getData()); + } + } + } + return rb.setMsg("操作失败!提交的数据不一致!"); + } + + public ResultBean delegate(FlowDelegateQuery query) { + ResultBean rb = ResultBean.fireFail(); + com.yxt.wms.feign.flowable.flow2.FlowDelegateQuery delegateQuery = new com.yxt.wms.feign.flowable.flow2.FlowDelegateQuery(); + BeanUtil.copyProperties(query, delegateQuery); + flowFeign.delegate(delegateQuery); + return rb.success(); + } + + public ResultBean assignTask(FlowDelegateQuery query) { + ResultBean rb = ResultBean.fireFail(); + com.yxt.wms.feign.flowable.flow2.FlowDelegateQuery delegateQuery = new com.yxt.wms.feign.flowable.flow2.FlowDelegateQuery(); + BeanUtil.copyProperties(query, delegateQuery); + flowFeign.assignTask(delegateQuery); + return rb.success(); } } diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillVoNew.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillVoNew.java index d7b4715ac4..a2513c6f2a 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillVoNew.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/WmsInventoryAllocateBillVoNew.java @@ -55,4 +55,11 @@ public class WmsInventoryAllocateBillVoNew implements Vo { private BigDecimal count; @ApiModelProperty("调拨金额") private BigDecimal amount; + + @ApiModelProperty("流程状态") + private String nodeState; + @ApiModelProperty("流程定义的id") + private String procDefId; + @ApiModelProperty("流程实例的sid") + private String procInstId; } \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/CompleteFlowDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/CompleteFlowDto.java new file mode 100644 index 0000000000..00bec5a3db --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/CompleteFlowDto.java @@ -0,0 +1,35 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebill.flowable; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/5/11 + **/ +@Data +public class CompleteFlowDto { + + @ApiModelProperty(value = "用户sid") + @NotBlank(message = "参数错误:userSid") + private String userSid; + @ApiModelProperty(value = "用户全路径sid") + private String orgSidPath; + @ApiModelProperty(value = "节点id") + @NotBlank(message = "参数错误:taskDefKey") + private String taskDefKey; + @ApiModelProperty(value = "任务id") + @NotBlank(message = "参数错误:taskId") + private String taskId; + @ApiModelProperty(value = "流程id") + @NotBlank(message = "参数错误:instanceId") + private String instanceId; + @ApiModelProperty(value = "意见") + private String comment; + @ApiModelProperty(value = "业务sid") + @NotBlank(message = "参数错误:businessSid") + private String businessSid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/FlowDelegateQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/FlowDelegateQuery.java new file mode 100644 index 0000000000..a89383d607 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/FlowDelegateQuery.java @@ -0,0 +1,23 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebill.flowable; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/5/11 + **/ +@Data +public class FlowDelegateQuery { + + private String userSid; + @ApiModelProperty("流程实例id") + private String instanceId; + @ApiModelProperty("任务Id") + private String taskId; + @ApiModelProperty("审批人sid") + private String assignee; + @ApiModelProperty("填写意见") + private String views; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/FlowNodeQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/FlowNodeQuery.java new file mode 100644 index 0000000000..ed83409b8b --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/FlowNodeQuery.java @@ -0,0 +1,18 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebill.flowable; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/5/11 + **/ +@Data +public class FlowNodeQuery { + + @ApiModelProperty(value = "环节定义id") + private String taskDefKey; + @ApiModelProperty(value = "业务sid") + private String businessSid; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/FlowNodeVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/FlowNodeVo.java new file mode 100644 index 0000000000..526fb3f2e2 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/FlowNodeVo.java @@ -0,0 +1,24 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebill.flowable; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/5/11 + **/ +@Data +public class FlowNodeVo { + + @ApiModelProperty(value = "节点名称") + private String name; + @ApiModelProperty(value = "节点id") + private String id; + @ApiModelProperty(value = "审批组") + private List candidateGroups; + @ApiModelProperty(value = "是否是最后环节") + private String endTask; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/FlowTaskQuery.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/FlowTaskQuery.java new file mode 100644 index 0000000000..bf13cbad68 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/FlowTaskQuery.java @@ -0,0 +1,43 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebill.flowable; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/5/11 + **/ +@Data +public class FlowTaskQuery { + + /** + * 终止、驳回、撤回 + */ + @ApiModelProperty("任务Id") + @NotBlank(message = "参数错误:taskId") + private String taskId; + /** + * 终止、驳回、撤回 + */ + @ApiModelProperty("业务sid") + @NotBlank(message = "参数错误:businessSid") + private String businessSid; + /** + * 终止、驳回 + */ + @ApiModelProperty("任务意见") + private String comment; + /** + * 终止、撤回、驳回 + */ + @ApiModelProperty("用户Sid") + private String userSid; + /** + * 终止 + */ + @ApiModelProperty("流程实例Id") + private String instanceId; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/SubmitFlowDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/SubmitFlowDto.java new file mode 100644 index 0000000000..35d9b6e9ce --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebill/flowable/SubmitFlowDto.java @@ -0,0 +1,20 @@ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebill.flowable; + +import com.yxt.wms.biz.inventory.wmsinventoryallocatebill.WmsInventoryAllocateBillDtoNew; +import com.yxt.wms.biz.inventory.wmsinventorycheckbill.WmsInventoryCheckbillDto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/5/11 + **/ +@Data +public class SubmitFlowDto extends WmsInventoryAllocateBillDtoNew { + + @ApiModelProperty("流程实例id") + private String instanceId; + @ApiModelProperty("任务id") + private String taskId; +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetail.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetail.java index 7610719a59..55cd999879 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetail.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetail.java @@ -2,8 +2,10 @@ package com.yxt.wms.biz.inventory.wmsinventoryallocatebilldetail; import com.fasterxml.jackson.annotation.JsonFormat; import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.math.BigDecimal; import java.util.Date; /** @@ -27,15 +29,16 @@ public class WmsInventoryAllocateBillDetail extends BaseEntity { private String unit;//单位 private String warehouseSid;//仓库sid private String warehouseName;//仓库名称 - private String warehouseAreasid;//库区sid + private String warehouseAreaSid;//库区sid private String warehouseArea;//库区名称 private String warehouseRackSid;//库位sid private String warehouseRackCode;//库位编码 private String stockCount;//库存数量 - private String markUpRatio;//加价比例(%) - private String requAmount;//调拔单价 - private String count;//调拨数量 - private String amount;//调拨金额(调拨数量*含税价) + private BigDecimal taxPrice; + private BigDecimal markUpRatio;//加价比例(%) + private BigDecimal requAmount;//调拔单价 + private BigDecimal count;//调拨数量 + private BigDecimal amount;//调拨金额(调拨数量*含税价) } diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailDtoNew.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailDtoNew.java index 5877b5f122..9bcca01109 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailDtoNew.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailDtoNew.java @@ -55,6 +55,8 @@ public class WmsInventoryAllocateBillDetailDtoNew implements Dto { private String warehouseRackCode; @ApiModelProperty("库存数量") private BigDecimal stockCount; + @ApiModelProperty("成本价") + private BigDecimal taxPrice; @ApiModelProperty("加价比例(%)") private BigDecimal markUpRatio; @ApiModelProperty("调拔单价") diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.xml index c2173dbd40..c88e7b771a 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.xml +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocateBillDetailMapper.xml @@ -6,23 +6,9 @@ \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocatebillDetailDetailsVoNew.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocatebillDetailDetailsVoNew.java index 6316983c2c..282ae6f928 100644 --- a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocatebillDetailDetailsVoNew.java +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilldetail/WmsInventoryAllocatebillDetailDetailsVoNew.java @@ -91,6 +91,8 @@ public class WmsInventoryAllocatebillDetailDetailsVoNew implements Vo { private String warehouseRackCode; @ApiModelProperty("库存数量") private BigDecimal stockCount; + @ApiModelProperty("成本价") + private BigDecimal taxPrice; @ApiModelProperty("加价比例(%)") private BigDecimal markUpRatio; @ApiModelProperty("调拔单价") diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogistics.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogistics.java new file mode 100644 index 0000000000..ebda749f97 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogistics.java @@ -0,0 +1,72 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebilllogistics; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(调拨单物流信息)
+ * File: WmsInventoryAllocateBillLogistics.java
+ * Class: com.yxt.wms.api.wmsinventoryallocatebilllogistics.WmsInventoryAllocateBillLogistics
+ * Description: (调拨单-物流信息).
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-09-06 13:44:42
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "(调拨单-物流信息)", description = "(调拨单-物流信息)") +@TableName("wms_inventory_allocate_bill_logistics") +public class WmsInventoryAllocateBillLogistics extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主表sid") + private String billSid; // 主表sid + @ApiModelProperty("送货方式key") + private String deliveryKey; // 送货方式key + @ApiModelProperty("送货方式Value") + private String deliveryName; // 送货方式Value + @ApiModelProperty("快递单号") + private String expressBillNo; // 快递单号 + @ApiModelProperty("快递公司") + private String expressCompany; // 快递公司 + @ApiModelProperty("取货人") + private String pickUpName; // 取货人 + @ApiModelProperty("取货日期") + private String pickUpDate; // 取货日期 + @ApiModelProperty("送货人") + private String deliveryPerson; // 送货人 + @ApiModelProperty("送货日期") + private String deliveryDate; // 送货日期 + +} diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsDetailsVo.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsDetailsVo.java new file mode 100644 index 0000000000..af520ba6ca --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsDetailsVo.java @@ -0,0 +1,71 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebilllogistics; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-wms(调拨单物流信息)
+ * File: WmsInventoryAllocateBillLogisticsVo.java
+ * Class: com.yxt.wms.api.wmsinventoryallocatebilllogistics.WmsInventoryAllocateBillLogisticsVo
+ * Description: (调拨单-物流信息) 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-09-06 13:44:43
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "(调拨单-物流信息) 视图数据详情", description = "(调拨单-物流信息) 视图数据详情") +public class WmsInventoryAllocateBillLogisticsDetailsVo implements Vo { + + private String remarks; + @ApiModelProperty("主表sid") + private String billSid; // 主表sid + @ApiModelProperty("送货方式key") + private String deliveryKey; // 送货方式key + @ApiModelProperty("送货方式Value") + private String deliveryName; // 送货方式Value + @ApiModelProperty("快递单号") + private String expressBillNo; // 快递单号 + @ApiModelProperty("快递公司") + private String expressCompany; // 快递公司 + @ApiModelProperty("取货人") + private String pickUpName; // 取货人 + @ApiModelProperty("取货日期") + private String pickUpDate; // 取货日期 + @ApiModelProperty("送货人") + private String deliveryPerson; // 送货人 + @ApiModelProperty("送货日期") + private String deliveryDate; // 送货日期 +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsDto.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsDto.java new file mode 100644 index 0000000000..d81029d61d --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsDto.java @@ -0,0 +1,75 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebilllogistics; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * Project: yxt-wms(调拨单物流信息)
+ * File: WmsInventoryAllocateBillLogisticsDto.java
+ * Class: com.yxt.wms.api.wmsinventoryallocatebilllogistics.WmsInventoryAllocateBillLogisticsDto
+ * Description: (调拨单-物流信息) 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-09-06 13:44:43
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "(调拨单-物流信息) 数据传输对象", description = "(调拨单-物流信息) 数据传输对象") +public class WmsInventoryAllocateBillLogisticsDto implements Dto { + + private String remarks; + @ApiModelProperty("主表sid") + private String billSid; // 主表sid + @ApiModelProperty("送货方式key") + private String deliveryKey; // 送货方式key + @ApiModelProperty("送货方式Value") + private String deliveryName; // 送货方式Value + @ApiModelProperty("快递单号") + private String expressBillNo; // 快递单号 + @ApiModelProperty("快递公司") + private String expressCompany; // 快递公司 + @ApiModelProperty("取货人") + private String pickUpName; // 取货人 + @ApiModelProperty("取货日期") + private String pickUpDate; // 取货日期 + @ApiModelProperty("送货人") + private String deliveryPerson; // 送货人 + @ApiModelProperty("送货日期") + private String deliveryDate; // 送货日期 + + private List sids; +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsMapper.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsMapper.java new file mode 100644 index 0000000000..0cb4dd0a8e --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsMapper.java @@ -0,0 +1,42 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebilllogistics; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +@Mapper +public interface WmsInventoryAllocateBillLogisticsMapper extends BaseMapper { + + @Delete("delete from wms_inventory_allocate_bill_logistics where billSid = #{sid}") + void delByBillSid(String sid); +} \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsMapper.xml b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsMapper.xml new file mode 100644 index 0000000000..fb53b8d048 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsMapper.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsService.java b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsService.java new file mode 100644 index 0000000000..f08a9a9e89 --- /dev/null +++ b/yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventoryallocatebilllogistics/WmsInventoryAllocateBillLogisticsService.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.wms.biz.inventory.wmsinventoryallocatebilllogistics; + +import cn.hutool.core.bean.BeanUtil; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; + +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class WmsInventoryAllocateBillLogisticsService extends MybatisBaseService { + + public void insertByDto(WmsInventoryAllocateBillLogisticsDto dto){ + WmsInventoryAllocateBillLogistics entity = new WmsInventoryAllocateBillLogistics(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public WmsInventoryAllocateBillLogisticsDetailsVo fetchDetailsVoBySid(String sid){ + WmsInventoryAllocateBillLogistics entity = fetchBySid(sid); + WmsInventoryAllocateBillLogisticsDetailsVo vo = new WmsInventoryAllocateBillLogisticsDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + + public void saveLogisticsInfo(WmsInventoryAllocateBillLogisticsDto dto) { + List sids = dto.getSids(); + for (String sid : sids) { + baseMapper.delByBillSid(sid); + dto.setBillSid(sid); + insertByDto(dto); + } + } +} \ No newline at end of file