Browse Source

7/19

master
wangpengfei 11 months ago
parent
commit
ac29c72bf2
  1. 2
      src/main/java/com/yxt/goods/biz/goodsbrandinfo/GoodsBrandInfoMapper.xml
  2. 5
      src/main/java/com/yxt/goods/biz/goodsbrandinfo/GoodsBrandInfoService.java
  3. 2
      src/main/java/com/yxt/goods/biz/goodsmanufacturer/GoodsManufacturerMapper.xml
  4. 5
      src/main/java/com/yxt/goods/biz/goodsmanufacturer/GoodsManufacturerService.java
  5. 14
      src/main/java/com/yxt/goods/biz/goodsspu/GoodsSpuService.java
  6. 2
      src/main/java/com/yxt/goods/biz/goodstype/GoodsTypeMapper.xml
  7. 14
      src/main/java/com/yxt/goods/biz/goodstype/GoodsTypeService.java
  8. 2
      src/main/java/com/yxt/goods/biz/goodsunit/GoodsUnitMapper.xml
  9. 5
      src/main/java/com/yxt/goods/biz/goodsunit/GoodsUnitService.java

2
src/main/java/com/yxt/goods/biz/goodsbrandinfo/GoodsBrandInfoMapper.xml

@ -19,7 +19,7 @@
from goods_brand_info a from goods_brand_info a
LEFT JOIN ss_user.sys_organization as s ON a.useOrgSid = s.sid LEFT JOIN ss_user.sys_organization as s ON a.useOrgSid = s.sid
<where> <where>
s.orgSidPath like #{orgPath} and a.isDelete !='1' s.orgSidPath like concat('%',#{orgPath},'%') and a.isDelete !='1'
</where> </where>
</select> </select>
<update id="updateBySidIsDelete"> <update id="updateBySidIsDelete">

5
src/main/java/com/yxt/goods/biz/goodsbrandinfo/GoodsBrandInfoService.java

@ -105,8 +105,8 @@ public class GoodsBrandInfoService extends MybatisBaseService<GoodsBrandInfoMapp
// wmsGoodsBrand.setBigPic(path); // wmsGoodsBrand.setBigPic(path);
// } // }
wmsGoodsBrand.setCreateBySid(dto.getUserSid()); wmsGoodsBrand.setCreateBySid(dto.getUserSid());
wmsGoodsBrand.setCreateOrgSid(dto.getOrgPath()); wmsGoodsBrand.setCreateOrgSid(dto.getUseOrgSid());
wmsGoodsBrand.setUseOrgSid(dto.getOrgPath()); // wmsGoodsBrand.setUseOrgSid(dto.getOrgPath());
baseMapper.insert(wmsGoodsBrand); baseMapper.insert(wmsGoodsBrand);
} }
return rb.success().setMsg("成功"); return rb.success().setMsg("成功");
@ -118,7 +118,6 @@ public class GoodsBrandInfoService extends MybatisBaseService<GoodsBrandInfoMapp
GoodsBrandInfo wmsGoodsBrand = fetchBySid(sid); GoodsBrandInfo wmsGoodsBrand = fetchBySid(sid);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
BeanUtil.copyProperties(wmsGoodsBrand, vo); BeanUtil.copyProperties(wmsGoodsBrand, vo);
vo.setOrgPath(vo.getUseOrgSid());
return rb.success().setData(vo); return rb.success().setData(vo);
} }

2
src/main/java/com/yxt/goods/biz/goodsmanufacturer/GoodsManufacturerMapper.xml

@ -19,7 +19,7 @@
from goods_manufacturer a from goods_manufacturer a
LEFT JOIN ss_user.sys_organization as s ON a.useOrgSid = s.sid LEFT JOIN ss_user.sys_organization as s ON a.useOrgSid = s.sid
<where> <where>
s.orgSidPath like #{orgPath} and a.isDelete !='1' s.orgSidPath like concat('%',#{orgPath},'%') and a.isDelete !='1'
</where> </where>
</select> </select>
<select id="getAllTypeByUseOrgSid" resultType="com.yxt.goods.biz.goodsmanufacturer.GoodsManufacturerVo"> <select id="getAllTypeByUseOrgSid" resultType="com.yxt.goods.biz.goodsmanufacturer.GoodsManufacturerVo">

5
src/main/java/com/yxt/goods/biz/goodsmanufacturer/GoodsManufacturerService.java

