整型改为DOUBLE
parent
cabf18dfd3
commit
786eadac6d
|
@ -36,6 +36,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.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
@ -235,7 +236,7 @@ public class WmImNoticeHController extends BaseController {
|
|||
List<WmImNoticeIEntity> resultold = dataGrid.getResults();
|
||||
for (WmImNoticeIEntity wmImNoticeIEntity : resultold) {
|
||||
try {
|
||||
if (Long.parseLong(wmImNoticeIEntity.getGoodsCount()) > Long.parseLong(wmImNoticeIEntity.getGoodsQmCount())) {
|
||||
if (Double.parseDouble(wmImNoticeIEntity.getGoodsCount()) > Double.parseDouble(wmImNoticeIEntity.getGoodsQmCount())) {
|
||||
resultnew.add(wmImNoticeIEntity);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -265,7 +266,7 @@ public class WmImNoticeHController extends BaseController {
|
|||
List<WmImNoticeIEntity> resultnew = new ArrayList<WmImNoticeIEntity>();
|
||||
List<WmImNoticeIEntity> resultold = dataGrid.getResults();
|
||||
for (WmImNoticeIEntity wmImNoticeIEntity : resultold) {
|
||||
if (Long.parseLong(wmImNoticeIEntity.getGoodsCount()) > Long.parseLong(wmImNoticeIEntity.getGoodsQmCount())) {
|
||||
if (Double.parseDouble(wmImNoticeIEntity.getGoodsCount()) > Double.parseDouble(wmImNoticeIEntity.getGoodsQmCount())) {
|
||||
resultnew.add(wmImNoticeIEntity);
|
||||
}
|
||||
}
|
||||
|
@ -1250,7 +1251,7 @@ public class WmImNoticeHController extends BaseController {
|
|||
int size = result.size();
|
||||
int pagesize = 10;
|
||||
int pagecount = size%pagesize==0?size/pagesize:size/pagesize+1;
|
||||
long sum = 0;
|
||||
double sum = 0;
|
||||
double sumzl = 0;
|
||||
do {
|
||||
|
||||
|
@ -1440,7 +1441,7 @@ public class WmImNoticeHController extends BaseController {
|
|||
}
|
||||
|
||||
try {
|
||||
sum = sum + Long.parseLong(result.get(i).get("goods_count")
|
||||
sum = sum + Double.parseDouble(result.get(i).get("goods_count")
|
||||
.toString());
|
||||
Cell cell7 = rowColumnValue.createCell(6);// 数量
|
||||
|
||||
|
@ -1491,7 +1492,7 @@ public class WmImNoticeHController extends BaseController {
|
|||
Row rowColumnValue = sheet.createRow((short) cellsNum); // 列名
|
||||
rowColumnValue.setHeight((short) 250);
|
||||
Cell cell6 = rowColumnValue.createCell(6);// 备注
|
||||
cell6.setCellValue(Long.toString(sum));
|
||||
cell6.setCellValue(Double.toString(sum));
|
||||
Cell cell7 = rowColumnValue.createCell(7);// 重量
|
||||
cell7.setCellValue(Double.toString(sumzl));
|
||||
// cell6.setCellStyle(cs5);
|
||||
|
|
|
@ -227,9 +227,9 @@ public class WmInQmIController extends BaseController {
|
|||
|
||||
if (!mvgoods.getBaseunit().equals(mvgoods.getShlDanWei())) {
|
||||
try {
|
||||
wmToUpGoodsEntity.setBaseGoodscount(String.valueOf(Long
|
||||
.parseLong(mvgoods.getChlShl())
|
||||
* Long.parseLong(wmToUpGoodsEntity.getGoodsQua())));
|
||||
wmToUpGoodsEntity.setBaseGoodscount(String.valueOf(
|
||||
Double.parseDouble(mvgoods.getChlShl())
|
||||
* Double.parseDouble(wmToUpGoodsEntity.getGoodsQua())));
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
@ -323,7 +323,7 @@ public class WmInQmIController extends BaseController {
|
|||
j.setMsg("不存在此商品");
|
||||
} else {
|
||||
mdgoods.setChlShl("0");
|
||||
long goodsno = 0;
|
||||
double goodsno = 0.00;
|
||||
System.out
|
||||
.println("*******************8"
|
||||
+ oConvertUtils.getString(request
|
||||
|
@ -338,14 +338,14 @@ public class WmInQmIController extends BaseController {
|
|||
oConvertUtils.getString(request
|
||||
.getParameter("goodsid")));// 获取行项目
|
||||
for (WmImNoticeIEntity wmImNoticeIEntity : wmImNoticeIEntityList) {
|
||||
goodsno = Long.parseLong(wmImNoticeIEntity.getGoodsCount())
|
||||
- Long.parseLong(wmImNoticeIEntity.getGoodsQmCount());
|
||||
goodsno = Double.parseDouble(wmImNoticeIEntity.getGoodsCount())
|
||||
- Double.parseDouble(wmImNoticeIEntity.getGoodsQmCount());
|
||||
if (goodsno > 0) {
|
||||
long quat1 =Long.parseLong(mvgoods.getMpCengGao()) * Long.parseLong(mvgoods.getMpDanCeng());
|
||||
if(quat1 < goodsno){
|
||||
goodsno = quat1;
|
||||
}
|
||||
mdgoods.setChlShl(Long.toString(goodsno));
|
||||
mdgoods.setChlShl(Double.toString(goodsno));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -372,7 +372,7 @@ public class WmInQmIController extends BaseController {
|
|||
String flag = "N";
|
||||
message = "收货登记添加成功";
|
||||
try {
|
||||
if (Long.parseLong(wmInQmI.getQmOkQuat()) <= 0) {
|
||||
if (Double.parseDouble(wmInQmI.getQmOkQuat()) <= 0) {
|
||||
j.setSuccess(false);
|
||||
message = "数量不能为0";
|
||||
return j;
|
||||
|
@ -441,11 +441,11 @@ public class WmInQmIController extends BaseController {
|
|||
for (WmImNoticeIEntity wmImNoticeIEntity : wmImNoticeIEntityList) {
|
||||
if (wmImNoticeIEntity.getGoodsCode().equals(
|
||||
wmInQmI.getGoodsId())) {
|
||||
Long weiq = Long.parseLong(wmImNoticeIEntity
|
||||
double weiq = Double.parseDouble(wmImNoticeIEntity
|
||||
.getGoodsCount())
|
||||
- Long.parseLong(wmImNoticeIEntity
|
||||
- Double.parseDouble(wmImNoticeIEntity
|
||||
.getGoodsQmCount());
|
||||
if (Long.parseLong(wmInQmI.getQmOkQuat()) <= weiq) {
|
||||
if (Double.parseDouble(wmInQmI.getQmOkQuat()) <= weiq) {
|
||||
wmimnotice = wmImNoticeIEntity;
|
||||
flag = "X";
|
||||
break;
|
||||
|
@ -473,10 +473,10 @@ public class WmInQmIController extends BaseController {
|
|||
try {
|
||||
wmInQmI.setTinTj(String.valueOf(Double.parseDouble(mvgoods
|
||||
.getTiJiCm())
|
||||
* Long.parseLong(wmInQmI.getQmOkQuat())));
|
||||
* Double.parseDouble(wmInQmI.getQmOkQuat())));
|
||||
wmInQmI.setTinZhl(String.valueOf(Double.parseDouble(mvgoods
|
||||
.getZhlKg())
|
||||
* Long.parseLong(wmInQmI.getQmOkQuat())));
|
||||
* Double.parseDouble(wmInQmI.getQmOkQuat())));
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
|
|
@ -458,7 +458,7 @@ public class WmOmNoticeHController extends BaseController {
|
|||
+ goods + "'";
|
||||
Map<String, Object> binMap = systemService.findOneForJdbc(sql);
|
||||
if(binMap!=null){
|
||||
if(Long.parseLong(binMap.get("qua").toString())< Long.parseLong(request.getParameter("goodsqua").toString())){
|
||||
if(Double.parseDouble(binMap.get("qua").toString())< Double.parseDouble(request.getParameter("goodsqua").toString())){
|
||||
j.setSuccess(false);
|
||||
message = request.getParameter("goodscode").toString() +"库存为"+binMap.get("qua").toString();
|
||||
j.setMsg(message);
|
||||
|
@ -1199,9 +1199,9 @@ public class WmOmNoticeHController extends BaseController {
|
|||
}
|
||||
int pagesize = 10;
|
||||
int pagecount = size%pagesize==0?size/pagesize:size/pagesize+1;
|
||||
long sum = 0;
|
||||
long sumxs = 0;
|
||||
long sumzl = 0;
|
||||
double sum = 0;
|
||||
double sumxs = 0;
|
||||
double sumzl = 0;
|
||||
do {
|
||||
|
||||
// 画图的顶级管理器,一个sheet只能获取一个(一定要注意这点)
|
||||
|
@ -1365,8 +1365,8 @@ public class WmOmNoticeHController extends BaseController {
|
|||
|
||||
try {
|
||||
|
||||
long xs = (long) Math.floor(Long.parseLong(result.get(i).get("goods_count")
|
||||
.toString()) / Long.parseLong(result.get(i).get("chl_shl")
|
||||
long xs = (long) Math.floor(Double.parseDouble(result.get(i).get("goods_count")
|
||||
.toString()) / Double.parseDouble(result.get(i).get("chl_shl")
|
||||
.toString()));
|
||||
sumxs = sumxs + xs;
|
||||
Cell cell6 = rowColumnValue.createCell(5);// 单位
|
||||
|
@ -1377,8 +1377,8 @@ public class WmOmNoticeHController extends BaseController {
|
|||
}
|
||||
|
||||
try {
|
||||
long bs = Long.parseLong(result.get(i).get("goods_count")
|
||||
.toString()) % Long.parseLong(result.get(i).get("chl_shl")
|
||||
double bs = Double.parseDouble(result.get(i).get("goods_count")
|
||||
.toString()) % Double.parseDouble(result.get(i).get("chl_shl")
|
||||
.toString());
|
||||
sum = sum + bs;
|
||||
Cell cell7 = rowColumnValue.createCell(6);// 数量
|
||||
|
@ -1390,8 +1390,8 @@ public class WmOmNoticeHController extends BaseController {
|
|||
Cell cell8 = rowColumnValue.createCell(7);// 毛重
|
||||
try {
|
||||
|
||||
long zhl = Long.parseLong(result.get(i).get("tin_zhl")
|
||||
.toString()) * Long.parseLong(result.get(i).get("goods_count").toString());
|
||||
double zhl = Double.parseDouble(result.get(i).get("tin_zhl")
|
||||
.toString()) * Double.parseDouble(result.get(i).get("goods_count").toString());
|
||||
sumzl = sumzl + zhl;
|
||||
cell8.setCellValue(zhl);
|
||||
|
||||
|
@ -1401,8 +1401,8 @@ public class WmOmNoticeHController extends BaseController {
|
|||
cell8.setCellStyle(cs5);
|
||||
Cell cell9 = rowColumnValue.createCell(8);// 体积
|
||||
try {
|
||||
long tij = Long.parseLong(result.get(i).get("tin_tj")
|
||||
.toString()) * Long.parseLong(result.get(i).get("goods_count").toString());
|
||||
double tij = Double.parseDouble(result.get(i).get("tin_tj")
|
||||
.toString()) * Double.parseDouble(result.get(i).get("goods_count").toString());
|
||||
|
||||
|
||||
cell9.setCellValue(tij);
|
||||
|
@ -1423,11 +1423,11 @@ public class WmOmNoticeHController extends BaseController {
|
|||
Row rowColumnValue = sheet.createRow((short) cellsNum); // 列名
|
||||
rowColumnValue.setHeight((short) 250);
|
||||
Cell cell5 = rowColumnValue.createCell(5);// 备注
|
||||
cell5.setCellValue(Long.toString(sumxs));
|
||||
cell5.setCellValue(Double.toString(sumxs));
|
||||
Cell cell6 = rowColumnValue.createCell(6);// 备注
|
||||
cell6.setCellValue(Long.toString(sum));
|
||||
cell6.setCellValue(Double.toString(sum));
|
||||
Cell cell7 = rowColumnValue.createCell(7);// 重量合计
|
||||
cell7.setCellValue(Long.toString(sumzl));
|
||||
cell7.setCellValue(Double.toString(sumzl));
|
||||
// cell6.setCellStyle(cs5);
|
||||
Cell cell0 = rowColumnValue.createCell(0);// 合计
|
||||
cell0.setCellValue("合计:");
|
||||
|
|
|
@ -101,7 +101,6 @@ public class WmSttInGoodsController extends BaseController {
|
|||
* @param request
|
||||
* @param response
|
||||
* @param dataGrid
|
||||
* @param user
|
||||
*/
|
||||
|
||||
@RequestMapping(params = "datagrid")
|
||||
|
@ -241,9 +240,9 @@ public class WmSttInGoodsController extends BaseController {
|
|||
if(!wmSttInGoods.getGoodsQua().equals(wmSttInGoods.getSttQua())){
|
||||
try{
|
||||
// wmSttInGoods.setSttQua("0");
|
||||
if(Long.parseLong(wmSttInGoods.getGoodsQua()) > Long.parseLong(wmSttInGoods.getSttQua())){
|
||||
if(Double.parseDouble(wmSttInGoods.getGoodsQua()) > Double.parseDouble(wmSttInGoods.getSttQua())){
|
||||
//下架
|
||||
String goodsqua = Long.toString((Long.parseLong(wmSttInGoods.getGoodsQua()) - Long.parseLong(wmSttInGoods.getSttQua())));
|
||||
String goodsqua = Double.toString((Double.parseDouble(wmSttInGoods.getGoodsQua()) - Double.parseDouble(wmSttInGoods.getSttQua())));
|
||||
WmToDownGoodsEntity wmToDownGoods = new WmToDownGoodsEntity();
|
||||
|
||||
wmToDownGoods.setOrderId("ZY");
|
||||
|
@ -279,7 +278,7 @@ public class WmSttInGoodsController extends BaseController {
|
|||
}
|
||||
}else{
|
||||
//上架
|
||||
String goodsqua = Long.toString(( Long.parseLong(wmSttInGoods.getSttQua()) - Long.parseLong(wmSttInGoods.getGoodsQua())));
|
||||
String goodsqua = Double.toString(( Double.parseDouble(wmSttInGoods.getSttQua()) - Double.parseDouble(wmSttInGoods.getGoodsQua())));
|
||||
|
||||
WmToUpGoodsEntity wmToUpGoods = new WmToUpGoodsEntity();
|
||||
wmToUpGoods.setOrderId("ZY");
|
||||
|
|
|
@ -105,7 +105,6 @@ public class WmToDownGoodsController extends BaseController {
|
|||
* @param request
|
||||
* @param response
|
||||
* @param dataGrid
|
||||
* @param user
|
||||
*/
|
||||
|
||||
@RequestMapping(params = "datagrid")
|
||||
|
@ -401,13 +400,13 @@ public class WmToDownGoodsController extends BaseController {
|
|||
j.setSuccess(false);
|
||||
j.setMsg("不存在此商品");
|
||||
}else{
|
||||
Long goodsno = (long) 0;
|
||||
double goodsno = 0;
|
||||
WmOmNoticeHEntity wmOmNoticeHEntity = systemService.findUniqueByProperty(WmOmNoticeHEntity.class, "omNoticeId", oConvertUtils.getString(request.getParameter("noticeid")));
|
||||
String hql0 = "from WmOmNoticeIEntity where 1 = 1 AND omNoticeId = ? and goodsId = ? ";
|
||||
List<WmOmNoticeIEntity> wmOmNoticeIEntityList = systemService
|
||||
.findHql(hql0, wmOmNoticeHEntity.getOmNoticeId(),oConvertUtils.getString(request.getParameter("goodsid")));//获取行项目
|
||||
for (WmOmNoticeIEntity wmOmNoticeIEntity : wmOmNoticeIEntityList) {
|
||||
goodsno = (Long.valueOf(wmOmNoticeIEntity.getGoodsQua()) - Long.valueOf(wmOmNoticeIEntity.getGoodsQuaok())) * Long.valueOf(mvgoods.getChlShl());
|
||||
goodsno = (Double.valueOf(wmOmNoticeIEntity.getGoodsQua()) - Double.valueOf(wmOmNoticeIEntity.getGoodsQuaok())) * Double.valueOf(mvgoods.getChlShl());
|
||||
if(goodsno > 0 ){
|
||||
String sql = "select ws.ku_wei_bian_ma,ws.bin_id,ws.shp_ming_cheng,cast(sum(ws.base_goodscount) as signed) as goods_qua, mb.qu_huo_ci_xu, ws.goods_pro_data"
|
||||
+" from wv_stock ws, md_bin mb where "
|
||||
|
@ -420,14 +419,14 @@ public class WmToDownGoodsController extends BaseController {
|
|||
mvgoods.setChlShl(String.valueOf(goodsno));
|
||||
if(result!=null){
|
||||
for(int i = 0;i<result.size();i++ ){
|
||||
if(Long.valueOf(result.get(i).get("goods_qua").toString())>0){
|
||||
if(Long.valueOf(result.get(i).get("goods_qua").toString())>=goodsno){
|
||||
if(Double.valueOf(result.get(i).get("goods_qua").toString())>0){
|
||||
if(Double.valueOf(result.get(i).get("goods_qua").toString())>=goodsno){
|
||||
mvgoods.setTiJiCm(String.valueOf(goodsno));//数量
|
||||
mvgoods.setZhlKg("本次可发完");//还需数量
|
||||
}else{
|
||||
Long wq = goodsno - Long.valueOf(result.get(i).get("goods_qua").toString());
|
||||
double wq = goodsno - Double.valueOf(result.get(i).get("goods_qua").toString());
|
||||
mvgoods.setTiJiCm(result.get(i).get("goods_qua").toString());//数量setChcDanWei
|
||||
mvgoods.setZhlKg("还需要发"+wq.toString());//还需数量 setChlKongZhi
|
||||
mvgoods.setZhlKg("还需要发"+Double.toString(wq));//还需数量 setChlKongZhi
|
||||
|
||||
}
|
||||
mvgoods.setGoodsName(result.get(i).get("shp_ming_cheng").toString());//名称
|
||||
|
@ -483,9 +482,9 @@ public class WmToDownGoodsController extends BaseController {
|
|||
wmToDownGoods.setGoodsUnit(mvgoods.getShlDanWei());
|
||||
if (!mvgoods.getBaseunit().equals(mvgoods.getShlDanWei())) {
|
||||
try {
|
||||
wmToDownGoods.setBaseGoodscount(String.valueOf(Long
|
||||
.parseLong(mvgoods.getChlShl())
|
||||
* Long.parseLong(wmToDownGoods.getGoodsQua())));
|
||||
wmToDownGoods.setBaseGoodscount(String.valueOf(Double
|
||||
.parseDouble(mvgoods.getChlShl())
|
||||
* Double.parseDouble(wmToDownGoods.getGoodsQua())));
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
|
|
@ -228,9 +228,9 @@ public class WmToUpGoodsController extends BaseController {
|
|||
wmToUpGoods.setGoodsUnit(mvgoods.getShlDanWei());
|
||||
if (!mvgoods.getBaseunit().equals(mvgoods.getShlDanWei())) {
|
||||
try {
|
||||
wmToUpGoods.setBaseGoodscount(String.valueOf(Long
|
||||
.parseLong(mvgoods.getChlShl())
|
||||
* Long.parseLong(wmToUpGoods.getGoodsQua())));
|
||||
wmToUpGoods.setBaseGoodscount(String.valueOf(Double
|
||||
.parseDouble(mvgoods.getChlShl())
|
||||
* Double.parseDouble(wmToUpGoods.getGoodsQua())));
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
|
|
@ -56,14 +56,14 @@ public class WmImNoticeHServiceImpl extends CommonServiceImpl implements WmImNot
|
|||
|
||||
try {
|
||||
try {
|
||||
wmImNoticeI.setGoodsFvol(String.valueOf(Double.parseDouble(mvgoods.getTiJiCm())*Long.parseLong(wmImNoticeI.getGoodsCount())));
|
||||
wmImNoticeI.setGoodsFvol(String.valueOf(Double.parseDouble(mvgoods.getTiJiCm())*Double.parseDouble(wmImNoticeI.getGoodsCount())));
|
||||
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
try {
|
||||
if(!mvgoods.getBaseunit().equals(mvgoods.getShlDanWei())){
|
||||
wmImNoticeI.setBaseGoodscount(String.valueOf(Long.parseLong(mvgoods.getChlShl())*Long.parseLong(wmImNoticeI.getGoodsCount())));
|
||||
wmImNoticeI.setBaseGoodscount(String.valueOf(Double.parseDouble(mvgoods.getChlShl())*Double.parseDouble(wmImNoticeI.getGoodsCount())));
|
||||
}else{
|
||||
wmImNoticeI.setBaseGoodscount(wmImNoticeI.getGoodsCount());
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ public class WmImNoticeHServiceImpl extends CommonServiceImpl implements WmImNot
|
|||
|
||||
try {
|
||||
// wmImNoticeI.setGoodsFvol(String.valueOf(Long.parseLong(mdgoods.getTiJiCm())*Long.parseLong(wmImNoticeI.getGoodsCount())));
|
||||
wmImNoticeI.setGoodsWeight(String.valueOf(Double.parseDouble(mvgoods.getZhlKg())*Long.parseLong(wmImNoticeI.getGoodsCount())));
|
||||
wmImNoticeI.setGoodsWeight(String.valueOf(Double.parseDouble(mvgoods.getZhlKg())*Double.parseDouble(wmImNoticeI.getGoodsCount())));
|
||||
// wmImNoticeI.setGoodsUnit(mdgoods.getShlDanWei());
|
||||
|
||||
} catch (Exception e) {
|
||||
|
@ -195,7 +195,7 @@ public class WmImNoticeHServiceImpl extends CommonServiceImpl implements WmImNot
|
|||
wmImNoticeI.setBaseUnit(mvgoods.getBaseunit());
|
||||
try {
|
||||
if(!mvgoods.getBaseunit().equals(mvgoods.getShlDanWei())){
|
||||
wmImNoticeI.setBaseGoodscount(String.valueOf(Long.parseLong(mvgoods.getChlShl())*Long.parseLong(wmImNoticeI.getGoodsCount())));
|
||||
wmImNoticeI.setBaseGoodscount(String.valueOf(Double.parseDouble(mvgoods.getChlShl())*Double.parseDouble(wmImNoticeI.getGoodsCount())));
|
||||
}else{
|
||||
wmImNoticeI.setBaseGoodscount(wmImNoticeI.getGoodsCount());
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ public class WmImNoticeHServiceImpl extends CommonServiceImpl implements WmImNot
|
|||
|
||||
// wmImNoticeI.setGoodsFvol(String.valueOf(Long.parseLong(mdgoods.getTiJiCm())*Long.parseLong(wmImNoticeI.getGoodsCount())));
|
||||
try {
|
||||
wmImNoticeI.setGoodsWeight(String.valueOf(Double.parseDouble(mvgoods.getZhlKg())*Long.parseLong(wmImNoticeI.getGoodsCount())));
|
||||
wmImNoticeI.setGoodsWeight(String.valueOf(Double.parseDouble(mvgoods.getZhlKg())*Double.parseDouble(wmImNoticeI.getGoodsCount())));
|
||||
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
|
@ -215,7 +215,7 @@ public class WmImNoticeHServiceImpl extends CommonServiceImpl implements WmImNot
|
|||
// TODO: handle exception
|
||||
}
|
||||
try {
|
||||
wmImNoticeI.setGoodsFvol(String.valueOf(Double.parseDouble(mvgoods.getTiJiCm())*Long.parseLong(wmImNoticeI.getGoodsCount())));
|
||||
wmImNoticeI.setGoodsFvol(String.valueOf(Double.parseDouble(mvgoods.getTiJiCm())*Double.parseDouble(wmImNoticeI.getGoodsCount())));
|
||||
// wmImNoticeI.setGoodsWeight(String.valueOf(Long.parseLong(mdgoods.getZhlKg())*Long.parseLong(wmImNoticeI.getGoodsCount())));
|
||||
// wmImNoticeI.setGoodsUnit(mdgoods.getShlDanWei());
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -50,7 +50,7 @@ public class WmOmNoticeHServiceImpl extends CommonServiceImpl implements WmOmNot
|
|||
wmOmNoticeI.setBaseUnit(mvgoods.getBaseunit());
|
||||
wmOmNoticeI.setGoodsUnit(mvgoods.getShlDanWei());
|
||||
if(!mvgoods.getBaseunit().equals(mvgoods.getShlDanWei())){
|
||||
wmOmNoticeI.setBaseGoodscount(String.valueOf(Long.parseLong(mvgoods.getChlShl())*Long.parseLong(wmOmNoticeI.getGoodsQua())));
|
||||
wmOmNoticeI.setBaseGoodscount(String.valueOf(Double.parseDouble(mvgoods.getChlShl())*Double.parseDouble(wmOmNoticeI.getGoodsQua())));
|
||||
}else{
|
||||
wmOmNoticeI.setBaseGoodscount(wmOmNoticeI.getGoodsQua());
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ public class WmOmNoticeHServiceImpl extends CommonServiceImpl implements WmOmNot
|
|||
oldE.setGoodsUnit(mvgoods.getShlDanWei());
|
||||
oldE.setBaseUnit(mvgoods.getBaseunit());
|
||||
if(!mvgoods.getBaseunit().equals(mvgoods.getShlDanWei())){
|
||||
oldE.setBaseGoodscount(String.valueOf(Long.parseLong(mvgoods.getChlShl())*Long.parseLong(oldE.getGoodsQua())));
|
||||
oldE.setBaseGoodscount(String.valueOf(Double.parseDouble(mvgoods.getChlShl())*Double.parseDouble(oldE.getGoodsQua())));
|
||||
}else{
|
||||
oldE.setBaseGoodscount(oldE.getGoodsQua());
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ public class WmOmNoticeHServiceImpl extends CommonServiceImpl implements WmOmNot
|
|||
wmOmNoticeI.setGoodsUnit(mvgoods.getShlDanWei());
|
||||
wmOmNoticeI.setBaseUnit(mvgoods.getBaseunit());
|
||||
if(!mvgoods.getBaseunit().equals(mvgoods.getShlDanWei())){
|
||||
wmOmNoticeI.setBaseGoodscount(String.valueOf(Long.parseLong(mvgoods.getChlShl())*Long.parseLong(wmOmNoticeI.getGoodsQua())));
|
||||
wmOmNoticeI.setBaseGoodscount(String.valueOf(Double.parseDouble(mvgoods.getChlShl())*Double.parseDouble(wmOmNoticeI.getGoodsQua())));
|
||||
}else{
|
||||
wmOmNoticeI.setBaseGoodscount(wmOmNoticeI.getGoodsQua());
|
||||
}
|
||||
|
|
|
@ -323,7 +323,7 @@ public class wmUtil {
|
|||
|
||||
List<Map<String, Object>> result = systemService.findForJdbc(tsql, binid, tinid, goods, prodate);
|
||||
if (result.size() > 0) {
|
||||
if (Long.parseLong(result.get(0).get("goods_qua").toString()) >= Long.parseLong(basecount)) {
|
||||
if (Double.parseDouble(result.get(0).get("goods_qua").toString()) >= Double.parseDouble(basecount)) {
|
||||
flag = true;
|
||||
}
|
||||
|
||||
|
@ -388,7 +388,7 @@ public class wmUtil {
|
|||
|
||||
List<Map<String, Object>> result = systemService.findForJdbc(tsql, binid, tinid, goods, prodate,cuscode);
|
||||
if (result.size() > 0) {
|
||||
if (Long.parseLong(result.get(0).get("goods_qua").toString()) >= Long.parseLong(basecount)) {
|
||||
if (Double.parseDouble(result.get(0).get("goods_qua").toString()) >= Double.parseDouble(basecount)) {
|
||||
flag = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -60,8 +60,7 @@ public class SmsSendTask {
|
|||
hql = "from WmImNoticeIEntity t where t.binPre<>? ";
|
||||
WmInNoticeIlist = systemService.findHql(hql, "Y" );
|
||||
for (WmImNoticeIEntity wmImNoticeIEntity : WmInNoticeIlist) {
|
||||
if (Long.parseLong(wmImNoticeIEntity.getGoodsCount()) <= Long
|
||||
.parseLong(wmImNoticeIEntity.getGoodsQmCount())) {
|
||||
if (Double.parseDouble(wmImNoticeIEntity.getGoodsCount()) <= Double.parseDouble(wmImNoticeIEntity.getGoodsQmCount())) {
|
||||
wmImNoticeIEntity.setBinPre("Y");
|
||||
systemService.saveOrUpdate(wmImNoticeIEntity);
|
||||
}
|
||||
|
@ -134,16 +133,15 @@ public class SmsSendTask {
|
|||
wmInQmIEntity.setBaseUnit(mvgoods.getBaseunit());
|
||||
if (!mvgoods.getBaseunit().equals(mvgoods.getShlDanWei())) {
|
||||
try {
|
||||
wmInQmIEntity.setBaseGoodscount(String.valueOf(Long
|
||||
.parseLong(mvgoods.getChlShl())
|
||||
* Long.parseLong(wmInQmIEntity.getQmOkQuat())));
|
||||
wmInQmIEntity.setBaseGoodscount(String.valueOf(Double.parseDouble(mvgoods.getChlShl())
|
||||
* Double.parseDouble(wmInQmIEntity.getQmOkQuat())));
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
||||
try {
|
||||
wmInQmIEntity.setTinZhl(String.valueOf(Double.parseDouble(mvgoods
|
||||
.getZhlKg()) * Long.parseLong(wmInQmIEntity.getQmOkQuat())));
|
||||
.getZhlKg()) * Double.parseDouble(wmInQmIEntity.getQmOkQuat())));
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
@ -154,7 +152,7 @@ public class SmsSendTask {
|
|||
try {
|
||||
wmInQmIEntity.setTinZhl(String.valueOf(Double.parseDouble(mvgoods
|
||||
.getZhlKg())
|
||||
* Long.parseLong(wmInQmIEntity.getQmOkQuat())));
|
||||
* Double.parseDouble(wmInQmIEntity.getQmOkQuat())));
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
@ -190,9 +188,9 @@ public class SmsSendTask {
|
|||
|
||||
if (!mvgoods.getBaseunit().equals(mvgoods.getShlDanWei())) {
|
||||
try {
|
||||
wmToUpGoodsEntity.setBaseGoodscount(String.valueOf(Long
|
||||
.parseLong(mvgoods.getChlShl())
|
||||
* Long.parseLong(wmToUpGoodsEntity.getGoodsQua())));
|
||||
wmToUpGoodsEntity.setBaseGoodscount(String.valueOf(Double
|
||||
.parseDouble(mvgoods.getChlShl())
|
||||
* Double.parseDouble(wmToUpGoodsEntity.getGoodsQua())));
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
@ -371,9 +369,9 @@ public class SmsSendTask {
|
|||
}
|
||||
}
|
||||
try {
|
||||
long omcount = 0;
|
||||
long omcountok = 0;
|
||||
long omcountwq = 0;
|
||||
double omcount = 0.00;
|
||||
double omcountok = 0.00;
|
||||
double omcountwq = 0.00;
|
||||
List<WmOmQmIEntity> WmOmQmIlist = new ArrayList<WmOmQmIEntity>();
|
||||
hql = "from WmOmQmIEntity t where t.iomNoticeItem = ? ";
|
||||
WmOmQmIlist = systemService.findHql(hql,
|
||||
|
@ -381,13 +379,13 @@ public class SmsSendTask {
|
|||
for (WmOmQmIEntity wmOmQmIEntity : WmOmQmIlist) {
|
||||
try {
|
||||
omcountok = omcountok
|
||||
+ Long.parseLong(wmOmQmIEntity.getBaseGoodscount());
|
||||
+ Double.parseDouble(wmOmQmIEntity.getBaseGoodscount());
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
omcount = Long.parseLong(wmOmNoticeIEntity.getBaseGoodscount());// 总出货数量
|
||||
omcount = Double.parseDouble(wmOmNoticeIEntity.getBaseGoodscount());// 总出货数量
|
||||
omcountwq = omcount - omcountok;// 未清基本数量
|
||||
if (omcountwq > 0) {// 如果数量大于0
|
||||
WmOmQmIEntity wmOmQmIEntity = new WmOmQmIEntity();
|
||||
|
@ -502,7 +500,7 @@ public class SmsSendTask {
|
|||
if (resultz != null && resultz.size() > 0) {
|
||||
for (int i = 0; i < resultz.size(); i++) {
|
||||
try {
|
||||
Long bin_qua = Long.valueOf(resultz.get(i)
|
||||
Double bin_qua = Double.parseDouble(resultz.get(i)
|
||||
.get("goods_qua").toString());
|
||||
if (omcountwq >= bin_qua && omcountwq > 0) {
|
||||
wmOmQmIEntity.setBinId(resultz.get(i)
|
||||
|
@ -530,16 +528,16 @@ public class SmsSendTask {
|
|||
if (wmOmNoticeIEntity.getGoodsUnit()
|
||||
.equals(wmOmNoticeIEntity
|
||||
.getBaseUnit())) {
|
||||
wmOmQmIEntity.setQmOkQuat(Long.toString(bin_qua));
|
||||
wmOmQmIEntity.setQmOkQuat(Double.toString(bin_qua));
|
||||
try {
|
||||
wmOmQmIEntity.setTinTj(String.valueOf(Double.parseDouble(mvgoods
|
||||
.getTiJiCm()) / Double.parseDouble(mvgoods
|
||||
.getChlShl())
|
||||
* Long.parseLong(wmOmQmIEntity.getQmOkQuat())));
|
||||
* Double.parseDouble(wmOmQmIEntity.getQmOkQuat())));
|
||||
wmOmQmIEntity.setTinZhl(String.valueOf(Double.parseDouble(mvgoods
|
||||
.getZhlKg()) / Double.parseDouble(mvgoods
|
||||
.getChlShl())
|
||||
* Long.parseLong(wmOmQmIEntity.getQmOkQuat())));
|
||||
* Double.parseDouble(wmOmQmIEntity.getQmOkQuat())));
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
@ -547,11 +545,11 @@ public class SmsSendTask {
|
|||
try {
|
||||
wmOmQmIEntity.setTinTj(String.valueOf(Double.parseDouble(mvgoods
|
||||
.getTiJiCm())
|
||||
* Long.parseLong(wmOmQmIEntity.getQmOkQuat()) / Long.parseLong(mvgoods
|
||||
* Double.parseDouble(wmOmQmIEntity.getQmOkQuat()) / Double.parseDouble(mvgoods
|
||||
.getChlShl())));
|
||||
wmOmQmIEntity.setTinZhl(String.valueOf(Double.parseDouble(mvgoods
|
||||
.getZhlKg())
|
||||
* Long.parseLong(wmOmQmIEntity.getQmOkQuat()) / Long.parseLong(mvgoods
|
||||
* Double.parseDouble(wmOmQmIEntity.getQmOkQuat()) / Double.parseDouble(mvgoods
|
||||
.getChlShl())));
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
|
@ -559,7 +557,7 @@ public class SmsSendTask {
|
|||
try {
|
||||
|
||||
wmOmQmIEntity
|
||||
.setQmOkQuat(Long.toString(bin_qua));
|
||||
.setQmOkQuat(Double.toString(bin_qua));
|
||||
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
|
@ -579,7 +577,7 @@ public class SmsSendTask {
|
|||
if (result != null && result.size() > 0) {
|
||||
for (int i = 0; i < result.size(); i++) {
|
||||
try {
|
||||
Long bin_qua = Long.valueOf(result.get(i)
|
||||
double bin_qua = Double.valueOf(result.get(i)
|
||||
.get("goods_qua").toString());
|
||||
if (bin_qua > 0 && omcountwq > 0) {
|
||||
if (omcountwq > bin_qua) {
|
||||
|
@ -603,16 +601,16 @@ public class SmsSendTask {
|
|||
if (wmOmNoticeIEntity.getGoodsUnit()
|
||||
.equals(wmOmNoticeIEntity
|
||||
.getBaseUnit())) {
|
||||
wmOmQmIEntity.setQmOkQuat(Long.toString(bin_qua));
|
||||
wmOmQmIEntity.setQmOkQuat(Double.toString(bin_qua));
|
||||
try {
|
||||
wmOmQmIEntity.setTinTj(String.valueOf(Double.parseDouble(mvgoods
|
||||
.getTiJiCm()) / Double.parseDouble(mvgoods
|
||||
.getChlShl())
|
||||
* Long.parseLong(wmOmQmIEntity.getQmOkQuat())));
|
||||
* Double.parseDouble(wmOmQmIEntity.getQmOkQuat())));
|
||||
wmOmQmIEntity.setTinZhl(String.valueOf(Double.parseDouble(mvgoods
|
||||
.getZhlKg()) / Double.parseDouble(mvgoods
|
||||
.getChlShl())
|
||||
* Long.parseLong(wmOmQmIEntity.getQmOkQuat())));
|
||||
* Double.parseDouble(wmOmQmIEntity.getQmOkQuat())));
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
@ -621,11 +619,11 @@ public class SmsSendTask {
|
|||
try {
|
||||
wmOmQmIEntity.setTinTj(String.valueOf(Double.parseDouble(mvgoods
|
||||
.getTiJiCm())
|
||||
* Long.parseLong(wmOmQmIEntity.getQmOkQuat()) / Long.parseLong(mvgoods
|
||||
* Double.parseDouble(wmOmQmIEntity.getQmOkQuat()) / Double.parseDouble(mvgoods
|
||||
.getChlShl())));
|
||||
wmOmQmIEntity.setTinZhl(String.valueOf(Double.parseDouble(mvgoods
|
||||
.getZhlKg())
|
||||
* Long.parseLong(wmOmQmIEntity.getQmOkQuat()) / Long.parseLong(mvgoods
|
||||
* Double.parseDouble(wmOmQmIEntity.getQmOkQuat()) / Double.parseDouble(mvgoods
|
||||
.getChlShl())));
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
|
@ -633,7 +631,7 @@ public class SmsSendTask {
|
|||
try {
|
||||
|
||||
wmOmQmIEntity
|
||||
.setQmOkQuat(Long.toString(bin_qua
|
||||
.setQmOkQuat(Double.toString(bin_qua
|
||||
));
|
||||
|
||||
} catch (Exception e) {
|
||||
|
@ -648,7 +646,7 @@ public class SmsSendTask {
|
|||
.get("bin_id").toString());
|
||||
wmOmQmIEntity.setBaseUnit(result.get(i)
|
||||
.get("base_unit").toString());
|
||||
wmOmQmIEntity.setBaseGoodscount(Long
|
||||
wmOmQmIEntity.setBaseGoodscount(Double
|
||||
.toString(omcountwq));
|
||||
wmOmQmIEntity.setProData(result.get(i)
|
||||
.get("goods_pro_data").toString());
|
||||
|
@ -659,16 +657,16 @@ public class SmsSendTask {
|
|||
if (wmOmNoticeIEntity.getGoodsUnit()
|
||||
.equals(wmOmNoticeIEntity
|
||||
.getBaseUnit())) {
|
||||
wmOmQmIEntity.setQmOkQuat(Long.toString(omcountwq));
|
||||
wmOmQmIEntity.setQmOkQuat(Double.toString(omcountwq));
|
||||
try {
|
||||
wmOmQmIEntity.setTinTj(String.valueOf(Double.parseDouble(mvgoods
|
||||
.getTiJiCm()) / Double.parseDouble(mvgoods
|
||||
.getChlShl())
|
||||
* Long.parseLong(wmOmQmIEntity.getQmOkQuat())));
|
||||
* Double.parseDouble(wmOmQmIEntity.getQmOkQuat())));
|
||||
wmOmQmIEntity.setTinZhl(String.valueOf(Double.parseDouble(mvgoods
|
||||
.getZhlKg()) / Double.parseDouble(mvgoods
|
||||
.getChlShl())
|
||||
* Long.parseLong(wmOmQmIEntity.getQmOkQuat())));
|
||||
* Double.parseDouble(wmOmQmIEntity.getQmOkQuat())));
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
@ -678,11 +676,11 @@ public class SmsSendTask {
|
|||
try {
|
||||
wmOmQmIEntity.setTinTj(String.valueOf(Double.parseDouble(mvgoods
|
||||
.getTiJiCm())
|
||||
* omcountwq / Long.parseLong(mvgoods
|
||||
* omcountwq / Double.parseDouble(mvgoods
|
||||
.getChlShl())));
|
||||
wmOmQmIEntity.setTinZhl(String.valueOf(Double.parseDouble(mvgoods
|
||||
.getZhlKg())
|
||||
* omcountwq / Long.parseLong(mvgoods
|
||||
* omcountwq / Double.parseDouble(mvgoods
|
||||
.getChlShl())));
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
|
@ -692,7 +690,7 @@ public class SmsSendTask {
|
|||
try {
|
||||
|
||||
wmOmQmIEntity
|
||||
.setQmOkQuat(Long.toString(omcountwq));
|
||||
.setQmOkQuat(Double.toString(omcountwq));
|
||||
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
|
|
Loading…
Reference in New Issue