Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev
王晓迪 2 weeks ago
parent
commit
0feeb1bc21
  1. 10
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AftersalesOutOrderMapper.java
  2. 20
      ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesShippingInformationController.java
  3. 38
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java
  4. 46
      ruoyi-admin/src/main/resources/mapper/aftersales/AftersalesOutOrderMapper.xml
  5. 6
      ruoyi-admin/src/main/resources/mapper/sales/SalesAftersalesNoticeMapper.xml
  6. 13
      ruoyi-admin/src/main/resources/templates/sales/afterSalesNotice/afterSalesNotice.html
  7. 6
      ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html
  8. 10
      ruoyi-admin/src/main/resources/templates/system/salesShippingInform/cancelShipping.html
  9. 9
      ruoyi-admin/src/main/resources/templates/system/salesShippingInform/salesShippingInform.html

10
ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AftersalesOutOrderMapper.java

@ -43,6 +43,16 @@ public interface AftersalesOutOrderMapper
*/ */
public int updateAftersalesOutOrder(AftersalesOutOrder aftersalesOutOrder); public int updateAftersalesOutOrder(AftersalesOutOrder aftersalesOutOrder);
/**
* 通过出库单号修改售后维护设备出库
*
* @param aftersalesOutOrder 售后维护设备出库
* @return 结果
*/
public int updateAftersalesOutOrderByOutOrderCode(AftersalesOutOrder aftersalesOutOrder);
/** /**
* 删除售后维护设备出库 * 删除售后维护设备出库
* *

20
ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesShippingInformationController.java

@ -50,8 +50,26 @@ public class SalesShippingInformationController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 导出所有销售出货资料列表
*/
@RequiresPermissions("sales:salesShippingInformation:export")
@Log(title = "销售出货资料", businessType = BusinessType.EXPORT)
@PostMapping("/exportAll")
@ResponseBody
public AjaxResult exportAll(SalesShippingInformation salesShippingInformation)
{
List<SalesShippingInformation> list = salesShippingInformationService.selectSalesShippingInformationList(salesShippingInformation);
ExcelUtil<SalesShippingInformation> util = new ExcelUtil<SalesShippingInformation>(SalesShippingInformation.class);
return util.exportExcel(list, "销售出货资料数据");
}
/** /**
* 导出销售出货资料列表 * 导出选择销售出货资料列表
*/ */
@RequiresPermissions("sales:salesShippingInformation:export") @RequiresPermissions("sales:salesShippingInformation:export")
@Log(title = "销售出货资料", businessType = BusinessType.EXPORT) @Log(title = "销售出货资料", businessType = BusinessType.EXPORT)

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

