Commit 03fa1351 by tyk

经验交流代码提交

parent 8af54b76
...@@ -111,8 +111,6 @@ public class JygxWzglController extends BaseController ...@@ -111,8 +111,6 @@ public class JygxWzglController extends BaseController
} }
/** /**
* 新增经验共享-文章管理 * 新增经验共享-文章管理
*/ */
...@@ -146,6 +144,27 @@ public class JygxWzglController extends BaseController ...@@ -146,6 +144,27 @@ public class JygxWzglController extends BaseController
} }
/** /**
* 修改经验共享-提交按钮
*/
@PutMapping("/tj")
public AjaxResult tj(@RequestBody JygxWzgl jygxWzgl)
{
return toAjax(jygxWzglService.updatetj(jygxWzgl));
}
/**
* 修改经验共享-文章管理(领导)
*/
@PreAuthorize("@ss.hasPermi('system:wzgl:editld')")
@Log(title = "经验共享-文章管理", businessType = BusinessType.UPDATE)
@PutMapping("/editld")
public AjaxResult editld(@RequestBody JygxWzgl jygxWzgl)
{
return toAjax(jygxWzglService.updateJygxWzgl(jygxWzgl));
}
/**
* 文章管理审核 * 文章管理审核
*/ */
@PreAuthorize("@ss.hasPermi('system:wzgl:wzglsh')") @PreAuthorize("@ss.hasPermi('system:wzgl:wzglsh')")
...@@ -169,6 +188,17 @@ public class JygxWzglController extends BaseController ...@@ -169,6 +188,17 @@ public class JygxWzglController extends BaseController
} }
/** /**
* 删除经验共享-文章管理(领导)
*/
@PreAuthorize("@ss.hasPermi('system:wzgl:removeld')")
@Log(title = "经验共享-文章管理", businessType = BusinessType.DELETE)
@DeleteMapping("/removeld/{wzids}")
public AjaxResult removeld(@PathVariable Long[] wzids)
{
return toAjax(jygxWzglService.deleteJygxWzglByWzids(wzids));
}
/**
*数据置顶 *数据置顶
*/ */
@GetMapping("/getwzzd") @GetMapping("/getwzzd")
......
...@@ -68,6 +68,12 @@ public interface IJygxWzglService ...@@ -68,6 +68,12 @@ public interface IJygxWzglService
*/ */
public int updateJygxWzgl(JygxWzgl jygxWzgl); public int updateJygxWzgl(JygxWzgl jygxWzgl);
/**
* 提交
*/
public int updatetj(JygxWzgl jygxWzgl);
/** /**
* 批量删除经验共享-文章管理 * 批量删除经验共享-文章管理
* *
......
...@@ -6,6 +6,7 @@ import java.util.ArrayList; ...@@ -6,6 +6,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.qianhe.common.annotation.DataScope; import com.qianhe.common.annotation.DataScope;
import com.qianhe.common.core.domain.entity.SysRole;
import com.qianhe.common.utils.DateUtils; import com.qianhe.common.utils.DateUtils;
import com.qianhe.common.utils.SecurityUtils; import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.domain.*; import com.qianhe.domain.*;
...@@ -97,6 +98,7 @@ public class JygxWzglServiceImpl implements IJygxWzglService ...@@ -97,6 +98,7 @@ public class JygxWzglServiceImpl implements IJygxWzglService
public int insertJygxWzgl(JygxWzgl jygxWzgl) public int insertJygxWzgl(JygxWzgl jygxWzgl)
{ {
int TARGET_LENGTH = 20; int TARGET_LENGTH = 20;
SecureRandom random = new SecureRandom(); SecureRandom random = new SecureRandom();
BigInteger bigInt = new BigInteger(TARGET_LENGTH * 8, random); BigInteger bigInt = new BigInteger(TARGET_LENGTH * 8, random);
...@@ -186,6 +188,46 @@ public class JygxWzglServiceImpl implements IJygxWzglService ...@@ -186,6 +188,46 @@ public class JygxWzglServiceImpl implements IJygxWzglService
return jygxWzglMapper.updateJygxWzgl(jygxWzgl); return jygxWzglMapper.updateJygxWzgl(jygxWzgl);
} }
/**
* 提交
*/
@Override
public int updatetj(JygxWzgl jygxWzgl)
{
boolean pd = false;
if(SecurityUtils.getLoginUser().getUser().isAdmin()){
pd = true;
}
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
if(!pd){
for(SysRole sysRole :roles){
if(sysRole.getRoleKey().equals("sjgly")){
pd = true;
break;
}
}
}
if(pd){
jygxWzgl.setShzt("4");
}
if (jygxWzgl.getJygxWzglfjList() != null ) {
if (jygxWzgl.getJygxWzglfjList().size()>0) {
//将之前上传附件删除,重新上传
jygxWzglMapper.deleteFileByBusinessId(jygxWzgl.getWzid());
List<JygxWzglfj> sbmsList = jygxWzgl.getJygxWzglfjList();
insertFileList(jygxWzgl.getWzid(), sbmsList);
}
}
if( jygxWzgl.getWznr()!= null){
jygxWzgl.setYl2(jygxWzgl.getWznr().replaceAll("<[^>]*>", ""));
}
jygxWzgl.setUpdateTime(DateUtils.getNowDate());
return jygxWzglMapper.updateJygxWzgl(jygxWzgl);
}
/** /**
* 批量删除经验共享-文章管理 * 批量删除经验共享-文章管理
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment