SPSBSalaryOrderModel.m 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //
  2. // SPSBSalaryOrderModel.m
  3. // 我的社保
  4. //
  5. // Created by shanp on 2021/6/18.
  6. //
  7. #import "SPSBSalaryOrderModel.h"
  8. #import "SPSBBusinessManager.h"
  9. @implementation SPSBSalaryOrderModel
  10. - (bool)handleAdditionalProperty {
  11. [super handleAdditionalProperty];
  12. _spsba_title = [NSString stringWithFormat:@"%@月社保流水", [_spsb_opt_month substringFromIndex:4]];
  13. _spsba_month = spsb_changeTime(_spsb_opt_month);
  14. if (_spsb_pay_time.length > 16) {
  15. _spsba_showPayTime = [_spsb_pay_time substringWithRange:NSMakeRange(5, 11)];
  16. } else {
  17. _spsba_showPayTime = _spsb_pay_time;
  18. }
  19. if (_spsb_hf_time.length > 16) {
  20. _spsba_showBackTime = [_spsb_hf_time substringWithRange:NSMakeRange(5, 11)];
  21. } else {
  22. _spsba_showBackTime = _spsb_hf_time;
  23. }
  24. _spsba_details = SPSBOrderListShowItem.new;
  25. _spsba_details.spsb_amount = [NSString stringWithFormat:@"%.2f元", _spsb_total_fee.floatValue];
  26. _spsba_details.spsb_title = @"社保流水 (返还费用)\n服务费";
  27. _spsba_details.spsb_content = [NSString stringWithFormat:@"¥%.2f\n¥%.2f", _spsb_wage.floatValue, _spsb_charge.floatValue];
  28. _spsba_details.spsb_lines = 2;
  29. if (_spsb_pay_status.integerValue == SPSBSalaryOrderStatusNotPay) {
  30. NSString *time = _spsb_gen_time;
  31. if (time.length > 16) {
  32. time = [time substringToIndex:16];
  33. }
  34. _spsba_details.spsb_message = @[@"参保姓名", @"月份", @"城市", @"截止付款时间", @"预计返还时间", @"创建时间", _spsb_uname, _spsba_month, _spsb_city, _spsb_pay_date, _spsb_hf_remark, time];
  35. } else {
  36. NSString *time = _spsb_pay_time;
  37. if (time.length > 16) {
  38. time = [time substringToIndex:16];
  39. }
  40. if (_spsb_pay_status.integerValue == SPSBSalaryOrderStatusBack || _spsb_pay_status.integerValue == SPSBSalaryOrderStatusReturnBack || _spsb_pay_status.integerValue == SPSBSalaryOrderStatusRefund) {
  41. _spsba_details.spsb_message = @[@"参保姓名", @"月份", @"城市", @"成交时间", _spsb_uname, _spsba_month, _spsb_city, time];
  42. } else {
  43. _spsba_details.spsb_message = @[@"参保姓名", @"月份", @"城市", @"预计返还时间", @"成交时间", _spsb_uname, _spsba_month, _spsb_city, _spsb_hf_remark, time];
  44. }
  45. }
  46. return true;
  47. }
  48. @end