@ -96,8 +96,8 @@ public class GoodsManufacturerService extends MybatisBaseService<GoodsManufactur
// lpkGoods.setPicUrl(path); // lpkGoods.setPicUrl(path);
// } // }
wmsManufacturer.setCreateBySid(dto.getUserSid()); wmsManufacturer.setCreateBySid(dto.getUserSid());
wmsManufacturer.setCreateOrgSid(dto.getOrgPath()); wmsManufacturer.setCreateOrgSid(dto.getUseOrgSid());
wmsManufacturer.setUseOrgSid(dto.getOrgPath()); // wmsManufacturer.setUseOrgSid(dto.getOrgPath());
baseMapper.insert(wmsManufacturer); baseMapper.insert(wmsManufacturer);
} }
return rb.success().setMsg("成功"); return rb.success().setMsg("成功");
@ -115,7 +115,6 @@ public class GoodsManufacturerService extends MybatisBaseService<GoodsManufactur
// } // }
// vo.setCreateTime(sdf.format(lpkGoods.getCreateTime())); // vo.setCreateTime(sdf.format(lpkGoods.getCreateTime()));
} }
vo.setOrgPath(vo.getUseOrgSid());
return rb.success().setData(vo); return rb.success().setData(vo);
} }

14
src/main/java/com/yxt/goods/biz/goodsspu/GoodsSpuService.java

@ -130,6 +130,15 @@ public class GoodsSpuService extends MybatisBaseService<GoodsSpuMapper, GoodsSpu
if(StringUtils.isBlank(dto.getIsListed())){ if(StringUtils.isBlank(dto.getIsListed())){
dto.setIsListed("1"); dto.setIsListed("1");
} }
if (StringUtils.isBlank(dto.getTaxRate())){
dto.setTaxRate("0");
}
if(StringUtils.isBlank(dto.getShelfLife())){
dto.setShelfLife("0");
}
if(StringUtils.isBlank(dto.getSortNo())){
dto.setSortNo("0");
}
if (spun != null) { if (spun != null) {
if (!spun.getSid().equals(dto.getSid())) { if (!spun.getSid().equals(dto.getSid())) {
return rb.setMsg("商品编码重复"); return rb.setMsg("商品编码重复");
@ -161,8 +170,8 @@ public class GoodsSpuService extends MybatisBaseService<GoodsSpuMapper, GoodsSpu
wmsGoods.setCreateTime(new DateTime()); wmsGoods.setCreateTime(new DateTime());
wmsGoods.setGoodsPY(PinYinUtils.sx(wmsGoods.getGoodsName()));; wmsGoods.setGoodsPY(PinYinUtils.sx(wmsGoods.getGoodsName()));;
wmsGoods.setCreateBySid(dto.getUserSid()); wmsGoods.setCreateBySid(dto.getUserSid());
wmsGoods.setCreateOrgSid(dto.getOrgPath()); wmsGoods.setCreateOrgSid(dto.getUseOrgSid());
wmsGoods.setUseOrgSid(dto.getOrgPath()); // wmsGoods.setUseOrgSid(dto.getOrgPath());
baseMapper.insert(wmsGoods); baseMapper.insert(wmsGoods);
//spu详情 //spu详情
dto.getBaseGoodsSpuDetail().setGoodSpuSid(wmsGoods.getSid()); dto.getBaseGoodsSpuDetail().setGoodSpuSid(wmsGoods.getSid());
@ -215,7 +224,6 @@ public class GoodsSpuService extends MybatisBaseService<GoodsSpuMapper, GoodsSpu
goodsSkuVo.setBaseGoodsSkuExtend(vo2); goodsSkuVo.setBaseGoodsSkuExtend(vo2);
} }
vo.setBaseGoodsSkus(vos); vo.setBaseGoodsSkus(vos);
vo.setOrgPath(vo.getUseOrgSid());
return rb.success().setData(vo); return rb.success().setData(vo);
} }

2
src/main/java/com/yxt/goods/biz/goodstype/GoodsTypeMapper.xml

@ -19,7 +19,7 @@
from goods_type a from goods_type a
LEFT JOIN ss_user.sys_organization as s ON a.useOrgSid = s.sid LEFT JOIN ss_user.sys_organization as s ON a.useOrgSid = s.sid
<where> <where>
s.orgSidPath like #{orgPath} and a.isDelete !='1' s.orgSidPath like concat('%',#{orgPath},'%') and a.isDelete !='1'
</where> </where>
</select> </select>
<update id="updateBySidIsDelete"> <update id="updateBySidIsDelete">

