Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-bpm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
鲁鑫
topsun-bpm
Commits
3bbc22a0
Commit
3bbc22a0
authored
Dec 20, 2023
by
覃振观
👶
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
8ebcb7d5
8d8cd255
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
262 additions
and
45 deletions
+262
-45
customerDetail.js
...-xt/src/main/webapp/biz/topsun/customer/customerDetail.js
+60
-3
customerDetail.jsp
...xt/src/main/webapp/biz/topsun/customer/customerDetail.jsp
+6
-1
customerList.js
...un-xt/src/main/webapp/biz/topsun/customer/customerList.js
+21
-13
CustomerApplication.java
...igou/topsun/customer/application/CustomerApplication.java
+17
-0
CustomerApplicationImpl.java
...un/customer/application/Impl/CustomerApplicationImpl.java
+15
-0
CustomerController.java
...huigou/topsun/customer/controller/CustomerController.java
+50
-22
CustomerContact.java
...va/com/huigou/topsun/customer/domain/CustomerContact.java
+0
-6
ContactQueryRequest.java
...gou/topsun/customer/domain/query/ContactQueryRequest.java
+87
-0
customerMapper.xml
.../main/resources/config/topsun/customer/customerMapper.xml
+6
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/customer/customerDetail.js
View file @
3bbc22a0
var
sizeGroupGridManager
=
null
;
var
gridManager
=
null
;
$
(
document
).
ready
(
function
()
{
initializateUI
();
load
SizeGroup
ListGrid
();
load
Contact
ListGrid
();
//bindQueryEvent();
bindEvent
();
});
function
initializateUI
()
{
UICtrl
.
layout
(
"#layout"
,
{
leftWidth
:
3
});
}
\ No newline at end of file
}
function
loadContactListGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
()
{
addHandler
();
},
updateHandler
:
function
()
{
updateHandler
();
},
deleteHandler
:
function
()
{
updateHandler
();
}
});
gridManager
=
UICtrl
.
grid
(
"#contactListGrid"
,
{
columns
:
[
{
display
:
"联系人名称"
,
name
:
"contactName"
,
width
:
300
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"customerContactList"
,
back
:
{
customerContactId
:
"customerContactId"
,
customerId
:
"customerId"
,
contactName
:
"contactName"
,
contactPhone
:
"contactPhone"
,
contactFax
:
"contactFax"
,
contactMail
:
"contactMail"
}
},
}
},
{
display
:
"联系人电话"
,
name
:
"contactPhone"
,
width
:
300
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"传真"
,
name
:
"contactFax"
,
width
:
300
,
minWidth
:
60
,
type
:
"number"
,
align
:
"left"
},
{
display
:
"邮箱"
,
name
:
"contactMail"
,
width
:
300
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
}
],
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/customer/slicedContactList.ajax'
,
parms
:{
customerId
:
$
(
"#customerId"
).
val
()},
pageSize
:
10
,
usePager
:
true
,
toolbar
:
toolbarOptions
,
width
:
"100%"
,
height
:
"100%"
,
heightDiff
:
-
8
,
checkbox
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
onDblClickRow
:
function
(
data
,
rowindex
,
rowobj
)
{
updateHandler
(
data
);
}
});
UICtrl
.
setSearchAreaToggle
(
gridManager
);
}
topsun-xt/src/main/webapp/biz/topsun/customer/customerDetail.jsp
View file @
3bbc22a0
...
...
@@ -60,7 +60,12 @@
</div>
</div>
<div
id=
"contact"
position=
"center"
>
<x:title
title=
"客户列表"
name=
"group"
/>
<div
id=
"contactListGrid"
style=
"margin: 2px;"
>
<hr>
</div>
</div>
...
...
topsun-xt/src/main/webapp/biz/topsun/customer/customerList.js
View file @
3bbc22a0
...
...
@@ -65,27 +65,27 @@ function resetForm(obj) {
$
(
obj
).
formClean
();
}
//增加按钮
function
addHandler
()
{
UICtrl
.
addTabItem
({
tabid
:
'addCustomerDetail'
,
text
:
'添加客户详细信息'
,
url
:
web_app
.
name
+
'/customer/addCustomerDetail.do'
})
}
//删除按钮
function
deleteHandler
()
{
DataUtil
.
del
({
action
:
'
proofingMake/deleteProofingMakeByProofingMakeId
.ajax'
,
gridManager
:
gridManager
,
idFieldName
:
'
proofingMake
Id'
,
action
:
'
customer/deleteCustomer
.ajax'
,
gridManager
:
gridManager
,
idFieldName
:
'
customer
Id'
,
onSuccess
:
function
()
{
reloadGrid
();
}
});
}
/**
* 刷新表格
*/
function
reloadGrid
(
obj
)
{
sizeGroupGridManager
.
loadData
();
}
//修改按钮
function
updateHandler
(
data
)
{
if
(
!
data
)
{
data
=
DataUtil
.
getUpdateRow
(
gridManager
);
...
...
@@ -94,9 +94,17 @@ function updateHandler(data) {
}
}
UICtrl
.
addTabItem
({
tabid
:
'customerDetail'
,
tabid
:
'customerDetail'
+
data
.
customerId
,
text
:
'客户详细信息'
,
url
:
web_app
.
name
+
'/customer/forwardCustomerDetail.do?customerId='
+
data
.
customerId
})
}
/**
* 刷新表格
*/
function
reloadGrid
(
obj
)
{
sizeGroupGridManager
.
loadData
();
}
topsun/src/main/java/com/huigou/topsun/customer/application/CustomerApplication.java
View file @
3bbc22a0
package
com
.
huigou
.
topsun
.
customer
.
application
;
import
com.huigou.topsun.customer.domain.CustomerContact
;
import
com.huigou.topsun.customer.domain.query.ContactQueryRequest
;
import
com.huigou.topsun.customer.domain.query.CustomerQueryRequest
;
import
java.util.List
;
...
...
@@ -10,4 +12,19 @@ import java.util.Map;
*/
public
interface
CustomerApplication
{
Map
<
String
,
Object
>
findCustomerByPage
(
CustomerQueryRequest
customerQueryRequest
);
List
<
CustomerContact
>
findContactByPage
(
String
customerId
);
}
topsun/src/main/java/com/huigou/topsun/customer/application/Impl/CustomerApplicationImpl.java
View file @
3bbc22a0
...
...
@@ -4,12 +4,15 @@ import com.huigou.cache.DictUtil;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.customer.application.CustomerApplication
;
import
com.huigou.topsun.customer.domain.CustomerContact
;
import
com.huigou.topsun.customer.domain.query.ContactQueryRequest
;
import
com.huigou.topsun.customer.domain.query.CustomerQueryRequest
;
import
com.huigou.topsun.customer.repository.CustomerRepository
;
import
com.huigou.uasp.bmp.common.application.BaseApplication
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -29,4 +32,16 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer
QueryModel
model
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
customerQueryRequest
);
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
model
);
}
/**
* 分页查询联系人信息
* @param contactQueryRequest
* @return
*/
@Override
public
List
<
CustomerContact
>
findContactByPage
(
String
customerId
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"contactList"
);
List
<
CustomerContact
>
customerContactList
=
this
.
sqlExecutorDao
.
queryToList
(
queryDescriptor
.
getSql
(),
CustomerContact
.
class
,
customerId
);
return
customerContactList
;
}
}
topsun/src/main/java/com/huigou/topsun/customer/controller/CustomerController.java
View file @
3bbc22a0
...
...
@@ -5,12 +5,14 @@ import com.huigou.topsun.customer.application.CustomerBaseInfoApplication;
import
com.huigou.topsun.customer.application.CustomerApplication
;
import
com.huigou.topsun.customer.domain.CustomerBank
;
import
com.huigou.topsun.customer.domain.CustomerContact
;
import
com.huigou.topsun.customer.domain.query.ContactQueryRequest
;
import
com.huigou.topsun.customer.domain.query.CustomerQueryRequest
;
import
com.huigou.topsun.customer.domain.Province
;
import
com.huigou.topsun.customer.domain.vo.CustomerVo
;
import
com.huigou.uasp.annotation.ControllerMapping
;
import
com.huigou.uasp.client.CommonController
;
import
com.huigou.util.SDO
;
import
com.sun.xml.bind.v2.TODO
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -57,21 +59,65 @@ public class CustomerController extends CommonController {
return
toResult
(
customerApplication
.
findCustomerByPage
(
customerQueryRequest
));
}
/**
* 分页展示客户联系人信息
*
* @return
*/
public
String
slicedContactList
()
{
SDO
sdo
=
getSDO
();
String
customerId
=
sdo
.
getString
(
"customerId"
);
//ContactQueryRequest contactQueryRequest = sdo.toQueryRequest(ContactQueryRequest.class);
return
packGridDataAndResult
(
customerApplication
.
findContactByPage
(
customerId
));
}
/**
* 转跳到客户详细信息页面
*
* @return
*/
public
String
forwardCustomerDetail
()
{
CustomerVo
customerVo
=
loadCustomerDetail
();
CustomerBank
customerBank
=
loadCustomerBank
();
BeanUtils
.
copyProperties
(
customerBank
,
customerVo
);
if
(
customerBank
!=
null
)
{
BeanUtils
.
copyProperties
(
customerBank
,
customerVo
);
}
return
forward
(
"customerDetail"
,
customerVo
);
}
/**
* 新增客户,转跳到新增页面
* @return
*/
public
String
addCustomerDetail
()
{
return
forward
(
"customerDetail"
);
}
/**
* 根据id列表删除用户
* @return
*/
public
String
deleteCustomer
()
{
SDO
sdo
=
getSDO
();
List
<
String
>
ids
=
sdo
.
getIds
();
//TODO
//删除操作
return
forward
(
"customerDetail"
,
customerVo
);
return
success
(
);
}
/**
* 保存客户信息(多表保存,添加事务)
* @return
*/
public
String
saveCustomer
()
{
SDO
sdo
=
getSDO
();
String
customerId
=
sdo
.
getString
(
"customerId"
);
//TODO
//保存客户信息
return
null
;
}
/**
* 展示客户省市数据,如果客户的省份编码是省级行政单位,直接返回省份数据,
* 如果客户的省份编码是二级或者三级行政单位,则需要返回对应的省级或者市级行政单位
...
...
@@ -116,25 +162,7 @@ public class CustomerController extends CommonController {
return
customerBank
;
}
/**
* 加载客户联系人信息
*
* @return
*/
public
CustomerContact
loadCustomerContact
()
{
SDO
sdo
=
getSDO
();
String
customerId
=
sdo
.
getString
(
"customerId"
);
String
contactType
=
sdo
.
getString
(
"contactType"
);
List
<
CustomerContact
>
customerContactList
=
customerBaseInfoApplication
.
findCustomerContactByCustomerId
(
customerId
);
for
(
CustomerContact
customerContact
:
customerContactList
)
{
if
(!
BeanUtil
.
isEmpty
(
customerContact
))
{
if
(
customerContact
.
getContactType
().
equals
(
contactType
))
{
return
customerContact
;
}
}
}
return
null
;
}
}
topsun/src/main/java/com/huigou/topsun/customer/domain/CustomerContact.java
View file @
3bbc22a0
...
...
@@ -29,12 +29,6 @@ public class CustomerContact implements Serializable {
@Column
(
name
=
"customer_id"
)
private
String
customerId
;
/**
* 联系人类型
*/
@Column
(
name
=
"contact_type"
)
private
String
contactType
;
/**
* 联系人名称
*/
...
...
topsun/src/main/java/com/huigou/topsun/customer/domain/query/ContactQueryRequest.java
0 → 100644
View file @
3bbc22a0
package
com
.
huigou
.
topsun
.
customer
.
domain
.
query
;
import
com.huigou.data.domain.query.QueryAbstractRequest
;
import
javax.persistence.Column
;
public
class
ContactQueryRequest
extends
QueryAbstractRequest
{
private
String
customerContactId
;
/**
* 客户id
*/
private
String
customerId
;
/**
* 联系人名称
*/
private
String
contactName
;
/**
* 联系人电话
*/
private
String
contactPhone
;
/**
* 传真
*/
private
String
contactFax
;
/**
* 邮件
*/
private
String
contactMail
;
public
String
getCustomerContactId
()
{
return
customerContactId
;
}
public
void
setCustomerContactId
(
String
customerContactId
)
{
this
.
customerContactId
=
customerContactId
;
}
public
String
getCustomerId
()
{
return
customerId
;
}
public
void
setCustomerId
(
String
customerId
)
{
this
.
customerId
=
customerId
;
}
public
String
getContactName
()
{
return
contactName
;
}
public
void
setContactName
(
String
contactName
)
{
this
.
contactName
=
contactName
;
}
public
String
getContactPhone
()
{
return
contactPhone
;
}
public
void
setContactPhone
(
String
contactPhone
)
{
this
.
contactPhone
=
contactPhone
;
}
public
String
getContactFax
()
{
return
contactFax
;
}
public
void
setContactFax
(
String
contactFax
)
{
this
.
contactFax
=
contactFax
;
}
public
String
getContactMail
()
{
return
contactMail
;
}
public
void
setContactMail
(
String
contactMail
)
{
this
.
contactMail
=
contactMail
;
}
}
topsun/src/main/resources/config/topsun/customer/customerMapper.xml
View file @
3bbc22a0
...
...
@@ -32,4 +32,10 @@
where customer_id = ?
</sql-query>
</query>
<query
name=
"contactList"
label=
"联系人信息表"
table=
"customerContact"
>
<sql-query>
select c.* from customer_contact c where c.customer_id = ?
</sql-query>
</query>
</query-mappings>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment