Browse Source

添加节点类型、标签等

master
陈裕财 4 years ago
parent
commit
573b964656
  1. 12
      xm-core/src/main/java/com/xm/core/ctrl/XmIterationController.java
  2. 6
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmIterationLinkMapper.xml
  3. 1
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmIterationMapper.xml

12
xm-core/src/main/java/com/xm/core/ctrl/XmIterationController.java

@ -159,15 +159,13 @@ public class XmIterationController {
try{
if(StringUtils.isEmpty(xmIteration.getId())) {
xmIteration.setId(xmIterationService.createKey("id"));
}else{
XmIteration xmIterationQuery = new XmIteration(xmIteration.getId());
if(xmIterationService.countByWhere(xmIterationQuery)>0){
tips.setFailureMsg("编号重复,请修改编号再提交");
m.put("tips", tips);
return m;
}
}
XmIteration q=new XmIteration();
User user= LoginUtils.getCurrentUserInfo();
q.setBranchId(user.getBranchId());
Long count=this.xmIterationService.countByWhere(q);
xmIteration.setSeqNo(Long.toString(count+1));
xmIteration.setCtime(new Date());
xmIteration.setCuserid(user.getUserid());
xmIteration.setCusername(user.getUsername());

6
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmIterationLinkMapper.xml

@ -16,20 +16,22 @@
<select id="listWithProjectInfo" parameterType="HashMap" resultType="HashMap">
select res.*,p.name as project_name,p.id as project_id,i.iteration_name from xm_iteration_link res inner join xm_project p on res.pro_id=p.id
select res.*,p.name as project_name,p.id as project_id,i.iteration_name,i.seq_no from xm_iteration_link res inner join xm_project p on res.pro_id=p.id
inner join xm_iteration i on i.id=res.iteration_id
<where>
<include refid="whereForMap"/>
<include refid="where"/>
</where>
order by i.seq_no desc
</select>
<select id="listWithProductInfo" parameterType="HashMap" resultType="HashMap">
select res.*,p.product_name,p.id as product_id,i.iteration_name from xm_iteration_link res inner join xm_product p on res.pro_id=p.id
select res.*,p.product_name,p.id as product_id,i.iteration_name,i.seq_no from xm_iteration_link res inner join xm_product p on res.pro_id=p.id
inner join xm_iteration i on i.id=res.iteration_id
<where>
<include refid="whereForMap"/>
<include refid="where"/>
</where>
order by i.seq_no desc
</select>
<!--结束 自定义sql函数区域-->

1
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmIterationMapper.xml

@ -91,6 +91,7 @@
</if>
<if test="key != null and key !='' "> and res.iteration_name like #{key} </if>
</where>
order by res.seq_no desc
</select>
<!-- 通过条件查询获取数据列表 不分页 返回 list<Object> -->

Loading…
Cancel
Save