Commit c16f2a49 authored by suichenguang's avatar suichenguang

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

parents 3f874aa6 ff130340
......@@ -5,14 +5,17 @@ import com.yxproject.start.entity.TaskList.CountGajgEntity;
import com.yxproject.start.entity.TaskList.TaskListEntity;
import com.yxproject.start.service.TaskListService;
import com.yxproject.start.utils.YXJSONResponse;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.ibatis.annotations.Param;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import javax.transaction.Transactional;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
......@@ -102,17 +105,47 @@ public class TaskListApi {
/**
* 生成任务单
*
* @param process 工序
* @param date 查询时间
* @param name 提交人姓名
* @param groupList 组号列表
* @param countyList 区县列表 {typeCode:1,countyCode:'123456'}
* @param resp
* @return
*/
@RequestMapping("createTask")
public String queryByCountyAtACCU(@RequestParam("process") String process,@RequestParam("date") String date,@RequestParam("groupList") List<String> groupList,@RequestParam("countyList") String countyList, HttpServletResponse resp){
// taskListService.selectGrouoAtACCU()
return null;
@Transactional
public String queryByCountyAtACCU(@RequestBody String str, HttpServletResponse resp){
System.out.println(str);
JSONObject jsonObject = JSONObject.fromObject(str);
String date = jsonObject.getString("date");
String name = jsonObject.getString("name");
JSONArray jsonCounty = jsonObject.getJSONArray("countyList");
JSONArray jsonGroup = jsonObject.getJSONArray("groupList");
List<Map<String,Object>> countyList =(List<Map<String,Object>>)jsonCounty;
List<String> groupList =(List<String>)jsonGroup;
for (Map<String,Object> map :countyList){
String typeCode = map.get("typeCode").toString();
String countyCode = map.get("countyCode").toString();
List<Object> objects = taskListService.selectGroupAtACCU(date, typeCode, countyCode);
//todo 保存任务单数据
boolean b = taskListService.saveTask(objects,name);
}
if (groupList.size()>0){
//查询组号详情
String groupNo = "(";
for ( int i= 0; i<groupList.size();i++){
if (i!=groupList.size()-1){
groupNo=groupNo+groupList.get(i)+",";
}else {
groupNo=groupNo+groupList.get(i)+")";
}
}
List<Object> objects = taskListService.selectGroupAtACCU(groupNo);
boolean b = taskListService.saveTask(objects,name);
}
//todo 保存任务单数据
return "成功生成循环单";
}
......
......@@ -60,14 +60,31 @@ public interface TaskListMapper {
"left join county_dic on substr(PREPRO_PERSON.JMSFZSLH,0,6)= county_dic.COUNTY_CODE\n" +
"where county_dic.COUNTY_CODE is not null and ACC_GROUP_T.deal_flag =3 and to_char(ACC_GROUP_T.IMPORT_TIME,'yyyyMMdd')= #{date}\n" +
"and PREPRO_PERSON.card_type_id =#{typeCode} and substr(PREPRO_PERSON.JMSFZSLH,0,6) =#{countyCode}")
public List<Map<String,Object>> selectGrouoAtACCU(@Param("date") String date,@Param("typeCode") String typeCode,@Param("countyCode") String countyCode);
public List<Map<String,Object>> selectGroupAtACCUByCountyCode(@Param("date") String date,@Param("typeCode") String typeCode,@Param("countyCode") String countyCode);
/**
* 查询组号列表
* 受理库
* @param groupNo 组号信息
* @return
*/
@Select("select DISTINCT CARD_TYPE_DIC.card_type_id, ACC_GROUP_T.group_no ,ACC_GROUP_T.valid_count,ACC_GROUP_T.invalid_count, county_dic.county_code\n" +
"from ACC_CARD_T@ACCU_LINK \n" +
"left join PREPRO_PERSON on PREPRO_PERSON.JMSFZSLH = acc_card_t.upload_no \n" +
"left join ACC_GROUP_T@ACCU_LINK on substr(acc_card_t.accept_no,0,8) = ACC_GROUP_T.group_no\n" +
"left join CARD_TYPE_DIC on PREPRO_PERSON.card_type_id = CARD_TYPE_DIC.CARD_TYPE_ID\n" +
"left join county_dic on substr(PREPRO_PERSON.JMSFZSLH,0,6)= county_dic.COUNTY_CODE\n" +
"where county_dic.COUNTY_CODE is not null and ACC_GROUP_T.deal_flag =3 and" +
" ACC_GROUP_T.group_no in #{groupNo} ")
public List<Map<String,Object>> selectGroupAtACCUByGroupNo(@Param("groupNo") String groupNo);
/**
* 生成任务单
* @param taskEntity 任务单
* @return
*/
@Insert("insert into task (CARD_TYPE,COUNTY_CODE,SUBMIT_DATE,SUBMIT_NAME) values(#{cardType},#{countyCode},#{submitDate},#{submitName})")
@Insert("insert into task (CARD_TYPE,COUNTY_CODE,SUBMIT_NAME) values(#{cardType},#{countyCode},#{submitName})")
@Options(useGeneratedKeys=true, keyProperty="taskId", keyColumn="TASK_ID")
public boolean saveTask(TaskEntity taskEntity);
......
......@@ -22,7 +22,11 @@ public interface TaskListService {
public List<Object> selectByCountyAtACCU(String date);
public List<Object> selectGrouoAtACCU(String date,String typeCode,String countyCode);
public List<Object> selectGroupAtACCU(String date,String typeCode,String countyCode);
public List<Object> selectGroupAtACCU(String groupNo);
public boolean saveTask(TaskEntity taskEntity);
public boolean saveTask(List<Object> list,String submitName);
}
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.GroupNoEntity;
import com.yxproject.start.entity.TaskEntity;
import com.yxproject.start.entity.TaskList.CountCountyEntity;
import com.yxproject.start.entity.TaskList.CountGajgEntity;
import com.yxproject.start.entity.TaskList.TaskListEntity;
import com.yxproject.start.mapper.GroupNoMapper;
import com.yxproject.start.mapper.TaskListMapper;
import com.yxproject.start.service.TaskListService;
import org.apache.ibatis.annotations.Mapper;
......@@ -20,6 +22,8 @@ import java.util.Map;
public class TaskListServiceImpl implements TaskListService {
@Autowired
private TaskListMapper taskListMapper;
@Autowired
private GroupNoMapper groupNoMapper;
@Override
public List<CountCountyEntity> selectByCounty(String submitDate) {
......@@ -154,8 +158,19 @@ public class TaskListServiceImpl implements TaskListService {
* @return
*/
@Override
public List selectGrouoAtACCU(String date,String typeCode,String countyCode) {
return taskListMapper.selectGrouoAtACCU(date,typeCode,countyCode);
public List selectGroupAtACCU(String date,String typeCode,String countyCode) {
return taskListMapper.selectGroupAtACCUByCountyCode(date,typeCode,countyCode);
}
/**
* 查询组号信息
* 受理库
* @param groupNo 受理组号
* @return
*/
@Override
public List selectGroupAtACCU(String groupNo) {
return taskListMapper.selectGroupAtACCUByGroupNo(groupNo);
}
/**
......@@ -168,6 +183,32 @@ public class TaskListServiceImpl implements TaskListService {
return taskListMapper.saveTask(taskEntity);
}
/**
* 保存循环单
* @param list
* @return
*/
@Override
public boolean saveTask(List<Object> list,String submitName) {
Map<String,Object> stringObjectMap =(Map<String,Object>)list.get(0);
TaskEntity taskEntity = new TaskEntity();
taskEntity.setCardType(Long.valueOf(stringObjectMap.get("CARD_TYPE_ID")+""));
taskEntity.setCountyCode(stringObjectMap.get("COUNTY_CODE")+"");
taskEntity.setSubmitName(submitName);
saveTask(taskEntity);
for (Object object :list){
Map<String,Object> map =(Map<String,Object>)object;
GroupNoEntity groupNoEntity = new GroupNoEntity();
groupNoEntity.setGroupNo(map.get("GROUP_NO")+"");
groupNoEntity.setInvalidCount(Long.valueOf(map.get("INVALID_COUNT")+""));
groupNoEntity.setValidCount(Long.valueOf(map.get("VALID_COUNT")+""));
groupNoEntity.setSpecialCardCount((long)0);
groupNoEntity.setTaskId(taskEntity.getTaskId());
groupNoMapper.saveGroupNo(groupNoEntity);
}
return true;
}
private String createGroupNo(List<Integer> c, List<Integer> nsList) {
try {
String groupNo = "";
......
......@@ -297,7 +297,30 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success(response.data)
})
},
// selectPackageLogCount:
selectPackageLogCount:function (newPackageName,idCard,date,county,success) {
if(angular.isUndefined(newPackageName)){
newPackageName='';
}
if(angular.isUndefined(idCard)){
idCard='';
}
if(angular.isUndefined(county)){
county = -1;
}
console.log(newPackageName,idCard,date,county)
$http({
method: 'GET',
url: "../LogApi/selectNewFileLogCount"+urlTimeStamp(),
params:{
newFileName:newPackageName,
cardId:idCard,
createDate:date,
uploadCountyCode:county
}
}).then(function successCallback(response) {
success(response.data)
})
},
selectPackageLog:function(newPackageName,idCard,date,county,currentPage,itemsPerPage,success){
if(angular.isUndefined(newPackageName)){
newPackageName='';
......
......@@ -30,7 +30,7 @@
<div class="content row">
<div class="col-md-12" style="margin-top:20px;">
<div class="box box-primary">
<strong class="box-header">制证信息打包</strong>
<strong class="box-header">制证信息管理</strong>
<div class="box-info">
<table class="table table-bordered" style="margin-bottom: 0;">
<tr>
......@@ -133,7 +133,7 @@
<div style="padding-left: 27%;" ng-if="xmlDatas">
<tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div>
<h3 ng-if="postData.length==0">暂无记录。</h3>
<h4 ng-if="postData.length==0">暂无记录。</h4>
</div>
</div>
</div>
......
......@@ -143,7 +143,7 @@
<div style="padding-left: 27%;" >
<tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div>
<h3 ng-if="postPackageData.length==0">暂无记录。</h3>
<div class="box-body" ng-if="postPackageData.length==0"><h4>暂无记录</h4></div>
<div class="row" style="padding:0 25px;" ng-if="postMsgDetail.length>0">
<div class="col-md-11"></div>
<div class="col-md-1" style="text-align: right;">
......
......@@ -66,7 +66,7 @@
</tr>
</table>
<table class="table table-bordered table-hover postTable" ng-if="packageLogData">
<table class="table table-bordered table-hover postTable" ng-if="packageLogData.length>0">
<thead>
<tr>
<th>NO.</th>
......@@ -80,17 +80,20 @@
<tbody>
<tr ng-repeat="item in packageLogData">
<td>{{$index+1}}</td>
<td>{{item.newPackageName}}</td>
<td>{{item.createDate}}</td>
<td>{{item.cardCount}}</td>
<td>{{item.readCountyCode}}</td>
<td>{{item.readCountyName}}</td>
<td>{{item.NEW_FILE_NAME}}</td>
<td>{{item.CREATE_DATE | myDateFilter}}</td>
<td>{{item.RECORD_NUMBER}}</td>
<td>{{item.DWDM}}</td>
<td>{{item.DWMC}}</td>
</tr>
</tbody>
</table>
<div style="padding-left: 27%;" ng-if="packageLogData">
<tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div>
<div ng-if="packageLogData.length==0" class="box-body">
<h4>暂无数据</h4>
</div>
<div style="padding-left: 27%;" ng-if="packageLogData.length>0">
<tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div>
</div>
</div>
</div>
......
......@@ -35,7 +35,8 @@ angular.module('AvatarCheck.packageLog', ['ngRoute', 'AvatarCheck.http', 'tm.pag
$scope.getPackageLog = function(){
HttpService.selectPackageLogCount($scope.newPackageName,$scope.idCard,$('#datepicker').val(),$scope.county,function (data) {
$scope.paginationConf.totalItems = data.totalCount;
console.log(data)
$scope.paginationConf.totalItems = data;
console.log($scope.paginationConf.totalItems)
})
HttpService.selectPackageLog($scope.newPackageName,$scope.idCard,$('#datepicker').val(),$scope.county,$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage,function(data){
......
......@@ -119,7 +119,7 @@
<div style="padding-left: 27%;">
<tm-pagination ng-if="show" conf="paginationConf" class="ul"></tm-pagination>
</div>
<h3 ng-if="postData.length==0">暂无记录。</h3>
<h4 ng-if="postData.length==0">暂无记录。</h4>
</div>
</div>
</div>
......
......@@ -97,7 +97,9 @@
<div style="padding-left: 27%;">
<tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div>
<h3 ng-if="xmlPackageData.length==0">暂无记录。</h3>
<div class="box-body" ng-if="xmlPackageData.length==0">
<h4>暂无记录。</h4>
</div>
<div class="row" style="padding:0 25px;" ng-if="postMsgDetail.length>0">
<div class="col-md-11"></div>
<div class="col-md-1" style="text-align: right;">
......
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