合并分支 'fix_2nd_20230103' 到 'master'
Fix 2nd 20230103 查看合并请求 laws-nio/laws-weilai!273
This commit is contained in:
+14
-2
@@ -24,8 +24,8 @@ public enum QueryRuleEnum {
|
|||||||
SQL_RULES("USE_SQL_RULES","ext","自定义SQL片段");
|
SQL_RULES("USE_SQL_RULES","ext","自定义SQL片段");
|
||||||
|
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
private String condition;
|
private String condition;
|
||||||
|
|
||||||
private String msg;
|
private String msg;
|
||||||
|
|
||||||
@@ -70,4 +70,16 @@ public enum QueryRuleEnum {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static QueryRuleEnum getByCondition(String condition){
|
||||||
|
if(oConvertUtils.isEmpty(condition)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for(QueryRuleEnum val :values()){
|
||||||
|
if (val.getCondition().equals(condition)){
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-7
@@ -1,5 +1,6 @@
|
|||||||
package com.jero.modules.cert.collect.controller;
|
package com.jero.modules.cert.collect.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -70,13 +71,14 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
|
|||||||
*/
|
*/
|
||||||
@AutoLog(value = "参数项收集清单-列表查询")
|
@AutoLog(value = "参数项收集清单-列表查询")
|
||||||
@ApiOperation(value="参数项收集清单-列表查询", notes="参数项收集清单-列表查询")
|
@ApiOperation(value="参数项收集清单-列表查询", notes="参数项收集清单-列表查询")
|
||||||
@GetMapping(value = "/list")
|
@PostMapping(value = "/list")
|
||||||
// @RequiresPermissions("params:collectManifest:list")
|
// @RequiresPermissions("params:collectManifest:list")
|
||||||
public Result<?> queryList(ParamsCollectManifestVO paramsCollectManifestVO,
|
public Result<?> queryList(@RequestBody JSONObject json) {
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
String cut = json.getString("cut");
|
||||||
@RequestParam(name="pageSize", defaultValue="100") Integer pageSize,
|
Integer pageNo = json.getInteger("pageNo");
|
||||||
@RequestParam(name = "cut") String cut,
|
Integer pageSize = json.getInteger("pageSize");
|
||||||
HttpServletRequest req) {
|
ParamsCollectManifestVO paramsCollectManifestVO = JSONObject.parseObject(JSONObject.toJSONString(json),ParamsCollectManifestVO.class);
|
||||||
|
|
||||||
// if (StringUtils.isNotEmpty(paramsCollectManifestEO.getNioNumber())) {
|
// if (StringUtils.isNotEmpty(paramsCollectManifestEO.getNioNumber())) {
|
||||||
// paramsCollectManifestEO.setNioNumber(paramsCollectManifestEO.getNioNumber().replace("%","\\%"));
|
// paramsCollectManifestEO.setNioNumber(paramsCollectManifestEO.getNioNumber().replace("%","\\%"));
|
||||||
// }
|
// }
|
||||||
@@ -88,7 +90,7 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
IPage page = new Page(pageNo, pageSize);
|
IPage page = new Page(pageNo, pageSize);
|
||||||
IPage list = paramsCollectManifestEOService.queryList(page, paramsCollectManifestVO, cut, req);
|
IPage list = paramsCollectManifestEOService.queryList(page, paramsCollectManifestVO, cut);
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ public interface ParamsCollectManifestEOMapper extends BaseMapper<ParamsCollectM
|
|||||||
|
|
||||||
List<ParamsCollectManifestEO> queryByParamManifestId(@Param("paramsManifestId") String paramsManifestIdString);
|
List<ParamsCollectManifestEO> queryByParamManifestId(@Param("paramsManifestId") String paramsManifestIdString);
|
||||||
|
|
||||||
IPage selectpage(@Param("page") IPage page, @Param("ew") Wrapper<ParamsCollectManifestVO> queryWrapper, @Param("paramsManifestEO")ParamsManifestEO paramsManifestEO);
|
IPage selectpage(@Param("page") IPage page, @Param("sqlJoin") String sqlJoin, @Param("paramsManifestEO")ParamsManifestEO paramsManifestEO);
|
||||||
|
|
||||||
List<ParamsCollectManifestEO> queryByProjectId(@Param("projectId") String projectId);
|
List<ParamsCollectManifestEO> queryByProjectId(@Param("projectId") String projectId);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -134,7 +134,7 @@
|
|||||||
from params_collect_manifest pcm
|
from params_collect_manifest pcm
|
||||||
where pcm.params_manifest_id = #{paramsManifestEO.id}
|
where pcm.params_manifest_id = #{paramsManifestEO.id}
|
||||||
) temp
|
) temp
|
||||||
${ew.customSqlSegment}
|
${sqlJoin}
|
||||||
</select>
|
</select>
|
||||||
<select id="queryByProjectId" resultMap="ParamsCollectManifestEOResultMap">
|
<select id="queryByProjectId" resultMap="ParamsCollectManifestEOResultMap">
|
||||||
SELECT * from params_collect_manifest pcm LEFT JOIN params_manifest pm ON pm.id = pcm.params_manifest_id WHERE pm.project_id = #{projectId}
|
SELECT * from params_collect_manifest pcm LEFT JOIN params_manifest pm ON pm.id = pcm.params_manifest_id WHERE pm.project_id = #{projectId}
|
||||||
|
|||||||
+5
-1
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||||
import com.jero.modules.cert.collect.vo.ParamsCollectManifestVO;
|
import com.jero.modules.cert.collect.vo.ParamsCollectManifestVO;
|
||||||
|
import com.jero.modules.document.vo.QueryConditionVO;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
@@ -77,7 +78,7 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
|
|||||||
* @param cut
|
* @param cut
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
IPage queryList(IPage page, ParamsCollectManifestVO paramsCollectManifestVO, String cut, HttpServletRequest req);
|
IPage queryList(IPage page, ParamsCollectManifestVO paramsCollectManifestVO, String cut);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表表头中英文切换
|
* 列表表头中英文切换
|
||||||
@@ -193,4 +194,7 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
|
|||||||
|
|
||||||
// 认证工程师-批量修改填写人
|
// 认证工程师-批量修改填写人
|
||||||
Result<?> certifiedEngineerUpdateDreBatch(ParamsCollectManifestVO paramsCollectManifestVO);
|
Result<?> certifiedEngineerUpdateDreBatch(ParamsCollectManifestVO paramsCollectManifestVO);
|
||||||
|
|
||||||
|
// 创建高级查询条件
|
||||||
|
void createAdvanceedSearchCondition(List<QueryConditionVO> queryConditionVOList, StringBuilder sqlJoin);
|
||||||
}
|
}
|
||||||
|
|||||||
+425
-37
@@ -15,6 +15,7 @@ import com.jero.common.api.vo.Result;
|
|||||||
import com.jero.common.constant.enums.*;
|
import com.jero.common.constant.enums.*;
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.common.system.query.QueryRuleEnum;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
import com.jero.common.util.oss.CosBootUtil;
|
import com.jero.common.util.oss.CosBootUtil;
|
||||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||||
@@ -35,6 +36,7 @@ import com.jero.modules.cert.template.enums.ControlVerifyEnum;
|
|||||||
import com.jero.modules.cert.template.enums.ParamsIsMustEnum;
|
import com.jero.modules.cert.template.enums.ParamsIsMustEnum;
|
||||||
import com.jero.modules.cert.template.service.ICertCategoryParamsInfoPublishEOService;
|
import com.jero.modules.cert.template.service.ICertCategoryParamsInfoPublishEOService;
|
||||||
import com.jero.modules.cert.template.service.IParamsInfoPublishEOService;
|
import com.jero.modules.cert.template.service.IParamsInfoPublishEOService;
|
||||||
|
import com.jero.modules.document.vo.QueryConditionVO;
|
||||||
import com.jero.modules.feishu.service.IFeishuService;
|
import com.jero.modules.feishu.service.IFeishuService;
|
||||||
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||||
import com.jero.modules.message.websocket.WebSocket;
|
import com.jero.modules.message.websocket.WebSocket;
|
||||||
@@ -331,7 +333,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
/*@Override
|
||||||
public IPage queryList(IPage page, ParamsCollectManifestVO paramsCollectManifestVO, String cut, HttpServletRequest req) {
|
public IPage queryList(IPage page, ParamsCollectManifestVO paramsCollectManifestVO, String cut, HttpServletRequest req) {
|
||||||
ParamsCollectManifestVO queryEO = new ParamsCollectManifestVO();
|
ParamsCollectManifestVO queryEO = new ParamsCollectManifestVO();
|
||||||
QueryWrapper<ParamsCollectManifestVO> queryWrapper = QueryGenerator.initQueryWrapper(queryEO, req.getParameterMap());
|
QueryWrapper<ParamsCollectManifestVO> queryWrapper = QueryGenerator.initQueryWrapper(queryEO, req.getParameterMap());
|
||||||
@@ -368,10 +370,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
// paramsCollectManifestEO.setDreForAuth(loginUser.getUsername());
|
// paramsCollectManifestEO.setDreForAuth(loginUser.getUsername());
|
||||||
queryWrapper.eq("dre", loginUser.getUsername())
|
queryWrapper.eq("dre", loginUser.getUsername())
|
||||||
.in("state", '4','6','7','8');
|
.in("state", '4','6','7','8');
|
||||||
}/* else if ("sdt,dre".equals(userTypes)) {
|
}*//* else if ("sdt,dre".equals(userTypes)) {
|
||||||
paramsCollectManifestEO.setSdt(loginUser.getUsername());
|
paramsCollectManifestEO.setSdt(loginUser.getUsername());
|
||||||
paramsCollectManifestEO.setDreForAuth(loginUser.getUsername());
|
paramsCollectManifestEO.setDreForAuth(loginUser.getUsername());
|
||||||
}*/ else if ("guest".equals(userTypes)) {
|
}*//* else if ("guest".equals(userTypes)) {
|
||||||
return page;
|
return page;
|
||||||
} else if (CollectManifestUserTypeEnum.VIEWER.getValue().equals(userTypes)) {
|
} else if (CollectManifestUserTypeEnum.VIEWER.getValue().equals(userTypes)) {
|
||||||
List<String> dutyTerritoryList = projectUserDutyTerritoryService.queryDutyTerritoryByUserId(loginUser.getId());
|
List<String> dutyTerritoryList = projectUserDutyTerritoryService.queryDutyTerritoryByUserId(loginUser.getId());
|
||||||
@@ -386,7 +388,24 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
// 搜索NIO编号或认证类别编号 精确搜索
|
// 搜索NIO编号或认证类别编号 精确搜索
|
||||||
if (StringUtils.isNotEmpty(paramsCollectManifestVO.getAllNumber())) {
|
if (StringUtils.isNotEmpty(paramsCollectManifestVO.getAllNumber())) {
|
||||||
//queryWrapper.and(wrapper->wrapper.eq("nio_number", paramsCollectManifestVO.getAllNumber()).or().eq("params_number", paramsCollectManifestVO.getAllNumber()));
|
//queryWrapper.and(wrapper->wrapper.eq("nio_number", paramsCollectManifestVO.getAllNumber()).or().eq("params_number", paramsCollectManifestVO.getAllNumber()));
|
||||||
queryWrapper.and(wrapper->wrapper.like("nio_number", paramsCollectManifestVO.getAllNumber()));
|
//queryWrapper.and(wrapper->wrapper.like("nio_number", paramsCollectManifestVO.getAllNumber()));
|
||||||
|
|
||||||
|
QueryWrapper<CertCategoryParamsInfoPublishEO> categoryParamsQueryWrap = new QueryWrapper<>();
|
||||||
|
categoryParamsQueryWrap.lambda().eq(CertCategoryParamsInfoPublishEO::getParamsNumber,paramsCollectManifestVO.getAllNumber());
|
||||||
|
List<CertCategoryParamsInfoPublishEO> categoryParamsList = this.certCategoryParamsInfoPublishEOService.list(categoryParamsQueryWrap);
|
||||||
|
|
||||||
|
queryWrapper.and(wrapper -> {
|
||||||
|
wrapper.eq("nio_number",paramsCollectManifestVO.getAllNumber());
|
||||||
|
if(CollectionUtils.isNotEmpty(categoryParamsList)){
|
||||||
|
List<String> nioNumberList = categoryParamsList.stream().map(CertCategoryParamsInfoPublishEO::getNioNumber)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if(CollectionUtils.isNotEmpty(nioNumberList)){
|
||||||
|
wrapper.or(wrap -> {
|
||||||
|
wrap.in("nio_number",nioNumberList);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty(paramsCollectManifestVO.getDutyTerritory())) {
|
if (StringUtils.isNotEmpty(paramsCollectManifestVO.getDutyTerritory())) {
|
||||||
List<String> dutyTerritoryList = Arrays.asList(paramsCollectManifestVO.getDutyTerritory().split(","));
|
List<String> dutyTerritoryList = Arrays.asList(paramsCollectManifestVO.getDutyTerritory().split(","));
|
||||||
@@ -519,7 +538,229 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
pageInfo.setRecords(listMap);
|
pageInfo.setRecords(listMap);
|
||||||
return pageInfo;
|
return pageInfo;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public IPage queryList(IPage page, ParamsCollectManifestVO paramsCollectManifestVO, String cut) {
|
||||||
|
String paramsManifestId = paramsCollectManifestVO.getParamsManifestId();
|
||||||
|
ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsManifestId);
|
||||||
|
|
||||||
|
String userTypes = paramsCollectManifestVO.getUserTypes();
|
||||||
|
if (StringUtils.isBlank(userTypes)) {
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
throw new JeroBootException("用户类型参数不能为空!");
|
||||||
|
} else {
|
||||||
|
throw new JeroBootException("User type can not be null!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!CollectManifestUserTypeEnum.doesValueExist(userTypes)) {
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
throw new JeroBootException("用户类型不存在!");
|
||||||
|
} else {
|
||||||
|
throw new JeroBootException("User type is not exist!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBuilder sqlJoinSb = new StringBuilder();
|
||||||
|
sqlJoinSb.append("where control_type not in ").append("('").append(ControlTypeEnum.Title.getValue()).append("')");
|
||||||
|
|
||||||
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录用户
|
||||||
|
if ("sdt".equals(userTypes)) {
|
||||||
|
sqlJoinSb.append(" and sdt = '").append(loginUser.getUsername()).append("'");
|
||||||
|
sqlJoinSb.append(" and state in ('2','4','5','6','7','8')");
|
||||||
|
} else if ("dre".equals(userTypes)) {
|
||||||
|
sqlJoinSb.append(" and dre = '").append(loginUser.getUsername()).append("'");
|
||||||
|
sqlJoinSb.append(" and state in ('4','6','7','8')");
|
||||||
|
} else if ("guest".equals(userTypes)) {
|
||||||
|
return page;
|
||||||
|
} else if (CollectManifestUserTypeEnum.VIEWER.getValue().equals(userTypes)) {
|
||||||
|
List<String> dutyTerritoryList = projectUserDutyTerritoryService.queryDutyTerritoryByUserId(loginUser.getId());
|
||||||
|
StringBuilder dutyTerritorySb = new StringBuilder();
|
||||||
|
for (int i = 0; i < dutyTerritoryList.size(); i++) {
|
||||||
|
dutyTerritorySb.append("'").append(dutyTerritoryList.get(i)).append("'");
|
||||||
|
// 如果还有下一条
|
||||||
|
if(i+1 < dutyTerritoryList.size()){
|
||||||
|
dutyTerritorySb.append(",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sqlJoinSb.append(" and (").append("sdt = '").append(loginUser.getUsername()).append("'")
|
||||||
|
.append(" or dre = '").append(loginUser.getUsername()).append("'")
|
||||||
|
.append(" or duty_territory in (").append(dutyTerritorySb.toString()).append(")")
|
||||||
|
.append(")");
|
||||||
|
}
|
||||||
|
// 搜索NIO编号或认证类别编号 精确搜索
|
||||||
|
if (StringUtils.isNotEmpty(paramsCollectManifestVO.getAllNumber())) {
|
||||||
|
paramsCollectManifestVO.setAllNumber(paramsCollectManifestVO.getAllNumber().replaceAll("'","\'"));
|
||||||
|
sqlJoinSb.append(" and (").append("nio_number = '").append(paramsCollectManifestVO.getAllNumber()).append("'");
|
||||||
|
sqlJoinSb.append(" or nio_number in (")
|
||||||
|
.append("select nio_number from cert_category_params_info_publish where params_number = '").append(paramsCollectManifestVO.getAllNumber()).append("'")
|
||||||
|
.append(")");
|
||||||
|
sqlJoinSb.append(")");
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotEmpty(paramsCollectManifestVO.getDutyTerritory())) {
|
||||||
|
List<String> dutyTerritoryList = Arrays.asList(paramsCollectManifestVO.getDutyTerritory().split(","));
|
||||||
|
StringBuilder dutyTerritoryListSb = new StringBuilder();
|
||||||
|
for (int i = 0; i < dutyTerritoryList.size(); i++) {
|
||||||
|
dutyTerritoryListSb.append("'").append(dutyTerritoryList.get(i)).append("'");
|
||||||
|
if(i+1 < dutyTerritoryList.size()){
|
||||||
|
dutyTerritoryListSb.append(",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sqlJoinSb.append(" and duty_territory in (").append(dutyTerritoryListSb.toString()).append(")");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNotEmpty(paramsCollectManifestVO.getParamsName())) {
|
||||||
|
paramsCollectManifestVO.setParamsName(paramsCollectManifestVO.getParamsName().replaceAll("'","\'"));
|
||||||
|
sqlJoinSb.append(" and params_name like '%").append(paramsCollectManifestVO.getParamsName()).append("%'");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNotEmpty(paramsCollectManifestVO.getSdt())) {
|
||||||
|
paramsCollectManifestVO.setSdt(paramsCollectManifestVO.getSdt().replaceAll("'","\'"));
|
||||||
|
sqlJoinSb.append(" and sdt like '%").append(paramsCollectManifestVO.getSdt()).append("%'");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNotEmpty(paramsCollectManifestVO.getDre())) {
|
||||||
|
paramsCollectManifestVO.setDre(paramsCollectManifestVO.getDre().replaceAll("'","\'"));
|
||||||
|
sqlJoinSb.append(" and dre like '%").append(paramsCollectManifestVO.getDre()).append("%'");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果高级查询条件不为空,拼接参数
|
||||||
|
if(StringUtils.isNotEmpty(paramsCollectManifestVO.getQueryConditionVOListStr())){
|
||||||
|
List<QueryConditionVO> queryConditionVOList = JSONObject.parseArray(paramsCollectManifestVO.getQueryConditionVOListStr(), QueryConditionVO.class);
|
||||||
|
this.createAdvanceedSearchCondition(queryConditionVOList,sqlJoinSb);
|
||||||
|
}
|
||||||
|
|
||||||
|
sqlJoinSb.append(" ORDER BY del_flag DESC")
|
||||||
|
.append(", add_flag DESC")
|
||||||
|
.append(", change_flag DESC")
|
||||||
|
.append(", nio_number ASC");
|
||||||
|
|
||||||
|
IPage pageInfo = paramsCollectManifestEOMapper.selectpage(page, sqlJoinSb.toString(),paramsManifestEO); // 查询固定列
|
||||||
|
List<ParamsCollectManifestEO> list = pageInfo.getRecords(); // 查询固定列
|
||||||
|
List<ParamsConfigEO> paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId); // 查询配置列
|
||||||
|
List<String> paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
|
||||||
|
List<ParamsConfigDataEO> paramsConfigDataEOList = paramsConfigDataEOService.queryListByConfigIdList(paramsConfigIdList); // 查询所有配置数据
|
||||||
|
|
||||||
|
// 普通数据字典
|
||||||
|
List<SysDictItem> dictItemList = new ArrayList<>();
|
||||||
|
List<String> dictCodeList = new ArrayList<>();
|
||||||
|
dictCodeList.add("duty_territory");
|
||||||
|
dictCodeList.add("cert_category");
|
||||||
|
for (String dictCode : dictCodeList) {
|
||||||
|
List<SysDictItem> dictItems = sysDictItemService.selectItemsByDictCode(dictCode);
|
||||||
|
dictItemList.addAll(dictItems);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Map<String, Object>> listMap = new ArrayList<>();
|
||||||
|
list.forEach(collectManifestEO -> { // 参数收集清单
|
||||||
|
// 处理数据字典字段 中英文切换 认证类型,责任领域
|
||||||
|
List<String> certCategory = Arrays.asList(collectManifestEO.getCertCategory().split(","));
|
||||||
|
List<String> dutyTerritory = Arrays.asList(collectManifestEO.getDutyTerritory().split(",")); // 单选
|
||||||
|
String certCategoryName = "";
|
||||||
|
String dutyTerritoryName = "";
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
certCategoryName = dictItemList.stream()
|
||||||
|
.filter(e -> certCategory.contains(e.getItemValue()))
|
||||||
|
.map(SysDictItem::getItemText)
|
||||||
|
.collect(Collectors.joining(","));
|
||||||
|
|
||||||
|
dutyTerritoryName = dictItemList.stream()
|
||||||
|
.filter(e -> dutyTerritory.contains(e.getItemValue()))
|
||||||
|
.map(SysDictItem::getItemText)
|
||||||
|
.collect(Collectors.joining(","));
|
||||||
|
|
||||||
|
} else if (CutEnum.EN.getValue().equals(cut)) {
|
||||||
|
certCategoryName = dictItemList.stream()
|
||||||
|
.filter(e -> certCategory.contains(e.getItemValue()))
|
||||||
|
.map(SysDictItem::getEnName)
|
||||||
|
.collect(Collectors.joining(","));
|
||||||
|
|
||||||
|
dutyTerritoryName = dictItemList.stream()
|
||||||
|
.filter(e -> dutyTerritory.contains(e.getItemValue()))
|
||||||
|
.map(SysDictItem::getEnName)
|
||||||
|
.collect(Collectors.joining(","));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
collectManifestEO.setCertCategory(certCategoryName);
|
||||||
|
collectManifestEO.setDutyTerritory(dutyTerritoryName);
|
||||||
|
|
||||||
|
// 处理状态字段
|
||||||
|
Map<String, String> collectManifestStateMap = CollectManifestStateEnum.toMap(cut);
|
||||||
|
String stateName = collectManifestStateMap.get(collectManifestEO.getState());
|
||||||
|
collectManifestEO.setState(stateName);
|
||||||
|
|
||||||
|
List<String> configIdList = new ArrayList<>(); // 配置列名
|
||||||
|
|
||||||
|
Map<String, Object> manifestMap = objectToMap(collectManifestEO); // 对象转map
|
||||||
|
String controlType = collectManifestEO.getControlType();
|
||||||
|
String paramsCollectManifestId = collectManifestEO.getId();
|
||||||
|
|
||||||
|
if (StringUtils.isNotEmpty(paramsManifestEO.getReferencesColName())) {
|
||||||
|
Map<String, Object> referencesColMap = new HashMap<>();
|
||||||
|
String referencesCol = collectManifestEO.getReferencesCol();
|
||||||
|
if (StringUtils.isNotBlank(referencesCol)) {
|
||||||
|
List<ParamsConfigDataVO> referencesColVOList = getReferencesColList(controlType, referencesCol, collectManifestEO, userTypes); // 重新组合配置数据
|
||||||
|
referencesColMap.put("controlType", controlType);
|
||||||
|
referencesColMap.put("list", referencesColVOList);
|
||||||
|
manifestMap.put("referencesCol", referencesColMap);
|
||||||
|
} else {
|
||||||
|
List<ParamsConfigDataVO> referencesColVOList = getReferencesColList(controlType, " # # #", collectManifestEO, userTypes); // 重新组合配置数据
|
||||||
|
referencesColMap.put("controlType", controlType);
|
||||||
|
referencesColMap.put("list", referencesColVOList);
|
||||||
|
manifestMap.put("referencesCol", referencesColMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CollectionUtil.isNotEmpty(paramsConfigEOList)) {
|
||||||
|
paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置
|
||||||
|
Map<String, Object> configMap = new HashMap<>();
|
||||||
|
String paramsConfigId = paramsConfigEO.getId();
|
||||||
|
ParamsConfigDataEO paramsConfigDataEO = getConfigDataEOByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId, paramsConfigDataEOList); // 参数配置数据
|
||||||
|
List<ParamsConfigDataVO> paramsConfigDataVOList = getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
|
||||||
|
configMap.put("controlType", controlType);
|
||||||
|
configMap.put("list", paramsConfigDataVOList);
|
||||||
|
manifestMap.put(paramsConfigEO.getId(), configMap);
|
||||||
|
|
||||||
|
configIdList.add(paramsConfigEO.getId());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理负责领域
|
||||||
|
Map<String, Object> dutyTerritoryMap = new HashMap<>();
|
||||||
|
dutyTerritoryMap.put("id", collectManifestEO.getId());
|
||||||
|
dutyTerritoryMap.put("state", collectManifestEO.getState());
|
||||||
|
dutyTerritoryMap.put("dataValue", collectManifestEO.getDutyTerritory());
|
||||||
|
manifestMap.put("dutyTerritory", dutyTerritoryMap);
|
||||||
|
|
||||||
|
// 处理工程接口人
|
||||||
|
Map<String, Object> sdtMap = new HashMap<>();
|
||||||
|
sdtMap.put("id", collectManifestEO.getId());
|
||||||
|
sdtMap.put("state", collectManifestEO.getState());
|
||||||
|
sdtMap.put("dutyTerritory", StringUtils.join(dutyTerritory, ","));
|
||||||
|
if (StringUtils.isNotBlank(collectManifestEO.getSdt())) {
|
||||||
|
sdtMap.put("dataValue", collectManifestEO.getSdt());
|
||||||
|
} else {
|
||||||
|
sdtMap.put("dataValue", null);
|
||||||
|
}
|
||||||
|
manifestMap.put("sdt", sdtMap);
|
||||||
|
|
||||||
|
// 配置列名数组
|
||||||
|
manifestMap.put("configIds", configIdList);
|
||||||
|
|
||||||
|
listMap.add(manifestMap);
|
||||||
|
});
|
||||||
|
|
||||||
|
pageInfo.setRecords(listMap);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重新组装配置数据 用于返回前端
|
* 重新组装配置数据 用于返回前端
|
||||||
@@ -3933,42 +4174,46 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
String control_type = record1.get("control_type").toString();
|
String control_type = record1.get("control_type").toString();
|
||||||
//references_col -> #a# #
|
//references_col -> #a# #
|
||||||
String references_col = record1.get("references_col").toString();
|
if(!Objects.isNull(record1.get("references_col"))){
|
||||||
String[] references_colArr = references_col.split("#");
|
String references_col = record1.get("references_col").toString();
|
||||||
if(StringUtils.equals(control_type,ControlTypeEnum.FILE.getValue())){
|
if(StringUtils.isNotEmpty(references_col)){
|
||||||
String fileId = references_colArr[2];
|
String[] references_colArr = references_col.split("#");
|
||||||
List<OSSFile> fileInfos = this.ossFileService.getFileInfos(fileId);
|
if(StringUtils.equals(control_type,ControlTypeEnum.FILE.getValue())){
|
||||||
String fileName = fileInfos.stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
|
String fileId = references_colArr[2];
|
||||||
references_col = "#"+ references_colArr[0] + "#" + references_colArr[1] + "#" + fileName;
|
List<OSSFile> fileInfos = this.ossFileService.getFileInfos(fileId);
|
||||||
}else if(StringUtils.equals(control_type,ControlTypeEnum.TEXT_FILE.getValue())
|
String fileName = fileInfos.stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
|
||||||
||StringUtils.equals(control_type,ControlTypeEnum.PULL_SINGLE_FILE.getValue())
|
references_col = "#"+ references_colArr[0] + "#" + references_colArr[1] + "#" + fileName;
|
||||||
||StringUtils.equals(control_type,ControlTypeEnum.PULL_MORE_FILE.getValue())){
|
}else if(StringUtils.equals(control_type,ControlTypeEnum.TEXT_FILE.getValue())
|
||||||
String fileId = references_colArr[2];
|
||StringUtils.equals(control_type,ControlTypeEnum.PULL_SINGLE_FILE.getValue())
|
||||||
List<OSSFile> fileInfos = this.ossFileService.getFileInfos(fileId);
|
||StringUtils.equals(control_type,ControlTypeEnum.PULL_MORE_FILE.getValue())){
|
||||||
String fileName = fileInfos.stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
|
String fileId = references_colArr[2];
|
||||||
references_col = "#"+ references_colArr[0] + "#" + references_colArr[1] + "#" + fileName;
|
List<OSSFile> fileInfos = this.ossFileService.getFileInfos(fileId);
|
||||||
}else if(StringUtils.equals(control_type,ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue())){
|
String fileName = fileInfos.stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
|
||||||
String fileId = references_colArr[2];
|
references_col = "#"+ references_colArr[0] + "#" + references_colArr[1] + "#" + fileName;
|
||||||
List<OSSFile> fileInfos = this.ossFileService.getFileInfos(fileId);
|
}else if(StringUtils.equals(control_type,ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue())){
|
||||||
String fileName = fileInfos.stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
|
String fileId = references_colArr[2];
|
||||||
references_col = "#"+ references_colArr[0] + "#" + references_colArr[1] + "#" + fileName;
|
List<OSSFile> fileInfos = this.ossFileService.getFileInfos(fileId);
|
||||||
}
|
String fileName = fileInfos.stream().map(OSSFile::getFileName).collect(Collectors.joining(","));
|
||||||
|
references_col = "#"+ references_colArr[0] + "#" + references_colArr[1] + "#" + fileName;
|
||||||
|
}
|
||||||
|
|
||||||
StringBuilder references_colSb = new StringBuilder();
|
StringBuilder references_colSb = new StringBuilder();
|
||||||
for (String col : references_col.split("#")) {
|
for (String col : references_col.split("#")) {
|
||||||
if(StringUtils.isNotEmpty(col) && !StringUtils.equals(col," ")){
|
if(StringUtils.isNotEmpty(col) && !StringUtils.equals(col," ")){
|
||||||
references_colSb.append(col).append("#");
|
references_colSb.append(col).append("#");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(StringUtils.isNotEmpty(references_colSb)){
|
||||||
|
references_col = references_colSb.substring(0,references_colSb.length()-1);
|
||||||
|
}else {
|
||||||
|
references_col = references_colSb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
record1.put("references_col",references_col);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StringUtils.isNotEmpty(references_colSb)){
|
|
||||||
references_col = references_colSb.substring(0,references_colSb.length()-1);
|
|
||||||
}else {
|
|
||||||
references_col = references_colSb.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
record1.put("references_col",references_col);
|
|
||||||
|
|
||||||
// 处理负责领域
|
// 处理负责领域
|
||||||
record1.put("duty_territory", dutyTerritoryMap.get(dutyTerritory));
|
record1.put("duty_territory", dutyTerritoryMap.get(dutyTerritory));
|
||||||
|
|
||||||
@@ -5941,4 +6186,147 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
return count;
|
return count;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建高级查询条件
|
||||||
|
* @param queryConditionVOList
|
||||||
|
* @param sqlJoinSb
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void createAdvanceedSearchCondition(List<QueryConditionVO> queryConditionVOList,StringBuilder sqlJoinSb){
|
||||||
|
if(CollectionUtils.isNotEmpty(queryConditionVOList)){
|
||||||
|
sqlJoinSb.append(" and ( ");
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (QueryConditionVO queryConditionVO : queryConditionVOList) {
|
||||||
|
String type = queryConditionVO.getType();
|
||||||
|
String rule = queryConditionVO.getRule();
|
||||||
|
String ruleLike = "";
|
||||||
|
if(QueryRuleEnum.LEFT_LIKE.getCondition().equals(rule) || QueryRuleEnum.RIGHT_LIKE.getCondition().equals(rule)){
|
||||||
|
ruleLike = QueryRuleEnum.LIKE.getCondition();
|
||||||
|
}
|
||||||
|
String field = queryConditionVO.getField();
|
||||||
|
if(StringUtils.equals(field,"paramsNumber")){
|
||||||
|
field = "nio_number";
|
||||||
|
}
|
||||||
|
String val = queryConditionVO.getVal();
|
||||||
|
|
||||||
|
if(StringUtils.isNotEmpty(val)){
|
||||||
|
count++;
|
||||||
|
//从第二个查询条件开始拼接type(and或or)
|
||||||
|
if (count > 1) {
|
||||||
|
sqlJoinSb.append(" " + type + " ");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果该字段是认证类别字段,单独做处理。
|
||||||
|
if(StringUtils.equals(field,"certCategory")) {
|
||||||
|
/*QueryWrapper<CertCategoryParamsInfoPublishEO> categoryParamsQueryWrap = new QueryWrapper<>();
|
||||||
|
|
||||||
|
if(StringUtils.equals(rule, QueryRuleEnum.EQ.getCondition())){
|
||||||
|
categoryParamsQueryWrap.lambda().eq(CertCategoryParamsInfoPublishEO::getCertCategory,val);
|
||||||
|
}else if(StringUtils.equals(rule,QueryRuleEnum.NE.getCondition())){
|
||||||
|
categoryParamsQueryWrap.lambda().ne(CertCategoryParamsInfoPublishEO::getCertCategory,val);
|
||||||
|
}
|
||||||
|
List<CertCategoryParamsInfoPublishEO> categoryParamsList = this.certCategoryParamsInfoPublishEOService.list(categoryParamsQueryWrap);
|
||||||
|
List<String> nioNumberList = categoryParamsList.stream().map(CertCategoryParamsInfoPublishEO::getNioNumber)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
StringBuilder nioNumberSb = new StringBuilder();
|
||||||
|
for (int i = 0; i < nioNumberList.size(); i++) {
|
||||||
|
nioNumberSb.append("'").append(nioNumberList.get(i)).append("'");
|
||||||
|
if(i+1 < nioNumberList.size()){
|
||||||
|
nioNumberSb.append(",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 特殊处理
|
||||||
|
if(StringUtils.isNotEmpty(nioNumberSb.toString())){
|
||||||
|
sqlJoinSb.append("nio_number in (").append(nioNumberSb.toString()).append(")");
|
||||||
|
}*/
|
||||||
|
if(StringUtils.equals(rule, QueryRuleEnum.EQ.getCondition())){
|
||||||
|
sqlJoinSb.append("nio_number in (")
|
||||||
|
.append("select nio_number from cert_category_params_info_publish where cert_category = ").append("'" + val + "'")
|
||||||
|
.append(")");
|
||||||
|
}else if(StringUtils.equals(rule,QueryRuleEnum.NE.getCondition())){
|
||||||
|
sqlJoinSb.append("nio_number not in (")
|
||||||
|
.append("select nio_number from cert_category_params_info_publish where cert_category = ").append("'" + val + "'")
|
||||||
|
.append(")");
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(StringUtils.equals(field,"nio_number")){
|
||||||
|
sqlJoinSb.append("(");
|
||||||
|
}
|
||||||
|
|
||||||
|
sqlJoinSb.append(" " + field + " ");
|
||||||
|
|
||||||
|
QueryRuleEnum byCondition = QueryRuleEnum.getByCondition(rule);
|
||||||
|
String ruleTemp = byCondition.getValue();
|
||||||
|
if (StringUtils.isNotBlank(ruleLike)) {
|
||||||
|
sqlJoinSb.append(ruleLike + " ");
|
||||||
|
} else {
|
||||||
|
sqlJoinSb.append(ruleTemp + " ");
|
||||||
|
}
|
||||||
|
|
||||||
|
val = val.replaceAll("'","\'");
|
||||||
|
|
||||||
|
//like和in需要特殊处理
|
||||||
|
if (QueryRuleEnum.IN.getCondition().equals(rule)) {
|
||||||
|
if (val.contains(",")) {
|
||||||
|
StringBuilder sbTemp = new StringBuilder();
|
||||||
|
for (String valTemp : val.split(",")) {
|
||||||
|
sbTemp.append("'" + valTemp + "' ,");
|
||||||
|
}
|
||||||
|
if (com.jero.modules.system.util.StringUtils.isNotBlank(sbTemp)) {
|
||||||
|
String substring = sbTemp.substring(0, sbTemp.length() - 1);
|
||||||
|
sqlJoinSb.append("(" + substring + ")");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sqlJoinSb.append("('" + val + "')");
|
||||||
|
} else if (QueryRuleEnum.LIKE.getCondition().equals(rule)) {
|
||||||
|
sqlJoinSb.append("'%" + val + "%'");
|
||||||
|
} else if (QueryRuleEnum.LEFT_LIKE.getCondition().equals(rule)) {
|
||||||
|
sqlJoinSb.append("'%" + val + "'");
|
||||||
|
} else if (QueryRuleEnum.RIGHT_LIKE.getCondition().equals(rule)) {
|
||||||
|
sqlJoinSb.append("'" + val + "%'");
|
||||||
|
} else {
|
||||||
|
sqlJoinSb.append("'" + val + "'");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果该字段是认证类别编号字段,单独做处理。
|
||||||
|
if(StringUtils.equals(field,"nio_number")){
|
||||||
|
QueryWrapper<CertCategoryParamsInfoPublishEO> categoryParamsQueryWrap = new QueryWrapper<>();
|
||||||
|
if(StringUtils.equals(rule, QueryRuleEnum.EQ.getCondition())){
|
||||||
|
categoryParamsQueryWrap.lambda().eq(CertCategoryParamsInfoPublishEO::getParamsNumber,val);
|
||||||
|
}else if(StringUtils.equals(rule,QueryRuleEnum.NE.getCondition())){
|
||||||
|
categoryParamsQueryWrap.lambda().ne(CertCategoryParamsInfoPublishEO::getParamsNumber,val);
|
||||||
|
}else if(StringUtils.equals(rule,QueryRuleEnum.LIKE.getCondition())){
|
||||||
|
categoryParamsQueryWrap.lambda().like(CertCategoryParamsInfoPublishEO::getParamsNumber,val);
|
||||||
|
}else if(StringUtils.equals(rule,QueryRuleEnum.LEFT_LIKE.getCondition())){
|
||||||
|
categoryParamsQueryWrap.lambda().likeLeft(CertCategoryParamsInfoPublishEO::getParamsNumber,val);
|
||||||
|
}else if(StringUtils.equals(rule,QueryRuleEnum.RIGHT_LIKE.getCondition())){
|
||||||
|
categoryParamsQueryWrap.lambda().likeRight(CertCategoryParamsInfoPublishEO::getParamsNumber,val);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<CertCategoryParamsInfoPublishEO> categoryParamsList = this.certCategoryParamsInfoPublishEOService.list(categoryParamsQueryWrap);
|
||||||
|
List<String> nioNumberList = categoryParamsList.stream().map(CertCategoryParamsInfoPublishEO::getNioNumber)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
StringBuilder nioNumberSb = new StringBuilder();
|
||||||
|
for (int i = 0; i < nioNumberList.size(); i++) {
|
||||||
|
nioNumberSb.append("'").append(nioNumberList.get(i).replaceAll("'","\'")).append("'");
|
||||||
|
if(i+1 < nioNumberList.size()){
|
||||||
|
nioNumberSb.append(",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(StringUtils.isNotEmpty(nioNumberSb.toString())){
|
||||||
|
sqlJoinSb.append(" or ").append(field).append(" in (").append(nioNumberSb.toString()).append(")");
|
||||||
|
}
|
||||||
|
|
||||||
|
sqlJoinSb.append(")");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sqlJoinSb.append(" ) ");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -95,4 +95,7 @@ public class ParamsCollectManifestVO {
|
|||||||
// 退回操作人角色
|
// 退回操作人角色
|
||||||
private String currentPersonRole;
|
private String currentPersonRole;
|
||||||
|
|
||||||
|
// 高级查询参数
|
||||||
|
private String queryConditionVOListStr;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-2
@@ -71,7 +71,10 @@
|
|||||||
<where>
|
<where>
|
||||||
<if test="paramsReportDetailVO != null">
|
<if test="paramsReportDetailVO != null">
|
||||||
<if test="paramsReportDetailVO.allNumber !=null and paramsReportDetailVO.allNumber !=''">
|
<if test="paramsReportDetailVO.allNumber !=null and paramsReportDetailVO.allNumber !=''">
|
||||||
AND prd.nio_number LIKE CONCAT(CONCAT('%',#{paramsReportDetailVO.allNumber}),'%')
|
AND (
|
||||||
|
prd.nio_number = #{paramsReportDetailVO.allNumber}
|
||||||
|
or prd.nio_number in (select nio_number from report_cert_category_params_info rccpi where rccpi.params_number = #{paramsReportDetailVO.allNumber})
|
||||||
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="paramsReportDetailVO.paramsName !=null and paramsReportDetailVO.paramsName !=''">
|
<if test="paramsReportDetailVO.paramsName !=null and paramsReportDetailVO.paramsName !=''">
|
||||||
AND prd.params_name LIKE CONCAT(CONCAT('%',#{paramsReportDetailVO.paramsName}),'%')
|
AND prd.params_name LIKE CONCAT(CONCAT('%',#{paramsReportDetailVO.paramsName}),'%')
|
||||||
@@ -188,4 +191,4 @@
|
|||||||
and prcd.params_config_id = #{paramsReportConfigId}
|
and prcd.params_config_id = #{paramsReportConfigId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
+26
-4
@@ -10,13 +10,16 @@ import com.jero.common.api.vo.Result;
|
|||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
import com.jero.common.constant.enums.CutEnum;
|
import com.jero.common.constant.enums.CutEnum;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import com.jero.modules.cert.template.entity.CertCategoryParamsInfoEO;
|
||||||
import com.jero.modules.cert.template.entity.ParamsInfoEO;
|
import com.jero.modules.cert.template.entity.ParamsInfoEO;
|
||||||
|
import com.jero.modules.cert.template.service.ICertCategoryParamsInfoEOService;
|
||||||
import com.jero.modules.cert.template.service.IParamsInfoEOService;
|
import com.jero.modules.cert.template.service.IParamsInfoEOService;
|
||||||
import com.jero.modules.cert.template.service.IParamsInfoPublishEOService;
|
import com.jero.modules.cert.template.service.IParamsInfoPublishEOService;
|
||||||
import com.jero.modules.cert.template.vo.ParamsInfoVO;
|
import com.jero.modules.cert.template.vo.ParamsInfoVO;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -29,6 +32,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -47,7 +51,10 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IParamsInfoPublishEOService paramsInfoPublishEOService;
|
private IParamsInfoPublishEOService paramsInfoPublishEOService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICertCategoryParamsInfoEOService certCategoryParamsInfoEOService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
@@ -83,9 +90,24 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
|||||||
|
|
||||||
QueryWrapper<ParamsInfoEO> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<ParamsInfoEO> queryWrapper = new QueryWrapper<>();
|
||||||
String finalAllNumber = allNumber;
|
String finalAllNumber = allNumber;
|
||||||
queryWrapper.eq("pi.params_template_id", paramsInfoEO.getParamsTemplateId())
|
queryWrapper.eq("pi.params_template_id", paramsInfoEO.getParamsTemplateId());
|
||||||
.and(StringUtils.isNotEmpty(allNumber), wrapper->wrapper.eq("pi.nio_number", finalAllNumber).or().eq("ccpi.params_number", finalAllNumber))
|
if(StringUtils.isNotEmpty(allNumber)){
|
||||||
.like(StringUtils.isNotEmpty(paramsInfoEO.getParamsName()), "pi.params_name", paramsInfoEO.getParamsName())
|
queryWrapper.and(wrapper->wrapper.eq("pi.nio_number", finalAllNumber));
|
||||||
|
|
||||||
|
QueryWrapper<CertCategoryParamsInfoEO> categoryParamsQueryWrap = new QueryWrapper<>();
|
||||||
|
categoryParamsQueryWrap.lambda().eq(CertCategoryParamsInfoEO::getParamsNumber,finalAllNumber);
|
||||||
|
List<CertCategoryParamsInfoEO> certCategoryParamsInfoEOList = this.certCategoryParamsInfoEOService.list(categoryParamsQueryWrap);
|
||||||
|
|
||||||
|
if(CollectionUtils.isNotEmpty(certCategoryParamsInfoEOList)){
|
||||||
|
List<String> nioNumberList = certCategoryParamsInfoEOList.stream().map(CertCategoryParamsInfoEO::getNioNumber).collect(Collectors.toList());
|
||||||
|
if(CollectionUtils.isNotEmpty(nioNumberList)){
|
||||||
|
queryWrapper.or(wrap -> {
|
||||||
|
wrap.in("pi.nio_number",nioNumberList);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
queryWrapper.like(StringUtils.isNotEmpty(paramsInfoEO.getParamsName()), "pi.params_name", paramsInfoEO.getParamsName())
|
||||||
.eq(StringUtils.isNotEmpty(paramsInfoEO.getDutyTerritory()), "pi.duty_territory", paramsInfoEO.getDutyTerritory())
|
.eq(StringUtils.isNotEmpty(paramsInfoEO.getDutyTerritory()), "pi.duty_territory", paramsInfoEO.getDutyTerritory())
|
||||||
.orderBy(true, "asc".equals(orderBy)?true:false, "pi.nio_number");
|
.orderBy(true, "asc".equals(orderBy)?true:false, "pi.nio_number");
|
||||||
Page<ParamsInfoEO> page = new Page<ParamsInfoEO>(pageNo, pageSize);
|
Page<ParamsInfoEO> page = new Page<ParamsInfoEO>(pageNo, pageSize);
|
||||||
|
|||||||
+1
-2
@@ -180,7 +180,6 @@
|
|||||||
<select id="selectpage" resultMap="ParamsInfoEOResultMap">
|
<select id="selectpage" resultMap="ParamsInfoEOResultMap">
|
||||||
select DISTINCT pi.*
|
select DISTINCT pi.*
|
||||||
from params_info pi
|
from params_info pi
|
||||||
left join cert_category_params_info ccpi on pi.nio_number = ccpi.nio_number and pi.params_template_id = ccpi.params_template_id
|
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -1376,4 +1376,6 @@ module.exports = {
|
|||||||
Updateparametercolumn:'Update The Parameter Column',
|
Updateparametercolumn:'Update The Parameter Column',
|
||||||
columnfirst:'Reference the parameter column first',
|
columnfirst:'Reference the parameter column first',
|
||||||
columnforced:'Confirm a forced retraction?',
|
columnforced:'Confirm a forced retraction?',
|
||||||
|
customize:'Customize the header',
|
||||||
|
customColumn:'Custom column',
|
||||||
}
|
}
|
||||||
@@ -1477,4 +1477,6 @@ module.exports = {
|
|||||||
brand:'品牌',
|
brand:'品牌',
|
||||||
allsubitemsitem:'该项目下拥有子项目,是否全部删除',
|
allsubitemsitem:'该项目下拥有子项目,是否全部删除',
|
||||||
contactTheFounder:'联系创建人',
|
contactTheFounder:'联系创建人',
|
||||||
|
customize:'自定义表头',
|
||||||
|
customColumn:'自定义列',
|
||||||
}
|
}
|
||||||
@@ -853,20 +853,23 @@
|
|||||||
// userTypes: this.currentPersonRole
|
// userTypes: this.currentPersonRole
|
||||||
}
|
}
|
||||||
let url
|
let url
|
||||||
|
let action
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.$emit('listReset', '')
|
this.$emit('listReset', '')
|
||||||
// todo
|
// todo
|
||||||
if (this.$route.query.it === undefined) {
|
if (this.$route.query.it === undefined) {
|
||||||
// 页面跳转
|
// 页面跳转
|
||||||
url = this.url.tableList
|
url = this.url.tableList
|
||||||
|
action = postAction
|
||||||
params.paramsManifestId = this.$route.query.id
|
params.paramsManifestId = this.$route.query.id
|
||||||
params.userTypes = this.currentPersonRole
|
params.userTypes = this.currentPersonRole
|
||||||
} else {
|
} else {
|
||||||
// 历史版本
|
// 历史版本
|
||||||
|
action = getAction
|
||||||
url = 'params/collectManifestHistory/list'
|
url = 'params/collectManifestHistory/list'
|
||||||
params.paramsManifestId = this.$route.query.it
|
params.paramsManifestId = this.$route.query.it
|
||||||
}
|
}
|
||||||
getAction(url, params).then((res) => {
|
action(url, params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
let tt = []
|
let tt = []
|
||||||
if (this.currentPersonRole !== 'dre') {
|
if (this.currentPersonRole !== 'dre') {
|
||||||
@@ -915,12 +918,15 @@
|
|||||||
getTableList(currentPersonRole) {
|
getTableList(currentPersonRole) {
|
||||||
let paramsManifestid
|
let paramsManifestid
|
||||||
let url
|
let url
|
||||||
|
let action
|
||||||
if (this.$route.query.it === undefined) {
|
if (this.$route.query.it === undefined) {
|
||||||
// 页面跳转
|
// 页面跳转
|
||||||
paramsManifestid = this.$route.query.id
|
paramsManifestid = this.$route.query.id
|
||||||
url = this.url.tableList
|
url = this.url.tableList
|
||||||
|
action = postAction
|
||||||
} else {
|
} else {
|
||||||
// 历史版本
|
// 历史版本
|
||||||
|
action = getAction
|
||||||
paramsManifestid = this.$route.query.it
|
paramsManifestid = this.$route.query.it
|
||||||
url = 'params/collectManifestHistory/list'
|
url = 'params/collectManifestHistory/list'
|
||||||
}
|
}
|
||||||
@@ -934,7 +940,7 @@
|
|||||||
...this.queryParamQuery
|
...this.queryParamQuery
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(url, params).then((res) => {
|
action(url, params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
// console.log(res.result,'res.result')
|
// console.log(res.result,'res.result')
|
||||||
// let tt = []
|
// let tt = []
|
||||||
|
|||||||
@@ -213,7 +213,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('brand'),
|
title: this.$t('brand'),
|
||||||
align: 'center',
|
align: 'left',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 140,
|
width: 140,
|
||||||
dataIndex: 'brand_text'
|
dataIndex: 'brand_text'
|
||||||
|
|||||||
@@ -282,7 +282,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('brand'),
|
title: this.$t('brand'),
|
||||||
align: 'center',
|
align: 'left',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 140,
|
width: 140,
|
||||||
dataIndex: 'brand_text'
|
dataIndex: 'brand_text'
|
||||||
|
|||||||
@@ -667,7 +667,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'string',
|
type: 'string',
|
||||||
value: 'paramsBatch',
|
value: 'params_batch',
|
||||||
text: this.$t('parameterBatch'),
|
text: this.$t('parameterBatch'),
|
||||||
dictCode: 'params_batch'
|
dictCode: 'params_batch'
|
||||||
},
|
},
|
||||||
@@ -1038,9 +1038,14 @@
|
|||||||
this.$refs.globalAdvancedQueryRef.superQueryFlag = false
|
this.$refs.globalAdvancedQueryRef.superQueryFlag = false
|
||||||
} else {
|
} else {
|
||||||
this.$refs.globalAdvancedQueryRef.superQueryFlag = true
|
this.$refs.globalAdvancedQueryRef.superQueryFlag = true
|
||||||
sqp['superQueryParams'] = encodeURI(JSON.stringify(params))
|
// sqp['superQueryParams'] = encodeURI(JSON.stringify(params))
|
||||||
|
params.forEach((item) => {
|
||||||
|
item.type = matchType
|
||||||
|
})
|
||||||
|
sqp['queryConditionVOListStr'] = JSON.stringify(params)
|
||||||
sqp['superQueryMatchType'] = matchType
|
sqp['superQueryMatchType'] = matchType
|
||||||
}
|
}
|
||||||
|
console.log(sqp)
|
||||||
this.queryParamQuery = sqp
|
this.queryParamQuery = sqp
|
||||||
this.$refs.CollectionTabel.pageNo = 1
|
this.$refs.CollectionTabel.pageNo = 1
|
||||||
// this.$refs.CollectionTabel.getTableList(this.queryParamQuery)
|
// this.$refs.CollectionTabel.getTableList(this.queryParamQuery)
|
||||||
|
|||||||
@@ -0,0 +1,275 @@
|
|||||||
|
<template>
|
||||||
|
<a-drawer
|
||||||
|
:title="$t('customize')"
|
||||||
|
:maskClosable="false"
|
||||||
|
:width="1000"
|
||||||
|
placement="right"
|
||||||
|
:closable="true"
|
||||||
|
@close="handleCancel"
|
||||||
|
:visible="visible"
|
||||||
|
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||||
|
<div style="margin-bottom: 60px">
|
||||||
|
<a-table
|
||||||
|
:columns="columns"
|
||||||
|
rowKey="id"
|
||||||
|
:scroll="{x: 800}"
|
||||||
|
:data-source="dataList"
|
||||||
|
:pagination="false"
|
||||||
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange,columnTitle:' ',getCheckboxProps: getCheckboxProps }"
|
||||||
|
:loading="loading">
|
||||||
|
|
||||||
|
</a-table>
|
||||||
|
<!-- <div class="page" v-if="dataList.length > 0">-->
|
||||||
|
<!-- <a-pagination-->
|
||||||
|
<!-- :show-total="total => $t('total')+` ${total} `+$t('strip')"-->
|
||||||
|
<!-- show-quick-jumper-->
|
||||||
|
<!-- show-size-changer-->
|
||||||
|
<!-- :page-size.sync="pageSize"-->
|
||||||
|
<!-- :total="total"-->
|
||||||
|
<!-- :current="pageNo"-->
|
||||||
|
<!-- @change="onChange"-->
|
||||||
|
<!-- @showSizeChange="SizeChange"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </div>-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="drawer-bootom-button">
|
||||||
|
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
||||||
|
<a-button @click="handleSubmit(undefined)" type="primary" :loading="confirmLoading">{{$t('determine')}}</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getAction, postAction } from '@/api/manage'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'transferList',
|
||||||
|
components: {},
|
||||||
|
props: ['url'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
queryParam: {},
|
||||||
|
confirmLoading: false,
|
||||||
|
selectedRowKeys: [],
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: this.$t('customColumn'),
|
||||||
|
dataIndex: 'name',
|
||||||
|
align: 'left',
|
||||||
|
ellipsis: true
|
||||||
|
},
|
||||||
|
],
|
||||||
|
dataList: [
|
||||||
|
{
|
||||||
|
orderBy: '1',
|
||||||
|
name: '1',
|
||||||
|
id: '1',
|
||||||
|
status:1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
orderBy: '2',
|
||||||
|
name: '2',
|
||||||
|
id: '12',
|
||||||
|
status:2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
orderBy: '3',
|
||||||
|
name: '3',
|
||||||
|
id: '13',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
orderBy: '4',
|
||||||
|
name: '4',
|
||||||
|
id: '15',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
orderBy: '5',
|
||||||
|
name: '4',
|
||||||
|
id: '16',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
orderBy: '6',
|
||||||
|
name: '4',
|
||||||
|
id: '17',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
orderBy: '7',
|
||||||
|
name: '4',
|
||||||
|
id: '18',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
orderBy: '8',
|
||||||
|
name: '4',
|
||||||
|
id: '19',
|
||||||
|
status:2,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
content: [],
|
||||||
|
loading: false,
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
transferModel() {
|
||||||
|
this.visible = true
|
||||||
|
this.queryParam = {}
|
||||||
|
this.selectedRowKeys = []
|
||||||
|
// this.replacePage()
|
||||||
|
},
|
||||||
|
searchQuery() {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.replacePage()
|
||||||
|
},
|
||||||
|
searchReset() {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.queryParam = {}
|
||||||
|
this.replacePage()
|
||||||
|
},
|
||||||
|
onChange(page, pageSize) {
|
||||||
|
this.pageNo = page
|
||||||
|
this.replacePage()
|
||||||
|
},
|
||||||
|
SizeChange(page, pageSize) {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.pageSize = pageSize
|
||||||
|
this.replacePage()
|
||||||
|
},
|
||||||
|
replacePage() {
|
||||||
|
let query = {
|
||||||
|
pageNo: this.pageNo,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
...this.queryParam
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
postAction(this.url.transferUrl, query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dataList = res.result.records || []
|
||||||
|
this.total = res.result.total
|
||||||
|
this.loading = false
|
||||||
|
} else {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onSelectChange(value) {
|
||||||
|
this.selectedRowKeys = value
|
||||||
|
// if (this.selectedRowKeys.length > 1) {
|
||||||
|
// this.selectedRowKeys.shift()
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
getCheckboxProps(record) {
|
||||||
|
console.log(record.status, 'status');
|
||||||
|
return ({
|
||||||
|
props: {
|
||||||
|
//当状态是1或者2的时候执行disable
|
||||||
|
disabled: record.status === 1 || record.status === 2
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
handleSubmit(flag) {
|
||||||
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||||
|
this.confirmLoading = true
|
||||||
|
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||||
|
this.confirmLoading = false
|
||||||
|
this.$emit('transferListForm',selectedRowKeys.join(','))
|
||||||
|
this.selectedRowKeys = []
|
||||||
|
// postAction(this.url.addModel, {
|
||||||
|
// dummyInventoryBaseId: selectedRowKeys.join(','),
|
||||||
|
// projectLibraryId: this.$route.query.id,
|
||||||
|
// flag: flag
|
||||||
|
// }).then((res) => {
|
||||||
|
// if (res.success) {
|
||||||
|
// this.confirmLoading = false
|
||||||
|
// this.$message.success(this.$t('OperationSuccessful'))
|
||||||
|
// this.visible = false
|
||||||
|
// this.selectedRowKeys = []
|
||||||
|
// this.$emit('transferListForm')
|
||||||
|
// } else {
|
||||||
|
// if (res.message == '该虚拟清单的维护清单中没有数据,是否需要添加') {
|
||||||
|
// this.confirmLoading = false
|
||||||
|
// this.getAdd()
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
// this.$message.warning(this.$t('operationFailed'))
|
||||||
|
// this.confirmLoading = false
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
} else {
|
||||||
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getAdd() {
|
||||||
|
let _this = this
|
||||||
|
this.$confirm({
|
||||||
|
content: _this.$t('TheDoesNotContainData'),
|
||||||
|
onOk() {
|
||||||
|
_this.handleSubmit('1')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.page {
|
||||||
|
text-align: right;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-bootom-button {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 100;
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-title-text {
|
||||||
|
line-height: 1.4;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text {
|
||||||
|
width: 20%;
|
||||||
|
min-width: 110px;
|
||||||
|
color: #000F16;
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 16px;
|
||||||
|
margin-top: 3px;
|
||||||
|
text-align: right;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input {
|
||||||
|
display: inline-block;
|
||||||
|
width: 70%;
|
||||||
|
height: 38px;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-button {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -161,6 +161,10 @@
|
|||||||
<span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }}
|
<span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }}
|
||||||
</div>
|
</div>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
|
<div class="operator-text" @click="customizeClick">
|
||||||
|
<a-icon type="setting"/>
|
||||||
|
{{ $t('customize') }}
|
||||||
|
</div>
|
||||||
<div class="operator-text" @click="bringInRelevantPersonnelClick">
|
<div class="operator-text" @click="bringInRelevantPersonnelClick">
|
||||||
<a-icon type="user"/>
|
<a-icon type="user"/>
|
||||||
{{ $t('bringInRelevantPersonnel') }}
|
{{ $t('bringInRelevantPersonnel') }}
|
||||||
@@ -311,6 +315,7 @@
|
|||||||
<listEditModel :url="url" @editModelList="addModelList" ref="editModelRef"/>
|
<listEditModel :url="url" @editModelList="addModelList" ref="editModelRef"/>
|
||||||
<batSetting :url="url" @batSettingList="addModelList" ref="batSettingRef"/>
|
<batSetting :url="url" @batSettingList="addModelList" ref="batSettingRef"/>
|
||||||
<transferList :url="url" @transferListForm="transferListForm" ref="transferListRef"/>
|
<transferList :url="url" @transferListForm="transferListForm" ref="transferListRef"/>
|
||||||
|
<customizeList :url="url" @customizeListForm="customizeListForm" ref="customizeListRef"/>
|
||||||
<transferListvirtal :url="url" @transferListFormHomo="transferListFormHomo" ref="transferListvirtalRef"/>
|
<transferListvirtal :url="url" @transferListFormHomo="transferListFormHomo" ref="transferListvirtalRef"/>
|
||||||
<fixedPlate @fixedPlateForm="addModelList" ref="fixedPlateRef"/>
|
<fixedPlate @fixedPlateForm="addModelList" ref="fixedPlateRef"/>
|
||||||
<a-modal
|
<a-modal
|
||||||
@@ -467,6 +472,7 @@
|
|||||||
import listEditModel from './listEditModel'
|
import listEditModel from './listEditModel'
|
||||||
import batSetting from './batSetting'
|
import batSetting from './batSetting'
|
||||||
import transferList from './transferList'
|
import transferList from './transferList'
|
||||||
|
import customizeList from './customizeList'
|
||||||
import transferListvirtal from './transferListvirtal'
|
import transferListvirtal from './transferListvirtal'
|
||||||
import fixedPlate from './fixedPlateForm'
|
import fixedPlate from './fixedPlateForm'
|
||||||
import resultReportedUpload from './resultReportedUpload'
|
import resultReportedUpload from './resultReportedUpload'
|
||||||
@@ -488,6 +494,7 @@
|
|||||||
listEditModel,
|
listEditModel,
|
||||||
batSetting,
|
batSetting,
|
||||||
transferList,
|
transferList,
|
||||||
|
customizeList,
|
||||||
transferListvirtal,
|
transferListvirtal,
|
||||||
globalAdvancedQuery,
|
globalAdvancedQuery,
|
||||||
fixedPlate,
|
fixedPlate,
|
||||||
@@ -2261,7 +2268,9 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
customizeClick(){
|
||||||
|
this.$refs.customizeListRef.transferModel()
|
||||||
|
},
|
||||||
bringInRelevantPersonnelClick() {
|
bringInRelevantPersonnelClick() {
|
||||||
let _this = this
|
let _this = this
|
||||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||||
|
|||||||
@@ -243,7 +243,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('brand'),
|
title: this.$t('brand'),
|
||||||
align: 'center',
|
align: 'left',
|
||||||
width: 180,
|
width: 180,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
dataIndex: 'brandText'
|
dataIndex: 'brandText'
|
||||||
|
|||||||
@@ -25,17 +25,24 @@
|
|||||||
<a-row :gutter='24' v-if='viewshow'>
|
<a-row :gutter='24' v-if='viewshow'>
|
||||||
<a-col :span='24'>
|
<a-col :span='24'>
|
||||||
<a-form-item :label="$t('NareaOfResponsibility')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item :label="$t('NareaOfResponsibility')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<j-multi-select-tag class="box-input" v-model:value="dutyTerritories"
|
<!-- <j-multi-select-tag class="box-input" v-model:value="dutyTerritories"-->
|
||||||
:placeholder="$t('PleaseSelect')+$t('NareaOfResponsibility')"
|
<!-- :placeholder="$t('PleaseSelect')+$t('NareaOfResponsibility')"-->
|
||||||
:type="'select'"
|
<!-- :type="'select'"-->
|
||||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
|
||||||
<!-- <a-select mode="multiple" :placeholder="$t('PleaseSelect')+$t('NareaOfResponsibility')" v-model:value="dutyTerritories">-->
|
<a-select
|
||||||
<!-- <a-select-option v-for="(role,roleindex) in dictOptions" :key="role.id" :value="role.id">-->
|
class="box-input" v-model="dutyTerritories"
|
||||||
<!-- <span style="display: inline-block;width: 100%">-->
|
mode="multiple"
|
||||||
<!-- {{ role.roleName }}-->
|
:placeholder="$t('PleaseSelect')+$t('NareaOfResponsibility')"
|
||||||
<!-- </span>-->
|
showArrow
|
||||||
<!-- </a-select-option>-->
|
@change="onChange"
|
||||||
<!-- </a-select>-->
|
>
|
||||||
|
<!-- 这个是自定义的一个全选项,展示在所有下拉项的顶部位置 -->
|
||||||
|
<a-select-option value="0" key="0">{{$t('selectAll')}}</a-select-option>
|
||||||
|
<!-- 下面的是正常要循环渲染的下拉项 -->
|
||||||
|
<a-select-option v-for="item in dutylist" :value="item.title">
|
||||||
|
{{ item.title }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -75,6 +82,8 @@ export default {
|
|||||||
title: this.$t('add'),
|
title: this.$t('add'),
|
||||||
total: 0,
|
total: 0,
|
||||||
selectedRowKeysDate: {},
|
selectedRowKeysDate: {},
|
||||||
|
dutylist: [],
|
||||||
|
jobsStr:'',
|
||||||
loading: false,
|
loading: false,
|
||||||
editId: '',
|
editId: '',
|
||||||
newVisible: false,
|
newVisible: false,
|
||||||
@@ -113,8 +122,50 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.loadData()
|
this.loadData()
|
||||||
this.initDictData()
|
this.initDictData()
|
||||||
|
this.getdutylist()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getdutylist(){
|
||||||
|
getAction('/sys/dict/getDictItems/duty_territory', {}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dutylist = res.result
|
||||||
|
} else {
|
||||||
|
this.dutylist = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onChange(val) {
|
||||||
|
// val 拿到的是数组格式的数据,比如:['测试1','测试3']
|
||||||
|
const res = this.dutyTerritories.join(',')
|
||||||
|
this.jobsStr = res
|
||||||
|
this.dutyTerritories = this.checkAll(val, this.dutylist)
|
||||||
|
},
|
||||||
|
checkAll(arr, modelList) {
|
||||||
|
// arr是onChange中的val数组 modelList是下拉框List
|
||||||
|
let length = arr.length
|
||||||
|
let list = arr
|
||||||
|
// 遍历已经选中的选项
|
||||||
|
arr.forEach(element => {
|
||||||
|
// 当数组中存在0,说明此时进行全选/取消全选
|
||||||
|
if (element === '0') {
|
||||||
|
// 当数组长度为最大长度且最后一个元素为0时,说明此时在全选的基础上又点击全选,则取消全选
|
||||||
|
if (length - 1 === modelList.length && arr[length - 1] === '0') {
|
||||||
|
list = []
|
||||||
|
// 取消全选时,jobsStr需要重置为空,否则全选的数据还会展示在下拉输入框中
|
||||||
|
this.jobsStr = ''
|
||||||
|
} else {
|
||||||
|
// 当不是取消全选操作,只要数组中出现了0则说明进行了全选操作
|
||||||
|
list = []
|
||||||
|
for (let i in modelList) {
|
||||||
|
list.push(modelList[i].title)
|
||||||
|
// 全选时,也需要给jobsStr 赋值,拿到所有的下拉选项,并进行数据格式转换
|
||||||
|
this.jobsStr = list.join(',')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return list
|
||||||
|
},
|
||||||
initDictData() {
|
initDictData() {
|
||||||
//优先从缓存中读取字典配置
|
//优先从缓存中读取字典配置
|
||||||
if (getDictItemsFromCache(this.dictCode)) {
|
if (getDictItemsFromCache(this.dictCode)) {
|
||||||
|
|||||||
@@ -76,10 +76,24 @@
|
|||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item v-if='viewshow' :label="$t('NareaOfResponsibility')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item v-if='viewshow' :label="$t('NareaOfResponsibility')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<j-multi-select-tag class="box-input" v-model="dutyTerritories"
|
<!-- <j-multi-select-tag class="box-input" v-model="dutyTerritories"-->
|
||||||
:placeholder="$t('PleaseSelect')+$t('NareaOfResponsibility')"
|
<!-- :placeholder="$t('PleaseSelect')+$t('NareaOfResponsibility')"-->
|
||||||
:type="'select'"
|
<!-- :type="'select'"-->
|
||||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
|
||||||
|
<a-select
|
||||||
|
class="box-input" v-model="dutyTerritories"
|
||||||
|
mode="multiple"
|
||||||
|
:placeholder="$t('PleaseSelect')+$t('NareaOfResponsibility')"
|
||||||
|
showArrow
|
||||||
|
@change="onChange"
|
||||||
|
>
|
||||||
|
<!-- 这个是自定义的一个全选项,展示在所有下拉项的顶部位置 -->
|
||||||
|
<a-select-option value="0" key="0">{{$t('selectAll')}}</a-select-option>
|
||||||
|
<!-- 下面的是正常要循环渲染的下拉项 -->
|
||||||
|
<a-select-option v-for="item in dutylist" :value="item.title">
|
||||||
|
{{ item.title }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item v-if='viewshowbrand' :label="$t('brand')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item v-if='viewshowbrand' :label="$t('brand')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<!-- <j-multi-select-tag v-model="brands"-->
|
<!-- <j-multi-select-tag v-model="brands"-->
|
||||||
@@ -240,8 +254,10 @@
|
|||||||
confirmDirty: false,
|
confirmDirty: false,
|
||||||
viewshow: false,
|
viewshow: false,
|
||||||
viewshowbrand: false,
|
viewshowbrand: false,
|
||||||
|
jobsStr:'',
|
||||||
selectedDepartKeys: [], //保存用户选择部门id
|
selectedDepartKeys: [], //保存用户选择部门id
|
||||||
brandsList: [], //保存用户选择部门id
|
brandsList: [], //保存用户选择部门id
|
||||||
|
dutylist: [], //保存用户选择部门id
|
||||||
checkedDepartKeys: [],
|
checkedDepartKeys: [],
|
||||||
checkedDepartNames: [], // 保存部门的名称 =>title
|
checkedDepartNames: [], // 保存部门的名称 =>title
|
||||||
checkedDepartNameString: '', // 保存部门的名称 =>title
|
checkedDepartNameString: '', // 保存部门的名称 =>title
|
||||||
@@ -380,6 +396,15 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getdutylist(){
|
||||||
|
getAction('/sys/dict/getDictItems/duty_territory', {}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dutylist = res.result
|
||||||
|
} else {
|
||||||
|
this.dutylist = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
loadUserRoles(userid) {
|
loadUserRoles(userid) {
|
||||||
queryUserRole({ userid: userid }).then((res) => {
|
queryUserRole({ userid: userid }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@@ -494,12 +519,45 @@
|
|||||||
this.refresh()
|
this.refresh()
|
||||||
this.edit({ activitiSync: '1' })
|
this.edit({ activitiSync: '1' })
|
||||||
},
|
},
|
||||||
|
onChange(val) {
|
||||||
|
// val 拿到的是数组格式的数据,比如:['测试1','测试3']
|
||||||
|
const res = this.dutyTerritories.join(',')
|
||||||
|
this.jobsStr = res
|
||||||
|
this.dutyTerritories = this.checkAll(val, this.dutylist)
|
||||||
|
},
|
||||||
|
checkAll(arr, modelList) {
|
||||||
|
// arr是onChange中的val数组 modelList是下拉框List
|
||||||
|
let length = arr.length
|
||||||
|
let list = arr
|
||||||
|
// 遍历已经选中的选项
|
||||||
|
arr.forEach(element => {
|
||||||
|
// 当数组中存在0,说明此时进行全选/取消全选
|
||||||
|
if (element === '0') {
|
||||||
|
// 当数组长度为最大长度且最后一个元素为0时,说明此时在全选的基础上又点击全选,则取消全选
|
||||||
|
if (length - 1 === modelList.length && arr[length - 1] === '0') {
|
||||||
|
list = []
|
||||||
|
// 取消全选时,jobsStr需要重置为空,否则全选的数据还会展示在下拉输入框中
|
||||||
|
this.jobsStr = ''
|
||||||
|
} else {
|
||||||
|
// 当不是取消全选操作,只要数组中出现了0则说明进行了全选操作
|
||||||
|
list = []
|
||||||
|
for (let i in modelList) {
|
||||||
|
list.push(modelList[i].title)
|
||||||
|
// 全选时,也需要给jobsStr 赋值,拿到所有的下拉选项,并进行数据格式转换
|
||||||
|
this.jobsStr = list.join(',')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return list
|
||||||
|
},
|
||||||
edit(record) {
|
edit(record) {
|
||||||
this.resetScreenSize() // 调用此方法,根据屏幕宽度自适应调整抽屉的宽度
|
this.resetScreenSize() // 调用此方法,根据屏幕宽度自适应调整抽屉的宽度
|
||||||
let that = this
|
let that = this
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
that.initialRoleList()
|
that.initialRoleList()
|
||||||
that.barndslist()
|
that.barndslist()
|
||||||
|
that.getdutylist()
|
||||||
if (record.activitiSync) {
|
if (record.activitiSync) {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user