|
@@ -443,8 +443,12 @@ public class Inc10100Controller extends BaseController {
|
|
|
Long count = processDetails.stream().filter(v -> v.getTechnologyVersion().equals(l.getPrver().trim()) && v.getProductCode().equals(l.getCpart().trim())).count();
|
|
|
Long newCount = allChangeSfc10401.stream().filter(v -> v.getCpart().trim().equals(l.getCpart().trim()) && v.getPrver().trim().equals(l.getPrver().trim())).count();
|
|
|
if (!saveProcess.stream().anyMatch(t -> t.getProductCode().trim().equals(l.getCpart().trim()) && t.getTechnologyVersion().trim().equals(l.getPrver().trim())) && !count.equals(newCount)) {
|
|
|
- oldTech.setIsHistory(1);
|
|
|
- updateProcess.add(oldTech);
|
|
|
+ // 假设旧工艺不存在,或新的工艺序号和旧的不同则将旧工艺版本isHistory置为1
|
|
|
+ if(oldTech!=null){
|
|
|
+ oldTech.setIsHistory(1);
|
|
|
+ updateProcess.add(oldTech);
|
|
|
+ }
|
|
|
+
|
|
|
BizTechnologicalProcess newTech;
|
|
|
// 判断是否已加过对应工艺
|
|
|
newTech = new BizTechnologicalProcess(oldTech);
|