Commit 247ca55a authored by dahai's avatar dahai

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

parents fed0bbe4 6bb2509f
package com.yxproject.start.api;
import com.yxproject.start.service.FailedCardService;
import net.sf.json.JSON;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
......@@ -28,28 +33,34 @@ public class FailedCardApi {
}
/**
* 根据身份证号查询身份信息及组号
* @param cardId
* 根据身份证号或受理号查询身份信息及组号
* @param jsonStr
* @return
*/
@RequestMapping("selectInfoByCardId")
public Map<String,Object> selectInfoByCardId(String cardId){
Map<String,Object> resultMap =failedCardService.selectInfoByCardId(cardId);
return resultMap;
public List<Map<String,Object>> selectInfoByCardId(@RequestBody String jsonStr){
JSONArray jsonarray = JSONArray.fromObject(jsonStr);
List<Map<String,Object>> resultList=new ArrayList<>();
for (Object o:jsonarray) {
Map<String,Object> resultMap =failedCardService.selectInfoByCardId(o.toString());
resultList.add(resultMap);
}
return resultList;
}
/**
* 添加废证
* @param failedCardReasonId 废证原因
* @param acceptNo 受理号
* @param taskId 任务单号
* @param initiator 发起工序
* @param note 备注
* @param jsonStr
* @return
*/
@RequestMapping("insertFailedCard")
public Boolean insertFailedCard(String failedCardReasonId,String acceptNo,String taskId,String initiator,String note){
failedCardService.insertFailedCard(failedCardReasonId,acceptNo,taskId,initiator,note);
public Boolean insertFailedCard(@RequestBody String jsonStr){
JSONArray jsonarray = JSONArray.fromObject(jsonStr);
for (Object o:jsonarray){
JSONObject jsonObject =(JSONObject)o;
Map<String,Object> idMap= failedCardService.selectCountIdByCardId(jsonObject.get("cardId").toString());
failedCardService.insertFailedCard(jsonObject.get("failedCardReasonId").toString(),idMap.get("acceptNo").toString(),idMap.get("taskId").toString(),jsonObject.get("initiator").toString(),jsonObject.get("note").toString());
}
return true;
}
......
......@@ -4,6 +4,7 @@ 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 org.omg.CORBA.PUBLIC_MEMBER;
import java.util.List;
import java.util.Map;
......@@ -28,10 +29,8 @@ public interface FailedCardMapper {
*/
@Select("SELECT PROD_CARD_T.NAME,\n" +
"PROD_CARD_T.SEX_NO,\n" +
"PROD_CARD_T.ID_NO,\n" +
"GROUP_NO.TASK_ID\n" +
"PROD_CARD_T.ID_NO\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} OR PROD_CARD_T.ACCEPT_NO=#{cardId}")
public Map<String,Object>selectInfoByCardId(@Param("cardId")String cardId);
......@@ -49,5 +48,10 @@ public interface FailedCardMapper {
public boolean insertFailedCard(@Param("failedCardReasonId")String failedCardReasonId,@Param("acceptNo")String acceptNo,@Param("taskId")String taskId,@Param("initiator")String initiator,@Param("note")String note);
@Select("SELECT PROD_CARD_T.ACCEPT_NO,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} or PROD_CARD_T.ACCEPT_NO=#{cardId}")
public Map<String,Object> selectCountIdByCardId(String cardId);
}
......@@ -53,9 +53,9 @@ public interface LogMapper {
"LEFT JOIN PERSON_POST ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID " +
"LEFT JOIN FILES ON FILES.ID=FILE_NAME_DIC.FILE_ID " +
"left join PREPRO_PERSON on PREPRO_PERSON.JMSFZSLH = person_post.FIRST_WHITE " +
"WHERE " +
"WHERE 1=1" +
"<if test='fileName !=\"\"' >" +
"FILE_NAME_DIC.FILE_NAME=#{fileName} " +
" and FILE_NAME_DIC.FILE_NAME=#{fileName} " +
"</if>" +
"<if test='analysisDate !=\"\"' >" +
"AND FILE_NAME_DIC.ANALYSIS_DATE = #{analysisDate} " +
......@@ -84,7 +84,7 @@ public interface LogMapper {
" and NEW_FILES.DWDM=#{uploadCountyCode}" +
" </if>" +
" <if test='createDate !=\"\"' >" +
" and substr(NEW_FILES.CREATE_DATE,0,8)=#{createDate}" +
" and NEW_FILES.CREATE_DATE=#{createDate}" +
" </if>" +
" <if test='cardId !=\"\"' >" +
" and PREPRO_PERSON.GMSFHM=#{cardId} " +
......@@ -124,16 +124,16 @@ public interface LogMapper {
"LEFT JOIN PERSON_POST ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID " +
"LEFT JOIN FILES ON FILES.ID=FILE_NAME_DIC.FILE_ID " +
"left join PREPRO_PERSON on PREPRO_PERSON.JMSFZSLH = person_post.FIRST_WHITE " +
" where 1=1 " +
" <if test='fileName !=\"\"' >" +
" and NEW_FILES.NEW_FILE_NAME=#{fileName} " +
" </if>" +
" <if test='analysisTime != -1' >" +
" and NEW_FILES.DWDM=#{analysisTime}" +
" </if>" +
"where 1=1 " +
"<if test='fileName !=\"\"' >" +
"and NEW_FILES.NEW_FILE_NAME=#{fileName} " +
"</if>" +
"<if test='analysisDate !=\"\"' >" +
"AND FILE_NAME_DIC.ANALYSIS_DATE = #{analysisDate} " +
"</if>" +
"group by FILE_NAME_DIC.FILE_NAME, FILE_NAME_DIC.FORM_START_TIME, " +
"FILE_NAME_DIC.FORM_DEADLINE, PERSON_POST.LATTICE_MOUTH_INFORMATION, " +
"FILE_NAME_DIC.ANALYSIS_DATE, FILES.RECORD_NUMBER" +
"</script>")
public String selectAnalysisLogCount(@Param("fileName")String fileName, @Param("analysisTime")String analysisTime);
public String selectAnalysisLogCount(@Param("fileName")String fileName, @Param("analysisDate")String analysisDate);
}
package com.yxproject.start.service;
import org.apache.ibatis.annotations.Param;
import org.omg.CORBA.PUBLIC_MEMBER;
import java.util.List;
import java.util.Map;
......@@ -13,4 +14,5 @@ public interface FailedCardService {
public boolean insertFailedCard(@Param("failedCardReasonId")String failedCardReasonId,@Param("acceptNo")String acceptNo,@Param("taskId")String taskId,@Param("initiator")String initiator,@Param("note")String note);
public Map<String,Object> selectCountIdByCardId(String cardId);
}
......@@ -20,7 +20,7 @@ public class FailedCardServiceImpl implements FailedCardService {
@Override
public Map<String, Object> selectInfoByCardId(String cardId) {
Map<String,Object> result= failedCardMapper.selectInfoByCardId(cardId);
Map<String, Object> result= failedCardMapper.selectInfoByCardId(cardId);
return result;
}
......@@ -29,4 +29,10 @@ public class FailedCardServiceImpl implements FailedCardService {
failedCardMapper.insertFailedCard(failedCardReasonId,acceptNo,taskId,initiator,note);
return true;
}
@Override
public Map<String, Object> selectCountIdByCardId(String cardId) {
Map<String, Object> result= failedCardMapper.selectCountIdByCardId(cardId);
return result;
}
}
<div class="ui-dialog-title">
确认信息
</div>
<div class="ui-dialog-content">
<table class="table table-responsive table-hover">
<thead>
<th>NO.</th>
<th>身份证号</th>
<th>姓名</th>
<th>性别</th>
<th>任务单编号</th>
</thead>
<tbody>
<tr ng-repeat="item in personInfo">
<td>{{$index + 1}}</td>
<td>{{item.idCard}}</td>
<td>{{item.name}}</td>
<td ng-if="item.sex==1"></td>
<td ng-if="item.sex==2"></td>
<td>{{item.taskId}}</td>
</tr>
</tbody>
</table>
</div>
<div class="ui-dialog-confirm">
<button type="submit" class="btn btn-info" ng-click="confirmAdd()">确定添加</button>
<button type="submit" class="btn btn-danger" ng-click="closeThisDialog()">取消</button>
</div>
......@@ -23,7 +23,7 @@ angular.module('AvatarCheck', [
'AvatarCheck.analysisLog',
'AvatarCheck.packageLog',
'AvatarCheck.tagPrint',
'tm.pagination'
'tm.pagination',
]).config(['$locationProvider', '$routeProvider', 'localStorageServiceProvider', '$qProvider',function ($locationProvider, $routeProvider, localStorageServiceProvider, $qProvider) {
$locationProvider.hashPrefix('!');
$routeProvider.otherwise({redirectTo: '/createTaskList'});
......
......@@ -30,7 +30,7 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
}
})
.service('HttpService', function ($http, $rootScope, MessageService, localStorageService, ngDialog) {
.service('HttpService', function ($http, $rootScope, MessageService, localStorageService, ngDialog,$filter) {
return {
doPostAndGetData:function(data,success){
var body = JSON.stringify(data);
......@@ -264,9 +264,12 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
if(angular.isUndefined(oldPackageName)){
oldPackageName='';
}
if(date==""){
date=$filter("date")(new Date(), "yyyy-MM-dd");
}
$http({
method: 'GET',
url: "../LogApi/selectByAnalysisLogCount"+urlTimeStamp(),
url: "../LogApi/selectAnalysisLogCount"+urlTimeStamp(),
params:{
fileName:oldPackageName,
analysisTime:date
......@@ -279,6 +282,10 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
if(angular.isUndefined(oldPackageName)){
oldPackageName='';
}
if(date==""){
date=$filter("date")(new Date(), "yyyy-MM-dd");
}
console.log(oldPackageName,date)
$http({
method: 'GET',
url: "../LogApi/selectByAnalysisLog"+urlTimeStamp(),
......@@ -431,6 +438,28 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
}).then(function successCallback(response) {
success(response.data)
})
},
getPersonInfo:function(idCardArr,success){
var body = JSON.stringify(idCardArr);
$http({
method: 'POST',
url: "../FailedCardApi/selectInfoByCardId",
data: body,
headers: {'Content-Type': 'application/json'}
}).then(function successCallback(response) {
success(response.data)
})
},
addFailedCard:function(data,succuss){
var body = JSON.stringify(idCardArr);
$http({
method: 'POST',
url: "../FailedCardApi/selectInfoByCardId",
data: body,
headers: {'Content-Type': 'application/json'}
}).then(function successCallback(response) {
success(response.data)
})
}
}
});
\ No newline at end of file
......@@ -23,28 +23,28 @@
身份证号:
</td>
<td>
<input type="text" placeholder="请填写身份证号" style="height: 34px;">
<input type="text" placeholder="请填写身份证号" class="{{$index}}" style="height: 34px;">
</td>
<td>
废证原因:
</td>
<td>
<input type="text" placeholder="请填写废证原因" style="height: 34px;">
<input type="text" placeholder="请填写废证原因" class="{{$index}}" style="height: 34px;">
</td>
<td>
废证类型:
</td>
<td>
<select class="form-control select2" id="state">
<option value="">芯片废</option>
<option value="">压废</option>
<option value="">膜废</option>
<select class="form-control select2 {{$index}}" id="state">
<option value="1">芯片废</option>
<option value="2">压废</option>
<option value="3">膜废</option>
</select>
</td>
</tr>
</table>
<div ng-if="arr.length>0" style="text-align: right;">
<button class="btn btn-primary">添加</button>
<button class="btn btn-primary" ng-click="addFailed()">添加</button>
<button class="btn btn-danger" ng-click="cancelAdd()">取消</button>
</div>
</div>
......
......@@ -22,4 +22,50 @@ angular.module('AvatarCheck.addFailed', ['ngRoute', 'AvatarCheck.http'])
$scope.cancelAdd =function(){
$scope.arr = [];
}
$scope.addFailed = function(){
var array = [];
for(var i=0;i<$scope.arr.length;i++){
for (var j=0;j<$("."+i).length;j++){
array.push($("."+i)[j].value)
}
}
var result = [];
for (var i = 0, j = array.length; i < j; i += 3) {
result.push(array.slice(i, i + 3));
}
var list=[];
for (var i=0;i<result.length;i++){
var json = {};
json.idCard=result[i][0];
json.reason=result[i][1];
json.failedType=result[i][2];
list.push(json)
}
console.log(list)
ngDialog.open({
template: 'dialogs/confirmFailedCards.html' + urlTimeStamp(),
width: 800,
cache: false,
closeByDocument:false,
controller: ['$scope', 'HttpService','MessageService',function ($scope,HttpService,MessageService) {
var idCardArr =[];
for(var i=0;i<list.length;i++){
idCardArr.push(list[i].idCard);
}
HttpService.getPersonInfo(idCardArr,function(data){
$scope.personInfo = data;
console.log($scope.personInfo)
})
$scope.confirmAdd = function(){
HttpService.addFailedCard(list,function(data){
$scope.closeThisDialog();
MessageService.showAlert("添加成功");
console.log($scope.cancelAdd)
})
}
}]
});
}
});
\ No newline at end of file
......@@ -23,17 +23,20 @@ angular.module('AvatarCheck.analysisLog', ['ngRoute', 'AvatarCheck.http', 'tm.pa
$scope.choseDate = $filter("date")(new Date(), "yyyy-MM-dd");
$scope.paginationConf = {
currentPage: 1,
itemsPerPage: 10,
perPageOptions: [10, 20, 30, 40, 50]
};
$scope.getAnalyseLog = function(){
HttpService.selectAnalyseLogCount($scope.oldPackageName,$("#datepicker").val(),function (data) {
$scope.paginationConf.totalItems = data;
console.log($scope.paginationConf.totalItems)
})
// HttpService.selectAnalyseLogCount($scope.oldPackageName,$("#datepicker").val(),function (data) {
// $scope.paginationConf.totalItems = data;
// console.log($scope.paginationConf.totalItems)
// })
console.log($scope.oldPackageName,document.getElementById("datepicker").value)
HttpService.selectAnalyseLog($scope.oldPackageName,$("#datepicker").val(),$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage,function(data){
$scope.analyseLog = data;
console.log($scope.analyseLog)
......
......@@ -85,7 +85,6 @@
<!-- /.table -->
<div class="box-footer" style="text-align: right;">
<button class="btn btn-primary" ng-click="createTaskList(type.typeCode)">创建任务单</button>
<button class="btn btn-primary">下发任务单</button>
</div>
</div>
......
......@@ -152,10 +152,12 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
date:$('#datepicker').val(),
name:$rootScope.loginData.name,
countyList:arr,
groupList:groupList
groupList:groupList,
tag:0
}
HttpService.createTask(map,function(data){
console.log(data);
MessageService.showAlert("创建成功")
$scope.searchCurrent();
})
}
......
<div class="content row">
<div class="col-md-12" style="margin-top:20px;">
交接单
</div>
</div>
<div class="content row">
<div class="col-md-12" style="margin-top:20px;">
<div class="row">
<!-- /.col -->
<div class="col-md-12">
<div class="box box-primary">
<div class="box-header with-border">
<strong>交接单</strong>
<div class="box-tools pull-right">
<input type="text" style="height: 30px;margin-right: 10px;border-radius: 4px;background-color: #eee;cursor: not-allowed;border: 1px solid #ccc;" ng-model="choseDate" id="datepicker" readonly/>
<button type="button" class="btn btn-primary pull-right" style="height: 30px;line-height: 17px;margin-left: 10px;" ng-click="searchToday()">当前</button>
<button type="button" class="btn btn-primary pull-right" style="height: 30px;line-height: 17px;" ng-click="searchHistory()">查询历史</button>
</div>
<!-- /.box-tools -->
</div>
<!-- /.box-header -->
<div class="box-body">
<div class="table-responsive mailbox-messages">
<table class="table table-hover postTable ">
<thead>
<tr>
<th><input type="checkbox" class="icheckbox_flat-blue"></th>
<th>NO.</th>
<th>派出所代码</th>
<th>派出所名称</th>
<th>数量</th>
<th>打印卸载</th>
<th>电质检</th>
<th>复核日期</th>
<th>复核人姓名</th>
</tr>
</thead>
<tbody>
<tr ng-click="showDetail(1)" style="background-color: #eee">
<td><input type="checkbox" class="icheckbox_flat-blue"></td>
<td></td>
<td>11002</td>
<td style="color: #3c8dbc">通州分局</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr ng-click="showDetail(1)">
<td><input type="checkbox" class="icheckbox_flat-blue"></td>
<td>1</td>
<td>110021</td>
<td>西集派出所</td>
<td>2</td>
<td>2</td>
<td>0</td>
<td>2019-03-06</td>
<td>安浩</td>
</tr>
<tr ng-click="showDetail(2)">
<td><input type="checkbox" class="icheckbox_flat-blue"></td>
<td>2</td>
<td>110021</td>
<td>马驹桥派出所</td>
<td>3</td>
<td>3</td>
<td>3</td>
<td>2019-03-06</td>
<td>安浩</td>
</tr>
<tr ng-click="showDetail(2)">
<td><input type="checkbox" class="icheckbox_flat-blue"></td>
<td>3</td>
<td>110021</td>
<td>次渠派出所</td>
<td>3</td>
<td>3</td>
<td>3</td>
<td>2019-03-06</td>
<td>安浩</td>
</tr>
<tr ng-click="showDetail(2)">
<td><input type="checkbox" class="icheckbox_flat-blue"></td>
<td>4</td>
<td>110021</td>
<td>梨园派出所</td>
<td>3</td>
<td>3</td>
<td>3</td>
<td>2019-03-06</td>
<td>安浩</td>
</tr>
<tr ng-click="showDetail(1)" style="background-color: #eee">
<td><input type="checkbox" class="icheckbox_flat-blue"></td>
<td></td>
<td>11003</td>
<td style="color: #3c8dbc">房山分局</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr ng-click="showDetail(1)">
<td><input type="checkbox" class="icheckbox_flat-blue"></td>
<td>1</td>
<td>110031</td>
<td>城关派出所</td>
<td>2</td>
<td>2</td>
<td>0</td>
<td>2019-03-06 16:30</td>
<td>安浩</td>
</tr>
<tr ng-click="showDetail(2)">
<td><input type="checkbox" class="icheckbox_flat-blue"></td>
<td>2</td>
<td>110031</td>
<td>石楼派出所</td>
<td>3</td>
<td>3</td>
<td>3</td>
<td>2019-03-06 16:30</td>
<td>安浩</td>
</tr>
<tr ng-click="showDetail(2)">
<td><input type="checkbox" class="icheckbox_flat-blue"></td>
<td>3</td>
<td>110023</td>
<td>琉璃河派出所</td>
<td>3</td>
<td>3</td>
<td>3</td>
<td>2019-03-06 16:30</td>
<td>安浩</td>
</tr>
<tr ng-click="showDetail(2)">
<td><input type="checkbox" class="icheckbox_flat-blue"></td>
<td>4</td>
<td>110034</td>
<td>良乡派出所</td>
<td>3</td>
<td>3</td>
<td>3</td>
<td>2019-03-06 16:30</td>
<td>安浩</td>
</tr>
</tbody>
</table>
<!-- /.table -->
</div>
<!-- /.mail-box-messages -->
</div>
<!-- /.box-body -->
<div class="box-footer">
<div class="pull-right" style="margin-left: 10px;">
<button class="btn btn-primary" ng-click="goes()">生成交接单</button>
</div>
</div>
</div>
<!-- /. box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
</div>
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