| | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.zy.asrs.common.wms.entity.Mat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | @ExcelProperty(index = 1, value = "二级分类") |
| | | private String secClass; |
| | | |
| | | @ExcelProperty(index = 2, value = "商品编号") |
| | | private String matnr; |
| | | |
| | | @ExcelProperty(index = 3, value = "商品名称") |
| | | private String maktx; |
| | | |
| | | } |
| | |
| | | tagId = tagService.getTop(hostId).getId(); |
| | | } |
| | | // 商品 |
| | | Mat mat = matService.getOne(new LambdaQueryWrapper<Mat>().eq(Mat::getMatnr, excel.getMatnr())); |
| | | Mat mat = matService.getOne(new LambdaQueryWrapper<Mat>().eq(Mat::getMatnr, excel.getMatnr()).eq(Mat::getHostId, hostId)); |
| | | if (mat == null) { |
| | | mat = excel; |
| | | mat.setTagId(tagId); |
| | | mat.setHostId(hostId); |
| | | if (!matService.save(mat)) { |
| | | throw new CoolException("保存商品信息失败,商品编码:" + excel.getMatnr()); |
| | | } |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.zy.asrs.common.wms.service.TagService; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |