根据findbug修正部分警告
parent
a7ea21048d
commit
03f87f6501
|
@ -131,10 +131,10 @@ public class JeecgFormDemoController extends BaseController {
|
||||||
public AjaxJson getTreeData(TSDepart depatr,HttpServletResponse response,HttpServletRequest request ){
|
public AjaxJson getTreeData(TSDepart depatr,HttpServletResponse response,HttpServletRequest request ){
|
||||||
AjaxJson j = new AjaxJson();
|
AjaxJson j = new AjaxJson();
|
||||||
try{
|
try{
|
||||||
List<TSDepart> depatrList = new ArrayList<TSDepart>();
|
// List<TSDepart> depatrList = new ArrayList<TSDepart>();
|
||||||
StringBuffer hql = new StringBuffer(" from TSDepart t");
|
StringBuffer hql = new StringBuffer(" from TSDepart t");
|
||||||
//hql.append(" and (parent.id is null or parent.id='')");
|
//hql.append(" and (parent.id is null or parent.id='')");
|
||||||
depatrList = this.systemService.findHql(hql.toString());
|
List<TSDepart> depatrList = this.systemService.findHql(hql.toString());
|
||||||
List<Map<String,Object>> dataList = new ArrayList<Map<String,Object>>();
|
List<Map<String,Object>> dataList = new ArrayList<Map<String,Object>>();
|
||||||
Map<String,Object> map = null;
|
Map<String,Object> map = null;
|
||||||
for (TSDepart tsdepart : depatrList) {
|
for (TSDepart tsdepart : depatrList) {
|
||||||
|
|
|
@ -209,7 +209,7 @@ public class wmomController {
|
||||||
TSUser task = wmUtil.getsysorgcode(username);
|
TSUser task = wmUtil.getsysorgcode(username);
|
||||||
List<Map<String, Object>> resultList2 = null;
|
List<Map<String, Object>> resultList2 = null;
|
||||||
// String orgcode = "";
|
// String orgcode = "";
|
||||||
Integer isRead = null;
|
//Integer isRead = null;
|
||||||
if (task != null) {
|
if (task != null) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
@ -218,10 +218,10 @@ public class wmomController {
|
||||||
+ "WHERE noticeRead.del_flag = 0 and noticeRead.user_id = ? ";
|
+ "WHERE noticeRead.del_flag = 0 and noticeRead.user_id = ? ";
|
||||||
sql += " and noticeRead.is_read = ? ";
|
sql += " and noticeRead.is_read = ? ";
|
||||||
sql += " ORDER BY noticeRead.create_time DESC ";
|
sql += " ORDER BY noticeRead.create_time DESC ";
|
||||||
if (isRead == null || !(isRead == 1 || isRead == 0)) {
|
// if (isRead == null || !(isRead == 1 || isRead == 0)) {
|
||||||
isRead = 0;
|
// isRead = 0;
|
||||||
}
|
// }
|
||||||
List<Map<String, Object>> noticeList = systemService.findForJdbcParam(sql, 1, 10, task.getId(), isRead.intValue());
|
List<Map<String, Object>> noticeList = systemService.findForJdbcParam(sql, 1, 10, task.getId(),Integer.valueOf(0) );//isRead.intValue()
|
||||||
|
|
||||||
//将List转换成JSON存储
|
//将List转换成JSON存储
|
||||||
// net.sf.json.JSONArray result = new net.sf.json.JSONArray();
|
// net.sf.json.JSONArray result = new net.sf.json.JSONArray();
|
||||||
|
@ -244,7 +244,7 @@ public class wmomController {
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e){
|
catch (Exception e){
|
||||||
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Result.success(list, Long.parseLong(resultList2.get(0).get("count").toString()));
|
return Result.success(list, Long.parseLong(resultList2.get(0).get("count").toString()));
|
||||||
|
|
|
@ -171,8 +171,10 @@ public class MvCusCostController extends BaseController {
|
||||||
// 先把读进来的图片放到一个ByteArrayOutputStream中,以便产生ByteArray
|
// 先把读进来的图片放到一个ByteArrayOutputStream中,以便产生ByteArray
|
||||||
try {
|
try {
|
||||||
// codedFileName = java.net.URLEncoder.encode("中文", "UTF-8");
|
// codedFileName = java.net.URLEncoder.encode("中文", "UTF-8");
|
||||||
|
|
||||||
|
String setHeaderEnddate =request.getParameter("enddate");
|
||||||
response.setHeader("content-disposition", "attachment;filename="
|
response.setHeader("content-disposition", "attachment;filename="
|
||||||
+ mvCusCost.getCusCode()+"("+request.getParameter("begindate")+" "+request.getParameter("enddate")+").xls");
|
+ mvCusCost.getCusCode()+"("+request.getParameter("begindate")+" "+setHeaderEnddate+").xls");
|
||||||
HSSFWorkbook wb = new HSSFWorkbook();
|
HSSFWorkbook wb = new HSSFWorkbook();
|
||||||
HSSFSheet sheet = wb.createSheet("sum");
|
HSSFSheet sheet = wb.createSheet("sum");
|
||||||
HSSFSheet sheet1 = wb.createSheet("detail");
|
HSSFSheet sheet1 = wb.createSheet("detail");
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class SapRFC {
|
||||||
|
|
||||||
private JCoParameterList tabPara = null;
|
private JCoParameterList tabPara = null;
|
||||||
|
|
||||||
private String functionName;
|
// private String functionName;
|
||||||
|
|
||||||
private static String ABAP_AS = "ABAP_AS_WITHOUT_POOL";
|
private static String ABAP_AS = "ABAP_AS_WITHOUT_POOL";
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ public class SapRFC {
|
||||||
String language ;
|
String language ;
|
||||||
String host ;
|
String host ;
|
||||||
String system ;
|
String system ;
|
||||||
String router ;
|
//String router ;
|
||||||
// set properties参数,
|
// set properties参数,
|
||||||
try{
|
try{
|
||||||
// clientName = "300";
|
// clientName = "300";
|
||||||
|
@ -65,7 +65,7 @@ public class SapRFC {
|
||||||
language = ResourceUtil.getConfigByName("rfc.language");
|
language = ResourceUtil.getConfigByName("rfc.language");
|
||||||
host = ResourceUtil.getConfigByName("rfc.host");
|
host = ResourceUtil.getConfigByName("rfc.host");
|
||||||
system = ResourceUtil.getConfigByName("rfc.system");
|
system = ResourceUtil.getConfigByName("rfc.system");
|
||||||
router = ResourceUtil.getConfigByName("rfc.router");
|
// router = ResourceUtil.getConfigByName("rfc.router");
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
clientName = "300";
|
clientName = "300";
|
||||||
userid = "DY_EZCAO";
|
userid = "DY_EZCAO";
|
||||||
|
@ -118,7 +118,9 @@ public class SapRFC {
|
||||||
|
|
||||||
// 执行方法
|
// 执行方法
|
||||||
public SapRFC prepare(String functionName) {
|
public SapRFC prepare(String functionName) {
|
||||||
this.functionName = functionName;
|
//this.functionName = functionName;
|
||||||
|
//Unread field: com.zzjee.sap.SapRFC.functionName
|
||||||
|
//Bug type URF_UNREAD_FIELD (click for details)
|
||||||
try {
|
try {
|
||||||
// 取得要执行的方法
|
// 取得要执行的方法
|
||||||
function = destination.getRepository().getFunction(functionName);
|
function = destination.getRepository().getFunction(functionName);
|
||||||
|
|
|
@ -27,10 +27,10 @@ public class sapgetdocutil {
|
||||||
}
|
}
|
||||||
//获取WMDOC
|
//获取WMDOC
|
||||||
public static List<wmientity> getWmdoc(String DOCTYPE,String DOCID,String tablename,String par[]) {
|
public static List<wmientity> getWmdoc(String DOCTYPE,String DOCID,String tablename,String par[]) {
|
||||||
Map<String, Object> result = new HashMap<String, Object>();
|
// Map<String, Object> result = new HashMap<String, Object>();
|
||||||
List<wmientity> reslit = new ArrayList<wmientity>();
|
List<wmientity> reslit = new ArrayList<wmientity>();
|
||||||
try {
|
try {
|
||||||
result = sapWmUtil.getWmdoc(DOCTYPE,DOCID,tablename);
|
Map<String, Object> result = sapWmUtil.getWmdoc(DOCTYPE,DOCID,tablename);
|
||||||
JCoTable restable = (JCoTable)result.get("IT_OUT");
|
JCoTable restable = (JCoTable)result.get("IT_OUT");
|
||||||
org.jeecgframework.core.util.LogUtil.info("===================获取凭证开始===================");
|
org.jeecgframework.core.util.LogUtil.info("===================获取凭证开始===================");
|
||||||
reslit = getlistbyparandrable(restable,par);
|
reslit = getlistbyparandrable(restable,par);
|
||||||
|
@ -45,10 +45,10 @@ public static List<wmientity> getWmdoc(String DOCTYPE,String DOCID,String tab
|
||||||
|
|
||||||
//获取储位库存
|
//获取储位库存
|
||||||
public static List<wmientity> getcwkc(String LGNUM,String MATNR,String LGPLA,String par[]){
|
public static List<wmientity> getcwkc(String LGNUM,String MATNR,String LGPLA,String par[]){
|
||||||
Map<String, Object> result = new HashMap<String, Object>();
|
// Map<String, Object> result = new HashMap<String, Object>();
|
||||||
List<wmientity> reslit = new ArrayList<wmientity>();
|
List<wmientity> reslit = new ArrayList<wmientity>();
|
||||||
try {
|
try {
|
||||||
result = sapWmUtil.getcwkc(LGNUM,MATNR,LGPLA);
|
Map<String, Object> result = sapWmUtil.getcwkc(LGNUM,MATNR,LGPLA);
|
||||||
JCoTable restable = (JCoTable)result.get("IT_OUT");
|
JCoTable restable = (JCoTable)result.get("IT_OUT");
|
||||||
org.jeecgframework.core.util.LogUtil.info("===================获取库存开始===================");
|
org.jeecgframework.core.util.LogUtil.info("===================获取库存开始===================");
|
||||||
reslit = getlistbyparandrable(restable,par);
|
reslit = getlistbyparandrable(restable,par);
|
||||||
|
@ -60,10 +60,10 @@ public static List<wmientity> getWmdoc(String DOCTYPE,String DOCID,String tab
|
||||||
}
|
}
|
||||||
//获取储位
|
//获取储位
|
||||||
public static List<wmientity> getcw(String LGNUM,String LGPLA,String par[]){
|
public static List<wmientity> getcw(String LGNUM,String LGPLA,String par[]){
|
||||||
Map<String, Object> result = new HashMap<String, Object>();
|
// Map<String, Object> result = new HashMap<String, Object>();
|
||||||
List<wmientity> reslit = new ArrayList<wmientity>();
|
List<wmientity> reslit = new ArrayList<wmientity>();
|
||||||
try {
|
try {
|
||||||
result = sapWmUtil.getcw(LGNUM,LGPLA);
|
Map<String, Object> result = sapWmUtil.getcw(LGNUM,LGPLA);
|
||||||
JCoTable restable = (JCoTable)result.get("IT_OUT");
|
JCoTable restable = (JCoTable)result.get("IT_OUT");
|
||||||
org.jeecgframework.core.util.LogUtil.info("===================获取储位开始===================");
|
org.jeecgframework.core.util.LogUtil.info("===================获取储位开始===================");
|
||||||
reslit = getlistbyparandrable(restable,par);
|
reslit = getlistbyparandrable(restable,par);
|
||||||
|
@ -77,7 +77,7 @@ public static List<wmientity> getWmdoc(String DOCTYPE,String DOCID,String tab
|
||||||
private static List<wmientity> getlistbyparandrable(JCoTable restable, String par[]){
|
private static List<wmientity> getlistbyparandrable(JCoTable restable, String par[]){
|
||||||
List<wmientity> reslit = new ArrayList<wmientity>();
|
List<wmientity> reslit = new ArrayList<wmientity>();
|
||||||
for(int i=0;i<restable.getNumRows();i++){
|
for(int i=0;i<restable.getNumRows();i++){
|
||||||
wmientity t = new wmientity();
|
//wmientity t = new wmientity();
|
||||||
try {
|
try {
|
||||||
Class cl = Class.forName("com.yserp.wmapi.entity.wmientity");//反射得到类
|
Class cl = Class.forName("com.yserp.wmapi.entity.wmientity");//反射得到类
|
||||||
restable.setRow(i);
|
restable.setRow(i);
|
||||||
|
@ -87,7 +87,7 @@ public static List<wmientity> getWmdoc(String DOCTYPE,String DOCID,String tab
|
||||||
Method method = cl.getMethod(methodstr,String.class);
|
Method method = cl.getMethod(methodstr,String.class);
|
||||||
method.invoke(obj,restable.getString(par[j-1]));
|
method.invoke(obj,restable.getString(par[j-1]));
|
||||||
}
|
}
|
||||||
t = (wmientity) obj;
|
wmientity t = (wmientity) obj;
|
||||||
reslit.add(t);
|
reslit.add(t);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
|
||||||
|
|
|
@ -160,6 +160,7 @@ public class ClientResponseHandler {
|
||||||
this.setParameter(k, v);
|
this.setParameter(k, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,8 @@ public class MD5Util {
|
||||||
public static String MD5Encode(String origin, String charsetname) {
|
public static String MD5Encode(String origin, String charsetname) {
|
||||||
String resultString = null;
|
String resultString = null;
|
||||||
try {
|
try {
|
||||||
resultString = new String(origin);
|
//Dm DM_STRING_CTOR 因为使用String(String)构造函数生成新字符串会浪费内存,推荐使用原有字符串。
|
||||||
|
resultString = origin;
|
||||||
MessageDigest md = MessageDigest.getInstance("MD5");
|
MessageDigest md = MessageDigest.getInstance("MD5");
|
||||||
if (charsetname == null || "".equals(charsetname))
|
if (charsetname == null || "".equals(charsetname))
|
||||||
resultString = byteArrayToHexString(md.digest(resultString
|
resultString = byteArrayToHexString(md.digest(resultString
|
||||||
|
|
|
@ -105,8 +105,8 @@ public class XMLUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String createXML(Map<String,Object> map){
|
public static String createXML(Map<String,Object> map){
|
||||||
Set<Entry<String,Object>> set=map.entrySet();
|
// Set<Entry<String,Object>> set=map.entrySet();
|
||||||
set.iterator();
|
//set.iterator();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -298,17 +298,17 @@ public class VYsddController extends BaseController {
|
||||||
}
|
}
|
||||||
List<VYsddEntity> vYsdds = this.vYsddService.getListByCriteriaQuery(cq,false);
|
List<VYsddEntity> vYsdds = this.vYsddService.getListByCriteriaQuery(cq,false);
|
||||||
OutputStream fileOut = null;
|
OutputStream fileOut = null;
|
||||||
BufferedImage bufferImg = null;
|
// BufferedImage bufferImg = null;
|
||||||
String codedFileName = null;
|
// String codedFileName = null;
|
||||||
|
|
||||||
// 先把读进来的图片放到一个ByteArrayOutputStream中,以便产生ByteArray
|
// 先把读进来的图片放到一个ByteArrayOutputStream中,以便产生ByteArray
|
||||||
try {
|
try {
|
||||||
codedFileName = java.net.URLEncoder.encode("中文", "UTF-8");
|
// codedFileName = java.net.URLEncoder.encode("中文", "UTF-8");
|
||||||
response.setHeader("content-disposition", "attachment;filename=zhangdan.xls"
|
response.setHeader("content-disposition", "attachment;filename=zhangdan.xls"
|
||||||
);
|
);
|
||||||
HSSFWorkbook wb = new HSSFWorkbook();
|
HSSFWorkbook wb = new HSSFWorkbook();
|
||||||
HSSFSheet sheet = wb.createSheet("zhangdan");
|
HSSFSheet sheet = wb.createSheet("zhangdan");
|
||||||
ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
|
// ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
|
||||||
|
|
||||||
sheet.setMargin(HSSFSheet.TopMargin,0.1);// 页边距(上)
|
sheet.setMargin(HSSFSheet.TopMargin,0.1);// 页边距(上)
|
||||||
sheet.setMargin(HSSFSheet.BottomMargin,0.1);// 页边距(下)
|
sheet.setMargin(HSSFSheet.BottomMargin,0.1);// 页边距(下)
|
||||||
|
@ -576,7 +576,7 @@ public class VYsddController extends BaseController {
|
||||||
return NormalExcelConstants.JEECG_EXCEL_VIEW;
|
return NormalExcelConstants.JEECG_EXCEL_VIEW;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
// @SuppressWarnings("unchecked")
|
||||||
@RequestMapping(params = "importExcel", method = RequestMethod.POST)
|
@RequestMapping(params = "importExcel", method = RequestMethod.POST)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) {
|
public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
|
|
@ -1836,11 +1836,11 @@ public class WmImNoticeHController extends BaseController {
|
||||||
List<Map<String,String>> list = new ArrayList<Map<String,String>>();
|
List<Map<String,String>> list = new ArrayList<Map<String,String>>();
|
||||||
for(WmImNoticeIEntity t:wmImNoticeIEntityList){
|
for(WmImNoticeIEntity t:wmImNoticeIEntityList){
|
||||||
|
|
||||||
List<WmInQmIEntity> WmInQmlist = new ArrayList<WmInQmIEntity>();
|
// List<WmInQmIEntity> WmInQmlist = new ArrayList<WmInQmIEntity>();
|
||||||
String hql = null;
|
String hql = null;
|
||||||
hql = "from WmInQmIEntity t where t.imNoticeItem = ? ";
|
hql = "from WmInQmIEntity t where t.imNoticeItem = ? ";
|
||||||
|
|
||||||
WmInQmlist = systemService.findHql(hql, new Object[] { t.getId() });
|
List<WmInQmIEntity> WmInQmlist = systemService.findHql(hql, new Object[] { t.getId() });
|
||||||
for(WmInQmIEntity qm:WmInQmlist){
|
for(WmInQmIEntity qm:WmInQmlist){
|
||||||
|
|
||||||
Map<String,String> map = new HashMap<String,String>();
|
Map<String,String> map = new HashMap<String,String>();
|
||||||
|
|
|
@ -1,64 +1,67 @@
|
||||||
package com.zzjee.wm.controller;
|
package com.zzjee.wm.controller;
|
||||||
|
|
||||||
import com.zzjee.api.ResultDO;
|
import java.io.IOException;
|
||||||
import com.zzjee.md.entity.MdCusEntity;
|
|
||||||
import com.zzjee.md.entity.MdGoodsEntity;
|
|
||||||
import com.zzjee.md.entity.MvGoodsEntity;
|
|
||||||
import com.zzjee.wm.entity.*;
|
|
||||||
import com.zzjee.wm.service.WmInQmIServiceI;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.ConstraintViolation;
|
||||||
|
import javax.validation.Validator;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.jeecgframework.core.util.*;
|
import org.jeecgframework.core.beanvalidator.BeanValidators;
|
||||||
import com.zzjee.wmutil.wmUtil;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.ui.ModelMap;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
|
||||||
import org.jeecgframework.core.common.controller.BaseController;
|
import org.jeecgframework.core.common.controller.BaseController;
|
||||||
import org.jeecgframework.core.common.exception.BusinessException;
|
import org.jeecgframework.core.common.exception.BusinessException;
|
||||||
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
|
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
|
||||||
import org.jeecgframework.core.common.model.json.AjaxJson;
|
import org.jeecgframework.core.common.model.json.AjaxJson;
|
||||||
import org.jeecgframework.core.common.model.json.DataGrid;
|
import org.jeecgframework.core.common.model.json.DataGrid;
|
||||||
import org.jeecgframework.core.constant.Globals;
|
import org.jeecgframework.core.constant.Globals;
|
||||||
import org.jeecgframework.tag.core.easyui.TagUtil;
|
import org.jeecgframework.core.util.DateUtils;
|
||||||
import org.jeecgframework.web.system.service.SystemService;
|
import org.jeecgframework.core.util.ExceptionUtil;
|
||||||
|
import org.jeecgframework.core.util.JSONHelper;
|
||||||
|
import org.jeecgframework.core.util.MyBeanUtils;
|
||||||
|
import org.jeecgframework.core.util.ResourceUtil;
|
||||||
|
import org.jeecgframework.core.util.StringUtil;
|
||||||
|
import org.jeecgframework.core.util.oConvertUtils;
|
||||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
import org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants;
|
import org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants;
|
||||||
|
import org.jeecgframework.tag.core.easyui.TagUtil;
|
||||||
import java.io.IOException;
|
import org.jeecgframework.web.system.service.SystemService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.http.MediaType;
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||||
import org.jeecgframework.core.beanvalidator.BeanValidators;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
import java.util.Set;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import javax.swing.text.StyledEditorKit;
|
|
||||||
import javax.validation.ConstraintViolation;
|
|
||||||
import javax.validation.Validator;
|
|
||||||
|
|
||||||
import org.springframework.http.MediaType;
|
|
||||||
import org.springframework.web.util.UriComponentsBuilder;
|
import org.springframework.web.util.UriComponentsBuilder;
|
||||||
|
|
||||||
|
import com.zzjee.api.ResultDO;
|
||||||
|
import com.zzjee.md.entity.MdCusEntity;
|
||||||
|
import com.zzjee.md.entity.MdGoodsEntity;
|
||||||
|
import com.zzjee.md.entity.MvGoodsEntity;
|
||||||
|
import com.zzjee.wm.entity.WmImNoticeHEntity;
|
||||||
|
import com.zzjee.wm.entity.WmImNoticeIEntity;
|
||||||
|
import com.zzjee.wm.entity.WmInQmIEntity;
|
||||||
|
import com.zzjee.wm.entity.WmToUpGoodsEntity;
|
||||||
|
import com.zzjee.wm.service.WmInQmIServiceI;
|
||||||
|
import com.zzjee.wmutil.wmUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Title: Controller
|
* @Title: Controller
|
||||||
* @Description: 收货登记
|
* @Description: 收货登记
|
||||||
|
@ -238,7 +241,7 @@ public class WmInQmIController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
private boolean toup(String id ){
|
private boolean toup(String id ){
|
||||||
List<WmToUpGoodsEntity> wmToUpGoodsList = new ArrayList<WmToUpGoodsEntity>();
|
// List<WmToUpGoodsEntity> wmToUpGoodsList = new ArrayList<WmToUpGoodsEntity>();
|
||||||
String hql0 = "from WmInQmIEntity where binSta = 'N' and id = ?";
|
String hql0 = "from WmInQmIEntity where binSta = 'N' and id = ?";
|
||||||
List<WmInQmIEntity> WmInQmIEntityList = systemService.findHql(hql0,
|
List<WmInQmIEntity> WmInQmIEntityList = systemService.findHql(hql0,
|
||||||
id);// 获取行项目
|
id);// 获取行项目
|
||||||
|
@ -275,8 +278,8 @@ public class WmInQmIController extends BaseController {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
MvGoodsEntity mvgoods = new MvGoodsEntity();
|
// MvGoodsEntity mvgoods = new MvGoodsEntity();
|
||||||
mvgoods = systemService.findUniqueByProperty(
|
MvGoodsEntity mvgoods = systemService.findUniqueByProperty(
|
||||||
MvGoodsEntity.class, "goodsCode",
|
MvGoodsEntity.class, "goodsCode",
|
||||||
wmToUpGoodsEntity.getGoodsId());
|
wmToUpGoodsEntity.getGoodsId());
|
||||||
wmToUpGoodsEntity.setBaseUnit(mvgoods.getBaseunit());
|
wmToUpGoodsEntity.setBaseUnit(mvgoods.getBaseunit());
|
||||||
|
@ -772,8 +775,8 @@ public class WmInQmIController extends BaseController {
|
||||||
.getListByCriteriaQuery(cq, false);
|
.getListByCriteriaQuery(cq, false);
|
||||||
for (WmInQmIEntity wmInQmIEntity : wmInQmIso) {
|
for (WmInQmIEntity wmInQmIEntity : wmInQmIso) {
|
||||||
try {
|
try {
|
||||||
MvGoodsEntity mvgoods = new MvGoodsEntity();
|
// MvGoodsEntity mvgoods = new MvGoodsEntity();
|
||||||
mvgoods = systemService.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", wmInQmIEntity.getGoodsId()) ;
|
MvGoodsEntity mvgoods = systemService.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", wmInQmIEntity.getGoodsId()) ;
|
||||||
wmInQmIEntity.setGoodsName(mvgoods.getShpMingCheng());
|
wmInQmIEntity.setGoodsName(mvgoods.getShpMingCheng());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
|
@ -815,7 +818,7 @@ for (WmInQmIEntity wmInQmIEntity : wmInQmIso) {
|
||||||
return NormalExcelConstants.JEECG_EXCEL_VIEW;
|
return NormalExcelConstants.JEECG_EXCEL_VIEW;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
// @SuppressWarnings("unchecked")
|
||||||
@RequestMapping(params = "importExcel", method = RequestMethod.POST)
|
@RequestMapping(params = "importExcel", method = RequestMethod.POST)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxJson importExcel(HttpServletRequest request,
|
public AjaxJson importExcel(HttpServletRequest request,
|
||||||
|
@ -985,7 +988,7 @@ for (WmInQmIEntity wmInQmIEntity : wmInQmIso) {
|
||||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||||
}
|
}
|
||||||
// 按照Restful风格约定,创建指向新任务的url, 也可以直接返回id或对象.
|
// 按照Restful风格约定,创建指向新任务的url, 也可以直接返回id或对象.
|
||||||
String id = wmInQmI.getId();
|
// String id = wmInQmI.getId();
|
||||||
return new ResponseEntity(D0, HttpStatus.OK);
|
return new ResponseEntity(D0, HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,23 @@
|
||||||
package com.zzjee.wm.controller;
|
package com.zzjee.wm.controller;
|
||||||
import com.zzjee.api.ResultDO;
|
import java.awt.image.BufferedImage;
|
||||||
import com.zzjee.md.entity.*;
|
import java.io.ByteArrayOutputStream;
|
||||||
import com.zzjee.tms.entity.TmsYwDingdanEntity;
|
import java.io.File;
|
||||||
import com.zzjee.wm.entity.*;
|
import java.io.IOException;
|
||||||
import com.zzjee.wm.page.*;
|
import java.io.OutputStream;
|
||||||
import com.zzjee.wm.service.WmOmNoticeHServiceI;
|
|
||||||
|
|
||||||
import java.io.*;
|
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.text.SimpleDateFormat;
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.ConstraintViolation;
|
||||||
|
import javax.validation.Validator;
|
||||||
|
|
||||||
import com.zzjee.wmutil.*;
|
|
||||||
import net.sf.json.JSONArray;
|
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
||||||
|
@ -36,12 +32,7 @@ import org.apache.poi.ss.usermodel.Font;
|
||||||
import org.apache.poi.ss.usermodel.IndexedColors;
|
import org.apache.poi.ss.usermodel.IndexedColors;
|
||||||
import org.apache.poi.ss.usermodel.Row;
|
import org.apache.poi.ss.usermodel.Row;
|
||||||
import org.apache.poi.ss.util.CellRangeAddress;
|
import org.apache.poi.ss.util.CellRangeAddress;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.jeecgframework.core.beanvalidator.BeanValidators;
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
|
||||||
import org.jeecgframework.core.common.controller.BaseController;
|
import org.jeecgframework.core.common.controller.BaseController;
|
||||||
import org.jeecgframework.core.common.exception.BusinessException;
|
import org.jeecgframework.core.common.exception.BusinessException;
|
||||||
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
|
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
|
||||||
|
@ -51,55 +42,63 @@ import org.jeecgframework.core.constant.Globals;
|
||||||
import org.jeecgframework.core.util.BarcodeUtil;
|
import org.jeecgframework.core.util.BarcodeUtil;
|
||||||
import org.jeecgframework.core.util.DateUtils;
|
import org.jeecgframework.core.util.DateUtils;
|
||||||
import org.jeecgframework.core.util.ExceptionUtil;
|
import org.jeecgframework.core.util.ExceptionUtil;
|
||||||
|
import org.jeecgframework.core.util.MyBeanUtils;
|
||||||
import org.jeecgframework.core.util.QRcodeUtil;
|
import org.jeecgframework.core.util.QRcodeUtil;
|
||||||
import org.jeecgframework.core.util.ResourceUtil;
|
import org.jeecgframework.core.util.ResourceUtil;
|
||||||
import org.jeecgframework.core.util.StringUtil;
|
import org.jeecgframework.core.util.StringUtil;
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
|
import org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants;
|
||||||
import org.jeecgframework.tag.core.easyui.TagUtil;
|
import org.jeecgframework.tag.core.easyui.TagUtil;
|
||||||
import org.jeecgframework.tag.vo.datatable.SortDirection;
|
|
||||||
import org.jeecgframework.web.system.pojo.base.TSDepart;
|
|
||||||
import org.jeecgframework.web.system.pojo.base.TSRole;
|
import org.jeecgframework.web.system.pojo.base.TSRole;
|
||||||
import org.jeecgframework.web.system.pojo.base.TSRoleUser;
|
import org.jeecgframework.web.system.pojo.base.TSRoleUser;
|
||||||
import org.jeecgframework.web.system.pojo.base.TSUser;
|
import org.jeecgframework.web.system.pojo.base.TSUser;
|
||||||
import org.jeecgframework.web.system.service.SystemService;
|
import org.jeecgframework.web.system.service.SystemService;
|
||||||
import org.jeecgframework.web.system.sms.util.Constants;
|
import org.jeecgframework.web.system.sms.util.Constants;
|
||||||
import org.jeecgframework.web.system.sms.util.TuiSongMsgUtil;
|
import org.jeecgframework.web.system.sms.util.TuiSongMsgUtil;
|
||||||
import org.jeecgframework.core.util.MyBeanUtils;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
import org.springframework.http.MediaType;
|
||||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
|
||||||
import org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants;
|
|
||||||
import org.springframework.ui.ModelMap;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
|
||||||
|
|
||||||
import java.awt.image.BufferedImage;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
import org.jeecgframework.core.beanvalidator.BeanValidators;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
import org.jsoup.helper.DataUtil;
|
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import javax.validation.ConstraintViolation;
|
|
||||||
import javax.validation.Validator;
|
|
||||||
|
|
||||||
import java.net.URI;
|
|
||||||
|
|
||||||
import jdk.nashorn.internal.ir.TryNode;
|
|
||||||
|
|
||||||
import org.springframework.http.MediaType;
|
|
||||||
import org.springframework.web.util.UriComponentsBuilder;
|
import org.springframework.web.util.UriComponentsBuilder;
|
||||||
|
|
||||||
|
import com.zzjee.api.ResultDO;
|
||||||
|
import com.zzjee.md.entity.MdCusEntity;
|
||||||
|
import com.zzjee.md.entity.MdCusOtherEntity;
|
||||||
|
import com.zzjee.md.entity.MvGoodsEntity;
|
||||||
|
import com.zzjee.wm.entity.WmImNoticeHEntity;
|
||||||
|
import com.zzjee.wm.entity.WmInQmIEntity;
|
||||||
|
import com.zzjee.wm.entity.WmNoticeConfEntity;
|
||||||
|
import com.zzjee.wm.entity.WmOmNoticeHEntity;
|
||||||
|
import com.zzjee.wm.entity.WmOmNoticeIEntity;
|
||||||
|
import com.zzjee.wm.entity.WmOmQmIEntity;
|
||||||
|
import com.zzjee.wm.entity.WmPlatIoEntity;
|
||||||
|
import com.zzjee.wm.page.WmNoticeImpPage;
|
||||||
|
import com.zzjee.wm.page.WmOmNoticeHPage;
|
||||||
|
import com.zzjee.wm.page.WmOmNoticeImpPage;
|
||||||
|
import com.zzjee.wm.page.confrowpage;
|
||||||
|
import com.zzjee.wm.page.wmomnoticeipage;
|
||||||
|
import com.zzjee.wm.service.WmOmNoticeHServiceI;
|
||||||
|
import com.zzjee.wmutil.resResult;
|
||||||
|
import com.zzjee.wmutil.sdresult;
|
||||||
|
import com.zzjee.wmutil.wmIntUtil;
|
||||||
|
import com.zzjee.wmutil.wmUtil;
|
||||||
|
import com.zzjee.wmutil.yyUtil;
|
||||||
|
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Title: Controller
|
* @Title: Controller
|
||||||
* @Description: 出货通知
|
* @Description: 出货通知
|
||||||
|
@ -256,7 +255,7 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
Double zhlsum = 0.00;
|
Double zhlsum = 0.00;
|
||||||
try{
|
try{
|
||||||
List<WmOmQmIEntity> wmOmQmIEntityList = systemService.findHql(hql0, id0);//获取行项目
|
List<WmOmQmIEntity> wmOmQmIEntityList = systemService.findHql(hql0, id0);//获取行项目
|
||||||
List<WmOmQmIEntity> wmOmQmIEntityListnew = new ArrayList<>();
|
//List<WmOmQmIEntity> wmOmQmIEntityListnew = new ArrayList<>();
|
||||||
DecimalFormat dfsum=new DecimalFormat(".##");
|
DecimalFormat dfsum=new DecimalFormat(".##");
|
||||||
try{
|
try{
|
||||||
for(WmOmQmIEntity tom:wmOmQmIEntityList){
|
for(WmOmQmIEntity tom:wmOmQmIEntityList){
|
||||||
|
@ -301,8 +300,9 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
|
||||||
}
|
}
|
||||||
wmOmQmIEntityListnew.add(tom);
|
//wmOmQmIEntityListnew.add(tom);
|
||||||
}
|
}
|
||||||
}catch ( Exception e){
|
}catch ( Exception e){
|
||||||
}
|
}
|
||||||
|
@ -370,7 +370,7 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
Double zhlsum = 0.00;
|
Double zhlsum = 0.00;
|
||||||
try{
|
try{
|
||||||
List<WmOmQmIEntity> wmOmQmIEntityList = systemService.findHql(hql0, id0);//获取行项目
|
List<WmOmQmIEntity> wmOmQmIEntityList = systemService.findHql(hql0, id0);//获取行项目
|
||||||
List<WmOmQmIEntity> wmOmQmIEntityListnew = new ArrayList<>();
|
//List<WmOmQmIEntity> wmOmQmIEntityListnew = new ArrayList<>();
|
||||||
DecimalFormat dfsum=new DecimalFormat(".##");
|
DecimalFormat dfsum=new DecimalFormat(".##");
|
||||||
String filepath = ResourceUtil.getConfigByName("webUploadpath");
|
String filepath = ResourceUtil.getConfigByName("webUploadpath");
|
||||||
String goodsurl = ResourceUtil.getConfigByName("show.goodsurl");
|
String goodsurl = ResourceUtil.getConfigByName("show.goodsurl");
|
||||||
|
@ -425,7 +425,7 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
}
|
}
|
||||||
wmOmQmIEntityListnew.add(tom);
|
//wmOmQmIEntityListnew.add(tom);
|
||||||
}
|
}
|
||||||
}catch ( Exception e){
|
}catch ( Exception e){
|
||||||
}
|
}
|
||||||
|
@ -487,7 +487,7 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
Double zhlsum = 0.00;
|
Double zhlsum = 0.00;
|
||||||
try{
|
try{
|
||||||
List<WmOmQmIEntity> wmOmQmIEntityList = systemService.findHql(hql0, id0);//获取行项目
|
List<WmOmQmIEntity> wmOmQmIEntityList = systemService.findHql(hql0, id0);//获取行项目
|
||||||
List<WmOmQmIEntity> wmOmQmIEntityListnew = new ArrayList<>();
|
//List<WmOmQmIEntity> wmOmQmIEntityListnew = new ArrayList<>();
|
||||||
DecimalFormat dfsum=new DecimalFormat(".##");
|
DecimalFormat dfsum=new DecimalFormat(".##");
|
||||||
try{
|
try{
|
||||||
for(WmOmQmIEntity tom:wmOmQmIEntityList){
|
for(WmOmQmIEntity tom:wmOmQmIEntityList){
|
||||||
|
@ -533,7 +533,7 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
}
|
}
|
||||||
wmOmQmIEntityListnew.add(tom);
|
//wmOmQmIEntityListnew.add(tom);
|
||||||
}
|
}
|
||||||
}catch ( Exception e){
|
}catch ( Exception e){
|
||||||
}
|
}
|
||||||
|
@ -672,7 +672,7 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
if(CollectionUtils.isNotEmpty(demos)){
|
if(CollectionUtils.isNotEmpty(demos)){
|
||||||
for(WmOmNoticeHEntity jeecgDemo:demos){
|
for(WmOmNoticeHEntity jeecgDemo:demos){
|
||||||
if (StringUtil.isNotEmpty(jeecgDemo.getId())) {
|
if (StringUtil.isNotEmpty(jeecgDemo.getId())) {
|
||||||
WmOmNoticeHEntity t =systemService.get(WmOmNoticeHEntity.class, jeecgDemo.getId());
|
// WmOmNoticeHEntity t =systemService.get(WmOmNoticeHEntity.class, jeecgDemo.getId());
|
||||||
try {
|
try {
|
||||||
message = "回单成功";
|
message = "回单成功";
|
||||||
WmNoticeConfEntity confe = new WmNoticeConfEntity();
|
WmNoticeConfEntity confe = new WmNoticeConfEntity();
|
||||||
|
@ -929,6 +929,7 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
wmomNoticeIEntity.setGoodsName(date[1]);
|
wmomNoticeIEntity.setGoodsName(date[1]);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
}
|
}
|
||||||
wmomNoticeIListnew.add(wmomNoticeIEntity);
|
wmomNoticeIListnew.add(wmomNoticeIEntity);
|
||||||
}
|
}
|
||||||
|
@ -951,6 +952,7 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
TuiSongMsgUtil.sendMessage("出货通知", Constants.SMS_SEND_TYPE_3, "CKYYTZ", map, "admin", ResourceUtil.getSessionUserName().getUserName());
|
TuiSongMsgUtil.sendMessage("出货通知", Constants.SMS_SEND_TYPE_3, "CKYYTZ", map, "admin", ResourceUtil.getSessionUserName().getUserName());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
}
|
}
|
||||||
systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
|
systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
|
@ -1084,7 +1086,7 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
resResult resResult = wmIntUtil.postBill(ja.toString(),wmOmNoticeHEntity.getPiMaster());
|
resResult resResult = wmIntUtil.postBill(ja.toString(),wmOmNoticeHEntity.getPiMaster());
|
||||||
j.setMsg(resResult.getDetailedMessage());
|
j.setMsg(resResult.getDetailedMessage());
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
}
|
}
|
||||||
|
|
||||||
j.setMsg(message);
|
j.setMsg(message);
|
||||||
|
@ -1106,7 +1108,7 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
public void downReceiveExcel(WmOmNoticeHEntity wmOmNoticeH,HttpServletRequest request,HttpServletResponse response){
|
public void downReceiveExcel(WmOmNoticeHEntity wmOmNoticeH,HttpServletRequest request,HttpServletResponse response){
|
||||||
OutputStream fileOut = null;
|
OutputStream fileOut = null;
|
||||||
BufferedImage bufferImg = null;
|
BufferedImage bufferImg = null;
|
||||||
String codedFileName = null;
|
// String codedFileName = null;
|
||||||
wmOmNoticeH = systemService.getEntity(WmOmNoticeHEntity.class,
|
wmOmNoticeH = systemService.getEntity(WmOmNoticeHEntity.class,
|
||||||
wmOmNoticeH.getId());//获取抬头
|
wmOmNoticeH.getId());//获取抬头
|
||||||
String hql0 = "from WmOmNoticeIEntity where 1 = 1 AND omNoticeId = ? ";
|
String hql0 = "from WmOmNoticeIEntity where 1 = 1 AND omNoticeId = ? ";
|
||||||
|
@ -1114,11 +1116,11 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
.findHql(hql0, wmOmNoticeH.getOmNoticeId());//获取行项目
|
.findHql(hql0, wmOmNoticeH.getOmNoticeId());//获取行项目
|
||||||
//先把读进来的图片放到一个ByteArrayOutputStream中,以便产生ByteArray
|
//先把读进来的图片放到一个ByteArrayOutputStream中,以便产生ByteArray
|
||||||
try {
|
try {
|
||||||
StringBuffer sber=new StringBuffer();
|
// StringBuffer sber=new StringBuffer();
|
||||||
ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
|
ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
|
||||||
bufferImg = ImageIO.read(BarcodeUtil.generateToStream(wmOmNoticeH.getOmNoticeId()));
|
bufferImg = ImageIO.read(BarcodeUtil.generateToStream(wmOmNoticeH.getOmNoticeId()));
|
||||||
// 进行转码,使其支持中文文件名
|
// 进行转码,使其支持中文文件名
|
||||||
codedFileName = java.net.URLEncoder.encode("中文", "UTF-8");
|
// codedFileName = java.net.URLEncoder.encode("中文", "UTF-8");
|
||||||
response.setHeader("content-disposition", "attachment;filename="+wmOmNoticeH.getOmNoticeId()+".xls");
|
response.setHeader("content-disposition", "attachment;filename="+wmOmNoticeH.getOmNoticeId()+".xls");
|
||||||
ImageIO.write(bufferImg, "jpg", byteArrayOut);
|
ImageIO.write(bufferImg, "jpg", byteArrayOut);
|
||||||
|
|
||||||
|
@ -1346,12 +1348,14 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
wb.write(fileOut);
|
wb.write(fileOut);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
}finally{
|
}finally{
|
||||||
if(fileOut != null){
|
if(fileOut != null){
|
||||||
try {
|
try {
|
||||||
fileOut.close();
|
fileOut.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1365,14 +1369,14 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
HttpServletRequest request, HttpServletResponse response) {
|
HttpServletRequest request, HttpServletResponse response) {
|
||||||
OutputStream fileOut = null;
|
OutputStream fileOut = null;
|
||||||
BufferedImage bufferImg = null;
|
BufferedImage bufferImg = null;
|
||||||
String codedFileName = null;
|
// String codedFileName = null;
|
||||||
wmOmNoticeH = systemService.getEntity(WmOmNoticeHEntity.class,
|
wmOmNoticeH = systemService.getEntity(WmOmNoticeHEntity.class,
|
||||||
wmOmNoticeH.getId());//获取抬头
|
wmOmNoticeH.getId());//获取抬头
|
||||||
|
|
||||||
|
|
||||||
// 先把读进来的图片放到一个ByteArrayOutputStream中,以便产生ByteArray
|
// 先把读进来的图片放到一个ByteArrayOutputStream中,以便产生ByteArray
|
||||||
try {
|
try {
|
||||||
StringBuffer sber = new StringBuffer();
|
// StringBuffer sber = new StringBuffer();
|
||||||
|
|
||||||
ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
|
ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
|
||||||
// bufferImg = ImageIO.read(BarcodeUtil.generateToStream(wmImNoticeH
|
// bufferImg = ImageIO.read(BarcodeUtil.generateToStream(wmImNoticeH
|
||||||
|
@ -1381,7 +1385,7 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
.getOmNoticeId());
|
.getOmNoticeId());
|
||||||
|
|
||||||
// 进行转码,使其支持中文文件名
|
// 进行转码,使其支持中文文件名
|
||||||
codedFileName = java.net.URLEncoder.encode("中文", "UTF-8");
|
// codedFileName = java.net.URLEncoder.encode("中文", "UTF-8");
|
||||||
response.setHeader("content-disposition", "attachment;filename="
|
response.setHeader("content-disposition", "attachment;filename="
|
||||||
+ wmOmNoticeH.getOmNoticeId() + ".xls");
|
+ wmOmNoticeH.getOmNoticeId() + ".xls");
|
||||||
ImageIO.write(bufferImg, "jpg", byteArrayOut);
|
ImageIO.write(bufferImg, "jpg", byteArrayOut);
|
||||||
|
@ -1654,7 +1658,7 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
columnNames = columnNames1;
|
columnNames = columnNames1;
|
||||||
}
|
}
|
||||||
}catch ( Exception e){
|
}catch ( Exception e){
|
||||||
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1701,7 +1705,7 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
cell4.setCellStyle(cs5r);
|
cell4.setCellStyle(cs5r);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -1710,6 +1714,7 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
cell5.setCellStyle(cs5);
|
cell5.setCellStyle(cs5);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -1723,6 +1728,7 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
cell6.setCellStyle(cs5);
|
cell6.setCellStyle(cs5);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -1735,6 +1741,7 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
cell7.setCellStyle(cs5);
|
cell7.setCellStyle(cs5);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
}
|
}
|
||||||
Cell cell8 = rowColumnValue.createCell(7);// 毛重
|
Cell cell8 = rowColumnValue.createCell(7);// 毛重
|
||||||
try {
|
try {
|
||||||
|
@ -1746,6 +1753,7 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
}
|
}
|
||||||
cell8.setCellStyle(cs5);
|
cell8.setCellStyle(cs5);
|
||||||
Cell cell9 = rowColumnValue.createCell(8);// 体积
|
Cell cell9 = rowColumnValue.createCell(8);// 体积
|
||||||
|
@ -1762,14 +1770,10 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
|
|
||||||
try{
|
try{
|
||||||
if("hr".equals(ResourceUtil.getConfigByName("wm.ckd"))) {
|
if("hr".equals(ResourceUtil.getConfigByName("wm.ckd"))) {
|
||||||
try{
|
|
||||||
cell9.setCellValue(wmUtil.getstock(result.get(i).get("goods_id").toString()));
|
cell9.setCellValue(wmUtil.getstock(result.get(i).get("goods_id").toString()));
|
||||||
}catch (Exception e){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1830,12 +1834,14 @@ public class WmOmNoticeHController extends BaseController {
|
||||||
wb.write(fileOut);
|
wb.write(fileOut);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
} finally {
|
} finally {
|
||||||
if (fileOut != null) {
|
if (fileOut != null) {
|
||||||
try {
|
try {
|
||||||
fileOut.close();
|
fileOut.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -489,8 +489,8 @@ public class WmToDownGoodsController extends BaseController {
|
||||||
wmToDownGoods.setBinIdTo("PK");
|
wmToDownGoods.setBinIdTo("PK");
|
||||||
wmToDownGoods.setDownSta("已复核");
|
wmToDownGoods.setDownSta("已复核");
|
||||||
wmToDownGoods.setGoodsQuaok(wmToDownGoods.getGoodsQua());
|
wmToDownGoods.setGoodsQuaok(wmToDownGoods.getGoodsQua());
|
||||||
MvGoodsEntity mvgoods = new MvGoodsEntity();
|
// MvGoodsEntity mvgoods = new MvGoodsEntity();
|
||||||
mvgoods = systemService.findUniqueByProperty(
|
MvGoodsEntity mvgoods = systemService.findUniqueByProperty(
|
||||||
MvGoodsEntity.class, "goodsCode",
|
MvGoodsEntity.class, "goodsCode",
|
||||||
wmToDownGoods.getGoodsId());
|
wmToDownGoods.getGoodsId());
|
||||||
if(mvgoods!=null){
|
if(mvgoods!=null){
|
||||||
|
|
|
@ -221,8 +221,8 @@ public class WmToUpGoodsController extends BaseController {
|
||||||
message = "上架列表添加成功";
|
message = "上架列表添加成功";
|
||||||
try{
|
try{
|
||||||
wmToUpGoods.setOrderId("ZY");
|
wmToUpGoods.setOrderId("ZY");
|
||||||
MvGoodsEntity mvgoods = new MvGoodsEntity();
|
//MvGoodsEntity mvgoods = new MvGoodsEntity();
|
||||||
mvgoods = systemService.findUniqueByProperty(
|
MvGoodsEntity mvgoods = systemService.findUniqueByProperty(
|
||||||
MvGoodsEntity.class, "goodsCode",
|
MvGoodsEntity.class, "goodsCode",
|
||||||
wmToUpGoods.getGoodsId());
|
wmToUpGoods.getGoodsId());
|
||||||
if(mvgoods!=null){
|
if(mvgoods!=null){
|
||||||
|
|
|
@ -48,8 +48,7 @@ public class WmImNoticeHServiceImpl extends CommonServiceImpl implements WmImNot
|
||||||
/**保存-进货通知明细*/
|
/**保存-进货通知明细*/
|
||||||
for(WmImNoticeIEntity wmImNoticeI:wmImNoticeIList){
|
for(WmImNoticeIEntity wmImNoticeI:wmImNoticeIList){
|
||||||
//外键设置
|
//外键设置
|
||||||
MvGoodsEntity mvgoods = new MvGoodsEntity();
|
MvGoodsEntity mvgoods = this.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", wmImNoticeI.getGoodsCode()) ;
|
||||||
mvgoods = this.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", wmImNoticeI.getGoodsCode()) ;
|
|
||||||
if(mvgoods!=null){
|
if(mvgoods!=null){
|
||||||
wmImNoticeI.setGoodsName(mvgoods.getGoodsName());
|
wmImNoticeI.setGoodsName(mvgoods.getGoodsName());
|
||||||
wmImNoticeI.setBarCode(mvgoods.getShpTiaoMa());
|
wmImNoticeI.setBarCode(mvgoods.getShpTiaoMa());
|
||||||
|
|
|
@ -48,8 +48,7 @@ public class WmOmNoticeHServiceImpl extends CommonServiceImpl implements WmOmNot
|
||||||
for(WmOmNoticeIEntity wmOmNoticeI:wmOmNoticeIList){
|
for(WmOmNoticeIEntity wmOmNoticeI:wmOmNoticeIList){
|
||||||
//外键设置
|
//外键设置
|
||||||
try{
|
try{
|
||||||
MvGoodsEntity mvgoods = new MvGoodsEntity();
|
MvGoodsEntity mvgoods = this.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", wmOmNoticeI.getGoodsId()) ;
|
||||||
mvgoods = this.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", wmOmNoticeI.getGoodsId()) ;
|
|
||||||
if(mvgoods!=null){
|
if(mvgoods!=null){
|
||||||
huowu=huowu+mvgoods.getGoodsName();
|
huowu=huowu+mvgoods.getGoodsName();
|
||||||
wmOmNoticeI.setGoodsName(mvgoods.getGoodsName());
|
wmOmNoticeI.setGoodsName(mvgoods.getGoodsName());
|
||||||
|
@ -141,8 +140,7 @@ public class WmOmNoticeHServiceImpl extends CommonServiceImpl implements WmOmNot
|
||||||
if(oldE.getId().equals(sendE.getId())){
|
if(oldE.getId().equals(sendE.getId())){
|
||||||
try {
|
try {
|
||||||
MyBeanUtils.copyBeanNotNull2Bean(sendE,oldE);
|
MyBeanUtils.copyBeanNotNull2Bean(sendE,oldE);
|
||||||
MvGoodsEntity mvgoods = new MvGoodsEntity();
|
MvGoodsEntity mvgoods = this.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", oldE.getGoodsId()) ;
|
||||||
mvgoods = this.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", oldE.getGoodsId()) ;
|
|
||||||
oldE.setGoodsUnit(mvgoods.getShlDanWei());
|
oldE.setGoodsUnit(mvgoods.getShlDanWei());
|
||||||
oldE.setBaseUnit(mvgoods.getBaseunit());
|
oldE.setBaseUnit(mvgoods.getBaseunit());
|
||||||
if(!mvgoods.getBaseunit().equals(mvgoods.getShlDanWei())){
|
if(!mvgoods.getBaseunit().equals(mvgoods.getShlDanWei())){
|
||||||
|
|
|
@ -60,12 +60,12 @@ public class wmBaseController extends BaseController {
|
||||||
*/
|
*/
|
||||||
private static final Logger logger = Logger.getLogger(wmBaseController.class);
|
private static final Logger logger = Logger.getLogger(wmBaseController.class);
|
||||||
|
|
||||||
@Autowired
|
// @Autowired
|
||||||
private WvGiServiceI wvGiService;
|
// private WvGiServiceI wvGiService;
|
||||||
@Autowired
|
// @Autowired
|
||||||
private SystemService systemService;
|
// private SystemService systemService;
|
||||||
@Autowired
|
// @Autowired
|
||||||
private Validator validator;
|
// private Validator validator;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ public class wmBaseController extends BaseController {
|
||||||
}
|
}
|
||||||
response.flushBuffer();
|
response.flushBuffer();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
}finally{
|
}finally{
|
||||||
if(inputStream!=null){
|
if(inputStream!=null){
|
||||||
inputStream.close();
|
inputStream.close();
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
package com.zzjee.wmutil;
|
package com.zzjee.wmutil;
|
||||||
|
|
||||||
import org.jeecgframework.core.util.ResourceUtil;
|
|
||||||
|
|
||||||
public class dscUtil {
|
public class dscUtil {
|
||||||
public static void getorderbystatus(String orstatus){
|
public static void getorderbystatus(String orstatus){
|
||||||
String baseurl = ResourceUtil.getConfigByName("dsc.url");
|
//String baseurl = ResourceUtil.getConfigByName("dsc.url");
|
||||||
String baseukey = ResourceUtil.getConfigByName("dsc.key");
|
//String baseukey = ResourceUtil.getConfigByName("dsc.key");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -418,7 +418,7 @@ public class yyUtil {
|
||||||
String jsonBody = params.get("jsonBody").toString();
|
String jsonBody = params.get("jsonBody").toString();
|
||||||
OtherOutService otherOutService = new OtherOutService();
|
OtherOutService otherOutService = new OtherOutService();
|
||||||
try {
|
try {
|
||||||
JSONObject record = otherOutService.add(jsonBody, to_account);
|
otherOutService.add(jsonBody, to_account);
|
||||||
} catch (OpenAPIException e) {
|
} catch (OpenAPIException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -428,7 +428,7 @@ public class yyUtil {
|
||||||
String jsonBody = params.get("jsonBody").toString();
|
String jsonBody = params.get("jsonBody").toString();
|
||||||
OtherInService otherInService = new OtherInService();
|
OtherInService otherInService = new OtherInService();
|
||||||
try {
|
try {
|
||||||
JSONObject record = otherInService.add(jsonBody, to_account);
|
otherInService.add(jsonBody, to_account);
|
||||||
} catch (OpenAPIException e) {
|
} catch (OpenAPIException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
package com.zzjee.yongyoubase.openapi4j.commons;
|
package com.zzjee.yongyoubase.openapi4j.commons;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
|
|
||||||
import com.zzjee.yongyoubase.openapi4j.exception.OpenAPIException;
|
|
||||||
import com.zzjee.yongyoubase.openapi4j.util.HttpUtil;
|
|
||||||
import com.zzjee.yongyoubase.openapi4j.util.PropUtil;
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.jeecgframework.core.util.ResourceUtil;
|
import org.jeecgframework.core.util.ResourceUtil;
|
||||||
|
|
||||||
import java.util.Properties;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.zzjee.yongyoubase.openapi4j.exception.OpenAPIException;
|
||||||
|
import com.zzjee.yongyoubase.openapi4j.util.HttpUtil;
|
||||||
|
|
||||||
public class TokenManager {
|
public class TokenManager {
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ public class AcceptAdd {
|
||||||
AcceptService acceptService = new AcceptService();
|
AcceptService acceptService = new AcceptService();
|
||||||
try {
|
try {
|
||||||
// 通过平台交易号新增
|
// 通过平台交易号新增
|
||||||
JSONObject record = acceptService.add(jsonBody, to_account);
|
acceptService.add(jsonBody, to_account);
|
||||||
|
|
||||||
} catch (OpenAPIException e) {
|
} catch (OpenAPIException e) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue