Commit 9e4d35c9 authored by suichenguang's avatar suichenguang

交接单4.0

parent a936a221
...@@ -42,20 +42,23 @@ public class ReceiptApi { ...@@ -42,20 +42,23 @@ public class ReceiptApi {
Map<String, Object> resultDate = receiptService.selectReceiptListDate(id); Map<String, Object> resultDate = receiptService.selectReceiptListDate(id);
String acceptNo = (String) resultDate.get("ACCEPT_NO"); String acceptNo = (String) resultDate.get("ACCEPT_NO");
String GAJG_DM = (String) resultDate.get("GAJG_DM"); String GAJG_DM = (String) resultDate.get("GAJG_DM");
String cardType = (String) resultDate.get("CARD_TYPE");
String oldCardType = (String) resultDate.get("OLD_CARD_TYPE");
int state = 0; int state = 0;
int count = (int) resultDate.get("COUNT"); int count = (int) resultDate.get("COUNT");
//生成特证交接单 //生成特证交接单
receiptService.createReceiptList(acceptNo, GAJG_DM, count, state); receiptService.createReceiptList(acceptNo, GAJG_DM, count, state,cardType,oldCardType);
//查询特证详单所需数据 //查询特证详单所需数据
Map<String, Object> detailedData = receiptService.selectDetailedData(id); Map<String, Object> detailedData = receiptService.selectDetailedData(id);
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 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") + ""); int receiptId = Integer.parseInt((BigDecimal) detailedData.get("ID") + "");
//生成特证详单 //生成特证详单
receiptService.createDetailedList(uploadNo, acceptNo2, name, id, gajg_dm, receiptId); receiptService.createDetailedList(uploadNo, acceptNo2, name, id, gajg_dm, receiptId,sex);
} else { } else {
//已经生成特证交接单,不做操作。 //已经生成特证交接单,不做操作。
} }
...@@ -64,6 +67,8 @@ public class ReceiptApi { ...@@ -64,6 +67,8 @@ public class ReceiptApi {
Map<String, Object> receiptListDate = receiptService.selectReceiptListDate(id); Map<String, Object> receiptListDate = receiptService.selectReceiptListDate(id);
String groupNo = (String) receiptListDate.get("GROUP_NO"); String groupNo = (String) receiptListDate.get("GROUP_NO");
String GAJG_DM = (String) receiptListDate.get("GAJG_DM"); String GAJG_DM = (String) receiptListDate.get("GAJG_DM");
String cardType = (String) receiptListDate.get("CARD_TYPE");
String oldCardType = (String) receiptListDate.get("OLD_CARD_TYPE");
int count = Integer.valueOf(receiptListDate.get("VALID_COUNT").toString()); int count = Integer.valueOf(receiptListDate.get("VALID_COUNT").toString());
int state = 0; int state = 0;
//查询这个组号是否生成了交接单 //查询这个组号是否生成了交接单
...@@ -71,7 +76,7 @@ public class ReceiptApi { ...@@ -71,7 +76,7 @@ public class ReceiptApi {
//没有生成交接单 //没有生成交接单
if (countGroup == 0) { if (countGroup == 0) {
//生成交接单 //生成交接单
receiptService.createReceiptList(groupNo, GAJG_DM, count, state); receiptService.createReceiptList(groupNo, GAJG_DM, count, state,cardType,oldCardType);
//查询这个身份证是否生成了详单 //查询这个身份证是否生成了详单
int receiptCount = receiptService.selectReceiptById(id); int receiptCount = receiptService.selectReceiptById(id);
//没有生成交接单详单 //没有生成交接单详单
...@@ -80,12 +85,13 @@ public class ReceiptApi { ...@@ -80,12 +85,13 @@ 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 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");
System.out.println("1111111111111111"+gajg_dm); System.out.println("1111111111111111"+gajg_dm);
int receiptId = Integer.parseInt((BigDecimal) detailedData.get("ID") + ""); int receiptId = Integer.parseInt((BigDecimal) detailedData.get("ID") + "");
//生成特证详单 //生成详单
receiptService.createDetailedList(uploadNo, acceptNo2, name, id, gajg_dm, receiptId); receiptService.createDetailedList(uploadNo, acceptNo2, name, id, gajg_dm, receiptId,sex);
} else { } else {
//不做操作 //不做操作
} }
...@@ -100,10 +106,11 @@ public class ReceiptApi { ...@@ -100,10 +106,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 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, id, gajg_dm, receiptId); receiptService.createDetailedList(uploadNo, acceptNo2, name, id, gajg_dm, receiptId,sex);
} else { } else {
//已生成详单,不做操作。 //已生成详单,不做操作。
} }
......
...@@ -10,9 +10,12 @@ import java.util.Map; ...@@ -10,9 +10,12 @@ import java.util.Map;
public interface ReceiptMapper { public interface ReceiptMapper {
//根据身份证号查询交接单信息 //根据身份证号查询交接单信息
@Select("select prod_group_t.group_no,prod_card_t.accept_no,subStr(prod_card_t.UPLOAD_NO,0,9) as GAJG_DM,prod_group_t.valid_count\n" + @Select("select prod_group_t.group_no,prod_card_t.accept_no,subStr(prod_card_t.UPLOAD_NO,0,9) as GAJG_DM,prod_group_t.valid_count," +
"task.CARD_TYPE,task.OLD_CARD_TYPE\n" +
"from prod_card_t@PROD_LINK\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 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 prod_group_t.group_no = group_no.group_no"+
"left join task on task.task_id =group_no.task_id"+
"where prod_card_t.id_no=#{id}") "where prod_card_t.id_no=#{id}")
public Map<String,Object> selectReceiptListDate(String id); public Map<String,Object> selectReceiptListDate(String id);
...@@ -21,8 +24,8 @@ public interface ReceiptMapper { ...@@ -21,8 +24,8 @@ public interface ReceiptMapper {
public int selectByGroupNo(String groupNo); public int selectByGroupNo(String groupNo);
//生成交接单 //生成交接单
@Insert("INSERT INTO RECEIPT_LIST(QR_CODE,POLICE_CODE,FINISH_COUNT,STATE)VALUES(#{GROUP_NO},#{GAJG_DM},#{count},#{state})") @Insert("INSERT INTO RECEIPT_LIST(QR_CODE,POLICE_CODE,FINISH_COUNT,STATE,CARD_TYPE_ID,OLD_CARD_TYPE_ID)VALUES(#{GROUP_NO},#{GAJG_DM},#{count},#{state},#{cardType},#{oldCardType})")
public boolean createReceiptList(@Param("GROUP_NO")String GROUP_NO,@Param("GAJG_DM")String GAJG_DM,@Param("count")int count,@Param("state")int state); public boolean createReceiptList(@Param("GROUP_NO")String GROUP_NO,@Param("GAJG_DM")String GAJG_DM,@Param("count")int count,@Param("state")int state,@Param("cardType")String cardType,@Param("oldCardType")String oldCardType);
...@@ -30,6 +33,7 @@ public interface ReceiptMapper { ...@@ -30,6 +33,7 @@ public interface ReceiptMapper {
@Select("select prod_card_t.upload_no," + @Select("select prod_card_t.upload_no," +
"PROD_CARD_T.ACCEPT_NO," + "PROD_CARD_T.ACCEPT_NO," +
"prod_card_t.name," + "prod_card_t.name," +
"prod_card_t.sex"+
"prod_card_t.id_no," + "prod_card_t.id_no," +
"subStr(prod_card_t.UPLOAD_NO,0,9) AS GAJG_DM," + "subStr(prod_card_t.UPLOAD_NO,0,9) AS GAJG_DM," +
"receipt_list.ID\n" + "receipt_list.ID\n" +
...@@ -41,7 +45,7 @@ public interface ReceiptMapper { ...@@ -41,7 +45,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); 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);
......
...@@ -10,11 +10,11 @@ public interface ReceiptService { ...@@ -10,11 +10,11 @@ public interface ReceiptService {
public Map<String,Object> selectReceiptListDate(String id); public Map<String,Object> selectReceiptListDate(String id);
public boolean createReceiptList(@Param("GROUP_NO")String GROUP_NO, @Param("GAJG_DM")String GAJG_DM, @Param("count")int count,@Param("state")int state); public boolean createReceiptList(@Param("GROUP_NO")String GROUP_NO, @Param("GAJG_DM")String GAJG_DM, @Param("count")int count,@Param("state")int state,@Param("cardType")String cardType,@Param("oldCardType")String oldCardType);
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); 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 int selectSpecialCard(String GROUP_NO); public int selectSpecialCard(String GROUP_NO);
......
...@@ -21,8 +21,8 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -21,8 +21,8 @@ public class ReceiptServiceImpl implements ReceiptService {
} }
@Override @Override
public boolean createReceiptList(String GROUP_NO, String GAJG_DM, int count,int state) { public boolean createReceiptList(String GROUP_NO, String GAJG_DM, int count,int state,String cardType,String oldCardType) {
receiptMapper.createReceiptList(GROUP_NO,GAJG_DM,count,state); receiptMapper.createReceiptList(GROUP_NO,GAJG_DM,count,state,cardType,oldCardType);
return true; return true;
} }
...@@ -33,8 +33,8 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -33,8 +33,8 @@ 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) { public boolean createDetailedList(String UPLOAD_NO, String ACCEPT_NO, String NAME, String CARD_ID, String GAJG_DM, int RECEIPT_ID,String SEX) {
receiptMapper.createDetailedList(UPLOAD_NO,ACCEPT_NO,NAME,CARD_ID,GAJG_DM,RECEIPT_ID); receiptMapper.createDetailedList(UPLOAD_NO,ACCEPT_NO,NAME,CARD_ID,GAJG_DM,RECEIPT_ID,SEX);
return true; return true;
} }
......
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