Commit b53ecaf6 authored by Administrator's avatar Administrator

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

# Conflicts:
#	src/main/java/com/yxproject/start/entity/CountyListInfoEntity.java
#	src/main/java/com/yxproject/start/service/impl/TaskServiceImpl.java
parents b4b3adcf 60d0b2da
......@@ -38,10 +38,10 @@ public class MyShiroRealm extends AuthorizingRealm {
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
System.out.println("权限配置-->MyShiroRealm.doGetAuthorizationInfo()");
SimpleAuthorizationInfo authorizationInfo = new SimpleAuthorizationInfo();
UserInfo userInfo = (UserInfo)principals.getPrimaryPrincipal();
for(SysRole role:userInfo.getRoleList()){
UserInfo userInfo = (UserInfo) principals.getPrimaryPrincipal();
for (SysRole role : userInfo.getRoleList()) {
authorizationInfo.addRole(role.getRole());
for(SysPermission p:role.getPermissions()){
for (SysPermission p : role.getPermissions()) {
authorizationInfo.addStringPermission(p.getPermission());
}
}
......@@ -49,7 +49,6 @@ public class MyShiroRealm extends AuthorizingRealm {
}
/**
*
* @param token
* @return
* @throws AuthenticationException
......@@ -59,13 +58,13 @@ public class MyShiroRealm extends AuthorizingRealm {
throws AuthenticationException {
System.out.println("MyShiroRealm.doGetAuthenticationInfo()");
//获取用户的输入的账号.
String username = (String)token.getPrincipal();
String username = (String) token.getPrincipal();
System.out.println(username);
System.out.println(token.getCredentials().toString());
//通过username从数据库中查找 User对象,如果找到,没找到.
//实际项目中,这里可以根据实际情况做缓存,如果不做,Shiro自己也是有时间间隔机制,2分钟内不会重复执行该方法
UserInfo user = userInfoService.findByUsername(username);
if(user == null || user.getState()==1){
if (user == null || user.getState() == 1) {
return null;
}
SimpleAuthenticationInfo authenticationInfo = new SimpleAuthenticationInfo(
......
......@@ -50,9 +50,9 @@ public class ShiroConfig {
}
@Bean
public static DefaultAdvisorAutoProxyCreator getDefaultAdvisorAutoProxyCreator(){
public static DefaultAdvisorAutoProxyCreator getDefaultAdvisorAutoProxyCreator() {
DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator=new DefaultAdvisorAutoProxyCreator();
DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator = new DefaultAdvisorAutoProxyCreator();
defaultAdvisorAutoProxyCreator.setUsePrefix(true);
return defaultAdvisorAutoProxyCreator;
......
......@@ -2,72 +2,99 @@ package com.yxproject.start.entity;
import javax.persistence.*;
import java.sql.Time;
import java.util.Date;
import java.util.Objects;
/**
* Created by zhangyusheng on 2018/11/16 10:51
*/
@Entity
@Table(name = "CARD_BODY", schema = "DAHAI", catalog = "")
@Table(name = "CARD_BODY", schema = "DAHAI")
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
@Column(name = "CARD_BODY_ID", nullable = false, precision = 0)
public long getCardBodyId() {
return cardBodyId;
public long getCard_Body_Id() {
return card_Body_Id;
}
public void setCardBodyId(long cardBodyId) {
this.cardBodyId = cardBodyId;
public void setCard_Body_Id(long card_Body_Id) {
this.card_Body_Id = card_Body_Id;
}
@Basic
@Column(name = "SAVE_DATE", nullable = false)
public Time getSaveDate() {
return saveDate;
public Date getSave_Date() {
return save_Date;
}
public void setSaveDate(Time saveDate) {
this.saveDate = saveDate;
public void setSave_Date(Date save_Date) {
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
@Column(name = "IS_ACTIVE", nullable = false, precision = 0)
public long getIsActive() {
return isActive;
public long getIs_Active() {
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) {
this.isActive = isActive;
public void setTask_Id(long task_id) {
this.task_Id = task_Id;
}
@Basic
@Column(name = "TOTAL_COUNT", nullable = false, precision = 0)
public long getTotalCount() {
return totalCount;
public long getTotal_Count() {
return total_Count;
}
public void setTotalCount(long totalCount) {
this.totalCount = totalCount;
public void setTotal_Count(long total_Count) {
this.total_Count = total_Count;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CardBodyEntity that = (CardBodyEntity) o;
return cardBodyId == that.cardBodyId &&
isActive == that.isActive &&
totalCount == that.totalCount &&
Objects.equals(saveDate, that.saveDate);
return card_Body_Id == that.card_Body_Id &&
card_Type_Id == that.card_Type_Id &&
is_Active == that.is_Active &&
task_Id == that.task_Id &&
total_Count == that.total_Count &&
Objects.equals(save_Date, that.save_Date);
}
@Override
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);
}
}
package com.yxproject.start.entity;
import javax.persistence.*;
import java.util.Objects;
/**
* Created liuxinben on 2018/11/7.9:21
*/
@Entity
@Table(name = "CARD_BODY_INFO", schema = "DAHAI", catalog = "")
public class CardBodyInfoEntity {
private String card_Body_Info_Id;
private String card_Body_Info_Save_Date;
private String card_Body_Type;
private String cyclesheetid;
private Long is_Active;
private Long card_Body_Count;
@Id
@Column(name = "CARD_BODY_INFO_ID",nullable = false, length = 20)
public String getCardBodyInfoId() {
return card_Body_Info_Id;
}
public void setCardBodyInfoId(String cardBodyInfoId) {
this.card_Body_Info_Id = cardBodyInfoId;
}
@Basic
@Column(name = "CARD_BODY_INFO_SAVE_DATE",nullable = false, length = 20)
public String getCardBodyInfoSaveDate() {
return card_Body_Info_Save_Date;
}
public void setCardBodyInfoSaveDate(String cardBodyInfoSaveDate) {
this.card_Body_Info_Save_Date = cardBodyInfoSaveDate;
}
@Basic
@Column(name = "CARD_BODY_TYPE",nullable = false, length = 20)
public String getCardBodyType() {
return card_Body_Type;
}
public void setCardBodyType(String cardBodyType) {
this.card_Body_Type = cardBodyType;
}
@Basic
@Column(name = "CYCLESHEETID", nullable = true, length = 20)
public String getCyclesheetid() {
return cyclesheetid;
}
public void setCyclesheetid(String cyclesheetid) {
this.cyclesheetid = cyclesheetid;
}
@Basic
@Column(name = "IS_ACTIVE",nullable = false, length = 20)
public Long getIsActive() {
return is_Active;
}
public void setIsActive(Long isActive) {
this.is_Active = isActive;
}
@Basic
@Column(name = "CARD_BODY_COUNT",nullable = false, length = 20)
public Long getCardBodyCount() {
return card_Body_Count;
}
public void setCardBodyCount(Long cardBodyCount) {
this.card_Body_Count = cardBodyCount;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CardBodyInfoEntity that = (CardBodyInfoEntity) o;
return Objects.equals(card_Body_Info_Id, that.card_Body_Info_Id) &&
Objects.equals(card_Body_Info_Save_Date, that.card_Body_Info_Save_Date) &&
Objects.equals(is_Active, that.is_Active) &&
Objects.equals(cyclesheetid, that.cyclesheetid) &&
Objects.equals(card_Body_Type, that.card_Body_Type) &&
Objects.equals(card_Body_Count, that.card_Body_Count) ;
}
@Override
public int hashCode() {
return Objects.hash(card_Body_Info_Id, card_Body_Info_Save_Date, is_Active, card_Body_Count, cyclesheetid, card_Body_Type);
}
}
......@@ -2,68 +2,87 @@ package com.yxproject.start.entity;
import javax.persistence.*;
import java.sql.Time;
import java.util.Date;
import java.util.Objects;
/**
* Created by zhangyusheng on 2018/11/16 10:51
*/
@Entity
@Table(name = "COUNTY_LIST", schema = "DAHAI", catalog = "")
@Table(name = "COUNTY_LIST", schema = "DAHAI")
public class CountyListEntity {
private long countyListId;
private Time saveDate;
private Long finishCount;
private Long inStorageCount;
private Long outStorageCount;
private long county_List_Id;
private long task_Id;
private Date save_Date;
private String county_Code;
private long finish_Count;
private long in_Storage_Count;
private long out_Storage_Count;
@Id
@Column(name = "COUNTY_LIST_ID", nullable = false, precision = 0)
public long getCountyListId() {
return countyListId;
public long getCounty_List_Id() {
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) {
this.countyListId = countyListId;
public void setTask_Id(long task_Id) {
this.task_Id = task_Id;
}
@Basic
@Column(name = "SAVE_DATE", nullable = false)
public Time getSaveDate() {
return saveDate;
public Date getSave_Date() {
return save_Date;
}
public void setSaveDate(Time saveDate) {
this.saveDate = saveDate;
public void setSave_Date(Date save_Date) {
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
@Column(name = "FINISH_COUNT", nullable = true, precision = 0)
public Long getFinishCount() {
return finishCount;
public long getFinish_Count() {
return finish_Count;
}
public void setFinishCount(Long finishCount) {
this.finishCount = finishCount;
public void setFinish_Count(long finish_Count) {
this.finish_Count = finish_Count;
}
@Basic
@Column(name = "IN_STORAGE_COUNT", nullable = true, precision = 0)
public Long getInStorageCount() {
return inStorageCount;
public long getIn_Storage_Count() {
return in_Storage_Count;
}
public void setInStorageCount(Long inStorageCount) {
this.inStorageCount = inStorageCount;
public void setIn_Storage_Count(long in_Storage_Count) {
this.in_Storage_Count = in_Storage_Count;
}
@Basic
@Column(name = "OUT_STORAGE_COUNT", nullable = true, precision = 0)
public Long getOutStorageCount() {
return outStorageCount;
public long getOut_Storage_Count() {
return out_Storage_Count;
}
public void setOutStorageCount(Long outStorageCount) {
this.outStorageCount = outStorageCount;
public void setOut_Storage_Count(long out_Storage_Count) {
this.out_Storage_Count = out_Storage_Count;
}
@Override
......@@ -71,15 +90,17 @@ public class CountyListEntity {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CountyListEntity that = (CountyListEntity) o;
return countyListId == that.countyListId &&
Objects.equals(saveDate, that.saveDate) &&
Objects.equals(finishCount, that.finishCount) &&
Objects.equals(inStorageCount, that.inStorageCount) &&
Objects.equals(outStorageCount, that.outStorageCount);
return county_List_Id == that.county_List_Id &&
task_Id == that.task_Id &&
finish_Count == that.finish_Count &&
in_Storage_Count == that.in_Storage_Count &&
out_Storage_Count == that.out_Storage_Count &&
Objects.equals(save_Date, that.save_Date) &&
Objects.equals(county_Code, that.county_Code);
}
@Override
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);
}
}
package com.yxproject.start.entity;
import javax.persistence.*;
import java.util.Objects;
/**
* Created by liuxinben on 2018/11/6.10:14
*/
@Entity
@Table(name = "COUNTY_LIST_INFO", schema = "DAHAI")
public class CountyListInfoEntity {
private String county_List_Id;
private String save_Date;
private String cyclesheetid;
private String county_Code;
private Long finish_Count;
private Long in_Storage_Count;
private Long out_Bound_Count;
@Id
@Column(name = "COUNTY_LIST_ID", nullable = false, length = 20)
public String getCountyListId() {
return county_List_Id;
}
public void setCountyListId(String countyListId) {
this.county_List_Id = countyListId;
}
@Basic
@Column(name = "SAVE_DATE", nullable = true, length = 20)
public String getSaveDate() { return save_Date;}
public void setSaveDate(String saveDate) {
this.save_Date = saveDate;
}
@Basic
@Column(name = "CYCLESHEETID", nullable = true, length = 20)
public String getCyclesheetid() {
return cyclesheetid;
}
public void setCyclesheetid(String cyclesheetid) {
this.cyclesheetid = cyclesheetid;
}
@Basic
@Column(name = "COUNTY_CODE", nullable = true, length = 20)
public String getCountyCode() {
return county_Code;
}
public void setCountyCode(String county_Code) { this.county_Code = county_Code;}
@Basic
@Column(name = "FINISH_COUNT", nullable = true, precision = 0)
public Long getFinishCount() {
return finish_Count;
}
public void setFinishCount(Long finishCount) {
this.finish_Count = finishCount;
}
@Basic
@Column(name = "IN_STORAGE_COUNT", nullable = true, precision = 0)
public int getInStorageCount() {
return in_Storage_Count;
}
public void setInStorageCount(Long InStorageCount) {
this.in_Storage_Count = InStorageCount;
}
@Basic
@Column(name = "OUT_BOUND_COUNT", nullable = true, precision = 0)
public int getOutBoundCount() {
return out_Bound_Count;
}
public void setOutBoundCount(Long outBoundCount) {
this.out_Bound_Count = outBoundCount;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CountyListInfoEntity that = (CountyListInfoEntity) o;
return Objects.equals(county_List_Id, that.county_List_Id) &&
Objects.equals(save_Date, that.save_Date) &&
Objects.equals(cyclesheetid, that.cyclesheetid) &&
Objects.equals(county_Code, that.county_Code) &&
Objects.equals(finish_Count, that.finish_Count) &&
Objects.equals(in_Storage_Count, that.in_Storage_Count) &&
Objects.equals(out_Bound_Count, that.out_Bound_Count) ;
}
@Override
public int hashCode() {
return Objects.hash(county_List_Id, save_Date, cyclesheetid, county_Code, finish_Count, in_Storage_Count, out_Bound_Count);
}
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.CountyListInfoEntity;
import com.yxproject.start.entity.CardBodyEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* Created by liuxinben on 2018/11/6.10:26
*/
@Mapper
public interface CountyListInfoMapper {
public interface CardBodyMapper {
public List<CountyListInfoEntity> findCountyListByTaskListID(String tasklistID);
public int updateOutBoundCount(CountyListInfoEntity countyListInfoEntity);
public int insertCardBodyInfoEntity(CardBodyEntity cardBodyEntity);
public int updateCardBodyInfo(CardBodyEntity cardBodyEntity);
}
\ No newline at end of file
package com.yxproject.start.mapper;
import com.yxproject.start.entity.CardBodyInfoEntity;
import com.yxproject.start.entity.CountyListEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
......@@ -10,9 +10,9 @@ import java.util.List;
*/
@Mapper
public interface CardBodyInfoMapper {
public interface CountyListMapper {
public int insertCardBodyInfoEntity(CardBodyInfoEntity cardBodyInfoEntity);
public int updateCardBodyInfo(CardBodyInfoEntity cardBodyInfoEntity);
public List<CountyListEntity> findCountyListByTaskListID(String tasklistID);
public int updateOutBoundCount(CountyListEntity countyListInfoEntity);
}
......@@ -15,14 +15,14 @@ public interface PoliceStationVailedMapper {
* @param policeStationVailedEntity
* @return
*/
@Insert("INSERT INTO POLICE_STATION_VAILED_INFO (POLICE_STATION_VAILED_INFO_ID,CYCLESHEETID,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})")
@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_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")
public void savePoliceStationVailedInfoEntity(PoliceStationVailedEntity policeStationVailedEntity);
@Select("select * from POLICE_STATION_VAILED_INFO WHERE POLICE_STATION_VAILED_INFO_ID=#{id}")
@Results({@Result(property = "police_Station_Vailed_Info_Id",column = "police_Station_Vailed_Info_Id"),
@Result(property = "cyclesheetid",column = "cyclesheetid"),
@Select("select * from POLICE_STATION_VAILED WHERE POLICE_STATION_VAILED_ID=#{id}")
@Results({@Result(property = "police_Station_Vailed_Id",column = "police_Station_Vailed_Id"),
@Result(property = "task_Id",column = "police_Station_Vailed_Id"),
@Result(property = "police_Station_Code",column = "police_Station_Code"),
@Result(property = "vailed_Count",column = "vailed_Count"),
@Result(property = "invalid_Count",column = "invalid_Count"),
......
package com.yxproject.start.service;
import com.yxproject.start.entity.CardBodyInfoEntity;
import com.yxproject.start.entity.CardBodyEntity;
import com.yxproject.start.entity.GroupNoEntity;
import java.util.List;
......@@ -8,8 +8,8 @@ import java.util.List;
/**
* Created by Administrator on 2018/11/7.
*/
public interface CardBodyInfoService {
public int addCardBodyInfoEntity(CardBodyInfoEntity cardBodyInfoEntity, List<GroupNoEntity> groupNoEntities);
public interface CardBodyService {
public int addCardBodyEntity(CardBodyEntity cardBodyInfoEntity, List<GroupNoEntity> groupNoEntities);
public int updateCardBodyInfo(CardBodyInfoEntity map);
public int updateCardBody(CardBodyEntity map);
}
package com.yxproject.start.service;
import com.yxproject.start.entity.CountyListInfoEntity;
import com.yxproject.start.entity.CountyListEntity;
import java.util.List;
/**
* Created by liuxinben on 2018/11/6.10:30
*/
public interface CountyListInfoService {
public interface CountyListService {
public List<CountyListInfoEntity> findCountyListByTaskListID(String tasklistID);
public int reviseOutBoundCount(CountyListInfoEntity map);
public List<CountyListEntity> findCountyListByTaskListID(String tasklistID);
public int reviseOutBoundCount(CountyListEntity map);
}
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.CardBodyInfoEntity;
import com.yxproject.start.entity.CardBodyEntity;
import com.yxproject.start.entity.GroupNoEntity;
import com.yxproject.start.mapper.CardBodyInfoMapper;
import com.yxproject.start.mapper.CardBodyMapper;
import com.yxproject.start.mapper.GroupNoMapper;
import com.yxproject.start.mapper.UtilMapper;
import com.yxproject.start.service.CardBodyInfoService;
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.Date;
import java.util.List;
/**
......@@ -19,30 +18,29 @@ import java.util.List;
*/
@Service
public class CardBodyInfoServiceImpl implements CardBodyInfoService {
public class CardBodyServiceImpl implements CardBodyService {
@Autowired
public CardBodyInfoMapper cardBodyInfoMapper;
public CardBodyMapper cardBodyMapper;
@Autowired
private UtilMapper utilMapper;
@Autowired
public GroupNoMapper groupinfoMapper;
@Override
public int updateCardBodyInfo(CardBodyInfoEntity cardBodyInfoEntity) {
public int updateCardBody(CardBodyEntity cardBodyEntity) {
//todo 状态更新时间
return cardBodyInfoMapper.updateCardBodyInfo(cardBodyInfoEntity);
return cardBodyMapper.updateCardBodyInfo(cardBodyEntity);
}
@Override
@Transactional(rollbackFor=Exception.class)
public int addCardBodyInfoEntity(CardBodyInfoEntity cardBodyInfoEntity, List<GroupNoEntity> groupinfoEntities) {
public int addCardBodyEntity(CardBodyEntity cardBodyEntity, List<GroupNoEntity> groupinfoEntities) {
int production_task_list_seq = utilMapper.findProductionTaskListSequenceNextValue();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
cardBodyInfoEntity.setCardBodyInfoId(simpleDateFormat.format(new Date()) + production_task_list_seq);
cardBodyInfoMapper.insertCardBodyInfoEntity(cardBodyInfoEntity);
cardBodyMapper.insertCardBodyInfoEntity(cardBodyEntity);
return 1;
}
}
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.CountyListInfoEntity;
import com.yxproject.start.mapper.CountyListInfoMapper;
import com.yxproject.start.service.CountyListInfoService;
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;
......@@ -13,19 +13,19 @@ import java.util.List;
*/
@Service
public class CountyListInfoServiceImpl implements CountyListInfoService {
public class CountyListServiceImpl implements CountyListService {
@Autowired
public CountyListInfoMapper countyListInfoMapper;
public CountyListMapper countyListInfoMapper;
@Override
public List<CountyListInfoEntity> findCountyListByTaskListID(String tasklistid) {
List<CountyListInfoEntity> byTaskListID = countyListInfoMapper.findCountyListByTaskListID(tasklistid);
public List<CountyListEntity> findCountyListByTaskListID(String tasklistid) {
List<CountyListEntity> byTaskListID = countyListInfoMapper.findCountyListByTaskListID(tasklistid);
return byTaskListID;
}
@Override
public int reviseOutBoundCount(CountyListInfoEntity countyListInfoEntity) {
public int reviseOutBoundCount(CountyListEntity countyListInfoEntity) {
// int i = 0;
//
//
......
......@@ -9,7 +9,6 @@ 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.ArrayList;
import java.util.Date;
import java.util.List;
......
......@@ -4,9 +4,6 @@ import com.yxproject.start.entity.*;
import com.yxproject.start.entity.accu.AccCardTEntity;
import com.yxproject.start.entity.prod.ProdCardTEntity;
import com.yxproject.start.mapper.*;
import com.yxproject.start.entity.CountyListInfoEntity;
import net.sf.json.JSONObject;
import java.util.Scanner;
import com.yxproject.start.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -436,7 +433,7 @@ public class TaskServiceImpl implements TaskService {
return i;
}
private CountyListInfoEntity countyListInfoEntity;
private CountyListEntity countyListInfoEntity;
private GroupNoEntity groupNoEntity;
/**
* 更新出库时间
......@@ -445,13 +442,10 @@ public class TaskServiceImpl implements TaskService {
*/
@Override
public int updateOutboundDate(TaskEntity taskEntity) {
int i=0;
i= taskMapper.totalnum(i);
if (countyListInfoEntity.getOutBoundCount()==i){
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
if(groupNoEntity.totalinvalidCount.equals(countyListInfoEntity.getOut_Storage_Count())) {
taskEntity.setOut_Storage_Date(new Date());
return taskMapper.updateTaskEntity(taskEntity);
}
else{
return 0;
......@@ -465,10 +459,8 @@ public class TaskServiceImpl implements TaskService {
*/
@Override
public int updatePutinstorageDate(TaskEntity taskEntity) {
int i=0;
i= taskMapper.totalnum(i);
if (countyListInfoEntity.getInStorageCount()==i){
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
if(groupNoEntity.totalinvalidCount.equals(countyListInfoEntity.getIn_Storage_Count())) {
taskEntity.setIn_Storage_Date(new Date());
return taskMapper.updateTaskEntity(taskEntity);
}
......
<?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.CardBodyInfoEntity">
<id column="card_Body_Info_Id" property="card_Body_Info_Id" />
<result column="card_Body_Info_Save_Date" property="card_Body_Info_Save_Date"/>
<result column="is_Active" property="is_Active"/>
<result column="card_Body_Count" property="card_Body_Count"/>
<result column="card_Body_Type" property="card_Body_Type"/>
<result column="cyclesheetid" property="cyclesheetid"/>
</resultMap>
<insert id="insertCardBodyInfoEntity" parameterType="com.yxproject.start.entity.CardBodyInfoEntity">
Insert into CARD_BODY_INFO (CARD_BODY_INFO_ID,CARD_BODY_INFO_SAVE_DATE,CARD_BODY_COUNT,CARD_BODY_TYPE,CYCLESHEETID,IS_ACTIVE)
values (#{card_Body_Info_Id},#{card_Body_Info_Save_Date},#{is_Active},#{card_Body_Count},#{card_Body_Type},#{cyclesheetid})
</insert>
<update id="updateCardBodyInfo" parameterType="com.yxproject.start.entity.CardBodyInfoEntity">
update CARD_BODY_INFO
<set>
<if test="card_Body_Info_Save_Date ">CARD_BODY_INFO_SAVE_DATE =#{card_Body_Info_Save_Date},</if>
<if test="is_Active ">IS_ACTIVE =#{is_Active},</if>
<if test="card_Body_Count ">CARD_BODY_COUNT =#{card_Body_Count},</if>
<if test="card_Body_Type">CARD_BODY_TYPE =#{card_Body_Type},</if>
<if test="cyclesheetid ">CYCLESHEETID =#{cyclesheetid},</if>
<if test="state!=null">STATE =#{state},</if>
<if test="putinstorage_Date!=null">PUTINSTORAGE_DATE =#{putinstorage_Date},</if>
</set>
where CARD_BODY_INFO_ID =#{card_Body_Info_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.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>
<insert id="insertCardBodyEntity" parameterType="com.yxproject.start.entity.CardBodyEntity">
Insert into CARD_BODY (CARD_BODY_ID,SAVE_DATE,CARD_TYPE_ID,IS_ACTIVE,TASK_ID,TOTAL_COUNT)
values (#{card_Body_Id},#{save_Date},#{card_Type_Id},#{is_Active},#{task_Id},#{total_Count})
</insert>
<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.CountyListInfoMapper">
<resultMap id="CountyListInfoMapper" type="com.yxproject.start.entity.CountyListInfoEntity">
<id column="county_List_Id" property="county_List_Id" />
<result column="save_Date" property="save_Date"/>
<result column="cyclesheetid" property="cyclesheetid"/>
<result column="county_Code" property="county_Code"/>
<result column="finish_Count" property="finish_Count"/>
<result column="in_Storage_Count" property="in_Storage_Count"/>
<result column="out_Bound_Count" property="out_Bound_Count"/>
<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.CountyListInfoEntity" parameterType="String">
SELECT * FROM COUNTY_LIST_INFO where CYCLESHEETID=#{tasklistID}
<select id="findCountyListByTaskListID" resultType="com.yxproject.start.entity.CountyListEntity" parameterType="String">
SELECT * FROM COUNTY_LIST where task_Id=#{task_Id}
</select>
<update id="updateOutBoundCount" parameterType="com.yxproject.start.entity.CountyListInfoEntity" >
update COUNTY_LIST_INFO OUT_BOUND_COUNT =#{out_Bound_Count} where COUNTY_LIST_ID =#{county_List_Id}
<update id="updateOutBoundCount" parameterType="com.yxproject.start.entity.CountyListEntity" >
update COUNTY_LIST OUT_STORAGE_COUNT =#{out_Storage_Count} where COUNTY_LIST_ID =#{county_List_Id}
</update>
......
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