|
@@ -1,15 +1,13 @@
|
|
|
package com.gqy.document.service.impl;
|
|
|
|
|
|
import com.gqy.common.utils.bean.BeanUtils;
|
|
|
-import com.gqy.document.domain.DcProduct;
|
|
|
-import com.gqy.document.domain.DcSpec;
|
|
|
-import com.gqy.document.domain.DcSystemProduct;
|
|
|
-import com.gqy.document.domain.DcWorkSystem;
|
|
|
+import com.gqy.document.domain.*;
|
|
|
import com.gqy.document.mapper.DcProductMapper;
|
|
|
import com.gqy.document.mapper.DcSpecMapper;
|
|
|
import com.gqy.document.mapper.DcSystemProductMapper;
|
|
|
import com.gqy.document.mapper.DcWorkSystemMapper;
|
|
|
import com.gqy.document.service.IDcProductService;
|
|
|
+import com.gqy.system.mapper.DcPsParamMapper;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -33,6 +31,13 @@ public class DcProductServiceImpl implements IDcProductService {
|
|
|
private DcSystemProductMapper dcSystemProductMapper;
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private DcSpecMapper dcSpecMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private DcPsParamMapper dcPsParamMapper;
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 查询所有参数名称
|
|
|
* @param params
|
|
@@ -83,13 +88,28 @@ public class DcProductServiceImpl implements IDcProductService {
|
|
|
|
|
|
// 规格管理
|
|
|
List<Map> specs = (List<Map>) params.get("specs");
|
|
|
- for (Map spec : specs) {
|
|
|
+ for (Map maps : specs) {
|
|
|
// 规格
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //保存规格信息表
|
|
|
DcSpec dcSpec = new DcSpec();
|
|
|
- //设置 产品id
|
|
|
dcSpec.setPs_p_id(dcpId);
|
|
|
- // 拷贝参数
|
|
|
- BeanUtils.mapToBean(spec, dcSpec);
|
|
|
+ BeanUtils.mapToBean(maps,dcSpec );
|
|
|
+ String ps_no = maps.get("ps_no").toString();
|
|
|
+ dcSpec.setPs_no(ps_no);
|
|
|
+ dcSpec.setPs_name(maps.get("ps_name").toString());
|
|
|
+ //dcSpec.setPs_category(maps.get("ps_category").toString());
|
|
|
+
|
|
|
+ dcSpecMapper.insertDcSpec(dcSpec);
|
|
|
+
|
|
|
+ //规格参数
|
|
|
+ DcPsParam dcPsParam = new DcPsParam();
|
|
|
+ BeanUtils.mapToBean(maps,dcPsParam );
|
|
|
+ dcPsParam.setPsp_mode(ps_no);
|
|
|
+
|
|
|
+ dcPsParamMapper.insertDcPsParam(dcPsParam);
|
|
|
|
|
|
|
|
|
|