Commit fac08ecb authored by dahai's avatar dahai

push

parent e747d971
......@@ -8,6 +8,7 @@ import com.yxproject.start.service.FailedCardService;
import com.yxproject.start.service.TaskListService;
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.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -70,15 +71,20 @@ public class FailedCardApi {
/**
* 查询提交人上传的废证详情
* @param date 提交日期
*
* @param name 提交人姓名
* @param startDate 提交起始日期
* @param endDate 提交结束日期
* @param requ
* @return
*/
@RequestMapping("queryFailedCardInfo")
public List<Map<String,Object>> queryFailedCardInfo(@RequestParam("date") String date,@RequestParam("name") String name) {
List<Map<String,Object>> failedCardEntities = failedCardService.selectFailedCardInfo(replaceDate(date), name);
public List<Map<String, Object>> queryFailedCardInfo(@RequestParam("startDate") String startDate,@RequestParam("endDate") String endDate, @RequestParam("name") String name, HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
List<Map<String, Object>> failedCardEntities = new ArrayList <>();
failedCardEntities = failedCardService.selectFailedCardInfo(replaceDate(startDate),replaceDate(endDate), replaceNullString(name));
return failedCardEntities;
}
/**
......@@ -238,6 +244,16 @@ public class FailedCardApi {
private String formateAcceptNo(String acceptNo){
return acceptNo.replace("e", "E").replace("g", "G").replace("l","L");
}
/**
* 字符串去除空格
*
* @param str 原始字符串
* @return 返回新的字符串
*/
private String replaceNullString(String str) {
if (str == "") {
return null;
} else return str;
}
}
......@@ -368,12 +368,14 @@ public class TaskListApi {
JSONObject jsonObject = JSONObject.fromObject(o);
String acceptNo = jsonObject.getString("acceptNo");
String name = jsonObject.getString("name");
String note = jsonObject.getString("note");
//添加重做返回证任务单
TaskEntity taskEntity = new TaskEntity();
taskEntity.setCardType((long) 2);
taskEntity.setCountyCode("000000");
taskEntity.setTaskStateId((long) 0);
taskEntity.setSubmitName(name);
taskEntity.setNote(note);
taskListService.saveTask(taskEntity);
GroupNoEntity groupNoEntity = new GroupNoEntity();
groupNoEntity.setGroupNo(acceptNo);
......
......@@ -6,7 +6,7 @@ import java.util.Objects;
/**
* @auther zhangyusheng
* 2019/4/1 10:42
* 2019/6/10 11:24
*/
@Entity
@Table(name = "TASK", schema = "YINGXIN", catalog = "")
......@@ -30,10 +30,6 @@ public class TaskEntity {
private String qualityTestName;
private Time qualityTestDate;
private String exceptionInformation;
private Time outStorageDate;
private String outStorageName;
private Time inStorageDate;
private String inStorageName;
private Long taskStateId;
private Long isException;
private Long printerId;
......@@ -49,6 +45,11 @@ public class TaskEntity {
private Time connectDate;
private String connectName;
private Long workGroup;
private Time outStorageDate;
private String outStorageName;
private Time inStorageDate;
private String inStorageName;
private String note;
@Id
@Column(name = "TASK_ID")
......@@ -240,46 +241,6 @@ public class TaskEntity {
this.exceptionInformation = exceptionInformation;
}
@Basic
@Column(name = "OUT_STORAGE_DATE")
public Time getOutStorageDate() {
return outStorageDate;
}
public void setOutStorageDate(Time outStorageDate) {
this.outStorageDate = outStorageDate;
}
@Basic
@Column(name = "OUT_STORAGE_NAME")
public String getOutStorageName() {
return outStorageName;
}
public void setOutStorageName(String outStorageName) {
this.outStorageName = outStorageName;
}
@Basic
@Column(name = "IN_STORAGE_DATE")
public Time getInStorageDate() {
return inStorageDate;
}
public void setInStorageDate(Time inStorageDate) {
this.inStorageDate = inStorageDate;
}
@Basic
@Column(name = "IN_STORAGE_NAME")
public String getInStorageName() {
return inStorageName;
}
public void setInStorageName(String inStorageName) {
this.inStorageName = inStorageName;
}
@Basic
@Column(name = "TASK_STATE_ID")
public Long getTaskStateId() {
......@@ -430,6 +391,56 @@ public class TaskEntity {
this.workGroup = workGroup;
}
@Basic
@Column(name = "OUT_STORAGE_DATE")
public Time getOutStorageDate() {
return outStorageDate;
}
public void setOutStorageDate(Time outStorageDate) {
this.outStorageDate = outStorageDate;
}
@Basic
@Column(name = "OUT_STORAGE_NAME")
public String getOutStorageName() {
return outStorageName;
}
public void setOutStorageName(String outStorageName) {
this.outStorageName = outStorageName;
}
@Basic
@Column(name = "IN_STORAGE_DATE")
public Time getInStorageDate() {
return inStorageDate;
}
public void setInStorageDate(Time inStorageDate) {
this.inStorageDate = inStorageDate;
}
@Basic
@Column(name = "IN_STORAGE_NAME")
public String getInStorageName() {
return inStorageName;
}
public void setInStorageName(String inStorageName) {
this.inStorageName = inStorageName;
}
@Basic
@Column(name = "NOTE")
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
......@@ -454,10 +465,6 @@ public class TaskEntity {
Objects.equals(qualityTestName, that.qualityTestName) &&
Objects.equals(qualityTestDate, that.qualityTestDate) &&
Objects.equals(exceptionInformation, that.exceptionInformation) &&
Objects.equals(outStorageDate, that.outStorageDate) &&
Objects.equals(outStorageName, that.outStorageName) &&
Objects.equals(inStorageDate, that.inStorageDate) &&
Objects.equals(inStorageName, that.inStorageName) &&
Objects.equals(taskStateId, that.taskStateId) &&
Objects.equals(isException, that.isException) &&
Objects.equals(printerId, that.printerId) &&
......@@ -472,11 +479,16 @@ public class TaskEntity {
Objects.equals(sortingName, that.sortingName) &&
Objects.equals(connectDate, that.connectDate) &&
Objects.equals(connectName, that.connectName) &&
Objects.equals(workGroup, that.workGroup);
Objects.equals(workGroup, that.workGroup) &&
Objects.equals(outStorageDate, that.outStorageDate) &&
Objects.equals(outStorageName, that.outStorageName) &&
Objects.equals(inStorageDate, that.inStorageDate) &&
Objects.equals(inStorageName, that.inStorageName) &&
Objects.equals(note, that.note);
}
@Override
public int hashCode() {
return Objects.hash(taskId, cardType, oldCardType, countyCode, submitDate, submitName, issuedDate, issuedName, downloadDate, downloadName, printOutDate, printOutName, positionDate, positionName, outWorkshopDate, outWorkshopName, qualityTestName, qualityTestDate, exceptionInformation, outStorageDate, outStorageName, inStorageDate, inStorageName, taskStateId, isException, printerId, beginPageNumber, finishPageNumber, sortOutDate, concoraCrushDate, concoraCrushName, punchingDate, punchingName, sortingDate, sortingName, connectDate, connectName, workGroup);
return Objects.hash(taskId, cardType, oldCardType, countyCode, submitDate, submitName, issuedDate, issuedName, downloadDate, downloadName, printOutDate, printOutName, positionDate, positionName, outWorkshopDate, outWorkshopName, qualityTestName, qualityTestDate, exceptionInformation, taskStateId, isException, printerId, beginPageNumber, finishPageNumber, sortOutDate, concoraCrushDate, concoraCrushName, punchingDate, punchingName, sortingDate, sortingName, connectDate, connectName, workGroup, outStorageDate, outStorageName, inStorageDate, inStorageName, note);
}
}
......@@ -160,8 +160,9 @@ public interface FailedCardMapper {
"failed_card.WORK_GROUP,failed_card.NAME,failed_card.SUBMIT_DATE,prod_card_t.id_no,prod_card_t.name card_name\n" +
"from failed_card " +
"left join PROD_CARD_T@prodyd_link on failed_card.ACCEPT_NO = prod_card_t.ACCEPT_NO\n" +
"left join FAILED_CARD_REASON_DIC on failed_card.FAILED_CARD_REASON_ID = FAILED_CARD_REASON_DIC.FAILED_CARD_REASON_ID where failed_card.name = #{name} and to_char(submit_date,'yyyyMMdd') = #{date}")
public List<Map<String,Object>> selectFailedCardInfo(@Param("date")String date, @Param("name")String name);
"left join FAILED_CARD_REASON_DIC on failed_card.FAILED_CARD_REASON_ID = FAILED_CARD_REASON_DIC.FAILED_CARD_REASON_ID " +
"where failed_card.name = #{name} and to_char(submit_date,'yyyyMMdd') between #{startDate} and #{endDate} order by failed_card.ACCEPT_NO")
public List<Map<String,Object>> selectFailedCardInfo(@Param("startDate")String startDate, @Param("endDate")String endDate, @Param("name")String name);
/**
......
......@@ -209,10 +209,16 @@ public interface TaskListMapper {
"<if test = 'workGroup != null'> " +
",work_Group" +
" </if>" +
"<if test = 'note != null'> " +
",note" +
" </if>" +
") values(#{cardType},#{countyCode},#{submitName},#{taskStateId}" +
"<if test = 'workGroup != null'> " +
",#{workGroup}" +
" </if>" +
"<if test = 'note != null'> " +
",#{note}" +
" </if>" +
") " +
"</script>")
@Options(useGeneratedKeys=true, keyProperty="taskId", keyColumn="TASK_ID")
......
......@@ -40,7 +40,7 @@ public interface FailedCardService {
public Map<String,Object> selectDataById(String id);
public List<Map<String,Object>> selectFailedCardInfo(String date ,String name);
public List<Map<String,Object>> selectFailedCardInfo(String startDate ,String endDate ,String name);
public boolean deleteFailedCardInfo(String failedCardId);
}
......@@ -133,8 +133,8 @@ public class FailedCardServiceImpl implements FailedCardService {
}
@Override
public List<Map<String,Object>> selectFailedCardInfo(String date, String name) {
return failedCardMapper.selectFailedCardInfo(date,name);
public List<Map<String,Object>> selectFailedCardInfo(String startDate ,String endDate , String name) {
return failedCardMapper.selectFailedCardInfo(startDate,endDate,name);
}
@Override
......
......@@ -772,8 +772,10 @@ public class TaskListServiceImpl implements TaskListService {
failedCount += Integer.valueOf(datemap.get("fei") + "");
int totalCount =0;
for (String str :datemap.keySet()){
if ("date".equals(str)){ }else {
totalCount+=Integer.valueOf(datemap.get(str)+"");
}
}
datemap.put("total", totalCount);
list.add(datemap);
......
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