| | |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import com.hx.phiappt.common.OrderTotalConstants; |
| | | import com.hx.phiappt.dao.mapper.OrdersTotalMapper; |
| | | import com.hx.phiappt.model.BaseEntity; |
| | | import com.hx.phiappt.model.Employee; |
| | | import com.hx.phiappt.model.EmployeeRole; |
| | | import com.hx.phiappt.model.*; |
| | | import com.hx.phiappt.model.consume.ConsumeNotify; |
| | | import com.hx.phiappt.model.order.OrdersTotal; |
| | | import com.hx.phiappt.model.refund.RefundRecord; |
| | | import com.hx.phip.service.EmployeeRoleService; |
| | | import com.hx.phip.service.EmployeeService; |
| | | import com.hx.phip.service.OrdersTotalService; |
| | | import com.hx.phiappt.vo.system.config.RefundConfigVo; |
| | | import com.hx.phip.service.*; |
| | | import com.hx.phip.service.consume.ConsumeNotifyService; |
| | | import com.hx.phip.service.order.OrderRefundService; |
| | | import com.hx.phip.service.refund.RefundRecordService; |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | private EmployeeRoleService employeeRoleService; |
| | | @Resource |
| | | private ConsumeNotifyService consumeNotifyService; |
| | | |
| | | @Resource |
| | | private SystemParameterService systemParameterService; |
| | | @Resource |
| | | private PaymentMethodService paymentMethodService; |
| | | |
| | | |
| | | /** 部分退款显示数据接口-获取可退款数量*/ |
| | |
| | | |
| | | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | |
| | | /** 获取其他现金退款支付方式列表 */ |
| | | private List<Map<String, Object>> getOtherCashRefundMethodList(){ |
| | | SystemParameter sp = systemParameterService.selectOneByName(SystemParameter.KEY_REFUND_CONFIG); |
| | | if(sp == null || StringUtils.isEmpty(sp.getParamValue())){ |
| | | return null; |
| | | } |
| | | |
| | | //转换vo |
| | | RefundConfigVo refundConfig = JSONObject.parseObject(sp.getParamValue(), RefundConfigVo.class); |
| | | if(refundConfig == null || refundConfig.getIsEnableSocrm() == null |
| | | || refundConfig.getIsEnableSocrm() != BaseEntity.YES |
| | | || StringUtils.isEmpty(refundConfig.getOtherCashRefundMethodNos())){ |
| | | return null; |
| | | } |
| | | |
| | | String [] noArr = refundConfig.getOtherCashRefundMethodNos().split(","); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | Map<String, Object> dataMap; |
| | | //遍历查询对应支付编号的支付方式 |
| | | for(String numberNo : noArr){ |
| | | PaymentMethod paymentMethod = paymentMethodService.selectNumberNo(numberNo); |
| | | //查询不到支付方式 |
| | | if(paymentMethod == null){ |
| | | continue; |
| | | } |
| | | //支付方式是现金和执行金额 |
| | | if(paymentMethod.getIsMoneyPay() == BaseEntity.YES && paymentMethod.getIsExecute() == BaseEntity.YES){ |
| | | dataMap = new HashMap<>(); |
| | | dataMap.put("payMethodNo", paymentMethod.getNumberNo()); |
| | | dataMap.put("payMethodName", paymentMethod.getName()); |
| | | list.add(dataMap); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | } |