Browse Source

项目模板

master
陈裕财 3 years ago
parent
commit
2738420139
  1. 13
      xm-core/src/main/java/com/xm/core/ctrl/XmProjectController.java
  2. 18
      xm-core/src/main/java/com/xm/core/vo/XmProjectCopyVo.java
  3. 13
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMapper.xml

13
xm-core/src/main/java/com/xm/core/ctrl/XmProjectController.java

@ -110,14 +110,11 @@ public class XmProjectController {
xmProject.put("compete",user.getUserid()); xmProject.put("compete",user.getUserid());
} }
} }
if(!StringUtils.hasText((String) xmProject.get("isTpl"))){
xmProject.put("isTpl","0");
}else{
if("1".equals(xmProject.get("isTpl"))){
xmProject.remove("branchId");
xmProject.put("linkBranchId",user.getBranchId());
xmProject.put("platformBranchId",platformBranchId);
}
if("1".equals(xmProject.get("isTpl"))){
xmProject.remove("branchId");
xmProject.put("linkBranchId",user.getBranchId());
xmProject.put("platformBranchId",platformBranchId);
} }
xmProject.put("linkBranchId",user.getBranchId()); xmProject.put("linkBranchId",user.getBranchId());
xmProject.put("platformBranchId",platformBranchId); xmProject.put("platformBranchId",platformBranchId);

18
xm-core/src/main/java/com/xm/core/vo/XmProjectCopyVo.java

@ -9,6 +9,8 @@ public class XmProjectCopyVo {
String copyTask;//是否复制任务 0否1是 String copyTask;//是否复制任务 0否1是
String copyGroup;//是否复制组织架构 0否1是 String copyGroup;//是否复制组织架构 0否1是
String copyGroupUser;//是否复制组织架构中用户 0否1是 String copyGroupUser;//是否复制组织架构中用户 0否1是
String copyProduct;//是否复制关联的产品及需求明细
String tplType;//模版公开范围 1-全网公开2-本企业公开
public String getId() { public String getId() {
return id; return id;
@ -73,4 +75,20 @@ public class XmProjectCopyVo {
public void setCopyGroupUser(String copyGroupUser) { public void setCopyGroupUser(String copyGroupUser) {
this.copyGroupUser = copyGroupUser; this.copyGroupUser = copyGroupUser;
} }
public String getCopyProduct() {
return copyProduct;
}
public void setCopyProduct(String copyProduct) {
this.copyProduct = copyProduct;
}
public String getTplType() {
return tplType;
}
public void setTplType(String tplType) {
this.tplType = tplType;
}
} }

13
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMapper.xml

@ -54,18 +54,15 @@
) )
</if> </if>
<if test="key != null and key !='' "> and res.name like concat('%',#{key} ,'%') </if> <if test="key != null and key !='' "> and res.name like concat('%',#{key} ,'%') </if>
<if test="isTpl!=null and isTpl=='1'">
and (res.branch_id in( #{platformBranchId},#{linkBranchId}) and res.is_tpl='1')
<if test='isTpl!=null and isTpl=="1" and tplType=="2"'>
and (res.branch_id =#{linkBranchId} and res.is_tpl='1' and res.tpl_type='2')
</if>
<if test='isTpl!=null and isTpl=="1" and tplType=="1"'>
and ( res.is_tpl='1' and res.tpl_type='1')
</if> </if>
<if test="del==null or del==''"> <if test="del==null or del==''">
and res.del!="1" and res.del!="1"
</if> </if>
<if test="linkBranchId!=null and linkBranchId!=''">
and ( res.branch_id=#{linkBranchId}
<if test="isTpl!=null and isTpl=='1'">
or (res.branch_id in( #{platformBranchId},#{linkBranchId}) and res.is_tpl='1')
</if>)
</if>
</sql> </sql>

Loading…
Cancel
Save