|
|
|
@@ -283,6 +283,20 @@ public class WxEnergyServiceImpl implements WxEnergyService { |
|
|
|
logger.error("保存租赁账单失败,e:" + e.getMessage()); |
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); |
|
|
|
} |
|
|
|
if (record.getBillType().intValue() == EnumBillAllType.ADVANCE.getCode().intValue()) { |
|
|
|
if (null != record.getFeesIds()) { |
|
|
|
for (int i = 0 ; i < record.getFeesIds().size(); i++) { |
|
|
|
Long feeid = record.getFeesIds().get(i); |
|
|
|
WxEnergyFeesSetoff tf = new WxEnergyFeesSetoff(); |
|
|
|
tf.setId(idWorker.nextId()); |
|
|
|
tf.setAdvanceFeesId(record.getId()); |
|
|
|
tf.setFeesId(feeid); |
|
|
|
tf.setCreateTime(new Date()); |
|
|
|
tf.setUpdateTime(new Date()); |
|
|
|
wxEnergyFeesSetoffMapper.insert(tf); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
WxEnergyFees fees = this.getFeesById(record); |
|
|
|
if (null == fees) { |
|
|
|
|