Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+4
-1
@@ -63,7 +63,10 @@ public interface BussDocumentLibraryEOMapper extends BaseMapper<BussDocumentLibr
|
||||
* @param condition
|
||||
* @return
|
||||
*/
|
||||
IPage ocrPageInfo(@Param("page") IPage page,
|
||||
// IPage ocrPageInfo(@Param("page") IPage page,
|
||||
// @Param("field") String field,
|
||||
// @Param("condition") String condition);
|
||||
List<Map<String, Object>> ocrPageInfo(
|
||||
@Param("field") String field,
|
||||
@Param("condition") String condition);
|
||||
|
||||
|
||||
+21
-7
@@ -3473,6 +3473,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
|
||||
//查询字段
|
||||
StringBuilder fieldSb = new StringBuilder();
|
||||
StringBuilder osfSql = new StringBuilder();
|
||||
StringBuilder join = new StringBuilder();
|
||||
int i = 1;
|
||||
if (ObjectUtils.isNotEmpty(fileFieldList)) {
|
||||
@@ -3480,16 +3481,26 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
fieldSb.append("bdl." + fileField + ",");
|
||||
if (i == 1) {
|
||||
join.append(" on osf.connect_id = bdl." + fileField);
|
||||
osfSql.append("(select id, file_name, connect_id from oss_file where connect_id in (select ").append(fileField).append(" from buss_document_library where ").append(fileField).append(" is not null)");
|
||||
i++;
|
||||
continue;
|
||||
} else if (i == fileFieldList.size()) {
|
||||
join.append(" or osf.connect_id = bdl." + fileField);
|
||||
osfSql.append(" UNION select id, file_name, connect_id from oss_file where connect_id in (select ").append(fileField).append(" from buss_document_library where ").append(fileField).append(" is not null))");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
join.append(" or osf.connect_id = bdl." + fileField);
|
||||
osfSql.append(" UNION select id, file_name, connect_id from oss_file where connect_id in (select ").append(fileField).append(" from buss_document_library where ").append(fileField).append(" is not null)");
|
||||
i++;
|
||||
|
||||
}
|
||||
}
|
||||
String fieldStr = fieldSb.substring(0, fieldSb.length() - 1);
|
||||
|
||||
String field = " osf.id,bdl.id as \"buss_document_library_id\",bdl.serial_number,bdl.title,bdl.title_en,bdl.state,osf.file_name,osf.connect_id," + fieldStr
|
||||
+ " from oss_file osf join buss_document_library bdl" + join.toString();
|
||||
+ " from " + osfSql.toString() + " osf join buss_document_library bdl" + join.toString();
|
||||
|
||||
//查询条件
|
||||
StringBuilder conditionSb = new StringBuilder("where 1 = 1");
|
||||
@@ -3535,14 +3546,15 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
int pageNo = Integer.parseInt(parameter.get("pageNo").toString());
|
||||
int pageSize = Integer.parseInt(parameter.get("pageSize").toString());
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
|
||||
IPage infoPage = bussDocumentLibraryEOMapper.ocrPageInfo(page, field, conditionSb.toString());
|
||||
List records = infoPage.getRecords();
|
||||
// IPage infoPage = bussDocumentLibraryEOMapper.ocrPageInfo(page, field, conditionSb.toString());
|
||||
// List records = infoPage.getRecords();
|
||||
List records = bussDocumentLibraryEOMapper.ocrPageInfo(field, conditionSb.toString());
|
||||
page.setTotal(records.size());
|
||||
records = records.subList(pageNo * pageSize - pageSize, pageNo * pageSize);
|
||||
|
||||
//数据字典
|
||||
List<SysDictItem> sysDictItems = sysDictItemServiceImpl.selectItemsAll();
|
||||
//下拉选处理数据字典
|
||||
|
||||
for (Object record : records) {
|
||||
Map<String, Object> record1 = (Map) record;
|
||||
String key = "";
|
||||
@@ -3580,7 +3592,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
record1.put("text_info", onlCgformFieldList.get(0).getDbFieldEnName());
|
||||
}
|
||||
}
|
||||
return infoPage;
|
||||
|
||||
page.setRecords(records);
|
||||
return page;
|
||||
}
|
||||
|
||||
public IPage getInfoPage(Map<String, Object> parameter) {
|
||||
@@ -3683,7 +3697,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String cut = (String) parameter.get("cut");
|
||||
String flag = String.valueOf(parameter.get("flag"));
|
||||
//查询条件
|
||||
StringBuilder conditionSb = new StringBuilder("where 1 = 1");
|
||||
StringBuilder conditionSb = new StringBuilder("where 1 = 1 and osf.connect_id is not null");
|
||||
|
||||
//过滤查询条件字段类型使用
|
||||
List<Map<String, Object>> mapList = queryCondition("1", cut, null);
|
||||
|
||||
+7
-1
@@ -617,6 +617,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids,String projectLibraryId,String cut) {
|
||||
if(ObjectUtils.isEmpty(ids)){
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
throw new JeroBootException("请选择数据");
|
||||
}else{
|
||||
throw new JeroBootException("Please select data");
|
||||
}
|
||||
}
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
int isProjectRole = checkUserRole(projectLibraryId, currentUser.getId(),"");
|
||||
if(!ProjectRoleEnum.STUDIO_ENGINEER.getValue().equals(String.valueOf(isProjectRole))){
|
||||
@@ -638,7 +645,6 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String enContentLog = username+" deleted “"+serialNumber+"” from the list";
|
||||
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId,CutEnum.CN.getValue());
|
||||
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId,CutEnum.EN.getValue());
|
||||
|
||||
removeByIds(ids);
|
||||
this.projectTaskInventoryEOService.deleteByProjectLawsInventoryIds(ids);
|
||||
|
||||
|
||||
+9
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.ModuleEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
@@ -426,6 +427,14 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
wrapper.in(LawsMonthlyReportWriteEO::getCreateBy,currentUser.getUsername());
|
||||
}
|
||||
List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS = this.list(wrapper);
|
||||
|
||||
if(lawsMonthlyReportWriteEOS.size() == 0){
|
||||
if(CutEnum.CN.getValue().equals(lawsMonthlyReportWriteEO.getCut())){
|
||||
throw new JeroBootException("暂无数据");
|
||||
}else{
|
||||
throw new JeroBootException("No data");
|
||||
}
|
||||
}
|
||||
//法规联系人
|
||||
List<LoginUser> loginUserList = getlawsContact(lawsMonthlyReportWriteEOS);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user