新增页面

This commit is contained in:
2025-08-29 10:16:48 +08:00
parent 05b89aba22
commit 17f6c8bdaa
10 changed files with 989 additions and 4 deletions
@@ -688,16 +688,16 @@ public class ProductService {
for (Product product : priceList) {
double carft_price = 0;
if (craftList.contains("压痕")) {
carft_price += Math.max(0.02 * product.getCount(), 10);
carft_price += Math.max(0.02 * product.getCount(), 10) * number;
}
if (craftList.contains("压点线")) {
carft_price += Math.max(0.02 * product.getCount(), 10);
carft_price += Math.max(0.02 * product.getCount(), 10) * number;
}
if (craftList.contains("圆角")) {
carft_price += Math.max(0.02 * product.getCount(), 10);
carft_price += Math.max(0.02 * product.getCount(), 10) * number;
}
//腰封的模切费单独计算
product.setPrice(Math.ceil((product.getPrice() + carft_price) * number));
product.setPrice(Math.ceil((product.getPrice() + carft_price)));
product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.3 * 0.86));
}
if (isMq) {
@@ -0,0 +1,58 @@
package lingtao.net.service;
import lingtao.net.bean.Msg;
import lingtao.net.bean.StandardMemo;
import lingtao.net.bean.SysUser;
import lingtao.net.bean.TipContent;
import lingtao.net.dao.StandardMemoMapper;
import lingtao.net.dao.TipContentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpSession;
import java.util.List;
@Service
public class TipContentService {
@Autowired
private TipContentMapper tipContentMapper;
public List<TipContent> getTipContents(TipContent tipContent) {
return tipContentMapper.getTipContents(tipContent);
}
public Msg addTipContent(TipContent tipContent, HttpSession session) {
SysUser user = (SysUser) session.getAttribute("USER_SESSION");
tipContent.setCreateBy(user.getRealname());
try {
tipContentMapper.addTipContent(tipContent);
return Msg.success();
} catch (Exception e) {
return Msg.fail();
}
}
public Msg updateTipContentById(TipContent tipContent, HttpSession session) {
SysUser user = (SysUser) session.getAttribute("USER_SESSION");
tipContent.setUpdateBy(user.getRealname());
try {
tipContentMapper.updateTipContentById(tipContent);
return Msg.success();
} catch (Exception e) {
return Msg.fail();
}
}
public Msg deleteTipContentById(Integer id) {
try {
tipContentMapper.deleteTipContentById(id);
return Msg.success();
} catch (Exception e) {
return Msg.fail();
}
}
}