|
@@ -51,6 +51,8 @@ import javax.servlet.http.HttpServletResponse;
|
|
import java.io.BufferedInputStream;
|
|
import java.io.BufferedInputStream;
|
|
import java.io.OutputStream;
|
|
import java.io.OutputStream;
|
|
import java.lang.reflect.Field;
|
|
import java.lang.reflect.Field;
|
|
|
|
+import java.math.BigDecimal;
|
|
|
|
+import java.math.BigInteger;
|
|
import java.sql.Date;
|
|
import java.sql.Date;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.time.LocalDate;
|
|
import java.time.LocalDate;
|
|
@@ -380,6 +382,7 @@ public class BizArchiveInputController extends BaseController {
|
|
List<BizArchiveInputDetail> changeList = new ArrayList<>();
|
|
List<BizArchiveInputDetail> changeList = new ArrayList<>();
|
|
List<BizArchiveInputDetailProcess> changeProcess = new ArrayList<>();
|
|
List<BizArchiveInputDetailProcess> changeProcess = new ArrayList<>();
|
|
oldArchiveInput.getDetails().forEach(l -> {
|
|
oldArchiveInput.getDetails().forEach(l -> {
|
|
|
|
+
|
|
if (newBizArchiveInput.getDetails().stream().noneMatch(e -> l.getId().equals(e.getId()))) {
|
|
if (newBizArchiveInput.getDetails().stream().noneMatch(e -> l.getId().equals(e.getId()))) {
|
|
delList.add(l);
|
|
delList.add(l);
|
|
delProcess.addAll(l.getProcesses());
|
|
delProcess.addAll(l.getProcesses());
|
|
@@ -389,6 +392,9 @@ public class BizArchiveInputController extends BaseController {
|
|
.filter(v -> newItem.getProcesses().stream()
|
|
.filter(v -> newItem.getProcesses().stream()
|
|
.noneMatch(e -> e.getId() != null && e.getId().equals(v.getId()))).collect(Collectors.toList()));
|
|
.noneMatch(e -> e.getId() != null && e.getId().equals(v.getId()))).collect(Collectors.toList()));
|
|
if (newBizArchiveInput.getServiceType().equals(1)) {
|
|
if (newBizArchiveInput.getServiceType().equals(1)) {
|
|
|
|
+ if(null == newItem.getDiscountAmount()){
|
|
|
|
+ newItem.setDiscountAmount(BigDecimal.ZERO);
|
|
|
|
+ }
|
|
boolean a = (newItem.getFreeNum() + newItem.getServiceNum()) != (l.getServiceNum() + l.getFreeNum());
|
|
boolean a = (newItem.getFreeNum() + newItem.getServiceNum()) != (l.getServiceNum() + l.getFreeNum());
|
|
boolean b = (newItem.getPrice().subtract(newItem.getDiscountAmount())).compareTo(l.getPrice().subtract(l.getDiscountAmount())) != 0;
|
|
boolean b = (newItem.getPrice().subtract(newItem.getDiscountAmount())).compareTo(l.getPrice().subtract(l.getDiscountAmount())) != 0;
|
|
if (a || b) {
|
|
if (a || b) {
|
|
@@ -411,10 +417,12 @@ public class BizArchiveInputController extends BaseController {
|
|
}
|
|
}
|
|
//任务开始就不可以修改
|
|
//任务开始就不可以修改
|
|
for (BizArchiveInputDetail item : changeList) {
|
|
for (BizArchiveInputDetail item : changeList) {
|
|
|
|
+ if(null == item.getDiscountAmount()){
|
|
|
|
+ item.setDiscountAmount(BigDecimal.ZERO);
|
|
|
|
+ }
|
|
BizWorkOrderDetail one = bizWorkOrderDetailService.getOne(new LambdaQueryWrapper<BizWorkOrderDetail>()
|
|
BizWorkOrderDetail one = bizWorkOrderDetailService.getOne(new LambdaQueryWrapper<BizWorkOrderDetail>()
|
|
.eq(BizWorkOrderDetail::getContractDetailId, item.getId())
|
|
.eq(BizWorkOrderDetail::getContractDetailId, item.getId())
|
|
.eq(BizWorkOrderDetail::getIsStop, 0));
|
|
.eq(BizWorkOrderDetail::getIsStop, 0));
|
|
-
|
|
|
|
BizArchiveInputDetail newInputDetail = newBizArchiveInput.getDetails().stream().filter(detail->detail.getId().equals(item.getId())).findFirst().orElse(new BizArchiveInputDetail());;
|
|
BizArchiveInputDetail newInputDetail = newBizArchiveInput.getDetails().stream().filter(detail->detail.getId().equals(item.getId())).findFirst().orElse(new BizArchiveInputDetail());;
|
|
boolean b = (item.getPrice().subtract(item.getDiscountAmount())).compareTo(newInputDetail.getPrice().subtract(newInputDetail.getDiscountAmount())) != 0;
|
|
boolean b = (item.getPrice().subtract(item.getDiscountAmount())).compareTo(newInputDetail.getPrice().subtract(newInputDetail.getDiscountAmount())) != 0;
|
|
if(b){
|
|
if(b){
|