|
|
|
@ -9,10 +9,9 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
|
|
import com.op.common.core.domain.ExcelCol;
|
|
|
|
|
import com.op.common.core.exception.ServiceException;
|
|
|
|
|
import com.op.common.core.utils.StringUtils;
|
|
|
|
|
import com.op.common.core.utils.poi.ExcelMapUtil;
|
|
|
|
|
import com.op.plan.domain.ProLine;
|
|
|
|
|
import com.op.plan.domain.ProOrder;
|
|
|
|
|
import com.op.plan.domain.ProOrderWorkorderBatch;
|
|
|
|
|
import com.op.plan.domain.*;
|
|
|
|
|
import com.op.plan.domain.dto.SplitOrderDTO;
|
|
|
|
|
import com.op.plan.service.IProWetMaterialPlanDetailService;
|
|
|
|
|
import com.op.plan.service.IProWetMaterialPlanService;
|
|
|
|
@ -32,7 +31,6 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
import com.op.common.log.annotation.Log;
|
|
|
|
|
import com.op.common.log.enums.BusinessType;
|
|
|
|
|
import com.op.common.security.annotation.RequiresPermissions;
|
|
|
|
|
import com.op.plan.domain.ProOrderWorkorder;
|
|
|
|
|
import com.op.plan.service.IProOrderWorkorderService;
|
|
|
|
|
import com.op.common.core.web.controller.BaseController;
|
|
|
|
|
import com.op.common.core.web.domain.AjaxResult;
|
|
|
|
@ -304,6 +302,19 @@ public class ProOrderWorkorderController extends BaseController {
|
|
|
|
|
@Log(title = "下发生产工单", businessType = BusinessType.OTHER)
|
|
|
|
|
@PostMapping("/downWorkorder/{workorderIds}")
|
|
|
|
|
public AjaxResult downWorkorder(@PathVariable String[] workorderIds) {
|
|
|
|
|
List<BaseProduct> packageTypes = proOrderWorkorderService.getPackType(workorderIds);
|
|
|
|
|
if(CollectionUtils.isEmpty(packageTypes)){
|
|
|
|
|
return AjaxResult.error("请先维护垛型箱型!");
|
|
|
|
|
}else{
|
|
|
|
|
for(BaseProduct ptype:packageTypes){
|
|
|
|
|
if(StringUtils.isEmpty(ptype.getBoxType())){
|
|
|
|
|
return AjaxResult.error("请先维护箱型!");
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.isEmpty(ptype.getPackType())){
|
|
|
|
|
return AjaxResult.error("请先维护垛型!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
List<String> orderNotW0 = proOrderWorkorderService.getOrderNotW0(workorderIds);
|
|
|
|
|
if(workorderIds.length != orderNotW0.size()){
|
|
|
|
|
return AjaxResult.error("存在已经派发的订单,请重新选择工单!");
|
|
|
|
|