|
@@ -13,6 +13,7 @@ import cn.ezhizao.framework.web.domain.AjaxResult;
|
|
|
import cn.ezhizao.framework.web.page.TableDataInfo;
|
|
|
import cn.ezhizao.project.business.domain.*;
|
|
|
import cn.ezhizao.project.business.service.*;
|
|
|
+import cn.ezhizao.project.system.service.ISysDeptService;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -47,9 +48,21 @@ public class BizTechnologicalAmendController extends BaseController
|
|
|
@Resource
|
|
|
private IBizLotService bizLotService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private IBizProductionPlanDetailService bizProductionPlanDetailService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private IBizFurnaceNoInfoService bizFurnaceNoInfoService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private IBizDayworkService bizDayworkService;
|
|
|
+
|
|
|
@Resource
|
|
|
private IBizProcessService bizProcessService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private ISysDeptService sysDeptService;
|
|
|
+
|
|
|
/**
|
|
|
* 查询修改后工艺列表
|
|
|
*/
|
|
@@ -75,6 +88,37 @@ public class BizTechnologicalAmendController extends BaseController
|
|
|
|
|
|
|
|
|
|
|
|
+ @GetMapping("/lotParticulars/{lotCode}")
|
|
|
+ public AjaxResult lotParticulars(@PathVariable("lotCode") String lotCode) throws NoSuchFieldException, IllegalAccessException
|
|
|
+ {
|
|
|
+ //根据查询批次信息
|
|
|
+ BizLot lot =new BizLot();
|
|
|
+ lot.setLotCode(lotCode);
|
|
|
+ try {
|
|
|
+ lot=bizLotService.getList(lot).get(0);
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new RuntimeException("批次信息异常!");
|
|
|
+ }
|
|
|
+ //查询计划单信息
|
|
|
+ lot.setProductionPlanDetail(bizProductionPlanDetailService.getById(lot.getProductionPlanDetailId()));
|
|
|
+ //查询报工信息
|
|
|
+ BizDaywork daywork=new BizDaywork();
|
|
|
+ daywork.setLotId(lot.getId());
|
|
|
+ daywork=bizDayworkService.getList(daywork).get(0);
|
|
|
+ lot.setDaywork(daywork);
|
|
|
+ //根据报工id和计划单id查询 furnaceNoInfo
|
|
|
+ BizFurnaceNoInfo furnaceNoInfo=new BizFurnaceNoInfo();
|
|
|
+ furnaceNoInfo.setProductionPlanDetailId(lot.getProductionPlanDetailId());
|
|
|
+ furnaceNoInfo.setDayworkId(daywork.getId());
|
|
|
+ lot.getProductionPlanDetail().setRequisitionDepartmentName(sysDeptService.selectDeptById(daywork.getDeptId()).getDeptName());
|
|
|
+
|
|
|
+ //设置furnaceNoInfo
|
|
|
+ lot.setFurnaceNoInfo(bizFurnaceNoInfoService.getList(furnaceNoInfo).get(0));
|
|
|
+ return success(lot);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -102,7 +146,15 @@ public class BizTechnologicalAmendController extends BaseController
|
|
|
//根据id查询批次信息
|
|
|
BizLot lot = bizLotService.getById(lotId);
|
|
|
|
|
|
- BizTechnologicalProcess technologicalProcess = bizTechnologicalProcessService.getById(lot.getTechnologicalProcessId());
|
|
|
+ BizTechnologicalProcess technologicalProcess =new BizTechnologicalProcess();
|
|
|
+ //是否进行过单批单改
|
|
|
+ if(lot.getIsAmend()==1){
|
|
|
+ BizTechnologicalAmend technologicalAmend = bizTechnologicalAmendService.getById(lot.getTechnologicalProcessId());
|
|
|
+ technologicalProcess = bizTechnologicalProcessService.getById(technologicalAmend.getTechnologicalProcessId());
|
|
|
+ }else{
|
|
|
+ technologicalProcess = bizTechnologicalProcessService.getById(lot.getTechnologicalProcessId());
|
|
|
+ }
|
|
|
+
|
|
|
//新增修改后工艺信息
|
|
|
BizTechnologicalAmend amend = new BizTechnologicalAmend();
|
|
|
amend.setTenantId(lot.getTenantId());
|