Showing
25 changed files
with
300 additions
and
89 deletions
| ... | ... | @@ -2,6 +2,7 @@ package com.lframework.xingyun.sc.bo.shipments.delay; |
| 2 | 2 | |
| 3 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; |
| 4 | 4 | import com.lframework.starter.common.constants.StringPool; |
| 5 | +import java.math.BigDecimal; | |
| 5 | 6 | import java.time.LocalDate; |
| 6 | 7 | import java.util.List; |
| 7 | 8 | import com.lframework.starter.web.core.bo.BaseBo; |
| ... | ... | @@ -46,6 +47,12 @@ public class GetDelayedShipmentBo extends BaseBo<DelayedShipment> { |
| 46 | 47 | private LocalDate applyDate; |
| 47 | 48 | |
| 48 | 49 | /** |
| 50 | + * 总数量 | |
| 51 | + */ | |
| 52 | + @ApiModelProperty("总数量") | |
| 53 | + private BigDecimal totalQuantity; | |
| 54 | + | |
| 55 | + /** | |
| 49 | 56 | * 审核状态 |
| 50 | 57 | */ |
| 51 | 58 | @ApiModelProperty("审核状态") | ... | ... |
| ... | ... | @@ -38,18 +38,48 @@ public class ShipmentsPlanDetailBo extends BaseBo<ShipmentsPlanDetail> { |
| 38 | 38 | private String planId; |
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | + * 发货单ID | |
| 42 | + */ | |
| 43 | + @ApiModelProperty("发货单ID") | |
| 44 | + private String shipmentOrderId; | |
| 45 | + | |
| 46 | + /** | |
| 41 | 47 | * 订货单ID |
| 42 | 48 | */ |
| 43 | 49 | @ApiModelProperty("订货单ID") |
| 44 | 50 | private String orderId; |
| 45 | 51 | |
| 46 | 52 | /** |
| 53 | + * 订货单规格ID | |
| 54 | + */ | |
| 55 | + @ApiModelProperty("订货单规格ID") | |
| 56 | + private String orderSpecId; | |
| 57 | + | |
| 58 | + /** | |
| 47 | 59 | * 订单编号 |
| 48 | 60 | */ |
| 49 | 61 | @ApiModelProperty("订单编号") |
| 50 | 62 | private String orderNo; |
| 51 | 63 | |
| 52 | 64 | /** |
| 65 | + * 订单类型 | |
| 66 | + */ | |
| 67 | + @ApiModelProperty("订单类型") | |
| 68 | + private String orderType; | |
| 69 | + | |
| 70 | + /** | |
| 71 | + * 所属分厂 | |
| 72 | + */ | |
| 73 | + @ApiModelProperty("所属分厂") | |
| 74 | + private String workshopName; | |
| 75 | + | |
| 76 | + /** | |
| 77 | + * 申请次数 | |
| 78 | + */ | |
| 79 | + @ApiModelProperty("申请次数") | |
| 80 | + private Integer applyCount; | |
| 81 | + | |
| 82 | + /** | |
| 53 | 83 | * 客户ID |
| 54 | 84 | */ |
| 55 | 85 | @ApiModelProperty("客户ID") | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/customer/CustomerCreditController.java
| ... | ... | @@ -13,6 +13,7 @@ import com.lframework.starter.web.core.utils.JsonUtil; |
| 13 | 13 | import com.lframework.starter.web.inner.bo.system.user.QuerySysUserBo; |
| 14 | 14 | import com.lframework.starter.web.inner.entity.SysUser; |
| 15 | 15 | import com.lframework.starter.web.inner.service.system.SysUserService; |
| 16 | +import com.lframework.xingyun.basedata.entity.Customer; | |
| 16 | 17 | import com.lframework.xingyun.basedata.service.customer.CustomerService; |
| 17 | 18 | import com.lframework.xingyun.sc.bo.customer.credit.GetCustomerCreditBo; |
| 18 | 19 | import com.lframework.xingyun.sc.entity.CorePersonnel; |
| ... | ... | @@ -498,6 +499,13 @@ public class CustomerCreditController extends DefaultBaseController { |
| 498 | 499 | credit.setSupervisorReviewName(sysUser.getName()); |
| 499 | 500 | } |
| 500 | 501 | } |
| 502 | + //公司名称 | |
| 503 | + if (StringUtil.isNotEmpty(credit.getCompanyId())) { | |
| 504 | + Customer customer = customerService.findById(credit.getCompanyId()); | |
| 505 | + if (customer != null) { | |
| 506 | + credit.setCompanyName(customer.getName()); | |
| 507 | + } | |
| 508 | + } | |
| 501 | 509 | return credit; |
| 502 | 510 | } |
| 503 | 511 | } | ... | ... |
| 1 | 1 | package com.lframework.xingyun.sc.controller.shipments; |
| 2 | 2 | |
| 3 | 3 | import com.lframework.xingyun.sc.bo.shipments.plan.ShipmentsPlanDetailBo; |
| 4 | +import com.lframework.xingyun.sc.entity.DelayedShipmentDetail; | |
| 5 | +import com.lframework.xingyun.sc.service.shipments.delay.DelayedShipmentDetailService; | |
| 6 | +import com.lframework.xingyun.sc.vo.shipments.delay.QueryDelayedShipmentDetailVo; | |
| 4 | 7 | import com.lframework.xingyun.sc.vo.shipments.plan.QueryShipmentsPlanDetailVo; |
| 5 | 8 | import com.lframework.xingyun.sc.service.shipments.ShipmentsPlanDetailService; |
| 6 | 9 | import com.lframework.xingyun.sc.vo.shipments.plan.CreateShipmentsPlanDetailVo; |
| ... | ... | @@ -40,6 +43,8 @@ public class ShipmentsPlanDetailController extends DefaultBaseController { |
| 40 | 43 | |
| 41 | 44 | @Resource |
| 42 | 45 | private ShipmentsPlanDetailService shipmentsPlanDetailService; |
| 46 | + @Resource | |
| 47 | + private DelayedShipmentDetailService delayedShipmentDetailService; | |
| 43 | 48 | |
| 44 | 49 | /** |
| 45 | 50 | * 查询列表 |
| ... | ... | @@ -70,6 +75,15 @@ public class ShipmentsPlanDetailController extends DefaultBaseController { |
| 70 | 75 | throw new DefaultClientException("发货计划明细不存在!"); |
| 71 | 76 | } |
| 72 | 77 | ShipmentsPlanDetailBo result = new ShipmentsPlanDetailBo(data); |
| 78 | + //添加申请次数 | |
| 79 | + QueryDelayedShipmentDetailVo vo = new QueryDelayedShipmentDetailVo(); | |
| 80 | + vo.setOrderSpecId(data.getOrderSpecId()); | |
| 81 | + List<DelayedShipmentDetail> query = delayedShipmentDetailService.query(vo); | |
| 82 | + if (CollectionUtil.isEmpty(query)) { | |
| 83 | + result.setApplyCount(1); | |
| 84 | + } else { | |
| 85 | + result.setApplyCount(query.size() + 1); | |
| 86 | + } | |
| 73 | 87 | |
| 74 | 88 | return InvokeResultBuilder.success(result); |
| 75 | 89 | } | ... | ... |
| ... | ... | @@ -36,7 +36,7 @@ import java.util.stream.Collectors; |
| 36 | 36 | @Api(tags = "延期发货表") |
| 37 | 37 | @Validated |
| 38 | 38 | @RestController |
| 39 | -@RequestMapping("/delayedShipment/delayedshipment") | |
| 39 | +@RequestMapping("/delayedShipment") | |
| 40 | 40 | public class DelayedShipmentController extends DefaultBaseController { |
| 41 | 41 | |
| 42 | 42 | @Autowired |
| ... | ... | @@ -93,7 +93,7 @@ public class DelayedShipmentController extends DefaultBaseController { |
| 93 | 93 | @ApiOperation("新增") |
| 94 | 94 | @HasPermission({"delayedShipment:delayedshipment:add"}) |
| 95 | 95 | @PostMapping |
| 96 | - public InvokeResult<Void> create(@Valid CreateDelayedShipmentVo vo) { | |
| 96 | + public InvokeResult<Void> create(@Valid @RequestBody CreateDelayedShipmentVo vo) { | |
| 97 | 97 | |
| 98 | 98 | delayedShipmentService.create(vo); |
| 99 | 99 | |
| ... | ... | @@ -106,7 +106,7 @@ public class DelayedShipmentController extends DefaultBaseController { |
| 106 | 106 | @ApiOperation("修改") |
| 107 | 107 | @HasPermission({"delayedShipment:delayedshipment:modify"}) |
| 108 | 108 | @PutMapping |
| 109 | - public InvokeResult<Void> update(@Valid UpdateDelayedShipmentVo vo) { | |
| 109 | + public InvokeResult<Void> update(@Valid @RequestBody UpdateDelayedShipmentVo vo) { | |
| 110 | 110 | |
| 111 | 111 | delayedShipmentService.update(vo); |
| 112 | 112 | ... | ... |
| ... | ... | @@ -34,7 +34,7 @@ import java.util.stream.Collectors; |
| 34 | 34 | @Api(tags = "延期发货详情表") |
| 35 | 35 | @Validated |
| 36 | 36 | @RestController |
| 37 | -@RequestMapping("/delayedShipmentDetail/delayedshipmentdetail") | |
| 37 | +@RequestMapping("/delayedShipmentDetail") | |
| 38 | 38 | public class DelayedShipmentDetailController extends DefaultBaseController { |
| 39 | 39 | |
| 40 | 40 | @Autowired | ... | ... |
| ... | ... | @@ -2,6 +2,8 @@ package com.lframework.xingyun.sc.entity; |
| 2 | 2 | |
| 3 | 3 | import com.baomidou.mybatisplus.annotation.TableName; |
| 4 | 4 | import com.lframework.starter.web.core.dto.BaseDto; |
| 5 | + | |
| 6 | +import java.math.BigDecimal; | |
| 5 | 7 | import java.time.LocalDate; |
| 6 | 8 | import java.time.LocalDateTime; |
| 7 | 9 | import java.util.List; |
| ... | ... | @@ -9,6 +11,7 @@ import java.util.List; |
| 9 | 11 | import com.baomidou.mybatisplus.annotation.FieldFill; |
| 10 | 12 | import com.lframework.starter.web.core.entity.BaseEntity; |
| 11 | 13 | import com.baomidou.mybatisplus.annotation.TableField; |
| 14 | +import io.swagger.annotations.ApiModelProperty; | |
| 12 | 15 | import lombok.Data; |
| 13 | 16 | |
| 14 | 17 | /** |
| ... | ... | @@ -52,6 +55,11 @@ public class DelayedShipment extends BaseEntity implements BaseDto { |
| 52 | 55 | private String status; |
| 53 | 56 | |
| 54 | 57 | /** |
| 58 | + * 总数量 | |
| 59 | + */ | |
| 60 | + private BigDecimal totalQuantity; | |
| 61 | + | |
| 62 | + /** | |
| 55 | 63 | * 延期发货详情 |
| 56 | 64 | */ |
| 57 | 65 | @TableField(exist = false) | ... | ... |
| ... | ... | @@ -58,6 +58,18 @@ public class ShipmentsPlanDetail extends BaseEntity implements BaseDto { |
| 58 | 58 | private String orderNo; |
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | + * 订单类型 | |
| 62 | + */ | |
| 63 | + @TableField(exist = false) | |
| 64 | + private String orderType; | |
| 65 | + | |
| 66 | + /** | |
| 67 | + * 所属分厂 | |
| 68 | + */ | |
| 69 | + @TableField(exist = false) | |
| 70 | + private String workshopName; | |
| 71 | + | |
| 72 | + /** | |
| 61 | 73 | * 合同类型 |
| 62 | 74 | */ |
| 63 | 75 | @TableField(exist = false) | ... | ... |
| ... | ... | @@ -1376,6 +1376,18 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM |
| 1376 | 1376 | data.setEnterpriseType(enterpriseType); |
| 1377 | 1377 | } |
| 1378 | 1378 | |
| 1379 | + // enterpriseOperationType 转中文 | |
| 1380 | + String opType = credit.getEnterpriseOperationType(); | |
| 1381 | + if ("NEW_CUSTOMER".equals(opType)) { | |
| 1382 | + data.setEnterpriseOperationType("新开发客户"); | |
| 1383 | + } else if ("RECONNECT_CUSTOMER".equals(opType)) { | |
| 1384 | + data.setEnterpriseOperationType("再接轨客户"); | |
| 1385 | + } else if ("OLD_CUSTOMER".equals(opType)) { | |
| 1386 | + data.setEnterpriseOperationType("老客户"); | |
| 1387 | + } else { | |
| 1388 | + data.setEnterpriseOperationType(""); | |
| 1389 | + } | |
| 1390 | + | |
| 1379 | 1391 | // 核心人员列表 - 确保放入数据模型供模板遍历 |
| 1380 | 1392 | List<GetCorePersonnelBo> corePersonnelBoList = new ArrayList<>(); |
| 1381 | 1393 | if (CollectionUtils.isNotEmpty(corePersonnelList)) { | ... | ... |
| ... | ... | @@ -80,7 +80,7 @@ public class ShipmentsPlanDetailServiceImpl extends BaseMpServiceImpl<ShipmentsP |
| 80 | 80 | @Override |
| 81 | 81 | public ShipmentsPlanDetail findById(String id) { |
| 82 | 82 | |
| 83 | - return getBaseMapper().selectById(id); | |
| 83 | + return getBaseMapper().findById(id); | |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | @OpLog(type = OtherOpLogType.class, name = "新增发货计划明细,ID:{}", params = {"#id"}) | ... | ... |
| ... | ... | @@ -3,6 +3,7 @@ package com.lframework.xingyun.sc.impl.shipments.delay; |
| 3 | 3 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| 4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 5 | 5 | import com.github.pagehelper.PageInfo; |
| 6 | +import com.lframework.starter.common.utils.StringUtil; | |
| 6 | 7 | import com.lframework.starter.web.core.impl.BaseMpServiceImpl; |
| 7 | 8 | import com.lframework.starter.web.core.utils.PageResultUtil; |
| 8 | 9 | import com.lframework.starter.web.core.utils.OpLogUtil; |
| ... | ... | @@ -23,8 +24,6 @@ import com.lframework.xingyun.sc.vo.shipments.delay.QueryDelayedShipmentDetailVo |
| 23 | 24 | import com.lframework.xingyun.sc.vo.shipments.delay.UpdateDelayedShipmentDetailVo; |
| 24 | 25 | import org.springframework.transaction.annotation.Transactional; |
| 25 | 26 | import org.springframework.stereotype.Service; |
| 26 | - | |
| 27 | -import java.util.Collection; | |
| 28 | 27 | import java.util.List; |
| 29 | 28 | |
| 30 | 29 | @Service |
| ... | ... | @@ -51,7 +50,7 @@ public class DelayedShipmentDetailServiceImpl extends BaseMpServiceImpl<DelayedS |
| 51 | 50 | @Override |
| 52 | 51 | public DelayedShipmentDetail findById(String id) { |
| 53 | 52 | |
| 54 | - return getBaseMapper().selectById(id); | |
| 53 | + return getBaseMapper().findById(id); | |
| 55 | 54 | } |
| 56 | 55 | |
| 57 | 56 | @OpLog(type = OtherOpLogType.class, name = "新增延期发货详情表,ID:{}", params = {"#id"}) |
| ... | ... | @@ -61,15 +60,33 @@ public class DelayedShipmentDetailServiceImpl extends BaseMpServiceImpl<DelayedS |
| 61 | 60 | |
| 62 | 61 | DelayedShipmentDetail data = new DelayedShipmentDetail(); |
| 63 | 62 | data.setId(IdUtil.getId()); |
| 64 | - data.setDelayedShipmentId(vo.getDelayedShipmentId()); | |
| 65 | - data.setOrderId(vo.getOrderId()); | |
| 66 | - data.setShipmentsPlanDetailId(vo.getShipmentsPlanDetailId()); | |
| 67 | - data.setOrderSpecId(vo.getOrderSpecId()); | |
| 68 | - data.setDeliveryDate(vo.getDeliveryDate()); | |
| 69 | - data.setApplyShipmentDate(vo.getApplyShipmentDate()); | |
| 70 | - data.setApplyCount(vo.getApplyCount()); | |
| 71 | - data.setQuantity(vo.getQuantity()); | |
| 72 | - data.setDelayReason(vo.getDelayReason()); | |
| 63 | + if (!StringUtil.isBlank(vo.getDelayedShipmentId())) { | |
| 64 | + data.setDelayedShipmentId(vo.getDelayedShipmentId()); | |
| 65 | + } | |
| 66 | + if (!StringUtil.isBlank(vo.getOrderId())) { | |
| 67 | + data.setOrderId(vo.getOrderId()); | |
| 68 | + } | |
| 69 | + if (!StringUtil.isBlank(vo.getShipmentsPlanDetailId())) { | |
| 70 | + data.setShipmentsPlanDetailId(vo.getShipmentsPlanDetailId()); | |
| 71 | + } | |
| 72 | + if (!StringUtil.isBlank(vo.getOrderSpecId())) { | |
| 73 | + data.setOrderSpecId(vo.getOrderSpecId()); | |
| 74 | + } | |
| 75 | + if (vo.getDeliveryDate() != null) { | |
| 76 | + data.setDeliveryDate(vo.getDeliveryDate()); | |
| 77 | + } | |
| 78 | + if (vo.getApplyShipmentDate() != null) { | |
| 79 | + data.setApplyShipmentDate(vo.getApplyShipmentDate()); | |
| 80 | + } | |
| 81 | + if (vo.getApplyCount() != null) { | |
| 82 | + data.setApplyCount(vo.getApplyCount()); | |
| 83 | + } | |
| 84 | + if (vo.getQuantity() != null) { | |
| 85 | + data.setQuantity(vo.getQuantity()); | |
| 86 | + } | |
| 87 | + if (!StringUtil.isBlank(vo.getDelayReason())) { | |
| 88 | + data.setDelayReason(vo.getDelayReason()); | |
| 89 | + } | |
| 73 | 90 | |
| 74 | 91 | getBaseMapper().insert(data); |
| 75 | 92 | |
| ... | ... | @@ -90,14 +107,7 @@ public class DelayedShipmentDetailServiceImpl extends BaseMpServiceImpl<DelayedS |
| 90 | 107 | } |
| 91 | 108 | |
| 92 | 109 | LambdaUpdateWrapper<DelayedShipmentDetail> updateWrapper = Wrappers.lambdaUpdate(DelayedShipmentDetail.class) |
| 93 | - .set(DelayedShipmentDetail::getDelayedShipmentId, vo.getDelayedShipmentId()) | |
| 94 | - .set(DelayedShipmentDetail::getOrderId, vo.getOrderId()) | |
| 95 | - .set(DelayedShipmentDetail::getShipmentsPlanDetailId, vo.getShipmentsPlanDetailId()) | |
| 96 | - .set(DelayedShipmentDetail::getOrderSpecId, vo.getOrderSpecId()) | |
| 97 | - .set(DelayedShipmentDetail::getDeliveryDate, vo.getDeliveryDate()) | |
| 98 | 110 | .set(DelayedShipmentDetail::getApplyShipmentDate, vo.getApplyShipmentDate()) |
| 99 | - .set(DelayedShipmentDetail::getApplyCount, vo.getApplyCount()) | |
| 100 | - .set(DelayedShipmentDetail::getQuantity, vo.getQuantity()) | |
| 101 | 111 | .set(DelayedShipmentDetail::getDelayReason, vo.getDelayReason()) |
| 102 | 112 | .eq(DelayedShipmentDetail::getId, vo.getId()); |
| 103 | 113 | ... | ... |
| ... | ... | @@ -3,6 +3,8 @@ package com.lframework.xingyun.sc.impl.shipments.delay; |
| 3 | 3 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| 4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 5 | 5 | import com.github.pagehelper.PageInfo; |
| 6 | +import com.lframework.starter.common.utils.CollectionUtil; | |
| 7 | +import com.lframework.starter.common.utils.StringUtil; | |
| 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; |
| ... | ... | @@ -17,17 +19,19 @@ import com.lframework.starter.common.utils.Assert; |
| 17 | 19 | import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; |
| 18 | 20 | import com.lframework.xingyun.sc.entity.DelayedShipment; |
| 19 | 21 | import com.lframework.xingyun.sc.mappers.DelayedShipmentMapper; |
| 22 | +import com.lframework.xingyun.sc.service.shipments.delay.DelayedShipmentDetailService; | |
| 20 | 23 | import com.lframework.xingyun.sc.service.shipments.delay.DelayedShipmentService; |
| 21 | -import com.lframework.xingyun.sc.vo.shipments.delay.CreateDelayedShipmentVo; | |
| 22 | -import com.lframework.xingyun.sc.vo.shipments.delay.QueryDelayedShipmentVo; | |
| 23 | -import com.lframework.xingyun.sc.vo.shipments.delay.UpdateDelayedShipmentVo; | |
| 24 | +import com.lframework.xingyun.sc.vo.shipments.delay.*; | |
| 24 | 25 | import org.springframework.transaction.annotation.Transactional; |
| 25 | 26 | import org.springframework.stereotype.Service; |
| 26 | - | |
| 27 | +import javax.annotation.Resource; | |
| 28 | +import java.time.LocalDate; | |
| 27 | 29 | import java.util.List; |
| 28 | 30 | |
| 29 | 31 | @Service |
| 30 | 32 | public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmentMapper, DelayedShipment> implements DelayedShipmentService { |
| 33 | + @Resource | |
| 34 | + private DelayedShipmentDetailService delayedShipmentDetailService; | |
| 31 | 35 | |
| 32 | 36 | @Override |
| 33 | 37 | public PageResult<DelayedShipment> query(Integer pageIndex, Integer pageSize, QueryDelayedShipmentVo vo) { |
| ... | ... | @@ -50,7 +54,7 @@ public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmen |
| 50 | 54 | @Override |
| 51 | 55 | public DelayedShipment findById(String id) { |
| 52 | 56 | |
| 53 | - return getBaseMapper().selectById(id); | |
| 57 | + return getBaseMapper().findById(id); | |
| 54 | 58 | } |
| 55 | 59 | |
| 56 | 60 | @OpLog(type = OtherOpLogType.class, name = "新增延期发货表,ID:{}", params = {"#id"}) |
| ... | ... | @@ -60,12 +64,34 @@ public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmen |
| 60 | 64 | |
| 61 | 65 | DelayedShipment data = new DelayedShipment(); |
| 62 | 66 | data.setId(IdUtil.getId()); |
| 63 | - data.setDeptId(vo.getDeptId()); | |
| 64 | - data.setApplyDate(vo.getApplyDate()); | |
| 65 | - data.setStatus(vo.getStatus()); | |
| 67 | + if (!StringUtil.isBlank(vo.getDeptId())) { | |
| 68 | + data.setDeptId(vo.getDeptId()); | |
| 69 | + } | |
| 70 | + if (vo.getApplyDate() != null) { | |
| 71 | + data.setApplyDate(vo.getApplyDate()); | |
| 72 | + } else { | |
| 73 | + data.setApplyDate(LocalDate.now()); | |
| 74 | + } | |
| 75 | + if (vo.getTotalQuantity() != null) { | |
| 76 | + data.setTotalQuantity(vo.getTotalQuantity()); | |
| 77 | + } | |
| 78 | + if (!StringUtil.isBlank(vo.getStatus())) { | |
| 79 | + data.setStatus(vo.getStatus()); | |
| 80 | + } else { | |
| 81 | + data.setStatus("AUDIT"); | |
| 82 | + } | |
| 66 | 83 | |
| 67 | 84 | getBaseMapper().insert(data); |
| 68 | 85 | |
| 86 | + //新增延期发货详情列 | |
| 87 | + if (CollectionUtil.isNotEmpty(vo.getDelayedShipmentDetailList())) { | |
| 88 | + List<CreateDelayedShipmentDetailVo> delayedShipmentDetailList = vo.getDelayedShipmentDetailList(); | |
| 89 | + for (CreateDelayedShipmentDetailVo createDelayedShipmentDetailVo : delayedShipmentDetailList) { | |
| 90 | + createDelayedShipmentDetailVo.setDelayedShipmentId(data.getId()); | |
| 91 | + delayedShipmentDetailService.create(createDelayedShipmentDetailVo); | |
| 92 | + } | |
| 93 | + } | |
| 94 | + | |
| 69 | 95 | OpLogUtil.setVariable("id", data.getId()); |
| 70 | 96 | OpLogUtil.setExtra(vo); |
| 71 | 97 | |
| ... | ... | @@ -85,11 +111,20 @@ public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmen |
| 85 | 111 | LambdaUpdateWrapper<DelayedShipment> updateWrapper = Wrappers.lambdaUpdate(DelayedShipment.class) |
| 86 | 112 | .set(DelayedShipment::getDeptId, vo.getDeptId()) |
| 87 | 113 | .set(DelayedShipment::getApplyDate, vo.getApplyDate()) |
| 88 | - .set(DelayedShipment::getStatus, vo.getStatus()) | |
| 114 | + .set(DelayedShipment::getTotalQuantity, vo.getTotalQuantity()) | |
| 115 | + .set(DelayedShipment::getStatus, "AUDIT") | |
| 89 | 116 | .eq(DelayedShipment::getId, vo.getId()); |
| 90 | 117 | |
| 91 | 118 | getBaseMapper().update(updateWrapper); |
| 92 | 119 | |
| 120 | + //更新延期发货详情列 | |
| 121 | + if (CollectionUtil.isNotEmpty(vo.getDelayedShipmentDetailList())) { | |
| 122 | + List<UpdateDelayedShipmentDetailVo> delayedShipmentDetailList = vo.getDelayedShipmentDetailList(); | |
| 123 | + for (UpdateDelayedShipmentDetailVo updateDelayedShipmentDetailVo : delayedShipmentDetailList) { | |
| 124 | + delayedShipmentDetailService.update(updateDelayedShipmentDetailVo); | |
| 125 | + } | |
| 126 | + } | |
| 127 | + | |
| 93 | 128 | OpLogUtil.setVariable("id", data.getId()); |
| 94 | 129 | OpLogUtil.setExtra(vo); |
| 95 | 130 | } | ... | ... |
| ... | ... | @@ -21,4 +21,12 @@ public interface DelayedShipmentDetailMapper extends BaseMapper<DelayedShipmentD |
| 21 | 21 | * @return |
| 22 | 22 | */ |
| 23 | 23 | List<DelayedShipmentDetail> query(@Param("vo") QueryDelayedShipmentDetailVo vo); |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 查询 | |
| 27 | + * | |
| 28 | + * @param id | |
| 29 | + * @return DelayedShipmentDetail | |
| 30 | + */ | |
| 31 | + DelayedShipmentDetail findById(@Param("id") String id); | |
| 24 | 32 | } | ... | ... |
| ... | ... | @@ -21,4 +21,12 @@ public interface DelayedShipmentMapper extends BaseMapper<DelayedShipment> { |
| 21 | 21 | * @return |
| 22 | 22 | */ |
| 23 | 23 | List<DelayedShipment> query(@Param("vo") QueryDelayedShipmentVo vo); |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 查询 | |
| 27 | + * | |
| 28 | + * @param id | |
| 29 | + * @return DelayedShipment | |
| 30 | + */ | |
| 31 | + DelayedShipment findById(@Param("id") String id); | |
| 24 | 32 | } | ... | ... |
| ... | ... | @@ -55,4 +55,12 @@ public interface ShipmentsPlanDetailMapper extends BaseMapper<ShipmentsPlanDetai |
| 55 | 55 | * @return List<ShipmentsPlanDetail> |
| 56 | 56 | */ |
| 57 | 57 | List<ShipmentsPlanDetail> listByPlanId(@Param("planId") String planId); |
| 58 | + | |
| 59 | + /** | |
| 60 | + * 查询 | |
| 61 | + * | |
| 62 | + * @param id 主键 | |
| 63 | + * @return ShipmentsPlanDetail | |
| 64 | + */ | |
| 65 | + ShipmentsPlanDetail findById(@Param("id") String id); | |
| 58 | 66 | } | ... | ... |
| ... | ... | @@ -2,10 +2,8 @@ package com.lframework.xingyun.sc.vo.shipments.delay; |
| 2 | 2 | |
| 3 | 3 | import com.lframework.starter.web.core.components.validation.IsNumberPrecision; |
| 4 | 4 | import java.math.BigDecimal; |
| 5 | -import javax.validation.constraints.NotBlank; | |
| 6 | 5 | import java.time.LocalDate; |
| 7 | 6 | import com.lframework.starter.web.core.vo.BaseVo; |
| 8 | -import javax.validation.constraints.NotNull; | |
| 9 | 7 | import io.swagger.annotations.ApiModelProperty; |
| 10 | 8 | import com.lframework.starter.web.core.components.validation.TypeMismatch; |
| 11 | 9 | import org.hibernate.validator.constraints.Length; |
| ... | ... | @@ -20,64 +18,56 @@ public class CreateDelayedShipmentDetailVo implements BaseVo, Serializable { |
| 20 | 18 | /** |
| 21 | 19 | * 延期发货ID |
| 22 | 20 | */ |
| 23 | - @ApiModelProperty(value = "延期发货ID", required = true) | |
| 24 | - @NotBlank(message = "请输入延期发货ID!") | |
| 21 | + @ApiModelProperty("延期发货ID") | |
| 25 | 22 | @Length(message = "延期发货ID最多允许32个字符!") |
| 26 | 23 | private String delayedShipmentId; |
| 27 | 24 | |
| 28 | 25 | /** |
| 29 | 26 | * 订货单ID |
| 30 | 27 | */ |
| 31 | - @ApiModelProperty(value = "订货单ID", required = true) | |
| 32 | - @NotBlank(message = "请输入订货单ID!") | |
| 28 | + @ApiModelProperty("订货单ID") | |
| 33 | 29 | @Length(message = "订货单ID最多允许32个字符!") |
| 34 | 30 | private String orderId; |
| 35 | 31 | |
| 36 | 32 | /** |
| 37 | 33 | * 发货计划明细ID |
| 38 | 34 | */ |
| 39 | - @ApiModelProperty(value = "发货计划明细ID", required = true) | |
| 40 | - @NotBlank(message = "请输入发货计划明细ID!") | |
| 35 | + @ApiModelProperty("发货计划明细ID") | |
| 41 | 36 | @Length(message = "发货计划明细ID最多允许32个字符!") |
| 42 | 37 | private String shipmentsPlanDetailId; |
| 43 | 38 | |
| 44 | 39 | /** |
| 45 | 40 | * 订货单物料行ID |
| 46 | 41 | */ |
| 47 | - @ApiModelProperty(value = "订货单物料行ID", required = true) | |
| 48 | - @NotBlank(message = "请输入订货单物料行ID!") | |
| 42 | + @ApiModelProperty("订货单物料行ID") | |
| 49 | 43 | @Length(message = "订货单物料行ID最多允许32个字符!") |
| 50 | 44 | private String orderSpecId; |
| 51 | 45 | |
| 52 | 46 | /** |
| 53 | 47 | * 原订单计划发货日期 |
| 54 | 48 | */ |
| 55 | - @ApiModelProperty(value = "原订单计划发货日期", required = true) | |
| 56 | - @NotNull(message = "请输入原订单计划发货日期!") | |
| 49 | + @ApiModelProperty("原订单计划发货日期") | |
| 57 | 50 | @TypeMismatch(message = "原订单计划发货日期格式有误!") |
| 58 | 51 | private LocalDate deliveryDate; |
| 59 | 52 | |
| 60 | 53 | /** |
| 61 | 54 | * 现申请发货日期 |
| 62 | 55 | */ |
| 63 | - @ApiModelProperty(value = "现申请发货日期", required = true) | |
| 64 | - @NotNull(message = "请输入现申请发货日期!") | |
| 56 | + @ApiModelProperty("现申请发货日期") | |
| 65 | 57 | @TypeMismatch(message = "现申请发货日期格式有误!") |
| 66 | 58 | private LocalDate applyShipmentDate; |
| 67 | 59 | |
| 68 | 60 | /** |
| 69 | 61 | * 申请次数 |
| 70 | 62 | */ |
| 71 | - @ApiModelProperty(value = "申请次数", required = true) | |
| 72 | - @NotNull(message = "请输入申请次数!") | |
| 63 | + @ApiModelProperty("申请次数") | |
| 73 | 64 | @TypeMismatch(message = "申请次数格式有误!") |
| 74 | 65 | private Integer applyCount; |
| 75 | 66 | |
| 76 | 67 | /** |
| 77 | 68 | * 发货数量 |
| 78 | 69 | */ |
| 79 | - @ApiModelProperty(value = "发货数量", required = true) | |
| 80 | - @NotNull(message = "请输入发货数量!") | |
| 70 | + @ApiModelProperty("发货数量") | |
| 81 | 71 | @TypeMismatch(message = "发货数量格式有误!") |
| 82 | 72 | @IsNumberPrecision(message = "发货数量最多允许4位小数!", value = 4) |
| 83 | 73 | private BigDecimal quantity; |
| ... | ... | @@ -85,8 +75,7 @@ public class CreateDelayedShipmentDetailVo implements BaseVo, Serializable { |
| 85 | 75 | /** |
| 86 | 76 | * 延迟原因 |
| 87 | 77 | */ |
| 88 | - @ApiModelProperty(value = "延迟原因", required = true) | |
| 89 | - @NotBlank(message = "请输入延迟原因!") | |
| 78 | + @ApiModelProperty("延迟原因") | |
| 90 | 79 | private String delayReason; |
| 91 | 80 | |
| 92 | 81 | } | ... | ... |
| 1 | 1 | package com.lframework.xingyun.sc.vo.shipments.delay; |
| 2 | 2 | |
| 3 | -import javax.validation.constraints.NotBlank; | |
| 3 | +import java.math.BigDecimal; | |
| 4 | 4 | import java.time.LocalDate; |
| 5 | 5 | import com.lframework.starter.web.core.vo.BaseVo; |
| 6 | -import javax.validation.constraints.NotNull; | |
| 7 | 6 | import io.swagger.annotations.ApiModelProperty; |
| 8 | 7 | import com.lframework.starter.web.core.components.validation.TypeMismatch; |
| 9 | 8 | import org.hibernate.validator.constraints.Length; |
| 10 | 9 | import java.io.Serializable; |
| 10 | +import java.util.List; | |
| 11 | 11 | import lombok.Data; |
| 12 | 12 | |
| 13 | 13 | @Data |
| ... | ... | @@ -18,25 +18,34 @@ public class CreateDelayedShipmentVo implements BaseVo, Serializable { |
| 18 | 18 | /** |
| 19 | 19 | * 所属办ID |
| 20 | 20 | */ |
| 21 | - @ApiModelProperty(value = "所属办ID", required = true) | |
| 22 | - @NotBlank(message = "请输入所属办ID!") | |
| 21 | + @ApiModelProperty("所属办ID") | |
| 23 | 22 | @Length(message = "所属办ID最多允许32个字符!") |
| 24 | 23 | private String deptId; |
| 25 | 24 | |
| 26 | 25 | /** |
| 27 | 26 | * 申请日期 |
| 28 | 27 | */ |
| 29 | - @ApiModelProperty(value = "申请日期", required = true) | |
| 30 | - @NotNull(message = "请输入申请日期!") | |
| 28 | + @ApiModelProperty("申请日期") | |
| 31 | 29 | @TypeMismatch(message = "申请日期格式有误!") |
| 32 | 30 | private LocalDate applyDate; |
| 33 | 31 | |
| 34 | 32 | /** |
| 35 | 33 | * 审核状态 |
| 36 | 34 | */ |
| 37 | - @ApiModelProperty(value = "审核状态", required = true) | |
| 38 | - @NotBlank(message = "请输入审核状态!") | |
| 35 | + @ApiModelProperty("审核状态") | |
| 39 | 36 | @Length(message = "审核状态最多允许20个字符!") |
| 40 | 37 | private String status; |
| 41 | 38 | |
| 39 | + /** | |
| 40 | + * 总数量 | |
| 41 | + */ | |
| 42 | + @ApiModelProperty("总数量") | |
| 43 | + private BigDecimal totalQuantity; | |
| 44 | + | |
| 45 | + /** | |
| 46 | + * 延期发货详情 | |
| 47 | + */ | |
| 48 | + @ApiModelProperty("延期发货详情") | |
| 49 | + private List<CreateDelayedShipmentDetailVo> delayedShipmentDetailList; | |
| 50 | + | |
| 42 | 51 | } | ... | ... |
| ... | ... | @@ -17,4 +17,11 @@ public class QueryDelayedShipmentDetailVo extends PageVo implements BaseVo, Seri |
| 17 | 17 | @ApiModelProperty("延期发货ID") |
| 18 | 18 | private String delayedShipmentId; |
| 19 | 19 | |
| 20 | + /** | |
| 21 | + * 订货单物料行ID | |
| 22 | + */ | |
| 23 | + @ApiModelProperty("订货单物料行ID") | |
| 24 | + private String orderSpecId; | |
| 25 | + | |
| 26 | + | |
| 20 | 27 | } | ... | ... |
| ... | ... | @@ -6,7 +6,6 @@ import java.math.BigDecimal; |
| 6 | 6 | import javax.validation.constraints.NotBlank; |
| 7 | 7 | import java.time.LocalDate; |
| 8 | 8 | import com.lframework.starter.web.core.vo.BaseVo; |
| 9 | -import javax.validation.constraints.NotNull; | |
| 10 | 9 | import com.lframework.starter.web.core.components.validation.TypeMismatch; |
| 11 | 10 | import io.swagger.annotations.ApiModelProperty; |
| 12 | 11 | import org.hibernate.validator.constraints.Length; |
| ... | ... | @@ -27,73 +26,64 @@ public class UpdateDelayedShipmentDetailVo implements BaseVo, Serializable { |
| 27 | 26 | /** |
| 28 | 27 | * 延期发货ID |
| 29 | 28 | */ |
| 30 | - @ApiModelProperty(value = "延期发货ID", required = true) | |
| 31 | - @NotBlank(message = "请输入延期发货ID!") | |
| 29 | + @ApiModelProperty("延期发货ID") | |
| 32 | 30 | @Length(message = "延期发货ID最多允许32个字符!") |
| 33 | 31 | private String delayedShipmentId; |
| 34 | 32 | |
| 35 | 33 | /** |
| 36 | 34 | * 订货单ID |
| 37 | 35 | */ |
| 38 | - @ApiModelProperty(value = "订货单ID", required = true) | |
| 39 | - @NotBlank(message = "请输入订货单ID!") | |
| 36 | + @ApiModelProperty("订货单ID") | |
| 40 | 37 | @Length(message = "订货单ID最多允许32个字符!") |
| 41 | 38 | private String orderId; |
| 42 | 39 | |
| 43 | 40 | /** |
| 44 | 41 | * 发货计划明细ID |
| 45 | 42 | */ |
| 46 | - @ApiModelProperty(value = "发货计划明细ID", required = true) | |
| 47 | - @NotBlank(message = "请输入发货计划明细ID!") | |
| 43 | + @ApiModelProperty("发货计划明细ID") | |
| 48 | 44 | @Length(message = "发货计划明细ID最多允许32个字符!") |
| 49 | 45 | private String shipmentsPlanDetailId; |
| 50 | 46 | |
| 51 | 47 | /** |
| 52 | 48 | * 订货单物料行ID |
| 53 | 49 | */ |
| 54 | - @ApiModelProperty(value = "订货单物料行ID", required = true) | |
| 55 | - @NotBlank(message = "请输入订货单物料行ID!") | |
| 50 | + @ApiModelProperty("订货单物料行ID") | |
| 56 | 51 | @Length(message = "订货单物料行ID最多允许32个字符!") |
| 57 | 52 | private String orderSpecId; |
| 58 | 53 | |
| 59 | 54 | /** |
| 60 | 55 | * 原订单计划发货日期 |
| 61 | 56 | */ |
| 62 | - @ApiModelProperty(value = "原订单计划发货日期", required = true) | |
| 57 | + @ApiModelProperty("原订单计划发货日期") | |
| 63 | 58 | @TypeMismatch(message = "原订单计划发货日期格式有误!") |
| 64 | - @NotNull(message = "请输入原订单计划发货日期!") | |
| 65 | 59 | private LocalDate deliveryDate; |
| 66 | 60 | |
| 67 | 61 | /** |
| 68 | 62 | * 现申请发货日期 |
| 69 | 63 | */ |
| 70 | - @ApiModelProperty(value = "现申请发货日期", required = true) | |
| 64 | + @ApiModelProperty("现申请发货日期") | |
| 71 | 65 | @TypeMismatch(message = "现申请发货日期格式有误!") |
| 72 | - @NotNull(message = "请输入现申请发货日期!") | |
| 73 | 66 | private LocalDate applyShipmentDate; |
| 74 | 67 | |
| 75 | 68 | /** |
| 76 | 69 | * 申请次数 |
| 77 | 70 | */ |
| 78 | - @ApiModelProperty(value = "申请次数", required = true) | |
| 71 | + @ApiModelProperty("申请次数") | |
| 79 | 72 | @TypeMismatch(message = "申请次数格式有误!") |
| 80 | - @NotNull(message = "请输入申请次数!") | |
| 81 | 73 | private Integer applyCount; |
| 82 | 74 | |
| 83 | 75 | /** |
| 84 | 76 | * 发货数量 |
| 85 | 77 | */ |
| 86 | - @ApiModelProperty(value = "发货数量", required = true) | |
| 78 | + @ApiModelProperty("发货数量") | |
| 87 | 79 | @TypeMismatch(message = "发货数量格式有误!") |
| 88 | - @NotNull(message = "请输入发货数量!") | |
| 89 | 80 | @IsNumberPrecision(message = "发货数量最多允许4位小数!", value = 4) |
| 90 | 81 | private BigDecimal quantity; |
| 91 | 82 | |
| 92 | 83 | /** |
| 93 | 84 | * 延迟原因 |
| 94 | 85 | */ |
| 95 | - @ApiModelProperty(value = "延迟原因", required = true) | |
| 96 | - @NotBlank(message = "请输入延迟原因!") | |
| 86 | + @ApiModelProperty("延迟原因") | |
| 97 | 87 | private String delayReason; |
| 98 | 88 | |
| 99 | 89 | } | ... | ... |
| ... | ... | @@ -2,13 +2,14 @@ package com.lframework.xingyun.sc.vo.shipments.delay; |
| 2 | 2 | |
| 3 | 3 | import lombok.Data; |
| 4 | 4 | import javax.validation.constraints.NotBlank; |
| 5 | +import java.math.BigDecimal; | |
| 5 | 6 | import java.time.LocalDate; |
| 6 | 7 | import com.lframework.starter.web.core.vo.BaseVo; |
| 7 | -import javax.validation.constraints.NotNull; | |
| 8 | 8 | import com.lframework.starter.web.core.components.validation.TypeMismatch; |
| 9 | 9 | import io.swagger.annotations.ApiModelProperty; |
| 10 | 10 | import org.hibernate.validator.constraints.Length; |
| 11 | 11 | import java.io.Serializable; |
| 12 | +import java.util.List; | |
| 12 | 13 | |
| 13 | 14 | @Data |
| 14 | 15 | public class UpdateDelayedShipmentVo implements BaseVo, Serializable { |
| ... | ... | @@ -25,25 +26,35 @@ public class UpdateDelayedShipmentVo implements BaseVo, Serializable { |
| 25 | 26 | /** |
| 26 | 27 | * 所属办ID |
| 27 | 28 | */ |
| 28 | - @ApiModelProperty(value = "所属办ID", required = true) | |
| 29 | - @NotBlank(message = "请输入所属办ID!") | |
| 29 | + @ApiModelProperty("所属办ID") | |
| 30 | 30 | @Length(message = "所属办ID最多允许32个字符!") |
| 31 | 31 | private String deptId; |
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * 申请日期 |
| 35 | 35 | */ |
| 36 | - @ApiModelProperty(value = "申请日期", required = true) | |
| 36 | + @ApiModelProperty("申请日期") | |
| 37 | 37 | @TypeMismatch(message = "申请日期格式有误!") |
| 38 | - @NotNull(message = "请输入申请日期!") | |
| 39 | 38 | private LocalDate applyDate; |
| 40 | 39 | |
| 41 | 40 | /** |
| 42 | 41 | * 审核状态 |
| 43 | 42 | */ |
| 44 | - @ApiModelProperty(value = "审核状态", required = true) | |
| 45 | - @NotBlank(message = "请输入审核状态!") | |
| 43 | + @ApiModelProperty("审核状态") | |
| 46 | 44 | @Length(message = "审核状态最多允许20个字符!") |
| 47 | 45 | private String status; |
| 48 | 46 | |
| 47 | + /** | |
| 48 | + * 总数量 | |
| 49 | + */ | |
| 50 | + @ApiModelProperty("总数量") | |
| 51 | + private BigDecimal totalQuantity; | |
| 52 | + | |
| 53 | + /** | |
| 54 | + * 延期发货详情 | |
| 55 | + */ | |
| 56 | + @ApiModelProperty("延期发货详情") | |
| 57 | + private List<UpdateDelayedShipmentDetailVo> delayedShipmentDetailList; | |
| 58 | + | |
| 59 | + | |
| 49 | 60 | } | ... | ... |
| ... | ... | @@ -7,6 +7,7 @@ |
| 7 | 7 | <result column="plan_id" property="planId"/> |
| 8 | 8 | <result column="order_id" property="orderId"/> |
| 9 | 9 | <result column="order_no" property="orderNo"/> |
| 10 | + <result column="order_type" property="orderType"/> | |
| 10 | 11 | <result column="customer_id" property="customerId"/> |
| 11 | 12 | <result column="customer_name" property="customerName"/> |
| 12 | 13 | <result column="thickness" property="thickness"/> |
| ... | ... | @@ -36,6 +37,12 @@ |
| 36 | 37 | tb.plan_id, |
| 37 | 38 | tb.order_id, |
| 38 | 39 | o.order_no, |
| 40 | + CASE | |
| 41 | + WHEN s.type IN ('DISTRIB_STD', 'DIST_STOCK_CONTRACT', 'DRAFT_DIST_AGMT') THEN '经销' | |
| 42 | + WHEN s.type IN ('INTL_STD_CONTRACT', 'INTL_INVENTORY_AGMT', 'INTL_OPEN_SPEC_AGMT') THEN '外贸' | |
| 43 | + WHEN s.type = 'PROCESS_STD_AGMT' THEN '加工' | |
| 44 | + ELSE '其它' | |
| 45 | + END AS order_type, | |
| 39 | 46 | o.ordering_unit AS customer_id, |
| 40 | 47 | c.name AS customer_name, |
| 41 | 48 | tb.order_spec_id, |
| ... | ... | @@ -55,6 +62,7 @@ |
| 55 | 62 | tb.shipments_time, |
| 56 | 63 | tb.can_shipments, |
| 57 | 64 | tb.del_flag, |
| 65 | + ws.name AS workshop_name, | |
| 58 | 66 | tb.create_by_id, |
| 59 | 67 | tb.update_by_id, |
| 60 | 68 | tb.create_time, |
| ... | ... | @@ -64,6 +72,8 @@ |
| 64 | 72 | LEFT JOIN purchase_order_info o ON tb.order_id = o.id |
| 65 | 73 | LEFT JOIN base_data_customer c ON o.ordering_unit = c.id |
| 66 | 74 | LEFT JOIN tbl_purchase_order_line ol ON tb.order_spec_id = ol.id |
| 75 | + LEFT JOIN tbl_contract_distributor_standard s on s.id = o.contract_id | |
| 76 | + LEFT JOIN base_data_workshop ws on ws.id = o.workshop_id | |
| 67 | 77 | </sql> |
| 68 | 78 | |
| 69 | 79 | <select id="query" resultMap="ShipmentsPlanDetail"> |
| ... | ... | @@ -210,4 +220,13 @@ |
| 210 | 220 | where pd.del_flag = false |
| 211 | 221 | and pd.plan_id = #{planId} |
| 212 | 222 | </select> |
| 223 | + | |
| 224 | + <select id="findById" resultType="com.lframework.xingyun.sc.entity.ShipmentsPlanDetail"> | |
| 225 | + <include refid="ShipmentsPlanDetail_sql"/> | |
| 226 | + <where> | |
| 227 | + <if test="id != null and id != ''"> | |
| 228 | + AND tb.id = #{id} | |
| 229 | + </if> | |
| 230 | + </where> | |
| 231 | + </select> | |
| 213 | 232 | </mapper> | ... | ... |
| ... | ... | @@ -33,7 +33,12 @@ |
| 33 | 33 | tb.delayed_shipment_id, |
| 34 | 34 | tb.order_id, |
| 35 | 35 | o.order_no, |
| 36 | - s.type AS order_type, | |
| 36 | + CASE | |
| 37 | + WHEN s.type IN ('DISTRIB_STD', 'DIST_STOCK_CONTRACT', 'DRAFT_DIST_AGMT') THEN '经销' | |
| 38 | + WHEN s.type IN ('INTL_STD_CONTRACT', 'INTL_INVENTORY_AGMT', 'INTL_OPEN_SPEC_AGMT') THEN '外贸' | |
| 39 | + WHEN s.type = 'PROCESS_STD_AGMT' THEN '加工' | |
| 40 | + ELSE '其它' | |
| 41 | + END AS order_type, | |
| 37 | 42 | o.workshop_id, |
| 38 | 43 | ws.name AS workshop_name, |
| 39 | 44 | o.ordering_unit AS customer_id, |
| ... | ... | @@ -67,4 +72,13 @@ |
| 67 | 72 | </where> |
| 68 | 73 | ORDER BY tb.create_time DESC |
| 69 | 74 | </select> |
| 75 | + | |
| 76 | + <select id="findById" resultType="com.lframework.xingyun.sc.entity.DelayedShipmentDetail"> | |
| 77 | + <include refid="DelayedShipmentDetail_sql"/> | |
| 78 | + <where> | |
| 79 | + <if test="id != null and id != ''"> | |
| 80 | + AND tb.id = #{id} | |
| 81 | + </if> | |
| 82 | + </where> | |
| 83 | + </select> | |
| 70 | 84 | </mapper> | ... | ... |
| ... | ... | @@ -7,6 +7,7 @@ |
| 7 | 7 | <result column="apply_date" property="applyDate"/> |
| 8 | 8 | <result column="dept_id" property="deptId"/> |
| 9 | 9 | <result column="dept_name" property="deptName"/> |
| 10 | + <result column="total_quantity" property="totalQuantity"/> | |
| 10 | 11 | <result column="status" property="status"/> |
| 11 | 12 | <result column="create_by_id" property="createById"/> |
| 12 | 13 | <result column="create_by" property="createBy"/> |
| ... | ... | @@ -22,6 +23,7 @@ |
| 22 | 23 | tb.apply_date, |
| 23 | 24 | tb.dept_id, |
| 24 | 25 | sd.name AS dept_name, |
| 26 | + tb.total_quantity, | |
| 25 | 27 | tb.status, |
| 26 | 28 | tb.create_by_id, |
| 27 | 29 | tb.create_by, |
| ... | ... | @@ -53,4 +55,13 @@ |
| 53 | 55 | </where> |
| 54 | 56 | ORDER BY tb.create_time DESC |
| 55 | 57 | </select> |
| 58 | + | |
| 59 | + <select id="findById" resultType="com.lframework.xingyun.sc.entity.DelayedShipment"> | |
| 60 | + <include refid="DelayedShipment_sql"/> | |
| 61 | + <where> | |
| 62 | + <if test="id != null and id != ''"> | |
| 63 | + AND tb.id = #{id} | |
| 64 | + </if> | |
| 65 | + </where> | |
| 66 | + </select> | |
| 56 | 67 | </mapper> | ... | ... |