Commit ffff8c0c authored by KeYong's avatar KeYong

Merge remote-tracking branch 'origin/develop_dl_plan6' into develop_dl_plan6

parents 527ca05f 61979ec6
......@@ -30,10 +30,10 @@
f_fire_fighting_system as sys
left join wl_warehouse_structure wws on wws.id = sys.contro_box_build
where 1=1
<if test="equimentName != null and equimentName !='' ">
<if test="equimentName != null and equimentName !='' and equimentCode !='null' ">
AND sys.NAME like CONCAT('%',#{equimentName},'%')
</if>
<if test="equimentCode != null and equimentCode !='' ">
<if test="equimentCode != null and equimentCode !='' and equimentCode !='null' ">
AND sys.CODE like CONCAT('%',#{equimentCode},'%')
</if>
<if test="nameOrCode != null and nameOrCode != ''">
......
......@@ -17,7 +17,7 @@ public interface CheckResultMapper extends BaseMapper<CheckResult> {
IPage<CheckResultDto> selectResult(IPage<CheckResultDto> page,String code);
List<CheckResultDto> selectTotal(String modelId, String amosOrgCode);
List<CheckResultDto> selectTotal(String modelId, String batchNo);
Map<String, Object> getTables(String tableName, String amosOrgCode);
......
......@@ -16,9 +16,9 @@ public interface CheckResultService extends IService<CheckResult> {
IPage<CheckResultDto> selectResult(int current,int size,String code);
List<CheckResult> selectCheckResult(String modelId,String amosOrgCode);
List<CheckResult> selectCheckResult(String modelId,String batchNo);
List<CheckResultDto> selectTotal(String modelId, String amosOrgCode);
List<CheckResultDto> selectTotal(String modelId, String batchNo);
List<CheckResultDto> selectStatistion(String batchNo,String amosOrgCode);
......@@ -47,5 +47,4 @@ public interface CheckResultService extends IService<CheckResult> {
*/
Integer selectItemCount(String batchNo);
}
......@@ -8,7 +8,7 @@
<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
FROM tdc_check_result WHERE model_id = #{modelId} and amos_org_code = #{amosOrgCode}
FROM tdc_check_result WHERE model_id = #{modelId} and batch_no = #{batchNo}
</select>
......
......@@ -130,6 +130,7 @@ public class CheckModelAction {
// 所有属性已全部入库,给前端发送消息
HashMap<String, Object> map = new HashMap<>();
map.put("itemCount", itemCount);
map.put("batchNo", batchNo);
String json=JSONObject.toJSONString(map, SerializerFeature.PrettyFormat,
SerializerFeature.WriteMapNullValue);
try {
......
......@@ -52,7 +52,7 @@ public class CheckModelController {
*/
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/CheckAllModel/{amosOrgCode}")
@ApiOperation(httpMethod = "GET",value = "查询最后一次校验模型", notes = "查询最后一次校验模型")
@ApiOperation(httpMethod = "GET",value = "点击全站校验", notes = "根据机构code校验模型")
public void CheckAllModel(@PathVariable(value = "amosOrgCode") String amosOrgCode) {
checkModelService.checkAllMode(amosOrgCode);
}
......@@ -62,7 +62,7 @@ public class CheckModelController {
*/
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/checkSingleMode/{modelId}")
@ApiOperation(httpMethod = "GET",value = "查询最后一次校验模型", notes = "查询最后一次校验模型")
@ApiOperation(httpMethod = "GET",value = "点击单独模型校验", notes = "根据modelId校验模型")
public void checkSingleMode(@PathVariable(value = "modelId") String modelId) {
checkModelService.checkSingleMode(modelId);
}
......
......@@ -52,15 +52,15 @@ public class CheckResultController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/selectCheckResult")
@ApiOperation(httpMethod = "GET",value = "查询最后一次校验模型", notes = "查询最后一次校验模型")
public ResponseModel<List<CheckResult>> selectCheckResult( String modelId, String amosOrgCode) {
return ResponseHelper.buildResponse(checkResultService.selectCheckResult(modelId,amosOrgCode));
public ResponseModel<List<CheckResult>> selectCheckResult(String modelId, String batchNo) {
return ResponseHelper.buildResponse(checkResultService.selectCheckResult(modelId,batchNo));
}
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/selectTotal")
@ApiOperation(httpMethod = "GET", value = "result", notes = "result")
public ResponseModel<List<CheckResultDto>> selectTotal(String modelId, String amosOrgCode) {
return ResponseHelper.buildResponse(checkResultService.selectTotal(modelId, amosOrgCode));
public ResponseModel<List<CheckResultDto>> selectTotal(String modelId, String batchNo) {
return ResponseHelper.buildResponse(checkResultService.selectTotal(modelId, batchNo));
}
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
......
......@@ -70,17 +70,17 @@ public class CheckResultImpl extends ServiceImpl<CheckResultMapper, CheckResult>
}
@Override
public List<CheckResult> selectCheckResult(String modelId,String amosOrgCode) {
public List<CheckResult> selectCheckResult(String modelId,String batchNo) {
LambdaQueryWrapper<CheckResult> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(CheckResult::getCheckItemResult, "1")
.eq(CheckResult::getAmosOrgCode, amosOrgCode)
.eq(CheckResult::getBatchNo, batchNo)
.eq(CheckResult::getModelId, modelId);
return baseMapper.selectList(wrapper);
}
@Override
public List<CheckResultDto> selectTotal(String modelId, String amosOrgCode) {
return checkResultMapper.selectTotal(modelId, amosOrgCode);
public List<CheckResultDto> selectTotal(String modelId, String batchNo) {
return checkResultMapper.selectTotal(modelId, batchNo);
}
@Override
......
......@@ -42,4 +42,4 @@ spring.redis.lettuce.pool.min-idle=0
redis.cache.failure.time=10800
#校验完成发送消息
mqtt.topic.check.complete=tdc/check/complete
mqtt.topic.check.complete=/tdc/check/complete
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