| | |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeActiveCard; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeClientCard; |
| | | import com.dy.pipIrrGlobal.util.Constant; |
| | | import com.dy.pipIrrGlobal.voSe.VoActiveCard; |
| | | import com.dy.pipIrrSell.cardOperate.enums.OperateTypeENUM; |
| | | import com.dy.pipIrrSell.clientCard.CardStateENUM; |
| | | import com.dy.pipIrrSell.clientCard.ClientCardSv; |
| | | import com.dy.pipIrrSell.clientCard.LastOperateENUM; |
| | | import com.dy.pipIrrSell.recharge.DtoRecharge; |
| | | import com.dy.pipIrrSell.recharge.RechargeCtrl; |
| | | import com.dy.pipIrrSell.recharge.RechargeSv; |
| | | import com.dy.pipIrrSell.result.SellResultCode; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.media.Content; |
| | |
| | | import jakarta.validation.Valid; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.BindingResult; |
| | |
| | | private final ActiveCardSv activeCardSv; |
| | | private final ClientCardSv clientCardSv; |
| | | private final RechargeCtrl rechargeCtrl; |
| | | private final RechargeSv rechargeSv; |
| | | |
| | | @Value("${projectCode.ym}") |
| | | private Integer projectCode; |
| | | |
| | | //@Value("${projectCode.ym}") |
| | | //private Integer projectCode; |
| | | |
| | | /** |
| | | * 获取开卡记录 |
| | |
| | | /** |
| | | * 如果操作人员开卡时输入了充值金额,则开卡后调用充值功能 |
| | | */ |
| | | po.setCardNum(cardNum); |
| | | po.setCardNum(Long.parseLong(cardNum)); |
| | | if(amount != null && amount > 0) { |
| | | po.setClientId(clientId); |
| | | DtoRecharge dtoRecharge = RechargeDtoMapper.INSTANCT.po2vo(po); |
| | |
| | | } |
| | | |
| | | Map map = new HashMap(); |
| | | map.put("projectCode", projectCode); |
| | | if(amount != null && amount > 0) { |
| | | Long rechargeId = rechargeSv.selectIdByCardId(cardId); |
| | | map.put("orderNumber",rechargeId+"");//返回充值ID |
| | | }else { |
| | | map.put("orderNumber",rec+"");//返回开卡ID |
| | | } |
| | | //map.put("projectCode", projectCode); |
| | | map.put("projectCode", Constant.projectCode_ym); |
| | | map.put("cardNum", cardNum); |
| | | return BaseResponseUtils.buildSuccess(map) ; |
| | | } |
| | |
| | | * activeTime 补卡时间 |
| | | */ |
| | | Long cardId = 0L; |
| | | String cardNum = po.getCardNum(); |
| | | Long cardNum = po.getCardNum(); |
| | | //String clientNum = ""; |
| | | Long clientId = 0L; |
| | | Integer cardCost = po.getCardCost(); |
| | | Double reissueAmount = po.getReissueAmount(); |
| | | Float reissueAmount = po.getReissueAmount(); |
| | | Long paymentId = po.getPaymentId(); |
| | | String remarks = po.getRemarks(); |
| | | Long operator = po.getOperator(); |
| | |
| | | activeCard.setCardcost(cardCost); |
| | | activeCard.setPaymentid(paymentId); |
| | | activeCard.setReissueamount(reissueAmount); |
| | | activeCard.setOperatetype(OperateTypeENUM.REPLACE.getCode()); |
| | | activeCard.setOperatetype(OperateTypeENUM.REISSUE.getCode()); |
| | | activeCard.setRemarks(remarks); |
| | | activeCard.setOperator(operator); |
| | | activeCard.setOperatedt(replaceTime); |