Commit 070443a7 authored by liboyang's avatar liboyang

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

parents 91614877 51213b5f
...@@ -38,10 +38,10 @@ public class MyShiroRealm extends AuthorizingRealm { ...@@ -38,10 +38,10 @@ public class MyShiroRealm extends AuthorizingRealm {
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) { protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
System.out.println("权限配置-->MyShiroRealm.doGetAuthorizationInfo()"); System.out.println("权限配置-->MyShiroRealm.doGetAuthorizationInfo()");
SimpleAuthorizationInfo authorizationInfo = new SimpleAuthorizationInfo(); SimpleAuthorizationInfo authorizationInfo = new SimpleAuthorizationInfo();
UserInfo userInfo = (UserInfo)principals.getPrimaryPrincipal(); UserInfo userInfo = (UserInfo) principals.getPrimaryPrincipal();
for(SysRole role:userInfo.getRoleList()){ for (SysRole role : userInfo.getRoleList()) {
authorizationInfo.addRole(role.getRole()); authorizationInfo.addRole(role.getRole());
for(SysPermission p:role.getPermissions()){ for (SysPermission p : role.getPermissions()) {
authorizationInfo.addStringPermission(p.getPermission()); authorizationInfo.addStringPermission(p.getPermission());
} }
} }
...@@ -49,7 +49,6 @@ public class MyShiroRealm extends AuthorizingRealm { ...@@ -49,7 +49,6 @@ public class MyShiroRealm extends AuthorizingRealm {
} }
/** /**
*
* @param token * @param token
* @return * @return
* @throws AuthenticationException * @throws AuthenticationException
...@@ -59,13 +58,13 @@ public class MyShiroRealm extends AuthorizingRealm { ...@@ -59,13 +58,13 @@ public class MyShiroRealm extends AuthorizingRealm {
throws AuthenticationException { throws AuthenticationException {
System.out.println("MyShiroRealm.doGetAuthenticationInfo()"); System.out.println("MyShiroRealm.doGetAuthenticationInfo()");
//获取用户的输入的账号. //获取用户的输入的账号.
String username = (String)token.getPrincipal(); String username = (String) token.getPrincipal();
System.out.println(username); System.out.println(username);
System.out.println(token.getCredentials().toString()); System.out.println(token.getCredentials().toString());
//通过username从数据库中查找 User对象,如果找到,没找到. //通过username从数据库中查找 User对象,如果找到,没找到.
//实际项目中,这里可以根据实际情况做缓存,如果不做,Shiro自己也是有时间间隔机制,2分钟内不会重复执行该方法 //实际项目中,这里可以根据实际情况做缓存,如果不做,Shiro自己也是有时间间隔机制,2分钟内不会重复执行该方法
UserInfo user = userInfoService.findByUsername(username); UserInfo user = userInfoService.findByUsername(username);
if(user == null || user.getState()==1){ if (user == null || user.getState() == 1) {
return null; return null;
} }
SimpleAuthenticationInfo authenticationInfo = new SimpleAuthenticationInfo( SimpleAuthenticationInfo authenticationInfo = new SimpleAuthenticationInfo(
......
...@@ -50,9 +50,9 @@ public class ShiroConfig { ...@@ -50,9 +50,9 @@ public class ShiroConfig {
} }
@Bean @Bean
public static DefaultAdvisorAutoProxyCreator getDefaultAdvisorAutoProxyCreator(){ public static DefaultAdvisorAutoProxyCreator getDefaultAdvisorAutoProxyCreator() {
DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator=new DefaultAdvisorAutoProxyCreator(); DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator = new DefaultAdvisorAutoProxyCreator();
defaultAdvisorAutoProxyCreator.setUsePrefix(true); defaultAdvisorAutoProxyCreator.setUsePrefix(true);
return defaultAdvisorAutoProxyCreator; return defaultAdvisorAutoProxyCreator;
......
...@@ -2,72 +2,99 @@ package com.yxproject.start.entity; ...@@ -2,72 +2,99 @@ package com.yxproject.start.entity;
import javax.persistence.*; import javax.persistence.*;
import java.sql.Time; import java.sql.Time;
import java.util.Date;
import java.util.Objects; import java.util.Objects;
/** /**
* Created by zhangyusheng on 2018/11/16 10:51 * Created by zhangyusheng on 2018/11/16 10:51
*/ */
@Entity @Entity
@Table(name = "CARD_BODY", schema = "DAHAI", catalog = "") @Table(name = "CARD_BODY", schema = "DAHAI")
public class CardBodyEntity { public class CardBodyEntity {
private long cardBodyId;
private Time saveDate;
private long isActive;
private long totalCount;
private long card_Body_Id;
private Date save_Date;
private long card_Type_Id;
private long is_Active;
private long task_Id;
private long total_Count;
@Id @Id
@Column(name = "CARD_BODY_ID", nullable = false, precision = 0) @Column(name = "CARD_BODY_ID", nullable = false, precision = 0)
public long getCardBodyId() { public long getCard_Body_Id() {
return cardBodyId; return card_Body_Id;
} }
public void setCardBodyId(long cardBodyId) { public void setCard_Body_Id(long card_Body_Id) {
this.cardBodyId = cardBodyId; this.card_Body_Id = card_Body_Id;
} }
@Basic @Basic
@Column(name = "SAVE_DATE", nullable = false) @Column(name = "SAVE_DATE", nullable = false)
public Time getSaveDate() { public Date getSave_Date() {
return saveDate; return save_Date;
} }
public void setSaveDate(Time saveDate) { public void setSave_Date(Date save_Date) {
this.saveDate = saveDate; this.save_Date = save_Date;
}
@Basic
@Column(name = "CARD_TYPE_ID", nullable = false, precision = 0)
public long getCard_Type_Id() {
return card_Type_Id;
}
public void setCard_Type_Id(long card_Type_Id) {
this.card_Type_Id = card_Type_Id;
} }
@Basic @Basic
@Column(name = "IS_ACTIVE", nullable = false, precision = 0) @Column(name = "IS_ACTIVE", nullable = false, precision = 0)
public long getIsActive() { public long getIs_Active() {
return isActive; return is_Active;
}
public void setIs_Active(long is_Active) {
this.is_Active = is_Active;
}
@Basic
@Column(name = "TASK_ID", nullable = false, precision = 0)
public long getTask_Id() {
return task_Id;
} }
public void setIsActive(long isActive) { public void setTask_Id(long task_id) {
this.isActive = isActive; this.task_Id = task_Id;
} }
@Basic @Basic
@Column(name = "TOTAL_COUNT", nullable = false, precision = 0) @Column(name = "TOTAL_COUNT", nullable = false, precision = 0)
public long getTotalCount() { public long getTotal_Count() {
return totalCount; return total_Count;
} }
public void setTotalCount(long totalCount) { public void setTotal_Count(long total_Count) {
this.totalCount = totalCount; this.total_Count = total_Count;
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) return true; if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false; if (o == null || getClass() != o.getClass()) return false;
CardBodyEntity that = (CardBodyEntity) o; CardBodyEntity that = (CardBodyEntity) o;
return cardBodyId == that.cardBodyId && return card_Body_Id == that.card_Body_Id &&
isActive == that.isActive && card_Type_Id == that.card_Type_Id &&
totalCount == that.totalCount && is_Active == that.is_Active &&
Objects.equals(saveDate, that.saveDate); task_Id == that.task_Id &&
total_Count == that.total_Count &&
Objects.equals(save_Date, that.save_Date);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(cardBodyId, saveDate, isActive, totalCount); return Objects.hash(card_Body_Id, card_Type_Id, is_Active, task_Id,total_Count,save_Date);
} }
} }
...@@ -2,68 +2,87 @@ package com.yxproject.start.entity; ...@@ -2,68 +2,87 @@ package com.yxproject.start.entity;
import javax.persistence.*; import javax.persistence.*;
import java.sql.Time; import java.sql.Time;
import java.util.Date;
import java.util.Objects; import java.util.Objects;
/** /**
* Created by zhangyusheng on 2018/11/16 10:51 * Created by zhangyusheng on 2018/11/16 10:51
*/ */
@Entity @Entity
@Table(name = "COUNTY_LIST", schema = "DAHAI", catalog = "") @Table(name = "COUNTY_LIST", schema = "DAHAI")
public class CountyListEntity { public class CountyListEntity {
private long countyListId; private long county_List_Id;
private Time saveDate; private long task_Id;
private Long finishCount; private Date save_Date;
private Long inStorageCount; private String county_Code;
private Long outStorageCount; private long finish_Count;
private long in_Storage_Count;
private long out_Storage_Count;
@Id @Id
@Column(name = "COUNTY_LIST_ID", nullable = false, precision = 0) @Column(name = "COUNTY_LIST_ID", nullable = false, precision = 0)
public long getCountyListId() { public long getCounty_List_Id() {
return countyListId; return county_List_Id;
}
public void setCounty_List_Id(long county_List_Id) {
this.county_List_Id = county_List_Id;
}
@Basic
@Column(name = "TASK_ID", nullable = false, precision = 0)
public long getTask_Id() {
return task_Id;
} }
public void setCountyListId(long countyListId) { public void setTask_Id(long task_Id) {
this.countyListId = countyListId; this.task_Id = task_Id;
} }
@Basic @Basic
@Column(name = "SAVE_DATE", nullable = false) @Column(name = "SAVE_DATE", nullable = false)
public Time getSaveDate() { public Date getSave_Date() {
return saveDate; return save_Date;
} }
public void setSaveDate(Time saveDate) { public void setSave_Date(Date save_Date) {
this.saveDate = saveDate; this.save_Date = save_Date;
}
@Basic
@Column(name = "COUNTY_CODE", nullable = true, length = 20)
public String getCounty_Code() {
return county_Code;
} }
public void setCounty_Code(String county_Code) {
this.county_Code = county_Code;
}
@Basic @Basic
@Column(name = "FINISH_COUNT", nullable = true, precision = 0) @Column(name = "FINISH_COUNT", nullable = true, precision = 0)
public Long getFinishCount() { public long getFinish_Count() {
return finishCount; return finish_Count;
} }
public void setFinishCount(Long finishCount) { public void setFinish_Count(long finish_Count) {
this.finishCount = finishCount; this.finish_Count = finish_Count;
} }
@Basic @Basic
@Column(name = "IN_STORAGE_COUNT", nullable = true, precision = 0) @Column(name = "IN_STORAGE_COUNT", nullable = true, precision = 0)
public Long getInStorageCount() { public long getIn_Storage_Count() {
return inStorageCount; return in_Storage_Count;
} }
public void setInStorageCount(Long inStorageCount) { public void setIn_Storage_Count(long in_Storage_Count) {
this.inStorageCount = inStorageCount; this.in_Storage_Count = in_Storage_Count;
} }
@Basic @Basic
@Column(name = "OUT_STORAGE_COUNT", nullable = true, precision = 0) @Column(name = "OUT_STORAGE_COUNT", nullable = true, precision = 0)
public Long getOutStorageCount() { public long getOut_Storage_Count() {
return outStorageCount; return out_Storage_Count;
} }
public void setOutStorageCount(Long outStorageCount) { public void setOut_Storage_Count(long out_Storage_Count) {
this.outStorageCount = outStorageCount; this.out_Storage_Count = out_Storage_Count;
} }
@Override @Override
...@@ -71,15 +90,17 @@ public class CountyListEntity { ...@@ -71,15 +90,17 @@ public class CountyListEntity {
if (this == o) return true; if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false; if (o == null || getClass() != o.getClass()) return false;
CountyListEntity that = (CountyListEntity) o; CountyListEntity that = (CountyListEntity) o;
return countyListId == that.countyListId && return county_List_Id == that.county_List_Id &&
Objects.equals(saveDate, that.saveDate) && task_Id == that.task_Id &&
Objects.equals(finishCount, that.finishCount) && finish_Count == that.finish_Count &&
Objects.equals(inStorageCount, that.inStorageCount) && in_Storage_Count == that.in_Storage_Count &&
Objects.equals(outStorageCount, that.outStorageCount); out_Storage_Count == that.out_Storage_Count &&
Objects.equals(save_Date, that.save_Date) &&
Objects.equals(county_Code, that.county_Code);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(countyListId, saveDate, finishCount, inStorageCount, outStorageCount); return Objects.hash(county_List_Id, task_Id, finish_Count, in_Storage_Count, out_Storage_Count,save_Date,county_Code);
} }
} }
...@@ -7,24 +7,14 @@ import java.util.Objects; ...@@ -7,24 +7,14 @@ import java.util.Objects;
* Created by zhangyusheng on 2018/11/16 10:51 * Created by zhangyusheng on 2018/11/16 10:51
*/ */
@Entity @Entity
@Table(name = "GROUP_NO", schema = "DAHAI", catalog = "") @Table(name = "GROUP_NO", schema = "DAHAI")
public class GroupNoEntity { public class GroupNoEntity {
private long group_Id;
private long task_Id; private long task_Id;
private String group_No; private String group_No;
private long vaild_Count; private long vaild_Count;
private long invalid_Count; private long invalid_Count;
private long special_Card_Count; private long special_Card_Count;
@Basic
@Column(name = "GROUP_ID", nullable = false, precision = 0)
public long getGroup_Id() {
return group_Id;
}
public void setGroup_Id(long group_Id) {
this.group_Id = group_Id;
}
@Basic @Basic
@Column(name = "TASK_ID", nullable = false, precision = 0) @Column(name = "TASK_ID", nullable = false, precision = 0)
public long getTask_Id() { public long getTask_Id() {
...@@ -72,11 +62,10 @@ public class GroupNoEntity { ...@@ -72,11 +62,10 @@ public class GroupNoEntity {
} }
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) return true; if (this == o) { return true;}
if (o == null || getClass() != o.getClass()) return false; if (o == null || getClass() != o.getClass()){ return false;}
GroupNoEntity that = (GroupNoEntity) o; GroupNoEntity that = (GroupNoEntity) o;
return group_Id == that.group_Id && return vaild_Count == that.vaild_Count &&
vaild_Count == that.vaild_Count &&
invalid_Count == that.invalid_Count && invalid_Count == that.invalid_Count &&
special_Card_Count == that.special_Card_Count && special_Card_Count == that.special_Card_Count &&
task_Id == that.task_Id && task_Id == that.task_Id &&
...@@ -85,6 +74,6 @@ public class GroupNoEntity { ...@@ -85,6 +74,6 @@ public class GroupNoEntity {
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(group_Id, group_No, task_Id, vaild_Count, invalid_Count,special_Card_Count); return Objects.hash( group_No, task_Id, vaild_Count, invalid_Count,special_Card_Count);
} }
} }
...@@ -190,9 +190,6 @@ public class TaskEntity { ...@@ -190,9 +190,6 @@ public class TaskEntity {
this.in_Storage_Date = in_Storage_Date; this.in_Storage_Date = in_Storage_Date;
} }
@Basic @Basic
@Column(name = "TASK_STATE_ID", nullable = true, precision = 0) @Column(name = "TASK_STATE_ID", nullable = true, precision = 0)
public long getTask_State_Id() { public long getTask_State_Id() {
......
package com.yxproject.start.mapper;
import com.yxproject.start.entity.CardBodyEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* Created by liuxinben on 2018/11/6.10:26
*/
@Mapper
public interface CardBodyMapper {
public int insertCardBodyEntity(CardBodyEntity cardBodyEntity);
public int updateCardBodyInfo(CardBodyEntity cardBodyEntity);
}
\ No newline at end of file
package com.yxproject.start.mapper;
import com.yxproject.start.entity.CountyListEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.Date;
import java.util.List;
/**
* Created by liuxinben on 2018/11/6.10:26
*/
@Mapper
public interface CountyListMapper {
public List<CountyListEntity> findCountyListByTaskListID(String tasklistID);
public int updateBoundCount(CountyListEntity countyListEntity);
public List<CountyListEntity>getConnectList(String save_Date);
}
...@@ -15,17 +15,38 @@ public interface PoliceStationVailedMapper { ...@@ -15,17 +15,38 @@ public interface PoliceStationVailedMapper {
* @param policeStationVailedEntity * @param policeStationVailedEntity
* @return * @return
*/ */
@Insert("INSERT INTO POLICE_STATION_VAILED_INFO (POLICE_STATION_VAILED_INFO_ID,CYCLESHEETID,POLICE_STATION_CODE,VAILED_COUNT,INVALID_COUNT,SAVA_DATE) " + @Insert("INSERT INTO POLICE_STATION_VAILED (POLICE_STATION_VAILED_ID,TASK_ID,POLICE_STATION_CODE,VAILED_COUNT,INVALID_COUNT,SAVA_DATE) " +
"values (#{police_Station_Vailed_Info_Id},#{cyclesheetid},#{police_Station_Code},#{vailed_Count},#{invalid_Count},#{sava_Date})") "values (#{police_Station_Vailed_Id},#{task_Id},#{police_Station_Code},#{vailed_Count},#{invalid_Count},#{sava_Date})")
@Options(useGeneratedKeys = true, keyProperty = "police_Station_Vailed_Info_Id",keyColumn = "police_Station_Vailed_Info_Id") @Options(useGeneratedKeys = true, keyProperty = "police_Station_Vailed_Info_Id",keyColumn = "police_Station_Vailed_Info_Id")
public void savePoliceStationVailedInfoEntity(PoliceStationVailedEntity policeStationVailedEntity); public void savePoliceStationVailedInfoEntity(PoliceStationVailedEntity policeStationVailedEntity);
@Select("select * from POLICE_STATION_VAILED_INFO WHERE POLICE_STATION_VAILED_INFO_ID=#{id}") @Select("select * from POLICE_STATION_VAILED WHERE POLICE_STATION_VAILED_ID=#{id}")
@Results({@Result(property = "police_Station_Vailed_Info_Id",column = "police_Station_Vailed_Info_Id"), @Results({@Result(property = "police_Station_Vailed_Id",column = "police_Station_Vailed_Id"),
@Result(property = "cyclesheetid",column = "cyclesheetid"), @Result(property = "task_Id",column = "police_Station_Vailed_Id"),
@Result(property = "police_Station_Code",column = "police_Station_Code"), @Result(property = "police_Station_Code",column = "police_Station_Code"),
@Result(property = "vailed_Count",column = "vailed_Count"), @Result(property = "vailed_Count",column = "vailed_Count"),
@Result(property = "invalid_Count",column = "invalid_Count"), @Result(property = "invalid_Count",column = "invalid_Count"),
@Result(property = "sava_Date",column = "sava_Date")}) @Result(property = "sava_Date",column = "sava_Date")})
public List<PoliceStationVailedEntity> findPoliceStationVailedEntity(String id); public List<PoliceStationVailedEntity> findPoliceStationVailedEntity(String id);
} }
//@Mapper
//interface Inter {
// public static final int num=3;
// public abstract void show();
//}
//
//class Test implements Inter {
// public void show(){
//
// }
//}
//public class InterfaceDome{
//// public static void mian(String[] args){
//// Test t = new Test();
//// System.out.println(t.num);
//// System.out.println(Test.num);
//// System.out.println(Inter.num);
//// }
//
//}
\ No newline at end of file
...@@ -17,5 +17,6 @@ public interface TaskMapper { ...@@ -17,5 +17,6 @@ public interface TaskMapper {
public int updateTaskEntity(TaskEntity taskEntity); public int updateTaskEntity(TaskEntity taskEntity);
public List<TaskEntity> findTaskEntityByAcceptNo(String acceptNo); public List<TaskEntity> findTaskEntityByAcceptNo(String acceptNo);
public List<TaskEntity> findTaskEntityByState(int state); public List<TaskEntity> findTaskEntityByState(int state);
public int replaceExceptionInformation(TaskEntity taskEntity);
public int totalnum (int i);
} }
...@@ -101,3 +101,5 @@ public interface UserInfoMapper { ...@@ -101,3 +101,5 @@ public interface UserInfoMapper {
@Update("UPDATE USER_INFO SET USERNAME=#{username},NAME=#{name} where ID=#{id}") @Update("UPDATE USER_INFO SET USERNAME=#{username},NAME=#{name} where ID=#{id}")
public void updateUserInfo(UserInfo userInfo); public void updateUserInfo(UserInfo userInfo);
} }
...@@ -12,14 +12,17 @@ public interface UtilMapper { ...@@ -12,14 +12,17 @@ public interface UtilMapper {
* 查询任务单序列值 * 查询任务单序列值
*/ */
public int findProductionTaskListSequenceNextValue(); public int findProductionTaskListSequenceNextValue();
/** /**
* 查询组号信息序列值 * 查询组号信息序列值
*/ */
public int findGroupInfoSequenceNextValue(); public int findGroupInfoSequenceNextValue();
/** /**
* 查询派出所照片质量表序列值 * 查询派出所照片质量表序列值
*/ */
public int findPoliceStationVailedSequenceNextValue(); public int findPoliceStationVailedSequenceNextValue();
/** /**
* 查询废证信息表序列值 * 查询废证信息表序列值
*/ */
...@@ -33,3 +36,5 @@ public interface UtilMapper { ...@@ -33,3 +36,5 @@ public interface UtilMapper {
*/ */
public int findPoliceStationApplyReasonSequenceNextValue(); public int findPoliceStationApplyReasonSequenceNextValue();
} }
package com.yxproject.start.service;
import com.yxproject.start.entity.CardBodyEntity;
import com.yxproject.start.entity.GroupNoEntity;
import java.util.List;
/**
* Created by Administrator on 2018/11/7.
*/
public interface CardBodyService {
public int addCardBodyEntity(CardBodyEntity cardBodyEntity);
public int updateCardBody(CardBodyEntity map);
}
package com.yxproject.start.service;
import com.yxproject.start.entity.CountyListEntity;
import java.util.Date;
import java.util.List;
public interface CountyListService {
public List<CountyListEntity> findCountyListByTaskListID(String tasklistID);
public int reviseOutBoundCount(CountyListEntity map);
public int reviseInBoundCount(CountyListEntity map);
public List<CountyListEntity> getConnectList(String save_Date);
}
...@@ -26,5 +26,11 @@ public interface TaskService { ...@@ -26,5 +26,11 @@ public interface TaskService {
public List<Map<String,Object>> findProductionTaskListEntityByState(int state); public List<Map<String,Object>> findProductionTaskListEntityByState(int state);
public int addExceptionState(TaskEntity state);
public int updateOutboundDate(TaskEntity map);
public int updatePutinstorageDate(TaskEntity map);
} }
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.CardBodyEntity;
import com.yxproject.start.entity.GroupNoEntity;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.List;
/**
* Created by Administrator on 2018/11/7.
*/
@Service
public class CardBodyServiceImpl implements CardBodyService {
@Autowired
public CardBodyMapper cardBodyMapper;
@Override
public int updateCardBody(CardBodyEntity cardBodyEntity) {
//todo 状态更新时间
return cardBodyMapper.updateCardBodyInfo(cardBodyEntity);
}
@Override
public int addCardBodyEntity(CardBodyEntity cardBodyEntity) {
return cardBodyMapper.insertCardBodyEntity(cardBodyEntity);
}
}
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.CountyListEntity;
import com.yxproject.start.mapper.CountyListMapper;
import com.yxproject.start.service.CountyListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* Created by liuxinben on 2018/11/6.13:42
*/
@Service
public class CountyListServiceImpl implements CountyListService {
@Autowired
public CountyListMapper countyListMapper;
@Override
public List<CountyListEntity> findCountyListByTaskListID(String tasklistid) {
List<CountyListEntity> byTaskListID = countyListMapper.findCountyListByTaskListID(tasklistid);
return byTaskListID;
}
@Override
public int reviseOutBoundCount(CountyListEntity countyListEntity) {
countyListEntity.setOut_Storage_Count(countyListEntity.getOut_Storage_Count());
return countyListMapper.updateBoundCount(countyListEntity);
}
@Override
public int reviseInBoundCount(CountyListEntity countyListEntity) {
countyListEntity.setIn_Storage_Count(countyListEntity.getIn_Storage_Count());
return countyListMapper.updateBoundCount(countyListEntity);
}
@Override
public List<CountyListEntity> getConnectList(String save_Date) {
return countyListMapper.getConnectList(save_Date);
}
}
\ No newline at end of file
...@@ -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 org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
......
...@@ -4,6 +4,9 @@ import com.yxproject.start.entity.*; ...@@ -4,6 +4,9 @@ import com.yxproject.start.entity.*;
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 net.sf.json.JSONObject;
import java.util.Scanner;
import com.yxproject.start.service.TaskService; import com.yxproject.start.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -40,6 +43,7 @@ public class TaskServiceImpl implements TaskService { ...@@ -40,6 +43,7 @@ public class TaskServiceImpl implements TaskService {
public SpecialCardMapper specialCardMapper; public SpecialCardMapper specialCardMapper;
/** /**
* 查询任务单 * 查询任务单
* 通过任务单ID * 通过任务单ID
...@@ -411,6 +415,65 @@ public class TaskServiceImpl implements TaskService { ...@@ -411,6 +415,65 @@ public class TaskServiceImpl implements TaskService {
return null; return null;
} }
/**
* 更新任务单
* 更新异常状态
* @param
* @return
*/
@Override
public int addExceptionState(TaskEntity taskEntity) {
int i =0;
if(taskEntity.getException_Information()!=null) {
taskEntity.setIs_Exception((long)1);
i=taskMapper.updateTaskEntity(taskEntity);
} else {
taskEntity.setIs_Exception((long)0);
i=taskMapper.replaceExceptionInformation(taskEntity);
}
return i;
}
private CountyListEntity countyListEntity;
/**
* 更新出库时间
* @param
* @return
*/
@Override
public int updateOutboundDate(TaskEntity taskEntity) {
int i=0;
i= taskMapper.totalnum(i);
if (countyListEntity.getOut_Storage_Count()==i){
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
taskEntity.setOut_Storage_Date(new Date());
return taskMapper.updateTaskEntity(taskEntity);
}
else{
return 0;
}
}
/**
* 更新入库时间
* @param
* @return
*/
@Override
public int updatePutinstorageDate(TaskEntity taskEntity) {
int i=0;
i= taskMapper.totalnum(i);
if (countyListEntity.getIn_Storage_Count()==i){
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
taskEntity.setIn_Storage_Date(new Date());
return taskMapper.updateTaskEntity(taskEntity);
}
else{
return 0;
}
}
/** /**
* 测试查询 * 测试查询
* *
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxproject.start.mapper.CardBodyInfoMapper">
<resultMap id="CardBodyInfoMapper" type="com.yxproject.start.entity.CardBodyEntity">
<id column="CARD_BODY_ID" property="card_Body_Id" jdbcType="NUMERIC"/>
<result column="SAVE_DATE" property="save_Date" jdbcType="DATE"/>
<result column="CARD_TYPE_ID" property="card_Type_Id" jdbcType="NUMERIC"/>
<result column="IS_ACTIVE" property="is_Active" jdbcType="NUMERIC"/>
<result column="TASK_ID" property="task_Id" jdbcType="NUMERIC"/>
<result column="TOTAL_COUNT" property="total_Count" jdbcType="NUMERIC"/>
</resultMap>
<select id="insertCardBodyEntity" resultType="com.yxproject.start.entity.CardBodyEntity" parameterType="String">
select * from CARD_BODY where CARD_BODY_ID=#{card_Body_Id}
</select>
<update id="updateCardBody" parameterType="com.yxproject.start.entity.CardBodyEntity">
update CARD_BODY
<set>
<if test="save_Date ">SAVE_DATE =#{save_Date},</if>
<if test="card_Type_Id ">CARD_TYPE_ID =#{card_Type_Id},</if>
<if test="is_Active ">is_Active =#{is_Active},</if>
<if test="card_Body_Type">CARD_BODY_TYPE =#{card_Body_Type},</if>
<if test="task_Id ">TASK_ID =#{task_Id},</if>
<if test="total_Count">TOTAL_COUNT =#{total_Count},</if>
</set>
where CARD_BODY_ID =#{card_Body_Id}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxproject.start.mapper.CountyListMapper">
<resultMap id="CountyListMapper" type="com.yxproject.start.entity.CountyListEntity">
<id column="COUNTY_LIST_ID" property="county_List_Id" jdbcType="NUMERIC" />
<result column="TASK_ID" property="task_Id" jdbcType="NUMERIC"/>
<result column="SAVE_DATE" property="save_Date" jdbcType="DATE"/>
<result column="COUNTY_CODE" property="county_Code" jdbcType="VARCHAR"/>
<result column="FINISH_COUNT" property="finish_Count" jdbcType="NUMERIC"/>
<result column="IN_STORAGE_COUNT" property="in_Storage_Count" jdbcType="NUMERIC"/>
<result column="OUT_STORAGE_COUNT" property="out_Storage_Count" jdbcType="NUMERIC"/>
</resultMap>
<!--<insert id="addPermissionByMap" parameterType="com.yxproject.start.entity.SysPermission">-->
<!--Insert into DAHAI.SYS_PERMISSION (ID,AVAILABLE,NAME,PARENT_ID,PARENT_IDS,PERMISSION,RESOURCE_TYPE,URL) values (PERMISSION_seq.nextval,0,#{name},#{parentId},#{parentIds},#{permission},#{resourceType},#{url})-->
<!--</insert>-->
<select id="findCountyListByTaskListID" resultType="com.yxproject.start.entity.CountyListEntity" parameterType="String">
SELECT * FROM COUNTY_LIST where task_Id=#{task_Id}
</select>
<update id="updateBoundCount" parameterType="com.yxproject.start.entity.CountyListEntity" >
update COUNTY_LIST OUT_STORAGE_COUNT =#{out_Storage_Count},IN_STORAGE_COUNT =#{in_Storage_Count} where COUNTY_LIST_ID =#{county_List_Id}
</update>
<select id="getConnectList" resultType="com.yxproject.start.entity.CountyListEntity" parameterType="String">
SELECT OUT_STORAGE_COUNT FROM COUNTY_LIST where save_Date=#{save_Date}
</select>
</mapper>
...@@ -2,9 +2,8 @@ ...@@ -2,9 +2,8 @@
<!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.GroupNoMapper"> <mapper namespace="com.yxproject.start.mapper.GroupNoMapper">
<resultMap id="GroupNoMapper" type="com.yxproject.start.entity.GroupNoEntity"> <resultMap id="GroupNoMapper" type="com.yxproject.start.entity.GroupNoEntity">
<id column="GROUP_ID" property="group_Id" jdbcType="NUMERIC"/> <id column="GROUP_NO" property="group_No" jdbcType="VARCHAR"/>
<result column="TASK_ID" property="task_Id" jdbcType="NUMERIC"/> <result column="TASK_ID" property="task_Id" jdbcType="NUMERIC"/>
<result column="GROUP_NO" property="group_No" jdbcType="VARCHAR"/>
<result column="VAILD_COUNT" property="vaild_Count" jdbcType="NUMERIC"/> <result column="VAILD_COUNT" property="vaild_Count" jdbcType="NUMERIC"/>
<result column="INVALID_COUNT" property="invalid_Count" jdbcType="NUMERIC"/> <result column="INVALID_COUNT" property="invalid_Count" jdbcType="NUMERIC"/>
<result column="SPECIAL_CARD_COUNT" property="special_Card_Count" jdbcType="NUMERIC"/> <result column="SPECIAL_CARD_COUNT" property="special_Card_Count" jdbcType="NUMERIC"/>
...@@ -15,8 +14,8 @@ ...@@ -15,8 +14,8 @@
</select> </select>
<insert id="insertGroupNoEntity" parameterType="com.yxproject.start.entity.GroupNoEntity"> <insert id="insertGroupNoEntity" parameterType="com.yxproject.start.entity.GroupNoEntity">
Insert into GROUP_NO (GROUP_ID,GROUP_NO,task_Id,VAILD_COUNT,INVALID_COUNT,special_Card_Count) values Insert into GROUP_NO (GROUP_NO,task_Id,VAILD_COUNT,INVALID_COUNT,special_Card_Count) values
(#{group_Id},#{group_No},#{task_Id},#{vaild_Count},#{invalid_Count},#{special_Card_Count}) (#{group_No},#{task_Id},#{vaild_Count},#{invalid_Count},#{special_Card_Count})
</insert> </insert>
<select id="findGroupNoEntityByAcceptNo" resultType="com.yxproject.start.entity.GroupNoEntity" parameterType="String"> <select id="findGroupNoEntityByAcceptNo" resultType="com.yxproject.start.entity.GroupNoEntity" parameterType="String">
...@@ -24,13 +23,12 @@ ...@@ -24,13 +23,12 @@
</select> </select>
<update id="updateGroupinfoEntity" parameterType="com.yxproject.start.entity.GroupNoEntity"> <update id="updateGroupinfoEntity" parameterType="com.yxproject.start.entity.GroupNoEntity">
update GROUP_NO set GROUP_ID=#{group_Id} update GROUP_NO set group_No =#{group_No}
<if test="group_No">,group_No =#{group_No}</if>
<if test="task_Id">,task_Id =#{task_Id}</if> <if test="task_Id">,task_Id =#{task_Id}</if>
<if test="vaild_Count">,vaild_Count =#{vaild_Count}</if> <if test="vaild_Count">,vaild_Count =#{vaild_Count}</if>
<if test="invalid_Count">,invalid_Count =#{invalid_Count}</if> <if test="invalid_Count">,invalid_Count =#{invalid_Count}</if>
<if test="special_Card_Count">,special_Card_Count =#{special_Card_Count}</if> <if test="special_Card_Count">,special_Card_Count =#{special_Card_Count}</if>
where GROUP_ID=#{group_Id} where group_No=#{group_No}
</update> </update>
<select id="findGroupNoCountByTaskId" parameterType="String" resultType="int"> <select id="findGroupNoCountByTaskId" parameterType="String" resultType="int">
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
values (#{task_Id},#{card_Type},#{old_Card_Type},#{citycode},#{submit_Date},#{issued_Date},#{print_State},#{download_Date},#{print_Out_Date},#{position_Date},#{out_Workshop_Date},#{quality_People_Name},#{quality_Test_Date},#{exception_Information},#{out_Storage_Date},#{in_Storage_Date},#{task_State_Id},#{is_Exception},#{printer_Id}) values (#{task_Id},#{card_Type},#{old_Card_Type},#{citycode},#{submit_Date},#{issued_Date},#{print_State},#{download_Date},#{print_Out_Date},#{position_Date},#{out_Workshop_Date},#{quality_People_Name},#{quality_Test_Date},#{exception_Information},#{out_Storage_Date},#{in_Storage_Date},#{task_State_Id},#{is_Exception},#{printer_Id})
</insert> </insert>
<update id="updateProductionTask" parameterType="com.yxproject.start.entity.TaskEntity"> <update id="updateTaskEntity" parameterType="com.yxproject.start.entity.TaskEntity">
update TASK update TASK
<set> <set>
<if test="card_Type ">card_Type =#{card_Type},</if> <if test="card_Type ">card_Type =#{card_Type},</if>
...@@ -68,4 +68,12 @@ ...@@ -68,4 +68,12 @@
select * from TASK where TASK_STATE_ID =#{state } select * from TASK where TASK_STATE_ID =#{state }
</select> </select>
<update id="replaceExceptionInformation" parameterType="com.yxproject.start.entity.TaskEntity" >
update TASK SET exception_Information = NULL,IS_EXCEPTION=#{is_Exception} where TASK_ID =#{task_Id}
</update>
<select id="totalnum" resultType="Int">
select SUM(VAILD_COUNT)FROM GROUP_NO where TASK_ID =#{task_Id}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -54,7 +54,42 @@ app.controller('cycleSheetCtrl', ['$scope','$rootScope', '$http', '$state', '$fi ...@@ -54,7 +54,42 @@ app.controller('cycleSheetCtrl', ['$scope','$rootScope', '$http', '$state', '$fi
$scope.initDate = new Date('2016-15-20'); $scope.initDate = new Date('2016-15-20');
$scope.formats = ['dd-MMMM-yyyy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate']; $scope.formats = ['dd-MMMM-yyyy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate'];
$scope.format = $scope.formats[1]; $scope.format = $scope.formats[1];
$scope.task_click = function(){
console.log($rootScope.loginData.state,"----测试-----",$scope.dt,"====");
}
$scope.check_type = function(typeCode){
console.log($rootScope.loginData.state,"----测试-----",$scope.dt,"====",typeCode,"+++++++++++++");
}
$scope.typeList =[
{typeCode:0,typeCount:5000,typeName:'普通证'},
{typeCode:1,typeCount:5000,typeName:'邮寄证'},
{typeCode:2,typeCount:5000,typeName:'特殊证'},
{typeCode:9,typeCount:5000,typeName:'异地证'},
]
$scope.cityList =[
{"card_Type":1,"citycode":"410300",cityName:"郑州",groupCount:10,groupSum:1500,groupInvailedSum:15,groupNO:"1-25","download_Date":null,"exception_Information":"","in_Storage_Date":null,"is_Exception":0,"issued_Date":null,"old_Card_Type":1,"out_Storage_Date":null,"out_Workshop_Date":null,"position_Date":null,"print_Out_Date":null,"print_State":0,"printer_Id":0,"quality_People_Name":"","quality_Test_Date":null,"submit_Date":{"date":20,"day":2,"hours":11,"minutes":20,"month":10,"seconds":53,"time":1542684053000,"timezoneOffset":-480,"year":118},"task_Id":201811203,"task_State_Id":1},
{"card_Type":1,"citycode":"410400",cityName:"驻马店",groupCount:10,groupSum:2500,groupInvailedSum:16,groupNO:"26-45","download_Date":null,"exception_Information":"","in_Storage_Date":null,"is_Exception":0,"issued_Date":null,"old_Card_Type":1,"out_Storage_Date":null,"out_Workshop_Date":null,"position_Date":null,"print_Out_Date":null,"print_State":0,"printer_Id":0,"quality_People_Name":"","quality_Test_Date":null,"submit_Date":{"date":20,"day":2,"hours":11,"minutes":20,"month":10,"seconds":53,"time":1542684053000,"timezoneOffset":-480,"year":118},"task_Id":201811203,"task_State_Id":1},
{"card_Type":1,"citycode":"410500",cityName:"新乡",groupCount:10,groupSum:3500,groupInvailedSum:17,groupNO:"46","download_Date":null,"exception_Information":"","in_Storage_Date":null,"is_Exception":0,"issued_Date":null,"old_Card_Type":1,"out_Storage_Date":null,"out_Workshop_Date":null,"position_Date":null,"print_Out_Date":null,"print_State":0,"printer_Id":0,"quality_People_Name":"","quality_Test_Date":null,"submit_Date":{"date":20,"day":2,"hours":11,"minutes":20,"month":10,"seconds":53,"time":1542684053000,"timezoneOffset":-480,"year":118},"task_Id":201811203,"task_State_Id":1},
{"card_Type":1,"citycode":"410600",cityName:"周口",groupCount:10,groupSum:3500,groupInvailedSum:18,groupNO:"48-52,53-55","download_Date":null,"exception_Information":"","in_Storage_Date":null,"is_Exception":0,"issued_Date":null,"old_Card_Type":1,"out_Storage_Date":null,"out_Workshop_Date":null,"position_Date":null,"print_Out_Date":null,"print_State":0,"printer_Id":0,"quality_People_Name":"","quality_Test_Date":null,"submit_Date":{"date":20,"day":2,"hours":11,"minutes":20,"month":10,"seconds":53,"time":1542684053000,"timezoneOffset":-480,"year":118},"task_Id":201811203,"task_State_Id":1},
]
$scope.groupList =[
{"groupNO":45,"vaildCount":45,invaildCount:25,specialCardCount:5,specialCardList:[{acceptNo:20180401,specialType:1},{acceptNo:20180401,specialType:1}]},
{"groupNO":45,"vaildCount":45,invaildCount:25,specialCardCount:5,specialCardList:[{acceptNo:20180401,specialType:1},{acceptNo:20180401,specialType:1}]},
{"groupNO":45,"vaildCount":45,invaildCount:25,specialCardCount:5,specialCardList:[{acceptNo:20180401,specialType:1},{acceptNo:20180401,specialType:1}]}
]
$scope.countyList = [
{}
]
$scope.showtable = -1;
$scope.showTableDY = function (taskID) {
if ($scope.showtable != taskID) {
$scope.showtable = taskID;
} else {
$scope.showtable = -1;
}
}
$scope.folds = [ $scope.folds = [
{id:1,name: '普通证', count:10000,filter:'',isActive:true, dataTable:{ {id:1,name: '普通证', count:10000,filter:'',isActive:true, dataTable:{
......
package com.yxproject.start.service.impl;
import static org.junit.Assert.*;
/**
* Created by Administrator on 2018/11/6.
*/
public class GroupinfoServiceImplTest {
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
</web-app>
\ No newline at end of file
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