|
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.gree.mall.manager.bean.ExcelData;
|
|
|
import com.gree.mall.manager.bean.admin.AdminUserCom;
|
|
|
+import com.gree.mall.manager.bean.admin.AdminWebsitVO;
|
|
|
import com.gree.mall.manager.bean.goods.*;
|
|
|
import com.gree.mall.manager.commonmapper.CustomGoodsMapper;
|
|
|
import com.gree.mall.manager.commonmapper.GoodsCheckMapper;
|
|
@@ -23,7 +24,10 @@ import com.gree.mall.manager.logic.user.UserLogic;
|
|
|
import com.gree.mall.manager.plus.entity.*;
|
|
|
import com.gree.mall.manager.plus.service.*;
|
|
|
import com.gree.mall.manager.utils.DateUtils;
|
|
|
+import com.gree.mall.manager.utils.StringUtil;
|
|
|
import com.gree.mall.manager.utils.excel.ExcelUtils;
|
|
|
+import com.gree.mall.manager.zfire.bean.ZfireParamBean;
|
|
|
+import com.gree.mall.manager.zfire.util.FieldUtils;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang.StringEscapeUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -437,6 +441,19 @@ public class GoodsLogic {
|
|
|
}
|
|
|
goodsBean.setUpdateTime(new Date());
|
|
|
goodsBean.setCreateTime(creatDate);
|
|
|
+
|
|
|
+ if (StringUtil.isEmpty(goodsBean.getPutCompanyId())) {
|
|
|
+ goodsBean.setPutCompanyId(goodsBean.getPutCompanyId());
|
|
|
+ String[] split = StringUtils.split(goodsBean.getPutCompanyId(), ",");
|
|
|
+
|
|
|
+ String name ="";
|
|
|
+ for (String s : split) {
|
|
|
+ AdminCompanyWechat adminCompanyWechat = adminCompanyWechatService.getById(s);
|
|
|
+ name = name+adminCompanyWechat.getCompanyName()+",";
|
|
|
+ }
|
|
|
+
|
|
|
+ goodsBean.setPutCompanyName(name);
|
|
|
+ }
|
|
|
goodsService.save(goodsBean);
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(goodsBean.getGoodsSpecs())) {
|
|
@@ -470,9 +487,9 @@ public class GoodsLogic {
|
|
|
}
|
|
|
|
|
|
//查询物料信息
|
|
|
- if (Objects.nonNull(companyWechat) && StringUtils.isNotBlank(companyWechat.getJindCustomerNumber())) {
|
|
|
+ /* if (Objects.nonNull(companyWechat) && StringUtils.isNotBlank(companyWechat.getJindCustomerNumber())) {
|
|
|
fucaiLogic.getWuliao(goodsSpecList);
|
|
|
- }
|
|
|
+ }*/
|
|
|
//批量保存商品规格
|
|
|
if(CollectionUtils.isNotEmpty(goodsSpecList))
|
|
|
goodsSpecService.saveBatch(goodsSpecList);
|
|
@@ -599,9 +616,9 @@ public class GoodsLogic {
|
|
|
Collections.sort(goodsSpecList, (o1, o2) -> o1.getPrice().compareTo(o2.getPrice()));
|
|
|
|
|
|
//查询物料信息
|
|
|
- if (Objects.nonNull(companyWechat) && StringUtils.isNotBlank(companyWechat.getJindCustomerNumber())) {
|
|
|
+/* if (Objects.nonNull(companyWechat) && StringUtils.isNotBlank(companyWechat.getJindCustomerNumber())) {
|
|
|
fucaiLogic.getWuliao(goodsSpecList);
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
goodsBean.setGoodsPrice(goodsSpecList.get(0).getPrice());
|
|
|
}
|
|
@@ -1208,4 +1225,15 @@ public class GoodsLogic {
|
|
|
excelData.setRows(rows);
|
|
|
ExcelUtils.exportExcel(request, response, fileName, excelData, -1, null);
|
|
|
}
|
|
|
+
|
|
|
+ public IPage<GoodsVO> goodsList(Page page, ZfireParamBean zfireParam) {
|
|
|
+ //获取当前登录企业id
|
|
|
+ AdminUserCom adminUser = commonLogic.getAdminUser();
|
|
|
+
|
|
|
+ //1.组装查询条件
|
|
|
+ FieldUtils.supplyParam(zfireParam, GoodsVO.class,adminUser);
|
|
|
+
|
|
|
+ IPage<GoodsVO> goodsVOIPage = customGoodsMapper.goodsList(page, zfireParam);
|
|
|
+ return goodsVOIPage;
|
|
|
+ }
|
|
|
}
|