Browse Source

工具扫描

master
常熟吴彦祖 4 weeks ago
parent
commit
cc6dd4b2a8
  1. 11
      src/main/java/com/heai/modules/app/service/impl/FunctionServiceImpl.java
  2. 4
      src/main/resources/application-test.yml
  3. 8
      src/main/resources/mapper/board/BoardMapper.xml

11
src/main/java/com/heai/modules/app/service/impl/FunctionServiceImpl.java

@ -232,6 +232,9 @@ public class FunctionServiceImpl implements FunctionService {
@Override
@Transactional
public R saveSOReceiveFGTransFerHunlian(ProductionWarehouseData productionWarehouseData) throws ParseException {
if (productionWarehouseData.getPrintNumber() == null || productionWarehouseData.getPrintNumber() <= 0) {
throw new RuntimeException("请填写大于0的标签打印数量!");
}
if(productionWarehouseData.getUseLocationFlag()==null||"Y".equals(productionWarehouseData.getUseLocationFlag())){
List<LocationData> checkLocationId= dailyPlanMapper.checkLocationId(productionWarehouseData);
if(checkLocationId.size()==0){
@ -281,6 +284,8 @@ public class FunctionServiceImpl implements FunctionService {
params.add(productionWarehouseData.getReceiver());
params.add(productionWarehouseData.getRemark());
params.add(productionWarehouseData.getTransFerNo());
params.add(productionWarehouseData.getPrintNumber());
params.add(productionWarehouseData.getUserId());
Map<String, Object> map = functionMapper.getProcedure("SO_Receive_FG_TransFer_Hunlian", params);
if (map == null) {
throw new RuntimeException("返回结果错误!");
@ -289,8 +294,6 @@ public class FunctionServiceImpl implements FunctionService {
}
}
functionMapper.updateHunlianHouseWareFlag(inData);
// functionMapper.saveStockPrint(productionWarehouseData);
functionMapper.savePrintInfo(productionWarehouseData);
return R.ok().put("code", "200").put("msg", "入库成功!");
}else {
//新数据入库
@ -308,6 +311,8 @@ public class FunctionServiceImpl implements FunctionService {
params.add(productionWarehouseData.getReceiver());
params.add(productionWarehouseData.getRemark());
params.add(productionWarehouseData.getTransFerNo());
params.add(productionWarehouseData.getPrintNumber());
params.add(productionWarehouseData.getUserId());
Map<String, Object> map = functionMapper.getProcedure("SO_Receive_FG_TransFer_Hunlian", params);
if (map == null) {
throw new RuntimeException("返回结果错误!");
@ -315,8 +320,6 @@ public class FunctionServiceImpl implements FunctionService {
throw new RuntimeException(String.valueOf(map.get("result_msg")));
}
functionMapper.updateHunlianHouseWareFlag(inData);
// functionMapper.saveStockPrint(productionWarehouseData);
functionMapper.savePrintInfo(productionWarehouseData);
return R.ok().put("code", "200").put("msg", "入库成功!");
}
}

4
src/main/resources/application-test.yml

@ -3,8 +3,8 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
druid:
type: com.alibaba.druid.pool.DruidDataSource
# url: jdbc:sqlserver://xujiesoft.vicp.net:11512;databaseName=SHHS
url: jdbc:sqlserver://192.168.1.84:1433;databaseName=SHHS
url: jdbc:sqlserver://xujiesoft.vicp.net:11512;databaseName=SHHS
# url: jdbc:sqlserver://192.168.1.84:1433;databaseName=SHHS
# url: jdbc:sqlserver://192.168.2.172:1433;databaseName=XJERP
username: xjsoft
password: XsoftJ123

8
src/main/resources/mapper/board/BoardMapper.xml

@ -253,22 +253,22 @@
<select id="getStockPrintList" resultType="com.heai.modules.production.entity.StockPrintData">
select a.PrintQty,b.TransNo,b.Site,b.WareHouseId,b.BatchNo,b.LocationId,b.PartNo,b.OrderNo,b.TransDate,b.Qty,b.PrintFlag,b.site+'|'+ b.PartNo+'|'+b.WareHouseId+'|'+b.BatchNo+'|'+b.LocationId as seqNo,Round(dbo.Get_Part_NetWeight(b.Site,b.PartNo)*b.Qty/1000,2) weight
,dbo.Get_Part_DescSpec(a.Site,b.PartNo) partDesc,dbo.Get_WareHouseDesc(b.Site,b.WareHouseId) as wareHouseDesc,dbo.Get_Part_UMID(b.Site,b.PartNo) umid,dbo.get_expiredDate_print(b.Site,b.PartNo,b.BatchNo) expiredDate
from print_info a left join StockPrint b on a.site=b.site and a.orderref1=b.TransNo where a.status='N' and a.orderref2='库存标签'
from print_info a left join StockPrint b on a.site=b.site and a.orderref1=b.TransNo where a.status='N' and a.orderref2='库存标签' and b.site is not null
</select>
<select id="getStockPrintListForReturn" resultType="com.heai.modules.production.entity.StockPrintData">
select a.PrintQty,b.TransNo,b.Site,b.WareHouseId,b.BatchNo,b.LocationId,b.PartNo,b.OrderNo,b.TransDate,b.Qty,b.PrintFlag,b.site+'|'+ b.PartNo+'|'+b.WareHouseId+'|'+b.BatchNo+'|'+b.LocationId as seqNo,Round(dbo.Get_Part_NetWeight(b.Site,b.PartNo)*b.Qty/1000,2) weight
,dbo.Get_Part_DescSpec(a.Site,b.PartNo) partDesc,dbo.Get_WareHouseDesc(b.Site,b.WareHouseId) as wareHouseDesc,dbo.Get_Part_UMID(b.Site,b.PartNo) umid,dbo.get_expiredDate_print(b.Site,b.PartNo,b.BatchNo) expiredDate
from print_info a left join StockPrint b on a.site=b.site and a.orderref1=b.TransNo where a.status='N' and a.orderref2='退料标签'
from print_info a left join StockPrint b on a.site=b.site and a.orderref1=b.TransNo where a.status='N' and a.orderref2='退料标签' and b.site is not null
</select>
<select id="getStockPrintListHunlian" resultType="com.heai.modules.production.entity.StockPrintData">
select a.PrintQty,b.TransNo,b.Site,b.WareHouseId,b.BatchNo,b.LocationId,b.PartNo,b.OrderNo,b.TransDate,b.Qty,b.PrintFlag,b.site+'|'+ b.PartNo+'|'+b.WareHouseId+'|'+b.BatchNo+'|'+b.LocationId as seqNo,Round(dbo.Get_Part_NetWeight(b.Site,b.PartNo)*b.Qty/1000,2) weight
,dbo.Get_Part_DescSpec(a.Site,b.PartNo) partDesc,dbo.Get_WareHouseDesc(b.Site,b.WareHouseId) as wareHouseDesc,dbo.Get_Part_UMID(b.Site,b.PartNo) umid,dbo.get_expiredDate_print(b.Site,b.PartNo,b.BatchNo) expiredDate
from print_info a left join StockPrint b on a.site=b.site and a.orderref1=b.TransNo where a.status='N' and a.orderref2='混炼库存标签'
from print_info a left join StockPrint b on a.site=b.site and a.orderref1=b.TransNo where a.status='N' and a.orderref2='混炼库存标签' and b.site is not null
</select>
<select id="getStockPrintListHunlianReturn" resultType="com.heai.modules.production.entity.StockPrintData">
select a.PrintQty,b.TransNo,b.Site,b.WareHouseId,b.BatchNo,b.LocationId,b.PartNo,b.OrderNo,b.TransDate,b.Qty,b.PrintFlag,b.site+'|'+ b.PartNo+'|'+b.WareHouseId+'|'+b.BatchNo+'|'+b.LocationId as seqNo,Round(dbo.Get_Part_NetWeight(b.Site,b.PartNo)*b.Qty/1000,2) weight
,dbo.Get_Part_DescSpec(a.Site,b.PartNo) partDesc,dbo.Get_WareHouseDesc(b.Site,b.WareHouseId) as wareHouseDesc,dbo.Get_Part_UMID(b.Site,b.PartNo) umid,dbo.get_expiredDate_print(b.Site,b.PartNo,b.BatchNo) expiredDate
from print_info a left join StockPrint b on a.site=b.site and a.orderref1=b.TransNo where a.status='N' and a.orderref2='混炼退料标签'
from print_info a left join StockPrint b on a.site=b.site and a.orderref1=b.TransNo where a.status='N' and a.orderref2='混炼退料标签' and b.site is not null
</select>
<select id="getStockPrintListCaiGou" resultType="com.heai.modules.production.entity.StockPrintData">
Select D.TransNo,D.ItemNo,D.PartNo,dbo.Get_Part_DescSpec(D.Site,D.PartNo) as partDesc,dbo.Get_Part_UMID(D.Site,D.PartNo) as UMid

Loading…
Cancel
Save