功能修改
This commit is contained in:
parent
f5cef4ca46
commit
e136c14e04
@ -1,7 +1,9 @@
|
||||
package com.tenlion.twoduty.controller.api.departmentbase;
|
||||
|
||||
|
||||
import com.tenlion.twoduty.pojo.dtos.departmentsynopsis.DepartmentSynopsisDTO;
|
||||
import com.tenlion.twoduty.pojo.dtos.userexpand.UserExpandDTO;
|
||||
import com.tenlion.twoduty.service.departmentsynopsis.IDepartmentSynopsisService;
|
||||
import com.tenlion.twoduty.service.userexpand.IUserExpandService;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.common.component.SecurityComponent;
|
||||
@ -32,6 +34,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -60,9 +63,10 @@ public class DepartmentBaseController extends DefaultBaseController {
|
||||
private IUserService userService;
|
||||
@Autowired
|
||||
private IPositionUserService positionUserService;
|
||||
|
||||
@Autowired
|
||||
private IUserExpandService userExpandService;
|
||||
@Autowired
|
||||
private IDepartmentSynopsisService departmentSynopsisService;
|
||||
|
||||
|
||||
/**
|
||||
@ -90,36 +94,47 @@ public class DepartmentBaseController extends DefaultBaseController {
|
||||
@ApiOperation(value = "组织机构列表", notes = "组织机构列表接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list-jur")
|
||||
public List<DepartmentPO> listJur(){
|
||||
public List<Map<String,Object>> listJur(){
|
||||
List<DepartmentPO> list = new ArrayList<>();
|
||||
List<Map<String,Object>> resultList = new ArrayList<>();
|
||||
List<RolePO> roles = securityComponent.getCurrentUser().getRoles();
|
||||
if("admin".equals(securityComponent.getCurrentUser().getUserUsername())){
|
||||
list = departmentBaseService.listByParentId(GENGID);
|
||||
return list;
|
||||
}
|
||||
|
||||
for (RolePO role : roles) {
|
||||
//市局角色
|
||||
if(ROLE_1_CODE.equals(role.getRoleCode())){
|
||||
list = departmentBaseService.listByParentId(GENGID);
|
||||
break;
|
||||
}
|
||||
//旗县区角色
|
||||
if(ROLE_2_CODE.equals(role.getRoleCode())){
|
||||
for (DepartmentPO department : securityComponent.getCurrentUser().getDepartments()) {
|
||||
DepartmentPO po = departmentBaseService.getPO(department.getDepartmentId());
|
||||
if(po != null){
|
||||
list.add(po);
|
||||
}
|
||||
}else{
|
||||
for (RolePO role : roles) {
|
||||
//市局角色
|
||||
if(ROLE_1_CODE.equals(role.getRoleCode())){
|
||||
list = departmentBaseService.listByParentId(GENGID);
|
||||
break;
|
||||
}
|
||||
//旗县区角色
|
||||
if(ROLE_2_CODE.equals(role.getRoleCode())){
|
||||
for (DepartmentPO department : securityComponent.getCurrentUser().getDepartments()) {
|
||||
DepartmentPO po = departmentBaseService.getPO(department.getDepartmentId());
|
||||
if(po != null){
|
||||
list.add(po);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (DepartmentPO departmentPO : list) {
|
||||
DepartmentSynopsisDTO byDepartmentId = departmentSynopsisService.getByDepartmentId(departmentPO.getDepartmentId());
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("departmentId",departmentPO.getDepartmentId());
|
||||
map.put("departmentName",departmentPO.getDepartmentName());
|
||||
if(byDepartmentId != null){
|
||||
map.put("departmentPhoto",byDepartmentId.getDepartmentSynopsisPhoto());
|
||||
}else{
|
||||
map.put("departmentPhoto","");
|
||||
}
|
||||
resultList.add(map);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return list;
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
|
@ -90,10 +90,6 @@ public class indexWebController extends DefaultBaseController {
|
||||
return params;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String initDepartmentId(UserInfoBO currentUser){
|
||||
List<DepartmentPO> departments = currentUser.getDepartments();
|
||||
if(departments.size() == 0){
|
||||
|
@ -319,7 +319,7 @@
|
||||
AND
|
||||
t1.article_classify_id = #{articleClassifyId}
|
||||
</if>
|
||||
<if test="articleContentIsPublish != null and articleContentIsPublish != ''">
|
||||
<if test="articleContentIsPublish != null">
|
||||
AND
|
||||
t1.article_content_is_publish = #{articleContentIsPublish}
|
||||
</if>
|
||||
|
@ -1,4 +1,4 @@
|
||||
.header{width:100%;height:550px;min-width:1200px;position:relative;background:url(../images/header-bg.png) no-repeat center;background-size:100% 100%}
|
||||
.header{width:100%;height:550px;min-width:1200px;position:relative;background:url(../images/header-bg-2.png) no-repeat center;background-size:100% 100%}
|
||||
.date{overflow:hidden;width:1200px;margin:0 auto;height:40px;line-height:40px;font-size:12px;color:#333}
|
||||
.date span{color:#b09158}
|
||||
.day{float:left;}
|
||||
|
BIN
src/main/resources/static/assets/web/images/header-bg-2.png
Normal file
BIN
src/main/resources/static/assets/web/images/header-bg-2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 421 KiB |
@ -378,8 +378,13 @@
|
||||
}
|
||||
},
|
||||
photos:function (value,item) {
|
||||
if(value == ''){
|
||||
return '请上传封面图片';
|
||||
if("ed2fae3a-c89d-4a2d-9c4c-defc250f1436" == articleTypeId ||
|
||||
"ccb93228-d911-4384-ad7d-26fda5182105" == articleTypeId
|
||||
)
|
||||
{
|
||||
if(value == ''){
|
||||
return '请上传封面图片';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="three">
|
||||
<img src="assets/web/images/work-logo.png" alt="" style="display: block;margin-bottom: 20px">
|
||||
<img src="assets/web/images/work-logo.png" alt="" style="display: block;margin-bottom: 36px">
|
||||
<div class="three-box">
|
||||
<div class="three-box-title">
|
||||
<span>四个清单</span>
|
||||
@ -164,7 +164,8 @@
|
||||
<span>0{{idx+1}}/</span>
|
||||
<div class="street-img-name">
|
||||
<a :href="'route/web/street.html?departmentId=' + item.departmentId">
|
||||
<img src="assets/web/images/header-bg.png" alt="">
|
||||
<img src="assets/web/images/header-bg.png" alt="" v-if="item.departmentPhoto == '' || item.departmentPhoto == null">
|
||||
<img :src="'route/file/download/true/' + item.departmentPhoto" alt="" v-if="item.departmentPhoto != '' && item.departmentPhoto != null">
|
||||
<p>{{item.departmentName}}</p>
|
||||
</a>
|
||||
</div>
|
||||
@ -213,7 +214,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
版权所有:沧州纪委监察局 备案号:冀ICP备 14000612 技术支持:山西腾狮科技有限公司
|
||||
版权所有:沧州市运河区纪律检查委员会
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/web/js/jquery-2.1.4.min.js"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user