Commit d4ba2574 authored by suichenguang's avatar suichenguang

废证修改

parent 257f46bb
......@@ -58,7 +58,8 @@ public class FailedCardApi {
JSONArray jsonarray = JSONArray.fromObject(jsonStr);
for (Object o:jsonarray){
JSONObject jsonObject =(JSONObject)o;
failedCardService.insertFailedCard(jsonObject.get("failedCardReasonId").toString(),jsonObject.get("acceptNo").toString(),jsonObject.get("taskId").toString(),jsonObject.get("initiator").toString(),jsonObject.get("note").toString());
Map<String,Object> idMap= failedCardService.selectCountIdByCardId(jsonObject.get("cardId").toString());
failedCardService.insertFailedCard(jsonObject.get("failedCardReasonId").toString(),idMap.get("acceptNo").toString(),idMap.get("taskId").toString(),jsonObject.get("initiator").toString(),jsonObject.get("note").toString());
}
return true;
}
......
......@@ -4,6 +4,7 @@ import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.omg.CORBA.PUBLIC_MEMBER;
import java.util.List;
import java.util.Map;
......@@ -29,9 +30,7 @@ public interface FailedCardMapper {
@Select("SELECT PROD_CARD_T.NAME,\n" +
"PROD_CARD_T.SEX_NO,\n" +
"PROD_CARD_T.ID_NO,\n" +
"GROUP_NO.TASK_ID\n" +
"FROM PROD_CARD_T@PROD_LINK\n" +
"LEFT JOIN GROUP_NO ON GROUP_NO=subStr(PROD_CARD_T.ACCEPT_NO,0,8)\n" +
"WHERE PROD_CARD_T.ID_NO=#{cardId} OR PROD_CARD_T.ACCEPT_NO=#{cardId}")
public Map<String,Object>selectInfoByCardId(@Param("cardId")String cardId);
......@@ -49,5 +48,10 @@ public interface FailedCardMapper {
public boolean insertFailedCard(@Param("failedCardReasonId")String failedCardReasonId,@Param("acceptNo")String acceptNo,@Param("taskId")String taskId,@Param("initiator")String initiator,@Param("note")String note);
@Select("SELECT PROD_CARD_T.ACCEPT_NO,GROUP_NO.TASK_ID \n" +
"FROM PROD_CARD_T@PROD_LINK\n" +
"LEFT JOIN GROUP_NO ON GROUP_NO=subStr(PROD_CARD_T.ACCEPT_NO,0,8)\n" +
"WHERE PROD_CARD_T.ID_NO=#{cardId} or PROD_CARD_T.ACCEPT_NO=#{cardId};")
public Map<String,Object> selectCountIdByCardId(String cardId);
}
package com.yxproject.start.service;
import org.apache.ibatis.annotations.Param;
import org.omg.CORBA.PUBLIC_MEMBER;
import java.util.List;
import java.util.Map;
......@@ -13,4 +14,5 @@ public interface FailedCardService {
public boolean insertFailedCard(@Param("failedCardReasonId")String failedCardReasonId,@Param("acceptNo")String acceptNo,@Param("taskId")String taskId,@Param("initiator")String initiator,@Param("note")String note);
public Map<String,Object> selectCountIdByCardId(String cardId);
}
......@@ -20,7 +20,7 @@ public class FailedCardServiceImpl implements FailedCardService {
@Override
public Map<String, Object> selectInfoByCardId(String cardId) {
Map<String,Object> result= failedCardMapper.selectInfoByCardId(cardId);
Map<String, Object> result= failedCardMapper.selectInfoByCardId(cardId);
return result;
}
......@@ -29,4 +29,10 @@ public class FailedCardServiceImpl implements FailedCardService {
failedCardMapper.insertFailedCard(failedCardReasonId,acceptNo,taskId,initiator,note);
return true;
}
@Override
public Map<String, Object> selectCountIdByCardId(String cardId) {
Map<String, Object> result= failedCardMapper.selectCountIdByCardId(cardId);
return result;
}
}
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