Commit 3b14f791 authored by dahai's avatar dahai

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

parents 40cc6835 90c70513
...@@ -39,9 +39,11 @@ public class ReceiptApi { ...@@ -39,9 +39,11 @@ 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");
int state = 0;
int count = (int) resultDate.get("COUNT"); int count = (int) resultDate.get("COUNT");
//生成特证交接单 //生成特证交接单
receiptService.createReceiptList(acceptNo, GAJG_DM, count); receiptService.createReceiptList(acceptNo, GAJG_DM, count,state);
System.out.println("6666666666666666666666666666666生成成功");
//查询特证详单所需数据 //查询特证详单所需数据
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");
...@@ -58,12 +60,15 @@ public class ReceiptApi { ...@@ -58,12 +60,15 @@ 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");
int count = Integer.valueOf(receiptListDate.get("VALID_COUNT").toString()) ; int count = Integer.valueOf(receiptListDate.get("VALID_COUNT").toString()) ;
int state = 0;
//查询这个组号是否生成了交接单 //查询这个组号是否生成了交接单
int countGroup = receiptService.selectByGroupNo(groupNo); int countGroup = receiptService.selectByGroupNo(groupNo);
if (countGroup == 0) { if (countGroup == 0) {
receiptService.createReceiptList(groupNo,GAJG_DM,count,state);
System.out.println("6666666666666666666666666666666生成成功");
Map<String,Object> detailedData= receiptService.selectDetailedData(id); Map<String,Object> detailedData= receiptService.selectDetailedData(id);
System.out.println("555555555555555555555555detailedData"+detailedData);
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");
...@@ -88,9 +93,15 @@ public class ReceiptApi { ...@@ -88,9 +93,15 @@ public class ReceiptApi {
} }
//查询有几个 //查询有几个
int specialCardCount =receiptService.selectSpecialCard(groupNo); int specialCardCount =receiptService.selectSpecialCard(groupNo);
receiptService.detailedTallyDown(specialCardCount,groupNo); int finishCount= receiptService.selectCount(groupNo) -specialCardCount;
System.out.println("77777777777777777777777777777777"+finishCount);
receiptService.updateFinishCount(groupNo,finishCount);
System.out.println("..............................................111111");
} }
System.out.println("9999999999999999999999999999999999999");
List<Map<String,Object>> resultList=receiptService.selectReceiptListOfSpecialCard(); List<Map<String,Object>> resultList=receiptService.selectReceiptListOfSpecialCard();
System.out.println("33333333333333333333resultList"+resultList);
return resultList; return resultList;
} }
......
...@@ -21,9 +21,8 @@ public interface ReceiptMapper { ...@@ -21,9 +21,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,CHECK_DATE,CHECK_NAME,STATE)" + @Insert("INSERT INTO RECEIPT_LIST(QR_CODE,POLICE_CODE,FINISH_COUNT,STATE)VALUES(#{GROUP_NO},#{GAJG_DM},#{count},#{state})")
"VALES(#{GROUP_NO},#{GAJG_DM},#{count},#{CHECK_DATE},#{CHECK_NAME},#{STATE})") 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);
...@@ -51,12 +50,12 @@ public interface ReceiptMapper { ...@@ -51,12 +50,12 @@ public interface ReceiptMapper {
public int selectSpecialCard(String GROUP_NO); public int selectSpecialCard(String GROUP_NO);
//交接单数量减count @Select("select FINISH_COUNT from RECEIPT_LIST where QR_CODE=#{GROUP_NO}")
@Update("UPDATE RECEIPT_LIST \n" + public int selectCount(String GROUP_NO);
"SET FINISH_COUNT=(\n" +
"(SELECT COUNT(*) FROM RECEIPT_LIST\n" + @Update("update RECEIPT_LIST set FINISH_COUNT=#{count} where QR_CODE=#{GROUP_NO}")
"WHERE QR_CODE=#{GROUP_NO})-#{COUNT})") public boolean updateFinishCount(String GROUP_NO,int count);
public boolean detailedTallyDown(int COUNT,String GROUP_NO);
//根据身份证号查询特证表count //根据身份证号查询特证表count
@Select("select count(*) from SPECIAL_CARD \n" + @Select("select count(*) from SPECIAL_CARD \n" +
......
...@@ -10,7 +10,7 @@ public interface ReceiptService { ...@@ -10,7 +10,7 @@ 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); public boolean createReceiptList(@Param("GROUP_NO")String GROUP_NO, @Param("GAJG_DM")String GAJG_DM, @Param("count")int count,@Param("state")int state);
public Map<String,Object>selectDetailedData(String id); public Map<String,Object>selectDetailedData(String id);
...@@ -18,8 +18,6 @@ public interface ReceiptService { ...@@ -18,8 +18,6 @@ public interface ReceiptService {
public int selectSpecialCard(String GROUP_NO); public int selectSpecialCard(String GROUP_NO);
public boolean detailedTallyDown(int COUNT,String GROUP_NO);
public int selectByGroupNo(String groupNo); public int selectByGroupNo(String groupNo);
public int selectSpecialCardByAcceptNo(String id); public int selectSpecialCardByAcceptNo(String id);
...@@ -31,4 +29,8 @@ public interface ReceiptService { ...@@ -31,4 +29,8 @@ public interface ReceiptService {
public List<Map<String,Object>> selectDetailList(String receiptId); public List<Map<String,Object>> selectDetailList(String receiptId);
public boolean updateReceiptList(int receiptId, String checkName, Date date); public boolean updateReceiptList(int receiptId, String checkName, Date date);
public int selectCount(String GROUP_NO);
public boolean updateFinishCount(String GROUP_NO,int count);
} }
...@@ -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) { public boolean createReceiptList(String GROUP_NO, String GAJG_DM, int count,int state) {
receiptMapper.createReceiptList(GROUP_NO,GAJG_DM,count); receiptMapper.createReceiptList(GROUP_NO,GAJG_DM,count,state);
return true; return true;
} }
...@@ -44,11 +44,7 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -44,11 +44,7 @@ public class ReceiptServiceImpl implements ReceiptService {
return count; return count;
} }
@Override
public boolean detailedTallyDown(int COUNT, String GROUP_NO) {
receiptMapper.detailedTallyDown(COUNT,GROUP_NO);
return true;
}
@Override @Override
public int selectByGroupNo(String groupNo) { public int selectByGroupNo(String groupNo) {
...@@ -86,5 +82,17 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -86,5 +82,17 @@ public class ReceiptServiceImpl implements ReceiptService {
return true; return true;
} }
@Override
public int selectCount(String GROUP_NO) {
int count= receiptMapper.selectCount(GROUP_NO);
return count;
}
@Override
public boolean updateFinishCount(String GROUP_NO, int count) {
receiptMapper.updateFinishCount(GROUP_NO,count);
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