分类编码名称转换

master
anthonyywj2 3 years ago
parent 88f5003dd4
commit 774057a4fe

@ -1,7 +1,7 @@
package com.glxp.udidl.admin.dao.udi;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.udidl.admin.entity.udi.ProductClassifyEntity;
import com.glxp.udidl.admin.entity.udi.ProductClassify;
public interface ProductClassifyMapper extends BaseMapper<ProductClassifyEntity> {
public interface ProductClassifyMapper extends BaseMapper<ProductClassify> {
}

@ -4,7 +4,7 @@ import io.swagger.models.auth.In;
import lombok.Data;
@Data
public class ProductClassifyEntity {
public class ProductClassify {
private Integer id;
private String code;
private String name;

@ -161,7 +161,7 @@ public class ProductInfoEntity {
private String mjfs;
@ApiModelProperty(value = "'其他信息的网址链接'")
private String qtxxdwzlj;
@ApiModelProperty(value = "'分类名称'")
@ApiModelProperty(value = "'分类编码名称'")
private String categoryName;

@ -10,6 +10,7 @@ import com.glxp.udidl.admin.util.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -21,13 +22,10 @@ import java.util.stream.Collectors;
*/
@Service
public class DeviceSaveService {
@Autowired
@Resource
private DeviceService deviceService;
@Autowired
private ProductInfoService productInfoService;
@Autowired
private UdiCompanyService udiCompanyService;
private UdiTransferUtils udiTransferUtils = null;
@Resource
private UdiTransferUtils udiTransferUtils;
/**
*
@ -247,8 +245,6 @@ public class DeviceSaveService {
}
private void productInfoSave(String uuid) {
if (udiTransferUtils == null)
udiTransferUtils = new UdiTransferUtils();
udiTransferUtils.transUdi(uuid);
}

@ -1,10 +1,10 @@
package com.glxp.udidl.admin.service.udi;
import com.glxp.udidl.admin.entity.udi.ProductClassifyEntity;
import com.glxp.udidl.admin.entity.udi.ProductClassify;
public interface ProductClassifyService {
ProductClassifyEntity findByCode(String code, String qxlb);
ProductClassify findByCode(String code, String qxlb);
}

@ -2,7 +2,7 @@ package com.glxp.udidl.admin.service.udi.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.glxp.udidl.admin.dao.udi.ProductClassifyMapper;
import com.glxp.udidl.admin.entity.udi.ProductClassifyEntity;
import com.glxp.udidl.admin.entity.udi.ProductClassify;
import com.glxp.udidl.admin.service.udi.ProductClassifyService;
import org.springframework.stereotype.Service;
@ -15,9 +15,9 @@ public class ProductClassifyServiceImpl implements ProductClassifyService {
ProductClassifyMapper productClassifyMapper;
@Override
public ProductClassifyEntity findByCode(String code, String qxlb) {
public ProductClassify findByCode(String code, String qxlb) {
return productClassifyMapper.selectOne(new QueryWrapper<ProductClassifyEntity>().eq("code", code).eq("qxlb", qxlb));
return productClassifyMapper.selectOne(new QueryWrapper<ProductClassify>().eq("code", code).eq("qxlb", qxlb));
}
}

@ -2,7 +2,7 @@ package com.glxp.udidl.admin.thread;
import cn.hutool.core.util.StrUtil;
import com.glxp.udidl.admin.entity.udi.CountProductEntity;
import com.glxp.udidl.admin.entity.udi.ProductClassifyEntity;
import com.glxp.udidl.admin.entity.udi.ProductClassify;
import com.glxp.udidl.admin.entity.udi.ProductInfoEntity;
import com.glxp.udidl.admin.entity.udi.UdiCompanyEntity;
import com.glxp.udidl.admin.entity.udid.Contactlist;
@ -95,7 +95,7 @@ public class UdiTransferUtils {
productInfoEntity.setSyqsfxyjxmj("否");
}
ProductClassifyEntity productClassifyEntity = productClassifyService.findByCode(productInfoEntity.getFlbm(), productInfoEntity.getQxlb());
ProductClassify productClassifyEntity = productClassifyService.findByCode(productInfoEntity.getFlbm(), productInfoEntity.getCplx());
productInfoEntity.setCategoryName(productClassifyEntity.getName());

@ -138,7 +138,7 @@
<!-- 测试环境+开发环境. 多个使用逗号隔开. -->
<!-- <springProfile name="dev">-->
<logger name="com.glxp.udidl.admin" level="info" />
<!-- <logger name="com.glxp.udidl.admin" level="info" />-->
<!-- </springProfile>-->
<!-- 生产环境. -->

@ -287,7 +287,7 @@
versionNumber
, diType, scbssfbhph, scbssfbhxlh, scbssfbhscrq, scbssfbhsxrq,
ybbm, spmc, cphhhbh, cpms, cpbsbmtxmc, isNewest, updateTime, hchzsb, cplx,sfwblztlcp,cgzmraqxgxx,sfbjwycxsy,zdcfsycs,
sfwwjbz,syqsfxyjxmj,mjfs,qtxxdwzlj)
sfwwjbz,syqsfxyjxmj,mjfs,qtxxdwzlj,categoryName)
values (
#{nameCode},
#{packRatio},
@ -335,7 +335,7 @@
#{sfwwjbz},
#{syqsfxyjxmj},
#{mjfs},
#{qtxxdwzlj}
#{qtxxdwzlj},#{categoryName}
)
</insert>
@ -467,6 +467,10 @@
<if test="qtxxdwzlj != null">
qtxxdwzlj=#{qtxxdwzlj},
</if>
<if test="categoryName != null">
categoryName=#{categoryName},
</if>
</set>
WHERE id = #{id}
</update>
@ -537,6 +541,11 @@
<if test="qtxxdwzlj != null">
qtxxdwzlj=#{qtxxdwzlj},
</if>
<if test="categoryName != null">
categoryName=#{categoryName},
</if>
</set>
WHERE uuid = #{uuid}
</update>

Loading…
Cancel
Save