修改下发班组任务信息
This commit is contained in:
parent
81d02195d2
commit
9cf4bb107d
|
|
@ -10,6 +10,16 @@ import java.util.Date;
|
|||
@Data
|
||||
public class KqCmdBean {
|
||||
|
||||
private String level;
|
||||
|
||||
private String onLine;
|
||||
|
||||
private String keyWord;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private String updateTime;
|
||||
|
||||
private String userPhoto;
|
||||
/**
|
||||
* 用户id
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ import java.util.List;
|
|||
@Data
|
||||
public class TreeNode {
|
||||
|
||||
private String level;
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private String type;
|
||||
|
|
@ -17,6 +19,8 @@ public class TreeNode {
|
|||
private Integer teamId;
|
||||
private List<TreeNode> children;
|
||||
|
||||
private String onLine;
|
||||
|
||||
public TreeNode(String id, String name, String type) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
|
|
|
|||
|
|
@ -121,9 +121,12 @@ public class KqCmdServiceImpl implements KqCmdService {
|
|||
List<KqCmdBean> deviceCodes = entry.getValue();
|
||||
// 创建项目节点
|
||||
TreeNode projectNode = new TreeNode(proName, "工程-" + proName, "project");
|
||||
projectNode.setLevel("1");
|
||||
// 为每个设备码创建子节点
|
||||
for (KqCmdBean bean : deviceCodes) {
|
||||
TreeNode deviceNode = getTreeNode(bean);
|
||||
projectNode.setOnLine(deviceNode.getOnLine());
|
||||
|
||||
projectNode.addChild(deviceNode);
|
||||
}
|
||||
result.add(projectNode);
|
||||
|
|
@ -141,7 +144,10 @@ public class KqCmdServiceImpl implements KqCmdService {
|
|||
deviceName += "|班组-" + bean.getTeamName();
|
||||
}
|
||||
}
|
||||
return new TreeNode(deviceCode, deviceName, "device", bean.getProId(), bean.getSubId(), bean.getTeamId());
|
||||
TreeNode treeNode= new TreeNode(deviceCode, deviceName, "device", bean.getProId(), bean.getSubId(), bean.getTeamId());
|
||||
treeNode.setOnLine(bean.getOnLine());
|
||||
treeNode.setLevel("2");
|
||||
return treeNode;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,10 +9,24 @@
|
|||
kul.user_id as userId,
|
||||
kul.user_name as userName,
|
||||
kul.user_phone as userPhoto,
|
||||
kul.dev_code as devCode
|
||||
kul.dev_code as devCode,kul.update_time updateTime
|
||||
from kq_user_list kul
|
||||
left join pm_worker pw on pw.id=kul.user_id
|
||||
where kul.dev_code = #{deviceCode}
|
||||
<if test="isOnDataBase!=null and isOnDataBase!=''">
|
||||
<if test='isOnDataBase=="1"' >
|
||||
and pw.id is not null
|
||||
</if>
|
||||
<if test='isOnDataBase=="0"' >
|
||||
and pw.id is null
|
||||
</if>
|
||||
</if>
|
||||
<if test="keyWord!=null and keyWord!=''">
|
||||
and kul.user_name like concat('%',#{keyWord},'%')
|
||||
</if>
|
||||
<if test="userId!=null and userId!=''">
|
||||
and kul.user_id=#{userId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getProDeviceWorker" resultType="com.bonus.bmw.domain.vo.KqCmdBean">
|
||||
|
|
@ -50,7 +64,8 @@
|
|||
ps.id as sub_id,
|
||||
ps.sub_name,
|
||||
pst.id as team_id
|
||||
,pst.team_name
|
||||
,pst.team_name,
|
||||
pad.on_line onLine
|
||||
FROM
|
||||
pm_att_device pad
|
||||
INNER JOIN pm_project pp ON pad.pro_id = pp.id
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@
|
|||
</insert>
|
||||
<insert id="addDeviceUserInfo">
|
||||
replace into kq_user_list(
|
||||
id, user_id,user_name, user_phone, card, vaild_start, vaild_end,dev_code
|
||||
id, user_id,user_name, user_phone, card, vaild_start, vaild_end,dev_code,update_time
|
||||
)values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id},#{item.userId},#{item.name},#{item.imagePath},#{item.card},#{item.vaildStart},#{item.vaildEnd},#{item.deviceCode})
|
||||
(#{item.id},#{item.userId},#{item.name},#{item.imagePath},#{item.card},#{item.vaildStart},#{item.vaildEnd},#{item.deviceCode},now())
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="addDevConfig">
|
||||
|
|
|
|||
Loading…
Reference in New Issue