|
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -72,7 +73,10 @@ public class ShowListController extends BaseController {
|
|
|
newShowList.setMdText(showList1.getMdText());
|
|
|
newShowList.setMdTotalAmount(number);
|
|
|
newShowList.setMdSingleWeight(showList1.getMdSingleWeight());
|
|
|
- newShowList.setMdTotalWeight(i/1000);
|
|
|
+ BigDecimal b = new BigDecimal(i);
|
|
|
+ BigDecimal a = new BigDecimal(1000);
|
|
|
+ BigDecimal divide = b.divide(a, 4, BigDecimal.ROUND_HALF_UP);
|
|
|
+ newShowList.setMdTotalWeight(Double.valueOf(divide.toString()));
|
|
|
newShowList.setBlockId(showList1.getBlockId());
|
|
|
returnList.add(newShowList);
|
|
|
}
|