Commit aaa7b5c8 authored by xixinzhao's avatar xixinzhao

三维校验

parent b5faea02
...@@ -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);
List<CheckResultDto> selectTotal(String modelId, String batchNo); Map<String, Object> selectTotal(String modelId, String batchNo);
Map<String, Object> getTables(String tableName, String amosOrgCode); Map<String, Object> getTables(String tableName, String amosOrgCode);
......
...@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.tdc.api.entity.CheckResult; ...@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.tdc.api.entity.CheckResult;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
import java.util.Map;
@Service @Service
...@@ -18,7 +19,7 @@ public interface CheckResultService extends IService<CheckResult> { ...@@ -18,7 +19,7 @@ public interface CheckResultService extends IService<CheckResult> {
List<CheckResult> selectCheckResult(String modelId,String batchNo); 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); List<CheckResultDto> selectStatistion(String batchNo,String amosOrgCode);
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
GROUP BY batch_no GROUP BY batch_no
</select> </select>
<select id="selectTotal" resultType="com.yeejoin.amos.boot.module.tdc.api.dto.CheckResultDto"> <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 aaa 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 model_id = #{modelId} and batch_no = #{batchNo}
</select> </select>
......
...@@ -20,6 +20,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper; ...@@ -20,6 +20,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
...@@ -59,7 +60,7 @@ public class CheckResultController extends BaseController { ...@@ -59,7 +60,7 @@ public class CheckResultController extends BaseController {
@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<List<CheckResultDto>> selectTotal(String modelId, String batchNo) { public ResponseModel<Map<String, Object>> selectTotal(String modelId, String batchNo) {
return ResponseHelper.buildResponse(checkResultService.selectTotal(modelId, batchNo)); return ResponseHelper.buildResponse(checkResultService.selectTotal(modelId, batchNo));
} }
......
...@@ -82,10 +82,9 @@ public class CheckResultImpl extends ServiceImpl<CheckResultMapper, CheckResult> ...@@ -82,10 +82,9 @@ public class CheckResultImpl extends ServiceImpl<CheckResultMapper, CheckResult>
} }
@Override @Override
public List<CheckResultDto> selectTotal(String modelId, String batchNo) { public Map<String, Object> selectTotal(String modelId, String batchNo) {
return checkResultMapper.selectTotal(modelId, batchNo); return checkResultMapper.selectTotal(modelId, 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