Commit 59f328f5de2614a91eb536a66021e476dcfc1154
Merge remote-tracking branch 'origin/master_0929' into master_0929
Showing
19 changed files
with
1494 additions
and
3 deletions
xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/shipments/car/GetDraftRequestCarTicketBo.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.bo.shipments.car; | |
| 2 | + | |
| 3 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
| 4 | +import com.lframework.starter.common.constants.StringPool; | |
| 5 | +import com.lframework.starter.web.core.bo.BaseBo; | |
| 6 | +import com.lframework.xingyun.sc.entity.DraftRequestCarTicket; | |
| 7 | +import io.swagger.annotations.ApiModelProperty; | |
| 8 | +import lombok.Data; | |
| 9 | + | |
| 10 | +import java.math.BigDecimal; | |
| 11 | +import java.time.LocalDate; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * <p> | |
| 15 | + * 草稿要车单表 GetBo | |
| 16 | + * </p> | |
| 17 | + * | |
| 18 | + */ | |
| 19 | +@Data | |
| 20 | +public class GetDraftRequestCarTicketBo extends BaseBo<DraftRequestCarTicket> { | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * ID | |
| 24 | + */ | |
| 25 | + @ApiModelProperty("ID") | |
| 26 | + private String id; | |
| 27 | + | |
| 28 | + | |
| 29 | + /** | |
| 30 | + * 订货单ID | |
| 31 | + */ | |
| 32 | + @ApiModelProperty("订货单ID") | |
| 33 | + private String purchaseOrderId; | |
| 34 | + | |
| 35 | + /** | |
| 36 | + * 要车日期 | |
| 37 | + */ | |
| 38 | + @ApiModelProperty("要车日期") | |
| 39 | + @JsonFormat(pattern = StringPool.DATE_PATTERN) | |
| 40 | + private LocalDate requestCarData; | |
| 41 | + | |
| 42 | + /** | |
| 43 | + * 要车办事处 | |
| 44 | + */ | |
| 45 | + @ApiModelProperty("要车办事处") | |
| 46 | + private String deptId; | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 要车办事处名称 | |
| 50 | + */ | |
| 51 | + @ApiModelProperty("要车办事处名称") | |
| 52 | + private String deptName; | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 计划装货日期 | |
| 56 | + */ | |
| 57 | + @ApiModelProperty("计划装货日期") | |
| 58 | + @JsonFormat(pattern = StringPool.DATE_PATTERN) | |
| 59 | + private LocalDate deliveryDate; | |
| 60 | + | |
| 61 | + /** | |
| 62 | + * 装货厂别 | |
| 63 | + */ | |
| 64 | + @ApiModelProperty("装货厂别") | |
| 65 | + private String workshopId; | |
| 66 | + | |
| 67 | + /** | |
| 68 | + * 装货厂别名称 | |
| 69 | + */ | |
| 70 | + @ApiModelProperty("装货厂别名称") | |
| 71 | + private String workshopName; | |
| 72 | + | |
| 73 | + /** | |
| 74 | + * 订单编号 | |
| 75 | + */ | |
| 76 | + @ApiModelProperty("订单编号") | |
| 77 | + private String orderNo; | |
| 78 | + | |
| 79 | + /** | |
| 80 | + * 客户名称【简称】 | |
| 81 | + */ | |
| 82 | + @ApiModelProperty("客户名称【简称】") | |
| 83 | + private String customerShortName; | |
| 84 | + | |
| 85 | + /** | |
| 86 | + * 卸货地点 | |
| 87 | + */ | |
| 88 | + @ApiModelProperty("卸货地点") | |
| 89 | + private String destination; | |
| 90 | + | |
| 91 | + /** | |
| 92 | + * 计划吨位 | |
| 93 | + */ | |
| 94 | + @ApiModelProperty("计划吨位") | |
| 95 | + private BigDecimal quantity; | |
| 96 | + | |
| 97 | + /** | |
| 98 | + * 接货人联络人 | |
| 99 | + */ | |
| 100 | + @ApiModelProperty("接货人联络人") | |
| 101 | + private String consignee; | |
| 102 | + | |
| 103 | + /** | |
| 104 | + * 联系电话 | |
| 105 | + */ | |
| 106 | + @ApiModelProperty("联系电话") | |
| 107 | + private String phone; | |
| 108 | + | |
| 109 | + /** | |
| 110 | + * 回货计划安排(退料/角料) | |
| 111 | + */ | |
| 112 | + @ApiModelProperty("回货计划安排(退料/角料)") | |
| 113 | + private String returnPlanArrangement; | |
| 114 | + | |
| 115 | + /** | |
| 116 | + * 特殊需求、其他等 | |
| 117 | + */ | |
| 118 | + @ApiModelProperty("特殊需求、其他等") | |
| 119 | + private String other; | |
| 120 | + | |
| 121 | + /** | |
| 122 | + * 外办审核人 | |
| 123 | + */ | |
| 124 | + @ApiModelProperty("外办审核人") | |
| 125 | + private String externalAuditor; | |
| 126 | + | |
| 127 | + /** | |
| 128 | + * 外办审核人名称 | |
| 129 | + */ | |
| 130 | + @ApiModelProperty("外办审核人名称") | |
| 131 | + private String externalAuditorName; | |
| 132 | + | |
| 133 | + /** | |
| 134 | + * 装货时间 | |
| 135 | + */ | |
| 136 | + @ApiModelProperty("装货时间") | |
| 137 | + private String loadingTime; | |
| 138 | + | |
| 139 | + /** | |
| 140 | + * 装货特别要求/需求 | |
| 141 | + */ | |
| 142 | + @ApiModelProperty("装货特别要求/需求") | |
| 143 | + private String specialLoadingRequirement; | |
| 144 | + | |
| 145 | + /** | |
| 146 | + * 经营办审核人 | |
| 147 | + */ | |
| 148 | + @ApiModelProperty("经营办审核人") | |
| 149 | + private String businessOfficeAuditor; | |
| 150 | + | |
| 151 | + /** | |
| 152 | + * 经营办审核人名称 | |
| 153 | + */ | |
| 154 | + @ApiModelProperty("经营办审核人名称") | |
| 155 | + private String businessOfficeAuditorName; | |
| 156 | + | |
| 157 | + /** | |
| 158 | + * 运作科审核人 | |
| 159 | + */ | |
| 160 | + @ApiModelProperty("运作科审核人") | |
| 161 | + private String operationsDepartmentAuditor; | |
| 162 | + | |
| 163 | + /** | |
| 164 | + * 运作科审核人名称 | |
| 165 | + */ | |
| 166 | + @ApiModelProperty("运作科审核人名称") | |
| 167 | + private String operationsDepartmentAuditorName; | |
| 168 | + | |
| 169 | + /** | |
| 170 | + * 审核状态 | |
| 171 | + */ | |
| 172 | + @ApiModelProperty("审核状态") | |
| 173 | + private String status; | |
| 174 | + | |
| 175 | + public GetDraftRequestCarTicketBo() { | |
| 176 | + | |
| 177 | + } | |
| 178 | + | |
| 179 | + public GetDraftRequestCarTicketBo(DraftRequestCarTicket dto) { | |
| 180 | + | |
| 181 | + super(dto); | |
| 182 | + } | |
| 183 | + | |
| 184 | + @Override | |
| 185 | + public BaseBo<DraftRequestCarTicket> convert(DraftRequestCarTicket dto) { | |
| 186 | + return super.convert(dto); | |
| 187 | + } | |
| 188 | + | |
| 189 | + @Override | |
| 190 | + protected void afterInit(DraftRequestCarTicket dto) { | |
| 191 | + | |
| 192 | + } | |
| 193 | +} | ... | ... |
| ... | ... | @@ -26,6 +26,18 @@ public class GetRequestCarTicketBo extends BaseBo<RequestCarTicket> { |
| 26 | 26 | private String id; |
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | + * 草稿要车单ID | |
| 30 | + */ | |
| 31 | + @ApiModelProperty("草稿要车单ID") | |
| 32 | + private String draftId; | |
| 33 | + | |
| 34 | + /** | |
| 35 | + * 订货单ID | |
| 36 | + */ | |
| 37 | + @ApiModelProperty("订货单ID") | |
| 38 | + private String purchaseOrderId; | |
| 39 | + | |
| 40 | + /** | |
| 29 | 41 | * 要车日期 |
| 30 | 42 | */ |
| 31 | 43 | @ApiModelProperty("要车日期") | ... | ... |
| 1 | +package com.lframework.xingyun.sc.controller.shipments.car; | |
| 2 | + | |
| 3 | +import com.lframework.starter.common.exceptions.impl.DefaultClientException; | |
| 4 | +import com.lframework.starter.common.utils.CollectionUtil; | |
| 5 | +import com.lframework.starter.web.core.annotations.security.HasPermission; | |
| 6 | +import com.lframework.starter.web.core.components.resp.InvokeResult; | |
| 7 | +import com.lframework.starter.web.core.components.resp.InvokeResultBuilder; | |
| 8 | +import com.lframework.starter.web.core.components.resp.PageResult; | |
| 9 | +import com.lframework.starter.web.core.controller.DefaultBaseController; | |
| 10 | +import com.lframework.starter.web.core.utils.PageResultUtil; | |
| 11 | +import com.lframework.xingyun.sc.bo.shipments.car.GetDraftRequestCarTicketBo; | |
| 12 | +import com.lframework.xingyun.sc.bo.shipments.car.GetRequestCarTicketBo; | |
| 13 | +import com.lframework.xingyun.sc.entity.DraftRequestCarTicket; | |
| 14 | +import com.lframework.xingyun.sc.entity.RequestCarTicket; | |
| 15 | +import com.lframework.xingyun.sc.service.shipments.car.DraftRequestCarTicketService; | |
| 16 | +import com.lframework.xingyun.sc.service.shipments.car.RequestCarTicketService; | |
| 17 | +import com.lframework.xingyun.sc.vo.shipments.car.*; | |
| 18 | +import io.swagger.annotations.Api; | |
| 19 | +import io.swagger.annotations.ApiImplicitParam; | |
| 20 | +import io.swagger.annotations.ApiOperation; | |
| 21 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 22 | +import org.springframework.validation.annotation.Validated; | |
| 23 | +import org.springframework.web.bind.annotation.*; | |
| 24 | + | |
| 25 | +import javax.validation.Valid; | |
| 26 | +import javax.validation.constraints.NotBlank; | |
| 27 | +import java.util.List; | |
| 28 | +import java.util.stream.Collectors; | |
| 29 | + | |
| 30 | +/** | |
| 31 | + * 草稿要车单表 Controller | |
| 32 | + * | |
| 33 | + */ | |
| 34 | +@Api(tags = "草稿要车单表") | |
| 35 | +@Validated | |
| 36 | +@RestController | |
| 37 | +@RequestMapping("/draftRequestCarTicket") | |
| 38 | +public class DraftRequestCarTicketController extends DefaultBaseController { | |
| 39 | + | |
| 40 | + @Autowired | |
| 41 | + private DraftRequestCarTicketService draftRequestCarTicketService; | |
| 42 | + | |
| 43 | + /** | |
| 44 | + * 查询列表 | |
| 45 | + */ | |
| 46 | + @ApiOperation("查询列表") | |
| 47 | + @HasPermission({"requestCarTicket:requestcarticket:query"}) | |
| 48 | + @GetMapping("/query") | |
| 49 | + public InvokeResult<PageResult<GetDraftRequestCarTicketBo>> query(@Valid QueryDraftRequestCarTicketVo vo) { | |
| 50 | + | |
| 51 | + PageResult<DraftRequestCarTicket> pageResult = draftRequestCarTicketService.query(getPageIndex(vo), getPageSize(vo), vo); | |
| 52 | + | |
| 53 | + List<DraftRequestCarTicket> datas = pageResult.getDatas(); | |
| 54 | + List<GetDraftRequestCarTicketBo> results = null; | |
| 55 | + | |
| 56 | + if (!CollectionUtil.isEmpty(datas)) { | |
| 57 | + results = datas.stream().map(GetDraftRequestCarTicketBo::new).collect(Collectors.toList()); | |
| 58 | + } | |
| 59 | + | |
| 60 | + return InvokeResultBuilder.success(PageResultUtil.rebuild(pageResult, results)); | |
| 61 | + } | |
| 62 | + | |
| 63 | + /** | |
| 64 | + * 根据ID查询 | |
| 65 | + */ | |
| 66 | + @ApiOperation("根据ID查询") | |
| 67 | + @ApiImplicitParam(value = "id", name = "id", paramType = "query", required = true) | |
| 68 | + @HasPermission({"requestCarTicket:requestcarticket:query"}) | |
| 69 | + @GetMapping | |
| 70 | + public InvokeResult<GetDraftRequestCarTicketBo> get(@NotBlank(message = "id不能为空!") String id) { | |
| 71 | + | |
| 72 | + DraftRequestCarTicket data = draftRequestCarTicketService.findById(id); | |
| 73 | + if (data == null) { | |
| 74 | + throw new DefaultClientException("草稿要车单不存在!"); | |
| 75 | + } | |
| 76 | + | |
| 77 | + GetDraftRequestCarTicketBo result = new GetDraftRequestCarTicketBo(data); | |
| 78 | + | |
| 79 | + return InvokeResultBuilder.success(result); | |
| 80 | + } | |
| 81 | + | |
| 82 | + /** | |
| 83 | + * 新增 | |
| 84 | + */ | |
| 85 | + @ApiOperation("新增") | |
| 86 | + @HasPermission({"requestCarTicket:requestcarticket:add"}) | |
| 87 | + @PostMapping | |
| 88 | + public InvokeResult<Void> create(@Valid @RequestBody CreateDraftRequestCarTicketVo vo) { | |
| 89 | + | |
| 90 | + draftRequestCarTicketService.create(vo); | |
| 91 | + | |
| 92 | + return InvokeResultBuilder.success(); | |
| 93 | + } | |
| 94 | + | |
| 95 | + /** | |
| 96 | + * 修改 | |
| 97 | + */ | |
| 98 | + @ApiOperation("修改") | |
| 99 | + @HasPermission({"requestCarTicket:requestcarticket:modify"}) | |
| 100 | + @PutMapping | |
| 101 | + public InvokeResult<Void> update(@Valid @RequestBody UpdateDraftRequestCarTicketVo vo) { | |
| 102 | + | |
| 103 | + draftRequestCarTicketService.update(vo); | |
| 104 | + | |
| 105 | + return InvokeResultBuilder.success(); | |
| 106 | + } | |
| 107 | + | |
| 108 | + /** | |
| 109 | + * 取消 | |
| 110 | + */ | |
| 111 | + @ApiOperation("取消") | |
| 112 | + @HasPermission({"purchaseOrderRevoke:purchaseorderrevoke:cancel"}) | |
| 113 | + @GetMapping("/cancel") | |
| 114 | + public InvokeResult<Void> cancel(@NotBlank(message = "id不能为空!") String id) { | |
| 115 | + | |
| 116 | + draftRequestCarTicketService.updateStatus(id, "CANCEL"); | |
| 117 | + | |
| 118 | + return InvokeResultBuilder.success(); | |
| 119 | + } | |
| 120 | + | |
| 121 | + /** | |
| 122 | + * 根据ID删除 | |
| 123 | + */ | |
| 124 | + @ApiOperation("根据ID删除") | |
| 125 | + @ApiImplicitParam(value = "id", name = "id", paramType = "query", required = true) | |
| 126 | + @HasPermission({"requestCarTicket:requestcarticket:delete"}) | |
| 127 | + @DeleteMapping | |
| 128 | + public InvokeResult<Void> deleteById(@NotBlank(message = "id不能为空!") String id) { | |
| 129 | + | |
| 130 | + draftRequestCarTicketService.deleteById(id); | |
| 131 | + | |
| 132 | + return InvokeResultBuilder.success(); | |
| 133 | + } | |
| 134 | +} | ... | ... |
| 1 | +package com.lframework.xingyun.sc.entity; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.annotation.FieldFill; | |
| 4 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 5 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 6 | +import com.lframework.starter.web.core.dto.BaseDto; | |
| 7 | +import com.lframework.starter.web.core.entity.BaseEntity; | |
| 8 | +import lombok.Data; | |
| 9 | + | |
| 10 | +import java.math.BigDecimal; | |
| 11 | +import java.time.LocalDate; | |
| 12 | +import java.time.LocalDateTime; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * <p> | |
| 16 | + * 草稿要车单表 | |
| 17 | + * </p> | |
| 18 | + * | |
| 19 | + */ | |
| 20 | +@Data | |
| 21 | +@TableName("draft_request_car_ticket") | |
| 22 | +public class DraftRequestCarTicket extends BaseEntity implements BaseDto { | |
| 23 | + | |
| 24 | + private static final long serialVersionUID = 1L; | |
| 25 | + | |
| 26 | + public static final String CACHE_NAME = "DraftRequestCarTicket"; | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * ID | |
| 30 | + */ | |
| 31 | + private String id; | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 订货单ID | |
| 35 | + */ | |
| 36 | + private String purchaseOrderId; | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * 要车日期 | |
| 40 | + */ | |
| 41 | + private LocalDate requestCarData; | |
| 42 | + | |
| 43 | + /** | |
| 44 | + * 要车办事处 | |
| 45 | + */ | |
| 46 | + private String deptId; | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 要车办事处名称(非持久化字段) | |
| 50 | + */ | |
| 51 | + @TableField(exist = false) | |
| 52 | + private String deptName; | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 计划装货日期 | |
| 56 | + */ | |
| 57 | + private LocalDate deliveryDate; | |
| 58 | + | |
| 59 | + /** | |
| 60 | + * 装货厂别 | |
| 61 | + */ | |
| 62 | + private String workshopId; | |
| 63 | + | |
| 64 | + /** | |
| 65 | + * 装货厂别名称(非持久化字段) | |
| 66 | + */ | |
| 67 | + @TableField(exist = false) | |
| 68 | + private String workshopName; | |
| 69 | + | |
| 70 | + /** | |
| 71 | + * 订单编号 | |
| 72 | + */ | |
| 73 | + private String orderNo; | |
| 74 | + | |
| 75 | + /** | |
| 76 | + * 客户名称【简称】 | |
| 77 | + */ | |
| 78 | + private String customerShortName; | |
| 79 | + | |
| 80 | + /** | |
| 81 | + * 卸货地点 | |
| 82 | + */ | |
| 83 | + private String destination; | |
| 84 | + | |
| 85 | + /** | |
| 86 | + * 计划吨位 | |
| 87 | + */ | |
| 88 | + private BigDecimal quantity; | |
| 89 | + | |
| 90 | + /** | |
| 91 | + * 接货人联络人 | |
| 92 | + */ | |
| 93 | + private String consignee; | |
| 94 | + | |
| 95 | + /** | |
| 96 | + * 联系电话 | |
| 97 | + */ | |
| 98 | + private String phone; | |
| 99 | + | |
| 100 | + /** | |
| 101 | + * 回货计划安排(退料/角料) | |
| 102 | + */ | |
| 103 | + private String returnPlanArrangement; | |
| 104 | + | |
| 105 | + /** | |
| 106 | + * 特殊需求、其他等 | |
| 107 | + */ | |
| 108 | + private String other; | |
| 109 | + | |
| 110 | + /** | |
| 111 | + * 外办审核人 | |
| 112 | + */ | |
| 113 | + private String externalAuditor; | |
| 114 | + | |
| 115 | + /** | |
| 116 | + * 外办审核人名称(非持久化字段) | |
| 117 | + */ | |
| 118 | + @TableField(exist = false) | |
| 119 | + private String externalAuditorName; | |
| 120 | + | |
| 121 | + /** | |
| 122 | + * 装货时间 | |
| 123 | + */ | |
| 124 | + private String loadingTime; | |
| 125 | + | |
| 126 | + /** | |
| 127 | + * 装货特别要求/需求 | |
| 128 | + */ | |
| 129 | + private String specialLoadingRequirement; | |
| 130 | + | |
| 131 | + /** | |
| 132 | + * 经营办审核人 | |
| 133 | + */ | |
| 134 | + private String businessOfficeAuditor; | |
| 135 | + | |
| 136 | + /** | |
| 137 | + * 经营办审核人名称(非持久化字段) | |
| 138 | + */ | |
| 139 | + @TableField(exist = false) | |
| 140 | + private String businessOfficeAuditorName; | |
| 141 | + | |
| 142 | + /** | |
| 143 | + * 运作科审核人 | |
| 144 | + */ | |
| 145 | + private String operationsDepartmentAuditor; | |
| 146 | + | |
| 147 | + /** | |
| 148 | + * 运作科审核人名称(非持久化字段) | |
| 149 | + */ | |
| 150 | + @TableField(exist = false) | |
| 151 | + private String operationsDepartmentAuditorName; | |
| 152 | + | |
| 153 | + /** | |
| 154 | + * 审核状态 | |
| 155 | + */ | |
| 156 | + private String status; | |
| 157 | + | |
| 158 | + /** | |
| 159 | + * 创建人ID | |
| 160 | + */ | |
| 161 | + @TableField(fill = FieldFill.INSERT) | |
| 162 | + private String createById; | |
| 163 | + | |
| 164 | + /** | |
| 165 | + * 创建人 | |
| 166 | + */ | |
| 167 | + @TableField(fill = FieldFill.INSERT) | |
| 168 | + private String createBy; | |
| 169 | + | |
| 170 | + /** | |
| 171 | + * 更新人ID | |
| 172 | + */ | |
| 173 | + @TableField(fill = FieldFill.INSERT_UPDATE) | |
| 174 | + private String updateById; | |
| 175 | + | |
| 176 | + /** | |
| 177 | + * 更新人 | |
| 178 | + */ | |
| 179 | + @TableField(fill = FieldFill.INSERT_UPDATE) | |
| 180 | + private String updateBy; | |
| 181 | + | |
| 182 | + /** | |
| 183 | + * 创建时间 | |
| 184 | + */ | |
| 185 | + @TableField(fill = FieldFill.INSERT) | |
| 186 | + private LocalDateTime createTime; | |
| 187 | + | |
| 188 | + /** | |
| 189 | + * 更新时间 | |
| 190 | + */ | |
| 191 | + @TableField(fill = FieldFill.INSERT_UPDATE) | |
| 192 | + private LocalDateTime updateTime; | |
| 193 | + | |
| 194 | +} | ... | ... |
| ... | ... | @@ -8,6 +8,7 @@ import java.time.LocalDateTime; |
| 8 | 8 | import com.baomidou.mybatisplus.annotation.FieldFill; |
| 9 | 9 | import com.lframework.starter.web.core.entity.BaseEntity; |
| 10 | 10 | import com.baomidou.mybatisplus.annotation.TableField; |
| 11 | +import io.swagger.annotations.ApiModelProperty; | |
| 11 | 12 | import lombok.Data; |
| 12 | 13 | |
| 13 | 14 | /** |
| ... | ... | @@ -30,6 +31,16 @@ public class RequestCarTicket extends BaseEntity implements BaseDto { |
| 30 | 31 | private String id; |
| 31 | 32 | |
| 32 | 33 | /** |
| 34 | + * 草稿要车单ID | |
| 35 | + */ | |
| 36 | + private String draftId; | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * 订货单ID | |
| 40 | + */ | |
| 41 | + private String purchaseOrderId; | |
| 42 | + | |
| 43 | + /** | |
| 33 | 44 | * 要车日期 |
| 34 | 45 | */ |
| 35 | 46 | private LocalDate requestCarData; | ... | ... |
| ... | ... | @@ -5,6 +5,7 @@ import com.lframework.starter.bpm.enums.FlowInstanceStatus; |
| 5 | 5 | import com.lframework.starter.bpm.service.BusinessDataHandlerService; |
| 6 | 6 | import com.lframework.starter.mq.core.service.MqProducerService; |
| 7 | 7 | import com.lframework.starter.web.core.components.redis.RedisHandler; |
| 8 | +import com.lframework.starter.web.core.components.security.SecurityUtil; | |
| 8 | 9 | import com.lframework.starter.web.core.utils.IdUtil; |
| 9 | 10 | import com.lframework.starter.web.core.utils.JsonUtil; |
| 10 | 11 | import com.lframework.starter.web.inner.dto.message.SysSiteMessageDto; |
| ... | ... | @@ -17,6 +18,7 @@ import com.lframework.xingyun.sc.service.customer.CustomerCreditHistoryService; |
| 17 | 18 | import com.lframework.xingyun.sc.service.customer.CustomerCreditService; |
| 18 | 19 | import com.lframework.xingyun.sc.service.customer.CustomerDevelopPlanService; |
| 19 | 20 | import com.lframework.xingyun.sc.service.order.*; |
| 21 | +import com.lframework.xingyun.sc.service.shipments.car.DraftRequestCarTicketService; | |
| 20 | 22 | import com.lframework.xingyun.sc.vo.customer.credit.QueryCorePersonnelHistoryVo; |
| 21 | 23 | import com.lframework.xingyun.sc.vo.customer.credit.UpdateCustomerCreditVo; |
| 22 | 24 | import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderLineVo; |
| ... | ... | @@ -69,6 +71,8 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
| 69 | 71 | private TransactorHandler transactorHandler; |
| 70 | 72 | @Resource |
| 71 | 73 | private SpecLockDelayApplicationService specLockDelayApplicationService; |
| 74 | + @Resource | |
| 75 | + private DraftRequestCarTicketService draftRequestCarTicketService; | |
| 72 | 76 | |
| 73 | 77 | |
| 74 | 78 | /** |
| ... | ... | @@ -124,6 +128,9 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
| 124 | 128 | case "SPEC_LOCK_DELAY": |
| 125 | 129 | handleSpecLockDelayAuditData(flowStatus, businessId); |
| 126 | 130 | break; |
| 131 | + case "DRAFT_REQUEST_CAR": | |
| 132 | + handleDraftRequestCarTicketData(flowStatus, businessId); | |
| 133 | + break; | |
| 127 | 134 | default: |
| 128 | 135 | break; |
| 129 | 136 | } |
| ... | ... | @@ -383,4 +390,24 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic |
| 383 | 390 | orderChangeRecordService.updateStatus(businessId, "REFUSE"); |
| 384 | 391 | } |
| 385 | 392 | } |
| 393 | + | |
| 394 | + /** | |
| 395 | + * 发货计划-草稿要车单业务数据处理 | |
| 396 | + * | |
| 397 | + * @param businessId 业务ID | |
| 398 | + */ | |
| 399 | + private void handleDraftRequestCarTicketData(String flowStatus, String businessId) { | |
| 400 | + if (FlowInstanceStatus.APPROVE_PASS.getCode().equals(flowStatus) | |
| 401 | + || FlowInstanceStatus.FINISH.getCode().equals(flowStatus)) { | |
| 402 | + draftRequestCarTicketService.updateStatus(businessId, "PASS"); | |
| 403 | + //更新外办审核人 | |
| 404 | + draftRequestCarTicketService.updateExamineUser(businessId, SecurityUtil.getCurrentUser().getId(), null, null); | |
| 405 | + } else if (FlowInstanceStatus.REVOKE.getCode().equals(flowStatus) | |
| 406 | + || FlowInstanceStatus.REFUSE.getCode().equals(flowStatus) | |
| 407 | + || FlowInstanceStatus.TERMINATION.getCode().equals(flowStatus)) { | |
| 408 | + draftRequestCarTicketService.updateStatus(businessId, "REFUSE"); | |
| 409 | + //更新外办审核人 | |
| 410 | + draftRequestCarTicketService.updateExamineUser(businessId, SecurityUtil.getCurrentUser().getId(), null, null); | |
| 411 | + } | |
| 412 | + } | |
| 386 | 413 | } | ... | ... |
| 1 | +package com.lframework.xingyun.sc.impl.shipments.car; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | |
| 4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
| 5 | +import com.github.pagehelper.PageInfo; | |
| 6 | +import com.lframework.starter.bpm.service.FlowInstanceWrapperService; | |
| 7 | +import com.lframework.starter.common.exceptions.impl.DefaultClientException; | |
| 8 | +import com.lframework.starter.common.utils.Assert; | |
| 9 | +import com.lframework.starter.common.utils.ObjectUtil; | |
| 10 | +import com.lframework.starter.common.utils.StringUtil; | |
| 11 | +import com.lframework.starter.web.core.annotations.oplog.OpLog; | |
| 12 | +import com.lframework.starter.web.core.components.resp.PageResult; | |
| 13 | +import com.lframework.starter.web.core.components.security.SecurityUtil; | |
| 14 | +import com.lframework.starter.web.core.impl.BaseMpServiceImpl; | |
| 15 | +import com.lframework.starter.web.core.utils.IdUtil; | |
| 16 | +import com.lframework.starter.web.core.utils.OpLogUtil; | |
| 17 | +import com.lframework.starter.web.core.utils.PageHelperUtil; | |
| 18 | +import com.lframework.starter.web.core.utils.PageResultUtil; | |
| 19 | +import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; | |
| 20 | +import com.lframework.xingyun.sc.entity.DraftRequestCarTicket; | |
| 21 | +import com.lframework.xingyun.sc.mappers.DraftRequestCarTicketMapper; | |
| 22 | +import com.lframework.xingyun.sc.service.shipments.car.DraftRequestCarTicketService; | |
| 23 | +import com.lframework.xingyun.sc.vo.shipments.car.*; | |
| 24 | +import org.apache.commons.lang3.StringUtils; | |
| 25 | +import org.springframework.stereotype.Service; | |
| 26 | +import org.springframework.transaction.annotation.Transactional; | |
| 27 | + | |
| 28 | +import javax.annotation.Resource; | |
| 29 | +import java.io.Serializable; | |
| 30 | +import java.util.List; | |
| 31 | + | |
| 32 | +@Service | |
| 33 | +public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftRequestCarTicketMapper, DraftRequestCarTicket> implements DraftRequestCarTicketService { | |
| 34 | + private static final String BPM_FLAG = "DRAFT_REQUEST_CAR"; | |
| 35 | + @Resource | |
| 36 | + private FlowInstanceWrapperService flowInstanceWrapperService; | |
| 37 | + | |
| 38 | + @Override | |
| 39 | + public PageResult<DraftRequestCarTicket> query(Integer pageIndex, Integer pageSize, QueryDraftRequestCarTicketVo vo) { | |
| 40 | + | |
| 41 | + Assert.greaterThanZero(pageIndex); | |
| 42 | + Assert.greaterThanZero(pageSize); | |
| 43 | + | |
| 44 | + PageHelperUtil.startPage(pageIndex, pageSize); | |
| 45 | + List<DraftRequestCarTicket> datas = this.query(vo); | |
| 46 | + | |
| 47 | + return PageResultUtil.convert(new PageInfo<>(datas)); | |
| 48 | + } | |
| 49 | + | |
| 50 | + @Override | |
| 51 | + public List<DraftRequestCarTicket> query(QueryDraftRequestCarTicketVo vo) { | |
| 52 | + | |
| 53 | + return getBaseMapper().query(vo); | |
| 54 | + } | |
| 55 | + | |
| 56 | + @Override | |
| 57 | + public DraftRequestCarTicket findById(String id) { | |
| 58 | + | |
| 59 | + return getBaseMapper().findById(id); | |
| 60 | + } | |
| 61 | + | |
| 62 | + @OpLog(type = OtherOpLogType.class, name = "新增草稿要车单表,ID:{}", params = {"#id"}) | |
| 63 | + @Transactional(rollbackFor = Exception.class) | |
| 64 | + @Override | |
| 65 | + public String create(CreateDraftRequestCarTicketVo vo) { | |
| 66 | + | |
| 67 | + DraftRequestCarTicket data = new DraftRequestCarTicket(); | |
| 68 | + data.setId(IdUtil.getId()); | |
| 69 | + if (!StringUtil.isBlank(vo.getPurchaseOrderId())) { | |
| 70 | + data.setPurchaseOrderId(vo.getPurchaseOrderId()); | |
| 71 | + } | |
| 72 | + if (vo.getRequestCarData() != null) { | |
| 73 | + data.setRequestCarData(vo.getRequestCarData()); | |
| 74 | + } | |
| 75 | + if (!StringUtil.isBlank(vo.getDeptId())) { | |
| 76 | + data.setDeptId(vo.getDeptId()); | |
| 77 | + } | |
| 78 | + if (vo.getDeliveryDate() != null) { | |
| 79 | + data.setDeliveryDate(vo.getDeliveryDate()); | |
| 80 | + } | |
| 81 | + if (!StringUtil.isBlank(vo.getWorkshopId())) { | |
| 82 | + data.setWorkshopId(vo.getWorkshopId()); | |
| 83 | + } | |
| 84 | + if (!StringUtil.isBlank(vo.getOrderNo())) { | |
| 85 | + data.setOrderNo(vo.getOrderNo()); | |
| 86 | + } | |
| 87 | + if (!StringUtil.isBlank(vo.getCustomerShortName())) { | |
| 88 | + data.setCustomerShortName(vo.getCustomerShortName()); | |
| 89 | + } | |
| 90 | + if (!StringUtil.isBlank(vo.getDestination())) { | |
| 91 | + data.setDestination(vo.getDestination()); | |
| 92 | + } | |
| 93 | + if (vo.getQuantity() != null) { | |
| 94 | + data.setQuantity(vo.getQuantity()); | |
| 95 | + } | |
| 96 | + if (!StringUtil.isBlank(vo.getConsignee())) { | |
| 97 | + data.setConsignee(vo.getConsignee()); | |
| 98 | + } | |
| 99 | + if (!StringUtil.isBlank(vo.getPhone())) { | |
| 100 | + data.setPhone(vo.getPhone()); | |
| 101 | + } | |
| 102 | + if (!StringUtil.isBlank(vo.getReturnPlanArrangement())) { | |
| 103 | + data.setReturnPlanArrangement(vo.getReturnPlanArrangement()); | |
| 104 | + } | |
| 105 | + if (!StringUtil.isBlank(vo.getOther())) { | |
| 106 | + data.setOther(vo.getOther()); | |
| 107 | + } | |
| 108 | + if (!StringUtil.isBlank(vo.getExternalAuditor())) { | |
| 109 | + data.setExternalAuditor(vo.getExternalAuditor()); | |
| 110 | + } | |
| 111 | + if (!StringUtil.isBlank(vo.getLoadingTime())) { | |
| 112 | + data.setLoadingTime(vo.getLoadingTime()); | |
| 113 | + } | |
| 114 | + if (!StringUtil.isBlank(vo.getSpecialLoadingRequirement())) { | |
| 115 | + data.setSpecialLoadingRequirement(vo.getSpecialLoadingRequirement()); | |
| 116 | + } | |
| 117 | + if (!StringUtil.isBlank(vo.getBusinessOfficeAuditor())) { | |
| 118 | + data.setBusinessOfficeAuditor(vo.getBusinessOfficeAuditor()); | |
| 119 | + } | |
| 120 | + if (!StringUtil.isBlank(vo.getOperationsDepartmentAuditor())) { | |
| 121 | + data.setOperationsDepartmentAuditor(vo.getOperationsDepartmentAuditor()); | |
| 122 | + } | |
| 123 | + if (!StringUtil.isBlank(vo.getStatus())) { | |
| 124 | + data.setStatus(vo.getStatus()); | |
| 125 | + } | |
| 126 | + | |
| 127 | + getBaseMapper().insert(data); | |
| 128 | + | |
| 129 | + OpLogUtil.setVariable("id", data.getId()); | |
| 130 | + OpLogUtil.setExtra(vo); | |
| 131 | + //开启审核 | |
| 132 | + data.setUpdateById(SecurityUtil.getCurrentUser().getId()); | |
| 133 | + flowInstanceWrapperService.startInstance(BPM_FLAG, data.getId(), BPM_FLAG, data); | |
| 134 | + | |
| 135 | + return data.getId(); | |
| 136 | + } | |
| 137 | + | |
| 138 | + @OpLog(type = OtherOpLogType.class, name = "修改草稿要车单,ID:{}", params = {"#id"}) | |
| 139 | + @Transactional(rollbackFor = Exception.class) | |
| 140 | + @Override | |
| 141 | + public void update(UpdateDraftRequestCarTicketVo vo) { | |
| 142 | + | |
| 143 | + DraftRequestCarTicket data = getBaseMapper().selectById(vo.getId()); | |
| 144 | + if (ObjectUtil.isNull(data)) { | |
| 145 | + throw new DefaultClientException("草稿要车单不存在!"); | |
| 146 | + } | |
| 147 | + | |
| 148 | + LambdaUpdateWrapper<DraftRequestCarTicket> updateWrapper = Wrappers.lambdaUpdate(DraftRequestCarTicket.class) | |
| 149 | + .set(DraftRequestCarTicket::getPurchaseOrderId, StringUtil.isBlank(vo.getPurchaseOrderId()) ? null : vo.getPurchaseOrderId()) | |
| 150 | + .set(DraftRequestCarTicket::getRequestCarData, vo.getRequestCarData() == null ? null : vo.getRequestCarData()) | |
| 151 | + .set(DraftRequestCarTicket::getDeptId, StringUtil.isBlank(vo.getDeptId()) ? null : vo.getDeptId()) | |
| 152 | + .set(DraftRequestCarTicket::getDeliveryDate, vo.getDeliveryDate() == null ? null : vo.getDeliveryDate()) | |
| 153 | + .set(DraftRequestCarTicket::getWorkshopId, StringUtil.isBlank(vo.getWorkshopId()) ? null : vo.getWorkshopId()) | |
| 154 | + .set(DraftRequestCarTicket::getOrderNo, StringUtil.isBlank(vo.getOrderNo()) ? null : vo.getOrderNo()) | |
| 155 | + .set(DraftRequestCarTicket::getCustomerShortName, StringUtil.isBlank(vo.getCustomerShortName()) ? null : vo.getCustomerShortName()) | |
| 156 | + .set(DraftRequestCarTicket::getDestination, StringUtil.isBlank(vo.getDestination()) ? null : vo.getDestination()) | |
| 157 | + .set(DraftRequestCarTicket::getQuantity, vo.getQuantity() == null ? null : vo.getQuantity()) | |
| 158 | + .set(DraftRequestCarTicket::getConsignee, StringUtil.isBlank(vo.getConsignee()) ? null : vo.getConsignee()) | |
| 159 | + .set(DraftRequestCarTicket::getPhone, StringUtil.isBlank(vo.getPhone()) ? null : vo.getPhone()) | |
| 160 | + .set(DraftRequestCarTicket::getReturnPlanArrangement, StringUtil.isBlank(vo.getReturnPlanArrangement()) ? null : vo.getReturnPlanArrangement()) | |
| 161 | + .set(DraftRequestCarTicket::getOther, StringUtil.isBlank(vo.getOther()) ? null : vo.getOther()) | |
| 162 | + .set(DraftRequestCarTicket::getExternalAuditor, StringUtil.isBlank(vo.getExternalAuditor()) ? null : vo.getExternalAuditor()) | |
| 163 | + .set(DraftRequestCarTicket::getLoadingTime, StringUtil.isBlank(vo.getLoadingTime()) ? null : vo.getLoadingTime()) | |
| 164 | + .set(DraftRequestCarTicket::getSpecialLoadingRequirement, StringUtil.isBlank(vo.getSpecialLoadingRequirement()) ? null : vo.getSpecialLoadingRequirement()) | |
| 165 | + .set(DraftRequestCarTicket::getBusinessOfficeAuditor, StringUtil.isBlank(vo.getBusinessOfficeAuditor()) ? null : vo.getBusinessOfficeAuditor()) | |
| 166 | + .set(DraftRequestCarTicket::getOperationsDepartmentAuditor, StringUtil.isBlank(vo.getOperationsDepartmentAuditor()) ? null : vo.getOperationsDepartmentAuditor()) | |
| 167 | + .set(DraftRequestCarTicket::getStatus, StringUtil.isBlank(vo.getStatus()) ? null : vo.getStatus()) | |
| 168 | + .eq(DraftRequestCarTicket::getId, vo.getId()); | |
| 169 | + | |
| 170 | + getBaseMapper().update(updateWrapper); | |
| 171 | + | |
| 172 | + OpLogUtil.setVariable("id", data.getId()); | |
| 173 | + OpLogUtil.setExtra(vo); | |
| 174 | + //开启审核 | |
| 175 | + DraftRequestCarTicket draftRequestCarTicket = getBaseMapper().selectById(vo.getId()); | |
| 176 | + flowInstanceWrapperService.startInstance(BPM_FLAG, draftRequestCarTicket.getId(), BPM_FLAG, draftRequestCarTicket); | |
| 177 | + } | |
| 178 | + | |
| 179 | + @OpLog(type = OtherOpLogType.class, name = "修改草稿要车单状态,ID:{}", params = {"#id"}) | |
| 180 | + @Transactional(rollbackFor = Exception.class) | |
| 181 | + @Override | |
| 182 | + public void updateStatus(String id, String status) { | |
| 183 | + if (StringUtils.isBlank(id) || StringUtils.isBlank(status)) { | |
| 184 | + return; | |
| 185 | + } | |
| 186 | + DraftRequestCarTicket data = getBaseMapper().findById(id); | |
| 187 | + if (ObjectUtil.isNull(data)) { | |
| 188 | + throw new DefaultClientException("草稿要车单不存在!"); | |
| 189 | + } | |
| 190 | + LambdaUpdateWrapper<DraftRequestCarTicket> updateWrapper = Wrappers.lambdaUpdate(DraftRequestCarTicket.class) | |
| 191 | + .set(DraftRequestCarTicket::getStatus, status) | |
| 192 | + .eq(DraftRequestCarTicket::getId, id); | |
| 193 | + | |
| 194 | + getBaseMapper().update(updateWrapper); | |
| 195 | + | |
| 196 | + OpLogUtil.setVariable("id", data.getId()); | |
| 197 | + OpLogUtil.setExtra(id); | |
| 198 | + } | |
| 199 | + | |
| 200 | + @OpLog(type = OtherOpLogType.class, name = "更新草稿要车单审核人,ID:{}", params = {"#id"}) | |
| 201 | + @Transactional(rollbackFor = Exception.class) | |
| 202 | + @Override | |
| 203 | + public void updateExamineUser(String id, String externalAuditor, String businessOfficeAuditor, String operationsDepartmentAuditor) { | |
| 204 | + if (StringUtils.isBlank(id)) { | |
| 205 | + return; | |
| 206 | + } | |
| 207 | + DraftRequestCarTicket data = getBaseMapper().findById(id); | |
| 208 | + if (ObjectUtil.isNull(data)) { | |
| 209 | + throw new DefaultClientException("草稿要车单不存在!"); | |
| 210 | + } | |
| 211 | + LambdaUpdateWrapper<DraftRequestCarTicket> updateWrapper = Wrappers.lambdaUpdate(DraftRequestCarTicket.class) | |
| 212 | + .eq(DraftRequestCarTicket::getId, id); | |
| 213 | + if (externalAuditor != null) { | |
| 214 | + updateWrapper.set(DraftRequestCarTicket::getExternalAuditor, externalAuditor); | |
| 215 | + } | |
| 216 | + if (businessOfficeAuditor != null) { | |
| 217 | + updateWrapper.set(DraftRequestCarTicket::getBusinessOfficeAuditor, businessOfficeAuditor); | |
| 218 | + } | |
| 219 | + if (operationsDepartmentAuditor != null) { | |
| 220 | + updateWrapper.set(DraftRequestCarTicket::getOperationsDepartmentAuditor, operationsDepartmentAuditor); | |
| 221 | + } | |
| 222 | + | |
| 223 | + getBaseMapper().update(updateWrapper); | |
| 224 | + | |
| 225 | + OpLogUtil.setVariable("id", data.getId()); | |
| 226 | + OpLogUtil.setExtra(id); | |
| 227 | + } | |
| 228 | + | |
| 229 | + @OpLog(type = OtherOpLogType.class, name = "删除草稿要车单,ID:{}", params = {"#id"}) | |
| 230 | + @Transactional(rollbackFor = Exception.class) | |
| 231 | + @Override | |
| 232 | + public void deleteById(String id) { | |
| 233 | + | |
| 234 | + getBaseMapper().deleteById(id); | |
| 235 | + } | |
| 236 | + | |
| 237 | + @Override | |
| 238 | + public void cleanCacheByKey(Serializable key) { | |
| 239 | + | |
| 240 | + } | |
| 241 | +} | ... | ... |
| ... | ... | @@ -3,6 +3,8 @@ package com.lframework.xingyun.sc.impl.shipments.car; |
| 3 | 3 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| 4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 5 | 5 | import com.github.pagehelper.PageInfo; |
| 6 | +import com.lframework.starter.bpm.service.FlowInstanceWrapperService; | |
| 7 | +import com.lframework.starter.web.core.components.security.SecurityUtil; | |
| 6 | 8 | import com.lframework.starter.web.core.impl.BaseMpServiceImpl; |
| 7 | 9 | import com.lframework.starter.web.core.utils.PageResultUtil; |
| 8 | 10 | import com.lframework.starter.web.core.components.resp.PageResult; |
| ... | ... | @@ -26,10 +28,14 @@ import org.apache.commons.lang3.StringUtils; |
| 26 | 28 | import org.springframework.transaction.annotation.Transactional; |
| 27 | 29 | import org.springframework.stereotype.Service; |
| 28 | 30 | |
| 31 | +import javax.annotation.Resource; | |
| 29 | 32 | import java.util.List; |
| 30 | 33 | |
| 31 | 34 | @Service |
| 32 | 35 | public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTicketMapper, RequestCarTicket> implements RequestCarTicketService { |
| 36 | + private static final String BPM_FLAG = "REQUEST_CAR_TICKET"; | |
| 37 | + @Resource | |
| 38 | + private FlowInstanceWrapperService flowInstanceWrapperService; | |
| 33 | 39 | |
| 34 | 40 | @Override |
| 35 | 41 | public PageResult<RequestCarTicket> query(Integer pageIndex, Integer pageSize, QueryRequestCarTicketVo vo) { |
| ... | ... | @@ -62,6 +68,12 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic |
| 62 | 68 | |
| 63 | 69 | RequestCarTicket data = new RequestCarTicket(); |
| 64 | 70 | data.setId(IdUtil.getId()); |
| 71 | + if (!StringUtil.isBlank(vo.getDraftId())) { | |
| 72 | + data.setDraftId(vo.getDraftId()); | |
| 73 | + } | |
| 74 | + if (!StringUtil.isBlank(vo.getPurchaseOrderId())) { | |
| 75 | + data.setPurchaseOrderId(vo.getPurchaseOrderId()); | |
| 76 | + } | |
| 65 | 77 | if (vo.getRequestCarData() != null) { |
| 66 | 78 | data.setRequestCarData(vo.getRequestCarData()); |
| 67 | 79 | } |
| ... | ... | @@ -121,6 +133,9 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic |
| 121 | 133 | |
| 122 | 134 | OpLogUtil.setVariable("id", data.getId()); |
| 123 | 135 | OpLogUtil.setExtra(vo); |
| 136 | + //开启审核 | |
| 137 | +// data.setUpdateById(SecurityUtil.getCurrentUser().getId()); | |
| 138 | +// flowInstanceWrapperService.startInstance(BPM_FLAG, data.getId(), BPM_FLAG, data); | |
| 124 | 139 | |
| 125 | 140 | return data.getId(); |
| 126 | 141 | } |
| ... | ... | @@ -136,6 +151,8 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic |
| 136 | 151 | } |
| 137 | 152 | |
| 138 | 153 | LambdaUpdateWrapper<RequestCarTicket> updateWrapper = Wrappers.lambdaUpdate(RequestCarTicket.class) |
| 154 | + .set(RequestCarTicket::getDraftId, StringUtil.isBlank(vo.getDraftId()) ? null : vo.getDraftId()) | |
| 155 | + .set(RequestCarTicket::getPurchaseOrderId, StringUtil.isBlank(vo.getPurchaseOrderId()) ? null : vo.getPurchaseOrderId()) | |
| 139 | 156 | .set(RequestCarTicket::getRequestCarData, vo.getRequestCarData() == null ? null : vo.getRequestCarData()) |
| 140 | 157 | .set(RequestCarTicket::getDeptId, StringUtil.isBlank(vo.getDeptId()) ? null : vo.getDeptId()) |
| 141 | 158 | .set(RequestCarTicket::getDeliveryDate, vo.getDeliveryDate() == null ? null : vo.getDeliveryDate()) |
| ... | ... | @@ -160,9 +177,12 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic |
| 160 | 177 | |
| 161 | 178 | OpLogUtil.setVariable("id", data.getId()); |
| 162 | 179 | OpLogUtil.setExtra(vo); |
| 180 | + //开启审核 | |
| 181 | +// RequestCarTicket requestCarTicket = getBaseMapper().selectById(vo.getId()); | |
| 182 | +// flowInstanceWrapperService.startInstance(BPM_FLAG, requestCarTicket.getId(), BPM_FLAG, requestCarTicket); | |
| 163 | 183 | } |
| 164 | 184 | |
| 165 | - @OpLog(type = OtherOpLogType.class, name = "修改草稿要车单状态,ID:{}", params = {"#id"}) | |
| 185 | + @OpLog(type = OtherOpLogType.class, name = "修改要车单状态,ID:{}", params = {"#id"}) | |
| 166 | 186 | @Transactional(rollbackFor = Exception.class) |
| 167 | 187 | @Override |
| 168 | 188 | public void updateStatus(String id, String status) { |
| ... | ... | @@ -171,7 +191,7 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic |
| 171 | 191 | } |
| 172 | 192 | RequestCarTicket data = getBaseMapper().findById(id); |
| 173 | 193 | if (ObjectUtil.isNull(data)) { |
| 174 | - throw new DefaultClientException("草稿要车单不存在!"); | |
| 194 | + throw new DefaultClientException("要车单不存在!"); | |
| 175 | 195 | } |
| 176 | 196 | LambdaUpdateWrapper<RequestCarTicket> updateWrapper = Wrappers.lambdaUpdate(RequestCarTicket.class) |
| 177 | 197 | .set(RequestCarTicket::getStatus, status) |
| ... | ... | @@ -183,6 +203,35 @@ public class RequestCarTicketServiceImpl extends BaseMpServiceImpl<RequestCarTic |
| 183 | 203 | OpLogUtil.setExtra(id); |
| 184 | 204 | } |
| 185 | 205 | |
| 206 | + @OpLog(type = OtherOpLogType.class, name = "更新要车单审核人,ID:{}", params = {"#id"}) | |
| 207 | + @Transactional(rollbackFor = Exception.class) | |
| 208 | + @Override | |
| 209 | + public void updateExamineUser(String id, String externalAuditor, String businessOfficeAuditor, String operationsDepartmentAuditor) { | |
| 210 | + if (StringUtils.isBlank(id)) { | |
| 211 | + return; | |
| 212 | + } | |
| 213 | + RequestCarTicket data = getBaseMapper().findById(id); | |
| 214 | + if (ObjectUtil.isNull(data)) { | |
| 215 | + throw new DefaultClientException("要车单不存在!"); | |
| 216 | + } | |
| 217 | + LambdaUpdateWrapper<RequestCarTicket> updateWrapper = Wrappers.lambdaUpdate(RequestCarTicket.class) | |
| 218 | + .eq(RequestCarTicket::getId, id); | |
| 219 | + if (externalAuditor != null) { | |
| 220 | + updateWrapper.set(RequestCarTicket::getExternalAuditor, externalAuditor); | |
| 221 | + } | |
| 222 | + if (businessOfficeAuditor != null) { | |
| 223 | + updateWrapper.set(RequestCarTicket::getBusinessOfficeAuditor, businessOfficeAuditor); | |
| 224 | + } | |
| 225 | + if (operationsDepartmentAuditor != null) { | |
| 226 | + updateWrapper.set(RequestCarTicket::getOperationsDepartmentAuditor, operationsDepartmentAuditor); | |
| 227 | + } | |
| 228 | + | |
| 229 | + getBaseMapper().update(updateWrapper); | |
| 230 | + | |
| 231 | + OpLogUtil.setVariable("id", data.getId()); | |
| 232 | + OpLogUtil.setExtra(id); | |
| 233 | + } | |
| 234 | + | |
| 186 | 235 | @OpLog(type = OtherOpLogType.class, name = "删除要车单表,ID:{}", params = {"#id"}) |
| 187 | 236 | @Transactional(rollbackFor = Exception.class) |
| 188 | 237 | @Override | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/mappers/DraftRequestCarTicketMapper.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.mappers; | |
| 2 | + | |
| 3 | +import com.lframework.starter.web.core.mapper.BaseMapper; | |
| 4 | +import com.lframework.xingyun.sc.entity.DraftRequestCarTicket; | |
| 5 | +import com.lframework.xingyun.sc.vo.shipments.car.QueryDraftRequestCarTicketVo; | |
| 6 | +import org.apache.ibatis.annotations.Param; | |
| 7 | + | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * <p> | |
| 12 | + * 草稿要车单表 Mapper 接口 | |
| 13 | + * </p> | |
| 14 | + * | |
| 15 | + */ | |
| 16 | +public interface DraftRequestCarTicketMapper extends BaseMapper<DraftRequestCarTicket> { | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * 查询列表 | |
| 20 | + * @param vo | |
| 21 | + * @return | |
| 22 | + */ | |
| 23 | + List<DraftRequestCarTicket> query(@Param("vo") QueryDraftRequestCarTicketVo vo); | |
| 24 | + | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 草稿要车单 | |
| 28 | + * | |
| 29 | + * @param id 主键 | |
| 30 | + * @return DraftRequestCarTicket | |
| 31 | + */ | |
| 32 | + DraftRequestCarTicket findById(@Param("id") String id); | |
| 33 | +} | ... | ... |
| 1 | +package com.lframework.xingyun.sc.service.shipments.car; | |
| 2 | + | |
| 3 | +import com.lframework.starter.web.core.components.resp.PageResult; | |
| 4 | +import com.lframework.starter.web.core.service.BaseMpService; | |
| 5 | +import com.lframework.xingyun.sc.entity.DraftRequestCarTicket; | |
| 6 | +import com.lframework.xingyun.sc.vo.shipments.car.*; | |
| 7 | + | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 草稿要车单表 Service | |
| 12 | + */ | |
| 13 | +public interface DraftRequestCarTicketService extends BaseMpService<DraftRequestCarTicket> { | |
| 14 | + | |
| 15 | + /** | |
| 16 | + * 查询列表 | |
| 17 | + * @return | |
| 18 | + */ | |
| 19 | + PageResult<DraftRequestCarTicket> query(Integer pageIndex, Integer pageSize, QueryDraftRequestCarTicketVo vo); | |
| 20 | + | |
| 21 | + /** | |
| 22 | + * 查询列表 | |
| 23 | + * @param vo | |
| 24 | + * @return | |
| 25 | + */ | |
| 26 | + List<DraftRequestCarTicket> query(QueryDraftRequestCarTicketVo vo); | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * 根据ID查询 | |
| 30 | + * @param id | |
| 31 | + * @return | |
| 32 | + */ | |
| 33 | + DraftRequestCarTicket findById(String id); | |
| 34 | + | |
| 35 | + /** | |
| 36 | + * 创建 | |
| 37 | + * @param vo | |
| 38 | + * @return | |
| 39 | + */ | |
| 40 | + String create(CreateDraftRequestCarTicketVo vo); | |
| 41 | + | |
| 42 | + /** | |
| 43 | + * 修改 | |
| 44 | + * @param vo | |
| 45 | + */ | |
| 46 | + void update(UpdateDraftRequestCarTicketVo vo); | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 修改状态 | |
| 50 | + * | |
| 51 | + * @param id 主键 | |
| 52 | + * @param status 状态 | |
| 53 | + */ | |
| 54 | + void updateStatus(String id, String status); | |
| 55 | + | |
| 56 | + /** | |
| 57 | + * 更新审核人 | |
| 58 | + * | |
| 59 | + * @param id 主键 | |
| 60 | + * @param externalAuditor 外办审核人 | |
| 61 | + * @param businessOfficeAuditor 经营办审核人 | |
| 62 | + * @param operationsDepartmentAuditor 运作科审核人 | |
| 63 | + */ | |
| 64 | + void updateExamineUser(String id, String externalAuditor, String businessOfficeAuditor, String operationsDepartmentAuditor); | |
| 65 | + | |
| 66 | + /** | |
| 67 | + * 根据ID删除 | |
| 68 | + * @param id | |
| 69 | + * @return | |
| 70 | + */ | |
| 71 | + void deleteById(String id); | |
| 72 | +} | ... | ... |
| ... | ... | @@ -55,6 +55,16 @@ public interface RequestCarTicketService extends BaseMpService<RequestCarTicket> |
| 55 | 55 | void updateStatus(String id, String status); |
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | + * 更新审核人 | |
| 59 | + * | |
| 60 | + * @param id 主键 | |
| 61 | + * @param externalAuditor 外办审核人 | |
| 62 | + * @param businessOfficeAuditor 经营办审核人 | |
| 63 | + * @param operationsDepartmentAuditor 运作科审核人 | |
| 64 | + */ | |
| 65 | + void updateExamineUser(String id, String externalAuditor, String businessOfficeAuditor, String operationsDepartmentAuditor); | |
| 66 | + | |
| 67 | + /** | |
| 58 | 68 | * 根据ID删除 |
| 59 | 69 | * @param id |
| 60 | 70 | * @return | ... | ... |
| 1 | +package com.lframework.xingyun.sc.vo.shipments.car; | |
| 2 | + | |
| 3 | +import com.lframework.starter.web.core.components.validation.IsNumberPrecision; | |
| 4 | +import com.lframework.starter.web.core.components.validation.TypeMismatch; | |
| 5 | +import com.lframework.starter.web.core.vo.BaseVo; | |
| 6 | +import io.swagger.annotations.ApiModelProperty; | |
| 7 | +import lombok.Data; | |
| 8 | +import org.hibernate.validator.constraints.Length; | |
| 9 | + | |
| 10 | +import java.io.Serializable; | |
| 11 | +import java.math.BigDecimal; | |
| 12 | +import java.time.LocalDate; | |
| 13 | + | |
| 14 | +@Data | |
| 15 | +public class CreateDraftRequestCarTicketVo implements BaseVo, Serializable { | |
| 16 | + | |
| 17 | + private static final long serialVersionUID = 1L; | |
| 18 | + | |
| 19 | + /** | |
| 20 | + * 订货单ID | |
| 21 | + */ | |
| 22 | + @ApiModelProperty("订货单ID") | |
| 23 | + private String purchaseOrderId; | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 要车日期 | |
| 27 | + */ | |
| 28 | + @ApiModelProperty("要车日期") | |
| 29 | + @TypeMismatch(message = "要车日期格式有误!") | |
| 30 | + private LocalDate requestCarData; | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 要车办事处 | |
| 34 | + */ | |
| 35 | + @ApiModelProperty("要车办事处") | |
| 36 | + @Length(message = "要车办事处最多允许32个字符!") | |
| 37 | + private String deptId; | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 计划装货日期 | |
| 41 | + */ | |
| 42 | + @ApiModelProperty("计划装货日期") | |
| 43 | + @TypeMismatch(message = "计划装货日期格式有误!") | |
| 44 | + private LocalDate deliveryDate; | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 装货厂别 | |
| 48 | + */ | |
| 49 | + @ApiModelProperty("装货厂别") | |
| 50 | + @Length(message = "装货厂别最多允许32个字符!") | |
| 51 | + private String workshopId; | |
| 52 | + | |
| 53 | + /** | |
| 54 | + * 订单编号 | |
| 55 | + */ | |
| 56 | + @ApiModelProperty("订单编号") | |
| 57 | + @Length(message = "订单编号最多允许50个字符!") | |
| 58 | + private String orderNo; | |
| 59 | + | |
| 60 | + /** | |
| 61 | + * 客户名称【简称】 | |
| 62 | + */ | |
| 63 | + @ApiModelProperty("客户名称【简称】") | |
| 64 | + @Length(message = "客户名称【简称】最多允许100个字符!") | |
| 65 | + private String customerShortName; | |
| 66 | + | |
| 67 | + /** | |
| 68 | + * 卸货地点 | |
| 69 | + */ | |
| 70 | + @ApiModelProperty("卸货地点") | |
| 71 | + @Length(message = "卸货地点最多允许200个字符!") | |
| 72 | + private String destination; | |
| 73 | + | |
| 74 | + /** | |
| 75 | + * 计划吨位 | |
| 76 | + */ | |
| 77 | + @ApiModelProperty("计划吨位") | |
| 78 | + @TypeMismatch(message = "计划吨位格式有误!") | |
| 79 | + @IsNumberPrecision(message = "计划吨位最多允许4位小数!", value = 4) | |
| 80 | + private BigDecimal quantity; | |
| 81 | + | |
| 82 | + /** | |
| 83 | + * 接货人联络人 | |
| 84 | + */ | |
| 85 | + @ApiModelProperty("接货人联络人") | |
| 86 | + @Length(message = "接货人联络人最多允许50个字符!") | |
| 87 | + private String consignee; | |
| 88 | + | |
| 89 | + /** | |
| 90 | + * 联系电话 | |
| 91 | + */ | |
| 92 | + @ApiModelProperty("联系电话") | |
| 93 | + @Length(message = "联系电话最多允许50个字符!") | |
| 94 | + private String phone; | |
| 95 | + | |
| 96 | + /** | |
| 97 | + * 回货计划安排(退料/角料) | |
| 98 | + */ | |
| 99 | + @ApiModelProperty("回货计划安排(退料/角料)") | |
| 100 | + @Length(message = "回货计划安排(退料/角料)最多允许500个字符!") | |
| 101 | + private String returnPlanArrangement; | |
| 102 | + | |
| 103 | + /** | |
| 104 | + * 特殊需求、其他等 | |
| 105 | + */ | |
| 106 | + @ApiModelProperty("特殊需求、其他等") | |
| 107 | + @Length(message = "特殊需求、其他等最多允许500个字符!") | |
| 108 | + private String other; | |
| 109 | + | |
| 110 | + /** | |
| 111 | + * 外办审核人 | |
| 112 | + */ | |
| 113 | + @ApiModelProperty("外办审核人") | |
| 114 | + @Length(message = "外办审核人最多允许50个字符!") | |
| 115 | + private String externalAuditor; | |
| 116 | + | |
| 117 | + /** | |
| 118 | + * 装货时间 | |
| 119 | + */ | |
| 120 | + @ApiModelProperty("装货时间") | |
| 121 | + @Length(message = "装货时间最多允许20个字符!") | |
| 122 | + private String loadingTime; | |
| 123 | + | |
| 124 | + /** | |
| 125 | + * 装货特别要求/需求 | |
| 126 | + */ | |
| 127 | + @ApiModelProperty("装货特别要求/需求") | |
| 128 | + @Length(message = "装货特别要求/需求最多允许500个字符!") | |
| 129 | + private String specialLoadingRequirement; | |
| 130 | + | |
| 131 | + /** | |
| 132 | + * 经营办审核人 | |
| 133 | + */ | |
| 134 | + @ApiModelProperty("经营办审核人") | |
| 135 | + @Length(message = "经营办审核人最多允许50个字符!") | |
| 136 | + private String businessOfficeAuditor; | |
| 137 | + | |
| 138 | + /** | |
| 139 | + * 运作科审核人 | |
| 140 | + */ | |
| 141 | + @ApiModelProperty("运作科审核人") | |
| 142 | + @Length(message = "运作科审核人最多允许50个字符!") | |
| 143 | + private String operationsDepartmentAuditor; | |
| 144 | + | |
| 145 | + /** | |
| 146 | + * 审核状态 | |
| 147 | + */ | |
| 148 | + @ApiModelProperty("审核状态") | |
| 149 | + private String status; | |
| 150 | + | |
| 151 | +} | ... | ... |
| ... | ... | @@ -16,6 +16,18 @@ public class CreateRequestCarTicketVo implements BaseVo, Serializable { |
| 16 | 16 | private static final long serialVersionUID = 1L; |
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | + * 草稿要车单ID | |
| 20 | + */ | |
| 21 | + @ApiModelProperty("草稿要车单ID") | |
| 22 | + private String draftId; | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * 订货单ID | |
| 26 | + */ | |
| 27 | + @ApiModelProperty("订货单ID") | |
| 28 | + private String purchaseOrderId; | |
| 29 | + | |
| 30 | + /** | |
| 19 | 31 | * 要车日期 |
| 20 | 32 | */ |
| 21 | 33 | @ApiModelProperty("要车日期") | ... | ... |
| 1 | +package com.lframework.xingyun.sc.vo.shipments.car; | |
| 2 | + | |
| 3 | +import com.lframework.starter.web.core.vo.BaseVo; | |
| 4 | +import com.lframework.starter.web.core.vo.PageVo; | |
| 5 | +import io.swagger.annotations.ApiModelProperty; | |
| 6 | +import lombok.Data; | |
| 7 | + | |
| 8 | +import java.io.Serializable; | |
| 9 | + | |
| 10 | +@Data | |
| 11 | +public class QueryDraftRequestCarTicketVo extends PageVo implements BaseVo, Serializable { | |
| 12 | + | |
| 13 | + private static final long serialVersionUID = 1L; | |
| 14 | + | |
| 15 | + /** | |
| 16 | + * 要车办事处名称 | |
| 17 | + */ | |
| 18 | + @ApiModelProperty("要车办事处名称") | |
| 19 | + private String deptName; | |
| 20 | + | |
| 21 | + /** | |
| 22 | + * 要车日期开始 | |
| 23 | + */ | |
| 24 | + @ApiModelProperty("要车日期开始") | |
| 25 | + private String requestCarDataStart; | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * 要车日期结束 | |
| 29 | + */ | |
| 30 | + @ApiModelProperty("要车日期结束") | |
| 31 | + private String requestCarDataEnd; | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 装货厂别 | |
| 35 | + */ | |
| 36 | + @ApiModelProperty("装货厂别") | |
| 37 | + private String workshopId; | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 订单编号 | |
| 41 | + */ | |
| 42 | + @ApiModelProperty("订单编号") | |
| 43 | + private String orderNo; | |
| 44 | + | |
| 45 | + /** | |
| 46 | + * 客户名称【简称】 | |
| 47 | + */ | |
| 48 | + @ApiModelProperty("客户名称【简称】") | |
| 49 | + private String customerShortName; | |
| 50 | + | |
| 51 | + | |
| 52 | + /** | |
| 53 | + * 状态 | |
| 54 | + */ | |
| 55 | + @ApiModelProperty("状态") | |
| 56 | + private String status; | |
| 57 | + | |
| 58 | +} | ... | ... |
| 1 | +package com.lframework.xingyun.sc.vo.shipments.car; | |
| 2 | + | |
| 3 | +import com.lframework.starter.web.core.components.validation.IsNumberPrecision; | |
| 4 | +import com.lframework.starter.web.core.components.validation.TypeMismatch; | |
| 5 | +import com.lframework.starter.web.core.vo.BaseVo; | |
| 6 | +import io.swagger.annotations.ApiModelProperty; | |
| 7 | +import lombok.Data; | |
| 8 | +import org.hibernate.validator.constraints.Length; | |
| 9 | + | |
| 10 | +import javax.validation.constraints.NotBlank; | |
| 11 | +import java.io.Serializable; | |
| 12 | +import java.math.BigDecimal; | |
| 13 | +import java.time.LocalDate; | |
| 14 | + | |
| 15 | +@Data | |
| 16 | +public class UpdateDraftRequestCarTicketVo implements BaseVo, Serializable { | |
| 17 | + | |
| 18 | + private static final long serialVersionUID = 1L; | |
| 19 | + | |
| 20 | + /** | |
| 21 | + * ID | |
| 22 | + */ | |
| 23 | + @ApiModelProperty(value = "ID", required = true) | |
| 24 | + @NotBlank(message = "id不能为空!") | |
| 25 | + private String id; | |
| 26 | + | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * 订货单ID | |
| 30 | + */ | |
| 31 | + @ApiModelProperty("订货单ID") | |
| 32 | + private String purchaseOrderId; | |
| 33 | + | |
| 34 | + /** | |
| 35 | + * 要车日期 | |
| 36 | + */ | |
| 37 | + @ApiModelProperty("要车日期") | |
| 38 | + @TypeMismatch(message = "要车日期格式有误!") | |
| 39 | + private LocalDate requestCarData; | |
| 40 | + | |
| 41 | + /** | |
| 42 | + * 要车办事处 | |
| 43 | + */ | |
| 44 | + @ApiModelProperty("要车办事处") | |
| 45 | + @Length(message = "要车办事处最多允许32个字符!") | |
| 46 | + private String deptId; | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 计划装货日期 | |
| 50 | + */ | |
| 51 | + @ApiModelProperty("计划装货日期") | |
| 52 | + @TypeMismatch(message = "计划装货日期格式有误!") | |
| 53 | + private LocalDate deliveryDate; | |
| 54 | + | |
| 55 | + /** | |
| 56 | + * 装货厂别 | |
| 57 | + */ | |
| 58 | + @ApiModelProperty("装货厂别") | |
| 59 | + @Length(message = "装货厂别最多允许32个字符!") | |
| 60 | + private String workshopId; | |
| 61 | + | |
| 62 | + /** | |
| 63 | + * 订单编号 | |
| 64 | + */ | |
| 65 | + @ApiModelProperty("订单编号") | |
| 66 | + @Length(message = "订单编号最多允许50个字符!") | |
| 67 | + private String orderNo; | |
| 68 | + | |
| 69 | + /** | |
| 70 | + * 客户名称【简称】 | |
| 71 | + */ | |
| 72 | + @ApiModelProperty("客户名称【简称】") | |
| 73 | + @Length(message = "客户名称【简称】最多允许100个字符!") | |
| 74 | + private String customerShortName; | |
| 75 | + | |
| 76 | + /** | |
| 77 | + * 卸货地点 | |
| 78 | + */ | |
| 79 | + @ApiModelProperty("卸货地点") | |
| 80 | + @Length(message = "卸货地点最多允许200个字符!") | |
| 81 | + private String destination; | |
| 82 | + | |
| 83 | + /** | |
| 84 | + * 计划吨位 | |
| 85 | + */ | |
| 86 | + @ApiModelProperty("计划吨位") | |
| 87 | + @TypeMismatch(message = "计划吨位格式有误!") | |
| 88 | + @IsNumberPrecision(message = "计划吨位最多允许4位小数!", value = 4) | |
| 89 | + private BigDecimal quantity; | |
| 90 | + | |
| 91 | + /** | |
| 92 | + * 接货人联络人 | |
| 93 | + */ | |
| 94 | + @ApiModelProperty("接货人联络人") | |
| 95 | + @Length(message = "接货人联络人最多允许50个字符!") | |
| 96 | + private String consignee; | |
| 97 | + | |
| 98 | + /** | |
| 99 | + * 联系电话 | |
| 100 | + */ | |
| 101 | + @ApiModelProperty("联系电话") | |
| 102 | + @Length(message = "联系电话最多允许50个字符!") | |
| 103 | + private String phone; | |
| 104 | + | |
| 105 | + /** | |
| 106 | + * 回货计划安排(退料/角料) | |
| 107 | + */ | |
| 108 | + @ApiModelProperty("回货计划安排(退料/角料)") | |
| 109 | + @Length(message = "回货计划安排(退料/角料)最多允许500个字符!") | |
| 110 | + private String returnPlanArrangement; | |
| 111 | + | |
| 112 | + /** | |
| 113 | + * 特殊需求、其他等 | |
| 114 | + */ | |
| 115 | + @ApiModelProperty("特殊需求、其他等") | |
| 116 | + @Length(message = "特殊需求、其他等最多允许500个字符!") | |
| 117 | + private String other; | |
| 118 | + | |
| 119 | + /** | |
| 120 | + * 外办审核人 | |
| 121 | + */ | |
| 122 | + @ApiModelProperty("外办审核人") | |
| 123 | + @Length(message = "外办审核人最多允许50个字符!") | |
| 124 | + private String externalAuditor; | |
| 125 | + | |
| 126 | + /** | |
| 127 | + * 装货时间 | |
| 128 | + */ | |
| 129 | + @ApiModelProperty("装货时间") | |
| 130 | + @Length(message = "装货时间最多允许20个字符!") | |
| 131 | + private String loadingTime; | |
| 132 | + | |
| 133 | + /** | |
| 134 | + * 装货特别要求/需求 | |
| 135 | + */ | |
| 136 | + @ApiModelProperty("装货特别要求/需求") | |
| 137 | + @Length(message = "装货特别要求/需求最多允许500个字符!") | |
| 138 | + private String specialLoadingRequirement; | |
| 139 | + | |
| 140 | + /** | |
| 141 | + * 经营办审核人 | |
| 142 | + */ | |
| 143 | + @ApiModelProperty("经营办审核人") | |
| 144 | + @Length(message = "经营办审核人最多允许50个字符!") | |
| 145 | + private String businessOfficeAuditor; | |
| 146 | + | |
| 147 | + /** | |
| 148 | + * 运作科审核人 | |
| 149 | + */ | |
| 150 | + @ApiModelProperty("运作科审核人") | |
| 151 | + @Length(message = "运作科审核人最多允许50个字符!") | |
| 152 | + private String operationsDepartmentAuditor; | |
| 153 | + | |
| 154 | + /** | |
| 155 | + * 审核状态 | |
| 156 | + */ | |
| 157 | + @ApiModelProperty("审核状态") | |
| 158 | + private String status; | |
| 159 | + | |
| 160 | +} | ... | ... |
| ... | ... | @@ -24,6 +24,18 @@ public class UpdateRequestCarTicketVo implements BaseVo, Serializable { |
| 24 | 24 | private String id; |
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | + * 草稿要车单ID | |
| 28 | + */ | |
| 29 | + @ApiModelProperty("草稿要车单ID") | |
| 30 | + private String draftId; | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 订货单ID | |
| 34 | + */ | |
| 35 | + @ApiModelProperty("订货单ID") | |
| 36 | + private String purchaseOrderId; | |
| 37 | + | |
| 38 | + /** | |
| 27 | 39 | * 要车日期 |
| 28 | 40 | */ |
| 29 | 41 | @ApiModelProperty("要车日期") | ... | ... |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.lframework.xingyun.sc.mappers.DraftRequestCarTicketMapper"> | |
| 4 | + | |
| 5 | + <resultMap id="DraftRequestCarTicket" type="com.lframework.xingyun.sc.entity.DraftRequestCarTicket"> | |
| 6 | + <id column="id" property="id"/> | |
| 7 | + <result column="purchase_order_id" property="purchaseOrderId"/> | |
| 8 | + <result column="request_car_data" property="requestCarData"/> | |
| 9 | + <result column="dept_id" property="deptId"/> | |
| 10 | + <result column="dept_name" property="deptName"/> | |
| 11 | + <result column="delivery_date" property="deliveryDate"/> | |
| 12 | + <result column="workshop_id" property="workshopId"/> | |
| 13 | + <result column="workshop_name" property="workshopName"/> | |
| 14 | + <result column="order_no" property="orderNo"/> | |
| 15 | + <result column="customer_short_name" property="customerShortName"/> | |
| 16 | + <result column="destination" property="destination"/> | |
| 17 | + <result column="quantity" property="quantity"/> | |
| 18 | + <result column="consignee" property="consignee"/> | |
| 19 | + <result column="phone" property="phone"/> | |
| 20 | + <result column="return_plan_arrangement" property="returnPlanArrangement"/> | |
| 21 | + <result column="other" property="other"/> | |
| 22 | + <result column="external_auditor" property="externalAuditor"/> | |
| 23 | + <result column="external_auditor_name" property="externalAuditorName"/> | |
| 24 | + <result column="loading_time" property="loadingTime"/> | |
| 25 | + <result column="special_loading_requirement" property="specialLoadingRequirement"/> | |
| 26 | + <result column="business_office_auditor" property="businessOfficeAuditor"/> | |
| 27 | + <result column="business_office_auditor_name" property="businessOfficeAuditorName"/> | |
| 28 | + <result column="operations_department_auditor" property="operationsDepartmentAuditor"/> | |
| 29 | + <result column="operations_department_auditor_name" property="operationsDepartmentAuditorName"/> | |
| 30 | + <result column="status" property="status"/> | |
| 31 | + <result column="create_by_id" property="createById"/> | |
| 32 | + <result column="create_by" property="createBy"/> | |
| 33 | + <result column="update_by_id" property="updateById"/> | |
| 34 | + <result column="update_by" property="updateBy"/> | |
| 35 | + <result column="create_time" property="createTime"/> | |
| 36 | + <result column="update_time" property="updateTime"/> | |
| 37 | + </resultMap> | |
| 38 | + | |
| 39 | + <sql id="DraftRequestCarTicket_sql"> | |
| 40 | + SELECT | |
| 41 | + tb.id, | |
| 42 | + tb.purchase_order_id, | |
| 43 | + tb.request_car_data, | |
| 44 | + tb.dept_id, | |
| 45 | + sd.name AS dept_name, | |
| 46 | + tb.delivery_date, | |
| 47 | + tb.workshop_id, | |
| 48 | + ws.name AS workshop_name, | |
| 49 | + tb.order_no, | |
| 50 | + tb.customer_short_name, | |
| 51 | + tb.destination, | |
| 52 | + tb.quantity, | |
| 53 | + tb.consignee, | |
| 54 | + tb.phone, | |
| 55 | + tb.return_plan_arrangement, | |
| 56 | + tb.other, | |
| 57 | + tb.external_auditor, | |
| 58 | + su.name AS external_auditor_name, | |
| 59 | + tb.loading_time, | |
| 60 | + tb.special_loading_requirement, | |
| 61 | + tb.business_office_auditor, | |
| 62 | + su1.name AS business_office_auditor_name, | |
| 63 | + tb.operations_department_auditor, | |
| 64 | + su2.name AS operations_department_auditor_name, | |
| 65 | + tb.status, | |
| 66 | + tb.create_by_id, | |
| 67 | + tb.create_by, | |
| 68 | + tb.update_by_id, | |
| 69 | + tb.update_by, | |
| 70 | + tb.create_time, | |
| 71 | + tb.update_time | |
| 72 | + FROM draft_request_car_ticket AS tb | |
| 73 | + left join sys_dept as sd on sd.id = tb.dept_id | |
| 74 | + left join base_data_workshop as ws on ws.id = tb.workshop_id | |
| 75 | + left join sys_user as su on su.id = tb.external_auditor | |
| 76 | + left join sys_user as su1 on su1.id = tb.business_office_auditor | |
| 77 | + left join sys_user as su2 on su2.id = tb.operations_department_auditor | |
| 78 | + </sql> | |
| 79 | + | |
| 80 | + <select id="query" resultMap="DraftRequestCarTicket"> | |
| 81 | + <include refid="DraftRequestCarTicket_sql"/> | |
| 82 | + <where> | |
| 83 | + <if test="vo.requestCarDataStart != null"> | |
| 84 | + AND tb.request_car_data >= #{vo.requestCarDataStart} | |
| 85 | + </if> | |
| 86 | + <if test="vo.requestCarDataEnd != null"> | |
| 87 | + <![CDATA[ | |
| 88 | + AND tb.request_car_data <= #{vo.requestCarDataEnd} | |
| 89 | + ]]> | |
| 90 | + </if> | |
| 91 | + <if test="vo.workshopId != null and vo.workshopId != ''"> | |
| 92 | + AND tb.workshop_id = #{vo.workshopId} | |
| 93 | + </if> | |
| 94 | + <if test="vo.orderNo != null and vo.orderNo != ''"> | |
| 95 | + AND tb.order_no LIKE CONCAT('%', #{vo.orderNo},'%') | |
| 96 | + </if> | |
| 97 | + <if test="vo.customerShortName != null and vo.customerShortName != ''"> | |
| 98 | + AND tb.customer_short_name LIKE CONCAT('%', #{vo.customerShortName},'%') | |
| 99 | + </if> | |
| 100 | + <if test="vo.deptName != null and vo.deptName != ''"> | |
| 101 | + AND sd.name LIKE CONCAT('%', #{vo.deptName},'%') | |
| 102 | + </if> | |
| 103 | + <if test="vo.status != null and vo.status != ''"> | |
| 104 | + AND tb.status = #{vo.status} | |
| 105 | + </if> | |
| 106 | + </where> | |
| 107 | + ORDER BY tb.update_time DESC | |
| 108 | + </select> | |
| 109 | + | |
| 110 | + <select id="findById" resultType="com.lframework.xingyun.sc.entity.DraftRequestCarTicket"> | |
| 111 | + <include refid="DraftRequestCarTicket_sql"/> | |
| 112 | + <where> | |
| 113 | + <if test="id != null and id != ''"> | |
| 114 | + AND tb.id = #{id} | |
| 115 | + </if> | |
| 116 | + </where> | |
| 117 | + </select> | |
| 118 | +</mapper> | ... | ... |
| ... | ... | @@ -4,6 +4,8 @@ |
| 4 | 4 | |
| 5 | 5 | <resultMap id="RequestCarTicket" type="com.lframework.xingyun.sc.entity.RequestCarTicket"> |
| 6 | 6 | <id column="id" property="id"/> |
| 7 | + <result column="draft_id" property="draftId"/> | |
| 8 | + <result column="purchase_order_id" property="purchaseOrderId"/> | |
| 7 | 9 | <result column="request_car_data" property="requestCarData"/> |
| 8 | 10 | <result column="dept_id" property="deptId"/> |
| 9 | 11 | <result column="dept_name" property="deptName"/> |
| ... | ... | @@ -38,6 +40,8 @@ |
| 38 | 40 | <sql id="RequestCarTicket_sql"> |
| 39 | 41 | SELECT |
| 40 | 42 | tb.id, |
| 43 | + tb.draft_id, | |
| 44 | + tb.purchase_order_id, | |
| 41 | 45 | tb.request_car_data, |
| 42 | 46 | tb.dept_id, |
| 43 | 47 | sd.name AS dept_name, | ... | ... |