|
@ -414,9 +414,9 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
|
|
|
|
|
|
//销售出货单
|
|
|
//销售出货单
|
|
|
String shippingInformationType = "2"; |
|
|
String shippingInformationType = "2"; |
|
|
|
|
|
String shippingTemplateType = "销售出货单1"; |
|
|
//生成出货资料
|
|
|
//生成出货资料
|
|
|
insertShippingInformation(outOrderCode,shippingInformationType,salesShippingInform); |
|
|
insertShippingInformation(outOrderCode,shippingInformationType,shippingTemplateType,salesShippingInform); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<SysSalesShippingInformDetail> salesShippingInformDetails = shippingInformDetailMapper.selectSysSalesShippingInformDetailByCode(outOrderCode); |
|
|
List<SysSalesShippingInformDetail> salesShippingInformDetails = shippingInformDetailMapper.selectSysSalesShippingInformDetailByCode(outOrderCode); |
|
@ -498,9 +498,9 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
|
|
|
|
|
|
//销售出货单
|
|
|
//销售出货单
|
|
|
String shippingInformationType = "2"; |
|
|
String shippingInformationType = "2"; |
|
|
|
|
|
String shippingTemplateType = "销售出货单2"; |
|
|
//生成出货资料
|
|
|
//生成出货资料
|
|
|
insertShippingInformation(outOrderCode,shippingInformationType,salesShippingInform); |
|
|
insertShippingInformation(outOrderCode,shippingInformationType,shippingTemplateType,salesShippingInform); |
|
|
|
|
|
|
|
|
List<SysSalesShippingInformDetail> salesShippingInformDetails = shippingInformDetailMapper.selectSysSalesShippingInformDetailByCode(outOrderCode); |
|
|
List<SysSalesShippingInformDetail> salesShippingInformDetails = shippingInformDetailMapper.selectSysSalesShippingInformDetailByCode(outOrderCode); |
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
|
@ -575,8 +575,9 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
|
|
|
|
|
|
SysSalesShippingInform sysSalesShippingInform = sysSalesShippingInformMapper.selectSysSalesShippingInformByCode(outOrderCode); |
|
|
SysSalesShippingInform sysSalesShippingInform = sysSalesShippingInformMapper.selectSysSalesShippingInformByCode(outOrderCode); |
|
|
String shippingInformationType = "0"; |
|
|
String shippingInformationType = "0"; |
|
|
|
|
|
String shippingTemplateType = "销售出货箱单1"; |
|
|
//生成出货资料
|
|
|
//生成出货资料
|
|
|
insertShippingInformation(outOrderCode,shippingInformationType,sysSalesShippingInform); |
|
|
insertShippingInformation(outOrderCode,shippingInformationType,shippingTemplateType,sysSalesShippingInform); |
|
|
String salesOrderCode = sysSalesShippingInform.getSalesOrderCode(); |
|
|
String salesOrderCode = sysSalesShippingInform.getSalesOrderCode(); |
|
|
|
|
|
|
|
|
String realFileName = salesOrderCode + "-" + fileName.substring(0, fileName.lastIndexOf(".")) + ".xlsx"; |
|
|
String realFileName = salesOrderCode + "-" + fileName.substring(0, fileName.lastIndexOf(".")) + ".xlsx"; |
|
@ -650,8 +651,9 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
SysSalesShippingInform sysSalesShippingInform = sysSalesShippingInformMapper.selectSysSalesShippingInformByCode(outOrderCode); |
|
|
SysSalesShippingInform sysSalesShippingInform = sysSalesShippingInformMapper.selectSysSalesShippingInformByCode(outOrderCode); |
|
|
|
|
|
|
|
|
String shippingInformationType = "0"; |
|
|
String shippingInformationType = "0"; |
|
|
|
|
|
String shippingTemplateType = "销售出货箱单2"; |
|
|
//生成出货资料
|
|
|
//生成出货资料
|
|
|
insertShippingInformation(outOrderCode,shippingInformationType,sysSalesShippingInform); |
|
|
insertShippingInformation(outOrderCode,shippingInformationType,shippingTemplateType,sysSalesShippingInform); |
|
|
|
|
|
|
|
|
String salesOrderCode = sysSalesShippingInform.getSalesOrderCode(); |
|
|
String salesOrderCode = sysSalesShippingInform.getSalesOrderCode(); |
|
|
if (StringUtils.isEmpty(salesOrderCode)){ |
|
|
if (StringUtils.isEmpty(salesOrderCode)){ |
|
@ -733,6 +735,11 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
|
|
|
|
|
|
SysSalesShippingInform sysSalesShippingInform = sysSalesShippingInformMapper.selectSysSalesShippingInformByCode(outOrderCode); |
|
|
SysSalesShippingInform sysSalesShippingInform = sysSalesShippingInformMapper.selectSysSalesShippingInformByCode(outOrderCode); |
|
|
|
|
|
|
|
|
|
|
|
String shippingInformationType = "1"; |
|
|
|
|
|
String shippingTemplateType = "销售出货发票1"; |
|
|
|
|
|
//生成出货资料
|
|
|
|
|
|
insertShippingInformation(outOrderCode,shippingInformationType,shippingTemplateType,sysSalesShippingInform); |
|
|
|
|
|
|
|
|
String salesOrderCode = sysSalesShippingInform.getSalesOrderCode(); |
|
|
String salesOrderCode = sysSalesShippingInform.getSalesOrderCode(); |
|
|
SysMakeOrder sysMakeOrder = sysMakeOrderMapper.selectMakeOrderBySaleNo(salesOrderCode); |
|
|
SysMakeOrder sysMakeOrder = sysMakeOrderMapper.selectMakeOrderBySaleNo(salesOrderCode); |
|
|
|
|
|
|
|
@ -815,6 +822,12 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SysSalesShippingInform sysSalesShippingInform = sysSalesShippingInformMapper.selectSysSalesShippingInformByCode(outOrderCode); |
|
|
SysSalesShippingInform sysSalesShippingInform = sysSalesShippingInformMapper.selectSysSalesShippingInformByCode(outOrderCode); |
|
|
|
|
|
|
|
|
|
|
|
String shippingInformationType = "1"; |
|
|
|
|
|
String shippingTemplateType = "销售出货发票2"; |
|
|
|
|
|
//生成出货资料
|
|
|
|
|
|
insertShippingInformation(outOrderCode,shippingInformationType,shippingTemplateType,sysSalesShippingInform); |
|
|
|
|
|
|
|
|
String salesOrderCode = sysSalesShippingInform.getSalesOrderCode(); |
|
|
String salesOrderCode = sysSalesShippingInform.getSalesOrderCode(); |
|
|
SysMakeOrder sysMakeOrder = sysMakeOrderMapper.selectMakeOrderBySaleNo(salesOrderCode); |
|
|
SysMakeOrder sysMakeOrder = sysMakeOrderMapper.selectMakeOrderBySaleNo(salesOrderCode); |
|
|
|
|
|
|
|
@ -884,8 +897,18 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
FileDownloadUtils fileDownloadUtils = new FileDownloadUtils(); |
|
|
FileDownloadUtils fileDownloadUtils = new FileDownloadUtils(); |
|
|
try { |
|
|
try { |
|
|
String fileRelativePath = fileDownloadUtils.getFileRelativePath(fileName); |
|
|
String fileRelativePath = fileDownloadUtils.getFileRelativePath(fileName); |
|
|
|
|
|
if (StringUtils.isEmpty(outOrderCode)){ |
|
|
|
|
|
log.warn("出货单号为空,请检查:{}", outOrderCode); |
|
|
|
|
|
throw new RuntimeException("出货单号为空,请检查"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
SysSalesShippingInform sysSalesShippingInform = sysSalesShippingInformMapper.selectSysSalesShippingInformByCode(outOrderCode); |
|
|
SysSalesShippingInform sysSalesShippingInform = sysSalesShippingInformMapper.selectSysSalesShippingInformByCode(outOrderCode); |
|
|
|
|
|
|
|
|
|
|
|
String shippingInformationType = "3"; |
|
|
|
|
|
String shippingTemplateType = "出货通知单"; |
|
|
|
|
|
//生成出货资料
|
|
|
|
|
|
insertShippingInformation(outOrderCode,shippingInformationType,shippingTemplateType,sysSalesShippingInform); |
|
|
|
|
|
|
|
|
String salesOrderCode = sysSalesShippingInform.getSalesOrderCode(); |
|
|
String salesOrderCode = sysSalesShippingInform.getSalesOrderCode(); |
|
|
SysMakeOrder sysMakeOrder = sysMakeOrderMapper.selectMakeOrderBySaleNo(salesOrderCode); |
|
|
SysMakeOrder sysMakeOrder = sysMakeOrderMapper.selectMakeOrderBySaleNo(salesOrderCode); |
|
|
|
|
|
|
|
@ -935,20 +958,20 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void insertShippingInformation(String outOrderCode, String shippingInformationType, SysSalesShippingInform salesShippingInform) { |
|
|
private void insertShippingInformation(String outOrderCode, String shippingInformationType, String shippingTemplateType, SysSalesShippingInform salesShippingInform) { |
|
|
String loginName = ShiroUtils.getLoginName(); |
|
|
String loginName = ShiroUtils.getLoginName(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SalesShippingInformation shippingInformation = new SalesShippingInformation(); |
|
|
SalesShippingInformation shippingInformation = new SalesShippingInformation(); |
|
|
shippingInformation.setOutOrderCode(outOrderCode); |
|
|
shippingInformation.setOutOrderCode(outOrderCode); |
|
|
shippingInformation.setSalesOrderCode(salesShippingInform.getSalesOrderCode()); |
|
|
shippingInformation.setSalesOrderCode(salesShippingInform.getSalesOrderCode()); |
|
|
shippingInformation.setShippingInformationType(shippingInformationType); |
|
|
shippingInformation.setShippingInformationType(shippingInformationType); |
|
|
shippingInformation.setShippingInformationCode(redisCache.generateBillNo("CHZL")); |
|
|
shippingInformation.setShippingInformationCode(redisCache.generateBillNo("CHZL")); |
|
|
shippingInformation.setShippingTemplateType("1"); |
|
|
shippingInformation.setShippingTemplateType(shippingTemplateType); |
|
|
shippingInformation.setCreateBy(loginName); |
|
|
shippingInformation.setCreateBy(loginName); |
|
|
shippingInformation.setCreateTime(new Date()); |
|
|
shippingInformation.setCreateTime(new Date()); |
|
|
shippingInformation.setBusinessMembers(salesShippingInform.getBusinessMembers()); |
|
|
shippingInformation.setBusinessMembers(salesShippingInform.getBusinessMembers()); |
|
|
shippingInformation.setCustomerId(salesShippingInform.getCustomerId()); |
|
|
shippingInformation.setCustomerId(salesShippingInform.getCustomerId()); |
|
|
|
|
|
|
|
|
shippingInformation.setAcceptanceTime(salesShippingInform.getAcceptanceTime()); |
|
|
shippingInformation.setAcceptanceTime(salesShippingInform.getAcceptanceTime()); |
|
|
shippingInformation.setAllPriceExcludingTaxRmb(salesShippingInform.getAllPriceExcludingTaxRmb()); |
|
|
shippingInformation.setAllPriceExcludingTaxRmb(salesShippingInform.getAllPriceExcludingTaxRmb()); |
|
|
shippingInformation.setAllPriceExcludingTaxDollar(salesShippingInform.getAllPriceExcludingTaxDollar()); |
|
|
shippingInformation.setAllPriceExcludingTaxDollar(salesShippingInform.getAllPriceExcludingTaxDollar()); |
|
@ -967,6 +990,8 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
shippingInformation.setRemark(salesShippingInform.getRemark()); |
|
|
shippingInformation.setRemark(salesShippingInform.getRemark()); |
|
|
shippingInformation.setWarehouseOutType(salesShippingInform.getWarehouseOutType()); |
|
|
shippingInformation.setWarehouseOutType(salesShippingInform.getWarehouseOutType()); |
|
|
shippingInformation.setWarehouseOrderType(salesShippingInform.getWarehouseOrderType()); |
|
|
shippingInformation.setWarehouseOrderType(salesShippingInform.getWarehouseOrderType()); |
|
|
|
|
|
shippingInformation.setEnterpriseSum(salesShippingInform.getEnterpriseSum()); |
|
|
|
|
|
shippingInformation.setMaterialSum(salesShippingInform.getMaterialSum()); |
|
|
int result = salesShippingInformationMapper.insertSalesShippingInformation(shippingInformation); |
|
|
int result = salesShippingInformationMapper.insertSalesShippingInformation(shippingInformation); |
|
|
if (result<=0){ |
|
|
if (result<=0){ |
|
|
throw new BusinessException("插入销售出货资料单失败"); |
|
|
throw new BusinessException("插入销售出货资料单失败"); |
|
|