Browse Source

Merge remote-tracking branch 'origin/master'

master
yunuo970428 1 week ago
parent
commit
ad4e274a54
  1. 1
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/index/AppIndexEnum.java
  2. 8
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/index/AppIndexService.java
  3. 26
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/fegin/wms/WmsInventoryCheckbillFeign.java
  4. 2
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/wms/inventorycheckbill/WmsInventoryCheckbillService.java
  5. 10
      yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryAllocatebillRest.java
  6. 13
      yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryCheckbillDetailRest.java
  7. 13
      yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryCheckbillReportRest.java
  8. 8
      yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryCheckbillRest.java
  9. 2
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryMapper.xml
  10. 24
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryService.java
  11. 21
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillMapper.java
  12. 117
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillMapper.xml
  13. 23
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillService.java
  14. 8
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.java
  15. 138
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.xml

1
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/index/AppIndexEnum.java

@ -57,6 +57,7 @@ public class AppIndexEnum {
WXWB("c3a6be91-3e95-4520-b5a7-c805d8f187d7", "维修完毕"),
SPSJ("781ce38b-b003-4efd-accf-fbee0ca33091", "商品上架"),
PJJS("37905444-5454-4b08-897d-6c2c089c317d", "配件接收"),
SPPD("a16641b1-e34e-4c80-9163-7eed9893c3c5", "商品盘点"),
;
/**

8
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/index/AppIndexService.java

@ -19,6 +19,7 @@ import com.yxt.anrui.portal.biz.sysuser.SysUserService;
import com.yxt.anrui.portal.biz.sysuserrole.SysUserRoleService;
import com.yxt.anrui.portal.fegin.as.AsBusrepairBillFeign;
import com.yxt.anrui.portal.fegin.as.AsToDoNumQuery;
import com.yxt.anrui.portal.fegin.wms.WmsInventoryCheckbillFeign;
import com.yxt.anrui.portal.fegin.wms.WmsShelfBillFeign;
import com.yxt.anrui.portal.fegin.wms.WmsToDoNumQuery;
import com.yxt.anrui.riskcenter.api.loanfileexamine.LoanFileexamineFeign;
@ -81,6 +82,8 @@ public class AppIndexService {
@Resource
private WmsShelfBillFeign wmsShelfBillFeign;
@Resource
private WmsInventoryCheckbillFeign wmsInventoryCheckbillFeign;
@Resource
private AsBusrepairBillFeign asBusrepairBillFeign;
public ResultBean<List<AppIndexNewVo>> getBusinessList(String userSid, String appSid, String orgPath) {
@ -250,6 +253,11 @@ public class AppIndexService {
String num = asBusrepairBillFeign.getToDoNum2(asToDoNumQuery).getData();
appIndexNumVo.setNum(num);
}
//商品盘点
if (AppIndexEnum.AppMenu.SPPD.getRemarks().equals(menu.getTitle())) {
String num = wmsInventoryCheckbillFeign.getToDoNum(wmsToDoNumQuery).getData();
appIndexNumVo.setNum(num);
}
list.add(appIndexNumVo);
}
}

26
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/fegin/wms/WmsInventoryCheckbillFeign.java

@ -0,0 +1,26 @@
package com.yxt.anrui.portal.fegin.wms;
import com.yxt.common.core.result.ResultBean;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* @description: 商品盘点
* @author: fzz
* @date: 2024/3/7
**/
@FeignClient(
contextId = "yxt-wms-WmsInventoryCheckbill",
name = "yxt-wms",
path = "v1/wmsinventorycheckbill"
)
public interface WmsInventoryCheckbillFeign {
@ApiOperation("手机端-查询本分公司下代办数量:切换机构")
@GetMapping("/getToDoNum")
@ResponseBody
ResultBean<String> getToDoNum(@SpringQueryMap WmsToDoNumQuery wmsToDoNumQuery);
}

2
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/wms/inventorycheckbill/WmsInventoryCheckbillService.java

@ -94,6 +94,8 @@ public class WmsInventoryCheckbillService {
if (record.getLossCount() != null){
wmsInventoryCheckbillGoodsPageVo.setPanSun(record.getLossCount().toString());
handleBean.setBadNum(record.getLossCount().toString());
}else {
handleBean.setBadNum("0");
}
List<WmsInventoryCheckbillDetailFile> fileList = record.getFileList();
List<String> files = new ArrayList<>();

10
yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryAllocatebillRest.java

@ -51,7 +51,7 @@ public class WmsInventoryAllocatebillRest {
@ApiOperation("根据条件分页查询数据的列表")
@PostMapping("/listPage")
public ResultBean<PagerVo<WmsInventoryAllocateBillVoNew>> listPage(@RequestBody PagerQuery<WmsInventoryAllocateBillQueryNew> pq){
public ResultBean<PagerVo<WmsInventoryAllocateBillVoNew>> listPage(@RequestBody PagerQuery<WmsInventoryAllocateBillQueryNew> pq) {
ResultBean rb = ResultBean.fireFail();
PagerVo<WmsInventoryAllocateBillVoNew> pv = wmsInventoryAllocateBillService.listPageVo(pq);
return rb.success().setData(pv);
@ -59,7 +59,7 @@ public class WmsInventoryAllocatebillRest {
@ApiOperation("新增或修改")
@PostMapping("/save")
public ResultBean save(@RequestBody WmsInventoryAllocateBillDtoNew dto){
public ResultBean save(@RequestBody WmsInventoryAllocateBillDtoNew dto) {
ResultBean rb = ResultBean.fireFail();
wmsInventoryAllocateBillService.saveOrUpdateDto(dto);
return rb.success();
@ -67,7 +67,7 @@ public class WmsInventoryAllocatebillRest {
@ApiOperation("根据sid批量删除")
@DeleteMapping("/delBySids")
public ResultBean delBySids(@RequestBody String[] sids){
public ResultBean delBySids(@RequestBody String[] sids) {
ResultBean rb = ResultBean.fireFail();
wmsInventoryAllocateBillService.delAll(sids);
return rb.success();
@ -75,7 +75,7 @@ public class WmsInventoryAllocatebillRest {
@ApiOperation("根据SID获取一条记录")
@GetMapping("/fetchDetailsBySid/{sid}")
public ResultBean<WmsInventoryAllocateBillDetailsVoNew> fetchDetailsBySid(@PathVariable("sid") String sid){
public ResultBean<WmsInventoryAllocateBillDetailsVoNew> fetchDetailsBySid(@PathVariable("sid") String sid) {
ResultBean rb = ResultBean.fireFail();
WmsInventoryAllocateBillDetailsVoNew vo = wmsInventoryAllocateBillService.fetchDetailsVoBySid(sid);
return rb.success().setData(vo);
@ -138,7 +138,7 @@ public class WmsInventoryAllocatebillRest {
@ApiOperation(value = "转办")
@PostMapping(value = "/assignTask")
@ResponseBody
public ResultBean assignTask(@RequestBody FlowDelegateQuery query){
public ResultBean assignTask(@RequestBody FlowDelegateQuery query) {
return wmsInventoryAllocateBillService.assignTask(query);
}
}

13
yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryCheckbillDetailRest.java

@ -28,19 +28,6 @@ package com.yxt.wms.apiadmin.inventroy;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;
/**
* Project: yxt-wms(仓储) <br/>
* File: WmsInventoryCheckbillDetailFeignFallback.java <br/>
* Class: com.yxt.wms.biz.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailRest <br/>
* Description: 库存盘点-明细. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2024-03-22 09:25:02 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Api(tags = "库存盘点-明细")
@RestController
@RequestMapping("v1/wmsinventorycheckbilldetail")

13
yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryCheckbillReportRest.java

@ -28,19 +28,6 @@ package com.yxt.wms.apiadmin.inventroy;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;
/**
* Project: yxt-wms(盘点报告) <br/>
* File: WmsInventoryCheckbillReportFeignFallback.java <br/>
* Class: com.yxt.wms.biz.wmsinventorycheckbillreport.WmsInventoryCheckbillReportRest <br/>
* Description: 盘点报告. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2024-07-19 09:52:51 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Api(tags = "盘点报告")
@RestController
@RequestMapping("v1/wmsinventorycheckbillreport")

8
yxt-wms-biz/src/main/java/com/yxt/wms/apiadmin/inventroy/WmsInventoryCheckbillRest.java

@ -34,6 +34,7 @@ import com.yxt.wms.biz.inventory.wmsinventorycheckbill.flowable.*;
import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.*;
import com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.app.*;
import com.yxt.wms.biz.inventory.wmsinventorycheckbillreport.WmsInventoryCheckbillReportDetailsVo;
import com.yxt.wms.biz.inventory.wmsshelfbill.WmsToDoNumQuery;
import com.yxt.wms.feign.flowable.flow.BusinessVariables;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -159,6 +160,13 @@ public class WmsInventoryCheckbillRest {
return wmsInventoryCheckbillService.scan(sid, content, houseSid);
}
@ApiOperation("手机端-查询本分公司下代办数量:切换机构")
@GetMapping("/getToDoNum")
@ResponseBody
ResultBean<String> getToDoNum(@SpringQueryMap WmsToDoNumQuery wmsToDoNumQuery) {
return wmsInventoryCheckbillService.getToDoNum(wmsToDoNumQuery);
}
/*********************************************************流程************************************************************/
@ApiOperation("提交")

2
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryMapper.xml

@ -297,6 +297,8 @@
ON wr.locationSid = wa.sid
LEFT JOIN wms_warehouse_zone wz
ON wz.warehouseSid = wi.warehouseSid
LEFT JOIN wms_warehouse_info wwi
ON wwi.sid = wi.warehouseSid
<where>
${ew.sqlSegment}
</where>

24
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventory/WmsInventoryService.java

@ -136,7 +136,7 @@ public class WmsInventoryService extends MybatisBaseService<WmsInventoryMapper,
if (StringUtils.isNotBlank(query.getType())) {
qw.eq("i.warehouseTypeValue", query.getType());
}
qw.notLike("a.goodsID","-O");
qw.notLike("a.goodsID", "-O");
IPage<WmsInventory> page = PagerUtil.queryToPage(pq);
IPage<WmsInventoryVo> pagging = baseMapper.listPage(page, qw);
PagerVo<WmsInventoryVo> p = PagerUtil.pageToVo(pagging, null);
@ -213,7 +213,7 @@ public class WmsInventoryService extends MybatisBaseService<WmsInventoryMapper,
if (StringUtils.isNotBlank(query.getType())) {
qw.eq("i.warehouseTypeValue", query.getType());
}
qw.notLike("a.goodsID","-O");
qw.notLike("a.goodsID", "-O");
List<WmsInventoryVoExcelVo> list = baseMapper.listExcel(qw);
list.removeAll(Collections.singleton(null));
return list;
@ -574,6 +574,8 @@ public class WmsInventoryService extends MybatisBaseService<WmsInventoryMapper,
WmsInventoryAlloSelectQuery query = pq.getParams();
QueryWrapper<WmsInventory> qw = new QueryWrapper<>();
qw.eq("wi.useOrgSid", query.getDeptSid());
qw.eq("wwi.warehouseTypeKey", "01");
qw.gt("wi.count", 0);
if (StringUtils.isNotBlank(query.getGoodsID())) {
qw.like("wi.goodsID", query.getGoodsID());
}
@ -947,8 +949,8 @@ public class WmsInventoryService extends MybatisBaseService<WmsInventoryMapper,
.or().like("a.warehouseRackCode", query.getName())
);
}
qw.notLike("a.goodsID","-O");
qw.eq("a.warehouseTypeValue","配件库");
qw.notLike("a.goodsID", "-O");
qw.eq("a.warehouseTypeValue", "配件库");
IPage<WmsInventory> page = PagerUtil.queryToPage(pq);
IPage<FittingsInventoryVo> pagging = baseMapper.fittingsInventory(page, qw);
PagerVo<FittingsInventoryVo> p = PagerUtil.pageToVo(pagging, null);
@ -1007,8 +1009,8 @@ public class WmsInventoryService extends MybatisBaseService<WmsInventoryMapper,
.or().like("z.zoneName", query.getName())
);
}
qw.notLike("i.goodsID","-O");
qw.eq("wi.warehouseTypeValue","配件库");
qw.notLike("i.goodsID", "-O");
qw.eq("wi.warehouseTypeValue", "配件库");
List<StorageListVo> listVos = baseMapper.appStorage(qw);
Map<String, List<StorageListVo>> stringListMap = listVos.stream().collect(Collectors.groupingBy(StorageListVo::getTitle));
List<StorageVo> records = new ArrayList<>();
@ -1374,7 +1376,7 @@ public class WmsInventoryService extends MybatisBaseService<WmsInventoryMapper,
return p;
}
public List<FormCommon> oaInventoryList(String orgPath, String warehouseTypeValue,String name) {
public List<FormCommon> oaInventoryList(String orgPath, String warehouseTypeValue, String name) {
List<FormCommon> list = new ArrayList<>();
String useOrgSid = "";
if (StringUtils.isNotBlank(orgPath)) {
@ -1388,7 +1390,7 @@ public class WmsInventoryService extends MybatisBaseService<WmsInventoryMapper,
useOrgSid = sysOrganization.getSid();
}
}
List<WmsInventory> inventories = baseMapper.selOaInventoryList(useOrgSid, warehouseTypeValue,name);
List<WmsInventory> inventories = baseMapper.selOaInventoryList(useOrgSid, warehouseTypeValue, name);
if (!inventories.isEmpty()) {
for (WmsInventory d : inventories) {
FormCommon f = new FormCommon();
@ -1482,11 +1484,11 @@ public class WmsInventoryService extends MybatisBaseService<WmsInventoryMapper,
wmsInventorySaveDto.setWarehouseRackSid(houseInfoVo.getWarehouseRackSid());
wmsInventorySaveDto.setWarehouseRackCode(houseInfoVo.getWarehouseRackCode());
saveWmsInventory(wmsInventorySaveDto);
if (new BigDecimal(wmsStoreChangeDto.getCount()).compareTo(new BigDecimal(wmsStoreChangeDto.getMaxCount())) == 0){
if (new BigDecimal(wmsStoreChangeDto.getCount()).compareTo(new BigDecimal(wmsStoreChangeDto.getMaxCount())) == 0) {
deleteBySid(sid);
}else {
} else {
BigDecimal count = new BigDecimal(wmsStoreChangeDto.getMaxCount()).subtract(new BigDecimal(wmsStoreChangeDto.getCount()));
baseMapper.updateCount(sid,count.toString());
baseMapper.updateCount(sid, count.toString());
}
}
return rb.success();

21
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillMapper.java

@ -43,19 +43,6 @@ import org.apache.ibatis.annotations.Update;
import java.util.List;
import java.util.Map;
/**
* Project: yxt-wms(仓储) <br/>
* File: WmsInventoryCheckbillMapper.java <br/>
* Class: com.yxt.wms.biz.wmsinventorycheckbill.WmsInventoryCheckbillMapper <br/>
* Description: 库存盘点. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2024-03-22 09:25:02 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Mapper
public interface WmsInventoryCheckbillMapper extends BaseMapper<WmsInventoryCheckbill> {
@ -74,13 +61,15 @@ public interface WmsInventoryCheckbillMapper extends BaseMapper<WmsInventoryChec
@Update("update wms_inventory_checkbill set state = 0,checkState = 2 where sid = #{sid}")
void createReport(String sid);
String checkState(@Param("deptSid") String deptSid,@Param("warehouseTypeKey") String warehouseTypeKey);
String checkState(@Param("deptSid") String deptSid, @Param("warehouseTypeKey") String warehouseTypeKey);
int updateFlowFiled(Map<String, Object> beanToMap);
IPage<WmsInventoryCheckbillPageVo> appDetailRackPageList(IPage<WmsInventoryCheckbill> page, @Param(Constants.WRAPPER) QueryWrapper<WmsInventoryCheckbill> qw);
List<InventoryBillVo> selPyByDeptSid(@Param("deptSid") String deptSid,@Param("warehouseTypeKey") String warehouseTypeKey);
List<InventoryBillVo> selPyByDeptSid(@Param("deptSid") String deptSid, @Param("warehouseTypeKey") String warehouseTypeKey);
List<InventoryBillVo> selPkByDeptSid(@Param("deptSid") String deptSid,@Param("warehouseTypeKey") String warehouseTypeKey);
List<InventoryBillVo> selPkByDeptSid(@Param("deptSid") String deptSid, @Param("warehouseTypeKey") String warehouseTypeKey);
int getToDoNum(String userSid);
}

117
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillMapper.xml

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yxt.wms.biz.inventory.wmsinventorycheckbill.WmsInventoryCheckbillMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.wms.biz.inventory.wmsinventorycheckbill.WmsInventoryCheckbillVo">
SELECT
wic.sid,
wic.state,
wic.`remarks`,
wic.`nodeState`,
wic.`deptName`,
wic.`billNo`,
wic.`createTime`,
wic.`createByName`,
wic.`superviseName`,
wic.remarks,
wic.nodeState,
wic.deptName,
wic.billNo,
wic.createTime,
wic.createByName,
wic.superviseName,
IF(
wic.`checkState` = '1',
wic.checkState = '1',
'盘点中',
'盘点完成'
) AS checkState,
wic.`procDefId`,
wic.`procInstId`,
wic.procDefId,
wic.procInstId,
SUM(wicd.bookCount) AS bookCount,
SUM(wicd.bookCount * cost) AS bookAmount,
SUM(wicd.realCount) AS realCount,
@ -38,10 +38,12 @@
FROM
wms_inventory_checkbill wic
LEFT JOIN wms_inventory_checkbill_detail wicd
ON wic.sid = wicd.`billSid`
ON wic.sid = wicd.billSid
LEFT JOIN anrui_portal.sys_organization AS s
ON wic.deptSid = s.sid
<where> ${ew.sqlSegment} </where>
<where>
${ew.sqlSegment}
</where>
</select>
<select id="detailRackPageList"
@ -66,7 +68,9 @@
SUM(lossCount * cost) AS lossAmount
FROM
wms_inventory_checkbill_detail
<where> ${ew.sqlSegment} </where>
<where>
${ew.sqlSegment}
</where>
</select>
<select id="detailGoodPageList"
@ -116,7 +120,9 @@
remarks
FROM
wms_inventory_checkbill_detail
<where> ${ew.sqlSegment} </where>
<where>
${ew.sqlSegment}
</where>
</select>
<select id="detailRackGoodPageList"
@ -167,7 +173,9 @@
remarks
FROM
wms_inventory_checkbill_detail
<where> ${ew.sqlSegment} </where>
<where>
${ew.sqlSegment}
</where>
</select>
<select id="selectNum" resultType="java.lang.String">
@ -186,14 +194,11 @@
</select>
<select id="checkState" resultType="java.lang.String">
SELECT
checkState
FROM
wms_inventory_checkbill
SELECT checkState
FROM wms_inventory_checkbill
WHERE deptSid = #{deptSid}
AND warehouseTypeKey = #{warehouseTypeKey}
ORDER BY createTime DESC
LIMIT 1
ORDER BY createTime DESC LIMIT 1
</select>
<update id="updateFlowFiled">
@ -240,21 +245,19 @@
LEFT JOIN wms_warehouse_zone z on z.sid = r.zoneSid
LEFT JOIN wms_inventory_checkbill c
ON d.billSid = c.sid
<where> ${ew.sqlSegment} </where>
<where>
${ew.sqlSegment}
</where>
</select>
<select id="selPyByDeptSid" resultType="com.yxt.wms.biz.inventory.wmsinventoryprofitin.InventoryBillVo">
SELECT
wc.sid AS billSid,
SELECT wc.sid AS billSid,
wc.billNo
FROM
wms_inventory_checkbill wc
FROM wms_inventory_checkbill wc
JOIN
(SELECT
SUM(wd.profitCount) AS total,
(SELECT SUM(wd.profitCount) AS total,
wd.billSid AS billSid
FROM
wms_inventory_checkbill_detail wd
FROM wms_inventory_checkbill_detail wd
GROUP BY wd.billSid) AS total_goods
WHERE wc.deptSid = #{deptSid}
AND wc.warehouseTypeKey = #{warehouseTypeKey}
@ -264,17 +267,13 @@
</select>
<select id="selPkByDeptSid" resultType="com.yxt.wms.biz.inventory.wmsinventoryprofitin.InventoryBillVo">
SELECT
wc.sid AS billSid,
SELECT wc.sid AS billSid,
wc.billNo
FROM
wms_inventory_checkbill wc
FROM wms_inventory_checkbill wc
JOIN
(SELECT
SUM(wd.loseCount) AS total,
(SELECT SUM(wd.loseCount) AS total,
wd.billSid AS billSid
FROM
wms_inventory_checkbill_detail wd
FROM wms_inventory_checkbill_detail wd
GROUP BY wd.billSid) AS total_goods
WHERE wc.deptSid = #{deptSid}
AND wc.warehouseTypeKey = #{warehouseTypeKey}
@ -282,4 +281,42 @@
AND total_goods.total > 0
AND wc.checkState = 2
</select>
<select id="getToDoNum" resultType="java.lang.Integer">
SELECT
COUNT(1)
FROM
(SELECT
c.sid,
d.warehouseRackSid AS houseSid,
CONCAT(
d.warehouseName,
'-',
z.zoneName,
'-',
d.warehouseArea,
'\n',
r.rackCode
) AS title,
SUM(bookCount) - SUM(realCount) AS surplusNumber,
SUM(bookCount) AS totalNumber,
SUM(loseCount) AS lossNumber,
SUM(lossCount) AS damageNumber,
SUM(profitCount) AS profitNumber,
SUM(realCount) AS actualNumber
FROM
wms_inventory_checkbill_detail d
LEFT JOIN wms_warehouse_rack r
ON d.warehouseRackSid = r.sid
LEFT JOIN wms_warehouse_zone z
ON z.sid = r.zoneSid
LEFT JOIN wms_inventory_checkbill c
ON d.billSid = c.sid
WHERE (
c.createBySid = #{userSid}
AND c.checkState = 1
AND c.warehouseTypeKey = 01
)
GROUP BY d.warehouseRackSid) TOTAL
</select>
</mapper>

23
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbill/WmsInventoryCheckbillService.java

@ -50,6 +50,7 @@ import com.yxt.wms.biz.inventory.wmsinventorycheckbillreport.*;
import com.yxt.wms.biz.inventory.wmsinventoryprofitin.InventoryBillVo;
import com.yxt.wms.biz.inventory.wmsinventoryprofitin.WmsInventoryProfitin;
import com.yxt.wms.biz.inventory.wmsinventoryrecord.WmsInventoryRecordService;
import com.yxt.wms.biz.inventory.wmsshelfbill.WmsToDoNumQuery;
import com.yxt.wms.feign.flowable.flow.BusinessVariables;
import com.yxt.wms.feign.flowable.flow.FlowableFeign;
import com.yxt.wms.feign.flowable.flow.ProcDefEnum;
@ -85,19 +86,6 @@ import java.util.*;
import java.util.concurrent.*;
import java.util.stream.Collectors;
/**
* Project: yxt-wms(仓储) <br/>
* File: WmsInventoryCheckbillService.java <br/>
* Class: com.yxt.wms.biz.wmsinventorycheckbill.WmsInventoryCheckbillService <br/>
* Description: 库存盘点 业务逻辑. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2024-03-22 09:25:02 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Service
public class WmsInventoryCheckbillService extends MybatisBaseService<WmsInventoryCheckbillMapper, WmsInventoryCheckbill> {
@ -940,7 +928,7 @@ public class WmsInventoryCheckbillService extends MybatisBaseService<WmsInventor
for (WmsInventory wmsInventory : wmsInventories) {
WmsWarehouseRack wmsWarehouseRack = wmsWarehouseRackService.fetchBySid(wmsInventory.getWarehouseRackSid());
WmsWarehouseArea wmsWarehouseArea = wmsWarehouseAreaService.fetchBySid(wmsWarehouseRack.getLocationSid());
return rb.setMsg("商品不属于本库位,属于" + wmsWarehouseArea.getAreaName() + "库区" + wmsWarehouseRack.getRackName() + "库位。");
return rb.setMsg("商品不属于本库位,属于" + wmsWarehouseArea.getAreaName() + "库区" + wmsWarehouseRack.getRackCode() + "库位。");
}
} else {
String billNo = wmsInventoryRecordService.selByGoodsID(content);
@ -971,4 +959,11 @@ public class WmsInventoryCheckbillService extends MybatisBaseService<WmsInventor
public List<InventoryBillVo> selPkByDeptSid(String deptSid,String warehouseTypeKey) {
return baseMapper.selPkByDeptSid(deptSid,warehouseTypeKey);
}
public ResultBean<String> getToDoNum(WmsToDoNumQuery wmsToDoNumQuery) {
ResultBean rb = ResultBean.fireFail();
String userSid = wmsToDoNumQuery.getUserSid();
int count = baseMapper.getToDoNum(userSid);
return rb.success().setData(String.valueOf(count));
}
}

8
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.java

@ -65,13 +65,13 @@ public interface WmsInventoryCheckbillDetailMapper extends BaseMapper<WmsInvento
List<WmsInventoryCheckbillReportSumVo> reportSumArea(String billSid);
void saveInventoryInfoZC(@Param("dto") WmsInventoryCheckbillGoodsDto dto,@Param("num") String num);
void saveInventoryInfoZC(@Param("dto") WmsInventoryCheckbillGoodsDto dto, @Param("num") String num);
void saveInventoryInfoPY(@Param("dto") WmsInventoryCheckbillGoodsDto dto,@Param("pyCount") BigDecimal pyCount);
void saveInventoryInfoPY(@Param("dto") WmsInventoryCheckbillGoodsDto dto, @Param("pyCount") BigDecimal pyCount);
void saveInventoryInfoPK(@Param("dto") WmsInventoryCheckbillGoodsDto dto,@Param("pkCount") BigDecimal pkCount);
void saveInventoryInfoPK(@Param("dto") WmsInventoryCheckbillGoodsDto dto, @Param("pkCount") BigDecimal pkCount);
HandleBean scan(@Param("sid") String sid,@Param("content") String content,@Param("houseSid") String houseSid);
HandleBean scan(@Param("sid") String sid, @Param("content") String content, @Param("houseSid") String houseSid);
List<WmsInventoryProfitinDetailDto> sourceBillBySid(String sid);

138
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsinventorycheckbilldetail/WmsInventoryCheckbillDetailMapper.xml

@ -1,18 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selByMainSid"
resultType="com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.WmsInventoryCheckbillDetailDetailsVo">
SELECT
wicd.*,
SELECT wicd.*,
wicd.goodsModel as carModel,
wicd.goodsSid as goodsSpuSid,
wicd.goodsName as goodsSpuName,
wicd.goodsCode as goodsSkuCode
FROM
wms_inventory_checkbill_detail wicd
FROM wms_inventory_checkbill_detail wicd
LEFT JOIN wms_inventory wi
ON wicd.inventorySid = wi.`sid`
WHERE billSid = #{billSid}
@ -20,82 +18,100 @@
<select id="reportSumTotal"
resultType="com.yxt.wms.biz.inventory.wmsinventorycheckbillreport.WmsInventoryCheckbillReportSumVo">
SELECT
IFNULL(SUM(wicd.bookCount),0) AS ypNum,
IFNULL(SUM(wicd.bookCount * cost) ,0) AS ypMoney,
IFNULL(SUM(wicd.realCount),0) AS spNum,
IFNULL(SUM(wicd.realCount * cost),0) AS spMoney,
IFNULL(SUM(wicd.profitCount),0) AS pyNum,
IFNULL(SUM(wicd.profitCount * cost),0) AS pyMoney,
IFNULL(SUM(wicd.loseCount),0) AS pkNum,
IFNULL(SUM(wicd.loseCount * cost),0) AS pkMoney,
IFNULL(SUM(lossCount),0) AS psNum,
IFNULL(SUM(lossCount * cost),0) AS psMoney
FROM
wms_inventory_checkbill_detail AS wicd
SELECT IFNULL(SUM(wicd.bookCount), 0) AS ypNum,
IFNULL(SUM(wicd.bookCount * cost), 0) AS ypMoney,
IFNULL(SUM(wicd.realCount), 0) AS spNum,
IFNULL(SUM(wicd.realCount * cost), 0) AS spMoney,
IFNULL(SUM(wicd.profitCount), 0) AS pyNum,
IFNULL(SUM(wicd.profitCount * cost), 0) AS pyMoney,
IFNULL(SUM(wicd.loseCount), 0) AS pkNum,
IFNULL(SUM(wicd.loseCount * cost), 0) AS pkMoney,
IFNULL(SUM(lossCount), 0) AS psNum,
IFNULL(SUM(lossCount * cost), 0) AS psMoney
FROM wms_inventory_checkbill_detail AS wicd
WHERE wicd.billSid = #{billSid}
GROUP BY wicd.billSid
</select>
<select id="reportSumWare"
resultType="com.yxt.wms.biz.inventory.wmsinventorycheckbillreport.WmsInventoryCheckbillReportSumVo">
SELECT
wicd.warehouseName,
IFNULL(SUM(wicd.bookCount),0) AS ypNum,
IFNULL(SUM(wicd.bookCount * cost) ,0) AS ypMoney,
IFNULL(SUM(wicd.realCount),0) AS spNum,
IFNULL(SUM(wicd.realCount * cost),0) AS spMoney,
IFNULL(SUM(wicd.profitCount),0) AS pyNum,
IFNULL(SUM(wicd.profitCount * cost),0) AS pyMoney,
IFNULL(SUM(wicd.loseCount),0) AS pkNum,
IFNULL(SUM(wicd.loseCount * cost),0) AS pkMoney,
IFNULL(SUM(lossCount),0) AS psNum,
IFNULL(SUM(lossCount * cost),0) AS psMoney
FROM
wms_inventory_checkbill_detail AS wicd
SELECT wicd.warehouseName,
IFNULL(SUM(wicd.bookCount), 0) AS ypNum,
IFNULL(SUM(wicd.bookCount * cost), 0) AS ypMoney,
IFNULL(SUM(wicd.realCount), 0) AS spNum,
IFNULL(SUM(wicd.realCount * cost), 0) AS spMoney,
IFNULL(SUM(wicd.profitCount), 0) AS pyNum,
IFNULL(SUM(wicd.profitCount * cost), 0) AS pyMoney,
IFNULL(SUM(wicd.loseCount), 0) AS pkNum,
IFNULL(SUM(wicd.loseCount * cost), 0) AS pkMoney,
IFNULL(SUM(lossCount), 0) AS psNum,
IFNULL(SUM(lossCount * cost), 0) AS psMoney
FROM wms_inventory_checkbill_detail AS wicd
WHERE wicd.billSid = #{billSid}
GROUP BY wicd.warehouseSid
</select>
<select id="reportSumArea"
resultType="com.yxt.wms.biz.inventory.wmsinventorycheckbillreport.WmsInventoryCheckbillReportSumVo">
SELECT
CONCAT(
SELECT CONCAT(
wicd.warehouseName,
'-',
wz.zoneName,
'-',
wicd.warehouseArea
) AS warehouseAreaeName,
IFNULL(SUM(wicd.bookCount),0) AS ypNum,
IFNULL(SUM(wicd.bookCount * cost) ,0) AS ypMoney,
IFNULL(SUM(wicd.realCount),0) AS spNum,
IFNULL(SUM(wicd.realCount * cost),0) AS spMoney,
IFNULL(SUM(wicd.profitCount),0) AS pyNum,
IFNULL(SUM(wicd.profitCount * cost),0) AS pyMoney,
IFNULL(SUM(wicd.loseCount),0) AS pkNum,
IFNULL(SUM(wicd.loseCount * cost),0) AS pkMoney,
IFNULL(SUM(lossCount),0) AS psNum,
IFNULL(SUM(lossCount * cost),0) AS psMoney
FROM
wms_inventory_checkbill_detail AS wicd
IFNULL(SUM(wicd.bookCount), 0) AS ypNum,
IFNULL(SUM(wicd.bookCount * cost), 0) AS ypMoney,
IFNULL(SUM(wicd.realCount), 0) AS spNum,
IFNULL(SUM(wicd.realCount * cost), 0) AS spMoney,
IFNULL(SUM(wicd.profitCount), 0) AS pyNum,
IFNULL(SUM(wicd.profitCount * cost), 0) AS pyMoney,
IFNULL(SUM(wicd.loseCount), 0) AS pkNum,
IFNULL(SUM(wicd.loseCount * cost), 0) AS pkMoney,
IFNULL(SUM(lossCount), 0) AS psNum,
IFNULL(SUM(lossCount * cost), 0) AS psMoney
FROM wms_inventory_checkbill_detail AS wicd
LEFT JOIN wms_warehouse_zone AS wz
ON wz.warehouseSid = wicd.warehouseSid
WHERE wicd.billSid = #{billSid}
GROUP BY wicd.warehouseAreaSid
</select>
<update id="saveInventoryInfoZC">
update wms_inventory_checkbill_detail set lossCount = #{dto.badNum},realCount = #{dto.num},profitCount = 0,loseCount = 0,remarks = #{dto.remarks},state = 2 where sid = #{dto.sid}
update wms_inventory_checkbill_detail
set lossCount = #{dto.badNum},
realCount = #{dto.num},
profitCount = 0,
loseCount = 0,
remarks = #{dto.remarks},
state = 2
where sid = #{dto.sid}
</update>
<update id="saveInventoryInfoPY">
update wms_inventory_checkbill_detail set lossCount = #{dto.badNum},realCount = #{dto.num},profitCount = #{pyCount},loseCount = 0,remarks = #{dto.remarks},state = 3 where sid = #{dto.sid}
update wms_inventory_checkbill_detail
set lossCount = #{dto.badNum},
realCount = #{dto.num},
profitCount = #{pyCount},
loseCount = 0,
remarks = #{dto.remarks},
state = 3
where sid = #{dto.sid}
</update>
<update id="saveInventoryInfoPK">
update wms_inventory_checkbill_detail set lossCount = #{dto.badNum},realCount = #{dto.num},profitCount = 0,loseCount = #{pkCount},remarks = #{dto.remarks},state = 4 where sid = #{dto.sid}
update wms_inventory_checkbill_detail
set lossCount = #{dto.badNum},
realCount = #{dto.num},
profitCount = 0,
loseCount = #{pkCount},
remarks = #{dto.remarks},
state = 4
where sid = #{dto.sid}
</update>
<select id="scan" resultType="com.yxt.wms.biz.inventory.wmsinventorycheckbilldetail.app.HandleBean">
SELECT
lossCount AS badNum,
SELECT IF(lossCount IS NULL, 0, lossCount) AS badNum,
goodsID,
goodsSkuTitle AS goodsName,
goodsSkuCode,
@ -104,16 +120,15 @@
remarks,
sid,
unit
FROM
wms_inventory_checkbill_detail
FROM wms_inventory_checkbill_detail
WHERE billSid = #{sid}
AND goodsID = #{content}
AND warehouseRackSid = #{houseSid}
</select>
<select id="sourceBillBySid" resultType="com.yxt.wms.biz.inventory.wmsinventoryprofitindetail.WmsInventoryProfitinDetailDto">
SELECT
goodsSpuSid AS goodsSid,
<select id="sourceBillBySid"
resultType="com.yxt.wms.biz.inventory.wmsinventoryprofitindetail.WmsInventoryProfitinDetailDto">
SELECT goodsSpuSid AS goodsSid,
goodsSpuName,
goodsSkuSid,
goodsSkuTitle AS goodsName,
@ -126,16 +141,14 @@
supplierSid,
supplierName,
profitCount AS inStorageNum
FROM
wms_inventory_checkbill_detail
FROM wms_inventory_checkbill_detail
WHERE billSid = #{sid}
AND profitCount > 0
</select>
<select id="sourceBillPkBySid"
resultType="com.yxt.wms.biz.inventory.wmsinventoryprofitoutdetail.WmsInventoryProfitoutDetailDto">
SELECT
d.goodsID,
SELECT d.goodsID,
d.goodsSpuSid AS goodsSid,
d.goodsSpuName,
d.goodsSkuSid,
@ -152,8 +165,7 @@
d.warehouseRackName,
d.loseCount AS outStorageNum,
w.cost AS inStoragePrice
FROM
wms_inventory_checkbill_detail d
FROM wms_inventory_checkbill_detail d
LEFT JOIN wms_inventory w
ON d.goodsID = w.goodsID
WHERE billSid = #{sid}

Loading…
Cancel
Save