Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
b73e5a6cd0
|
|
@ -542,6 +542,8 @@ public class ComplexQueryController extends BaseController {
|
|||
@ApiOperation(value = "施工机具需求、供应分析统计表")
|
||||
@GetMapping("/getStatisticsList")
|
||||
public AjaxResult getStatisticsList(ProjUsingRecord bean) {
|
||||
Long companyId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(companyId.intValue());
|
||||
startPage();
|
||||
List<ProjUsingRecord> pageList = complexQueryService.getStatisticsList(bean);
|
||||
return AjaxResult.success(getDataTable(pageList));
|
||||
|
|
|
|||
|
|
@ -656,11 +656,6 @@ public class ComplexQueryServiceImpl implements ComplexQueryService {
|
|||
@Override
|
||||
public List<ProjUsingRecord> getStatisticsList(ProjUsingRecord bean) {
|
||||
try {
|
||||
/**
|
||||
* jsk
|
||||
*/
|
||||
Long companyId=iTypeService.getUserDeptId();
|
||||
bean.setCompanyId(companyId.intValue());
|
||||
// 1、查询工程对应的物资名称、型号、需求数量、已供数量
|
||||
List<ProjUsingRecord> list = complexQueryMapper.getStatisticsList(bean);
|
||||
|
||||
|
|
|
|||
|
|
@ -918,7 +918,7 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
|||
|
||||
// 获取usList中的班组id,且去重的数量
|
||||
info.setTeamNum((int) useInfoList.stream()
|
||||
.map(MaterialRetainedEquipmentInfo::getTeamId)
|
||||
.map(MaterialRetainedEquipmentInfo::getTeamName)
|
||||
.filter(Objects::nonNull)
|
||||
.distinct()
|
||||
.count());
|
||||
|
|
|
|||
|
|
@ -52,12 +52,16 @@ public class SelectController {
|
|||
@ApiOperation(value = "根据工程名称查询所属项目部下拉选")
|
||||
@PostMapping("getDepartList")
|
||||
public AjaxResult getDepartList(@RequestBody BmUnit bmUnit) {
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bmUnit.setCompanyId(deptId);
|
||||
return service.getDepartList(bmUnit);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "协议往来单位下拉选")
|
||||
@PostMapping("getAgreementUnitList")
|
||||
public AjaxResult getAgreementUnitList(@RequestBody BmUnit bmUnit) {
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bmUnit.setCompanyId(deptId);
|
||||
return service.getAgreementUnitList(bmUnit);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -192,4 +192,6 @@ public interface LossAssignMapper {
|
|||
* @return
|
||||
*/
|
||||
int deleteApplyDetails(Integer id);
|
||||
|
||||
int updateLossDate(@Param("maId")Long maId, @Param("agreementId") Integer agreementId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ public class LossAssignServiceImpl implements LossAssignService {
|
|||
private void extractedDept(LossAssignInfo lossAssignInfo) {
|
||||
String deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId().toString();
|
||||
Set<String> targetUnits = new HashSet<>(Arrays.asList(
|
||||
"101", "102", "309", "327", "330", "333", "337", "338",
|
||||
"102", "327", "330", "333", "337", "338",
|
||||
"339", "340", "341", "342", "344", "345", "346", "347",
|
||||
"348", "349"
|
||||
));
|
||||
|
|
@ -618,6 +618,12 @@ public class LossAssignServiceImpl implements LossAssignService {
|
|||
if (result == 0) {
|
||||
throw new ServiceException("更新设备状态失败");
|
||||
}
|
||||
|
||||
//截至租赁费用
|
||||
result = mapper.updateLossDate(details.getMaId(), details.getAgreementId());
|
||||
if (result == 0) {
|
||||
throw new ServiceException("更新设备状态丢失日期失败");
|
||||
}
|
||||
}
|
||||
// 更新任务状态为已完成
|
||||
updateWorkflowStatus(lossAssignInfo.getId(), 2);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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){
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN sys_user su ON (
|
||||
(bai.create_by REGEXP '^[0-9]+$' AND su.user_id = bai.create_by) -- 数字ID关联
|
||||
OR
|
||||
(NOT bai.create_by REGEXP '^[0-9]+$' AND su.nick_name = bai.create_by and su.sign_type != null and su.sign_url != null) -- 汉字昵称关联
|
||||
(NOT bai.create_by REGEXP '^[0-9]+$' AND su.nick_name = bai.create_by) -- 汉字昵称关联
|
||||
) and su.del_flag='0'
|
||||
WHERE
|
||||
bai.id = #{id}
|
||||
|
|
|
|||
|
|
@ -1483,6 +1483,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
||||
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
||||
WHERE mt.`level` = 4 and mt.del_flag = '0'
|
||||
and mt2.type_name not in ('安全围栏(三角旗)', '安全围网', '标牌', '标识卡', '彩旗', '冲锋衣', '春秋装(管理)'
|
||||
, '春秋装(一线)', '电力复合脂', '胶鞋', '救生衣', '军棉袄', '劳保鞋', '铝包带', '滤盒', '滤芯', '马夹', '毛巾'
|
||||
, '棉村', '棉大衣', '手电筒', '手套', '洗衣粉', '夏装(管理)', '夏装(一线)', '雨衣')
|
||||
<if test="unitValue != null and unitValue != ''">
|
||||
AND mt.unit_value = #{unitValue}
|
||||
</if>
|
||||
|
|
@ -1540,6 +1543,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and sd.dept_id not in (342,345,347,348,101,344)
|
||||
and bp.pro_id not in (3414,1192,3321,3595)
|
||||
and bp.pro_center IS NOT NULL
|
||||
and mt2.type_name not in ('安全围栏(三角旗)', '安全围网', '标牌', '标识卡', '彩旗', '冲锋衣', '春秋装(管理)'
|
||||
, '春秋装(一线)', '电力复合脂', '胶鞋', '救生衣', '军棉袄', '劳保鞋', '铝包带', '滤盒', '滤芯', '马夹', '毛巾'
|
||||
, '棉村', '棉大衣', '手电筒', '手套', '洗衣粉', '夏装(管理)', '夏装(一线)', '雨衣')
|
||||
<if test="impUnitName != null and impUnitName != ''">
|
||||
AND sd.dept_name = #{impUnitName}
|
||||
</if>
|
||||
|
|
@ -2439,6 +2445,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND bu.type_id in(32,33)
|
||||
and bp.pro_id not in (3414,1192,3321,3595)
|
||||
and bp.pro_center IS NOT NULL
|
||||
and mt2.type_name not in ('安全围栏(三角旗)', '安全围网', '标牌', '标识卡', '彩旗', '冲锋衣', '春秋装(管理)'
|
||||
, '春秋装(一线)', '电力复合脂', '胶鞋', '救生衣', '军棉袄', '劳保鞋', '铝包带', '滤盒', '滤芯', '马夹', '毛巾'
|
||||
, '棉村', '棉大衣', '手电筒', '手套', '洗衣粉', '夏装(管理)', '夏装(一线)', '雨衣')
|
||||
<if test="impUnitName != null and impUnitName != ''">
|
||||
AND sd.dept_name = #{impUnitName}
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -983,6 +983,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id and mt1.del_flag = '0'
|
||||
WHERE
|
||||
sai.STATUS = '0' and mt1.type_name is not NULL and mt.type_name is not NULL
|
||||
and mt1.type_name not in ('安全围栏(三角旗)', '安全围网', '标牌', '标识卡', '彩旗', '冲锋衣', '春秋装(管理)'
|
||||
, '春秋装(一线)', '电力复合脂', '胶鞋', '救生衣', '军棉袄', '劳保鞋', '铝包带', '滤盒', '滤芯', '马夹', '毛巾'
|
||||
, '棉村', '棉大衣', '手电筒', '手套', '洗衣粉', '夏装(管理)', '夏装(一线)', '雨衣')
|
||||
and sai.agreement_id in
|
||||
<foreach item="id" collection="agreementId" open="(" separator="," close=")">
|
||||
#{id}
|
||||
|
|
@ -1641,7 +1644,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="unitName != null and unitName != ''">
|
||||
AND bu.unit_name = #{unitName}
|
||||
</if>
|
||||
|
||||
<if test="companyId != null ">
|
||||
AND bu.company_id = #{companyId}
|
||||
</if>
|
||||
UNION
|
||||
|
||||
SELECT DISTINCT
|
||||
|
|
@ -1661,7 +1666,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="unitName != null and unitName != ''">
|
||||
AND bu.unit_name = #{unitName}
|
||||
</if>
|
||||
|
||||
<if test="companyId != null ">
|
||||
AND bu.company_id = #{companyId}
|
||||
</if>
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
|
|
@ -1681,6 +1688,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="unitName != null and unitName != ''">
|
||||
AND bu.unit_name = #{unitName}
|
||||
</if>
|
||||
<if test="companyId != null ">
|
||||
AND bu.company_id = #{companyId}
|
||||
</if>
|
||||
) ff
|
||||
ORDER BY
|
||||
LEVEL
|
||||
|
|
@ -1720,6 +1730,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="unitId != null">
|
||||
AND bu.unit_id = #{unitId}
|
||||
</if>
|
||||
<if test="companyId != null ">
|
||||
AND bu.company_id = #{companyId}
|
||||
</if>
|
||||
|
||||
UNION
|
||||
|
||||
|
|
@ -1743,6 +1756,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="unitId != null">
|
||||
AND bu.unit_id = #{unitId}
|
||||
</if>
|
||||
<if test="companyId != null ">
|
||||
AND bu.company_id = #{companyId}
|
||||
</if>
|
||||
|
||||
UNION
|
||||
SELECT
|
||||
|
|
@ -1765,6 +1781,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="unitId != null">
|
||||
AND bu.unit_id = #{unitId}
|
||||
</if>
|
||||
<if test="companyId != null ">
|
||||
AND bu.company_id = #{companyId}
|
||||
</if>
|
||||
) ff
|
||||
ORDER BY
|
||||
LEVEL
|
||||
|
|
|
|||
|
|
@ -205,6 +205,10 @@
|
|||
where ma_id = #{maId}
|
||||
</update>
|
||||
|
||||
<update id="updateLossDate">
|
||||
update slt_agreement_info set end_time = now() where ma_id = #{maId} and agreement_id = #{agreementId} and status = 0
|
||||
</update>
|
||||
|
||||
<delete id="deleteDirectApplyDetails">
|
||||
update bm_loss_assign_details
|
||||
set del_flag = '0'
|
||||
|
|
@ -249,7 +253,7 @@
|
|||
LEFT JOIN lease_apply_info lai ON lai.id = sai.lease_id
|
||||
WHERE
|
||||
sai.agreement_id = #{agreementId} AND sai.status = '0'
|
||||
AND mt.jiju_type = '2' AND sai.ma_id is not null
|
||||
AND mt.manage_type = 0 AND sai.ma_id is not null
|
||||
AND mm.ma_status = '2'
|
||||
<if test="typeId != null">
|
||||
AND sai.type_id = #{typeId}
|
||||
|
|
@ -562,7 +566,7 @@
|
|||
WHERE sai.agreement_id = #{agreementId} AND sai.STATUS = '0'
|
||||
) AS sai_filtered
|
||||
INNER JOIN ma_type mt ON mt.type_id = sai_filtered.type_id
|
||||
WHERE mt.parent_id IS NOT NULL and mt.jiju_type = '2'
|
||||
WHERE mt.parent_id IS NOT NULL and mt.manage_type = 0
|
||||
|
||||
UNION ALL -- 二级父节点
|
||||
|
||||
|
|
@ -575,7 +579,7 @@
|
|||
) AS sai_filtered
|
||||
INNER JOIN ma_type mt ON mt.type_id = sai_filtered.type_id
|
||||
INNER JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||
WHERE mt2.parent_id IS NOT NULL and mt.jiju_type = '2'
|
||||
WHERE mt2.parent_id IS NOT NULL and mt.manage_type = 0
|
||||
|
||||
UNION ALL -- 一级父节点
|
||||
|
||||
|
|
@ -589,7 +593,7 @@
|
|||
INNER JOIN ma_type mt ON mt.type_id = sai_filtered.type_id
|
||||
INNER JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||
INNER JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
||||
WHERE mt3.parent_id IS NOT NULL and mt.jiju_type = '2'
|
||||
WHERE mt3.parent_id IS NOT NULL and mt.manage_type = 0
|
||||
) AS all_nodes
|
||||
);
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -396,7 +396,9 @@
|
|||
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">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
<if test="info.settlementType != 3">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
</if>
|
||||
</if>
|
||||
<if test="taskList != null and taskList.size() > 0">
|
||||
and rc.task_id in
|
||||
|
|
@ -434,7 +436,9 @@
|
|||
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">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
<if test="info.settlementType != 3">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
</if>
|
||||
</if>
|
||||
<if test="taskList != null and taskList.size() > 0">
|
||||
and rc.task_id in
|
||||
|
|
@ -1209,7 +1213,9 @@
|
|||
and bai.company_id = #{info.companyId}
|
||||
</if>
|
||||
<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>
|
||||
|
||||
<if test="info.endTime != null and info.startTime != null">
|
||||
|
|
@ -1222,6 +1228,9 @@
|
|||
#{aid}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="info.unitId != null and info.unitId != 0">
|
||||
and bai.unit_id = #{info.unitId}
|
||||
</if>
|
||||
<if test="info.agreementCode != null and info.agreementCode != ''">
|
||||
and bai.agreement_code like concat('%',#{info.agreementCode},'%')
|
||||
</if>
|
||||
|
|
@ -1277,7 +1286,9 @@
|
|||
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">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
<if test="info.settlementType != 3">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
</if>
|
||||
</if>
|
||||
<if test="info.agreementIds != null and info.agreementIds.size > 0">
|
||||
and tta.agreement_id in
|
||||
|
|
@ -1340,9 +1351,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">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
<if test="info.settlementType != 3">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
</if>
|
||||
</if>
|
||||
<if test="info.unitId != null and info.unitId != 0">
|
||||
and bai.unit_id = #{info.unitId}
|
||||
</if>
|
||||
|
||||
<if test="info.endTime != null and info.startTime != null">
|
||||
and tt.create_time between #{info.startTime} and #{info.endTime}
|
||||
</if>
|
||||
|
|
@ -1408,7 +1423,9 @@
|
|||
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">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
<if test="info.settlementType != 3">
|
||||
and mt.jiju_type = #{info.settlementType}
|
||||
</if>
|
||||
</if>
|
||||
<if test="info.endTime != null and info.startTime != null">
|
||||
and tt.create_time between #{info.startTime} and #{info.endTime}
|
||||
|
|
@ -1514,8 +1531,7 @@
|
|||
bp.actual_end_date as actualEndDate
|
||||
FROM
|
||||
bm_agreement_info bai
|
||||
LEFT JOIN slt_agreement_apply saa
|
||||
ON bai.agreement_id = saa.agreement_id AND saa.settlement_type = #{settlementType}
|
||||
LEFT JOIN slt_agreement_apply saa ON bai.agreement_id = saa.agreement_id AND saa.settlement_type = #{settlementType}
|
||||
LEFT JOIN slt_agreement_details sad ON saa.id = sad.apply_id AND sad.slt_type = '2'
|
||||
LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = bp.imp_unit
|
||||
|
|
@ -1523,6 +1539,9 @@
|
|||
left join ma_type mt on sad.type_id = mt.type_id
|
||||
left join ma_type mt1 on mt.parent_id = mt1.type_id
|
||||
<where>
|
||||
<if test="unitId != null and unitId != 0">
|
||||
and bai.unit_id = #{unitId}
|
||||
</if>
|
||||
<if test="companyId != null ">
|
||||
and bai.company_id = #{companyId}
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue