|
|
@ -7,6 +7,8 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
|
import com.op.common.core.exception.ServiceException;
|
|
|
|
import com.op.common.core.exception.ServiceException;
|
|
|
|
import com.op.plan.domain.ProOrder;
|
|
|
|
import com.op.plan.domain.ProOrder;
|
|
|
|
import com.op.plan.domain.dto.SplitOrderDTO;
|
|
|
|
import com.op.plan.domain.dto.SplitOrderDTO;
|
|
|
|
|
|
|
|
import com.op.plan.service.IProWetMaterialPlanDetailService;
|
|
|
|
|
|
|
|
import com.op.plan.service.IProWetMaterialPlanService;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
@ -38,6 +40,8 @@ import com.op.common.core.web.page.TableDataInfo;
|
|
|
|
public class ProOrderWorkorderController extends BaseController {
|
|
|
|
public class ProOrderWorkorderController extends BaseController {
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private IProOrderWorkorderService proOrderWorkorderService;
|
|
|
|
private IProOrderWorkorderService proOrderWorkorderService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private IProWetMaterialPlanDetailService proWetMaterialPlanDetailService;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 校验工单是否可以修改
|
|
|
|
* 校验工单是否可以修改
|
|
|
@ -154,6 +158,10 @@ public class ProOrderWorkorderController extends BaseController {
|
|
|
|
for (ProOrderWorkorder proOrderWorkorder : proOrderWorkorders) {
|
|
|
|
for (ProOrderWorkorder proOrderWorkorder : proOrderWorkorders) {
|
|
|
|
String status = proOrderWorkorder.getStatus();
|
|
|
|
String status = proOrderWorkorder.getStatus();
|
|
|
|
strings.add(status);
|
|
|
|
strings.add(status);
|
|
|
|
|
|
|
|
// 判断是否含有湿料计划 boolean值(存在为true,不存在为false)
|
|
|
|
|
|
|
|
if (proWetMaterialPlanDetailService.selectProWetMaterialPlanDetailByWorkId(proOrderWorkorder.getWorkorderId())) {
|
|
|
|
|
|
|
|
throw new ServiceException("工单已创建湿料计划,不能删除!");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String[] orderWorkerIds= strings.toArray(new String[0]);
|
|
|
|
String[] orderWorkerIds= strings.toArray(new String[0]);
|
|
|
|
for (String orderWorkerId : orderWorkerIds) {
|
|
|
|
for (String orderWorkerId : orderWorkerIds) {
|
|
|
|