feat: 法规符合性评估库列表接口
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ import javax.annotation.Resource;
|
||||
|
||||
@Api(tags = "法规符合性评估库-法规符合性评估库")
|
||||
@RestController
|
||||
@RequestMapping("/laws/lawsConformityAssessment")
|
||||
@RequestMapping("/assessment/lawsConformityAssessment")
|
||||
@Slf4j
|
||||
public class LawsConformityAssessmentController {
|
||||
|
||||
|
||||
+3
-2
@@ -34,16 +34,17 @@ import java.util.List;
|
||||
*/
|
||||
@Api(tags="未符合项")
|
||||
@RestController
|
||||
@RequestMapping("/projectLibrary/lawsEvaluationNotMet")
|
||||
@RequestMapping("/assessment/lawsEvaluationNotMet")
|
||||
@Slf4j
|
||||
public class LawsEvaluationNotMetController extends JeroController<LawsEvaluationNotMet, ILawsEvaluationNotMetService> {
|
||||
|
||||
@Autowired
|
||||
private ILawsEvaluationNotMetService lawsEvaluationNotMetService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*/
|
||||
@RequiresPermissions(value = {"inconformityItem:search","vehicleItemLibrary:detail:noMatchItemDetail"})
|
||||
// @RequiresPermissions(value = {"inconformityItem:search","vehicleItemLibrary:detail:noMatchItemDetail"})
|
||||
@AutoLog(value = "未符合项-分页列表查询")
|
||||
@ApiOperation(value="未符合项-分页列表查询", notes="未符合项-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
|
||||
+4
@@ -6,8 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 法规符合性评估库
|
||||
@@ -39,6 +41,8 @@ public class LawsConformityAssessmentLibrary implements Serializable {
|
||||
* 评估日期
|
||||
*/
|
||||
@ApiModelProperty(value = "评估日期")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date valuationTime;
|
||||
|
||||
/**
|
||||
|
||||
+3
-1
@@ -1,9 +1,11 @@
|
||||
package com.jero.modules.assessmentLibrary.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibrary;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @author ThinkBook
|
||||
@@ -13,7 +15,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface LawsConformityAssessmentLibraryMapper extends BaseMapper<LawsConformityAssessmentLibrary> {
|
||||
|
||||
Page<LawsConformityAssessmentLibrary> queryByPage(Page<LawsConformityAssessmentLibrary> page, QueryWrapper<LawsConformityAssessmentLibrary> queryWrapper);
|
||||
Page<LawsConformityAssessmentLibrary> queryByPage(Page<LawsConformityAssessmentLibrary> page, @Param(Constants.WRAPPER) QueryWrapper<LawsConformityAssessmentLibrary> queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.assessment.mapper.LawsConformityAssessmentLibraryMapper">
|
||||
<mapper namespace="com.jero.modules.assessmentLibrary.mapper.LawsConformityAssessmentLibraryMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibrary">
|
||||
<id property="id" column="id" jdbcType="VARCHAR"/>
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ public class LawsConformityAssessmentLibraryServiceImpl extends ServiceImpl<Laws
|
||||
STANDARD_NAME, lawsConformityAssessmentLibrary.getStandardName());
|
||||
queryWrapper.between(lawsConformityAssessmentLibrary.getValuationTime() != null,
|
||||
"valuation_time", lawsConformityAssessmentLibrary.getStartValuationTime(), lawsConformityAssessmentLibrary.getEndValuationTime());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
queryWrapper.orderByDesc("cs.create_time");
|
||||
Page<LawsConformityAssessmentLibrary> result = lawsConformityAssessmentLibraryMapper.queryByPage(page, queryWrapper);
|
||||
return result;
|
||||
}
|
||||
|
||||
+1
-7
@@ -31,13 +31,7 @@
|
||||
</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>
|
||||
select nm.* from laws_evaluation_not_met_library nm
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+8
-8
@@ -62,14 +62,14 @@ 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());
|
||||
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);
|
||||
}
|
||||
// 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user