| | |
| | | private String industryId; |
| | | |
| | | @ApiModelProperty("单位工程ID") |
| | | private String unitProjectId; |
| | | private List<String> unitProjectId; |
| | | |
| | | @ApiModelProperty("单位工程一级ID") |
| | | private List<String> importantDistrictId; |
| | | |
| | | @ApiModelProperty("产品类型ID") |
| | | private String productTypeId; |
| | |
| | | */ |
| | | List<String> selectProductIdsByConditions( |
| | | @Param("industryId") String industryId, |
| | | @Param("unitProjectId") String unitProjectId, |
| | | @Param("unitProjectId") List<String> unitProjectId, |
| | | @Param("importantDistrictId") List<String> importantDistrictId, |
| | | @Param("productTypeId") String productTypeId, |
| | | @Param("productSubTypeId") String productSubTypeId |
| | | ); |
| | |
| | | public PageResult<OrderDetailVO> getPendingApprovalOrderPageWithProductConditions(OrderQueryDTO queryDTO) { |
| | | // 根据产品条件查询产品ID列表 |
| | | List<String> productIds = null; |
| | | if (StringUtils.hasText(queryDTO.getIndustryId()) || StringUtils.hasText(queryDTO.getUnitProjectId()) || |
| | | if (StringUtils.hasText(queryDTO.getIndustryId()) || queryDTO.getUnitProjectId() != null || |
| | | StringUtils.hasText(queryDTO.getProductTypeId()) || StringUtils.hasText(queryDTO.getProductSubTypeId())) { |
| | | productIds = reportResultSubmissionMapper.selectProductIdsByConditions( |
| | | queryDTO.getIndustryId(), queryDTO.getUnitProjectId(), |
| | | queryDTO.getIndustryId(), queryDTO.getUnitProjectId(), queryDTO.getImportantDistrictId(), |
| | | queryDTO.getProductTypeId(), queryDTO.getProductSubTypeId() |
| | | ); |
| | | |
| | |
| | | |
| | | // 根据产品条件查询产品ID列表 |
| | | List<String> productIds = null; |
| | | if (StringUtils.hasText(queryDTO.getIndustryId()) || StringUtils.hasText(queryDTO.getUnitProjectId()) || |
| | | if (StringUtils.hasText(queryDTO.getIndustryId()) || queryDTO.getUnitProjectId() != null || |
| | | StringUtils.hasText(queryDTO.getProductTypeId()) || StringUtils.hasText(queryDTO.getProductSubTypeId())) { |
| | | productIds = reportResultSubmissionMapper.selectProductIdsByConditions( |
| | | queryDTO.getIndustryId(), queryDTO.getUnitProjectId(), |
| | | queryDTO.getIndustryId(), queryDTO.getUnitProjectId(), queryDTO.getImportantDistrictId(), |
| | | queryDTO.getProductTypeId(), queryDTO.getProductSubTypeId() |
| | | ); |
| | | |
| | |
| | | |
| | | // 根据产品条件查询产品ID列表 |
| | | List<String> productIds = null; |
| | | if (StringUtils.hasText(queryDTO.getIndustryId()) || StringUtils.hasText(queryDTO.getUnitProjectId()) || |
| | | if (StringUtils.hasText(queryDTO.getIndustryId()) || queryDTO.getUnitProjectId()!= null || |
| | | StringUtils.hasText(queryDTO.getProductTypeId()) || StringUtils.hasText(queryDTO.getProductSubTypeId())) { |
| | | productIds = reportResultSubmissionMapper.selectProductIdsByConditions( |
| | | queryDTO.getIndustryId(), queryDTO.getUnitProjectId(), |
| | | queryDTO.getIndustryId(), queryDTO.getUnitProjectId(), queryDTO.getImportantDistrictId(), |
| | | queryDTO.getProductTypeId(), queryDTO.getProductSubTypeId() |
| | | ); |
| | | |
| | |
| | | // 根据审批结果调用提交或驳回接口 |
| | | String comment = orderApprovalDTO.getApprovalResult().contains("驳回") ? "审核驳回" : "审核通过"; |
| | | if ("审核驳回".equals(comment)) { |
| | | rejectWorkflowTask(orderApprovalDTO.getTaskId(), String.valueOf(orderApprovalDTO.getApproverId()), comment); |
| | | rejectWorkflowTask(orderApprovalDTO.getTaskId(), String.valueOf(orderApprovalDTO.getApproverId()), orderApprovalDTO.getApprovalOpinion()); |
| | | } else { |
| | | completeWorkflowTask(orderApprovalDTO.getTaskId(), String.valueOf(orderApprovalDTO.getApproverId()), comment); |
| | | completeWorkflowTask(orderApprovalDTO.getTaskId(), String.valueOf(orderApprovalDTO.getApproverId()), orderApprovalDTO.getApprovalOpinion()); |
| | | } |
| | | |
| | | log.info("审批记录添加成功,订单ID: {}, 审批类型: {}, 审批结果: {}, 审批人: {}, 审批意见: {}", |
| | |
| | | checkDailyLimitByRule(userId, unitId, userRule, userPointsChange); |
| | | } |
| | | if (applyProvider && providerRule.getIsLimit() != null && providerRule.getIsLimit() == 1) { |
| | | checkDailyLimitByRule(providerId, providerId, providerRule, providerPointsChange); |
| | | checkDailyLimitByRule(providerId, null, providerRule, providerPointsChange); |
| | | } |
| | | |
| | | // 余额校验(仅在扣减时) |
| | |
| | | .eq("user_id", userId) |
| | | // .eq("data_category", pointsRule.getRuleName()) |
| | | .eq("rule_id",pointsRule.getId()) |
| | | .eq("data_type", 0) |
| | | // .eq("data_type", 0) |
| | | .ge("flow_time", startOfDay) |
| | | .le("flow_time", endOfDay); |
| | | if(StringUtils.hasText(unitId)){ |
| | |
| | | Integer dailyLimit = pointsRule.getDailyLimit(); |
| | | if (dailyLimit != null && dailyLimit > 0) { |
| | | // 如果今日累计积分超过每日上限,则抛出异常 |
| | | if (Math.abs(todayTotal) >= dailyLimit) { |
| | | if (Math.abs(todayTotal) > dailyLimit) { |
| | | throw new BusinessException("今日该规则积分已达上限: " + dailyLimit); |
| | | } |
| | | |
| | | // 如果加上当前积分会超过每日上限,则抛出异常 |
| | | if (Math.abs(todayTotal + currentPoints) > dailyLimit) { |
| | | throw new BusinessException("本次积分操作将超过每日上限: " + dailyLimit + ",当前已累计: " + Math.abs(todayTotal)); |
| | | } |
| | | // if (Math.abs(todayTotal + currentPoints) > dailyLimit) { |
| | | // throw new BusinessException("本次积分操作将超过每日上限: " + dailyLimit + ",当前已累计: " + Math.abs(todayTotal)); |
| | | // } |
| | | } |
| | | } |
| | | |
| | |
| | | <include refid="Base_Column_List"/> |
| | | FROM tb_order_info |
| | | WHERE deleted = 0 |
| | | AND order_status IN ('待审批授权','待授权', '待交易确认', '已完成', '已取消') |
| | | AND order_status IN ('待审批授权','待授权', '待交易确认', '已完成') |
| | | <if test="orderStatus != null and orderStatus != ''"> |
| | | AND order_status = #{orderStatus} |
| | | </if> |
| | |
| | | <include refid="Base_Column_List"/> |
| | | FROM tb_order_info |
| | | WHERE deleted = 0 |
| | | AND order_status IN ('待授权', '待审批授权', '待交易确认', '已完成', '已取消') |
| | | AND order_status IN ('待授权', '待审批授权', '待交易确认', '已完成') |
| | | <if test="orderStatus != null and orderStatus != ''"> |
| | | AND order_status = #{orderStatus} |
| | | </if> |
| | |
| | | <!-- 根据条件查询产品ID列表 --> |
| | | <select id="selectProductIdsByConditions" resultType="java.lang.String"> |
| | | SELECT id |
| | | FROM tb_report_result_submission |
| | | FROM tb_report_product_submission |
| | | WHERE deleted = '0' |
| | | <if test="industryId != null and industryId != ''"> |
| | | AND industrial_chain_id = #{industryId} |
| | | AND #{industryId} = ANY ( STRING_TO_ARRAY( industrial_chain_id, ',' ) ) |
| | | </if> |
| | | <if test="unitProjectId != null and unitProjectId != ''"> |
| | | AND important_area_id = #{unitProjectId} |
| | | <if test="unitProjectId != null and unitProjectId.size() > 0"> |
| | | AND |
| | | <foreach collection="unitProjectId" item="importantAreaId" open="(" separator="OR" close=")"> |
| | | #{importantAreaId} = ANY ( STRING_TO_ARRAY( important_area_id, ',' ) ) |
| | | </foreach> |
| | | </if> |
| | | <if test="importantDistrictId != null and importantDistrictId.size() > 0"> |
| | | AND |
| | | <foreach collection="importantDistrictId" item="importantDistrictId" open="(" separator="OR" close=")"> |
| | | #{importantDistrictId} = ANY ( STRING_TO_ARRAY( important_district_id, ',' ) ) |
| | | </foreach> |
| | | </if> |
| | | <if test="productTypeId != null and productTypeId != ''"> |
| | | AND type_id = #{productTypeId} |
| | | AND technology_type_id = #{productTypeId} |
| | | </if> |
| | | <if test="productSubTypeId != null and productSubTypeId != ''"> |
| | | AND type_child_id = #{productSubTypeId} |