| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import com.core.common.Cools; |
| | |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | WrkDetlService wrkDetlService = SpringUtils.getBean(WrkDetlService.class); |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(this.wrkNo); |
| | | String orderNo = ""; |
| | | List<String> resultRecords = new ArrayList<>(); |
| | | if (!Cools.isEmpty(wrkDetls) && wrkDetls.size()!=0){ |
| | | if (wrkDetls.get(0).getOrderNo() != null) { |
| | | orderNo = wrkDetls.get(0).getOrderNo(); |
| | | for (WrkDetl wrkDetl : wrkDetls) { |
| | | String orderNo$ = ""; |
| | | if(!wrkDetl.getOrderNo().startsWith("[") || !wrkDetl.getOrderNo().endsWith("]")) { |
| | | return wrkDetl.getOrderNo(); |
| | | } else { |
| | | JSON.parseArray(wrkDetl.getOrderNo(), DetlDto.class).forEach(detlDto -> { |
| | | resultRecords.add(detlDto.getOrderNo()); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | int size = resultRecords.size(); |
| | | int i = 1; |
| | | for (String resultRecord : resultRecords) { |
| | | |
| | | |
| | | if (size == i) { |
| | | orderNo += resultRecord; |
| | | } else { |
| | | orderNo += resultRecord + ";"; |
| | | } |
| | | |
| | | |
| | | i++; |
| | | } |
| | | return String.valueOf(orderNo); |
| | | } |