市场法规库清单列表修改,详情翻译
This commit is contained in:
+22
-1
@@ -73,6 +73,13 @@ public class LawsMarketStandard implements Serializable {
|
||||
@ApiModelProperty(value = "国家")
|
||||
private String country;
|
||||
|
||||
/**
|
||||
* 国家翻译
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "国家翻译")
|
||||
private String countryText;
|
||||
|
||||
/**
|
||||
* 清单编号
|
||||
*/
|
||||
@@ -92,6 +99,13 @@ public class LawsMarketStandard implements Serializable {
|
||||
@ApiModelProperty(value = "驾驶位置")
|
||||
private String drivePosition;
|
||||
|
||||
/**
|
||||
* 驾驶位置翻译
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "驾驶位置翻译")
|
||||
private String drivePositionText;
|
||||
|
||||
/**
|
||||
* 清单版本
|
||||
*/
|
||||
@@ -116,10 +130,17 @@ public class LawsMarketStandard implements Serializable {
|
||||
/**
|
||||
* 密级
|
||||
*/
|
||||
@Dict(dicCode = "security_level")
|
||||
@Dict(dicCode = "security_class")
|
||||
@ApiModelProperty(value = "密级")
|
||||
private String securityLevel;
|
||||
|
||||
/**
|
||||
* 密级翻译
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "密级翻译")
|
||||
private String securityLevelText;
|
||||
|
||||
/**
|
||||
* 清单状态
|
||||
*/
|
||||
|
||||
+6
-1
@@ -35,7 +35,12 @@
|
||||
<select id="queryByPage" resultType="com.jero.modules.laws.marketStandard.entity.LawsMarketStandard">
|
||||
select ms.*
|
||||
from laws_market_standard ms
|
||||
left join sys_user as u on u.id = ms.author
|
||||
JOIN (
|
||||
SELECT manifest_no as manifest_no_max, MAX(manifest_version) AS manifest_version_max
|
||||
FROM laws_market_standard
|
||||
GROUP BY manifest_no
|
||||
) ms1 on ms1.manifest_version_max = ms.manifest_version and ms1.manifest_no_max = ms.manifest_no
|
||||
left join sys_user as u on u.id = ms.author
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+12
-3
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.laws.marketStandard.constans.MarketStandardConstants;
|
||||
import com.jero.modules.laws.marketStandard.entity.LawsMarketStandard;
|
||||
@@ -14,8 +15,6 @@ import com.jero.modules.laws.marketStandard.entity.MarketStandardDetailVO;
|
||||
import com.jero.modules.laws.marketStandard.mapper.LawsMarketStandardMapper;
|
||||
import com.jero.modules.laws.marketStandard.service.ILawsMarketStandardDetailService;
|
||||
import com.jero.modules.laws.marketStandard.service.ILawsMarketStandardService;
|
||||
import com.jero.modules.system.entity.SysRole;
|
||||
import com.jero.modules.system.service.ISysRoleService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
@@ -46,7 +45,7 @@ public class LawsMarketStandardServiceImpl extends ServiceImpl<LawsMarketStandar
|
||||
@Resource
|
||||
private ILawsMarketStandardDetailService lawsMarketStandardDetailService;
|
||||
@Resource
|
||||
private ISysRoleService sysRoleService;
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
|
||||
/**
|
||||
* 法规管理员
|
||||
@@ -123,6 +122,7 @@ public class LawsMarketStandardServiceImpl extends ServiceImpl<LawsMarketStandar
|
||||
@Override
|
||||
public void export(HttpServletResponse response, LawsMarketStandard lawsMarketStandard, String fileName, String sheetName, HttpServletRequest req) {
|
||||
//TODO 导出具体模板查看NAS文档
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -140,6 +140,9 @@ public class LawsMarketStandardServiceImpl extends ServiceImpl<LawsMarketStandar
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
|
||||
LawsMarketStandard manifest = getById(idList.get(0));
|
||||
if(Objects.isNull(manifest)){
|
||||
throw new JeroBootException("数据不存在");
|
||||
}
|
||||
// 清单版本不为空,查询指定版本
|
||||
if(!StringUtils.isBlank(marketStandardDetail.getManifestVersion())){
|
||||
LambdaQueryWrapper<LawsMarketStandard> queryLawsMarketStandard = new LambdaQueryWrapper<>();
|
||||
@@ -152,6 +155,12 @@ public class LawsMarketStandardServiceImpl extends ServiceImpl<LawsMarketStandar
|
||||
idList = new ArrayList<>();
|
||||
idList.add(manifest.getId());
|
||||
}
|
||||
String countryText = sysBaseAPI.translateDict("market_state",manifest.getCountry());
|
||||
manifest.setCountryText(countryText);
|
||||
String securityLevelText = sysBaseAPI.translateDict("security_class",manifest.getSecurityLevel());
|
||||
manifest.setSecurityLevelText(securityLevelText);
|
||||
String drivePositionText = sysBaseAPI.translateDict("drive_position",manifest.getDrivePosition());
|
||||
manifest.setDrivePositionText(drivePositionText);
|
||||
result.setManifest(manifest);
|
||||
|
||||
// 列表数据
|
||||
|
||||
Reference in New Issue
Block a user