|
|
@@ -34,6 +34,7 @@ import com.github.zuihou.business.productionResourceCenter.dao.Productionresourc
|
|
|
import com.github.zuihou.business.productionResourceCenter.dao.ZZoneMapper;
|
|
|
import com.github.zuihou.business.productionResourceCenter.entity.*;
|
|
|
import com.github.zuihou.business.productionResourceCenter.service.RepairService;
|
|
|
+import com.github.zuihou.business.util.CommonUtil;
|
|
|
import com.github.zuihou.business.util.MsgUtil;
|
|
|
import com.github.zuihou.common.constant.BizConstant;
|
|
|
import com.github.zuihou.common.constant.CacheKey;
|
|
|
@@ -651,6 +652,7 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
|
|
|
getQueryMap(map);
|
|
|
String planId = map.get("planId")==null?"":map.get("planId").toString();
|
|
|
String planIds = map.get("planIds")==null?"":map.get("planIds").toString();
|
|
|
+
|
|
|
LbqWrapper<TTask> wrapper = new LbqWrapper<TTask>().eq(TTask::getTaskBatchNo,taskBatchNo).eq(TTask::getDraftFlag,draftFlag).eq(TTask::getPlanId,planId);
|
|
|
if(StringUtil.isNotEmpty(planIds)){
|
|
|
wrapper.in(TTask::getPlanId,planIds);
|
|
|
@@ -721,6 +723,8 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
|
|
|
String planId = map.get("planId")==null?"":map.get("planId").toString();
|
|
|
String planIds = map.get("planIds")==null?"":map.get("planIds").toString();
|
|
|
String pArr[] = map.get("planIds")==null?null:planIds.split(",");
|
|
|
+// String startDate = map.get("startDate")==null?"":map.get("startDate").toString();
|
|
|
+// String endDate = map.get("endDate")==null?"":map.get("endDate").toString();
|
|
|
|
|
|
String mulPlanStatus = map.get("mulPlanStatus")==null?"":map.get("mulPlanStatus").toString();
|
|
|
//从排产调度来的,是通过查询计划
|
|
|
@@ -747,7 +751,7 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
|
|
|
// String queryDate = StringUtil.changeIdsListToSubQueryStr(dateStrList);
|
|
|
// String dateSql = "select * from c_common_date_info where left(date, 10) in ("+queryDate+") ";
|
|
|
// List<Map<String,Object>> dateList = scheduleUserDateMapper.selectSql(dateSql);
|
|
|
- List <Map<String,Object>>titleList = getHourTtileList();
|
|
|
+ List <Map<String,Object>>titleList = getHourTtileList(null);
|
|
|
|
|
|
|
|
|
List<Map>returnList = new ArrayList<Map>();
|
|
|
@@ -764,6 +768,7 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
|
|
|
queryMap.put("draftFlag",draftFlag);
|
|
|
queryMap.put("planId",planId);
|
|
|
queryMap.put("planIds",planIds);
|
|
|
+ queryMap.put("orgIds", CommonUtil.getOrgIdsStr());
|
|
|
List<Map> dataList = baseMapper.getTaskList(queryMap);
|
|
|
Map<String,List<Map>>m = dataList.stream().filter(t->t.get("resourceCode")!=null).collect(Collectors.groupingBy(t->t.get("resourceCode").toString()));
|
|
|
//根据设备编码找到名称
|
|
|
@@ -828,9 +833,10 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
|
|
|
}
|
|
|
|
|
|
|
|
|
- static List<Map<String,Object>>getHourTtileList(){
|
|
|
+ static List<Map<String,Object>>getHourTtileList(Date date){
|
|
|
List<Map<String,Object>>l = new ArrayList<Map<String,Object>>();
|
|
|
boolean b =true;
|
|
|
+ String dateStr = DateUtil.dateToString(date==null? new Date() : date);
|
|
|
for(int j = 0;j<=47;j++){
|
|
|
String t = j/2+"";
|
|
|
if(b){
|
|
|
@@ -840,19 +846,14 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
|
|
|
}
|
|
|
b = !b;
|
|
|
Map fieldMap = new HashMap();
|
|
|
- fieldMap.put("field",t);
|
|
|
- fieldMap.put("text", t);
|
|
|
+ fieldMap.put("field", t);
|
|
|
+ fieldMap.put("text", dateStr+" "+t);
|
|
|
fieldMap.put("id",t);
|
|
|
l.add(fieldMap);
|
|
|
}
|
|
|
return l;
|
|
|
}
|
|
|
|
|
|
- public static void main(String args[]){
|
|
|
- List list = getHourTtileList();
|
|
|
- System.err.println();
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 算法分配准备,准备好数据,准备调用
|
|
|
* @param task
|
|
|
@@ -923,7 +924,9 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
|
|
|
|
|
|
@Override
|
|
|
public Map<String,Integer> getTaskCount(){
|
|
|
- Map<String,String> map = baseMapper.getTaskDdCount();
|
|
|
+ Map paramsMap = Maps.newHashMap();
|
|
|
+ paramsMap.put("orgIds", CommonUtil.getOrgIdsStr());
|
|
|
+ Map<String,String> map = baseMapper.getTaskDdCount(paramsMap);
|
|
|
Map<String,Integer> entryMap = Maps.newHashMap();
|
|
|
for(Map.Entry<String,String> entry: map.entrySet()){
|
|
|
Object object = entry.getValue();
|