Commit 8e2c253a1f7af7e50374484efa4e9ed061f22b74
Merge remote-tracking branch 'origin/master_0929' into master_0929
Showing
20 changed files
with
1345 additions
and
6 deletions
| ... | ... | @@ -106,8 +106,11 @@ create table if not exists `tbl_contract_distributor_standard` |
| 106 | 106 | `packaging` TEXT COMMENT '包装', |
| 107 | 107 | `special_terms` VARCHAR(50) COMMENT '特别条款要求', |
| 108 | 108 | `designated_consignee` TEXT COMMENT '需方指定收货人', |
| 109 | + `special_instructions` TEXT COMMENT '特别说明', | |
| 109 | 110 | `remarks` TEXT COMMENT '备注', |
| 110 | 111 | `status` varchar(20) not null DEFAULT 'DRAFT' COMMENT '状态', |
| 112 | + `type` varchar(20) COMMENT '合同类型', | |
| 113 | + `parent_id` varchar(32) COMMENT '父合同id', | |
| 111 | 114 | `create_by_id` varchar(32) not null comment '创建人ID', |
| 112 | 115 | `create_by` varchar(20) not null comment '创建人', |
| 113 | 116 | `update_by_id` varchar(32) not null comment '更新人ID', | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/contract/GetContractDistributorLineBo.java
0 → 100644
| 1 | +package com.lframework.xingyun.sc.bo.contract; | |
| 2 | + | |
| 3 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
| 4 | +import com.lframework.starter.common.constants.StringPool; | |
| 5 | +import com.lframework.starter.web.core.bo.BaseBo; | |
| 6 | +import com.lframework.xingyun.sc.entity.ContractDistributorLine; | |
| 7 | +import io.swagger.annotations.ApiModelProperty; | |
| 8 | +import lombok.Data; | |
| 9 | + | |
| 10 | +import java.math.BigDecimal; | |
| 11 | +import java.time.LocalDate; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * <p> | |
| 15 | + * 经销标准合同物料行 GetBo | |
| 16 | + * </p> | |
| 17 | + */ | |
| 18 | +@Data | |
| 19 | +public class GetContractDistributorLineBo extends BaseBo<ContractDistributorLine> { | |
| 20 | + | |
| 21 | + /** | |
| 22 | + * ID | |
| 23 | + */ | |
| 24 | + @ApiModelProperty("ID") | |
| 25 | + private String id; | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * 合同主表ID | |
| 29 | + */ | |
| 30 | + @ApiModelProperty("合同主表ID") | |
| 31 | + private String contractId; | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 行业 | |
| 35 | + */ | |
| 36 | + @ApiModelProperty("行业") | |
| 37 | + private String industry; | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 品质 | |
| 41 | + */ | |
| 42 | + @ApiModelProperty("品质") | |
| 43 | + private String quality; | |
| 44 | + | |
| 45 | + /** | |
| 46 | + * 牌号 | |
| 47 | + */ | |
| 48 | + @ApiModelProperty("牌号") | |
| 49 | + private String brand; | |
| 50 | + | |
| 51 | + /** | |
| 52 | + * 厚度 | |
| 53 | + */ | |
| 54 | + @ApiModelProperty("厚度") | |
| 55 | + private BigDecimal thickness; | |
| 56 | + | |
| 57 | + /** | |
| 58 | + * 宽度 | |
| 59 | + */ | |
| 60 | + @ApiModelProperty("宽度") | |
| 61 | + private BigDecimal width; | |
| 62 | + | |
| 63 | + /** | |
| 64 | + * 长度 | |
| 65 | + */ | |
| 66 | + @ApiModelProperty("长度") | |
| 67 | + private BigDecimal length; | |
| 68 | + | |
| 69 | + /** | |
| 70 | + * 状态 | |
| 71 | + */ | |
| 72 | + @ApiModelProperty("状态") | |
| 73 | + private String status; | |
| 74 | + | |
| 75 | + /** | |
| 76 | + * 数量 | |
| 77 | + */ | |
| 78 | + @ApiModelProperty("数量") | |
| 79 | + private BigDecimal quantity; | |
| 80 | + | |
| 81 | + /** | |
| 82 | + * 单价 | |
| 83 | + */ | |
| 84 | + @ApiModelProperty("单价") | |
| 85 | + private BigDecimal unitPrice; | |
| 86 | + | |
| 87 | + /** | |
| 88 | + * 不含税金额 | |
| 89 | + */ | |
| 90 | + @ApiModelProperty("不含税金额") | |
| 91 | + private BigDecimal amountExcludingTax; | |
| 92 | + | |
| 93 | + /** | |
| 94 | + * 总金额 | |
| 95 | + */ | |
| 96 | + @ApiModelProperty("总金额") | |
| 97 | + private BigDecimal totalAmount; | |
| 98 | + | |
| 99 | + /** | |
| 100 | + * 发货日期 | |
| 101 | + */ | |
| 102 | + @ApiModelProperty("发货日期") | |
| 103 | + @JsonFormat(pattern = StringPool.DATE_PATTERN) | |
| 104 | + private LocalDate deliveryDate; | |
| 105 | + | |
| 106 | + /** | |
| 107 | + * 排序 | |
| 108 | + */ | |
| 109 | + @ApiModelProperty("排序") | |
| 110 | + private Integer showOrder; | |
| 111 | + | |
| 112 | + /** | |
| 113 | + * 产品名称 | |
| 114 | + */ | |
| 115 | + @ApiModelProperty("产品名称") | |
| 116 | + private String productId; | |
| 117 | + | |
| 118 | + /** | |
| 119 | + * 产品名称 | |
| 120 | + */ | |
| 121 | + @ApiModelProperty("产品名称") | |
| 122 | + private String productName; | |
| 123 | + | |
| 124 | + /** | |
| 125 | + * 厚度公差正 | |
| 126 | + */ | |
| 127 | + @ApiModelProperty("厚度公差正") | |
| 128 | + private BigDecimal thicknessTolPos; | |
| 129 | + | |
| 130 | + /** | |
| 131 | + * 厚度公差负 | |
| 132 | + */ | |
| 133 | + @ApiModelProperty("厚度公差负") | |
| 134 | + private BigDecimal thicknessTolNeg; | |
| 135 | + | |
| 136 | + /** | |
| 137 | + * 宽度公差正 | |
| 138 | + */ | |
| 139 | + @ApiModelProperty("宽度公差正") | |
| 140 | + private BigDecimal widthTolPos; | |
| 141 | + | |
| 142 | + /** | |
| 143 | + * 宽度公差负 | |
| 144 | + */ | |
| 145 | + @ApiModelProperty("宽度公差负") | |
| 146 | + private BigDecimal widthTolNeg; | |
| 147 | + | |
| 148 | + /** | |
| 149 | + * 长度公差正 | |
| 150 | + */ | |
| 151 | + @ApiModelProperty("长度公差正") | |
| 152 | + private BigDecimal lengthTolPos; | |
| 153 | + | |
| 154 | + /** | |
| 155 | + * 长度公差负 | |
| 156 | + */ | |
| 157 | + @ApiModelProperty("长度公差负") | |
| 158 | + private BigDecimal lengthTolNeg; | |
| 159 | + | |
| 160 | + public GetContractDistributorLineBo() { | |
| 161 | + | |
| 162 | + } | |
| 163 | + | |
| 164 | + public GetContractDistributorLineBo(ContractDistributorLine dto) { | |
| 165 | + | |
| 166 | + super(dto); | |
| 167 | + } | |
| 168 | + | |
| 169 | + @Override | |
| 170 | + public BaseBo<ContractDistributorLine> convert(ContractDistributorLine dto) { | |
| 171 | + return super.convert(dto); | |
| 172 | + } | |
| 173 | + | |
| 174 | + @Override | |
| 175 | + protected void afterInit(ContractDistributorLine dto) { | |
| 176 | + | |
| 177 | + } | |
| 178 | +} | |
| 179 | + | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/bo/contract/GetContractDistributorStandardBo.java
| ... | ... | @@ -6,15 +6,17 @@ import com.lframework.starter.web.core.bo.BaseBo; |
| 6 | 6 | import com.lframework.xingyun.sc.entity.ContractDistributorStandard; |
| 7 | 7 | import io.swagger.annotations.ApiModelProperty; |
| 8 | 8 | import lombok.Data; |
| 9 | +import org.hibernate.validator.constraints.Length; | |
| 9 | 10 | |
| 11 | +import javax.validation.constraints.NotBlank; | |
| 10 | 12 | import java.math.BigDecimal; |
| 11 | 13 | import java.time.LocalDate; |
| 14 | +import java.util.List; | |
| 12 | 15 | |
| 13 | 16 | /** |
| 14 | 17 | * <p> |
| 15 | 18 | * 经销标准合同 GetBo |
| 16 | 19 | * </p> |
| 17 | - * | |
| 18 | 20 | */ |
| 19 | 21 | @Data |
| 20 | 22 | public class GetContractDistributorStandardBo extends BaseBo<ContractDistributorStandard> { |
| ... | ... | @@ -38,18 +40,36 @@ public class GetContractDistributorStandardBo extends BaseBo<ContractDistributor |
| 38 | 40 | private String supplier; |
| 39 | 41 | |
| 40 | 42 | /** |
| 43 | + * 供方名称 | |
| 44 | + */ | |
| 45 | + @ApiModelProperty("供方名称") | |
| 46 | + private String supplierName; | |
| 47 | + | |
| 48 | + /** | |
| 41 | 49 | * 需方 |
| 42 | 50 | */ |
| 43 | 51 | @ApiModelProperty("需方") |
| 44 | 52 | private String buyer; |
| 45 | 53 | |
| 46 | 54 | /** |
| 55 | + * 需方名称 | |
| 56 | + */ | |
| 57 | + @ApiModelProperty("需方名称") | |
| 58 | + private String buyerName; | |
| 59 | + | |
| 60 | + /** | |
| 47 | 61 | * 办事处 |
| 48 | 62 | */ |
| 49 | 63 | @ApiModelProperty("办事处") |
| 50 | 64 | private String deptId; |
| 51 | 65 | |
| 52 | 66 | /** |
| 67 | + * 办事处名称 | |
| 68 | + */ | |
| 69 | + @ApiModelProperty("办事处名称") | |
| 70 | + private String deptName; | |
| 71 | + | |
| 72 | + /** | |
| 53 | 73 | * 订货日期 |
| 54 | 74 | */ |
| 55 | 75 | @ApiModelProperty("订货日期") |
| ... | ... | @@ -63,6 +83,12 @@ public class GetContractDistributorStandardBo extends BaseBo<ContractDistributor |
| 63 | 83 | private String unit; |
| 64 | 84 | |
| 65 | 85 | /** |
| 86 | + * 单位名称 | |
| 87 | + */ | |
| 88 | + @ApiModelProperty("单位名称") | |
| 89 | + private String unitName; | |
| 90 | + | |
| 91 | + /** | |
| 66 | 92 | * 合计人民币金额(大写) |
| 67 | 93 | */ |
| 68 | 94 | @ApiModelProperty("合计人民币金额(大写)") |
| ... | ... | @@ -93,6 +119,12 @@ public class GetContractDistributorStandardBo extends BaseBo<ContractDistributor |
| 93 | 119 | private String executionStandard; |
| 94 | 120 | |
| 95 | 121 | /** |
| 122 | + * 执行标准名称 | |
| 123 | + */ | |
| 124 | + @ApiModelProperty("执行标准名称") | |
| 125 | + private String executionStandardName; | |
| 126 | + | |
| 127 | + /** | |
| 96 | 128 | * 执行标准备注 |
| 97 | 129 | */ |
| 98 | 130 | @ApiModelProperty("执行标准备注") |
| ... | ... | @@ -159,12 +191,24 @@ public class GetContractDistributorStandardBo extends BaseBo<ContractDistributor |
| 159 | 191 | private String specialTerms; |
| 160 | 192 | |
| 161 | 193 | /** |
| 194 | + * 特别条款要求名称 | |
| 195 | + */ | |
| 196 | + @ApiModelProperty("特别条款要求名称") | |
| 197 | + private String specialTermsName; | |
| 198 | + | |
| 199 | + /** | |
| 162 | 200 | * 需方指定收货人 |
| 163 | 201 | */ |
| 164 | 202 | @ApiModelProperty("需方指定收货人") |
| 165 | 203 | private String designatedConsignee; |
| 166 | 204 | |
| 167 | 205 | /** |
| 206 | + * 特别说明 | |
| 207 | + */ | |
| 208 | + @ApiModelProperty(value = "特别说明") | |
| 209 | + private String specialInstructions; | |
| 210 | + | |
| 211 | + /** | |
| 168 | 212 | * 备注 |
| 169 | 213 | */ |
| 170 | 214 | @ApiModelProperty("备注") |
| ... | ... | @@ -188,6 +232,30 @@ public class GetContractDistributorStandardBo extends BaseBo<ContractDistributor |
| 188 | 232 | @ApiModelProperty("合计数量") |
| 189 | 233 | private BigDecimal totalQuantity; |
| 190 | 234 | |
| 235 | + /** | |
| 236 | + * 状态(DRAFT:草稿;FORMAL:正式;DELETED:删除) | |
| 237 | + */ | |
| 238 | + @ApiModelProperty(value = "状态") | |
| 239 | + private String status; | |
| 240 | + | |
| 241 | + /** | |
| 242 | + * 合同类型 | |
| 243 | + */ | |
| 244 | + @ApiModelProperty(value = "合同类型") | |
| 245 | + private String type; | |
| 246 | + | |
| 247 | + /** | |
| 248 | + * 父合同id | |
| 249 | + */ | |
| 250 | + @ApiModelProperty(value = "父合同id") | |
| 251 | + private String parentId; | |
| 252 | + | |
| 253 | + /** | |
| 254 | + * 经销标准合同物料行 | |
| 255 | + */ | |
| 256 | + @ApiModelProperty("经销标准合同物料行") | |
| 257 | + private List<GetContractDistributorLineBo> contractDistributorLineList; | |
| 258 | + | |
| 191 | 259 | public GetContractDistributorStandardBo() { |
| 192 | 260 | |
| 193 | 261 | } | ... | ... |
| ... | ... | @@ -91,6 +91,18 @@ public class QueryContractDistributorStandardBo extends BaseBo<ContractDistribut |
| 91 | 91 | @ApiModelProperty("合计数量") |
| 92 | 92 | private BigDecimal totalQuantity; |
| 93 | 93 | |
| 94 | + /** | |
| 95 | + * 状态 | |
| 96 | + */ | |
| 97 | + @ApiModelProperty("状态") | |
| 98 | + private String status; | |
| 99 | + | |
| 100 | + /** | |
| 101 | + * 类型 | |
| 102 | + */ | |
| 103 | + @ApiModelProperty("类型") | |
| 104 | + private String type; | |
| 105 | + | |
| 94 | 106 | public QueryContractDistributorStandardBo() { |
| 95 | 107 | |
| 96 | 108 | } | ... | ... |
| ... | ... | @@ -3,7 +3,6 @@ package com.lframework.xingyun.sc.controller.contract; |
| 3 | 3 | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| 4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 5 | 5 | import com.lframework.starter.common.exceptions.impl.DefaultClientException; |
| 6 | -import com.lframework.starter.common.utils.StringUtil; | |
| 7 | 6 | import com.lframework.starter.web.core.annotations.security.HasPermission; |
| 8 | 7 | import com.lframework.starter.web.core.components.resp.InvokeResult; |
| 9 | 8 | import com.lframework.starter.web.core.components.resp.InvokeResultBuilder; |
| ... | ... | @@ -12,17 +11,21 @@ import com.lframework.starter.web.core.components.security.SecurityUtil; |
| 12 | 11 | import com.lframework.starter.web.core.controller.DefaultBaseController; |
| 13 | 12 | import com.lframework.starter.web.core.utils.PageResultUtil; |
| 14 | 13 | import com.lframework.starter.web.inner.bo.system.user.GetSysUserBo; |
| 14 | +import com.lframework.starter.web.inner.entity.SysDataDicItem; | |
| 15 | 15 | import com.lframework.starter.web.inner.entity.SysDept; |
| 16 | 16 | import com.lframework.starter.web.inner.entity.SysUser; |
| 17 | +import com.lframework.starter.web.inner.service.system.SysDataDicItemService; | |
| 17 | 18 | import com.lframework.starter.web.inner.service.system.SysDeptService; |
| 18 | 19 | import com.lframework.starter.web.inner.service.system.SysUserService; |
| 19 | 20 | import com.lframework.xingyun.basedata.entity.Customer; |
| 20 | 21 | import com.lframework.xingyun.basedata.service.customer.CustomerService; |
| 21 | 22 | import com.lframework.xingyun.basedata.vo.customer.QueryCustomerVo; |
| 23 | +import com.lframework.xingyun.sc.bo.contract.GetContractDistributorLineBo; | |
| 22 | 24 | import com.lframework.xingyun.sc.bo.contract.GetContractDistributorStandardBo; |
| 23 | 25 | import com.lframework.xingyun.sc.bo.contract.QueryContractDistributorStandardBo; |
| 26 | +import com.lframework.xingyun.sc.entity.ContractDistributorLine; | |
| 24 | 27 | import com.lframework.xingyun.sc.entity.ContractDistributorStandard; |
| 25 | -import com.lframework.xingyun.sc.entity.PurchaseReturnDetail; | |
| 28 | +import com.lframework.xingyun.sc.service.contract.ContractDistributorLineService; | |
| 26 | 29 | import com.lframework.xingyun.sc.service.contract.ContractDistributorStandardService; |
| 27 | 30 | import com.lframework.xingyun.sc.vo.contract.createVo.CreateContractDistributorStandardVo; |
| 28 | 31 | import com.lframework.xingyun.sc.vo.contract.queryVo.QueryContractDistributorStandardVo; |
| ... | ... | @@ -38,6 +41,7 @@ import org.springframework.web.bind.annotation.*; |
| 38 | 41 | |
| 39 | 42 | import javax.validation.Valid; |
| 40 | 43 | import javax.validation.constraints.NotBlank; |
| 44 | +import java.util.ArrayList; | |
| 41 | 45 | import java.util.List; |
| 42 | 46 | import java.util.Map; |
| 43 | 47 | import java.util.function.Function; |
| ... | ... | @@ -55,11 +59,21 @@ public class ContractDistributorStandardController extends DefaultBaseController |
| 55 | 59 | @Autowired |
| 56 | 60 | private ContractDistributorStandardService contractDistributorStandardService; |
| 57 | 61 | @Autowired |
| 62 | + private ContractDistributorLineService contractDistributorLineService; | |
| 63 | + @Autowired | |
| 58 | 64 | private SysDeptService sysDeptService; |
| 59 | 65 | @Autowired |
| 60 | 66 | private CustomerService customerService; |
| 61 | 67 | @Autowired |
| 62 | 68 | private SysUserService sysUserService; |
| 69 | + @Autowired | |
| 70 | + private SysDataDicItemService sysDataDicItemService; | |
| 71 | + | |
| 72 | + public static final String SUPPLIER_DIC_CODE = "SUPPLIER"; // 所属单位/供方 | |
| 73 | + public static final String UNIT_DIC_CODE = "UNIT"; // 单位 | |
| 74 | + public static final String CONTRACT_PRODUCT_DIC_CODE = "CONTRACT_PRODUCT"; // 合同产品名称 | |
| 75 | + public static final String CONDITIONS_REQUIRED_DIC_CODE = "CONDITIONS_REQUIRED"; // 特别条款要求 | |
| 76 | + public static final String APPLICABLE_STANDARD_DIC_CODE = "APPLICABLE_STANDARD"; // 执行标准 | |
| 63 | 77 | |
| 64 | 78 | /** |
| 65 | 79 | * 查询列表 |
| ... | ... | @@ -150,7 +164,37 @@ public class ContractDistributorStandardController extends DefaultBaseController |
| 150 | 164 | } |
| 151 | 165 | |
| 152 | 166 | GetContractDistributorStandardBo result = new GetContractDistributorStandardBo(data); |
| 167 | + Wrapper<ContractDistributorLine> lineWrapper = Wrappers.lambdaQuery(ContractDistributorLine.class) | |
| 168 | + .eq(ContractDistributorLine::getContractId, id) | |
| 169 | + .orderByAsc(ContractDistributorLine::getShowOrder); | |
| 170 | + List<ContractDistributorLine> contractDistributorLineList = contractDistributorLineService.list(lineWrapper); | |
| 171 | + if (CollectionUtils.isEmpty(contractDistributorLineList)) { | |
| 172 | + throw new DefaultClientException("经销标准合同物料行为空!"); | |
| 173 | + } | |
| 153 | 174 | |
| 175 | + String buyerId = result.getBuyer(); | |
| 176 | + Customer customer = customerService.findById(buyerId); | |
| 177 | + result.setBuyerName(customer.getName()); | |
| 178 | + SysDataDicItem supplierDicItem = sysDataDicItemService.findByCode(SUPPLIER_DIC_CODE, result.getSupplier()); | |
| 179 | + result.setSupplierName(supplierDicItem == null ? "" : supplierDicItem.getName()); | |
| 180 | + SysDataDicItem unitDicItem = sysDataDicItemService.findByCode(UNIT_DIC_CODE, result.getUnit()); | |
| 181 | + result.setUnitName(unitDicItem == null ? "" : unitDicItem.getName()); | |
| 182 | + SysDataDicItem requiredDicItem = sysDataDicItemService.findByCode(CONDITIONS_REQUIRED_DIC_CODE, result.getSpecialTerms()); | |
| 183 | + result.setSpecialTermsName(requiredDicItem == null ? "" : requiredDicItem.getName()); | |
| 184 | + SysDataDicItem standardDicItem = sysDataDicItemService.findByCode(APPLICABLE_STANDARD_DIC_CODE, result.getExecutionStandard()); | |
| 185 | + result.setExecutionStandardName(standardDicItem == null ? "" : standardDicItem.getName()); | |
| 186 | + | |
| 187 | + List<SysDataDicItem> productDicItemList = sysDataDicItemService.findByDicCode(CONTRACT_PRODUCT_DIC_CODE); | |
| 188 | + Map<String, String> productCodeAndNameMap = productDicItemList.stream().collect(Collectors.toMap(SysDataDicItem::getCode, SysDataDicItem::getName)); | |
| 189 | + List<GetContractDistributorLineBo> lineBoList = new ArrayList<>(contractDistributorLineList.size()); | |
| 190 | + contractDistributorLineList.forEach(contractDistributorLine -> { | |
| 191 | + GetContractDistributorLineBo contractDistributorLineBo = new GetContractDistributorLineBo(contractDistributorLine); | |
| 192 | + String productName = productCodeAndNameMap.get(contractDistributorLineBo.getProductId()); | |
| 193 | + contractDistributorLineBo.setProductName(productName); | |
| 194 | + lineBoList.add(contractDistributorLineBo); | |
| 195 | + }); | |
| 196 | + | |
| 197 | + result.setContractDistributorLineList(lineBoList); | |
| 154 | 198 | return InvokeResultBuilder.success(result); |
| 155 | 199 | } |
| 156 | 200 | |
| ... | ... | @@ -161,6 +205,10 @@ public class ContractDistributorStandardController extends DefaultBaseController |
| 161 | 205 | @HasPermission({"contract:contractDistributorStandard:add"}) |
| 162 | 206 | @PostMapping |
| 163 | 207 | public InvokeResult<Void> create(@Valid @RequestBody CreateContractDistributorStandardVo vo) { |
| 208 | + if (CollectionUtils.isEmpty(vo.getContractDistributorLineList())) { | |
| 209 | + throw new DefaultClientException("经销标准合同物料行不可为空"); | |
| 210 | + } | |
| 211 | + | |
| 164 | 212 | //获取当前人员ID |
| 165 | 213 | String currentUserId = SecurityUtil.getCurrentUser().getId(); |
| 166 | 214 | SysUser sysUser = sysUserService.findById(currentUserId); | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/customer/CustomerCreditController.java
| ... | ... | @@ -2,8 +2,10 @@ package com.lframework.xingyun.sc.controller.customer; |
| 2 | 2 | |
| 3 | 3 | import com.lframework.starter.common.utils.StringUtil; |
| 4 | 4 | import com.lframework.starter.web.core.annotations.security.HasPermission; |
| 5 | +import com.lframework.starter.web.core.components.redis.RedisHandler; | |
| 5 | 6 | import com.lframework.starter.web.core.controller.DefaultBaseController; |
| 6 | 7 | import com.lframework.starter.web.core.utils.ExcelUtil; |
| 8 | +import com.lframework.starter.web.core.utils.JsonUtil; | |
| 7 | 9 | import com.lframework.starter.web.inner.bo.system.user.QuerySysUserBo; |
| 8 | 10 | import com.lframework.starter.web.inner.entity.SysUser; |
| 9 | 11 | import com.lframework.starter.web.inner.service.system.SysUserService; |
| ... | ... | @@ -65,6 +67,8 @@ public class CustomerCreditController extends DefaultBaseController { |
| 65 | 67 | private CorePersonnelService corePersonnelService; |
| 66 | 68 | @Resource |
| 67 | 69 | private SysUserService sysUserService; |
| 70 | + @Autowired | |
| 71 | + private RedisHandler redisHandler; | |
| 68 | 72 | |
| 69 | 73 | /** |
| 70 | 74 | * 查询列表 |
| ... | ... | @@ -106,6 +110,36 @@ public class CustomerCreditController extends DefaultBaseController { |
| 106 | 110 | } |
| 107 | 111 | |
| 108 | 112 | /** |
| 113 | + * 根据ID查询变更审核的数据 | |
| 114 | + */ | |
| 115 | + @ApiOperation("根据ID查询") | |
| 116 | + @ApiImplicitParam(value = "id", name = "id", paramType = "query", required = true) | |
| 117 | + @HasPermission({"customer-credit-manage:customer-credit-plan:examine"}) | |
| 118 | + @GetMapping("/getExamineById") | |
| 119 | + public InvokeResult<GetCustomerCreditBo> getExamineById(@NotBlank(message = "id不能为空!") String id) { | |
| 120 | + | |
| 121 | + Object o = redisHandler.get(id); | |
| 122 | + CustomerCredit customerCredit = null; | |
| 123 | + if (o != null) { | |
| 124 | + String jsonString = o.toString(); | |
| 125 | + // 2. 反序列化为 CustomerCredit 对象 | |
| 126 | + customerCredit = JsonUtil.parseObject(jsonString, CustomerCredit.class); | |
| 127 | + GetCustomerCreditBo result = packCustomerCreditData(customerCredit); | |
| 128 | + return InvokeResultBuilder.success(result); | |
| 129 | + } else { | |
| 130 | + CustomerCredit data = customerCreditService.findById(id); | |
| 131 | + if (data == null) { | |
| 132 | + throw new DefaultClientException("客户资信表不存在!"); | |
| 133 | + } | |
| 134 | + | |
| 135 | + GetCustomerCreditBo result = packCustomerCreditData(data); | |
| 136 | + | |
| 137 | + return InvokeResultBuilder.success(result); | |
| 138 | + } | |
| 139 | + | |
| 140 | + } | |
| 141 | + | |
| 142 | + /** | |
| 109 | 143 | * 新增 |
| 110 | 144 | */ |
| 111 | 145 | @ApiOperation("新增") | ... | ... |
| 1 | +package com.lframework.xingyun.sc.entity; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.annotation.FieldFill; | |
| 4 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 5 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 6 | +import com.lframework.starter.web.core.dto.BaseDto; | |
| 7 | +import com.lframework.starter.web.core.entity.BaseEntity; | |
| 8 | +import lombok.Data; | |
| 9 | + | |
| 10 | +import java.math.BigDecimal; | |
| 11 | +import java.time.LocalDate; | |
| 12 | +import java.time.LocalDateTime; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * <p> | |
| 16 | + * 经销标准合同物料行 | |
| 17 | + * </p> | |
| 18 | + */ | |
| 19 | +@Data | |
| 20 | +@TableName("tbl_contract_distributor_line") | |
| 21 | +public class ContractDistributorLine extends BaseEntity implements BaseDto { | |
| 22 | + | |
| 23 | + private static final long serialVersionUID = 1L; | |
| 24 | + | |
| 25 | + public static final String CACHE_NAME = "ContractDistributorLine"; | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * ID | |
| 29 | + */ | |
| 30 | + private String id; | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 合同主表ID | |
| 34 | + */ | |
| 35 | + private String contractId; | |
| 36 | + | |
| 37 | + /** | |
| 38 | + * 行业 | |
| 39 | + */ | |
| 40 | + private String industry; | |
| 41 | + | |
| 42 | + /** | |
| 43 | + * 品质 | |
| 44 | + */ | |
| 45 | + private String quality; | |
| 46 | + | |
| 47 | + /** | |
| 48 | + * 牌号 | |
| 49 | + */ | |
| 50 | + private String brand; | |
| 51 | + | |
| 52 | + /** | |
| 53 | + * 厚度 | |
| 54 | + */ | |
| 55 | + private BigDecimal thickness; | |
| 56 | + | |
| 57 | + /** | |
| 58 | + * 宽度 | |
| 59 | + */ | |
| 60 | + private BigDecimal width; | |
| 61 | + | |
| 62 | + /** | |
| 63 | + * 长度 | |
| 64 | + */ | |
| 65 | + private BigDecimal length; | |
| 66 | + | |
| 67 | + /** | |
| 68 | + * 状态 | |
| 69 | + */ | |
| 70 | + private String status; | |
| 71 | + | |
| 72 | + /** | |
| 73 | + * 数量 | |
| 74 | + */ | |
| 75 | + private BigDecimal quantity; | |
| 76 | + | |
| 77 | + /** | |
| 78 | + * 单价 | |
| 79 | + */ | |
| 80 | + private BigDecimal unitPrice; | |
| 81 | + | |
| 82 | + /** | |
| 83 | + * 不含税金额 | |
| 84 | + */ | |
| 85 | + private BigDecimal amountExcludingTax; | |
| 86 | + | |
| 87 | + /** | |
| 88 | + * 总金额 | |
| 89 | + */ | |
| 90 | + private BigDecimal totalAmount; | |
| 91 | + | |
| 92 | + /** | |
| 93 | + * 发货日期 | |
| 94 | + */ | |
| 95 | + private LocalDate deliveryDate; | |
| 96 | + | |
| 97 | + /** | |
| 98 | + * 排序 | |
| 99 | + */ | |
| 100 | + private Integer showOrder; | |
| 101 | + | |
| 102 | + /** | |
| 103 | + * 创建人ID | |
| 104 | + */ | |
| 105 | + @TableField(fill = FieldFill.INSERT) | |
| 106 | + private String createById; | |
| 107 | + | |
| 108 | + /** | |
| 109 | + * 创建人 | |
| 110 | + */ | |
| 111 | + @TableField(fill = FieldFill.INSERT) | |
| 112 | + private String createBy; | |
| 113 | + | |
| 114 | + /** | |
| 115 | + * 更新人ID | |
| 116 | + */ | |
| 117 | + @TableField(fill = FieldFill.INSERT_UPDATE) | |
| 118 | + private String updateById; | |
| 119 | + | |
| 120 | + /** | |
| 121 | + * 更新人 | |
| 122 | + */ | |
| 123 | + @TableField(fill = FieldFill.INSERT_UPDATE) | |
| 124 | + private String updateBy; | |
| 125 | + | |
| 126 | + /** | |
| 127 | + * 创建时间 | |
| 128 | + */ | |
| 129 | + @TableField(fill = FieldFill.INSERT) | |
| 130 | + private LocalDateTime createTime; | |
| 131 | + | |
| 132 | + /** | |
| 133 | + * 更新时间 | |
| 134 | + */ | |
| 135 | + @TableField(fill = FieldFill.INSERT_UPDATE) | |
| 136 | + private LocalDateTime updateTime; | |
| 137 | + | |
| 138 | + /** | |
| 139 | + * 产品名称 | |
| 140 | + */ | |
| 141 | + private String productId; | |
| 142 | + | |
| 143 | + /** | |
| 144 | + * 厚度公差正 | |
| 145 | + */ | |
| 146 | + private BigDecimal thicknessTolPos; | |
| 147 | + | |
| 148 | + /** | |
| 149 | + * 厚度公差负 | |
| 150 | + */ | |
| 151 | + private BigDecimal thicknessTolNeg; | |
| 152 | + | |
| 153 | + /** | |
| 154 | + * 宽度公差正 | |
| 155 | + */ | |
| 156 | + private BigDecimal widthTolPos; | |
| 157 | + | |
| 158 | + /** | |
| 159 | + * 宽度公差负 | |
| 160 | + */ | |
| 161 | + private BigDecimal widthTolNeg; | |
| 162 | + | |
| 163 | + /** | |
| 164 | + * 长度公差正 | |
| 165 | + */ | |
| 166 | + private BigDecimal lengthTolPos; | |
| 167 | + | |
| 168 | + /** | |
| 169 | + * 长度公差负 | |
| 170 | + */ | |
| 171 | + private BigDecimal lengthTolNeg; | |
| 172 | + | |
| 173 | +} | ... | ... |
| ... | ... | @@ -148,6 +148,11 @@ public class ContractDistributorStandard extends BaseEntity implements BaseDto { |
| 148 | 148 | private String designatedConsignee; |
| 149 | 149 | |
| 150 | 150 | /** |
| 151 | + * 特别说明 | |
| 152 | + */ | |
| 153 | + private String specialInstructions; | |
| 154 | + | |
| 155 | + /** | |
| 151 | 156 | * 备注 |
| 152 | 157 | */ |
| 153 | 158 | private String remarks; |
| ... | ... | @@ -158,6 +163,16 @@ public class ContractDistributorStandard extends BaseEntity implements BaseDto { |
| 158 | 163 | private String status; |
| 159 | 164 | |
| 160 | 165 | /** |
| 166 | + * 合同类型 | |
| 167 | + */ | |
| 168 | + private String type; | |
| 169 | + | |
| 170 | + /** | |
| 171 | + * 父合同id | |
| 172 | + */ | |
| 173 | + private String parentId; | |
| 174 | + | |
| 175 | + /** | |
| 161 | 176 | * 创建人ID |
| 162 | 177 | */ |
| 163 | 178 | @TableField(fill = FieldFill.INSERT) | ... | ... |
| 1 | +package com.lframework.xingyun.sc.impl.contract; | |
| 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.xingyun.sc.entity.ContractDistributorLine; | |
| 7 | +import com.lframework.starter.web.core.impl.BaseMpServiceImpl; | |
| 8 | +import com.lframework.starter.web.core.utils.PageResultUtil; | |
| 9 | +import com.lframework.starter.web.core.utils.OpLogUtil; | |
| 10 | +import com.lframework.starter.common.exceptions.impl.DefaultClientException; | |
| 11 | +import com.lframework.starter.web.core.utils.IdUtil; | |
| 12 | +import com.lframework.starter.web.core.annotations.oplog.OpLog; | |
| 13 | +import com.lframework.starter.web.core.utils.PageHelperUtil; | |
| 14 | +import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; | |
| 15 | +import com.lframework.starter.web.core.components.resp.PageResult; | |
| 16 | +import com.lframework.starter.common.utils.ObjectUtil; | |
| 17 | +import com.lframework.starter.common.utils.Assert; | |
| 18 | +import com.lframework.xingyun.sc.mappers.ContractDistributorLineMapper; | |
| 19 | +import com.lframework.xingyun.sc.service.contract.ContractDistributorLineService; | |
| 20 | +import com.lframework.xingyun.sc.vo.contract.createVo.CreateContractDistributorLineVo; | |
| 21 | +import com.lframework.xingyun.sc.vo.contract.queryVo.QueryContractDistributorLineVo; | |
| 22 | +import com.lframework.xingyun.sc.vo.contract.updateVo.UpdateContractDistributorLineVo; | |
| 23 | +import org.springframework.cache.annotation.CacheEvict; | |
| 24 | +import org.springframework.cache.annotation.Cacheable; | |
| 25 | +import org.springframework.stereotype.Service; | |
| 26 | +import org.springframework.transaction.annotation.Transactional; | |
| 27 | + | |
| 28 | + | |
| 29 | +import java.io.Serializable; | |
| 30 | +import java.util.List; | |
| 31 | + | |
| 32 | +@Service | |
| 33 | +public class ContractDistributorLineServiceImpl extends BaseMpServiceImpl<ContractDistributorLineMapper, ContractDistributorLine> implements ContractDistributorLineService { | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public PageResult<ContractDistributorLine> query(Integer pageIndex, Integer pageSize, QueryContractDistributorLineVo vo) { | |
| 37 | + | |
| 38 | + Assert.greaterThanZero(pageIndex); | |
| 39 | + Assert.greaterThanZero(pageSize); | |
| 40 | + | |
| 41 | + PageHelperUtil.startPage(pageIndex, pageSize); | |
| 42 | + List<ContractDistributorLine> datas = this.query(vo); | |
| 43 | + | |
| 44 | + return PageResultUtil.convert(new PageInfo<>(datas)); | |
| 45 | + } | |
| 46 | + | |
| 47 | + @Override | |
| 48 | + public List<ContractDistributorLine> query(QueryContractDistributorLineVo vo) { | |
| 49 | + | |
| 50 | + return getBaseMapper().query(vo); | |
| 51 | + } | |
| 52 | + | |
| 53 | + @Cacheable(value = ContractDistributorLine.CACHE_NAME, key = "@cacheVariables.tenantId() + #id", unless = "#result == null") | |
| 54 | + @Override | |
| 55 | + public ContractDistributorLine findById(String id) { | |
| 56 | + | |
| 57 | + return getBaseMapper().selectById(id); | |
| 58 | + } | |
| 59 | + | |
| 60 | + @OpLog(type = OtherOpLogType.class, name = "新增经销标准合同物料行,ID:{}", params = {"#id"}) | |
| 61 | + @Transactional(rollbackFor = Exception.class) | |
| 62 | + @Override | |
| 63 | + public String create(CreateContractDistributorLineVo vo) { | |
| 64 | + | |
| 65 | + ContractDistributorLine data = new ContractDistributorLine(); | |
| 66 | + data.setId(IdUtil.getUUID()); | |
| 67 | + data.setContractId(vo.getContractId()); | |
| 68 | + data.setIndustry(vo.getIndustry()); | |
| 69 | + data.setQuality(vo.getQuality()); | |
| 70 | + data.setBrand(vo.getBrand()); | |
| 71 | + data.setThickness(vo.getThickness()); | |
| 72 | + data.setWidth(vo.getWidth()); | |
| 73 | + data.setLength(vo.getLength()); | |
| 74 | + data.setStatus(vo.getStatus()); | |
| 75 | + data.setQuantity(vo.getQuantity()); | |
| 76 | + data.setUnitPrice(vo.getUnitPrice()); | |
| 77 | + data.setAmountExcludingTax(vo.getAmountExcludingTax()); | |
| 78 | + data.setTotalAmount(vo.getTotalAmount()); | |
| 79 | + data.setDeliveryDate(vo.getDeliveryDate()); | |
| 80 | + data.setShowOrder(vo.getShowOrder()); | |
| 81 | + data.setProductId(vo.getProductId()); | |
| 82 | + data.setThicknessTolPos(vo.getThicknessTolPos()); | |
| 83 | + data.setThicknessTolNeg(vo.getThicknessTolNeg()); | |
| 84 | + data.setWidthTolPos(vo.getWidthTolPos()); | |
| 85 | + data.setWidthTolNeg(vo.getWidthTolNeg()); | |
| 86 | + data.setLengthTolPos(vo.getLengthTolPos()); | |
| 87 | + data.setLengthTolNeg(vo.getLengthTolNeg()); | |
| 88 | + | |
| 89 | + getBaseMapper().insert(data); | |
| 90 | + | |
| 91 | + OpLogUtil.setVariable("id", data.getId()); | |
| 92 | + OpLogUtil.setExtra(vo); | |
| 93 | + | |
| 94 | + return data.getId(); | |
| 95 | + } | |
| 96 | + | |
| 97 | + @OpLog(type = OtherOpLogType.class, name = "修改经销标准合同物料行,ID:{}", params = {"#id"}) | |
| 98 | + @Transactional(rollbackFor = Exception.class) | |
| 99 | + @Override | |
| 100 | + public void update(UpdateContractDistributorLineVo vo) { | |
| 101 | + | |
| 102 | + ContractDistributorLine data = getBaseMapper().selectById(vo.getId()); | |
| 103 | + if (ObjectUtil.isNull(data)) { | |
| 104 | + throw new DefaultClientException("经销标准合同物料行不存在!"); | |
| 105 | + } | |
| 106 | + | |
| 107 | + LambdaUpdateWrapper<ContractDistributorLine> updateWrapper = Wrappers.lambdaUpdate(ContractDistributorLine.class) | |
| 108 | + .set(ContractDistributorLine::getContractId, vo.getContractId()) | |
| 109 | + .set(ContractDistributorLine::getIndustry, vo.getIndustry()) | |
| 110 | + .set(ContractDistributorLine::getQuality, vo.getQuality()) | |
| 111 | + .set(ContractDistributorLine::getBrand, vo.getBrand()) | |
| 112 | + .set(ContractDistributorLine::getThickness, vo.getThickness()) | |
| 113 | + .set(ContractDistributorLine::getWidth, vo.getWidth()) | |
| 114 | + .set(ContractDistributorLine::getLength, vo.getLength()) | |
| 115 | + .set(ContractDistributorLine::getStatus, vo.getStatus()) | |
| 116 | + .set(ContractDistributorLine::getQuantity, vo.getQuantity()) | |
| 117 | + .set(ContractDistributorLine::getUnitPrice, vo.getUnitPrice()) | |
| 118 | + .set(ContractDistributorLine::getAmountExcludingTax, vo.getAmountExcludingTax()) | |
| 119 | + .set(ContractDistributorLine::getTotalAmount, vo.getTotalAmount()) | |
| 120 | + .set(ContractDistributorLine::getDeliveryDate, vo.getDeliveryDate()) | |
| 121 | + .set(ContractDistributorLine::getShowOrder, vo.getShowOrder()) | |
| 122 | + .set(ContractDistributorLine::getProductId, vo.getProductId()) | |
| 123 | + .set(ContractDistributorLine::getThicknessTolPos, vo.getThicknessTolPos()) | |
| 124 | + .set(ContractDistributorLine::getThicknessTolNeg, vo.getThicknessTolNeg()) | |
| 125 | + .set(ContractDistributorLine::getWidthTolPos, vo.getWidthTolPos()) | |
| 126 | + .set(ContractDistributorLine::getWidthTolNeg, vo.getWidthTolNeg()) | |
| 127 | + .set(ContractDistributorLine::getLengthTolPos, vo.getLengthTolPos()) | |
| 128 | + .set(ContractDistributorLine::getLengthTolNeg, vo.getLengthTolNeg()) | |
| 129 | + .eq(ContractDistributorLine::getId, vo.getId()); | |
| 130 | + | |
| 131 | + getBaseMapper().update(updateWrapper); | |
| 132 | + | |
| 133 | + OpLogUtil.setVariable("id", data.getId()); | |
| 134 | + OpLogUtil.setExtra(vo); | |
| 135 | + } | |
| 136 | + | |
| 137 | + @CacheEvict(value = ContractDistributorLine.CACHE_NAME, key = "@cacheVariables.tenantId() + #key") | |
| 138 | + @Override | |
| 139 | + public void cleanCacheByKey(Serializable key) { | |
| 140 | + | |
| 141 | + } | |
| 142 | +} | |
| 143 | + | ... | ... |
| ... | ... | @@ -16,10 +16,13 @@ import com.lframework.starter.web.core.components.resp.PageResult; |
| 16 | 16 | import com.lframework.starter.common.utils.ObjectUtil; |
| 17 | 17 | import com.lframework.starter.common.utils.Assert; |
| 18 | 18 | import com.lframework.xingyun.sc.mappers.ContractDistributorStandardMapper; |
| 19 | +import com.lframework.xingyun.sc.service.contract.ContractDistributorLineService; | |
| 19 | 20 | import com.lframework.xingyun.sc.service.contract.ContractDistributorStandardService; |
| 21 | +import com.lframework.xingyun.sc.vo.contract.createVo.CreateContractDistributorLineVo; | |
| 20 | 22 | import com.lframework.xingyun.sc.vo.contract.createVo.CreateContractDistributorStandardVo; |
| 21 | 23 | import com.lframework.xingyun.sc.vo.contract.queryVo.QueryContractDistributorStandardVo; |
| 22 | 24 | import com.lframework.xingyun.sc.vo.contract.updateVo.UpdateContractDistributorStandardVo; |
| 25 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 23 | 26 | import org.springframework.cache.annotation.CacheEvict; |
| 24 | 27 | import org.springframework.cache.annotation.Cacheable; |
| 25 | 28 | import org.springframework.stereotype.Service; |
| ... | ... | @@ -32,6 +35,9 @@ import java.util.List; |
| 32 | 35 | public class ContractDistributorStandardServiceImpl extends |
| 33 | 36 | BaseMpServiceImpl<ContractDistributorStandardMapper, ContractDistributorStandard> implements ContractDistributorStandardService { |
| 34 | 37 | |
| 38 | + @Autowired | |
| 39 | + private ContractDistributorLineService contractDistributorLineService; | |
| 40 | + | |
| 35 | 41 | @Override |
| 36 | 42 | public PageResult<ContractDistributorStandard> query(Integer pageIndex, Integer pageSize, QueryContractDistributorStandardVo vo) { |
| 37 | 43 | |
| ... | ... | @@ -88,15 +94,25 @@ public class ContractDistributorStandardServiceImpl extends |
| 88 | 94 | data.setSpecialTerms(vo.getSpecialTerms()); |
| 89 | 95 | data.setDesignatedConsignee(vo.getDesignatedConsignee()); |
| 90 | 96 | data.setRemarks(vo.getRemarks()); |
| 97 | + data.setSpecialInstructions(vo.getSpecialInstructions()); | |
| 91 | 98 | data.setTotalAmountExcludingTax(vo.getTotalAmountExcludingTax()); |
| 92 | 99 | data.setTotalAmountIncludingTax(vo.getTotalAmountIncludingTax()); |
| 93 | 100 | data.setTotalQuantity(vo.getTotalQuantity()); |
| 101 | + data.setParentId(vo.getParentId()); | |
| 102 | + data.setType(vo.getType()); | |
| 94 | 103 | |
| 95 | 104 | getBaseMapper().insert(data); |
| 96 | 105 | |
| 97 | 106 | OpLogUtil.setVariable("id", data.getId()); |
| 98 | 107 | OpLogUtil.setExtra(vo); |
| 99 | 108 | |
| 109 | + for (int i = 0; i < vo.getContractDistributorLineList().size(); i++) { | |
| 110 | + CreateContractDistributorLineVo createContractDistributorLineVo = vo.getContractDistributorLineList().get(i); | |
| 111 | + createContractDistributorLineVo.setContractId(data.getId()); | |
| 112 | + createContractDistributorLineVo.setShowOrder(i); | |
| 113 | + contractDistributorLineService.create(createContractDistributorLineVo); | |
| 114 | + } | |
| 115 | + | |
| 100 | 116 | return data.getId(); |
| 101 | 117 | } |
| 102 | 118 | |
| ... | ... | @@ -133,10 +149,13 @@ public class ContractDistributorStandardServiceImpl extends |
| 133 | 149 | .set(ContractDistributorStandard::getPackaging, vo.getPackaging()) |
| 134 | 150 | .set(ContractDistributorStandard::getSpecialTerms, vo.getSpecialTerms()) |
| 135 | 151 | .set(ContractDistributorStandard::getDesignatedConsignee, vo.getDesignatedConsignee()) |
| 152 | + .set(ContractDistributorStandard::getSpecialInstructions, vo.getSpecialInstructions()) | |
| 136 | 153 | .set(ContractDistributorStandard::getRemarks, vo.getRemarks()) |
| 137 | 154 | .set(ContractDistributorStandard::getTotalAmountExcludingTax, vo.getTotalAmountExcludingTax()) |
| 138 | 155 | .set(ContractDistributorStandard::getTotalAmountIncludingTax, vo.getTotalAmountIncludingTax()) |
| 139 | 156 | .set(ContractDistributorStandard::getTotalQuantity, vo.getTotalQuantity()) |
| 157 | + .set(ContractDistributorStandard::getType, vo.getType()) | |
| 158 | + .set(ContractDistributorStandard::getParentId, vo.getParentId()) | |
| 140 | 159 | .eq(ContractDistributorStandard::getId, vo.getId()); |
| 141 | 160 | |
| 142 | 161 | getBaseMapper().update(updateWrapper); | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/mappers/ContractDistributorLineMapper.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.ContractDistributorLine; | |
| 5 | +import com.lframework.xingyun.sc.vo.contract.queryVo.QueryContractDistributorLineVo; | |
| 6 | +import org.apache.ibatis.annotations.Param; | |
| 7 | + | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * <p> | |
| 12 | + * 经销标准合同物料行 Mapper 接口 | |
| 13 | + * </p> | |
| 14 | + */ | |
| 15 | +public interface ContractDistributorLineMapper extends BaseMapper<ContractDistributorLine> { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 查询列表 | |
| 19 | + * | |
| 20 | + * @param vo | |
| 21 | + * @return | |
| 22 | + */ | |
| 23 | + List<ContractDistributorLine> query(@Param("vo") QueryContractDistributorLineVo vo); | |
| 24 | +} | ... | ... |
| 1 | +package com.lframework.xingyun.sc.service.contract; | |
| 2 | + | |
| 3 | +import com.lframework.xingyun.sc.entity.ContractDistributorLine; | |
| 4 | +import com.lframework.starter.web.core.service.BaseMpService; | |
| 5 | +import com.lframework.starter.web.core.components.resp.PageResult; | |
| 6 | +import com.lframework.xingyun.sc.vo.contract.createVo.CreateContractDistributorLineVo; | |
| 7 | +import com.lframework.xingyun.sc.vo.contract.queryVo.QueryContractDistributorLineVo; | |
| 8 | +import com.lframework.xingyun.sc.vo.contract.updateVo.UpdateContractDistributorLineVo; | |
| 9 | + | |
| 10 | +import java.util.List; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 经销标准合同物料行 Service | |
| 14 | + */ | |
| 15 | +public interface ContractDistributorLineService extends BaseMpService<ContractDistributorLine> { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 查询列表 | |
| 19 | + * @return | |
| 20 | + */ | |
| 21 | + PageResult<ContractDistributorLine> query(Integer pageIndex, Integer pageSize, QueryContractDistributorLineVo vo); | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * 查询列表 | |
| 25 | + * @param vo | |
| 26 | + * @return | |
| 27 | + */ | |
| 28 | + List<ContractDistributorLine> query(QueryContractDistributorLineVo vo); | |
| 29 | + | |
| 30 | + /** | |
| 31 | + * 根据ID查询 | |
| 32 | + * @param id | |
| 33 | + * @return | |
| 34 | + */ | |
| 35 | + ContractDistributorLine findById(String id); | |
| 36 | + | |
| 37 | + /** | |
| 38 | + * 创建 | |
| 39 | + * @param vo | |
| 40 | + * @return | |
| 41 | + */ | |
| 42 | + String create(CreateContractDistributorLineVo vo); | |
| 43 | + | |
| 44 | + /** | |
| 45 | + * 修改 | |
| 46 | + * @param vo | |
| 47 | + */ | |
| 48 | + void update(UpdateContractDistributorLineVo vo); | |
| 49 | + | |
| 50 | +} | |
| 51 | + | ... | ... |
| 1 | +package com.lframework.xingyun.sc.vo.contract.createVo; | |
| 2 | + | |
| 3 | +import com.lframework.starter.web.core.components.validation.IsNumberPrecision; | |
| 4 | + | |
| 5 | +import java.math.BigDecimal; | |
| 6 | +import javax.validation.constraints.NotBlank; | |
| 7 | +import java.time.LocalDate; | |
| 8 | + | |
| 9 | +import com.lframework.starter.web.core.vo.BaseVo; | |
| 10 | + | |
| 11 | +import javax.validation.constraints.NotNull; | |
| 12 | + | |
| 13 | +import io.swagger.annotations.ApiModelProperty; | |
| 14 | +import com.lframework.starter.web.core.components.validation.TypeMismatch; | |
| 15 | +import org.hibernate.validator.constraints.Length; | |
| 16 | + | |
| 17 | +import java.io.Serializable; | |
| 18 | + | |
| 19 | +import lombok.Data; | |
| 20 | + | |
| 21 | +@Data | |
| 22 | +public class CreateContractDistributorLineVo implements BaseVo, Serializable { | |
| 23 | + | |
| 24 | + private static final long serialVersionUID = 1L; | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 合同主表ID | |
| 28 | + */ | |
| 29 | + @ApiModelProperty(value = "合同主表ID", required = true) | |
| 30 | + @NotBlank(message = "请输入合同主表ID!") | |
| 31 | + @Length(message = "合同主表ID最多允许32个字符!") | |
| 32 | + private String contractId; | |
| 33 | + | |
| 34 | + /** | |
| 35 | + * 行业 | |
| 36 | + */ | |
| 37 | + @ApiModelProperty(value = "行业", required = true) | |
| 38 | + @NotBlank(message = "请输入行业!") | |
| 39 | + @Length(message = "行业最多允许100个字符!") | |
| 40 | + private String industry; | |
| 41 | + | |
| 42 | + /** | |
| 43 | + * 品质 | |
| 44 | + */ | |
| 45 | + @ApiModelProperty(value = "品质", required = true) | |
| 46 | + @NotBlank(message = "请输入品质!") | |
| 47 | + @Length(message = "品质最多允许100个字符!") | |
| 48 | + private String quality; | |
| 49 | + | |
| 50 | + /** | |
| 51 | + * 牌号 | |
| 52 | + */ | |
| 53 | + @ApiModelProperty(value = "牌号", required = true) | |
| 54 | + @NotBlank(message = "请输入牌号!") | |
| 55 | + @Length(message = "牌号最多允许100个字符!") | |
| 56 | + private String brand; | |
| 57 | + | |
| 58 | + /** | |
| 59 | + * 厚度 | |
| 60 | + */ | |
| 61 | + @ApiModelProperty(value = "厚度", required = true) | |
| 62 | + @NotNull(message = "请输入厚度!") | |
| 63 | + @TypeMismatch(message = "厚度格式有误!") | |
| 64 | + @IsNumberPrecision(message = "厚度最多允许4位小数!", value = 4) | |
| 65 | + private BigDecimal thickness; | |
| 66 | + | |
| 67 | + /** | |
| 68 | + * 宽度 | |
| 69 | + */ | |
| 70 | + @ApiModelProperty(value = "宽度", required = true) | |
| 71 | + @NotNull(message = "请输入宽度!") | |
| 72 | + @TypeMismatch(message = "宽度格式有误!") | |
| 73 | + @IsNumberPrecision(message = "宽度最多允许4位小数!", value = 4) | |
| 74 | + private BigDecimal width; | |
| 75 | + | |
| 76 | + /** | |
| 77 | + * 长度 | |
| 78 | + */ | |
| 79 | + @ApiModelProperty(value = "长度", required = true) | |
| 80 | + @NotNull(message = "请输入长度!") | |
| 81 | + @TypeMismatch(message = "长度格式有误!") | |
| 82 | + @IsNumberPrecision(message = "长度最多允许4位小数!", value = 4) | |
| 83 | + private BigDecimal length; | |
| 84 | + | |
| 85 | + /** | |
| 86 | + * 状态 | |
| 87 | + */ | |
| 88 | + @ApiModelProperty(value = "状态", required = true) | |
| 89 | + @NotBlank(message = "请输入状态!") | |
| 90 | + @Length(message = "状态最多允许50个字符!") | |
| 91 | + private String status; | |
| 92 | + | |
| 93 | + /** | |
| 94 | + * 数量 | |
| 95 | + */ | |
| 96 | + @ApiModelProperty(value = "数量", required = true) | |
| 97 | + @NotNull(message = "请输入数量!") | |
| 98 | + @TypeMismatch(message = "数量格式有误!") | |
| 99 | + @IsNumberPrecision(message = "数量最多允许4位小数!", value = 4) | |
| 100 | + private BigDecimal quantity; | |
| 101 | + | |
| 102 | + /** | |
| 103 | + * 单价 | |
| 104 | + */ | |
| 105 | + @ApiModelProperty(value = "单价", required = true) | |
| 106 | + @NotNull(message = "请输入单价!") | |
| 107 | + @TypeMismatch(message = "单价格式有误!") | |
| 108 | + @IsNumberPrecision(message = "单价最多允许4位小数!", value = 4) | |
| 109 | + private BigDecimal unitPrice; | |
| 110 | + | |
| 111 | + /** | |
| 112 | + * 不含税金额 | |
| 113 | + */ | |
| 114 | + @ApiModelProperty(value = "不含税金额", required = true) | |
| 115 | + @NotNull(message = "请输入不含税金额!") | |
| 116 | + @TypeMismatch(message = "不含税金额格式有误!") | |
| 117 | + @IsNumberPrecision(message = "不含税金额最多允许2位小数!", value = 2) | |
| 118 | + private BigDecimal amountExcludingTax; | |
| 119 | + | |
| 120 | + /** | |
| 121 | + * 总金额 | |
| 122 | + */ | |
| 123 | + @ApiModelProperty(value = "总金额", required = true) | |
| 124 | + @NotNull(message = "请输入总金额!") | |
| 125 | + @TypeMismatch(message = "总金额格式有误!") | |
| 126 | + @IsNumberPrecision(message = "总金额最多允许2位小数!", value = 2) | |
| 127 | + private BigDecimal totalAmount; | |
| 128 | + | |
| 129 | + /** | |
| 130 | + * 发货日期 | |
| 131 | + */ | |
| 132 | + @ApiModelProperty(value = "发货日期", required = true) | |
| 133 | + @NotNull(message = "请输入发货日期!") | |
| 134 | + @TypeMismatch(message = "发货日期格式有误!") | |
| 135 | + private LocalDate deliveryDate; | |
| 136 | + | |
| 137 | + /** | |
| 138 | + * 排序 | |
| 139 | + */ | |
| 140 | + @ApiModelProperty(value = "排序", required = true) | |
| 141 | + @NotNull(message = "请输入排序!") | |
| 142 | + @TypeMismatch(message = "排序格式有误!") | |
| 143 | + private Integer showOrder; | |
| 144 | + | |
| 145 | + /** | |
| 146 | + * 产品名称 | |
| 147 | + */ | |
| 148 | + @ApiModelProperty(value = "产品名称", required = true) | |
| 149 | + @NotBlank(message = "请输入产品名称!") | |
| 150 | + private String productId; | |
| 151 | + | |
| 152 | + /** | |
| 153 | + * 厚度公差正 | |
| 154 | + */ | |
| 155 | + @ApiModelProperty(value = "厚度公差正", required = true) | |
| 156 | + @NotNull(message = "请输入厚度公差正!") | |
| 157 | + @TypeMismatch(message = "厚度公差正格式有误!") | |
| 158 | + private BigDecimal thicknessTolPos; | |
| 159 | + | |
| 160 | + /** | |
| 161 | + * 厚度公差负 | |
| 162 | + */ | |
| 163 | + @ApiModelProperty(value = "厚度公差负", required = true) | |
| 164 | + @NotNull(message = "请输入厚度公差负!") | |
| 165 | + @TypeMismatch(message = "厚度公差负格式有误!") | |
| 166 | + private BigDecimal thicknessTolNeg; | |
| 167 | + | |
| 168 | + /** | |
| 169 | + * 宽度公差正 | |
| 170 | + */ | |
| 171 | + @ApiModelProperty(value = "宽度公差正", required = true) | |
| 172 | + @NotNull(message = "请输入宽度公差正!") | |
| 173 | + @TypeMismatch(message = "宽度公差正格式有误!") | |
| 174 | + private BigDecimal widthTolPos; | |
| 175 | + | |
| 176 | + /** | |
| 177 | + * 宽度公差负 | |
| 178 | + */ | |
| 179 | + @ApiModelProperty(value = "宽度公差负", required = true) | |
| 180 | + @NotNull(message = "请输入宽度公差负!") | |
| 181 | + @TypeMismatch(message = "宽度公差负格式有误!") | |
| 182 | + private BigDecimal widthTolNeg; | |
| 183 | + | |
| 184 | + /** | |
| 185 | + * 长度公差正 | |
| 186 | + */ | |
| 187 | + @ApiModelProperty(value = "长度公差正", required = true) | |
| 188 | + @NotNull(message = "请输入长度公差正!") | |
| 189 | + @TypeMismatch(message = "长度公差正格式有误!") | |
| 190 | + private BigDecimal lengthTolPos; | |
| 191 | + | |
| 192 | + /** | |
| 193 | + * 长度公差负 | |
| 194 | + */ | |
| 195 | + @ApiModelProperty(value = "长度公差负", required = true) | |
| 196 | + @NotNull(message = "请输入长度公差负!") | |
| 197 | + @TypeMismatch(message = "长度公差负格式有误!") | |
| 198 | + private BigDecimal lengthTolNeg; | |
| 199 | + | |
| 200 | +} | ... | ... |
| ... | ... | @@ -13,6 +13,7 @@ import com.lframework.starter.web.core.components.validation.TypeMismatch; |
| 13 | 13 | import org.hibernate.validator.constraints.Length; |
| 14 | 14 | |
| 15 | 15 | import java.io.Serializable; |
| 16 | +import java.util.List; | |
| 16 | 17 | |
| 17 | 18 | import lombok.Data; |
| 18 | 19 | |
| ... | ... | @@ -202,6 +203,14 @@ public class CreateContractDistributorStandardVo implements BaseVo, Serializable |
| 202 | 203 | private String designatedConsignee; |
| 203 | 204 | |
| 204 | 205 | /** |
| 206 | + * 特别说明 | |
| 207 | + */ | |
| 208 | + @ApiModelProperty(value = "特别说明", required = true) | |
| 209 | + @NotBlank(message = "请输入特别说明!") | |
| 210 | + @Length(message = "特别说明最多允许65,535个字符!") | |
| 211 | + private String specialInstructions; | |
| 212 | + | |
| 213 | + /** | |
| 205 | 214 | * 备注 |
| 206 | 215 | */ |
| 207 | 216 | @ApiModelProperty(value = "备注", required = true) |
| ... | ... | @@ -233,4 +242,23 @@ public class CreateContractDistributorStandardVo implements BaseVo, Serializable |
| 233 | 242 | @TypeMismatch(message = "合计总金额格式有误!") |
| 234 | 243 | private BigDecimal totalAmountIncludingTax; |
| 235 | 244 | |
| 245 | + /** | |
| 246 | + * 合同类型 | |
| 247 | + */ | |
| 248 | + @ApiModelProperty(value = "合同类型", required = true) | |
| 249 | + @NotBlank(message = "请输入合同类型!") | |
| 250 | + private String type; | |
| 251 | + | |
| 252 | + /** | |
| 253 | + * 父合同id | |
| 254 | + */ | |
| 255 | + @ApiModelProperty(value = "父合同id") | |
| 256 | + private String parentId; | |
| 257 | + | |
| 258 | + /** | |
| 259 | + * 经销标准合同物料行 | |
| 260 | + */ | |
| 261 | + @ApiModelProperty(value = "经销标准合同物料行", required = true) | |
| 262 | + @NotNull(message = "经销标准合同物料行不可为空!") | |
| 263 | + private List<CreateContractDistributorLineVo> contractDistributorLineList; | |
| 236 | 264 | } | ... | ... |
| 1 | +package com.lframework.xingyun.sc.vo.contract.queryVo; | |
| 2 | + | |
| 3 | +import com.lframework.starter.web.core.vo.BaseVo; | |
| 4 | +import com.lframework.starter.web.core.vo.PageVo; | |
| 5 | +import io.swagger.annotations.ApiModelProperty; | |
| 6 | +import lombok.Data; | |
| 7 | + | |
| 8 | +import java.io.Serializable; | |
| 9 | + | |
| 10 | +@Data | |
| 11 | +public class QueryContractDistributorLineVo extends PageVo implements BaseVo, Serializable { | |
| 12 | + | |
| 13 | + private static final long serialVersionUID = 1L; | |
| 14 | + | |
| 15 | + /** | |
| 16 | + * 合同主表ID | |
| 17 | + */ | |
| 18 | + @ApiModelProperty("合同主表ID") | |
| 19 | + private String contractId; | |
| 20 | + | |
| 21 | +} | ... | ... |
| 1 | +package com.lframework.xingyun.sc.vo.contract.updateVo; | |
| 2 | + | |
| 3 | +import lombok.Data; | |
| 4 | +import com.lframework.starter.web.core.components.validation.IsNumberPrecision; | |
| 5 | + | |
| 6 | +import java.math.BigDecimal; | |
| 7 | +import javax.validation.constraints.NotBlank; | |
| 8 | +import java.time.LocalDate; | |
| 9 | + | |
| 10 | +import com.lframework.starter.web.core.vo.BaseVo; | |
| 11 | + | |
| 12 | +import javax.validation.constraints.NotNull; | |
| 13 | + | |
| 14 | +import com.lframework.starter.web.core.components.validation.TypeMismatch; | |
| 15 | +import io.swagger.annotations.ApiModelProperty; | |
| 16 | +import org.hibernate.validator.constraints.Length; | |
| 17 | + | |
| 18 | +import java.io.Serializable; | |
| 19 | + | |
| 20 | +@Data | |
| 21 | +public class UpdateContractDistributorLineVo implements BaseVo, Serializable { | |
| 22 | + | |
| 23 | + private static final long serialVersionUID = 1L; | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * ID | |
| 27 | + */ | |
| 28 | + @ApiModelProperty(value = "ID", required = true) | |
| 29 | + @NotBlank(message = "id不能为空!") | |
| 30 | + private String id; | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 合同主表ID | |
| 34 | + */ | |
| 35 | + @ApiModelProperty(value = "合同主表ID", required = true) | |
| 36 | + @NotBlank(message = "请输入合同主表ID!") | |
| 37 | + @Length(message = "合同主表ID最多允许32个字符!") | |
| 38 | + private String contractId; | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 行业 | |
| 42 | + */ | |
| 43 | + @ApiModelProperty(value = "行业", required = true) | |
| 44 | + @NotBlank(message = "请输入行业!") | |
| 45 | + @Length(message = "行业最多允许100个字符!") | |
| 46 | + private String industry; | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 品质 | |
| 50 | + */ | |
| 51 | + @ApiModelProperty(value = "品质", required = true) | |
| 52 | + @NotBlank(message = "请输入品质!") | |
| 53 | + @Length(message = "品质最多允许100个字符!") | |
| 54 | + private String quality; | |
| 55 | + | |
| 56 | + /** | |
| 57 | + * 牌号 | |
| 58 | + */ | |
| 59 | + @ApiModelProperty(value = "牌号", required = true) | |
| 60 | + @NotBlank(message = "请输入牌号!") | |
| 61 | + @Length(message = "牌号最多允许100个字符!") | |
| 62 | + private String brand; | |
| 63 | + | |
| 64 | + /** | |
| 65 | + * 厚度 | |
| 66 | + */ | |
| 67 | + @ApiModelProperty(value = "厚度", required = true) | |
| 68 | + @TypeMismatch(message = "厚度格式有误!") | |
| 69 | + @NotNull(message = "请输入厚度!") | |
| 70 | + @IsNumberPrecision(message = "厚度最多允许4位小数!", value = 4) | |
| 71 | + private BigDecimal thickness; | |
| 72 | + | |
| 73 | + /** | |
| 74 | + * 宽度 | |
| 75 | + */ | |
| 76 | + @ApiModelProperty(value = "宽度", required = true) | |
| 77 | + @TypeMismatch(message = "宽度格式有误!") | |
| 78 | + @NotNull(message = "请输入宽度!") | |
| 79 | + @IsNumberPrecision(message = "宽度最多允许4位小数!", value = 4) | |
| 80 | + private BigDecimal width; | |
| 81 | + | |
| 82 | + /** | |
| 83 | + * 长度 | |
| 84 | + */ | |
| 85 | + @ApiModelProperty(value = "长度", required = true) | |
| 86 | + @TypeMismatch(message = "长度格式有误!") | |
| 87 | + @NotNull(message = "请输入长度!") | |
| 88 | + @IsNumberPrecision(message = "长度最多允许4位小数!", value = 4) | |
| 89 | + private BigDecimal length; | |
| 90 | + | |
| 91 | + /** | |
| 92 | + * 状态 | |
| 93 | + */ | |
| 94 | + @ApiModelProperty(value = "状态", required = true) | |
| 95 | + @NotBlank(message = "请输入状态!") | |
| 96 | + @Length(message = "状态最多允许50个字符!") | |
| 97 | + private String status; | |
| 98 | + | |
| 99 | + /** | |
| 100 | + * 数量 | |
| 101 | + */ | |
| 102 | + @ApiModelProperty(value = "数量", required = true) | |
| 103 | + @TypeMismatch(message = "数量格式有误!") | |
| 104 | + @NotNull(message = "请输入数量!") | |
| 105 | + @IsNumberPrecision(message = "数量最多允许4位小数!", value = 4) | |
| 106 | + private BigDecimal quantity; | |
| 107 | + | |
| 108 | + /** | |
| 109 | + * 单价 | |
| 110 | + */ | |
| 111 | + @ApiModelProperty(value = "单价", required = true) | |
| 112 | + @TypeMismatch(message = "单价格式有误!") | |
| 113 | + @NotNull(message = "请输入单价!") | |
| 114 | + @IsNumberPrecision(message = "单价最多允许4位小数!", value = 4) | |
| 115 | + private BigDecimal unitPrice; | |
| 116 | + | |
| 117 | + /** | |
| 118 | + * 不含税金额 | |
| 119 | + */ | |
| 120 | + @ApiModelProperty(value = "不含税金额", required = true) | |
| 121 | + @TypeMismatch(message = "不含税金额格式有误!") | |
| 122 | + @NotNull(message = "请输入不含税金额!") | |
| 123 | + @IsNumberPrecision(message = "不含税金额最多允许2位小数!", value = 2) | |
| 124 | + private BigDecimal amountExcludingTax; | |
| 125 | + | |
| 126 | + /** | |
| 127 | + * 总金额 | |
| 128 | + */ | |
| 129 | + @ApiModelProperty(value = "总金额", required = true) | |
| 130 | + @TypeMismatch(message = "总金额格式有误!") | |
| 131 | + @NotNull(message = "请输入总金额!") | |
| 132 | + @IsNumberPrecision(message = "总金额最多允许2位小数!", value = 2) | |
| 133 | + private BigDecimal totalAmount; | |
| 134 | + | |
| 135 | + /** | |
| 136 | + * 发货日期 | |
| 137 | + */ | |
| 138 | + @ApiModelProperty(value = "发货日期", required = true) | |
| 139 | + @TypeMismatch(message = "发货日期格式有误!") | |
| 140 | + @NotNull(message = "请输入发货日期!") | |
| 141 | + private LocalDate deliveryDate; | |
| 142 | + | |
| 143 | + /** | |
| 144 | + * 排序 | |
| 145 | + */ | |
| 146 | + @ApiModelProperty(value = "排序", required = true) | |
| 147 | + @TypeMismatch(message = "排序格式有误!") | |
| 148 | + @NotNull(message = "请输入排序!") | |
| 149 | + private Integer showOrder; | |
| 150 | + | |
| 151 | + /** | |
| 152 | + * 产品名称 | |
| 153 | + */ | |
| 154 | + @ApiModelProperty(value = "产品名称", required = true) | |
| 155 | + @NotBlank(message = "请输入产品名称!") | |
| 156 | + private String productId; | |
| 157 | + | |
| 158 | + /** | |
| 159 | + * 厚度公差正 | |
| 160 | + */ | |
| 161 | + @ApiModelProperty(value = "厚度公差正", required = true) | |
| 162 | + @TypeMismatch(message = "厚度公差正格式有误!") | |
| 163 | + @NotNull(message = "请输入厚度公差正!") | |
| 164 | + private BigDecimal thicknessTolPos; | |
| 165 | + | |
| 166 | + /** | |
| 167 | + * 厚度公差负 | |
| 168 | + */ | |
| 169 | + @ApiModelProperty(value = "厚度公差负", required = true) | |
| 170 | + @TypeMismatch(message = "厚度公差负格式有误!") | |
| 171 | + @NotNull(message = "请输入厚度公差负!") | |
| 172 | + private BigDecimal thicknessTolNeg; | |
| 173 | + | |
| 174 | + /** | |
| 175 | + * 宽度公差正 | |
| 176 | + */ | |
| 177 | + @ApiModelProperty(value = "宽度公差正", required = true) | |
| 178 | + @TypeMismatch(message = "宽度公差正格式有误!") | |
| 179 | + @NotNull(message = "请输入宽度公差正!") | |
| 180 | + private BigDecimal widthTolPos; | |
| 181 | + | |
| 182 | + /** | |
| 183 | + * 宽度公差负 | |
| 184 | + */ | |
| 185 | + @ApiModelProperty(value = "宽度公差负", required = true) | |
| 186 | + @TypeMismatch(message = "宽度公差负格式有误!") | |
| 187 | + @NotNull(message = "请输入宽度公差负!") | |
| 188 | + private BigDecimal widthTolNeg; | |
| 189 | + | |
| 190 | + /** | |
| 191 | + * 长度公差正 | |
| 192 | + */ | |
| 193 | + @ApiModelProperty(value = "长度公差正", required = true) | |
| 194 | + @TypeMismatch(message = "长度公差正格式有误!") | |
| 195 | + @NotNull(message = "请输入长度公差正!") | |
| 196 | + private BigDecimal lengthTolPos; | |
| 197 | + | |
| 198 | + /** | |
| 199 | + * 长度公差负 | |
| 200 | + */ | |
| 201 | + @ApiModelProperty(value = "长度公差负", required = true) | |
| 202 | + @TypeMismatch(message = "长度公差负格式有误!") | |
| 203 | + @NotNull(message = "请输入长度公差负!") | |
| 204 | + private BigDecimal lengthTolNeg; | |
| 205 | + | |
| 206 | +} | |
| 207 | + | ... | ... |
| ... | ... | @@ -204,6 +204,14 @@ public class UpdateContractDistributorStandardVo implements BaseVo, Serializable |
| 204 | 204 | private String designatedConsignee; |
| 205 | 205 | |
| 206 | 206 | /** |
| 207 | + * 特别说明 | |
| 208 | + */ | |
| 209 | + @ApiModelProperty(value = "特别说明", required = true) | |
| 210 | + @NotBlank(message = "请输入特别说明!") | |
| 211 | + @Length(message = "特别说明最多允许65,535个字符!") | |
| 212 | + private String specialInstructions; | |
| 213 | + | |
| 214 | + /** | |
| 207 | 215 | * 备注 |
| 208 | 216 | */ |
| 209 | 217 | @ApiModelProperty(value = "备注", required = true) |
| ... | ... | @@ -235,4 +243,22 @@ public class UpdateContractDistributorStandardVo implements BaseVo, Serializable |
| 235 | 243 | @NotNull(message = "请输入合计总金额!") |
| 236 | 244 | private BigDecimal totalAmountIncludingTax; |
| 237 | 245 | |
| 246 | + /** | |
| 247 | + * 状态(DRAFT:草稿;FORMAL:正式;DELETED:删除) | |
| 248 | + */ | |
| 249 | + @ApiModelProperty(value = "状态") | |
| 250 | + private String status; | |
| 251 | + | |
| 252 | + /** | |
| 253 | + * 合同类型 | |
| 254 | + */ | |
| 255 | + @ApiModelProperty(value = "合同类型", required = true) | |
| 256 | + @NotBlank(message = "请输入合同类型!") | |
| 257 | + private String type; | |
| 258 | + | |
| 259 | + /** | |
| 260 | + * 父合同id | |
| 261 | + */ | |
| 262 | + @ApiModelProperty(value = "父合同id") | |
| 263 | + private String parentId; | |
| 238 | 264 | } | ... | ... |
| 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.ContractDistributorLineMapper"> | |
| 4 | + | |
| 5 | + <resultMap id="ContractDistributorLine" type="com.lframework.xingyun.sc.entity.ContractDistributorLine"> | |
| 6 | + <id column="id" property="id"/> | |
| 7 | + <result column="contract_id" property="contractId"/> | |
| 8 | + <result column="industry" property="industry"/> | |
| 9 | + <result column="quality" property="quality"/> | |
| 10 | + <result column="brand" property="brand"/> | |
| 11 | + <result column="thickness" property="thickness"/> | |
| 12 | + <result column="width" property="width"/> | |
| 13 | + <result column="length" property="length"/> | |
| 14 | + <result column="status" property="status"/> | |
| 15 | + <result column="quantity" property="quantity"/> | |
| 16 | + <result column="unit_price" property="unitPrice"/> | |
| 17 | + <result column="amount_excluding_tax" property="amountExcludingTax"/> | |
| 18 | + <result column="total_amount" property="totalAmount"/> | |
| 19 | + <result column="delivery_date" property="deliveryDate"/> | |
| 20 | + <result column="show_order" property="showOrder"/> | |
| 21 | + <result column="create_by_id" property="createById"/> | |
| 22 | + <result column="create_by" property="createBy"/> | |
| 23 | + <result column="update_by_id" property="updateById"/> | |
| 24 | + <result column="update_by" property="updateBy"/> | |
| 25 | + <result column="create_time" property="createTime"/> | |
| 26 | + <result column="update_time" property="updateTime"/> | |
| 27 | + <result column="product_id" property="productId"/> | |
| 28 | + <result column="thickness_tol_pos" property="thicknessTolPos"/> | |
| 29 | + <result column="thickness_tol_neg" property="thicknessTolNeg"/> | |
| 30 | + <result column="width_tol_pos" property="widthTolPos"/> | |
| 31 | + <result column="width_tol_neg" property="widthTolNeg"/> | |
| 32 | + <result column="length_tol_pos" property="lengthTolPos"/> | |
| 33 | + <result column="length_tol_neg" property="lengthTolNeg"/> | |
| 34 | + </resultMap> | |
| 35 | + | |
| 36 | + <sql id="ContractDistributorLine_sql"> | |
| 37 | + SELECT tb.id, | |
| 38 | + tb.contract_id, | |
| 39 | + tb.industry, | |
| 40 | + tb.quality, | |
| 41 | + tb.brand, | |
| 42 | + tb.thickness, | |
| 43 | + tb.width, | |
| 44 | + tb.length, | |
| 45 | + tb.status, | |
| 46 | + tb.quantity, | |
| 47 | + tb.unit_price, | |
| 48 | + tb.amount_excluding_tax, | |
| 49 | + tb.total_amount, | |
| 50 | + tb.delivery_date, | |
| 51 | + tb.show_order, | |
| 52 | + tb.create_by_id, | |
| 53 | + tb.create_by, | |
| 54 | + tb.update_by_id, | |
| 55 | + tb.update_by, | |
| 56 | + tb.create_time, | |
| 57 | + tb.update_time, | |
| 58 | + tb.product_id, | |
| 59 | + tb.thickness_tol_pos, | |
| 60 | + tb.thickness_tol_neg, | |
| 61 | + tb.width_tol_pos, | |
| 62 | + tb.width_tol_neg, | |
| 63 | + tb.length_tol_pos, | |
| 64 | + tb.length_tol_neg | |
| 65 | + FROM tbl_contract_distributor_line AS tb | |
| 66 | + </sql> | |
| 67 | + | |
| 68 | + <select id="query" resultMap="ContractDistributorLine"> | |
| 69 | + <include refid="ContractDistributorLine_sql"/> | |
| 70 | + <where> | |
| 71 | + <if test="vo.contractId != null and vo.contractId != ''"> | |
| 72 | + AND tb.contract_id = #{vo.contractId} | |
| 73 | + </if> | |
| 74 | + </where> | |
| 75 | + </select> | |
| 76 | +</mapper> | ... | ... |
| ... | ... | @@ -27,6 +27,7 @@ |
| 27 | 27 | <result column="packaging" property="packaging"/> |
| 28 | 28 | <result column="special_terms" property="specialTerms"/> |
| 29 | 29 | <result column="designated_consignee" property="designatedConsignee"/> |
| 30 | + <result column="special_instructions" property="specialInstructions"/> | |
| 30 | 31 | <result column="remarks" property="remarks"/> |
| 31 | 32 | <result column="status" property="status"/> |
| 32 | 33 | <result column="create_by_id" property="createById"/> |
| ... | ... | @@ -38,6 +39,8 @@ |
| 38 | 39 | <result column="total_quantity" property="totalQuantity"/> |
| 39 | 40 | <result column="total_amount_excluding_tax" property="totalAmountExcludingTax"/> |
| 40 | 41 | <result column="total_amount_including_tax" property="totalAmountIncludingTax"/> |
| 42 | + <result column="type" property="type"/> | |
| 43 | + <result column="parent_id" property="parentId"/> | |
| 41 | 44 | </resultMap> |
| 42 | 45 | |
| 43 | 46 | <sql id="ContractDistributorStandard_sql"> |
| ... | ... | @@ -66,6 +69,7 @@ |
| 66 | 69 | tb.packaging, |
| 67 | 70 | tb.special_terms, |
| 68 | 71 | tb.designated_consignee, |
| 72 | + tb.special_instructions, | |
| 69 | 73 | tb.remarks, |
| 70 | 74 | tb.status, |
| 71 | 75 | tb.create_by_id, |
| ... | ... | @@ -76,7 +80,9 @@ |
| 76 | 80 | tb.update_time, |
| 77 | 81 | tb.total_quantity, |
| 78 | 82 | tb.total_amount_excluding_tax, |
| 79 | - tb.total_amount_including_tax | |
| 83 | + tb.total_amount_including_tax, | |
| 84 | + tb.type, | |
| 85 | + tb.parent_id | |
| 80 | 86 | FROM tbl_contract_distributor_standard AS tb |
| 81 | 87 | </sql> |
| 82 | 88 | |
| ... | ... | @@ -84,7 +90,7 @@ |
| 84 | 90 | <include refid="ContractDistributorStandard_sql"/> |
| 85 | 91 | <where> |
| 86 | 92 | <if test="vo.code != null and vo.code != ''"> |
| 87 | - AND tb.code LIKE CONCAT('%', #{vo.code}) | |
| 93 | + AND code like CONCAT('%', #{vo.code}, '%') | |
| 88 | 94 | </if> |
| 89 | 95 | <if test="vo.buyerList != null and vo.buyerList.size() > 0"> |
| 90 | 96 | AND tb.buyer IN |
| ... | ... | @@ -108,7 +114,10 @@ |
| 108 | 114 | AND tb.order_date <= #{vo.orderDateEnd} |
| 109 | 115 | </if> |
| 110 | 116 | <if test="vo.status != null"> |
| 111 | - AND tb.status = #{vo.status} | |
| 117 | + AND tb.status LIKE CONCAT(#{vo.status}, '%') | |
| 118 | + </if> | |
| 119 | + <if test="vo.type != null"> | |
| 120 | + AND tb.type = #{vo.type} | |
| 112 | 121 | </if> |
| 113 | 122 | </where> |
| 114 | 123 | </select> | ... | ... |