| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.by4cloud.platformx.business.dto.PaymentSlipQueryDTO; |
| | | import com.by4cloud.platformx.business.dto.SyncPaymentRecepitDTO; |
| | | import com.by4cloud.platformx.business.entity.PaymentCreditSale; |
| | | import com.by4cloud.platformx.business.entity.PaymentReceive; |
| | | import com.by4cloud.platformx.business.entity.PaymentSlip; |
| | | import com.by4cloud.platformx.business.mapper.PaymentCreditMapper; |
| | | import com.by4cloud.platformx.business.mapper.PaymentReceiveMapper; |
| | | import com.by4cloud.platformx.business.mapper.PaymentSlipMapper; |
| | | import com.by4cloud.platformx.business.service.PaymentSlipService; |
| | |
| | | public class PaymentSlipServiceImpl extends ServiceImpl<PaymentSlipMapper, PaymentSlip> implements PaymentSlipService { |
| | | |
| | | private final PaymentReceiveMapper paymentReceiveMapper; |
| | | |
| | | private final PaymentCreditMapper paymentCreditMapper; |
| | | |
| | | @Override |
| | | public Page pageScope(Page page, PaymentSlipQueryDTO queryDTO) { |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | private void saveReceive(Date offsetDay, BigDecimal reveiceZb,Long compId) { |
| | | @Override |
| | | public R genCreditPayment(SyncPaymentRecepitDTO dto) { |
| | | //装备 |
| | | BigDecimal reveiceZb = paymentCreditMapper.genReceivePayment(null); |
| | | saveCredit(DateUtil.offsetDay(new Date(),-1),reveiceZb,null); |
| | | //石煤机 |
| | | BigDecimal reveiceSmj = paymentCreditMapper.genReceivePaymentSmj(); |
| | | saveCredit(DateUtil.offsetDay(new Date(),-1),reveiceSmj,2089995177814495234L); |
| | | //石工泵 |
| | | BigDecimal reveiceSgb = paymentCreditMapper.genReceivePayment(2056556196124250113L); |
| | | saveCredit(DateUtil.offsetDay(new Date(),-1),reveiceSgb,2056556196124250113L); |
| | | //通方公司 |
| | | BigDecimal reveiceTfgs = paymentCreditMapper.genReceivePayment(2056556421857497090L); |
| | | saveCredit(DateUtil.offsetDay(new Date(),-1),reveiceTfgs,2056556421857497090L); |
| | | //机械厂 |
| | | BigDecimal reveiceJxc = paymentCreditMapper.genReceivePayment(2056556317461270529L); |
| | | saveCredit(DateUtil.offsetDay(new Date(),-1),reveiceJxc,2056556317461270529L); |
| | | //一煤机 |
| | | BigDecimal reveiceYmj = paymentCreditMapper.genReceivePayment(2056556535640576002L); |
| | | saveCredit(DateUtil.offsetDay(new Date(),-1),reveiceYmj,2056556535640576002L); |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | private void saveCredit(Date offsetDay, BigDecimal reveiceZb, Long compId) { |
| | | PaymentCreditSale receive = new PaymentCreditSale(); |
| | | receive.setCreditDate(offsetDay); |
| | | receive.setCompId(compId); |
| | | receive.setCreditAmount(reveiceZb); |
| | | paymentCreditMapper.insert(receive); |
| | | } |
| | | |
| | | private void saveReceive(Date offsetDay, BigDecimal reveiceZb, Long compId) { |
| | | PaymentReceive receive = new PaymentReceive(); |
| | | receive.setReceiveDate(offsetDay); |
| | | receive.setCompId(compId); |