Commit c65eb32b by zhu.zewen

创建时设置结算日期和月份

parent c50cfec9
......@@ -44,7 +44,6 @@ public class PhysicBill extends BaseVersionEntity {
@ApiModelProperty(value = "结算日期")
private String settleDate;
@ApiModelProperty(value = "结算月份(年月)")
private String settleMonth;
......
......@@ -71,6 +71,8 @@ public class PhysicBillServiceImpl extends AbstractService implements PhysicBill
@Transactional
@Override
public void createBill(BillDTO req) {
LocalDateTime now = LocalDateTime.now();
PhysicBill bill = new PhysicBill();
BeanUtil.copyProperties(req, bill);
bill.setType(req.getType());
......@@ -90,6 +92,10 @@ public class PhysicBillServiceImpl extends AbstractService implements PhysicBill
}
bill.setStatus(0);
bill.setSettleDate(now.toString());
bill.setSettleMonth(YearMonth.from(now).toString());
bill.setCreateTime(now);
physicBillMapper.insert(bill);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment