update code
parent
355db93705
commit
366ef273e9
|
@ -24,7 +24,7 @@ spring:
|
||||||
# 国际化资源文件路径
|
# 国际化资源文件路径
|
||||||
basename: i18n/messages
|
basename: i18n/messages
|
||||||
profiles:
|
profiles:
|
||||||
active: prod
|
active: druid
|
||||||
# 文件上传
|
# 文件上传
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
|
|
|
@ -7,6 +7,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.enums.SysRoleEnum;
|
import com.ruoyi.common.enums.SysRoleEnum;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.system.service.ISysDeptService;
|
import com.ruoyi.system.service.ISysDeptService;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectFunVerify;
|
import com.yanzhu.jh.project.domain.SurProjectFunVerify;
|
||||||
|
@ -148,4 +149,19 @@ public class SurProjectFunVerifyController extends BaseController
|
||||||
return toAjax(surProjectFunVerifyService.deleteSurProjectFunVerifyByIds(ids));
|
return toAjax(surProjectFunVerifyService.deleteSurProjectFunVerifyByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/groupByCheckType")
|
||||||
|
public AjaxResult groupByCheckType(String deptId, String projectId){
|
||||||
|
SurProjectFunVerify where=new SurProjectFunVerify();
|
||||||
|
if(deptId!=null && !"0".equals(deptId)){
|
||||||
|
where.setProjectDeptId(deptId);
|
||||||
|
}else{
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(projectId!=null && !"0".equals(projectId)){
|
||||||
|
where.setProjectId(Convert.toLong(projectId));
|
||||||
|
}
|
||||||
|
return AjaxResult.success(surProjectFunVerifyService.groupByCheckType(where));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,4 +60,5 @@ public interface SurProjectFunVerifyMapper
|
||||||
*/
|
*/
|
||||||
public int deleteSurProjectFunVerifyByIds(Long[] ids);
|
public int deleteSurProjectFunVerifyByIds(Long[] ids);
|
||||||
|
|
||||||
|
List<SurProjectFunVerify> groupByCheckType(SurProjectFunVerify where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,4 +77,5 @@ public interface ISurProjectFunVerifyService
|
||||||
*/
|
*/
|
||||||
public int deleteSurProjectFunVerifyById(Long id);
|
public int deleteSurProjectFunVerifyById(Long id);
|
||||||
|
|
||||||
|
public List<SurProjectFunVerify> groupByCheckType(SurProjectFunVerify where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,4 +199,9 @@ public class SurProjectFunVerifyServiceImpl extends WeChatMessageServiceImpl imp
|
||||||
{
|
{
|
||||||
return surProjectFunVerifyMapper.deleteSurProjectFunVerifyById(id);
|
return surProjectFunVerifyMapper.deleteSurProjectFunVerifyById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SurProjectFunVerify> groupByCheckType(SurProjectFunVerify where) {
|
||||||
|
return surProjectFunVerifyMapper.groupByCheckType(where);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,5 +186,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
<select id="groupByCheckType" parameterType="SurProjectFunVerify" resultMap="SurProjectFunVerifyResult">
|
||||||
|
SELECT a.dict_label AS check_name,
|
||||||
|
a.dict_value AS check_type,
|
||||||
|
COALESCE(b.id, 0) AS id
|
||||||
|
FROM sys_dict_data a
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT sf.check_type, COUNT(1) AS id
|
||||||
|
FROM sur_project_fun_verify sf left join sur_project sp on sf.project_id = sp.id
|
||||||
|
WHERE sf.is_del = 0 and sp.isDel=0
|
||||||
|
<if test="projectId != null "> and sf.project_id = #{projectId}</if>
|
||||||
|
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||||
|
<if test="proType != null and proType != ''"> and sp.projectType = #{proType}</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and sf.project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
GROUP BY sf.check_type
|
||||||
|
) b ON a.dict_value = b.check_type
|
||||||
|
WHERE a.dict_type = 'project_fun_verify_type';
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue