Browse Source

[fix] 销售管理

修改销售出货资料列表页面,按照prd布局
去掉销售出货资料实体类多余的发货日期和客户订单号字段
去掉销售出货资料mapper.xml多余的发货日期和客户订单号字段
销售出货通知实现类,新增插入销售出货资料方法;
修改导出销售出货模板1接口:新增导出销售出货模板一的同时,新增销售出货资料信息
dev
liuxiaoxu 3 months ago
parent
commit
c1ae55e533
  1. 24
      ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesShippingInformation.java
  2. 51
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java
  3. 10
      ruoyi-admin/src/main/resources/mapper/sales/SalesShippingInformationMapper.xml
  4. 33
      ruoyi-admin/src/main/resources/templates/sales/salesShippingInformation/salesShippingInformation.html

24
ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesShippingInformation.java

@ -65,11 +65,6 @@ public class SalesShippingInformation extends BaseEntity
@Excel(name = "客户订单号")
private String salesOrderNumber;
/** 发货日期 */
private String deliveryDate;
/** 客户订单号 */
private String customerNumber;
/** 物料合计 */
@Excel(name = "物料合计")
@ -250,24 +245,7 @@ public class SalesShippingInformation extends BaseEntity
{
return salesOrderNumber;
}
public void setDeliveryDate(String deliveryDate)
{
this.deliveryDate = deliveryDate;
}
public String getDeliveryDate()
{
return deliveryDate;
}
public void setCustomerNumber(String customerNumber)
{
this.customerNumber = customerNumber;
}
public String getCustomerNumber()
{
return customerNumber;
}
public void setMaterialSum(Long materialSum)
{
this.materialSum = materialSum;
@ -437,8 +415,6 @@ public class SalesShippingInformation extends BaseEntity
.append("customerId", getCustomerId())
.append("customerName", getCustomerName())
.append("salesOrderNumber", getSalesOrderNumber())
.append("deliveryDate", getDeliveryDate())
.append("customerNumber", getCustomerNumber())
.append("materialSum", getMaterialSum())
.append("enterpriseSum", getEnterpriseSum())
.append("allPriceExcludingTaxRmb", getAllPriceExcludingTaxRmb())

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

@ -20,6 +20,8 @@ import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.file.FileDownloadUtils;
import com.ruoyi.sales.domain.SalesShippingInformation;
import com.ruoyi.sales.mapper.SalesShippingInformationMapper;
import com.ruoyi.system.domain.*;
import com.ruoyi.system.dto.ExportShippingInformOrderDto;
import com.ruoyi.system.dto.ExportShippingInvoiceDto;
@ -71,6 +73,12 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor
@Autowired
private AfterSalesShippingDeviceMapper salesShippingDeviceMapper;
@Autowired
private SalesShippingInformationMapper salesShippingInformationMapper;
/**
* 查询销售出货通知
*
@ -392,12 +400,18 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor
String fileName = "销售出货单1.xlsx";
FileDownloadUtils fileDownloadUtils = new FileDownloadUtils();
String loginName = ShiroUtils.getLoginName();
try {
String fileAbsolutePath = fileDownloadUtils.getFileRelativePath(fileName);
SysSalesShippingInform salesShippingInform = sysSalesShippingInformMapper.selectSysSalesShippingInformByCode(outOrderCode);
//生成出货资料
insertShippingInformation(outOrderCode, loginName, salesShippingInform);
List<SysSalesShippingInformDetail> salesShippingInformDetails = shippingInformDetailMapper.selectSysSalesShippingInformDetailByCode(outOrderCode);
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
String deliverTime = dateFormat.format(salesShippingInform.getDeliverTime());
@ -453,6 +467,43 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor
}
private void insertShippingInformation(String outOrderCode, String loginName, SysSalesShippingInform salesShippingInform) {
SalesShippingInformation shippingInformation = new SalesShippingInformation();
shippingInformation.setOutOrderCode(outOrderCode);
shippingInformation.setSalesOrderCode(salesShippingInform.getSalesOrderCode());
//销售出货单
shippingInformation.setShippingInformationType("2");
shippingInformation.setShippingInformationCode(redisCache.generateBillNo("CHZL"));
shippingInformation.setShippingTemplateType("1");
shippingInformation.setCreateBy(loginName);
shippingInformation.setCreateTime(new Date());
shippingInformation.setBusinessMembers(salesShippingInform.getBusinessMembers());
shippingInformation.setCustomerId(salesShippingInform.getCustomerId());
shippingInformation.setAcceptanceTime(salesShippingInform.getAcceptanceTime());
shippingInformation.setAllPriceExcludingTaxRmb(salesShippingInform.getAllPriceExcludingTaxRmb());
shippingInformation.setAllPriceExcludingTaxDollar(salesShippingInform.getAllPriceExcludingTaxDollar());
shippingInformation.setAllPriceIncludesTax(salesShippingInform.getAllPriceIncludesTax());
shippingInformation.setCustomerName(salesShippingInform.getCustomerName());
shippingInformation.setCustomerContact(salesShippingInform.getCustomerContact());
shippingInformation.setCustomerContactAddress(salesShippingInform.getCustomerContactAddress());
shippingInformation.setCustomerContactBillto(salesShippingInform.getCustomerContactBillto());
shippingInformation.setContactNumber(salesShippingInform.getContactNumber());
shippingInformation.setContactNumberBillto(salesShippingInform.getContactNumberBillto());
shippingInformation.setContactAddressBillto(salesShippingInform.getContactAddressBillto());
shippingInformation.setDeliveryCondition(salesShippingInform.getDeliveryCondition());
shippingInformation.setDeliverTime(salesShippingInform.getDeliverTime());
shippingInformation.setPaymentCondition(salesShippingInform.getPaymentCondition());
shippingInformation.setPlannedDeliveryTime(salesShippingInform.getPlannedDeliveryTime());
shippingInformation.setRemark(salesShippingInform.getRemark());
shippingInformation.setWarehouseOutType(salesShippingInform.getWarehouseOutType());
shippingInformation.setWarehouseOrderType(salesShippingInform.getWarehouseOrderType());
int result = salesShippingInformationMapper.insertSalesShippingInformation(shippingInformation);
if (result<=0){
throw new BusinessException("插入销售出货资料单失败");
}
}
/**
* 导出出货单2模板

10
ruoyi-admin/src/main/resources/mapper/sales/SalesShippingInformationMapper.xml

@ -17,8 +17,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="customerId" column="customer_id" />
<result property="customerName" column="customer_name" />
<result property="salesOrderNumber" column="sales_order_number" />
<result property="deliveryDate" column="delivery_date" />
<result property="customerNumber" column="customer_number" />
<result property="materialSum" column="material_sum" />
<result property="enterpriseSum" column="enterprise_sum" />
<result property="allPriceExcludingTaxRmb" column="all_price_excluding_tax_rmb" />
@ -43,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectSalesShippingInformationVo">
select shipping_information_id, shipping_information_code, sales_order_code, out_order_code, shipping_information_type, shipping_template_type, warehouse_order_type, warehouse_out_type, business_members, customer_id, customer_name, sales_order_number, delivery_date, customer_number, material_sum, enterprise_sum, all_price_excluding_tax_rmb, all_price_excluding_tax_dollar, all_price_includes_tax, planned_delivery_time, acceptance_time, payment_condition, delivery_condition, deliver_time, customer_contact, contact_number, customer_contact_address, customer_contact_billto, contact_number_billto, contact_address_billto, remarks, create_time, create_by, update_by, update_time from sales_shipping_information
select shipping_information_id, shipping_information_code, sales_order_code, out_order_code, shipping_information_type, shipping_template_type, warehouse_order_type, warehouse_out_type, business_members, customer_id, customer_name, sales_order_number, material_sum, enterprise_sum, all_price_excluding_tax_rmb, all_price_excluding_tax_dollar, all_price_includes_tax, planned_delivery_time, acceptance_time, payment_condition, delivery_condition, deliver_time, customer_contact, contact_number, customer_contact_address, customer_contact_billto, contact_number_billto, contact_address_billto, remarks, create_time, create_by, update_by, update_time from sales_shipping_information
</sql>
<select id="selectSalesShippingInformationList" parameterType="SalesShippingInformation" resultMap="SalesShippingInformationResult">
@ -79,8 +77,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerId != null">customer_id,</if>
<if test="customerName != null">customer_name,</if>
<if test="salesOrderNumber != null">sales_order_number,</if>
<if test="deliveryDate != null">delivery_date,</if>
<if test="customerNumber != null">customer_number,</if>
<if test="materialSum != null">material_sum,</if>
<if test="enterpriseSum != null">enterprise_sum,</if>
<if test="allPriceExcludingTaxRmb != null">all_price_excluding_tax_rmb,</if>
@ -115,8 +111,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerId != null">#{customerId},</if>
<if test="customerName != null">#{customerName},</if>
<if test="salesOrderNumber != null">#{salesOrderNumber},</if>
<if test="deliveryDate != null">#{deliveryDate},</if>
<if test="customerNumber != null">#{customerNumber},</if>
<if test="materialSum != null">#{materialSum},</if>
<if test="enterpriseSum != null">#{enterpriseSum},</if>
<if test="allPriceExcludingTaxRmb != null">#{allPriceExcludingTaxRmb},</if>
@ -155,8 +149,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerId != null">customer_id = #{customerId},</if>
<if test="customerName != null">customer_name = #{customerName},</if>
<if test="salesOrderNumber != null">sales_order_number = #{salesOrderNumber},</if>
<if test="deliveryDate != null">delivery_date = #{deliveryDate},</if>
<if test="customerNumber != null">customer_number = #{customerNumber},</if>
<if test="materialSum != null">material_sum = #{materialSum},</if>
<if test="enterpriseSum != null">enterprise_sum = #{enterpriseSum},</if>
<if test="allPriceExcludingTaxRmb != null">all_price_excluding_tax_rmb = #{allPriceExcludingTaxRmb},</if>

33
ruoyi-admin/src/main/resources/templates/sales/salesShippingInformation/salesShippingInformation.html

@ -23,7 +23,7 @@
<input type="text" name="outOrderCode"/>
</li>
<li>
<label>出货资料类型(0出货箱单、1出货发票、2销售出货单)</label>
<label>出货资料类型:</label>
<select name="shippingInformationType" th:with="type=${@dict.getType('shipping_information_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
@ -63,15 +63,6 @@
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="sales:salesShippingInformation:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="sales:salesShippingInformation:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="sales:salesShippingInformation:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="sales:salesShippingInformation:export">
<i class="fa fa-download"></i> 导出
</a>
@ -95,11 +86,6 @@
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
modalName: "销售出货资料",
columns: [{
@ -123,7 +109,7 @@
field: 'outOrderCode',
},
{
title: '出货资料类型(0出货箱单、1出货发票、2销售出货单)',
title: '出货资料类型',
field: 'shippingInformationType',
formatter: function(value, row, index) {
return $.table.selectDictLabel(shippingInformationTypeDatas, value);
@ -246,21 +232,6 @@
{
title: '上次更新时间',
field: 'updateTime',
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.shippingInformationId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.shippingInformationId + '\')"><i class="fa fa-remove"></i>删除</a> ');
if(row.delFlag == '0'){
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> ');
}else{
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> ');
}
return actions.join('');
}
}]
};
$.table.init(options);

Loading…
Cancel
Save