电子看板-杆塔施工进度数量
This commit is contained in:
parent
516310a680
commit
993dfeeaec
|
|
@ -1,15 +1,12 @@
|
|||
package com.bonus.digitalSignage.backstage.controller;
|
||||
|
||||
import com.bonus.digitalSignage.annotation.DecryptAndVerify;
|
||||
import com.bonus.digitalSignage.annotation.LogAnnotation;
|
||||
import com.bonus.digitalSignage.backstage.entity.dto.QueryParamDto;
|
||||
import com.bonus.digitalSignage.backstage.service.DigitalSignageService;
|
||||
import com.bonus.digitalSignage.system.vo.EncryptedReq;
|
||||
import com.bonus.digitalSignage.utils.ServerResponse;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
|
@ -37,4 +34,11 @@ public class DigitalSignageController {
|
|||
public ServerResponse getProTree(EncryptedReq<QueryParamDto> dto) {
|
||||
return service.getProTree(dto.getData());
|
||||
}
|
||||
|
||||
@ApiOperation("电子看板-杆塔施工进度数量")
|
||||
@PostMapping(value = "getTowerProgressNum")
|
||||
@DecryptAndVerify(decryptedClass = QueryParamDto.class)//加解密统一管理
|
||||
public ServerResponse getTowerProgressNum(EncryptedReq<QueryParamDto> dto) {
|
||||
return service.getTowerProgressNum(dto.getData());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.digitalSignage.backstage.dao;
|
||||
|
||||
import com.bonus.digitalSignage.backstage.entity.dto.QueryParamDto;
|
||||
import com.bonus.digitalSignage.backstage.entity.vo.DigitalSignageVo;
|
||||
import com.bonus.digitalSignage.backstage.entity.vo.ProTreeVo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
|
|
@ -23,4 +24,22 @@ public interface DigitalSignageDao {
|
|||
* @date 2025/4/24 10:49
|
||||
*/
|
||||
List<ProTreeVo> getProTree(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 电子看板-杆塔施工进度数量
|
||||
* @param dto
|
||||
* @return TowerProgressNumVo
|
||||
* @author cwchen
|
||||
* @date 2025/4/24 13:55
|
||||
*/
|
||||
DigitalSignageVo.TowerProgressNumVo getTowerProgressNum(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 查询索道运输数量
|
||||
* @param dto
|
||||
* @return int
|
||||
* @author cwchen
|
||||
* @date 2025/4/24 13:59
|
||||
*/
|
||||
int getRopewayTransNum(QueryParamDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
package com.bonus.digitalSignage.backstage.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @className:DigitalSignageVo
|
||||
* @author:cwchen
|
||||
* @date:2025-04-24-13:41
|
||||
* @version:1.0
|
||||
* @description:电子看板-vo
|
||||
*/
|
||||
@Data
|
||||
public class DigitalSignageVo {
|
||||
|
||||
@Data
|
||||
public static class TowerProgressNumVo {
|
||||
/**基础开挖*/
|
||||
private int num1;
|
||||
/**开挖完成*/
|
||||
private int num2;
|
||||
/**浇筑完成*/
|
||||
private int num3;
|
||||
/**铁塔组立*/
|
||||
private int num4;
|
||||
/**组塔完成*/
|
||||
private int num5;
|
||||
/**架线完成*/
|
||||
private int num6;
|
||||
/**附件安装*/
|
||||
private int num7;
|
||||
/**未开始*/
|
||||
private int num8;
|
||||
/**索道运输*/
|
||||
private int num9;
|
||||
}
|
||||
}
|
||||
|
|
@ -19,4 +19,13 @@ public interface DigitalSignageService {
|
|||
* @date 2025/4/24 10:39
|
||||
*/
|
||||
ServerResponse getProTree(QueryParamDto data);
|
||||
|
||||
/**
|
||||
* 电子看板-杆塔施工进度数量
|
||||
* @param data
|
||||
* @return ServerResponse
|
||||
* @author cwchen
|
||||
* @date 2025/4/24 13:52
|
||||
*/
|
||||
ServerResponse getTowerProgressNum(QueryParamDto data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.bonus.digitalSignage.backstage.service.impl;
|
|||
|
||||
import com.bonus.digitalSignage.backstage.dao.DigitalSignageDao;
|
||||
import com.bonus.digitalSignage.backstage.entity.dto.QueryParamDto;
|
||||
import com.bonus.digitalSignage.backstage.entity.vo.DigitalSignageVo;
|
||||
import com.bonus.digitalSignage.backstage.entity.vo.ProProgressVo;
|
||||
import com.bonus.digitalSignage.backstage.entity.vo.ProTreeVo;
|
||||
import com.bonus.digitalSignage.backstage.service.DigitalSignageService;
|
||||
import com.bonus.digitalSignage.utils.ServerResponse;
|
||||
|
|
@ -62,4 +64,18 @@ public class DigitalSignageServiceImpl implements DigitalSignageService {
|
|||
}
|
||||
return tree;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerResponse getTowerProgressNum(QueryParamDto dto) {
|
||||
DigitalSignageVo.TowerProgressNumVo vo = new DigitalSignageVo.TowerProgressNumVo();
|
||||
try {
|
||||
vo = Optional.ofNullable(dao.getTowerProgressNum(dto)).orElseGet(DigitalSignageVo.TowerProgressNumVo::new);
|
||||
// 查询索道运输数量
|
||||
int num = dao.getRopewayTransNum(dto);
|
||||
vo.setNum9(num);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return ServerResponse.createSuccess(vo);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,4 +41,23 @@
|
|||
</where>
|
||||
) A
|
||||
</select>
|
||||
<!--电子看板-杆塔施工进度数量-->
|
||||
<select id="getTowerProgressNum"
|
||||
resultType="com.bonus.digitalSignage.backstage.entity.vo.DigitalSignageVo$TowerProgressNumVo">
|
||||
SELECT COUNT(IF(tower_progress >= 1, 1, NULL)) AS num1,
|
||||
COUNT(IF(tower_progress >= 2, 1, NULL)) AS num2,
|
||||
COUNT(IF(tower_progress >= 3, 1, NULL)) AS num3,
|
||||
COUNT(IF(tower_progress >= 4, 1, NULL)) AS num4,
|
||||
COUNT(IF(tower_progress >= 5, 1, NULL)) AS num5,
|
||||
COUNT(IF(tower_progress >= 6, 1, NULL)) AS num6,
|
||||
COUNT(IF(tower_progress >= 7, 1, NULL)) AS num7,
|
||||
COUNT(IF(tower_progress = 0, 1, NULL)) AS num8
|
||||
FROM tb_tower WHERE pro_id = #{id} AND is_actvice = '1'
|
||||
</select>
|
||||
<!--查询索道运输数量-->
|
||||
<select id="getRopewayTransNum" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*)
|
||||
FROM tb_cablewa_trans
|
||||
WHERE pro_id = #{id} AND is_active = '1'
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue