大屏调试
This commit is contained in:
parent
5fe413c07d
commit
9338254cca
|
|
@ -32,7 +32,7 @@ public interface TeamRecordMapper {
|
|||
List<TeamRecord> getTeamPeopleDetails(TeamRecord record);
|
||||
|
||||
/**
|
||||
* 施工人员-班组骨干详情页
|
||||
* 施工人员-班组骨干、一般作业、特种作业详情页
|
||||
* @param record
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ import org.springframework.stereotype.Service;
|
|||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.bonus.base.config.Constants.*;
|
||||
|
||||
/**
|
||||
* @author : 阮世耀
|
||||
* @version : 1.0
|
||||
|
|
@ -219,12 +221,13 @@ public class ProjectViewServiceImpl {
|
|||
public List<TeamRecord> getTeamDetails(TeamRecord record) {
|
||||
List<TeamRecord> list = new ArrayList<>();
|
||||
list = teamRecord.getTeamDetails(record);
|
||||
if(CollectionUtils.isNotEmpty(list))
|
||||
if(CollectionUtils.isNotEmpty(list)) {
|
||||
list.forEach(teamRecordOne -> {
|
||||
if (StringUtils.isNotBlank(teamRecordOne.getMasterPhone())) {
|
||||
teamRecordOne.setMasterPhone(Sm4Utils.decode(teamRecordOne.getMasterPhone()));
|
||||
}
|
||||
});
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
@ -236,29 +239,55 @@ public class ProjectViewServiceImpl {
|
|||
public List<TeamRecord> getTeamPeopleDetails(TeamRecord record) {
|
||||
List<TeamRecord> list = new ArrayList<>();
|
||||
list = teamRecord.getTeamPeopleDetails(record);
|
||||
if(CollectionUtils.isNotEmpty(list))
|
||||
list.forEach(teamRecordOne -> {
|
||||
if (StringUtils.isNotBlank(teamRecordOne.getPhone())) {
|
||||
teamRecordOne.setPhone(Sm4Utils.decode(teamRecordOne.getPhone()));
|
||||
if(CollectionUtils.isNotEmpty(list)) {
|
||||
list.forEach(people -> {
|
||||
if (StringUtils.isNotBlank(people.getPhone())) {
|
||||
people.setPhone(Sm4Utils.decode(people.getPhone()));
|
||||
}
|
||||
extracted(people);
|
||||
});
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 施工人员-班组骨干详情页
|
||||
* 归一方法抽取
|
||||
* @param people
|
||||
*/
|
||||
private void extracted(TeamRecord people) {
|
||||
if (StringUtils.isNotBlank(people.getPostCode())) {
|
||||
if (TEAM_LEADER.equals(people.getPostCode())){
|
||||
people.setPeopleName("班组负责人");
|
||||
} else if (TEAM_SAFETY.equals(people.getPostCode())){
|
||||
people.setPeopleName("班组安全员");
|
||||
} else if (TEAM_TECHNICAL.equals(people.getPostCode())){
|
||||
people.setPeopleName("班组技术员");
|
||||
} else if (SPECIALIZED_WORKER.equals(people.getPostCode())){
|
||||
people.setPeopleName("特种作业人员");
|
||||
} else if (REGULAR_WORKER.equals(people.getPostCode())) {
|
||||
people.setPeopleName("一般作业人员");
|
||||
} else {
|
||||
people.setPeopleName("未知岗位");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 施工人员-班组骨干、一般作业、特种作业详情页
|
||||
* @param record
|
||||
* @return
|
||||
*/
|
||||
public List<TeamRecord> getTeamMasterDetails(TeamRecord record) {
|
||||
List<TeamRecord> list = new ArrayList<>();
|
||||
list = teamRecord.getTeamMasterDetails(record);
|
||||
if(CollectionUtils.isNotEmpty(list))
|
||||
if(CollectionUtils.isNotEmpty(list)) {
|
||||
list.forEach(teamRecordOne -> {
|
||||
if (StringUtils.isNotBlank(teamRecordOne.getPhone())) {
|
||||
teamRecordOne.setPhone(Sm4Utils.decode(teamRecordOne.getPhone()));
|
||||
}
|
||||
extracted(teamRecordOne);
|
||||
});
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
@ -270,12 +299,13 @@ public class ProjectViewServiceImpl {
|
|||
public List<UserPost> getUserPostDetails(UserPost record) {
|
||||
List<UserPost> list = new ArrayList<>();
|
||||
list = userPost.getUserPostDetails(record);
|
||||
if(CollectionUtils.isNotEmpty(list))
|
||||
if(CollectionUtils.isNotEmpty(list)) {
|
||||
list.forEach(userPostOne -> {
|
||||
if (StringUtils.isNotBlank(userPostOne.getPhone())) {
|
||||
userPostOne.setPhone(Sm4Utils.decode(userPostOne.getPhone()));
|
||||
}
|
||||
});
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ import java.io.Serializable;
|
|||
@Data
|
||||
public class TeamRecord implements Serializable {
|
||||
|
||||
private Integer isFlag;
|
||||
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
|
|
@ -50,6 +52,12 @@ public class TeamRecord implements Serializable {
|
|||
@ApiModelProperty(value="岗位工种")
|
||||
private String postCode;
|
||||
|
||||
/**
|
||||
* 岗位工种名称
|
||||
*/
|
||||
@ApiModelProperty(value="岗位工种名称")
|
||||
private String postCodeName;
|
||||
|
||||
/**
|
||||
* 班组长电话
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -30,8 +30,11 @@
|
|||
tt.rel_phone as masterPhone,
|
||||
count(tp.id) as peopleCount
|
||||
from tb_team tt
|
||||
left join tb_people tp on tt.id = tp.team_id and tp.del_flag = 0
|
||||
left join tb_people tp on tt.id = tp.team_id and tp.del_flag = 0 and tt.js_time IS NULL
|
||||
where tt.del_flag = 0
|
||||
<if test="proId != null">
|
||||
AND tt.pro_id = #{proId}
|
||||
</if>
|
||||
<if test="teamName != null and teamName != ''">
|
||||
and tt.team_name like concat('%',#{teamName},'%')
|
||||
</if>
|
||||
|
|
@ -51,8 +54,11 @@
|
|||
tp.rel_phone as phone,
|
||||
tp.post_code as postCode
|
||||
from tb_people tp
|
||||
left join tb_team tt on tp.team_id = tt.id and tt.del_flag = 0
|
||||
left join tb_team tt on tp.team_id = tt.id and tt.del_flag = 0 and tt.js_time IS NULL
|
||||
where tp.del_flag = 0
|
||||
<if test="proId != null">
|
||||
AND tt.pro_id = #{proId}
|
||||
</if>
|
||||
<if test="peopleName != null and peopleName != ''">
|
||||
and tp.rel_name like concat('%',#{peopleName},'%')
|
||||
</if>
|
||||
|
|
@ -61,7 +67,7 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 施工人员-班组骨干详情页 -->
|
||||
<!-- 施工人员-班组骨干、一般作业、特种作业详情页 -->
|
||||
<select id="getTeamMasterDetails" resultType="com.bonus.screen.vo.TeamRecord">
|
||||
select
|
||||
tp.rel_name as peopleName,
|
||||
|
|
@ -70,9 +76,20 @@
|
|||
tp.rel_phone as phone,
|
||||
tp.post_code as postCode
|
||||
from tb_people tp
|
||||
left join tb_team tt on tp.team_id = tt.id and tt.del_flag = 0
|
||||
where (tp.post_code = '0900101' or tp.post_code = '0900102' or tp.post_code = '0900103')
|
||||
and tp.del_flag = 0
|
||||
left join tb_team tt on tp.team_id = tt.id and tt.del_flag = 0 and tt.js_time IS NULL
|
||||
where tp.del_flag = 0
|
||||
<if test="isFlag != null and isFlag == 1">
|
||||
and tp.post_code IN ('0900101', '0900102', '0900103')
|
||||
</if>
|
||||
<if test="isFlag != null and isFlag == 2">
|
||||
and tp.post_code = '0900104'
|
||||
</if>
|
||||
<if test="isFlag != null and isFlag == 3">
|
||||
and tp.post_code = '0900106'
|
||||
</if>
|
||||
<if test="proId != null">
|
||||
AND tt.pro_id = #{proId}
|
||||
</if>
|
||||
<if test="peopleName != null and peopleName != ''">
|
||||
and tp.rel_name like concat('%',#{peopleName},'%')
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue