Commit ed41c098 authored by suichenguang's avatar suichenguang

废证

parent 752fd9b0
package com.yxproject.start.api;
import com.yxproject.start.service.FailedCardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
/**
* 添加废证
*/
@RestController
@RequestMapping("FailedCardApi")
public class FailedCardApi {
@Autowired
private FailedCardService failedCardService;
/**
* 查询所有废证类型
* @return
*/
@RequestMapping("selectFailedCardDic")
public List<String> selectFailedCardDic(){
List<String> resultList= failedCardService.selectFailedCardDic();
return resultList;
}
/**
* 根据身份证号查询身份信息及组号
* @param cardId
* @return
*/
@RequestMapping("selectInfoByCardId")
public Map<String,Object> selectInfoByCardId(String cardId){
Map<String,Object> resultMap =failedCardService.selectInfoByCardId(cardId);
return resultMap;
}
/**
* 添加废证
* @param failedCardReasonId 废证原因
* @param acceptNo 受理号
* @param taskId 任务单号
* @param initiator 发起工序
* @param note 备注
* @return
*/
@RequestMapping("insertFailedCard")
public Boolean insertFailedCard(String failedCardReasonId,String acceptNo,String taskId,String initiator,String note){
failedCardService.insertFailedCard(failedCardReasonId,acceptNo,taskId,initiator,note);
return true;
}
}
package com.yxproject.start.api;
import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;
import com.yxproject.start.entity.CountyDicEntity;
import com.yxproject.start.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -33,6 +34,10 @@ public class LogApi {
return result;
}
/**
*
* @return
*/
@RequestMapping("selectCountyList")
public List<CountyDicEntity> selectCountyList(){
List<CountyDicEntity> list = logService.getCountyList();
......@@ -46,6 +51,7 @@ public class LogApi {
* @param createDate
* @param uploadCountyCode
* @return
*
*/
@RequestMapping("selectNewFileLogCount")
public String selectNewFileLogCount(@RequestParam("newFileName")String newFileName, @RequestParam("cardId")String cardId,@RequestParam("createDate")String createDate,@RequestParam("uploadCountyCode")String uploadCountyCode){
......@@ -99,6 +105,7 @@ public class LogApi {
@RequestMapping("analysis")
@Transactional(rollbackFor = Exception.class)
public boolean analysis(@RequestParam("printDate")String printDate,@RequestParam("latticeMouthInformation")String latticeMouthInformation){
System.out.println("时间:"+printDate);
logService.changeCardType(replaceDate(printDate),latticeMouthInformation);
logService.insertAnalysisDate(replaceDate(printDate),latticeMouthInformation);
return true;
......
package com.yxproject.start.mapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
/**
* 废证
*/
@Mapper
public interface FailedCardMapper {
/**
* 查询废证字典表,拿到所有废证原因
* @return
*/
@Select("select FAILED_CARD_REASON from FAILED_CARD_REASON_DIC ")
public List<String> selectFailedCardDic();
/**
* 根据身份证号查询详细信息
* @param cardId
* @return
*/
@Select("SELECT PROD_CARD_T.NAME,\n" +
"PROD_CARD_T.SEX_NO,\n" +
"PROD_CARD_T.ID_NO,\n" +
"GROUP_NO.TASK_ID\n" +
"FROM PROD_CARD_T@PROD_LINK\n" +
"LEFT JOIN GROUP_NO ON GROUP_NO=subStr(PROD_CARD_T.ACCEPT_NO,0,8)\n" +
"WHERE PROD_CARD_T.ID_NO=#{cardId}")
public Map<String,Object>selectInfoByCardId(@Param("cardId")String cardId);
/**
* 生成废证
* @param failedCardReasonId
* @param acceptNo
* @param taskId
* @param initiator
* @param note
* @return
*/
@Insert("INSERT INTO FAILED_CARD (FAILED_CARD_REASON_ID,ACCEPT_NO,TASK_ID,STATE,INITIATOR,NOTE) VALUES (#{failedCardReasonId},#{acceptNo},#{taskId},0,#{initiator},#{note})\n")
public boolean insertFailedCard(@Param("failedCardReasonId")String failedCardReasonId,@Param("acceptNo")String acceptNo,@Param("taskId")String taskId,@Param("initiator")String initiator,@Param("note")String note);
}
......@@ -19,7 +19,7 @@ public interface LogMapper {
"LEFT JOIN PERSON_POST ON PERSON_POST.FIRST_WHITE = PREPRO_PERSON.JMSFZSLH\n" +
"LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID\n" +
"where FILES.CREATE_TIME = #{uploadDate}" +
"AND FILE_NAME_DIC.STATE=0")
"")
public List<Map<String,Object>> selectAnalysisData(@Param("uploadDate") String uploadDate);
......@@ -40,8 +40,6 @@ public interface LogMapper {
public boolean insertAnalysisDate(@Param("printDate")String printDate,@Param("latticeMouthInformation")String latticeMouthInformation);
@Select("<script> " +
"SELECT * FROM " +
"( " +
......
......@@ -6,6 +6,9 @@ import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
/**
* 搜索框
*/
@Mapper
public interface SelectSerialNumberMapper {
......
package com.yxproject.start.service;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
public interface FailedCardService {
public List<String>selectFailedCardDic();
public Map<String,Object> selectInfoByCardId(@Param("cardId")String cardId);
public boolean insertFailedCard(@Param("failedCardReasonId")String failedCardReasonId,@Param("acceptNo")String acceptNo,@Param("taskId")String taskId,@Param("initiator")String initiator,@Param("note")String note);
}
package com.yxproject.start.service.impl;
import com.yxproject.start.mapper.FailedCardMapper;
import com.yxproject.start.service.FailedCardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@Service
public class FailedCardServiceImpl implements FailedCardService {
@Autowired
private FailedCardMapper failedCardMapper;
@Override
public List<String> selectFailedCardDic() {
List<String> result= failedCardMapper.selectFailedCardDic();
return result;
}
@Override
public Map<String, Object> selectInfoByCardId(String cardId) {
Map<String,Object> result= failedCardMapper.selectInfoByCardId(cardId);
return result;
}
@Override
public boolean insertFailedCard(String failedCardReasonId, String acceptNo, String taskId, String initiator, String note) {
failedCardMapper.insertFailedCard(failedCardReasonId,acceptNo,taskId,initiator,note);
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