diff --git a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/controller/LawsEvaluationNotMetController.java b/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/controller/LawsEvaluationNotMetController.java index 46c39593..e2a6dc70 100644 --- a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/controller/LawsEvaluationNotMetController.java +++ b/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/controller/LawsEvaluationNotMetController.java @@ -6,6 +6,8 @@ import com.jero.common.api.vo.ResultCommon; import com.jero.common.aspect.annotation.AutoLog; import com.jero.common.exception.JeroBootException; import com.jero.common.system.base.controller.JeroController; +import com.jero.modules.assessmentLibrary.entity.LawsEvaluationNotMetLibrary; +import com.jero.modules.assessmentLibrary.service.ILawsEvaluationNotMetLibraryService; import com.jero.modules.projectLibrary.common.AssessCommon; import com.jero.modules.projectLibrary.entity.LawsEvaluationNotMet; import com.jero.modules.projectLibrary.service.ILawsEvaluationNotMetService; @@ -27,12 +29,12 @@ import java.util.List; /** - * @Description: 未符合项 + * @Description: 不符合项 * @Author: jero-boot * @Date: 2023-09-11 * @Version: V1.0 */ -@Api(tags="未符合项") +@Api(tags="不符合项") @RestController @RequestMapping("/assessment/lawsEvaluationNotMet") @Slf4j @@ -41,18 +43,21 @@ public class LawsEvaluationNotMetController extends JeroController> queryPageList(LawsEvaluationNotMet lawsEvaluationNotMet, - @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, - @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, - HttpServletRequest req) { - IPage pageList = lawsEvaluationNotMetService.queryPage(lawsEvaluationNotMet, pageNo, pageSize, req); + public Result> queryPageList(LawsEvaluationNotMetLibrary lawsEvaluationNotMet, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + IPage pageList = lawsEvaluationNotMetLibraryService.queryPage(lawsEvaluationNotMet, pageNo, pageSize, req); return Result.OK(pageList); } @@ -60,8 +65,8 @@ public class LawsEvaluationNotMetController extends JeroController add(@Validated @RequestBody LawsEvaluationNotMet lawsEvaluationNotMet) { lawsEvaluationNotMetService.add(lawsEvaluationNotMet); @@ -72,8 +77,8 @@ public class LawsEvaluationNotMetController extends JeroController edit(@Validated @RequestBody LawsEvaluationNotMet lawsEvaluationNotMet) { lawsEvaluationNotMetService.editById(lawsEvaluationNotMet); @@ -86,8 +91,8 @@ public class LawsEvaluationNotMetController extends JeroController queryById(@RequestParam(name="id",required=true) String id) { LawsEvaluationNotMet lawsEvaluationNotMet = lawsEvaluationNotMetService.queryById(id); @@ -101,8 +106,8 @@ public class LawsEvaluationNotMetController extends JeroController batchClose(@RequestBody IdsMapBody body) { String ids = body.getIds(); @@ -138,7 +143,7 @@ public class LawsEvaluationNotMetController extends JeroController { - -} - - - - diff --git a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/mapper/LawsEvaluationNotMetLibraryMapper.java b/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/mapper/LawsEvaluationNotMetLibraryMapper.java index a83aa7d2..f6e246b1 100644 --- a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/mapper/LawsEvaluationNotMetLibraryMapper.java +++ b/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/mapper/LawsEvaluationNotMetLibraryMapper.java @@ -1,7 +1,12 @@ package com.jero.modules.assessmentLibrary.mapper; +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 com.jero.modules.assessmentLibrary.entity.LawsEvaluationNotMetLibrary; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; /** * @author ThinkBook @@ -11,6 +16,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; */ public interface LawsEvaluationNotMetLibraryMapper extends BaseMapper { + IPage pageList(Page page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper, LawsEvaluationNotMetLibrary lawsEvaluationNotMet); } diff --git a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/mapper/xml/LawsEvaluationNotMetLibraryDetailMapper.xml b/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/mapper/xml/LawsEvaluationNotMetLibraryDetailMapper.xml deleted file mode 100644 index 8bc4d1e7..00000000 --- a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/mapper/xml/LawsEvaluationNotMetLibraryDetailMapper.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id,org_code,create_by, - create_time,update_by,update_time, - del_flag,term_number,term_content, - model,model_status,auth_dept, - user_id,result,description, - unsatisfy_require,correction_solution,correction_cost, - commonality,commonality_cost,remark, - material - - diff --git a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/mapper/xml/LawsEvaluationNotMetLibraryMapper.xml b/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/mapper/xml/LawsEvaluationNotMetLibraryMapper.xml index c36ad9de..24baf452 100644 --- a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/mapper/xml/LawsEvaluationNotMetLibraryMapper.xml +++ b/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/mapper/xml/LawsEvaluationNotMetLibraryMapper.xml @@ -2,23 +2,7 @@ - - - - - - - - - - - - - - - - - + id,org_code,create_by, @@ -27,4 +11,14 @@ standard_number,standard_name,applicable_market, evaluate_date + + diff --git a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/service/ILawsEvaluationNotMetLibraryDetailService.java b/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/service/ILawsEvaluationNotMetLibraryDetailService.java deleted file mode 100644 index 0f37ef9e..00000000 --- a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/service/ILawsEvaluationNotMetLibraryDetailService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.jero.modules.assessmentLibrary.service; - -import com.jero.modules.assessmentLibrary.entity.LawsEvaluationNotMetLibraryDetail; -import com.baomidou.mybatisplus.extension.service.IService; - -/** -* @author ThinkBook -* @description 针对表【laws_evaluation_not_met_library_detail】的数据库操作Service -* @createDate 2024-06-24 14:48:05 -*/ -public interface ILawsEvaluationNotMetLibraryDetailService extends IService { - -} diff --git a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/service/ILawsEvaluationNotMetLibraryService.java b/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/service/ILawsEvaluationNotMetLibraryService.java index 5f4dc2fc..53b2f37e 100644 --- a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/service/ILawsEvaluationNotMetLibraryService.java +++ b/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/service/ILawsEvaluationNotMetLibraryService.java @@ -1,7 +1,11 @@ package com.jero.modules.assessmentLibrary.service; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.jero.modules.assessmentLibrary.entity.LawsEvaluationNotMetLibrary; import com.baomidou.mybatisplus.extension.service.IService; +import com.jero.modules.projectLibrary.entity.LawsEvaluationNotMet; + +import javax.servlet.http.HttpServletRequest; /** * @author ThinkBook @@ -10,4 +14,15 @@ import com.baomidou.mybatisplus.extension.service.IService; */ public interface ILawsEvaluationNotMetLibraryService extends IService { + /** + * 分页查询 + * + * @param lawsEvaluationNotMet + * @param pageNo + * @param pageSize + * @param req + * @return + */ + IPage queryPage(LawsEvaluationNotMetLibrary lawsEvaluationNotMet, Integer pageNo, Integer pageSize, HttpServletRequest req); + } diff --git a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/service/impl/LawsEvaluationNotMetLibraryDetailServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/service/impl/LawsEvaluationNotMetLibraryDetailServiceImpl.java deleted file mode 100644 index f9287690..00000000 --- a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/service/impl/LawsEvaluationNotMetLibraryDetailServiceImpl.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.jero.modules.assessmentLibrary.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.jero.modules.assessmentLibrary.entity.LawsEvaluationNotMetLibraryDetail; -import com.jero.modules.assessmentLibrary.service.ILawsEvaluationNotMetLibraryDetailService; -import com.jero.modules.assessmentLibrary.mapper.LawsEvaluationNotMetLibraryDetailMapper; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; - -/** -* @author ThinkBook -* @description 针对表【laws_evaluation_not_met_library_detail】的数据库操作Service实现 -* @createDate 2024-06-24 14:48:05 -*/ -@Service -@Slf4j -public class LawsEvaluationNotMetLibraryDetailServiceImpl extends ServiceImpl - implements ILawsEvaluationNotMetLibraryDetailService { - -} - - - - diff --git a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/service/impl/LawsEvaluationNotMetLibraryServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/service/impl/LawsEvaluationNotMetLibraryServiceImpl.java index 76b2cf98..ebb5ffb0 100644 --- a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/service/impl/LawsEvaluationNotMetLibraryServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/service/impl/LawsEvaluationNotMetLibraryServiceImpl.java @@ -1,22 +1,47 @@ package com.jero.modules.assessmentLibrary.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jero.common.system.query.QueryGenerator; import com.jero.modules.assessmentLibrary.entity.LawsEvaluationNotMetLibrary; import com.jero.modules.assessmentLibrary.mapper.LawsEvaluationNotMetLibraryMapper; import com.jero.modules.assessmentLibrary.service.ILawsEvaluationNotMetLibraryService; +import com.jero.modules.projectLibrary.entity.LawsEvaluationNotMet; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; + /** -* @author ThinkBook -* @description 针对表【laws_evaluation_not_met_library(不符合项库)】的数据库操作Service实现 -* @createDate 2024-06-24 14:48:02 -*/ + * @author ThinkBook + * @description 针对表【laws_evaluation_not_met_library(不符合项库)】的数据库操作Service实现 + * @createDate 2024-06-24 14:48:02 + */ @Service @Slf4j public class LawsEvaluationNotMetLibraryServiceImpl extends ServiceImpl - implements ILawsEvaluationNotMetLibraryService { + implements ILawsEvaluationNotMetLibraryService { + @Resource + private LawsEvaluationNotMetLibraryMapper notMetMapper; + + @Override + public IPage queryPage(LawsEvaluationNotMetLibrary lawsEvaluationNotMet, Integer pageNo, Integer pageSize, HttpServletRequest req) { + QueryWrapper 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); +// } + Page page = new Page<>(pageNo, pageSize); + return notMetMapper.pageList(page, queryWrapper, lawsEvaluationNotMet); + } }