多单位版国产化地质资料管理系统
zhai
2025-12-13 fc0cc9fff4b4cbdc7cbb52b4a96c947530fcbba0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.zbooksoft.gdmis.service.impl;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zbooksoft.gdmis.dao.CatYswjxxMapper;
import com.zbooksoft.gdmis.data.entity.CatYswjxx;
import com.zbooksoft.gdmis.service.CatYswjxxService;
import org.springframework.stereotype.Service;
 
import java.util.Map;
 
/**
 * @Description
 * @Author zhai
 * @Date 2024/7/31
 **/
@Service
public class CatYswjxxServiceImpl extends ServiceImpl<CatYswjxxMapper, CatYswjxx> implements CatYswjxxService {
    @Override
    public String getMaxFileType(Long ajId, String fileType) {
        QueryWrapper<CatYswjxx> catYswjxxQueryWrapper = new QueryWrapper<>();
        catYswjxxQueryWrapper.eq("aj_id", ajId)
                .eq("wjlx", fileType)
                .select("max(XH) as xh");
        Map<String, Object> map = this.getMap(catYswjxxQueryWrapper);
        if (map != null) {
            return map.get("xh").toString();
        } else {
            return "0";
        }
    }
}