Commit e747d971 authored by dahai's avatar dahai

push

parent 550b7310
......@@ -111,7 +111,7 @@ public class DeliveredApi {
DeliveredInfoEntity deliveredInfoEntity = new DeliveredInfoEntity();
List list2 = (List) list1.get(i);
//跳过空行和第一行
if (list2 == null || i == 0) {
if (list2 == null || i == 0||list2.size()<2) {
continue;
}
deliveredInfoEntity.setWaybillNumber((String) list2.get(0));
......
......@@ -4,14 +4,17 @@ import com.yxproject.start.entity.*;
import com.yxproject.start.service.*;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.log4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.transaction.Transactional;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
......@@ -389,16 +392,19 @@ public class TaskListApi {
/**
* 查询重做返回登记任务单
* @param date
* @param startDate 查询起始时间
* @param endDate 查询结束时间
* @param requ
* @return
*/
@RequestMapping("queryRedoTask")
public List<Map<String, Object>> queryRedoTask( @RequestParam("date")String date){
List<Map<String, Object>> maps = taskListService.selectRedoTask(replaceDate(date));
public List<Map<String, Object>> queryRedoTask( @RequestParam("startDate")String startDate,@RequestParam("endDate")String endDate, HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
List<Map<String, Object>> maps = new ArrayList<>();
maps = taskListService.selectRedoTask(replaceDate(startDate),replaceDate(endDate));
return maps;
}
/**
* 删除重做返回登记任务单
* @param taskId 任务单ID
......
......@@ -1554,12 +1554,13 @@ public interface TaskListMapper {
/**
* 查询重做返回登记证件
* @param date 查询登记时间
* @param startDate 查询登记起始时间
* @param endDate 查询登记结束时间
* @return
*/
@Select("select * from task left join group_no on task.task_id = group_no.task_id" +
" left join TASK_STATE_DIC on task.TASK_STATE_ID=TASK_STATE_DIC.TASK_STATE_ID where card_type = 2 and to_char(submit_date,'yyyyMMdd') = #{date} order by task.task_id")
public List<Map<String, Object>> selectRedoTask(@Param("date")String date);
" left join TASK_STATE_DIC on task.TASK_STATE_ID=TASK_STATE_DIC.TASK_STATE_ID where card_type = 2 and to_char(submit_date,'yyyyMMdd') between #{startDate} and #{endDate} order by task.task_id")
public List<Map<String, Object>> selectRedoTask(String startDate,String endDate);
/**
* 删除重做返回任务单
......
......@@ -106,7 +106,7 @@ public interface TaskListService {
public boolean updateFailedCardWorkGroup(List<String> list, String workGroup);
public List<Map<String,Object>> selectRedoTask(String date);
public List<Map<String,Object>> selectRedoTask(String startDate,String endDate);
public boolean deleteRedoTask(long taskId);
......
......@@ -25,8 +25,6 @@ public class DeliveredServiceImpl implements DeliveredService {
@Autowired
private DeliveredFailedInfoMapper deliveredFailedInfoMapper;
@Autowired
private DeliveredFailedReasonMapper deliveredFailedReasonMapper;
@Autowired
private DeliveredImportDicMapper deliveredImportDicMapper;
@Autowired
private DeliveredInfoMapper deliveredInfoMapper;
......
......@@ -731,55 +731,61 @@ public class TaskListServiceImpl implements TaskListService {
}
List<Map<String, Object>> list = new ArrayList<>();
int failedCount = 0;
int pu = 0;
int yi = 0;
int kuai = 0;
int jun = 0;
int you = 0;
int gangao = 0;
int tai = 0;
for (String date : dateMap.keySet()) {
Map<String, Object> datemap = new LinkedHashMap<>();
datemap.put("date", date);
datemap.put("pu", 0);
datemap.put("you", 0);
datemap.put("kuai", 0);
datemap.put("jun", 0);
datemap.put("yi", 0);
datemap.put("gangao", 0);
datemap.put("tai", 0);
datemap.put("fei", 0);
List<Map<String, Object>> dateList = (List<Map<String, Object>>) dateMap.get(date);
if (dateList != null) {
for (Map<String, Object> map : dateList) {
datemap.put("fei", (map.get("FAILED_COUNT") == null ? 0 : ((BigDecimal) map.get("FAILED_COUNT")).longValue()));
if ("0".equals(map.get("CARD_TYPE_ID") + "")) {
if ("7".equals(map.get("CARD_TYPE_ID") + "")) {
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
pu += valid_count;
datemap.put("pu", valid_count);
tai += valid_count;
datemap.put("tai", valid_count);
} else if ("1".equals(map.get("CARD_TYPE_ID") + "")) {
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
kuai += valid_count;
datemap.put("kuai", valid_count);
} else if ("6".equals(map.get("CARD_TYPE_ID") + "")) {
} else if ("5".equals(map.get("CARD_TYPE_ID") + "")) {
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
jun += valid_count;
datemap.put("jun", valid_count);
gangao += valid_count;
datemap.put("gangao", valid_count);
} else if ("9".equals(map.get("CARD_TYPE_ID") + "")) {
} else if ("8".equals(map.get("CARD_TYPE_ID") + "")) {
long valid_count = ((BigDecimal) map.get("VALID_COUNT")).longValue();
you += valid_count;
datemap.put("you", valid_count);
yi += valid_count;
datemap.put("yi", valid_count);
} else {
}
}
}
failedCount += Integer.valueOf(datemap.get("fei") + "");
int totalCount =0;
for (String str :datemap.keySet()){
totalCount+=Integer.valueOf(datemap.get(str)+"");
}
datemap.put("total", totalCount);
list.add(datemap);
}
Map<String, Object> datemap = new LinkedHashMap<>();
datemap.put("date", "合计");
datemap.put("pu", pu);
datemap.put("you", you);
datemap.put("yi", yi);
datemap.put("gangao", gangao);
datemap.put("kuai", kuai);
datemap.put("jun", jun);
datemap.put("tai", tai);
datemap.put("fei", failedCount);
datemap.put("total", yi+gangao+kuai+tai+failedCount);
list.add(datemap);
return list;
}
......@@ -1072,8 +1078,8 @@ public class TaskListServiceImpl implements TaskListService {
}
@Override
public List<Map<String, Object>> selectRedoTask(String date) {
return taskListMapper.selectRedoTask(date);
public List<Map<String, Object>> selectRedoTask(String startDate,String endDate) {
return taskListMapper.selectRedoTask(startDate, endDate);
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment