@ -42,6 +42,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Collections;
import java.util.List;
@ -59,11 +60,12 @@ public class AppOtherOutApplyService {
ResultBean rb = ResultBean.fireFail();
WmsOtheroutApplyDetailsVo data = wmsOtherOutApplyFeign.fetchDetailsBySid(sid).getData();
AppOtheroutApplyDetailsVo appOtheroutApplyDetailsVo = new AppOtheroutApplyDetailsVo();
appOtheroutApplyDetailsVo.setProcInsId(data.getProcInstId());
BeanUtil.copyProperties(data,appOtheroutApplyDetailsVo);
List<AppOtheroutDetailDetailsVo> otheroutDetailList = appOtheroutApplyDetailsVo.getOtheroutDetailList();
for (AppOtheroutDetailDetailsVo appOtheroutDetailDetailsVo : otheroutDetailList) {
appOtheroutDetailDetailsVo.setWarehouseRackName(appOtheroutDetailDetailsVo.getWarehouseRackCode());
appOtheroutDetailDetailsVo.setAmount(appOtheroutDetailDetailsVo.getOutCount().multiply(appOtheroutDetailDetailsVo.getInCost()));
appOtheroutDetailDetailsVo.setAmount(appOtheroutDetailDetailsVo.getOutCount().multiply(appOtheroutDetailDetailsVo.getInCost()).setScale(2, BigDecimal.ROUND_HALF_UP));
}
return rb.success().setData(appOtheroutApplyDetailsVo);
@ -96,4 +96,8 @@ public interface WmsInventoryMapper extends BaseMapper<WmsInventory> {
String selByGoodsIdAndRackSid(@Param("goodsID") String goodsID,@Param("warehouseRackSid") String warehouseRackSid);
BigDecimal compute(String skuSid);
List<WmsInventory> selCJByDeptSidAndRackSid(@Param("deptSid") String deptSid,@Param("rackSids") List<String> rackSids);
List<WmsInventory> selCJByDeptSid(String deptSid);
@ -699,4 +699,28 @@
WHERE goodsSkuSid = #{skuSid}
AND COUNT> 0
</select>
<select id="selCJByDeptSidAndRackSid" resultType="com.yxt.wms.biz.inventory.wmsinventory.WmsInventory">
SELECT wi.*
FROM wms_inventory wi
LEFT JOIN wms_warehouse_info wwi
ON wi.`warehouseSid` = wwi.`sid`
WHERE wi.count > 0
AND wwi.useOrgSid = #{deptSid}
AND wwi.warehouseTypeKey = '03'
AND wi.warehouseRackSid in
<foreach item="rackSid" collection="rackSids" open="(" separator="," close=")">
#{rackSid}
</foreach>
<select id="selCJByDeptSid" resultType="com.yxt.wms.biz.inventory.wmsinventory.WmsInventory">
ON wi.warehouseSid = wwi.sid
</mapper>
@ -1194,11 +1194,19 @@ public class WmsInventoryService extends MybatisBaseService<WmsInventoryMapper,
public String selByGoodsIdAndRackSid(String goodsID, String warehouseRackSid) {
return baseMapper.selByGoodsIdAndRackSid(goodsID,warehouseRackSid);
return baseMapper.selByGoodsIdAndRackSid(goodsID, warehouseRackSid);
public BigDecimal compute(String skuSid) {
return baseMapper.compute(skuSid);
public List<WmsInventory> selCJByDeptSidAndRackSid(String deptSid, List<String> rackSids) {
return baseMapper.selCJByDeptSidAndRackSid(deptSid, rackSids);
public List<WmsInventory> selCJByDeptSid(String deptSid) {
return baseMapper.selCJByDeptSid(deptSid);
@ -324,6 +324,15 @@ public class WmsInventoryCheckbillService extends MybatisBaseService<WmsInventor
//查询本部门下,库存数量大0并且是旧件的库存
wmsInventories = wmsInventoryService.selJJByDeptSid(dto.getDeptSid());
}else if ("03".equals(dto.getWarehouseTypeKey())){//拆件
billNo = "CJPD" + sysOrganizationVo.getOrgCode() + date;
if ("1".equals(dto.getCheckTypeKey())) {
//查询本部门指定库位下,库存数量大0并且拆件的库存
wmsInventories = wmsInventoryService.selCJByDeptSidAndRackSid(dto.getDeptSid(), dto.getRackSids());
} else if ("2".equals(dto.getCheckTypeKey())) {
//查询本部门下,库存数量大0并且是拆件的库存
wmsInventories = wmsInventoryService.selCJByDeptSid(dto.getDeptSid());
String i = baseMapper.selectNum(billNo);
if (StringUtils.isNotBlank(i)) {
@ -504,6 +513,8 @@ public class WmsInventoryCheckbillService extends MybatisBaseService<WmsInventor
inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/" + "pdbg" + ".ftl");
}else if ("02".equals(wmsInventoryCheckbillReportDetailsVo.getWarehouseTypeKey())){
inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/" + "jjpdbg" + ".ftl");
}else if ("03".equals(wmsInventoryCheckbillReportDetailsVo.getWarehouseTypeKey())){
inputStream = this.getClass().getClassLoader().getResourceAsStream("ftl/" + "cjpdbg" + ".ftl");
//生成word文件名
String targetPath = docPdfComponent.getUploadTemplateUrl();