| | |
| | | sysProjServices.setTotalTime(totalTime); |
| | | sysProjServices.setMoney(new BigDecimal(hkPrice).setScale(2, BigDecimal.ROUND_HALF_DOWN).doubleValue()); |
| | | sysProjServicesDao.update(sysProjServices); |
| | | |
| | | //jyytodo 小程序订单没有操作人 |
| | | Long userId=0L; |
| | | if(user!=null){ |
| | | userId= user.getSuId(); |
| | | } |
| | | //保存单据日志 |
| | | operationLogService.saveOperation(sysProjServices.getCompanyId(), sysProjServices.getShopId(),user.getSuId(), |
| | | operationLogService.saveOperation(sysProjServices.getCompanyId(), sysProjServices.getShopId(),userId, |
| | | OperationFunctionEnum.SERVICE_ORDER, |
| | | OperationButtonEnum.CREATE, |
| | | sysProjServices.getId(), |
| | |
| | | taocanProjUse.setIsOver(Dictionary.DELETED_N); |
| | | taocanProjUse.setStatus(Dictionary.MONEYCARD_STATUS_YX); |
| | | taocanProjUse.setBalance(MoneyUtil.add(taocanProjUse.getBalance(), backBlance.doubleValue())); |
| | | if (Dictionary.FLAG_YES_Y.equals(taocanProjUse.getIsCourse())) { |
| | | if (StringUtils.isBlank(taocanProjUse.getIsInfinite()) || Dictionary.FLAG_NO_N.equals(taocanProjUse.getIsInfinite())) { |
| | | taocanProjUse.setSurplusCount(taocanProjUse.getSurplusCount() + beauticianState.getCount()); |
| | | } |
| | | // if (Dictionary.FLAG_YES_Y.equals(taocanProjUse.getIsCourse())) { |
| | | if (StringUtils.isBlank(taocanProjUse.getIsInfinite()) || Dictionary.FLAG_NO_N.equals(taocanProjUse.getIsInfinite())) { |
| | | taocanProjUse.setSurplusCount(taocanProjUse.getSurplusCount() + beauticianState.getCount()); |
| | | } |
| | | // } |
| | | sysProjUseDao.update(taocanProjUse); |
| | | } |
| | | |
| | |
| | | BusParameterSettings principalConsumption = busParameterSettingsDao.selectCompanyParamByCode(ScoreSettingConstant.PRINCIPAL_CONSUMPTION, vipInfo.getCompanyId()); |
| | | //本金消耗 |
| | | if (principalPrice > 0 |
| | | && StringUtils.isNotBlank(principalConsumption.getParamValue())) { |
| | | && StringUtils.isNotBlank(principalConsumption.getParamValue()) && Double.parseDouble(principalConsumption.getParamValue()) > 0 ) { |
| | | |
| | | principalConsumScore[0] = (int) (principalPrice / Double.parseDouble(principalConsumption.getParamValue())); |
| | | |
| | | if (StringUtils.isNotBlank(principalConsumption.getParamValue1())) { |
| | | if (StringUtils.isNotBlank(principalConsumption.getParamValue1()) && Double.parseDouble(principalConsumption.getParamValue1()) > 0 ) { |
| | | principalConsumScore[1] = (int) (principalPrice / Double.parseDouble(principalConsumption.getParamValue1())); |
| | | } |
| | | |
| | | if (StringUtils.isNotBlank(principalConsumption.getParamValue2())) { |
| | | if (StringUtils.isNotBlank(principalConsumption.getParamValue2()) && Double.parseDouble(principalConsumption.getParamValue2()) > 0 ) { |
| | | principalConsumScore[2] = (int) (principalPrice / Double.parseDouble(principalConsumption.getParamValue2())); |
| | | } |
| | | } |
| | |
| | | BusParameterSettings giveConsumption = busParameterSettingsDao.selectCompanyParamByCode(ScoreSettingConstant.GIVE_CONSUMPTION, vipInfo.getCompanyId()); |
| | | //本金消耗 |
| | | if (giftPrice > 0 |
| | | && StringUtils.isNotBlank(giveConsumption.getParamValue())) { |
| | | && StringUtils.isNotBlank(giveConsumption.getParamValue()) && Double.parseDouble(giveConsumption.getParamValue())>0) { |
| | | |
| | | giveConsumScore[0] = (int) (giftPrice / Double.parseDouble(giveConsumption.getParamValue())); |
| | | |
| | | if (StringUtils.isNotBlank(giveConsumption.getParamValue1())) { |
| | | if (StringUtils.isNotBlank(giveConsumption.getParamValue1()) && Double.parseDouble(giveConsumption.getParamValue1())>0) { |
| | | giveConsumScore[1] = (int) (giftPrice / Double.parseDouble(giveConsumption.getParamValue1())); |
| | | } |
| | | |
| | | if (StringUtils.isNotBlank(giveConsumption.getParamValue2())) { |
| | | if (StringUtils.isNotBlank(giveConsumption.getParamValue2()) && Double.parseDouble(giveConsumption.getParamValue2())>0 ) { |
| | | giveConsumScore[2] = (int) (giftPrice / Double.parseDouble(giveConsumption.getParamValue2())); |
| | | } |
| | | } |
| | |
| | | if (CollectionUtils.isNotEmpty(projServicesVo.getOutStoreItem())) { |
| | | BusParameterSettings manageStockSetting = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WAREHOUSE_MANAGE_STOCK, projServicesVo.getCompanyId()); |
| | | // if (AppConstance.IS_Y.equals(manageStockSetting.getParamValue())) { |
| | | if (BooleanEnum.TRUE.getValue().equals(manageStockSetting.getParamValue())) { |
| | | if (BooleanEnum.TRUE.getValue() == manageStockSetting.getIntParamValue()) { |
| | | for (SysOutStoreItem item : projServicesVo.getOutStoreItem()) { |
| | | if (item.getAmount() != null && item.getAmount() > 0) { |
| | | return true; |
| | |
| | | sysProjServicesDao.update(checkprojServices); |
| | | } |
| | | //保存单据日志 |
| | | operationLogService.saveOperation(projServices.getCompanyId(), projServices.getShopId(),users.getSuId(), |
| | | // operationLogService.saveOperation(projServices.getCompanyId(), projServices.getShopId(),users.getSuId(), |
| | | // OperationFunctionEnum.SERVICE_ORDER, |
| | | // OperationButtonEnum.SERVICE_ORDER_END, |
| | | // projServices.getId(), |
| | | // projServices.getServiceNo(), |
| | | // projServices.getVipId()); |
| | | operationLogService.saveOperation(checkprojServices.getCompanyId(), checkprojServices.getShopId(),users.getSuId(), |
| | | OperationFunctionEnum.SERVICE_ORDER, |
| | | OperationButtonEnum.SERVICE_ORDER_END, |
| | | projServices.getId(), |
| | | projServices.getServiceNo(), |
| | | projServices.getVipId()); |
| | | checkprojServices.getId(), |
| | | checkprojServices.getServiceNo(), |
| | | checkprojServices.getVipId()); |
| | | return rerunlt; |
| | | } |
| | | |
| | |
| | | // flag = true; |
| | | // break; |
| | | // } |
| | | if (step.equals(setting.getCode()) && BooleanEnum.TRUE.getValue().equals(setting.getUserValue())) { |
| | | if (step.equals(setting.getCode()) && BooleanEnum.TRUE.getValue() == Integer.parseInt(setting.getUserValue())) { |
| | | flag = true; |
| | | break; |
| | | } |
| | |
| | | return i; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int signService(SysProjServices services) { |
| | | SysProjServices projServices =findById(services.getId()); |
| | | projServices.setSignPic(services.getSignPic()); |
| | | return sysProjServicesDao.update(projServices); |
| | | } |
| | | |
| | | |
| | | } |