Merge branch 'refs/heads/feature/DM/nflg-bom' into feature/DM/nflg-bom-transition

This commit is contained in:
曹鹏飞 2024-06-05 08:51:06 +08:00
commit 678c6c1fdd
3 changed files with 15 additions and 5 deletions

View File

@ -86,7 +86,7 @@ public interface BomNewEbomParentMapper extends BaseMapper<BomNewEbomParentEntit
List<BomNewEbomParentVO> getChildren(Long bomRowId, int type); List<BomNewEbomParentVO> getChildren(Long bomRowId, int type);
List<BomNewEbomParentVO> getBom(String materialNo, String drawingNo); List<BomNewEbomParentVO> getBom(Integer state, String materialNo, String drawingNo);
List<BomNewEbomParentVO> getVOById(Long parentRowId); List<BomNewEbomParentVO> getVOById(Long parentRowId);

View File

@ -48,7 +48,6 @@ import java.io.OutputStream;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.ForkJoinPool; import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.ForkJoinTask; import java.util.concurrent.ForkJoinTask;
@ -2235,7 +2234,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
.collect(Collectors.toList()); .collect(Collectors.toList());
roots.forEach(this::buildChildren); roots.forEach(this::buildChildren);
//从子级开始查找 //从子级开始查找
List<BomNewEbomParentVO> boms = this.getBaseMapper().getBom(query.getMaterialNo(), query.getDrawingNo()); List<BomNewEbomParentVO> boms = this.getBaseMapper().getBom(0, query.getMaterialNo(), query.getDrawingNo());
boms.removeIf(c -> Objects.equals(c.getLastVersionIs(), 0) || Objects.equals(c.getStatus(), EBomStatusEnum.PUBLISHED.getValue())); boms.removeIf(c -> Objects.equals(c.getLastVersionIs(), 0) || Objects.equals(c.getStatus(), EBomStatusEnum.PUBLISHED.getValue()));
boms.forEach(this::buildChildren); boms.forEach(this::buildChildren);
roots.addAll(boms.stream().filter(b -> b.getRootIs() == 0 && b.getUserRootIs() == 0 && b.getRootIsForWaitReview() == 0).map(this::buildParent).flatMap(List::stream).collect(Collectors.toList())); roots.addAll(boms.stream().filter(b -> b.getRootIs() == 0 && b.getUserRootIs() == 0 && b.getRootIsForWaitReview() == 0).map(this::buildParent).flatMap(List::stream).collect(Collectors.toList()));

View File

@ -312,10 +312,15 @@
</delete> </delete>
<update id="updateStateBatchByRowIds"> <update id="updateStateBatchByRowIds">
update t_bom_new_ebom_parent set status=#{status} , convert_to_ebom_time=now() where row_id in update t_bom_new_ebom_parent set status=#{status} , convert_to_ebom_time=now(),edit_status=2,exception_status=1
where row_id in
<foreach collection="list" item="item" open="(" close=")" separator=","> <foreach collection="list" item="item" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>;
UPDATE t_bom_new_ebom_child SET edit_status=2 WHERE parent_row_id IN
<foreach collection="list" item="item" open="(" close=")" separator=",">
#{item}
</foreach>;
</update> </update>
<update id="updateLastVersionIs"> <update id="updateLastVersionIs">
UPDATE t_bom_new_ebom_parent UPDATE t_bom_new_ebom_parent
@ -480,6 +485,12 @@
<if test="drawingNo!=null and drawingNo!=''"> <if test="drawingNo!=null and drawingNo!=''">
AND b.drawing_no = #{drawingNo} AND b.drawing_no = #{drawingNo}
</if> </if>
<if test="state==0">
AND a.status &lt; 4
</if>
<if test="state==1">
AND a.status = 4
</if>
</where> </where>
ORDER BY b.order_number ORDER BY b.order_number
</select> </select>