Browse Source

添加节点类型、标签等

master
陈裕财 4 years ago
parent
commit
0a1cfeac47
  1. 22
      xm-core/src/main/java/com/xm/core/ctrl/XmQuestionController.java
  2. 14
      xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java
  3. 8
      xm-core/src/main/java/com/xm/core/service/XmQuestionService.java
  4. 8
      xm-core/src/main/java/com/xm/core/service/XmTaskService.java
  5. 22
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmQuestionMapper.xml
  6. 21
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskMapper.xml

22
xm-core/src/main/java/com/xm/core/ctrl/XmQuestionController.java

@ -117,9 +117,25 @@ public class XmQuestionController {
m.put("tips", tips); m.put("tips", tips);
return m; return m;
} }
@RequestMapping(value="/getXmQuestionAttDist",method=RequestMethod.GET)
public Map<String,Object> getXmQuestionAttDist( @RequestParam Map<String,Object> xmQuestion){
User user=LoginUtils.getCurrentUserInfo();
xmQuestion.put("branchId",user.getBranchId());
List<Map<String,Object>> datas= this.xmQuestionService.getXmQuestionAttDist(xmQuestion);
return ResponseHelper.ok("成功",datas);
}
@RequestMapping(value="/getXmQuestionAgeDist",method=RequestMethod.GET)
public Map<String,Object> getXmQuestionAgeDist( @RequestParam Map<String,Object> xmQuestion){
User user=LoginUtils.getCurrentUserInfo();
xmQuestion.put("branchId",user.getBranchId());
List<Map<String,Object>> datas= this.xmQuestionService.getXmQuestionAgeDist(xmQuestion);
return ResponseHelper.ok("成功",datas);
}
@ApiOperation( value = "新增一条xm_question信息",notes="addXmQuestion,主键如果为空,后台自动生成") @ApiOperation( value = "新增一条xm_question信息",notes="addXmQuestion,主键如果为空,后台自动生成")
@ApiResponses({ @ApiResponses({
@ApiResponse(code = 200,response=XmQuestion.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") @ApiResponse(code = 200,response=XmQuestion.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}")

14
xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java

@ -281,7 +281,21 @@ public class XmTaskController {
m.put("tips", tips); m.put("tips", tips);
return m; return m;
} }
@RequestMapping(value="/getXmTaskAttDist",method=RequestMethod.GET)
public Map<String,Object> getXmTaskAttDist( @RequestParam Map<String,Object> xmTask){
User user=LoginUtils.getCurrentUserInfo();
xmTask.put("branchId",user.getBranchId());
List<Map<String,Object>> datas= this.xmTaskService.getXmTaskAttDist(xmTask);
return ResponseHelper.ok("成功",datas);
}
@RequestMapping(value="/getXmTaskAgeDist",method=RequestMethod.GET)
public Map<String,Object> getXmTaskAgeDist( @RequestParam Map<String,Object> xmTask){
User user=LoginUtils.getCurrentUserInfo();
xmTask.put("branchId",user.getBranchId());
List<Map<String,Object>> datas= this.xmTaskService.getXmTaskAgeDist(xmTask);
return ResponseHelper.ok("成功",datas);
}
/***/ /***/
@ApiOperation( value = "根据主键批量修改修改任务中的某些字段信息",notes="editXmMenu") @ApiOperation( value = "根据主键批量修改修改任务中的某些字段信息",notes="editXmMenu")
@ApiResponses({ @ApiResponses({

8
xm-core/src/main/java/com/xm/core/service/XmQuestionService.java

@ -200,5 +200,13 @@ public class XmQuestionService extends BaseService {
public void editSomeFields(Map<String, Object> xmMenuMap) { public void editSomeFields(Map<String, Object> xmMenuMap) {
super.update("editSomeFields",xmMenuMap); super.update("editSomeFields",xmMenuMap);
} }
public List<Map<String, Object>> getXmQuestionAttDist(Map<String, Object> xmQuestion) {
return super.selectList("getXmQuestionAttDist",xmQuestion);
}
public List<Map<String, Object>> getXmQuestionAgeDist(Map<String, Object> xmQuestion) {
return super.selectList("getXmQuestionAgeDist",xmQuestion);
}
} }

8
xm-core/src/main/java/com/xm/core/service/XmTaskService.java

@ -744,5 +744,13 @@ public class XmTaskService extends BaseService {
public void batchUpdateBudgetWorkloadAndRate(List<String> ids,BigDecimal budgetWorkload) { public void batchUpdateBudgetWorkloadAndRate(List<String> ids,BigDecimal budgetWorkload) {
super.update("batchUpdateBudgetWorkloadAndRate",map("ids",ids,"budgetWorkload",budgetWorkload)); super.update("batchUpdateBudgetWorkloadAndRate",map("ids",ids,"budgetWorkload",budgetWorkload));
} }
public List<Map<String, Object>> getXmTaskAttDist(Map<String, Object> xmTask) {
return super.selectList("getXmTaskAttDist",xmTask);
}
public List<Map<String, Object>> getXmTaskAgeDist(Map<String, Object> xmTask) {
return super.selectList("getXmTaskAgeDist",xmTask);
}
} }

22
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmQuestionMapper.xml

@ -88,6 +88,28 @@
#{item} #{item}
</foreach> </foreach>
</update> </update>
<select id="getXmQuestionAttDist" parameterType="HashMap" resultType="HashMap">
select count(*) as value,${groupBy} as name from xm_question res
<where>
<include refid="whereForMap"></include>
<include refid="where"></include>
</where>
group by ${groupBy}
</select>
<select id="getXmQuestionAgeDist" parameterType="HashMap" resultType="HashMap">
select sum(value) as value,case when age&lt;3 then 0 when age &lt;6 then 1 when age &lt;8 then 2 when age &lt;16 then 3 when age&lt;31 then 4 else 5 end as name from (
select count(*) as value, datediff (res.end_time,res.create_time) as age from xm_question res
<where>
<include refid="whereForMap"></include>
<include refid="where"></include>
</where>
group by age
) as a
group by name
</select>
<!--结束 自定义sql函数区域--> <!--结束 自定义sql函数区域-->

21
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskMapper.xml

@ -419,6 +419,27 @@
#{item} #{item}
</foreach> </foreach>
</update> </update>
<select id="getXmTaskAttDist" parameterType="HashMap" resultType="HashMap">
select count(*) as value,${groupBy} as name from xm_task res
<where>
<include refid="whereForMap"></include>
<include refid="where"></include>
</where>
group by ${groupBy}
</select>
<select id="getXmTaskAgeDist" parameterType="HashMap" resultType="HashMap">
select sum(value) as value,case when age&lt;3 then 0 when age &lt;6 then 1 when age &lt;8 then 2 when age &lt;16 then 3 when age&lt;31 then 4 else 5 end as name from (
select count(*) as value, datediff (res.end_time,res.start_time) as age from xm_task res
<where>
<include refid="whereForMap"></include>
<include refid="where"></include>
</where>
group by age
) as a
group by name
</select>
<!--结束 自定义sql函数区域--> <!--结束 自定义sql函数区域-->

Loading…
Cancel
Save