Commit d65c69bc authored by Administrator's avatar Administrator

下载装箱单并连接盈信库

更新异常状态并更新异常信息
更新出库时间和入库时间
查询交接单
parent b53ecaf6
......@@ -361,7 +361,6 @@ public class UserApi {
@RequestMapping("getCountyList")
// @RequiresPermissions("userInfo.add")//权限管理;
public String getCountyListInfoByTaskListID(@RequestParam("taskListID") String tasklistid, HttpServletResponse resp) {
List<CountyListEntity> countyListInfoEntity = countyListService.findCountyListByTaskListID(tasklistid);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
......@@ -371,59 +370,57 @@ public class UserApi {
return yxjsonResponse.toJSONString();
}
/**
* 保存卡表;
/**有误
* 保存卡表;
*
* @return
*/
@RequestMapping("addCardBody")
// @RequiresPermissions("userInfo.add")//权限管理;
public String addCardBodyInfo(@RequestParam("CardBody") String cardBodyInfoId, HttpServletResponse resp) {
String map = "{\"CardBodyId\":\"1}";
public String addCardBodyInfo(@RequestParam("cardBodyId") String cardBodyId, 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;
CardBodyEntity cardBodyEntity = (CardBodyEntity) cardBodyInfo;
Object cardBody = jsonObject.get("CardBody");
CardBodyEntity cardBodyEntity = (CardBodyEntity) cardBody;
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = cardBodyService.addCardBodyEntity(cardBodyEntity, groupNoEntities);
int i = cardBodyService.addCardBodyEntity(cardBodyEntity);
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} ";
public String addExceptionState(@RequestParam("exception_Information") String exception_Information, HttpServletResponse resp) {
String map = "{\"task_Id\":\"20181016001\",\"exception_Information\":0} ";
JSONObject jsonObject = JSONObject.fromObject(map);
TaskEntity productionTaskListEntity = (TaskEntity) jsonObject.toBean(jsonObject, TaskEntity.class);
TaskEntity taskEntity = (TaskEntity) jsonObject.toBean(jsonObject, TaskEntity.class);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = taskService.addExceptionState(productionTaskListEntity);
int i = taskService.addExceptionState(taskEntity);
yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString();
}
/**
* 更新入库时间
*
*404
* @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,} ";
String map = "{\"id\":\"20181016001\",} ";
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);
int i = taskService.updatePutinstorageDate(productionTaskListEntity);
yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString();
}
......@@ -436,12 +433,12 @@ public class UserApi {
@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,} ";
String map = "{\"task_Id\":\"20181016001\",\"make_Type\":8,\"old_Make_Type\":8,} ";
JSONObject jsonObject = JSONObject.fromObject(map);
TaskEntity productionTaskListEntity = (TaskEntity) jsonObject.toBean(jsonObject, TaskEntity.class);
TaskEntity taskEntity = (TaskEntity) jsonObject.toBean(jsonObject, TaskEntity.class);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = taskService.updateProductionTask(productionTaskListEntity);
int i = taskService.updateOutboundDate(taskEntity);
yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString();
}
......@@ -449,21 +446,57 @@ public class UserApi {
/**
* 对出库数进行更改
* 更新出库数
* 有点问题
* @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,} ";
// @RequiresPermissions("userInfo.add")//权限管理;
public String reviseOutBoundCount(@RequestParam("county_List_Id") String county_List_Id, HttpServletResponse resp) {
String map = "{\"county_List_Id\":\"20181016001\",\"Out_Storage_County\":\"52\",} ";
JSONObject jsonObject = JSONObject.fromObject(map);
TaskEntity productionTaskListEntity = (TaskEntity) jsonObject.toBean(jsonObject, TaskEntity.class);
CountyListEntity countyListEntity = (CountyListEntity) jsonObject.toBean(jsonObject, CountyListEntity.class);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = taskService.updateProductionTask(productionTaskListEntity);
int i = countyListService.reviseOutBoundCount(countyListEntity);
yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString();
}
/**
* 对入库数进行更改
* 更新入库数
* 有点问题
* @return
*/
@RequestMapping("reviseInBoundCount")
// @RequiresPermissions("userInfo.add")//权限管理;
public String reviseInBoundCount(@RequestParam("county_List_Id") String county_List_Id, HttpServletResponse resp) {
String map = "{\"county_List_Id\":\"20181016001\",\"In_Storage_County\":\"52\",} ";
JSONObject jsonObject = JSONObject.fromObject(map);
CountyListEntity countyListEntity = (CountyListEntity) jsonObject.toBean(jsonObject, CountyListEntity.class);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
int i = countyListService.reviseInBoundCount(countyListEntity);
yxjsonResponse.outPutSuccess(i + "更新成功");
return yxjsonResponse.toJSONString();
}
/**
* 查询交接单;
*
* @return
*/
@RequestMapping("getConnectList")
// @RequiresPermissions("userInfo.add")//权限管理;
public String getConnectList(@RequestParam("save_Date") String save_Date, HttpServletResponse resp) {
List<CountyListEntity> countyListEntity = countyListService.getConnectList(save_Date);
YXJSONResponse yxjsonResponse = new YXJSONResponse();
resp.setCharacterEncoding("UTF-8");
yxjsonResponse.outPutSuccess(countyListEntity);
Map map = new HashMap();
// map.put("MakeType",productionTaskListEntity);
return yxjsonResponse.toJSONString();
}
/**
* 下载装箱单
......
......@@ -190,9 +190,6 @@ public class TaskEntity {
this.in_Storage_Date = in_Storage_Date;
}
@Basic
@Column(name = "TASK_STATE_ID", nullable = true, precision = 0)
public long getTask_State_Id() {
......
......@@ -9,8 +9,7 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface CardBodyMapper {
public int insertCardBodyInfoEntity(CardBodyEntity cardBodyEntity);
public int insertCardBodyEntity(CardBodyEntity cardBodyEntity);
public int updateCardBodyInfo(CardBodyEntity cardBodyEntity);
}
\ No newline at end of file
......@@ -3,6 +3,7 @@ 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;
/**
......@@ -13,6 +14,7 @@ import java.util.List;
public interface CountyListMapper {
public List<CountyListEntity> findCountyListByTaskListID(String tasklistID);
public int updateOutBoundCount(CountyListEntity countyListInfoEntity);
public int updateBoundCount(CountyListEntity countyListEntity);
public List<CountyListEntity>getConnectList(String save_Date);
}
......@@ -17,7 +17,6 @@ public interface TaskMapper {
public int updateTaskEntity(TaskEntity taskEntity);
public List<TaskEntity> findTaskEntityByAcceptNo(String acceptNo);
public List<TaskEntity> findTaskEntityByState(int state);
public int addExceptionState(TaskEntity taskEntity);
public int replaceExceptionInformation(TaskEntity taskEntity);
public int totalnum (int i);
}
......@@ -9,7 +9,8 @@ import java.util.List;
* Created by Administrator on 2018/11/7.
*/
public interface CardBodyService {
public int addCardBodyEntity(CardBodyEntity cardBodyInfoEntity, List<GroupNoEntity> groupNoEntities);
public int addCardBodyEntity(CardBodyEntity cardBodyEntity);
public int updateCardBody(CardBodyEntity map);
}
......@@ -2,14 +2,13 @@ package com.yxproject.start.service;
import com.yxproject.start.entity.CountyListEntity;
import java.util.Date;
import java.util.List;
/**
* Created by liuxinben on 2018/11/6.10:30
*/
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);
}
......@@ -21,10 +21,7 @@ import java.util.List;
public class CardBodyServiceImpl implements CardBodyService {
@Autowired
public CardBodyMapper cardBodyMapper;
@Autowired
private UtilMapper utilMapper;
@Autowired
public GroupNoMapper groupinfoMapper;
@Override
public int updateCardBody(CardBodyEntity cardBodyEntity) {
......@@ -35,12 +32,7 @@ public class CardBodyServiceImpl implements CardBodyService {
@Override
@Transactional(rollbackFor=Exception.class)
public int addCardBodyEntity(CardBodyEntity cardBodyEntity, List<GroupNoEntity> groupinfoEntities) {
int production_task_list_seq = utilMapper.findProductionTaskListSequenceNextValue();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
cardBodyMapper.insertCardBodyInfoEntity(cardBodyEntity);
return 1;
public int addCardBodyEntity(CardBodyEntity cardBodyEntity) {
return cardBodyMapper.insertCardBodyEntity(cardBodyEntity);
}
}
......@@ -6,6 +6,7 @@ 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;
/**
......@@ -15,25 +16,29 @@ import java.util.List;
@Service
public class CountyListServiceImpl implements CountyListService {
@Autowired
public CountyListMapper countyListInfoMapper;
public CountyListMapper countyListMapper;
@Override
public List<CountyListEntity> findCountyListByTaskListID(String tasklistid) {
List<CountyListEntity> byTaskListID = countyListInfoMapper.findCountyListByTaskListID(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 int reviseOutBoundCount(CountyListEntity countyListInfoEntity) {
// int i = 0;
//
//
//
// CountyListInfoEntity.setOutBoundCount( );
// return CountyListInfoMapper.updateOutBoundCount(countyListInfoEntity);
//TODO
return 0;
public List<CountyListEntity> getConnectList(String save_Date) {
return countyListMapper.getConnectList(save_Date);
}
}
\ No newline at end of file
......@@ -4,6 +4,9 @@ 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.CountyListEntity;
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;
......@@ -427,14 +430,12 @@ public class TaskServiceImpl implements TaskService {
} else {
taskEntity.setIs_Exception((long)0);
// i= productionTaskListMapper.updateProductionTask(productionTaskListEntity);
i=taskMapper.replaceExceptionInformation(taskEntity);
}
return i;
}
private CountyListEntity countyListInfoEntity;
private GroupNoEntity groupNoEntity;
private CountyListEntity countyListEntity;
/**
* 更新出库时间
* @param
......@@ -442,8 +443,10 @@ public class TaskServiceImpl implements TaskService {
*/
@Override
public int updateOutboundDate(TaskEntity taskEntity) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
if(groupNoEntity.totalinvalidCount.equals(countyListInfoEntity.getOut_Storage_Count())) {
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);
}
......@@ -459,8 +462,10 @@ public class TaskServiceImpl implements TaskService {
*/
@Override
public int updatePutinstorageDate(TaskEntity taskEntity) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
if(groupNoEntity.totalinvalidCount.equals(countyListInfoEntity.getIn_Storage_Count())) {
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);
}
......
......@@ -10,10 +10,9 @@
<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>
<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
......
......@@ -18,9 +18,12 @@
SELECT * FROM COUNTY_LIST where task_Id=#{task_Id}
</select>
<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 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>
......@@ -61,7 +61,7 @@
</update>
<select id="findProductionTaskListEntityByAcceptNo" resultType="com.yxproject.start.entity.TaskEntity" parameterType="String">
select * from TASK left join GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID where GROUP_NO.GROUP_NO =#{acceptNo} or GROUP_NO.GROUP_NO =substr (#{acceptNo},0,8)
select * from TASK left join GROUP_NO on GROUP_NO.TASK_ID = TASK.TASK_ID where GROUP_NO.GROUP_NO =#{acceptNo} or GROUP_NO.GROUP_NO =substr (#{acceptNo},0,8)
</select>
<select id="findProductionTaskListEntityByState" resultType="com.yxproject.start.entity.TaskEntity" parameterType="Integer">
......@@ -69,11 +69,11 @@
</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 TASK SET exception_Information = NULL,IS_EXCEPTION=#{is_Exception} where TASK_ID =#{task_Id}
</update>
<select id="totalnum" resultType="com.yxproject.start.entity.TaskEntity" parameterType="String">
SELECT SUM(VAILD_COUNT)FROM TASK
<select id="totalnum" resultType="Int">
select SUM(VAILD_COUNT)FROM GROUP_NO where TASK_ID =#{task_Id}
</select>
</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