Browse Source

[fix] 销售管理

修改导出销售出货箱单模板1接口:新增导出销售出货箱单模板1的同时,新增销售出货资料信息
修改生成出货资料的方法:新增出货模板类型,区分不同的出货模板生成的数据
dev
liuxiaoxu 3 months ago
parent
commit
82a869882d
  1. 24
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java

24
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java

@ -414,9 +414,9 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor
//销售出货单
String shippingInformationType = "2";
String shippingTemplateType = "销售出货单1";
//生成出货资料
insertShippingInformation(outOrderCode,shippingInformationType,salesShippingInform);
insertShippingInformation(outOrderCode,shippingInformationType,shippingTemplateType,salesShippingInform);
List<SysSalesShippingInformDetail> salesShippingInformDetails = shippingInformDetailMapper.selectSysSalesShippingInformDetailByCode(outOrderCode);
@ -498,9 +498,9 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor
//销售出货单
String shippingInformationType = "2";
String shippingTemplateType = "销售出货单2";
//生成出货资料
insertShippingInformation(outOrderCode,shippingInformationType,salesShippingInform);
insertShippingInformation(outOrderCode,shippingInformationType,shippingTemplateType,salesShippingInform);
List<SysSalesShippingInformDetail> salesShippingInformDetails = shippingInformDetailMapper.selectSysSalesShippingInformDetailByCode(outOrderCode);
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
@ -575,8 +575,9 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor
SysSalesShippingInform sysSalesShippingInform = sysSalesShippingInformMapper.selectSysSalesShippingInformByCode(outOrderCode);
String shippingInformationType = "0";
String shippingTemplateType = "销售出货箱单1";
//生成出货资料
insertShippingInformation(outOrderCode,shippingInformationType,sysSalesShippingInform);
insertShippingInformation(outOrderCode,shippingInformationType,shippingTemplateType,sysSalesShippingInform);
String salesOrderCode = sysSalesShippingInform.getSalesOrderCode();
String realFileName = salesOrderCode + "-" + fileName.substring(0, fileName.lastIndexOf(".")) + ".xlsx";
@ -650,8 +651,9 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor
SysSalesShippingInform sysSalesShippingInform = sysSalesShippingInformMapper.selectSysSalesShippingInformByCode(outOrderCode);
String shippingInformationType = "0";
String shippingTemplateType = "销售出货箱单2";
//生成出货资料
insertShippingInformation(outOrderCode,shippingInformationType,sysSalesShippingInform);
insertShippingInformation(outOrderCode,shippingInformationType,shippingTemplateType,sysSalesShippingInform);
String salesOrderCode = sysSalesShippingInform.getSalesOrderCode();
if (StringUtils.isEmpty(salesOrderCode)){
@ -733,6 +735,11 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor
SysSalesShippingInform sysSalesShippingInform = sysSalesShippingInformMapper.selectSysSalesShippingInformByCode(outOrderCode);
String shippingInformationType = "0";
String shippingTemplateType = "销售出货发票1";
//生成出货资料
insertShippingInformation(outOrderCode,shippingInformationType,shippingTemplateType,sysSalesShippingInform);
String salesOrderCode = sysSalesShippingInform.getSalesOrderCode();
SysMakeOrder sysMakeOrder = sysMakeOrderMapper.selectMakeOrderBySaleNo(salesOrderCode);
@ -935,15 +942,16 @@ 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();
SalesShippingInformation shippingInformation = new SalesShippingInformation();
shippingInformation.setOutOrderCode(outOrderCode);
shippingInformation.setSalesOrderCode(salesShippingInform.getSalesOrderCode());
shippingInformation.setShippingInformationType(shippingInformationType);
shippingInformation.setShippingInformationCode(redisCache.generateBillNo("CHZL"));
shippingInformation.setShippingTemplateType("1");
shippingInformation.setShippingTemplateType(shippingTemplateType);
shippingInformation.setCreateBy(loginName);
shippingInformation.setCreateTime(new Date());
shippingInformation.setBusinessMembers(salesShippingInform.getBusinessMembers());

Loading…
Cancel
Save