| | |
| | | |
| | | private String payOrderId; |
| | | |
| | | private String cashierId; |
| | | private String cashierName; |
| | | |
| | | private List<FeeAccountDetailDto> feeAccountDetailDtoList; |
| | | private List<PayFeeDetailDiscountDto> payFeeDetailDiscountDtoList; |
| | | |
| | |
| | | public void setPayerObjName(String payerObjName) { |
| | | this.payerObjName = payerObjName; |
| | | } |
| | | |
| | | public String getCashierId() { |
| | | return cashierId; |
| | | } |
| | | |
| | | public void setCashierId(String cashierId) { |
| | | this.cashierId = cashierId; |
| | | } |
| | | |
| | | public String getCashierName() { |
| | | return cashierName; |
| | | } |
| | | |
| | | public void setCashierName(String cashierName) { |
| | | this.cashierName = cashierName; |
| | | } |
| | | } |
| | |
| | | |
| | | private String yearMonth; |
| | | |
| | | |
| | | private String cashierId; |
| | | private String cashierName; |
| | | |
| | | |
| | | public String getReceivableAmount() { |
| | | return receivableAmount; |
| | | } |
| | |
| | | public void setWithholdAmount(String withholdAmount) { |
| | | this.withholdAmount = withholdAmount; |
| | | } |
| | | |
| | | public String getCashierId() { |
| | | return cashierId; |
| | | } |
| | | |
| | | public void setCashierId(String cashierId) { |
| | | this.cashierId = cashierId; |
| | | } |
| | | |
| | | public String getCashierName() { |
| | | return cashierName; |
| | | } |
| | | |
| | | public void setCashierName(String cashierName) { |
| | | this.cashierName = cashierName; |
| | | } |
| | | } |
| | |
| | | |
| | | private String payOrderId; |
| | | |
| | | /** |
| | | * 收银员 |
| | | */ |
| | | private String cashierId; |
| | | private String cashierName; |
| | | |
| | | |
| | | public String getDetailId() { |
| | | return detailId; |
| | | } |
| | |
| | | public void setPayOrderId(String payOrderId) { |
| | | this.payOrderId = payOrderId; |
| | | } |
| | | |
| | | public String getCashierId() { |
| | | return cashierId; |
| | | } |
| | | |
| | | public void setCashierId(String cashierId) { |
| | | this.cashierId = cashierId; |
| | | } |
| | | |
| | | public String getCashierName() { |
| | | return cashierName; |
| | | } |
| | | |
| | | public void setCashierName(String cashierName) { |
| | | this.cashierName = cashierName; |
| | | } |
| | | } |
| | |
| | | t.state,d.name stateName,t.start_time,t.end_time,t.start_time startTime,t.end_time endTime,pfa.`value` |
| | | importFeeName,pfc.fee_name feeName,t.payable_amount,t.payable_amount payableAmount, |
| | | mw.cur_degrees curDegrees,mw.pre_degrees preDegrees, mw.pre_reading_time preReadingTime,mw.cur_reading_time |
| | | curReadingTime,t.pay_order_id payOrderId,pfc.config_id configId,td.`name` primeRateName,pfao1.`value` payerObjName |
| | | curReadingTime,t.pay_order_id payOrderId,pfc.config_id configId,td.`name` primeRateName,pfao1.`value` payerObjName, |
| | | t.cashier_id cashierId,t.cashier_name cashierName |
| | | from pay_fee_detail t |
| | | left join pay_fee_attrs pfa on t.fee_id = pfa.fee_id and pfa.spec_cd = '390002' |
| | | left join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="cashierId !=null and cashierId != ''"> |
| | | and t.cashier_id= #{cashierId} |
| | | </if> |
| | | <if test="cashierName !=null and cashierName != ''"> |
| | | and t.cashier_name= #{cashierName} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | |
| | | <if test="endTime !=null "> |
| | | and t.create_time <= #{endTime} |
| | | </if> |
| | | <if test="cashierId !=null and cashierId != ''"> |
| | | and t.cashier_id= #{cashierId} |
| | | </if> |
| | | <if test="cashierName !=null and cashierName != ''"> |
| | | and t.cashier_name= #{cashierName} |
| | | </if> |
| | | <if test="curYear != null and curYear != ''"> |
| | | and DATE_FORMAT(DATE_SUB(t.end_time,INTERVAL 1 DAY),'%Y') = #{curYear} |
| | | </if> |
| | |
| | | <!-- 保存费用明细信息 add by wuxw 2018-07-03 --> |
| | | <insert id="savePayFeeDetailNewInfo" parameterType="Map"> |
| | | insert into pay_fee_detail( |
| | | prime_rate,detail_id,receivable_amount,cycles,remark,start_time,received_amount,state,end_time,community_id,fee_id,b_id,payable_amount,pay_order_id |
| | | prime_rate,detail_id,receivable_amount,cycles,remark,start_time,received_amount,state,end_time,community_id, |
| | | fee_id,b_id,payable_amount,pay_order_id,cashier_id,cashier_name |
| | | <if test="createTime != null"> |
| | | ,create_time |
| | | </if> |
| | | ) values ( |
| | | #{primeRate},#{detailId},#{receivableAmount},#{cycles},#{remark},#{startTime},#{receivedAmount},#{state},#{endTime},#{communityId},#{feeId},#{bId},#{payableAmount},#{payOrderId} |
| | | #{primeRate},#{detailId},#{receivableAmount},#{cycles},#{remark},#{startTime},#{receivedAmount},#{state},#{endTime},#{communityId}, |
| | | #{feeId},#{bId},#{payableAmount},#{payOrderId},#{cashierId},#{cashierName} |
| | | <if test="createTime != null"> |
| | | ,#{createTime} |
| | | </if> |
| | |
| | | detailId,t.receivable_amount,t.receivable_amount receivableAmount,t.cycles,t.remark,t.status_cd,t.status_cd |
| | | statusCd,t.start_time,t.start_time startTime,t.received_amount,t.received_amount |
| | | receivedAmount,t.state,t.end_time,t.end_time endTime,t.community_id,t.community_id communityId,t.fee_id,t.fee_id |
| | | feeId,t.payable_amount,t.payable_amount payableAmount,t.pay_order_id payOrderId |
| | | feeId,t.payable_amount,t.payable_amount payableAmount,t.pay_order_id payOrderId,t.cashier_id cashierId,t.cashier_name cashierName |
| | | from pay_fee_detail t |
| | | where 1 =1 |
| | | <if test="primeRate !=null and primeRate != ''"> |
| | |
| | | </if> |
| | | <if test="payOrderId !=null and payOrderId != ''"> |
| | | and t.pay_order_id= #{payOrderId} |
| | | </if> |
| | | <if test="cashierId !=null and cashierId != ''"> |
| | | and t.cashier_id= #{cashierId} |
| | | </if> |
| | | <if test="cashierName !=null and cashierName != ''"> |
| | | and t.cashier_name= #{cashierName} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | |
| | | </if> |
| | | <if test="payOrderId !=null and payOrderId != ''"> |
| | | , t.pay_order_id= #{payOrderId} |
| | | </if> |
| | | <if test="cashierId !=null and cashierId != ''"> |
| | | , t.cashier_id= #{cashierId} |
| | | </if> |
| | | <if test="cashierName !=null and cashierName != ''"> |
| | | , t.cashier_name= #{cashierName} |
| | | </if> |
| | | where 1=1 |
| | | <if test="detailId !=null and detailId != ''"> |
| | |
| | | <if test="payOrderId !=null and payOrderId != ''"> |
| | | and t.pay_order_id= #{payOrderId} |
| | | </if> |
| | | <if test="cashierId !=null and cashierId != ''"> |
| | | and t.cashier_id= #{cashierId} |
| | | </if> |
| | | <if test="cashierName !=null and cashierName != ''"> |
| | | and t.cashier_name= #{cashierName} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <if test="endTime !=null and endTime != ''"> |
| | | and t.create_time <= #{endTime} |
| | | </if> |
| | | <if test="cashierId !=null and cashierId != ''"> |
| | | and t.cashier_id= #{cashierId} |
| | | </if> |
| | | <if test="cashierName !=null and cashierName != ''"> |
| | | and t.cashier_name= #{cashierName} |
| | | </if> |
| | | ) t |
| | | </select> |
| | | |
| | |
| | | ruleName,pfdd.discount_price discountPrice,co.contract_code contractCode,pfo.`value` ownerName,cb.o_id oId, |
| | | d2.name feeTypeCdName,pfc.fee_type_cd feeTypeCd,t.state,d3.name stateName,t.fee_id feeId,pft.`value` repairId, |
| | | t.detail_id,t.detail_id detailId,pf.payer_obj_id,pfb.value ownerId,concat(pa.num,'停车场',ps.num,'车位') psName, |
| | | fad.amount withholdAmount |
| | | fad.amount withholdAmount,t.cashier_id cashierId,t.cashier_name cashierName |
| | | from pay_fee_detail t |
| | | left JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | left join pay_fee_config pfc on pf.config_id = pfc.config_id and pfc.status_cd = '0' |
| | |
| | | <if test="endTime !=null and endTime != ''"> |
| | | and t.create_time <= #{endTime} |
| | | </if> |
| | | <if test="cashierId !=null and cashierId != ''"> |
| | | and t.cashier_id= #{cashierId} |
| | | </if> |
| | | <if test="cashierName !=null and cashierName != ''"> |
| | | and t.cashier_name= #{cashierName} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | |
| | | |
| | | @Override |
| | | public PaymentOrderDto unified(ICmdDataFlowContext context, JSONObject reqJson) { |
| | | String userId = context.getReqHeaders().get("user-id"); |
| | | |
| | | String ownerId = reqJson.getString("ownerId"); |
| | | String roomId = reqJson.getString("roomId"); |
| | |
| | | |
| | | JSONObject saveFees = new JSONObject(); |
| | | saveFees.put("orderId", orderId); |
| | | saveFees.put("userId", userId); |
| | | saveFees.put("money", money); |
| | | saveFees.put("roomId", roomId); |
| | | saveFees.put("communityId", reqJson.getString("communityId")); |
| | |
| | | JSONObject paramIn = JSONObject.parseObject(order); |
| | | paramIn.put("oId", paymentOrderDto.getOrderId()); |
| | | freshFees(paramIn); |
| | | JSONObject paramOut = CallApiServiceFactory.postForApi(paymentOrderDto.getAppId(), paramIn, "fee.payOweFee", JSONObject.class, "-1"); |
| | | JSONObject paramOut = CallApiServiceFactory.postForApi(paymentOrderDto.getAppId(), paramIn, "fee.payOweFee", JSONObject.class, paramIn.getString("userId")); |
| | | |
| | | } |
| | | |
| | |
| | | import com.java110.dto.machine.CarInoutDto; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.owner.OwnerDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.fee.bmo.ApiBaseBMO; |
| | | import com.java110.fee.bmo.fee.IFeeBMO; |
| | | import com.java110.intf.common.ICarInoutInnerServiceSMO; |
| | |
| | | import com.java110.intf.fee.IFeeInnerServiceSMO; |
| | | import com.java110.intf.fee.IPayFeeDetailV1InnerServiceSMO; |
| | | import com.java110.intf.fee.IPayFeeV1InnerServiceSMO; |
| | | import com.java110.intf.user.IUserV1InnerServiceSMO; |
| | | import com.java110.po.car.CarInoutPo; |
| | | import com.java110.po.fee.FeeAttrPo; |
| | | import com.java110.po.fee.PayFeeConfigPo; |
| | |
| | | |
| | | @Autowired |
| | | private IPayFeeV1InnerServiceSMO payFeeV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IUserV1InnerServiceSMO userV1InnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | |
| | | payFeeDetail.setPayableAmount("0.0"); |
| | | } |
| | | payFeeDetail.setPayOrderId(paramInJson.getString("oId")); |
| | | // todo 刷入收银人员信息 |
| | | freshCashierInfo(payFeeDetail, paramInJson); |
| | | |
| | | int flag = payFeeDetailNewV1InnerServiceSMOImpl.savePayFeeDetailNew(payFeeDetail); |
| | | if (flag < 1) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "保存费用明细失败"); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 刷入收银人员 |
| | | * |
| | | * @param payFeeDetail |
| | | * @param paramInJson |
| | | */ |
| | | private void freshCashierInfo(PayFeeDetailPo payFeeDetail, JSONObject paramInJson) { |
| | | String userId = paramInJson.getString("userId"); |
| | | if (StringUtil.isEmpty(userId)) { |
| | | payFeeDetail.setCashierId("-1"); |
| | | payFeeDetail.setCashierName("系统收银"); |
| | | return; |
| | | } |
| | | |
| | | UserDto userDto = new UserDto(); |
| | | userDto.setUserId(userId); |
| | | List<UserDto> userDtos = userV1InnerServiceSMOImpl.queryUsers(userDto); |
| | | if (userDtos != null && userDtos.size() > 0) { |
| | | payFeeDetail.setCashierId(userDtos.get(0).getUserId()); |
| | | payFeeDetail.setCashierName(userDtos.get(0).getName()); |
| | | return; |
| | | } |
| | | |
| | | payFeeDetail.setCashierId("-1"); |
| | | payFeeDetail.setCashierName("系统收银"); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 修改费用信息 |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.dto.repair.RepairDto; |
| | | import com.java110.dto.repair.RepairUserDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.intf.community.*; |
| | | import com.java110.intf.fee.*; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | | import com.java110.intf.user.IUserV1InnerServiceSMO; |
| | | import com.java110.po.car.OwnerCarPo; |
| | | import com.java110.po.fee.PayFeeDetailPo; |
| | | import com.java110.po.fee.PayFeePo; |
| | |
| | | @Autowired |
| | | private IComputeFeeSMO computeFeeSMOImpl; |
| | | |
| | | @Autowired |
| | | private IUserV1InnerServiceSMO userV1InnerServiceSMOImpl; |
| | | |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | String userId = cmdDataFlowContext.getReqHeaders().get("user-id"); |
| | | UserDto userDto = new UserDto(); |
| | | userDto.setUserId(userId); |
| | | List<UserDto> userDtos = userV1InnerServiceSMOImpl.queryUsers(userDto); |
| | | Assert.listOnlyOne(userDtos, "用户未登录"); |
| | | |
| | | JSONArray fees = reqJson.getJSONArray("fees"); |
| | | JSONObject paramInObj = null; |
| | | JSONArray datas = new JSONArray(); |
| | | for (int feeIndex = 0; feeIndex < fees.size(); feeIndex++) { |
| | | try { |
| | | paramInObj = fees.getJSONObject(feeIndex); |
| | | doDeal(paramInObj, reqJson.getString("communityId"), cmdDataFlowContext); |
| | | doDeal(paramInObj, reqJson.getString("communityId"), cmdDataFlowContext, userDtos.get(0)); |
| | | } catch (Exception e) { |
| | | logger.error("处理异常", e); |
| | | throw new CmdException(e.getMessage()); |
| | |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.createResponseEntity(datas)); |
| | | } |
| | | |
| | | private void doDeal(JSONObject paramObj, String communityId, ICmdDataFlowContext cmdDataFlowContext) throws Exception { |
| | | private void doDeal(JSONObject paramObj, String communityId, ICmdDataFlowContext cmdDataFlowContext, UserDto userDto) throws Exception { |
| | | paramObj.put("communityId", communityId); |
| | | //获取订单ID |
| | | String oId = Java110TransactionalFactory.getOId(); |
| | |
| | | DistributedLock.waitGetDistributedLock(key, requestId); |
| | | JSONObject feeDetail = addFeeDetail(paramObj); |
| | | PayFeeDetailPo payFeeDetailPo = BeanConvertUtil.covertBean(feeDetail, PayFeeDetailPo.class); |
| | | if(StringUtil.isEmpty(oId)){ |
| | | if (StringUtil.isEmpty(oId)) { |
| | | oId = payFeeDetailPo.getDetailId(); |
| | | } |
| | | payFeeDetailPo.setPayOrderId(oId); |
| | | payFeeDetailPo.setCashierId(userDto.getUserId()); |
| | | payFeeDetailPo.setCashierName(userDto.getName()); |
| | | int flag = payFeeDetailNewV1InnerServiceSMOImpl.savePayFeeDetailNew(payFeeDetailPo); |
| | | if (flag < 1) { |
| | | throw new CmdException("缴费失败"); |
| | |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.dto.repair.RepairDto; |
| | | import com.java110.dto.repair.RepairUserDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.intf.acct.IAccountDetailInnerServiceSMO; |
| | | import com.java110.intf.acct.IAccountInnerServiceSMO; |
| | | import com.java110.intf.acct.ICouponUserDetailV1InnerServiceSMO; |
| | |
| | | import com.java110.intf.fee.*; |
| | | import com.java110.intf.fee.IFeeAccountDetailServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | | import com.java110.intf.user.IUserV1InnerServiceSMO; |
| | | import com.java110.po.accountDetail.AccountDetailPo; |
| | | import com.java110.po.applyRoomDiscount.ApplyRoomDiscountPo; |
| | | import com.java110.po.car.OwnerCarPo; |
| | |
| | | |
| | | /** |
| | | * 前台 现金或者转账收费 缴费处理类 |
| | | * |
| | | * <p> |
| | | * 假如 缴费 后要处理一些逻辑建议用databus |
| | | * 这个类已经很复杂 ,最好不要加新逻辑 |
| | | */ |
| | |
| | | @Autowired |
| | | private IFeeAccountDetailServiceSMO feeAccountDetailServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IUserV1InnerServiceSMO userV1InnerServiceSMOImpl; |
| | | |
| | | |
| | | @Override |
| | |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject paramObj) throws CmdException { |
| | | logger.debug("paramObj : {}", paramObj); |
| | | |
| | | String userId = cmdDataFlowContext.getReqHeaders().get("user-id"); |
| | | UserDto userDto = new UserDto(); |
| | | userDto.setUserId(userId); |
| | | List<UserDto> userDtos = userV1InnerServiceSMOImpl.queryUsers(userDto); |
| | | Assert.listOnlyOne(userDtos, "用户未登录"); |
| | | |
| | | PayFeePo payFeePo = null; |
| | | String requestId = DistributedLock.getLockUUID(); |
| | | String key = this.getClass().getSimpleName() + paramObj.get("feeId"); |
| | |
| | | dealUserAccount(paramObj, payFeeDetailPo); |
| | | |
| | | String oId = Java110TransactionalFactory.getOId(); |
| | | if(StringUtil.isEmpty(oId)){ |
| | | if (StringUtil.isEmpty(oId)) { |
| | | oId = payFeeDetailPo.getDetailId(); |
| | | } |
| | | |
| | | payFeeDetailPo.setPayOrderId(oId); |
| | | payFeeDetailPo.setCashierId(userDtos.get(0).getUserId()); |
| | | payFeeDetailPo.setCashierName(userDtos.get(0).getName()); |
| | | int flag = payFeeDetailNewV1InnerServiceSMOImpl.savePayFeeDetailNew(payFeeDetailPo); |
| | | if (flag < 1) { |
| | | throw new CmdException("缴费失败"); |
| | |
| | | throw new IllegalArgumentException("车位已被使用,不能再缴费!"); |
| | | } |
| | | |
| | | if(ParkingSpaceDto.TYPE_CD_SON_MOTHER.equals(parkingSpaceDtos.get(0).getTypeCd()) |
| | | if (ParkingSpaceDto.TYPE_CD_SON_MOTHER.equals(parkingSpaceDtos.get(0).getTypeCd()) |
| | | && !parkingSpaceDtos.get(0).getTypeCd().contains(ParkingSpaceDto.NUM_MOTHER) |
| | | ){ |
| | | ) { |
| | | sonMotherParking = true; |
| | | num = parkingSpaceDtos.get(0).getNum(); |
| | | } |
| | | } |
| | | |
| | | // todo 字母车位,子车位缴费 母车位延期 |
| | | if(sonMotherParking){ |
| | | queryMotherOwnerCars(num,ownerCarDtos,psId); |
| | | if (sonMotherParking) { |
| | | queryMotherOwnerCars(num, ownerCarDtos, psId); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 子母车位延期 母车位也需要延期 |
| | | * |
| | | * @param num |
| | | * @param ownerCarDtos |
| | | */ |
| | | private void queryMotherOwnerCars(String num, List<OwnerCarDto> ownerCarDtos,String paId) { |
| | | private void queryMotherOwnerCars(String num, List<OwnerCarDto> ownerCarDtos, String paId) { |
| | | |
| | | String sonMotherSwitch = CommonCache.getValue("SON_MOTHER_PARKING_AUTO_FEE"); |
| | | |
| | | if(!"ON".equals(sonMotherSwitch)){ |
| | | return ; |
| | | if (!"ON".equals(sonMotherSwitch)) { |
| | | return; |
| | | } |
| | | |
| | | ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto(); |
| | | parkingSpaceDto.setNum(num+ParkingSpaceDto.NUM_MOTHER); |
| | | parkingSpaceDto.setNum(num + ParkingSpaceDto.NUM_MOTHER); |
| | | parkingSpaceDto.setPaId(paId); |
| | | List<ParkingSpaceDto> parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpaceDto); |
| | | Assert.listOnlyOne(parkingSpaceDtos, "查询车位信息错误!"); |
| | |
| | | ownerCarDto.setCarTypeCd("1001"); //业主车辆 |
| | | List<OwnerCarDto> tmpOwnerCarDtos = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto); |
| | | |
| | | if(ownerCarDtos == null){ |
| | | if (ownerCarDtos == null) { |
| | | ownerCarDtos = new ArrayList<>(); |
| | | } |
| | | |
| | |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | logger.debug("ServiceDataFlowEvent : {}", event); |
| | | |
| | | String userId = cmdDataFlowContext.getReqHeaders().get("user-id"); |
| | | |
| | | String appId = cmdDataFlowContext.getReqHeaders().get("app-id"); |
| | | reqJson.put("appId", appId); |
| | | reqJson.put("userId",userId); |
| | | |
| | | FeeDto feeDto = new FeeDto(); |
| | | feeDto.setFeeId(reqJson.getString("feeId")); |
| | |
| | | businessFeeDetail.put("receivableAmount", receivableAmount); |
| | | PayFeeDetailPo payFeeDetailPo = BeanConvertUtil.covertBean(businessFeeDetail, PayFeeDetailPo.class); |
| | | payFeeDetailPo.setPayOrderId(payFeeDetailPo.getDetailId()); |
| | | |
| | | payFeeDetailPo.setCashierId("-1"); |
| | | payFeeDetailPo.setCashierName("系统收银"); |
| | | int flag = payFeeDetailV1InnerServiceSMOImpl.savePayFeeDetailNew(payFeeDetailPo); |
| | | |
| | | if (flag < 1) { |
| | |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.dto.repair.RepairDto; |
| | | import com.java110.dto.repair.RepairUserDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.intf.community.*; |
| | | import com.java110.intf.fee.*; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | | import com.java110.intf.user.IUserV1InnerServiceSMO; |
| | | import com.java110.po.car.OwnerCarPo; |
| | | import com.java110.po.fee.PayFeeDetailPo; |
| | | import com.java110.po.fee.PayFeePo; |
| | |
| | | @Autowired |
| | | private IComputeFeeSMO computeFeeSMOImpl; |
| | | |
| | | @Autowired |
| | | private IUserV1InnerServiceSMO userV1InnerServiceSMOImpl; |
| | | |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext dataFlowContext, JSONObject paramObj) throws CmdException, ParseException { |
| | | logger.info("======欠费缴费返回======:" + JSONArray.toJSONString(paramObj)); |
| | | |
| | | String userId = dataFlowContext.getReqHeaders().get("user-id"); |
| | | UserDto userDto = new UserDto(); |
| | | userDto.setUserId(userId); |
| | | List<UserDto> userDtos = userV1InnerServiceSMOImpl.queryUsers(userDto); |
| | | Assert.listOnlyOne(userDtos, "用户未登录"); |
| | | //添加单元信息 |
| | | List<FeeReceiptPo> feeReceiptPos = new ArrayList<>(); |
| | | List<FeeReceiptDetailPo> feeReceiptDetailPos = new ArrayList<>(); |
| | |
| | | feeObj.put("remark", "线上公众号支付"); |
| | | } |
| | | |
| | | getFeeReceiptDetailPo(dataFlowContext, feeObj, feeReceiptDetailPos, feeReceiptPos); |
| | | getFeeReceiptDetailPo(dataFlowContext, feeObj, feeReceiptDetailPos, feeReceiptPos, userDtos.get(0)); |
| | | } |
| | | |
| | | //这里只是写入 收据表,暂不考虑 事务一致性问题,就算写入失败 也只是影响 收据打印,如果 贵公司对 收据要求 比较高,不能有失败的情况 请加入事务管理 |
| | |
| | | |
| | | private void getFeeReceiptDetailPo(ICmdDataFlowContext dataFlowContext, JSONObject paramObj, |
| | | List<FeeReceiptDetailPo> feeReceiptDetailPos, |
| | | List<FeeReceiptPo> feeReceiptPos) { |
| | | List<FeeReceiptPo> feeReceiptPos, |
| | | UserDto userDto) { |
| | | int flag = 0; |
| | | if (!paramObj.containsKey("primeRate")) { |
| | | paramObj.put("primeRate", "6"); |
| | |
| | | paramObj.put("remark", "线上小程序支付"); |
| | | } |
| | | paramObj.put("state", "1400"); |
| | | addOweFeeDetail(paramObj, dataFlowContext, feeReceiptDetailPos, feeReceiptPos); |
| | | addOweFeeDetail(paramObj, dataFlowContext, feeReceiptDetailPos, feeReceiptPos, userDto); |
| | | modifyOweFee(paramObj, dataFlowContext); |
| | | |
| | | //修改车辆 |
| | |
| | | |
| | | public void addOweFeeDetail(JSONObject paramInJson, ICmdDataFlowContext dataFlowContext, |
| | | List<FeeReceiptDetailPo> feeReceiptDetailPos, |
| | | List<FeeReceiptPo> feeReceiptPos) { |
| | | List<FeeReceiptPo> feeReceiptPos, |
| | | UserDto userDto) { |
| | | |
| | | JSONObject businessFeeDetail = new JSONObject(); |
| | | businessFeeDetail.putAll(paramInJson); |
| | |
| | | payFeeDetailPo.setPayOrderId(paramInJson.getString("oId")); |
| | | } else { |
| | | String oId = Java110TransactionalFactory.getOId(); |
| | | if(StringUtil.isEmpty(oId)){ |
| | | if (StringUtil.isEmpty(oId)) { |
| | | oId = payFeeDetailPo.getDetailId(); |
| | | } |
| | | payFeeDetailPo.setPayOrderId(oId); |
| | | |
| | | } |
| | | payFeeDetailPo.setCashierId(userDto.getUserId()); |
| | | payFeeDetailPo.setCashierName(userDto.getName()); |
| | | |
| | | int flag = payFeeDetailV1InnerServiceSMOImpl.savePayFeeDetailNew(payFeeDetailPo); |
| | | |
| | |
| | | //车位费用续租 |
| | | for (OwnerCarDto tmpOwnerCarDto : ownerCarDtos) { |
| | | //后付费 或者信用期车辆 加一个月 |
| | | if(FeeConfigDto.PAYMENT_CD_AFTER.equals(feeDtos.get(0).getPaymentCd()) |
| | | || OwnerCarDto.CAR_TYPE_CREDIT.equals(tmpOwnerCarDto.getCarType())){ |
| | | if (FeeConfigDto.PAYMENT_CD_AFTER.equals(feeDtos.get(0).getPaymentCd()) |
| | | || OwnerCarDto.CAR_TYPE_CREDIT.equals(tmpOwnerCarDto.getCarType())) { |
| | | endTimeCalendar = Calendar.getInstance(); |
| | | endTimeCalendar.setTime(feeEndTime); |
| | | endTimeCalendar.add(Calendar.MONTH, 1); |
| | |
| | | payFeeDetailPo.setReceivedAmount(receivableAmount + ""); |
| | | payFeeDetailPo.setCommunityId(rentingPoolDto.getCommunityId()); |
| | | payFeeDetailPo.setPayOrderId(payFeeDetailPo.getDetailId()); |
| | | payFeeDetailPo.setCashierId("-1"); |
| | | payFeeDetailPo.setCashierName("系统收银"); |
| | | payFeeDetailPo.setState("1400"); |
| | | //添加单元信息 |
| | | flag = payFeeDetailV1InnerServiceSMOImpl.savePayFeeDetailNew(payFeeDetailPo); |
| | |
| | | payFeeDetailPo.setReceivedAmount(receivableAmount + ""); |
| | | payFeeDetailPo.setCommunityId(rentingPoolDto.getCommunityId()); |
| | | payFeeDetailPo.setPayOrderId(payFeeDetailPo.getDetailId()); |
| | | |
| | | payFeeDetailPo.setCashierId("-1"); |
| | | payFeeDetailPo.setCashierName("系统收银"); |
| | | //添加单元信息 |
| | | flag = payFeeDetailV1InnerServiceSMOImpl.savePayFeeDetailNew(payFeeDetailPo); |
| | | if (flag < 1) { |
| | |
| | | payFeeDetailPo.setReceivedAmount(receivableAmount + ""); |
| | | payFeeDetailPo.setCommunityId(rentingPoolDto.getCommunityId()); |
| | | payFeeDetailPo.setPayOrderId(payFeeDetailPo.getDetailId()); |
| | | |
| | | payFeeDetailPo.setCashierId("-1"); |
| | | payFeeDetailPo.setCashierName("系统收银"); |
| | | //添加单元信息 |
| | | flag = payFeeDetailV1InnerServiceSMOImpl.savePayFeeDetailNew(payFeeDetailPo); |
| | | if (flag < 1) { |
| | |
| | | } |
| | | |
| | | |
| | | // /** |
| | | // * 微信删除消息模板 |
| | | // * |
| | | // * @param storeId 商户ID |
| | | // * @param expiration 到期合同标记 1 到期合同 |
| | | // * @return |
| | | // * @serviceCode /contract/queryContract |
| | | // * @path /app/contract/queryContract |
| | | // */ |
| | | // @RequestMapping(value = "/queryContract", method = RequestMethod.GET) |
| | | // public ResponseEntity<String> queryContract(@RequestHeader(value = "store-id") String storeId, |
| | | // @RequestParam(value = "state", required = false) String state, |
| | | // @RequestParam(value = "expiration", required = false) String expiration, |
| | | // @RequestParam(value = "objId", required = false) String objId, |
| | | // @RequestParam(value = "contractId", required = false) String contractId, |
| | | // @RequestParam(value = "contractNameLike", required = false) String contractNameLike, |
| | | // @RequestParam(value = "contractCode", required = false) String contractCode, |
| | | // @RequestParam(value = "page") int page, |
| | | // @RequestParam(value = "row") int row) { |
| | | // ContractDto contractDto = new ContractDto(); |
| | | // contractDto.setPage(page); |
| | | // contractDto.setRow(row); |
| | | // contractDto.setStoreId(storeId); |
| | | // contractDto.setState(state); |
| | | // contractDto.setObjId(objId); |
| | | // contractDto.setContractId(contractId); |
| | | // contractDto.setContractCode(contractCode); |
| | | // contractDto.setContractNameLike(contractNameLike); |
| | | // //如果是到期合同 |
| | | // if ("1".equals(expiration)) { |
| | | // contractDto.setNoStates(new String[]{ContractDto.STATE_COMPLAINT, ContractDto.STATE_FAIL}); |
| | | // contractDto.setEndTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | // } |
| | | // return getContractBMOImpl.get(contractDto); |
| | | // } |
| | | |
| | | /** |
| | | * 合同起草待办 |
| | |
| | | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | String storeId = cmdDataFlowContext.getReqHeaders().get("store-id"); |
| | | |
| | | ContractDto contractDto = BeanConvertUtil.covertBean(reqJson, ContractDto.class); |
| | | contractDto.setStoreId(storeId); |
| | | //如果是到期合同 |
| | | if ("1".equals(reqJson.getString("expiration"))) { |
| | | contractDto.setNoStates(new String[]{ContractDto.STATE_COMPLAINT, ContractDto.STATE_FAIL}); |