|
|
|
@ -318,7 +318,7 @@ public class HighCouponController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 中石化
|
|
|
|
|
if (coupon.getCouponSource() != null && (coupon.getCouponSource() != 4 && coupon.getCouponSource() != 5)) { |
|
|
|
|
if (coupon.getCouponSource() != null && (coupon.getCouponSource() != 4 && coupon.getCouponSource() != 5 && coupon.getCouponSource() != 6)) { |
|
|
|
|
// 根据卡卷查询 销售码库存
|
|
|
|
|
if (highCouponCodeService.getStockCountByCoupon(coupon.getId()) == 0) { |
|
|
|
|
log.error("HighCouponController -> upShelfApprove() error!","卡卷库存数量错误"); |
|
|
|
@ -326,19 +326,27 @@ public class HighCouponController { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
HighApprove approve = new HighApprove(); |
|
|
|
|
approve.setObjectType(ApproveType.UP_SHELF_APPROVE.getType()); |
|
|
|
|
approve.setObjectId(id); |
|
|
|
|
approve.setObjectName(coupon.getCouponName()); |
|
|
|
|
approve.setApproveSerialNo(DateUtil.date2String(new Date(), "yyyyMMddHHmmss")); |
|
|
|
|
approve.setStatus(1); |
|
|
|
|
approve.setCreateTime(new Date()); |
|
|
|
|
approve.setUpdateTime(new Date()); |
|
|
|
|
approve.setSubmitOperatorId(userInfoModel.getSecUser().getId()); |
|
|
|
|
approve.setSubmitOperatorName(userInfoModel.getSecUser().getUserName()); |
|
|
|
|
if (coupon.getCompanyId() == 57) { |
|
|
|
|
coupon.setStatus(2); |
|
|
|
|
highCouponService.updateCoupon(coupon); |
|
|
|
|
coupon.setUpdateTime(new Date()); |
|
|
|
|
} else { |
|
|
|
|
HighApprove approve = new HighApprove(); |
|
|
|
|
approve.setObjectType(ApproveType.UP_SHELF_APPROVE.getType()); |
|
|
|
|
approve.setObjectId(id); |
|
|
|
|
approve.setObjectName(coupon.getCouponName()); |
|
|
|
|
approve.setApproveSerialNo(DateUtil.date2String(new Date(), "yyyyMMddHHmmss")); |
|
|
|
|
approve.setStatus(1); |
|
|
|
|
approve.setCreateTime(new Date()); |
|
|
|
|
approve.setUpdateTime(new Date()); |
|
|
|
|
approve.setSubmitOperatorId(userInfoModel.getSecUser().getId()); |
|
|
|
|
approve.setSubmitOperatorName(userInfoModel.getSecUser().getUserName()); |
|
|
|
|
|
|
|
|
|
// 增加审批
|
|
|
|
|
highApproveService.insertApprove(approve); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 增加审批
|
|
|
|
|
highApproveService.insertApprove(approve); |
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success("操作成功"); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|