边带管理、施工记录bug
This commit is contained in:
parent
1d124fb598
commit
6a4bed6d4c
|
|
@ -5,13 +5,16 @@ import com.bonus.common.core.annotation.Excel.ColumnType;
|
||||||
import com.bonus.common.core.web.domain.BaseEntity;
|
import com.bonus.common.core.web.domain.BaseEntity;
|
||||||
import com.bonus.common.entity.file.ResourceFileVo;
|
import com.bonus.common.entity.file.ResourceFileVo;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 边带表 sys_sideband
|
* 边带表 sys_sideband
|
||||||
|
|
@ -58,5 +61,21 @@ public class SidebandVo
|
||||||
@Excel(name = "绑定设备数量", cellType = ColumnType.NUMERIC)
|
@Excel(name = "绑定设备数量", cellType = ColumnType.NUMERIC)
|
||||||
private int bindNum;
|
private int bindNum;
|
||||||
|
|
||||||
|
/** 请求参数 */
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
|
private Map<String, Object> params;
|
||||||
|
|
||||||
|
public Map<String, Object> getParams()
|
||||||
|
{
|
||||||
|
if (params == null)
|
||||||
|
{
|
||||||
|
params = new HashMap<>();
|
||||||
|
}
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParams(Map<String, Object> params)
|
||||||
|
{
|
||||||
|
this.params = params;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,4 +46,19 @@ public interface QueryConstructionMapper
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<QueryConstruction> getConstructionSomeLists(int[] ids);
|
public List<QueryConstruction> getConstructionSomeLists(int[] ids);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取施工班组人数
|
||||||
|
* @param teamId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int getTeamNum(Long teamId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取临时人数
|
||||||
|
* @param teamId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int getTempNum(Long teamId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,10 @@ public class QueryConstructionServiceImpl implements IQueryConstructionService
|
||||||
public List<QueryConstruction> selectConstructionList(QueryConstruction construction)
|
public List<QueryConstruction> selectConstructionList(QueryConstruction construction)
|
||||||
{
|
{
|
||||||
List<QueryConstruction> list = constructionMapper.selectConstructionList(construction);
|
List<QueryConstruction> list = constructionMapper.selectConstructionList(construction);
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
list.get(i).setTeamNum(constructionMapper.getTeamNum(list.get(i).getTeamId()));
|
||||||
|
list.get(i).setTempNum(constructionMapper.getTempNum(list.get(i).getTeamId()));
|
||||||
|
}
|
||||||
for (QueryConstruction vo : list) {
|
for (QueryConstruction vo : list) {
|
||||||
vo.setTeamPhone(Sm4Utils.decode(vo.getTeamPhone()));
|
vo.setTeamPhone(Sm4Utils.decode(vo.getTeamPhone()));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,17 +6,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<!--施工记录列表-->
|
<!--施工记录列表-->
|
||||||
<select id="selectConstructionList" resultType="com.bonus.common.entity.bracelet.vo.QueryConstruction">
|
<select id="selectConstructionList" resultType="com.bonus.common.entity.bracelet.vo.QueryConstruction">
|
||||||
select tp.pro_name as proName,tpd.depart_name as departName,twt.team_name as teamName,twt.team_leader as teamLeader,twt.leader_phone as teamPhone,
|
select tp.pro_name as proName,tpd.depart_name as departName,twt.team_name as teamName,twt.team_leader as teamLeader,twt.leader_phone as teamPhone,
|
||||||
count(DISTINCT tbp.id) as teamNum,count(DISTINCT tlu.id) as tempNum,a.lytime as lyTime,count(DISTINCT tw.id) as warnNum,a.teamid as teamId
|
a.lytime as lyTime,a.teamid as teamId,count(tw.id) as warnNum
|
||||||
from
|
from
|
||||||
(select tdu.pro_id as proid,tdu.team_id as teamid,tdub.ly_time as lytime
|
(select tdu.pro_id as proid,tdu.team_id as teamid,tdub.ly_time as lytime
|
||||||
from tb_dev_use tdu
|
from tb_dev_use tdu
|
||||||
left join tb_dev_use_bid tdub on tdub.id = tdu.id and tdub.dev_type = 'shx'
|
left join tb_dev_use_bid tdub on tdu.id = tdub.id
|
||||||
where tdu.del_flag = 0) a
|
where tdu.del_flag = 0 and tdub.dev_type = 'shx') a
|
||||||
left join tb_project tp on tp.id = a.proid and tp.del_flag = 0
|
left join tb_project tp on tp.id = a.proid and tp.del_flag = 0
|
||||||
left join t_work_team twt on twt.team_id = a.teamid and twt.pro_id = tp.id and twt.del_flag = 0
|
left join t_work_team twt on twt.team_id = a.teamid and twt.del_flag = 0
|
||||||
left join tb_project_depart tpd on tpd.id = tp.depart_id
|
left join tb_project_depart tpd on tpd.id = tp.depart_id
|
||||||
left join tb_people tbp on tbp.team_id = a.teamid and tbp.del_flag = 0
|
|
||||||
left join tb_ls_user tlu on tlu.team_id = a.teamid
|
|
||||||
left join tb_warn tw on tw.team_id = a.teamid and tw.del_flag = 0
|
left join tb_warn tw on tw.team_id = a.teamid and tw.del_flag = 0
|
||||||
<where>
|
<where>
|
||||||
<if test="proName != null and proName != ''">
|
<if test="proName != null and proName != ''">
|
||||||
|
|
@ -41,11 +39,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="getTeamLists" resultType="com.bonus.common.entity.bracelet.vo.PersonVo">
|
<select id="getTeamLists" resultType="com.bonus.common.entity.bracelet.vo.PersonVo">
|
||||||
select tp.id as id,tp.name as name,tp.sex as sex,tp.id_card as idCard,tp.phone as phone,
|
select tp.id as id,tp.name as name,tp.sex as sex,tp.id_card as idCard,tp.phone as phone,
|
||||||
tp.aqm_code as aqmCode,tp.mj_code as mjCode,sfs.file_path AS filePath,sfs.id AS fileId
|
tp.aqm_code as aqmCode,tp.mj_code as mjCode,sfs.file_path AS filePath,sfs.id AS fileId
|
||||||
from t_work_team twt
|
from tb_people tp
|
||||||
left join tb_people tp on twt.team_id = tp.team_id and tp.del_flag = 0
|
left join t_work_team twt on tp.team_id = twt.team_id and twt.del_flag = 0
|
||||||
left join sys_file_source sfs on tp.id = sfs.source_id AND sfs.source_type = #{sourceType} AND sfs.del_flag = 0
|
left join sys_file_source sfs on tp.id = sfs.source_id AND sfs.source_type = #{sourceType} AND sfs.del_flag = 0
|
||||||
<where>
|
<where>
|
||||||
twt.team_id = #{teamId} and twt.del_flag = 0
|
twt.team_id = #{teamId} and tp.del_flag = 0
|
||||||
<if test="name != null and name!=''">
|
<if test="name != null and name!=''">
|
||||||
AND INSTR(tp.name,#{name}) > 0
|
AND INSTR(tp.name,#{name}) > 0
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -59,11 +57,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="getTempLists" resultType="com.bonus.common.entity.bracelet.vo.PersonVo">
|
<select id="getTempLists" resultType="com.bonus.common.entity.bracelet.vo.PersonVo">
|
||||||
select tlu.id as id,tlu.name as name,tlu.sex as sex,tlu.id_card as idCard,tlu.phone as phone,
|
select tlu.id as id,tlu.name as name,tlu.sex as sex,tlu.id_card as idCard,tlu.phone as phone,
|
||||||
sfs.file_path AS filePath,sfs.id AS fileId
|
sfs.file_path AS filePath,sfs.id AS fileId
|
||||||
from t_work_team twt
|
from tb_ls_user tlu
|
||||||
left join tb_ls_user tlu on twt.team_id = tlu.team_id
|
left join t_work_team twt on tlu.team_id = twt.team_id and twt.del_flag = 0
|
||||||
left join sys_file_source sfs on tlu.id = sfs.source_id AND sfs.source_type = #{sourceType} AND sfs.del_flag = 0
|
left join sys_file_source sfs on tlu.id = sfs.source_id AND sfs.source_type = #{sourceType} AND sfs.del_flag = 0
|
||||||
<where>
|
<where>
|
||||||
twt.team_id = #{teamId} and twt.del_flag = 0
|
twt.team_id = #{teamId}
|
||||||
<if test="name != null and name!=''">
|
<if test="name != null and name!=''">
|
||||||
AND INSTR(tlu.name,#{name}) > 0
|
AND INSTR(tlu.name,#{name}) > 0
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -109,4 +107,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
group by proName,departName,teamName,teamLeader,teamPhone,a.lytime,a.teamid
|
group by proName,departName,teamName,teamLeader,teamPhone,a.lytime,a.teamid
|
||||||
order by a.lytime desc
|
order by a.lytime desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!--获取施工班组人数-->
|
||||||
|
<select id="getTeamNum" resultType="int">
|
||||||
|
select count(id) as teamNum
|
||||||
|
from tb_people tbp
|
||||||
|
where tbp.team_id = #{teamId} and tbp.del_flag = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--获取临时人数-->
|
||||||
|
<select id="getTempNum" resultType="int">
|
||||||
|
select count(id) as tempNum
|
||||||
|
from tb_ls_user tlu
|
||||||
|
where tlu.team_id = #{teamId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -23,8 +23,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="gtCode != null and gtCode!=''">
|
<if test="gtCode != null and gtCode!=''">
|
||||||
AND INSTR(ss.gt_code,#{gtCode}) > 0
|
AND INSTR(ss.gt_code,#{gtCode}) > 0
|
||||||
</if>
|
</if>
|
||||||
<if test="bindTime != null">
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
and date_format(ss.bind_time,'%y%m%d') = date_format(#{bindTime},'%y%m%d')
|
and date_format(ss.bind_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
and date_format(ss.bind_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
group by ss.id
|
group by ss.id
|
||||||
order by ss.id ASC
|
order by ss.id ASC
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue