Commit ea9bd6c2 authored by suichenguang's avatar suichenguang

交接单

parent 0bdda9a4
...@@ -28,8 +28,10 @@ public class ReceiptApi { ...@@ -28,8 +28,10 @@ public class ReceiptApi {
@Autowired @Autowired
private ReceiptService receiptService; private ReceiptService receiptService;
/** /**
* 生成交接单 快证保存ACCEPT_NO 普通证保存GROUP_NO * 生成交接单 快证保存ACCEPT_NO 普通证保存GROUP_NO
*
* @param id * @param id
* @return * @return
*/ */
...@@ -46,17 +48,17 @@ public class ReceiptApi { ...@@ -46,17 +48,17 @@ public class ReceiptApi {
Map<String, Object> resultDate = receiptService.selectReceiptListDate(id); Map<String, Object> resultDate = receiptService.selectReceiptListDate(id);
ReceiptListEntity receiptListEntity = new ReceiptListEntity(); ReceiptListEntity receiptListEntity = new ReceiptListEntity();
receiptListEntity.setPoliceCode(resultDate.get("GAJG_DM").toString()); receiptListEntity.setPoliceCode(resultDate.get("GAJG_DM").toString());
receiptListEntity.setCardTypeId(Long.valueOf((BigDecimal)resultDate.get("CARD_TYPE")+"")); receiptListEntity.setCardTypeId(Long.valueOf((BigDecimal) resultDate.get("CARD_TYPE") + ""));
if ("null".equals(resultDate.get("OLD_CARD_TYPE")+"")){ if ("null".equals(resultDate.get("OLD_CARD_TYPE") + "")) {
}else { } else {
receiptListEntity.setOldCardTypeId(Long.valueOf(resultDate.get("OLD_CARD_TYPE")+"")); receiptListEntity.setOldCardTypeId(Long.valueOf(resultDate.get("OLD_CARD_TYPE") + ""));
} }
receiptListEntity.setFinishCount(Long.valueOf(resultDate.get("VALID_COUNT").toString())); receiptListEntity.setFinishCount(Long.valueOf(resultDate.get("VALID_COUNT").toString()));
receiptListEntity.setQrCode(resultDate.get("ACCEPT_NO").toString()); receiptListEntity.setQrCode(resultDate.get("ACCEPT_NO").toString());
receiptListEntity.setState((long)0); receiptListEntity.setState((long) 0);
//生成特证交接单 //生成特证交接单
Boolean S= receiptService.createReceiptList(receiptListEntity); Boolean S = receiptService.createReceiptList(receiptListEntity);
//查询特证详单所需数据 //查询特证详单所需数据
Map<String, Object> detailedData = receiptService.selectDetailedData2(id); Map<String, Object> detailedData = receiptService.selectDetailedData2(id);
...@@ -66,31 +68,31 @@ public class ReceiptApi { ...@@ -66,31 +68,31 @@ public class ReceiptApi {
String sex = (String) detailedData.get("SEX"); String sex = (String) detailedData.get("SEX");
String cardId = (String) detailedData.get("CARD_ID"); String cardId = (String) detailedData.get("CARD_ID");
String gajg_dm = (String) detailedData.get("GAJG_DM"); String gajg_dm = (String) detailedData.get("GAJG_DM");
int receiptId = Integer.parseInt((BigDecimal) detailedData.get("ID") + ""); Long receiptId = receiptListEntity.getId();
//生成特证详单 //生成特证详单
receiptService.createDetailedList(uploadNo, acceptNo2, name, id, gajg_dm, receiptId,sex); receiptService.createDetailedList(uploadNo, acceptNo2, name, id, gajg_dm, receiptId, sex);
} else { } else {
//已经生成特证交接单,不做操作。 //已经生成特证交接单,不做操作。
} }
} else { } else {
//根据身份证号查组号 //根据身份证号查组号
String groupNo= receiptService.selectGroupNoById(id); String groupNo = receiptService.selectGroupNoById(id);
//查询交接单所需数据 //查询交接单所需数据
List<Map<String, Object>> receiptListDate = receiptService.selectReceiptListDate2(groupNo); List<Map<String, Object>> receiptListDate = receiptService.selectReceiptListDate2(groupNo);
for (int i = 0; i<receiptListDate.size();i++){ for (int i = 0; i < receiptListDate.size(); i++) {
ReceiptListEntity receiptListEntity = new ReceiptListEntity(); ReceiptListEntity receiptListEntity = new ReceiptListEntity();
receiptListEntity.setPoliceCode(receiptListDate.get(i).get("GAJG_DM").toString()); receiptListEntity.setPoliceCode(receiptListDate.get(i).get("GAJG_DM").toString());
receiptListEntity.setCardTypeId(Long.valueOf((BigDecimal)receiptListDate.get(i).get("CARD_TYPE")+"")); receiptListEntity.setCardTypeId(Long.valueOf((BigDecimal) receiptListDate.get(i).get("CARD_TYPE") + ""));
if ("null".equals(receiptListDate.get(i).get("OLD_CARD_TYPE")+"")){ if ("null".equals(receiptListDate.get(i).get("OLD_CARD_TYPE") + "")) {
}else { } else {
receiptListEntity.setOldCardTypeId(Long.valueOf(receiptListDate.get(i).get("OLD_CARD_TYPE")+"")); receiptListEntity.setOldCardTypeId(Long.valueOf(receiptListDate.get(i).get("OLD_CARD_TYPE") + ""));
} }
receiptListEntity.setFinishCount((long)receiptListDate.size()); receiptListEntity.setFinishCount((long) receiptListDate.size());
receiptListEntity.setQrCode(receiptListDate.get(i).get("GROUP_NO").toString()); receiptListEntity.setQrCode(receiptListDate.get(i).get("GROUP_NO").toString());
receiptListEntity.setState((long)0); receiptListEntity.setState((long) 0);
//查询这个组号是否生成了交接单 //查询这个组号是否生成了交接单
int countGroup = receiptService.selectByGroupNo(receiptListDate.get(i).get("GROUP_NO").toString()); int countGroup = receiptService.selectByGroupNo(receiptListDate.get(i).get("GROUP_NO").toString());
//没有生成交接单 //没有生成交接单
...@@ -99,7 +101,7 @@ public class ReceiptApi { ...@@ -99,7 +101,7 @@ public class ReceiptApi {
receiptService.createReceiptList(receiptListEntity); receiptService.createReceiptList(receiptListEntity);
//todo 查询交接单对应的详单 循环遍历 是否生成对应详单 生成 不做操作 没有生成 遍历插入 //todo 查询交接单对应的详单 循环遍历 是否生成对应详单 生成 不做操作 没有生成 遍历插入
for(int n =0; n< receiptListDate.size();n++){ for (int n = 0; n < receiptListDate.size(); n++) {
// receiptService. // receiptService.
//查询这个身份证是否生成了详单 //查询这个身份证是否生成了详单
int receiptCount = receiptService.selectReceiptById(receiptListDate.get(n).get("ID_NO").toString()); int receiptCount = receiptService.selectReceiptById(receiptListDate.get(n).get("ID_NO").toString());
...@@ -109,11 +111,11 @@ public class ReceiptApi { ...@@ -109,11 +111,11 @@ public class ReceiptApi {
String uploadNo = (String) detailedData.get("UPLOAD_NO"); String uploadNo = (String) detailedData.get("UPLOAD_NO");
String acceptNo2 = (String) detailedData.get("ACCEPT_NO"); String acceptNo2 = (String) detailedData.get("ACCEPT_NO");
String name = (String) detailedData.get("NAME"); String name = (String) detailedData.get("NAME");
String sex = (String) detailedData.get("SEX"); String sex = (String) detailedData.get("SEX_NO");
String gajg_dm = (String) detailedData.get("GAJG_DM"); String gajg_dm = (String) detailedData.get("GAJG_DM");
int receiptId = Integer.parseInt((BigDecimal) detailedData.get("ID") + ""); int receiptId = Integer.parseInt((BigDecimal) detailedData.get("ID") + "");
//生成详单 //生成详单
receiptService.createDetailedList(uploadNo, acceptNo2, name, receiptListDate.get(i).get("GROUP_NO").toString(), gajg_dm, receiptId,sex); receiptService.createDetailedList(uploadNo, acceptNo2, name, receiptListDate.get(n).get("ID_NO").toString(), gajg_dm, receiptId, sex);
} else { } else {
//不做操作 //不做操作
} }
...@@ -123,31 +125,15 @@ public class ReceiptApi { ...@@ -123,31 +125,15 @@ public class ReceiptApi {
} else { } else {
//已生成交接单 //已生成交接单
//查询这个身份证是否生成了详单
int receiptCount = receiptService.selectReceiptById(id);
//未生成交接单详单
if (receiptCount == 0) {
//查询交接单详单数据
Map<String, Object> detailedData = receiptService.selectDetailedData(id);
String uploadNo = (String) detailedData.get("UPLOAD_NO");
String acceptNo2 = (String) detailedData.get("ACCEPT_NO");
String name = (String) detailedData.get("NAME");
String sex = (String) detailedData.get("SEX");
String gajg_dm = (String) detailedData.get("GAJG_DM");
int receiptId = Integer.parseInt((BigDecimal) detailedData.get("ID") + "");
//生成详单
receiptService.createDetailedList(uploadNo, acceptNo2, name, id, gajg_dm, receiptId,sex);
} else {
//已生成详单,不做操作。
}
}
//查询有几个特证
int specialCardCount = receiptService.selectSpecialCard(receiptListDate.get(i).get("GROUP_NO").toString());
//减去特证个数
int finishCount = receiptService.selectCount(receiptListDate.get(i).get("GROUP_NO").toString()) - specialCardCount;
receiptService.updateFinishCount(receiptListDate.get(i).get("GROUP_NO").toString(), finishCount);
}
// //查询有几个特证
// int specialCardCount = receiptService.selectSpecialCard(receiptListDate.get(i).get("GROUP_NO").toString());
// //减去特证个数
// int finishCount = receiptService.selectCount(receiptListDate.get(i).get("GROUP_NO").toString()) - specialCardCount;
// receiptService.updateFinishCount(receiptListDate.get(i).get("GROUP_NO").toString(), finishCount);
} }
} }
...@@ -157,23 +143,30 @@ public class ReceiptApi { ...@@ -157,23 +143,30 @@ public class ReceiptApi {
} }
/** /**
* 查询交接单数据 * 查询交接单数据
*
* @return * @return
*/ */
@RequestMapping("selectRecriptData") @RequestMapping("selectRecriptData")
public List<Map<String,Object>> selectRecriptData(){ public List<Map<String, Object>> selectRecriptData() {
//返回交接单数据 //返回交接单数据
List<Map<String,Object>> resultMap=receiptService.selectReceiptListOfSpecialCard(); List<Map<String, Object>> resultMap = receiptService.selectReceiptListOfSpecialCard();
for (int i=0;i<resultMap.size();i++){ for (int i = 0; i < resultMap.size(); i++) {
String groupNo= (String) resultMap.get(i).get("QR_CODE"); String groupNo = (String) resultMap.get(i).get("QR_CODE");
Map<String,Object> map= receiptService.selectCountTime(groupNo); if (groupNo.length()==10){
resultMap.get(i).put("download",map.get("DOWNLOAD")); Map<String, Object> map = receiptService.selectCountTimeT(groupNo);
resultMap.get(i).put("checkerCount",map.get("CHECKERCOUNT")); resultMap.get(i).put("download", map.get("DOWNLOAD"));
resultMap.get(i).put("electricCount",map.get("ELECTRICCOUNT")); resultMap.get(i).put("checkerCount", map.get("CHECKERCOUNT"));
resultMap.get(i).put("electricCount", map.get("ELECTRICCOUNT"));
}else {
Map<String, Object> map = receiptService.selectCountTime(groupNo);
resultMap.get(i).put("download", map.get("DOWNLOAD"));
resultMap.get(i).put("checkerCount", map.get("CHECKERCOUNT"));
resultMap.get(i).put("electricCount", map.get("ELECTRICCOUNT"));
}
} }
return resultMap; return resultMap;
} }
...@@ -181,19 +174,20 @@ public class ReceiptApi { ...@@ -181,19 +174,20 @@ public class ReceiptApi {
/** /**
* 根据任务单查询详细信息 * 根据任务单查询详细信息
*
* @param receiptId * @param receiptId
* @return * @return
*/ */
@RequestMapping("selectDetailList") @RequestMapping("selectDetailList")
public List<Map<String,Object>> selectDetailList(@RequestParam("receiptId") String receiptId){ public List<Map<String, Object>> selectDetailList(@RequestParam("receiptId") String receiptId) {
List<Map<String, Object>> resultList = receiptService.selectDetailList(receiptId); List<Map<String, Object>> resultList = receiptService.selectDetailList(receiptId);
for (int i=0;i<resultList.size();i++){ for (int i = 0; i < resultList.size(); i++) {
String acceptNo= (String) resultList.get(i).get("ACCEPT_NO"); String acceptNo = (String) resultList.get(i).get("ACCEPT_NO");
Map<String,Object> map= receiptService.selectTimes(acceptNo); Map<String, Object> map = receiptService.selectTimes(acceptNo);
resultList.get(i).put("downloadDate",map.get("DOWNLOADDATE")); resultList.get(i).put("downloadDate", map.get("DOWNLOADDATE"));
resultList.get(i).put("checkDate",map.get("CHECKDATE")); resultList.get(i).put("checkDate", map.get("CHECKDATE"));
resultList.get(i).put("electricDate",map.get("ELECTRICDATE")); resultList.get(i).put("electricDate", map.get("ELECTRICDATE"));
} }
return resultList; return resultList;
...@@ -201,12 +195,13 @@ public class ReceiptApi { ...@@ -201,12 +195,13 @@ public class ReceiptApi {
/** /**
* 数据核验--更改交接单状态 * 数据核验--更改交接单状态
*
* @param receiptId * @param receiptId
* @param checkName * @param checkName
* @return * @return
*/ */
@RequestMapping("updateReceiptList") @RequestMapping("updateReceiptList")
public boolean updateReceiptList(@RequestParam("receiptId")String receiptId,@RequestParam("checkName") String checkName){ public boolean updateReceiptList(@RequestParam("receiptId") String receiptId, @RequestParam("checkName") String checkName) {
SimpleDateFormat dt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式 SimpleDateFormat dt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
try { try {
Date date = dt.parse(dt.format(new Date())); Date date = dt.parse(dt.format(new Date()));
...@@ -220,15 +215,16 @@ public class ReceiptApi { ...@@ -220,15 +215,16 @@ public class ReceiptApi {
/** /**
* 根据受理号查询详单信息 * 根据受理号查询详单信息
*
* @param jsonStr * @param jsonStr
* @return * @return
*/ */
@RequestMapping("selectDetailByAcceptNo") @RequestMapping("selectDetailByAcceptNo")
public List<DetailReceiptListEntity> selectDetailByAcceptNo(@RequestBody String jsonStr){ public List<DetailReceiptListEntity> selectDetailByAcceptNo(@RequestBody String jsonStr) {
JSONArray jsonarray = JSONArray.fromObject(jsonStr); JSONArray jsonarray = JSONArray.fromObject(jsonStr);
List<DetailReceiptListEntity> resultList = new ArrayList<>(); List<DetailReceiptListEntity> resultList = new ArrayList<>();
for (int i=0;i<jsonarray.size();i++){ for (int i = 0; i < jsonarray.size(); i++) {
DetailReceiptListEntity detailReceiptListEntity= receiptService.selectDetailByAcceptNo((String) jsonarray.get(i)); DetailReceiptListEntity detailReceiptListEntity = receiptService.selectDetailByAcceptNo((String) jsonarray.get(i));
resultList.add(detailReceiptListEntity); resultList.add(detailReceiptListEntity);
} }
...@@ -237,16 +233,17 @@ public class ReceiptApi { ...@@ -237,16 +233,17 @@ public class ReceiptApi {
/** /**
* 更改备注信息 * 更改备注信息
*
* @param jsonStr * @param jsonStr
* @return * @return
*/ */
@RequestMapping("updateDetailNote") @RequestMapping("updateDetailNote")
public boolean updateDetailNote(@RequestBody String jsonStr){ public boolean updateDetailNote(@RequestBody String jsonStr) {
JSONArray jsonArray = JSONArray.fromObject(jsonStr); JSONArray jsonArray = JSONArray.fromObject(jsonStr);
for (int i=0;i<jsonArray.size();i++){ for (int i = 0; i < jsonArray.size(); i++) {
Map<String,Object> resultMap= (Map<String, Object>) jsonArray.get(i); Map<String, Object> resultMap = (Map<String, Object>) jsonArray.get(i);
receiptService.updateDetail(resultMap.get("acceptNo").toString(),resultMap.get("note").toString()); receiptService.updateDetail(resultMap.get("acceptNo").toString(), resultMap.get("note").toString());
} }
return true; return true;
} }
...@@ -254,11 +251,12 @@ public class ReceiptApi { ...@@ -254,11 +251,12 @@ public class ReceiptApi {
/** /**
* 生成交接单 * 生成交接单
*
* @param receiptId * @param receiptId
* @return * @return
*/ */
@RequestMapping("updateReceiptDateByReceiptId") @RequestMapping("updateReceiptDateByReceiptId")
public boolean updateReceiptDateByReceiptId(@RequestParam("receiptId")String receiptId){ public boolean updateReceiptDateByReceiptId(@RequestParam("receiptId") String receiptId) {
try { try {
receiptService.updateReceiptDateByReceiptId(receiptId); receiptService.updateReceiptDateByReceiptId(receiptId);
} catch (Exception e) { } catch (Exception e) {
...@@ -269,11 +267,12 @@ public class ReceiptApi { ...@@ -269,11 +267,12 @@ public class ReceiptApi {
/** /**
* 查询交接单 * 查询交接单
*
* @param date 复核时间 * @param date 复核时间
* @return * @return
*/ */
@RequestMapping("queryReceiptDateByCheckDate") @RequestMapping("queryReceiptDateByCheckDate")
public List<Map<String,Object>> queryReceiptDateByCheckDate(@RequestParam("date")String date){ public List<Map<String, Object>> queryReceiptDateByCheckDate(@RequestParam("date") String date) {
return receiptService.selectReceiptDateByCheckDate(replaceDate(date)); return receiptService.selectReceiptDateByCheckDate(replaceDate(date));
} }
...@@ -288,7 +287,4 @@ public class ReceiptApi { ...@@ -288,7 +287,4 @@ public class ReceiptApi {
} }
} }
...@@ -36,7 +36,7 @@ public interface ReceiptMapper { ...@@ -36,7 +36,7 @@ public interface ReceiptMapper {
"left join group_no on group_no.group_no = prod_group_t.group_no \n" + "left join group_no on group_no.group_no = prod_group_t.group_no \n" +
"left join task on task.task_id =group_no.task_id \n" + "left join task on task.task_id =group_no.task_id \n" +
"left join GAJG_DM on subStr(prod_card_t.UPLOAD_NO,0,9)= GAJG_DM.GAJG_DM \n" + "left join GAJG_DM on subStr(prod_card_t.UPLOAD_NO,0,9)= GAJG_DM.GAJG_DM \n" +
"where prod_group_t.group_n o=#{id} and prod_card_t.accept_no not in (select accept_no from SPECIAL_CARD ) \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" + "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,prod_card_t.id_no,prod_card_t.sex_no,prod_card_t.upload_no ") "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); public List<Map<String,Object>> selectReceiptListDate2(String id);
...@@ -58,6 +58,7 @@ public interface ReceiptMapper { ...@@ -58,6 +58,7 @@ public interface ReceiptMapper {
",#{oldCardTypeId}" + ",#{oldCardTypeId}" +
"</if> " + "</if> " +
") </script>") ") </script>")
@Options(useGeneratedKeys=true, keyProperty="id", keyColumn="ID")
public boolean createReceiptList(ReceiptListEntity receiptListEntity); public boolean createReceiptList(ReceiptListEntity receiptListEntity);
...@@ -93,7 +94,7 @@ public interface ReceiptMapper { ...@@ -93,7 +94,7 @@ public interface ReceiptMapper {
//生成交接单详单 //生成交接单详单
@Insert("INSERT INTO DETAIL_RECEIPT_LIST (UPLOAD_NO,accept_no,name,card_id,POLICE_CODE,RECEIPT_ID)" + @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})") "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 { ...@@ -161,11 +162,21 @@ public interface ReceiptMapper {
"count(prod_trace_t.download_no)as download,\n" + "count(prod_trace_t.download_no)as download,\n" +
"count(prod_trace_t.checker_no) as checkerCount,\n" + "count(prod_trace_t.checker_no) as checkerCount,\n" +
"count(prod_trace_t.ELECTRIC_WRITER_NO)as electricCount\n" + "count(prod_trace_t.ELECTRIC_WRITER_NO)as electricCount\n" +
"from prod_trace_t@PROD_LINK \n" + "from prod_trace_t@PROD_LINK " +
"WHERE subStr(ACCEPT_NO,0,8) = #{groupNo} or ACCEPT_NO=#{groupNo}") "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); 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" + @Select("select \n" +
"prod_trace_t.DOWNLOAD_DATE as downloadDate,\n" + "prod_trace_t.DOWNLOAD_DATE as downloadDate,\n" +
"prod_trace_t.CHECK_DATE as checkDate,\n" + "prod_trace_t.CHECK_DATE as checkDate,\n" +
......
...@@ -409,7 +409,7 @@ public interface TaskListMapper { ...@@ -409,7 +409,7 @@ public interface TaskListMapper {
* @param process 工序 * @param process 工序
* @return * @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" + "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" + "task.submit_date, task.task_id,CARD_TYPE_DIC.CARD_TYPE,\n" +
"CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" + "CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
...@@ -427,7 +427,7 @@ public interface TaskListMapper { ...@@ -427,7 +427,7 @@ public interface TaskListMapper {
"where task.TASK_STATE_ID = #{process}\n" + "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" + "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" + "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); public List<Map<String,Object>> selectByCountyAtAuxiliary_common2(@Param("process") long process,@Param("process2") long process2);
/** /**
...@@ -573,7 +573,7 @@ public interface TaskListMapper { ...@@ -573,7 +573,7 @@ public interface TaskListMapper {
* @param process 工序 * @param process 工序
* @return * @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" + "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" + "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" + "from SPECIAL_CARD left join task on SPECIAL_CARD.task_id= task.TASK_ID\n" +
...@@ -588,7 +588,7 @@ public interface TaskListMapper { ...@@ -588,7 +588,7 @@ public interface TaskListMapper {
"where SPECIAL_CARD.SPECIAL_TYPE =2 and task.TASK_STATE_ID =#{process}\n" + "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" + "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" + "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); public List<Map<String,Object>> selectByCountyAtAuxiliary_fast2(@Param("process") long process,@Param("process2") long process2);
/** /**
...@@ -833,7 +833,7 @@ public interface TaskListMapper { ...@@ -833,7 +833,7 @@ public interface TaskListMapper {
* @param process 工序 * @param process 工序
* @return * @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" + "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" + "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" + "from SPECIAL_CARD left join task on SPECIAL_CARD.task_id= task.TASK_ID\n" +
...@@ -848,7 +848,7 @@ public interface TaskListMapper { ...@@ -848,7 +848,7 @@ public interface TaskListMapper {
" where SPECIAL_CARD.SPECIAL_TYPE =2 and task.TASK_STATE_ID =#{process} " + " 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" + "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" + "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); public List<Map<String,Object>> selectByCountyAtAuxiliary_remaind2(@Param("process") long process,@Param("process2") long process2);
......
...@@ -16,7 +16,7 @@ public interface ReceiptService { ...@@ -16,7 +16,7 @@ public interface ReceiptService {
public Map<String,Object>selectDetailedData(String id); 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); public int selectSpecialCard(String GROUP_NO);
...@@ -71,4 +71,6 @@ public interface ReceiptService { ...@@ -71,4 +71,6 @@ public interface ReceiptService {
public String selectGroupNoById(String id); public String selectGroupNoById(String id);
public Map<String,Object> selectCountTimeT( String groupNo);
} }
...@@ -33,7 +33,7 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -33,7 +33,7 @@ public class ReceiptServiceImpl implements ReceiptService {
} }
@Override @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); receiptMapper.createDetailedList(UPLOAD_NO,ACCEPT_NO,NAME,CARD_ID,GAJG_DM,RECEIPT_ID,SEX);
return true; return true;
} }
...@@ -186,6 +186,12 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -186,6 +186,12 @@ public class ReceiptServiceImpl implements ReceiptService {
return mapList.get(0).get("GROUPNO").toString(); 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) { private List<Map<String, Object>> formateMap(List<Map<String, Object>> maplist) {
Map<String, Object> typeMap = new LinkedHashMap<>(); Map<String, Object> typeMap = new LinkedHashMap<>();
for (Map o : maplist) { for (Map o : 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