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
c8d3ae01
Commit
c8d3ae01
authored
Dec 22, 2023
by
全洪江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户模块前端页面调整,后端查询删除
Signed-off-by:
Hongjiang
<
hongjiang.quan@topsunit.com
>
parent
b8d581c7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
275 additions
and
178 deletions
+275
-178
customerDetail.js
...-xt/src/main/webapp/biz/topsun/customer/customerDetail.js
+206
-145
customerList.js
...un-xt/src/main/webapp/biz/topsun/customer/customerList.js
+2
-4
CustomerApplication.java
...igou/topsun/customer/application/CustomerApplication.java
+2
-12
CustomerRelatedApplication.java
...psun/customer/application/CustomerRelatedApplication.java
+3
-2
CustomerApplicationImpl.java
...un/customer/application/Impl/CustomerApplicationImpl.java
+27
-3
CustomerRelatedApplicationImpl.java
...omer/application/Impl/CustomerRelatedApplicationImpl.java
+5
-6
CustomerController.java
...huigou/topsun/customer/controller/CustomerController.java
+23
-0
CustomerDebtContactController.java
...un/customer/controller/CustomerDebtContactController.java
+2
-1
CustomerRelatedController.java
...topsun/customer/controller/CustomerRelatedController.java
+3
-3
customerMapper.xml
.../main/resources/config/topsun/customer/customerMapper.xml
+2
-2
No files found.
topsun-xt/src/main/webapp/biz/topsun/customer/customerDetail.js
View file @
c8d3ae01
This diff is collapsed.
Click to expand it.
topsun-xt/src/main/webapp/biz/topsun/customer/customerList.js
View file @
c8d3ae01
...
...
@@ -17,9 +17,7 @@ function loadCustomerInfoListGrid() {
updateHandler
:
function
()
{
updateHandler
();
},
deleteHandler
:
function
()
{
updateHandler
();
}
deleteHandler
:
deleteHandler
,
});
gridManager
=
UICtrl
.
grid
(
"#customerInfoListGrid"
,
{
columns
:
[
...
...
@@ -77,7 +75,7 @@ function addHandler() {
//删除按钮
function
deleteHandler
()
{
DataUtil
.
del
({
action
:
'customer/deleteCustomer.ajax'
,
action
:
'customer/deleteCustomer
AndAffiliatedInfoByCustomerId
.ajax'
,
gridManager
:
gridManager
,
idFieldName
:
'customerId'
,
onSuccess
:
function
()
{
reloadGrid
();
...
...
topsun/src/main/java/com/huigou/topsun/customer/application/CustomerApplication.java
View file @
c8d3ae01
...
...
@@ -14,17 +14,7 @@ public interface CustomerApplication {
Map
<
String
,
Object
>
findCustomerByPage
(
CustomerQueryRequest
customerQueryRequest
);
List
<
CustomerContact
>
findContactByPage
(
String
customerId
);
void
deleteContactById
(
String
id
);
void
deleteContactByIds
(
List
<
String
>
ids
);
}
topsun/src/main/java/com/huigou/topsun/customer/application/CustomerRelatedApplication.java
View file @
c8d3ae01
package
com
.
huigou
.
topsun
.
customer
.
application
;
import
com.huigou.topsun.customer.controller.CustomerRelatedController
;
import
com.huigou.topsun.customer.domain.CustomerRelated
;
import
com.huigou.topsun.customer.domain.query.CustomerRelatedQueryRequest
;
import
com.huigou.topsun.customer.domain.vo.CustomerRelatedVo
;
...
...
@@ -14,9 +15,9 @@ import java.util.Map;
* description:
*/
public
interface
CustomerRelatedApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/customer/customerMapper.xml"
;
Map
<
String
,
Object
>
getCustomerRelatedList
(
CustomerRelatedQueryRequest
queryRequest
);
List
<
CustomerRelated
>
getCustomerRelatedList
(
String
customerId
);
CustomerRelatedVo
saveCustomerRelated
(
CustomerRelated
customerRelated
);
...
...
topsun/src/main/java/com/huigou/topsun/customer/application/Impl/CustomerApplicationImpl.java
View file @
c8d3ae01
package
com
.
huigou
.
topsun
.
customer
.
application
.
Impl
;
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.topsun.customer.repository.Customer
Contact
Repository
;
import
com.huigou.uasp.bmp.common.application.BaseApplication
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -19,6 +20,8 @@ import java.util.Map;
@Service
public
class
CustomerApplicationImpl
extends
BaseApplication
implements
CustomerApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/customer/customerMapper.xml"
;
@Autowired
private
CustomerContactRepository
customerContactRepository
;
/**
...
...
@@ -44,4 +47,25 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer
List
<
CustomerContact
>
customerContactList
=
this
.
sqlExecutorDao
.
queryToList
(
queryDescriptor
.
getSql
(),
CustomerContact
.
class
,
customerId
);
return
customerContactList
;
}
/**
* 根据单个id删除
* @param id
*/
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRES_NEW
)
public
void
deleteContactById
(
String
id
)
{
customerContactRepository
.
delete
(
id
);
}
/**
* 批量进行删除
* @param ids
*/
@Override
@Transactional
public
void
deleteContactByIds
(
List
<
String
>
ids
)
{
ids
.
forEach
(
this
::
deleteContactById
);
}
}
topsun/src/main/java/com/huigou/topsun/customer/application/Impl/CustomerRelatedApplicationImpl.java
View file @
c8d3ae01
...
...
@@ -23,16 +23,15 @@ import java.util.Map;
*/
@Service
public
class
CustomerRelatedApplicationImpl
extends
BaseApplication
implements
CustomerRelatedApplication
{
public
static
final
String
QUERY_XML_FILE_PATH
=
"config/topsun/customer/customerMapper.xml"
;
@Autowired
private
CustomerRelatedRepository
customerRelatedRepository
;
@Override
public
Map
<
String
,
Object
>
getCustomerRelatedList
(
CustomerRelatedQueryRequest
queryRequest
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"customerRelated"
);
QueryModel
queryModel
=
this
.
sqlExecutorDao
.
getQueryModel
(
queryDescriptor
,
queryRequest
);
Map
<
String
,
Object
>
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
return
map
;
public
List
<
CustomerRelated
>
getCustomerRelatedList
(
String
customerId
)
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"customerRelated"
);
List
<
CustomerRelated
>
customerRelatedList
=
sqlExecutorDao
.
queryToList
(
queryDescriptor
.
getSql
(),
CustomerRelated
.
class
,
customerId
);
return
customerRelatedList
;
}
@Override
...
...
topsun/src/main/java/com/huigou/topsun/customer/controller/CustomerController.java
View file @
c8d3ae01
...
...
@@ -158,6 +158,29 @@ public class CustomerController extends CommonController {
return
customerBank
;
}
/**
* 根据id列表删除联系人
* @return
*/
public
String
deleteContact
()
{
SDO
sdo
=
getSDO
();
List
<
String
>
ids
=
sdo
.
getIds
();
customerApplication
.
deleteContactByIds
(
ids
);
return
success
();
}
/**
* 删除客户及其附属信息
* @return
*/
public
String
deleteCustomerAndAffiliatedInfoByCustomerId
()
{
SDO
sdo
=
getSDO
();
String
customerId
=
sdo
.
getString
(
"customerId"
);
//TODO
//多表联删
return
success
();
}
...
...
topsun/src/main/java/com/huigou/topsun/customer/controller/CustomerDebtContactController.java
View file @
c8d3ae01
...
...
@@ -51,7 +51,8 @@ public class CustomerDebtContactController extends CommonController {
SDO
sdo
=
this
.
getSDO
();
String
customerId
=
sdo
.
getString
(
"customerId"
);
String
customerEmailType
=
sdo
.
getString
(
"customerEmailType"
);
return
packGridDataAndResult
(
customerDebtContactApplication
.
getCustomerDebtContactList
(
customerId
,
customerEmailType
));
List
<
CustomerDebtContact
>
customerDebtContactList
=
customerDebtContactApplication
.
getCustomerDebtContactList
(
customerId
,
customerEmailType
);
return
packGridDataAndResult
(
customerDebtContactList
);
}
/**
...
...
topsun/src/main/java/com/huigou/topsun/customer/controller/CustomerRelatedController.java
View file @
c8d3ae01
...
...
@@ -47,9 +47,9 @@ public class CustomerRelatedController extends CommonController {
*/
public
String
slicedCustomerRelatedList
()
{
SDO
sdo
=
this
.
getSDO
();
CustomerRelatedQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
CustomerRelatedQueryRequest
.
class
);
return
toResult
(
customerRelatedApplication
.
getCustomerRelatedList
(
queryRequest
)
);
String
customerId
=
sdo
.
getString
(
"customerId"
);
List
<
CustomerRelated
>
customerRelatedList
=
customerRelatedApplication
.
getCustomerRelatedList
(
customerId
);
return
packGridDataAndResult
(
customerRelatedList
);
}
/**
...
...
topsun/src/main/resources/config/topsun/customer/customerMapper.xml
View file @
c8d3ae01
...
...
@@ -12,8 +12,8 @@
<sql-query>
select c.*
from customer_debt_contact c
where customer_
email_type
= ?
and customer_
id
= ?
where customer_
id
= ?
and customer_
email_type
= ?
</sql-query>
</query>
...
...
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