| | |
| | | package com.consum.base.service.impl; |
| | | |
| | | import cn.hutool.core.convert.Convert; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import com.consum.base.Constants; |
| | | import com.consum.base.core.CodeGeneratorService; |
| | | import com.consum.base.core.utils.IdUtil; |
| | |
| | | import com.consum.base.service.BaseCategoryService; |
| | | import com.consum.base.service.BaseGoodsModelsService; |
| | | import com.consum.base.service.BaseGoodsTemplateService; |
| | | import com.consum.model.po.*; |
| | | import com.consum.model.po.BaseCategory; |
| | | import com.consum.model.po.BaseGoodsModels; |
| | | import com.consum.model.po.BaseGoodsTemplate; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.consum.model.po.SDictData; |
| | | import com.consum.model.vo.BaseGoodsTemplateVo; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.DateUtils; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import cn.hutool.core.convert.Convert; |
| | | |
| | | /** |
| | | * @Description 物品模板 |
| | |
| | | //TODO 一级二级三级机构编号 |
| | | //当前机构的父级机构编号 |
| | | //机构层级 |
| | | if (currentUser != null) { |
| | | //机构编号 |
| | | baseGoodsTemplate.setAgencyId(Long.valueOf(currentUser.getTenantId())); |
| | | //机构名称 |
| | | baseGoodsTemplate.setAgencyName(currentUser.getTenantName()); |
| | | } |
| | | |
| | | //创建时间 |
| | | long createTime = DateUtils.getDateTimeNumber(System.currentTimeMillis()); |
| | | baseGoodsTemplate.setCreateDate(createTime); |
| | |
| | | * @return |
| | | */ |
| | | |
| | | private static String QUERY_GOODSINFO_BY_MODELID = "SELECT model.MODEL_NAME modelName,model.UNIT,temp.id goodsId, temp.GOODS_CODE goodsCode,temp.GOODS_NAME goodsName,temp.CLASSIFICATION classification,temp.CATEGORY_ID categoryId FROM BASE_GOODS_MODELS model LEFT JOIN BASE_GOODS_TEMPLATE temp ON model.GOODS_TEMPLATES_ID=temp.id WHERE 1=1 "; |
| | | private static String QUERY_GOODSINFO_BY_MODELID = |
| | | "SELECT model.MODEL_NAME modelName,model.UNIT,temp.id goodsId, temp.GOODS_CODE goodsCode,temp.GOODS_NAME goodsName,temp.CLASSIFICATION classification,temp.CATEGORY_ID categoryId FROM BASE_GOODS_MODELS model LEFT JOIN BASE_GOODS_TEMPLATE temp ON model.GOODS_TEMPLATES_ID=temp.id WHERE 1=1 "; |
| | | |
| | | @Override |
| | | public Map<String, Object> queryGoodsInfoByModelId(Long modelId) { |
| | | StringBuilder sqlStr = new StringBuilder(QUERY_GOODSINFO_BY_MODELID); |
| | |
| | | */ |
| | | @Override |
| | | public List<SDictData> queryClassificationCode() { |
| | | StringBuilder sql = new StringBuilder("SELECT * FROM s_dict_data WHERE dict_type = 'CLASSIFICATION_CODE' order by dict_sort"); |
| | | 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 SDictData()); |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<BaseGoodsTemplate> queryGoodsTemplateByCategoryId(Long agencyId, Long categoryId, Short states, String goodsName) { |
| | | public List<BaseGoodsTemplate> queryGoodsTemplateByCategoryId(Long agencyId, Long categoryId, Short states, |
| | | String goodsName) { |
| | | StringBuilder sql = new StringBuilder("SELECT * FROM base_goods_template WHERE 1=1 "); |
| | | Map<String, Object> params = new HashMap<>(); |
| | | if (agencyId != null) { |