|
@@ -21,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
|
|
|
/**
|
|
@@ -387,8 +388,13 @@ public class QualityInspectionManagementServiceImpl extends ServiceImpl<QualityI
|
|
|
qualityInspectionManagement1.setDryGrainPrice(qualityInspectionManagement1.getDryGrainPrice());
|
|
|
qualityInspectionManagement1.setQualityDate(qualityInspectionManagement1.getQualityDate());
|
|
|
qualityInspectionManagement1.setManagementType("1");
|
|
|
+ qualityInspectionManagement1.setType("干粮");
|
|
|
+ qualityInspectionManagement1.setBuckleWeightRatio(1.3f);
|
|
|
+ qualityInspectionManagement1.setBinNumber("1");
|
|
|
+ qualityInspectionManagement1.setConfirm("1");
|
|
|
CommonStaff commonStaff = staffService.getInfo(AuthSecurityUtils.getCurrentUserId());
|
|
|
qualityInspectionManagement1.setQualityInspector(commonStaff.getStaffName());
|
|
|
+ qualityInspectionManagement1.setReInspector(commonStaff.getStaffName());
|
|
|
//状态为已复检
|
|
|
qualityInspectionManagement1.setStatus(StatusEnum.COMPLEX_INSPECTED.getName());
|
|
|
qualityInspectionManagement1.setStatusFlag(StatusEnum.COMPLEX_INSPECTED.getFlag());
|
|
@@ -406,6 +412,10 @@ public class QualityInspectionManagementServiceImpl extends ServiceImpl<QualityI
|
|
|
weighingManagement.setCompId(AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getCompId());
|
|
|
weighingManagement.setServiceManagementType("3");
|
|
|
weighingManagement.setGoodsName("玉米");
|
|
|
+ weighingManagement.setType("干粮");
|
|
|
+ weighingManagement.setBinNumber("1");
|
|
|
+ weighingManagement.setSecretaryWeigher(commonStaff.getStaffName());
|
|
|
+ weighingManagement.setSkinInspector(commonStaff.getStaffName());
|
|
|
weighingManagement.setGrossWeight(qualityInspectionManagement1.getGrossWeight());
|
|
|
weighingManagement.setTare(qualityInspectionManagement1.getTare());
|
|
|
weighingManagement.setNetWeight(qualityInspectionManagement1.getNetWeight());
|
|
@@ -426,16 +436,26 @@ public class QualityInspectionManagementServiceImpl extends ServiceImpl<QualityI
|
|
|
paymentManagement.setCustomerPhone(qualityInspectionManagement1.getCustomerPhone());
|
|
|
paymentManagement.setCarNo(qualityInspectionManagement1.getCarNumber());
|
|
|
paymentManagement.setGoodsName("玉米");
|
|
|
- paymentManagement.setStatus(StatusEnum.PURCHASE_COMPLETED.getName());
|
|
|
- paymentManagement.setStatusFlag(StatusEnum.PURCHASE_COMPLETED.getFlag());
|
|
|
+ paymentManagement.setType("干粮");
|
|
|
+ paymentManagement.setTidalGrainPrice(qualityInspectionManagement1.getDryGrainPrice());
|
|
|
+ paymentManagement.setTidalGrainPrice(qualityInspectionManagement1.getDryGrainPrice());
|
|
|
+ paymentManagement.setStatus("全部付款");
|
|
|
+ paymentManagement.setStatusFlag("5");
|
|
|
paymentManagement.setNetWeight(qualityInspectionManagement1.getNetWeight());
|
|
|
+ paymentManagement.setPureWeight(qualityInspectionManagement1.getNetWeight());
|
|
|
paymentManagement.setManagementType("1");
|
|
|
paymentManagement.setGrossWeight(qualityInspectionManagement1.getGrossWeight());
|
|
|
paymentManagement.setTare(weighingManagement.getTare());
|
|
|
paymentManagement.setSettlementDate(qualityInspectionManagement1.getQualityDate());
|
|
|
paymentManagement.setWarehouseName(qualityInspectionManagement.getWarehouseName());
|
|
|
- paymentManagement.setAmountIngPayable(Double.valueOf(String.valueOf(qualityInspectionManagement1.getNetWeight()*qualityInspectionManagement1.getDryGrainPrice())));
|
|
|
- paymentManagement.setAmountNotPayable(Double.valueOf(String.valueOf(qualityInspectionManagement1.getNetWeight()*qualityInspectionManagement1.getDryGrainPrice())));
|
|
|
+ Double money = (new BigDecimal(qualityInspectionManagement1.getDryGrainPrice())).doubleValue() * qualityInspectionManagement1.getNetWeight();
|
|
|
+ paymentManagement.setAmountIngPayable(money);
|
|
|
+ paymentManagement.setAmountEdPayable(money);
|
|
|
+ paymentManagement.setGrainMoney(Float.valueOf(String.valueOf(money)));
|
|
|
+ paymentManagement.setCalculationPayable(money);
|
|
|
+ paymentManagement.setActualPayment(money);
|
|
|
+
|
|
|
+ paymentManagement.setSettlementClerk(commonStaff.getStaffName());
|
|
|
paymentManagementService.insert(paymentManagement);
|
|
|
this.insert(qualityInspectionManagement1);
|
|
|
weighingManagementService.insert(weighingManagement);
|