Commit 1538697e authored by dahai's avatar dahai

push

parent 1ef8eebc
......@@ -2,7 +2,6 @@ package com.yxproject.start.api;
import com.yxproject.start.entity.*;
import com.yxproject.start.service.*;
import com.yxproject.start.service.impl.DataAuditingServiceImpl;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -13,7 +12,6 @@ import org.springframework.web.bind.annotation.RestController;
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;
......@@ -34,8 +32,6 @@ public class TaskListApi {
@Autowired
private PreproPersonService preproPersonService;
@Autowired
private DataAuditingServiceImpl dataAuditingService;
@Autowired
private ReceiptService receiptService;
......@@ -386,17 +382,7 @@ public class TaskListApi {
return map;
}
/**
* 字符串去除空格
*
* @param str 原始字符串
* @return 返回新的字符串
*/
private String replaceNullString(String str) {
if (str == "") {
return null;
} else return str;
}
/**
* 查询制证类型列表
......@@ -455,5 +441,15 @@ public class TaskListApi {
private String replaceDate(String str) {
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 {
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)")
public List<Map<String,Object>> selectCardBodyReportTotalCount();
......@@ -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);
@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)")
public List<Map<String,Object>> selectPlasticFilmTotalCount();
......
......@@ -179,6 +179,7 @@ public class ReceiptServiceImpl implements ReceiptService {
//更改交接单已打印状态
List<Map<String, Object>> mapList = receiptMapper.selectReceiptDate( str, typeCode);
Map<String,Object> map = new HashMap<>();
if (mapList.size()>0){
if ("null".equals(mapList.get(0).get("RECEIPT_DATE")+"")){
map.put("date",simpleDateFormat.format(new Date()));
}else {
......@@ -192,6 +193,7 @@ public class ReceiptServiceImpl implements ReceiptService {
map.put("list",mapList);
map.put("total",total);
boolean b = receiptMapper.updateReceiptDate( str, typeCode);
}
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