Commit 60991619 by yukang

领料计算重量BUG

parent 2e1f5921
......@@ -32,6 +32,7 @@ import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
......@@ -154,6 +155,7 @@ public class ServiceHPKC002A extends ServiceEPBase {
* @param dbKc010Map
*/
private void saveData(List<Map> resultRows, Map<Long, HPKC010> dbKc010Map, String hpsc006Id) {
DecimalFormat decimalFormat = new DecimalFormat("#.000");
for (Map row : resultRows) {
BigDecimal applyAmount = MapUtils.getBigDecimal(row, "applyAmount");
String applyRemark = MapUtils.getString(row, "applyRemark");
......@@ -164,7 +166,7 @@ public class ServiceHPKC002A extends ServiceEPBase {
newKc002.setReqNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC002_NUMBER));
newKc002.setReceiptDate(DateUtils.shortDate());
newKc002.setAmount(applyAmount);
newKc002.setWeight(dbKc010.getUnitWeight().multiply(applyAmount).divide(new BigDecimal(1000)));
newKc002.setWeight(new BigDecimal(decimalFormat.format(dbKc010.getUnitWeight().multiply(applyAmount).divide(new BigDecimal(1000)))));
newKc002.setRemark(applyRemark);
newKc002.setKcId(kcId);
newKc002.setDeleteFlag(CommonConstant.YesNo.NO_0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment