提交代码
parent
8edb022406
commit
9fc9b9e3b2
|
@ -202,7 +202,6 @@ public class SurProjectAttendanceData extends BaseEntity
|
|||
@Excel(name = "工人Id")
|
||||
private String workerId;
|
||||
|
||||
|
||||
/** 考勤时间yyyy-MM-dd HH:mm:ss */
|
||||
@Excel(name = "考勤时间yyyy-MM-dd HH:mm:ss")
|
||||
private String attendanceTime;
|
||||
|
@ -227,24 +226,31 @@ public class SurProjectAttendanceData extends BaseEntity
|
|||
@Excel(name = "平台对应分包商ID")
|
||||
private Long vendorId;
|
||||
|
||||
|
||||
/** 设备编号 */
|
||||
@Excel(name = "设备编号")
|
||||
private String deviceCode;
|
||||
|
||||
|
||||
/** 照片 */
|
||||
@Excel(name = "照片")
|
||||
private String scanPhoto;
|
||||
|
||||
|
||||
/** */
|
||||
@Excel(name = "数据是否有效")
|
||||
private Long isDel;
|
||||
|
||||
|
||||
private Long subDeptId;
|
||||
|
||||
/** 重要::yanzhu接口接收base64图片 */
|
||||
private String scanPhotoBase64;
|
||||
|
||||
public String getScanPhotoBase64() {
|
||||
return scanPhotoBase64;
|
||||
}
|
||||
|
||||
public void setScanPhotoBase64(String scanPhotoBase64) {
|
||||
this.scanPhotoBase64 = scanPhotoBase64;
|
||||
}
|
||||
|
||||
public static SurProjectAttendanceData createFromHuazhu(JSONObject j) {
|
||||
SurProjectAttendanceData d=new SurProjectAttendanceData();
|
||||
d.vendorsCode="huazhu";
|
||||
|
|
|
@ -157,14 +157,25 @@ public class SurProjectAttendanceUser extends BaseEntity
|
|||
@Excel(name = "服务返回的JSON")
|
||||
private String other;
|
||||
|
||||
/** */
|
||||
@Excel(name = "")
|
||||
/** 是否有效 */
|
||||
@Excel(name = "是否有效")
|
||||
private Long isDel;
|
||||
|
||||
/** 人员部门类型 */
|
||||
@Excel(name = "人员部门类型")
|
||||
private String companyTypeId;
|
||||
|
||||
/** 重要::yanzhu接口接收base64图片 */
|
||||
private String recentPhotoBase64;
|
||||
|
||||
public String getRecentPhotoBase64() {
|
||||
return recentPhotoBase64;
|
||||
}
|
||||
|
||||
public void setRecentPhotoBase64(String recentPhotoBase64) {
|
||||
this.recentPhotoBase64 = recentPhotoBase64;
|
||||
}
|
||||
|
||||
private Date inTime;
|
||||
private Date outTime;
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ public class LabourDataVo extends BaseEntity
|
|||
private String workerId;
|
||||
|
||||
/** 分包商id */
|
||||
@NotNull(message = "分包商ID不能为空")
|
||||
private Long companyId;
|
||||
@NotBlank(message = "分包商ID不能为空")
|
||||
private String companyId;
|
||||
|
||||
/** 进门还是出门E进,L出 */
|
||||
/**
|
||||
|
@ -66,11 +66,11 @@ public class LabourDataVo extends BaseEntity
|
|||
this.workerId = workerId;
|
||||
}
|
||||
|
||||
public Long getCompanyId() {
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(Long companyId) {
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@ public class LabourGroupVO {
|
|||
private String serverid;
|
||||
|
||||
/** 分包商id */
|
||||
@NotNull(message = "分包商ID不能为空")
|
||||
private Long companyId;
|
||||
@NotBlank(message = "分包商ID不能为空")
|
||||
private String companyId;
|
||||
|
||||
/** 分包商名称 */
|
||||
@NotBlank(message = "分包商名称不能为空")
|
||||
|
@ -43,11 +43,11 @@ public class LabourGroupVO {
|
|||
this.serverid = serverid;
|
||||
}
|
||||
|
||||
public Long getCompanyId() {
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(Long companyId) {
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,8 +74,8 @@ public class LabourUserVO {
|
|||
private String enterDate;
|
||||
|
||||
/** 分包商id */
|
||||
@NotNull(message = "分包商ID不能为空")
|
||||
private Long companyId;
|
||||
@NotBlank(message = "分包商ID不能为空")
|
||||
private String companyId;
|
||||
|
||||
/** 分包商名称 */
|
||||
@Size(max = 64, message = "分包商名称最大64位")
|
||||
|
@ -190,11 +190,11 @@ public class LabourUserVO {
|
|||
this.enterDate = enterDate;
|
||||
}
|
||||
|
||||
public Long getCompanyId() {
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(Long companyId) {
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,9 +119,10 @@ public class AttendanceJgwTask {
|
|||
System.out.println(DateUtil.format(DateTime.now(),"yyyy-MM-dd"));
|
||||
//findAddWorkerByProject(appid,token,prjId,0);
|
||||
//findAttendanceByProject(appid,token,prjId);
|
||||
findTeamByProjectId(appid,token,prjId);
|
||||
//findTeamByProjectId(appid,token,prjId);
|
||||
//findProContractorByProjectId(appid,token,prjId);
|
||||
//getJobTypeData(appid,token,"0");
|
||||
findDirectlyUnderTeam(appid,token,prjId);
|
||||
}
|
||||
public static HashMap<String,String> getJobTypeData(String appId,String token,String type){
|
||||
String path="/webapi/dictInfo/getJobTypeData";
|
||||
|
@ -291,6 +292,95 @@ public class AttendanceJgwTask {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void querySubcontractorByPhone(String appId,String token,String projectId){
|
||||
String path="webapi/project/querySubcontractorByPhone";
|
||||
String time = System.currentTimeMillis() + "";
|
||||
String startId="100";
|
||||
String url=host+path+"?appId=" + appId + "&tokenSign=" + token +"×tamp=" + time;
|
||||
|
||||
String tokenSign = Md5Utils.hash(url);
|
||||
String phone = "18171295380";
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("appId",appId);
|
||||
params.put("timestamp",time);
|
||||
params.put("tokenSign",tokenSign);
|
||||
params.put("phone",phone);
|
||||
url=host+path+"?appId="+appId+"&tokenSign="+tokenSign+"&phone="+phone+"×tamp="+time;
|
||||
Request request = new Request.Builder()
|
||||
.url(url)
|
||||
.post(toFormBody(params))
|
||||
.build();
|
||||
String data=AttendanceTask.getResult(request);
|
||||
JSONObject j= JSON.parseObject(data);
|
||||
JSONObject joData= j.getJSONObject("data");
|
||||
JSONArray arr=joData.getJSONArray("teamList");
|
||||
if(arr.size()>0){
|
||||
for(int i=0;i<arr.size();i++){
|
||||
JSONObject json=arr.getJSONObject(i);
|
||||
SurProjectAttendanceGroup group=SurProjectAttendanceGroup.createJgw(json);
|
||||
group.setBizLicense(json.getString("corpCode"));
|
||||
String type=json.getString("corpType");
|
||||
if("009".equals(type)){ //总包人员
|
||||
group.setCompanyTypeId("1");
|
||||
}else if("007".equals(type)){//监理人员
|
||||
group.setCompanyTypeId("8");
|
||||
}else if("006".equals(type)){//劳务人员
|
||||
group.setCompanyTypeId("2");
|
||||
}
|
||||
if(StrUtil.isNotEmpty(group.getCompanyTypeId())){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void findDirectlyUnderTeam(String appId,String token,String projectId){
|
||||
String path="webapi/project/findDirectlyUnderTeam";
|
||||
String time = System.currentTimeMillis() + "";
|
||||
String startId="0";
|
||||
String url=host+path+"?appId=" + appId + "&tokenSign=" + token +"×tamp=" + time;
|
||||
|
||||
String tokenSign = Md5Utils.hash(url);
|
||||
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("appId",appId);
|
||||
params.put("timestamp",time);
|
||||
params.put("tokenSign",tokenSign);
|
||||
params.put("projectId",projectId);
|
||||
params.put("subcontractorld","ddcffe48c6a7413a91bbf6eafbf037a9");
|
||||
params.put("rowId",0);
|
||||
url=host+path+"?appId="+appId+"&tokenSign="+tokenSign+"&projectId="+projectId+"×tamp="+time+"&subcontractorld="+params.get("subcontractorld").toString()+"&rowId="+startId;
|
||||
Request request = new Request.Builder()
|
||||
.url(url)
|
||||
.post(toFormBody(params))
|
||||
.build();
|
||||
String data=AttendanceTask.getResult(request);
|
||||
JSONObject j= JSON.parseObject(data);
|
||||
JSONObject joData= j.getJSONObject("data");
|
||||
JSONArray arr=joData.getJSONArray("teamList");
|
||||
if(arr.size()>0){
|
||||
for(int i=0;i<arr.size();i++){
|
||||
JSONObject json=arr.getJSONObject(i);
|
||||
SurProjectAttendanceGroup group=SurProjectAttendanceGroup.createJgw(json);
|
||||
group.setBizLicense(json.getString("corpCode"));
|
||||
String type=json.getString("corpType");
|
||||
if("009".equals(type)){ //总包人员
|
||||
group.setCompanyTypeId("1");
|
||||
}else if("007".equals(type)){//监理人员
|
||||
group.setCompanyTypeId("8");
|
||||
}else if("006".equals(type)){//劳务人员
|
||||
group.setCompanyTypeId("2");
|
||||
}
|
||||
if(StrUtil.isNotEmpty(group.getCompanyTypeId())){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void findAddWorkerByProject(String appId,String token,String projectId,int startId){
|
||||
String path="/webapi/project/findAddWorkerByProject";
|
||||
String time = System.currentTimeMillis() + "";
|
||||
|
|
|
@ -2,7 +2,9 @@ package com.yanzhu.jh.publics;
|
|||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.annotation.RateLimiter;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.enums.LimitType;
|
||||
import com.yanzhu.jh.video.domain.DevAiProjectDataVO;
|
||||
import com.yanzhu.jh.video.service.IDevAiProjectDataService;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -35,6 +37,7 @@ public class AIBoxController extends BaseController {
|
|||
* aibox推送预警数据
|
||||
*/
|
||||
@PostMapping("/v1/push")
|
||||
@RateLimiter(count = 10, limitType = LimitType.IP)
|
||||
public void push(@RequestBody Map<String,Object> dataMap)
|
||||
{
|
||||
try{
|
||||
|
|
|
@ -115,6 +115,13 @@ public interface SmzSspProblemmodifyMapper
|
|||
*/
|
||||
public List<SmzSspProblemmodify> countByDate(SmzSspProblemmodifyWhere where);
|
||||
|
||||
/**
|
||||
* 查询某天预警数[新&合并结果集]
|
||||
* @param where startDate 查询的日期
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> countByDateNew(SmzSspProblemmodifyWhere where);
|
||||
|
||||
/**
|
||||
* 根据项目统计隐患排查
|
||||
*
|
||||
|
@ -130,8 +137,22 @@ public interface SmzSspProblemmodifyMapper
|
|||
*/
|
||||
public List<SmzSspProblemmodify> countByDateRange(SmzSspProblemmodifyWhere where);
|
||||
|
||||
/**
|
||||
* 查询两个日期之间的预警数[新&合并结果集]
|
||||
* @param where startDate 开始日期 endDate 结束日期
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> countByDateRangeNew(SmzSspProblemmodifyWhere where);
|
||||
|
||||
public List<SmzSspProblemmodify> groupByInfotypeCheckState(SmzSspProblemmodifyWhere where);
|
||||
|
||||
/**
|
||||
* 分组查询预警提醒
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> groupByInfotypeCheckStateNew(SmzSspProblemmodifyWhere where);
|
||||
|
||||
public int countTimeout(SmzSspProblemmodifyWhere where);
|
||||
|
||||
/**
|
||||
|
|
|
@ -122,10 +122,31 @@ public interface ISmzSspProblemmodifyService
|
|||
|
||||
public List<SmzSspProblemmodify> countByDate(SmzSspProblemmodifyWhere where);
|
||||
|
||||
/**
|
||||
* 查询某天预警数[新&合并结果集]
|
||||
* @param where startDate 查询的日期
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> countByDateNew(SmzSspProblemmodifyWhere where);
|
||||
|
||||
public List<SmzSspProblemmodify> countByDateRange(SmzSspProblemmodifyWhere where);
|
||||
|
||||
/**
|
||||
* 查询两个日期之间的预警数[新&合并结果集]
|
||||
* @param where startDate 开始日期 endDate 结束日期
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> countByDateRangeNew(SmzSspProblemmodifyWhere where);
|
||||
|
||||
public List<SmzSspProblemmodify> groupByInfotypeCheckState(SmzSspProblemmodifyWhere where);
|
||||
|
||||
/**
|
||||
* 分组查询预警提醒
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> groupByInfotypeCheckStateNew(SmzSspProblemmodifyWhere where);
|
||||
|
||||
public Long countTimeout(SmzSspProblemmodifyWhere where);
|
||||
|
||||
public List<SmzSspProblemmodify> selectSmzSspProblemmodifyListAndUnitName(SmzSspProblemmodifyWhere where);
|
||||
|
|
|
@ -226,16 +226,47 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi
|
|||
return smzSspProblemmodifyMapper.countByDate(where);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询某天预警数[新&合并结果集]
|
||||
* @param where startDate 查询的日期
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> countByDateNew(SmzSspProblemmodifyWhere where) {
|
||||
List<Map<String, Object>> list = smzSspProblemmodifyMapper.countByDateNew(where);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SmzSspProblemmodify> countByDateRange(SmzSspProblemmodifyWhere where) {
|
||||
return smzSspProblemmodifyMapper.countByDateRange(where);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询两个日期之间的预警数[新&合并结果集]
|
||||
* @param where startDate 开始日期 endDate 结束日期
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> countByDateRangeNew(SmzSspProblemmodifyWhere where) {
|
||||
return smzSspProblemmodifyMapper.countByDateRangeNew(where);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SmzSspProblemmodify> groupByInfotypeCheckState(SmzSspProblemmodifyWhere where) {
|
||||
return smzSspProblemmodifyMapper.groupByInfotypeCheckState(where);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分组查询预警提醒
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> groupByInfotypeCheckStateNew(SmzSspProblemmodifyWhere where) {
|
||||
return smzSspProblemmodifyMapper.groupByInfotypeCheckStateNew(where);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long countTimeout(SmzSspProblemmodifyWhere where) {
|
||||
return (long) smzSspProblemmodifyMapper.countTimeout(where);
|
||||
|
|
|
@ -431,6 +431,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
COUNT(1) as roleType
|
||||
FROM
|
||||
smz_ssp_problemmodify sp
|
||||
left join sur_project p on p.id=sp.projectId
|
||||
left join sys_dict_data sd on sd.dict_value=sp.danger_type
|
||||
<if test="infoType==0">and sd.dict_type = 'ssp_aqyhlx'</if>
|
||||
<if test="infoType==1">and sd.dict_type = 'ssp_zlyhlx'</if>
|
||||
|
@ -440,7 +441,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="startDate!=null">and DATE(sp.createtime) >= DATE(#{startDate})</if>
|
||||
<if test="endDate!=null">and DATE(sp.createtime) <= DATE(#{endDate})</if>
|
||||
<if test="projectId>0">and sp.projectId=#{projectId}</if>
|
||||
<if test="deptId >0 ">AND sp.deptid = #{deptId}</if>
|
||||
<if test="deptId >0 ">AND p.deptid = #{deptId}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and sp.projectId in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
|
@ -551,7 +552,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
and DATE(createTime)=Date(#{startDate})
|
||||
GROUP BY infotype
|
||||
</select>
|
||||
|
||||
<select id="countByDateNew" parameterType="SmzSspProblemmodifyWhere" resultType="map">
|
||||
select * from (
|
||||
SELECT p.infotype,COUNT(1) as total
|
||||
FROM smz_ssp_problemmodify p
|
||||
left join sur_project sp on sp.id=p.projectId
|
||||
WHERE p.isDel=0
|
||||
<if test="projectId > 0"> and p.projectId=#{projectId}</if>
|
||||
<if test="deptId > 0 ">AND sp.deptid = #{deptId}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and p.projectId in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
and DATE(p.createTime)=Date(#{startDate})
|
||||
GROUP BY p.infotype)s1 where 1=1
|
||||
UNION ALL
|
||||
select '96' as infotype,count(1) as total from dev_ai_project_data ad
|
||||
left join sur_project sp on ad.project_id=sp.id
|
||||
where 1=1
|
||||
<if test="projectId > 0"> and ad.project_id=#{projectId}</if>
|
||||
<if test="deptId > 0 ">AND sp.deptid = #{deptId}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and ad.project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
and DATE(ad.create_time)=Date(#{startDate})
|
||||
and ad.is_del=0
|
||||
</select>
|
||||
|
||||
<select id="countByDateRange" parameterType="SmzSspProblemmodifyWhere" resultMap="SmzSspProblemmodifyResult">
|
||||
|
@ -574,6 +606,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
]]>
|
||||
GROUP BY infotype
|
||||
</select>
|
||||
|
||||
<select id="countByDateRangeNew" parameterType="SmzSspProblemmodifyWhere" resultType="map">
|
||||
select * from (
|
||||
SELECT infotype,COUNT(1) as total FROM smz_ssp_problemmodify WHERE isDel=0
|
||||
<if test="projectId > 0"> and projectId=#{projectId}</if>
|
||||
<if test="projectId <= 0">
|
||||
AND projectId IN (
|
||||
SELECT id FROM sur_project WHERE isdel=0
|
||||
<if test="deptId >0 ">AND deptid = #{id}</if>
|
||||
)
|
||||
</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and projectId in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<![CDATA[
|
||||
and DATE(createTime)>=Date(#{startDate}) and Date(createTime)<=Date(#{endDate})
|
||||
]]>
|
||||
GROUP BY infotype
|
||||
)s1 where 1=1
|
||||
UNION ALL
|
||||
select '96' as infotype,count(1) as total from dev_ai_project_data ad
|
||||
left join sur_project sp on ad.project_id=sp.id
|
||||
where 1=1
|
||||
<if test="projectId > 0"> and ad.project_id=#{projectId}</if>
|
||||
<if test="deptId > 0 ">AND sp.deptid = #{deptId}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and ad.project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
and DATE(ad.create_time) between Date(#{startDate}) and Date(#{endDate})
|
||||
and ad.is_del=0
|
||||
</select>
|
||||
|
||||
<select id="groupByInfotypeCheckState" parameterType="SmzSspProblemmodifyWhere" resultMap="SmzSspProblemmodifyResult">
|
||||
SELECT infotype,checkState,COUNT(1) id FROM vw_smz_ssp_problemmodify_audit WHERE isDel=0
|
||||
|
@ -581,7 +650,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="roleType !=null and roleType>0">and roleType=#{roleType}</if>
|
||||
<if test="startDate!=null">and DATE(createtime)>=DATE(#{startDate})</if>
|
||||
<if test="endDate!=null">and DATE(createtime) <= DATE(#{endDate})</if>
|
||||
<if test="projectId > 0"> and projectId=#{projectId}</if>
|
||||
<if test="projectId > 0"> and projectId=#{projectId}</if>
|
||||
<if test="projectId <= 0">
|
||||
AND projectId IN (
|
||||
SELECT id FROM sur_project WHERE isdel=0
|
||||
|
@ -596,6 +665,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
GROUP BY infotype,checkState
|
||||
</select>
|
||||
|
||||
<select id="groupByInfotypeCheckStateNew" parameterType="SmzSspProblemmodifyWhere" resultType="map">
|
||||
SELECT p.infotype,p.checkState,COUNT(1) as total
|
||||
FROM smz_ssp_problemmodify p
|
||||
left join sur_project sp on p.projectId=sp.id
|
||||
WHERE p.isDel=0
|
||||
<if test="projectId > 0"> and p.projectId=#{projectId}</if>
|
||||
<if test="deptId >0 ">AND sp.deptid = #{deptId}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and p.projectId in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY p.infotype,p.checkState
|
||||
UNION ALL
|
||||
select '96' as infotype,'4' as checkState,count(1) as total from dev_ai_project_data ad
|
||||
left join sur_project sp on ad.project_id=sp.id
|
||||
where 1=1
|
||||
<if test="projectId > 0"> and ad.project_id=#{projectId}</if>
|
||||
<if test="deptId > 0 ">AND sp.deptid = #{deptId}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and ad.project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
and ad.is_del=0
|
||||
</select>
|
||||
|
||||
<select id="countTimeout" parameterType="SmzSspProblemmodifyWhere" resultType="Integer">
|
||||
select count(1) cnt
|
||||
FROM vw_smz_ssp_problemmodify_audit WHERE isDel=0
|
||||
|
|
Loading…
Reference in New Issue