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