Commit 971ee28a authored by suichenguang's avatar suichenguang

搜索框修改

parent 4be9e2ac
......@@ -87,28 +87,34 @@ public class FailedCardApi {
* @param jsonStr
* @return
*/
//TODO 多张余证可以生成一张任务单 判断是否是同一个countyCode
@RequestMapping("insertRemaining")
@Transactional(rollbackFor = Exception.class)
public Boolean insertRemaining(@RequestBody String jsonStr){
JSONArray jsonarray = JSONArray.fromObject(jsonStr);
JSONObject jsonObject = JSONObject.fromObject(jsonStr);
JSONArray jsonarray = JSONArray.fromObject(jsonObject.get("list"));
System.out.println("1111111111111"+jsonarray);
TaskEntity taskEntity = new TaskEntity();
List<Object> taskEntityList = new ArrayList<>();
//TODO 多张余证可以生成一张任务单 判断是否是同一个countyCode
for (Object o:jsonarray) {
JSONObject jsonObject =(JSONObject)o;
for (int i=0;i<jsonarray.size();i++) {
/*查询生成任务单需要的数据*/
Map<String,Object> resultMap= failedCardService.selectTaskListDate(jsonObject.getString("ACCEPT_NO"));
String countyCode = resultMap.get("COUNTY_CODE").toString();
Long cardType = (Long) resultMap.get("CARD_TYPE_ID");
taskEntity.setCountyCode(countyCode);
taskEntity.setCardType(cardType);
taskEntity.setTaskStateId((long) 1);
taskEntityList.add(taskEntity);
// JSONObject jsonObject2 =(JSONObject)o;
Map<String,Object> resultMap= failedCardService.selectTaskListDate((String) jsonarray.get(i));
try {
String countyCode = resultMap.get("COUNTY_CODE").toString();
Long cardType = (Long) resultMap.get("CARD_TYPE_ID");
taskEntity.setCountyCode(countyCode);
taskEntity.setCardType(cardType);
taskEntity.setTaskStateId((long) 1);
}catch (NullPointerException e){
}
System.out.println("333333333333333333333333过");
taskListService.saveTask(taskEntity);
/*特证表添加特证*/
failedCardService.addSpecialCard(jsonObject.getString("ACCEPT_NO"));
failedCardService.addSpecialCard((String) jsonarray.get(i));
/*特证数+1*/
failedCardService.specialCardAdd(jsonObject.getString("ACCEPT_NO"));
failedCardService.specialCardAdd((String) jsonarray.get(i));
}
return true;
}
......
......@@ -12,7 +12,7 @@ import java.util.Map;
@Mapper
public interface SelectSerialNumberMapper {
@Select("select TASK.TASK_ID,COUNTY_DIC.COUNTYNAME,CARD_TYPE_DIC.CARD_TYPE,TASK.ISSUED_DATE,TASK.SUBMIT_DATE,TASK.PRINT_OUT_DATE,TASK.POSITION_DATE,TASK.SORT_OUT_DATE,TASK.QUALITY_TEST_DATE,TASK.OUT_STORAGE_DATE\n" +
@Select("select TASK.TASK_ID,COUNTY_DIC.COUNTYNAME,COUNTY_DIC.COUNTY_CODE,CARD_TYPE_DIC.CARD_TYPE,TASK.ISSUED_DATE,TASK.SUBMIT_DATE,TASK.PRINT_OUT_DATE,TASK.POSITION_DATE,TASK.SORT_OUT_DATE,TASK.QUALITY_TEST_DATE,TASK.OUT_STORAGE_DATE\n" +
" from TASK \n" +
" LEFT JOIN COUNTY_DIC ON TASK.COUNTY_CODE =COUNTY_DIC.COUNTY_CODE\n" +
" LEFT JOIN CARD_TYPE_DIC ON TASK.CARD_TYPE = CARD_TYPE_DIC.CARD_TYPE_ID\n" +
......@@ -20,7 +20,7 @@ public interface SelectSerialNumberMapper {
public List<Map<String,Object>> selectByWorkOrder(String id);
@Select("select GROUP_NO.TASK_ID,COUNTY_DIC.COUNTYNAME,CARD_TYPE_DIC.CARD_TYPE,TASK.ISSUED_DATE,TASK.SUBMIT_DATE,TASK.PRINT_OUT_DATE,TASK.POSITION_DATE,TASK.SORT_OUT_DATE,TASK.QUALITY_TEST_DATE,TASK.OUT_STORAGE_DATE\n" +
@Select("select GROUP_NO.TASK_ID,COUNTY_DIC.COUNTYNAME,COUNTY_DIC.COUNTY_CODE,CARD_TYPE_DIC.CARD_TYPE,TASK.ISSUED_DATE,TASK.SUBMIT_DATE,TASK.PRINT_OUT_DATE,TASK.POSITION_DATE,TASK.SORT_OUT_DATE,TASK.QUALITY_TEST_DATE,TASK.OUT_STORAGE_DATE\n" +
"from TASK\n" +
"LEFT JOIN COUNTY_DIC ON TASK.COUNTY_CODE =COUNTY_DIC.COUNTY_CODE\n" +
"LEFT JOIN CARD_TYPE_DIC ON TASK.CARD_TYPE = CARD_TYPE_DIC.CARD_TYPE_ID\n" +
......@@ -28,7 +28,7 @@ public interface SelectSerialNumberMapper {
"WHERE GROUP_NO =#{id}")
public List<Map<String,Object>> selectByGroupNo(String id);
@Select("select GROUP_NO.TASK_ID,COUNTY_DIC.COUNTYNAME,CARD_TYPE_DIC.CARD_TYPE,TASK.ISSUED_DATE,TASK.SUBMIT_DATE,TASK.PRINT_OUT_DATE,TASK.POSITION_DATE,TASK.SORT_OUT_DATE,TASK.QUALITY_TEST_DATE,TASK.OUT_STORAGE_DATE\n" +
@Select("select GROUP_NO.TASK_ID,COUNTY_DIC.COUNTYNAME,COUNTY_DIC.COUNTY_CODE,CARD_TYPE_DIC.CARD_TYPE,TASK.ISSUED_DATE,TASK.SUBMIT_DATE,TASK.PRINT_OUT_DATE,TASK.POSITION_DATE,TASK.SORT_OUT_DATE,TASK.QUALITY_TEST_DATE,TASK.OUT_STORAGE_DATE\n" +
"from TASK\n" +
"LEFT JOIN COUNTY_DIC ON TASK.COUNTY_CODE =COUNTY_DIC.COUNTY_CODE\n" +
"LEFT JOIN CARD_TYPE_DIC ON TASK.CARD_TYPE = CARD_TYPE_DIC.CARD_TYPE_ID\n" +
......@@ -38,7 +38,7 @@ public interface SelectSerialNumberMapper {
"WHERE PREPRO_PERSON.GMSFHM =#{id} OR PROD_CARD_T.ACCEPT_NO=#{id}")
public List<Map<String,Object>> selectByAcceptNoOrCardIdFromTaskList(String id);
@Select("SELECT ACC_CARD_T.ACCEPT_NO,COUNTY_DIC.COUNTYNAME,ACC_CARD_T.NAME,CARD_TYPE_DIC.CARD_TYPE,ACC_CARD_T.ID_NO,ACC_CARD_T.SEX_NO,\n" +
@Select("SELECT ACC_CARD_T.ACCEPT_NO,COUNTY_DIC.COUNTYNAME,COUNTY_DIC.COUNTY_CODE,ACC_CARD_T.NAME,CARD_TYPE_DIC.CARD_TYPE,ACC_CARD_T.ID_NO,ACC_CARD_T.SEX_NO,\n" +
"GAJG_DM.GAJG_MC AS GAJG1,ACC_CARD_T.BEGIN_DATE,ACC_CARD_T.EXPIRE_DATE,ACC_CARD_T.SIGN_GOVT\n" +
"FROM ACC_CARD_T@ACCU_LINK\n" +
"LEFT JOIN COUNTY_DIC ON subStr(ACC_CARD_T.UPLOAD_NO,0,6)=COUNTY_DIC.COUNTY_CODE\n" +
......@@ -56,7 +56,7 @@ public interface SelectSerialNumberMapper {
// "PROD_TRACE_T.ELECTRIC_WRITE_DATE,\n" +
// "PROD_TRACE_T.CHECK_DATE,\n" +
// "PROD_TRACE_T.MOVE_DATE\n" +
@Select("SELECT PROD_CARD_T.ACCEPT_NO,COUNTY_DIC.COUNTYNAME,PROD_CARD_T.NAME,CARD_TYPE_DIC.CARD_TYPE,PROD_CARD_T.ID_NO,PROD_CARD_T.SEX_NO,\n" +
@Select("SELECT PROD_CARD_T.ACCEPT_NO,COUNTY_DIC.COUNTYNAME,COUNTY_DIC.COUNTY_CODE,PROD_CARD_T.NAME,CARD_TYPE_DIC.CARD_TYPE,PROD_CARD_T.ID_NO,PROD_CARD_T.SEX_NO,\n" +
"GAJG_DM.GAJG_MC AS GAJG1,PROD_CARD_T.BEGIN_DATE,PROD_CARD_T.EXPIRE_DATE,PROD_CARD_T.SIGN_GOVT\n" +
"FROM PROD_CARD_T@PROD_LINK\n" +
"LEFT JOIN COUNTY_DIC ON subStr(PROD_CARD_T.UPLOAD_NO,0,6)=COUNTY_DIC.COUNTY_CODE\n" +
......
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