Commit 7b1e9e1f authored by suichenguang's avatar suichenguang

制证包下载更改禁用状态

parent 63685753
......@@ -62,8 +62,9 @@ public class InfoManagementApi {
@RequestMapping("deleteInfo")
@Transactional(rollbackFor = Exception.class)
public boolean deleteInfo(@Param("beginFileName")String beginFileName, @Param("endFileName")String endFileName, @Param("gajgMc") String gajgMc, @Param("beginDate")String beginDate, @Param("endDate")String endDate){
boolean result= infoManagementService.deleteInfo(beginFileName,endFileName,gajgMc,replaceDate(beginDate),replaceDate(endDate));
//更改新文件状态
infoManagementService.updatePackageNo(beginFileName,endFileName,gajgMc,replaceDate(beginDate),replaceDate(endDate));
return result;
}
......
......@@ -18,6 +18,17 @@ public class NewFilesEntity {
private String newFileName;
private String newTime;
private long id;
private long state;
@Basic
@Column(name = "STATE")
public long getState() {
return state;
}
public void setState(long state) {
this.state = state;
}
@Basic
@Column(name = "VERSION_CODE")
......
package com.yxproject.start.mapper;
import com.yxproject.start.entity.NewFilesEntity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.*;
import java.util.List;
import java.util.Map;
......@@ -51,22 +48,40 @@ public interface InfoManagementMapper {
@Delete("<script> " +
"delete from PREPRO_PERSON \n" +
@Update("<script> " +
"UPDATE PREPRO_PERSON SET PREPRO_PERSON.SDXP =NULL,PREPRO_PERSON.ZWY_ZWTXSJ=NULL,PREPRO_PERSON.ZWY_ZWTZSJ=NULL,PREPRO_PERSON.ZWE_ZWTXSJ=NULL,PREPRO_PERSON.ZWE_ZWTZSJ=NULL,IS_VALID=0\n" +
"where PREPRO_PERSON.NEW_FILE_ID IN (\n" +
"select NEW_FILES.ID from new_files \n" +
"where 1=1\n" +
"<if test='beginFileName != \"\" '>" +
"and (NEW_FILE_NAME between(#{beginFileName})and (#{endFileName}))\n" +
"and (NEW_FILES.ID between(#{beginFileName})and (#{endFileName}))\n" +
"</if>" +
"<if test='gajgMc != \"\" '>" +
"and DWMC=#{gajgMc}\n" +
"</if>" +
"<if test='beginDate != \"\" '>" +
"and (subStr(CREATE_DATE,0,8) between(#{beginDate})and(#{endDate})))"+
"and (subStr(CREATE_DATE,0,8) between(#{beginDate})and(#{endDate})) "+
"</if>" +
" </script>")
" ) </script>")
public boolean deleteInfo(@Param("beginFileName")String beginFileName, @Param("endFileName")String endFileName, @Param("gajgMc") String gajgMc, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
@Update("<script> " +
"update new_files set NEW_FILES.state = 0 \n" +
"where new_files.id in ("+
"select new_files.id from new_files \n" +
"left join prepro_person on prepro_person.new_file_id=new_files.id "+
"where 1=1\n" +
"<if test='beginFileName != \"\" '>" +
"and (NEW_FILES.ID between(#{beginFileName})and (#{endFileName}))\n" +
"</if>" +
"<if test='gajgMc != \"\" '>" +
"and DWMC=#{gajgMc}\n" +
"</if>" +
"<if test='beginDate != \"\" '>" +
"and (subStr(CREATE_DATE,0,8) between(#{beginDate})and(#{endDate})) "+
"</if>" +
" ) </script>")
public boolean updatePackageNo(@Param("beginFileName")String beginFileName, @Param("endFileName")String endFileName, @Param("gajgMc") String gajgMc, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
}
......@@ -12,4 +12,6 @@ public interface InfoManagementService {
public boolean deleteInfo(@Param("beginFileName")String beginFileName, @Param("endFileName")String endFileName, @Param("gajgMc") String gajgMc, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
public boolean updatePackageNo(@Param("beginFileName")String beginFileName, @Param("endFileName")String endFileName, @Param("gajgMc") String gajgMc, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
}
......@@ -33,4 +33,12 @@ public class InfoManagementServiceImpl implements InfoManagementService {
infoManagementMapper.deleteInfo(beginFileName,endFileName,gajgMc,beginDate,endDate);
return true;
}
@Override
public boolean updatePackageNo(String beginFileName, String endFileName, String gajgMc, String beginDate, String endDate) {
infoManagementMapper.updatePackageNo(beginFileName,endFileName,gajgMc,beginDate,endDate);
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