Commit c65eb32b by zhu.zewen

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

parent c50cfec9
...@@ -44,7 +44,6 @@ public class PhysicBill extends BaseVersionEntity { ...@@ -44,7 +44,6 @@ public class PhysicBill extends BaseVersionEntity {
@ApiModelProperty(value = "结算日期") @ApiModelProperty(value = "结算日期")
private String settleDate; private String settleDate;
@ApiModelProperty(value = "结算月份(年月)") @ApiModelProperty(value = "结算月份(年月)")
private String settleMonth; private String settleMonth;
......
...@@ -71,6 +71,8 @@ public class PhysicBillServiceImpl extends AbstractService implements PhysicBill ...@@ -71,6 +71,8 @@ public class PhysicBillServiceImpl extends AbstractService implements PhysicBill
@Transactional @Transactional
@Override @Override
public void createBill(BillDTO req) { public void createBill(BillDTO req) {
LocalDateTime now = LocalDateTime.now();
PhysicBill bill = new PhysicBill(); PhysicBill bill = new PhysicBill();
BeanUtil.copyProperties(req, bill); BeanUtil.copyProperties(req, bill);
bill.setType(req.getType()); bill.setType(req.getType());
...@@ -90,6 +92,10 @@ public class PhysicBillServiceImpl extends AbstractService implements PhysicBill ...@@ -90,6 +92,10 @@ public class PhysicBillServiceImpl extends AbstractService implements PhysicBill
} }
bill.setStatus(0); bill.setStatus(0);
bill.setSettleDate(now.toString());
bill.setSettleMonth(YearMonth.from(now).toString());
bill.setCreateTime(now);
physicBillMapper.insert(bill); 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