Commit 17dccbab authored by Administrator's avatar Administrator

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

# Conflicts:
#	src/main/java/com/yxproject/start/api/AdminApi.java
#	src/main/java/com/yxproject/start/api/UserApi.java
parents de04730a 14857152
...@@ -422,4 +422,10 @@ public class AdminApi { ...@@ -422,4 +422,10 @@ public class AdminApi {
} }
}
}
...@@ -38,11 +38,12 @@ public class UserApi { ...@@ -38,11 +38,12 @@ public class UserApi {
@Autowired @Autowired
private PoliceStationApplyReasonService policeStationApplyReasonService; private PoliceStationApplyReasonService policeStationApplyReasonService;
@Autowired
private SysPermissionService sysPermissionService;
@Autowired @Autowired
private FailedCardService failedCardService; private FailedCardService failedCardService;
@Autowired
private CountyListInfoService countyListInfoService;
@Autowired
private CardBodyInfoService cardBodyInfoService;
@PostMapping("login") @PostMapping("login")
public Map<String, Object> submitLogin(@RequestBody String jsonStr) { public Map<String, Object> submitLogin(@RequestBody String jsonStr) {
...@@ -351,6 +352,119 @@ public class UserApi { ...@@ -351,6 +352,119 @@ public class UserApi {
return null; return null;
} }
/**
* 通过任务单查询区县列表;
*
* @return
*/
@RequestMapping("getCountyList")
// @RequiresPermissions("userInfo.add")//权限管理;
public String getCountyListInfoByTaskListID(@RequestParam("taskListID") String tasklistid, HttpServletResponse resp) {
List<CountyListInfoEntity> countyListInfoEntity = countyListInfoService.findCountyListByTaskListID(tasklistid);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(countyListInfoEntity);
Map map = new HashMap();
// map.put("MakeType",productionTaskListEntity);
return yxjsonResponse.toJSONString();
}
/**
* 保存卡机表;
*
* @return
*/
@RequestMapping("addCardBody")
// @RequiresPermissions("userInfo.add")//权限管理;
public String addCardBodyInfo(@RequestParam("CardBody") String cardBodyInfoId, HttpServletResponse resp) {
String map = "{\"CardBodyId\":\"1}";
JSONObject jsonObject = JSONObject.fromObject(map);
Object cardBodyInfo = jsonObject.get("CardBody");
Object groupInfoList = jsonObject.get("groupInfoList");
List<GroupNoEntity> groupNoEntities = (List<GroupNoEntity>) groupInfoList;
CardBodyInfoEntity cardBodyInfoEntity = (CardBodyInfoEntity) cardBodyInfo;
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = cardBodyInfoService.addCardBodyInfoEntity(cardBodyInfoEntity, groupNoEntities);
yxjsonResponse.outPutSuccess(i + "添加成功");
return yxjsonResponse.toJSONString();
}
/**
* 更新循环单
* 添加异常状态;
* @return
*/
@RequestMapping("addExceptionState")
// @RequiresPermissions("userInfo.add")//权限管理;
public String addExceptionState(@RequestParam("exception_information") String exception_information, HttpServletResponse resp) {
String map = "{\"production_Task_List_Id\":\"20181016001\",\"make_Type\":8,\"old_Make_Type\":8,exception_State:0} ";
JSONObject jsonObject = JSONObject.fromObject(map);
TaskEntity productionTaskListEntity = (TaskEntity) jsonObject.toBean(jsonObject, TaskEntity.class);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = taskService.addExceptionState(productionTaskListEntity);
yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString();
}
/**
* 更新入库时间
*
* @return
*/
@RequestMapping("updatePutinstorageDate")
@RequiresPermissions("userInfo.add")//权限管理;
public String updatePutinstorageDate(@RequestParam("id") String id, HttpServletResponse resp) {
String map = "{\"production_Task_List_Id\":\"20181016001\",\"make_Type\":8,\"old_Make_Type\":8,} ";
JSONObject jsonObject = JSONObject.fromObject(map);
TaskEntity productionTaskListEntity = (TaskEntity) jsonObject.toBean(jsonObject, TaskEntity.class);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = taskService.updateProductionTask(productionTaskListEntity);
yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString();
}
/**
* 更新出库时间
*
* @return
*/
@RequestMapping("updateOutboundDate")
// @RequiresPermissions("userInfo.add")//权限管理;
public String updateOutboundDate(@RequestParam("id") String id, HttpServletResponse resp) {
String map = "{\"production_Task_List_Id\":\"20181016001\",\"make_Type\":8,\"old_Make_Type\":8,} ";
JSONObject jsonObject = JSONObject.fromObject(map);
TaskEntity productionTaskListEntity = (TaskEntity) jsonObject.toBean(jsonObject, TaskEntity.class);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = taskService.updateProductionTask(productionTaskListEntity);
yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString();
}
/**
* 对出库数进行更改
* 更新出库数
* @return
*/
@RequestMapping("reviseOutBoundCount")
@RequiresPermissions("userInfo.add")//权限管理;
public String reviseOutBoundCount(@RequestParam("id") String id, HttpServletResponse resp) {
String map = "{\"production_Task_List_Id\":\"20181016001\",\"make_Type\":8,\"old_Make_Type\":8,} ";
JSONObject jsonObject = JSONObject.fromObject(map);
TaskEntity productionTaskListEntity = (TaskEntity) jsonObject.toBean(jsonObject, TaskEntity.class);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = taskService.updateProductionTask(productionTaskListEntity);
yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString();
}
/** /**
* 下载装箱单 * 下载装箱单
* *
...@@ -1051,7 +1165,7 @@ public class UserApi { ...@@ -1051,7 +1165,7 @@ public class UserApi {
//第六步将生成excel文件保存到指定路径下 //第六步将生成excel文件保存到指定路径下
FileOutputStream fout = null; FileOutputStream fout = null;
try { try {
fout = new FileOutputStream("F:\\Excel\\" + simpleDateFormat.format(new Date()) + countyInfoList.get(0).get("COUNTYNAME") + ".xls"); fout = new FileOutputStream("E:\\Excel\\" + simpleDateFormat.format(new Date()) + countyInfoList.get(0).get("COUNTYNAME") + ".xls");
// fout = new FileOutputStream("D:\\" + simpleDateFormat.format(new Date()) + list.get(0).getString("COUNTYNAME") + ".xls"); // fout = new FileOutputStream("D:\\" + simpleDateFormat.format(new Date()) + list.get(0).getString("COUNTYNAME") + ".xls");
wb.write(fout); wb.write(fout);
fout.close(); fout.close();
...@@ -1060,7 +1174,7 @@ public class UserApi { ...@@ -1060,7 +1174,7 @@ public class UserApi {
} }
System.out.println("Excel文件生成成功..." + new Date()); System.out.println("Excel文件生成成功..." + new Date());
return "F:\\Excel\\" + simpleDateFormat.format(new Date()) + countyInfoList.get(0).get("COUNTYNAME") + ".xls"; return "E:\\Excel\\" + simpleDateFormat.format(new Date()) +countyInfoList.get(0).get("COUNTYNAME") + ".xls";
// return "D:\\" + simpleDateFormat.format(new Date()) + list.get(0).getString("COUNTYNAME") + ".xls"; // return "D:\\" + simpleDateFormat.format(new Date()) + list.get(0).getString("COUNTYNAME") + ".xls";
} }
......
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);
}
}
package com.yxproject.start.entity;
import javax.persistence.*;
import java.util.List;
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 Long 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 Long 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);
}
}
...@@ -7,7 +7,7 @@ import java.util.Objects; ...@@ -7,7 +7,7 @@ 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 group_Id;
private long task_Id; private long task_Id;
...@@ -15,6 +15,7 @@ public class GroupNoEntity { ...@@ -15,6 +15,7 @@ public class GroupNoEntity {
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;
public Long totalinvalidCount;
@Basic @Basic
@Column(name = "GROUP_ID", nullable = false, precision = 0) @Column(name = "GROUP_ID", nullable = false, precision = 0)
......
package com.yxproject.start.mapper;
import com.yxproject.start.entity.CardBodyInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* Created by liuxinben on 2018/11/6.10:26
*/
@Mapper
public interface CardBodyInfoMapper {
public int insertCardBodyInfoEntity(CardBodyInfoEntity cardBodyInfoEntity);
public int updateCardBodyInfo(CardBodyInfoEntity cardBodyInfoEntity);
}
\ No newline at end of file
package com.yxproject.start.mapper;
import com.yxproject.start.entity.CountyListInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* Created by liuxinben on 2018/11/6.10:26
*/
@Mapper
public interface CountyListInfoMapper {
public List<CountyListInfoEntity> findCountyListByTaskListID(String tasklistID);
public int updateOutBoundCount(CountyListInfoEntity countyListInfoEntity);
}
...@@ -29,3 +29,24 @@ public interface PoliceStationVailedMapper { ...@@ -29,3 +29,24 @@ public interface PoliceStationVailedMapper {
@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,7 @@ public interface TaskMapper { ...@@ -17,5 +17,7 @@ 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 addExceptionState(TaskEntity taskEntity);
public int replaceExceptionInformation(TaskEntity taskEntity);
} }
...@@ -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.CardBodyInfoEntity;
import com.yxproject.start.entity.GroupNoEntity;
import java.util.List;
/**
* Created by Administrator on 2018/11/7.
*/
public interface CardBodyInfoService {
public int addCardBodyInfoEntity(CardBodyInfoEntity cardBodyInfoEntity, List<GroupNoEntity> groupNoEntities);
public int updateCardBodyInfo(CardBodyInfoEntity map);
}
package com.yxproject.start.service;
import com.yxproject.start.entity.CountyListInfoEntity;
import java.util.List;
/**
* Created by liuxinben on 2018/11/6.10:30
*/
public interface CountyListInfoService {
public List<CountyListInfoEntity> findCountyListByTaskListID(String tasklistID);
public int reviseOutBoundCount(CountyListInfoEntity map);
}
...@@ -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.CardBodyInfoEntity;
import com.yxproject.start.entity.GroupNoEntity;
import com.yxproject.start.mapper.CardBodyInfoMapper;
import com.yxproject.start.mapper.GroupNoMapper;
import com.yxproject.start.mapper.UtilMapper;
import com.yxproject.start.service.CardBodyInfoService;
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;
/**
* Created by Administrator on 2018/11/7.
*/
@Service
public class CardBodyInfoServiceImpl implements CardBodyInfoService {
@Autowired
public CardBodyInfoMapper cardBodyInfoMapper;
@Autowired
private UtilMapper utilMapper;
@Autowired
public GroupNoMapper groupinfoMapper;
@Override
public int updateCardBodyInfo(CardBodyInfoEntity cardBodyInfoEntity) {
//todo 状态更新时间
return cardBodyInfoMapper.updateCardBodyInfo(cardBodyInfoEntity);
}
@Override
@Transactional(rollbackFor=Exception.class)
public int addCardBodyInfoEntity(CardBodyInfoEntity cardBodyInfoEntity, 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);
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Created by liuxinben on 2018/11/6.13:42
*/
@Service
public class CountyListInfoServiceImpl implements CountyListInfoService {
@Autowired
public CountyListInfoMapper countyListInfoMapper;
@Override
public List<CountyListInfoEntity> findCountyListByTaskListID(String tasklistid) {
List<CountyListInfoEntity> byTaskListID = countyListInfoMapper.findCountyListByTaskListID(tasklistid);
return byTaskListID;
}
@Override
public int reviseOutBoundCount(CountyListInfoEntity countyListInfoEntity) {
// int i = 0;
//
//
//
// CountyListInfoEntity.setOutBoundCount( );
// return CountyListInfoMapper.updateOutBoundCount(countyListInfoEntity);
//TODO
return 0;
}
}
\ No newline at end of file
...@@ -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.CountyListInfoEntity;
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,63 @@ public class TaskServiceImpl implements TaskService { ...@@ -411,6 +415,63 @@ 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= productionTaskListMapper.updateProductionTask(productionTaskListEntity);
i=taskMapper.replaceExceptionInformation(taskEntity);
}
return i;
}
private CountyListInfoEntity countyListInfoEntity;
private GroupNoEntity groupNoEntity;
/**
* 更新出库时间
* @param
* @return
*/
@Override
public int updateOutboundDate(TaskEntity taskEntity) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
if(groupNoEntity.totalinvalidCount.equals(countyListInfoEntity.getOutBoundCount())) {
taskEntity.setOut_Storage_Date(new Date());
return taskMapper.updateTaskEntity(taskEntity);
}
else{
return 0;
}
}
/**
* 更新入库时间
* @param
* @return
*/
@Override
public int updatePutinstorageDate(TaskEntity taskEntity) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
if(groupNoEntity.totalinvalidCount.equals(countyListInfoEntity.getInStorageCount())) {
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.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.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"/>
</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>
<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>
</mapper>
...@@ -68,4 +68,8 @@ ...@@ -68,4 +68,8 @@
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,EXCEPTION_STATE =#{exception_State} where TASK_ID =#{task_Id}
</update>
</mapper> </mapper>
\ 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