update
This commit is contained in:
parent
1b63f773e7
commit
8738b0fbba
|
@ -1,5 +1,6 @@
|
|||
package com.ydool.boot.modules.rddb.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ydool.boot.core.entity.BaseEntity;
|
||||
|
@ -181,6 +182,14 @@ public class ContactDb extends BaseEntity{
|
|||
@ApiModelProperty(value = "admin机关办公/ rddb代表/ voter选民 多个用英文逗号间隔")
|
||||
private String obj;
|
||||
|
||||
|
||||
/**
|
||||
* 联络站
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "联络站")
|
||||
private String subjectUserIds;
|
||||
|
||||
// /**
|
||||
// * 是否通过
|
||||
// */
|
||||
|
|
|
@ -13,7 +13,7 @@ public class ContactDbBo extends ContactDb {
|
|||
String conferenceRecordAttachmentArrStr;
|
||||
String conferencePhotoAttachmentArrStr;
|
||||
|
||||
String subjectUserIds;
|
||||
// String subjectUserIds;
|
||||
String chooseAdminUserIds;
|
||||
String chooseDbUserIds;
|
||||
String signUserIds;
|
||||
|
|
|
@ -10,9 +10,12 @@ import com.ydool.boot.common.result.Ret;
|
|||
import com.ydool.boot.core.auth.PreAuth;
|
||||
import com.ydool.boot.modules.rddb.entity.ContactDb;
|
||||
import com.ydool.boot.modules.rddb.entity.ContactDbAttachment;
|
||||
import com.ydool.boot.modules.rddb.entity.ContactDbUser;
|
||||
import com.ydool.boot.modules.rddb.entity.bo.ContactDbBo;
|
||||
import com.ydool.boot.modules.rddb.service.ConferenceUserService;
|
||||
import com.ydool.boot.modules.rddb.service.ContactDbAttachmentService;
|
||||
import com.ydool.boot.modules.rddb.service.ContactDbService;
|
||||
import com.ydool.boot.modules.rddb.service.ContactDbUserService;
|
||||
import com.ydool.boot.modules.sys.web.BaseAdminController;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -25,6 +28,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
@ -42,6 +46,8 @@ public class ContactDbController extends BaseAdminController {
|
|||
private ContactDbService contactDbService;
|
||||
@Autowired
|
||||
private ContactDbAttachmentService contactDbAttachmentService;
|
||||
@Autowired
|
||||
private ContactDbUserService contactDbUserService;
|
||||
|
||||
@GetMapping
|
||||
public String index() {
|
||||
|
@ -74,6 +80,11 @@ public class ContactDbController extends BaseAdminController {
|
|||
wrapper.like("subject_name", contactDb.getSubjectName());
|
||||
wrapper.orderByDesc("created_at");
|
||||
Page page = contactDbService.page(new Page(getPageNum(), getPageSize()), wrapper);
|
||||
page.getRecords().stream().forEach(record -> {
|
||||
ContactDb record1 = (ContactDb) record;
|
||||
record1.setSubjectUserIds(contactDbUserService.list(new LambdaQueryWrapper<ContactDbUser>().eq(ContactDbUser::getContactDbId, record1.getId()).eq(ContactDbUser::getType, "1"))
|
||||
.stream().map(ContactDbUser::getUserId).collect(Collectors.toList()).toString().replace("[","").replace("]","").replace(" ",""));
|
||||
});
|
||||
render(Ret.ok().paged(page));
|
||||
}
|
||||
|
||||
|
@ -83,15 +94,17 @@ public class ContactDbController extends BaseAdminController {
|
|||
ContactDb contactDb = new ContactDb();
|
||||
if (ObjectUtil.isNotEmpty(id)) {
|
||||
contactDb = contactDbService.getById(id);
|
||||
List<ContactDbAttachment> recordAttachmentList = contactDbAttachmentService.list(new LambdaQueryWrapper<ContactDbAttachment>()
|
||||
.eq(ContactDbAttachment::getContactDbId, id)
|
||||
.eq(ContactDbAttachment::getType, ContactDbAttachment.TYPE_CONFERENCE_RECORD));
|
||||
List<ContactDbAttachment> photoAttachmentList = contactDbAttachmentService.list(new LambdaQueryWrapper<ContactDbAttachment>()
|
||||
.eq(ContactDbAttachment::getContactDbId, id)
|
||||
.eq(ContactDbAttachment::getType, ContactDbAttachment.TYPE_CONFERENCE_PHOTO));
|
||||
contactDb.setSubjectUserIds(contactDbUserService.list(new LambdaQueryWrapper<ContactDbUser>().eq(ContactDbUser::getContactDbId, id).eq(ContactDbUser::getType, "1"))
|
||||
.stream().map(ContactDbUser::getUserId).collect(Collectors.toList()).toString().replace("[","").replace("]","").replace(" ",""));
|
||||
List<ContactDbAttachment> recordAttachmentList =
|
||||
contactDbAttachmentService.list(new LambdaQueryWrapper<ContactDbAttachment>().eq(ContactDbAttachment::getContactDbId, id).eq(ContactDbAttachment::getType, ContactDbAttachment.TYPE_CONFERENCE_RECORD));
|
||||
List<ContactDbAttachment> photoAttachmentList =
|
||||
contactDbAttachmentService.list(new LambdaQueryWrapper<ContactDbAttachment>().eq(ContactDbAttachment::getContactDbId, id).eq(ContactDbAttachment::getType, ContactDbAttachment.TYPE_CONFERENCE_PHOTO));
|
||||
|
||||
model.addAttribute("conferenceRecordAttachmentListStr", JsonMapper.getInstance().writeValueAsString(recordAttachmentList));
|
||||
model.addAttribute("conferencePhotoAttachmentListStr", JsonMapper.getInstance().writeValueAsString(photoAttachmentList));
|
||||
model.addAttribute("conferenceRecordAttachmentListStr",
|
||||
JsonMapper.getInstance().writeValueAsString(recordAttachmentList));
|
||||
model.addAttribute("conferencePhotoAttachmentListStr",
|
||||
JsonMapper.getInstance().writeValueAsString(photoAttachmentList));
|
||||
}
|
||||
model.addAttribute("contactDb", contactDb);
|
||||
return "modules/rddb/contact_db/form.html";
|
||||
|
|
|
@ -18,8 +18,9 @@
|
|||
<act:input text="主题名称" name="subjectName" col="1" required="true" />
|
||||
<act:input text="计划时间" as="date" format="yyyy-MM-dd HH:mm:ss" name="subjectPlanAt" col="1" />
|
||||
<act:input text="提交时间" as="date" format="yyyy-MM-dd HH:mm:ss" name="subjectSubmitAt" col="1" />
|
||||
<act:person text="联络站" router="contact_db_user" type="1" userType="contact" id="${contactDb.id!}"
|
||||
name="subjectUser" />
|
||||
<!-- 联络站值${contactDb.subjectUserIds}-->
|
||||
<act:input text="联络站" name="subjectUserIds" as="select" dictType="dict_interface_location" multiple="multiple" />
|
||||
<!-- <act:person text="联络站" router="contact_db_user" type="1" userType="contact" id="${contactDb.id!}" name="subjectUser" />-->
|
||||
|
||||
<div class="form-unit">常委会领导和代表信息</div>
|
||||
<act:title title="" fields="1" />
|
||||
|
@ -106,12 +107,12 @@
|
|||
|
||||
|
||||
//联络站
|
||||
var subjectUserIdsArr = [];
|
||||
var subjectUserData = subjectUserroleGrid.dataGrid('getRowData');
|
||||
subjectUserData.map(data => {
|
||||
subjectUserIdsArr.push(data.userId);
|
||||
});
|
||||
$("[name='subjectUserIds']").val(subjectUserIdsArr.join(","));
|
||||
// var subjectUserIdsArr = [];
|
||||
// var subjectUserData = subjectUserroleGrid.dataGrid('getRowData');
|
||||
// subjectUserData.map(data => {
|
||||
// subjectUserIdsArr.push(data.userId);
|
||||
// });
|
||||
// $("[name='subjectUserIds']").val(subjectUserIdsArr.join(","));
|
||||
|
||||
//常委会领导
|
||||
var chooseAdminUserIdsArr = [];
|
||||
|
|
Loading…
Reference in New Issue