Commit ce55e450 authored by suichenguang's avatar suichenguang

xiugai

parent 46a955db
package com.yxproject.start.api;
import com.yxproject.start.dto.CardsStatusAndCardsMsgDto;
import com.yxproject.start.dto.CardsStatusAndPostMsgDto;
import com.yxproject.start.entity.PersonPostAbnormalEntity;
import com.yxproject.start.entity.PersonPostEntity;
import com.yxproject.start.entity.PersonalProgressStatusEntity;
import com.yxproject.start.service.PersonPostAbnormalService;
import com.yxproject.start.service.PersonPostService;
import com.yxproject.start.service.PersonalProgressStatusService;
import net.sf.json.JSONArray;
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 java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author Administrator
*/
@RestController
@RequestMapping("api")
public class BizApi {
@Autowired
private PersonPostAbnormalService personPostAbnormalService;
@Autowired
private PersonalProgressStatusService personalProgressStatusService;
@Autowired
private PersonPostService personPostService;
/**
* 查询个人邮寄信息异常数据
* @param date
* @param police
* @return
*/
@RequestMapping("getErrorPostMsg")
public List<PersonPostAbnormalEntity> getErrorPostMsg(@RequestParam("date")String date, @RequestParam("police")String police) {
List<PersonPostAbnormalEntity> list = personPostAbnormalService.getPersonPostAbnormal(date,police);
return list;
}
/**
* 查询对公邮寄包查询
* @param date
* @param police
* @return
*/
@RequestMapping("getCardsPostMsg")
public List<CardsStatusAndPostMsgDto> getCardsPostMsg(@RequestParam("date")String date, @RequestParam("police")String police) {
List<CardsStatusAndPostMsgDto> list = personalProgressStatusService.getStatusAndPostMsg(date,police);
return list;
}
/**
* 通过运单号查询邮寄信息
* @param waybillNumber
* @return
*/
@RequestMapping("getPostMsgByWaybillNo")
public PersonPostEntity getPostMsgByWaybillNo(@RequestParam("waybillNumber")String waybillNumber) {
PersonPostEntity personPostEntity = personPostService.getPersonPostMsg(waybillNumber);
return personPostEntity;
}
/**
*查询个人证件信息和证件状态
* @param date
* @param police
* @return
*/
@RequestMapping("getCardsStatusAndCardMsg")
public List<CardsStatusAndCardsMsgDto> getCardsStatusAndCardMsg(@RequestParam("date")String date, @RequestParam("police")String police) {
List<CardsStatusAndCardsMsgDto> list = personalProgressStatusService.getStatusAndCardMsg(date,police);
return list;
}
/**
* 签收(修改状态表中的状态)
* @param uploadNoList
* @return
*/
@RequestMapping("setSignInDate")
public Map<String,String> setSignInDate(@RequestBody String uploadNoList) {
Map<String,String> map = new HashMap<>();
JSONArray jsonArray = JSONArray.fromObject(uploadNoList);
Boolean flag = personalProgressStatusService.updateSignInDate(jsonArray);
if(flag){
map.put("msg","修改成功");
}else {
map.put("msg","修改失败");
}
return map;
}
}
package com.yxproject.start.api;
import com.yxproject.start.entity.PersonPostAbnormalEntity;
import com.yxproject.start.entity.RedoRegistrationEntity;
import com.yxproject.start.entity.TemporaryCertificateEntity;
import com.yxproject.start.utils.ExportExcel;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("exportExcel")
public class ExportExcelApi {
/**
* 导出临时证信息
*/
@RequestMapping("ExportTemporaryCertificate")
public boolean ExportTemporaryCertificate(){
PersonPostAbnormalEntity temporaryCertificate = new PersonPostAbnormalEntity();
ExportExcel obj = new ExportExcel();
obj.exportTemporaryCertificateExcel((List<TemporaryCertificateEntity>) temporaryCertificate);
return true;
}
/**
* 导出重做证件信息
*/
@RequestMapping("ExportRedoRegistration")
public boolean ExportRedoRegistration(){
RedoRegistrationEntity redoRegistration = new RedoRegistrationEntity();
ExportExcel obj = new ExportExcel();
obj.exportRedoRegistrationExcel((List<RedoRegistrationEntity>) redoRegistration);
return true;
}
}
package com.yxproject.start.api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("person")
public class PersonalDetailsApi {
}
package com.yxproject.start.api;
import com.yxproject.start.entity.TaskEntity;
import com.yxproject.start.entity.TaskList.TaskListEntity;
import com.yxproject.start.service.TaskListService;
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.Map;
/**
* @author Administrator
* 任务单流程接口
*
*/
@RestController
@RequestMapping("TaskList")
public class TaskListApi {
@Autowired
private TaskListService taskListService;
TaskEntity taskEntity = new TaskEntity();
@RequestMapping("selectByCounty")
public Map<Object, TaskListEntity> selectByCounty(@RequestBody String submitDate){
Map<Object, TaskListEntity> resultMap= taskListService.selectByCounty(submitDate);
JSONObject resultJson = JSONObject.fromObject(resultMap);
return resultJson;
}
@RequestMapping("selectByGajg")
public Map<Object, TaskListEntity> selectByGajg(@RequestBody String submitDate){
Map<Object, TaskListEntity> resultMap= taskListService.selectByGajg(submitDate);
JSONObject resultJson = JSONObject.fromObject(resultMap);
return resultJson;
}
@RequestMapping("createTaskList")
public boolean createTaskList(){
Boolean success= taskListService.createTaskList(taskEntity);
return success;
}
@RequestMapping("updateState")
public boolean updateState(@RequestBody String taskId){
Boolean success = taskListService.updateState(taskId);
return success;
}
}
package com.yxproject.start.entity;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
@Entity
@Table(name = "SLH_GAJG_DM", schema = "AUXILIARY", catalog = "")
public class SlhGajgDmEntity {
private String gajgDm;
private String slhGajgDm;
@Basic
@Column(name = "GAJG_DM")
public String getGajgDm() {
return gajgDm;
}
public void setGajgDm(String gajgDm) {
this.gajgDm = gajgDm;
}
@Basic
@Column(name = "SLH_GAJG_DM")
public String getSlhGajgDm() {
return slhGajgDm;
}
public void setSlhGajgDm(String slhGajgDm) {
this.slhGajgDm = slhGajgDm;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SlhGajgDmEntity that = (SlhGajgDmEntity) o;
if (gajgDm != null ? !gajgDm.equals(that.gajgDm) : that.gajgDm != null) return false;
if (slhGajgDm != null ? !slhGajgDm.equals(that.slhGajgDm) : that.slhGajgDm != null) return false;
return true;
}
@Override
public int hashCode() {
int result = gajgDm != null ? gajgDm.hashCode() : 0;
result = 31 * result + (slhGajgDm != null ? slhGajgDm.hashCode() : 0);
return result;
}
}
package com.yxproject.start.entity;
import javax.persistence.*;
@Entity
@Table(name = "SYS_PERMISSION", schema = "AUXILIARY", catalog = "")
public class SysPermissionEntity {
private int id;
private Boolean available;
private String name;
private Long parentId;
private String parentIds;
private String permission;
private String resourceType;
private String url;
@Id
@Column(name = "ID")
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
@Basic
@Column(name = "AVAILABLE")
public Boolean getAvailable() {
return available;
}
public void setAvailable(Boolean available) {
this.available = available;
}
@Basic
@Column(name = "NAME")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Basic
@Column(name = "PARENT_ID")
public Long getParentId() {
return parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
@Basic
@Column(name = "PARENT_IDS")
public String getParentIds() {
return parentIds;
}
public void setParentIds(String parentIds) {
this.parentIds = parentIds;
}
@Basic
@Column(name = "PERMISSION")
public String getPermission() {
return permission;
}
public void setPermission(String permission) {
this.permission = permission;
}
@Basic
@Column(name = "RESOURCE_TYPE")
public String getResourceType() {
return resourceType;
}
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
@Basic
@Column(name = "URL")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SysPermissionEntity that = (SysPermissionEntity) o;
if (id != that.id) return false;
if (available != null ? !available.equals(that.available) : that.available != null) return false;
if (name != null ? !name.equals(that.name) : that.name != null) return false;
if (parentId != null ? !parentId.equals(that.parentId) : that.parentId != null) return false;
if (parentIds != null ? !parentIds.equals(that.parentIds) : that.parentIds != null) return false;
if (permission != null ? !permission.equals(that.permission) : that.permission != null) return false;
if (resourceType != null ? !resourceType.equals(that.resourceType) : that.resourceType != null) return false;
if (url != null ? !url.equals(that.url) : that.url != null) return false;
return true;
}
@Override
public int hashCode() {
int result = id;
result = 31 * result + (available != null ? available.hashCode() : 0);
result = 31 * result + (name != null ? name.hashCode() : 0);
result = 31 * result + (parentId != null ? parentId.hashCode() : 0);
result = 31 * result + (parentIds != null ? parentIds.hashCode() : 0);
result = 31 * result + (permission != null ? permission.hashCode() : 0);
result = 31 * result + (resourceType != null ? resourceType.hashCode() : 0);
result = 31 * result + (url != null ? url.hashCode() : 0);
return result;
}
}
package com.yxproject.start.entity;
import javax.persistence.*;
@Entity
@Table(name = "SYS_ROLE", schema = "AUXILIARY", catalog = "")
public class SysRoleEntity {
private int id;
private Boolean available;
private String description;
private String role;
@Id
@Column(name = "ID")
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
@Basic
@Column(name = "AVAILABLE")
public Boolean getAvailable() {
return available;
}
public void setAvailable(Boolean available) {
this.available = available;
}
@Basic
@Column(name = "DESCRIPTION")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@Basic
@Column(name = "ROLE")
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SysRoleEntity that = (SysRoleEntity) o;
if (id != that.id) return false;
if (available != null ? !available.equals(that.available) : that.available != null) return false;
if (description != null ? !description.equals(that.description) : that.description != null) return false;
if (role != null ? !role.equals(that.role) : that.role != null) return false;
return true;
}
@Override
public int hashCode() {
int result = id;
result = 31 * result + (available != null ? available.hashCode() : 0);
result = 31 * result + (description != null ? description.hashCode() : 0);
result = 31 * result + (role != null ? role.hashCode() : 0);
return result;
}
}
package com.yxproject.start.entity;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
@Entity
@Table(name = "SYS_ROLE_PERMISSION", schema = "AUXILIARY", catalog = "")
public class SysRolePermissionEntity {
private int roleId;
private int permissionId;
@Basic
@Column(name = "ROLE_ID")
public int getRoleId() {
return roleId;
}
public void setRoleId(int roleId) {
this.roleId = roleId;
}
@Basic
@Column(name = "PERMISSION_ID")
public int getPermissionId() {
return permissionId;
}
public void setPermissionId(int permissionId) {
this.permissionId = permissionId;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SysRolePermissionEntity that = (SysRolePermissionEntity) o;
if (roleId != that.roleId) return false;
if (permissionId != that.permissionId) return false;
return true;
}
@Override
public int hashCode() {
int result = roleId;
result = 31 * result + permissionId;
return result;
}
}
package com.yxproject.start.entity;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
@Entity
@Table(name = "SYS_USER_ROLE", schema = "AUXILIARY", catalog = "")
public class SysUserRoleEntity {
private int userId;
private int roleId;
@Basic
@Column(name = "USER_ID")
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
@Basic
@Column(name = "ROLE_ID")
public int getRoleId() {
return roleId;
}
public void setRoleId(int roleId) {
this.roleId = roleId;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SysUserRoleEntity that = (SysUserRoleEntity) o;
if (userId != that.userId) return false;
if (roleId != that.roleId) return false;
return true;
}
@Override
public int hashCode() {
int result = userId;
result = 31 * result + roleId;
return result;
}
}
package com.yxproject.start.entity.TaskList;
public class TaskListEntity {
private String countyName;
private String gajgName;
private Integer countyCount;
private Integer gajgCount;
private String groupNo;
public String getGroupNo() {
return groupNo;
}
public void setGroupNo(String groupNo) {
this.groupNo = groupNo;
}
public String getCountyName() {
return countyName;
}
public void setCountyName(String countyName) {
this.countyName = countyName;
}
public String getGajgName() {
return gajgName;
}
public void setGajgName(String gajgName) {
this.gajgName = gajgName;
}
public Integer getCountyCount() {
return countyCount;
}
public void setCountyCount(Integer countyCount) {
this.countyCount = countyCount;
}
public Integer getGajgCount() {
return gajgCount;
}
public void setGajgCount(Integer gajgCount) {
this.gajgCount = gajgCount;
}
}
package com.yxproject.start.entity;
import javax.persistence.*;
@Entity
@Table(name = "USER_INFO", schema = "AUXILIARY", catalog = "")
public class UserInfoEntity {
private int id;
private String name;
private String password;
private String salt;
private byte state;
private String username;
private String workshop;
@Id
@Column(name = "ID")
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
@Basic
@Column(name = "NAME")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Basic
@Column(name = "PASSWORD")
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Basic
@Column(name = "SALT")
public String getSalt() {
return salt;
}
public void setSalt(String salt) {
this.salt = salt;
}
@Basic
@Column(name = "STATE")
public byte getState() {
return state;
}
public void setState(byte state) {
this.state = state;
}
@Basic
@Column(name = "USERNAME")
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
@Basic
@Column(name = "WORKSHOP")
public String getWorkshop() {
return workshop;
}
public void setWorkshop(String workshop) {
this.workshop = workshop;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
UserInfoEntity that = (UserInfoEntity) o;
if (id != that.id) return false;
if (state != that.state) return false;
if (name != null ? !name.equals(that.name) : that.name != null) return false;
if (password != null ? !password.equals(that.password) : that.password != null) return false;
if (salt != null ? !salt.equals(that.salt) : that.salt != null) return false;
if (username != null ? !username.equals(that.username) : that.username != null) return false;
if (workshop != null ? !workshop.equals(that.workshop) : that.workshop != null) return false;
return true;
}
@Override
public int hashCode() {
int result = id;
result = 31 * result + (name != null ? name.hashCode() : 0);
result = 31 * result + (password != null ? password.hashCode() : 0);
result = 31 * result + (salt != null ? salt.hashCode() : 0);
result = 31 * result + (int) state;
result = 31 * result + (username != null ? username.hashCode() : 0);
result = 31 * result + (workshop != null ? workshop.hashCode() : 0);
return result;
}
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.TaskEntity;
import com.yxproject.start.entity.TaskList.TaskListEntity;
import org.apache.ibatis.annotations.*;
import java.util.Map;
/**
* @author Administrator
*/
@Mapper
public interface TaskListMapper {
/**
* 按区县查询受理库
* @param
*/
@Select("SELECT act.ACCEPT_NO, agt.deal_flag, gajg.gajg_mc, coun.COUNTYNAME\n" +
" FROM ACC_CARD_T@ACCU_DBLINK act \n"+
" LEFT JOIN ACC_GROUP_T@ACCU_DBLINK agt on substr(act.accept_no,0,8) = agt.group_no \n" +
" LEFT JOIN AUXILIARY.COUNTY_DIC coun on substr(act.upload_no,0,6) = AUXILIARY.coun.county_code\n" +
" WHERE agt.group_no not in (select AUXILIARY.GROUP_NO.group_no from AUXILIARY.GROUP_NO) and to_char(IMPORT_TIME,'yyyymmdd') = #{submitDate}")
public Map<Object,TaskListEntity> selectByCounty(@Param("submitDate") String submitDate);
/**
* 按派出所查询受理库
*/
@Select("SELECT act.ACCEPT_NO, agt.deal_flag, gajg.gajg_mc, coun.COUNTYNAME\n" +
" FROM ACC_CARD_T@ACCU_DBLINK act \n"+
" LEFT JOIN ACC_GROUP_T@ACCU_DBLINK agt on substr(act.accept_no,0,8) = agt.group_no \n" +
" LEFT JOIN AUXILIARY.GAJG_MC gajg on substr(act.upload_no,0,9) = AUXILIARY.gajg.gajg_dm\n"+
" WHERE agt.group_no not in (select AUXILIARY.GROUP_NO.group_no from AUXILIARY.GROUP_NO) and to_char(IMPORT_TIME,'yyyymmdd') = #{submitDate}")
public Map<Object,TaskListEntity> selectByGajg(@Param("submitDate") String submitDate);
/**
* 生成任务单
*/
@Insert("INSERT INTO TASK (CARD_TYPE,OLD_CARD_TYPE,COUNTY_CODE,TASK_STATE_ID)VALUES(1,1,#{countyCode}),0")
public boolean createTaskList(TaskEntity taskEntity);
/**
*下发任务单
*/
@Update("UPDATE TASK SET TASK_STATE_ID=1 WHERE TASK_ID = #{taskId}")
public boolean updateState(@Param("taskId") String taskId);
}
package com.yxproject.start.service;
import com.yxproject.start.entity.TaskEntity;
import com.yxproject.start.entity.TaskList.TaskListEntity;
import java.util.Map;
public interface TaskListService {
public Map<Object, TaskListEntity> selectByCounty(String submitDate);
public Map<Object, TaskListEntity> selectByGajg(String submitDate);
public boolean createTaskList(TaskEntity taskEntity);
public boolean updateState(String taskId);
}
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.TaskEntity;
import com.yxproject.start.entity.TaskList.TaskListEntity;
import com.yxproject.start.mapper.TaskListMapper;
import com.yxproject.start.service.TaskListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Map;
@Service
public class TaskListServiceImpl implements TaskListService {
@Autowired
private TaskListMapper taskListMapper;
@Override
public Map<Object, TaskListEntity> selectByCounty(String submitDate) {
Map <Object,TaskListEntity> resultMap= taskListMapper.selectByCounty(submitDate);
return resultMap;
}
@Override
public Map<Object, TaskListEntity> selectByGajg(String submitDate) {
Map <Object,TaskListEntity> resultMap= taskListMapper.selectByCounty(submitDate);
return resultMap;
}
@Override
public boolean createTaskList(TaskEntity taskEntity) {
taskListMapper.createTaskList(taskEntity);
return true;
}
@Override
public boolean updateState(String taskId) {
taskListMapper.updateState(taskId);
return true;
}
}
package com.yxproject.start.utils;
public class test {
public static void main(String []args){
String ss= "1234567890";
char s= 2;
Long sss=Long.valueOf(s);
System.out.println( ss.substring(0,6));
System.out.println(ss.charAt(ss.length()-5));
System.out.println(sss);
}
}
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