Showing
9 changed files
with
99 additions
and
0 deletions
| ... | ... | @@ -1718,6 +1718,8 @@ CREATE TABLE `procurement_salesman_quotation` |
| 1718 | 1718 | `material_condition_scrap` varchar(500) DEFAULT NULL COMMENT '角料', |
| 1719 | 1719 | `material_condition_white_yellow` varchar(500) DEFAULT NULL COMMENT '镀白黄', |
| 1720 | 1720 | `material_condition_phosphor_copper` varchar(500) DEFAULT NULL COMMENT '磷铜', |
| 1721 | + `approval_status` varchar(50) DEFAULT NULL COMMENT '审核状态', | |
| 1722 | + `status` varchar(50) DEFAULT NULL COMMENT '状态', | |
| 1721 | 1723 | `create_by_id` varchar(32) DEFAULT NULL COMMENT '创建人ID', |
| 1722 | 1724 | `create_by` varchar(64) DEFAULT NULL COMMENT '创建人', |
| 1723 | 1725 | `update_by_id` varchar(32) DEFAULT NULL COMMENT '更新人ID', | ... | ... |
| ... | ... | @@ -105,4 +105,15 @@ public class SalesmanQuotationController extends DefaultBaseController { |
| 105 | 105 | salesmanQuotationService.update(vo); |
| 106 | 106 | return InvokeResultBuilder.success(); |
| 107 | 107 | } |
| 108 | + | |
| 109 | + /** | |
| 110 | + * 取消 | |
| 111 | + */ | |
| 112 | + @ApiOperation("取消") | |
| 113 | + @HasPermission({"procure-manage:sales-price:cancel"}) | |
| 114 | + @PostMapping("/cancel") | |
| 115 | + public InvokeResult<Void> cancel(@NotBlank(message = "id不能为空!") String id) { | |
| 116 | + salesmanQuotationService.cancel(id); | |
| 117 | + return InvokeResultBuilder.success(); | |
| 118 | + } | |
| 108 | 119 | } | ... | ... |
| ... | ... | @@ -227,6 +227,16 @@ public class SalesmanQuotation extends BaseEntity implements BaseDto { |
| 227 | 227 | private BigDecimal totalQuantity; |
| 228 | 228 | |
| 229 | 229 | /** |
| 230 | + * 审核状态 | |
| 231 | + */ | |
| 232 | + private String approvalStatus; | |
| 233 | + | |
| 234 | + /** | |
| 235 | + * 状态 | |
| 236 | + */ | |
| 237 | + private String status; | |
| 238 | + | |
| 239 | + /** | |
| 230 | 240 | * 报价明细列表 |
| 231 | 241 | */ |
| 232 | 242 | @TableField(exist = false) | ... | ... |
| 1 | 1 | package com.lframework.xingyun.sc.procurement.impl.quotation; |
| 2 | 2 | |
| 3 | +import com.baomidou.mybatisplus.core.conditions.Wrapper; | |
| 3 | 4 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| 4 | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 5 | 6 | import com.github.pagehelper.PageInfo; |
| ... | ... | @@ -20,6 +21,7 @@ import com.lframework.starter.web.inner.entity.SysUser; |
| 20 | 21 | import com.lframework.starter.web.inner.service.system.SysUserService; |
| 21 | 22 | import com.lframework.xingyun.basedata.entity.BreedRelationship; |
| 22 | 23 | import com.lframework.xingyun.basedata.service.breed.BreedRelationshipService; |
| 24 | +import com.lframework.xingyun.sc.enums.CustomerDevelopStatus; | |
| 23 | 25 | import com.lframework.xingyun.sc.procurement.entity.ProcurementDomesticCustomerCredit; |
| 24 | 26 | import com.lframework.xingyun.sc.procurement.entity.SalesmanQuotation; |
| 25 | 27 | import com.lframework.xingyun.sc.procurement.entity.SalesmanQuotationLine; |
| ... | ... | @@ -187,6 +189,28 @@ public class SalesmanQuotationServiceImpl |
| 187 | 189 | } |
| 188 | 190 | |
| 189 | 191 | /** |
| 192 | + * 取消 | |
| 193 | + */ | |
| 194 | + @OpLog(type = OtherOpLogType.class, name = "取消业务员报价,ID:{}", params = {"#id"}) | |
| 195 | + @Transactional(rollbackFor = Exception.class) | |
| 196 | + @Override | |
| 197 | + public void cancel(String id) { | |
| 198 | + SalesmanQuotation data = getBaseMapper().selectById(id); | |
| 199 | + if (ObjectUtil.isNull(data)) { | |
| 200 | + throw new DefaultClientException("业务员报价不存在!"); | |
| 201 | + } | |
| 202 | + Wrapper<SalesmanQuotation> wrapper = Wrappers.lambdaUpdate(SalesmanQuotation.class) | |
| 203 | + .set(SalesmanQuotation::getApprovalStatus, CustomerDevelopStatus.CANCEL.name()) | |
| 204 | + .eq(SalesmanQuotation::getId, id); | |
| 205 | + | |
| 206 | + getBaseMapper().update(wrapper); | |
| 207 | + | |
| 208 | + OpLogUtil.setVariable("id", id); | |
| 209 | + OpLogUtil.setExtra(data); | |
| 210 | + } | |
| 211 | + | |
| 212 | + | |
| 213 | + /** | |
| 190 | 214 | * 构建新增实体 |
| 191 | 215 | * |
| 192 | 216 | * @param vo 新增参数 | ... | ... |
| ... | ... | @@ -224,4 +224,16 @@ public class CreateSalesmanQuotationVo implements BaseVo, Serializable { |
| 224 | 224 | @NotEmpty(message = "报价明细不能为空!") |
| 225 | 225 | private List<CreateSalesmanQuotationLineVo> quotationLineList; |
| 226 | 226 | |
| 227 | + /** | |
| 228 | + * 审核状态 | |
| 229 | + */ | |
| 230 | + @ApiModelProperty("审核状态") | |
| 231 | + private String approvalStatus; | |
| 232 | + | |
| 233 | + /** | |
| 234 | + * 状态 | |
| 235 | + */ | |
| 236 | + @ApiModelProperty("状态") | |
| 237 | + private String status; | |
| 238 | + | |
| 227 | 239 | } | ... | ... |
| ... | ... | @@ -62,4 +62,17 @@ public class QuerySalesmanQuotationVo extends PageVo implements BaseVo, Serializ |
| 62 | 62 | */ |
| 63 | 63 | @ApiModelProperty("报价时间结束") |
| 64 | 64 | private LocalDate quoteDateEnd; |
| 65 | + | |
| 66 | + /** | |
| 67 | + * 审核状态 | |
| 68 | + */ | |
| 69 | + @ApiModelProperty("审核状态") | |
| 70 | + private String approvalStatus; | |
| 71 | + | |
| 72 | + /** | |
| 73 | + * 状态 | |
| 74 | + */ | |
| 75 | + @ApiModelProperty("状态") | |
| 76 | + private String status; | |
| 77 | + | |
| 65 | 78 | } | ... | ... |
| ... | ... | @@ -223,4 +223,16 @@ public class UpdateSalesmanQuotationVo implements BaseVo, Serializable { |
| 223 | 223 | @NotEmpty(message = "报价明细不能为空!") |
| 224 | 224 | private List<UpdateSalesmanQuotationLineVo> quotationLineList; |
| 225 | 225 | |
| 226 | + /** | |
| 227 | + * 审核状态 | |
| 228 | + */ | |
| 229 | + @ApiModelProperty("审核状态") | |
| 230 | + private String approvalStatus; | |
| 231 | + | |
| 232 | + /** | |
| 233 | + * 状态 | |
| 234 | + */ | |
| 235 | + @ApiModelProperty("状态") | |
| 236 | + private String status; | |
| 237 | + | |
| 226 | 238 | } | ... | ... |
| ... | ... | @@ -43,6 +43,8 @@ |
| 43 | 43 | <result column="material_condition_white_yellow" property="materialConditionWhiteYellow"/> |
| 44 | 44 | <result column="material_condition_phosphor_copper" property="materialConditionPhosphorCopper"/> |
| 45 | 45 | <result column="total_quantity" property="totalQuantity"/> |
| 46 | + <result column="approval_status" property="approvalStatus"/> | |
| 47 | + <result column="status" property="status"/> | |
| 46 | 48 | <result column="create_by_id" property="createById"/> |
| 47 | 49 | <result column="create_by" property="createBy"/> |
| 48 | 50 | <result column="update_by_id" property="updateById"/> |
| ... | ... | @@ -93,6 +95,8 @@ |
| 93 | 95 | tb.material_condition_white_yellow, |
| 94 | 96 | tb.material_condition_phosphor_copper, |
| 95 | 97 | tb.total_quantity, |
| 98 | + tb.approval_status, | |
| 99 | + tb.status, | |
| 96 | 100 | tb.create_by_id, |
| 97 | 101 | tb.create_by, |
| 98 | 102 | tb.update_by_id, |
| ... | ... | @@ -132,6 +136,12 @@ |
| 132 | 136 | <if test="vo.quoteDateEnd != null"> |
| 133 | 137 | AND DATE(tb.quote_time) <![CDATA[ <= ]]> #{vo.quoteDateEnd} |
| 134 | 138 | </if> |
| 139 | + <if test="vo.approvalStatus != null and vo.approvalStatus != ''"> | |
| 140 | + AND tb.approval_status = #{vo.approvalStatus} | |
| 141 | + </if> | |
| 142 | + <if test="vo.status != null and vo.status != ''"> | |
| 143 | + AND tb.status = #{vo.status} | |
| 144 | + </if> | |
| 135 | 145 | </where> |
| 136 | 146 | ORDER BY tb.create_time DESC |
| 137 | 147 | </select> | ... | ... |