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