Commit a86da907 authored by suichenguang's avatar suichenguang

数据解析

parent 9651b5f6
package com.yxproject.start.api;
import com.yxproject.start.service.PersonPostService;
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("FilesAnalysis")
public class FilesAnalysisApi {
@Autowired
private PersonPostService personPostService;
@RequestMapping("anailsis")
public boolean filesAnailsis(@RequestParam(value = "fileId") String fileId,@RequestParam(value = "creatTime") String creatTime){
personPostService.updateIsPost(fileId,creatTime);
return true;
}
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.PersonPostEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.*;
import org.omg.CORBA.PUBLIC_MEMBER;
import java.util.List;
/**
* @auther zhangyusheng
......@@ -10,7 +12,23 @@ import org.apache.ibatis.annotations.Update;
*/
@Mapper
public interface PersonPostMapper {
@Update("update PERSON_POST set WAYBILL_NUMBER=#{waybillNumber},BACK_WAYBILL_NUMBER=#{backWaybillNumber},ORDER_NUMBER=#{orderNumber},CREATE_DATE=#{createDate},OPENID=#{openid},WC_PLAY_ORDER_NUMBER=#{wcPlayOrderNumber},PLAY_STATE=#{playState},ORDER_STATE=#{orderState},,APPLICANT_NAME=#{applicantName},SENDER_NAME=#{senderName},SENDER_PHONE=#{senderPhone},SENDER_ADDRESS=#{senderAddress},RECIPIENT_NAME=#{recipientName},RECIPIENT_PHONE=#{recipientPhone},RECIPIENT_ADDRESS=#{recipientAddress},ORDER_BLANK_NUMBER=#{orderBlankNumber},GET_TO_PROVINCE=#{getToProvince},GET_TO_CITY=#{getToCity},GET_TO_COUNTY=#{getToCounty},BUSINESS_TYPE=#{businessType},LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation},NATURE_OF_THE_INTERNAL=#{natureOfTheInternal},NATURE_OF_THE_INFORMATION=#{natureOfTheInformation},FIRST_WHITE=#{firstWhite}")
public boolean updatePersonPost(PersonPostEntity personPostEntity);
@Update("update prepro_person p \n" +
"set IS_POST=1\n" +
"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);
}
......@@ -3,8 +3,11 @@ package com.yxproject.start.mapper;
import com.yxproject.start.entity.PreproPersonEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;
/**
* Created by Administrator on 2019/2/15.
*/
......@@ -21,4 +24,6 @@ public interface PreproPersonMapper {
/*更新制证数据是否邮寄*/
@Update("UPDATE PREPRO_PERSON SET IS_POST=#{isPost} where JMSFZSLH=#{jmsfzslh}")
public boolean updatePreproPersonEntity(PreproPersonEntity personEntity);
}
......@@ -13,4 +13,12 @@ public interface PersonPostService {
* 导入个人邮寄异常信息
*/
public boolean updatePersonPost(List<PersonPostEntity> personPostEntities);
/**
* 解析制证包
* @param fileId
* @param creatTime
* @return
*/
public boolean updateIsPost(String fileId,String creatTime);
}
......@@ -33,4 +33,10 @@ public class PersonPostServiceImpl implements PersonPostService {
}
return true;
}
@Override
public boolean updateIsPost(String fileId, String creatTime) {
personPostMapper.updateIsPost(fileId,creatTime);
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