Commit db204755 authored by dahai's avatar dahai

修改更改邮寄备注信息

parent c0d71a41
......@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.transaction.Transactional;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
......@@ -45,6 +46,7 @@ public class PersonPostApi {
* @return
*/
@RequestMapping("selectNote")
@Transactional
public List<Map<String,Object>>selectNote(@RequestBody String jsonStr){
List<Map<String,Object>> resultList = new ArrayList<>();
......@@ -62,6 +64,7 @@ public class PersonPostApi {
* @return
*/
@RequestMapping("addNote")
@Transactional
public boolean addNote(@RequestBody String jsonStr){
JSONArray jsonArray = JSONArray.fromObject(jsonStr);
for (int i=0;i<jsonArray.size();i++){
......@@ -78,6 +81,7 @@ public class PersonPostApi {
* @return
*/
@RequestMapping("findPersonalDataCount")
@Transactional
public int findPersonalDataCount(@RequestBody String jsonStr){
JSONObject jsonObject = JSONObject.fromObject(jsonStr);
String applicantName = jsonObject.getString("applicantName");
......@@ -98,6 +102,7 @@ public class PersonPostApi {
* @return
*/
@RequestMapping("findPersonalData")
@Transactional
public List<PersonPostEntity> findPersonalData(@RequestBody String jsonStr){
JSONObject jsonObject = JSONObject.fromObject(jsonStr);
String applicantName = jsonObject.getString("applicantName");
......
......@@ -14,7 +14,7 @@ import java.util.Map;
@Mapper
public interface MaterialManagementMapper {
@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 * from plastic_film where to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}" +
......@@ -25,10 +25,10 @@ public interface MaterialManagementMapper {
" and PLASTIC_FILM_TYPE =#{typeCode} " +
"</if>" +
"</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 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 '>" +
" and name =#{name} " +
"</if>" +
......@@ -36,10 +36,10 @@ public interface MaterialManagementMapper {
" and PLASTIC_FILM_TYPE =#{typeCode} " +
"</if>" +
"</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 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 '>" +
" and name =#{name} " +
"</if>" +
......@@ -47,15 +47,15 @@ public interface MaterialManagementMapper {
" and PLASTIC_FILM_TYPE =#{typeCode} " +
"</if>" +
"</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})")
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 * 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 '>" +
" and name =#{name} " +
"</if>" +
......@@ -63,10 +63,10 @@ public interface MaterialManagementMapper {
" and card_type =#{typeCode} " +
"</if>" +
"</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 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 '>" +
" and name =#{name} " +
"</if>" +
......@@ -74,10 +74,10 @@ public interface MaterialManagementMapper {
" and card_type =#{typeCode} " +
"</if>" +
"</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 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 '>" +
" and name =#{name} " +
"</if>" +
......@@ -85,6 +85,6 @@ public interface MaterialManagementMapper {
" and card_type =#{typeCode} " +
"</if>" +
"</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 {
"SELECT * FROM " +
"( " +
"SELECT A.*, ROWNUM RN " +
" from (SELECT PERSON_POST.*" +
" from (SELECT DISTINCT PERSON_POST.*" +
" FROM PERSON_POST " +
" 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 " +
......@@ -44,14 +44,12 @@ public interface PersonPostMapper {
" <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== 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== 0 '> and PREPRO_PERSON.JMSFZSLH is null </if>" +
" <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='uploadDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8)=${uploadDate} </when>" +
") " +
"order by PERSON_POST.id ) " +
"A" +
")" +
"WHERE RN BETWEEN ${pageSize} AND ${firstIndex}" +
......@@ -60,7 +58,7 @@ public interface PersonPostMapper {
@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}")
......
......@@ -135,8 +135,8 @@ public class PersonPostServiceImpl implements PersonPostService {
@Override
public Map<String, Object> selectNote(int id) {
Map<String, Object> resultMap = personPostMapper.selectNote(id);
return resultMap;
List<Map<String, Object>> maps = personPostMapper.selectNote(id);
return maps.get(0);
}
@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