update code
parent
4c9fdf7d79
commit
fec95d36d4
|
@ -49,7 +49,7 @@ spring:
|
|||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://cd-cynosdbmysql-grp-9rqrhxsm.sql.tencentcdb.com:27981/yanzhu_jh_test?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://cd-cynosdbmysql-grp-9rqrhxsm.sql.tencentcdb.com:27981/yanzhu_jh?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: Sxyanzhu@cf
|
||||
#url: jdbc:mysql://192.168.126.19:3306/yanzhu_jh?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8
|
||||
|
|
|
@ -218,18 +218,6 @@ export default {
|
|||
doAddYearSuccess() {
|
||||
this.loadData();
|
||||
},
|
||||
resetData(tmps) {
|
||||
if (this.oldData.length == 0) {
|
||||
return;
|
||||
}
|
||||
tmps.forEach(it => {
|
||||
let objs = this.oldData.filter(d => d.id == it.id);
|
||||
if (objs.length > 0) {
|
||||
it.money = objs[0].money;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
loadData(init) {
|
||||
listByProjectId(this.prj.id).then((d) => {
|
||||
let tmps = (d.data || []).map(it => {
|
||||
|
@ -240,7 +228,6 @@ export default {
|
|||
it.date1 = this.$dt(it.date1)
|
||||
return it;
|
||||
});
|
||||
this.resetData(tmps);
|
||||
this.oldData = tmps;
|
||||
this.form.totalInv = this.getValue(tmps, 1);
|
||||
this.yearInv = tmps.filter(it => it.costType == 2);
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="支付金额">
|
||||
<el-input v-model="dataItem.money" placeholder="请输支付金额" :class="checkRow(dataItem,2)"
|
||||
<el-form-item label="申报金额">
|
||||
<el-input v-model="dataItem.money" placeholder="请输申报金额" :class="checkRow(dataItem,2)"
|
||||
@blur="v => formatAmount(dataItem)" maxlength="200">
|
||||
<template slot="append">万元</template>
|
||||
</el-input>
|
||||
|
|
|
@ -208,5 +208,15 @@ public class SurProjectCostOutputController extends BaseController
|
|||
return 0l;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 项目详情-项目分类汇总
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/groupBYProject")
|
||||
public AjaxResult groupBYProject(@RequestBody SurProjectCostOutput where){
|
||||
return AjaxResult.success(surProjectCostOutputService.groupBYProject(where));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -78,4 +78,11 @@ public interface SurProjectCostOutputMapper
|
|||
* @return
|
||||
*/
|
||||
public List<SurProjectCostOutput> selectForBigEnginList(SurProjectCostOutput where);
|
||||
|
||||
/**
|
||||
* 项目详情-项目分类汇总
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<SurProjectCostOutput> groupBYProject(SurProjectCostOutput where);
|
||||
}
|
||||
|
|
|
@ -94,4 +94,10 @@ public interface ISurProjectCostOutputService
|
|||
* @return
|
||||
*/
|
||||
public Map<String,List<List<SurProjectCostOutput>>> selectForBigEnginList(SurProjectCostOutput where);
|
||||
/**
|
||||
* 项目详情-项目分类汇总
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
public List<SurProjectCostOutput> groupBYProject(SurProjectCostOutput where);
|
||||
}
|
||||
|
|
|
@ -245,5 +245,14 @@ public class SurProjectCostOutputServiceImpl implements ISurProjectCostOutputSer
|
|||
}
|
||||
return map;
|
||||
}
|
||||
/**
|
||||
* 项目详情-项目分类汇总
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SurProjectCostOutput> groupBYProject(SurProjectCostOutput where) {
|
||||
return surProjectCostOutputMapper.groupBYProject(where);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<!-- 查询条件-项目部门 -->
|
||||
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and spc.project_id in
|
||||
and fl.project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
|
|
@ -294,4 +294,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
ORDER BY a.create_time
|
||||
</select>
|
||||
<select id="groupBYProject" parameterType="SurProjectCostOutput" resultMap="SurProjectCostOutputResult">
|
||||
select x.id,x.remark,x.money,y.money money2,x.month from (
|
||||
select a.dict_value id, a.dict_label remark,sum(b.money) money,count(a.id) month ,'总投资' cost_type from ( SELECT a.id,c.dict_label,c.dict_value
|
||||
FROM sur_project a,sys_dict_data c
|
||||
where a.isDel=0
|
||||
<if test="costType==1">
|
||||
and a.projectType=c.dict_value and c.dict_type='project_category'
|
||||
</if>
|
||||
<if test="costType==2">
|
||||
and a.projiectLevel=c.dict_value and c.dict_type='project_level'
|
||||
</if>
|
||||
<if test="id!=null and id>0"> and a.deptId = #{id}</if>
|
||||
) a
|
||||
left join (select project_id,money from sur_project_cost_output where cost_type=1) b on a.id=b.project_id
|
||||
group by a.dict_value,a.dict_label ) x,
|
||||
(
|
||||
select a.dict_value id, a.dict_label remark,sum(b.money) money,count(a.id) month ,'年度' cost_type from (
|
||||
SELECT a.id,c.dict_label,c.dict_value
|
||||
FROM sur_project a,sys_dict_data c
|
||||
where a.isDel=0
|
||||
<if test="costType==1">
|
||||
and a.projectType=c.dict_value and c.dict_type='project_category'
|
||||
</if>
|
||||
<if test="costType==2">
|
||||
and a.projiectLevel=c.dict_value and c.dict_type='project_level'
|
||||
</if>
|
||||
<if test="id!=null and id>0"> and a.deptId = #{id}</if>
|
||||
) a
|
||||
left join (select project_id,money from sur_project_cost_output where cost_type=2 and year=#{year}) b on a.id=b.project_id
|
||||
group by a.dict_value,a.dict_label
|
||||
)y where x.id=y.id
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue