Commit add5b498 authored by Administrator's avatar Administrator

修改保存制证任务单在受理库

parent 2c03b2eb
package com.yxproject.start.config; package com.yxproject.start.config;
import com.alibaba.druid.pool.DruidDataSourceFactory;
import com.yxproject.start.utils.DatabaseType;
import com.yxproject.start.utils.DynamicDataSource;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
import org.apache.shiro.mgt.SecurityManager;
import org.apache.shiro.realm.Realm;
import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor;
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
import org.apache.shiro.spring.web.config.DefaultShiroFilterChainDefinition; import org.apache.shiro.spring.web.config.DefaultShiroFilterChainDefinition;
import org.apache.shiro.spring.web.config.ShiroFilterChainDefinition; import org.apache.shiro.spring.web.config.ShiroFilterChainDefinition;
import org.apache.shiro.web.mgt.DefaultWebSecurityManager; import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator; import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.core.env.Environment;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.web.servlet.handler.SimpleMappingExceptionResolver;
import javax.sql.DataSource;
import java.util.*;
/** /**
* @author Administrator * @author Administrator
......
package com.yxproject.start.entity; package com.yxproject.start.entity;
import javax.persistence.*; import javax.persistence.*;
import java.sql.Time;
import java.util.Date; import java.util.Date;
import java.util.Objects; import java.util.Objects;
......
package com.yxproject.start.service; package com.yxproject.start.service;
import com.yxproject.start.entity.CardBodyEntity; import com.yxproject.start.entity.CardBodyEntity;
import com.yxproject.start.entity.GroupNoEntity;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
......
package com.yxproject.start.service; package com.yxproject.start.service;
import com.yxproject.start.entity.CityListEntity;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.yxproject.start.entity.*;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Created by Administrator on 2018/12/19. * Created by Administrator on 2018/12/19.
......
...@@ -2,9 +2,7 @@ package com.yxproject.start.service; ...@@ -2,9 +2,7 @@ package com.yxproject.start.service;
import com.yxproject.start.entity.CountyListEntity; import com.yxproject.start.entity.CountyListEntity;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
public interface CountyListService { public interface CountyListService {
......
...@@ -5,7 +5,6 @@ import com.yxproject.start.entity.GroupNoEntity; ...@@ -5,7 +5,6 @@ import com.yxproject.start.entity.GroupNoEntity;
import com.yxproject.start.entity.SpecialCardEntity; import com.yxproject.start.entity.SpecialCardEntity;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Created by zhangyusheng on 2018/10/30 10:01 * Created by zhangyusheng on 2018/10/30 10:01
......
...@@ -3,7 +3,6 @@ package com.yxproject.start.service; ...@@ -3,7 +3,6 @@ package com.yxproject.start.service;
import com.yxproject.start.entity.FailedTypeEntity; import com.yxproject.start.entity.FailedTypeEntity;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Created by Administrator on 2018/12/26. * Created by Administrator on 2018/12/26.
......
package com.yxproject.start.service; package com.yxproject.start.service;
import com.yxproject.start.entity.AccCardTEntity;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
......
...@@ -3,7 +3,6 @@ package com.yxproject.start.service; ...@@ -3,7 +3,6 @@ package com.yxproject.start.service;
import com.yxproject.start.entity.FindStationCountByViewEntity; import com.yxproject.start.entity.FindStationCountByViewEntity;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Created by Administrator on 2018/11/29. * Created by Administrator on 2018/11/29.
......
package com.yxproject.start.service; package com.yxproject.start.service;
import com.yxproject.start.entity.FindTaskByDealdateViewEntity;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
......
...@@ -3,7 +3,6 @@ package com.yxproject.start.service; ...@@ -3,7 +3,6 @@ package com.yxproject.start.service;
import com.yxproject.start.entity.ProdCardEntity; import com.yxproject.start.entity.ProdCardEntity;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Created by Administrator on 2018/12/26. * Created by Administrator on 2018/12/26.
......
package com.yxproject.start.service.impl; package com.yxproject.start.service.impl;
import com.yxproject.start.entity.CardBodyEntity; import com.yxproject.start.entity.CardBodyEntity;
import com.yxproject.start.entity.GroupNoEntity;
import com.yxproject.start.mapper.CardBodyMapper; import com.yxproject.start.mapper.CardBodyMapper;
import com.yxproject.start.mapper.GroupNoMapper;
import com.yxproject.start.mapper.UtilMapper;
import com.yxproject.start.service.CardBodyService; import com.yxproject.start.service.CardBodyService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
......
...@@ -8,7 +8,9 @@ import com.yxproject.start.service.CityListService; ...@@ -8,7 +8,9 @@ import com.yxproject.start.service.CityListService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.*; import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/** /**
* Created by Administrator on 2018/12/19. * Created by Administrator on 2018/12/19.
......
...@@ -7,10 +7,7 @@ import com.yxproject.start.service.CountyListService; ...@@ -7,10 +7,7 @@ import com.yxproject.start.service.CountyListService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Created by liuxinben on 2018/11/6.13:42 * Created by liuxinben on 2018/11/6.13:42
......
package com.yxproject.start.service.impl; package com.yxproject.start.service.impl;
//import com.yxproject.start.entity.CountyEntity; //import com.yxproject.start.entity.CountyEntity;
import com.yxproject.start.entity.CountyEntity; import com.yxproject.start.entity.CountyEntity;
import com.yxproject.start.mapper.CountyListMapper; import com.yxproject.start.mapper.CountyListMapper;
import com.yxproject.start.service.CountyService; import com.yxproject.start.service.CountyService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
......
...@@ -9,7 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -9,7 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Created by zhangyusheng on 2018/10/30 10:02 * Created by zhangyusheng on 2018/10/30 10:02
......
...@@ -2,12 +2,11 @@ package com.yxproject.start.service.impl; ...@@ -2,12 +2,11 @@ package com.yxproject.start.service.impl;
import com.yxproject.start.entity.FailedTypeEntity; import com.yxproject.start.entity.FailedTypeEntity;
import com.yxproject.start.mapper.SpecialCardMapper; import com.yxproject.start.mapper.SpecialCardMapper;
import com.yxproject.start.service.*; import com.yxproject.start.service.FailedTypeService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Created by Administrator on 2018/12/26. * Created by Administrator on 2018/12/26.
......
package com.yxproject.start.service.impl; package com.yxproject.start.service.impl;
import com.yxproject.start.mapper.AccCardTMapper;
import com.yxproject.start.mapper.FindCardMapper; import com.yxproject.start.mapper.FindCardMapper;
import com.yxproject.start.service.FindCardService; import com.yxproject.start.service.FindCardService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -8,7 +8,6 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -8,7 +8,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Created by Administrator on 2018/11/29. * Created by Administrator on 2018/11/29.
......
...@@ -8,7 +8,6 @@ import com.yxproject.start.service.GroupListService; ...@@ -8,7 +8,6 @@ import com.yxproject.start.service.GroupListService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
......
package com.yxproject.start.service.impl; package com.yxproject.start.service.impl;
import com.yxproject.start.entity.GroupListEntity;
import com.yxproject.start.entity.GroupNoEntity;
import com.yxproject.start.entity.SpecialCardEntity;
import com.yxproject.start.mapper.GroupNoMapper; import com.yxproject.start.mapper.GroupNoMapper;
import com.yxproject.start.service.GroupNoService; import com.yxproject.start.service.GroupNoService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -6,7 +6,8 @@ import com.yxproject.start.service.ProdCardService; ...@@ -6,7 +6,8 @@ import com.yxproject.start.service.ProdCardService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.*; import java.util.ArrayList;
import java.util.List;
/** /**
* Created by Administrator on 2018/12/26. * Created by Administrator on 2018/12/26.
......
...@@ -7,8 +7,6 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -7,8 +7,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.xml.crypto.Data; import javax.xml.crypto.Data;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.Map; import java.util.Map;
@Service @Service
......
...@@ -3,12 +3,10 @@ package com.yxproject.start.service.impl; ...@@ -3,12 +3,10 @@ package com.yxproject.start.service.impl;
import com.yxproject.start.entity.SysPermission; import com.yxproject.start.entity.SysPermission;
import com.yxproject.start.mapper.SysPermissionMapper; import com.yxproject.start.mapper.SysPermissionMapper;
import com.yxproject.start.service.SysPermissionService; import com.yxproject.start.service.SysPermissionService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @author Administrator * @author Administrator
......
...@@ -4,15 +4,10 @@ import com.yxproject.start.entity.SysRole; ...@@ -4,15 +4,10 @@ import com.yxproject.start.entity.SysRole;
import com.yxproject.start.mapper.SysRoleMapper; import com.yxproject.start.mapper.SysRoleMapper;
import com.yxproject.start.service.SysRoleService; import com.yxproject.start.service.SysRoleService;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
import org.apache.ibatis.annotations.Mapper;
import org.omg.CORBA.OBJ_ADAPTER;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
......
package com.yxproject.start.service.impl; package com.yxproject.start.service.impl;
import com.yxproject.start.entity.*; import com.yxproject.start.entity.GroupNoEntity;
import com.yxproject.start.entity.PoliceStationVailedEntity;
import com.yxproject.start.entity.SpecialCardEntity;
import com.yxproject.start.entity.TaskEntity;
import com.yxproject.start.entity.accu.AccCardTEntity; import com.yxproject.start.entity.accu.AccCardTEntity;
import com.yxproject.start.entity.prod.ProdCardTEntity; import com.yxproject.start.entity.prod.ProdCardTEntity;
import com.yxproject.start.mapper.*; import com.yxproject.start.mapper.*;
import com.yxproject.start.entity.CountyListEntity;
import com.yxproject.start.service.TaskService; import com.yxproject.start.service.TaskService;
import org.apache.commons.collections.map.HashedMap;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -109,7 +110,11 @@ public class TaskServiceImpl implements TaskService { ...@@ -109,7 +110,11 @@ public class TaskServiceImpl implements TaskService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int addProductionTaskListEntity(TaskEntity taskEntity, List<Map<String, Object>> groupListAtACCU) { public int addProductionTaskListEntity(TaskEntity taskEntity, List<Map<String, Object>> groupListAtACCU) {
long taskID = taskMapper.insertTaskEntity(taskEntity); Long taskID = getTaskID();
taskEntity.setTask_Id(taskID);
taskMapper.insertTaskEntity(taskEntity);
// System.out.println(taskMapper.insertTaskEntity(taskEntity)+"----测试数据--------");
System.out.println(taskEntity.getTask_Id()+"-----has an unsupported-----");
for (Map<String,Object> map : groupListAtACCU) { for (Map<String,Object> map : groupListAtACCU) {
GroupNoEntity groupNoEntity = new GroupNoEntity(); GroupNoEntity groupNoEntity = new GroupNoEntity();
groupNoEntity.setGroup_No(map.get("GROUP_NO").toString()); groupNoEntity.setGroup_No(map.get("GROUP_NO").toString());
...@@ -197,7 +202,7 @@ public class TaskServiceImpl implements TaskService { ...@@ -197,7 +202,7 @@ public class TaskServiceImpl implements TaskService {
* 生成原来的任务单 但不下发 * 生成原来的任务单 但不下发
*/ */
TaskEntity taskEntity = new TaskEntity(); TaskEntity taskEntity = new TaskEntity();
int production_task_list_seq = utilMapper.findProductionTaskListSequenceNextValue(); taskEntity.setTask_Id(getTaskID());
taskEntity.setCitycode(original_no.toString().substring(0, 6)); taskEntity.setCitycode(original_no.toString().substring(0, 6));
taskEntity.setCard_Type(Long.valueOf(original_no.toString().substring(20, 21))); taskEntity.setCard_Type(Long.valueOf(original_no.toString().substring(20, 21)));
taskEntity.setSubmit_Date(new Date()); taskEntity.setSubmit_Date(new Date());
...@@ -222,6 +227,7 @@ public class TaskServiceImpl implements TaskService { ...@@ -222,6 +227,7 @@ public class TaskServiceImpl implements TaskService {
* 生成快证任务单并下发 * 生成快证任务单并下发
*/ */
TaskEntity taskEntity1 = new TaskEntity(); TaskEntity taskEntity1 = new TaskEntity();
taskEntity1.setTask_Id(getTaskID());
taskEntity1.setCitycode(original_no.toString().substring(0, 6)); taskEntity1.setCitycode(original_no.toString().substring(0, 6));
taskEntity1.setCard_Type((long) 1); taskEntity1.setCard_Type((long) 1);
taskEntity1.setOld_Card_Type(Long.valueOf(original_no.toString().substring(20, 21))); taskEntity1.setOld_Card_Type(Long.valueOf(original_no.toString().substring(20, 21)));
...@@ -280,6 +286,7 @@ public class TaskServiceImpl implements TaskService { ...@@ -280,6 +286,7 @@ public class TaskServiceImpl implements TaskService {
* 生成快证任务单并下发 * 生成快证任务单并下发
*/ */
TaskEntity taskEntity = new TaskEntity(); TaskEntity taskEntity = new TaskEntity();
taskEntity.setTask_Id(getTaskID());
taskEntity.setCitycode(taskEntities.get(0).getCitycode()); taskEntity.setCitycode(taskEntities.get(0).getCitycode());
taskEntity.setCard_Type((long) 1); taskEntity.setCard_Type((long) 1);
taskEntity.setOld_Card_Type(taskEntities.get(0).getCard_Type()); taskEntity.setOld_Card_Type(taskEntities.get(0).getCard_Type());
...@@ -450,5 +457,17 @@ public class TaskServiceImpl implements TaskService { ...@@ -450,5 +457,17 @@ public class TaskServiceImpl implements TaskService {
List<PoliceStationVailedEntity> policeStationVailedInfoEntityByID = policeStationVailedMapper.findPoliceStationVailedEntity(id); List<PoliceStationVailedEntity> policeStationVailedInfoEntityByID = policeStationVailedMapper.findPoliceStationVailedEntity(id);
return policeStationVailedInfoEntityByID; return policeStationVailedInfoEntityByID;
} }
private Long getTaskID(){
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
int task_seq = utilMapper.findProductionTaskListSequenceNextValue();
String date = simpleDateFormat.format(new Date());
String sequence = task_seq+"";
String string0="";
for (int i = 0;i<3-sequence.length();i++){
string0+="0";
}
date+=string0+sequence;
return Long.valueOf(date);
}
} }
...@@ -6,10 +6,8 @@ import com.yxproject.start.mapper.UserInfoMapper; ...@@ -6,10 +6,8 @@ import com.yxproject.start.mapper.UserInfoMapper;
import com.yxproject.start.service.UserInfoService; import com.yxproject.start.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
......
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
</select> </select>
<insert id="insertTaskEntity" parameterType="com.yxproject.start.entity.TaskEntity" useGeneratedKeys="true" keyProperty="task_Id"> <insert id="insertTaskEntity" parameterType="com.yxproject.start.entity.TaskEntity" useGeneratedKeys="true" keyProperty="TASK_ID" >
Insert into TASK (CARD_TYPE,OLD_CARD_TYPE,CITYCODE,TASK_STATE_ID,PRINTER_ID) Insert into TASK (TASK_ID,CARD_TYPE,OLD_CARD_TYPE,CITYCODE,TASK_STATE_ID,PRINTER_ID)
values (#{card_Type}, values (#{task_Id},#{card_Type},
<if test="old_Card_Type!=null">#{old_Card_Type},</if> <if test="old_Card_Type!=null">#{old_Card_Type},</if>
<if test="old_Card_Type==null">null,</if> <if test="old_Card_Type==null">null,</if>
#{citycode}, #{citycode},
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxproject.start.mapper.UtilMapper"> <mapper namespace="com.yxproject.start.mapper.UtilMapper">
<select id="findProductionTaskListSequenceNextValue" resultType="int" > <select id="findProductionTaskListSequenceNextValue" resultType="int" >
select PRODUCTION_TASK_LIST_SEQ.nextval from dual select TASK_SEQ.nextval from dual
</select> </select>
<select id="findGroupInfoSequenceNextValue" resultType="int" > <select id="findGroupInfoSequenceNextValue" resultType="int" >
select GROUPINFO_SEQ.nextval from dual select GROUPINFO_SEQ.nextval from dual
......
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