Commit 4de6149e authored by dahai's avatar dahai

修改分拣查询任务单详情

parent cf0ee72e
package com.yxproject.start.api; package com.yxproject.start.api;
import com.yxproject.start.entity.CardDetailedListEntity;
import com.yxproject.start.entity.DetailReceiptListEntity; import com.yxproject.start.entity.DetailReceiptListEntity;
import com.yxproject.start.service.CardDetailedListService; import com.yxproject.start.service.CardDetailedListService;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
......
...@@ -461,29 +461,34 @@ public interface TaskListMapper { ...@@ -461,29 +461,34 @@ public interface TaskListMapper {
* @param process 工序 * @param process 工序
* @return * @return
*/ */
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT,count(*) police_Count,police_dic.police_code ,police_dic.police_name GAJG_MC,\n" + @Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT,\n" +
"sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count," + "count(*) police_Count,police_dic.police_code ,police_dic.police_name GAJG_MC, \n" +
"sum(decode(prod_trace_t.CHECK_DATE,null,0,1)) CHECK_count,\n" + "sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,\n" +
"task.submit_date, task.task_id,CARD_TYPE_DIC.CARD_TYPE,\n" + "sum(decode(prod_trace_t.CHECK_DATE,null,0,1)) CHECK_count, task.submit_date, task.task_id,\n" +
"CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" + "CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE, COUNTY_DIC.COUNTYNAME, \n" +
"COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT,group_no.INVALID_COUNT,\n" + "group_no.VALID_COUNT,group_no.INVALID_COUNT, group_no.SPECIAL_CARD_COUNT,group_no.GROUP_NO, \n" +
"group_no.SPECIAL_CARD_COUNT,group_no.GROUP_NO, nvl(fc.faileCount,0) faileCount\n" + "fc.faileCount faileCount from group_no \n" +
"from group_no left join task on group_no.task_id= task.TASK_ID\n" + "left join task on group_no.task_id= task.TASK_ID \n" +
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = task.CARD_TYPE\n" + "left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = task.CARD_TYPE \n" +
"left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" + "left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE \n" +
"left join (select accept_no, nvl(count(*),0) faileCount from FAILED_CARD where FAILED_CARD.state <=#{process2} and FAILED_CARD.state != FAILED_CARD.INITIATOR and accept_no not in (select accept_no from special_card ) \n" + "left join (\n" +
"group by accept_no ) fc on substr(fc.accept_no,0,8) = group_no.group_no \n" + " select substr(accept_no,0,8) group_no, sum(decode(accept_no,null,0,1)) faileCount \n" +
"left join prod_trace_t@PROD_LINK on SUBSTR(prod_trace_t.ACCEPT_NO,0,8) = group_no.GROUP_NO\n" + " from FAILED_CARD \n" +
"left join prod_card_t@PROD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO\n" + " where FAILED_CARD.state <=#{process2} and FAILED_CARD.state != FAILED_CARD.INITIATOR \n" +
// "left join GAJG_DM on GAJG_DM.GAJG_DM = substr(prod_card_t.upload_no,0,9)\n" + " and accept_no not in (select accept_no from special_card ) \n" +
"left join PROD_GROUP_T@PROD_LINK on PROD_GROUP_T.group_no =group_no.GROUP_NO " + " group by substr(accept_no,0,8) ) fc \n" +
" on fc.group_no= group_no.group_no \n" +
"left join prod_trace_t@PROD_LINK on SUBSTR(prod_trace_t.ACCEPT_NO,0,8) = group_no.GROUP_NO \n" +
"left join prod_card_t@PROD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO \n" +
"left join PROD_GROUP_T@PROD_LINK on PROD_GROUP_T.group_no =group_no.GROUP_NO \n" +
"left join PROD_GROUP_RELATION_T@PROD_LINK on PROD_GROUP_T.group_no = PROD_GROUP_RELATION_T.group_no\n" + "left join PROD_GROUP_RELATION_T@PROD_LINK on PROD_GROUP_T.group_no = PROD_GROUP_RELATION_T.group_no\n" +
"left join police_dic on police_dic.police_code = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12)\n" + "left join police_dic on police_dic.police_code = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12) \n" +
" left join RECEIPT_LIST on RECEIPT_LIST.QR_CODE = group_no.GROUP_NO " + "left join RECEIPT_LIST on RECEIPT_LIST.QR_CODE = group_no.GROUP_NO \n" +
"where task.TASK_STATE_ID = #{process} \n" + "where task.TASK_STATE_ID = #{process} and prod_trace_t.ACCEPT_NO NOT IN (select SPECIAL_CARD.ACCEPT_NO from SPECIAL_CARD) \n" +
"and prod_trace_t.ACCEPT_NO NOT IN (select SPECIAL_CARD.ACCEPT_NO from SPECIAL_CARD) group by task.submit_date, task.task_id, CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID, COUNTY_DIC.COUNTY_CODE,\n" + "group by task.submit_date, task.task_id, CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID, COUNTY_DIC.COUNTY_CODE, \n" +
"COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT, group_no.INVALID_COUNT, group_no.SPECIAL_CARD_COUNT, group_no.GROUP_NO, \n" + "COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT, group_no.INVALID_COUNT, group_no.SPECIAL_CARD_COUNT, group_no.GROUP_NO, \n" +
"nvl(fc.faileCount,0),police_dic.police_code,police_dic.police_name,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) order by group_no.GROUP_NO") "nvl(fc.faileCount,0), police_dic.police_code, police_dic.police_name, nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0), fc.faileCount \n" +
"order by group_no.GROUP_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_common5(@Param("process") long process,@Param("process2") long process2); public List<Map<String,Object>> selectByCountyAtAuxiliary_common5(@Param("process") long process,@Param("process2") long process2);
......
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