Commit d5101242 authored by suichenguang's avatar suichenguang

添加物料出入库统计

parent dafd4e3e
...@@ -70,7 +70,7 @@ public class ReceiptApi { ...@@ -70,7 +70,7 @@ public class ReceiptApi {
String gajg_dm = (String) detailedData.get("GAJG_DM"); String gajg_dm = (String) detailedData.get("GAJG_DM");
Long receiptId = receiptListEntity.getId(); Long receiptId = receiptListEntity.getId();
//生成特证详单 //生成特证详单
receiptService.createDetailedList(uploadNo, acceptNo2, name, id, gajg_dm, receiptId, sex,signGovt); receiptService.createDetailedList(uploadNo, acceptNo2, name, id, gajg_dm, receiptId, sex, signGovt);
} else { } else {
//已经生成特证交接单,不做操作。 //已经生成特证交接单,不做操作。
} }
...@@ -117,30 +117,21 @@ public class ReceiptApi { ...@@ -117,30 +117,21 @@ public class ReceiptApi {
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(n).get("ID_NO").toString(), gajg_dm, receiptId, sex,signGovt); receiptService.createDetailedList(uploadNo, acceptNo2, name, receiptListDate.get(n).get("ID_NO").toString(), gajg_dm, receiptId, sex, signGovt);
} else { } else {
//不做操作 //不做操作
} }
} }
} else { } else {
//已生成交接单 //已生成交接单
} }
// //查询有几个特证 // //查询有几个特证
// int specialCardCount = receiptService.selectSpecialCard(receiptListDate.get(i).get("GROUP_NO").toString()); // int specialCardCount = receiptService.selectSpecialCard(receiptListDate.get(i).get("GROUP_NO").toString());
// //减去特证个数 // //减去特证个数
// int finishCount = receiptService.selectCount(receiptListDate.get(i).get("GROUP_NO").toString()) - specialCardCount; // int finishCount = receiptService.selectCount(receiptListDate.get(i).get("GROUP_NO").toString()) - specialCardCount;
// receiptService.updateFinishCount(receiptListDate.get(i).get("GROUP_NO").toString(), finishCount); // receiptService.updateFinishCount(receiptListDate.get(i).get("GROUP_NO").toString(), finishCount);
} }
} }
return true; return true;
} }
...@@ -156,19 +147,18 @@ public class ReceiptApi { ...@@ -156,19 +147,18 @@ public class ReceiptApi {
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");
if (groupNo.length()==10){ //判断是否是特证
if (groupNo.length() == 10) {
Map<String, Object> map = receiptService.selectCountTimeT(groupNo); Map<String, Object> map = receiptService.selectCountTimeT(groupNo);
resultMap.get(i).put("download", map.get("DOWNLOAD")); resultMap.get(i).put("download", map.get("DOWNLOAD"));
resultMap.get(i).put("checkerCount", map.get("CHECKERCOUNT")); resultMap.get(i).put("checkerCount", map.get("CHECKERCOUNT"));
resultMap.get(i).put("electricCount", map.get("ELECTRICCOUNT")); resultMap.get(i).put("electricCount", map.get("ELECTRICCOUNT"));
} else {
}else {
Map<String, Object> map = receiptService.selectCountTime(groupNo); Map<String, Object> map = receiptService.selectCountTime(groupNo);
resultMap.get(i).put("download", map.get("DOWNLOAD")); resultMap.get(i).put("download", map.get("DOWNLOAD"));
resultMap.get(i).put("checkerCount", map.get("CHECKERCOUNT")); resultMap.get(i).put("checkerCount", map.get("CHECKERCOUNT"));
resultMap.get(i).put("electricCount", map.get("ELECTRICCOUNT")); resultMap.get(i).put("electricCount", map.get("ELECTRICCOUNT"));
} }
} }
return resultMap; return resultMap;
} }
...@@ -215,6 +205,7 @@ public class ReceiptApi { ...@@ -215,6 +205,7 @@ public class ReceiptApi {
/** /**
* 根据受理号查询详单信息 * 根据受理号查询详单信息
*
* @param jsonStr * @param jsonStr
* @return * @return
*/ */
...@@ -231,6 +222,7 @@ public class ReceiptApi { ...@@ -231,6 +222,7 @@ public class ReceiptApi {
/** /**
* 更改备注信息 * 更改备注信息
*
* @param jsonStr * @param jsonStr
* @return * @return
*/ */
......
...@@ -59,7 +59,6 @@ public interface ReceiptMapper { ...@@ -59,7 +59,6 @@ public interface ReceiptMapper {
@Options(useGeneratedKeys=true, keyProperty="id", keyColumn="ID") @Options(useGeneratedKeys=true, keyProperty="id", keyColumn="ID")
public boolean createReceiptList(ReceiptListEntity receiptListEntity); public boolean createReceiptList(ReceiptListEntity receiptListEntity);
//根据身份证号查询交接单详单信息 //根据身份证号查询交接单详单信息
@Select("select prod_card_t.upload_no," + @Select("select prod_card_t.upload_no," +
"PROD_CARD_T.ACCEPT_NO," + "PROD_CARD_T.ACCEPT_NO," +
...@@ -92,15 +91,11 @@ public interface ReceiptMapper { ...@@ -92,15 +91,11 @@ public interface ReceiptMapper {
"where prod_card_t.id_no=#{id}") "where prod_card_t.id_no=#{id}")
public Map<String,Object>selectDetailedData2(String id); public Map<String,Object>selectDetailedData2(String id);
//生成交接单详单 //生成交接单详单
@Insert("INSERT INTO DETAIL_RECEIPT_LIST (UPLOAD_NO,accept_no,name,card_id,POLICE_CODE,RECEIPT_ID,SEX,SIGN_GOVT)" + @Insert("INSERT INTO DETAIL_RECEIPT_LIST (UPLOAD_NO,accept_no,name,card_id,POLICE_CODE,RECEIPT_ID,SEX,SIGN_GOVT)" +
"VALUES(#{UPLOAD_NO},#{ACCEPT_NO},#{NAME},#{CARD_ID},#{GAJG_DM},#{RECEIPT_ID},#{SEX},#{signGovt})") "VALUES(#{UPLOAD_NO},#{ACCEPT_NO},#{NAME},#{CARD_ID},#{GAJG_DM},#{RECEIPT_ID},#{SEX},#{signGovt})")
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,@Param("signGovt")String signGovt); 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,@Param("signGovt")String signGovt);
//根据组号查询特证表 //根据组号查询特证表
@Select("SELECT count(*) FROM SPECIAL_CARD WHERE subStr(ACCEPT_NO,0,8) =#{GROUP_NO}") @Select("SELECT count(*) FROM SPECIAL_CARD WHERE subStr(ACCEPT_NO,0,8) =#{GROUP_NO}")
public int selectSpecialCard(@Param("GROUP_NO") String GROUP_NO); public int selectSpecialCard(@Param("GROUP_NO") String GROUP_NO);
...@@ -112,15 +107,12 @@ public interface ReceiptMapper { ...@@ -112,15 +107,12 @@ public interface ReceiptMapper {
@Update("update RECEIPT_LIST set FINISH_COUNT=#{count} where QR_CODE=#{GROUP_NO}") @Update("update RECEIPT_LIST set FINISH_COUNT=#{count} where QR_CODE=#{GROUP_NO}")
public boolean updateFinishCount(@Param("GROUP_NO") String GROUP_NO,@Param("count") int count); public boolean updateFinishCount(@Param("GROUP_NO") String GROUP_NO,@Param("count") int count);
//根据身份证号查询特证表count //根据身份证号查询特证表count
@Select("select count(*) from SPECIAL_CARD \n" + @Select("select count(*) from SPECIAL_CARD \n" +
"left join prod_card_t@prod_link on special_card.accept_no = prod_card_t.accept_no\n" + "left join prod_card_t@prod_link on special_card.accept_no = prod_card_t.accept_no\n" +
"where prod_card_t.id_no = #{id}") "where prod_card_t.id_no = #{id}")
public int selectSpecialCardByAcceptNo(@Param("id") String id); public int selectSpecialCardByAcceptNo(@Param("id") String id);
//查询未复核交接单 //查询未复核交接单
@Select("SELECT RECEIPT_LIST.* ,GAJG_DM.GAJG_MC FROM RECEIPT_LIST LEFT JOIN GAJG_DM ON RECEIPT_LIST.POLICE_CODE=GAJG_DM.GAJG_DM where state=0\n") @Select("SELECT RECEIPT_LIST.* ,GAJG_DM.GAJG_MC FROM RECEIPT_LIST LEFT JOIN GAJG_DM ON RECEIPT_LIST.POLICE_CODE=GAJG_DM.GAJG_DM where state=0\n")
public List<Map<String,Object>>selectReceiptListOfSpecialCard (); public List<Map<String,Object>>selectReceiptListOfSpecialCard ();
...@@ -131,12 +123,10 @@ public interface ReceiptMapper { ...@@ -131,12 +123,10 @@ public interface ReceiptMapper {
"WHERE PROD_CARD_T.ID_NO =#{id}") "WHERE PROD_CARD_T.ID_NO =#{id}")
public Map<String,Object> selectReceiptList(@Param("id") String id); public Map<String,Object> selectReceiptList(@Param("id") String id);
//根据交接单号查详单信息 //根据交接单号查详单信息
@Select("select * from detail_receipt_list where receipt_id=#{receiptId}") @Select("select * from detail_receipt_list where receipt_id=#{receiptId}")
public List<Map<String,Object>> selectDetailList(@Param("receiptId") String receiptId); public List<Map<String,Object>> selectDetailList(@Param("receiptId") String receiptId);
//根据传入的交接单ID和复核人ID插入复核人、复核时间、更改状态 //根据传入的交接单ID和复核人ID插入复核人、复核时间、更改状态
@Update("update receipt_list set \n" + @Update("update receipt_list set \n" +
"check_date = #{date},\n" + "check_date = #{date},\n" +
...@@ -155,12 +145,10 @@ public interface ReceiptMapper { ...@@ -155,12 +145,10 @@ public interface ReceiptMapper {
@Select("select count(*) from RECEIPT_LIST where QR_CODE=(select accept_no from prod_card_t@prod_link where id_no=#{id})") @Select("select count(*) from RECEIPT_LIST where QR_CODE=(select accept_no from prod_card_t@prod_link where id_no=#{id})")
public int selectCountById(@Param("id") String id); public int selectCountById(@Param("id") String id);
//根据输入id查询是否生成详单 //根据输入id查询是否生成详单
@Select("select count(*) from DETAIL_RECEIPT_LIST where ACCEPT_NO=(select accept_no from prod_card_t@prod_link where id_no=#{id})") @Select("select count(*) from DETAIL_RECEIPT_LIST where ACCEPT_NO=(select accept_no from prod_card_t@prod_link where id_no=#{id})")
public int selectReceiptById(@Param("id") String id); public int selectReceiptById(@Param("id") String id);
@Select("select \n" + @Select("select \n" +
"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" +
...@@ -169,8 +157,6 @@ public interface ReceiptMapper { ...@@ -169,8 +157,6 @@ public interface ReceiptMapper {
"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 ) ") "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" + @Select("select \n" +
"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" +
...@@ -179,7 +165,6 @@ public interface ReceiptMapper { ...@@ -179,7 +165,6 @@ public interface ReceiptMapper {
"WHERE ACCEPT_NO=#{groupNo}") "WHERE ACCEPT_NO=#{groupNo}")
public Map<String,Object> selectCountTimeT(@Param("groupNo") String 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" +
...@@ -206,7 +191,6 @@ public interface ReceiptMapper { ...@@ -206,7 +191,6 @@ public interface ReceiptMapper {
" where to_char(CHECK_DATE,'yyyyMMdd') = ${date} and RECEIPT_LIST.POLICE_CODE in (${string}) and CARD_TYPE_DIC.CARD_TYPE_ID=${type} ") " where to_char(CHECK_DATE,'yyyyMMdd') = ${date} and RECEIPT_LIST.POLICE_CODE in (${string}) and CARD_TYPE_DIC.CARD_TYPE_ID=${type} ")
public List<Map<String,Object>> selectReceiptDate(@Param("date") String date,@Param("string") String string,@Param("type") long type); public List<Map<String,Object>> selectReceiptDate(@Param("date") String date,@Param("string") String string,@Param("type") long type);
@Select("select DETAIL_RECEIPT_LIST.* , GAJG_DM.GAJG_MC from DETAIL_RECEIPT_LIST LEFT JOIN GAJG_DM ON GAJG_DM.GAJG_DM =DETAIL_RECEIPT_LIST.POLICE_CODE where ACCEPT_NO=#{acceptNo} or card_id=#{acceptNo}") @Select("select DETAIL_RECEIPT_LIST.* , GAJG_DM.GAJG_MC from DETAIL_RECEIPT_LIST LEFT JOIN GAJG_DM ON GAJG_DM.GAJG_DM =DETAIL_RECEIPT_LIST.POLICE_CODE where ACCEPT_NO=#{acceptNo} or card_id=#{acceptNo}")
@Options(useGeneratedKeys=true, keyProperty="gajg_mc", keyColumn="GAJG_MC") @Options(useGeneratedKeys=true, keyProperty="gajg_mc", keyColumn="GAJG_MC")
public DetailReceiptListEntity selectDetailByAcceptNo(@Param("acceptNo") String acceptNo); public DetailReceiptListEntity selectDetailByAcceptNo(@Param("acceptNo") String acceptNo);
......
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