Showing
18 changed files
with
1162 additions
and
5 deletions
| ... | ... | @@ -144,6 +144,13 @@ public class GetPurchaseOrderInfoBo extends BaseBo<PurchaseOrderInfo> { | 
| 144 | 144 | private String examineStatus; | 
| 145 | 145 | |
| 146 | 146 | /** | 
| 147 | + * 撤销状态 | |
| 148 | + */ | |
| 149 | + @ApiModelProperty("撤销状态") | |
| 150 | + private String revokeStatus; | |
| 151 | + | |
| 152 | + | |
| 153 | + /** | |
| 147 | 154 | * 生产工艺 | 
| 148 | 155 | */ | 
| 149 | 156 | @ApiModelProperty("生产工艺") | ... | ... | 
| ... | ... | @@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; | 
| 4 | 4 | import com.lframework.starter.common.constants.StringPool; | 
| 5 | 5 | import com.lframework.starter.web.core.bo.BaseBo; | 
| 6 | 6 | import java.time.LocalDate; | 
| 7 | +import java.util.List; | |
| 7 | 8 | import com.lframework.xingyun.sc.entity.PurchaseOrderRevoke; | 
| 8 | 9 | import io.swagger.annotations.ApiModelProperty; | 
| 9 | 10 | |
| ... | ... | @@ -49,6 +50,12 @@ public class GetPurchaseOrderRevokeBo extends BaseBo<PurchaseOrderRevoke> { | 
| 49 | 50 | private String orderingUnit; | 
| 50 | 51 | |
| 51 | 52 | /** | 
| 53 | + * 订货单位名称 | |
| 54 | + */ | |
| 55 | + @ApiModelProperty("订货单位名称") | |
| 56 | + private String orderingUnitName; | |
| 57 | + | |
| 58 | + /** | |
| 52 | 59 | * 原订货日期 | 
| 53 | 60 | */ | 
| 54 | 61 | @ApiModelProperty("原订货日期") | 
| ... | ... | @@ -99,6 +106,12 @@ public class GetPurchaseOrderRevokeBo extends BaseBo<PurchaseOrderRevoke> { | 
| 99 | 106 | @ApiModelProperty("创建人") | 
| 100 | 107 | private String createBy; | 
| 101 | 108 | |
| 109 | + /** | |
| 110 | + * 订货单撤销表物料行 | |
| 111 | + */ | |
| 112 | + @ApiModelProperty("订货单撤销表物料行") | |
| 113 | + private List<GetPurchaseOrderRevokeLineBo> getPurchaseOrderRevokeLineBoList; | |
| 114 | + | |
| 102 | 115 | public GetPurchaseOrderRevokeBo() { | 
| 103 | 116 | |
| 104 | 117 | } | ... | ... | 
xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/order/GetPurchaseOrderRevokeLineBo.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.bo.order; | |
| 2 | + | |
| 3 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
| 4 | +import java.math.BigDecimal; | |
| 5 | +import com.lframework.starter.common.constants.StringPool; | |
| 6 | +import com.lframework.starter.web.core.bo.BaseBo; | |
| 7 | +import java.time.LocalDate; | |
| 8 | +import com.lframework.xingyun.sc.entity.PurchaseOrderRevokeLine; | |
| 9 | +import io.swagger.annotations.ApiModelProperty; | |
| 10 | + | |
| 11 | +import lombok.Data; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * <p> | |
| 15 | + * 订货单撤销表物料行 GetBo | |
| 16 | + * </p> | |
| 17 | + * | |
| 18 | + */ | |
| 19 | +@Data | |
| 20 | +public class GetPurchaseOrderRevokeLineBo extends BaseBo<PurchaseOrderRevokeLine> { | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * ID | |
| 24 | + */ | |
| 25 | + @ApiModelProperty("ID") | |
| 26 | + private String id; | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * 订货单撤销主表ID | |
| 30 | + */ | |
| 31 | + @ApiModelProperty("订货单撤销主表ID") | |
| 32 | + private String purchaseOrderRevokeId; | |
| 33 | + | |
| 34 | + /** | |
| 35 | + * 订货单物料行ID | |
| 36 | + */ | |
| 37 | + @ApiModelProperty("订货单物料行ID") | |
| 38 | + private String purchaseOrderLineId; | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 行业 | |
| 42 | + */ | |
| 43 | + @ApiModelProperty("行业") | |
| 44 | + private String industry; | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 品质 | |
| 48 | + */ | |
| 49 | + @ApiModelProperty("品质") | |
| 50 | + private String quality; | |
| 51 | + | |
| 52 | + /** | |
| 53 | + * 牌号 | |
| 54 | + */ | |
| 55 | + @ApiModelProperty("牌号") | |
| 56 | + private String brand; | |
| 57 | + | |
| 58 | + /** | |
| 59 | + * 厚度 | |
| 60 | + */ | |
| 61 | + @ApiModelProperty("厚度") | |
| 62 | + private BigDecimal thickness; | |
| 63 | + | |
| 64 | + /** | |
| 65 | + * 厚度公差正 | |
| 66 | + */ | |
| 67 | + @ApiModelProperty("厚度公差正") | |
| 68 | + private BigDecimal thicknessTolPos; | |
| 69 | + | |
| 70 | + /** | |
| 71 | + * 厚度公差负 | |
| 72 | + */ | |
| 73 | + @ApiModelProperty("厚度公差负") | |
| 74 | + private BigDecimal thicknessTolNeg; | |
| 75 | + | |
| 76 | + /** | |
| 77 | + * 宽度 | |
| 78 | + */ | |
| 79 | + @ApiModelProperty("宽度") | |
| 80 | + private BigDecimal width; | |
| 81 | + | |
| 82 | + /** | |
| 83 | + * 宽度公差正 | |
| 84 | + */ | |
| 85 | + @ApiModelProperty("宽度公差正") | |
| 86 | + private BigDecimal widthTolPos; | |
| 87 | + | |
| 88 | + /** | |
| 89 | + * 宽度公差负 | |
| 90 | + */ | |
| 91 | + @ApiModelProperty("宽度公差负") | |
| 92 | + private BigDecimal widthTolNeg; | |
| 93 | + | |
| 94 | + /** | |
| 95 | + * 长度 | |
| 96 | + */ | |
| 97 | + @ApiModelProperty("长度") | |
| 98 | + private BigDecimal length; | |
| 99 | + | |
| 100 | + /** | |
| 101 | + * 长度公差正 | |
| 102 | + */ | |
| 103 | + @ApiModelProperty("长度公差正") | |
| 104 | + private BigDecimal lengthTolPos; | |
| 105 | + | |
| 106 | + /** | |
| 107 | + * 长度公差负 | |
| 108 | + */ | |
| 109 | + @ApiModelProperty("长度公差负") | |
| 110 | + private BigDecimal lengthTolNeg; | |
| 111 | + | |
| 112 | + /** | |
| 113 | + * 状态 | |
| 114 | + */ | |
| 115 | + @ApiModelProperty("状态") | |
| 116 | + private String status; | |
| 117 | + | |
| 118 | + /** | |
| 119 | + * 原数量kg | |
| 120 | + */ | |
| 121 | + @ApiModelProperty("原数量kg") | |
| 122 | + private BigDecimal quantity; | |
| 123 | + | |
| 124 | + /** | |
| 125 | + * 销售价格 | |
| 126 | + */ | |
| 127 | + @ApiModelProperty("销售价格") | |
| 128 | + private BigDecimal salesPrice; | |
| 129 | + | |
| 130 | + /** | |
| 131 | + * 发货日期 | |
| 132 | + */ | |
| 133 | + @ApiModelProperty("发货日期") | |
| 134 | + @JsonFormat(pattern = StringPool.DATE_PATTERN) | |
| 135 | + private LocalDate deliveryDate; | |
| 136 | + | |
| 137 | + /** | |
| 138 | + * 撤销数量kg | |
| 139 | + */ | |
| 140 | + @ApiModelProperty("撤销数量kg") | |
| 141 | + private BigDecimal revokeQuantity; | |
| 142 | + | |
| 143 | + /** | |
| 144 | + * 排序 | |
| 145 | + */ | |
| 146 | + @ApiModelProperty("排序") | |
| 147 | + private Integer showOrder; | |
| 148 | + | |
| 149 | + public GetPurchaseOrderRevokeLineBo() { | |
| 150 | + | |
| 151 | + } | |
| 152 | + | |
| 153 | + public GetPurchaseOrderRevokeLineBo(PurchaseOrderRevokeLine dto) { | |
| 154 | + | |
| 155 | + super(dto); | |
| 156 | + } | |
| 157 | + | |
| 158 | + @Override | |
| 159 | + public BaseBo<PurchaseOrderRevokeLine> convert(PurchaseOrderRevokeLine dto) { | |
| 160 | + return super.convert(dto); | |
| 161 | + } | |
| 162 | + | |
| 163 | + @Override | |
| 164 | + protected void afterInit(PurchaseOrderRevokeLine dto) { | |
| 165 | + | |
| 166 | + } | |
| 167 | +} | ... | ... | 
| 1 | 1 | package com.lframework.xingyun.sc.controller.order; | 
| 2 | 2 | |
| 3 | +import com.lframework.starter.common.utils.StringUtil; | |
| 3 | 4 | import com.lframework.starter.web.core.annotations.security.HasPermission; | 
| 4 | 5 | import com.lframework.starter.web.core.controller.DefaultBaseController; | 
| 5 | 6 | import com.lframework.starter.web.core.utils.PageResultUtil; | 
| 6 | 7 | import com.lframework.starter.web.core.components.resp.PageResult; | 
| 7 | 8 | import com.lframework.starter.web.core.components.resp.InvokeResult; | 
| 9 | +import javax.annotation.Resource; | |
| 8 | 10 | import javax.validation.constraints.NotBlank; | 
| 9 | 11 | import com.lframework.xingyun.sc.bo.order.GetPurchaseOrderRevokeBo; | 
| 10 | -import com.lframework.xingyun.sc.entity.PurchaseOrderRevoke; | |
| 12 | +import com.lframework.xingyun.sc.bo.order.GetPurchaseOrderRevokeLineBo; | |
| 13 | +import com.lframework.xingyun.sc.entity.*; | |
| 14 | +import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; | |
| 15 | +import com.lframework.xingyun.sc.service.order.PurchaseOrderLineService; | |
| 11 | 16 | import com.lframework.xingyun.sc.service.order.PurchaseOrderRevokeService; | 
| 12 | 17 | import com.lframework.xingyun.sc.vo.order.CreatePurchaseOrderRevokeVo; | 
| 18 | +import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderLineVo; | |
| 13 | 19 | import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderRevokeVo; | 
| 14 | 20 | import com.lframework.xingyun.sc.vo.order.UpdatePurchaseOrderRevokeVo; | 
| 15 | 21 | import io.swagger.annotations.ApiImplicitParam; | 
| ... | ... | @@ -24,6 +30,7 @@ import org.springframework.validation.annotation.Validated; | 
| 24 | 30 | import org.springframework.web.bind.annotation.*; | 
| 25 | 31 | |
| 26 | 32 | import javax.validation.Valid; | 
| 33 | +import java.util.ArrayList; | |
| 27 | 34 | import java.util.List; | 
| 28 | 35 | import java.util.stream.Collectors; | 
| 29 | 36 | |
| ... | ... | @@ -39,6 +46,10 @@ public class PurchaseOrderRevokeController extends DefaultBaseController { | 
| 39 | 46 | |
| 40 | 47 | @Autowired | 
| 41 | 48 | private PurchaseOrderRevokeService purchaseOrderRevokeService; | 
| 49 | + @Resource | |
| 50 | + private PurchaseOrderInfoService purchaseOrderInfoService; | |
| 51 | + @Resource | |
| 52 | + private PurchaseOrderLineService purchaseOrderLineService; | |
| 42 | 53 | |
| 43 | 54 | /** | 
| 44 | 55 | * 查询列表 | 
| ... | ... | @@ -66,7 +77,7 @@ public class PurchaseOrderRevokeController extends DefaultBaseController { | 
| 66 | 77 | @ApiOperation("根据ID查询") | 
| 67 | 78 | @ApiImplicitParam(value = "id", name = "id", paramType = "query", required = true) | 
| 68 | 79 | @HasPermission({"purchaseOrderRevoke:purchaseorderrevoke:query"}) | 
| 69 | - @GetMapping | |
| 80 | + @GetMapping("/get") | |
| 70 | 81 | public InvokeResult<GetPurchaseOrderRevokeBo> get(@NotBlank(message = "id不能为空!") String id) { | 
| 71 | 82 | |
| 72 | 83 | PurchaseOrderRevoke data = purchaseOrderRevokeService.findById(id); | 
| ... | ... | @@ -80,11 +91,29 @@ public class PurchaseOrderRevokeController extends DefaultBaseController { | 
| 80 | 91 | } | 
| 81 | 92 | |
| 82 | 93 | /** | 
| 94 | + * 根据订货单ID查询 | |
| 95 | + */ | |
| 96 | + @ApiOperation("根据ID查询") | |
| 97 | + @ApiImplicitParam(value = "id", name = "id", paramType = "query", required = true) | |
| 98 | + @HasPermission({"purchaseOrderRevoke:purchaseorderrevoke:query"}) | |
| 99 | + @GetMapping("/getByPurchaseOrderId") | |
| 100 | + public InvokeResult<GetPurchaseOrderRevokeBo> getByPurchaseOrderId(@NotBlank(message = "id不能为空!") String id) { | |
| 101 | + | |
| 102 | + PurchaseOrderInfo data = purchaseOrderInfoService.findById(id); | |
| 103 | + if (data == null) { | |
| 104 | + throw new DefaultClientException("订货单表不存在!"); | |
| 105 | + } | |
| 106 | + //封装数据 | |
| 107 | + GetPurchaseOrderRevokeBo getPurchaseOrderRevokeBo = packPurchaseOrderRevokeData(data); | |
| 108 | + | |
| 109 | + return InvokeResultBuilder.success(getPurchaseOrderRevokeBo); | |
| 110 | + } | |
| 111 | + /** | |
| 83 | 112 | * 新增 | 
| 84 | 113 | */ | 
| 85 | 114 | @ApiOperation("新增") | 
| 86 | 115 | @HasPermission({"purchaseOrderRevoke:purchaseorderrevoke:add"}) | 
| 87 | - @PostMapping | |
| 116 | + @PostMapping("/create") | |
| 88 | 117 | public InvokeResult<Void> create(@Valid CreatePurchaseOrderRevokeVo vo) { | 
| 89 | 118 | |
| 90 | 119 | purchaseOrderRevokeService.create(vo); | 
| ... | ... | @@ -97,7 +126,7 @@ public class PurchaseOrderRevokeController extends DefaultBaseController { | 
| 97 | 126 | */ | 
| 98 | 127 | @ApiOperation("修改") | 
| 99 | 128 | @HasPermission({"purchaseOrderRevoke:purchaseorderrevoke:modify"}) | 
| 100 | - @PutMapping | |
| 129 | + @PutMapping("/update") | |
| 101 | 130 | public InvokeResult<Void> update(@Valid UpdatePurchaseOrderRevokeVo vo) { | 
| 102 | 131 | |
| 103 | 132 | purchaseOrderRevokeService.update(vo); | 
| ... | ... | @@ -111,11 +140,66 @@ public class PurchaseOrderRevokeController extends DefaultBaseController { | 
| 111 | 140 | @ApiOperation("根据ID删除") | 
| 112 | 141 | @ApiImplicitParam(value = "id", name = "id", paramType = "query", required = true) | 
| 113 | 142 | @HasPermission({"purchaseOrderRevoke:purchaseorderrevoke:delete"}) | 
| 114 | - @DeleteMapping | |
| 143 | + @DeleteMapping("/deleteById") | |
| 115 | 144 | public InvokeResult<Void> deleteById(@NotBlank(message = "id不能为空!") String id) { | 
| 116 | 145 | |
| 117 | 146 | purchaseOrderRevokeService.deleteById(id); | 
| 118 | 147 | |
| 119 | 148 | return InvokeResultBuilder.success(); | 
| 120 | 149 | } | 
| 150 | + | |
| 151 | + /** | |
| 152 | + * 封装订货单撤销数据 | |
| 153 | + * | |
| 154 | + * @param purchaseOrderInfo 数据实体 | |
| 155 | + * @return GetPurchaseOrderRevokeBo | |
| 156 | + */ | |
| 157 | + private GetPurchaseOrderRevokeBo packPurchaseOrderRevokeData(PurchaseOrderInfo purchaseOrderInfo) { | |
| 158 | + GetPurchaseOrderRevokeBo data = new GetPurchaseOrderRevokeBo(); | |
| 159 | + if (StringUtil.isNotEmpty(purchaseOrderInfo.getId())) { | |
| 160 | + data.setPurchaseOrderId(purchaseOrderInfo.getId()); | |
| 161 | + } | |
| 162 | + if (StringUtil.isNotEmpty(purchaseOrderInfo.getOrderNo())) { | |
| 163 | + data.setOrderNo(purchaseOrderInfo.getOrderNo()); | |
| 164 | + } | |
| 165 | + if (StringUtil.isNotEmpty(purchaseOrderInfo.getOrderingUnit())) { | |
| 166 | + data.setOrderingUnit(purchaseOrderInfo.getOrderingUnit()); | |
| 167 | + } | |
| 168 | + if (StringUtil.isNotEmpty(purchaseOrderInfo.getOrderingUnitName())) { | |
| 169 | + data.setOrderingUnitName(purchaseOrderInfo.getOrderingUnitName()); | |
| 170 | + } | |
| 171 | + if (purchaseOrderInfo.getOrderDate() != null) { | |
| 172 | + data.setOrderDate(purchaseOrderInfo.getOrderDate()); | |
| 173 | + } | |
| 174 | + QueryPurchaseOrderLineVo vo = new QueryPurchaseOrderLineVo(); | |
| 175 | + vo.setPurchaseOrderId(purchaseOrderInfo.getId()); | |
| 176 | + List<PurchaseOrderLine> purchaseOrderLineList = purchaseOrderLineService.query(vo); | |
| 177 | + if (CollectionUtil.isNotEmpty(purchaseOrderLineList)) { | |
| 178 | + List<GetPurchaseOrderRevokeLineBo> revokeLineBoList = new ArrayList<>(purchaseOrderLineList.size()); | |
| 179 | + for (PurchaseOrderLine purchaseOrderLine : purchaseOrderLineList) { | |
| 180 | + GetPurchaseOrderRevokeLineBo bo = new GetPurchaseOrderRevokeLineBo(); | |
| 181 | + bo.setPurchaseOrderLineId(purchaseOrderLine.getId()); | |
| 182 | + bo.setIndustry(purchaseOrderLine.getIndustry()); | |
| 183 | + bo.setQuality(purchaseOrderLine.getQuality()); | |
| 184 | + bo.setBrand(purchaseOrderLine.getBrand()); | |
| 185 | + bo.setThickness(purchaseOrderLine.getThickness()); | |
| 186 | + bo.setThicknessTolPos(purchaseOrderLine.getThicknessTolPos()); | |
| 187 | + bo.setThicknessTolNeg(purchaseOrderLine.getThicknessTolNeg()); | |
| 188 | + bo.setWidth(purchaseOrderLine.getWidth()); | |
| 189 | + bo.setWidthTolPos(purchaseOrderLine.getWidthTolPos()); | |
| 190 | + bo.setWidthTolNeg(purchaseOrderLine.getWidthTolNeg()); | |
| 191 | + bo.setLength(purchaseOrderLine.getLength()); | |
| 192 | + bo.setLengthTolPos(purchaseOrderLine.getLengthTolPos()); | |
| 193 | + bo.setLengthTolNeg(purchaseOrderLine.getLengthTolNeg()); | |
| 194 | + bo.setQuantity(purchaseOrderLine.getQuantity()); | |
| 195 | + bo.setSalesPrice(purchaseOrderLine.getSalesPrice()); | |
| 196 | + bo.setDeliveryDate(purchaseOrderLine.getDeliveryDate()); | |
| 197 | + bo.setShowOrder(purchaseOrderLine.getShowOrder()); | |
| 198 | + revokeLineBoList.add(bo); | |
| 199 | + } | |
| 200 | + data.setGetPurchaseOrderRevokeLineBoList(revokeLineBoList); | |
| 201 | + } | |
| 202 | + | |
| 203 | + return data; | |
| 204 | + } | |
| 121 | 205 | } | ... | ... | 
| 1 | +package com.lframework.xingyun.sc.controller.order; | |
| 2 | + | |
| 3 | +import com.lframework.starter.web.core.annotations.security.HasPermission; | |
| 4 | +import com.lframework.starter.web.core.controller.DefaultBaseController; | |
| 5 | +import com.lframework.starter.web.core.utils.PageResultUtil; | |
| 6 | +import com.lframework.starter.web.core.components.resp.PageResult; | |
| 7 | +import com.lframework.starter.web.core.components.resp.InvokeResult; | |
| 8 | +import javax.validation.constraints.NotBlank; | |
| 9 | +import com.lframework.xingyun.sc.bo.order.GetPurchaseOrderRevokeLineBo; | |
| 10 | +import com.lframework.xingyun.sc.entity.PurchaseOrderRevokeLine; | |
| 11 | +import com.lframework.xingyun.sc.service.order.PurchaseOrderRevokeLineService; | |
| 12 | +import com.lframework.xingyun.sc.vo.order.CreatePurchaseOrderRevokeLineVo; | |
| 13 | +import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderRevokeLineVo; | |
| 14 | +import com.lframework.xingyun.sc.vo.order.UpdatePurchaseOrderRevokeLineVo; | |
| 15 | +import io.swagger.annotations.ApiImplicitParam; | |
| 16 | +import com.lframework.starter.web.core.components.resp.InvokeResultBuilder; | |
| 17 | +import com.lframework.starter.common.exceptions.impl.DefaultClientException; | |
| 18 | +import io.swagger.annotations.ApiOperation; | |
| 19 | +import com.lframework.starter.common.utils.CollectionUtil; | |
| 20 | +import io.swagger.annotations.Api; | |
| 21 | +import org.springframework.web.bind.annotation.DeleteMapping; | |
| 22 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 23 | +import org.springframework.validation.annotation.Validated; | |
| 24 | +import org.springframework.web.bind.annotation.*; | |
| 25 | + | |
| 26 | +import javax.validation.Valid; | |
| 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("/purchaseOrderRevokeLine") | |
| 38 | +public class PurchaseOrderRevokeLineController extends DefaultBaseController { | |
| 39 | + | |
| 40 | + @Autowired | |
| 41 | + private PurchaseOrderRevokeLineService purchaseOrderRevokeLineService; | |
| 42 | + | |
| 43 | + /** | |
| 44 | + * 查询列表 | |
| 45 | + */ | |
| 46 | + @ApiOperation("查询列表") | |
| 47 | + @HasPermission({"purchaseOrderRevokeLine:purchaseorderrevokeline:query"}) | |
| 48 | + @GetMapping("/query") | |
| 49 | + public InvokeResult<PageResult<GetPurchaseOrderRevokeLineBo>> query(@Valid QueryPurchaseOrderRevokeLineVo vo) { | |
| 50 | + | |
| 51 | + PageResult<PurchaseOrderRevokeLine> pageResult = purchaseOrderRevokeLineService.query(getPageIndex(vo), getPageSize(vo), vo); | |
| 52 | + | |
| 53 | + List<PurchaseOrderRevokeLine> datas = pageResult.getDatas(); | |
| 54 | + List<GetPurchaseOrderRevokeLineBo> results = null; | |
| 55 | + | |
| 56 | + if (!CollectionUtil.isEmpty(datas)) { | |
| 57 | + results = datas.stream().map(GetPurchaseOrderRevokeLineBo::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({"purchaseOrderRevokeLine:purchaseorderrevokeline:query"}) | |
| 69 | + @GetMapping | |
| 70 | + public InvokeResult<GetPurchaseOrderRevokeLineBo> get(@NotBlank(message = "id不能为空!") String id) { | |
| 71 | + | |
| 72 | + PurchaseOrderRevokeLine data = purchaseOrderRevokeLineService.findById(id); | |
| 73 | + if (data == null) { | |
| 74 | + throw new DefaultClientException("订货单撤销表物料行不存在!"); | |
| 75 | + } | |
| 76 | + | |
| 77 | + GetPurchaseOrderRevokeLineBo result = new GetPurchaseOrderRevokeLineBo(data); | |
| 78 | + | |
| 79 | + return InvokeResultBuilder.success(result); | |
| 80 | + } | |
| 81 | + | |
| 82 | + /** | |
| 83 | + * 新增 | |
| 84 | + */ | |
| 85 | + @ApiOperation("新增") | |
| 86 | + @HasPermission({"purchaseOrderRevokeLine:purchaseorderrevokeline:add"}) | |
| 87 | + @PostMapping | |
| 88 | + public InvokeResult<Void> create(@Valid CreatePurchaseOrderRevokeLineVo vo) { | |
| 89 | + | |
| 90 | + purchaseOrderRevokeLineService.create(vo); | |
| 91 | + | |
| 92 | + return InvokeResultBuilder.success(); | |
| 93 | + } | |
| 94 | + | |
| 95 | + /** | |
| 96 | + * 修改 | |
| 97 | + */ | |
| 98 | + @ApiOperation("修改") | |
| 99 | + @HasPermission({"purchaseOrderRevokeLine:purchaseorderrevokeline:modify"}) | |
| 100 | + @PutMapping | |
| 101 | + public InvokeResult<Void> update(@Valid UpdatePurchaseOrderRevokeLineVo vo) { | |
| 102 | + | |
| 103 | + purchaseOrderRevokeLineService.update(vo); | |
| 104 | + | |
| 105 | + return InvokeResultBuilder.success(); | |
| 106 | + } | |
| 107 | + | |
| 108 | + /** | |
| 109 | + * 根据ID删除 | |
| 110 | + */ | |
| 111 | + @ApiOperation("根据ID删除") | |
| 112 | + @ApiImplicitParam(value = "id", name = "id", paramType = "query", required = true) | |
| 113 | + @HasPermission({"purchaseOrderRevokeLine:purchaseorderrevokeline:delete"}) | |
| 114 | + @DeleteMapping | |
| 115 | + public InvokeResult<Void> deleteById(@NotBlank(message = "id不能为空!") String id) { | |
| 116 | + | |
| 117 | + purchaseOrderRevokeLineService.deleteById(id); | |
| 118 | + | |
| 119 | + return InvokeResultBuilder.success(); | |
| 120 | + } | |
| 121 | +} | ... | ... | 
| ... | ... | @@ -131,6 +131,11 @@ public class PurchaseOrderInfo extends BaseEntity implements BaseDto { | 
| 131 | 131 | private String examineStatus; | 
| 132 | 132 | |
| 133 | 133 | /** | 
| 134 | + * 撤销状态 | |
| 135 | + */ | |
| 136 | + private String revokeStatus; | |
| 137 | + | |
| 138 | + /** | |
| 134 | 139 | * 生产工艺 | 
| 135 | 140 | */ | 
| 136 | 141 | private String productionProcess; | ... | ... | 
| 1 | +package com.lframework.xingyun.sc.entity; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 4 | +import java.math.BigDecimal; | |
| 5 | +import com.lframework.starter.web.core.dto.BaseDto; | |
| 6 | +import java.time.LocalDate; | |
| 7 | +import java.time.LocalDateTime; | |
| 8 | +import com.baomidou.mybatisplus.annotation.FieldFill; | |
| 9 | +import com.lframework.starter.web.core.entity.BaseEntity; | |
| 10 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 11 | +import lombok.Data; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * <p> | |
| 15 | + * 订货单撤销表物料行 | |
| 16 | + * </p> | |
| 17 | + * | |
| 18 | + */ | |
| 19 | +@Data | |
| 20 | +@TableName("tbl_purchase_order_revoke_line") | |
| 21 | +public class PurchaseOrderRevokeLine extends BaseEntity implements BaseDto { | |
| 22 | + | |
| 23 | + private static final long serialVersionUID = 1L; | |
| 24 | + | |
| 25 | + public static final String CACHE_NAME = "PurchaseOrderRevokeLine"; | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * ID | |
| 29 | + */ | |
| 30 | + private String id; | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 订货单撤销主表ID | |
| 34 | + */ | |
| 35 | + private String purchaseOrderRevokeId; | |
| 36 | + | |
| 37 | + /** | |
| 38 | + * 订货单物料行ID | |
| 39 | + */ | |
| 40 | + private String purchaseOrderLineId; | |
| 41 | + | |
| 42 | + /** | |
| 43 | + * 行业 | |
| 44 | + */ | |
| 45 | + private String industry; | |
| 46 | + | |
| 47 | + /** | |
| 48 | + * 品质 | |
| 49 | + */ | |
| 50 | + private String quality; | |
| 51 | + | |
| 52 | + /** | |
| 53 | + * 牌号 | |
| 54 | + */ | |
| 55 | + private String brand; | |
| 56 | + | |
| 57 | + /** | |
| 58 | + * 厚度 | |
| 59 | + */ | |
| 60 | + private BigDecimal thickness; | |
| 61 | + | |
| 62 | + /** | |
| 63 | + * 厚度公差正 | |
| 64 | + */ | |
| 65 | + private BigDecimal thicknessTolPos; | |
| 66 | + | |
| 67 | + /** | |
| 68 | + * 厚度公差负 | |
| 69 | + */ | |
| 70 | + private BigDecimal thicknessTolNeg; | |
| 71 | + | |
| 72 | + /** | |
| 73 | + * 宽度 | |
| 74 | + */ | |
| 75 | + private BigDecimal width; | |
| 76 | + | |
| 77 | + /** | |
| 78 | + * 宽度公差正 | |
| 79 | + */ | |
| 80 | + private BigDecimal widthTolPos; | |
| 81 | + | |
| 82 | + /** | |
| 83 | + * 宽度公差负 | |
| 84 | + */ | |
| 85 | + private BigDecimal widthTolNeg; | |
| 86 | + | |
| 87 | + /** | |
| 88 | + * 长度 | |
| 89 | + */ | |
| 90 | + private BigDecimal length; | |
| 91 | + | |
| 92 | + /** | |
| 93 | + * 长度公差正 | |
| 94 | + */ | |
| 95 | + private BigDecimal lengthTolPos; | |
| 96 | + | |
| 97 | + /** | |
| 98 | + * 长度公差负 | |
| 99 | + */ | |
| 100 | + private BigDecimal lengthTolNeg; | |
| 101 | + | |
| 102 | + /** | |
| 103 | + * 状态 | |
| 104 | + */ | |
| 105 | + private String status; | |
| 106 | + | |
| 107 | + /** | |
| 108 | + * 原数量kg | |
| 109 | + */ | |
| 110 | + private BigDecimal quantity; | |
| 111 | + | |
| 112 | + /** | |
| 113 | + * 销售价格 | |
| 114 | + */ | |
| 115 | + private BigDecimal salesPrice; | |
| 116 | + | |
| 117 | + /** | |
| 118 | + * 发货日期 | |
| 119 | + */ | |
| 120 | + private LocalDate deliveryDate; | |
| 121 | + | |
| 122 | + /** | |
| 123 | + * 撤销数量kg | |
| 124 | + */ | |
| 125 | + private BigDecimal revokeQuantity; | |
| 126 | + | |
| 127 | + /** | |
| 128 | + * 排序 | |
| 129 | + */ | |
| 130 | + private Integer showOrder; | |
| 131 | + | |
| 132 | + /** | |
| 133 | + * 创建人ID | |
| 134 | + */ | |
| 135 | + @TableField(fill = FieldFill.INSERT) | |
| 136 | + private String createById; | |
| 137 | + | |
| 138 | + /** | |
| 139 | + * 创建人 | |
| 140 | + */ | |
| 141 | + @TableField(fill = FieldFill.INSERT) | |
| 142 | + private String createBy; | |
| 143 | + | |
| 144 | + /** | |
| 145 | + * 更新人ID | |
| 146 | + */ | |
| 147 | + @TableField(fill = FieldFill.INSERT_UPDATE) | |
| 148 | + private String updateById; | |
| 149 | + | |
| 150 | + /** | |
| 151 | + * 更新人 | |
| 152 | + */ | |
| 153 | + @TableField(fill = FieldFill.INSERT_UPDATE) | |
| 154 | + private String updateBy; | |
| 155 | + | |
| 156 | + /** | |
| 157 | + * 创建时间 | |
| 158 | + */ | |
| 159 | + @TableField(fill = FieldFill.INSERT) | |
| 160 | + private LocalDateTime createTime; | |
| 161 | + | |
| 162 | + /** | |
| 163 | + * 更新时间 | |
| 164 | + */ | |
| 165 | + @TableField(fill = FieldFill.INSERT_UPDATE) | |
| 166 | + private LocalDateTime updateTime; | |
| 167 | + | |
| 168 | +} | ... | ... | 
| 1 | +package com.lframework.xingyun.sc.impl.order; | |
| 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.web.core.impl.BaseMpServiceImpl; | |
| 7 | +import com.lframework.starter.web.core.utils.PageResultUtil; | |
| 8 | +import com.lframework.starter.web.core.components.resp.PageResult; | |
| 9 | +import com.lframework.starter.web.core.utils.OpLogUtil; | |
| 10 | +import com.lframework.starter.common.utils.StringUtil; | |
| 11 | +import com.lframework.starter.common.exceptions.impl.DefaultClientException; | |
| 12 | +import java.io.Serializable; | |
| 13 | +import com.lframework.starter.web.core.utils.IdUtil; | |
| 14 | +import com.lframework.starter.common.utils.ObjectUtil; | |
| 15 | +import com.lframework.starter.web.core.annotations.oplog.OpLog; | |
| 16 | +import com.lframework.starter.web.core.utils.PageHelperUtil; | |
| 17 | +import com.lframework.starter.common.utils.Assert; | |
| 18 | +import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; | |
| 19 | +import com.lframework.xingyun.sc.entity.PurchaseOrderRevokeLine; | |
| 20 | +import com.lframework.xingyun.sc.mappers.PurchaseOrderRevokeLineMapper; | |
| 21 | +import com.lframework.xingyun.sc.service.order.PurchaseOrderRevokeLineService; | |
| 22 | +import com.lframework.xingyun.sc.vo.order.CreatePurchaseOrderRevokeLineVo; | |
| 23 | +import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderRevokeLineVo; | |
| 24 | +import com.lframework.xingyun.sc.vo.order.UpdatePurchaseOrderRevokeLineVo; | |
| 25 | +import org.springframework.transaction.annotation.Transactional; | |
| 26 | +import org.springframework.stereotype.Service; | |
| 27 | + | |
| 28 | +import java.util.List; | |
| 29 | + | |
| 30 | +@Service | |
| 31 | +public class PurchaseOrderRevokeLineServiceImpl extends BaseMpServiceImpl<PurchaseOrderRevokeLineMapper, PurchaseOrderRevokeLine> implements PurchaseOrderRevokeLineService { | |
| 32 | + | |
| 33 | + @Override | |
| 34 | + public PageResult<PurchaseOrderRevokeLine> query(Integer pageIndex, Integer pageSize, QueryPurchaseOrderRevokeLineVo vo) { | |
| 35 | + | |
| 36 | + Assert.greaterThanZero(pageIndex); | |
| 37 | + Assert.greaterThanZero(pageSize); | |
| 38 | + | |
| 39 | + PageHelperUtil.startPage(pageIndex, pageSize); | |
| 40 | + List<PurchaseOrderRevokeLine> datas = this.query(vo); | |
| 41 | + | |
| 42 | + return PageResultUtil.convert(new PageInfo<>(datas)); | |
| 43 | + } | |
| 44 | + | |
| 45 | + @Override | |
| 46 | + public List<PurchaseOrderRevokeLine> query(QueryPurchaseOrderRevokeLineVo vo) { | |
| 47 | + | |
| 48 | + return getBaseMapper().query(vo); | |
| 49 | + } | |
| 50 | + | |
| 51 | + @Override | |
| 52 | + public PurchaseOrderRevokeLine findById(String id) { | |
| 53 | + | |
| 54 | + return getBaseMapper().selectById(id); | |
| 55 | + } | |
| 56 | + | |
| 57 | + @OpLog(type = OtherOpLogType.class, name = "新增订货单撤销表物料行,ID:{}", params = {"#id"}) | |
| 58 | + @Transactional(rollbackFor = Exception.class) | |
| 59 | + @Override | |
| 60 | + public String create(CreatePurchaseOrderRevokeLineVo vo) { | |
| 61 | + | |
| 62 | + PurchaseOrderRevokeLine data = new PurchaseOrderRevokeLine(); | |
| 63 | + data.setId(IdUtil.getId()); | |
| 64 | + data.setPurchaseOrderRevokeId(vo.getPurchaseOrderRevokeId()); | |
| 65 | + data.setPurchaseOrderLineId(vo.getPurchaseOrderLineId()); | |
| 66 | + if (!StringUtil.isBlank(vo.getIndustry())) { | |
| 67 | + data.setIndustry(vo.getIndustry()); | |
| 68 | + } | |
| 69 | + if (!StringUtil.isBlank(vo.getQuality())) { | |
| 70 | + data.setQuality(vo.getQuality()); | |
| 71 | + } | |
| 72 | + if (!StringUtil.isBlank(vo.getBrand())) { | |
| 73 | + data.setBrand(vo.getBrand()); | |
| 74 | + } | |
| 75 | + if (vo.getThickness() != null) { | |
| 76 | + data.setThickness(vo.getThickness()); | |
| 77 | + } | |
| 78 | + if (vo.getThicknessTolPos() != null) { | |
| 79 | + data.setThicknessTolPos(vo.getThicknessTolPos()); | |
| 80 | + } | |
| 81 | + if (vo.getThicknessTolNeg() != null) { | |
| 82 | + data.setThicknessTolNeg(vo.getThicknessTolNeg()); | |
| 83 | + } | |
| 84 | + if (vo.getWidth() != null) { | |
| 85 | + data.setWidth(vo.getWidth()); | |
| 86 | + } | |
| 87 | + if (vo.getWidthTolPos() != null) { | |
| 88 | + data.setWidthTolPos(vo.getWidthTolPos()); | |
| 89 | + } | |
| 90 | + if (vo.getWidthTolNeg() != null) { | |
| 91 | + data.setWidthTolNeg(vo.getWidthTolNeg()); | |
| 92 | + } | |
| 93 | + if (vo.getLength() != null) { | |
| 94 | + data.setLength(vo.getLength()); | |
| 95 | + } | |
| 96 | + if (vo.getLengthTolPos() != null) { | |
| 97 | + data.setLengthTolPos(vo.getLengthTolPos()); | |
| 98 | + } | |
| 99 | + if (vo.getLengthTolNeg() != null) { | |
| 100 | + data.setLengthTolNeg(vo.getLengthTolNeg()); | |
| 101 | + } | |
| 102 | + if (!StringUtil.isBlank(vo.getStatus())) { | |
| 103 | + data.setStatus(vo.getStatus()); | |
| 104 | + } | |
| 105 | + if (vo.getQuantity() != null) { | |
| 106 | + data.setQuantity(vo.getQuantity()); | |
| 107 | + } | |
| 108 | + if (vo.getSalesPrice() != null) { | |
| 109 | + data.setSalesPrice(vo.getSalesPrice()); | |
| 110 | + } | |
| 111 | + if (vo.getDeliveryDate() != null) { | |
| 112 | + data.setDeliveryDate(vo.getDeliveryDate()); | |
| 113 | + } | |
| 114 | + if (vo.getRevokeQuantity() != null) { | |
| 115 | + data.setRevokeQuantity(vo.getRevokeQuantity()); | |
| 116 | + } | |
| 117 | + if (vo.getShowOrder() != null) { | |
| 118 | + data.setShowOrder(vo.getShowOrder()); | |
| 119 | + } | |
| 120 | + | |
| 121 | + getBaseMapper().insert(data); | |
| 122 | + | |
| 123 | + OpLogUtil.setVariable("id", data.getId()); | |
| 124 | + OpLogUtil.setExtra(vo); | |
| 125 | + | |
| 126 | + return data.getId(); | |
| 127 | + } | |
| 128 | + | |
| 129 | + @OpLog(type = OtherOpLogType.class, name = "修改订货单撤销表物料行,ID:{}", params = {"#id"}) | |
| 130 | + @Transactional(rollbackFor = Exception.class) | |
| 131 | + @Override | |
| 132 | + public void update(UpdatePurchaseOrderRevokeLineVo vo) { | |
| 133 | + | |
| 134 | + PurchaseOrderRevokeLine data = getBaseMapper().selectById(vo.getId()); | |
| 135 | + if (ObjectUtil.isNull(data)) { | |
| 136 | + throw new DefaultClientException("订货单撤销表物料行不存在!"); | |
| 137 | + } | |
| 138 | + | |
| 139 | + LambdaUpdateWrapper<PurchaseOrderRevokeLine> updateWrapper = Wrappers.lambdaUpdate(PurchaseOrderRevokeLine.class) | |
| 140 | + .set(PurchaseOrderRevokeLine::getRevokeQuantity, vo.getRevokeQuantity() == null ? null : vo.getRevokeQuantity()) | |
| 141 | + .eq(PurchaseOrderRevokeLine::getId, vo.getId()); | |
| 142 | + | |
| 143 | + getBaseMapper().update(updateWrapper); | |
| 144 | + | |
| 145 | + OpLogUtil.setVariable("id", data.getId()); | |
| 146 | + OpLogUtil.setExtra(vo); | |
| 147 | + } | |
| 148 | + | |
| 149 | + @OpLog(type = OtherOpLogType.class, name = "删除订货单撤销表物料行,ID:{}", params = {"#id"}) | |
| 150 | + @Transactional(rollbackFor = Exception.class) | |
| 151 | + @Override | |
| 152 | + public void deleteById(String id) { | |
| 153 | + | |
| 154 | + getBaseMapper().deleteById(id); | |
| 155 | + } | |
| 156 | + | |
| 157 | + @Override | |
| 158 | + public void cleanCacheByKey(Serializable key) { | |
| 159 | + | |
| 160 | + } | |
| 161 | +} | ... | ... | 
xingyun-sc/src/main/java/com/lframework/xingyun/sc/mappers/PurchaseOrderRevokeLineMapper.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.PurchaseOrderRevokeLine; | |
| 5 | +import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderRevokeLineVo; | |
| 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 PurchaseOrderRevokeLineMapper extends BaseMapper<PurchaseOrderRevokeLine> { | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * 查询列表 | |
| 20 | + * @param vo | |
| 21 | + * @return | |
| 22 | + */ | |
| 23 | + List<PurchaseOrderRevokeLine> query(@Param("vo") QueryPurchaseOrderRevokeLineVo vo); | |
| 24 | +} | ... | ... | 
xingyun-sc/src/main/java/com/lframework/xingyun/sc/service/order/PurchaseOrderRevokeLineService.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.service.order; | |
| 2 | + | |
| 3 | +import com.lframework.starter.web.core.service.BaseMpService; | |
| 4 | +import com.lframework.starter.web.core.components.resp.PageResult; | |
| 5 | +import com.lframework.xingyun.sc.entity.PurchaseOrderRevokeLine; | |
| 6 | +import com.lframework.xingyun.sc.vo.order.CreatePurchaseOrderRevokeLineVo; | |
| 7 | +import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderRevokeLineVo; | |
| 8 | +import com.lframework.xingyun.sc.vo.order.UpdatePurchaseOrderRevokeLineVo; | |
| 9 | +import java.util.List; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 订货单撤销表物料行 Service | |
| 13 | + */ | |
| 14 | +public interface PurchaseOrderRevokeLineService extends BaseMpService<PurchaseOrderRevokeLine> { | |
| 15 | + | |
| 16 | + /** | |
| 17 | + * 查询列表 | |
| 18 | + * @return | |
| 19 | + */ | |
| 20 | + PageResult<PurchaseOrderRevokeLine> query(Integer pageIndex, Integer pageSize, QueryPurchaseOrderRevokeLineVo vo); | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * 查询列表 | |
| 24 | + * @param vo | |
| 25 | + * @return | |
| 26 | + */ | |
| 27 | + List<PurchaseOrderRevokeLine> query(QueryPurchaseOrderRevokeLineVo vo); | |
| 28 | + | |
| 29 | + /** | |
| 30 | + * 根据ID查询 | |
| 31 | + * @param id | |
| 32 | + * @return | |
| 33 | + */ | |
| 34 | + PurchaseOrderRevokeLine findById(String id); | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * 创建 | |
| 38 | + * @param vo | |
| 39 | + * @return | |
| 40 | + */ | |
| 41 | + String create(CreatePurchaseOrderRevokeLineVo vo); | |
| 42 | + | |
| 43 | + /** | |
| 44 | + * 修改 | |
| 45 | + * @param vo | |
| 46 | + */ | |
| 47 | + void update(UpdatePurchaseOrderRevokeLineVo vo); | |
| 48 | + | |
| 49 | + /** | |
| 50 | + * 根据ID删除 | |
| 51 | + * @param id | |
| 52 | + * @return | |
| 53 | + */ | |
| 54 | + void deleteById(String id); | |
| 55 | +} | ... | ... | 
| ... | ... | @@ -154,6 +154,12 @@ public class CreatePurchaseOrderInfoVo implements BaseVo, Serializable { | 
| 154 | 154 | private String examineStatus; | 
| 155 | 155 | |
| 156 | 156 | /** | 
| 157 | + * 撤销状态 | |
| 158 | + */ | |
| 159 | + @ApiModelProperty("撤销状态") | |
| 160 | + private String revokeStatus; | |
| 161 | + | |
| 162 | + /** | |
| 157 | 163 | * 生产工艺 | 
| 158 | 164 | */ | 
| 159 | 165 | @ApiModelProperty("生产工艺") | ... | ... | 
xingyun-sc/src/main/java/com/lframework/xingyun/sc/vo/order/CreatePurchaseOrderRevokeLineVo.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.vo.order; | |
| 2 | + | |
| 3 | +import com.lframework.starter.web.core.components.validation.IsNumberPrecision; | |
| 4 | +import java.math.BigDecimal; | |
| 5 | +import javax.validation.constraints.NotBlank; | |
| 6 | +import java.time.LocalDate; | |
| 7 | +import com.lframework.starter.web.core.vo.BaseVo; | |
| 8 | +import io.swagger.annotations.ApiModelProperty; | |
| 9 | +import com.lframework.starter.web.core.components.validation.TypeMismatch; | |
| 10 | +import org.hibernate.validator.constraints.Length; | |
| 11 | +import java.io.Serializable; | |
| 12 | +import lombok.Data; | |
| 13 | + | |
| 14 | +@Data | |
| 15 | +public class CreatePurchaseOrderRevokeLineVo implements BaseVo, Serializable { | |
| 16 | + | |
| 17 | + private static final long serialVersionUID = 1L; | |
| 18 | + | |
| 19 | + /** | |
| 20 | + * 订货单撤销主表ID | |
| 21 | + */ | |
| 22 | + @ApiModelProperty(value = "订货单撤销主表ID", required = true) | |
| 23 | + @NotBlank(message = "请输入订货单撤销主表ID!") | |
| 24 | + @Length(message = "订货单撤销主表ID最多允许32个字符!") | |
| 25 | + private String purchaseOrderRevokeId; | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * 订货单物料行ID | |
| 29 | + */ | |
| 30 | + @ApiModelProperty(value = "订货单物料行ID", required = true) | |
| 31 | + @NotBlank(message = "请输入订货单物料行ID!") | |
| 32 | + @Length(message = "订货单物料行ID最多允许32个字符!") | |
| 33 | + private String purchaseOrderLineId; | |
| 34 | + | |
| 35 | + /** | |
| 36 | + * 行业 | |
| 37 | + */ | |
| 38 | + @ApiModelProperty("行业") | |
| 39 | + @Length(message = "行业最多允许100个字符!") | |
| 40 | + private String industry; | |
| 41 | + | |
| 42 | + /** | |
| 43 | + * 品质 | |
| 44 | + */ | |
| 45 | + @ApiModelProperty("品质") | |
| 46 | + @Length(message = "品质最多允许100个字符!") | |
| 47 | + private String quality; | |
| 48 | + | |
| 49 | + /** | |
| 50 | + * 牌号 | |
| 51 | + */ | |
| 52 | + @ApiModelProperty("牌号") | |
| 53 | + @Length(message = "牌号最多允许100个字符!") | |
| 54 | + private String brand; | |
| 55 | + | |
| 56 | + /** | |
| 57 | + * 厚度 | |
| 58 | + */ | |
| 59 | + @ApiModelProperty("厚度") | |
| 60 | + @TypeMismatch(message = "厚度格式有误!") | |
| 61 | + @IsNumberPrecision(message = "厚度最多允许4位小数!", value = 4) | |
| 62 | + private BigDecimal thickness; | |
| 63 | + | |
| 64 | + /** | |
| 65 | + * 厚度公差正 | |
| 66 | + */ | |
| 67 | + @ApiModelProperty("厚度公差正") | |
| 68 | + @TypeMismatch(message = "厚度公差正格式有误!") | |
| 69 | + @IsNumberPrecision(message = "厚度公差正最多允许4位小数!", value = 4) | |
| 70 | + private BigDecimal thicknessTolPos; | |
| 71 | + | |
| 72 | + /** | |
| 73 | + * 厚度公差负 | |
| 74 | + */ | |
| 75 | + @ApiModelProperty("厚度公差负") | |
| 76 | + @TypeMismatch(message = "厚度公差负格式有误!") | |
| 77 | + @IsNumberPrecision(message = "厚度公差负最多允许4位小数!", value = 4) | |
| 78 | + private BigDecimal thicknessTolNeg; | |
| 79 | + | |
| 80 | + /** | |
| 81 | + * 宽度 | |
| 82 | + */ | |
| 83 | + @ApiModelProperty("宽度") | |
| 84 | + @TypeMismatch(message = "宽度格式有误!") | |
| 85 | + @IsNumberPrecision(message = "宽度最多允许4位小数!", value = 4) | |
| 86 | + private BigDecimal width; | |
| 87 | + | |
| 88 | + /** | |
| 89 | + * 宽度公差正 | |
| 90 | + */ | |
| 91 | + @ApiModelProperty("宽度公差正") | |
| 92 | + @TypeMismatch(message = "宽度公差正格式有误!") | |
| 93 | + @IsNumberPrecision(message = "宽度公差正最多允许4位小数!", value = 4) | |
| 94 | + private BigDecimal widthTolPos; | |
| 95 | + | |
| 96 | + /** | |
| 97 | + * 宽度公差负 | |
| 98 | + */ | |
| 99 | + @ApiModelProperty("宽度公差负") | |
| 100 | + @TypeMismatch(message = "宽度公差负格式有误!") | |
| 101 | + @IsNumberPrecision(message = "宽度公差负最多允许4位小数!", value = 4) | |
| 102 | + private BigDecimal widthTolNeg; | |
| 103 | + | |
| 104 | + /** | |
| 105 | + * 长度 | |
| 106 | + */ | |
| 107 | + @ApiModelProperty("长度") | |
| 108 | + @TypeMismatch(message = "长度格式有误!") | |
| 109 | + @IsNumberPrecision(message = "长度最多允许4位小数!", value = 4) | |
| 110 | + private BigDecimal length; | |
| 111 | + | |
| 112 | + /** | |
| 113 | + * 长度公差正 | |
| 114 | + */ | |
| 115 | + @ApiModelProperty("长度公差正") | |
| 116 | + @TypeMismatch(message = "长度公差正格式有误!") | |
| 117 | + @IsNumberPrecision(message = "长度公差正最多允许4位小数!", value = 4) | |
| 118 | + private BigDecimal lengthTolPos; | |
| 119 | + | |
| 120 | + /** | |
| 121 | + * 长度公差负 | |
| 122 | + */ | |
| 123 | + @ApiModelProperty("长度公差负") | |
| 124 | + @TypeMismatch(message = "长度公差负格式有误!") | |
| 125 | + @IsNumberPrecision(message = "长度公差负最多允许4位小数!", value = 4) | |
| 126 | + private BigDecimal lengthTolNeg; | |
| 127 | + | |
| 128 | + /** | |
| 129 | + * 状态 | |
| 130 | + */ | |
| 131 | + @ApiModelProperty("状态") | |
| 132 | + @Length(message = "状态最多允许50个字符!") | |
| 133 | + private String status; | |
| 134 | + | |
| 135 | + /** | |
| 136 | + * 原数量kg | |
| 137 | + */ | |
| 138 | + @ApiModelProperty("原数量kg") | |
| 139 | + @TypeMismatch(message = "原数量kg格式有误!") | |
| 140 | + @IsNumberPrecision(message = "原数量kg最多允许4位小数!", value = 4) | |
| 141 | + private BigDecimal quantity; | |
| 142 | + | |
| 143 | + /** | |
| 144 | + * 销售价格 | |
| 145 | + */ | |
| 146 | + @ApiModelProperty("销售价格") | |
| 147 | + @TypeMismatch(message = "销售价格格式有误!") | |
| 148 | + @IsNumberPrecision(message = "销售价格最多允许4位小数!", value = 4) | |
| 149 | + private BigDecimal salesPrice; | |
| 150 | + | |
| 151 | + /** | |
| 152 | + * 发货日期 | |
| 153 | + */ | |
| 154 | + @ApiModelProperty("发货日期") | |
| 155 | + @TypeMismatch(message = "发货日期格式有误!") | |
| 156 | + private LocalDate deliveryDate; | |
| 157 | + | |
| 158 | + /** | |
| 159 | + * 撤销数量kg | |
| 160 | + */ | |
| 161 | + @ApiModelProperty("撤销数量kg") | |
| 162 | + @TypeMismatch(message = "撤销数量kg格式有误!") | |
| 163 | + @IsNumberPrecision(message = "撤销数量kg最多允许4位小数!", value = 4) | |
| 164 | + private BigDecimal revokeQuantity; | |
| 165 | + | |
| 166 | + /** | |
| 167 | + * 排序 | |
| 168 | + */ | |
| 169 | + @ApiModelProperty("排序") | |
| 170 | + @TypeMismatch(message = "排序格式有误!") | |
| 171 | + private Integer showOrder; | |
| 172 | + | |
| 173 | +} | ... | ... | 
| ... | ... | @@ -54,6 +54,12 @@ public class QueryPurchaseOrderInfoVo extends PageVo implements BaseVo, Serializ | 
| 54 | 54 | private String examineStatus; | 
| 55 | 55 | |
| 56 | 56 | /** | 
| 57 | + * 撤销状态 | |
| 58 | + */ | |
| 59 | + @ApiModelProperty("撤销状态") | |
| 60 | + private String revokeStatus; | |
| 61 | + | |
| 62 | + /** | |
| 57 | 63 | * 办事处 | 
| 58 | 64 | */ | 
| 59 | 65 | @ApiModelProperty("办事处") | ... | ... | 
xingyun-sc/src/main/java/com/lframework/xingyun/sc/vo/order/QueryPurchaseOrderRevokeLineVo.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.vo.order; | |
| 2 | + | |
| 3 | +import lombok.Data; | |
| 4 | +import com.lframework.starter.web.core.vo.PageVo; | |
| 5 | +import com.lframework.starter.web.core.vo.BaseVo; | |
| 6 | +import io.swagger.annotations.ApiModelProperty; | |
| 7 | +import java.io.Serializable; | |
| 8 | + | |
| 9 | +@Data | |
| 10 | +public class QueryPurchaseOrderRevokeLineVo extends PageVo implements BaseVo, Serializable { | |
| 11 | + | |
| 12 | + private static final long serialVersionUID = 1L; | |
| 13 | + | |
| 14 | + /** | |
| 15 | + * 订货单撤销主表ID | |
| 16 | + */ | |
| 17 | + @ApiModelProperty("订货单撤销主表ID") | |
| 18 | + private String purchaseOrderRevokeId; | |
| 19 | + | |
| 20 | + /** | |
| 21 | + * 订货单物料行ID | |
| 22 | + */ | |
| 23 | + @ApiModelProperty("订货单物料行ID") | |
| 24 | + private String purchaseOrderLineId; | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 行业 | |
| 28 | + */ | |
| 29 | + @ApiModelProperty("行业") | |
| 30 | + private String industry; | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 牌号 | |
| 34 | + */ | |
| 35 | + @ApiModelProperty("牌号") | |
| 36 | + private String brand; | |
| 37 | + | |
| 38 | +} | ... | ... | 
| ... | ... | @@ -161,6 +161,12 @@ public class UpdatePurchaseOrderInfoVo implements BaseVo, Serializable { | 
| 161 | 161 | private String examineStatus; | 
| 162 | 162 | |
| 163 | 163 | /** | 
| 164 | + * 撤销状态 | |
| 165 | + */ | |
| 166 | + @ApiModelProperty("撤销状态") | |
| 167 | + private String revokeStatus; | |
| 168 | + | |
| 169 | + /** | |
| 164 | 170 | * 生产工艺 | 
| 165 | 171 | */ | 
| 166 | 172 | @ApiModelProperty("生产工艺") | ... | ... | 
xingyun-sc/src/main/java/com/lframework/xingyun/sc/vo/order/UpdatePurchaseOrderRevokeLineVo.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.vo.order; | |
| 2 | + | |
| 3 | +import lombok.Data; | |
| 4 | +import com.lframework.starter.web.core.components.validation.IsNumberPrecision; | |
| 5 | +import java.math.BigDecimal; | |
| 6 | +import javax.validation.constraints.NotBlank; | |
| 7 | +import com.lframework.starter.web.core.vo.BaseVo; | |
| 8 | +import com.lframework.starter.web.core.components.validation.TypeMismatch; | |
| 9 | +import io.swagger.annotations.ApiModelProperty; | |
| 10 | +import java.io.Serializable; | |
| 11 | + | |
| 12 | +@Data | |
| 13 | +public class UpdatePurchaseOrderRevokeLineVo implements BaseVo, Serializable { | |
| 14 | + | |
| 15 | + private static final long serialVersionUID = 1L; | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * ID | |
| 19 | + */ | |
| 20 | + @ApiModelProperty(value = "ID", required = true) | |
| 21 | + @NotBlank(message = "id不能为空!") | |
| 22 | + private String id; | |
| 23 | + | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 撤销数量kg | |
| 27 | + */ | |
| 28 | + @ApiModelProperty("撤销数量kg") | |
| 29 | + @TypeMismatch(message = "撤销数量kg格式有误!") | |
| 30 | + @IsNumberPrecision(message = "撤销数量kg最多允许4位小数!", value = 4) | |
| 31 | + private BigDecimal revokeQuantity; | |
| 32 | + | |
| 33 | +} | ... | ... | 
| ... | ... | @@ -24,6 +24,7 @@ | 
| 24 | 24 | <result column="remarks" property="remarks"/> | 
| 25 | 25 | <result column="status" property="status"/> | 
| 26 | 26 | <result column="examine_status" property="examineStatus"/> | 
| 27 | + <result column="revoke_status" property="revokeStatus"/> | |
| 27 | 28 | <result column="production_process" property="productionProcess"/> | 
| 28 | 29 | <result column="dept_id" property="deptId"/> | 
| 29 | 30 | <result column="dept_name" property="deptName"/> | 
| ... | ... | @@ -62,6 +63,7 @@ | 
| 62 | 63 | tb.remarks, | 
| 63 | 64 | tb.status, | 
| 64 | 65 | tb.examine_status, | 
| 66 | + tb.revoke_status, | |
| 65 | 67 | tb.production_process, | 
| 66 | 68 | tb.dept_id, | 
| 67 | 69 | sd.name AS dept_name, | 
| ... | ... | @@ -105,6 +107,9 @@ | 
| 105 | 107 | <if test="vo.examineStatus != null and vo.examineStatus != ''"> | 
| 106 | 108 | AND tb.examine_status = #{vo.examineStatus} | 
| 107 | 109 | </if> | 
| 110 | + <if test="vo.revokeStatus != null and vo.revokeStatus != ''"> | |
| 111 | + AND tb.revoke_status = #{vo.revokeStatus} | |
| 112 | + </if> | |
| 108 | 113 | <if test="vo.deptId != null and vo.deptId != ''"> | 
| 109 | 114 | AND tb.dept_id = #{vo.deptId} | 
| 110 | 115 | </if> | ... | ... | 
| 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.PurchaseOrderRevokeLineMapper"> | |
| 4 | + | |
| 5 | + <resultMap id="PurchaseOrderRevokeLine" type="com.lframework.xingyun.sc.entity.PurchaseOrderRevokeLine"> | |
| 6 | + <id column="id" property="id"/> | |
| 7 | + <result column="purchase_order_revoke_id" property="purchaseOrderRevokeId"/> | |
| 8 | + <result column="purchase_order_line_id" property="purchaseOrderLineId"/> | |
| 9 | + <result column="industry" property="industry"/> | |
| 10 | + <result column="quality" property="quality"/> | |
| 11 | + <result column="brand" property="brand"/> | |
| 12 | + <result column="thickness" property="thickness"/> | |
| 13 | + <result column="thickness_tol_pos" property="thicknessTolPos"/> | |
| 14 | + <result column="thickness_tol_neg" property="thicknessTolNeg"/> | |
| 15 | + <result column="width" property="width"/> | |
| 16 | + <result column="width_tol_pos" property="widthTolPos"/> | |
| 17 | + <result column="width_tol_neg" property="widthTolNeg"/> | |
| 18 | + <result column="length" property="length"/> | |
| 19 | + <result column="length_tol_pos" property="lengthTolPos"/> | |
| 20 | + <result column="length_tol_neg" property="lengthTolNeg"/> | |
| 21 | + <result column="status" property="status"/> | |
| 22 | + <result column="quantity" property="quantity"/> | |
| 23 | + <result column="sales_price" property="salesPrice"/> | |
| 24 | + <result column="delivery_date" property="deliveryDate"/> | |
| 25 | + <result column="revoke_quantity" property="revokeQuantity"/> | |
| 26 | + <result column="show_order" property="showOrder"/> | |
| 27 | + <result column="create_by_id" property="createById"/> | |
| 28 | + <result column="create_by" property="createBy"/> | |
| 29 | + <result column="update_by_id" property="updateById"/> | |
| 30 | + <result column="update_by" property="updateBy"/> | |
| 31 | + <result column="create_time" property="createTime"/> | |
| 32 | + <result column="update_time" property="updateTime"/> | |
| 33 | + </resultMap> | |
| 34 | + | |
| 35 | + <sql id="PurchaseOrderRevokeLine_sql"> | |
| 36 | + SELECT | |
| 37 | + tb.id, | |
| 38 | + tb.purchase_order_revoke_id, | |
| 39 | + tb.purchase_order_line_id, | |
| 40 | + tb.industry, | |
| 41 | + tb.quality, | |
| 42 | + tb.brand, | |
| 43 | + tb.thickness, | |
| 44 | + tb.thickness_tol_pos, | |
| 45 | + tb.thickness_tol_neg, | |
| 46 | + tb.width, | |
| 47 | + tb.width_tol_pos, | |
| 48 | + tb.width_tol_neg, | |
| 49 | + tb.length, | |
| 50 | + tb.length_tol_pos, | |
| 51 | + tb.length_tol_neg, | |
| 52 | + tb.status, | |
| 53 | + tb.quantity, | |
| 54 | + tb.sales_price, | |
| 55 | + tb.delivery_date, | |
| 56 | + tb.revoke_quantity, | |
| 57 | + tb.show_order, | |
| 58 | + tb.create_by_id, | |
| 59 | + tb.create_by, | |
| 60 | + tb.update_by_id, | |
| 61 | + tb.update_by, | |
| 62 | + tb.create_time, | |
| 63 | + tb.update_time | |
| 64 | + FROM tbl_purchase_order_revoke_line AS tb | |
| 65 | + </sql> | |
| 66 | + | |
| 67 | + <select id="query" resultMap="PurchaseOrderRevokeLine"> | |
| 68 | + <include refid="PurchaseOrderRevokeLine_sql"/> | |
| 69 | + <where> | |
| 70 | + <if test="vo.purchaseOrderRevokeId != null and vo.purchaseOrderRevokeId != ''"> | |
| 71 | + AND tb.purchase_order_revoke_id = #{vo.purchaseOrderRevokeId} | |
| 72 | + </if> | |
| 73 | + <if test="vo.purchaseOrderLineId != null and vo.purchaseOrderLineId != ''"> | |
| 74 | + AND tb.purchase_order_line_id = #{vo.purchaseOrderLineId} | |
| 75 | + </if> | |
| 76 | + <if test="vo.industry != null and vo.industry != ''"> | |
| 77 | + AND tb.industry = #{vo.industry} | |
| 78 | + </if> | |
| 79 | + <if test="vo.brand != null and vo.brand != ''"> | |
| 80 | + AND tb.brand = #{vo.brand} | |
| 81 | + </if> | |
| 82 | + </where> | |
| 83 | + ORDER BY tb.show_order ASC | |
| 84 | + </select> | |
| 85 | +</mapper> | ... | ... |