|
|
|
|
@ -5,6 +5,7 @@ package org.springblade.desk.basic.controller; |
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
|
|
import io.swagger.v3.oas.annotations.Parameter; |
|
|
|
|
@ -30,8 +31,10 @@ import org.springblade.desk.basic.excel.PlatingSmallExcel; |
|
|
|
|
import org.springblade.desk.basic.excel.WorkTankExcel; |
|
|
|
|
import org.springblade.desk.basic.pojo.entity.Plating; |
|
|
|
|
import org.springblade.desk.basic.pojo.entity.PlatingSmall; |
|
|
|
|
import org.springblade.desk.basic.pojo.entity.WorkCenter; |
|
|
|
|
import org.springblade.desk.basic.pojo.entity.WorkTank; |
|
|
|
|
import org.springblade.desk.basic.pojo.vo.WorkTankVO; |
|
|
|
|
import org.springblade.desk.basic.service.IWorkCenterService; |
|
|
|
|
import org.springblade.desk.basic.service.IWorkTankService; |
|
|
|
|
import org.springblade.desk.basic.util.ExcelExtUtil; |
|
|
|
|
import org.springblade.desk.basic.wrapper.WorkTankWrapper; |
|
|
|
|
@ -64,7 +67,8 @@ public class WorkTankController extends BladeController { |
|
|
|
|
private IWorkTankService service; |
|
|
|
|
@Resource |
|
|
|
|
private IUserClient iUserClient; |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private IWorkCenterService workCenterservice; |
|
|
|
|
/** |
|
|
|
|
* [作业槽] 详情 |
|
|
|
|
*/ |
|
|
|
|
@ -289,7 +293,13 @@ public class WorkTankController extends BladeController { |
|
|
|
|
List<WorkTank> noticeList = new ArrayList<>(); |
|
|
|
|
List<WorkTankExcel> list = ExcelUtil.read(file, WorkTankExcel.class); |
|
|
|
|
list.forEach(noticeExcel -> { |
|
|
|
|
|
|
|
|
|
//查询作业中心 设置作业中心ID
|
|
|
|
|
WorkCenter workCenter = workCenterservice.getOne(Wrappers.lambdaQuery(WorkCenter.class) |
|
|
|
|
.eq(WorkCenter::getWcName, noticeExcel.getWorkstationName())); |
|
|
|
|
if (cn.hutool.core.bean.BeanUtil.isEmpty(workCenter)){ |
|
|
|
|
throw new ArithmeticException("作业槽编码:" + noticeExcel.getWorkTankCode() + "数据," + "未找到作业中心"); |
|
|
|
|
} |
|
|
|
|
noticeExcel.setWorkstationId(workCenter.getId()); |
|
|
|
|
WorkTank notice = BeanUtil.copy(noticeExcel, WorkTank.class); |
|
|
|
|
List<User> userLeaders = iUserClient.listByNameNolike(noticeExcel.getOpUserName()); |
|
|
|
|
if(null != userLeaders && userLeaders.size() > 0){ |
|
|
|
|
|