oms与bms修改
This commit is contained in:
+30
-6
@@ -2,6 +2,7 @@ package com.mhd.bms.domain.bmsInvoiceList.repository.persistence;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.aliyun.oss.ServiceException;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -184,12 +185,22 @@ public class BmsInvoiceListServiceImpl extends ServiceImpl<BmsInvoiceListMapper,
|
||||
}
|
||||
}
|
||||
|
||||
BillManage billManage = billManageMapper.selectById(bmsInvoiceListAddDTO.getBillManageId());
|
||||
if (billManage != null) {
|
||||
billManage.setIsInvoice(1);
|
||||
billManage.setInvoiceId(bmsInvoiceList.getId().toString());
|
||||
billManage.setApplyNumber(bmsInvoiceList.getApplyNumber());
|
||||
billManageMapper.updateById(billManage);
|
||||
// BillManage billManage = billManageMapper.selectById(bmsInvoiceListAddDTO.getBillManageId());
|
||||
// if (billManage != null) {
|
||||
// billManage.setIsInvoice(1);
|
||||
// billManage.setInvoiceId(bmsInvoiceList.getId().toString());
|
||||
// billManage.setApplyNumber(bmsInvoiceList.getApplyNumber());
|
||||
// billManageMapper.updateById(billManage);
|
||||
// }
|
||||
List<Long> billManageIds = bmsInvoiceListAddDTO.getBillManageIds();
|
||||
List<BillManage> billManages = billManageMapper.selectList(new LambdaQueryWrapper<BillManage>().in(BillManage::getBillManageId, billManageIds));
|
||||
if (billManages != null && billManages.size() > 0) {
|
||||
for (BillManage billManage : billManages) {
|
||||
billManage.setIsInvoice(1);
|
||||
billManage.setInvoiceId(bmsInvoiceList.getId().toString());
|
||||
billManage.setApplyNumber(bmsInvoiceList.getApplyNumber());
|
||||
billManageMapper.updateById(billManage);
|
||||
}
|
||||
}
|
||||
/*AjaxResult ajaxResult = financeServiceFeign.editIsInvoice(transportationId,1,bmsInvoiceList.getId(),"",bmsInvoiceList.getApplyNumber());
|
||||
if(!"200".equals(String.valueOf(ajaxResult.get("code")))){
|
||||
@@ -466,6 +477,19 @@ public class BmsInvoiceListServiceImpl extends ServiceImpl<BmsInvoiceListMapper,
|
||||
//bmsInvoiceList.setUpdateBy(sysUser.getId());
|
||||
bmsInvoiceList.setUpdateTime(new Date());
|
||||
this.updateById(bmsInvoiceList);
|
||||
Long id = bmsInvoiceList.getId();
|
||||
List<BillManage> billManages = billManageMapper.selectList(new QueryWrapper<BillManage>().lambda().eq(BillManage::getInvoiceId, id.toString()));
|
||||
if (ObjectUtil.isNotNull(billManages) && billManages.size() > 0) {
|
||||
for (BillManage billManage : billManages) {
|
||||
if (bmsInvoiceListInvoiceStateDTO.getInvoiceState() ==5){
|
||||
billManage.setIsInvoice(5);
|
||||
}
|
||||
if (bmsInvoiceListInvoiceStateDTO.getInvoiceState() == 3){
|
||||
billManage.setIsInvoice(4);
|
||||
}
|
||||
billManageMapper.updateById(billManage);
|
||||
}
|
||||
}
|
||||
return bmsInvoiceList.getInvoiceState();
|
||||
}
|
||||
|
||||
|
||||
+3
@@ -76,5 +76,8 @@ public class BmsInvoiceListAddDTO implements Serializable {
|
||||
private String settlementEntity;
|
||||
|
||||
private List<BmsMakeOutInvoice> bmsMakeOutInvoices;
|
||||
@ApiModelProperty(value = "对账单id列表")
|
||||
@Excel(name = "对账单id列表", width = 15)
|
||||
private List<Long> billManageIds;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user