|
|
@ -1,6 +1,5 @@ |
|
|
|
package com.hnac.hzims.spare.service.impl; |
|
|
|
package com.hnac.hzims.spare.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.afterturn.easypoi.excel.entity.ImportParams; |
|
|
|
import cn.afterturn.easypoi.excel.entity.ImportParams; |
|
|
|
import com.alibaba.excel.EasyExcel; |
|
|
|
import com.alibaba.excel.EasyExcel; |
|
|
|
import com.alibaba.excel.ExcelWriter; |
|
|
|
import com.alibaba.excel.ExcelWriter; |
|
|
@ -33,7 +32,6 @@ import com.hnac.hzims.spare.utils.SheetWriteStyleHandler; |
|
|
|
import com.hnac.hzims.spare.vo.SparePartVO; |
|
|
|
import com.hnac.hzims.spare.vo.SparePartVO; |
|
|
|
import com.hnac.hzims.spare.vo.WtSpBasicVO; |
|
|
|
import com.hnac.hzims.spare.vo.WtSpBasicVO; |
|
|
|
import com.hnac.hzims.ticket.allTicket.fegin.ITicketInfoAllClient; |
|
|
|
import com.hnac.hzims.ticket.allTicket.fegin.ITicketInfoAllClient; |
|
|
|
import com.hnac.hzims.ticket.allTicket.vo.TicketInfoStatisticVO; |
|
|
|
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.Logger; |
|
|
@ -171,7 +169,6 @@ public class WtSpBasicServiceImpl extends ServiceImpl<WtSpBasicMapper, WtSpBasic |
|
|
|
List<WtSpBasicVO> voList = new ArrayList<>(); |
|
|
|
List<WtSpBasicVO> voList = new ArrayList<>(); |
|
|
|
IPage<WtSpBasicVO> voPages = new Page<>(); |
|
|
|
IPage<WtSpBasicVO> voPages = new Page<>(); |
|
|
|
if (Func.isNotEmpty(spBasicEntity.getName()) && "工具".equals(spBasicEntity.getName())) { |
|
|
|
if (Func.isNotEmpty(spBasicEntity.getName()) && "工具".equals(spBasicEntity.getName())) { |
|
|
|
// if(Func.isNotEmpty(spBasicEntity.getName())){
|
|
|
|
|
|
|
|
List<WtSpManagementEntity> list = managementService.list(Wrappers.<WtSpManagementEntity>query().lambda(). |
|
|
|
List<WtSpManagementEntity> list = managementService.list(Wrappers.<WtSpManagementEntity>query().lambda(). |
|
|
|
eq(WtSpManagementEntity::getName, spBasicEntity.getName())); |
|
|
|
eq(WtSpManagementEntity::getName, spBasicEntity.getName())); |
|
|
|
if (list.size() == 0) { |
|
|
|
if (list.size() == 0) { |
|
|
@ -218,13 +215,6 @@ public class WtSpBasicServiceImpl extends ServiceImpl<WtSpBasicMapper, WtSpBasic |
|
|
|
basicVO.setStock(0L); |
|
|
|
basicVO.setStock(0L); |
|
|
|
} |
|
|
|
} |
|
|
|
BeanUtils.copyProperties(basicEntity, basicVO); |
|
|
|
BeanUtils.copyProperties(basicEntity, basicVO); |
|
|
|
|
|
|
|
|
|
|
|
List<TicketInfoStatisticVO> ticketVOS = ticketInfoAllClient.getTicketStatistic("2022-02"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// R<Dept> deptR = sysClient.getDept(basicEntity.getWaterPlantId());
|
|
|
|
|
|
|
|
// if(Func.isNotEmpty(deptR.getData())){
|
|
|
|
|
|
|
|
// basicVO.setWaterPlantName(deptR.getData().getDeptName());
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
voList.add(basicVO); |
|
|
|
voList.add(basicVO); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
WtSpBasicVO basicVO = new WtSpBasicVO(); |
|
|
|
WtSpBasicVO basicVO = new WtSpBasicVO(); |
|
|
@ -240,16 +230,11 @@ public class WtSpBasicServiceImpl extends ServiceImpl<WtSpBasicMapper, WtSpBasic |
|
|
|
if (null != totalEntity) { |
|
|
|
if (null != totalEntity) { |
|
|
|
List<WtSpTotalEntity> totalList = totalService.list(Wrappers.<WtSpTotalEntity>query().lambda().eq(WtSpTotalEntity::getSpBasicId, basicEntity.getId())); |
|
|
|
List<WtSpTotalEntity> totalList = totalService.list(Wrappers.<WtSpTotalEntity>query().lambda().eq(WtSpTotalEntity::getSpBasicId, basicEntity.getId())); |
|
|
|
if (totalList.size() > 0) { |
|
|
|
if (totalList.size() > 0) { |
|
|
|
// basicVO.setStock(totalList.get(0).getStock());
|
|
|
|
|
|
|
|
basicVO.setStock(totalEntity.getStock()); |
|
|
|
basicVO.setStock(totalEntity.getStock()); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
basicVO.setStock(0L); |
|
|
|
basicVO.setStock(0L); |
|
|
|
} |
|
|
|
} |
|
|
|
BeanUtils.copyProperties(basicEntity, basicVO); |
|
|
|
BeanUtils.copyProperties(basicEntity, basicVO); |
|
|
|
// R<Dept> deptR = sysClient.getDept(basicEntity.getWaterPlantId());
|
|
|
|
|
|
|
|
// if(Func.isNotEmpty(deptR.getData())){
|
|
|
|
|
|
|
|
// basicVO.setWaterPlantName(deptR.getData().getDeptName());
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
voList.add(basicVO); |
|
|
|
voList.add(basicVO); |
|
|
|
} |
|
|
|
} |
|
|
|
List<WtSpTotalEntity> totalEntities = totalMapper.selectByWarehouseId(warehouseId); |
|
|
|
List<WtSpTotalEntity> totalEntities = totalMapper.selectByWarehouseId(warehouseId); |
|
|
|