Commit 4e831e0f authored by liboyang's avatar liboyang

Merge remote-tracking branch 'origin/dev' into dev

parents 7770c966 ea9bd6c2
......@@ -25,12 +25,12 @@ public interface ReceiptMapper {
public Map<String,Object> selectReceiptListDate(String id);
//根据身份证号查组号
@Select("select subStr(ACCEPT_NO,0,8) as groupNo from prod_card_t where ID_NO=#{id}")
public String selectGroupNoById(String id);
@Select("select subStr(ACCEPT_NO,0,8) as groupNo from prod_card_t@PROD_LINK where ID_NO=#{id}")
public List<Map<String,Object>> selectGroupNoById(String id);
//根据组号查询普通证交接单信息
@Select("select prod_group_t.group_no,prod_card_t.accept_no,subStr(prod_card_t.UPLOAD_NO,0,9) as GAJG_DM,\n" +
"count(prod_card_t.accept_no) valid_count,GAJG_DM.GAJG_MC, task.CARD_TYPE,task.OLD_CARD_TYPE \n" +
"count(prod_card_t.accept_no) valid_count,GAJG_DM.GAJG_MC, task.CARD_TYPE,task.OLD_CARD_TYPE,prod_card_t.id_no,prod_card_t.sex_no,prod_card_t.upload_no \n" +
"from prod_card_t@PROD_LINK \n" +
"left join prod_group_t@PROD_LINK on subStr(prod_card_t.accept_no,0,8)= prod_group_t.group_no \n" +
"left join group_no on group_no.group_no = prod_group_t.group_no \n" +
......@@ -38,8 +38,8 @@ public interface ReceiptMapper {
"left join GAJG_DM on subStr(prod_card_t.UPLOAD_NO,0,9)= GAJG_DM.GAJG_DM \n" +
"where prod_group_t.group_no=#{id} and prod_card_t.accept_no not in (select accept_no from SPECIAL_CARD ) \n" +
"group by prod_group_t.group_no, prod_card_t.accept_no, subStr(prod_card_t.UPLOAD_NO,0,9), GAJG_DM.GAJG_MC, task.CARD_TYPE, \n" +
"task.OLD_CARD_TYPE ")
public Map<String,Object> selectReceiptListDate2(String id);
"task.OLD_CARD_TYPE,prod_card_t.id_no,prod_card_t.sex_no,prod_card_t.upload_no ")
public List<Map<String,Object>> selectReceiptListDate2(String id);
......@@ -58,6 +58,7 @@ public interface ReceiptMapper {
",#{oldCardTypeId}" +
"</if> " +
") </script>")
@Options(useGeneratedKeys=true, keyProperty="id", keyColumn="ID")
public boolean createReceiptList(ReceiptListEntity receiptListEntity);
......@@ -93,7 +94,7 @@ public interface ReceiptMapper {
//生成交接单详单
@Insert("INSERT INTO DETAIL_RECEIPT_LIST (UPLOAD_NO,accept_no,name,card_id,POLICE_CODE,RECEIPT_ID)" +
"VALUES(#{UPLOAD_NO},#{ACCEPT_NO},#{NAME},#{CARD_ID},#{GAJG_DM},#{RECEIPT_ID})")
public boolean createDetailedList(@Param("UPLOAD_NO")String UPLOAD_NO,@Param("ACCEPT_NO")String ACCEPT_NO,@Param("NAME")String NAME,@Param("CARD_ID")String CARD_ID,@Param("GAJG_DM")String GAJG_DM,@Param("RECEIPT_ID")int RECEIPT_ID,@Param("SEX")String SEX);
public boolean createDetailedList(@Param("UPLOAD_NO")String UPLOAD_NO,@Param("ACCEPT_NO")String ACCEPT_NO,@Param("NAME")String NAME,@Param("CARD_ID")String CARD_ID,@Param("GAJG_DM")String GAJG_DM,@Param("RECEIPT_ID")long RECEIPT_ID,@Param("SEX")String SEX);
......@@ -161,11 +162,21 @@ public interface ReceiptMapper {
"count(prod_trace_t.download_no)as download,\n" +
"count(prod_trace_t.checker_no) as checkerCount,\n" +
"count(prod_trace_t.ELECTRIC_WRITER_NO)as electricCount\n" +
"from prod_trace_t@PROD_LINK \n" +
"WHERE subStr(ACCEPT_NO,0,8) = #{groupNo} or ACCEPT_NO=#{groupNo}")
"from prod_trace_t@PROD_LINK " +
"WHERE (subStr(ACCEPT_NO,0,8) = #{groupNo} or ACCEPT_NO=#{groupNo}) and prod_trace_t.accept_no not in (select special_card.accept_no from special_card ) ")
public Map<String,Object> selectCountTime(@Param("groupNo") String groupNo);
@Select("select \n" +
"count(prod_trace_t.download_no)as download,\n" +
"count(prod_trace_t.checker_no) as checkerCount,\n" +
"count(prod_trace_t.ELECTRIC_WRITER_NO)as electricCount\n" +
"from prod_trace_t@PROD_LINK " +
"WHERE ACCEPT_NO=#{groupNo}")
public Map<String,Object> selectCountTimeT(@Param("groupNo") String groupNo);
@Select("select \n" +
"prod_trace_t.DOWNLOAD_DATE as downloadDate,\n" +
"prod_trace_t.CHECK_DATE as checkDate,\n" +
......
......@@ -409,7 +409,7 @@ public interface TaskListMapper {
* @param process 工序
* @return
*/
@Select("select DISTINCT nvl(sum(RECEIPT_LIST.FINISH_COUNT),0) finish_COUNT,count(substr(prod_card_t.upload_no,0,9)) police_Count,substr(prod_card_t.upload_no,0,9)police_code ,GAJG_DM.GAJG_MC,\n" +
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT,count(substr(prod_card_t.upload_no,0,9)) police_Count,substr(prod_card_t.upload_no,0,9)police_code ,GAJG_DM.GAJG_MC,\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" +
"CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
......@@ -427,7 +427,7 @@ public interface TaskListMapper {
"where task.TASK_STATE_ID = #{process}\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" +
"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),substr(prod_card_t.upload_no,0,9),GAJG_DM.GAJG_MC order by group_no.GROUP_NO")
"nvl(fc.faileCount,0),substr(prod_card_t.upload_no,0,9),GAJG_DM.GAJG_MC,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) order by group_no.GROUP_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_common2(@Param("process") long process,@Param("process2") long process2);
/**
......@@ -573,7 +573,7 @@ public interface TaskListMapper {
* @param process 工序
* @return
*/
@Select("select DISTINCT nvl(sum(RECEIPT_LIST.FINISH_COUNT),0) finish_COUNT,count(substr(prod_card_t.upload_no,0,9)) police_Count,substr(prod_card_t.upload_no,0,9)police_code ,GAJG_DM.GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,task.submit_date, SPECIAL_CARD.task_id,'快证' CARD_TYPE,'1' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT,count(substr(prod_card_t.upload_no,0,9)) police_Count,substr(prod_card_t.upload_no,0,9)police_code ,GAJG_DM.GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,task.submit_date, SPECIAL_CARD.task_id,'快证' CARD_TYPE,'1' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT,\n" +
"SPECIAL_CARD.ACCEPT_NO group_No, nvl(fc.faileCount,0) faileCount\n" +
"from SPECIAL_CARD left join task on SPECIAL_CARD.task_id= task.TASK_ID\n" +
......@@ -588,7 +588,7 @@ public interface TaskListMapper {
"where SPECIAL_CARD.SPECIAL_TYPE =2 and task.TASK_STATE_ID =#{process}\n" +
"group by task.submit_date, SPECIAL_CARD.task_id, '快证', '1', COUNTY_DIC.COUNTY_CODE, \n" +
"COUNTY_DIC.COUNTYNAME, 1, 0, 0, SPECIAL_CARD.ACCEPT_NO, \n" +
"nvl(fc.faileCount,0),substr(prod_card_t.upload_no,0,9),GAJG_DM.GAJG_MC order by SPECIAL_CARD.ACCEPT_NO")
"nvl(fc.faileCount,0),substr(prod_card_t.upload_no,0,9),GAJG_DM.GAJG_MC,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_fast2(@Param("process") long process,@Param("process2") long process2);
/**
......@@ -833,7 +833,7 @@ public interface TaskListMapper {
* @param process 工序
* @return
*/
@Select("select DISTINCT nvl(sum(RECEIPT_LIST.FINISH_COUNT),0) finish_COUNT, count(substr(prod_card_t.upload_no,0,9)) police_Count,substr(prod_card_t.upload_no,0,9)police_code ,GAJG_DM.GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,task.submit_date, SPECIAL_CARD.task_id,'余证' CARD_TYPE,'99' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT, count(substr(prod_card_t.upload_no,0,9)) police_Count,substr(prod_card_t.upload_no,0,9)police_code ,GAJG_DM.GAJG_MC,sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,task.submit_date, SPECIAL_CARD.task_id,'余证' CARD_TYPE,'99' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT,\n" +
"SPECIAL_CARD.ACCEPT_NO group_No, nvl(fc.faileCount,0) faileCount\n" +
"from SPECIAL_CARD left join task on SPECIAL_CARD.task_id= task.TASK_ID\n" +
......@@ -848,7 +848,7 @@ public interface TaskListMapper {
" where SPECIAL_CARD.SPECIAL_TYPE =2 and task.TASK_STATE_ID =#{process} " +
"group by task.submit_date, SPECIAL_CARD.task_id, '余证', '99', COUNTY_DIC.COUNTY_CODE, \n" +
"COUNTY_DIC.COUNTYNAME, 1, 0, 0, SPECIAL_CARD.ACCEPT_NO, \n" +
"nvl(fc.faileCount,0),substr(prod_card_t.upload_no,0,9),GAJG_DM.GAJG_MC order by SPECIAL_CARD.ACCEPT_NO")
"nvl(fc.faileCount,0),substr(prod_card_t.upload_no,0,9),GAJG_DM.GAJG_MC,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) order by SPECIAL_CARD.ACCEPT_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_remaind2(@Param("process") long process,@Param("process2") long process2);
......
......@@ -16,7 +16,7 @@ public interface ReceiptService {
public Map<String,Object>selectDetailedData(String id);
public boolean createDetailedList(@Param("UPLOAD_NO")String UPLOAD_NO,@Param("ACCEPT_NO")String ACCEPT_NO,@Param("NAME")String NAME,@Param("CARD_ID")String CARD_ID,@Param("GAJG_DM")String GAJG_DM,@Param("RECEIPT_ID")int RECEIPT_ID,@Param("SEX")String SEX);
public boolean createDetailedList(@Param("UPLOAD_NO")String UPLOAD_NO,@Param("ACCEPT_NO")String ACCEPT_NO,@Param("NAME")String NAME,@Param("CARD_ID")String CARD_ID,@Param("GAJG_DM")String GAJG_DM,@Param("RECEIPT_ID")long RECEIPT_ID,@Param("SEX")String SEX);
public int selectSpecialCard(String GROUP_NO);
......@@ -67,8 +67,10 @@ public interface ReceiptService {
public Map<String,Object>selectDetailedData2(String id);
public Map<String,Object> selectReceiptListDate2(String id);
public List<Map<String, Object>> selectReceiptListDate2(String id);
public String selectGroupNoById(String id);
public Map<String,Object> selectCountTimeT( String groupNo);
}
......@@ -33,7 +33,7 @@ public class ReceiptServiceImpl implements ReceiptService {
}
@Override
public boolean createDetailedList(String UPLOAD_NO, String ACCEPT_NO, String NAME, String CARD_ID, String GAJG_DM, int RECEIPT_ID,String SEX) {
public boolean createDetailedList(String UPLOAD_NO, String ACCEPT_NO, String NAME, String CARD_ID, String GAJG_DM, long RECEIPT_ID,String SEX) {
receiptMapper.createDetailedList(UPLOAD_NO,ACCEPT_NO,NAME,CARD_ID,GAJG_DM,RECEIPT_ID,SEX);
return true;
}
......@@ -175,15 +175,21 @@ public class ReceiptServiceImpl implements ReceiptService {
}
@Override
public Map<String, Object> selectReceiptListDate2(String id) {
Map<String,Object> resultMap = receiptMapper.selectReceiptListDate2(id);
return resultMap;
public List<Map<String, Object>> selectReceiptListDate2(String id) {
List<Map<String, Object>> mapList = receiptMapper.selectReceiptListDate2(id);
return mapList;
}
@Override
public String selectGroupNoById(String id) {
String groupNo=receiptMapper.selectGroupNoById(id);
return groupNo;
List<Map<String, Object>> mapList = receiptMapper.selectGroupNoById(id);
return mapList.get(0).get("GROUPNO").toString();
}
@Override
public Map<String, Object> selectCountTimeT(String groupNo) {
Map<String, Object> resultMap = receiptMapper.selectCountTimeT(groupNo);
return resultMap;
}
private List<Map<String, Object>> formateMap(List<Map<String, Object>> maplist) {
......
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