日期提前和修改判断条件

product
bawei 1 year ago
parent 8b093c1634
commit 54de183f40

@ -128,8 +128,13 @@ public class AccountingController {
AccountingEntity entity = JsonUtil.getJsonToBean(accountingCrForm, AccountingEntity.class); AccountingEntity entity = JsonUtil.getJsonToBean(accountingCrForm, AccountingEntity.class);
entity.setId(mainId); entity.setId(mainId);
entity.setStatus("0"); entity.setStatus("0");
entity.setStatus("0"); // entity.setEndDate(accountingCrForm.getEndDate());
entity.setEndDate(accountingCrForm.getEndDate()); Calendar rightNow = Calendar.getInstance();
rightNow.setTime(accountingCrForm.getEndDate());
rightNow.add(Calendar.DAY_OF_YEAR, -1);
Date dt3 = rightNow.getTime();
System.out.println("日期:" + dt3);
entity.setEndDate(dt3);
accountingService.save(entity); accountingService.save(entity);
return ActionResult.success("创建成功"); return ActionResult.success("创建成功");
} }

@ -976,10 +976,11 @@ public class TradeuploadController {
if (list.size() > 0 && entity.getPurchaseorderId() != null) { if (list.size() > 0 && entity.getPurchaseorderId() != null) {
QueryWrapper<PurchaseorderEntity> PurchaseorderqueryWrapper = new QueryWrapper<>(); QueryWrapper<PurchaseorderEntity> PurchaseorderqueryWrapper = new QueryWrapper<>();
PurchaseorderqueryWrapper.lambda().eq(PurchaseorderEntity::getId, entity.getPurchaseorderId()); PurchaseorderqueryWrapper.lambda().eq(PurchaseorderEntity::getId, entity.getPurchaseorderId());
PurchaseorderqueryWrapper.lambda().eq(PurchaseorderEntity::getDeleteMark, 0);
List<PurchaseorderEntity> Pur = purchaseorderService.list(PurchaseorderqueryWrapper); List<PurchaseorderEntity> Pur = purchaseorderService.list(PurchaseorderqueryWrapper);
if (Pur.size() > 0) { if (Pur.size() > 0) {
int s = Integer.valueOf(Pur.get(0).getIsPayment()); int paymenttime = Integer.valueOf(Pur.get(0).getPaymentTime());
if (list != null && list.get(0).getPurchaseorderId() != null && s == 1) { if (list != null && list.get(0).getPurchaseorderId() != null && paymenttime > 0) {
int s21 = Integer.valueOf(tradeuploadUpForm.getCustomerId()); int s21 = Integer.valueOf(tradeuploadUpForm.getCustomerId());
int s22 = Integer.valueOf(list.get(0).getCustomerId()); int s22 = Integer.valueOf(list.get(0).getCustomerId());
if (s21 == s22) { if (s21 == s22) {
@ -989,6 +990,7 @@ public class TradeuploadController {
return ActionResult.fail("已生成了付款申请,则不能修改客户"); return ActionResult.fail("已生成了付款申请,则不能修改客户");
} }
} }
} }
} }

Loading…
Cancel
Save