@ -14,7 +14,9 @@ import com.alibaba.excel.util.MapUtils;
import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.excel.write.metadata.fill.FillConfig; import com.alibaba.excel.write.metadata.fill.FillConfig;
import com.ruoyi.aftersales.domain.AfterSalesShippingDevice; import com.ruoyi.aftersales.domain.AfterSalesShippingDevice;
import com.ruoyi.aftersales.domain.AftersalesOutOrder;
import com.ruoyi.aftersales.mapper.AfterSalesShippingDeviceMapper; import com.ruoyi.aftersales.mapper.AfterSalesShippingDeviceMapper;
import com.ruoyi.aftersales.mapper.AftersalesOutOrderMapper;
import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.exception.BusinessException; import com.ruoyi.common.exception.BusinessException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
@ -79,6 +81,9 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor
private SalesShippingInformationMapper salesShippingInformationMapper; private SalesShippingInformationMapper salesShippingInformationMapper;
@Autowired
private AftersalesOutOrderMapper aftersalesOutOrderMapper;
/** /**
* 查询销售出货通知 * 查询销售出货通知
@ -325,18 +330,31 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor
warehouseOutOrder.setUpdateBy(loginName); warehouseOutOrder.setUpdateBy(loginName);
warehouseOutOrder.setUpdateTime(new Date()); warehouseOutOrder.setUpdateTime(new Date());
//更新售后维护设备出库单数据
AftersalesOutOrder aftersalesOutOrder = new AftersalesOutOrder();
aftersalesOutOrder.setOutOrderCode(outOrderCode);
//设置出库状态为 待设备维护2
aftersalesOutOrder.setWarehouseOutStatus("3");
aftersalesOutOrder.setUpdateBy(loginName);
aftersalesOutOrder.setUpdateTime(new Date());
int updateAftersalesOutOrderResult = aftersalesOutOrderMapper.updateAftersalesOutOrderByOutOrderCode(aftersalesOutOrder);
if (updateAftersalesOutOrderResult <= 0){
throw new BusinessException("更新售后出库单数据失败");
}
//更新销售订单的出货状态 //更新销售订单的出货状态
// SysSalesShippingInform tempShippingInform = sysSalesShippingInformMapper.selectSysSalesShippingInformByCode(outOrderCode); // SysSalesShippingInform tempShippingInform = sysSalesShippingInformMapper.selectSysSalesShippingInformByCode(outOrderCode);
SysSalesOrder sysSalesOrder = new SysSalesOrder(); // SysSalesOrder sysSalesOrder = new SysSalesOrder();
sysSalesOrder.setUpdateBy(loginName); // sysSalesOrder.setUpdateBy(loginName);
sysSalesOrder.setUpdateTime(new Date()); // sysSalesOrder.setUpdateTime(new Date());
sysSalesOrder.setSalesOrderCode(warehouseOutOrder.getSalesOrderCode()); // sysSalesOrder.setSalesOrderCode(warehouseOutOrder.getSalesOrderCode());
//暂收设置为全部出货 // //暂收设置为全部出货
sysSalesOrder.setDeliveryStatus("6"); // sysSalesOrder.setDeliveryStatus("6");
int updateSysSalesOrderResult = sysSalesOrderMapper.updateSysSalesOrderBySalesOrderCode(sysSalesOrder); // int updateSysSalesOrderResult = sysSalesOrderMapper.updateSysSalesOrderBySalesOrderCode(sysSalesOrder);
if (updateSysSalesOrderResult <= 0){ // if (updateSysSalesOrderResult <= 0){
throw new BusinessException("更新销售订单数据失败"); // throw new BusinessException("更新销售订单数据失败");
} // }
int updateWarehouseOutOrderResult = warehouseOutOrderMapper.updateWarehouseOutOrder(warehouseOutOrder); int updateWarehouseOutOrderResult = warehouseOutOrderMapper.updateWarehouseOutOrder(warehouseOutOrder);
if (updateWarehouseOutOrderResult <= 0){ if (updateWarehouseOutOrderResult <= 0){

46
ruoyi-admin/src/main/resources/mapper/aftersales/AftersalesOutOrderMapper.xml

@ -190,6 +190,52 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where out_order_id = #{outOrderId} where out_order_id = #{outOrderId}
</update> </update>
<update id="updateAftersalesOutOrderByOutOrderCode" parameterType="AftersalesOutOrder">
update aftersales_out_order
<trim prefix="SET" suffixOverrides=",">
<if test="outOrderCode != null">out_order_code = #{outOrderCode},</if>
<if test="makeNo != null">make_no = #{makeNo},</if>
<if test="warehouseOutStatus != null">warehouse_out_status = #{warehouseOutStatus},</if>
<if test="relatedOrderCode != null">related_order_code = #{relatedOrderCode},</if>
<if test="salesOrderCode != null">sales_order_code = #{salesOrderCode},</if>
<if test="warehouseOrderType != null">warehouse_order_type = #{warehouseOrderType},</if>
<if test="outMakeCode != null">out_make_code = #{outMakeCode},</if>
<if test="requisitioningCode != null">requisitioning_code = #{requisitioningCode},</if>
<if test="warehouseOutType != null">warehouse_out_type = #{warehouseOutType},</if>
<if test="businessName != null">business_name = #{businessName},</if>
<if test="aftersalesName != null">aftersales_name = #{aftersalesName},</if>
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if>
<if test="shippingDeviceId != null">shipping_device_id = #{shippingDeviceId},</if>
<if test="materialNo != null">material_no = #{materialNo},</if>
<if test="materialName != null">material_name = #{materialName},</if>
<if test="materialSum != null">material_sum = #{materialSum},</if>
<if test="enterpriseSum != null">enterprise_sum = #{enterpriseSum},</if>
<if test="outOrderSum != null">out_order_sum = #{outOrderSum},</if>
<if test="outOrderName != null">out_order_name = #{outOrderName},</if>
<if test="outOrderTime != null">out_order_time = #{outOrderTime},</if>
<if test="supplierCode != null">supplier_code = #{supplierCode},</if>
<if test="supplierName != null">supplier_name = #{supplierName},</if>
<if test="customerId != null">customer_id = #{customerId},</if>
<if test="customerName != null">customer_name = #{customerName},</if>
<if test="planDeliveryTime != null">plan_delivery_time = #{planDeliveryTime},</if>
<if test="deliveryDate != null">delivery_date = #{deliveryDate},</if>
<if test="deliveryCondition != null">delivery_condition = #{deliveryCondition},</if>
<if test="applyName != null">apply_name = #{applyName},</if>
<if test="deliveryAddress != null">delivery_address = #{deliveryAddress},</if>
<if test="deliveryName != null">delivery_name = #{deliveryName},</if>
<if test="deliveryNumber != null">delivery_number = #{deliveryNumber},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where out_order_code = #{outOrderCode}
</update>
<delete id="deleteAftersalesOutOrderById" parameterType="Long"> <delete id="deleteAftersalesOutOrderById" parameterType="Long">
delete from aftersales_out_order where out_order_id = #{outOrderId} delete from aftersales_out_order where out_order_id = #{outOrderId}
</delete> </delete>

6
ruoyi-admin/src/main/resources/mapper/sales/SalesAftersalesNoticeMapper.xml

@ -45,14 +45,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSalesAftersalesNoticeList" parameterType="SalesAftersalesNoticeVO" resultMap="SalesAftersalesNoticeResult"> <select id="selectSalesAftersalesNoticeList" parameterType="SalesAftersalesNoticeVO" resultMap="SalesAftersalesNoticeResult">
<include refid="selectSalesAftersalesNoticeVo"/> <include refid="selectSalesAftersalesNoticeVo"/>
<where> <where>
<if test="aftersalesNoticeCode != null and aftersalesNoticeCode != ''"> and aftersales_notice_code = #{aftersalesNoticeCode}</if> <if test="aftersalesNoticeCode != null and aftersalesNoticeCode != ''"> and aftersales_notice_code like concat('%', #{aftersalesNoticeCode}, '%')</if>
<if test="salesOrderCode != null and salesOrderCode != ''"> and sales_order_code = #{salesOrderCode}</if> <if test="salesOrderCode != null and salesOrderCode != ''"> and sales_order_code like concat('%', #{salesOrderCode}, '%')</if>
<if test="userId != null "> and user_id = #{userId}</if> <if test="userId != null "> and user_id = #{userId}</if>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if> <if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if>
<if test="aftersalesStatus != null and aftersalesStatus != ''"> and aftersales_status = #{aftersalesStatus}</if> <if test="aftersalesStatus != null and aftersalesStatus != ''"> and aftersales_status = #{aftersalesStatus}</if>
<if test="businessMembers != null and businessMembers != ''"> and business_members like concat('%', #{businessMembers}, '%')</if> <if test="businessMembers != null and businessMembers != ''"> and business_members like concat('%', #{businessMembers}, '%')</if>
<if test="aftersalesMembers != null and aftersalesMembers != ''"> and aftersales_members like concat('%', #{aftersalesMembers}, '%')</if> <if test="aftersalesMembers != null and aftersalesMembers != ''"> and aftersales_members like concat('%', #{aftersalesMembers}, '%')</if>
<if test="enterpriseCode != null and enterpriseCode != ''"> and enterprise_code = #{enterpriseCode}</if> <if test="enterpriseCode != null and enterpriseCode != ''"> and enterprise_code like concat('%', #{enterpriseCode}, '%')</if>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if> <if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="params.beginUpdateTime != null and params.beginUpdateTime != '' and params.endUpdateTime != null and params.endUpdateTime != ''"> and update_time between #{params.beginUpdateTime} and #{params.endUpdateTime}</if> <if test="params.beginUpdateTime != null and params.beginUpdateTime != '' and params.endUpdateTime != null and params.endUpdateTime != ''"> and update_time between #{params.beginUpdateTime} and #{params.endUpdateTime}</if>
</where> </where>

13
ruoyi-admin/src/main/resources/templates/sales/afterSalesNotice/afterSalesNotice.html

@ -22,7 +22,7 @@
</select> </select>
</li> </li>
<li> <li>
<label>关联单号:</label> <label>关联销售单号:</label>
<input type="text" name="salesOrderCode"/> <input type="text" name="salesOrderCode"/>
</li> </li>
<li> <li>
@ -261,17 +261,18 @@
var todoUserIdList = row.todoUserId.split(","); var todoUserIdList = row.todoUserId.split(",");
if(todoUserIdList.includes(loginName) || loginName == 'admin'){ if(todoUserIdList.includes(loginName) || loginName == 'admin'){
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批'; var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批';
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> '); actions.push('<a href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> ');
} }
} }
// 审批历史 // 审批历史
actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> '); actions.push('<a href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> ');
// 进度查看 // 进度查看
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> '); actions.push('<a href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> ');
} }
// 详情 // 详情
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="detail(\'' + row.aftersalesNoticeCode + '\')"><i class="fa fa-edit"></i>详情</a> '); actions.push('<a href="javascript:void(0)" onclick="detail(\'' + row.aftersalesNoticeCode + '\')"><i class="fa fa-edit"></i>详情</a> ');
return actions.join(''); var actionLinks = actions.join('');
return $.table.dropdownToggle(actionLinks);
} }
}] }]
}; };

6
ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html

@ -211,9 +211,9 @@
actions.push('<a href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.requisitioningId + '\')"><i class="fa fa-remove"></i> 作废</a>'); actions.push('<a href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.requisitioningId + '\')"><i class="fa fa-remove"></i> 作废</a>');
// 已作废 // 已作废
} }
else{ // else{
actions.push('<a href="javascript:void(0)" disabled><i class="fa fa-edit"></i> 编辑</a> '); // actions.push('<a href="javascript:void(0)" disabled><i class="fa fa-edit"></i> 编辑</a> ');
} // }
// if(row.auditStatus == "2" && row.useStatus == "1"){ // if(row.auditStatus == "2" && row.useStatus == "1"){
// // 编辑 // // 编辑
// actions.push('<a href="javascript:void(0)" onclick="$.operate.edit(\'' + row.requisitioningId + '\')"><i class="fa fa-edit"></i> 编辑</a> '); // actions.push('<a href="javascript:void(0)" onclick="$.operate.edit(\'' + row.requisitioningId + '\')"><i class="fa fa-edit"></i> 编辑</a> ');

10
ruoyi-admin/src/main/resources/templates/system/salesShippingInform/cancelShipping.html

@ -6,12 +6,12 @@
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-cancelShipping-add"> <form class="form-horizontal" id="form-cancelShipping-edit" th:object="${sysSalesShippingInform}">
<input name="outOrderCode" th:field="*{outOrderCode}" type="hidden"> <input name="outOrderCode" th:field="*{outOrderCode}" type="hidden">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">备注:</label> <label class="col-sm-3 control-label is-required">备注:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<textarea name="remark" class="form-control"></textarea> <textarea name="remark" th:text="*{remark}" class="form-control" required></textarea>
</div> </div>
</div> </div>
</form> </form>
@ -20,13 +20,13 @@
<th:block th:include="include :: datetimepicker-js" /> <th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "system/salesShippingInform" var prefix = ctx + "system/salesShippingInform"
$("#form-cancelShipping-add").validate({ $("#form-cancelShipping-edit").validate({
focusCleanup: true focusCleanup: true
}); });
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
$.operate.save(prefix + "/cancelShipping", $('#form-cancelShipping-add').serialize()); $.operate.save(prefix + "/cancelShipping", $('#form-cancelShipping-edit').serialize());
} }
} }

9
ruoyi-admin/src/main/resources/templates/system/salesShippingInform/salesShippingInform.html

@ -94,6 +94,7 @@
var cancelFlag = [[${@permission.hasPermi('system:salesShippingInform:cancel')}]]; var cancelFlag = [[${@permission.hasPermi('system:salesShippingInform:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('system:salesShippingInform:restore')}]]; var restoreFlag = [[${@permission.hasPermi('system:salesShippingInform:restore')}]];
var confirmShippingFlag = [[${@permission.hasPermi('system:salesShippingInform:confirmShipping')}]]; var confirmShippingFlag = [[${@permission.hasPermi('system:salesShippingInform:confirmShipping')}]];
var cancelShippingFlag = [[${@permission.hasPermi('system:salesShippingInform:cancelShipping')}]];
var customerCheckGoodsFlag = [[${@permission.hasPermi('system:salesShippingInform:customerCheckGoods')}]]; var customerCheckGoodsFlag = [[${@permission.hasPermi('system:salesShippingInform:customerCheckGoods')}]];
var customerCheckGoodsDetailFlag = [[${@permission.hasPermi('system:salesShippingInform:customerCheckGoodsDetail')}]]; var customerCheckGoodsDetailFlag = [[${@permission.hasPermi('system:salesShippingInform:customerCheckGoodsDetail')}]];
@ -316,6 +317,7 @@
actions.push('<a class="btn btn-success btn-xs ' + customerCheckGoodsDetailFlag + '" href="javascript:void(0)" onclick="customerCheckGoodsDetail(\'' + row.shippingInformId + '\')"><i class="fa fa-edit"></i>详情</a> '); actions.push('<a class="btn btn-success btn-xs ' + customerCheckGoodsDetailFlag + '" href="javascript:void(0)" onclick="customerCheckGoodsDetail(\'' + row.shippingInformId + '\')"><i class="fa fa-edit"></i>详情</a> ');
if(row.warehouseOutStatus == '2'){ if(row.warehouseOutStatus == '2'){
actions.push('<a class="btn btn-success btn-xs ' + confirmShippingFlag + '" href="javascript:void(0)" onclick="confirmShipping(\'' + row.shippingInformId + '\')"><i class="fa fa-edit"></i>确认发货</a> '); actions.push('<a class="btn btn-success btn-xs ' + confirmShippingFlag + '" href="javascript:void(0)" onclick="confirmShipping(\'' + row.shippingInformId + '\')"><i class="fa fa-edit"></i>确认发货</a> ');
actions.push('<a class="btn btn-success btn-xs ' + cancelShippingFlag + '" href="javascript:void(0)" onclick="cancelShipping(\'' + row.shippingInformId + '\')"><i class="fa fa-edit"></i>取消发货</a> ');
} }
if(row.warehouseOutStatus == '10' || row.warehouseOutStatus == '11'){ if(row.warehouseOutStatus == '10' || row.warehouseOutStatus == '11'){
actions.push('<a class="btn btn-success btn-xs ' + customerCheckGoodsFlag + '" href="javascript:void(0)" onclick="customerCheckGoods(\'' + row.shippingInformId + '\')"><i class="fa fa-edit"></i>确认验收</a> '); actions.push('<a class="btn btn-success btn-xs ' + customerCheckGoodsFlag + '" href="javascript:void(0)" onclick="customerCheckGoods(\'' + row.shippingInformId + '\')"><i class="fa fa-edit"></i>确认验收</a> ');
@ -338,6 +340,13 @@
$.modal.open("确认发货",url); $.modal.open("确认发货",url);
} }
//取消发货
function cancelShipping(shippingInformId){
var url = prefix +'/cancelShipping/' + shippingInformId;
$.modal.open("取消发货",url);
}
//客户验收 //客户验收
function customerCheckGoods(shippingInformId){ function customerCheckGoods(shippingInformId){
var url = prefix +'/customerCheckGoods/' + shippingInformId; var url = prefix +'/customerCheckGoods/' + shippingInformId;

Loading…
Cancel
Save