Commit 039b8e11 authored by dahai's avatar dahai

修改查询提交人的废证详情

parent fc05e127
......@@ -73,8 +73,8 @@ public class FailedCardApi {
* @return
*/
@RequestMapping("queryFailedCardInfo")
public List<FailedCardEntity> queryFailedCardInfo(@RequestParam("date") String date,@RequestParam("name") String name) {
List<FailedCardEntity> failedCardEntities = failedCardService.selectFailedCardInfo(replaceDate(date), name);
public List<Map<String,Object>> queryFailedCardInfo(@RequestParam("date") String date,@RequestParam("name") String name) {
List<Map<String,Object>> failedCardEntities = failedCardService.selectFailedCardInfo(replaceDate(date), name);
return failedCardEntities;
}
......@@ -92,6 +92,8 @@ public class FailedCardApi {
JSONArray jsonarray = JSONArray.fromObject(jsonStr);
for (Object o : jsonarray) {
JSONObject jsonObject = (JSONObject) o;
String name = ((JSONObject) o).getString("name");
String result = failedCardService.selectSpecialCard(((JSONObject) o).getString("cardId"));
Map<String, Object> idMap;
//判断是否是特殊证件
......@@ -101,7 +103,7 @@ public class FailedCardApi {
idMap = failedCardService.selectCountIdByCardId(jsonObject.getString("cardId"));
}
int initiator = 5;
failedCardService.insertFailedCard(jsonObject.getString("failedCardReasonId"), idMap.get("ACCEPT_NO").toString(), idMap.get("TASK_ID").toString(), String.valueOf(initiator), jsonObject.getString("note"), idMap.get("WORK_GROUP").toString());
failedCardService.insertFailedCard(jsonObject.getString("failedCardReasonId"), idMap.get("ACCEPT_NO").toString(), idMap.get("TASK_ID").toString(), String.valueOf(initiator), jsonObject.getString("note"), idMap.get("WORK_GROUP").toString(),name);
}
return true;
}
......
......@@ -2,6 +2,7 @@ package com.yxproject.start.entity;
import javax.persistence.*;
import java.sql.Time;
import java.util.Date;
import java.util.Objects;
/**
......@@ -15,16 +16,16 @@ public class FailedCardEntity {
private Long failedCardReasonId;
private String acceptNo;
private String taskId;
private Time positionDate;
private Time finishDate;
private Time allotDate;
private Time printDate;
private Date positionDate;
private Date finishDate;
private Date allotDate;
private Date printDate;
private Long state;
private Long initiator;
private String note;
private Long workGroup;
private String name;
private Time submitDate;
private Date submitDate;
@Id
@Column(name = "FAILED_CARD_ID")
......@@ -68,41 +69,41 @@ public class FailedCardEntity {
@Basic
@Column(name = "POSITION_DATE")
public Time getPositionDate() {
public Date getPositionDate() {
return positionDate;
}
public void setPositionDate(Time positionDate) {
public void setPositionDate(Date positionDate) {
this.positionDate = positionDate;
}
@Basic
@Column(name = "FINISH_DATE")
public Time getFinishDate() {
public Date getFinishDate() {
return finishDate;
}
public void setFinishDate(Time finishDate) {
public void setFinishDate(Date finishDate) {
this.finishDate = finishDate;
}
@Basic
@Column(name = "ALLOT_DATE")
public Time getAllotDate() {
public Date getAllotDate() {
return allotDate;
}
public void setAllotDate(Time allotDate) {
public void setAllotDate(Date allotDate) {
this.allotDate = allotDate;
}
@Basic
@Column(name = "PRINT_DATE")
public Time getPrintDate() {
public Date getPrintDate() {
return printDate;
}
public void setPrintDate(Time printDate) {
public void setPrintDate(Date printDate) {
this.printDate = printDate;
}
......@@ -158,11 +159,11 @@ public class FailedCardEntity {
@Basic
@Column(name = "SUBMIT_DATE")
public Time getSubmitDate() {
public Date getSubmitDate() {
return submitDate;
}
public void setSubmitDate(Time submitDate) {
public void setSubmitDate(Date submitDate) {
this.submitDate = submitDate;
}
......
......@@ -45,8 +45,8 @@ public interface FailedCardMapper {
* @param note
* @return
*/
@Insert("INSERT INTO FAILED_CARD (FAILED_CARD_REASON_ID,ACCEPT_NO,TASK_ID,STATE,INITIATOR,NOTE,work_group) VALUES (#{failedCardReasonId},#{acceptNo},#{taskId},0,#{initiator},#{note},#{workGroup})\n")
public boolean insertFailedCard(@Param("failedCardReasonId")String failedCardReasonId,@Param("acceptNo")String acceptNo,@Param("taskId")String taskId,@Param("initiator")String initiator,@Param("note")String note,@Param("workGroup")String workGroup);
@Insert("INSERT INTO FAILED_CARD (FAILED_CARD_REASON_ID,ACCEPT_NO,TASK_ID,STATE,INITIATOR,NOTE,work_group,name) VALUES (#{failedCardReasonId},#{acceptNo},#{taskId},0,#{initiator},#{note},#{workGroup},#{name})\n")
public boolean insertFailedCard(@Param("failedCardReasonId")String failedCardReasonId,@Param("acceptNo")String acceptNo,@Param("taskId")String taskId,@Param("initiator")String initiator,@Param("note")String note,@Param("workGroup")String workGroup,@Param("name")String name);
@Select("SELECT PROD_CARD_T.ACCEPT_NO,GROUP_NO.TASK_ID ,task.work_group\n" +
......@@ -149,7 +149,12 @@ public interface FailedCardMapper {
* @param name 提交人姓名
* @return
*/
@Select("select * from failed_card where name = #{name} and to_char(submit_date,'yyyyMMdd') = #{date}")
public List<FailedCardEntity> selectFailedCardInfo(@Param("date")String date, @Param("name")String name);
@Select("select failed_card.FAILED_CARD_ID,FAILED_CARD_REASON_DIC.FAILED_CARD_REASON FAILED_CARD_REASON_ID,\n" +
"failed_card.ACCEPT_NO,failed_card.TASK_ID,failed_card.POSITION_DATE,failed_card.FINISH_DATE,\n" +
"failed_card.ALLOT_DATE,failed_card.PRINT_DATE,decode(STATE,0,'已提交',1,'打印',2,'预定位',4,'工作组',5,'分拣') STATE,failed_card.INITIATOR,failed_card.NOTE,\n" +
"failed_card.WORK_GROUP,failed_card.NAME,failed_card.SUBMIT_DATE\n" +
"from failed_card \n" +
"left join FAILED_CARD_REASON_DIC on failed_card.FAILED_CARD_REASON_ID = FAILED_CARD_REASON_DIC.FAILED_CARD_REASON_ID where name = #{name} and to_char(submit_date,'yyyyMMdd') = #{date}")
public List<Map<String,Object>> selectFailedCardInfo(@Param("date")String date, @Param("name")String name);
}
......@@ -14,7 +14,7 @@ public interface FailedCardService {
public Map<String,Object> selectInfoByCardId(String cardId);
public boolean insertFailedCard(String failedCardReasonId,String acceptNo,String taskId,String initiator,String note,String workGroup);
public boolean insertFailedCard(String failedCardReasonId,String acceptNo,String taskId,String initiator,String note,String workGroup,String name);
public Map<String,Object> selectCountIdByCardId(String cardId);
......@@ -40,7 +40,7 @@ public interface FailedCardService {
public Map<String,Object> selectDataById(String id);
public List<FailedCardEntity> selectFailedCardInfo(String date ,String name);
public List<Map<String,Object>> selectFailedCardInfo(String date ,String name);
}
......@@ -33,8 +33,8 @@ public class FailedCardServiceImpl implements FailedCardService {
}
@Override
public boolean insertFailedCard(String failedCardReasonId, String acceptNo, String taskId, String initiator, String note,String workGroup) {
failedCardMapper.insertFailedCard(failedCardReasonId,acceptNo,taskId,initiator,note,workGroup);
public boolean insertFailedCard(String failedCardReasonId, String acceptNo, String taskId, String initiator, String note,String workGroup,String name) {
failedCardMapper.insertFailedCard(failedCardReasonId,acceptNo,taskId,initiator,note,workGroup,name);
return true;
}
......@@ -133,7 +133,7 @@ public class FailedCardServiceImpl implements FailedCardService {
}
@Override
public List<FailedCardEntity> selectFailedCardInfo(String date, String name) {
public List<Map<String,Object>> selectFailedCardInfo(String date, String name) {
return failedCardMapper.selectFailedCardInfo(date,name);
}
}
......@@ -108,25 +108,26 @@
<thead>
<tr>
<th>NO.</th>
<th>受理组号</th>
<th>废证原因</th>
<th>保存时间</th>
<th>数量</th>
<th>卡基类型</th>
<th>备注</th>
<th>工作组</th>
<th>提交人</th>
<th>状态</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in failedInfo">
<td>{{item.cardBodyId}}</td>
<td>{{item.saveDate}}</td>
<td>{{item.totalCount}}</td>
<td ng-if="item.cardType==1">出库</td>
<td ng-if="item.cardType==2">入库</td>
<td>{{item.note}}</td>
<td>{{item.name}}</td>
<td ng-if="item.state==0" class="text-danger">未审核</td>
<td ng-if="item.state==1" class="text-success">已审核</td>
<td>{{item.FAILED_CARD_ID}}</td>
<th>{{item.ACCEPT_NO}}</th>
<th>{{item.FAILED_CARD_REASON_ID}}</th>
<td>{{item.SUBMIT_DATE | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td ng-if="item.WORK_GROUP == 1">A组</td>
<td ng-if="item.WORK_GROUP == 2">B组</td>
<td>{{item.NAME}}</td>
<td>{{item.STATE}}</td>
<td>{{item.NOTE}}</td>
</tr>
</tbody>
<tbody ng-if="failedInfo.length==0">
......
......@@ -85,7 +85,8 @@ angular.module('AvatarCheck.addFailed', ['ngRoute', 'AvatarCheck.http'])
json.cardId=result[i][0];
json.note=result[i][1];
json.failedCardReasonId=result[i][2];
json.initiator = $rootScope.loginData.roleList[0].process
json.initiator = $rootScope.loginData.roleList[0].process;
json.name=$rootScope.loginData.name
list.push(json)
}
}
......
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