Commit 1538697e authored by dahai's avatar dahai

push

parent 1ef8eebc
...@@ -2,7 +2,6 @@ package com.yxproject.start.api; ...@@ -2,7 +2,6 @@ package com.yxproject.start.api;
import com.yxproject.start.entity.*; import com.yxproject.start.entity.*;
import com.yxproject.start.service.*; import com.yxproject.start.service.*;
import com.yxproject.start.service.impl.DataAuditingServiceImpl;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
import net.sf.json.JSONObject; import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -13,7 +12,6 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -13,7 +12,6 @@ import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.transaction.Transactional; import javax.transaction.Transactional;
import java.util.ArrayList;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -34,8 +32,6 @@ public class TaskListApi { ...@@ -34,8 +32,6 @@ public class TaskListApi {
@Autowired @Autowired
private PreproPersonService preproPersonService; private PreproPersonService preproPersonService;
@Autowired @Autowired
private DataAuditingServiceImpl dataAuditingService;
@Autowired
private ReceiptService receiptService; private ReceiptService receiptService;
...@@ -386,17 +382,7 @@ public class TaskListApi { ...@@ -386,17 +382,7 @@ public class TaskListApi {
return map; return map;
} }
/**
* 字符串去除空格
*
* @param str 原始字符串
* @return 返回新的字符串
*/
private String replaceNullString(String str) {
if (str == "") {
return null;
} else return str;
}
/** /**
* 查询制证类型列表 * 查询制证类型列表
...@@ -455,5 +441,15 @@ public class TaskListApi { ...@@ -455,5 +441,15 @@ public class TaskListApi {
private String replaceDate(String str) { private String replaceDate(String str) {
return str.replace("-", "").replace(" ","").replace(":",""); return str.replace("-", "").replace(" ","").replace(":","");
} }
/**
* 字符串去除空格
*
* @param str 原始字符串
* @return 返回新的字符串
*/
private String replaceNullString(String str) {
if (str == "") {
return null;
} else return str;
}
} }
...@@ -165,7 +165,7 @@ public interface MaterialManagementMapper { ...@@ -165,7 +165,7 @@ public interface MaterialManagementMapper {
public List<Map<String,Object>> selectCardBodyReportCount(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("typeCode") String typeCode, @Param("name") String name, @Param("cardBodyType") long cardBodyType); public List<Map<String,Object>> selectCardBodyReportCount(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("typeCode") String typeCode, @Param("name") String name, @Param("cardBodyType") long cardBodyType);
@Select("select sum(count1) count1 ,sum(count2) count2\n" + @Select("select nvl(sum(count1),0) count1 ,nvl(sum(count2),0) count2\n" +
"from (select name,CARD_TYPE,CARD_BODY_TYPE,to_Char(SAVE_DATE,'yyyyMMdd') save_date, decode(card_type,2,0,total_count) count1 ,decode(card_type,1,0,total_count) count2 from CARD_BODY where state =1)") "from (select name,CARD_TYPE,CARD_BODY_TYPE,to_Char(SAVE_DATE,'yyyyMMdd') save_date, decode(card_type,2,0,total_count) count1 ,decode(card_type,1,0,total_count) count2 from CARD_BODY where state =1)")
public List<Map<String,Object>> selectCardBodyReportTotalCount(); public List<Map<String,Object>> selectCardBodyReportTotalCount();
...@@ -204,7 +204,7 @@ public interface MaterialManagementMapper { ...@@ -204,7 +204,7 @@ public interface MaterialManagementMapper {
public List<Map<String,Object>> selectPlasticFilmReportCount(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("typeCode") String typeCode, @Param("name") String name); public List<Map<String,Object>> selectPlasticFilmReportCount(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("typeCode") String typeCode, @Param("name") String name);
@Select("select sum(count1) count1 ,sum(count2) count2\n" + @Select("select nvl(sum(count1),0) count1 ,nvl(sum(count2),0) count2\n" +
"from (select name,PLASTIC_FILM_TYPE,to_Char(SAVE_DATE,'yyyyMMdd') save_date, decode(PLASTIC_FILM_TYPE,2,0,total_count) count1 ,decode(PLASTIC_FILM_TYPE,1,0,total_count) count2 from PLASTIC_FILM where state =1)") "from (select name,PLASTIC_FILM_TYPE,to_Char(SAVE_DATE,'yyyyMMdd') save_date, decode(PLASTIC_FILM_TYPE,2,0,total_count) count1 ,decode(PLASTIC_FILM_TYPE,1,0,total_count) count2 from PLASTIC_FILM where state =1)")
public List<Map<String,Object>> selectPlasticFilmTotalCount(); public List<Map<String,Object>> selectPlasticFilmTotalCount();
......
...@@ -179,19 +179,21 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -179,19 +179,21 @@ public class ReceiptServiceImpl implements ReceiptService {
//更改交接单已打印状态 //更改交接单已打印状态
List<Map<String, Object>> mapList = receiptMapper.selectReceiptDate( str, typeCode); List<Map<String, Object>> mapList = receiptMapper.selectReceiptDate( str, typeCode);
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
if ("null".equals(mapList.get(0).get("RECEIPT_DATE")+"")){ if (mapList.size()>0){
map.put("date",simpleDateFormat.format(new Date())); if ("null".equals(mapList.get(0).get("RECEIPT_DATE")+"")){
}else { map.put("date",simpleDateFormat.format(new Date()));
map.put("date",mapList.get(0).get("RECEIPT_DATE")); }else {
} map.put("date",mapList.get(0).get("RECEIPT_DATE"));
int total =0; }
for (Map<String,Object> map2:mapList){ int total =0;
total+= Integer.valueOf(map2.get("FINISH_COUNT").toString()); for (Map<String,Object> map2:mapList){
} total+= Integer.valueOf(map2.get("FINISH_COUNT").toString());
}
map.put("list",mapList);
map.put("total",total); map.put("list",mapList);
boolean b = receiptMapper.updateReceiptDate( str, typeCode); map.put("total",total);
boolean b = receiptMapper.updateReceiptDate( str, typeCode);
}
return map; return map;
} }
......
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