|
@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.pms.service.maintain;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
import cn.hutool.core.collection.CollUtil;
|
|
import cn.hutool.core.date.DateUtil;
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
+import cn.hutool.core.date.LocalDateTimeUtil;
|
|
import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
|
import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
@@ -11,6 +12,7 @@ import cn.iocoder.yudao.module.pms.controller.admin.maintain.vo.IotMaintainSaveR
|
|
import cn.iocoder.yudao.module.pms.controller.admin.maintain.vo.IotMaintainSaveVO;
|
|
import cn.iocoder.yudao.module.pms.controller.admin.maintain.vo.IotMaintainSaveVO;
|
|
import cn.iocoder.yudao.module.pms.dal.dataobject.IotDeviceDO;
|
|
import cn.iocoder.yudao.module.pms.dal.dataobject.IotDeviceDO;
|
|
import cn.iocoder.yudao.module.pms.dal.dataobject.iotlockstock.IotLockStockDO;
|
|
import cn.iocoder.yudao.module.pms.dal.dataobject.iotlockstock.IotLockStockDO;
|
|
|
|
+import cn.iocoder.yudao.module.pms.dal.dataobject.iotoutbound.IotOutboundDO;
|
|
import cn.iocoder.yudao.module.pms.dal.dataobject.maintain.IotMaintainDO;
|
|
import cn.iocoder.yudao.module.pms.dal.dataobject.maintain.IotMaintainDO;
|
|
import cn.iocoder.yudao.module.pms.dal.dataobject.maintain.material.IotMaintainMaterialDO;
|
|
import cn.iocoder.yudao.module.pms.dal.dataobject.maintain.material.IotMaintainMaterialDO;
|
|
import cn.iocoder.yudao.module.pms.dal.mysql.iotlockstock.IotLockStockMapper;
|
|
import cn.iocoder.yudao.module.pms.dal.mysql.iotlockstock.IotLockStockMapper;
|
|
@@ -121,6 +123,18 @@ public class IotMaintainServiceImpl implements IotMaintainService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//记录出库
|
|
//记录出库
|
|
|
|
+ IotOutboundDO outboundDO = new IotOutboundDO();
|
|
|
|
+ outboundDO.setDeptId(maintainSaveVO.getMaintain().getDeptId());
|
|
|
|
+ outboundDO.setMaterialCode(code);
|
|
|
|
+ outboundDO.setMaterialName(e.getName());
|
|
|
|
+ outboundDO.setDeliveryTime(LocalDateTimeUtil.now());
|
|
|
|
+ outboundDO.setReason("故障维修");
|
|
|
|
+ outboundDO.setStatus(0);
|
|
|
|
+ outboundDO.setType(1);
|
|
|
|
+ outboundDO.setDeleted(false);
|
|
|
|
+ outboundDO.setUnit(e.getUnit());
|
|
|
|
+ outboundDO.setUnitPrice(e.getPrice());
|
|
|
|
+ iotOutboundMapper.insert(outboundDO);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|