14
src/main/java/com/yxt/goods/biz/goodstype/GoodsTypeService.java

@ -98,6 +98,15 @@ public class GoodsTypeService extends MybatisBaseService<GoodsTypeMapper, GoodsT
ResultBean rb = ResultBean.fireFail(); ResultBean rb = ResultBean.fireFail();
String sid = ""; String sid = "";
dto.setPSid(dto.getSids()); dto.setPSid(dto.getSids());
if (StringUtils.isBlank(dto.getPercentageRate())){
dto.setPercentageRate("0");
}
if (StringUtils.isBlank(dto.getPercentageAmount())){
dto.setPercentageAmount("0");
}
if(StringUtils.isBlank(dto.getSortNo())){
dto.setSortNo("0");
}
if (StringUtils.isNotBlank(dto.getSid())) { if (StringUtils.isNotBlank(dto.getSid())) {
sid = dto.getSid(); sid = dto.getSid();
GoodsType wmsGoodsType = fetchBySid(dto.getSid()); GoodsType wmsGoodsType = fetchBySid(dto.getSid());
@ -121,8 +130,8 @@ public class GoodsTypeService extends MybatisBaseService<GoodsTypeMapper, GoodsT
wmsGoods.setIsGoodsID("1"); wmsGoods.setIsGoodsID("1");
} }
wmsGoods.setCreateBySid(dto.getUserSid()); wmsGoods.setCreateBySid(dto.getUserSid());
wmsGoods.setCreateOrgSid(dto.getOrgPath()); wmsGoods.setCreateOrgSid(dto.getUseOrgSid());
wmsGoods.setUseOrgSid(dto.getOrgPath()); // wmsGoods.setUseOrgSid(dto.getOrgPath());
baseMapper.insert(wmsGoods); baseMapper.insert(wmsGoods);
} }
return rb.success().setMsg("成功"); return rb.success().setMsg("成功");
@ -145,7 +154,6 @@ public class GoodsTypeService extends MybatisBaseService<GoodsTypeMapper, GoodsT
} }
vo.setSids(wmsGoodsType.getPSid()); vo.setSids(wmsGoodsType.getPSid());
} }
vo.setOrgPath(vo.getUseOrgSid());
return rb.success().setData(vo); return rb.success().setData(vo);
} }

2
src/main/java/com/yxt/goods/biz/goodsunit/GoodsUnitMapper.xml

@ -19,7 +19,7 @@
from goods_unit a from goods_unit a
LEFT JOIN ss_user.sys_organization as s ON a.useOrgSid = s.sid LEFT JOIN ss_user.sys_organization as s ON a.useOrgSid = s.sid
<where> <where>
s.orgSidPath like #{orgPath} and a.isDelete !='1' s.orgSidPath like concat('%',#{orgPath},'%') and a.isDelete !='1'
</where> </where>
</select> </select>
<update id="updateBySidIsDelete"> <update id="updateBySidIsDelete">

5
src/main/java/com/yxt/goods/biz/goodsunit/GoodsUnitService.java

@ -94,8 +94,8 @@ public class GoodsUnitService extends MybatisBaseService<GoodsUnitMapper, GoodsU
// lpkGoods.setPicUrl(path); // lpkGoods.setPicUrl(path);
// } // }
wmsGoods.setCreateBySid(dto.getUserSid()); wmsGoods.setCreateBySid(dto.getUserSid());
wmsGoods.setCreateOrgSid(dto.getOrgPath()); wmsGoods.setCreateOrgSid(dto.getUseOrgSid());
wmsGoods.setUseOrgSid(dto.getOrgPath()); // wmsGoods.setUseOrgSid(dto.getOrgPath());
baseMapper.insert(wmsGoods); baseMapper.insert(wmsGoods);
} }
return rb.success().setMsg("成功"); return rb.success().setMsg("成功");
@ -116,7 +116,6 @@ public class GoodsUnitService extends MybatisBaseService<GoodsUnitMapper, GoodsU
// BaseGoodsUnit wmsGoodsType1 = fetchBySid(wmsGoodsType.getPSid()); // BaseGoodsUnit wmsGoodsType1 = fetchBySid(wmsGoodsType.getPSid());
// vo.setPName(wmsGoodsType1.getGoodsTypeName()); // vo.setPName(wmsGoodsType1.getGoodsTypeName());
} }
vo.setOrgPath(vo.getUseOrgSid());
return rb.success().setData(vo); return rb.success().setData(vo);
} }

Loading…
Cancel
Save