fix 80264 未符合项-查询条件工作令编号失效
fix 80261 未符合项-查询 建议改成模糊查询 fix 80820 未符合项--建议查询条件增加设计工程师
This commit is contained in:
+8
-2
@@ -153,7 +153,7 @@ public class QueryGenerator {
|
||||
doIntervalQuery(queryWrapper, parameterMap, type, name, column);
|
||||
//判断单值 参数带不同标识字符串 走不同的查询
|
||||
//TODO 这种前后带逗号的支持分割后模糊查询需要否 使多选字段的查询生效
|
||||
addQueryWapper(queryWrapper, column, value);
|
||||
addQueryWapper(queryWrapper, column, value, type);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
@@ -168,7 +168,7 @@ public class QueryGenerator {
|
||||
|
||||
}
|
||||
|
||||
private static void addQueryWapper(QueryWrapper<?> queryWrapper, String column, Object value) {
|
||||
private static void addQueryWapper(QueryWrapper<?> queryWrapper, String column, Object value, String type) {
|
||||
if (null != value && value.toString().startsWith(COMMA) && value.toString().endsWith(COMMA)) {
|
||||
String multiLikeval = value.toString().replace(",,", COMMA);
|
||||
String[] vals = multiLikeval.substring(1, multiLikeval.length()).split(COMMA);
|
||||
@@ -187,6 +187,12 @@ public class QueryGenerator {
|
||||
//根据参数值带什么关键字符串判断走什么类型的查询
|
||||
QueryRuleEnum rule = convert2Rule(value);
|
||||
value = replaceValue(rule,value);
|
||||
// add -begin 添加判断为字符串时设为全模糊查询
|
||||
if( (rule==null || QueryRuleEnum.EQ.equals(rule)) && "class java.lang.String".equals(type)) {
|
||||
//可以设置左右模糊或全模糊,因人而异
|
||||
rule = QueryRuleEnum.LIKE;
|
||||
}
|
||||
// add -end 添加判断为字符串时设为全模糊查询
|
||||
addEasyQuery(queryWrapper, column, rule, value);
|
||||
}
|
||||
}
|
||||
|
||||
+9
-6
@@ -40,6 +40,11 @@ public class LawsEvaluationNotMet implements Serializable {
|
||||
@ApiModelProperty(value = "项目ID")
|
||||
private String projectId;
|
||||
|
||||
/**工作令编号*/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "工作令编号")
|
||||
private String workNumber;
|
||||
|
||||
/**项目名称*/
|
||||
@Excel(name = "项目名称", width = 15)
|
||||
@ApiModelProperty(value = "项目名称")
|
||||
@@ -76,18 +81,16 @@ public class LawsEvaluationNotMet implements Serializable {
|
||||
@ApiModelProperty(value = "评估结果(1-符合、2-不符合、3-待验证、4-不涉及)")
|
||||
private String assessResults;
|
||||
|
||||
/**责任部门ID*/
|
||||
@Excel(name = "责任部门ID", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||
@ApiModelProperty(value = "责任部门ID")
|
||||
private String departmentId;
|
||||
|
||||
/**设计工程师ID*/
|
||||
@Excel(name = "设计工程师", width = 15, dictTable = "sys_user",dicText = "CONCAT(realname, '(', username, ')')",dicCode = "id")
|
||||
@Dict(dictTable = "sys_user",dicText = "realname",dicCode = "id")
|
||||
@ApiModelProperty(value = "设计工程师ID")
|
||||
private String engineerId;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "设计工程师")
|
||||
private String engineerName;
|
||||
|
||||
/**预计整改完成日期*/
|
||||
@Excel(name = "预计整改完成日期", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
|
||||
+5
-2
@@ -1,7 +1,9 @@
|
||||
package com.jero.modules.projectLibrary.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.projectLibrary.entity.LawsEvaluationNotMet;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
@@ -14,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface LawsEvaluationNotMetMapper extends BaseMapper<LawsEvaluationNotMet> {
|
||||
|
||||
IPage<LawsEvaluationNotMet> pageList(Page<LawsEvaluationNotMet> page, @Param(Constants.WRAPPER) QueryWrapper<LawsEvaluationNotMet> queryWrapper, @Param("notMet") LawsEvaluationNotMet lawsEvaluationNotMet);
|
||||
}
|
||||
|
||||
+19
-1
@@ -15,11 +15,29 @@
|
||||
<result column="term_id" property="termId" />
|
||||
<result column="term_num" property="termNum" />
|
||||
<result column="term_name" property="termName" />
|
||||
<result column="department_id" property="departmentId" />
|
||||
<result column="engineer_id" property="engineerId" />
|
||||
<result column="engineer_name" property="engineerName" />
|
||||
<result column="expected_time" property="expectedTime" />
|
||||
<result column="reality_time" property="realityTime" />
|
||||
<result column="state" property="state" />
|
||||
<result column="assess_results" property="assessResults"/>
|
||||
<result column="del_flag" property="delFlag"/>
|
||||
<result column="description" property="description"/>
|
||||
<result column="file_id" property="fileId"/>
|
||||
<result column="prc_num" property="prcNum"/>
|
||||
<result column="source" property="source"/>
|
||||
<result column="standard_name" property="standardName"/>
|
||||
<result column="standard_number" property="standardNumber"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="pageList" resultMap="LawsEvaluationNotMetResultMap">
|
||||
select nm.* from laws_evaluation_not_met nm
|
||||
<if test="notMet.engineerName != null and notMet.engineerName != ''">
|
||||
left join sys_user su on nm.engineer_id = su.id
|
||||
</if>
|
||||
<if test="notMet.workNumber != null and notMet.workNumber != ''">
|
||||
left join laws_project_library lpl on nm.project_id = lpl.id
|
||||
</if>
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+12
-2
@@ -54,6 +54,8 @@ public class LawsEvaluationNotMetServiceImpl extends ServiceImpl<LawsEvaluationN
|
||||
//企业标准
|
||||
@Resource
|
||||
private ILawsEnterpriseStandardService lawsEnterpriseStandardService;
|
||||
@Resource
|
||||
private LawsEvaluationNotMetMapper notMetMapper;
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
@@ -67,8 +69,16 @@ public class LawsEvaluationNotMetServiceImpl extends ServiceImpl<LawsEvaluationN
|
||||
public IPage<LawsEvaluationNotMet> queryPage(LawsEvaluationNotMet lawsEvaluationNotMet, Integer pageNo, Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<LawsEvaluationNotMet> queryWrapper = QueryGenerator.initQueryWrapper(lawsEvaluationNotMet, req.getParameterMap());
|
||||
Page<LawsEvaluationNotMet> page = new Page<>(pageNo, pageSize);
|
||||
return page(page, queryWrapper);
|
||||
String engineerName = lawsEvaluationNotMet.getEngineerName();
|
||||
if (StringUtils.isNotBlank(engineerName)){
|
||||
queryWrapper.like("su.realname",engineerName);
|
||||
}
|
||||
String workNumber = lawsEvaluationNotMet.getWorkNumber();
|
||||
if (StringUtils.isNotBlank(workNumber)){
|
||||
queryWrapper.like("lpl.work_number",workNumber);
|
||||
}
|
||||
Page<LawsEvaluationNotMet> page = new Page<>(pageNo, pageSize);
|
||||
return notMetMapper.pageList(page,queryWrapper,lawsEvaluationNotMet);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user