| | |
| | | |
| | | |
| | | private String storeId; |
| | | private String communityId; |
| | | |
| | | public String getApplyOrderId() { |
| | | return applyOrderId; |
| | |
| | | public void setIsFixedName(String isFixedName) { |
| | | this.isFixedName = isFixedName; |
| | | } |
| | | |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 物品实体类 |
| | | * @ClassName FloorDto |
| | | * @Description 资源数据层封装 |
| | | * @Author wuxw |
| | |
| | | //是否是固定物品 |
| | | private String isFixed; |
| | | private String isFixedName; |
| | | |
| | | private String communityId; |
| | | |
| | | private List<ResourceStoreTimesDto> times; |
| | | |
| | |
| | | public void setResCodeLike(String resCodeLike) { |
| | | this.resCodeLike = resCodeLike; |
| | | } |
| | | |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | } |
| | |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | private String communityId; |
| | | |
| | | |
| | | public String getPrice() { |
| | | return price; |
| | |
| | | public void setResCodeLike(String resCodeLike) { |
| | | this.resCodeLike = resCodeLike; |
| | | } |
| | | |
| | | @Override |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | |
| | | @Override |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | } |
| | |
| | | private String isFixed; |
| | | private String isFixedName; |
| | | |
| | | private String communityId; |
| | | |
| | | public String getResId() { |
| | | return resId; |
| | | } |
| | |
| | | public void setIsFixedName(String isFixedName) { |
| | | this.isFixedName = isFixedName; |
| | | } |
| | | |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | } |
| | |
| | | private String timesId; |
| | | private String shId; |
| | | |
| | | private String communityId; |
| | | |
| | | public String getPrice() { |
| | | return price; |
| | | } |
| | |
| | | public void setShId(String shId) { |
| | | this.shId = shId; |
| | | } |
| | | |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | } |
| | |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and pa.store_id= #{storeId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and pa.community_id= #{communityId} |
| | | </if> |
| | | <if test="rssId !=null and rssId != ''"> |
| | | and rs.rss_id= #{rssId} |
| | | </if> |
| | |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and pa.store_id= #{storeId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and pa.community_id= #{communityId} |
| | | </if> |
| | | <if test="rssId !=null and rssId != ''"> |
| | | and rs.rss_id= #{rssId} |
| | | </if> |
| | |
| | | insert into resource_store(res_id, b_id, store_id, res_name, res_code, unit_code, remark, out_low_price, |
| | | out_high_price, show_mobile, description, |
| | | price, stock, create_time, sh_id, warning_stock, average_price, rss_id, rst_id, |
| | | mini_unit_code, mini_unit_stock, mini_stock, parent_rst_id, is_fixed) |
| | | mini_unit_code, mini_unit_stock, mini_stock, parent_rst_id, is_fixed,community_id) |
| | | values (#{resId}, #{bId}, #{storeId}, #{resName}, #{resCode}, #{unitCode}, #{remark}, #{outLowPrice}, |
| | | #{outHighPrice}, |
| | | #{showMobile}, #{description}, #{price}, #{stock}, #{createTime}, #{shId}, #{warningStock}, |
| | | #{averagePrice}, #{rssId}, #{rstId}, #{miniUnitCode}, #{miniUnitStock}, #{miniStock}, #{parentRstId}, |
| | | #{isFixed}) |
| | | #{isFixed},#{communityId}) |
| | | </insert> |
| | | |
| | | <!-- 查询资源信息(Business) add by wuxw 2018-07-03 --> |
| | |
| | | miniStock,t.mini_unit_stock,t.mini_unit_stock miniUnitStock,td.name unitCodeName,td1.name |
| | | miniUnitCodeName,t.parent_rst_id parentRstId,t.rst_id rstId,rst1.name parentRstName,rst.name |
| | | rstName, |
| | | t.is_fixed,t.is_fixed isFixed,td2.name isFixedName |
| | | t.is_fixed,t.is_fixed isFixed,td2.name isFixedName,t.community_id communityId |
| | | from resource_store t |
| | | left join resource_store_type rst on t.rst_id = rst.rst_id and rst.status_cd = '0' |
| | | left join resource_store_type rst1 on t.parent_rst_id = rst1.rst_id and rst1.status_cd = '0' |
| | |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="stock !=null and stock != ''"> |
| | | and t.stock= #{stock} |
| | |
| | | <if test="description !=null and description != ''"> |
| | | , t.description= #{description} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | , t.store_id= #{storeId} |
| | | </if> |
| | | |
| | | , t.stock= #{stock} |
| | | <if test="warningStock !=null and warningStock != ''"> |
| | | , t.warning_stock= #{warningStock} |
| | |
| | | </if> |
| | | <if test="resId !=null and resId != ''"> |
| | | and t.res_id= #{resId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | </update> |
| | | |
| | |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="stock !=null and stock != ''"> |
| | | and t.stock= #{stock} |
| | |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="stock !=null and stock != ''"> |
| | | and t.stock= #{stock} |
| | | </if> |
| | |
| | | <!-- 保存物品次数信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveResourceStoreTimesInfo" parameterType="Map"> |
| | | insert into resource_store_times( |
| | | price,apply_order_id,store_id,stock,res_code,times_id,sh_id |
| | | price,apply_order_id,store_id,stock,res_code,times_id,sh_id,community_id |
| | | ) values ( |
| | | #{price},#{applyOrderId},#{storeId},#{stock},#{resCode},#{timesId},#{shId} |
| | | #{price},#{applyOrderId},#{storeId},#{stock},#{resCode},#{timesId},#{shId},#{communityId} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | miniStock,rs.mini_unit_stock,rs.mini_unit_stock miniUnitStock,td.name unitCodeName,td1.name |
| | | miniUnitCodeName,rs.parent_rst_id parentRstId,rs.rst_id rstId,rst1.name parentRstName,rst.name |
| | | rstName, |
| | | rs.is_fixed,rs.is_fixed isFixed,td2.name isFixedName |
| | | rs.is_fixed,rs.is_fixed isFixed,td2.name isFixedName,t.community_id communityId |
| | | from resource_store_times t |
| | | inner join resource_store rs on t.res_code = rs.res_code and rs.status_cd = '0' and t.sh_id = rs.sh_id |
| | | left join resource_store_type rst on rs.rst_id = rst.rst_id and rst.status_cd = '0' |
| | |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="stock !=null and stock != ''"> |
| | | and t.stock= #{stock} |
| | |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="stock !=null and stock != ''"> |
| | | and t.stock= #{stock} |
| | | </if> |
| | |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="stock !=null and stock != ''"> |
| | | and t.stock= #{stock} |
| | | </if> |
| | |
| | | insert into resource_store(sh_id, description, remark, store_id, res_id, parent_rst_id, warning_stock, rss_id, |
| | | res_name, rst_id, out_low_price, price, mini_unit_stock, unit_code, res_code, |
| | | mini_unit_code, average_price, stock, out_high_price, show_mobile, is_fixed, |
| | | mini_stock) |
| | | mini_stock,community_id) |
| | | values (#{shId}, #{description}, #{remark}, #{storeId}, #{resId}, #{parentRstId}, #{warningStock}, #{rssId}, |
| | | #{resName}, #{rstId}, #{outLowPrice}, #{price}, #{miniUnitStock}, #{unitCode}, #{resCode}, |
| | | #{miniUnitCode}, #{averagePrice}, #{stock}, #{outHighPrice}, #{showMobile}, #{isFixed}, #{miniStock}) |
| | | #{miniUnitCode}, #{averagePrice}, #{stock}, #{outHighPrice}, #{showMobile}, #{isFixed}, #{miniStock},#{communityId}) |
| | | </insert> |
| | | |
| | | <!-- 查询物品信息信息 add by wuxw 2018-07-03 --> |
| | |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="resId !=null and resId != ''"> |
| | | and t.res_id= #{resId} |
| | |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | , t.store_id= #{storeId} |
| | | </if> |
| | | |
| | | <if test="parentRstId !=null and parentRstId != ''"> |
| | | , t.parent_rst_id= #{parentRstId} |
| | | </if> |
| | |
| | | <if test="resId !=null and resId != ''"> |
| | | and t.res_id= #{resId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | </update> |
| | | |
| | | <!-- 查询物品信息数量 add by wuxw 2018-07-03 --> |
| | |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="resId !=null and resId != ''"> |
| | | and t.res_id= #{resId} |
| | | </if> |
| | |
| | | tmpResourceStorePo.setResId(GenerateCodeFactory.getGeneratorId("11")); |
| | | tmpResourceStorePo.setStock(allocationStock + ""); |
| | | tmpResourceStorePo.setShId(tmpAllocationStorehouseDto.getShIdz()); |
| | | tmpResourceStorePo.setCommunityId(resourceStoreDtoZs.get(0).getCommunityId()); |
| | | resourceStoreV1InnerServiceSMOImpl.saveResourceStore(tmpResourceStorePo); |
| | | |
| | | // todo 添加 times |
| | |
| | | tmpResourceStoreTimesPo.setTimesId(GenerateCodeFactory.getGeneratorId("11")); |
| | | tmpResourceStoreTimesPo.setStock(allocationStock + ""); |
| | | tmpResourceStoreTimesPo.setShId(tmpAllocationStorehouseDto.getShIdz()); |
| | | tmpResourceStoreTimesPo.setCommunityId(resourceStoreDtoZs.get(0).getCommunityId()); |
| | | |
| | | resourceStoreTimesV1InnerServiceSMOImpl.saveResourceStoreTimes(tmpResourceStoreTimesPo); |
| | | return; |
| | |
| | | Assert.hasKeyAndValue(reqJson, "storeId", "必填,请填写商户信息"); |
| | | Assert.hasKeyAndValue(reqJson, "price", "必填,请填写物品价格"); |
| | | Assert.hasKeyAndValue(reqJson, "shId", "必填,请填写仓库"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "必填,请填写小区"); |
| | | |
| | | //获取最低收费标准 |
| | | double outLowPrice = Double.parseDouble(reqJson.getString("outLowPrice")); |
| | |
| | | if (flag < 1) { |
| | | throw new CmdException("保存数据失败"); |
| | | } |
| | | |
| | | // todo 保存至 物品 times表 |
| | | // ResourceStoreTimesPo resourceStoreTimesPo = new ResourceStoreTimesPo(); |
| | | // resourceStoreTimesPo.setApplyOrderId("-1"); |
| | | // resourceStoreTimesPo.setPrice(resourceStorePo.getPrice()); |
| | | // resourceStoreTimesPo.setStock(resourceStorePo.getStock()); |
| | | // resourceStoreTimesPo.setResCode(resourceStorePo.getResCode()); |
| | | // resourceStoreTimesPo.setStoreId(resourceStorePo.getStoreId()); |
| | | // resourceStoreTimesPo.setShId(resourceStorePo.getShId()); |
| | | // resourceStoreTimesV1InnerServiceSMOImpl.saveOrUpdateResourceStoreTimes(resourceStoreTimesPo); |
| | | |
| | | //todo 入库 |
| | | inStore(reqJson, userId, storeId, resourceStorePo); |
| | |
| | | resourceStoreTimesPo.setStoreId(resourceStorePo.getStoreId()); |
| | | resourceStoreTimesPo.setTimesId(GenerateCodeFactory.getGeneratorId("10")); |
| | | resourceStoreTimesPo.setShId(resourceStorePo.getShId()); |
| | | resourceStoreTimesPo.setCommunityId(reqJson.getString("communityId")); |
| | | |
| | | resourceStoreTimesV1InnerServiceSMOImpl.saveOrUpdateResourceStoreTimes(resourceStoreTimesPo); |
| | | |