src/main/java/com/slcf/controller/AsrsController.java
@@ -16,6 +16,7 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import com.slcf.pojo.*; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -26,11 +27,6 @@ import org.springframework.web.bind.annotation.ResponseBody; import com.slcf.erp.ErpBean; import com.slcf.pojo.LocDetailBean; import com.slcf.pojo.LocationBean; import com.slcf.pojo.WaitCheckBean; import com.slcf.pojo.WaitPakInBean; import com.slcf.pojo.WaitPakOutBean; import com.slcf.service.LocDetailService; import com.slcf.service.LocationService; import com.slcf.service.WaitCheckService; @@ -676,7 +672,8 @@ String loc_no=job.get("lgpla").toString(); LocationBean locBean = locationService.queryLocationById(loc_no); if(locBean==null || !locBean.getLoc_sts().equals("F")) { WaitCheckBean waitCheckBean = waitCheckService.getWaitCheckByLoc(loc_no); if(locBean==null || (!locBean.getLoc_sts().equals("F") && null == waitCheckBean)) { jsonRet.put("lgnum", job.get("lgnum").toString()); jsonRet.put("ivnum", job.get("ivnum").toString()); jsonRet.put("ivpos", job.get("ivpos").toString()); @@ -709,7 +706,9 @@ waitCheck.setLgtyp(job.get("lgtyp").toString()); waitCheck.setLgpla(job.get("lgpla").toString()); int result = waitCheckService.insertWaitCheck(waitCheck); // if(null == waitCheckBean) { int result = waitCheckService.insertWaitCheck(waitCheck); // } jsonRet.put("lgnum", job.get("lgnum").toString()); jsonRet.put("ivnum", job.get("ivnum").toString()); src/main/java/com/slcf/controller/StockController.java
@@ -55,7 +55,7 @@ SysLogService sysLogService; @Autowired RoleService roleService; Logger logger=Logger.getLogger(StockController.class); @RequestMapping("/goStock.action") @@ -82,8 +82,6 @@ /** * 分页查询所有 * @param pageNumber * @param pageSize * @return */ @ResponseBody @@ -95,8 +93,6 @@ /** * 分页查询所有 * @param pageNumber * @param pageSize * @return */ @ResponseBody @@ -308,6 +304,10 @@ locDetl.setWerks(werks); locDetl.setAnfme(gesme); locDetl.setAltme(altme); if(barcode == null || "".equals(barcode)) { LocationBean locationBean = locationService.queryLocationById(loc_no); barcode = locationBean.getBarcode(); } locDetl.setZpallet(barcode); locDetl.setBname(""); result = locDetailService.insertLocDetail(locDetl); src/main/java/com/slcf/controller/WaitPakOutController.java
@@ -12,7 +12,9 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.slcf.bean.WaitPakOutLogCondition; import com.slcf.controller.param.SetEmsParam; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -734,4 +736,27 @@ return map; } /** * 导出所有 * @param response */ @RequestMapping("/exportWaitPakOut.action") public void ExportExcel(WaitPakOutCondition waitPakOutCondition, HttpServletResponse response, HttpServletRequest request){ try { waitPakOutService.ExportWaitPakOutList(waitPakOutCondition,response); // 插入日志 UserBean user = (UserBean) request.getSession().getAttribute("USER"); SysLogBean sysLog = new SysLogBean(); sysLog.setLogin_no(user.getUser_account()); sysLog.setMachine_ip(request.getRemoteAddr()); sysLog.setForm_no("exportWaitPakOut.action"); sysLog.setTts_keyname("导出出库通知档到EXCEL"); sysLog.setModi_user(user.getUser_account()); sysLogService.insertSysLog(sysLog); }catch (Exception e) { System.out.println(e.getMessage()); } } } src/main/java/com/slcf/dao/WaitCheckDao.java
@@ -72,4 +72,12 @@ @Select("select * from cust_wait_check a left join bas_mat_code b on a.mat_no=b.mat_no " + "where barcode=#{barcode} order by sheet_no,a.mat_no desc") public List<WaitCheckBean> getApiWaitCheckList(@Param("barcode")String barcode); /** * 查询信息 * @param * @return */ @Select("select * from cust_wait_check where lgpla=#{locNo}") public WaitCheckBean getWaitCheckByLoc(@Param("locNo")String locNo); } src/main/java/com/slcf/dao/WaitPakOutDao.java
@@ -2,6 +2,8 @@ import java.util.List; import com.slcf.bean.WaitPakOutLogCondition; import com.slcf.pojo.WaitPakOutLogBean; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Param; @@ -127,4 +129,10 @@ */ @Select("select top 1 * from cust_wait_pakout where status='Y' and io_status='N' and action=2 and prnstatus=1 order by io_status desc,modi_time asc") public WaitPakOutBean getWaitPakOutPrint(); /** * 不分页查询所有信息,用于excel导出 * @return */ public List<WaitPakOutBean> getWaitPakOutAll(WaitPakOutCondition condition); } src/main/java/com/slcf/filter/UpdateThread.java
@@ -79,7 +79,7 @@ // 清空2天前的日志 sapRequestLogService.clearSapLog(); // updateWaitCheckData(); Thread.sleep(5000); Thread.sleep(15000); } catch (InterruptedException e) { e.printStackTrace(); } src/main/java/com/slcf/service/WaitCheckService.java
@@ -51,4 +51,6 @@ * @return */ public List<WaitCheckBean> getApiWaitCheckList(String barcode); public WaitCheckBean getWaitCheckByLoc(String locNo); } src/main/java/com/slcf/service/WaitPakOutService.java
@@ -4,8 +4,11 @@ import java.util.Map; import com.slcf.bean.WaitPakOutCondition; import com.slcf.bean.WaitPakOutLogCondition; import com.slcf.controller.param.SetEmsParam; import com.slcf.pojo.WaitPakOutBean; import javax.servlet.http.HttpServletResponse; /** * 出通知档接口 @@ -65,4 +68,6 @@ public WaitPakOutBean queryWaitPakOutFnh(); public WaitPakOutBean getWaitPakOutPrint(); public void ExportWaitPakOutList(WaitPakOutCondition condition, HttpServletResponse response); } src/main/java/com/slcf/service/impl/WaitCheckServiceImpl.java
@@ -148,4 +148,16 @@ return null; } } /** * 根据id查找 */ public WaitCheckBean getWaitCheckByLoc(String locNo) { try { return waitCheckDao.getWaitCheckByLoc(locNo); }catch(Exception e) { System.out.println(e.getMessage()); return null; } } } src/main/java/com/slcf/service/impl/WaitPakOutServiceImpl.java
@@ -1,11 +1,19 @@ package com.slcf.service.impl; import java.io.IOException; import java.io.OutputStream; import java.util.HashMap; import java.util.List; import java.util.Map; import com.slcf.bean.WaitPakOutLogCondition; import com.slcf.controller.param.SetEmsParam; import com.slcf.pojo.WaitPakOutLogBean; import com.slcf.util.DateTimeUtil; import org.apache.ibatis.annotations.Param; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -18,6 +26,8 @@ import com.slcf.pojo.WorkMastBean; import com.slcf.service.WaitPakOutService; import javax.servlet.http.HttpServletResponse; /** * 入库通知档接口实现 * @author admin @@ -27,7 +37,7 @@ public class WaitPakOutServiceImpl implements WaitPakOutService { @Autowired WaitPakOutDao WaitPakOutDao; WaitPakOutDao waitPakOutDao; @Autowired WorkFileDao workFileDao; @@ -37,7 +47,7 @@ public int insertWaitPakOut(WaitPakOutBean waitPakOut) { int result=0; try { result=WaitPakOutDao.insertWaitPakOut(waitPakOut); result=waitPakOutDao.insertWaitPakOut(waitPakOut); }catch(Exception e) { System.out.println(e.getMessage()); } @@ -63,8 +73,8 @@ public Map<String,Object> queryWaitPakOutList(WaitPakOutCondition waitPakOutCon) { try { Map<String,Object> map=new HashMap<String, Object>(); List<WaitPakOutBean> list=WaitPakOutDao.queryWaitPakOutList(waitPakOutCon); int count =WaitPakOutDao.getWaitPakOutCount(waitPakOutCon); List<WaitPakOutBean> list=waitPakOutDao.queryWaitPakOutList(waitPakOutCon); int count =waitPakOutDao.getWaitPakOutCount(waitPakOutCon); map.put("rows", list); map.put("total", count); return map; @@ -83,15 +93,15 @@ // } public Integer waitPakOutSetEms(SetEmsParam setEmsParam) { return WaitPakOutDao.waitPakOutSetEms(setEmsParam.getLgnum(), setEmsParam.getTanum(), setEmsParam.getTapos()); return waitPakOutDao.waitPakOutSetEms(setEmsParam.getLgnum(), setEmsParam.getTanum(), setEmsParam.getTapos()); } public Integer countEmsNum() { return WaitPakOutDao.countEmsNum(); return waitPakOutDao.countEmsNum(); } public List<WaitPakOutBean> queryWaitOutPak(String vlpla, String matnr) { return WaitPakOutDao.queryWaitOutPak(vlpla, matnr); return waitPakOutDao.queryWaitOutPak(vlpla, matnr); } /** @@ -99,7 +109,7 @@ */ public WaitPakOutBean queryWaitPakOutById(String sheet_no,String mat_no) { try { return WaitPakOutDao.getWaitPakOutById(sheet_no,mat_no); return waitPakOutDao.getWaitPakOutById(sheet_no,mat_no); }catch(Exception e) { System.out.println(e.getMessage()); return null; @@ -111,7 +121,7 @@ */ public WaitPakOutBean queryWaitPakOutByLocNo(String loc_no) { try { return WaitPakOutDao.getWaitPakOutByLocNo(loc_no); return waitPakOutDao.getWaitPakOutByLocNo(loc_no); }catch(Exception e) { System.out.println(e.getMessage()); return null; @@ -123,7 +133,7 @@ */ public WaitPakOutBean queryWaitPakOutByMatNo(String mat_no) { try { return WaitPakOutDao.getWaitPakOutByMatNo(mat_no); return waitPakOutDao.getWaitPakOutByMatNo(mat_no); }catch(Exception e) { System.out.println(e.getMessage()); return null; @@ -134,7 +144,7 @@ public int upWaitPakOut(WaitPakOutBean WaitPakOut, int type) { int result=0; try { result=WaitPakOutDao.upWaitPakOut(WaitPakOut); result=waitPakOutDao.upWaitPakOut(WaitPakOut); // if(type==2) { // //如果工作档有数据,调整工作档优先级 // WorkDetailBean workDetail = workFileDao.getWorkDetlByMatNo(WaitPakOut.getMat_no()); @@ -158,7 +168,7 @@ public int upWaitPakOutByLocNo(WaitPakOutBean WaitPakOut) { int result=0; try { result=WaitPakOutDao.upWaitPakOutByLocNo(WaitPakOut); result=waitPakOutDao.upWaitPakOutByLocNo(WaitPakOut); }catch(Exception e) { System.out.println(e.getMessage()); } @@ -171,7 +181,7 @@ public int delWaitPakOut(WaitPakOutBean WaitPakOut) { int result=0; try { result=WaitPakOutDao.delWaitPakOutById(WaitPakOut); result=waitPakOutDao.delWaitPakOutById(WaitPakOut); }catch(Exception e) { System.out.println(e.getMessage()); } @@ -184,7 +194,7 @@ */ public List<WaitPakOutBean> getWaitPakOutList() { try { return WaitPakOutDao.getWaitPakOutList(); return waitPakOutDao.getWaitPakOutList(); }catch(Exception e) { System.out.println(e.getMessage()); return null; @@ -199,8 +209,8 @@ public int moveToLog(WaitPakOutBean WaitPakOut) { int result=0; try { result=WaitPakOutDao.insertLog(WaitPakOut); result=WaitPakOutDao.delWaitPakOutById(WaitPakOut); result=waitPakOutDao.insertLog(WaitPakOut); result=waitPakOutDao.delWaitPakOutById(WaitPakOut); }catch(Exception e) { System.out.println(e.getMessage()); } @@ -213,7 +223,7 @@ */ public List<WaitPakOutBean> getSheetNoList() { try { return WaitPakOutDao.getSheetNoList(); return waitPakOutDao.getSheetNoList(); }catch(Exception e) { System.out.println(e.getMessage()); return null; @@ -225,7 +235,7 @@ */ public WaitPakOutBean queryWaitPakOutByNum(WaitPakOutBean waitPakOutBean) { try { return WaitPakOutDao.getWaitPakOutByNum(waitPakOutBean); return waitPakOutDao.getWaitPakOutByNum(waitPakOutBean); }catch(Exception e) { System.out.println(e.getMessage()); return null; @@ -237,7 +247,7 @@ */ public WaitPakOutBean queryWaitPakOutFnh() { try { return WaitPakOutDao.getWaitPakOutFnh(); return waitPakOutDao.getWaitPakOutFnh(); }catch(Exception e) { System.out.println(e.getMessage()); return null; @@ -249,10 +259,93 @@ */ public WaitPakOutBean getWaitPakOutPrint() { try { return WaitPakOutDao.getWaitPakOutPrint(); return waitPakOutDao.getWaitPakOutPrint(); }catch(Exception e) { System.out.println(e.getMessage()); return null; } } public void ExportWaitPakOutList(WaitPakOutCondition condition, HttpServletResponse response) { //输出Excel文件 try { //HSSFWorkbook对象(excel的文档对象) HSSFWorkbook workBook=new HSSFWorkbook(); //sheet对象(excel的表单) HSSFSheet sheet=workBook.createSheet("出库通知历史档"); //行数,参数为行索引(excel的行) // HSSFRow rowHead=sheet.createRow(0);//第一行 可以是0~65535之间的任何一个 // //创建excel的单元格,参数为列索引,可以是0~255之间的任何一个 // HSSFCell cellOne=rowHead.createCell(0); // cellOne.setCellValue("用户信息");//表头 //合并单元格CellRangeAddress构造参数依次表示起始行,截至行,起始列, 截至列 // sheet.addMergedRegion(new CellRangeAddress(0,0,0,5)); sheet.setColumnWidth(0, (int)((10 + 0.72) * 256)); sheet.setColumnWidth(1, (int)((20 + 0.72) * 256)); sheet.setColumnWidth(2, (int)((15 + 0.72) * 256)); sheet.setColumnWidth(3, (int)((15 + 0.72) * 256)); sheet.setColumnWidth(4, (int)((15 + 0.72) * 256)); sheet.setColumnWidth(5, (int)((25 + 0.72) * 256)); sheet.setColumnWidth(6, (int)((10 + 0.72) * 256)); sheet.setColumnWidth(7, (int)((8 + 0.72) * 256)); sheet.setColumnWidth(8, (int)((10 + 0.72) * 256)); sheet.setColumnWidth(9, (int)((10 + 0.72) * 256)); sheet.setColumnWidth(10, (int)((10 + 0.72) * 256)); sheet.setColumnWidth(11, (int)((25 + 0.72) * 256)); sheet.setColumnWidth(12, (int)((25 + 0.72) * 256)); sheet.setColumnWidth(13, (int)((25 + 0.72) * 256)); HSSFRow rows=sheet.createRow(0);//第二行 //创建单元格并设置单元格内容 rows.createCell(0).setCellValue("仓库号"); rows.createCell(1).setCellValue("转储编号"); rows.createCell(2).setCellValue("行项目"); rows.createCell(3).setCellValue("物料"); rows.createCell(4).setCellValue("物料描述"); rows.createCell(5).setCellValue("工厂"); rows.createCell(6).setCellValue("数量"); rows.createCell(7).setCellValue("单位"); rows.createCell(8).setCellValue("源发地类型"); rows.createCell(9).setCellValue("源发地仓位"); rows.createCell(10).setCellValue("目的地类型"); rows.createCell(11).setCellValue("目的地仓位"); rows.createCell(12).setCellValue("用户ID"); rows.createCell(13).setCellValue("修改时间"); List<WaitPakOutBean> list=waitPakOutDao.getWaitPakOutAll(condition); for(int i=0;i<list.size();i++){ HSSFRow row=sheet.createRow(i+1);//从第三行开始 //创建单元格并设置单元格内容 row.createCell(0).setCellValue(list.get(i).getLgnum()); row.createCell(1).setCellValue(list.get(i).getTanum()); row.createCell(2).setCellValue(list.get(i).getTapos()); row.createCell(3).setCellValue(list.get(i).getMatnr()); row.createCell(4).setCellValue(list.get(i).getMaktx()); row.createCell(5).setCellValue(list.get(i).getWerks()); row.createCell(6).setCellValue(list.get(i).getVsolm()); row.createCell(7).setCellValue(list.get(i).getMeins()); row.createCell(8).setCellValue(list.get(i).getVltyp()); row.createCell(9).setCellValue(list.get(i).getVlpla()); row.createCell(10).setCellValue(list.get(i).getNltyp()); row.createCell(11).setCellValue(list.get(i).getNlpla()); row.createCell(12).setCellValue(list.get(i).getBname()); row.createCell(13).setCellValue(list.get(i).getModi_time()); } // //输出Excel文件 // try { OutputStream output=response.getOutputStream(); response.reset(); response.setHeader("Content-disposition", "attachment; filename=WaitPakOut"+ DateTimeUtil.getStringDateTime(14)+".xls"); response.setContentType("application/msexcel"); workBook.write(output); output.close(); } catch (IOException e) { e.printStackTrace(); } } } src/main/resources/jdbc.properties
@@ -1,14 +1,14 @@ ##Production Env jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver jdbc.url=jdbc:sqlserver://172.20.177.10:1433;databaseName=klsasrs jdbc.username=asrs jdbc.password=klsasrs@zy #Local Env #jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver #jdbc.url=jdbc:sqlserver://127.0.0.1:1433;databaseName=klsasrs #jdbc.username=sa #jdbc.password=sa@123 #jdbc.url=jdbc:sqlserver://172.20.177.10:1433;databaseName=klsasrs #jdbc.username=asrs #jdbc.password=klsasrs@zy Local Env jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver jdbc.url=jdbc:sqlserver://127.0.0.1:1433;databaseName=klsasrs jdbc.username=sa jdbc.password=sa@123 ##Develop Env #jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver src/main/resources/mapper/WaitPakOutMapper.xml
@@ -59,4 +59,20 @@ <include refid="WaitPakOutConditionSql"></include> </where> </select> <!-- 不分页查询所有信息,用于excel导出 --> <select id="getWaitPakOutAll" parameterType="com.slcf.bean.WaitPakOutCondition" resultType="com.slcf.pojo.WaitPakOutBean"> select a.* from cust_wait_pakout a <where> <![CDATA[ 1=1 ]]> <include refid="WaitPakOutConditionSql"></include> <![CDATA[ order by a.appe_time desc ]]> </where> </select> </mapper> src/main/webapp/WEB-INF/pages/waitPakOut.jsp
@@ -64,12 +64,19 @@ <div class="table-responsive"> <!-- <div style="overflow:scroll;"> --> <!-- <table id="test-table" class="table table-hover table-striped table-condensed table-bordered"></table> --> <button type="button" onclick="emsBtn()" class="btn btn-danger">紧急</button> <%-- <button type="button" onclick="emsBtn()" class="btn btn-danger">紧急</button>--%> <table id="test-table" class="table table-hover text-nowrap"></table> </div> <!--toolbar --> <div id="toolbar" class="btn-toolbar"> <button onclick="emsBtn()" type="button" class="btn btn-danger"> <span class="glyphicon glyphicon-paste" aria-hidden="true" >紧急</span> </button> <button onclick="ExportExcel()" type="button" class="btn btn-success"> <span class="glyphicon glyphicon-paste" aria-hidden="true" >导出</span> </button> <!-- <button id="addButton" onclick="addWaitPakOut()" type="button" class="btn btn-success"> --> <!-- <span class="glyphicon glyphicon-pencil" aria-hidden="true">添加</span> --> <!-- </button> --> src/main/webapp/jsFiles/waitPakOut.js
@@ -785,4 +785,17 @@ } }); } } //导出 function ExportExcel(){ if(confirm("确认导出excel?")){ var url = "work/exportWaitPakOut.action?"; url += "matnr=" + $("#search_sheet_no").val(); url += "&maktx=" + $("#search_mat_no").val(); url += "&loc_no=" + $("#loc_no").val(); location.href=url; }else{ return false; } } version/db/20210607/klasrs.rarBinary files differ
version/db/20210626/klasrs.rarBinary files differ
version/db/klsasrs20211227.bakBinary files differ
version/wcs/KLS_WCS20211227.rarBinary files differ