Commit b48ebe2b authored by suichenguang's avatar suichenguang

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

parents 8691448a 2f48bfc8
...@@ -9,7 +9,9 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -9,7 +9,9 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @auther zhangyusheng * @auther zhangyusheng
...@@ -25,11 +27,27 @@ public class queryPreproPerson { ...@@ -25,11 +27,27 @@ public class queryPreproPerson {
*/ */
@RequestMapping("queryPreproPerson") @RequestMapping("queryPreproPerson")
// @RequiresPermissions("userInfo.add")//权限管理; // @RequiresPermissions("userInfo.add")//权限管理;
public String printXmlData(@RequestParam("uploadNo") String uploadNo, @RequestParam("IDCard")String IDCard,@RequestParam("oldFile") String oldFile, @RequestParam("newFile")String newFile, @RequestParam("SSXQDM")String SSXQDM, @RequestParam("cardType")String cardType, @RequestParam("state")String state, @RequestParam("uploadDate")String uploadDate, HttpServletResponse response){ public Map<String,Object> printXmlData(@RequestParam("uploadNo") String uploadNo, @RequestParam("IDCard")String IDCard,@RequestParam("oldFile") String oldFile, @RequestParam("newFile")String newFile, @RequestParam("SSXQDM")String SSXQDM, @RequestParam("cardType")String cardType, @RequestParam("state")String state, @RequestParam("uploadDate")String uploadDate,@RequestParam("currPage")String currPage,@RequestParam("pageSize")String pageSize, HttpServletResponse response){
List<PreproPersonEntity> preproPersonEntities = preproPersonService.selectPreproPerson(uploadNo, IDCard, oldFile, newFile, SSXQDM, cardType, state, uploadDate); List<PreproPersonEntity> preproPersonEntities = preproPersonService.selectPreproPerson(uploadNo, IDCard, oldFile, newFile, SSXQDM, cardType, state, uploadDate,currPage,pageSize);
YXJSONResponse yxjsonResponse = new YXJSONResponse(); Map<String,Object> map = new LinkedHashMap<>();
response.setCharacterEncoding("UTF-8"); map.put("tatal",preproPersonService.selectPreproPersonCount(uploadNo, IDCard, oldFile, newFile, SSXQDM, cardType, state, uploadDate).size());
yxjsonResponse.outPutSuccess(preproPersonEntities); map.put("list",preproPersonEntities);
return yxjsonResponse.toJSONString(); return map;
}
/**
* 更新制证数据是否有效
*/
@RequestMapping("queryPreproPerson")
// @RequiresPermissions("userInfo.add")//权限管理;
public Map<String,Object> printXmlData(@RequestParam("uploadNo") String uploadNo, @RequestParam("isValid")String isValid, HttpServletResponse response){
PreproPersonEntity preproPersonEntity = new PreproPersonEntity();
preproPersonEntity.setJmsfzslh(uploadNo);
preproPersonEntity.setIsValid(Long.valueOf(isValid));
preproPersonService.updatePreproPersonIsValid(preproPersonEntity);
Map<String,Object> map = new LinkedHashMap<>();
map.put("msg","成功更新制证数据是否有效");
return map;
} }
} }
...@@ -24,6 +24,38 @@ public interface PreproPersonMapper { ...@@ -24,6 +24,38 @@ public interface PreproPersonMapper {
public boolean updatePreproPersonEntity(PreproPersonEntity personEntity); public boolean updatePreproPersonEntity(PreproPersonEntity personEntity);
/*按条件查询制证数据*/
@Select({"<script>" +
"select * from (select a.*,rownum rn from(select * from PREPRO_PERSON left join files on PREPRO_PERSON.FILE_ID = files.ID left join NEW_FILES on PREPRO_PERSON.FILE_ID = NEW_FILES.ID " +
"<where> " +
" 1=1" +
"<if test='uploadNo != null '>" +
"and PREPRO_PERSON.JMSFZSLH = #{uploadNo}" +
"</if>" +
" <if test='IDCard != null '> ",
"and GMSFHM = #{IDCard} ",
"</if> ",
" <if test='oldFile != null '> ",
"and files.SOURCE_FILE_NAME =#{oldFile} ",
" </if> ",
" <if test='newFile != null'> ",
"and NEW_FILES.NEW_FILE_NAME = #{newFile}",
" </if> ",
" <if test='SSXQDM != null '> ",
"and PREPRO_PERSON.SSXQDM =#{SSXQDM}",
" </if>",
" <if test='cardType != null '>",
" and PREPRO_PERSON.CARD_TYPE_ID =#{cardType}",
" </if> ",
" <if test='state != null'>",
" and PREPRO_PERSON.state = #{state}",
" </if> ",
" <if test='uploadDate != null '>",
" and files.CREAT_TIME = #{uploadDate}",
" </if> ",
"</where>" +
") a ) where rn between #{minNum} and #{maxNum} </script>"})
public List<PreproPersonEntity> selectPreproPerson(@Param("uploadNo") String uploadNo, @Param("IDCard") String IDCard, @Param("oldFile") String oldFile, @Param("newFile") String newFile, @Param("SSXQDM") String SSXQDM, @Param("cardType") String cardType, @Param("state") String state, @Param("uploadDate") String uploadDate, @Param("minNum") long minNum, @Param("maxNum") long maxNum);
/*按条件查询制证数据*/ /*按条件查询制证数据*/
@Select({"<script>" + @Select({"<script>" +
"select * from PREPRO_PERSON left join files on PREPRO_PERSON.FILE_ID = files.ID left join NEW_FILES on PREPRO_PERSON.FILE_ID = NEW_FILES.ID " + "select * from PREPRO_PERSON left join files on PREPRO_PERSON.FILE_ID = files.ID left join NEW_FILES on PREPRO_PERSON.FILE_ID = NEW_FILES.ID " +
...@@ -54,8 +86,9 @@ public interface PreproPersonMapper { ...@@ -54,8 +86,9 @@ public interface PreproPersonMapper {
" and files.CREAT_TIME = #{uploadDate}", " and files.CREAT_TIME = #{uploadDate}",
" </if> ", " </if> ",
"</where>" + "</where>" +
"</script>"}) " </script>"})
public List<PreproPersonEntity> selectPreproPerson(@Param("uploadNo") String uploadNo, @Param("IDCard") String IDCard, @Param("oldFile") String oldFile, @Param("newFile") String newFile, @Param("SSXQDM") String SSXQDM, @Param("cardType") String cardType, @Param("state") String state, @Param("uploadDate") String uploadDate); public List<PreproPersonEntity> selectPreproPersonCount(@Param("uploadNo") String uploadNo, @Param("IDCard") String IDCard, @Param("oldFile") String oldFile, @Param("newFile") String newFile, @Param("SSXQDM") String SSXQDM, @Param("cardType") String cardType, @Param("state") String state, @Param("uploadDate") String uploadDate);
/*修改标记制证数据状态*/ /*修改标记制证数据状态*/
@Update("UPDATE PREPRO_PERSON SET STATE = #{state} WHERE JMSFZSLH=#{acceptNo}") @Update("UPDATE PREPRO_PERSON SET STATE = #{state} WHERE JMSFZSLH=#{acceptNo}")
......
...@@ -17,7 +17,9 @@ public interface PreproPersonService { ...@@ -17,7 +17,9 @@ public interface PreproPersonService {
public boolean updatePreproPersonIsValid(PreproPersonEntity preproPersonEntity); public boolean updatePreproPersonIsValid(PreproPersonEntity preproPersonEntity);
public List<PreproPersonEntity> selectPreproPerson(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate); public List<PreproPersonEntity> selectPreproPerson(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate,String currPage,String pageSize);
public List<PreproPersonEntity> selectPreproPersonCount(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate);
public boolean updatePreproPerson_NewFileName(List<PreproPersonEntity> preproPersonEntities); public boolean updatePreproPerson_NewFileName(List<PreproPersonEntity> preproPersonEntities);
} }
...@@ -23,9 +23,42 @@ public class PreproPersonServiceImpl implements PreproPersonService { ...@@ -23,9 +23,42 @@ public class PreproPersonServiceImpl implements PreproPersonService {
preproPersonMapper.updateState(acceptNo,state); preproPersonMapper.updateState(acceptNo,state);
return true; return true;
} }
/**
* 查询制证数据详细信息
* @param uploadNo
* @param IDCard
* @param oldFile
* @param newFile
* @param SSXQDM
* @param cardType
* @param state
* @param uploadDate
* @param currPage
* @param pageSize
* @return
*/
@Override
public List<PreproPersonEntity> selectPreproPerson(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate,String currPage,String pageSize) {
List<PreproPersonEntity> preproPersonEntities = preproPersonMapper.selectPreproPerson(replace(uploadNo), replace(IDCard), replace(oldFile), replace(newFile), replace(SSXQDM), replace(cardType), replace(state), replace(uploadDate),(Long.valueOf(currPage)-1)*Long.valueOf(pageSize)+1,Long.valueOf(currPage)*Long.valueOf(pageSize));
return preproPersonEntities;
}
/**
* 查询制证数据总数
* @param uploadNo
* @param IDCard
* @param oldFile
* @param newFile
* @param SSXQDM
* @param cardType
* @param state
* @param uploadDate
* @return
*/
@Override @Override
public List<PreproPersonEntity> selectPreproPerson(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate) { public List<PreproPersonEntity> selectPreproPersonCount(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate) {
List<PreproPersonEntity> preproPersonEntities = preproPersonMapper.selectPreproPerson(replace(uploadNo), replace(IDCard), replace(oldFile), replace(newFile), replace(SSXQDM), replace(cardType), replace(state), replace(uploadDate)); List<PreproPersonEntity> preproPersonEntities = preproPersonMapper.selectPreproPersonCount(replace(uploadNo), replace(IDCard), replace(oldFile), replace(newFile), replace(SSXQDM), replace(cardType), replace(state), replace(uploadDate));
return preproPersonEntities; return preproPersonEntities;
} }
......
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