Commit 9e4d35c9 authored by suichenguang's avatar suichenguang

交接单4.0

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