|
|
@@ -202,9 +202,15 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
if ("1".equals(status)) {
|
|
|
R<User> resUser = userClient.userInfoById(AuthUtil.getUserId());
|
|
|
if (resUser.isSuccess() && resUser.getData() != null) {
|
|
|
- dept.setEmail(resUser.getData().getEmail());
|
|
|
- dept.setTel(resUser.getData().getPhone());
|
|
|
- dept.setContacts(resUser.getData().getRealName());
|
|
|
+ if(ObjectUtils.isNotNull(resUser.getData().getEmail())) {
|
|
|
+ dept.setEmail(resUser.getData().getEmail());
|
|
|
+ }
|
|
|
+ if(ObjectUtils.isNotNull(resUser.getData().getPhone())) {
|
|
|
+ dept.setTel(resUser.getData().getPhone());
|
|
|
+ }
|
|
|
+ if(ObjectUtils.isNotNull(resUser.getData().getRealName())) {
|
|
|
+ dept.setContacts(resUser.getData().getRealName());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
@@ -853,6 +859,10 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
// String debug = System.getProperty("java.debug");
|
|
|
boolean isDebug = true; // (debug != null && debug.toLowerCase().startsWith("true"));
|
|
|
|
|
|
+ List<Long> psFeeIds = new ArrayList<>();
|
|
|
+ psFeeIds.add(220L);
|
|
|
+ psFeeIds.add(623L);
|
|
|
+
|
|
|
R<Dept> res = sysClient.getDept(deptUtils.getDeptPid());
|
|
|
Dept dept;
|
|
|
if (res.isSuccess() && res.getData() != null) {
|
|
|
@@ -861,9 +871,15 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
if ("1".equals(status)) {
|
|
|
R<User> resUser = userClient.userInfoById(AuthUtil.getUserId());
|
|
|
if (resUser.isSuccess() && resUser.getData() != null) {
|
|
|
- dept.setEmail(resUser.getData().getEmail());
|
|
|
- dept.setTel(resUser.getData().getPhone());
|
|
|
- dept.setContacts(resUser.getData().getRealName());
|
|
|
+ if(ObjectUtils.isNotNull(resUser.getData().getEmail())) {
|
|
|
+ dept.setEmail(resUser.getData().getEmail());
|
|
|
+ }
|
|
|
+ if(ObjectUtils.isNotNull(resUser.getData().getPhone())) {
|
|
|
+ dept.setTel(resUser.getData().getPhone());
|
|
|
+ }
|
|
|
+ if(ObjectUtils.isNotNull(resUser.getData().getRealName())) {
|
|
|
+ dept.setContacts(resUser.getData().getRealName());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
@@ -1833,6 +1849,8 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
bills.setVesselCnName(bills.getVesselEnName() + "/" + bills.getVoyageNo());
|
|
|
List<FeeCenter> feeCenterList;
|
|
|
List<Long> ids = new ArrayList<>();
|
|
|
+ // 第一条费用的制单人
|
|
|
+ Long firstFeeUser = 0L;
|
|
|
if (MagicValues.MM.equals(bills.getBillType())) {
|
|
|
List<Bills> billsList = billsService.list(new LambdaQueryWrapper<Bills>()
|
|
|
.eq(Bills::getTenantId, AuthUtil.getTenantId())
|
|
|
@@ -1856,7 +1874,8 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
LambdaQueryWrapper<FeeCenter> lambdaQueryWrapper = new LambdaQueryWrapper<FeeCenter>()
|
|
|
.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
|
|
|
.eq(FeeCenter::getDc, MagicValues.D)
|
|
|
- .eq(FeeCenter::getIsDeleted, 0);
|
|
|
+ .eq(FeeCenter::getIsDeleted, 0)
|
|
|
+ .notIn(!psFeeIds.isEmpty(), FeeCenter::getFeeId, psFeeIds);
|
|
|
lambdaQueryWrapper.in(FeeCenter::getPid, ids);
|
|
|
if (MagicValues.RECEIVABLE_BILL.equals(groupCode)) {
|
|
|
lambdaQueryWrapper.eq(FeeCenter::getAccStatus, 1);
|
|
|
@@ -1886,6 +1905,9 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
BigDecimal amountProfitLoc;
|
|
|
List<FeeCenterReports> feeCenterReportsList = new ArrayList<>();
|
|
|
for (FeeCenter item : feeCenterList) {
|
|
|
+ if(firstFeeUser==0){
|
|
|
+ firstFeeUser = ObjectUtils.isNotNull(item.getCreateUser()) ? item.getCreateUser() : 0;
|
|
|
+ }
|
|
|
if (ObjectUtils.isNotNull(item.getShortName())) {
|
|
|
item.setCorpCnName(item.getShortName());
|
|
|
} else {
|
|
|
@@ -1938,7 +1960,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
}
|
|
|
feeCenterReports.setAmountLocD(item.getAmountLoc());
|
|
|
feeCenterReports.setHblno(item.getHblno());
|
|
|
- feeCenterReports.setAmount(item.getQuantity() + "*" + item.getPrice());
|
|
|
+ feeCenterReports.setAmount(item.getQuantity().setScale(2) + "*" + item.getPrice().setScale(2));
|
|
|
feeCenterReports.setExrate(item.getExrate());
|
|
|
feeCenterReports.setQuantity(item.getQuantity());
|
|
|
feeCenterReports.setUnitNo(item.getUnitNo());
|
|
|
@@ -1985,6 +2007,25 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
bills.setAddress(bCorpsBanks.get(0).getAddress());
|
|
|
bills.setSwiftCode(bCorpsBanks.get(0).getSwiftCode());
|
|
|
}
|
|
|
+
|
|
|
+ String status = firstFeeUser > 0 ? "1" : "0";
|
|
|
+ if ("1".equals(status)) {
|
|
|
+ R<User> resUser = userClient.userInfoById(firstFeeUser);
|
|
|
+ if (resUser.isSuccess() && resUser.getData() != null) {
|
|
|
+ if(ObjectUtils.isNotNull(resUser.getData().getEmail())) {
|
|
|
+ dept.setEmail(resUser.getData().getEmail());
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ if(ObjectUtils.isNotNull(resUser.getData().getPhone())) {
|
|
|
+ dept.setTel(resUser.getData().getPhone());
|
|
|
+ }
|
|
|
+ if(ObjectUtils.isNotNull(resUser.getData().getRealName())) {
|
|
|
+ dept.setContacts(resUser.getData().getRealName());
|
|
|
+ }
|
|
|
+ */
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
bills.setDept(dept);
|
|
|
map.put(MagicValues.DATA, bills);
|
|
|
} else {
|
|
|
@@ -2002,6 +2043,10 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
bills.setVesselCnName(bills.getVesselEnName() + "/" + bills.getVoyageNo());
|
|
|
List<FeeCenter> feeCenterList;
|
|
|
List<Long> ids = new ArrayList<>();
|
|
|
+
|
|
|
+ // 第一条费用的制单人
|
|
|
+ Long firstFeeUser = 0L;
|
|
|
+
|
|
|
if (MagicValues.MM.equals(bills.getBillType())) {
|
|
|
List<Bills> billsList = billsService.list(new LambdaQueryWrapper<Bills>()
|
|
|
.eq(Bills::getTenantId, AuthUtil.getTenantId())
|
|
|
@@ -2025,7 +2070,8 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
LambdaQueryWrapper<FeeCenter> lambdaQueryWrapper = new LambdaQueryWrapper<FeeCenter>()
|
|
|
.eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
|
|
|
.eq(FeeCenter::getDc, MagicValues.C)
|
|
|
- .eq(FeeCenter::getIsDeleted, 0);
|
|
|
+ .eq(FeeCenter::getIsDeleted, 0)
|
|
|
+ .notIn(!psFeeIds.isEmpty(), FeeCenter::getFeeId, psFeeIds);
|
|
|
lambdaQueryWrapper.in(FeeCenter::getPid, ids);
|
|
|
if (ObjectUtils.isNotNull(corpIds)) {
|
|
|
lambdaQueryWrapper.eq(FeeCenter::getCorpId, corpIds);
|
|
|
@@ -2055,6 +2101,10 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
BigDecimal amountProfitLoc;
|
|
|
List<FeeCenterReports> feeCenterReportsList = new ArrayList<>();
|
|
|
for (FeeCenter item : feeCenterList) {
|
|
|
+ if(firstFeeUser==0){
|
|
|
+ firstFeeUser = ObjectUtils.isNotNull(item.getCreateUser()) ? item.getCreateUser() : 0;
|
|
|
+ }
|
|
|
+
|
|
|
if (ObjectUtils.isNotNull(item.getShortName())) {
|
|
|
item.setCorpCnName(item.getShortName());
|
|
|
} else {
|
|
|
@@ -2107,7 +2157,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
}
|
|
|
feeCenterReports.setAmountLocC(item.getAmountLoc());
|
|
|
feeCenterReports.setHblno(item.getHblno());
|
|
|
- feeCenterReports.setAmount(item.getQuantity() + "*" + item.getPrice());
|
|
|
+ feeCenterReports.setAmount(item.getQuantity().setScale(2) + "*" + item.getPrice().setScale(2));
|
|
|
feeCenterReports.setExrate(item.getExrate());
|
|
|
feeCenterReports.setQuantity(item.getQuantity());
|
|
|
feeCenterReports.setUnitNo(item.getUnitNo());
|
|
|
@@ -2145,6 +2195,25 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
bills.setCapitalLettersUsd(BigDecimalUtils.convertToEnglish(amountCrLoc.divide(exrateD, 2, RoundingMode.HALF_UP)));
|
|
|
}*/
|
|
|
bills.setAmountProfitLoc(amountProfitLoc);
|
|
|
+
|
|
|
+ String status = firstFeeUser > 0 ? "1" : "0";
|
|
|
+ if ("1".equals(status)) {
|
|
|
+ R<User> resUser = userClient.userInfoById(firstFeeUser);
|
|
|
+ if (resUser.isSuccess() && resUser.getData() != null) {
|
|
|
+ if(ObjectUtils.isNotNull(resUser.getData().getEmail())) {
|
|
|
+ dept.setEmail(resUser.getData().getEmail());
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ if(ObjectUtils.isNotNull(resUser.getData().getPhone())) {
|
|
|
+ dept.setTel(resUser.getData().getPhone());
|
|
|
+ }
|
|
|
+ if(ObjectUtils.isNotNull(resUser.getData().getRealName())) {
|
|
|
+ dept.setContacts(resUser.getData().getRealName());
|
|
|
+ }
|
|
|
+ */
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
bills.setDept(dept);
|
|
|
map.put(MagicValues.DATA, bills);
|
|
|
} else {
|
|
|
@@ -3652,7 +3721,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
}
|
|
|
feeCenterReports.setAmountLocD(item.getAmountLoc());
|
|
|
feeCenterReports.setHblno(item.getHblno());
|
|
|
- feeCenterReports.setAmount(item.getQuantity() + "*" + item.getPrice());
|
|
|
+ feeCenterReports.setAmount(item.getQuantity().setScale(2) + "*" + item.getPrice().setScale(2));
|
|
|
feeCenterReportsList.add(feeCenterReports);
|
|
|
}
|
|
|
if (!feeCenterList.isEmpty()) {
|
|
|
@@ -3781,7 +3850,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
}
|
|
|
feeCenterReports.setAmountLocD(item.getAmountLoc());
|
|
|
feeCenterReports.setHblno(item.getHblno());
|
|
|
- feeCenterReports.setAmount(item.getQuantity() + "*" + item.getPrice());
|
|
|
+ feeCenterReports.setAmount(item.getQuantity().setScale(2) + "*" + item.getPrice().setScale(2));
|
|
|
feeCenterReportsList.add(feeCenterReports);
|
|
|
}
|
|
|
if (!feeCenterList.isEmpty()) {
|
|
|
@@ -3909,7 +3978,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
}
|
|
|
feeCenterReports.setAmountLocC(item.getAmountLoc());
|
|
|
feeCenterReports.setHblno(item.getHblno());
|
|
|
- feeCenterReports.setAmount(item.getQuantity() + "*" + item.getPrice());
|
|
|
+ feeCenterReports.setAmount(item.getQuantity().setScale(2) + "*" + item.getPrice().setScale(2));
|
|
|
feeCenterReportsList.add(feeCenterReports);
|
|
|
}
|
|
|
if (!feeCenterList.isEmpty()) {
|
|
|
@@ -4028,7 +4097,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
}
|
|
|
feeCenterReports.setAmountLocC(item.getAmountLoc());
|
|
|
feeCenterReports.setHblno(item.getHblno());
|
|
|
- feeCenterReports.setAmount(item.getQuantity() + "*" + item.getPrice());
|
|
|
+ feeCenterReports.setAmount(item.getQuantity().setScale(2) + "*" + item.getPrice().setScale(2));
|
|
|
feeCenterReportsList.add(feeCenterReports);
|
|
|
}
|
|
|
if (!feeCenterList.isEmpty()) {
|
|
|
@@ -4174,7 +4243,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
}
|
|
|
feeCenterReports.setAmountLocC(item.getAmountLoc());
|
|
|
feeCenterReports.setHblno(item.getHblno());
|
|
|
- feeCenterReports.setAmount(item.getQuantity() + "*" + item.getPrice());
|
|
|
+ feeCenterReports.setAmount(item.getQuantity().setScale(2) + "*" + item.getPrice().setScale(2));
|
|
|
feeCenterReportsList.add(feeCenterReports);
|
|
|
}
|
|
|
if (!feeCenterList.isEmpty()) {
|
|
|
@@ -4292,7 +4361,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
}
|
|
|
feeCenterReports.setAmountLocC(item.getAmountLoc());
|
|
|
feeCenterReports.setHblno(item.getHblno());
|
|
|
- feeCenterReports.setAmount(item.getQuantity() + "*" + item.getPrice());
|
|
|
+ feeCenterReports.setAmount(item.getQuantity().setScale(2) + "*" + item.getPrice().setScale(2));
|
|
|
feeCenterReportsList.add(feeCenterReports);
|
|
|
}
|
|
|
if (!feeCenterList.isEmpty()) {
|
|
|
@@ -6789,7 +6858,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
}
|
|
|
feeCenterReports.setAmountLocD(item.getAmountLoc());
|
|
|
feeCenterReports.setHblno(item.getHblno());
|
|
|
- feeCenterReports.setAmount(item.getQuantity() + "*" + item.getPrice());
|
|
|
+ feeCenterReports.setAmount(item.getQuantity().setScale(2) + "*" + item.getPrice().setScale(2));
|
|
|
feeCenterReportsList.add(feeCenterReports);
|
|
|
}
|
|
|
if (!feeCenterList.isEmpty()) {
|
|
|
@@ -6903,7 +6972,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
}
|
|
|
feeCenterReports.setAmountLocD(item.getAmountLoc());
|
|
|
feeCenterReports.setHblno(item.getHblno());
|
|
|
- feeCenterReports.setAmount(item.getQuantity() + "*" + item.getPrice());
|
|
|
+ feeCenterReports.setAmount(item.getQuantity().setScale(2) + "*" + item.getPrice().setScale(2));
|
|
|
feeCenterReportsList.add(feeCenterReports);
|
|
|
}
|
|
|
if (!feeCenterList.isEmpty()) {
|
|
|
@@ -7016,7 +7085,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
}
|
|
|
feeCenterReports.setAmountLocC(item.getAmountLoc());
|
|
|
feeCenterReports.setHblno(item.getHblno());
|
|
|
- feeCenterReports.setAmount(item.getQuantity() + "*" + item.getPrice());
|
|
|
+ feeCenterReports.setAmount(item.getQuantity().setScale(2) + "*" + item.getPrice().setScale(2));
|
|
|
feeCenterReportsList.add(feeCenterReports);
|
|
|
}
|
|
|
if (!feeCenterList.isEmpty()) {
|
|
|
@@ -7120,7 +7189,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
|
|
|
}
|
|
|
feeCenterReports.setAmountLocC(item.getAmountLoc());
|
|
|
feeCenterReports.setHblno(item.getHblno());
|
|
|
- feeCenterReports.setAmount(item.getQuantity() + "*" + item.getPrice());
|
|
|
+ feeCenterReports.setAmount(item.getQuantity().setScale(2) + "*" + item.getPrice().setScale(2));
|
|
|
feeCenterReportsList.add(feeCenterReports);
|
|
|
}
|
|
|
if (!feeCenterList.isEmpty()) {
|