功能修改

This commit is contained in:
ly19960718 2021-09-02 16:14:50 +08:00
parent f5cef4ca46
commit e136c14e04
7 changed files with 49 additions and 32 deletions

View File

@ -1,7 +1,9 @@
package com.tenlion.twoduty.controller.api.departmentbase; 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.pojo.dtos.userexpand.UserExpandDTO;
import com.tenlion.twoduty.service.departmentsynopsis.IDepartmentSynopsisService;
import com.tenlion.twoduty.service.userexpand.IUserExpandService; import com.tenlion.twoduty.service.userexpand.IUserExpandService;
import ink.wgink.common.base.DefaultBaseController; import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.common.component.SecurityComponent; 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 org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -60,9 +63,10 @@ public class DepartmentBaseController extends DefaultBaseController {
private IUserService userService; private IUserService userService;
@Autowired @Autowired
private IPositionUserService positionUserService; private IPositionUserService positionUserService;
@Autowired @Autowired
private IUserExpandService userExpandService; private IUserExpandService userExpandService;
@Autowired
private IDepartmentSynopsisService departmentSynopsisService;
/** /**
@ -90,14 +94,13 @@ public class DepartmentBaseController extends DefaultBaseController {
@ApiOperation(value = "组织机构列表", notes = "组织机构列表接口") @ApiOperation(value = "组织机构列表", notes = "组织机构列表接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list-jur") @GetMapping("list-jur")
public List<DepartmentPO> listJur(){ public List<Map<String,Object>> listJur(){
List<DepartmentPO> list = new ArrayList<>(); List<DepartmentPO> list = new ArrayList<>();
List<Map<String,Object>> resultList = new ArrayList<>();
List<RolePO> roles = securityComponent.getCurrentUser().getRoles(); List<RolePO> roles = securityComponent.getCurrentUser().getRoles();
if("admin".equals(securityComponent.getCurrentUser().getUserUsername())){ if("admin".equals(securityComponent.getCurrentUser().getUserUsername())){
list = departmentBaseService.listByParentId(GENGID); list = departmentBaseService.listByParentId(GENGID);
return list; }else{
}
for (RolePO role : roles) { for (RolePO role : roles) {
//市局角色 //市局角色
if(ROLE_1_CODE.equals(role.getRoleCode())){ if(ROLE_1_CODE.equals(role.getRoleCode())){
@ -115,11 +118,23 @@ public class DepartmentBaseController extends DefaultBaseController {
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 resultList;
return list;
} }

View File

@ -90,10 +90,6 @@ public class indexWebController extends DefaultBaseController {
return params; return params;
} }
public String initDepartmentId(UserInfoBO currentUser){ public String initDepartmentId(UserInfoBO currentUser){
List<DepartmentPO> departments = currentUser.getDepartments(); List<DepartmentPO> departments = currentUser.getDepartments();
if(departments.size() == 0){ if(departments.size() == 0){

View File

@ -319,7 +319,7 @@
AND AND
t1.article_classify_id = #{articleClassifyId} t1.article_classify_id = #{articleClassifyId}
</if> </if>
<if test="articleContentIsPublish != null and articleContentIsPublish != ''"> <if test="articleContentIsPublish != null">
AND AND
t1.article_content_is_publish = #{articleContentIsPublish} t1.article_content_is_publish = #{articleContentIsPublish}
</if> </if>

View File

@ -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{overflow:hidden;width:1200px;margin:0 auto;height:40px;line-height:40px;font-size:12px;color:#333}
.date span{color:#b09158} .date span{color:#b09158}
.day{float:left;} .day{float:left;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 KiB

View File

@ -378,10 +378,15 @@
} }
}, },
photos:function (value,item) { photos:function (value,item) {
if("ed2fae3a-c89d-4a2d-9c4c-defc250f1436" == articleTypeId ||
"ccb93228-d911-4384-ad7d-26fda5182105" == articleTypeId
)
{
if(value == ''){ if(value == ''){
return '请上传封面图片'; return '请上传封面图片';
} }
} }
}
}); });

View File

@ -111,7 +111,7 @@
</div> </div>
</div> </div>
<div class="three"> <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">
<div class="three-box-title"> <div class="three-box-title">
<span>四个清单</span> <span>四个清单</span>
@ -164,7 +164,8 @@
<span>0{{idx+1}}/</span> <span>0{{idx+1}}/</span>
<div class="street-img-name"> <div class="street-img-name">
<a :href="'route/web/street.html?departmentId=' + item.departmentId"> <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> <p>{{item.departmentName}}</p>
</a> </a>
</div> </div>
@ -213,7 +214,7 @@
</div> </div>
</div> </div>
<div class="footer"> <div class="footer">
版权所有:沧州纪委监察局 备案号冀ICP备 14000612 技术支持:山西腾狮科技有限公司 版权所有:沧州市运河区纪律检查委员会
</div> </div>
</div> </div>
<script src="assets/web/js/jquery-2.1.4.min.js"></script> <script src="assets/web/js/jquery-2.1.4.min.js"></script>