Commit 874a716d71027ff43b7deaa1409bb1c26debfef6

Authored by 房远帅
1 parent 418472db

报价:业务员报价-审核流程

... ... @@ -290,7 +290,7 @@ public class SalesmanQuotationServiceImpl
290 290 /**
291 291 * 更新审核状态
292 292 *
293   - * @param id 主键ID
  293 + * @param id 主键ID
294 294 * @param approvalStatus 审核状态
295 295 */
296 296 @Override
... ... @@ -298,11 +298,18 @@ public class SalesmanQuotationServiceImpl
298 298 if (StringUtils.isBlank(id) || StringUtils.isBlank(approvalStatus)) {
299 299 throw new DefaultClientException("业务员报价ID、审核状态不能为空!");
300 300 }
301   -
302   - Wrapper<SalesmanQuotation> wrapper = Wrappers.lambdaUpdate(SalesmanQuotation.class)
303   - .set(SalesmanQuotation::getApprovalStatus, approvalStatus)
304   - .eq(SalesmanQuotation::getId, id);
305   - getBaseMapper().update(wrapper);
  301 + if ("PASS".equals(approvalStatus)) {
  302 + Wrapper<SalesmanQuotation> wrapper = Wrappers.lambdaUpdate(SalesmanQuotation.class)
  303 + .set(SalesmanQuotation::getApprovalStatus, approvalStatus)
  304 + .set(SalesmanQuotation::getStatus, "QUOTED")
  305 + .eq(SalesmanQuotation::getId, id);
  306 + getBaseMapper().update(wrapper);
  307 + } else {
  308 + Wrapper<SalesmanQuotation> wrapper = Wrappers.lambdaUpdate(SalesmanQuotation.class)
  309 + .set(SalesmanQuotation::getApprovalStatus, approvalStatus)
  310 + .eq(SalesmanQuotation::getId, id);
  311 + getBaseMapper().update(wrapper);
  312 + }
306 313 }
307 314
308 315
... ...