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