|
@@ -336,11 +336,18 @@ public class JsDrugCheckServiceImpl extends ServiceImpl<JsDrugCheckMapper, JsDru
|
|
placeVo.setCreateTime(jsDistribution.getDistributionTime());
|
|
placeVo.setCreateTime(jsDistribution.getDistributionTime());
|
|
Supplier supplier = supplierMapper.selectSupplierById(jsDistribution.getSupplierId().longValue());
|
|
Supplier supplier = supplierMapper.selectSupplierById(jsDistribution.getSupplierId().longValue());
|
|
placeVo.setCargoOwner(supplier.getSupplierName());
|
|
placeVo.setCargoOwner(supplier.getSupplierName());
|
|
|
|
+ JsProduceCode jsProduceCode = produceCodeMapper.selectOne(new QueryWrapper<JsProduceCode>().eq("one_code", jsDistribution.getOneCode()));
|
|
|
|
+ if (ObjectUtil.isNotEmpty(jsProduceCode)) {
|
|
|
|
+ placeVo.setAnimalCert(jsProduceCode.getAnimalCert());
|
|
|
|
+ placeVo.setMeatCert(jsProduceCode.getMeatCert());
|
|
|
|
+ }else {
|
|
AncimalDTO oneAnimal = purchaserMapper.getOneAnimal(jsDistribution.getPurchaserId().toString());
|
|
AncimalDTO oneAnimal = purchaserMapper.getOneAnimal(jsDistribution.getPurchaserId().toString());
|
|
- if (ObjectUtil.isNotEmpty(oneAnimal)) {
|
|
|
|
- placeVo.setAnimalCert(oneAnimal.getAnimalCert());
|
|
|
|
- placeVo.setMeatCert(oneAnimal.getMeatCert());
|
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(oneAnimal)) {
|
|
|
|
+ placeVo.setAnimalCert(oneAnimal.getAnimalCert());
|
|
|
|
+ placeVo.setMeatCert(oneAnimal.getMeatCert());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
placeVo.setProduceName(jsDistribution.getProduceName());
|
|
placeVo.setProduceName(jsDistribution.getProduceName());
|
|
Purchaser purchaser = purchaserMapper.selectPurchaserById((long) jsDistribution.getPurchaserId());
|
|
Purchaser purchaser = purchaserMapper.selectPurchaserById((long) jsDistribution.getPurchaserId());
|
|
if (ObjectUtil.isNotEmpty(purchaser)) {
|
|
if (ObjectUtil.isNotEmpty(purchaser)) {
|
|
@@ -424,7 +431,11 @@ public class JsDrugCheckServiceImpl extends ServiceImpl<JsDrugCheckMapper, JsDru
|
|
}
|
|
}
|
|
summaryVo.setDongAmount(amount / 2.0);//胴体头数
|
|
summaryVo.setDongAmount(amount / 2.0);//胴体头数
|
|
DecimalFormat def = new DecimalFormat("0.00");
|
|
DecimalFormat def = new DecimalFormat("0.00");
|
|
- summaryVo.setWeight(def.format(values));//产品重量
|
|
|
|
|
|
+ if (values == 0) {
|
|
|
|
+ summaryVo.setWeight("0.00");
|
|
|
|
+ } else {
|
|
|
|
+ summaryVo.setWeight(def.format(values));//产品重量
|
|
|
|
+ }
|
|
|
|
|
|
HarmlessTreatment harmlessTreatment = harmlessTreatmentMapper.selectByEntraceBatchId(entranceBatch.getId());
|
|
HarmlessTreatment harmlessTreatment = harmlessTreatmentMapper.selectByEntraceBatchId(entranceBatch.getId());
|
|
|
|
|
|
@@ -454,7 +465,8 @@ public class JsDrugCheckServiceImpl extends ServiceImpl<JsDrugCheckMapper, JsDru
|
|
|
|
|
|
public List<SummaryVo> mergeObjectsByTime(List<SummaryVo> list) {
|
|
public List<SummaryVo> mergeObjectsByTime(List<SummaryVo> list) {
|
|
Map<Date, SummaryVo> map = new HashMap<>();
|
|
Map<Date, SummaryVo> map = new HashMap<>();
|
|
-
|
|
|
|
|
|
+ DecimalFormat def = new DecimalFormat("0.00");
|
|
|
|
+ Double values = 0.00;
|
|
for (SummaryVo summaryVo : list) {
|
|
for (SummaryVo summaryVo : list) {
|
|
map.compute(summaryVo.getCreateTime(), (k, v) -> {
|
|
map.compute(summaryVo.getCreateTime(), (k, v) -> {
|
|
if (v == null) {
|
|
if (v == null) {
|
|
@@ -468,7 +480,8 @@ public class JsDrugCheckServiceImpl extends ServiceImpl<JsDrugCheckMapper, JsDru
|
|
v.setQualifiedAmount(v.getQualifiedAmount() + summaryVo.getQualifiedAmount());
|
|
v.setQualifiedAmount(v.getQualifiedAmount() + summaryVo.getQualifiedAmount());
|
|
v.setTuzaiAmount(v.getTuzaiAmount() + summaryVo.getTuzaiAmount());
|
|
v.setTuzaiAmount(v.getTuzaiAmount() + summaryVo.getTuzaiAmount());
|
|
v.setDongAmount(v.getDongAmount() + summaryVo.getDongAmount());
|
|
v.setDongAmount(v.getDongAmount() + summaryVo.getDongAmount());
|
|
- v.setWeight(v.getWeight() + summaryVo.getWeight());
|
|
|
|
|
|
+ double v1 = Double.valueOf(v.getWeight()) + Double.valueOf(summaryVo.getWeight());
|
|
|
|
+ v.setWeight(def.format(v1));
|
|
v.setRoadDealAmount(v.getRoadDealAmount() + summaryVo.getRoadDealAmount());
|
|
v.setRoadDealAmount(v.getRoadDealAmount() + summaryVo.getRoadDealAmount());
|
|
v.setIllnessDeadAmount(v.getIllnessDeadAmount() + summaryVo.getIllnessDeadAmount());
|
|
v.setIllnessDeadAmount(v.getIllnessDeadAmount() + summaryVo.getIllnessDeadAmount());
|
|
v.setIllnessDiseaseAmount(v.getIllnessDiseaseAmount() + summaryVo.getIllnessDiseaseAmount());
|
|
v.setIllnessDiseaseAmount(v.getIllnessDiseaseAmount() + summaryVo.getIllnessDiseaseAmount());
|