根据findbug修正部分警告

master
jiasudu 2019-05-29 12:56:46 +08:00
parent a7ea21048d
commit 03f87f6501
21 changed files with 182 additions and 175 deletions

View File

@ -131,10 +131,10 @@ public class JeecgFormDemoController extends BaseController {
public AjaxJson getTreeData(TSDepart depatr,HttpServletResponse response,HttpServletRequest request ){
AjaxJson j = new AjaxJson();
try{
List<TSDepart> depatrList = new ArrayList<TSDepart>();
// List<TSDepart> depatrList = new ArrayList<TSDepart>();
StringBuffer hql = new StringBuffer(" from TSDepart t");
//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>>();
Map<String,Object> map = null;
for (TSDepart tsdepart : depatrList) {

View File

@ -209,7 +209,7 @@ public class wmomController {
TSUser task = wmUtil.getsysorgcode(username);
List<Map<String, Object>> resultList2 = null;
// String orgcode = "";
Integer isRead = null;
//Integer isRead = null;
if (task != null) {
try {
@ -218,10 +218,10 @@ public class wmomController {
+ "WHERE noticeRead.del_flag = 0 and noticeRead.user_id = ? ";
sql += " and noticeRead.is_read = ? ";
sql += " ORDER BY noticeRead.create_time DESC ";
if (isRead == null || !(isRead == 1 || isRead == 0)) {
isRead = 0;
}
List<Map<String, Object>> noticeList = systemService.findForJdbcParam(sql, 1, 10, task.getId(), isRead.intValue());
// if (isRead == null || !(isRead == 1 || isRead == 0)) {
// isRead = 0;
// }
List<Map<String, Object>> noticeList = systemService.findForJdbcParam(sql, 1, 10, task.getId(),Integer.valueOf(0) );//isRead.intValue()
//将List转换成JSON存储
// net.sf.json.JSONArray result = new net.sf.json.JSONArray();
@ -244,7 +244,7 @@ public class wmomController {
}
catch (Exception e){
logger.error(ExceptionUtil.getExceptionMessage(e));
}
}
return Result.success(list, Long.parseLong(resultList2.get(0).get("count").toString()));

View File

@ -171,8 +171,10 @@ public class MvCusCostController extends BaseController {
// 先把读进来的图片放到一个ByteArrayOutputStream中以便产生ByteArray
try {
// codedFileName = java.net.URLEncoder.encode("中文", "UTF-8");
String setHeaderEnddate =request.getParameter("enddate");
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();
HSSFSheet sheet = wb.createSheet("sum");
HSSFSheet sheet1 = wb.createSheet("detail");

View File

@ -24,7 +24,7 @@ public class SapRFC {
private JCoParameterList tabPara = null;
private String functionName;
// private String functionName;
private static String ABAP_AS = "ABAP_AS_WITHOUT_POOL";
@ -49,7 +49,7 @@ public class SapRFC {
String language ;
String host ;
String system ;
String router ;
//String router ;
// set properties参数
try{
// clientName = "300";
@ -65,7 +65,7 @@ public class SapRFC {
language = ResourceUtil.getConfigByName("rfc.language");
host = ResourceUtil.getConfigByName("rfc.host");
system = ResourceUtil.getConfigByName("rfc.system");
router = ResourceUtil.getConfigByName("rfc.router");
// router = ResourceUtil.getConfigByName("rfc.router");
}catch (Exception e){
clientName = "300";
userid = "DY_EZCAO";
@ -118,7 +118,9 @@ public class SapRFC {
// 执行方法
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 {
// 取得要执行的方法
function = destination.getRepository().getFunction(functionName);

View File

@ -27,10 +27,10 @@ public class sapgetdocutil {
}
//获取WMDOC
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>();
try {
result = sapWmUtil.getWmdoc(DOCTYPE,DOCID,tablename);
Map<String, Object> result = sapWmUtil.getWmdoc(DOCTYPE,DOCID,tablename);
JCoTable restable = (JCoTable)result.get("IT_OUT");
org.jeecgframework.core.util.LogUtil.info("===================获取凭证开始===================");
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[]){
Map<String, Object> result = new HashMap<String, Object>();
// Map<String, Object> result = new HashMap<String, Object>();
List<wmientity> reslit = new ArrayList<wmientity>();
try {
result = sapWmUtil.getcwkc(LGNUM,MATNR,LGPLA);
Map<String, Object> result = sapWmUtil.getcwkc(LGNUM,MATNR,LGPLA);
JCoTable restable = (JCoTable)result.get("IT_OUT");
org.jeecgframework.core.util.LogUtil.info("===================获取库存开始===================");
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[]){
Map<String, Object> result = new HashMap<String, Object>();
// Map<String, Object> result = new HashMap<String, Object>();
List<wmientity> reslit = new ArrayList<wmientity>();
try {
result = sapWmUtil.getcw(LGNUM,LGPLA);
Map<String, Object> result = sapWmUtil.getcw(LGNUM,LGPLA);
JCoTable restable = (JCoTable)result.get("IT_OUT");
org.jeecgframework.core.util.LogUtil.info("===================获取储位开始===================");
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[]){
List<wmientity> reslit = new ArrayList<wmientity>();
for(int i=0;i<restable.getNumRows();i++){
wmientity t = new wmientity();
//wmientity t = new wmientity();
try {
Class cl = Class.forName("com.yserp.wmapi.entity.wmientity");//反射得到类
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.invoke(obj,restable.getString(par[j-1]));
}
t = (wmientity) obj;
wmientity t = (wmientity) obj;
reslit.add(t);
}catch (Exception e){

View File

@ -160,6 +160,7 @@ public class ClientResponseHandler {
this.setParameter(k, v);
}
}
}

View File

@ -29,7 +29,8 @@ public class MD5Util {
public static String MD5Encode(String origin, String charsetname) {
String resultString = null;
try {
resultString = new String(origin);
//Dm DM_STRING_CTOR 因为使用StringString构造函数生成新字符串会浪费内存推荐使用原有字符串。
resultString = origin;
MessageDigest md = MessageDigest.getInstance("MD5");
if (charsetname == null || "".equals(charsetname))
resultString = byteArrayToHexString(md.digest(resultString

View File

@ -105,8 +105,8 @@ public class XMLUtil {
}
public static String createXML(Map<String,Object> map){
Set<Entry<String,Object>> set=map.entrySet();
set.iterator();
// Set<Entry<String,Object>> set=map.entrySet();
//set.iterator();
return null;
}

View File

@ -298,17 +298,17 @@ public class VYsddController extends BaseController {
}
List<VYsddEntity> vYsdds = this.vYsddService.getListByCriteriaQuery(cq,false);
OutputStream fileOut = null;
BufferedImage bufferImg = null;
String codedFileName = null;
// BufferedImage bufferImg = null;
// String codedFileName = null;
// 先把读进来的图片放到一个ByteArrayOutputStream中以便产生ByteArray
try {
codedFileName = java.net.URLEncoder.encode("中文", "UTF-8");
// codedFileName = java.net.URLEncoder.encode("中文", "UTF-8");
response.setHeader("content-disposition", "attachment;filename=zhangdan.xls"
);
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet("zhangdan");
ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
// ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
sheet.setMargin(HSSFSheet.TopMargin,0.1);// 页边距(上)
sheet.setMargin(HSSFSheet.BottomMargin,0.1);// 页边距(下)
@ -576,7 +576,7 @@ public class VYsddController extends BaseController {
return NormalExcelConstants.JEECG_EXCEL_VIEW;
}
@SuppressWarnings("unchecked")
// @SuppressWarnings("unchecked")
@RequestMapping(params = "importExcel", method = RequestMethod.POST)
@ResponseBody
public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) {

View File

@ -1836,11 +1836,11 @@ public class WmImNoticeHController extends BaseController {
List<Map<String,String>> list = new ArrayList<Map<String,String>>();
for(WmImNoticeIEntity t:wmImNoticeIEntityList){
List<WmInQmIEntity> WmInQmlist = new ArrayList<WmInQmIEntity>();
// List<WmInQmIEntity> WmInQmlist = new ArrayList<WmInQmIEntity>();
String hql = null;
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){
Map<String,String> map = new HashMap<String,String>();

View File

@ -1,64 +1,67 @@
package com.zzjee.wm.controller;
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.*;
import com.zzjee.wm.service.WmInQmIServiceI;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.ConstraintViolation;
import javax.validation.Validator;
import org.apache.log4j.Logger;
import org.jeecgframework.core.util.*;
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.beanvalidator.BeanValidators;
import org.jeecgframework.core.common.controller.BaseController;
import org.jeecgframework.core.common.exception.BusinessException;
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
import org.jeecgframework.core.common.model.json.AjaxJson;
import org.jeecgframework.core.common.model.json.DataGrid;
import org.jeecgframework.core.constant.Globals;
import org.jeecgframework.tag.core.easyui.TagUtil;
import org.jeecgframework.web.system.service.SystemService;
import org.jeecgframework.core.util.DateUtils;
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.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants;
import java.io.IOException;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import java.util.Map;
import java.util.HashMap;
import org.jeecgframework.tag.core.easyui.TagUtil;
import org.jeecgframework.web.system.service.SystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
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.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.http.HttpStatus;
import org.jeecgframework.core.beanvalidator.BeanValidators;
import java.util.Set;
import javax.swing.text.StyledEditorKit;
import javax.validation.ConstraintViolation;
import javax.validation.Validator;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
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
* @Description:
@ -238,7 +241,7 @@ public class WmInQmIController extends BaseController {
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 = ?";
List<WmInQmIEntity> WmInQmIEntityList = systemService.findHql(hql0,
id);// 获取行项目
@ -275,8 +278,8 @@ public class WmInQmIController extends BaseController {
try {
MvGoodsEntity mvgoods = new MvGoodsEntity();
mvgoods = systemService.findUniqueByProperty(
// MvGoodsEntity mvgoods = new MvGoodsEntity();
MvGoodsEntity mvgoods = systemService.findUniqueByProperty(
MvGoodsEntity.class, "goodsCode",
wmToUpGoodsEntity.getGoodsId());
wmToUpGoodsEntity.setBaseUnit(mvgoods.getBaseunit());
@ -772,8 +775,8 @@ public class WmInQmIController extends BaseController {
.getListByCriteriaQuery(cq, false);
for (WmInQmIEntity wmInQmIEntity : wmInQmIso) {
try {
MvGoodsEntity mvgoods = new MvGoodsEntity();
mvgoods = systemService.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", wmInQmIEntity.getGoodsId()) ;
// MvGoodsEntity mvgoods = new MvGoodsEntity();
MvGoodsEntity mvgoods = systemService.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", wmInQmIEntity.getGoodsId()) ;
wmInQmIEntity.setGoodsName(mvgoods.getShpMingCheng());
} catch (Exception e) {
// TODO: handle exception
@ -815,7 +818,7 @@ for (WmInQmIEntity wmInQmIEntity : wmInQmIso) {
return NormalExcelConstants.JEECG_EXCEL_VIEW;
}
@SuppressWarnings("unchecked")
// @SuppressWarnings("unchecked")
@RequestMapping(params = "importExcel", method = RequestMethod.POST)
@ResponseBody
public AjaxJson importExcel(HttpServletRequest request,
@ -985,7 +988,7 @@ for (WmInQmIEntity wmInQmIEntity : wmInQmIso) {
return new ResponseEntity(HttpStatus.NO_CONTENT);
}
// 按照Restful风格约定创建指向新任务的url, 也可以直接返回id或对象.
String id = wmInQmI.getId();
// String id = wmInQmI.getId();
return new ResponseEntity(D0, HttpStatus.OK);
}

View File

@ -1,27 +1,23 @@
package com.zzjee.wm.controller;
import com.zzjee.api.ResultDO;
import com.zzjee.md.entity.*;
import com.zzjee.tms.entity.TmsYwDingdanEntity;
import com.zzjee.wm.entity.*;
import com.zzjee.wm.page.*;
import com.zzjee.wm.service.WmOmNoticeHServiceI;
import java.io.*;
import java.net.URLEncoder;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.text.SimpleDateFormat;
import java.util.Map;
import java.util.Set;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletRequest;
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.log4j.Logger;
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.Row;
import org.apache.poi.ss.util.CellRangeAddress;
import org.springframework.beans.factory.annotation.Autowired;
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.beanvalidator.BeanValidators;
import org.jeecgframework.core.common.controller.BaseController;
import org.jeecgframework.core.common.exception.BusinessException;
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.DateUtils;
import org.jeecgframework.core.util.ExceptionUtil;
import org.jeecgframework.core.util.MyBeanUtils;
import org.jeecgframework.core.util.QRcodeUtil;
import org.jeecgframework.core.util.ResourceUtil;
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.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.TSRoleUser;
import org.jeecgframework.web.system.pojo.base.TSUser;
import org.jeecgframework.web.system.service.SystemService;
import org.jeecgframework.web.system.sms.util.Constants;
import org.jeecgframework.web.system.sms.util.TuiSongMsgUtil;
import org.jeecgframework.core.util.MyBeanUtils;
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.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.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
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.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.jeecgframework.core.beanvalidator.BeanValidators;
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.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
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
* @Description:
@ -256,7 +255,7 @@ public class WmOmNoticeHController extends BaseController {
Double zhlsum = 0.00;
try{
List<WmOmQmIEntity> wmOmQmIEntityList = systemService.findHql(hql0, id0);//获取行项目
List<WmOmQmIEntity> wmOmQmIEntityListnew = new ArrayList<>();
//List<WmOmQmIEntity> wmOmQmIEntityListnew = new ArrayList<>();
DecimalFormat dfsum=new DecimalFormat(".##");
try{
for(WmOmQmIEntity tom:wmOmQmIEntityList){
@ -301,8 +300,9 @@ public class WmOmNoticeHController extends BaseController {
}
}
}catch (Exception e){
}
wmOmQmIEntityListnew.add(tom);
//wmOmQmIEntityListnew.add(tom);
}
}catch ( Exception e){
}
@ -370,7 +370,7 @@ public class WmOmNoticeHController extends BaseController {
Double zhlsum = 0.00;
try{
List<WmOmQmIEntity> wmOmQmIEntityList = systemService.findHql(hql0, id0);//获取行项目
List<WmOmQmIEntity> wmOmQmIEntityListnew = new ArrayList<>();
//List<WmOmQmIEntity> wmOmQmIEntityListnew = new ArrayList<>();
DecimalFormat dfsum=new DecimalFormat(".##");
String filepath = ResourceUtil.getConfigByName("webUploadpath");
String goodsurl = ResourceUtil.getConfigByName("show.goodsurl");
@ -425,7 +425,7 @@ public class WmOmNoticeHController extends BaseController {
}
}catch (Exception e){
}
wmOmQmIEntityListnew.add(tom);
//wmOmQmIEntityListnew.add(tom);
}
}catch ( Exception e){
}
@ -487,7 +487,7 @@ public class WmOmNoticeHController extends BaseController {
Double zhlsum = 0.00;
try{
List<WmOmQmIEntity> wmOmQmIEntityList = systemService.findHql(hql0, id0);//获取行项目
List<WmOmQmIEntity> wmOmQmIEntityListnew = new ArrayList<>();
//List<WmOmQmIEntity> wmOmQmIEntityListnew = new ArrayList<>();
DecimalFormat dfsum=new DecimalFormat(".##");
try{
for(WmOmQmIEntity tom:wmOmQmIEntityList){
@ -533,7 +533,7 @@ public class WmOmNoticeHController extends BaseController {
}
}catch (Exception e){
}
wmOmQmIEntityListnew.add(tom);
//wmOmQmIEntityListnew.add(tom);
}
}catch ( Exception e){
}
@ -672,7 +672,7 @@ public class WmOmNoticeHController extends BaseController {
if(CollectionUtils.isNotEmpty(demos)){
for(WmOmNoticeHEntity jeecgDemo:demos){
if (StringUtil.isNotEmpty(jeecgDemo.getId())) {
WmOmNoticeHEntity t =systemService.get(WmOmNoticeHEntity.class, jeecgDemo.getId());
// WmOmNoticeHEntity t =systemService.get(WmOmNoticeHEntity.class, jeecgDemo.getId());
try {
message = "回单成功";
WmNoticeConfEntity confe = new WmNoticeConfEntity();
@ -929,6 +929,7 @@ public class WmOmNoticeHController extends BaseController {
wmomNoticeIEntity.setGoodsName(date[1]);
} catch (Exception e) {
// TODO: handle exception
logger.error(ExceptionUtil.getExceptionMessage(e));
}
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());
} catch (Exception e) {
// TODO: handle exception
logger.error(ExceptionUtil.getExceptionMessage(e));
}
systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
}catch(Exception e){
@ -1084,7 +1086,7 @@ public class WmOmNoticeHController extends BaseController {
resResult resResult = wmIntUtil.postBill(ja.toString(),wmOmNoticeHEntity.getPiMaster());
j.setMsg(resResult.getDetailedMessage());
}catch (Exception e){
logger.error(ExceptionUtil.getExceptionMessage(e));
}
j.setMsg(message);
@ -1106,7 +1108,7 @@ public class WmOmNoticeHController extends BaseController {
public void downReceiveExcel(WmOmNoticeHEntity wmOmNoticeH,HttpServletRequest request,HttpServletResponse response){
OutputStream fileOut = null;
BufferedImage bufferImg = null;
String codedFileName = null;
// String codedFileName = null;
wmOmNoticeH = systemService.getEntity(WmOmNoticeHEntity.class,
wmOmNoticeH.getId());//获取抬头
String hql0 = "from WmOmNoticeIEntity where 1 = 1 AND omNoticeId = ? ";
@ -1114,11 +1116,11 @@ public class WmOmNoticeHController extends BaseController {
.findHql(hql0, wmOmNoticeH.getOmNoticeId());//获取行项目
//先把读进来的图片放到一个ByteArrayOutputStream中以便产生ByteArray
try {
StringBuffer sber=new StringBuffer();
// StringBuffer sber=new StringBuffer();
ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
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");
ImageIO.write(bufferImg, "jpg", byteArrayOut);
@ -1346,12 +1348,14 @@ public class WmOmNoticeHController extends BaseController {
wb.write(fileOut);
} catch (Exception e) {
e.printStackTrace();
logger.error(ExceptionUtil.getExceptionMessage(e));
}finally{
if(fileOut != null){
try {
fileOut.close();
} catch (IOException e) {
e.printStackTrace();
logger.error(ExceptionUtil.getExceptionMessage(e));
}
}
}
@ -1365,14 +1369,14 @@ public class WmOmNoticeHController extends BaseController {
HttpServletRequest request, HttpServletResponse response) {
OutputStream fileOut = null;
BufferedImage bufferImg = null;
String codedFileName = null;
// String codedFileName = null;
wmOmNoticeH = systemService.getEntity(WmOmNoticeHEntity.class,
wmOmNoticeH.getId());//获取抬头
// 先把读进来的图片放到一个ByteArrayOutputStream中以便产生ByteArray
try {
StringBuffer sber = new StringBuffer();
// StringBuffer sber = new StringBuffer();
ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
// bufferImg = ImageIO.read(BarcodeUtil.generateToStream(wmImNoticeH
@ -1381,7 +1385,7 @@ public class WmOmNoticeHController extends BaseController {
.getOmNoticeId());
// 进行转码,使其支持中文文件名
codedFileName = java.net.URLEncoder.encode("中文", "UTF-8");
// codedFileName = java.net.URLEncoder.encode("中文", "UTF-8");
response.setHeader("content-disposition", "attachment;filename="
+ wmOmNoticeH.getOmNoticeId() + ".xls");
ImageIO.write(bufferImg, "jpg", byteArrayOut);
@ -1654,7 +1658,7 @@ public class WmOmNoticeHController extends BaseController {
columnNames = columnNames1;
}
}catch ( Exception e){
logger.error(ExceptionUtil.getExceptionMessage(e));
}
@ -1701,7 +1705,7 @@ public class WmOmNoticeHController extends BaseController {
cell4.setCellStyle(cs5r);
} catch (Exception e) {
// TODO: handle exception
logger.error(ExceptionUtil.getExceptionMessage(e));
}
try {
@ -1710,6 +1714,7 @@ public class WmOmNoticeHController extends BaseController {
cell5.setCellStyle(cs5);
} catch (Exception e) {
// TODO: handle exception
logger.error(ExceptionUtil.getExceptionMessage(e));
}
try {
@ -1723,6 +1728,7 @@ public class WmOmNoticeHController extends BaseController {
cell6.setCellStyle(cs5);
} catch (Exception e) {
// TODO: handle exception
logger.error(ExceptionUtil.getExceptionMessage(e));
}
try {
@ -1735,6 +1741,7 @@ public class WmOmNoticeHController extends BaseController {
cell7.setCellStyle(cs5);
} catch (Exception e) {
// TODO: handle exception
logger.error(ExceptionUtil.getExceptionMessage(e));
}
Cell cell8 = rowColumnValue.createCell(7);// 毛重
try {
@ -1746,6 +1753,7 @@ public class WmOmNoticeHController extends BaseController {
} catch (Exception e) {
// TODO: handle exception
logger.error(ExceptionUtil.getExceptionMessage(e));
}
cell8.setCellStyle(cs5);
Cell cell9 = rowColumnValue.createCell(8);// 体积
@ -1762,14 +1770,10 @@ public class WmOmNoticeHController extends BaseController {
try{
if("hr".equals(ResourceUtil.getConfigByName("wm.ckd"))) {
try{
cell9.setCellValue(wmUtil.getstock(result.get(i).get("goods_id").toString()));
}catch (Exception e){
}
}
}catch (Exception e){
logger.error(ExceptionUtil.getExceptionMessage(e));
}
@ -1830,12 +1834,14 @@ public class WmOmNoticeHController extends BaseController {
wb.write(fileOut);
} catch (Exception e) {
e.printStackTrace();
logger.error(ExceptionUtil.getExceptionMessage(e));
} finally {
if (fileOut != null) {
try {
fileOut.close();
} catch (IOException e) {
e.printStackTrace();
logger.error(ExceptionUtil.getExceptionMessage(e));
}
}
}

View File

@ -489,8 +489,8 @@ public class WmToDownGoodsController extends BaseController {
wmToDownGoods.setBinIdTo("PK");
wmToDownGoods.setDownSta("已复核");
wmToDownGoods.setGoodsQuaok(wmToDownGoods.getGoodsQua());
MvGoodsEntity mvgoods = new MvGoodsEntity();
mvgoods = systemService.findUniqueByProperty(
// MvGoodsEntity mvgoods = new MvGoodsEntity();
MvGoodsEntity mvgoods = systemService.findUniqueByProperty(
MvGoodsEntity.class, "goodsCode",
wmToDownGoods.getGoodsId());
if(mvgoods!=null){

View File

@ -221,8 +221,8 @@ public class WmToUpGoodsController extends BaseController {
message = "上架列表添加成功";
try{
wmToUpGoods.setOrderId("ZY");
MvGoodsEntity mvgoods = new MvGoodsEntity();
mvgoods = systemService.findUniqueByProperty(
//MvGoodsEntity mvgoods = new MvGoodsEntity();
MvGoodsEntity mvgoods = systemService.findUniqueByProperty(
MvGoodsEntity.class, "goodsCode",
wmToUpGoods.getGoodsId());
if(mvgoods!=null){

View File

@ -48,8 +48,7 @@ public class WmImNoticeHServiceImpl extends CommonServiceImpl implements WmImNot
/**保存-进货通知明细*/
for(WmImNoticeIEntity wmImNoticeI:wmImNoticeIList){
//外键设置
MvGoodsEntity mvgoods = new MvGoodsEntity();
mvgoods = this.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", wmImNoticeI.getGoodsCode()) ;
MvGoodsEntity mvgoods = this.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", wmImNoticeI.getGoodsCode()) ;
if(mvgoods!=null){
wmImNoticeI.setGoodsName(mvgoods.getGoodsName());
wmImNoticeI.setBarCode(mvgoods.getShpTiaoMa());

View File

@ -48,8 +48,7 @@ public class WmOmNoticeHServiceImpl extends CommonServiceImpl implements WmOmNot
for(WmOmNoticeIEntity wmOmNoticeI:wmOmNoticeIList){
//外键设置
try{
MvGoodsEntity mvgoods = new MvGoodsEntity();
mvgoods = this.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", wmOmNoticeI.getGoodsId()) ;
MvGoodsEntity mvgoods = this.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", wmOmNoticeI.getGoodsId()) ;
if(mvgoods!=null){
huowu=huowu+mvgoods.getGoodsName();
wmOmNoticeI.setGoodsName(mvgoods.getGoodsName());
@ -141,8 +140,7 @@ public class WmOmNoticeHServiceImpl extends CommonServiceImpl implements WmOmNot
if(oldE.getId().equals(sendE.getId())){
try {
MyBeanUtils.copyBeanNotNull2Bean(sendE,oldE);
MvGoodsEntity mvgoods = new MvGoodsEntity();
mvgoods = this.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", oldE.getGoodsId()) ;
MvGoodsEntity mvgoods = this.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", oldE.getGoodsId()) ;
oldE.setGoodsUnit(mvgoods.getShlDanWei());
oldE.setBaseUnit(mvgoods.getBaseunit());
if(!mvgoods.getBaseunit().equals(mvgoods.getShlDanWei())){

View File

@ -60,12 +60,12 @@ public class wmBaseController extends BaseController {
*/
private static final Logger logger = Logger.getLogger(wmBaseController.class);
@Autowired
private WvGiServiceI wvGiService;
@Autowired
private SystemService systemService;
@Autowired
private Validator validator;
// @Autowired
// private WvGiServiceI wvGiService;
// @Autowired
// private SystemService systemService;
// @Autowired
// private Validator validator;
@ -121,7 +121,7 @@ public class wmBaseController extends BaseController {
}
response.flushBuffer();
} catch (Exception e) {
logger.error(ExceptionUtil.getExceptionMessage(e));
}finally{
if(inputStream!=null){
inputStream.close();

View File

@ -1,11 +1,9 @@
package com.zzjee.wmutil;
import org.jeecgframework.core.util.ResourceUtil;
public class dscUtil {
public static void getorderbystatus(String orstatus){
String baseurl = ResourceUtil.getConfigByName("dsc.url");
String baseukey = ResourceUtil.getConfigByName("dsc.key");
//String baseurl = ResourceUtil.getConfigByName("dsc.url");
//String baseukey = ResourceUtil.getConfigByName("dsc.key");
}
}

View File

@ -418,7 +418,7 @@ public class yyUtil {
String jsonBody = params.get("jsonBody").toString();
OtherOutService otherOutService = new OtherOutService();
try {
JSONObject record = otherOutService.add(jsonBody, to_account);
otherOutService.add(jsonBody, to_account);
} catch (OpenAPIException e) {
e.printStackTrace();
}
@ -428,7 +428,7 @@ public class yyUtil {
String jsonBody = params.get("jsonBody").toString();
OtherInService otherInService = new OtherInService();
try {
JSONObject record = otherInService.add(jsonBody, to_account);
otherInService.add(jsonBody, to_account);
} catch (OpenAPIException e) {
e.printStackTrace();
}

View File

@ -1,14 +1,11 @@
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.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 {

View File

@ -22,7 +22,7 @@ public class AcceptAdd {
AcceptService acceptService = new AcceptService();
try {
// 通过平台交易号新增
JSONObject record = acceptService.add(jsonBody, to_account);
acceptService.add(jsonBody, to_account);
} catch (OpenAPIException e) {