结算修改
This commit is contained in:
parent
7834171421
commit
0f188988ab
|
|
@ -754,10 +754,10 @@ public class SltAgreementInfoController extends BaseController {
|
|||
}
|
||||
String projectName = handleData(projectNames);
|
||||
String unitName = handleData(unitNames);
|
||||
BigDecimal totalCost = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCost = BigDecimal.ZERO;
|
||||
for (SltAgreementInfo bean : leaseList) {
|
||||
if (null == bean.getLeasePrice()) {
|
||||
bean.setLeasePrice(BigDecimal.valueOf(0.00));
|
||||
bean.setLeasePrice(BigDecimal.ZERO);
|
||||
}else{
|
||||
bean.setLeasePrice(bean.getLeasePrice().setScale(3, RoundingMode.DOWN));
|
||||
}
|
||||
|
|
@ -802,16 +802,15 @@ public class SltAgreementInfoController extends BaseController {
|
|||
for (SltAgreementInfo info : sltAgreementInfo) {
|
||||
projectNames.add(info.getProjectName());
|
||||
unitNames.add(info.getUnitName());
|
||||
List<SltAgreementInfo> oneOfList =new ArrayList<>();
|
||||
|
||||
if ( info.getEnableQuerySltData()) {
|
||||
List<SltAgreementInfo> oneOfList;
|
||||
if (info.getEnableQuerySltData()) {
|
||||
oneOfList = sltAgreementInfoMapper.getSltLoseList(info);
|
||||
}else{
|
||||
} else {
|
||||
oneOfList = sltAgreementInfoMapper.getLoseList(info);
|
||||
}
|
||||
|
||||
loseList.addAll(oneOfList);
|
||||
}
|
||||
|
||||
String projectName = handleData(projectNames);
|
||||
String unitName = handleData(unitNames);
|
||||
BigDecimal totalCost = BigDecimal.ZERO;
|
||||
|
|
@ -847,21 +846,18 @@ public class SltAgreementInfoController extends BaseController {
|
|||
@PostMapping("/exportRepair")
|
||||
public void exportRepair(HttpServletResponse response, @RequestParam("params") String params) {
|
||||
try {
|
||||
|
||||
String fileName = "维修费用明细表";
|
||||
List<SltAgreementInfo> sltAgreementInfo = JSONObject.parseArray(params,SltAgreementInfo.class);
|
||||
List<String> projectNames = new ArrayList<>();
|
||||
List<String> unitNames = new ArrayList<>();
|
||||
BigDecimal totalCost = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCost = BigDecimal.ZERO;
|
||||
List<SltAgreementInfo> repairList = new ArrayList<>();
|
||||
for (SltAgreementInfo info : sltAgreementInfo) {
|
||||
projectNames.add(info.getProjectName());
|
||||
unitNames.add(info.getUnitName());
|
||||
List<TmTask> taskList = taskMapper.getTaskIdList(info);
|
||||
|
||||
List<TmTask> taskList2 = new ArrayList<>();
|
||||
List<TmTask> taskList2;
|
||||
taskList2 = checkTeamAgreementInfo(info);
|
||||
|
||||
if (null != taskList && !taskList.isEmpty()) {
|
||||
if (null != taskList2 && !taskList2.isEmpty()) {
|
||||
taskList.addAll(taskList2);
|
||||
|
|
@ -885,6 +881,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
List<SltLeaseInfo> repair = Convert.toList(SltLeaseInfo.class, repairList);
|
||||
expOutExcel(response,repair,fileName,projectName,unitName,totalCost,3);
|
||||
} catch (Exception e) {
|
||||
System.err.println(e.getMessage());
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
}
|
||||
|
|
@ -897,12 +894,10 @@ public class SltAgreementInfoController extends BaseController {
|
|||
if (null != agreementInfoList && !agreementInfoList.isEmpty()) {
|
||||
teamTaskList = taskMapper.getTaskIdListByAgreementList(agreementInfoList);
|
||||
}
|
||||
}catch (Exception e){
|
||||
} catch (Exception e){
|
||||
System.err.println(e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
|
||||
return teamTaskList;
|
||||
}
|
||||
|
||||
|
|
@ -920,7 +915,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
List<SltAgreementInfo> sltAgreementInfo = JSONObject.parseArray(params,SltAgreementInfo.class);
|
||||
List<String> projectNames = new ArrayList<>();
|
||||
List<String> unitNames = new ArrayList<>();
|
||||
BigDecimal reductionCost = BigDecimal.valueOf(0.00);
|
||||
BigDecimal reductionCost = BigDecimal.ZERO;
|
||||
List<SltAgreementReduce> reductionList = new ArrayList<>();
|
||||
for (SltAgreementInfo info : sltAgreementInfo) {
|
||||
projectNames.add(info.getProjectName());
|
||||
|
|
@ -966,7 +961,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
List<SltAgreementInfo> sltAgreementInfo = JSONObject.parseArray(params,SltAgreementInfo.class);
|
||||
List<String> projectNames = new ArrayList<>();
|
||||
List<String> unitNames = new ArrayList<>();
|
||||
BigDecimal totalCost = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCost = BigDecimal.ZERO;
|
||||
|
||||
List<SltAgreementInfo> scrapList = new ArrayList<>();
|
||||
for (SltAgreementInfo info : sltAgreementInfo) {
|
||||
|
|
@ -1060,13 +1055,13 @@ public class SltAgreementInfoController extends BaseController {
|
|||
projectNames.add(info.getProjectName());
|
||||
unitNames.add(info.getUnitName());
|
||||
//租赁费用明细
|
||||
BigDecimal totalCostLease = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostLease = BigDecimal.ZERO;
|
||||
List<SltAgreementInfo> leaseList = new ArrayList<>();
|
||||
List<SltAgreementInfo> oneOfList = sltAgreementInfoMapper.getLeaseList(info);
|
||||
leaseList.addAll(oneOfList);
|
||||
for (SltAgreementInfo bean : leaseList) {
|
||||
if (null == bean.getLeasePrice()) {
|
||||
bean.setLeasePrice(BigDecimal.valueOf(0.00));
|
||||
bean.setLeasePrice(BigDecimal.ZERO);
|
||||
}
|
||||
if (null == bean.getNum()) {
|
||||
bean.setNum(BigDecimal.valueOf(0L));
|
||||
|
|
@ -1086,13 +1081,13 @@ public class SltAgreementInfoController extends BaseController {
|
|||
List<SltLeaseInfo> lease = Convert.toList(SltLeaseInfo.class, leaseList);
|
||||
|
||||
//丢失费用明细
|
||||
BigDecimal totalCostLose = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostLose = BigDecimal.ZERO;
|
||||
List<SltAgreementInfo> loseList = new ArrayList<>();
|
||||
List<SltAgreementInfo> oneOfListLose = sltAgreementInfoMapper.getLoseList(info);
|
||||
loseList.addAll(oneOfListLose);
|
||||
for (SltAgreementInfo bean : loseList) {
|
||||
if (null == bean.getBuyPrice()) {
|
||||
bean.setBuyPrice(BigDecimal.valueOf(0.00));
|
||||
bean.setBuyPrice(BigDecimal.ZERO);
|
||||
}
|
||||
if (null == bean.getNum()) {
|
||||
bean.setNum(BigDecimal.valueOf(0L));
|
||||
|
|
@ -1111,7 +1106,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
|
||||
|
||||
//维修费用明细
|
||||
BigDecimal totalCostRepair = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostRepair = BigDecimal.ZERO;
|
||||
List<SltAgreementInfo> repairList = new ArrayList<>();
|
||||
List<TmTask> taskList = taskMapper.getTaskIdList(info);
|
||||
|
||||
|
|
@ -1136,7 +1131,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
|
||||
|
||||
//报废费用明细
|
||||
BigDecimal totalCostScrap = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostScrap = BigDecimal.ZERO;
|
||||
List<SltAgreementInfo> scrapList = new ArrayList<>();
|
||||
List<TmTask> taskListScrap = taskMapper.getTaskIdList(info);
|
||||
|
||||
|
|
@ -1160,7 +1155,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
|
||||
|
||||
//减免费用明细
|
||||
BigDecimal totalCostReduction = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostReduction = BigDecimal.ZERO;
|
||||
List<SltAgreementReduce> reductionList = new ArrayList<>();
|
||||
|
||||
if (info.getAgreementId() != null){
|
||||
|
|
@ -1270,27 +1265,26 @@ public class SltAgreementInfoController extends BaseController {
|
|||
// String unitName = sltAgreementInfo.getUnitName();
|
||||
|
||||
//租赁费用明细
|
||||
BigDecimal totalCostLease = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostLease = BigDecimal.ZERO;
|
||||
List<SltAgreementInfo> leaseList = new ArrayList<>();
|
||||
for (SltAgreementInfo info : sltAgreementInfo) {
|
||||
projectNames.add(info.getProjectName());
|
||||
unitNames.add(info.getUnitName());
|
||||
List<SltAgreementInfo> oneOfList = new ArrayList<>();
|
||||
if (info != null && info.getEnableQuerySltData() != null && info.getEnableQuerySltData()) {
|
||||
List<SltAgreementInfo> oneOfList;
|
||||
if (info.getEnableQuerySltData() != null && info.getEnableQuerySltData()) {
|
||||
oneOfList = sltAgreementInfoMapper.getLeaseSltDetails(info);
|
||||
} else {
|
||||
oneOfList = sltAgreementInfoMapper.getLeaseList(info);
|
||||
}
|
||||
|
||||
|
||||
leaseList.addAll(oneOfList);
|
||||
}
|
||||
|
||||
for (SltAgreementInfo bean : leaseList) {
|
||||
if (null == bean.getLeasePrice()) {
|
||||
bean.setLeasePrice(BigDecimal.valueOf(0.00));
|
||||
bean.setLeasePrice(BigDecimal.ZERO);
|
||||
}
|
||||
if (null == bean.getNum()) {
|
||||
bean.setNum(BigDecimal.valueOf(0L));
|
||||
bean.setNum(BigDecimal.ZERO);
|
||||
}
|
||||
if (null == bean.getLeaseDays()) {
|
||||
bean.setLeaseDay(0L);
|
||||
|
|
@ -1300,32 +1294,28 @@ public class SltAgreementInfoController extends BaseController {
|
|||
BigDecimal leaseDays = new BigDecimal(bean.getLeaseDays());
|
||||
// BigDecimal costs = leasePrice.multiply(num).multiply(leaseDays);
|
||||
BigDecimal costs = leasePrice.multiply(num).multiply(leaseDays).setScale(GlobalConstants.INT_2, RoundingMode.HALF_UP);
|
||||
if(costs!=null){
|
||||
totalCostLease = totalCostLease.add(costs);
|
||||
}
|
||||
bean.setCosts(costs);
|
||||
}
|
||||
List<SltLeaseInfo> lease = Convert.toList(SltLeaseInfo.class, leaseList);
|
||||
|
||||
//丢失费用明细
|
||||
BigDecimal totalCostLose = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostLose = BigDecimal.ZERO;
|
||||
List<SltAgreementInfo> loseList = new ArrayList<>();
|
||||
|
||||
for (SltAgreementInfo info : sltAgreementInfo) {
|
||||
List<SltAgreementInfo> oneOfList = new ArrayList<>();
|
||||
if ( info.getEnableQuerySltData()) {
|
||||
List<SltAgreementInfo> oneOfList;
|
||||
if (info.getEnableQuerySltData()) {
|
||||
oneOfList = sltAgreementInfoMapper.getSltLoseList(info);
|
||||
}else{
|
||||
} else {
|
||||
oneOfList = sltAgreementInfoMapper.getLoseList(info);
|
||||
}
|
||||
|
||||
|
||||
loseList.addAll(oneOfList);
|
||||
}
|
||||
|
||||
for (SltAgreementInfo bean : loseList) {
|
||||
if (null == bean.getBuyPrice()) {
|
||||
bean.setBuyPrice(BigDecimal.valueOf(0.00));
|
||||
bean.setBuyPrice(BigDecimal.ZERO);
|
||||
}
|
||||
if (null == bean.getNum()) {
|
||||
bean.setNum(BigDecimal.valueOf(0L));
|
||||
|
|
@ -1334,26 +1324,21 @@ public class SltAgreementInfoController extends BaseController {
|
|||
BigDecimal num = bean.getNum();
|
||||
// 原价 x 数量
|
||||
BigDecimal costs = buyPrice.multiply(num);
|
||||
if(costs!=null){
|
||||
totalCostLose = totalCostLose.add(costs);
|
||||
}
|
||||
//计算租赁费用
|
||||
bean.setCosts(costs);
|
||||
}
|
||||
List<SltLeaseInfo> lose = Convert.toList(SltLeaseInfo.class, loseList);
|
||||
|
||||
//维修费用明细
|
||||
BigDecimal totalCostRepair = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostRepair = BigDecimal.ZERO;
|
||||
List<SltAgreementInfo> repairList = new ArrayList<>();
|
||||
|
||||
for (SltAgreementInfo info : sltAgreementInfo) {
|
||||
List<TmTask> taskList = taskMapper.getTaskIdList(info);
|
||||
|
||||
List<TmTask> taskList2 = new ArrayList<>();
|
||||
List<TmTask> taskList2;
|
||||
taskList2 = checkTeamAgreementInfo(info);
|
||||
|
||||
if (null != taskList && !taskList.isEmpty()) {
|
||||
|
||||
if (null != taskList2 && !taskList2.isEmpty()) {
|
||||
taskList.addAll(taskList2);
|
||||
}
|
||||
|
|
@ -1361,6 +1346,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
repairList.addAll(repairDetailsList);
|
||||
}
|
||||
}
|
||||
|
||||
for (SltAgreementInfo bean : repairList) {
|
||||
if (bean.getCosts()!=null && (bean.getPartType().equals("收费"))) {
|
||||
totalCostRepair = totalCostRepair.add(bean.getCosts());
|
||||
|
|
@ -1369,11 +1355,11 @@ public class SltAgreementInfoController extends BaseController {
|
|||
List<SltLeaseInfo> repair = Convert.toList(SltLeaseInfo.class, repairList);
|
||||
|
||||
//报废费用明细
|
||||
BigDecimal totalCostScrap = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostScrap = BigDecimal.ZERO;
|
||||
List<SltAgreementInfo> scrapList = new ArrayList<>();
|
||||
for (SltAgreementInfo info : sltAgreementInfo) {
|
||||
List<TmTask> taskList = taskMapper.getTaskIdList(info);
|
||||
List<TmTask> taskList2 = new ArrayList<>();
|
||||
List<TmTask> taskList2;
|
||||
taskList2 = checkTeamAgreementInfo(info);
|
||||
if (null != taskList && !taskList.isEmpty()) {
|
||||
if (null != taskList2 && !taskList2.isEmpty()) {
|
||||
|
|
@ -1389,10 +1375,11 @@ public class SltAgreementInfoController extends BaseController {
|
|||
totalCostScrap = totalCostScrap.add(bean.getCosts());
|
||||
}
|
||||
}
|
||||
|
||||
List<SltLeaseInfo> scrap = Convert.toList(SltLeaseInfo.class, scrapList);
|
||||
|
||||
//减免费用明细
|
||||
BigDecimal totalCostReduction = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostReduction = BigDecimal.ZERO;
|
||||
List<SltAgreementReduce> reductionList = new ArrayList<>();
|
||||
// if (sltAgreementInfo.getAgreementId()!=null){
|
||||
// SltAgreementReduce bean =new SltAgreementReduce();
|
||||
|
|
@ -1407,7 +1394,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
|
||||
for (SltAgreementInfo info : sltAgreementInfo) {
|
||||
if (info.getAgreementId() != null){
|
||||
SltAgreementReduce bean =new SltAgreementReduce();
|
||||
SltAgreementReduce bean = new SltAgreementReduce();
|
||||
bean.setAgreementId(info.getAgreementId());
|
||||
List<SltAgreementReduce> oneOfList = sltAgreementRecudceMapper.getReductionList(bean);
|
||||
reductionList.addAll(oneOfList);
|
||||
|
|
@ -1424,7 +1411,9 @@ public class SltAgreementInfoController extends BaseController {
|
|||
String unitName = handleData(unitNames);
|
||||
expOutExcelAll(response,lease,lose,repair,scrap,reduction,fileName,projectName,unitName,totalCostLease,totalCostLose,totalCostRepair,totalCostScrap,totalCostReduction);
|
||||
} catch (Exception e) {
|
||||
System.err.println(e.getMessage());
|
||||
log.error(e.toString(), e);
|
||||
throw new ServiceException("导出异常, 请联系系统管理员");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1467,13 +1456,13 @@ public class SltAgreementInfoController extends BaseController {
|
|||
List<SltLeaseInfo> lease = Convert.toList(SltLeaseInfo.class, leaseList);
|
||||
|
||||
//丢失费用明细
|
||||
BigDecimal totalCostLose = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostLose = BigDecimal.ZERO;
|
||||
|
||||
List<SltAgreementInfo> oneOfListLose = sltAgreementInfoMapper.getLoseList(sltAgreementInfo);
|
||||
List<SltAgreementInfo> loseList = new ArrayList<>(oneOfListLose);
|
||||
for (SltAgreementInfo bean : loseList) {
|
||||
if (null == bean.getBuyPrice()) {
|
||||
bean.setBuyPrice(BigDecimal.valueOf(0.00));
|
||||
bean.setBuyPrice(BigDecimal.ZERO);
|
||||
}
|
||||
if (null == bean.getNum()) {
|
||||
bean.setNum(BigDecimal.valueOf(0L));
|
||||
|
|
@ -1533,7 +1522,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
List<SltLeaseInfo> scrap = Convert.toList(SltLeaseInfo.class, scrapList);
|
||||
|
||||
//减免费用明细
|
||||
BigDecimal totalCostReduction = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostReduction = BigDecimal.ZERO;
|
||||
List<SltAgreementReduce> reductionList = new ArrayList<>();
|
||||
if (sltAgreementInfo.getAgreementId()!=null){
|
||||
SltAgreementReduce bean =new SltAgreementReduce();
|
||||
|
|
@ -2143,13 +2132,13 @@ public class SltAgreementInfoController extends BaseController {
|
|||
rawFileName.substring(0, 150) + ".xls" : rawFileName;
|
||||
|
||||
//租赁费用明细
|
||||
BigDecimal totalCostLease = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostLease = BigDecimal.ZERO;
|
||||
List<SltAgreementInfo> leaseList = new ArrayList<>();
|
||||
leaseList = sltAgreementInfoMapper.getLeaseList(info);
|
||||
|
||||
for (SltAgreementInfo bean : leaseList) {
|
||||
if (null == bean.getLeasePrice()) {
|
||||
bean.setLeasePrice(BigDecimal.valueOf(0.00));
|
||||
bean.setLeasePrice(BigDecimal.ZERO);
|
||||
}
|
||||
if (null == bean.getNum()) {
|
||||
bean.setNum(BigDecimal.valueOf(0L));
|
||||
|
|
@ -2169,14 +2158,14 @@ public class SltAgreementInfoController extends BaseController {
|
|||
List<SltLeaseInfo> lease = Convert.toList(SltLeaseInfo.class, leaseList);
|
||||
|
||||
//丢失费用明细
|
||||
BigDecimal totalCostLose = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostLose = BigDecimal.ZERO;
|
||||
List<SltAgreementInfo> loseList = new ArrayList<>();
|
||||
|
||||
loseList = sltAgreementInfoMapper.getLoseList(info);
|
||||
|
||||
for (SltAgreementInfo bean : loseList) {
|
||||
if (null == bean.getBuyPrice()) {
|
||||
bean.setBuyPrice(BigDecimal.valueOf(0.00));
|
||||
bean.setBuyPrice(BigDecimal.ZERO);
|
||||
}
|
||||
if (null == bean.getNum()) {
|
||||
bean.setNum(BigDecimal.valueOf(0L));
|
||||
|
|
@ -2194,12 +2183,12 @@ public class SltAgreementInfoController extends BaseController {
|
|||
List<SltLeaseInfo> lose = Convert.toList(SltLeaseInfo.class, loseList);
|
||||
|
||||
//维修费用明细
|
||||
BigDecimal totalCostRepair = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostRepair = BigDecimal.ZERO;
|
||||
List<SltAgreementInfo> repairList = new ArrayList<>();
|
||||
|
||||
|
||||
List<TmTask> taskRepairList = taskMapper.getTaskIdList(info);
|
||||
List<TmTask> taskRepairList2 = new ArrayList<>();
|
||||
List<TmTask> taskRepairList2;
|
||||
taskRepairList2 = checkTeamAgreementInfo(info);
|
||||
if (null != taskRepairList && !taskRepairList.isEmpty()) {
|
||||
if (null != taskRepairList2 && !taskRepairList2.isEmpty()) {
|
||||
|
|
@ -2216,7 +2205,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
List<SltLeaseInfo> repair = Convert.toList(SltLeaseInfo.class, repairList);
|
||||
|
||||
//报废费用明细
|
||||
BigDecimal totalCostScrap = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostScrap = BigDecimal.ZERO;
|
||||
List<SltAgreementInfo> scrapList = new ArrayList<>();
|
||||
|
||||
List<TmTask> taskScrapList = taskMapper.getTaskIdList(info);
|
||||
|
|
@ -2241,7 +2230,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
List<SltLeaseInfo> scrap = Convert.toList(SltLeaseInfo.class, scrapList);
|
||||
|
||||
//减免费用明细
|
||||
BigDecimal totalCostReduction = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostReduction = BigDecimal.ZERO;
|
||||
List<SltAgreementReduce> reductionList = new ArrayList<>();
|
||||
|
||||
if (info.getAgreementId() != null){
|
||||
|
|
@ -2399,13 +2388,13 @@ public class SltAgreementInfoController extends BaseController {
|
|||
rawFileName.substring(0, 150) + ".xls" : rawFileName;
|
||||
|
||||
//租赁费用明细
|
||||
BigDecimal totalCostLease = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostLease = BigDecimal.ZERO;
|
||||
List<SltAgreementInfo> leaseList = new ArrayList<>();
|
||||
leaseList = sltAgreementInfoMapper.getLeaseList(info);
|
||||
|
||||
for (SltAgreementInfo bean : leaseList) {
|
||||
if (null == bean.getLeasePrice()) {
|
||||
bean.setLeasePrice(BigDecimal.valueOf(0.00));
|
||||
bean.setLeasePrice(BigDecimal.ZERO);
|
||||
}
|
||||
if (null == bean.getNum()) {
|
||||
bean.setNum(BigDecimal.valueOf(0L));
|
||||
|
|
@ -2425,14 +2414,14 @@ public class SltAgreementInfoController extends BaseController {
|
|||
List<SltLeaseInfo> lease = Convert.toList(SltLeaseInfo.class, leaseList);
|
||||
|
||||
//丢失费用明细
|
||||
BigDecimal totalCostLose = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostLose = BigDecimal.ZERO;
|
||||
List<SltAgreementInfo> loseList = new ArrayList<>();
|
||||
|
||||
loseList = sltAgreementInfoMapper.getLoseList(info);
|
||||
|
||||
for (SltAgreementInfo bean : loseList) {
|
||||
if (null == bean.getBuyPrice()) {
|
||||
bean.setBuyPrice(BigDecimal.valueOf(0.00));
|
||||
bean.setBuyPrice(BigDecimal.ZERO);
|
||||
}
|
||||
if (null == bean.getNum()) {
|
||||
bean.setNum(BigDecimal.valueOf(0L));
|
||||
|
|
@ -2450,7 +2439,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
List<SltLeaseInfo> lose = Convert.toList(SltLeaseInfo.class, loseList);
|
||||
|
||||
//维修费用明细
|
||||
BigDecimal totalCostRepair = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostRepair = BigDecimal.ZERO;
|
||||
List<SltAgreementInfo> repairList = new ArrayList<>();
|
||||
|
||||
|
||||
|
|
@ -2472,7 +2461,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
List<SltLeaseInfo> repair = Convert.toList(SltLeaseInfo.class, repairList);
|
||||
|
||||
//报废费用明细
|
||||
BigDecimal totalCostScrap = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostScrap = BigDecimal.ZERO;
|
||||
List<SltAgreementInfo> scrapList = new ArrayList<>();
|
||||
|
||||
List<TmTask> taskScrapList = taskMapper.getTaskIdList(info);
|
||||
|
|
@ -2497,7 +2486,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
List<SltLeaseInfo> scrap = Convert.toList(SltLeaseInfo.class, scrapList);
|
||||
|
||||
//减免费用明细
|
||||
BigDecimal totalCostReduction = BigDecimal.valueOf(0.00);
|
||||
BigDecimal totalCostReduction = BigDecimal.ZERO;
|
||||
List<SltAgreementReduce> reductionList = new ArrayList<>();
|
||||
|
||||
if (info.getAgreementId() != null){
|
||||
|
|
|
|||
|
|
@ -396,8 +396,13 @@
|
|||
left join ma_type mt1 on mt.parent_id = mt1.type_id
|
||||
where rc.status in ('0','1') and rc.repair_type in ('1','2')
|
||||
<if test="info.settlementType != null and info.settlementType != 0">
|
||||
<if test="info.settlementType != 3">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
</if>
|
||||
<if test="info.settlementType = 3">
|
||||
and mt.jiju_type in (1,2)
|
||||
</if>
|
||||
</if>
|
||||
<if test="taskList != null and taskList.size() > 0">
|
||||
and rc.task_id in
|
||||
<foreach item="task" collection="taskList" open="(" separator="," close=")">
|
||||
|
|
@ -434,8 +439,13 @@
|
|||
left join ma_type mt1 on mt.parent_id = mt1.type_id
|
||||
where rc.status in ('0','1') and rc.repair_type = '3'
|
||||
<if test="info.settlementType != null and info.settlementType != 0">
|
||||
<if test="info.settlementType != 3">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
</if>
|
||||
<if test="info.settlementType = 3">
|
||||
and mt.jiju_type in (1,2)
|
||||
</if>
|
||||
</if>
|
||||
<if test="taskList != null and taskList.size() > 0">
|
||||
and rc.task_id in
|
||||
<foreach item="task" collection="taskList" open="(" separator="," close=")">
|
||||
|
|
@ -1195,8 +1205,13 @@
|
|||
and bai.company_id = #{info.companyId}
|
||||
</if>
|
||||
<if test="info.settlementType != null and info.settlementType != 0">
|
||||
<if test="info.settlementType != 3">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
</if>
|
||||
<if test="info.settlementType = 3">
|
||||
and mt.jiju_type in (1,2)
|
||||
</if>
|
||||
</if>
|
||||
|
||||
<if test="info.endTime != null and info.startTime != null">
|
||||
and tt.create_time between #{info.startTime} and #{info.endTime}
|
||||
|
|
@ -1263,8 +1278,13 @@
|
|||
and rc.repair_type in ('1','2')
|
||||
<if test="info.companyId != null"> and bai.company_id = #{info.companyId}</if>
|
||||
<if test="info.settlementType != null and info.settlementType != 0">
|
||||
<if test="info.settlementType != 3">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
</if>
|
||||
<if test="info.settlementType = 3">
|
||||
and mt.jiju_type in (1,2)
|
||||
</if>
|
||||
</if>
|
||||
<if test="info.agreementIds != null and info.agreementIds.size > 0">
|
||||
and tta.agreement_id in
|
||||
<foreach item="aid" collection="info.agreementIds" open="(" separator="," close=")">
|
||||
|
|
@ -1326,8 +1346,13 @@
|
|||
and rc.repair_type = '3'
|
||||
<if test="info.companyId != null"> and bai.company_id =#{info.companyId} </if>
|
||||
<if test="info.settlementType != null and info.settlementType != 0">
|
||||
<if test="info.settlementType != 3">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
</if>
|
||||
<if test="info.settlementType = 3">
|
||||
and mt.jiju_type in (1,2)
|
||||
</if>
|
||||
</if>
|
||||
|
||||
<if test="info.endTime != null and info.startTime != null">
|
||||
and tt.create_time between #{info.startTime} and #{info.endTime}
|
||||
|
|
@ -1394,8 +1419,13 @@
|
|||
and rc.repair_type = '3'
|
||||
<if test="info.companyId != null"> and bai.company_id = #{info.companyId}</if>
|
||||
<if test="info.settlementType != null and info.settlementType != 0">
|
||||
<if test="info.settlementType != 3">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
</if>
|
||||
<if test="info.settlementType = 3">
|
||||
and mt.jiju_type in (1,2)
|
||||
</if>
|
||||
</if>
|
||||
<if test="info.endTime != null and info.startTime != null">
|
||||
and tt.create_time between #{info.startTime} and #{info.endTime}
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue