|
@ -12,7 +12,10 @@ import com.yxt.anrui.base.api.basevehicle.BaseVehicleFeign; |
|
|
import com.yxt.anrui.base.api.basevehicle.BaseVehicleSelectVo; |
|
|
import com.yxt.anrui.base.api.basevehicle.BaseVehicleSelectVo; |
|
|
import com.yxt.anrui.base.api.commoncontract.CommonContract; |
|
|
import com.yxt.anrui.base.api.commoncontract.CommonContract; |
|
|
import com.yxt.anrui.base.api.commoncontract.CommonContractFeign; |
|
|
import com.yxt.anrui.base.api.commoncontract.CommonContractFeign; |
|
|
|
|
|
import com.yxt.anrui.base.common.enums.BillTypeEnum; |
|
|
import com.yxt.anrui.base.common.enums.DictCommonEnum; |
|
|
import com.yxt.anrui.base.common.enums.DictCommonEnum; |
|
|
|
|
|
import com.yxt.anrui.base.common.utils.Rule; |
|
|
|
|
|
import com.yxt.anrui.base.common.utils.domain.BillNo; |
|
|
import com.yxt.anrui.buscenter.api.buscenterfile.BuscenterFile; |
|
|
import com.yxt.anrui.buscenter.api.buscenterfile.BuscenterFile; |
|
|
import com.yxt.anrui.buscenter.api.buscenterfile.BuscenterFileEnum; |
|
|
import com.yxt.anrui.buscenter.api.buscenterfile.BuscenterFileEnum; |
|
|
import com.yxt.anrui.buscenter.api.bushandover.*; |
|
|
import com.yxt.anrui.buscenter.api.bushandover.*; |
|
@ -36,6 +39,8 @@ import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign; |
|
|
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo; |
|
|
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo; |
|
|
import com.yxt.anrui.fin.api.finvehicleinvoice.FinVehicleInvoice; |
|
|
import com.yxt.anrui.fin.api.finvehicleinvoice.FinVehicleInvoice; |
|
|
import com.yxt.anrui.fin.api.finvehicleinvoice.FinVehicleInvoiceFeign; |
|
|
import com.yxt.anrui.fin.api.finvehicleinvoice.FinVehicleInvoiceFeign; |
|
|
|
|
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign; |
|
|
|
|
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo; |
|
|
import com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfoDetailsVo; |
|
|
import com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfoDetailsVo; |
|
|
import com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfoFeign; |
|
|
import com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfoFeign; |
|
|
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|
|
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|
@ -105,7 +110,8 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu |
|
|
private BaseModelConfigFeign baseModelConfigFeign; |
|
|
private BaseModelConfigFeign baseModelConfigFeign; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private BaseVehicleFeign baseVehicleFeign; |
|
|
private BaseVehicleFeign baseVehicleFeign; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private SysOrganizationFeign sysOrganizationFeign; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private BusHandoverPrepareVehicleService busHandoverPrepareVehicleService; |
|
|
private BusHandoverPrepareVehicleService busHandoverPrepareVehicleService; |
|
|
|
|
|
|
|
@ -829,10 +835,13 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu |
|
|
String sid = entity.getSid(); |
|
|
String sid = entity.getSid(); |
|
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|
|
entity.setHandoverStateKey("001"); |
|
|
entity.setHandoverStateKey("001"); |
|
|
entity.setHandoverStateValue("未完成"); |
|
|
entity.setHandoverStateValue("未交车"); |
|
|
if (StringUtils.isNotBlank(dto.getUserSid())) { |
|
|
if (StringUtils.isNotBlank(dto.getUserSid())) { |
|
|
entity.setCreateBySid(dto.getUserSid()); |
|
|
entity.setCreateBySid(dto.getUserSid()); |
|
|
} |
|
|
} |
|
|
|
|
|
//交车资料确认单编号
|
|
|
|
|
|
String billNo = getApplyCode(dto.getUseOrgSid()); |
|
|
|
|
|
entity.setBillNo(billNo); |
|
|
baseMapper.insert(entity); |
|
|
baseMapper.insert(entity); |
|
|
List<BusHandoverItemForDeliveryDto> busItemvos = dto.getBusItemvos(); |
|
|
List<BusHandoverItemForDeliveryDto> busItemvos = dto.getBusItemvos(); |
|
|
for (BusHandoverItemForDeliveryDto busItemvo : busItemvos) { |
|
|
for (BusHandoverItemForDeliveryDto busItemvo : busItemvos) { |
|
@ -875,9 +884,11 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu |
|
|
BusHandover busHandover = fetchBySid(sid); |
|
|
BusHandover busHandover = fetchBySid(sid); |
|
|
//接收车辆确认书、交车资料确认单
|
|
|
//接收车辆确认书、交车资料确认单
|
|
|
BusReceiveVehiclePdfVo pdfVo = new BusReceiveVehiclePdfVo(); |
|
|
BusReceiveVehiclePdfVo pdfVo = new BusReceiveVehiclePdfVo(); |
|
|
|
|
|
pdfVo.setBillNo(busHandover.getBillNo()); |
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
|
|
pdfVo.setCreateTime(new Date()); |
|
|
//出门证
|
|
|
//出门证
|
|
|
BusExitPermitVo permitVo = new BusExitPermitVo(); |
|
|
BusExitPermitVo permitVo = new BusExitPermitVo(); |
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
|
|
if (null != busHandover) { |
|
|
if (null != busHandover) { |
|
|
if (StringUtils.isNotBlank(busHandover.getPayTypeValue())) { |
|
|
if (StringUtils.isNotBlank(busHandover.getPayTypeValue())) { |
|
|
if ("全款".equals(busHandover.getPayTypeValue())) { |
|
|
if ("全款".equals(busHandover.getPayTypeValue())) { |
|
@ -1047,6 +1058,26 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu |
|
|
return path; |
|
|
return path; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 生成交车资料确认单单据编号 |
|
|
|
|
|
* |
|
|
|
|
|
* @param orgSid |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
public String getApplyCode(String orgSid) { |
|
|
|
|
|
//获取分公司sid
|
|
|
|
|
|
ResultBean<SysOrganizationVo> resultBean1 = sysOrganizationFeign.fetchBySid(orgSid); |
|
|
|
|
|
String orgCode = resultBean1.getData().getOrgCode(); |
|
|
|
|
|
BillNo b = new BillNo(); |
|
|
|
|
|
b.setOrgCode(orgCode); |
|
|
|
|
|
b.setBillType(BillTypeEnum.JCZLQRD.getBillType()); |
|
|
|
|
|
String bill = Rule.getBill(b); |
|
|
|
|
|
int i = baseMapper.selectNum(bill); |
|
|
|
|
|
String billNo = Rule.getBillNo(bill, i); |
|
|
|
|
|
return billNo; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 随车资料 |
|
|
* 随车资料 |
|
|
* |
|
|
* |
|
@ -1057,8 +1088,11 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu |
|
|
Map<String, Object> dataMap = new HashMap<String, Object>(); |
|
|
Map<String, Object> dataMap = new HashMap<String, Object>(); |
|
|
List<BusReceiveVehicleListPdfVo> listPdfVos = pdfVo.getListPdfVos(); |
|
|
List<BusReceiveVehicleListPdfVo> listPdfVos = pdfVo.getListPdfVos(); |
|
|
List<Map<String, Object>> newList = new ArrayList<>(); |
|
|
List<Map<String, Object>> newList = new ArrayList<>(); |
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
dataMap.put("contractNo", pdfVo.getContractNo()); |
|
|
dataMap.put("contractNo", pdfVo.getContractNo()); |
|
|
dataMap.put("customerName", pdfVo.getCustomerName()); |
|
|
dataMap.put("customerName", pdfVo.getCustomerName()); |
|
|
|
|
|
dataMap.put("createTime",sdf.format(pdfVo.getCreateTime())); |
|
|
|
|
|
dataMap.put("documentNumber",pdfVo.getBillNo()); |
|
|
if (null != listPdfVos && listPdfVos.size() > 0) { |
|
|
if (null != listPdfVos && listPdfVos.size() > 0) { |
|
|
for (BusReceiveVehicleListPdfVo detailsVo : listPdfVos) { |
|
|
for (BusReceiveVehicleListPdfVo detailsVo : listPdfVos) { |
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
Map<String, Object> map = new HashMap<>(); |
|
|