Commit d6b6b4fd authored by suichenguang's avatar suichenguang

交接单修改

parent 95e17839
...@@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -8,6 +8,7 @@ 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.math.BigDecimal;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
...@@ -44,44 +45,46 @@ public class ReceiptApi { ...@@ -44,44 +45,46 @@ public class ReceiptApi {
//查询特证详单所需数据 //查询特证详单所需数据
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 fileName = (String) detailedData.get("FILE_NAME"); String acceptNo2 = (String) detailedData.get("ACCEPT_NO");
String gajg_dm = (String) detailedData.get("GAJG_DM");
String cardId = (String) detailedData.get("CARD_ID");
String receiptId = (String) detailedData.get("RECIPT_ID");
String name = (String) detailedData.get("NAME"); String name = (String) detailedData.get("NAME");
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,fileName,gajg_dm,cardId,receiptId,name); System.out.println("22222222222222222222Name:"+name);
receiptService.createDetailedList(uploadNo,acceptNo2,name,id,gajg_dm,receiptId);
}else { }else {
//查询交接单所需数据 //查询交接单所需数据
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");
int count = (int) receiptListDate.get("COUNT");
int count = Integer.valueOf(receiptListDate.get("VALID_COUNT").toString()) ;
//查询这个组号是否生成了交接单 //查询这个组号是否生成了交接单
int countGroup = receiptService.selectByGroupNo(groupNo); int countGroup = receiptService.selectByGroupNo(groupNo);
if (countGroup == 0) { if (countGroup == 0) {
//生成交接单 Map<String,Object> detailedData= receiptService.selectDetailedData(id);
receiptService.createReceiptList(groupNo, GAJG_DM, count);
Map<String, Object> detailedData = receiptService.selectDetailedData(id);
String uploadNo = (String) detailedData.get("UPLOAD_NO"); String uploadNo = (String) detailedData.get("UPLOAD_NO");
String fileName = (String) detailedData.get("FILE_NAME"); String acceptNo2 = (String) detailedData.get("ACCEPT_NO");
String gajg_dm = (String) detailedData.get("GAJG_DM");
String cardId = (String) detailedData.get("CARD_ID");
String receiptId = (String) detailedData.get("RECIPT_ID");
String name = (String) detailedData.get("NAME"); String name = (String) detailedData.get("NAME");
//生成详单 String cardId = (String) detailedData.get("CARD_ID");
receiptService.createDetailedList(uploadNo, fileName, gajg_dm, cardId, receiptId, name); String gajg_dm = (String) detailedData.get("GAJG_DM");
int receiptId =Integer.parseInt((BigDecimal)detailedData.get("ID")+"");
//生成特证详单
System.out.println("22222222222222222222Name:"+name);
receiptService.createDetailedList(uploadNo,acceptNo2,name,id,gajg_dm,receiptId);
} else { } else {
//查询交接单详单数据 //查询交接单详单数据
Map<String, Object> detailedData = receiptService.selectDetailedData(id); Map<String,Object> detailedData= receiptService.selectDetailedData(id);
System.out.println(String.valueOf("0000000000000000"+detailedData));
String uploadNo = (String) detailedData.get("UPLOAD_NO"); String uploadNo = (String) detailedData.get("UPLOAD_NO");
String fileName = (String) detailedData.get("FILE_NAME"); String acceptNo2 = (String) detailedData.get("ACCEPT_NO");
String gajg_dm = (String) detailedData.get("GAJG_DM");
String cardId = (String) detailedData.get("CARD_ID");
String receiptId = (String) detailedData.get("RECIPT_ID");
String name = (String) detailedData.get("NAME"); String name = (String) detailedData.get("NAME");
//生成详单 String gajg_dm = (String) detailedData.get("GAJG_DM");
receiptService.createDetailedList(uploadNo, fileName, gajg_dm, cardId, receiptId, name); int receiptId =Integer.parseInt((BigDecimal)detailedData.get("ID")+"");
//生成特证详单
receiptService.createDetailedList(uploadNo,acceptNo2,name,id,gajg_dm,receiptId);
System.out.println(receiptId);
} }
//查询有几个 //查询有几个
int specialCardCount =receiptService.selectSpecialCard(groupNo); int specialCardCount =receiptService.selectSpecialCard(groupNo);
......
...@@ -28,18 +28,21 @@ public interface ReceiptMapper { ...@@ -28,18 +28,21 @@ public interface ReceiptMapper {
//根据身份证号查询交接单详单信息 //根据身份证号查询交接单详单信息
@Select("select prod_card_t.upload_no,prepro_person.file_id,subStr(prod_card_t.UPLOAD_NO,0,9) AS GAJG_DM,\n" + @Select("select prod_card_t.upload_no," +
"prod_card_t.id_no,receipt_list.ID,prod_card_t.name\n" + "PROD_CARD_T.ACCEPT_NO," +
"prod_card_t.name," +
"prod_card_t.id_no," +
"subStr(prod_card_t.UPLOAD_NO,0,9) AS GAJG_DM," +
"receipt_list.ID\n" +
"from prod_card_t@PROD_LINK\n" + "from prod_card_t@PROD_LINK\n" +
"left join prepro_person on prod_card_t.upload_no= prepro_person.jmsfzslh\n" +
"left join receipt_list on receipt_list.QR_CODE = subStr(prod_card_t.accept_no,0,8)\n" + "left join receipt_list on receipt_list.QR_CODE = subStr(prod_card_t.accept_no,0,8)\n" +
"where prod_card_t.id_no=#{id}") "where prod_card_t.id_no=#{id}")
public Map<String,Object>selectDetailedData(String id); public Map<String,Object>selectDetailedData(String id);
//生成交接单详单 //生成交接单详单
@Insert("INSERT INTO CARD_DETAILED_LIST (UPLOAD_NO,FILE_NAME,POLICE_CODE,CARD_ID,RECIPT_ID,NAME)" + @Insert("INSERT INTO DETAIL_RECEIPT_LIST (UPLOAD_NO,accept_no,name,card_id,SIGN_GOVT,RECEIPT_ID)" +
"VALUES(#{UPLOAD_NO},#{FILE_NAME},#{GAJG_DM},#{CARD_ID},#{RECIPT_ID},#{NAME})") "VALUES(#{UPLOAD_NO},#{ACCEPT_NO},#{NAME},#{CARD_ID},#{GAJG_DM},#{RECEIPT_ID})")
public boolean createDetailedList(@Param("UPLOAD_NO")String UPLOAD_NO,@Param("FILE_NAME")String FILE_NAME,@Param("GAJG_DM")String GAJG_DM,@Param("CARD_ID")String CARD_ID,@Param("RECIPT_ID")String RECIPT_ID,@Param("NAME")String NAME); 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);
......
...@@ -14,7 +14,7 @@ public interface ReceiptService { ...@@ -14,7 +14,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("FILE_NAME")String FILE_NAME,@Param("GAJG_DM")String GAJG_DM,@Param("CARD_ID")String CARD_ID,@Param("RECEIPT_ID")String RECIPT_ID,@Param("NAME")String NAME); 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 int selectSpecialCard(String GROUP_NO); public int selectSpecialCard(String GROUP_NO);
......
...@@ -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 FILE_NAME, String GAJG_DM, String CARD_ID, String RECIPT_ID, String NAME) { public boolean createDetailedList(String UPLOAD_NO, String ACCEPT_NO, String NAME, String CARD_ID, String GAJG_DM, int RECEIPT_ID) {
receiptMapper.createDetailedList(UPLOAD_NO,FILE_NAME,GAJG_DM,CARD_ID,RECIPT_ID,NAME); receiptMapper.createDetailedList(UPLOAD_NO,ACCEPT_NO,NAME,CARD_ID,GAJG_DM,RECEIPT_ID);
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