|
@@ -52,6 +52,7 @@ public class PurchaseReceiptReportServiceImpl extends ServiceImpl<PurchaseReceip
|
|
private IPurchaseOrderService purchaseOrderService;
|
|
private IPurchaseOrderService purchaseOrderService;
|
|
@Autowired
|
|
@Autowired
|
|
private IWarehouseInOutInfoService warehouseInOutInfoService;
|
|
private IWarehouseInOutInfoService warehouseInOutInfoService;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 采购入库统计
|
|
* 采购入库统计
|
|
*
|
|
*
|
|
@@ -64,7 +65,7 @@ public class PurchaseReceiptReportServiceImpl extends ServiceImpl<PurchaseReceip
|
|
pageView.put("startRecord", (purchaseReceiptReport.getCurrentPage() - 1)
|
|
pageView.put("startRecord", (purchaseReceiptReport.getCurrentPage() - 1)
|
|
* purchaseReceiptReport.getPageSize());
|
|
* purchaseReceiptReport.getPageSize());
|
|
List<String> businessKeys = null;
|
|
List<String> businessKeys = null;
|
|
- if("1".equals(purchaseReceiptReport.getSearchType())){
|
|
|
|
|
|
+ if ("1".equals(purchaseReceiptReport.getSearchType())) {
|
|
businessKeys = workflowService.getTaskBusinessKeysByCode("PROCUREMENT-RECEIPT-REPORT");
|
|
businessKeys = workflowService.getTaskBusinessKeysByCode("PROCUREMENT-RECEIPT-REPORT");
|
|
}
|
|
}
|
|
List<String> statusSet = new ArrayList<>();
|
|
List<String> statusSet = new ArrayList<>();
|
|
@@ -87,7 +88,7 @@ public class PurchaseReceiptReportServiceImpl extends ServiceImpl<PurchaseReceip
|
|
// 查询采购入库总数
|
|
// 查询采购入库总数
|
|
Integer dataCount = baseMapper.getCountByCondition(pageView);
|
|
Integer dataCount = baseMapper.getCountByCondition(pageView);
|
|
List<PurchaseReceiptReport> dataList = baseMapper.getListByCondition(pageView);
|
|
List<PurchaseReceiptReport> dataList = baseMapper.getListByCondition(pageView);
|
|
- if(!CollectionUtils.isEmpty(dataList)){
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(dataList)) {
|
|
dataList.forEach(purchaseReceiptReport1 -> {
|
|
dataList.forEach(purchaseReceiptReport1 -> {
|
|
|
|
|
|
String taskId = "";
|
|
String taskId = "";
|
|
@@ -110,18 +111,20 @@ public class PurchaseReceiptReportServiceImpl extends ServiceImpl<PurchaseReceip
|
|
|
|
|
|
/**
|
|
/**
|
|
* 编辑采购入库统计
|
|
* 编辑采购入库统计
|
|
|
|
+ *
|
|
* @param purchaseReceiptReport
|
|
* @param purchaseReceiptReport
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public String editProcurementReceiptReport(PurchaseReceiptReport purchaseReceiptReport) {
|
|
public String editProcurementReceiptReport(PurchaseReceiptReport purchaseReceiptReport) {
|
|
|
|
+ PurchaseReceiptReport purchaseReceiptReport1=this.selectById(purchaseReceiptReport.getId());
|
|
boolean one = this.updateById(purchaseReceiptReport);
|
|
boolean one = this.updateById(purchaseReceiptReport);
|
|
if(purchaseReceiptReport.getStatusFlag().equals(StatusEnum.TASK_RETURN.getFlag())){
|
|
if(purchaseReceiptReport.getStatusFlag().equals(StatusEnum.TASK_RETURN.getFlag())){
|
|
- boolean isStartWorkflow = org.apache.commons.lang3.StringUtils.isBlank(purchaseReceiptReport.getWorkflowId());
|
|
|
|
|
|
+ boolean isStartWorkflow = org.apache.commons.lang3.StringUtils.isBlank(purchaseReceiptReport1.getWorkflowId());
|
|
// 不是退回的单子
|
|
// 不是退回的单子
|
|
if (isStartWorkflow) {
|
|
if (isStartWorkflow) {
|
|
Workflow workflow = workflowService
|
|
Workflow workflow = workflowService
|
|
- .findLatestWorkflowByBusinessCodeByApp(purchaseReceiptReport.getCompId(),"PROCUREMENT-RECEIPT-REPORT");
|
|
|
|
|
|
+ .findLatestWorkflowByBusinessCodeByApp(purchaseReceiptReport1.getCompId(),"PROCUREMENT-RECEIPT-REPORT");
|
|
// 没配置审核流程,直接结束并处理信息
|
|
// 没配置审核流程,直接结束并处理信息
|
|
if (workflow == null) {
|
|
if (workflow == null) {
|
|
throw new YException(YExceptionEnum.PURCHASE_ORDER_ERROR);
|
|
throw new YException(YExceptionEnum.PURCHASE_ORDER_ERROR);
|
|
@@ -130,16 +133,16 @@ public class PurchaseReceiptReportServiceImpl extends ServiceImpl<PurchaseReceip
|
|
else {
|
|
else {
|
|
|
|
|
|
// 设置状态 已提交审核
|
|
// 设置状态 已提交审核
|
|
- purchaseReceiptReport.setWorkflowId(workflow.getId());
|
|
|
|
- this.updateById(purchaseReceiptReport);
|
|
|
|
- workflowService.startInstance(workflow.getId(), purchaseReceiptReport.getId());
|
|
|
|
|
|
+ purchaseReceiptReport1.setWorkflowId(workflow.getId());
|
|
|
|
+ this.updateById(purchaseReceiptReport1);
|
|
|
|
+ workflowService.startInstance(workflow.getId(), purchaseReceiptReport1.getId());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 退回的单子 再启用
|
|
// 退回的单子 再启用
|
|
else {
|
|
else {
|
|
|
|
|
|
- this.updateById(purchaseReceiptReport);
|
|
|
|
- workflowService.activateInstance(purchaseReceiptReport.getWorkflowId(), purchaseReceiptReport.getId());
|
|
|
|
|
|
+ this.updateById(purchaseReceiptReport1);
|
|
|
|
+ workflowService.activateInstance(purchaseReceiptReport1.getWorkflowId(), purchaseReceiptReport1.getId());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (one) {
|
|
if (one) {
|
|
@@ -151,24 +154,25 @@ public class PurchaseReceiptReportServiceImpl extends ServiceImpl<PurchaseReceip
|
|
|
|
|
|
/**
|
|
/**
|
|
* 补货结转
|
|
* 补货结转
|
|
|
|
+ *
|
|
* @param purchaseReceiptReport
|
|
* @param purchaseReceiptReport
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public String replenishment(PurchaseReceiptReport purchaseReceiptReport) {
|
|
public String replenishment(PurchaseReceiptReport purchaseReceiptReport) {
|
|
- PurchaseReceiptReport purchaseReceiptReport1=this.selectById(purchaseReceiptReport.getId());
|
|
|
|
|
|
+ PurchaseReceiptReport purchaseReceiptReport1 = this.selectById(purchaseReceiptReport.getId());
|
|
if ("3".equals(purchaseReceiptReport.getCustomerConfirmationStatusFlag())) {
|
|
if ("3".equals(purchaseReceiptReport.getCustomerConfirmationStatusFlag())) {
|
|
// 未付金额不等0 可补货结转
|
|
// 未付金额不等0 可补货结转
|
|
if (purchaseReceiptReport.getAmountNotPayable() != 0) {
|
|
if (purchaseReceiptReport.getAmountNotPayable() != 0) {
|
|
- purchaseReceiptReport1.setCarryForward("出"+purchaseReceiptReport.getCarryOverWeight()+"+"+purchaseReceiptReport.getContractNo());
|
|
|
|
|
|
+ purchaseReceiptReport1.setCarryForward("出" + purchaseReceiptReport.getCarryOverWeight() + "+" + purchaseReceiptReport.getContractNo());
|
|
//被结转条目净重要减去结转重量
|
|
//被结转条目净重要减去结转重量
|
|
- purchaseReceiptReport1.setNetWeight(purchaseReceiptReport1.getNetWeight()-purchaseReceiptReport.getCarryOverWeight());
|
|
|
|
|
|
+ purchaseReceiptReport1.setNetWeight(purchaseReceiptReport1.getNetWeight() - purchaseReceiptReport.getCarryOverWeight());
|
|
this.updateById(purchaseReceiptReport1);
|
|
this.updateById(purchaseReceiptReport1);
|
|
PurchaseReceiptReport receiptReport = purchaseReceiptReport.getPurchaseReceiptReport();
|
|
PurchaseReceiptReport receiptReport = purchaseReceiptReport.getPurchaseReceiptReport();
|
|
receiptReport.setId(IdGenerator.generateUUID());
|
|
receiptReport.setId(IdGenerator.generateUUID());
|
|
//净重为结转重量
|
|
//净重为结转重量
|
|
receiptReport.setNetWeight(purchaseReceiptReport.getCarryOverWeight());
|
|
receiptReport.setNetWeight(purchaseReceiptReport.getCarryOverWeight());
|
|
- receiptReport.setCarryForward("入"+purchaseReceiptReport.getCarryOverWeight()+"+"+purchaseReceiptReport1.getContractNo());
|
|
|
|
|
|
+ receiptReport.setCarryForward("入" + purchaseReceiptReport.getCarryOverWeight() + "+" + purchaseReceiptReport1.getContractNo());
|
|
this.insert(receiptReport);
|
|
this.insert(receiptReport);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -179,39 +183,40 @@ public class PurchaseReceiptReportServiceImpl extends ServiceImpl<PurchaseReceip
|
|
|
|
|
|
/**
|
|
/**
|
|
* 出纳付款
|
|
* 出纳付款
|
|
|
|
+ *
|
|
* @param purchaseReceiptReport
|
|
* @param purchaseReceiptReport
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public String payMoney(PurchaseReceiptReport purchaseReceiptReport) {
|
|
public String payMoney(PurchaseReceiptReport purchaseReceiptReport) {
|
|
- List<PurchaseReceiptReport> purchaseReceiptReportList=purchaseReceiptReport.getPurchaseReceiptReportList();
|
|
|
|
|
|
+ List<PurchaseReceiptReport> purchaseReceiptReportList = purchaseReceiptReport.getPurchaseReceiptReportList();
|
|
Float money = purchaseReceiptReport.getMoney();
|
|
Float money = purchaseReceiptReport.getMoney();
|
|
//付款多条
|
|
//付款多条
|
|
- if (!CollectionUtils.isEmpty(purchaseReceiptReportList)){
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(purchaseReceiptReportList)) {
|
|
for (PurchaseReceiptReport purchaseReceiptReport1 : purchaseReceiptReportList) {
|
|
for (PurchaseReceiptReport purchaseReceiptReport1 : purchaseReceiptReportList) {
|
|
- PurchaseReceiptReport purchaseReceiptReport2=this.selectById(purchaseReceiptReport1.getId());
|
|
|
|
|
|
+ PurchaseReceiptReport purchaseReceiptReport2 = this.selectById(purchaseReceiptReport1.getId());
|
|
//付款金额大于本次循环未付金额
|
|
//付款金额大于本次循环未付金额
|
|
if (money >= purchaseReceiptReport1.getAmountNotPayable()) {
|
|
if (money >= purchaseReceiptReport1.getAmountNotPayable()) {
|
|
- money=money-purchaseReceiptReport1.getAmountNotPayable();
|
|
|
|
|
|
+ money = money - purchaseReceiptReport1.getAmountNotPayable();
|
|
//全部付款
|
|
//全部付款
|
|
purchaseReceiptReport1.setStatus(StatusEnum.PUR_PAYaLL.getName());
|
|
purchaseReceiptReport1.setStatus(StatusEnum.PUR_PAYaLL.getName());
|
|
purchaseReceiptReport1.setStatusFlag(StatusEnum.PUR_PAYaLL.getFlag());
|
|
purchaseReceiptReport1.setStatusFlag(StatusEnum.PUR_PAYaLL.getFlag());
|
|
purchaseReceiptReport1.setPaymentDate(purchaseReceiptReport.getPaymentDate());
|
|
purchaseReceiptReport1.setPaymentDate(purchaseReceiptReport.getPaymentDate());
|
|
- purchaseReceiptReport1.setPaymentScreenshot(purchaseReceiptReport2.getPaymentScreenshot()!=null?purchaseReceiptReport2.getPaymentScreenshot()+'$'+purchaseReceiptReport.getPaymentScreenshot():purchaseReceiptReport.getPaymentScreenshot());
|
|
|
|
- purchaseReceiptReport1.setAmountEdPayable(purchaseReceiptReport1.getAmountEdPayable()+purchaseReceiptReport1.getAmountNotPayable());
|
|
|
|
|
|
+ purchaseReceiptReport1.setPaymentScreenshot(purchaseReceiptReport2.getPaymentScreenshot() != null ? purchaseReceiptReport2.getPaymentScreenshot() + '$' + purchaseReceiptReport.getPaymentScreenshot() : purchaseReceiptReport.getPaymentScreenshot());
|
|
|
|
+ purchaseReceiptReport1.setAmountEdPayable(purchaseReceiptReport1.getAmountEdPayable() + purchaseReceiptReport1.getAmountNotPayable());
|
|
purchaseReceiptReport1.setAmountNotPayable(0.0f);
|
|
purchaseReceiptReport1.setAmountNotPayable(0.0f);
|
|
this.updateById(purchaseReceiptReport1);
|
|
this.updateById(purchaseReceiptReport1);
|
|
- } else if (money> 0) {
|
|
|
|
- Float moneyTmp = money-purchaseReceiptReport1.getAmountNotPayable();
|
|
|
|
|
|
+ } else if (money > 0) {
|
|
|
|
+ Float moneyTmp = money - purchaseReceiptReport1.getAmountNotPayable();
|
|
//部分付款
|
|
//部分付款
|
|
purchaseReceiptReport1.setStatus(StatusEnum.PUR_PAY.getName());
|
|
purchaseReceiptReport1.setStatus(StatusEnum.PUR_PAY.getName());
|
|
purchaseReceiptReport1.setStatusFlag(StatusEnum.PUR_PAY.getFlag());
|
|
purchaseReceiptReport1.setStatusFlag(StatusEnum.PUR_PAY.getFlag());
|
|
purchaseReceiptReport1.setPaymentDate(purchaseReceiptReport.getPaymentDate());
|
|
purchaseReceiptReport1.setPaymentDate(purchaseReceiptReport.getPaymentDate());
|
|
- purchaseReceiptReport1.setPaymentScreenshot(purchaseReceiptReport2.getPaymentScreenshot()!=null?purchaseReceiptReport2.getPaymentScreenshot()+'$'+purchaseReceiptReport.getPaymentScreenshot():purchaseReceiptReport.getPaymentScreenshot());
|
|
|
|
- purchaseReceiptReport1.setAmountEdPayable(purchaseReceiptReport1.getAmountEdPayable()+money);
|
|
|
|
- purchaseReceiptReport1.setAmountNotPayable(purchaseReceiptReport1.getAmountNotPayable()-money);
|
|
|
|
|
|
+ purchaseReceiptReport1.setPaymentScreenshot(purchaseReceiptReport2.getPaymentScreenshot() != null ? purchaseReceiptReport2.getPaymentScreenshot() + '$' + purchaseReceiptReport.getPaymentScreenshot() : purchaseReceiptReport.getPaymentScreenshot());
|
|
|
|
+ purchaseReceiptReport1.setAmountEdPayable(purchaseReceiptReport1.getAmountEdPayable() + money);
|
|
|
|
+ purchaseReceiptReport1.setAmountNotPayable(purchaseReceiptReport1.getAmountNotPayable() - money);
|
|
this.updateById(purchaseReceiptReport1);
|
|
this.updateById(purchaseReceiptReport1);
|
|
- money=moneyTmp;
|
|
|
|
|
|
+ money = moneyTmp;
|
|
} else {
|
|
} else {
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -219,18 +224,20 @@ public class PurchaseReceiptReportServiceImpl extends ServiceImpl<PurchaseReceip
|
|
}
|
|
}
|
|
return "ok";
|
|
return "ok";
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 开发票
|
|
* 开发票
|
|
|
|
+ *
|
|
* @param purchaseReceiptReport
|
|
* @param purchaseReceiptReport
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public String openInvoice(PurchaseReceiptReport purchaseReceiptReport) {
|
|
public String openInvoice(PurchaseReceiptReport purchaseReceiptReport) {
|
|
//查询采购入库报表
|
|
//查询采购入库报表
|
|
- PurchaseReceiptReport purchaseReceiptReport1=this.selectById(purchaseReceiptReport.getId());
|
|
|
|
- if (purchaseReceiptReport1 != null ){
|
|
|
|
|
|
+ PurchaseReceiptReport purchaseReceiptReport1 = this.selectById(purchaseReceiptReport.getId());
|
|
|
|
+ if (purchaseReceiptReport1 != null) {
|
|
//更改已开发票
|
|
//更改已开发票
|
|
- purchaseReceiptReport1.setAlreadyInvoice(purchaseReceiptReport1.getAlreadyInvoice()+purchaseReceiptReport.getAlreadyInvoice());
|
|
|
|
|
|
+ purchaseReceiptReport1.setAlreadyInvoice(purchaseReceiptReport1.getAlreadyInvoice() + purchaseReceiptReport.getAlreadyInvoice());
|
|
purchaseReceiptReport1.setInvoiceType(purchaseReceiptReport.getInvoiceType());
|
|
purchaseReceiptReport1.setInvoiceType(purchaseReceiptReport.getInvoiceType());
|
|
//更改采购入库报表信息
|
|
//更改采购入库报表信息
|
|
this.updateById(purchaseReceiptReport1);
|
|
this.updateById(purchaseReceiptReport1);
|
|
@@ -241,13 +248,14 @@ public class PurchaseReceiptReportServiceImpl extends ServiceImpl<PurchaseReceip
|
|
|
|
|
|
/**
|
|
/**
|
|
* 批量开发票
|
|
* 批量开发票
|
|
|
|
+ *
|
|
* @param purchaseReceiptReport
|
|
* @param purchaseReceiptReport
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public String openInvoiceList(PurchaseReceiptReport purchaseReceiptReport) {
|
|
public String openInvoiceList(PurchaseReceiptReport purchaseReceiptReport) {
|
|
- List<PurchaseReceiptReport> purchaseReceiptReportList=purchaseReceiptReport.getPurchaseReceiptReportList();
|
|
|
|
|
|
+ List<PurchaseReceiptReport> purchaseReceiptReportList = purchaseReceiptReport.getPurchaseReceiptReportList();
|
|
//批量
|
|
//批量
|
|
- if (!CollectionUtils.isEmpty(purchaseReceiptReportList)){
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(purchaseReceiptReportList)) {
|
|
for (PurchaseReceiptReport purchaseReceiptReport1 : purchaseReceiptReportList) {
|
|
for (PurchaseReceiptReport purchaseReceiptReport1 : purchaseReceiptReportList) {
|
|
//已开发票金额等于已付金额
|
|
//已开发票金额等于已付金额
|
|
purchaseReceiptReport1.setAlreadyInvoice(purchaseReceiptReport1.getAmountEdPayable());
|
|
purchaseReceiptReport1.setAlreadyInvoice(purchaseReceiptReport1.getAmountEdPayable());
|
|
@@ -267,37 +275,38 @@ public class PurchaseReceiptReportServiceImpl extends ServiceImpl<PurchaseReceip
|
|
|
|
|
|
/**
|
|
/**
|
|
* 审核采购入库报表
|
|
* 审核采购入库报表
|
|
|
|
+ *
|
|
* @param purchaseReceiptReport
|
|
* @param purchaseReceiptReport
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public String examinePurchaseOrder(PurchaseReceiptReport purchaseReceiptReport) {
|
|
public String examinePurchaseOrder(PurchaseReceiptReport purchaseReceiptReport) {
|
|
- List<PurchaseReceiptReport> purchaseReceiptReportList=purchaseReceiptReport.getPurchaseReceiptReportList();
|
|
|
|
|
|
+ List<PurchaseReceiptReport> purchaseReceiptReportList = purchaseReceiptReport.getPurchaseReceiptReportList();
|
|
//批量
|
|
//批量
|
|
- if (!CollectionUtils.isEmpty(purchaseReceiptReportList)){
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(purchaseReceiptReportList)) {
|
|
for (PurchaseReceiptReport purchaseReceiptReport1 : purchaseReceiptReportList) {
|
|
for (PurchaseReceiptReport purchaseReceiptReport1 : purchaseReceiptReportList) {
|
|
//统计审核
|
|
//统计审核
|
|
- if("1".equals(purchaseReceiptReport.getRoleFlag())){
|
|
|
|
|
|
+ if ("1".equals(purchaseReceiptReport.getRoleFlag())) {
|
|
purchaseReceiptReport1.setStatus(StatusEnum.STATISTICAL_AUDIT.getName());
|
|
purchaseReceiptReport1.setStatus(StatusEnum.STATISTICAL_AUDIT.getName());
|
|
purchaseReceiptReport1.setStatusFlag(StatusEnum.STATISTICAL_AUDIT.getFlag());
|
|
purchaseReceiptReport1.setStatusFlag(StatusEnum.STATISTICAL_AUDIT.getFlag());
|
|
}
|
|
}
|
|
//财务通过
|
|
//财务通过
|
|
- else if("2".equals(purchaseReceiptReport.getRoleFlag())&&"1".equals(purchaseReceiptReport.getFlag())){
|
|
|
|
|
|
+ else if ("2".equals(purchaseReceiptReport.getRoleFlag()) && "1".equals(purchaseReceiptReport.getFlag())) {
|
|
purchaseReceiptReport1.setStatus(StatusEnum.FINANCIAL_AUDIT.getName());
|
|
purchaseReceiptReport1.setStatus(StatusEnum.FINANCIAL_AUDIT.getName());
|
|
purchaseReceiptReport1.setStatusFlag(StatusEnum.FINANCIAL_AUDIT.getFlag());
|
|
purchaseReceiptReport1.setStatusFlag(StatusEnum.FINANCIAL_AUDIT.getFlag());
|
|
}
|
|
}
|
|
//财务驳回
|
|
//财务驳回
|
|
- else if("2".equals(purchaseReceiptReport.getRoleFlag())&&"2".equals(purchaseReceiptReport.getFlag())){
|
|
|
|
|
|
+ else if ("2".equals(purchaseReceiptReport.getRoleFlag()) && "2".equals(purchaseReceiptReport.getFlag())) {
|
|
purchaseReceiptReport1.setStatus(StatusEnum.FINANCIAL_REJECTION.getName());
|
|
purchaseReceiptReport1.setStatus(StatusEnum.FINANCIAL_REJECTION.getName());
|
|
purchaseReceiptReport1.setStatusFlag(StatusEnum.FINANCIAL_REJECTION.getFlag());
|
|
purchaseReceiptReport1.setStatusFlag(StatusEnum.FINANCIAL_REJECTION.getFlag());
|
|
}
|
|
}
|
|
//决策人同意
|
|
//决策人同意
|
|
- else if("3".equals(purchaseReceiptReport.getRoleFlag())&&"1".equals(purchaseReceiptReport.getFlag())){
|
|
|
|
|
|
+ else if ("3".equals(purchaseReceiptReport.getRoleFlag()) && "1".equals(purchaseReceiptReport.getFlag())) {
|
|
purchaseReceiptReport1.setStatus(StatusEnum.MAKER_AUDIT.getName());
|
|
purchaseReceiptReport1.setStatus(StatusEnum.MAKER_AUDIT.getName());
|
|
purchaseReceiptReport1.setStatusFlag(StatusEnum.MAKER_AUDIT.getFlag());
|
|
purchaseReceiptReport1.setStatusFlag(StatusEnum.MAKER_AUDIT.getFlag());
|
|
}
|
|
}
|
|
//决策人驳回
|
|
//决策人驳回
|
|
- else{
|
|
|
|
|
|
+ else {
|
|
purchaseReceiptReport1.setStatus(StatusEnum.MAKER_REJECTION.getName());
|
|
purchaseReceiptReport1.setStatus(StatusEnum.MAKER_REJECTION.getName());
|
|
purchaseReceiptReport1.setStatusFlag(StatusEnum.MAKER_REJECTION.getFlag());
|
|
purchaseReceiptReport1.setStatusFlag(StatusEnum.MAKER_REJECTION.getFlag());
|
|
}
|
|
}
|
|
@@ -309,6 +318,7 @@ public class PurchaseReceiptReportServiceImpl extends ServiceImpl<PurchaseReceip
|
|
|
|
|
|
/**
|
|
/**
|
|
* 合同编号下拉列表
|
|
* 合同编号下拉列表
|
|
|
|
+ *
|
|
* @param compId
|
|
* @param compId
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
@@ -319,18 +329,17 @@ public class PurchaseReceiptReportServiceImpl extends ServiceImpl<PurchaseReceip
|
|
.eq("contract_type", "2")
|
|
.eq("contract_type", "2")
|
|
.eq("delete_flag", "0")
|
|
.eq("delete_flag", "0")
|
|
.orderBy("update_date", false));
|
|
.orderBy("update_date", false));
|
|
- for(ContractManagementInfo contractManagementInfo: contractManagementInfoList){
|
|
|
|
|
|
+ for (ContractManagementInfo contractManagementInfo : contractManagementInfoList) {
|
|
//查采购出库报表
|
|
//查采购出库报表
|
|
List<PurchaseReceiptReport> purchaseReceiptReportList = this.selectList(new EntityWrapper<PurchaseReceiptReport>()
|
|
List<PurchaseReceiptReport> purchaseReceiptReportList = this.selectList(new EntityWrapper<PurchaseReceiptReport>()
|
|
.eq("contract_no", contractManagementInfo.getContractNo())
|
|
.eq("contract_no", contractManagementInfo.getContractNo())
|
|
.eq("delete_flag", "0"));
|
|
.eq("delete_flag", "0"));
|
|
- if (!CollectionUtils.isEmpty(purchaseReceiptReportList)){
|
|
|
|
- for (PurchaseReceiptReport purchaseReceiptReport:purchaseReceiptReportList){
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(purchaseReceiptReportList)) {
|
|
|
|
+ for (PurchaseReceiptReport purchaseReceiptReport : purchaseReceiptReportList) {
|
|
//有未付金额
|
|
//有未付金额
|
|
if (purchaseReceiptReport.getAmountNotPayable() > 0) {
|
|
if (purchaseReceiptReport.getAmountNotPayable() > 0) {
|
|
contractManagementInfo.setReportStatus("待结算");
|
|
contractManagementInfo.setReportStatus("待结算");
|
|
- }
|
|
|
|
- else{
|
|
|
|
|
|
+ } else {
|
|
contractManagementInfo.setReportStatus("已结算");
|
|
contractManagementInfo.setReportStatus("已结算");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -341,13 +350,14 @@ public class PurchaseReceiptReportServiceImpl extends ServiceImpl<PurchaseReceip
|
|
|
|
|
|
/**
|
|
/**
|
|
* 查采购订单表
|
|
* 查采购订单表
|
|
|
|
+ *
|
|
* @param purchaseReceiptReport
|
|
* @param purchaseReceiptReport
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public PurchaseOrder selectOrder(PurchaseReceiptReport purchaseReceiptReport) {
|
|
public PurchaseOrder selectOrder(PurchaseReceiptReport purchaseReceiptReport) {
|
|
- PurchaseOrder purchaseOrder=purchaseOrderService.selectOne(new EntityWrapper<PurchaseOrder>()
|
|
|
|
- .eq("contract_no",purchaseReceiptReport.getContractNo())
|
|
|
|
- .eq("delete_flag","0"));
|
|
|
|
|
|
+ PurchaseOrder purchaseOrder = purchaseOrderService.selectOne(new EntityWrapper<PurchaseOrder>()
|
|
|
|
+ .eq("contract_no", purchaseReceiptReport.getContractNo())
|
|
|
|
+ .eq("delete_flag", "0"));
|
|
if (purchaseOrder != null) {
|
|
if (purchaseOrder != null) {
|
|
//定义已入库量
|
|
//定义已入库量
|
|
Float stockInQuantity = 0.0f;
|
|
Float stockInQuantity = 0.0f;
|
|
@@ -369,19 +379,20 @@ public class PurchaseReceiptReportServiceImpl extends ServiceImpl<PurchaseReceip
|
|
|
|
|
|
/**
|
|
/**
|
|
* 根据客户名查合同编号
|
|
* 根据客户名查合同编号
|
|
|
|
+ *
|
|
* @param customerName
|
|
* @param customerName
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public List<PurchaseReceiptReport> selectContractNo(String customerName,String contractNo) {
|
|
|
|
- List<PurchaseReceiptReport> purchaseReceiptReportList=this.selectList(new EntityWrapper<PurchaseReceiptReport>()
|
|
|
|
- .eq("customer_name",customerName)
|
|
|
|
- .eq("delete_flag",0)
|
|
|
|
- .orderBy("update_date",false)
|
|
|
|
- .groupBy("contract_no"));
|
|
|
|
- if (!CollectionUtils.isEmpty(purchaseReceiptReportList)){
|
|
|
|
- for (PurchaseReceiptReport purchaseReceiptReport:purchaseReceiptReportList){
|
|
|
|
- if (contractNo.equals(purchaseReceiptReport.getContractNo())){
|
|
|
|
- purchaseReceiptReportList.remove(purchaseReceiptReport);
|
|
|
|
|
|
+ public List<PurchaseReceiptReport> selectContractNo(String customerName, String contractNo) {
|
|
|
|
+ List<PurchaseReceiptReport> purchaseReceiptReportList = this.selectList(new EntityWrapper<PurchaseReceiptReport>()
|
|
|
|
+ .eq("customer_name", customerName)
|
|
|
|
+ .eq("delete_flag", 0)
|
|
|
|
+ .orderBy("update_date", false)
|
|
|
|
+ .groupBy("contract_no"));
|
|
|
|
+ if (!CollectionUtils.isEmpty(purchaseReceiptReportList)) {
|
|
|
|
+ for (int i = 0; i < purchaseReceiptReportList.size(); i++) {
|
|
|
|
+ if (contractNo.equals(purchaseReceiptReportList.get(i).getContractNo())) {
|
|
|
|
+ purchaseReceiptReportList.remove(purchaseReceiptReportList.get(i));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|