Merge branch 'master-base' into master-test
| | |
| | | if(sp != null) { |
| | | //需要判断一下是否过期 |
| | | Calendar ca = Calendar.getInstance(); |
| | | long curTime = ca.getTimeInMillis(); |
| | | //加上一秒钟提前过期 |
| | | long curTime = ca.getTimeInMillis()+1000L; |
| | | ca.setTime(sp.getCreateTime()); |
| | | ca.add(Calendar.SECOND, Integer.parseInt(sp.getParamValue1())); |
| | | if(curTime < ca.getTimeInMillis()) { |
| | |
| | | if(sp != null) { |
| | | //需要判断一下是否过期 |
| | | Calendar ca = Calendar.getInstance(); |
| | | long curTime = ca.getTimeInMillis(); |
| | | //加上1秒钟,提前过期 |
| | | long curTime = ca.getTimeInMillis()+1000L; |
| | | ca.setTime(sp.getCreateTime()); |
| | | ca.add(Calendar.SECOND, Integer.parseInt(sp.getParamValue1())); |
| | | if(curTime < ca.getTimeInMillis()) { |
| | |
| | | refundCardEquity.setOccupyRefundTotal(cardEquityRealRefund.getOccupyEqRefundTotal()); |
| | | refundCardEquity.setOccupyRefundIntegral(cardEquityRealRefund.getOccupyEqRefundIntegral()); |
| | | |
| | | logger.info("卡项OCC退款OCC抵扣积分{},OCC总积分{}",refundCard.getOccupyRefundIntegralDeduction(),refundCard.getOccupyRefundIntegral()); |
| | | // 卡项OCC抵扣积分占比OCC总积分 |
| | | proportion = refundCard.getOccupyRefundIntegralDeduction().divide(refundCard.getOccupyRefundIntegral(),20,RoundingMode.HALF_UP); |
| | | logger.info("卡项OCC退款OCC抵扣积分{},OCC总积分{},占比:{}",refundCard.getOccupyRefundIntegralDeduction() |
| | | ,refundCard.getOccupyRefundIntegral(),proportion); |
| | | if (refundCard.getOccupyRefundIntegral() != null && refundCard.getOccupyRefundIntegral().compareTo(BigDecimal.ZERO) != 0){ |
| | | proportion = refundCard.getOccupyRefundIntegralDeduction().divide(refundCard.getOccupyRefundIntegral(),20,RoundingMode.HALF_UP); |
| | | }else { |
| | | proportion = BigDecimal.ZERO; |
| | | } |
| | | logger.info("卡项OCC退款OCC抵扣积分占比OCC总积分:{}",proportion); |
| | | |
| | | refundCardEquity.setOccupyRefundIntegralDeduction(cardEquityRealRefund.getOccupyRefundIntegral().multiply(proportion)); |
| | | refundCardEquity.setOccupyRefundIntegralCash(cardEquityRealRefund.getOccupyIntegralDeduction().multiply(refundCard.getCashRate())); |
| | |
| | | Date newDate = new Date(); |
| | | long secondNum = (newDate.getTime() - createTime.getTime())/1000; |
| | | secondNum = second - secondNum; |
| | | if(secondNum < 0){ |
| | | secondNum = 0; |
| | | if(secondNum <= 0){ |
| | | secondNum = 1; |
| | | } |
| | | return secondNum; |
| | | } |
| | |
| | | |
| | | //颜值规划关联的美际报告 |
| | | MjSkinReport mjSkinReport = commonService.selectOneByKey(MjSkinReportMapper.class,mjRecordId); |
| | | if(mjSkinReport != null){ |
| | | if (!StringUtils.isEmpty(mjSkinReport.getShareUrl()) && !mjSkinReport.getShareUrl().contains("https")) { |
| | | mjSkinReport.setShareUrl( mjSkinReport.getShareUrl().replace("http", "https")); |
| | | } |
| | | if (!StringUtils.isEmpty(mjSkinReport.getViewUrl()) && !mjSkinReport.getViewUrl().contains("https")) { |
| | | mjSkinReport.setViewUrl(mjSkinReport.getViewUrl().replace("http", "https")); |
| | | } |
| | | } |
| | | data.put("mjSkinReport",mjSkinReport); |
| | | //查询对应关联资源文件记录 |
| | | data.put("rsList",getMjFileList(mjRecordId)); |
| | |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | |
| | | stringBuilder.append("SELECT uc.* FROM user_card uc"); |
| | | stringBuilder.append(" join user u on u.id = uc.userId "); |
| | | stringBuilder.append(" WHERE uc.isDel = 0 "); |
| | | |
| | | if(StringUtils.noNull(cardBagDto.getKeyWord())){ |
| | | values.put("keyWord","%"+cardBagDto.getKeyWord()+"%"); |
| | | stringBuilder.append(" JOIN user u ON u.tel LIKE #{m.keyWord} OR u.CIQ LIKE #{m.keyWord}"); |
| | | stringBuilder.append(" and ( u.tel LIKE #{m.keyWord} OR u.CIQ LIKE #{m.keyWord} )"); |
| | | } |
| | | stringBuilder.append(" WHERE uc.isDel = 0"); |
| | | |
| | | if(StringUtils.noNull(cardBagDto.getUserId())){ |
| | | values.put("userId",cardBagDto.getUserId()); |
| | | stringBuilder.append(" AND uc.userId = #{m.userId}"); |
| | |
| | | |
| | | //删除治疗单 |
| | | values.put("status", TreatSingleConstants.STATUS_CANCEL); |
| | | sqlSentence.setSqlSentence(" status = #{m.status}, isDel = 1, editTime = now() where id = #{m.treatSingleId} "); |
| | | sqlSentence.setSqlSentence(" status = #{m.status}, isDel = 1, editTime = now() where id = #{m.treatSingleId} and isDel = 0 "); |
| | | if (treatSingleMapper.updateWhere(sqlSentence)!= 1) { |
| | | throw new PlatTipsException(PlatformCode.ERROR_TIPS, "作废治疗通知单失败!"); |
| | | } |
| | |
| | | // treatBodyPartMapper.updateWhere(sqlSentence); |
| | | |
| | | values.put("id", visitOrder.getId()); |
| | | sqlSentence.sqlUpdate(" isTreatOrder = isTreatOrder - 1 WHERE id = #{m.id} ", values); |
| | | sqlSentence.sqlUpdate(" isTreatOrder = isTreatOrder - 1 WHERE id = #{m.id} and isTreatOrder > 0 ", values); |
| | | if (visitOrderMapper.updateWhere(sqlSentence) != 1) { |
| | | throw new PlatTipsException(PlatformCode.ERROR_TIPS, "修改到访订单信息失败!"); |
| | | } |