1、主数据表头多语言
This commit is contained in:
parent
4c8f653b13
commit
2fc231e1a0
|
|
@ -7,6 +7,7 @@ import com.nflg.product.material.pojo.dto.MaterialPurchseExcelDTO;
|
||||||
import com.nflg.product.material.pojo.dto.IniFileDTO;
|
import com.nflg.product.material.pojo.dto.IniFileDTO;
|
||||||
import com.nflg.product.material.pojo.dto.MaterialMainAddAttrParamDTO;
|
import com.nflg.product.material.pojo.dto.MaterialMainAddAttrParamDTO;
|
||||||
import com.nflg.product.material.pojo.dto.UpOaProcessStateMaterialDTO;
|
import com.nflg.product.material.pojo.dto.UpOaProcessStateMaterialDTO;
|
||||||
|
import com.nflg.product.material.pojo.entity.LanguageTranslationEntity;
|
||||||
import com.nflg.product.material.pojo.entity.MaterialMainEntity;
|
import com.nflg.product.material.pojo.entity.MaterialMainEntity;
|
||||||
import com.nflg.product.material.pojo.query.MaterialMainQuery;
|
import com.nflg.product.material.pojo.query.MaterialMainQuery;
|
||||||
import com.nflg.product.material.pojo.vo.CategoryQueryVO;
|
import com.nflg.product.material.pojo.vo.CategoryQueryVO;
|
||||||
|
|
@ -75,4 +76,6 @@ public interface MaterialMainMapper extends BaseMapper<MaterialMainEntity> {
|
||||||
MaterialMainEntity selectByMaterialNoAndRelCategoryCode(@Param("materialNo") String materialNo, @Param("list") List<String> list);
|
MaterialMainEntity selectByMaterialNoAndRelCategoryCode(@Param("materialNo") String materialNo, @Param("list") List<String> list);
|
||||||
|
|
||||||
void updateBatch(@Param("result") List<MaterialMainEntity> result);
|
void updateBatch(@Param("result") List<MaterialMainEntity> result);
|
||||||
|
|
||||||
|
List<LanguageTranslationEntity> getKeyLanguage(@Param("languageCode")String languageCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.nflg.product.material.pojo.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* t_language_translation
|
||||||
|
* 多语言
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-03-07 18:16:17
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(value="com-nflg-product-material-pojo-translation-entity-LanguageTranslationEntity")
|
||||||
|
@TableName(value = "t_language_translation")
|
||||||
|
public class LanguageTranslationEntity implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键行ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "row_id", type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键行ID")
|
||||||
|
private Long rowId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关键子,字段名等
|
||||||
|
*/
|
||||||
|
@TableField(value = "key_name")
|
||||||
|
@ApiModelProperty(value = "关键子,字段名等")
|
||||||
|
private String keyName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 语言编码
|
||||||
|
*/
|
||||||
|
@TableField(value = "language_code")
|
||||||
|
@ApiModelProperty(value = "语言编码")
|
||||||
|
private String languageCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 译文
|
||||||
|
*/
|
||||||
|
@TableField(value = "translation_text")
|
||||||
|
@ApiModelProperty(value = "译文")
|
||||||
|
private String translationText;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 233678426416904026L;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -394,10 +394,18 @@ public class MaterialMainService extends ServiceImpl<MaterialMainMapper, Materia
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private List<MaterialTbHeaderVO> getTbHeader(MaterialCategoryEntity categoryEntity, Integer materialClass, List<MaterialCategoryEntity> childList) {
|
private List<MaterialTbHeaderVO> getTbHeader(MaterialCategoryEntity categoryEntity, Integer
|
||||||
|
materialClass, List<MaterialCategoryEntity> childList) {
|
||||||
long Date10 = new Date().getTime();
|
long Date10 = new Date().getTime();
|
||||||
log.info("[计算耗时][getTbHeader]================================" + Date10 );
|
log.info("[计算耗时][getTbHeader]================================" + Date10 );
|
||||||
|
|
||||||
|
//多语言(没有则获取中午)
|
||||||
|
List<LanguageTranslationEntity> keyLanguage = this.getBaseMapper().getKeyLanguage(SessionUtil.getLanguage());
|
||||||
|
if(CollUtil.isNotEmpty(keyLanguage)){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
LinkedList thHeaderList = new LinkedList();
|
LinkedList thHeaderList = new LinkedList();
|
||||||
|
|
||||||
String categoryCode = null;
|
String categoryCode = null;
|
||||||
|
|
|
||||||
|
|
@ -520,4 +520,8 @@
|
||||||
WHERE material_no = #{item.materialNo}
|
WHERE material_no = #{item.materialNo}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="getKeyLanguage" resultType="com.nflg.product.material.pojo.entity.LanguageTranslationEntity">
|
||||||
|
select * from t_language_translation where language_code=#{languageCode}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue