luqingyang
2023-10-30 b82ed8cbcc9e262f2bce2a662f8ce0d8c59b5d70
consum-base/src/main/java/com/consum/base/service/BaseGoodsTemplateServiceImpl.java
@@ -7,6 +7,7 @@
import com.consum.model.po.BaseCategory;
import com.consum.model.po.BaseGoodsModels;
import com.consum.model.po.BaseGoodsTemplate;
import com.consum.model.po.S_dict_data;
import com.consum.model.vo.BaseGoodsTemplateVo;
import com.iplatform.model.po.S_user_core;
import com.walker.db.page.GenericPager;
@@ -72,6 +73,7 @@
        //根据分类id查询分类
        BaseCategory baseCategory = this.baseCategoryService.get(new BaseCategory(param.getCategoryId()));
        if (baseCategory != null) {
            baseGoodsTemplate.setCategoryName(baseCategory.getCategoryName());
            String classification = baseCategory.getClassification();
            //物品编码
            String goodsCode = codeGeneratorService.createGoodsTemplateCode(classification);
@@ -190,6 +192,10 @@
        //1.修改物品模板
        BaseGoodsTemplate baseGoodsTemplate = new BaseGoodsTemplate();
        BeanUtils.copyProperties(param, baseGoodsTemplate);
        BaseCategory baseCategory = this.baseCategoryService.get(new BaseCategory(param.getCategoryId()));
        if (baseCategory != null) {
            baseGoodsTemplate.setCategoryName(baseCategory.getCategoryName());
        }
        int flag1 = this.update(baseGoodsTemplate);
        //2.修改规格型号的单位
        List<BaseGoodsModels> modelsList = param.getModels();
@@ -266,4 +272,15 @@
        goodsTemplate.setDUserName(currentUser.getUser_name());
        return this.update(goodsTemplate);
    }
    /**
     * @Description  查询仓库类型(数据字典)
     * @Author 卢庆阳
     * @Date 2023/10/30
     * @return
     */
    public List<S_dict_data> queryClassificationCode() {
        StringBuilder sql = new StringBuilder("SELECT * FROM s_dict_data WHERE dict_type = 'CLASSIFICATION_CODE' order by dict_sort");
        return this.select(sql.toString(), new Object[]{}, new S_dict_data());
    }
}