Showing
10 changed files
with
230 additions
and
43 deletions
| ... | ... | @@ -77,39 +77,42 @@ create table if not exists `tbl_contract_framework`( |
| 77 | 77 | ); |
| 78 | 78 | |
| 79 | 79 | -- 经销标准合同 |
| 80 | -create table if not exists `tbl_contract_distributor_standard`( | |
| 81 | - `id` varchar(32) primary key comment 'ID', | |
| 82 | - `code` varchar(20) not null comment '编号', | |
| 83 | - `supplier` varchar(50) not null comment '供方', | |
| 84 | - `buyer` varchar(200) not null comment '需方', | |
| 85 | - `dept_id` varchar(32) not null comment '办事处', | |
| 86 | - `order_date` date NOT NULL COMMENT '订货日期', | |
| 87 | - `unit` VARCHAR(50) COMMENT '单位', | |
| 88 | - `total_quantity` DECIMAL(15, 4) COMMENT '合计数量', | |
| 89 | - `total_amount_excluding_tax` DECIMAL(15, 4) COMMENT '合计不含税金额', | |
| 90 | - `total_amount_including_tax` DECIMAL(15, 4) COMMENT '合计总金额', | |
| 91 | - `total_amount_capital` VARCHAR(100) COMMENT '合计人民币金额(大写)', | |
| 92 | - `deposit_info` VARCHAR(500) COMMENT '交付定金信息(包含数额、时间)', | |
| 93 | - `packaging_requirements` VARCHAR(200) COMMENT '包装要求', | |
| 94 | - `payment_terms` VARCHAR(500) COMMENT '付款信息(包含付款方式、付款期限)', | |
| 95 | - `execution_standard` VARCHAR(50) COMMENT '执行标准', | |
| 96 | - `transport_mode` VARCHAR(100) COMMENT '运输方式', | |
| 97 | - `destination` VARCHAR(200) COMMENT '目的地', | |
| 98 | - `includes_packaging_fee` tinyint(1) NOT NULL DEFAULT 0 COMMENT '单价中是否已包含包装费', | |
| 99 | - `includes_transport_fee` tinyint(1) NOT NULL DEFAULT 0 COMMENT '单价中是否已包含运费', | |
| 100 | - `piece_weight_head` TEXT COMMENT '件重条头', | |
| 101 | - `surface` TEXT COMMENT '表面', | |
| 102 | - `tolerance` TEXT COMMENT '公差', | |
| 103 | - `performance` TEXT COMMENT '性能', | |
| 104 | - `special_terms` VARCHAR(50) COMMENT '特别条款要求', | |
| 105 | - `designated_consignee` TEXT COMMENT '需方指定收货人', | |
| 106 | - `remarks` TEXT COMMENT '备注', | |
| 107 | - `create_by_id` varchar(32) not null comment '创建人ID', | |
| 108 | - `create_by` varchar(20) not null comment '创建人', | |
| 109 | - `update_by_id` varchar(32) not null comment '更新人ID', | |
| 110 | - `update_by` varchar(20) not null comment '更新人', | |
| 111 | - `create_time` datetime default now() comment '创建时间', | |
| 112 | - `update_time` datetime default now() comment '更新时间' | |
| 80 | +create table if not exists `tbl_contract_distributor_standard` | |
| 81 | +( | |
| 82 | + `id` varchar(32) primary key comment 'ID', | |
| 83 | + `code` varchar(20) not null comment '编号', | |
| 84 | + `supplier` varchar(50) not null comment '供方', | |
| 85 | + `buyer` varchar(200) not null comment '需方', | |
| 86 | + `dept_id` varchar(32) not null comment '办事处', | |
| 87 | + `order_date` date NOT NULL COMMENT '订货日期', | |
| 88 | + `unit` VARCHAR(50) COMMENT '单位', | |
| 89 | + `total_quantity` DECIMAL(15, 4) COMMENT '合计数量', | |
| 90 | + `total_amount_excluding_tax` DECIMAL(15, 4) COMMENT '合计不含税金额', | |
| 91 | + `total_amount_including_tax` DECIMAL(15, 4) COMMENT '合计总金额', | |
| 92 | + `total_amount_capital` VARCHAR(100) COMMENT '合计人民币金额(大写)', | |
| 93 | + `deposit_info` VARCHAR(500) COMMENT '交付定金信息(包含数额、时间)', | |
| 94 | + `packaging_requirements` VARCHAR(200) COMMENT '包装要求', | |
| 95 | + `payment_terms` VARCHAR(500) COMMENT '付款信息(包含付款方式、付款期限)', | |
| 96 | + `execution_standard` VARCHAR(50) COMMENT '执行标准', | |
| 97 | + `execution_standard_remarks` VARCHAR(100) COMMENT '执行标准备注', | |
| 98 | + `transport_mode` VARCHAR(100) COMMENT '运输方式', | |
| 99 | + `destination` VARCHAR(200) COMMENT '目的地', | |
| 100 | + `includes_packaging_fee` tinyint(1) NOT NULL DEFAULT 0 COMMENT '单价中是否已包含包装费', | |
| 101 | + `includes_transport_fee` tinyint(1) NOT NULL DEFAULT 0 COMMENT '单价中是否已包含运费', | |
| 102 | + `piece_weight_head` TEXT COMMENT '件重条头', | |
| 103 | + `surface` TEXT COMMENT '表面', | |
| 104 | + `tolerance` TEXT COMMENT '公差', | |
| 105 | + `performance` TEXT COMMENT '性能', | |
| 106 | + `packaging` TEXT COMMENT '包装', | |
| 107 | + `special_terms` VARCHAR(50) COMMENT '特别条款要求', | |
| 108 | + `designated_consignee` TEXT COMMENT '需方指定收货人', | |
| 109 | + `remarks` TEXT COMMENT '备注', | |
| 110 | + `create_by_id` varchar(32) not null comment '创建人ID', | |
| 111 | + `create_by` varchar(20) not null comment '创建人', | |
| 112 | + `update_by_id` varchar(32) not null comment '更新人ID', | |
| 113 | + `update_by` varchar(20) not null comment '更新人', | |
| 114 | + `create_time` datetime default now() comment '创建时间', | |
| 115 | + `update_time` datetime default now() comment '更新时间' | |
| 113 | 116 | ); |
| 114 | 117 | |
| 115 | 118 | -- 经销合同物料行 | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/contract/GetContractDistributorStandardBo.java
| ... | ... | @@ -93,6 +93,12 @@ public class GetContractDistributorStandardBo extends BaseBo<ContractDistributor |
| 93 | 93 | private String executionStandard; |
| 94 | 94 | |
| 95 | 95 | /** |
| 96 | + * 执行标准备注 | |
| 97 | + */ | |
| 98 | + @ApiModelProperty("执行标准备注") | |
| 99 | + private String executionStandardRemarks; | |
| 100 | + | |
| 101 | + /** | |
| 96 | 102 | * 运输方式 |
| 97 | 103 | */ |
| 98 | 104 | @ApiModelProperty("运输方式") |
| ... | ... | @@ -141,6 +147,12 @@ public class GetContractDistributorStandardBo extends BaseBo<ContractDistributor |
| 141 | 147 | private String performance; |
| 142 | 148 | |
| 143 | 149 | /** |
| 150 | + * 包装 | |
| 151 | + */ | |
| 152 | + @ApiModelProperty("包装") | |
| 153 | + private String packaging; | |
| 154 | + | |
| 155 | + /** | |
| 144 | 156 | * 特别条款要求 |
| 145 | 157 | */ |
| 146 | 158 | @ApiModelProperty("特别条款要求") | ... | ... |
| ... | ... | @@ -37,12 +37,24 @@ public class QueryContractDistributorStandardBo extends BaseBo<ContractDistribut |
| 37 | 37 | private String buyer; |
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | + * 需方名称 | |
| 41 | + */ | |
| 42 | + @ApiModelProperty("需方名称") | |
| 43 | + private String buyerName; | |
| 44 | + | |
| 45 | + /** | |
| 40 | 46 | * 办事处 |
| 41 | 47 | */ |
| 42 | 48 | @ApiModelProperty("办事处") |
| 43 | 49 | private String deptId; |
| 44 | 50 | |
| 45 | 51 | /** |
| 52 | + * 办事处名称 | |
| 53 | + */ | |
| 54 | + @ApiModelProperty("办事处名称") | |
| 55 | + private String deptName; | |
| 56 | + | |
| 57 | + /** | |
| 46 | 58 | * 创建人 |
| 47 | 59 | */ |
| 48 | 60 | @ApiModelProperty("创建人") | ... | ... |
| 1 | 1 | package com.lframework.xingyun.sc.controller.contract; |
| 2 | 2 | |
| 3 | +import com.baomidou.mybatisplus.core.conditions.Wrapper; | |
| 4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
| 3 | 5 | import com.lframework.starter.common.exceptions.impl.DefaultClientException; |
| 6 | +import com.lframework.starter.common.utils.StringUtil; | |
| 4 | 7 | import com.lframework.starter.web.core.annotations.security.HasPermission; |
| 5 | 8 | import com.lframework.starter.web.core.components.resp.InvokeResult; |
| 6 | 9 | import com.lframework.starter.web.core.components.resp.InvokeResultBuilder; |
| 7 | 10 | import com.lframework.starter.web.core.components.resp.PageResult; |
| 11 | +import com.lframework.starter.web.core.components.security.SecurityUtil; | |
| 8 | 12 | import com.lframework.starter.web.core.controller.DefaultBaseController; |
| 9 | 13 | import com.lframework.starter.web.core.utils.PageResultUtil; |
| 14 | +import com.lframework.starter.web.inner.bo.system.user.GetSysUserBo; | |
| 15 | +import com.lframework.starter.web.inner.entity.SysDept; | |
| 16 | +import com.lframework.starter.web.inner.entity.SysUser; | |
| 17 | +import com.lframework.starter.web.inner.service.system.SysDeptService; | |
| 18 | +import com.lframework.starter.web.inner.service.system.SysUserService; | |
| 19 | +import com.lframework.xingyun.basedata.entity.Customer; | |
| 20 | +import com.lframework.xingyun.basedata.service.customer.CustomerService; | |
| 21 | +import com.lframework.xingyun.basedata.vo.customer.QueryCustomerVo; | |
| 10 | 22 | import com.lframework.xingyun.sc.bo.contract.GetContractDistributorStandardBo; |
| 11 | 23 | import com.lframework.xingyun.sc.bo.contract.QueryContractDistributorStandardBo; |
| 12 | 24 | import com.lframework.xingyun.sc.entity.ContractDistributorStandard; |
| 25 | +import com.lframework.xingyun.sc.entity.PurchaseReturnDetail; | |
| 13 | 26 | import com.lframework.xingyun.sc.service.contract.ContractDistributorStandardService; |
| 14 | 27 | import com.lframework.xingyun.sc.vo.contract.createVo.CreateContractDistributorStandardVo; |
| 15 | 28 | import com.lframework.xingyun.sc.vo.contract.queryVo.QueryContractDistributorStandardVo; |
| ... | ... | @@ -18,6 +31,7 @@ import io.swagger.annotations.Api; |
| 18 | 31 | import io.swagger.annotations.ApiImplicitParam; |
| 19 | 32 | import io.swagger.annotations.ApiOperation; |
| 20 | 33 | import org.apache.commons.collections4.CollectionUtils; |
| 34 | +import org.apache.commons.lang3.StringUtils; | |
| 21 | 35 | import org.springframework.beans.factory.annotation.Autowired; |
| 22 | 36 | import org.springframework.validation.annotation.Validated; |
| 23 | 37 | import org.springframework.web.bind.annotation.*; |
| ... | ... | @@ -25,6 +39,8 @@ import org.springframework.web.bind.annotation.*; |
| 25 | 39 | import javax.validation.Valid; |
| 26 | 40 | import javax.validation.constraints.NotBlank; |
| 27 | 41 | import java.util.List; |
| 42 | +import java.util.Map; | |
| 43 | +import java.util.function.Function; | |
| 28 | 44 | import java.util.stream.Collectors; |
| 29 | 45 | |
| 30 | 46 | /** |
| ... | ... | @@ -38,6 +54,12 @@ public class ContractDistributorStandardController extends DefaultBaseController |
| 38 | 54 | |
| 39 | 55 | @Autowired |
| 40 | 56 | private ContractDistributorStandardService contractDistributorStandardService; |
| 57 | + @Autowired | |
| 58 | + private SysDeptService sysDeptService; | |
| 59 | + @Autowired | |
| 60 | + private CustomerService customerService; | |
| 61 | + @Autowired | |
| 62 | + private SysUserService sysUserService; | |
| 41 | 63 | |
| 42 | 64 | /** |
| 43 | 65 | * 查询列表 |
| ... | ... | @@ -46,6 +68,29 @@ public class ContractDistributorStandardController extends DefaultBaseController |
| 46 | 68 | @HasPermission({"contract:contractDistributorStandard:query"}) |
| 47 | 69 | @GetMapping("/query") |
| 48 | 70 | public InvokeResult<PageResult<QueryContractDistributorStandardBo>> query(@Valid QueryContractDistributorStandardVo vo) { |
| 71 | + if (vo != null && StringUtils.isNotBlank(vo.getBuyerName())) { | |
| 72 | + QueryCustomerVo queryCustomerVo = new QueryCustomerVo(); | |
| 73 | + queryCustomerVo.setName(vo.getBuyerName()); | |
| 74 | + List<Customer> customerList = customerService.query(queryCustomerVo); | |
| 75 | + if (CollectionUtils.isEmpty(customerList)) { | |
| 76 | + PageResult<QueryContractDistributorStandardBo> boPageResult = new PageResult<>(); | |
| 77 | + return InvokeResultBuilder.success(boPageResult); | |
| 78 | + } | |
| 79 | + | |
| 80 | + vo.setBuyerList(customerList.stream().map(Customer::getId).collect(Collectors.toList())); | |
| 81 | + } | |
| 82 | + | |
| 83 | + if (vo != null && StringUtils.isNotBlank(vo.getDeptName())) { | |
| 84 | + Wrapper<SysDept> sysDeptWrapper = Wrappers.lambdaQuery(SysDept.class) | |
| 85 | + .like(SysDept::getName, vo.getDeptName()); | |
| 86 | + List<SysDept> sysDeptList = sysDeptService.list(sysDeptWrapper); | |
| 87 | + if (CollectionUtils.isEmpty(sysDeptList)) { | |
| 88 | + PageResult<QueryContractDistributorStandardBo> boPageResult = new PageResult<>(); | |
| 89 | + return InvokeResultBuilder.success(boPageResult); | |
| 90 | + } | |
| 91 | + | |
| 92 | + vo.setDeptIdList(sysDeptList.stream().map(SysDept::getId).collect(Collectors.toList())); | |
| 93 | + } | |
| 49 | 94 | |
| 50 | 95 | PageResult<ContractDistributorStandard> pageResult = contractDistributorStandardService.query(getPageIndex(vo), getPageSize(vo), vo); |
| 51 | 96 | |
| ... | ... | @@ -56,7 +101,38 @@ public class ContractDistributorStandardController extends DefaultBaseController |
| 56 | 101 | results = datas.stream().map(QueryContractDistributorStandardBo::new).collect(Collectors.toList()); |
| 57 | 102 | } |
| 58 | 103 | |
| 59 | - return InvokeResultBuilder.success(PageResultUtil.rebuild(pageResult, results)); | |
| 104 | + PageResult<QueryContractDistributorStandardBo> boPageResult = PageResultUtil.rebuild(pageResult, results); | |
| 105 | + if (CollectionUtils.isEmpty(boPageResult.getDatas())) { | |
| 106 | + return InvokeResultBuilder.success(boPageResult); | |
| 107 | + } | |
| 108 | + | |
| 109 | + List<QueryContractDistributorStandardBo> boList = boPageResult.getDatas(); | |
| 110 | + List<String> deptIdList = boList.stream().map(QueryContractDistributorStandardBo::getDeptId).collect(Collectors.toList()); | |
| 111 | + Map<String, SysDept> sysDeptMap = CollectionUtils.emptyIfNull(sysDeptService.listByIds(deptIdList)) | |
| 112 | + .stream() | |
| 113 | + .collect(Collectors.toMap(SysDept::getId, Function.identity())); | |
| 114 | + List<String> buyerIdList = boList.stream().map(QueryContractDistributorStandardBo::getBuyer).collect(Collectors.toList()); | |
| 115 | + Map<String, Customer> customerMap = CollectionUtils.emptyIfNull(customerService.listByIds(buyerIdList)) | |
| 116 | + .stream() | |
| 117 | + .collect(Collectors.toMap(Customer::getId, Function.identity())); | |
| 118 | + boList.forEach(bo -> { | |
| 119 | + if (bo == null) { | |
| 120 | + return; | |
| 121 | + } | |
| 122 | + | |
| 123 | + if (StringUtils.isNotBlank(bo.getDeptId())) { | |
| 124 | + SysDept sysDept = sysDeptMap.get(bo.getDeptId()); | |
| 125 | + bo.setDeptName(sysDept == null ? "" : sysDept.getName()); | |
| 126 | + } | |
| 127 | + | |
| 128 | + if (StringUtils.isNotBlank(bo.getBuyer())) { | |
| 129 | + Customer customer = customerMap.get(bo.getBuyer()); | |
| 130 | + bo.setBuyerName(customer == null ? "" : customer.getName()); | |
| 131 | + } | |
| 132 | + }); | |
| 133 | + | |
| 134 | + boPageResult.setDatas(boList); | |
| 135 | + return InvokeResultBuilder.success(boPageResult); | |
| 60 | 136 | } |
| 61 | 137 | |
| 62 | 138 | /** |
| ... | ... | @@ -84,7 +160,18 @@ public class ContractDistributorStandardController extends DefaultBaseController |
| 84 | 160 | @ApiOperation("新增") |
| 85 | 161 | @HasPermission({"contract:contractDistributorStandard:add"}) |
| 86 | 162 | @PostMapping |
| 87 | - public InvokeResult<Void> create(@Valid CreateContractDistributorStandardVo vo) { | |
| 163 | + public InvokeResult<Void> create(@Valid @RequestBody CreateContractDistributorStandardVo vo) { | |
| 164 | + //获取当前人员ID | |
| 165 | + String currentUserId = SecurityUtil.getCurrentUser().getId(); | |
| 166 | + SysUser sysUser = sysUserService.findById(currentUserId); | |
| 167 | + if (sysUser != null) { | |
| 168 | + GetSysUserBo getSysUserBo = new GetSysUserBo(sysUser); | |
| 169 | + //部门 | |
| 170 | + List<String> depts = getSysUserBo.getDepts(); | |
| 171 | + if (org.apache.commons.collections.CollectionUtils.isNotEmpty(depts)) { | |
| 172 | + vo.setDeptId(depts.get(0)); | |
| 173 | + } | |
| 174 | + } | |
| 88 | 175 | |
| 89 | 176 | contractDistributorStandardService.create(vo); |
| 90 | 177 | ... | ... |
| ... | ... | @@ -88,6 +88,11 @@ public class ContractDistributorStandard extends BaseEntity implements BaseDto { |
| 88 | 88 | private String executionStandard; |
| 89 | 89 | |
| 90 | 90 | /** |
| 91 | + * 执行标准备注 | |
| 92 | + */ | |
| 93 | + private String executionStandardRemarks; | |
| 94 | + | |
| 95 | + /** | |
| 91 | 96 | * 运输方式 |
| 92 | 97 | */ |
| 93 | 98 | private String transportMode; |
| ... | ... | @@ -128,6 +133,11 @@ public class ContractDistributorStandard extends BaseEntity implements BaseDto { |
| 128 | 133 | private String performance; |
| 129 | 134 | |
| 130 | 135 | /** |
| 136 | + * 包装 | |
| 137 | + */ | |
| 138 | + private String packaging; | |
| 139 | + | |
| 140 | + /** | |
| 131 | 141 | * 特别条款要求 |
| 132 | 142 | */ |
| 133 | 143 | private String specialTerms; | ... | ... |
| ... | ... | @@ -67,6 +67,7 @@ public class ContractDistributorStandardServiceImpl extends |
| 67 | 67 | data.setCode(vo.getCode()); |
| 68 | 68 | data.setSupplier(vo.getSupplier()); |
| 69 | 69 | data.setBuyer(vo.getBuyer()); |
| 70 | + data.setDeptId(vo.getDeptId()); | |
| 70 | 71 | data.setOrderDate(vo.getOrderDate()); |
| 71 | 72 | data.setUnit(vo.getUnit()); |
| 72 | 73 | data.setTotalAmountCapital(vo.getTotalAmountCapital()); |
| ... | ... | @@ -74,6 +75,7 @@ public class ContractDistributorStandardServiceImpl extends |
| 74 | 75 | data.setPackagingRequirements(vo.getPackagingRequirements()); |
| 75 | 76 | data.setPaymentTerms(vo.getPaymentTerms()); |
| 76 | 77 | data.setExecutionStandard(vo.getExecutionStandard()); |
| 78 | + data.setExecutionStandardRemarks(vo.getExecutionStandardRemarks()); | |
| 77 | 79 | data.setTransportMode(vo.getTransportMode()); |
| 78 | 80 | data.setDestination(vo.getDestination()); |
| 79 | 81 | data.setIncludesPackagingFee(vo.getIncludesPackagingFee()); |
| ... | ... | @@ -82,6 +84,7 @@ public class ContractDistributorStandardServiceImpl extends |
| 82 | 84 | data.setSurface(vo.getSurface()); |
| 83 | 85 | data.setTolerance(vo.getTolerance()); |
| 84 | 86 | data.setPerformance(vo.getPerformance()); |
| 87 | + data.setPackaging(vo.getPackaging()); | |
| 85 | 88 | data.setSpecialTerms(vo.getSpecialTerms()); |
| 86 | 89 | data.setDesignatedConsignee(vo.getDesignatedConsignee()); |
| 87 | 90 | data.setRemarks(vo.getRemarks()); |
| ... | ... | @@ -118,6 +121,7 @@ public class ContractDistributorStandardServiceImpl extends |
| 118 | 121 | .set(ContractDistributorStandard::getPackagingRequirements, vo.getPackagingRequirements()) |
| 119 | 122 | .set(ContractDistributorStandard::getPaymentTerms, vo.getPaymentTerms()) |
| 120 | 123 | .set(ContractDistributorStandard::getExecutionStandard, vo.getExecutionStandard()) |
| 124 | + .set(ContractDistributorStandard::getExecutionStandardRemarks, vo.getExecutionStandardRemarks()) | |
| 121 | 125 | .set(ContractDistributorStandard::getTransportMode, vo.getTransportMode()) |
| 122 | 126 | .set(ContractDistributorStandard::getDestination, vo.getDestination()) |
| 123 | 127 | .set(ContractDistributorStandard::getIncludesPackagingFee, vo.getIncludesPackagingFee()) |
| ... | ... | @@ -126,6 +130,7 @@ public class ContractDistributorStandardServiceImpl extends |
| 126 | 130 | .set(ContractDistributorStandard::getSurface, vo.getSurface()) |
| 127 | 131 | .set(ContractDistributorStandard::getTolerance, vo.getTolerance()) |
| 128 | 132 | .set(ContractDistributorStandard::getPerformance, vo.getPerformance()) |
| 133 | + .set(ContractDistributorStandard::getPackaging, vo.getPackaging()) | |
| 129 | 134 | .set(ContractDistributorStandard::getSpecialTerms, vo.getSpecialTerms()) |
| 130 | 135 | .set(ContractDistributorStandard::getDesignatedConsignee, vo.getDesignatedConsignee()) |
| 131 | 136 | .set(ContractDistributorStandard::getRemarks, vo.getRemarks()) | ... | ... |
| ... | ... | @@ -46,6 +46,11 @@ public class CreateContractDistributorStandardVo implements BaseVo, Serializable |
| 46 | 46 | private String buyer; |
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | + * 办事处 | |
| 50 | + */ | |
| 51 | + private String deptId; | |
| 52 | + | |
| 53 | + /** | |
| 49 | 54 | * 订货日期 |
| 50 | 55 | */ |
| 51 | 56 | @ApiModelProperty(value = "订货日期", required = true) |
| ... | ... | @@ -102,6 +107,13 @@ public class CreateContractDistributorStandardVo implements BaseVo, Serializable |
| 102 | 107 | private String executionStandard; |
| 103 | 108 | |
| 104 | 109 | /** |
| 110 | + * 执行标准备注 | |
| 111 | + */ | |
| 112 | + @ApiModelProperty(value = "执行标准备注") | |
| 113 | + @Length(message = "执行标准备注最多允许100个字符!") | |
| 114 | + private String executionStandardRemarks; | |
| 115 | + | |
| 116 | + /** | |
| 105 | 117 | * 运输方式 |
| 106 | 118 | */ |
| 107 | 119 | @ApiModelProperty(value = "运输方式", required = true) |
| ... | ... | @@ -166,6 +178,14 @@ public class CreateContractDistributorStandardVo implements BaseVo, Serializable |
| 166 | 178 | private String performance; |
| 167 | 179 | |
| 168 | 180 | /** |
| 181 | + * 包装 | |
| 182 | + */ | |
| 183 | + @ApiModelProperty(value = "包装", required = true) | |
| 184 | + @NotBlank(message = "请输入包装!") | |
| 185 | + @Length(message = "包装最多允许65,535个字符!") | |
| 186 | + private String packaging; | |
| 187 | + | |
| 188 | + /** | |
| 169 | 189 | * 特别条款要求 |
| 170 | 190 | */ |
| 171 | 191 | @ApiModelProperty(value = "特别条款要求", required = true) | ... | ... |
| ... | ... | @@ -10,6 +10,7 @@ import com.lframework.starter.web.core.components.validation.TypeMismatch; |
| 10 | 10 | import io.swagger.annotations.ApiModelProperty; |
| 11 | 11 | |
| 12 | 12 | import java.io.Serializable; |
| 13 | +import java.util.List; | |
| 13 | 14 | |
| 14 | 15 | @Data |
| 15 | 16 | public class QueryContractDistributorStandardVo extends PageVo implements BaseVo, Serializable { |
| ... | ... | @@ -26,13 +27,25 @@ public class QueryContractDistributorStandardVo extends PageVo implements BaseVo |
| 26 | 27 | * 需方 |
| 27 | 28 | */ |
| 28 | 29 | @ApiModelProperty("需方") |
| 29 | - private String buyer; | |
| 30 | + private String buyerName; | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 需方Id集合 | |
| 34 | + */ | |
| 35 | + @ApiModelProperty("需方Id集合") | |
| 36 | + private List<String> buyerList; | |
| 30 | 37 | |
| 31 | 38 | /** |
| 32 | 39 | * 办事处 |
| 33 | 40 | */ |
| 34 | 41 | @ApiModelProperty("办事处") |
| 35 | - private String deptId; | |
| 42 | + private String deptName; | |
| 43 | + | |
| 44 | + /** | |
| 45 | + * 办事处Id集合 | |
| 46 | + */ | |
| 47 | + @ApiModelProperty("办事处Id集合") | |
| 48 | + private List<String> deptIdList; | |
| 36 | 49 | |
| 37 | 50 | /** |
| 38 | 51 | * 订货日期 | ... | ... |
| ... | ... | @@ -117,6 +117,13 @@ public class UpdateContractDistributorStandardVo implements BaseVo, Serializable |
| 117 | 117 | private String transportMode; |
| 118 | 118 | |
| 119 | 119 | /** |
| 120 | + * 执行标准备注 | |
| 121 | + */ | |
| 122 | + @ApiModelProperty(value = "执行标准备注") | |
| 123 | + @Length(message = "执行标准备注最多允许100个字符!") | |
| 124 | + private String executionStandardRemarks; | |
| 125 | + | |
| 126 | + /** | |
| 120 | 127 | * 目的地 |
| 121 | 128 | */ |
| 122 | 129 | @ApiModelProperty(value = "目的地", required = true) |
| ... | ... | @@ -173,6 +180,14 @@ public class UpdateContractDistributorStandardVo implements BaseVo, Serializable |
| 173 | 180 | private String performance; |
| 174 | 181 | |
| 175 | 182 | /** |
| 183 | + * 包装 | |
| 184 | + */ | |
| 185 | + @ApiModelProperty(value = "包装", required = true) | |
| 186 | + @NotBlank(message = "请输入包装!") | |
| 187 | + @Length(message = "包装最多允许65,535个字符!") | |
| 188 | + private String packaging; | |
| 189 | + | |
| 190 | + /** | |
| 176 | 191 | * 特别条款要求 |
| 177 | 192 | */ |
| 178 | 193 | @ApiModelProperty(value = "特别条款要求", required = true) | ... | ... |
| ... | ... | @@ -15,6 +15,7 @@ |
| 15 | 15 | <result column="packaging_requirements" property="packagingRequirements"/> |
| 16 | 16 | <result column="payment_terms" property="paymentTerms"/> |
| 17 | 17 | <result column="execution_standard" property="executionStandard"/> |
| 18 | + <result column="execution_standard_remarks" property="executionStandardRemarks"/> | |
| 18 | 19 | <result column="transport_mode" property="transportMode"/> |
| 19 | 20 | <result column="destination" property="destination"/> |
| 20 | 21 | <result column="includes_packaging_fee" property="includesPackagingFee"/> |
| ... | ... | @@ -23,6 +24,7 @@ |
| 23 | 24 | <result column="surface" property="surface"/> |
| 24 | 25 | <result column="tolerance" property="tolerance"/> |
| 25 | 26 | <result column="performance" property="performance"/> |
| 27 | + <result column="packaging" property="packaging"/> | |
| 26 | 28 | <result column="special_terms" property="specialTerms"/> |
| 27 | 29 | <result column="designated_consignee" property="designatedConsignee"/> |
| 28 | 30 | <result column="remarks" property="remarks"/> |
| ... | ... | @@ -32,7 +34,7 @@ |
| 32 | 34 | <result column="update_by" property="updateBy"/> |
| 33 | 35 | <result column="create_time" property="createTime"/> |
| 34 | 36 | <result column="update_time" property="updateTime"/> |
| 35 | - <result column="total_quantit" property="totalQuantit"/> | |
| 37 | + <result column="total_quantity" property="totalQuantity"/> | |
| 36 | 38 | <result column="total_amount_excluding_tax" property="totalAmountExcludingTax"/> |
| 37 | 39 | <result column="total_amount_including_tax" property="totalAmountIncludingTax"/> |
| 38 | 40 | </resultMap> |
| ... | ... | @@ -51,6 +53,7 @@ |
| 51 | 53 | tb.packaging_requirements, |
| 52 | 54 | tb.payment_terms, |
| 53 | 55 | tb.execution_standard, |
| 56 | + tb.execution_standard_remarks, | |
| 54 | 57 | tb.transport_mode, |
| 55 | 58 | tb.destination, |
| 56 | 59 | tb.includes_packaging_fee, |
| ... | ... | @@ -59,6 +62,7 @@ |
| 59 | 62 | tb.surface, |
| 60 | 63 | tb.tolerance, |
| 61 | 64 | tb.performance, |
| 65 | + tb.packaging, | |
| 62 | 66 | tb.special_terms, |
| 63 | 67 | tb.designated_consignee, |
| 64 | 68 | tb.remarks, |
| ... | ... | @@ -68,7 +72,7 @@ |
| 68 | 72 | tb.update_by, |
| 69 | 73 | tb.create_time, |
| 70 | 74 | tb.update_time, |
| 71 | - tb.total_quantit, | |
| 75 | + tb.total_quantity, | |
| 72 | 76 | tb.total_amount_excluding_tax, |
| 73 | 77 | tb.total_amount_including_tax |
| 74 | 78 | FROM tbl_contract_distributor_standard AS tb |
| ... | ... | @@ -80,11 +84,17 @@ |
| 80 | 84 | <if test="vo.code != null and vo.code != ''"> |
| 81 | 85 | AND tb.code LIKE CONCAT('%', #{vo.code}) |
| 82 | 86 | </if> |
| 83 | - <if test="vo.buyer != null and vo.buyer != ''"> | |
| 84 | - AND tb.buyer LIKE CONCAT('%', #{vo.buyer}) | |
| 87 | + <if test="vo.buyerList != null and vo.buyerList.size() > 0"> | |
| 88 | + AND tb.buyer IN | |
| 89 | + <foreach collection="vo.buyerList" open="(" separator="," close=")" item="item"> | |
| 90 | + #{item} | |
| 91 | + </foreach> | |
| 85 | 92 | </if> |
| 86 | - <if test="vo.deptId != null and vo.deptId != ''"> | |
| 87 | - AND tb.dept_id = #{vo.deptId} | |
| 93 | + <if test="vo.deptIdList != null and vo.deptIdList.size() > 0"> | |
| 94 | + AND tb.dept_id IN | |
| 95 | + <foreach collection="vo.deptIdList" open="(" separator="," close=")" item="item"> | |
| 96 | + #{item} | |
| 97 | + </foreach> | |
| 88 | 98 | </if> |
| 89 | 99 | <if test="vo.orderDate != null"> |
| 90 | 100 | AND tb.order_date IN (#{vo.orderDate}) | ... | ... |