Commit db204755 authored by dahai's avatar dahai

修改更改邮寄备注信息

parent c0d71a41
...@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.transaction.Transactional;
import java.io.OutputStream; import java.io.OutputStream;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
...@@ -45,6 +46,7 @@ public class PersonPostApi { ...@@ -45,6 +46,7 @@ public class PersonPostApi {
* @return * @return
*/ */
@RequestMapping("selectNote") @RequestMapping("selectNote")
@Transactional
public List<Map<String,Object>>selectNote(@RequestBody String jsonStr){ public List<Map<String,Object>>selectNote(@RequestBody String jsonStr){
List<Map<String,Object>> resultList = new ArrayList<>(); List<Map<String,Object>> resultList = new ArrayList<>();
...@@ -62,6 +64,7 @@ public class PersonPostApi { ...@@ -62,6 +64,7 @@ public class PersonPostApi {
* @return * @return
*/ */
@RequestMapping("addNote") @RequestMapping("addNote")
@Transactional
public boolean addNote(@RequestBody String jsonStr){ public boolean addNote(@RequestBody String jsonStr){
JSONArray jsonArray = JSONArray.fromObject(jsonStr); JSONArray jsonArray = JSONArray.fromObject(jsonStr);
for (int i=0;i<jsonArray.size();i++){ for (int i=0;i<jsonArray.size();i++){
...@@ -78,6 +81,7 @@ public class PersonPostApi { ...@@ -78,6 +81,7 @@ public class PersonPostApi {
* @return * @return
*/ */
@RequestMapping("findPersonalDataCount") @RequestMapping("findPersonalDataCount")
@Transactional
public int findPersonalDataCount(@RequestBody String jsonStr){ public int findPersonalDataCount(@RequestBody String jsonStr){
JSONObject jsonObject = JSONObject.fromObject(jsonStr); JSONObject jsonObject = JSONObject.fromObject(jsonStr);
String applicantName = jsonObject.getString("applicantName"); String applicantName = jsonObject.getString("applicantName");
...@@ -98,6 +102,7 @@ public class PersonPostApi { ...@@ -98,6 +102,7 @@ public class PersonPostApi {
* @return * @return
*/ */
@RequestMapping("findPersonalData") @RequestMapping("findPersonalData")
@Transactional
public List<PersonPostEntity> findPersonalData(@RequestBody String jsonStr){ public List<PersonPostEntity> findPersonalData(@RequestBody String jsonStr){
JSONObject jsonObject = JSONObject.fromObject(jsonStr); JSONObject jsonObject = JSONObject.fromObject(jsonStr);
String applicantName = jsonObject.getString("applicantName"); String applicantName = jsonObject.getString("applicantName");
......
...@@ -14,7 +14,7 @@ import java.util.Map; ...@@ -14,7 +14,7 @@ import java.util.Map;
@Mapper @Mapper
public interface MaterialManagementMapper { public interface MaterialManagementMapper {
@Insert("INSERT INTO PLASTIC_FILM (TOTAL_COUNT,PLASTIC_FILM_TYPE,NOTE,name)VALUES(#{totalCount},#{plasticFilmType},#{note},#{name})") @Insert("INSERT INTO PLASTIC_FILM (TOTAL_COUNT,PLASTIC_FILM_TYPE,NOTE,name)VALUES(#{totalCount},#{plasticFilmType},#{note},#{name})")
public boolean insertFilm(@Param("totalCount")String totalCount,@Param("plasticFilmType")String plasticFilmType,@Param("note")String note,@Param("name")String name); public boolean insertFilm(@Param("totalCount") String totalCount, @Param("plasticFilmType") String plasticFilmType, @Param("note") String note, @Param("name") String name);
@Select("<script>" + @Select("<script>" +
"select * from plastic_film where to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}" + "select * from plastic_film where to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}" +
...@@ -25,10 +25,10 @@ public interface MaterialManagementMapper { ...@@ -25,10 +25,10 @@ public interface MaterialManagementMapper {
" and PLASTIC_FILM_TYPE =#{typeCode} " + " and PLASTIC_FILM_TYPE =#{typeCode} " +
"</if>" + "</if>" +
"</script>") "</script>")
public List<PlasticFilmEntity> selectFilm(@Param("beginDate") String beginDate,@Param("endDate")String endDate,@Param("typeCode")String typeCode,@Param("name")String name); public List<PlasticFilmEntity> selectFilm(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("typeCode") String typeCode, @Param("name") String name);
@Select("<script>" + @Select("<script>" +
"select sum(TOTAL_COUNT) PLASTIC_FILM_TYPE1 from plastic_film where to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate} and PLASTIC_FILM_TYPE=1 "+ "select sum(TOTAL_COUNT) PLASTIC_FILM_TYPE1 from plastic_film where to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate} and PLASTIC_FILM_TYPE=1 " +
"<if test='name != null '>" + "<if test='name != null '>" +
" and name =#{name} " + " and name =#{name} " +
"</if>" + "</if>" +
...@@ -36,10 +36,10 @@ public interface MaterialManagementMapper { ...@@ -36,10 +36,10 @@ public interface MaterialManagementMapper {
" and PLASTIC_FILM_TYPE =#{typeCode} " + " and PLASTIC_FILM_TYPE =#{typeCode} " +
"</if>" + "</if>" +
"</script>") "</script>")
public String selectFilmCount1(@Param("beginDate") String beginDate,@Param("endDate")String endDate ,@Param("typeCode")String typeCode,@Param("name")String name); public String selectFilmCount1(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("typeCode") String typeCode, @Param("name") String name);
@Select("<script>" + @Select("<script>" +
"select sum(TOTAL_COUNT) PLASTIC_FILM_TYPE1 from plastic_film where to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate} and PLASTIC_FILM_TYPE=2"+ "select sum(TOTAL_COUNT) PLASTIC_FILM_TYPE1 from plastic_film where to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate} and PLASTIC_FILM_TYPE=2" +
"<if test='name != null '>" + "<if test='name != null '>" +
" and name =#{name} " + " and name =#{name} " +
"</if>" + "</if>" +
...@@ -47,15 +47,15 @@ public interface MaterialManagementMapper { ...@@ -47,15 +47,15 @@ public interface MaterialManagementMapper {
" and PLASTIC_FILM_TYPE =#{typeCode} " + " and PLASTIC_FILM_TYPE =#{typeCode} " +
"</if>" + "</if>" +
"</script>") "</script>")
public String selectFilmCount2(@Param("beginDate") String beginDate,@Param("endDate")String endDate,@Param("typeCode")String typeCode,@Param("name")String name); public String selectFilmCount2(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("typeCode") String typeCode, @Param("name") String name);
@Insert("INSERT INTO CARD_BODY (CARD_TYPE,TOTAL_COUNT,NOTE,name)VALUES(#{cardType},#{totalCount},#{note},#{name})") @Insert("INSERT INTO CARD_BODY (CARD_TYPE,TOTAL_COUNT,NOTE,name)VALUES(#{cardType},#{totalCount},#{note},#{name})")
public boolean insertCardBody(@Param("cardType")String cardType,@Param("totalCount")String totalCount,@Param("note")String note,@Param("name")String name); public boolean insertCardBody(@Param("cardType") String cardType, @Param("totalCount") String totalCount, @Param("note") String note, @Param("name") String name);
@Select("<script>" + @Select("<script>" +
"select * from CARD_BODY where to_char(SAVE_DATE,'yyyyMMdd') between #{beginDate} and #{endDate}"+ "select * from CARD_BODY where to_char(SAVE_DATE,'yyyyMMdd') between #{beginDate} and #{endDate}" +
"<if test='name != null '>" + "<if test='name != null '>" +
" and name =#{name} " + " and name =#{name} " +
"</if>" + "</if>" +
...@@ -63,10 +63,10 @@ public interface MaterialManagementMapper { ...@@ -63,10 +63,10 @@ public interface MaterialManagementMapper {
" and card_type =#{typeCode} " + " and card_type =#{typeCode} " +
"</if>" + "</if>" +
"</script>") "</script>")
public List<CardBodyEntity> selectCardBody(@Param("beginDate")String beginDate,@Param("endDate")String endDate,@Param("typeCode")String typeCode,@Param("name")String name); public List<CardBodyEntity> selectCardBody(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("typeCode") String typeCode, @Param("name") String name);
@Select("<script>" + @Select("<script>" +
"select sum(TOTAL_COUNT) cardType1 from CARD_BODY where to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate} and CARD_TYPE=1"+ "select sum(TOTAL_COUNT) cardType1 from CARD_BODY where to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate} and CARD_TYPE=1" +
"<if test='name != null '>" + "<if test='name != null '>" +
" and name =#{name} " + " and name =#{name} " +
"</if>" + "</if>" +
...@@ -74,10 +74,10 @@ public interface MaterialManagementMapper { ...@@ -74,10 +74,10 @@ public interface MaterialManagementMapper {
" and card_type =#{typeCode} " + " and card_type =#{typeCode} " +
"</if>" + "</if>" +
"</script>") "</script>")
public String selectCardCount1(@Param("beginDate")String beginDate,@Param("endDate")String endDate,@Param("typeCode")String typeCode,@Param("name")String name); public String selectCardCount1(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("typeCode") String typeCode, @Param("name") String name);
@Select("<script>" + @Select("<script>" +
"select sum(TOTAL_COUNT) cardType2 from CARD_BODY where to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate} and CARD_TYPE=2"+ "select sum(TOTAL_COUNT) cardType2 from CARD_BODY where to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate} and CARD_TYPE=2" +
"<if test='name != null '>" + "<if test='name != null '>" +
" and name =#{name} " + " and name =#{name} " +
"</if>" + "</if>" +
...@@ -85,6 +85,6 @@ public interface MaterialManagementMapper { ...@@ -85,6 +85,6 @@ public interface MaterialManagementMapper {
" and card_type =#{typeCode} " + " and card_type =#{typeCode} " +
"</if>" + "</if>" +
"</script>") "</script>")
public String selectCardCount2(@Param("beginDate")String beginDate,@Param("endDate")String endDate,@Param("typeCode")String typeCode,@Param("name")String name); public String selectCardCount2(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("typeCode") String typeCode, @Param("name") String name);
} }
...@@ -34,7 +34,7 @@ public interface PersonPostMapper { ...@@ -34,7 +34,7 @@ public interface PersonPostMapper {
"SELECT * FROM " + "SELECT * FROM " +
"( " + "( " +
"SELECT A.*, ROWNUM RN " + "SELECT A.*, ROWNUM RN " +
" from (SELECT PERSON_POST.*" + " from (SELECT DISTINCT PERSON_POST.*" +
" FROM PERSON_POST " + " FROM PERSON_POST " +
" LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID " + " LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID " +
" left join PREPRO_PERSON on PERSON_POST.first_white = prepro_person.jmsfzslh " + " left join PREPRO_PERSON on PERSON_POST.first_white = prepro_person.jmsfzslh " +
...@@ -44,14 +44,12 @@ public interface PersonPostMapper { ...@@ -44,14 +44,12 @@ public interface PersonPostMapper {
" <when test='orderNumber!=\"\"'> and PERSON_POST.ORDER_NUMBER=${orderNumber} </when>" + " <when test='orderNumber!=\"\"'> and PERSON_POST.ORDER_NUMBER=${orderNumber} </when>" +
" <if test='state== 0 '> and PERSON_POST.print_date is null </if>" + " <if test='state== 0 '> and PERSON_POST.print_date is null </if>" +
" <if test='state== 1 '> and PERSON_POST.print_date is not null </if>" + " <if test='state== 1 '> and PERSON_POST.print_date is not null </if>" +
// " <if test='notNull== 1 '> and (PERSON_POST.ID_CARD is not null ) or (PERSON_POST.ACCEPT_THE_MATTER is not null ) or (PERSON_POST.BEGIN_USEFUL_LIFE is not null ) or (PERSON_POST.VALID_PERIOD_END is not null ) </if>" +
// " <if test='notNull== 0 '> and (PERSON_POST.ID_CARD is null) or (PERSON_POST.ACCEPT_THE_MATTER is null) or (PERSON_POST.BEGIN_USEFUL_LIFE is null) or (PERSON_POST.VALID_PERIOD_END is null) </if>" +
" <if test='notNull== 1 '> and PREPRO_PERSON.JMSFZSLH is not null </if>" + " <if test='notNull== 1 '> and PREPRO_PERSON.JMSFZSLH is not null </if>" +
" <if test='notNull== 0 '> and PREPRO_PERSON.JMSFZSLH is null </if>" + " <if test='notNull== 0 '> and PREPRO_PERSON.JMSFZSLH is null </if>" +
" <when test='latticeMouthInformation!=\"\"'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=${latticeMouthInformation} </when>" + " <when test='latticeMouthInformation!=\"\"'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=${latticeMouthInformation} </when>" +
" <when test='getToCounty!=null'> and PERSON_POST.GET_TO_COUNTY in ( ${getToCounty} ) </when>" + " <when test='getToCounty!=null'> and PERSON_POST.GET_TO_COUNTY in ( ${getToCounty} ) </when>" +
" <when test='uploadDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8)=${uploadDate} </when>" + " <when test='uploadDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8)=${uploadDate} </when>" +
") " + "order by PERSON_POST.id ) " +
"A" + "A" +
")" + ")" +
"WHERE RN BETWEEN ${pageSize} AND ${firstIndex}" + "WHERE RN BETWEEN ${pageSize} AND ${firstIndex}" +
...@@ -60,7 +58,7 @@ public interface PersonPostMapper { ...@@ -60,7 +58,7 @@ public interface PersonPostMapper {
@Select("select ID,FIRST_WHITE,APPLICANT_NAME,NOTE from person_post where ID=#{id}") @Select("select ID,FIRST_WHITE,APPLICANT_NAME,NOTE from person_post where ID=#{id}")
public Map<String,Object>selectNote(@Param("id")int id); public List<Map<String,Object>> selectNote(@Param("id")int id);
@Update("UPDATE PERSON_POST SET NOTE = #{note} where ID = #{id}") @Update("UPDATE PERSON_POST SET NOTE = #{note} where ID = #{id}")
......
...@@ -135,8 +135,8 @@ public class PersonPostServiceImpl implements PersonPostService { ...@@ -135,8 +135,8 @@ public class PersonPostServiceImpl implements PersonPostService {
@Override @Override
public Map<String, Object> selectNote(int id) { public Map<String, Object> selectNote(int id) {
Map<String, Object> resultMap = personPostMapper.selectNote(id); List<Map<String, Object>> maps = personPostMapper.selectNote(id);
return resultMap; return maps.get(0);
} }
@Override @Override
......
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