更新工单列表拼接办理人员和部门显示

This commit is contained in:
panshuling321 2022-06-10 14:18:53 +08:00
parent 17f3561ed0
commit 191a365f10
2 changed files with 11 additions and 8 deletions

View File

@ -135,7 +135,10 @@ public class WorkOrderServiceImpl implements WorkOrderService {
userIdList.insert(0, userDomain.getWorkUserId() + ","); 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){ if(StringUtils.isNotEmpty(userIdList.toString()) && domain.getStatus() != null && domain.getStatus()==1){
sendSms(userIdList.toString(), domain.getWorkOrderId().toString()); sendSms(userIdList.toString(), domain.getWorkOrderId().toString());

View File

@ -55,10 +55,10 @@
o.title as 'title', o.title as 'title',
o.type as 'typeId', o.type as 'typeId',
td.name as 'typeName', td.name as 'typeName',
u.dept_id as 'deptId', GROUP_CONCAT(u.dept_id) as 'deptId',
d.dept_name as 'deptName', GROUP_CONCAT(d.dept_name) as 'deptName',
u.work_user_id as 'userId', GROUP_CONCAT(u.work_user_id) as 'userId',
u.user_name as 'userName', GROUP_CONCAT(u.user_name, '(', d.dept_name, ')') as 'userName',
o.`status` as 'status' o.`status` as 'status'
from xhpc_work_order o from xhpc_work_order o
left join xhpc_work_type_dict td on td.work_type_id=o.type left join xhpc_work_type_dict td on td.work_type_id=o.type
@ -81,7 +81,7 @@
<select id="selectByPrimaryKey" resultType="com.xhpc.activity.domain.XhpcWorkOrderDomain"> <select id="selectByPrimaryKey" resultType="com.xhpc.activity.domain.XhpcWorkOrderDomain">
select select
<include refid="Base_Column_List" />, <include refid="Base_Column_List" />,
d.device_name, s.name, co.start_time, co.source, td.name as 'type_name' d.device_name, s.name, co.start_time, co.source, td.name as 'type_name'
from xhpc_work_order o from xhpc_work_order o
@ -98,8 +98,8 @@
<insert id="insert" keyColumn="work_order_id" keyProperty="workOrderId" parameterType="com.xhpc.activity.domain.XhpcWorkOrderDomain" useGeneratedKeys="true"> <insert id="insert" keyColumn="work_order_id" keyProperty="workOrderId" parameterType="com.xhpc.activity.domain.XhpcWorkOrderDomain" useGeneratedKeys="true">
insert into xhpc_work_order (`type`, title, content, fault_time insert into xhpc_work_order (`type`, title, content, fault_time
device_type, serial_number, reason, disposal_method, device_type, serial_number, reason, disposal_method,
`status`, del_flag, tenant_id, `status`, del_flag, tenant_id,
create_time, create_by, update_time, create_time, create_by, update_time,
update_by, remark) update_by, remark)
values (#{type,jdbcType=SMALLINT}, #{title,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{faultTime, jdbcType=TIMESTAMP} values (#{type,jdbcType=SMALLINT}, #{title,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{faultTime, jdbcType=TIMESTAMP}
#{deviceType,jdbcType=VARCHAR}, #{serialNumber,jdbcType=VARCHAR}, #{deviceType,jdbcType=VARCHAR}, #{serialNumber,jdbcType=VARCHAR},