diff --git a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/WorkOrderServiceImpl.java b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/WorkOrderServiceImpl.java index 096b8019..b4bf7952 100644 --- a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/WorkOrderServiceImpl.java +++ b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/WorkOrderServiceImpl.java @@ -135,7 +135,10 @@ public class WorkOrderServiceImpl implements WorkOrderService { userIdList.insert(0, userDomain.getWorkUserId() + ","); } - orderMapper.insertOrderUser(orderUserDomainList); + + if(orderUserDomainList.size() > 0){ + orderMapper.insertOrderUser(orderUserDomainList); + } if(StringUtils.isNotEmpty(userIdList.toString()) && domain.getStatus() != null && domain.getStatus()==1){ sendSms(userIdList.toString(), domain.getWorkOrderId().toString()); diff --git a/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcWorkOrderMapper.xml b/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcWorkOrderMapper.xml index e8d30240..b4ed3d27 100644 --- a/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcWorkOrderMapper.xml +++ b/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcWorkOrderMapper.xml @@ -55,10 +55,10 @@ o.title as 'title', o.type as 'typeId', td.name as 'typeName', - u.dept_id as 'deptId', - d.dept_name as 'deptName', - u.work_user_id as 'userId', - u.user_name as 'userName', + GROUP_CONCAT(u.dept_id) as 'deptId', + GROUP_CONCAT(d.dept_name) as 'deptName', + GROUP_CONCAT(u.work_user_id) as 'userId', + GROUP_CONCAT(u.user_name, '(', d.dept_name, ')') as 'userName', o.`status` as 'status' from xhpc_work_order o left join xhpc_work_type_dict td on td.work_type_id=o.type @@ -81,7 +81,7 @@