Merge remote-tracking branch 'gitee/0.8.X' into 0.8.X
This commit is contained in:
@@ -107,5 +107,7 @@ public class CrmOrderVo {
|
|||||||
@ExcelProperty(value = "备注")
|
@ExcelProperty(value = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
//联查客户名称
|
||||||
|
private String customerName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
package com.klp.crm.mapper;
|
package com.klp.crm.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.klp.crm.domain.CrmOrder;
|
import com.klp.crm.domain.CrmOrder;
|
||||||
import com.klp.crm.domain.vo.CrmOrderVo;
|
import com.klp.crm.domain.vo.CrmOrderVo;
|
||||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 正式订单主Mapper接口
|
* 正式订单主Mapper接口
|
||||||
@@ -12,4 +15,5 @@ import com.klp.common.core.mapper.BaseMapperPlus;
|
|||||||
*/
|
*/
|
||||||
public interface CrmOrderMapper extends BaseMapperPlus<CrmOrderMapper, CrmOrder, CrmOrderVo> {
|
public interface CrmOrderMapper extends BaseMapperPlus<CrmOrderMapper, CrmOrder, CrmOrderVo> {
|
||||||
|
|
||||||
|
Page<CrmOrderVo> selectVoPagePlus(Page<Object> build,@Param("ew") QueryWrapper<CrmOrder> lqw);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.klp.crm.service.impl;
|
package com.klp.crm.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.klp.common.core.page.TableDataInfo;
|
import com.klp.common.core.page.TableDataInfo;
|
||||||
import com.klp.common.core.domain.PageQuery;
|
import com.klp.common.core.domain.PageQuery;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -44,11 +45,32 @@ public class CrmOrderServiceImpl implements ICrmOrderService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<CrmOrderVo> queryPageList(CrmOrderBo bo, PageQuery pageQuery) {
|
public TableDataInfo<CrmOrderVo> queryPageList(CrmOrderBo bo, PageQuery pageQuery) {
|
||||||
LambdaQueryWrapper<CrmOrder> lqw = buildQueryWrapper(bo);
|
QueryWrapper<CrmOrder> lqw = buildQueryWrapperPlus(bo);
|
||||||
Page<CrmOrderVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
Page<CrmOrderVo> result = baseMapper.selectVoPagePlus(pageQuery.build(), lqw);
|
||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private QueryWrapper<CrmOrder> buildQueryWrapperPlus(CrmOrderBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
QueryWrapper<CrmOrder> qw = Wrappers.query();
|
||||||
|
qw.eq(StringUtils.isNotBlank(bo.getOrderCode()), "co.order_code", bo.getOrderCode());
|
||||||
|
qw.eq(bo.getOrderType() != null, "co.order_type", bo.getOrderType());
|
||||||
|
qw.eq(StringUtils.isNotBlank(bo.getCustomerId()), "co.customer_id", bo.getCustomerId());
|
||||||
|
qw.eq(bo.getOrderAmount() != null, "co.order_amount", bo.getOrderAmount());
|
||||||
|
qw.eq(StringUtils.isNotBlank(bo.getSalesman()), "co.salesman", bo.getSalesman());
|
||||||
|
qw.eq(bo.getDeliveryDate() != null, "co.delivery_date", bo.getDeliveryDate());
|
||||||
|
qw.eq(bo.getPreOrderStatus() != null, "co.pre_order_status", bo.getPreOrderStatus());
|
||||||
|
qw.eq(StringUtils.isNotBlank(bo.getAuditUser()), "co.audit_user", bo.getAuditUser());
|
||||||
|
qw.eq(bo.getAuditTime() != null, "co.audit_time", bo.getAuditTime());
|
||||||
|
qw.eq(bo.getOrderStatus() != null, "co.order_status", bo.getOrderStatus());
|
||||||
|
qw.eq(bo.getFinanceStatus() != null, "co.finance_status", bo.getFinanceStatus());
|
||||||
|
qw.eq(bo.getUnpaidAmount() != null, "co.unpaid_amount", bo.getUnpaidAmount());
|
||||||
|
//逻辑删除
|
||||||
|
qw.eq("co.del_flag", 0);
|
||||||
|
qw.orderByDesc("co.create_time");
|
||||||
|
return qw;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询正式订单主列表
|
* 查询正式订单主列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -25,6 +25,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="updateTime" column="update_time"/>
|
<result property="updateTime" column="update_time"/>
|
||||||
<result property="delFlag" column="del_flag"/>
|
<result property="delFlag" column="del_flag"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
<select id="selectVoPagePlus" resultType="com.klp.crm.domain.vo.CrmOrderVo">
|
||||||
|
SELECT
|
||||||
|
order_id AS orderId,
|
||||||
|
order_code AS orderCode,
|
||||||
|
order_type AS orderType,
|
||||||
|
customer_id AS customerId,
|
||||||
|
order_amount AS orderAmount,
|
||||||
|
salesman,
|
||||||
|
delivery_date AS deliveryDate,
|
||||||
|
pre_order_status AS preOrderStatus,
|
||||||
|
audit_user AS auditUser,
|
||||||
|
audit_time AS auditTime,
|
||||||
|
order_status AS orderStatus,
|
||||||
|
finance_status AS financeStatus,
|
||||||
|
unpaid_amount AS unpaidAmount,
|
||||||
|
remark,
|
||||||
|
create_by AS createBy,
|
||||||
|
create_time AS createTime,
|
||||||
|
update_by AS updateBy,
|
||||||
|
update_time AS updateTime,
|
||||||
|
cu.customer_name AS customerName
|
||||||
|
FROM crm_order co
|
||||||
|
LEFT JOIN crm_customer cu ON co.customer_id = cu.customer_id
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -86,9 +86,11 @@
|
|||||||
<el-table-column label="操作">
|
<el-table-column label="操作">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button v-if="scope.row.actionStatus == 0 || scope.row.actionStatus == 1" type="primary"
|
<el-button v-if="scope.row.actionStatus == 0 || scope.row.actionStatus == 1" type="primary"
|
||||||
@click="openReceiptModal(scope.row)">签收</el-button>
|
@click="openReceiptModal(scope.row)" v-loading="buttonLoading">签收</el-button>
|
||||||
<el-button v-if="scope.row.actionStatus == 0 || scope.row.actionStatus == 1" type="danger"
|
<el-button v-if="scope.row.actionStatus == 0 || scope.row.actionStatus == 1" type="danger"
|
||||||
@click="handleReject(scope.row)">拒签</el-button>
|
@click="handleReject(scope.row)" v-loading="buttonLoading">拒签</el-button>
|
||||||
|
<el-button v-if="scope.row.actionStatus == 3" type="warning" v-loading="buttonLoading"
|
||||||
|
@click="handleDelete(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -269,12 +271,15 @@ export default {
|
|||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
this.buttonLoading = true;
|
||||||
updatePendingAction({
|
updatePendingAction({
|
||||||
...row,
|
...row,
|
||||||
actionStatus: 3, // 3表示拒签
|
actionStatus: 3, // 3表示拒签
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.$modal.msgSuccess("拒签成功");
|
this.$modal.msgSuccess("拒签成功");
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}).finally(() => {
|
||||||
|
this.buttonLoading = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -340,9 +345,12 @@ export default {
|
|||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
this.buttonLoading = true;
|
||||||
delPendingAction(row.actionId).then(response => {
|
delPendingAction(row.actionId).then(response => {
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}).finally(() => {
|
||||||
|
this.buttonLoading = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<el-card class="summary-card" v-if="summary">
|
<el-card class="summary-card" v-if="summary">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<span>发货报表汇总</span>
|
<span>收货报表汇总</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<el-descriptions :column="2" border>
|
<el-descriptions :column="2" border>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<el-card class="table-card" v-if="details && details.length > 0">
|
<el-card class="table-card" v-if="details && details.length > 0">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<span>产品发货计划</span>
|
<span>产品收货计划</span>
|
||||||
<span>共 {{ details.length }} 个计划</span>
|
<span>共 {{ details.length }} 个计划</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -158,7 +158,7 @@ export default {
|
|||||||
this.summary = res.data?.summary || null
|
this.summary = res.data?.summary || null
|
||||||
this.details = res.data?.details || []
|
this.details = res.data?.details || []
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取发货报表失败:', error)
|
console.error('获取收货报表失败:', error)
|
||||||
this.$message.error('获取数据失败')
|
this.$message.error('获取数据失败')
|
||||||
this.summary = null
|
this.summary = null
|
||||||
this.details = []
|
this.details = []
|
||||||
|
|||||||
@@ -745,7 +745,11 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
|
|
||||||
// 3. 插入钢卷数据
|
// 3. 插入钢卷数据
|
||||||
WmsMaterialCoil add = BeanUtil.toBean(bo, WmsMaterialCoil.class);
|
WmsMaterialCoil add = BeanUtil.toBean(bo, WmsMaterialCoil.class);
|
||||||
add.setDataType(1); // 新增的钢卷默认为当前数据
|
if(bo.getDataType() == 10){
|
||||||
|
add.setDataType(10);
|
||||||
|
}else {
|
||||||
|
add.setDataType(1); // 新增的钢卷默认为当前数据
|
||||||
|
}
|
||||||
validEntityBeforeSave(add);
|
validEntityBeforeSave(add);
|
||||||
int rows = baseMapper.insert(add);
|
int rows = baseMapper.insert(add);
|
||||||
if (rows <= 0) {
|
if (rows <= 0) {
|
||||||
|
|||||||
@@ -153,6 +153,7 @@
|
|||||||
LEFT JOIN wms_material_coil mc ON mc.coil_id = wcpa.coil_id AND mc.del_flag = 0
|
LEFT JOIN wms_material_coil mc ON mc.coil_id = wcpa.coil_id AND mc.del_flag = 0
|
||||||
WHERE wcpa.del_flag = 0
|
WHERE wcpa.del_flag = 0
|
||||||
AND wcpa.action_type = 401
|
AND wcpa.action_type = 401
|
||||||
|
AND wcpa.action_status = 2
|
||||||
<if test="startTime != null">
|
<if test="startTime != null">
|
||||||
AND wcpa.create_time >= #{startTime}
|
AND wcpa.create_time >= #{startTime}
|
||||||
</if>
|
</if>
|
||||||
@@ -185,6 +186,7 @@
|
|||||||
LEFT JOIN wms_material_coil mc ON mc.coil_id = wcpa.coil_id AND mc.del_flag = 0
|
LEFT JOIN wms_material_coil mc ON mc.coil_id = wcpa.coil_id AND mc.del_flag = 0
|
||||||
WHERE wcpa.del_flag = 0
|
WHERE wcpa.del_flag = 0
|
||||||
AND wcpa.action_type = 401
|
AND wcpa.action_type = 401
|
||||||
|
AND wcpa.action_status = 2
|
||||||
<if test="startTime != null">
|
<if test="startTime != null">
|
||||||
AND wcpa.create_time >= #{startTime}
|
AND wcpa.create_time >= #{startTime}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Reference in New Issue
Block a user