|
@@ -1,6 +1,7 @@
|
|
|
package com.steerinfo.dil.controller;
|
|
|
|
|
|
|
|
|
+import com.steerinfo.dil.mapper.QmsQueueResultMapper;
|
|
|
import com.steerinfo.dil.mapper.QueueInterfaceMapper;
|
|
|
import com.steerinfo.dil.model.QmsQueueResult;
|
|
|
import com.steerinfo.dil.service.impl.QmsQueueResultServiceImpl;
|
|
@@ -17,6 +18,7 @@ import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
@@ -46,6 +48,9 @@ public class QmsQueueResultController extends BaseRESTfulController {
|
|
|
@Autowired
|
|
|
QueueInterfaceServiceImpl queueInterfaceService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private QmsQueueResultMapper qmsQueueResultMapper;
|
|
|
+
|
|
|
|
|
|
private final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
@@ -127,8 +132,24 @@ public class QmsQueueResultController extends BaseRESTfulController {
|
|
|
mapValue.put("capacityNumber", capacityNumber);
|
|
|
PageHelper.startPage(pageNum,pageSize);
|
|
|
if(isSpelling == 1){
|
|
|
- //多拼
|
|
|
- return success(qmsQueueResultService.getQueueListByQueueUpSpelling(mapValue));
|
|
|
+ //原多拼
|
|
|
+ List<Map<String, Object>> queueListByQueueUpSpelling = qmsQueueResultService.getQueueListByQueueUpSpelling(mapValue);
|
|
|
+ //现多拼数据
|
|
|
+ for (Map<String, Object> stringObjectMap : queueListByQueueUpSpelling) {
|
|
|
+ BigDecimal orderId = (BigDecimal) stringObjectMap.get("orderId");
|
|
|
+ //米数
|
|
|
+ List<Map<String, Object>> materialId = qmsQueueResultMapper.getMaterialId(orderId);
|
|
|
+ for (Map<String, Object> objectMap : materialId) {
|
|
|
+ BigDecimal materialId2 = DataChange.dataToBigDecimal(stringObjectMap.get("materialId"));
|
|
|
+ BigDecimal materialId1 = (BigDecimal) objectMap.get("materialId");
|
|
|
+ if (materialId2.compareTo(materialId1)==0){
|
|
|
+ //钢材长度
|
|
|
+ BigDecimal steelmeter = (BigDecimal) objectMap.get("steelmeter");
|
|
|
+ stringObjectMap.put("steelMeter",steelmeter);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return success(queueListByQueueUpSpelling);
|
|
|
}else {
|
|
|
//单拼
|
|
|
return success(qmsQueueResultService.getQueueListByQueueUp(mapValue));
|