|
@@ -15,6 +15,8 @@ import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
|
import org.jeecg.modules.appInterface.service.IFbsWorkingStatisticsService;
|
|
|
+import org.jeecg.modules.fbsBasedate.entity.FbsTechnologicalProcessItem;
|
|
|
+import org.jeecg.modules.fbsBasedate.service.IFbsTechnologicalProcessItemService;
|
|
|
import org.jeecg.modules.fbsInventory.entity.FbsInventory;
|
|
|
import org.jeecg.modules.fbsInventory.service.IFbsInventoryService;
|
|
|
import org.jeecg.modules.fbsMomOrder.entity.FbsMomOrder;
|
|
@@ -72,6 +74,9 @@ public class FbsWorkshopDispatchListController {
|
|
|
@Autowired
|
|
|
IFbsWorkingStatisticsService iFbsWorkingStatisticsService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ IFbsTechnologicalProcessItemService fbsTechnologicalProcessItemService;
|
|
|
+
|
|
|
/**
|
|
|
* 分页列表查询
|
|
|
* @param fbsWorkshopDispatchList
|
|
@@ -776,6 +781,8 @@ public class FbsWorkshopDispatchListController {
|
|
|
try {
|
|
|
//派工数据及完工信息
|
|
|
List<FbsWorkshopDispatchList> fbsWorkshopDispatchListList=fbsWorkshopDispatchListService.getProductList();
|
|
|
+ //获取工艺明细
|
|
|
+ getFbsTechnologicalProcessItem(fbsWorkshopDispatchListList);
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
if(fbsWorkshopDispatchListList!=null){
|
|
|
List<String> stringList=new ArrayList<>();//存储库存产品id(code)
|
|
@@ -814,6 +821,42 @@ public class FbsWorkshopDispatchListController {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ //获取工艺明细
|
|
|
+ public void getFbsTechnologicalProcessItem(List<FbsWorkshopDispatchList> fbsWorkshopDispatchListList){
|
|
|
+ //获取工艺明细
|
|
|
+ QueryWrapper<FbsTechnologicalProcessItem> queryWrapper=new QueryWrapper<>();
|
|
|
+ queryWrapper.lambda().eq(FbsTechnologicalProcessItem::getDelFlag,"0");
|
|
|
+ queryWrapper.lambda().orderByAsc(FbsTechnologicalProcessItem::getSort);
|
|
|
+ List<FbsTechnologicalProcessItem> fbsTechnologicalProcessItemList= fbsTechnologicalProcessItemService.list(queryWrapper);
|
|
|
+ if(fbsWorkshopDispatchListList!=null&&fbsWorkshopDispatchListList.size()>0&&fbsTechnologicalProcessItemList!=null&&fbsTechnologicalProcessItemList.size()>0){
|
|
|
+ //派工
|
|
|
+ for(FbsWorkshopDispatchList fbsWorkshopDispatchList:fbsWorkshopDispatchListList){
|
|
|
+ //工艺主表id
|
|
|
+ String fbsTechnologicalProcessId=fbsWorkshopDispatchList.getFbsTechnologicalProcessId();
|
|
|
+ //工艺进度字符串
|
|
|
+ String fbsTechnologicalProcessItemName=fbsWorkshopDispatchList.getFbsTechnologicalProcessItemName();
|
|
|
+ //储存工艺明细
|
|
|
+ List<FbsTechnologicalProcessItem> fbsTechnologicalProcessItemListAdd=new ArrayList<>();
|
|
|
+ //明细
|
|
|
+ for(FbsTechnologicalProcessItem fbsTechnologicalProcessItem:fbsTechnologicalProcessItemList){
|
|
|
+ //根据派工的工艺主表id找到工艺明细
|
|
|
+ if(StringUtils.isNotBlank(fbsTechnologicalProcessId)){
|
|
|
+ if(fbsTechnologicalProcessId.equals(fbsTechnologicalProcessItem.getFbsTechnologicalProcessId())){
|
|
|
+ //拿到工艺明细名称和派工中保存的进度工艺字符模糊查询是否存在 存在则定义标识代表完成
|
|
|
+ if(fbsTechnologicalProcessItemName.indexOf(fbsTechnologicalProcessItem.getName())>=0){
|
|
|
+ fbsTechnologicalProcessItem.setIsTechnological("1");
|
|
|
+ }else{
|
|
|
+ fbsTechnologicalProcessItem.setIsTechnological("2");
|
|
|
+ }
|
|
|
+ fbsTechnologicalProcessItemListAdd.add(fbsTechnologicalProcessItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ fbsWorkshopDispatchList.setFbsTechnologicalProcessItemList(fbsTechnologicalProcessItemListAdd);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @Author chenchuang
|
|
|
* @Description //TODO 产线看板:生产计划
|
|
@@ -833,7 +876,7 @@ public class FbsWorkshopDispatchListController {
|
|
|
// queryWrapper.lambda().orderByDesc(FbsWorkshopDispatchList::getDate);
|
|
|
// List<FbsWorkshopDispatchList> fbsWorkshopDispatchListList=fbsWorkshopDispatchListService.list(queryWrapper);
|
|
|
List<FbsWorkshopDispatchList> fbsWorkshopDispatchListList=fbsWorkshopDispatchListService.getListWhereStartEnd();
|
|
|
-
|
|
|
+ getFbsTechnologicalProcessItem(fbsWorkshopDispatchListList);
|
|
|
result.setResult(fbsWorkshopDispatchListList);
|
|
|
result.success("操作成功");
|
|
|
return result;
|