update code
parent
c5193f0c10
commit
fd1ea49ae0
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="cost-month" style="border:solid 1px #409eff;margin: 12px 0px;padding: 6px 12px 0px;position: relative;">
|
||||
<el-popover placement="top" v-model="showPop2">
|
||||
<el-popover placement="top" v-model="showPop2" ref="pop">
|
||||
<p>选择年份</p>
|
||||
<div style="margin-bottom: 12px;">
|
||||
<el-date-picker v-model="selYear" type="year" placeholder="选择年" :picker-options="{disabledDate:doPick}" >
|
||||
|
@ -32,7 +32,7 @@ export default {
|
|||
name: 'RuoyiUiCostMonth',
|
||||
|
||||
data() {
|
||||
return {
|
||||
return {
|
||||
selYear:'',
|
||||
names:['','一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'],
|
||||
activeName:'',
|
||||
|
@ -47,15 +47,17 @@ export default {
|
|||
|
||||
methods: {
|
||||
doPick(a,b){
|
||||
return this.yearInv.filter(d=>d.year==a.getFullYear()).length>0;
|
||||
return this.monthInv.filter(d=>d.year==a.getFullYear()).length>0;
|
||||
},
|
||||
doAddYear(){
|
||||
doAddYear(){
|
||||
addMonthInvestment({year:this.$dt(this.selYear).$y,projectId:this.prj.id,costType:9}).then(d=>{
|
||||
this.$refs.pop.showPopper=false
|
||||
this.$emit('success');
|
||||
});
|
||||
},
|
||||
init(d){
|
||||
init(d,prj){
|
||||
this.monthInv=d;
|
||||
this.prj=prj;
|
||||
if(d.filter(it=>it.year==new Date().getFullYear()).length>0){
|
||||
this.activeName=""+new Date().getFullYear()
|
||||
}else{
|
||||
|
|
|
@ -119,9 +119,11 @@ export default {
|
|||
obj.money=obj.money?obj.money*10000:0;
|
||||
return obj;
|
||||
});
|
||||
batchUpdate(objs).then(d=>{
|
||||
batchUpdate(objs).then(d=>{
|
||||
if(d.code!=200){
|
||||
this.loadData();
|
||||
this.loadData();
|
||||
}else{
|
||||
this.$modal.msgSuccess("保存成功");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -87,4 +87,27 @@ public class ProjectCheckingController extends BaseController {
|
|||
}
|
||||
return success(surProjectCheckingService.getProjectCheckingGroupFoChart(surProjectChecking));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据验收类型2级分组查询,用于大屏质量管理-举牌验收分组查询
|
||||
* @param deptId
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/groupCheckingByProjectId")
|
||||
public AjaxResult groupCheckingByProjectId(String lvl,String deptId, String projectId){
|
||||
SurProjectChecking surProjectChecking = new SurProjectChecking();
|
||||
surProjectChecking.setDataTypeLvl2(lvl);
|
||||
if(deptId!=null && !"0".equals(deptId)){
|
||||
surProjectChecking.setProjectDeptId(deptId);
|
||||
}else{
|
||||
if (SecurityUtils.isUserB()) {
|
||||
surProjectChecking.setPrjIds(getProjectIds());
|
||||
}
|
||||
}
|
||||
if(projectId!=null && !"0".equals(projectId)){
|
||||
surProjectChecking.setProjectId(Convert.toLong(projectId));
|
||||
}
|
||||
return success(surProjectCheckingService.groupCheckingByProjectId(surProjectChecking));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,5 +85,9 @@ public interface SurProjectCheckingMapper
|
|||
*/
|
||||
public List<Map<String,Object>> findStatisticsByProjectId(Long projectId);
|
||||
|
||||
public List<SurProjectChecking> getProjectCheckingGroupFoChart(SurProjectChecking where);
|
||||
public List<SurProjectChecking> playVideo(SurProjectChecking where);
|
||||
|
||||
List<SurProjectChecking> selectProjectCheckingGroupFoChart(SurProjectChecking surProjectChecking);
|
||||
|
||||
List<SurProjectChecking> groupCheckingByProjectId(SurProjectChecking where);
|
||||
}
|
||||
|
|
|
@ -99,4 +99,11 @@ public interface ISurProjectCheckingService
|
|||
* @return
|
||||
*/
|
||||
public List<SurProjectChecking> getProjectCheckingGroupFoChart(SurProjectChecking surProjectChecking);
|
||||
|
||||
/**
|
||||
* 根据验收类型2级分组查询,用于大屏质量管理-举牌验收分组查询
|
||||
* @param surProjectChecking
|
||||
* @return
|
||||
*/
|
||||
public List<SurProjectChecking> groupCheckingByProjectId(SurProjectChecking surProjectChecking);
|
||||
}
|
||||
|
|
|
@ -232,6 +232,11 @@ public class SurProjectCheckingServiceImpl implements ISurProjectCheckingService
|
|||
|
||||
@Override
|
||||
public List<SurProjectChecking> getProjectCheckingGroupFoChart(SurProjectChecking surProjectChecking) {
|
||||
return surProjectCheckingMapper.getProjectCheckingGroupFoChart(surProjectChecking);
|
||||
return surProjectCheckingMapper.selectProjectCheckingGroupFoChart(surProjectChecking);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SurProjectChecking> groupCheckingByProjectId(SurProjectChecking where) {
|
||||
return surProjectCheckingMapper.groupCheckingByProjectId(where);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -183,6 +183,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
spc.project_id
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertSurProjectChecking" parameterType="SurProjectChecking" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sur_project_checking
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
@ -292,7 +293,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="getProjectCheckingGroupFoChart" parameterType="SurProjectChecking" resultMap="SurProjectCheckingResult">
|
||||
<select id="selectProjectCheckingGroupFoChart" parameterType="SurProjectChecking" resultMap="SurProjectCheckingResult">
|
||||
select a.dict_value data_type_lvl2,dict_label main_image,a.css_class check_type,b.cnt id from
|
||||
(
|
||||
SELECT *
|
||||
|
@ -310,9 +311,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</if>
|
||||
group by data_type_lvl2
|
||||
) b
|
||||
on a.dict_value=b.data_type_lvl2
|
||||
</select>
|
||||
<select id="groupCheckingByProjectId" parameterType="SurProjectChecking" resultMap="SurProjectCheckingResult">
|
||||
SELECT a.project_id,COUNT(1) id,b.projectName
|
||||
FROM sur_project_checking a,sur_project b WHERE a.project_id=b.id AND a.data_type_lvl2=#{dataTypeLvl2}
|
||||
and a.is_del=0
|
||||
<if test="projectId != null "> and a.project_id = #{projectId}</if>
|
||||
<if test="projectDeptId != null "> and b.deptId = #{projectDeptId}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and a.project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY a.project_id
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue