Commit aaa7b5c8 authored by xixinzhao's avatar xixinzhao

三维校验

parent b5faea02
......@@ -17,7 +17,7 @@ public interface CheckResultMapper extends BaseMapper<CheckResult> {
IPage<CheckResultDto> selectResult(IPage<CheckResultDto> page,String code);
List<CheckResultDto> selectTotal(String modelId, String batchNo);
Map<String, Object> selectTotal(String modelId, String batchNo);
Map<String, Object> getTables(String tableName, String amosOrgCode);
......
......@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.tdc.api.entity.CheckResult;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@Service
......@@ -18,7 +19,7 @@ public interface CheckResultService extends IService<CheckResult> {
List<CheckResult> selectCheckResult(String modelId,String batchNo);
List<CheckResultDto> selectTotal(String modelId, String batchNo);
Map<String, Object> selectTotal(String modelId, String batchNo);
List<CheckResultDto> selectStatistion(String batchNo,String amosOrgCode);
......
......@@ -12,8 +12,8 @@
GROUP BY batch_no
</select>
<select id="selectTotal" resultType="com.yeejoin.amos.boot.module.tdc.api.dto.CheckResultDto">
SELECT count(1) as total, COUNT(CASE WHEN (check_item_result=1) THEN check_item_result END) AS aaa
<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
FROM tdc_check_result WHERE model_id = #{modelId} and batch_no = #{batchNo}
</select>
......
......@@ -20,6 +20,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.List;
import java.util.Map;
/**
......@@ -59,7 +60,7 @@ public class CheckResultController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/selectTotal")
@ApiOperation(httpMethod = "GET", value = "result", notes = "result")
public ResponseModel<List<CheckResultDto>> selectTotal(String modelId, String batchNo) {
public ResponseModel<Map<String, Object>> selectTotal(String modelId, String batchNo) {
return ResponseHelper.buildResponse(checkResultService.selectTotal(modelId, batchNo));
}
......
......@@ -82,10 +82,9 @@ public class CheckResultImpl extends ServiceImpl<CheckResultMapper, CheckResult>
}
@Override
public List<CheckResultDto> selectTotal(String modelId, String batchNo) {
public Map<String, Object> selectTotal(String modelId, String batchNo) {
return checkResultMapper.selectTotal(modelId, batchNo);
}
@Override
public List<CheckResultDto> selectStatistion(String batchNo, String 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