|
@ -477,6 +477,7 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica |
|
|
String billNo = getApplyCode(dto.getUseOrgSid()); |
|
|
String billNo = getApplyCode(dto.getUseOrgSid()); |
|
|
finBillApplication.setBillNo(billNo); |
|
|
finBillApplication.setBillNo(billNo); |
|
|
finBillApplication.setNum(finBillVehicles.size()); |
|
|
finBillApplication.setNum(finBillVehicles.size()); |
|
|
|
|
|
finBillApplication.setArrearsMoney("0"); |
|
|
save(finBillApplication); |
|
|
save(finBillApplication); |
|
|
//主车开票信息
|
|
|
//主车开票信息
|
|
|
for (FinBillVehicleDto finBillVehicleDto : finBillVehicles) { |
|
|
for (FinBillVehicleDto finBillVehicleDto : finBillVehicles) { |
|
@ -1359,7 +1360,7 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica |
|
|
List<FinBillVehicleDto> finBillVehicles = dto.getFinBillVehicles(); |
|
|
List<FinBillVehicleDto> finBillVehicles = dto.getFinBillVehicles(); |
|
|
for (FinBillVehicleDto finBillVehicle : finBillVehicles) { |
|
|
for (FinBillVehicleDto finBillVehicle : finBillVehicles) { |
|
|
int i = finBillVehicleService.checkIsKp(contractNo, finBillVehicle.getVehSid()); |
|
|
int i = finBillVehicleService.checkIsKp(contractNo, finBillVehicle.getVehSid()); |
|
|
if (i > 0){ |
|
|
if (i > 0) { |
|
|
return rb.setMsg(finBillVehicle.getVinNo() + "已发起过开票申请"); |
|
|
return rb.setMsg(finBillVehicle.getVinNo() + "已发起过开票申请"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -1916,6 +1917,9 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica |
|
|
List<FinBillFileDto> cldjhtApplicationAppendxs = dto.getCldjhtApplicationAppendxs(); |
|
|
List<FinBillFileDto> cldjhtApplicationAppendxs = dto.getCldjhtApplicationAppendxs(); |
|
|
List<FinBillFileDto> zjApplicationAppendxs = dto.getZjApplicationAppendxs(); |
|
|
List<FinBillFileDto> zjApplicationAppendxs = dto.getZjApplicationAppendxs(); |
|
|
List<FinBillFileDto> arrearsCollectionAppendxs = dto.getArrearsCollectionAppendxs(); |
|
|
List<FinBillFileDto> arrearsCollectionAppendxs = dto.getArrearsCollectionAppendxs(); |
|
|
|
|
|
List<FinBillFileDto> pcgsgdhdwdbjy = dto.getPcgsgdhdwdbjy(); |
|
|
|
|
|
List<FinBillFileDto> pczrrdbcns = dto.getPczrrdbcns(); |
|
|
|
|
|
List<FinBillFileDto> pczfxsjt = dto.getPczfxsjt(); |
|
|
if (StringUtils.isBlank(dtoSid)) {//新增
|
|
|
if (StringUtils.isBlank(dtoSid)) {//新增
|
|
|
FinBillApplication finBillApplication = new FinBillApplication(); |
|
|
FinBillApplication finBillApplication = new FinBillApplication(); |
|
|
BeanUtil.copyProperties(dto, finBillApplication, "sid"); |
|
|
BeanUtil.copyProperties(dto, finBillApplication, "sid"); |
|
@ -2040,6 +2044,42 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica |
|
|
finBillFileService.saveOrUpdateDto(finBillFileDto); |
|
|
finBillFileService.saveOrUpdateDto(finBillFileDto); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
if (pcgsgdhdwdbjy.size() > 0) { |
|
|
|
|
|
for (FinBillFileDto finBillFileDto : pcgsgdhdwdbjy) { |
|
|
|
|
|
String filePath = finBillFileDto.getFileUrl(); |
|
|
|
|
|
if (filePath.indexOf(fileUploadComponent.getUrlPrefix()) > -1) { |
|
|
|
|
|
filePath = filePath.replace(fileUploadComponent.getUrlPrefix(), ""); |
|
|
|
|
|
} |
|
|
|
|
|
finBillFileDto.setFileUrl(filePath); |
|
|
|
|
|
finBillFileDto.setBillAppSid(finBillApplication.getSid()); |
|
|
|
|
|
finBillFileDto.setAttachType(FinAttachTypeEnum.GSGDHDWDBJY.getAttachType()); |
|
|
|
|
|
finBillFileService.saveOrUpdateDto(finBillFileDto); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (pczrrdbcns.size() > 0) { |
|
|
|
|
|
for (FinBillFileDto finBillFileDto : pczrrdbcns) { |
|
|
|
|
|
String filePath = finBillFileDto.getFileUrl(); |
|
|
|
|
|
if (filePath.indexOf(fileUploadComponent.getUrlPrefix()) > -1) { |
|
|
|
|
|
filePath = filePath.replace(fileUploadComponent.getUrlPrefix(), ""); |
|
|
|
|
|
} |
|
|
|
|
|
finBillFileDto.setFileUrl(filePath); |
|
|
|
|
|
finBillFileDto.setBillAppSid(finBillApplication.getSid()); |
|
|
|
|
|
finBillFileDto.setAttachType(FinAttachTypeEnum.ZRRDBCNS.getAttachType()); |
|
|
|
|
|
finBillFileService.saveOrUpdateDto(finBillFileDto); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (pczfxsjt.size() > 0) { |
|
|
|
|
|
for (FinBillFileDto finBillFileDto : pczfxsjt) { |
|
|
|
|
|
String filePath = finBillFileDto.getFileUrl(); |
|
|
|
|
|
if (filePath.indexOf(fileUploadComponent.getUrlPrefix()) > -1) { |
|
|
|
|
|
filePath = filePath.replace(fileUploadComponent.getUrlPrefix(), ""); |
|
|
|
|
|
} |
|
|
|
|
|
finBillFileDto.setFileUrl(filePath); |
|
|
|
|
|
finBillFileDto.setBillAppSid(finBillApplication.getSid()); |
|
|
|
|
|
finBillFileDto.setAttachType(FinAttachTypeEnum.ZFXSJT.getAttachType()); |
|
|
|
|
|
finBillFileService.saveOrUpdateDto(finBillFileDto); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
return rb.success().setMsg("保存成功").setData(finBillApplication.getSid()); |
|
|
return rb.success().setMsg("保存成功").setData(finBillApplication.getSid()); |
|
|
} |
|
|
} |
|
|
FinBillApplication finBillApplication = fetchBySid(dtoSid); |
|
|
FinBillApplication finBillApplication = fetchBySid(dtoSid); |
|
@ -2111,6 +2151,42 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica |
|
|
finBillFileService.saveOrUpdateDto(finBillFileDto); |
|
|
finBillFileService.saveOrUpdateDto(finBillFileDto); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
if (pcgsgdhdwdbjy.size() > 0) { |
|
|
|
|
|
for (FinBillFileDto finBillFileDto : pcgsgdhdwdbjy) { |
|
|
|
|
|
String filePath = finBillFileDto.getFileUrl(); |
|
|
|
|
|
if (filePath.indexOf(fileUploadComponent.getUrlPrefix()) > -1) { |
|
|
|
|
|
filePath = filePath.replace(fileUploadComponent.getUrlPrefix(), ""); |
|
|
|
|
|
} |
|
|
|
|
|
finBillFileDto.setFileUrl(filePath); |
|
|
|
|
|
finBillFileDto.setBillAppSid(finBillApplication.getSid()); |
|
|
|
|
|
finBillFileDto.setAttachType(FinAttachTypeEnum.GSGDHDWDBJY.getAttachType()); |
|
|
|
|
|
finBillFileService.saveOrUpdateDto(finBillFileDto); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (pczrrdbcns.size() > 0) { |
|
|
|
|
|
for (FinBillFileDto finBillFileDto : pczrrdbcns) { |
|
|
|
|
|
String filePath = finBillFileDto.getFileUrl(); |
|
|
|
|
|
if (filePath.indexOf(fileUploadComponent.getUrlPrefix()) > -1) { |
|
|
|
|
|
filePath = filePath.replace(fileUploadComponent.getUrlPrefix(), ""); |
|
|
|
|
|
} |
|
|
|
|
|
finBillFileDto.setFileUrl(filePath); |
|
|
|
|
|
finBillFileDto.setBillAppSid(finBillApplication.getSid()); |
|
|
|
|
|
finBillFileDto.setAttachType(FinAttachTypeEnum.ZRRDBCNS.getAttachType()); |
|
|
|
|
|
finBillFileService.saveOrUpdateDto(finBillFileDto); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (pczfxsjt.size() > 0) { |
|
|
|
|
|
for (FinBillFileDto finBillFileDto : pczfxsjt) { |
|
|
|
|
|
String filePath = finBillFileDto.getFileUrl(); |
|
|
|
|
|
if (filePath.indexOf(fileUploadComponent.getUrlPrefix()) > -1) { |
|
|
|
|
|
filePath = filePath.replace(fileUploadComponent.getUrlPrefix(), ""); |
|
|
|
|
|
} |
|
|
|
|
|
finBillFileDto.setFileUrl(filePath); |
|
|
|
|
|
finBillFileDto.setBillAppSid(finBillApplication.getSid()); |
|
|
|
|
|
finBillFileDto.setAttachType(FinAttachTypeEnum.ZFXSJT.getAttachType()); |
|
|
|
|
|
finBillFileService.saveOrUpdateDto(finBillFileDto); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
finBillVehicleService.delByBillAppSid(dtoSid); |
|
|
finBillVehicleService.delByBillAppSid(dtoSid); |
|
|
for (FinBillVehicleDto finBillVehicleDto : finBillVehicles) { |
|
|
for (FinBillVehicleDto finBillVehicleDto : finBillVehicles) { |
|
|
FinBillVehicle finBillVehicle = new FinBillVehicle(); |
|
|
FinBillVehicle finBillVehicle = new FinBillVehicle(); |
|
@ -2388,7 +2464,7 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica |
|
|
variables = flowableFeign.getMap(flowProcessMapQuery).getData(); |
|
|
variables = flowableFeign.getMap(flowProcessMapQuery).getData(); |
|
|
bv.setFormVariables(variables); |
|
|
bv.setFormVariables(variables); |
|
|
//=======================================
|
|
|
//=======================================
|
|
|
if (finBillApplication.getCreateByName().equals(finBillApplication.getStaffName())){ |
|
|
if (finBillApplication.getCreateByName().equals(finBillApplication.getStaffName())) { |
|
|
List<String> orgPathList = Arrays.asList(finBillApplication.getOrgSidPath().split("/")); |
|
|
List<String> orgPathList = Arrays.asList(finBillApplication.getOrgSidPath().split("/")); |
|
|
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(orgPathList.get(orgPathList.size() - 1)).getData(); |
|
|
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(orgPathList.get(orgPathList.size() - 1)).getData(); |
|
|
String nextNodeUserSids_ = sysOrganization.getManagerSid(); |
|
|
String nextNodeUserSids_ = sysOrganization.getManagerSid(); |
|
@ -2497,6 +2573,7 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica |
|
|
UpdateFlowFieldVo ufVo = resultBean.getData(); |
|
|
UpdateFlowFieldVo ufVo = resultBean.getData(); |
|
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
|
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
|
|
if ("Event_end".equals(resultBean.getData().getTaskDefKey())) { |
|
|
if ("Event_end".equals(resultBean.getData().getTaskDefKey())) { |
|
|
|
|
|
if ("01".equals(finBillApplication.getOpenTickTypeKey())) {//判断是否为机动车销售统一发票
|
|
|
List<FinBillVehicleVo> finBillVehicleVos = finBillVehicleService.fetchVehBySid(businessSid); |
|
|
List<FinBillVehicleVo> finBillVehicleVos = finBillVehicleService.fetchVehBySid(businessSid); |
|
|
List<FinBillTrailerVo> finBillTrailerVos = finBillTrailerService.fetchByMainSid(businessSid); |
|
|
List<FinBillTrailerVo> finBillTrailerVos = finBillTrailerService.fetchByMainSid(businessSid); |
|
|
if (!data.getSingleFinalPrice().equals(finBillApplication.getOneBillMoney())) {//是高低开
|
|
|
if (!data.getSingleFinalPrice().equals(finBillApplication.getOneBillMoney())) {//是高低开
|
|
@ -2574,7 +2651,7 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica |
|
|
finVehicleInvoiceDto.setTaxpayerNo(finCompanyInvoicingDetailsVo.getTaxpayerNo()); |
|
|
finVehicleInvoiceDto.setTaxpayerNo(finCompanyInvoicingDetailsVo.getTaxpayerNo()); |
|
|
} else { |
|
|
} else { |
|
|
CrmCustomerTempVo crmCustomerTempVo = crmCustomerTempFeign.fetchSid(finBillVehicleVo.getOpenTickSid()).getData(); |
|
|
CrmCustomerTempVo crmCustomerTempVo = crmCustomerTempFeign.fetchSid(finBillVehicleVo.getOpenTickSid()).getData(); |
|
|
if (crmCustomerTempVo != null){ |
|
|
if (crmCustomerTempVo != null) { |
|
|
finVehicleInvoiceDto.setTelPhone(crmCustomerTempVo.getMobile()); |
|
|
finVehicleInvoiceDto.setTelPhone(crmCustomerTempVo.getMobile()); |
|
|
finVehicleInvoiceDto.setTaxpayerNo(crmCustomerTempVo.getIDNumber()); |
|
|
finVehicleInvoiceDto.setTaxpayerNo(crmCustomerTempVo.getIDNumber()); |
|
|
} |
|
|
} |
|
@ -2627,6 +2704,7 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
BigDecimal oneBillMoney = busSalesOrder.getOneBillMoney(); |
|
|
BigDecimal oneBillMoney = busSalesOrder.getOneBillMoney(); |
|
|
if (oneBillMoney == null) { |
|
|
if (oneBillMoney == null) { |
|
|
busSalesOrderFeign.updateOneBillMoneyByOrderSid(busSalesOrder.getSid(), finBillApplication.getOneBillMoney().toString()); |
|
|
busSalesOrderFeign.updateOneBillMoneyByOrderSid(busSalesOrder.getSid(), finBillApplication.getOneBillMoney().toString()); |
|
@ -3370,7 +3448,7 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica |
|
|
variables = flowableFeign.getMap(flowProcessMapQuery).getData(); |
|
|
variables = flowableFeign.getMap(flowProcessMapQuery).getData(); |
|
|
bv.setFormVariables(variables); |
|
|
bv.setFormVariables(variables); |
|
|
//=======================================
|
|
|
//=======================================
|
|
|
if (finBillApplication1.getCreateByName().equals(finBillApplication1.getStaffName())){ |
|
|
if (finBillApplication1.getCreateByName().equals(finBillApplication1.getStaffName())) { |
|
|
List<String> orgPathList = Arrays.asList(finBillApplication1.getOrgSidPath().split("/")); |
|
|
List<String> orgPathList = Arrays.asList(finBillApplication1.getOrgSidPath().split("/")); |
|
|
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(orgPathList.get(orgPathList.size() - 1)).getData(); |
|
|
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(orgPathList.get(orgPathList.size() - 1)).getData(); |
|
|
String nextNodeUserSids_ = sysOrganization.getManagerSid(); |
|
|
String nextNodeUserSids_ = sysOrganization.getManagerSid(); |
|
|