cez 2022-07-09 10:16:19 +08:00
parent 9d65be25cc
commit c5a0111b92
1 changed files with 1094 additions and 1113 deletions

View File

@ -31,11 +31,9 @@ import com.zzjee.wm.entity.WmToMoveGoodsEntity;
import com.zzjee.wm.entity.WmToUpGoodsEntity;
/**
*
* @ClassName:SmsSendTask
* @Description: TODO
* @date 2014-11-13 5:06:34
*
*/
@Service("costTask")
public class CostTask {
@ -64,6 +62,7 @@ public class CostTask {
long times = end - start;
org.jeecgframework.core.util.LogUtil.info("总耗时" + times + "毫秒");
}
public void costcount(String datestr, String chongsuan, WmDayCostConfEntity t) {
// WmDayCostConfEntity t = new WmDayCostConfEntity();
String tsql = "select COST_SF from wm_day_cost_conf where to_days(cost_date) = to_days(?)";
@ -521,20 +520,15 @@ public class CostTask {
try {
jf_shp_lei = resulthq.get(i).get("jf_shp_lei").toString();
} catch (Exception e) {
e.printStackTrace();
}
if ("10".equals(jf_shp_lei)) {
// costcode = "5011";// 卸货费/计费吨
// costSlo = Double.parseDouble(resulthq.get(i).get("grcount").toString())/1000;
// countunit = "吨";
MdCusEntity mdc = systemService.findUniqueByProperty(MdCusEntity.class, "keHuBianMa", resulthq.get(i).get("cus_code").toString());
if (mdc.getKeHuZhuangTai().equals("20")) {
costcode = "5011";// 卸货费/吨
costSlo = Double.parseDouble(resulthq.get(i).get("grcount").toString()) / 1000;
countunit = "吨";
} else {
if (Double.parseDouble(resulthq.get(i).get("hiti").toString()) == Double.parseDouble(resulthq.get(i).get("qmcount").toString())) {
costcode = "5011";// 卸货费/吨
costSlo = Double.parseDouble(resulthq.get(i).get("grcount").toString()) / 1000;
@ -546,7 +540,6 @@ public class CostTask {
} else {
costSlo = Double.parseDouble(resulthq.get(i).get("qmcount").toString());
}
countunit = "箱";
}
@ -567,21 +560,14 @@ public class CostTask {
costSlo = Double.parseDouble(resulthq.get(i).get("qmcount").toString());
countunit = "箱";
}
costSl = costSlo.toString();
cuscode = resulthq.get(i).get("cus_code").toString();
//5010
tsql = " select cost_code , cost_jg, cost_sl , cost_zk , cost_bhs , cost_hs "
+ "from wm_cus_cost_h wch , wm_cus_cost_i wci where wch.id = wci.cus_cost_id and wci.cost_code = ? and wch.cus_code = ? and "
+ "(to_days(wch.begin_date) <= to_days(?) and to_days(wch.end_date) >= to_days(?)) limit 1";
List<Map<String, Object>> resultjg = systemService
.findForJdbc(tsql, costcode, cuscode, t.getCostDate(), t.getCostDate());
if (resultjg.size() > 0) {
cost_jg = Double.parseDouble((String) resultjg.get(0).get("cost_jg"));
cost_sl = Double.parseDouble((String) resultjg.get(0).get("cost_sl"));
cost_bhs = Double.parseDouble((String) resultjg.get(0).get("cost_bhs"));
@ -620,7 +606,6 @@ public class CostTask {
}//计算装车费
org.jeecgframework.core.util.LogUtil
.info("===================7出装车费成功===================");
//复冻处置费
// 60
tsql = "select mg.cf_wen_ceng, wi.cus_code, wi.im_notice_id, wi.goods_id,ceil(mg.jizhun_wendu) as jizhun_wendu, ceil(wi.rec_deg) as rec_deg,sum(wi.qm_ok_quat) as qmcount,(mg.zhl_kg) as zhl_kg, (sum(wi.qm_ok_quat) * mg.zhl_kg ) as grcount "
@ -654,13 +639,11 @@ public class CostTask {
+ "from wm_cus_cost_h wch , wm_cus_cost_i wci where wch.id = wci.cus_cost_id and wci.cost_code = ? and wch.cus_code = ? and "
+ "(to_days(wch.begin_date) <= to_days(?) and to_days(wch.end_date) >= to_days(?)) limit 1";
Double recdeg = 0.00;
try {
recdeg = Double.parseDouble(resulthq.get(i).get("rec_deg").toString()) - Double.parseDouble(resulthq.get(i).get("jizhun_wendu").toString());
} catch (Exception e) {
recdeg = 0 - Double.parseDouble(resulthq.get(i).get("jizhun_wendu").toString());
e.printStackTrace();
}
if (recdeg > 25) {
costcode = "308";//复冻处置费/吨 温差大于25
@ -671,8 +654,6 @@ public class CostTask {
} else {
continue;
}
List<Map<String, Object>> resultjg = systemService
.findForJdbc(tsql, costcode, cuscode, t.getCostDate(), t.getCostDate());
if (resultjg.size() > 0) {