Commit 5ce2ccc3 authored by dahai's avatar dahai

Merge branch 'dev' of…

Merge branch 'dev' of http://121.22.111.250:8000/YX_IDENT_auxiliary/YX_IDENT_beijing_auxiliary into dev
parents 8f8a6989 e72a307a
package com.yxproject.start.api;
import com.yxproject.start.entity.FailedCardReasonDicEntity;
import com.yxproject.start.entity.SpecialCardEntity;
import com.yxproject.start.entity.TaskEntity;
import com.yxproject.start.entity.TaskList.TaskListEntity;
......@@ -35,8 +36,8 @@ public class FailedCardApi {
* @return
*/
@RequestMapping("selectFailedCardDic")
public List<String> selectFailedCardDic(){
List<String> resultList= failedCardService.selectFailedCardDic();
public List<FailedCardReasonDicEntity> selectFailedCardDic(){
List<FailedCardReasonDicEntity> resultList= failedCardService.selectFailedCardDic();
return resultList;
}
......@@ -80,15 +81,15 @@ public class FailedCardApi {
return true;
}
/**
* 查询所有废证类型
* @return
*/
@RequestMapping("selectRemainingCardDic")
public List<String> selectRemainingCardDic(){
List<String> resultList= failedCardService.selectFailedCardDic();
return resultList;
}
// /**
// * 查询所有废证类型
// * @return
// */
// @RequestMapping("selectRemainingCardDic")
// public List<String> selectRemainingCardDic(){
// List<String> resultList= failedCardService.selectFailedCardDic();
// return resultList;
// }
/**
* 生成余证(每个余证生成一个任务单)
......
......@@ -158,7 +158,7 @@ public class ReadXmlApi {
for (CountDataEntity countDataEntity :list){
dateCount+=countDataEntity.getCardCount();
commonCount+=countDataEntity.getCommonCardCount();
postCount+= countDataEntity.getPostCardCount();
postCount+=countDataEntity.getPostCardCount();
}
dateMap.put("dateCount",dateCount);
dateMap.put("commonCount",commonCount);
......@@ -168,7 +168,29 @@ public class ReadXmlApi {
mapList.add(dateMap);
}
Map<String,Object> resultMap = new HashMap<>();
if (mapList.size()>=Integer.parseInt(pageSize)){
int max=Integer.parseInt(currPage)*Integer.parseInt(pageSize);
int min = (Integer.parseInt(currPage)-1)*Integer.parseInt(pageSize);
List list = new ArrayList();
if (mapList.size()<max){
for (int i=min-1;i<mapList.size();i++){
list.add(mapList.get(i));
}
}else {
for (int i=min;i<max;i++){
list.add(mapList.get(i));
}
}
resultMap.put("mapList",list);
}else {
resultMap.put("mapList",mapList);
}
resultMap.put("count",mapList.size());
YXJSONResponse yxjsonResponse = new YXJSONResponse();
......
package com.yxproject.start.entity;
import javax.persistence.Entity;
public class CountDataEntity {
private String uploadDate;
......
package com.yxproject.start.mapper;
import com.yxproject.start.entity.FailedCardEntity;
import com.yxproject.start.entity.FailedCardReasonDicEntity;
import com.yxproject.start.entity.SpecialCardEntity;
import org.apache.ibatis.annotations.*;
import org.omg.CORBA.PUBLIC_MEMBER;
......@@ -18,8 +19,8 @@ public interface FailedCardMapper {
* 查询废证字典表,拿到所有废证原因
* @return
*/
@Select("select FAILED_CARD_REASON from FAILED_CARD_REASON_DIC ")
public List<String> selectFailedCardDic();
@Select("select * from FAILED_CARD_REASON_DIC ")
public List<FailedCardReasonDicEntity> selectFailedCardDic();
/**
* 根据身份证号查询详细信息
......
......@@ -15,14 +15,30 @@ public interface FilesMapper {
public long insertFiles(FilesEntity filesEntity);
// @Select("<script> " +
// "select * from (select upload_date upload_Date,count(FILE_ID) package_Count,sum(sumCount) cardCount,FILE_ID,sum(ordinaryCount) commonCardCount,sum(postCount) postCardCount ,rownum rn from (SELECT FILES.upload_date,FILE_ID,count(prepro_person.JMSFZSLH) as sumCount, sum(decode(PREPRO_PERSON.CARD_TYPE_ID,0,1,0)) as ordinaryCount ,sum(decode(PREPRO_PERSON.CARD_TYPE_ID,9,1,0)) as postCount \n" +
// "FROM PREPRO_PERSON left join FILES on PREPRO_PERSON.FILE_ID = FILES.ID \n" +
// "where 1=1 and to_char(FILES.UPLOAD_DATE,'yyyyMMdd')= #{importDate} \n" +
// "group by FILES.upload_date,FILE_ID) group by upload_date, rownum, FILE_ID" +
// ") where rn BETWEEN #{minNum} and #{maxNum} </script>")
// public List<CountDataEntity> selectFiles(@Param("importDate") String importDate,@Param("maxNum")long maxNum,@Param("minNum")long minNum);
@Select("<script> " +
"select * from (select upload_date upload_Date,count(FILE_ID) package_Count,sum(sumCount) cardCount,FILE_ID,sum(ordinaryCount) commonCardCount,sum(postCount) postCardCount ,rownum rn from (SELECT FILES.upload_date,FILE_ID,count(prepro_person.JMSFZSLH) as sumCount, sum(decode(PREPRO_PERSON.CARD_TYPE_ID,0,1,0)) as ordinaryCount ,sum(decode(PREPRO_PERSON.CARD_TYPE_ID,9,1,0)) as postCount \n" +
"select upload_date upload_Date,count(FILE_ID) package_Count,sum(sumCount) cardCount,FILE_ID,sum(ordinaryCount) commonCardCount,sum(postCount) postCardCount ,rownum rn from (SELECT FILES.upload_date,FILE_ID,count(prepro_person.JMSFZSLH) as sumCount, sum(decode(PREPRO_PERSON.CARD_TYPE_ID,0,1,0)) as ordinaryCount ,sum(decode(PREPRO_PERSON.CARD_TYPE_ID,9,1,0)) as postCount \n" +
"FROM PREPRO_PERSON left join FILES on PREPRO_PERSON.FILE_ID = FILES.ID \n" +
"where 1=1 and to_char(FILES.UPLOAD_DATE,'yyyyMMdd')= #{importDate} \n" +
"group by FILES.upload_date,FILE_ID) group by upload_date, rownum, FILE_ID" +
") where rn BETWEEN #{minNum} and #{maxNum} </script>")
"</script> ")
public List<CountDataEntity> selectFiles(@Param("importDate") String importDate,@Param("maxNum")long maxNum,@Param("minNum")long minNum);
@Select({"<script>"+
"select upload_date upload_Date," +
"count(ID) package_Count," +
......
package com.yxproject.start.service;
import com.yxproject.start.entity.FailedCardEntity;
import com.yxproject.start.entity.FailedCardReasonDicEntity;
import com.yxproject.start.entity.SpecialCardEntity;
import org.apache.ibatis.annotations.Param;
......@@ -9,7 +10,7 @@ import java.util.Map;
public interface FailedCardService {
public List<String>selectFailedCardDic();
public List<FailedCardReasonDicEntity>selectFailedCardDic();
public Map<String,Object> selectInfoByCardId(@Param("cardId")String cardId);
......
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.FailedCardEntity;
import com.yxproject.start.entity.FailedCardReasonDicEntity;
import com.yxproject.start.entity.SpecialCardEntity;
import com.yxproject.start.entity.TaskEntity;
import com.yxproject.start.mapper.FailedCardMapper;
......@@ -19,8 +20,8 @@ public class FailedCardServiceImpl implements FailedCardService {
@Autowired
private FailedCardMapper failedCardMapper;
@Override
public List<String> selectFailedCardDic() {
List<String> result= failedCardMapper.selectFailedCardDic();
public List<FailedCardReasonDicEntity> selectFailedCardDic() {
List<FailedCardReasonDicEntity> result= failedCardMapper.selectFailedCardDic();
return result;
}
......
......@@ -819,6 +819,14 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
}).then(function successCallback(response) {
success(response.data)
})
},
getFailedReasonListData:function(success){
$http({
method: 'GET',
url: "../FailedCardApi/selectFailedCardDic"+urlTimeStamp()
}).then(function successCallback(response) {
success(response.data)
})
}
}
});
\ No newline at end of file
......@@ -36,9 +36,7 @@
</td>
<td>
<select class="form-control select2 {{$index}}" id="state">
<option value="1">芯片废</option>
<option value="2">压废</option>
<option value="3">膜废</option>
<option value="{{item.failedCardReasonId}}" ng-repeat="item in failedReason">{{item.failedCardReason}}</option>
</select>
</td>
</tr>
......
......@@ -11,6 +11,11 @@ angular.module('AvatarCheck.addFailed', ['ngRoute', 'AvatarCheck.http'])
.controller('addFailedCtrl', function ($scope, $rootScope, $timeout, HttpService, ngDialog, MessageService, $filter) {
HttpService.getFailedReasonListData(function(data) {
$scope.failedReason = data;
console.log(data)
})
$scope.createInputs = function(){
if($scope.failedCount>0){
var count = $scope.failedCount;
......
......@@ -69,6 +69,7 @@ angular.module('AvatarCheck.xmlAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm.p
HttpService.uploadPackage(fd,function (data) {
if(data){
MessageService.showAlert("上传成功")
$scope.getXmlPackage();
}
})
}
......@@ -106,7 +107,9 @@ angular.module('AvatarCheck.xmlAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm.p
$scope.importDate =uploadDate;
$scope.confirmDelete = function () {
HttpService.deleteProdDataByFileId(uploadDate, function (data) {
MessageService.showAlert(data.msg);
if(data){
MessageService.showAlert("删除成功");
}
$scope.closeThisDialog();
reGet();
})
......
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