Commit de7f2820 authored by KeYong's avatar KeYong

Merge branch 'develop_dl_plan6' of http://39.98.45.134:8090/moa/amos-boot-biz into develop_dl_plan6

parents dd1652ab 5fde2a4a
...@@ -17,7 +17,7 @@ public interface CheckResultMapper extends BaseMapper<CheckResult> { ...@@ -17,7 +17,7 @@ public interface CheckResultMapper extends BaseMapper<CheckResult> {
IPage<CheckResultDto> selectResult(IPage<CheckResultDto> page,String code); IPage<CheckResultDto> selectResult(IPage<CheckResultDto> page,String code);
Map<String, Object> selectTotal(String modelId, String batchNo); Map<String, Object> selectTotal(String batchNo);
Map<String, Object> getTables(String tableName, String amosOrgCode); Map<String, Object> getTables(String tableName, String amosOrgCode);
......
...@@ -18,9 +18,9 @@ public interface CheckResultService extends IService<CheckResult> { ...@@ -18,9 +18,9 @@ public interface CheckResultService extends IService<CheckResult> {
IPage<CheckResultDto> selectResult(int current,int size,String code); IPage<CheckResultDto> selectResult(int current,int size,String code);
List<CheckResult> selectCheckResult(String modelId,String batchNo); List<CheckResult> selectCheckResult(String batchNo);
Map<String, Object> selectTotal(String modelId, String batchNo); Map<String, Object> selectTotal(String batchNo);
List<CheckResultDto> selectStatistion(String batchNo,String amosOrgCode); List<CheckResultDto> selectStatistion(String batchNo,String amosOrgCode);
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<select id="selectTotal" resultType="java.util.Map"> <select id="selectTotal" resultType="java.util.Map">
SELECT count(1) as total, COUNT(CASE WHEN (check_item_result=1) THEN check_item_result END) AS unqualified SELECT count(1) as total, COUNT(CASE WHEN (check_item_result=1) THEN check_item_result END) AS unqualified
FROM tdc_check_result WHERE model_id = #{modelId} and batch_no = #{batchNo} FROM tdc_check_result WHERE batch_no = #{batchNo}
</select> </select>
......
...@@ -54,15 +54,17 @@ public class CheckResultController extends BaseController { ...@@ -54,15 +54,17 @@ public class CheckResultController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/selectCheckResult") @GetMapping(value = "/selectCheckResult")
@ApiOperation(httpMethod = "GET",value = "查询最后一次校验模型", notes = "查询最后一次校验模型") @ApiOperation(httpMethod = "GET",value = "查询最后一次校验模型", notes = "查询最后一次校验模型")
public ResponseModel<List<CheckResult>> selectCheckResult(String modelId, String batchNo) { public ResponseModel<List<CheckResult>> selectCheckResult( String batchNo) {
return ResponseHelper.buildResponse(checkResultService.selectCheckResult(modelId,batchNo)); return ResponseHelper.buildResponse(checkResultService.selectCheckResult(batchNo));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/selectTotal") @GetMapping(value = "/selectTotal")
@ApiOperation(httpMethod = "GET", value = "result", notes = "result") @ApiOperation(httpMethod = "GET", value = "result", notes = "result")
public ResponseModel<Map<String, Object>> selectTotal(String modelId, String batchNo) { public ResponseModel<Map<String, Object>> selectTotal(String batchNo) {
return ResponseHelper.buildResponse(checkResultService.selectTotal(modelId, batchNo)); return ResponseHelper.buildResponse(checkResultService.selectTotal(batchNo));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
......
...@@ -75,18 +75,19 @@ public class CheckResultImpl extends ServiceImpl<CheckResultMapper, CheckResult> ...@@ -75,18 +75,19 @@ public class CheckResultImpl extends ServiceImpl<CheckResultMapper, CheckResult>
@Override @Override
public List<CheckResult> selectCheckResult(String modelId,String batchNo) { public List<CheckResult> selectCheckResult(String batchNo) {
LambdaQueryWrapper<CheckResult> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<CheckResult> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(CheckResult::getCheckItemResult, "1") wrapper.eq(CheckResult::getCheckItemResult, "1")
.eq(CheckResult::getBatchNo, batchNo) .isNotNull(CheckResult::getBatchNo)
.eq(CheckResult::getModelId, modelId); .eq(CheckResult::getBatchNo,batchNo);
return baseMapper.selectList(wrapper); return baseMapper.selectList(wrapper);
} }
@Override @Override
public Map<String, Object> selectTotal(String modelId, String batchNo) { public Map<String, Object> selectTotal(String batchNo) {
return checkResultMapper.selectTotal(modelId, batchNo); return checkResultMapper.selectTotal(batchNo);
} }
@Override @Override
public List<CheckResultDto> selectStatistion(String batchNo, String amosOrgCode) { public List<CheckResultDto> selectStatistion(String batchNo, String amosOrgCode) {
return checkResultMapper.selectStatistion(batchNo, amosOrgCode); return checkResultMapper.selectStatistion(batchNo, amosOrgCode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment