瀏覽代碼

Merge branch 'master' into dev-scheduling

xiahan 1 年之前
父節點
當前提交
5f80b059d9

+ 3 - 0
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/GanttServiceImpl.java

@@ -1,5 +1,6 @@
 package com.rongwei.bscommon.sys.service.impl;
 
+import cn.hutool.core.date.DateUtil;
 import com.rongwei.bscommon.sys.dao.ApsProcessOperationProcessEquDao;
 import com.rongwei.bscommon.sys.service.GanttService;
 import com.rongwei.bsentity.vo.GanttVos;
@@ -58,6 +59,7 @@ public class GanttServiceImpl implements GanttService {
      */
     @Override
     public R getListByCondition(Date searchDate, String factoryId, String workshopId) {
+        log.info("甘特图查询开始时间:"+ DateUtil.now());
         List<Date> searchDateList = getSearchDate(searchDate);
         List<String> workShopIdList = StringUtils.isNotBlank(workshopId) ? Arrays.asList(workshopId.split(",")) : new ArrayList<>();
         // 获取 工序作业信息
@@ -213,6 +215,7 @@ public class GanttServiceImpl implements GanttService {
 //            vo.setProcessworkshop(v.get(0).getProcessworkshop());
 //            resultVo.add(vo);
 //        });
+        log.info("甘特图查询结束时间:"+ DateUtil.now());
         return R.ok(resultVo);
     }
 

+ 16 - 0
cx-aps/cx-aps-entity/src/main/java/com/rongwei/bsentity/vo/ProcessGanttListVo.java

@@ -0,0 +1,16 @@
+package com.rongwei.bsentity.vo;
+
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class ProcessGanttListVo {
+
+    private Date startTime;
+
+    private String factoryId;
+
+    private String workshopId;
+
+}

+ 12 - 6
cx-aps/cx-aps-server/src/main/java/com/rongwei/bsserver/controller/GanttController.java

@@ -1,15 +1,13 @@
 package com.rongwei.bsserver.controller;
 
 import com.rongwei.bscommon.sys.service.impl.GanttServiceImpl;
+import com.rongwei.bsentity.vo.ProcessGanttListVo;
 import com.rongwei.rwcommon.base.R;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.format.annotation.DateTimeFormat;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.Date;
 
@@ -29,8 +27,6 @@ public class GanttController {
 
     /**
      * 根据条件获取甘特图相关信息
-     *
-     * @param params
      * @return
      */
     @GetMapping("/list")
@@ -40,4 +36,14 @@ public class GanttController {
         return ganttService.getListByCondition(searchDate, factoryId, workshopId);
     }
 
+    /**
+     * 根据条件获取甘特图相关信息
+     * @param processGanttListVo
+     * @return
+     */
+    @PostMapping("/processGanttList")
+    public R processGanttList(@RequestBody ProcessGanttListVo processGanttListVo) {
+        return ganttService.getListByCondition(processGanttListVo.getStartTime(), processGanttListVo.getFactoryId(), processGanttListVo.getWorkshopId());
+    }
+
 }