| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gs.xky.dto.BarcodeDeliveryNo; |
| | | import com.gs.xky.dto.DynamicData; |
| | | import com.gs.xky.entity.TblBarcodeInformation; |
| | | import com.gs.xky.mapper.TblBarcodeInformationMapper; |
| | | import com.gs.xky.service.TblBarcodeInformationService; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.time.Instant; |
| | | import java.time.ZoneId; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | for (BarcodeDeliveryNo barcodeDeliveryNo : barcodeList) { |
| | | |
| | | DynamicData detail = barcodeDeliveryNo.getDynamicData(); |
| | | |
| | | updateWrapper.clear(); |
| | | updateWrapper.eq(TblBarcodeInformation::getSmallBarcode, barcodeDeliveryNo.getSmallBarcode()); |
| | | remove(updateWrapper); |
| | |
| | | |
| | | barcodeInformation.setDeliveryNo(deliveryNo); |
| | | |
| | | // String[] split = detail.getPoLineNo().split("-"); |
| | | // barcodeInformation.setPoLineNo(split[0]); |
| | | barcodeInformation.setExtendN01(detail.getExtendN01()); |
| | | |
| | | barcodeInformation.setPoErpNo(detail.getPoErpNo()); |
| | | barcodeInformation.setInnerVendorCode(detail.getInnerVendorCode()); |
| | | |
| | | long timestamp = Long.parseLong(detail.getCustomize1()); |
| | | // 将时间戳转换为Instant对象 |
| | | Instant instant = Instant.ofEpochMilli(timestamp); |
| | | |
| | | // 创建DateTimeFormatter实例,指定格式 |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss") |
| | | .withZone(ZoneId.systemDefault()); |
| | | |
| | | // 格式化为字符串 |
| | | String formattedDate = formatter.format(instant); |
| | | |
| | | barcodeInformation.setCustomize1(formattedDate); |
| | | |
| | | tbBarcodeInformationList.add(barcodeInformation); |
| | | } |
| | | |