feat(customer): 增加客户所属行业字段并优化相关功能- 在客户信息中添加 BG属性字段

- 根据 BG 属性动态加载行业类型
- 更新项目信息和订单信息,关联客户所属行业
- 优化客户选择界面,支持按 BG 和行业筛选
master
chenhao 2025-07-03 11:13:11 +08:00
parent dc31d20a6c
commit 4a44e1391d
14 changed files with 302 additions and 111 deletions

View File

@ -95,6 +95,9 @@
label {
margin-bottom: 0 !important;
}
[name="bgProperty"], #industryTypeBox select {
pointer-events: none;
}
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -112,19 +115,19 @@
<tr>
<td class="shortTd">BG<span class="is-required">*</span></td>
<td class="shortTd">BG</td>
<td class="inputTd">
<select name="bgProperty" class="form-control" th:with="type=${@dict.getType('bg_type')}"
onchange="changeBg()" required>
onchange="changeBg()" readonly >
<option value="">请选择BG</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</td>
<td class="shortTd">行业<span class="is-required">*</span></td>
<td class="shortTd">行业</td>
<td id="industryTypeBox" class="inputTd">
<select name="industryType" class="form-control"
required>
>
<option value="">请先选择BG</option>
</select>
</td>
@ -446,6 +449,9 @@
$('[name="customerName"]').val(rows[0].customerName);
$('[name="customerUserName"]').val(rows[0].contactPerson);
$('[name="customerPhone"]').val(rows[0].contactPhone);
$('[name="bgProperty"]').val(rows[0].bgProperty);
changeBg()
$('[name="industryType"]').val(rows[0].industryType);
$.modal.close(index);
}
@ -575,7 +581,7 @@
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
})
$('#industryTypeBox').html(`
<select name="industryType" class="form-control" required>
<select name="industryType" readonly class="form-control" required>
<option value="">请选择行业</option>
${str}
</select>
@ -587,7 +593,7 @@
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
})
$('#industryTypeBox').html(`
<select name="industryType" class="form-control" required>
<select name="industryType" class="form-control" readonly required>
<option value="">请选择行业</option>
${str}
</select>

View File

@ -103,6 +103,9 @@
.white-bg{
padding: 0px 50px;
}
[name="bgProperty"], #industryTypeBox select {
pointer-events: none;
}
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -126,20 +129,20 @@
class="form-control"></td>
</tr>
<tr>
<td class="shortTd">BG<span class="is-required">*</span></td>
<td class="shortTd">BG</td>
<td class="inputTd">
<select name="bgProperty" th:field="*{bgProperty}" class="form-control"
th:with="type=${@dict.getType('bg_type')}"
onchange="changeBg()" required>
onchange="changeBg()" readonly >
<option value="">请选择BG</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</td>
<td class="shortTd">行业<span class="is-required">*</span></td>
<td class="shortTd">行业</td>
<td id="industryTypeBox" class="inputTd">
<select name="industryType" th:field="*{industryType}" class="form-control"
required>
<select name="industryType" readonly th:field="*{industryType}" class="form-control"
>
<option value="">请先选择BG</option>
</select>
</td>
@ -510,6 +513,9 @@
$('[name="customerName"]').val(rows[0].customerName);
$('[name="customerUserName"]').val(rows[0].contactPerson);
$('[name="customerPhone"]').val(rows[0].contactPhone);
$('[name="bgProperty"]').val(rows[0].bgProperty);
changeBg()
$('[name="industryType"]').val(rows[0].industryType);
$.modal.close(index);
}
@ -651,7 +657,7 @@
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
})
$('#industryTypeBox').html(`
<select name="industryType" class="form-control" required>
<select name="industryType" class="form-control" readonly required>
<option value="">请选择行业</option>
${str}
</select>
@ -663,7 +669,7 @@
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
})
$('#industryTypeBox').html(`
<select name="industryType" class="form-control" required>
<select name="industryType" class="form-control" readonly required>
<option value="">请选择行业</option>
${str}
</select>

View File

@ -33,14 +33,24 @@
</li>
<li>
<label>所属行业</label>
<select name="industryType" class="form-control"
th:with="type=${@dict.getType('industry_code')}" required>
<option value="">所有</option>
<label>BG</label>
<select name="bgProperty" class="form-control" th:with="type=${@dict.getType('bg_type')}"
onchange="changeBg()" required>
<option value="">请选择BG</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>行业:</label>
<div id="industryTypeBox" style="float: right">
<select name="industryType" class="form-control" required>
<option value="">请先选择BG</option>
</select>
</div>
</li>
<li style="width: 46%;text-align: right;">
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
class="fa fa-search"></i>&nbsp;搜索</a>
@ -62,7 +72,7 @@
</div>
<th:block th:include="include :: footer"/>
<script>
<script th:inline="javascript">
var prefix = ctx + "system/customer";
function openAdd() {
window.localStorage.setItem('layerTable',1)
@ -129,18 +139,23 @@
field: 'contactEmail',
title: '联系邮件'
},
{
field: 'bgProperty',
title: '所属行业',
formatter: (value, row) => {
return $.table.selectDictLabel([[${@dict.getType('bg_type')}]], value);
}
},
{
field: 'industryType',
title: '所属行业',
formatter:(value,row)=>{
const arr=[]
$('[name="industryType"] option').each((index,item)=>{
arr.push({
text:$(item).text(),
value:$(item).val()
})
})
return arr.find((ele)=>ele.value==value)?.text
formatter: (value, row) => {
if (row.bgProperty === 'YYS') {
return $.table.selectDictLabel([[${@dict.getType('bg_yys')}]], value);
} else {
return $.table.selectDictLabel([[${@dict.getType('bg_hysy')}]], value);
}
}
},
{
@ -156,6 +171,41 @@
var rows = $('#bootstrap-table').bootstrapTable('getSelections');
return rows;
}
function changeBg() {
if ($('[name="bgProperty"]').val() == ''){
$('#industryTypeBox').html(` <select name="industryType" class="form-control" required>
<option value="">请选择BG</option>
</select>`)
return
}
if ($('[name="bgProperty"]').val() != 'YYS') {
let datas = [[${@dict.getType('bg_hysy')}]]
let str = ``
datas.forEach((ele) => {
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
})
$('#industryTypeBox').html(`
<select name="industryType" class="form-control" required>
<option value="">请选择行业</option>
${str}
</select>
`)
} else {
let datas = [[${@dict.getType('bg_yys')}]]
let str = ``
datas.forEach((ele) => {
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
})
$('#industryTypeBox').html(`
<select name="industryType" class="form-control" required>
<option value="">请选择行业</option>
${str}
</select>
`)
}
}
</script>
</body>

View File

@ -532,8 +532,8 @@
function searchProject() {
var url = prefix + "/selectProject";
var options = {
title: '选择客户',
width: "680",
title: '选择项目',
width: "800",
url: url,
height: '600',
callBack: doSubmitProject

View File

@ -73,9 +73,9 @@
position: relative;
}
/*[name="bgProperty"], #industryTypeBox select {*/
/* pointer-events: none;*/
/*}*/
[name="bgProperty"], #industryTypeBox select {
pointer-events: none;
}
#projectNameBox {
margin-left: 20px;
@ -136,20 +136,20 @@
required>
</tr>
<tr>
<td>BG<span class="is-required">*</span></td>
<td>BG</td>
<td>
<select name="bgProperty" class="form-control" th:field="*{bgProperty}"
th:with="type=${@dict.getType('bg_type')}" onchange="changeBg()"
required>
<select name="bgProperty" class="form-control" th:field="*{bgProperty}" readonly
th:with="type=${@dict.getType('bg_type')}"
>
<option value="">请选择BG</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</td>
<td>行业<span class="is-required">*</span></td>
<td>行业</td>
<td id="industryTypeBox">
<select name="industryType" class="form-control"
required >
<select name="industryType" class="form-control" readonly
>
<option value="">请先选择BG</option>
</select>
</td>
@ -520,8 +520,8 @@
function searchProject() {
var url = prefix + "/selectProject";
var options = {
title: '选择客户',
width: "680",
title: '选择项目',
width: "800",
url: url,
height: '600',
callBack: doSubmitProject
@ -701,7 +701,7 @@
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
})
$('#industryTypeBox').html(`
<select name="industryType" class="form-control" required>
<select name="industryType" readonly class="form-control" required>
<option value="">请选择行业</option>
${str}
</select>
@ -713,7 +713,7 @@
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
})
$('#industryTypeBox').html(`
<select name="industryType" class="form-control" required >
<select name="industryType" readonly class="form-control" required >
<option value="">请选择行业</option>
${str}
</select>

View File

@ -50,9 +50,7 @@
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
var prefix = ctx + "sip/project";
let bgArr=[[${@dict.getType('bg_type')}]]
let hyArr1=[[${@dict.getType('bg_yys')}]]
let hyArr2=[[${@dict.getType('bg_hsys')}]]
$(function () {
@ -90,8 +88,9 @@
{
field: 'bgProperty',
title: 'BG',
width:80,
formatter:(value,row)=>{
return $.table.selectDictLabel(bgArr, value);
return $.table.selectDictLabel([[${@dict.getType('bg_type')}]], value);
}
},
@ -99,10 +98,11 @@
field: 'industryType',
title: '所属行业',
formatter: function (value, row, index) {
if(row.bgProperty=='YYS'){
return $.table.selectDictLabel(hyArr1, value);
}else{
return $.table.selectDictLabel(hyArr2, value);
if (row.bgProperty === 'YYS') {
return $.table.selectDictLabel([[${@dict.getType('bg_yys')}]], value);
} else {
return $.table.selectDictLabel([[${@dict.getType('bg_hysy')}]], value);
}
}
},

View File

@ -9,16 +9,16 @@
<form class="form-horizontal m" id="form-info-add">
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">客户编码:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label is-required">客户编码:</label>
<div class="col-sm-7">
<input name="customerCode" class="form-control" type="text" required>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">最终客户名称:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label is-required">最终客户名称:</label>
<div class="col-sm-7">
<input name="customerName" required class="form-control" type="text">
</div>
</div>
@ -27,8 +27,8 @@
<div id="element1" class="col-xs-12" style="padding: 0">
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">省:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label is-required">省:</label>
<div class="col-sm-7">
<select name="province" required class="province form-control m-b" data-first-title="选择省">
<option value="">请选择</option>
</select>
@ -37,8 +37,8 @@
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">市:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label is-required">市:</label>
<div class="col-sm-7">
<select name="city" required class="city form-control m-b" data-first-title="选择省">
<option value="">请选择</option>
</select>
@ -48,11 +48,11 @@
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">所属行业</label>
<div class="col-sm-8">
<select name="industryType" class="form-control"
th:with="type=${@dict.getType('industry_code')}" required>
<option value="">请选择</option>
<label class="col-sm-5 control-label is-required">BG</label>
<div class="col-sm-7">
<select name="bgProperty" class="form-control" th:with="type=${@dict.getType('bg_type')}"
onchange="changeBg()" required>
<option value="">请选择BG</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
@ -61,32 +61,56 @@
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label">详细地址:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label is-required">行业:</label>
<div class="col-sm-7">
<select name="industryType" id="industryTypeBox" class="form-control"
required>
<option value="">请先选择BG</option>
</select>
</div>
</div>
</div>
<!-- <div class="col-xs-6">-->
<!-- <div class="form-group">-->
<!-- <label class="col-sm-4 control-label is-required">所属行业:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <select name="industryType" class="form-control"-->
<!-- th:with="type=${@dict.getType('industry_code')}" required>-->
<!-- <option value="">请选择</option>-->
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}"-->
<!-- th:value="${dict.dictValue}"></option>-->
<!-- </select>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-5 control-label">详细地址:</label>
<div class="col-sm-7">
<input name="address" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label">联系人:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label">联系人:</label>
<div class="col-sm-7">
<input name="contactPerson" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label">联系电话:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label">联系电话:</label>
<div class="col-sm-7">
<input name="contactPhone" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label">联系邮件:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label">联系邮件:</label>
<div class="col-sm-7">
<input name="contactEmail" class="form-control" type="text">
</div>
</div>
@ -94,8 +118,8 @@
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label">备注:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label">备注:</label>
<div class="col-sm-7">
<textarea name="remark" class="form-control"></textarea>
</div>
</div>
@ -117,7 +141,39 @@
$.operate.save(prefix + "/add", $('#form-info-add').serialize());
}
}
function changeBg() {
if ($('[name="bgProperty"]').val() == ''){
$('#industryTypeBox').html(`<option value="">请选择BG</option>`)
return
}
if ($('[name="bgProperty"]').val() != 'YYS') {
let datas = [[${@dict.getType('bg_hysy')}]]
let str = ``
datas.forEach((ele) => {
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
})
$('#industryTypeBox').html(`
<select name="industryType" class="form-control" required>
<option value="">请选择行业</option>
${str}
</select>
`)
} else {
let datas = [[${@dict.getType('bg_yys')}]]
let str = ``
datas.forEach((ele) => {
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
})
$('#industryTypeBox').html(`
<select name="industryType" class="form-control" required>
<option value="">请选择行业</option>
${str}
</select>
`)
}
}
var urlChina = '/cnarea/select';
$.cxSelect.defaults.url = urlChina;
// $.cxSelect.defaults.jsonSpace = 'data';

View File

@ -10,16 +10,16 @@
<input name="id" th:field="*{id}" type="hidden">
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">客户编码:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label is-required">客户编码:</label>
<div class="col-sm-7">
<input name="customerCode" th:field="*{customerCode}" class="form-control" type="text" required>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">最终客户名称:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label is-required">最终客户名称:</label>
<div class="col-sm-7">
<input name="customerName" required th:field="*{customerName}" class="form-control" type="text">
</div>
</div>
@ -28,8 +28,8 @@
<div id="element1" class="col-xs-12" style="padding: 0">
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">省:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label is-required">省:</label>
<div class="col-sm-7">
<select name="province" required th:data-value="*{province}" class="province form-control m-b" data-first-title="选择省">
<option value="">请选择</option>
</select>
@ -38,8 +38,8 @@
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">市:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label is-required">市:</label>
<div class="col-sm-7">
<select name="city" required th:data-value="*{city}" class="city form-control m-b" data-first-title="选择省">
<option value="">请选择</option>
</select>
@ -50,42 +50,57 @@
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">所属行业:</label>
<div class="col-sm-8">
<select name="industryType" th:field="*{industryType}" class="form-control" th:with="type=${@dict.getType('industry_code')}" required>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
<label class="col-sm-5 control-label is-required">BG</label>
<div class="col-sm-7">
<select name="bgProperty" th:field="*{bgProperty}" class="form-control" th:with="type=${@dict.getType('bg_type')}"
onchange="changeBg()" required>
<option value="">请选择BG</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label">详细地址:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label is-required">行业:</label>
<div class="col-sm-7">
<select name="industryType" th:field="*{industryType}" id="industryTypeBox" class="form-control"
required>
<option value="">请先选择BG</option>
</select>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-5 control-label">详细地址:</label>
<div class="col-sm-7">
<input name="address" th:field="*{address}" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label">联系人:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label">联系人:</label>
<div class="col-sm-7">
<input name="contactPerson" th:field="*{contactPerson}" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label">联系电话:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label">联系电话:</label>
<div class="col-sm-7">
<input name="contactPhone" th:field="*{contactPhone}" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label">联系邮件:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label">联系邮件:</label>
<div class="col-sm-7">
<input name="contactEmail" th:field="*{contactEmail}" class="form-control" type="text">
</div>
</div>
@ -93,8 +108,8 @@
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label">备注:</label>
<div class="col-sm-8">
<label class="col-sm-5 control-label">备注:</label>
<div class="col-sm-7">
<textarea name="remark" class="form-control">[[*{remark}]]</textarea>
</div>
</div>
@ -124,6 +139,43 @@
nodata: 'none'
});
$(function () {
changeBg()
$('[name="industryType"]').val([[${customerInfo.industryType}]])
})
function changeBg() {
if ($('[name="bgProperty"]').val() == ''){
$('#industryTypeBox').html(`<option value="">请选择BG</option>`)
return
}
if ($('[name="bgProperty"]').val() != 'YYS') {
let datas = [[${@dict.getType('bg_hysy')}]]
let str = ``
datas.forEach((ele) => {
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
})
$('#industryTypeBox').html(`
<select name="industryType" class="form-control" required>
<option value="">请选择行业</option>
${str}
</select>
`)
} else {
let datas = [[${@dict.getType('bg_yys')}]]
let str = ``
datas.forEach((ele) => {
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
})
$('#industryTypeBox').html(`
<select name="industryType" class="form-control" required>
<option value="">请选择行业</option>
${str}
</select>
`)
}
}
</script>
</body>
</html>

View File

@ -133,11 +133,23 @@
field: 'contactEmail',
title: '联系邮件'
},
{
field: 'bgProperty',
title: '所属行业',
formatter: (value, row) => {
return $.table.selectDictLabel([[${@dict.getType('bg_type')}]], value);
}
},
{
field: 'industryType',
title: '所属行业',
formatter: (value, row) => {
return [[${@dict.getType('industry_code')}]].find((ele) => ele.dictValue == value)?.dictLabel
if (row.bgProperty === 'YYS') {
return $.table.selectDictLabel([[${@dict.getType('bg_yys')}]], value);
} else {
return $.table.selectDictLabel([[${@dict.getType('bg_hysy')}]], value);
}
}
},
{

View File

@ -62,7 +62,9 @@ public class CustomerInfo extends BaseEntity
/** 联系邮件 */
@Excel(name = "联系邮件")
private String contactEmail;
/** 所属行业 */
@Excel(name = "BG")
private String bgProperty;
/** 所属行业 */
@Excel(name = "所属行业")
private String industryType;

View File

@ -216,13 +216,13 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService {
// projectOrderInfo.setOrderCode(orderNumber);
// }
//更新BG属性
ProjectInfo projectInfo = new ProjectInfo();
projectInfo.setId(projectOrderInfo.getProjectId());
projectInfo.setBgProperty(projectOrderInfo.getBgProperty());
projectInfo.setIndustryType(projectOrderInfo.getIndustryType());
projectInfo.setUpdateBy(ShiroUtils.getUserId().toString());
projectInfo.setUpdateTime(DateUtils.getNowDate());
projectInfoMapper.updateProjectInfo(projectInfo);
// ProjectInfo projectInfo = new ProjectInfo();
// projectInfo.setId(projectOrderInfo.getProjectId());
// projectInfo.setBgProperty(projectOrderInfo.getBgProperty());
// projectInfo.setIndustryType(projectOrderInfo.getIndustryType());
// projectInfo.setUpdateBy(ShiroUtils.getUserId().toString());
// projectInfo.setUpdateTime(DateUtils.getNowDate());
// projectInfoMapper.updateProjectInfo(projectInfo);
//不更新订单编号
projectOrderInfo.setOrderCode(null);

View File

@ -16,6 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="contactPhone" column="contact_phone" />
<result property="contactEmail" column="contact_email" />
<result property="industryType" column="Industry_type" />
<result property="bgProperty" column="bg_property" />
<result property="remark" column="remark" />
<result property="createAt" column="create_at" />
<result property="updateAt" column="update_at" />
@ -25,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectCustomerInfoVo">
select id, customer_code, customer_name, customer_postcode, province, city, address, contact_person,
contact_phone, contact_email, industry_type, remark, create_at, update_at, delete_at, status from customer_info
contact_phone, contact_email, industry_type, remark, create_at, update_at, delete_at, status, bg_property from customer_info
</sql>
<select id="selectCustomerInfoList" parameterType="CustomerInfo" resultMap="CustomerInfoResult">
@ -49,6 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="contactPerson != null and contactPerson != ''">and contact_person = #{contactPerson}</if>
<if test="contactPhone != null and contactPhone != ''">and contact_phone = #{contactPhone}</if>
<if test="contactEmail != null and contactEmail != ''">and contact_email = #{contactEmail}</if>
<if test="bgProperty != null and bgProperty != ''">and bg_property = #{bgProperty}</if>
<if test="industryType != null and industryType != ''">and industry_type = #{industryType}</if>
<if test="createAt != null ">and create_at = #{createAt}</if>
<if test="updateAt != null ">and update_at = #{updateAt}</if>
@ -79,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="contactPerson != null">contact_person,</if>
<if test="contactPhone != null">contact_phone,</if>
<if test="contactEmail != null">contact_email,</if>
<if test="bgProperty != null">bg_property,</if>
<if test="industryType != null">industry_type,</if>
<if test="remark != null">remark,</if>
<if test="createAt != null">create_at,</if>
@ -98,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="contactPerson != null">#{contactPerson},</if>
<if test="contactPhone != null">#{contactPhone},</if>
<if test="contactEmail != null">#{contactEmail},</if>
<if test="bgProperty != null">#{bgProperty},</if>
<if test="industryType != null">#{industryType},</if>
<if test="remark != null">#{remark},</if>
<if test="createAt != null">#{createAt},</if>
@ -121,6 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="contactPhone != null">contact_phone = #{contactPhone},</if>
<if test="contactEmail != null">contact_email = #{contactEmail},</if>
<if test="industryType != null">industry_type = #{industryType},</if>
<if test="bgProperty != null">bg_property = #{bgProperty},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createAt != null">create_at = #{createAt},</if>
<if test="updateAt != null">update_at = #{updateAt},</if>

View File

@ -43,10 +43,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select t1.id,
t1.project_code,
t1.project_name,
t1.bg_property,
t5.bg_property,
t1.customer_code,
t1.customer_name,
t1.industry_type,
t5.industry_type,
t1.agent_code,
t1.project_stage,
t1.project_grasp_degree,
@ -76,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join agent_info t2 on t1.agent_code = t2.agent_code
left join sys_user t3 on t1.hz_support_user=t3.user_id
left join (select max(work_time) work_time,project_id from project_work_progress group by project_id) t4 ON t1.id=t4.project_id
left join customer_info t5 on t1.customer_code=t5.customer_code
</sql>
@ -89,8 +90,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="agentCode != null and agentCode != ''"> and t1.agent_code = #{agentCode}</if>
<if test="agentName != null and agentName != ''"> and t2.agent_name like concat('%', #{agentName}, '%')</if>
<if test="customerName != null and customerName != ''"> and t1.customer_name like concat('%', #{customerName}, '%')</if>
<if test="industryType != null and industryType != ''"> and t1.industry_type = #{industryType}</if>
<if test="bgProperty != null and bgProperty != ''"> and t1.bg_property = #{bgProperty}</if>
<if test="industryType != null and industryType != ''"> and t5.industry_type = #{industryType}</if>
<if test="bgProperty != null and bgProperty != ''"> and t5.bg_property = #{bgProperty}</if>
<if test="projectStage != null and projectStage != ''"> and t1.project_stage = #{projectStage}</if>
<if test="projectGraspDegree != null and projectGraspDegree != ''"> and t1.project_grasp_degree = #{projectGraspDegree}</if>

View File

@ -47,13 +47,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t1.notifier_email, t1.notifier_phone, t1.duty, t1.duty_email, t1.duty_phone, t1.order_channel, t1.partner_code, t1.supplier,
t1.remark, t1.order_status, t1.create_by, t1.create_time, t1.update_by, t1.update_time,t1.partner_user_name,t1.partner_email
,t1.partner_phone,t1.version_code
,t2.project_code,t2.project_name,t2.province,t2.customer_name,t2.customer_code,t2.industry_type,t2.bg_property,t2.agent_code,t2.estimated_order_time
,t2.project_code,t2.project_name,t2.province,t2.customer_name,t2.customer_code,t6.industry_type,t6.bg_property,t2.agent_code,t2.estimated_order_time
,t2.customer_phone,t2.customer_user_name,t2.agent_code,t2.customer_code
,t3.partner_name,t3.level
,t4.agent_name
,t5.user_name as duty_name
from project_order_info t1
left join project_info t2 on t1.project_id = t2.id
left join customer_info t6 on t2.customer_code=t6.customer_code
left join partner_info t3 on t1.partner_code=t3.partner_code
left join agent_info t4 on t2.agent_code=t4.agent_code
left join sys_user t5 on t1.duty=t5.user_id