Commit 0fc0d140 authored by dahai's avatar dahai

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

# Conflicts:
#	src/main/java/com/yxproject/start/mapper/PreproPersonMapper.java
parents 833d55f7 2b8ffe95
package com.yxproject.start.api;
import com.yxproject.start.service.PreproPersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("updateState")
public class UpdateStateApi {
@Autowired
PreproPersonService preproPersonService;
@RequestMapping("updateS")
public boolean updateState(@RequestParam(value = "state") String state,@RequestParam(value = "acceptNo") String acceptNo){
preproPersonService.uploadState(state,acceptNo);
return true;
}
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.PreproPersonEntity;
import com.yxproject.start.entity.SysPermission;
import org.apache.ibatis.annotations.Insert;
import java.util.List;
/**
* 导入xml
*/
public interface ImportXmlMapper {
@Insert("INSERT INTO ")
public void addPreproPerson(List<PreproPersonEntity> preproPersonEntity);
}
...@@ -2,11 +2,8 @@ package com.yxproject.start.mapper; ...@@ -2,11 +2,8 @@ package com.yxproject.start.mapper;
import com.yxproject.start.entity.PersonPostEntity; import com.yxproject.start.entity.PersonPostEntity;
import org.apache.ibatis.annotations.*; import org.apache.ibatis.annotations.*;
import org.omg.CORBA.PUBLIC_MEMBER;
import java.util.List; import java.util.List;
import java.util.List;
/** /**
* @auther zhangyusheng * @auther zhangyusheng
...@@ -17,18 +14,8 @@ public interface PersonPostMapper { ...@@ -17,18 +14,8 @@ public interface PersonPostMapper {
@Update("insert into PERSON_POST ( WAYBILL_NUMBER,BACK_WAYBILL_NUMBER,ORDER_NUMBER,CREATE_DATE,OPENID,WC_PLAY_ORDER_NUMBER,PLAY_STATE,ORDER_STATE,APPLICANT_NAME,SENDER_NAME,SENDER_PHONE,SENDER_ADDRESS,RECIPIENT_NAME,RECIPIENT_PHONE,RECIPIENT_ADDRESS,ORDER_BLANK_NUMBER,GET_TO_PROVINCE,GET_TO_CITY,GET_TO_COUNTY,BUSINESS_TYPE,LATTICE_MOUTH_INFORMATION,NATURE_OF_THE_INTERNAL,NATURE_OF_THE_INFORMATION,FIRST_WHITE,UPLOAD_DATE) values (#{waybillNumber},#{backWaybillNumber},#{orderNumber},#{createDate},#{openid},#{wcPlayOrderNumber},#{playState},#{orderState},#{applicantName},#{senderName},#{senderPhone},#{senderAddress},#{recipientName},#{recipientPhone},#{recipientAddress},#{orderBlankNumber},#{getToProvince},#{getToCity},#{getToCounty},#{businessType},#{latticeMouthInformation},#{natureOfTheInternal},#{natureOfTheInformation},#{firstWhite},#(uploadDate))") @Update("insert into PERSON_POST ( WAYBILL_NUMBER,BACK_WAYBILL_NUMBER,ORDER_NUMBER,CREATE_DATE,OPENID,WC_PLAY_ORDER_NUMBER,PLAY_STATE,ORDER_STATE,APPLICANT_NAME,SENDER_NAME,SENDER_PHONE,SENDER_ADDRESS,RECIPIENT_NAME,RECIPIENT_PHONE,RECIPIENT_ADDRESS,ORDER_BLANK_NUMBER,GET_TO_PROVINCE,GET_TO_CITY,GET_TO_COUNTY,BUSINESS_TYPE,LATTICE_MOUTH_INFORMATION,NATURE_OF_THE_INTERNAL,NATURE_OF_THE_INFORMATION,FIRST_WHITE,UPLOAD_DATE) values (#{waybillNumber},#{backWaybillNumber},#{orderNumber},#{createDate},#{openid},#{wcPlayOrderNumber},#{playState},#{orderState},#{applicantName},#{senderName},#{senderPhone},#{senderAddress},#{recipientName},#{recipientPhone},#{recipientAddress},#{orderBlankNumber},#{getToProvince},#{getToCity},#{getToCounty},#{businessType},#{latticeMouthInformation},#{natureOfTheInternal},#{natureOfTheInformation},#{firstWhite},#(uploadDate))")
public boolean savePersonPost(PersonPostEntity personPostEntity); public boolean savePersonPost(PersonPostEntity personPostEntity);
@Update("update prepro_person p \n" + @Update("update prepro_person p set IS_POST=1 where p.JMSFZSLH in ( select p.JMSFZSLH from prepro_person p left join files files on p.file_id=files.ID \n" +
"set IS_POST=1\n" + "where JMSFZSLH in(select FIRST_WHITE from person_post where FILE_ID=#{fileId}) and files.CREAT_TIME=#{creatTime} );")
"where p.JMSFZSLH\n" +
" in ( select p.JMSFZSLH \n" +
" from prepro_person p \n" +
" left join files files \n" +
" on p.file_id=files.ID \n" +
" where JMSFZSLH \n" +
" in(select FIRST_WHITE \n" +
" from person_post \n" +
" where FILE_ID=#{fileId}) \n" +
" and files.CREAT_TIME=#{creatTime} );")
public boolean updateIsPost(@Param("fileId")String fileId,@Param("creatTime") String creatTime); public boolean updateIsPost(@Param("fileId")String fileId,@Param("creatTime") String creatTime);
@Select("SELECT * FROM PERSON_POST WHERE ID_CARD=idCard AND BEGIN_USEFUL_LIFE=to_date(#{startDate},'yyyyMMdd') AND VALID_PERIOD_END=to_date(#{endDate},'yyyyMMdd')") @Select("SELECT * FROM PERSON_POST WHERE ID_CARD=idCard AND BEGIN_USEFUL_LIFE=to_date(#{startDate},'yyyyMMdd') AND VALID_PERIOD_END=to_date(#{endDate},'yyyyMMdd')")
......
...@@ -20,4 +20,5 @@ public interface PersonPostService { ...@@ -20,4 +20,5 @@ public interface PersonPostService {
public boolean updateIsPost(String fileId,String creatTime); public boolean updateIsPost(String fileId,String creatTime);
public boolean savePersonPost(List<PersonPostEntity> personPostEntities); public boolean savePersonPost(List<PersonPostEntity> personPostEntities);
} }
...@@ -9,5 +9,8 @@ import java.util.List; ...@@ -9,5 +9,8 @@ import java.util.List;
* 2019/3/1 11:24 * 2019/3/1 11:24
*/ */
public interface PreproPersonService { public interface PreproPersonService {
public boolean uploadState(String acceptNo,String state);
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);
} }
...@@ -17,6 +17,11 @@ public class PreproPersonServiceImpl implements PreproPersonService { ...@@ -17,6 +17,11 @@ public class PreproPersonServiceImpl implements PreproPersonService {
@Autowired @Autowired
private PreproPersonMapper preproPersonMapper; private PreproPersonMapper preproPersonMapper;
@Override
public boolean uploadState(String acceptNo, String state) {
preproPersonMapper.updateState(acceptNo,state);
return true;
}
@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> selectPreproPerson(String uploadNo, String IDCard, String oldFile, String newFile, String SSXQDM, String cardType, String state, String uploadDate) {
List<PreproPersonEntity> preproPersonEntities = preproPersonMapper.selectPreproPerson(uploadNo, IDCard, oldFile, newFile, SSXQDM, cardType, state, uploadDate); List<PreproPersonEntity> preproPersonEntities = preproPersonMapper.selectPreproPerson(uploadNo, IDCard, oldFile, newFile, SSXQDM, cardType, state, uploadDate);
......
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