@ -1,11 +1,13 @@
package org.nl.wms.st.inbill.service.impl ;
import cn.hutool.core.date.DateUtil ;
import cn.hutool.core.map.MapUtil ;
import cn.hutool.core.util.ObjectUtil ;
import cn.hutool.core.util.StrUtil ;
import com.alibaba.fastjson.JSON ;
import com.alibaba.fastjson.JSONArray ;
import com.alibaba.fastjson.JSONObject ;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper ;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper ;
import com.baomidou.mybatisplus.core.metadata.IPage ;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page ;
@ -13,16 +15,23 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j ;
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation ;
import org.nl.b_lms.pdm.subpackagerelation.dao.mapper.PdmBiSubpackagerelationMapper ;
import org.nl.b_lms.sch.point.dao.SchBasePoint ;
import org.nl.b_lms.sch.point.service.IschBasePointService ;
import org.nl.b_lms.sch.tasks.TwoInTask ;
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv ;
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinvdis ;
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinvdtl ;
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.mapper.StIvtIostorinvMapper ;
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.mapper.StIvtIostorinvdisMapper ;
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.mapper.StIvtIostorinvdtlMapper ;
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.* ;
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dao.mapper.* ;
import org.nl.b_lms.storage_manage.ios.service.iostorInv.dto.IostorInvQuery ;
import org.nl.b_lms.storage_manage.md.dao.MdMeMaterialBase ;
import org.nl.b_lms.storage_manage.md.dao.MdPbMeasureunit ;
import org.nl.b_lms.storage_manage.md.dao.mapper.MdMeMaterialBaseMapper ;
import org.nl.b_lms.storage_manage.md.dao.mapper.MdPbMeasureunitMapper ;
import org.nl.b_lms.storage_manage.st.dao.StIvtBsrealstorattr ;
import org.nl.b_lms.storage_manage.st.dao.StIvtSectattr ;
import org.nl.b_lms.storage_manage.st.dao.StIvtStructattr ;
import org.nl.b_lms.storage_manage.st.dao.mapper.StIvtBsrealstorattrMapper ;
import org.nl.b_lms.storage_manage.st.dao.mapper.StIvtSectattrMapper ;
import org.nl.b_lms.storage_manage.st.dao.mapper.StIvtStructattrMapper ;
import org.nl.modules.system.util.CodeUtil ;
import org.nl.common.utils.IdUtil ;
import org.nl.common.utils.SecurityUtils ;
import org.nl.modules.common.exception.BadRequestException ;
@ -30,6 +39,7 @@ import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject ;
import org.nl.modules.wql.util.SpringContextHolder ;
import org.nl.system.service.param.impl.SysParamServiceImpl ;
import org.nl.wms.basedata.st.service.dto.StorattrDto ;
import org.nl.wms.basedata.st.service.impl.StructattrServiceImpl ;
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl ;
import org.nl.wms.pda.mps.eum.RegionTypeEnum ;
@ -37,6 +47,7 @@ import org.nl.wms.sch.service.PointService;
import org.nl.wms.sch.service.dto.PointDto ;
import org.nl.wms.st.inbill.service.RawAssistIStorService ;
import org.nl.wms.st.inbill.service.StorPublicService ;
import org.nl.wms.st.inbill.service.dto.RawAssistIStorDto ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.data.domain.Pageable ;
import org.springframework.stereotype.Service ;
@ -56,76 +67,147 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
@Autowired
private PdmBiSubpackagerelationMapper pdmBiSubpackagerelationMapper ;
private PdmBiSubpackagerelationMapper pdmBiSubpackagerelationMapper ;
@Autowired
private StIvtIostorinvdisMapper stIvtIostorinvdisMapper ;
@Autowired
private StIvtIostorinvMapper stIvtIostorinvMapper ;
private StIvtIostorinvMapper stIvtIostorinvMapper ;
@Autowired
private StIvtIostorinvdtlMapper stIvtIostorinvdtlMapper ;
@Autowired
private MdMeMaterialBaseMapper mdMeMaterialBaseMapper ;
private MdMeMaterialBaseMapper mdMeMaterialBaseMapper ;
@Autowired
private PointService p ointService ;
private IschBasePointService ischBaseP ointService;
@Autowired
private InbillServiceImpl inbillService ;
@Autowired
private StorPublicService storPublicService ;
private StorPublicService storPublicService ;
@Autowired
private StIvtSectattrMapper stIvtSectattrMapper ;
@Autowired
private StIvtStructattrMapper stIvtStructattrMapper ;
@Autowired
private StIvtBsrealstorattrMapper stIvtBsrealstorattrMapper ;
@Autowired
private MdPbMeasureunitMapper mdPbMeasureunitMapper ;
@Override
public Map < String , Object > pageQuery ( Map whereJson , Pageable page ) {
JSONObject params = new JSONObject ( ) ;
RawAssistIStorDto rawAssistIStorDto = new RawAssistIStorDto ( ) ;
// 基础查询参数
params . put ( "buss_type" , whereJson . get ( "buss_type" ) ) ;
params . put ( "stor_id" , whereJson . get ( "stor_id" ) ) ;
params . put ( "bill_type" , whereJson . get ( "bill_type" ) ) ;
params . put ( "create_mode" , whereJson . get ( "create_mode" ) ) ;
params . put ( "bill_status" , whereJson . get ( "bill_status" ) ) ;
rawAssistIStorDto . setBussType ( ( String ) whereJson . get ( "buss_type" ) ) ;
rawAssistIStorDto . setStorId ( ( String ) whereJson . get ( "stor_id" ) ) ;
rawAssistIStorDto . setBillType ( ( String ) whereJson . get ( "bill_type" ) ) ;
rawAssistIStorDto . setCreateMode ( ( String ) whereJson . get ( "create_mode" ) ) ;
rawAssistIStorDto . setBillStatus ( ( String ) whereJson . get ( "bill_status" ) ) ;
// 模糊/集合查询参数
params . put ( "bill_code" , whereJson . get ( "bill_code" ) ) ;
params . put ( "sap_pcsn" , whereJson . get ( "sap_pcsn" ) ) ;
params . put ( "pcsn" , whereJson . get ( "pcsn" ) ) ;
params . put ( "box_no" , whereJson . get ( "box_no" ) ) ;
params . put ( "vbeln" , whereJson . get ( "vbeln" ) ) ;
rawAssistIStorDto . setBillCode ( ( String ) whereJson . get ( "bill_code" ) ) ;
String sap_pcsn = MapUtil . getStr ( whereJson , "sap_pcsn" ) ;
String pcsn = MapUtil . getStr ( whereJson , "pcsn" ) ;
String box_no = MapUtil . getStr ( whereJson , "box_no" ) ;
String vbeln = MapUtil . getStr ( whereJson , "vbeln" ) ;
// 空格查询
if ( StrUtil . isNotEmpty ( pcsn ) ) {
// 判断是否有空格
boolean matches = pcsn . matches ( ".*\\s.*" ) ;
if ( matches ) {
String [ ] s = pcsn . split ( " " ) ;
String pcsn_in = String . join ( "','" , Arrays . asList ( s ) ) ;
rawAssistIStorDto . setPcsnIn ( pcsn_in ) ;
} else {
rawAssistIStorDto . setPcsn ( pcsn ) ;
}
}
// 空格查询
if ( StrUtil . isNotEmpty ( sap_pcsn ) ) {
// 判断是否有空格
boolean matches = sap_pcsn . matches ( ".*\\s.*" ) ;
if ( matches ) {
String [ ] s = sap_pcsn . split ( " " ) ;
String sap_pcsn_in = String . join ( "','" , Arrays . asList ( s ) ) ;
rawAssistIStorDto . setSapPcsnIn ( sap_pcsn_in ) ;
} else {
rawAssistIStorDto . setSapPcsn ( sap_pcsn ) ;
}
}
// 空格查询
if ( StrUtil . isNotEmpty ( box_no ) ) {
// 判断是否有空格
boolean matches = box_no . matches ( ".*\\s.*" ) ;
if ( matches ) {
String [ ] s = box_no . split ( " " ) ;
String box_no_in = String . join ( "','" , Arrays . asList ( s ) ) ;
rawAssistIStorDto . setBoxNoIn ( box_no_in ) ;
} else {
rawAssistIStorDto . setBoxNo ( box_no ) ;
}
}
// 空格查询
if ( StrUtil . isNotEmpty ( vbeln ) ) {
// 判断是否有空格
boolean matches = vbeln . matches ( ".*\\s.*" ) ;
if ( matches ) {
String [ ] s = vbeln . split ( " " ) ;
String vbeln_in = String . join ( "','" , Arrays . asList ( s ) ) ;
rawAssistIStorDto . setVbelnIn ( vbeln_in ) ;
} else {
rawAssistIStorDto . setVbeln ( vbeln ) ;
}
}
// 时间范围
params . put ( "begin_time" , whereJson . get ( "begin_time" ) ) ;
params . put ( "end_time" , whereJson . get ( "end_time" ) ) ;
rawAssistIStorDto . setBeginTime ( ( String ) whereJson . get ( "begin_time" ) ) ;
rawAssistIStorDto . setEndTime ( ( String ) whereJson . get ( "end_time" ) ) ;
// 用户权限仓库
UserStorServiceImpl userStorService = new UserStorServiceImpl ( ) ;
String in_stor_id = userStorService . getInStor ( ) ;
if ( ObjectUtil . isNotEmpty ( in_stor_id ) ) {
params . put ( "in_stor_id" , in_stor_id ) ;
rawAssistIStorDto . setInStorId ( in_stor_id ) ;
}
// 多值查询处理:空格转 IN 列表
handleMultiValueParams ( whereJson , params , "pcsn" ) ;
handleMultiValueParams ( whereJson , params , "sap_pcsn" ) ;
handleMultiValueParams ( whereJson , params , "box_no" ) ;
handleMultiValueParams ( whereJson , params , "vbeln" ) ;
// 分页参数
int pageSize = page . getPageSize ( ) ;
int pageNumber = page . getPageNumber ( ) ;
int offset = ( pageNumber ) * pageSize ;
params . put ( "offset" , offset ) ;
params . put ( "limit" , pageSize ) ;
rawAssistIStorDto . setPageNum ( offset ) ;
rawAssistIStorDto . setPageSize ( pageSize ) ;
// 调用 MyBatis 查询
List < IostorInvQuery > list = stIvtIostorinvMapper . getIosInv ( params ) ;
List < IostorInvQuery > list = stIvtIostorinvMapper . getIosInv ( rawAssistIStorDto ) ;
// 返回结果
@ -135,19 +217,186 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
return result ;
}
/ * *
* 处理空格分隔的多值参数 ( 转换为 SQL IN 条件 )
* /
private void handleMultiValueParams ( Map source , Map target , String key ) {
String value = ( String ) source . get ( key ) ;
if ( StrUtil . isNotEmpty ( value ) ) {
if ( value . contains ( " " ) ) {
String [ ] values = value . split ( "\\s+" ) ;
target . put ( key + "_in" , Arrays . asList ( values ) ) ;
} else {
target . put ( key , value ) ;
@Override
@Transactional ( rollbackFor = Exception . class )
public String insertDtl ( Map whereJson ) {
ArrayList < HashMap < String , String > > rows = ( ArrayList < HashMap < String , String > > ) whereJson . get ( "tableData" ) ;
String currentUserId = SecurityUtils . getCurrentUserId ( ) ;
String nickName = SecurityUtils . getCurrentNickName ( ) ;
String now = DateUtil . now ( ) ;
double totalQty = 0 ;
String iostorinvId = cn . hutool . core . util . IdUtil . getSnowflake ( 1 , 1 ) . nextId ( ) + "" ;
String billCode = CodeUtil . getNewCode ( "IO_CODE" ) ;
StIvtBsrealstorattr stIvtBsrealstorattr = stIvtBsrealstorattrMapper . selectById ( Long . parseLong ( ( String ) whereJson . get ( "stor_id" ) ) ) ;
// 构建主表数据(使用 Builder)
StIvtIostorinv mst = StIvtIostorinv . builder ( )
. iostorinv_id ( iostorinvId )
. bill_code ( billCode )
. buss_type ( ( ( String ) whereJson . get ( "bill_type" ) ) . substring ( 0 , 4 ) )
. io_type ( "0" )
. bill_type ( ( String ) whereJson . get ( "bill_type" ) )
. biz_date ( whereJson . get ( "biz_date" ) . toString ( ) . substring ( 0 , 10 ) )
. stor_id ( Long . valueOf ( ( String ) whereJson . get ( "stor_id" ) ) )
. stor_code ( stIvtBsrealstorattr . getStor_code ( ) )
. stor_name ( stIvtBsrealstorattr . getStor_name ( ) )
. detail_count ( BigDecimal . valueOf ( rows . size ( ) ) )
. remark ( ( String ) whereJson . get ( "remark" ) )
. bill_status ( ( String ) whereJson . get ( "bill_status" ) )
. create_mode ( "01" )
. input_optid ( Long . valueOf ( currentUserId ) )
. input_optname ( nickName )
. input_time ( String . valueOf ( DateUtil . parse ( now ) ) )
. update_optid ( Long . valueOf ( currentUserId ) )
. update_optname ( nickName )
. update_time ( String . valueOf ( DateUtil . parse ( now ) ) )
. is_delete ( "0" )
. is_upload ( "0" )
. sysdeptid ( SecurityUtils . getDeptId ( ) )
. syscompanyid ( SecurityUtils . getDeptId ( ) )
. build ( ) ;
for ( int i = 0 ; i < rows . size ( ) ; i + + ) {
HashMap < String , String > row = rows . get ( i ) ;
// 获取物料信息
String productName = row . get ( "product_name" ) ;
QueryWrapper < MdMeMaterialBase > materialWrapper = new QueryWrapper < > ( ) ;
materialWrapper . eq ( "material_code" , productName ) ;
MdMeMaterialBase material = mdMeMaterialBaseMapper . selectOne ( materialWrapper ) ;
if ( material = = null ) {
throw new BadRequestException ( "LMS系统不存在物料:【" + productName + "】" ) ;
}
QueryWrapper < MdPbMeasureunit > queryWrapper = new QueryWrapper < > ( ) ;
queryWrapper . eq ( "measure_unit_id" , material . getBase_unit_id ( ) ) ;
MdPbMeasureunit unit = mdPbMeasureunitMapper . selectOne ( queryWrapper ) ;
if ( unit = = null ) {
throw new BadRequestException ( "找不到对应的计量单位:" + material . getBase_unit_id ( ) ) ;
}
// 插入明细表(使用 Builder)
StIvtIostorinvdtl dtl = StIvtIostorinvdtl . builder ( )
. iostorinvdtl_id ( IdUtil . getStringId ( ) )
. iostorinv_id ( iostorinvId )
. seq_no ( BigDecimal . valueOf ( i + 1 ) )
. material_id ( material . getMaterial_id ( ) )
. pcsn ( row . get ( "container_name" ) )
. bill_status ( "10" )
. quality_scode ( "01" )
. qty_unit_id ( material . getBase_unit_id ( ) )
. qty_unit_name ( unit . getUnit_name ( ) )
. assign_qty ( new BigDecimal ( row . get ( "net_weight" ) ) )
. plan_qty ( new BigDecimal ( row . get ( "net_weight" ) ) )
. box_no ( row . get ( "package_box_sn" ) )
. build ( ) ;
stIvtIostorinvdtlMapper . insert ( dtl ) ;
// 查询是否已经分配货位或任务
String boxNo = row . get ( "package_box_sn" ) ;
List < StIvtIostorinvdis > nowDisRows = stIvtIostorinvdisMapper . getstartAndDisRows ( boxNo ) ;
if ( ! nowDisRows . isEmpty ( ) ) {
throw new BadRequestException ( "该木箱已经分配过货位,无法继续分配!" ) ;
}
// 检查木箱是否在库内
QueryWrapper < StIvtStructattr > structQueryWrapper = new QueryWrapper < > ( ) ;
structQueryWrapper . eq ( "storagevehicle_code" , boxNo ) ;
StIvtStructattr structattr = stIvtStructattrMapper . selectOne ( structQueryWrapper ) ;
if ( structattr ! = null ) {
throw new BadRequestException ( "木箱:" + boxNo + "已存在库内,请对数据进行核实!" ) ;
}
String planQtyStr = row . get ( "plan_qty" ) ;
BigDecimal planQty = planQtyStr = = null | | planQtyStr . trim ( ) . isEmpty ( )
? BigDecimal . ZERO
: new BigDecimal ( planQtyStr ) ;
// 插入分配表(使用 Builder)
StIvtIostorinvdis dis = StIvtIostorinvdis . builder ( )
. iostorinvdis_id ( cn . hutool . core . util . IdUtil . getSnowflake ( 1 , 1 ) . nextId ( ) + "" )
. iostorinv_id ( iostorinvId )
. iostorinvdtl_id ( dtl . getIostorinvdtl_id ( ) )
. seq_no ( BigDecimal . ONE )
. material_id ( material . getMaterial_id ( ) )
. pcsn ( row . get ( "container_name" ) )
. box_no ( boxNo )
. storagevehicle_code ( boxNo )
. quality_scode ( row . get ( "quality_scode" ) )
. work_status ( "00" )
. qty_unit_id ( material . getBase_unit_id ( ) )
. qty_unit_name ( unit . getUnit_name ( ) )
. plan_qty ( planQty )
. build ( ) ;
stIvtIostorinvdisMapper . insert ( dis ) ;
// 更新包装关系状态
String billType = ( String ) whereJson . get ( "bill_type" ) ;
String targetStatus = "0003" . equals ( billType ) ? "3" : "0" ;
QueryWrapper < PdmBiSubpackagerelation > wrapper = new QueryWrapper < > ( ) ;
wrapper . eq ( "package_box_sn" , dis . getBox_no ( ) )
. eq ( "status" , "1" ) ; // 原状态是 0 才更新
PdmBiSubpackagerelation relation = new PdmBiSubpackagerelation ( ) ;
relation . setStatus ( targetStatus ) ;
pdmBiSubpackagerelationMapper . update ( relation , wrapper ) ;
totalQty + = Double . parseDouble ( row . get ( "net_weight" ) ) ;
}
// 更新主表总数量
mst . setTotal_qty ( BigDecimal . valueOf ( totalQty ) ) ;
// 插入主表
stIvtIostorinvMapper . insert ( mst ) ;
return iostorinvId ;
}
@Override
public JSONArray getDisDtl ( Map whereJson ) {
//查询该明细下的所有入库分配载具明细
String iostorinv_id = ( String ) whereJson . get ( "iostorinv_id" ) ;
List < StIvtIostorinvdis > disRows = stIvtIostorinvdisMapper . selectList ( new QueryWrapper < StIvtIostorinvdis > ( )
. eq ( "iostorinvdtl_id" , whereJson . get ( "iostorinvdtl_id" ) )
. and ( wrapper - > wrapper . isNull ( "task_id" ) . or ( ) . eq ( "task_id" , "" ) ) ) ;
HashSet < String > vehicle_set = new HashSet < > ( ) ;
for ( int j = 0 ; j < disRows . size ( ) ; j + + ) {
vehicle_set . add ( disRows . get ( j ) . getBox_no ( ) ) ;
}
return stIvtIostorinvdisMapper . getDisDtls ( vehicle_set , iostorinv_id ) ;
}
@Override
public JSONArray getIODtl ( Map whereJson ) {
String id = ( String ) whereJson . get ( "bill_code" ) ;
String open_flag = ( String ) whereJson . get ( "open_flag" ) ;
JSONArray ja = stIvtIostorinvdtlMapper . selectIoDtl ( id , open_flag ) ;
return ja ;
}
@ -314,10 +563,10 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
JSONObject unit = WQLObject . getWQLObject ( "md_pb_measureunit" ) . query ( "measure_unit_id = '" + material . getBase_unit_id ( ) + "'" ) . uniqueResult ( 0 ) ;
// 构建明细数据
Lo ng iostorinvdtlId = IdUtil . getLo ngId ( ) ;
StIvtIostorinvdtl dtl = StIvtIostorinvdtl . builder ( )
Stri ng iostorinvdtlId = IdUtil . getStri ngId ( ) ;
StIvtIostorinvdtl dtl = StIvtIostorinvdtl . builder ( )
. iostorinvdtl_id ( iostorinvdtlId )
. iostorinv_id ( Long . valueOf ( iostorinvId ) )
. iostorinv_id ( iostorinvId )
. seq_no ( BigDecimal . valueOf ( + + index ) )
. material_id ( material . getMaterial_id ( ) )
. pcsn ( row . get ( "container_name" ) )
@ -332,8 +581,8 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
// 构建 dis 数据
StIvtIostorinvdis dis = StIvtIostorinvdis . builder ( )
. iostorinvdis_id ( IdUtil . getLo ngId ( ) )
. iostorinv_id ( Long . valueOf ( iostorinvId ) )
. iostorinvdis_id ( IdUtil . getStri ngId ( ) )
. iostorinv_id ( iostorinvId )
. iostorinvdtl_id ( iostorinvdtlId )
. seq_no ( new BigDecimal ( 1 ) )
. material_id ( material . getMaterial_id ( ) )
@ -360,7 +609,6 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
}
@Transactional ( rollbackFor = Exception . class )
@Override
public void divStruct ( Map whereJson ) {
@ -382,19 +630,23 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
auto_div = whereJson2 . getBoolean ( "auto_div" ) ;
}
//判断该载具是否已经分配货位或者起点
JSONArray now_dis_rows = WQL . getWO ( "QST_IVT_RAWASSISTISTOR" ) . addParam ( "flag" , "17" ) . addParam ( "box_no" , map . get ( "box_no" ) ) . process ( ) . getResultJSONArray ( 0 ) ;
if ( now_dis_r ows . size ( ) > 0 & & ! auto_div ) {
List < StIvtIostorinvdis > nowDisRows = stIvtIostorinvdisMapper . getstartAndDisRows ( map . get ( "box_no" ) ) ;
if ( nowDisR ows . size ( ) > 0 & & ! auto_div ) {
throw new BadRequestException ( "该木箱已经分配过货位,无法继续分配!" ) ;
}
String point_code = map . get ( "point_code" ) ;
if ( StrUtil . isNotEmpty ( point_code ) ) {
HashMap < String , String > point_map = new HashMap < > ( ) ;
PointDto pointDto = pointService . findByCode ( point_code ) ;
point_map . put ( "point_code" , pointDto . getPoint_code ( ) ) ;
point_map . put ( "point_id" , pointDto . getPoint_id ( ) + "" ) ;
point_map . put ( "point_name" , pointDto . getPoint_name ( ) ) ;
WQLObject . getWQLObject ( "ST_IVT_IOStorInvDis" ) . update ( point_map , "iostorinv_id = '" + map . get ( "iostorinv_id" ) + "' AND box_no = '" + map . get ( "box_no" ) + "'" ) ;
SchBasePoint pointDto = ischBasePointService . findByCode ( point_code ) ;
StIvtIostorinvdis stIvtIostorinvdis = StIvtIostorinvdis . builder ( )
. point_id ( pointDto . getPoint_id ( ) )
. build ( ) ;
QueryWrapper < StIvtIostorinvdis > queryWrapper = new QueryWrapper < > ( ) ;
queryWrapper . eq ( "iostorinv_id" , map . get ( "iostorinv_id" ) )
. eq ( "box_no" , map . get ( "box_no" ) ) ;
stIvtIostorinvdisMapper . update ( stIvtIostorinvdis , queryWrapper ) ;
}
Boolean checked = whereJson2 . getBoolean ( "checked" ) ;
@ -405,12 +657,22 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
JSONObject struct_jo = new JSONObject ( ) ;
if ( whereJson . containsKey ( "sect_id" ) ) {
String need_sect = ( String ) whereJson . get ( "sect_id" ) ;
JSONObject need_sect_jo = WQLObject . getWQLObject ( "st_ivt_sectattr" ) . query ( "sect_id = '" + need_sect + "'" ) . uniqueResult ( 0 ) ;
// 查询 st_ivt_sectattr 表
QueryWrapper < StIvtSectattr > sectattrQueryWrapper = new QueryWrapper < > ( ) ;
sectattrQueryWrapper . eq ( "sect_id" , need_sect ) ;
StIvtSectattr sectattr = stIvtSectattrMapper . selectOne ( sectattrQueryWrapper ) ;
//判断是否为主存区,主存区调用自动分配,虚拟区调用普通查询
if ( StrUtil . isNotEmpty ( need_sect ) & & ! "00" . equals ( need_sect_jo . getString ( "sect_type_attr" ) ) ) {
struct_jo = WQLObject . getWQLObject ( "st_ivt_structattr" ) . query ( "sect_id = '" + need_sect + "' AND lock_type = '1' AND is_delete = '0' AND IFNULL( storagevehicle_code, '' ) = ''" ) . uniqueResult ( 0 ) ;
// 如果为空则扩容
if ( ObjectUtil . isEmpty ( struct_jo ) ) {
if ( StrUtil . isNotEmpty ( need_sect ) & & ! "00" . equals ( sectattr . getSect_type_attr ( ) ) ) {
QueryWrapper < StIvtStructattr > queryWrapper = new QueryWrapper < > ( ) ;
queryWrapper . eq ( "sect_id" , need_sect )
. eq ( "lock_type" , "1" )
. eq ( "is_delete" , "0" )
. isNull ( "storagevehicle_code" ) ; // storagevehicle_code IS NULL
StIvtStructattr structattr = stIvtStructattrMapper . selectOne ( queryWrapper ) ;
if ( structattr = = null ) {
JSONObject jsonParam = new JSONObject ( ) ;
jsonParam . put ( "sect_id" , whereJson . get ( "sect_id" ) ) ;
jsonParam . put ( "stor_id" , whereJson . get ( "stor_id" ) ) ;
@ -419,7 +681,13 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
StructattrServiceImpl bean = SpringContextHolder . getBean ( StructattrServiceImpl . class ) ;
bean . oneCreate ( jsonParam ) ;
struct_jo = WQLObject . getWQLObject ( "st_ivt_structattr" ) . query ( "sect_id = '" + need_sect + "' AND lock_type = '1' AND is_delete = '0' AND IFNULL( storagevehicle_code, '' ) = ''" ) . uniqueResult ( 0 ) ;
// 再次查询
structattr = stIvtStructattrMapper . selectOne ( queryWrapper ) ;
}
if ( structattr ! = null ) {
struct_jo = JSON . parseObject ( JSON . toJSONString ( structattr ) ) ;
}
} else {
jo_form . put ( "sect_id" , whereJson . get ( "sect_id" ) ) ;
@ -440,13 +708,19 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
struct_code = struct_jo . getString ( "struct_code" ) ;
struct_name = struct_jo . getString ( "struct_name" ) ;
} else {
//更新入库分配表仓位相关字段
// 校验仓位是否满足此木箱高度
JSONObject jsonSub = WQLObject . getWQLObject ( "pdm_bi_subpackagerelation" ) . query ( "package_box_sn = '" + map . get ( "box_no" ) + "'" ) . uniqueResult ( 0 ) ;
double box_high = jsonSub . getDoubleValue ( "box_high" ) ;
QueryWrapper < PdmBiSubpackagerelation > queryWrapper = new QueryWrapper < > ( ) ;
if ( StrUtil . isNotEmpty ( map . get ( "box_no" ) ) ) {
queryWrapper . eq ( "package_box_sn" , map . get ( "box_no" ) ) ;
}
PdmBiSubpackagerelation pdmBiSubpackagerelation = pdmBiSubpackagerelationMapper . selectOne ( queryWrapper ) ;
//更新入库分配表仓位相关字段
double box_high = Double . parseDouble ( pdmBiSubpackagerelation . getBox_high ( ) ) ;
JSONObject jsonAttr = WQLObject . getWQLObject ( "st_ivt_structattr" ) . query ( "struct_code = '" + map . get ( "struct_code" ) + "'" ) . uniqueResult ( 0 ) ;
StIvtStructattr stIvtStructattr = stIvtStructattrMapper . selectOne ( new LambdaQueryWrapper < StIvtStructattr > ( )
. eq ( StIvtStructattr : : getStruct_code , map . get ( "struct_code" ) ) ) ;
// 入库木箱下限
String in_download_box_high = SpringContextHolder . getBean ( SysParamServiceImpl . class ) . findByCode ( "in_download_box_high" ) . getValue ( ) ;
@ -454,11 +728,11 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
String in_up_box_high = SpringContextHolder . getBean ( SysParamServiceImpl . class ) . findByCode ( "in_up_box_high" ) . getValue ( ) ;
if ( Double . parseDouble ( in_download_box_high ) < box_high & & box_high < = Double . parseDouble ( in_up_box_high ) ) {
if ( StrUtil . equals ( jsonAttr . getString ( "layer_num" ) , "3" ) ) {
if ( box_high > jsonAttr . getDoubleValue ( "height" ) ) {
if ( StrUtil . equals ( String . valueOf ( stIvtStructattr . getLayer_num ( ) ) , "3" ) ) {
if ( box_high > Double . parseDouble ( stIvtStructattr . getHeight ( ) . toString ( ) ) ) {
throw new BadRequestException ( "木箱高度不符,请检查!" ) ;
}
} else if ( StrUtil . equals ( jsonAttr . getString ( "layer_num" ) , "1" ) ) {
} else if ( StrUtil . equals ( String . valueOf ( stIvtStructattr . getLayer_num ( ) ) , "1" ) ) {
if ( box_high > Double . parseDouble ( in_download_box_high ) ) {
throw new BadRequestException ( "木箱高度不符,请检查!" ) ;
}
@ -476,118 +750,176 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
struct_code = map . get ( "struct_code" ) ;
struct_name = map . get ( "struct_name" ) ;
}
HashMap < String , String > dis_map = new HashMap ( ) ;
dis_map . put ( "sect_id" , sect_id ) ;
dis_map . put ( "sect_code" , sect_code ) ;
dis_map . put ( "sect_name" , sect_name ) ;
dis_map . put ( "struct_id" , struct_id ) ;
dis_map . put ( "struct_code" , struct_code ) ;
dis_map . put ( "struct_name" , struct_name ) ;
StIvtIostorinvdis dis = StIvtIostorinvdis . builder ( )
. sect_id ( Long . valueOf ( sect_id ) )
. sect_code ( sect_code )
. sect_name ( sect_name )
. struct_id ( Long . valueOf ( struct_id ) )
. struct_code ( struct_code )
. struct_name ( struct_name )
. build ( ) ;
//锁定货位
JSONObject lock_map = new JSONObject ( ) ;
lock_map . put ( "end_point" , struct_code ) ;
//查询主表信息
JSONObject mst = WQLObject . getWQLObject ( "st_ivt_iostorinv" ) . query ( "iostorinv_id = '" + map . get ( "iostorinv_id" ) + "'" ) . uniqueResult ( 0 ) ;
lock_map . put ( "inv_type" , mst . get ( "bill_type" ) ) ;
lock_map . put ( "inv_id" , mst . get ( "iostorinv_id" ) ) ;
lock_map . put ( "inv_code" , mst . get ( "bill_code" ) ) ;
inbillService . operatePoint ( "0" , lock_map ) ;
StIvtIostorinv mst = stIvtIostorinvMapper . selectOne ( new LambdaQueryWrapper < StIvtIostorinv > ( )
. eq ( StIvtIostorinv : : getIostorinv_id , map . get ( "iostorinv_id" ) ) ) ;
//判断起点是否不为空
JSONObject ios_dis = WQLObject . getWQLObject ( "ST_IVT_IOStorInvDis" ) . query ( "iostorinv_id = '" + map . get ( "iostorinv_id" ) + "' AND box_no = '" + map . get ( "box_no" ) + "'" ) . uniqueResult ( 0 ) ;
JSONObject mstJson = JSON . parseObject ( JSON . toJSONString ( mst ) ) ;
lock_map . put ( "inv_type" , mstJson . get ( "bill_type" ) ) ;
lock_map . put ( "inv_id" , mstJson . get ( "iostorinv_id" ) ) ;
lock_map . put ( "inv_code" , mstJson . get ( "bill_code" ) ) ;
inbillService . operatePoint ( "0" , lock_map ) ;
JSONObject sect_jo = WQLObject . getWQLObject ( "st_ivt_sectattr" ) . query ( "sect_id ='" + sect_id + "'" ) . uniqueResult ( 0 ) ;
boolean is_virtual = false ;
if ( "09" . equals ( sect_jo . getString ( "sect_type_attr" ) ) ) {
is_virtual = true ;
String task_id = cn . hutool . core . util . IdUtil . getSnowflake ( 1 , 1 ) . nextId ( ) + "" ;
dis_map . put ( "task_id" , task_id ) ;
dis_map . put ( "work_status" , "01" ) ;
// 判断起点是否不为空
String iostorinvId = map . get ( "iostorinv_id" ) ;
String boxNo = map . get ( "box_no" ) ;
// 查询 ST_IVT_IOStorInvDis 表
StIvtIostorinvdis iosDis = stIvtIostorinvdisMapper . selectOne ( new LambdaQueryWrapper < StIvtIostorinvdis > ( )
. eq ( StIvtIostorinvdis : : getIostorinv_id , iostorinvId )
. eq ( StIvtIostorinvdis : : getBox_no , boxNo ) ) ;
boolean isVirtual = false ;
if ( sect_id ! = null ) {
// 查询 st_ivt_sectattr 表
StIvtSectattr sectAttr = stIvtSectattrMapper . selectOne ( new LambdaQueryWrapper < StIvtSectattr > ( )
. eq ( StIvtSectattr : : getSect_id , sect_id ) ) ;
if ( "09" . equals ( sectAttr . getSect_type_attr ( ) ) ) {
isVirtual = true ;
String taskId = cn . hutool . core . util . IdUtil . getSnowflake ( 1 , 1 ) . nextIdStr ( ) ;
dis . setTask_id ( Long . valueOf ( taskId ) ) ;
dis . setWork_status ( "01" ) ;
}
}
if ( StrUtil . isNotEmpty ( ios_dis . getString ( "point_id" ) ) & & ! is_virtual ) {
//创建任务并下发
// 创建任务并下发
if ( iosDis ! = null & & ObjectUtil . isNotEmpty ( iosDis . getPoint_id ( ) ) & & ! isVirtual ) {
TwoInTask task = new TwoInTask ( ) ;
JSONObject task_form = new JSONObject ( ) ;
task_form . put ( "task_type" , "010501" ) ;
task_form . put ( "start_device_code" , map . get ( "point_code" ) ) ;
task_form . put ( "next_device_code" , struct_code ) ;
task_form . put ( "vehicle_code" , map . get ( "box_no" ) ) ;
task_form . put ( "storagevehicle_type" , map . get ( "storagevehicle_type" ) ) ;
String task_id = task . createTask ( task_form ) ;
// 下发
task . immediateNotifyAcs ( task_id ) ;
/ * if ( whereJson . containsKey ( "auto_issue" ) ) {
} * /
dis_map . put ( "task_id" , task_id ) ;
dis_map . put ( "work_status" , "01" ) ;
JSONObject taskForm = new JSONObject ( ) ;
taskForm . put ( "task_type" , "010501" ) ;
taskForm . put ( "start_device_code" , map . get ( "point_code" ) ) ;
taskForm . put ( "next_device_code" , struct_code ) ;
taskForm . put ( "vehicle_code" , boxNo ) ;
taskForm . put ( "storagevehicle_type" , map . get ( "storagevehicle_type" ) ) ;
String taskId = task . createTask ( taskForm ) ;
task . immediateNotifyAcs ( taskId ) ;
dis . setTask_id ( Long . valueOf ( taskId ) ) ;
dis . setWork_status ( "01" ) ;
}
WQLObject . getWQLObject ( "ST_IVT_IOStorInvDis" ) . update ( dis_map , "iostorinv_id = '" + map . get ( "iostorinv_id" ) + "' AND box_no = '" + map . get ( "box_no" ) + "'" ) ;
//修改库存
//直接取出入库分配表的库存
JSONArray dis_rows = WQLObject . getWQLObject ( "ST_IVT_IOStorInvDis" ) . query ( "iostorinv_id = '" + map . get ( "iostorinv_id" ) + "' AND box_no = '" + map . get ( "box_no" ) + "'" ) . getResultJSONArray ( 0 ) ;
JSONObject mst_jo = WQLObject . getWQLObject ( "ST_IVT_IOStorInv" ) . query ( "iostorinv_id = '" + map . get ( "iostorinv_id" ) + "'" ) . uniqueResult ( 0 ) ;
for ( int i = 0 ; i < dis_rows . size ( ) ; i + + ) {
JSONObject dis_jo = dis_rows . getJSONObject ( i ) ;
JSONObject i_form = new JSONObject ( ) ;
i_form . put ( "struct_id" , dis_jo . getString ( "struct_id" ) ) ;
i_form . put ( "material_id" , dis_jo . getString ( "material_id" ) ) ;
i_form . put ( "pcsn" , dis_jo . getString ( "pcsn" ) ) ;
i_form . put ( "change_qty" , dis_jo . getString ( "plan_qty" ) ) ;
i_form . put ( "bill_type_scode" , mst_jo . getString ( "bill_type" ) ) ;
i_form . put ( "quality_scode" , "01" ) ;
i_form . put ( "inv_id" , mst_jo . getString ( "iostorinv_id" ) ) ;
i_form . put ( "bill_code" , mst_jo . getString ( "bill_code" ) ) ;
i_form . put ( "bill_table" , "ST_IVT_IOStorInv" ) ;
i_form . put ( "qty_unit_id" , dis_jo . getString ( "qty_unit_id" ) ) ;
i_form . put ( "qty_unit_name" , dis_jo . getString ( "qty_unit_name" ) ) ;
storPublicService . IOStor ( i_form , "31" ) ;
JSONObject dtl_jo = WQLObject . getWQLObject ( "ST_IVT_IOStorInvDtl" ) . query ( "iostorinvdtl_id = '" + dis_jo . getString ( "iostorinvdtl_id" ) + "'" ) . uniqueResult ( 0 ) ;
if ( StrUtil . isNotEmpty ( ios_dis . getString ( "point_id" ) ) | | is_virtual ) {
if ( dtl_jo . getDoubleValue ( "unassign_qty" ) = = 0 ) {
//判断该明细下是否还存在未分配货位的分配明细
JSONArray disdiv_rows = WQLObject . getWQLObject ( "ST_IVT_IOStorInvDis" ) . query ( "iostorinvdtl_id = '" + dis_jo . getString ( "iostorinvdtl_id" ) + "' AND (struct_id = '' OR struct_id is null) AND (point_id = '' OR point_id is null)" ) . getResultJSONArray ( 0 ) ;
if ( disdiv_rows . size ( ) = = 0 ) {
dtl_jo . put ( "bill_status" , "40" ) ;
WQLObject . getWQLObject ( "ST_IVT_IOStorInvDtl" ) . update ( dtl_jo ) ;
//判断主表下的明细是否都为40
JSONArray dtl_rows = WQLObject . getWQLObject ( "ST_IVT_IOStorInvDtl" ) . query ( "iostorinv_id = '" + dis_jo . getString ( "iostorinv_id" ) + "' AND bill_status < '40'" ) . getResultJSONArray ( 0 ) ;
if ( dtl_rows . size ( ) = = 0 ) {
mst_jo . put ( "bill_status" , "40" ) ;
mst_jo . put ( "dis_optid" , currentUserId ) ;
mst_jo . put ( "dis_optname" , nickName ) ;
mst_jo . put ( "dis_time" , now ) ;
WQLObject . getWQLObject ( "ST_IVT_IOStorInv" ) . update ( mst_jo ) ;
// 更新 ST_IVT_IOStorInvDis 表
stIvtIostorinvdisMapper . update ( dis , new LambdaQueryWrapper < StIvtIostorinvdis > ( )
. eq ( StIvtIostorinvdis : : getIostorinv_id , iostorinvId )
. eq ( StIvtIostorinvdis : : getBox_no , boxNo ) ) ;
// 查询分配明细和主表信息
List < StIvtIostorinvdis > disRows = stIvtIostorinvdisMapper . selectList ( new LambdaQueryWrapper < StIvtIostorinvdis > ( )
. eq ( StIvtIostorinvdis : : getIostorinv_id , iostorinvId )
. eq ( StIvtIostorinvdis : : getBox_no , boxNo ) ) ;
StIvtIostorinv mst2 = stIvtIostorinvMapper . selectById ( iostorinvId ) ;
JSONObject mstJo = JSON . parseObject ( JSON . toJSONString ( mst2 ) ) ;
for ( StIvtIostorinvdis stIvtIostorinvdis : disRows ) {
JSONObject iForm = new JSONObject ( ) ;
iForm . put ( "struct_id" , stIvtIostorinvdis . getStruct_id ( ) ) ;
iForm . put ( "material_id" , stIvtIostorinvdis . getMaterial_id ( ) ) ;
iForm . put ( "pcsn" , stIvtIostorinvdis . getPcsn ( ) ) ;
iForm . put ( "change_qty" , stIvtIostorinvdis . getPlan_qty ( ) ) ;
iForm . put ( "bill_type_scode" , mstJo . getString ( "bill_type" ) ) ;
iForm . put ( "quality_scode" , "01" ) ;
iForm . put ( "inv_id" , mstJo . getString ( "iostorinv_id" ) ) ;
iForm . put ( "bill_code" , mstJo . getString ( "bill_code" ) ) ;
iForm . put ( "bill_table" , "ST_IVT_IOStorInv" ) ;
iForm . put ( "qty_unit_id" , stIvtIostorinvdis . getQty_unit_id ( ) ) ;
iForm . put ( "qty_unit_name" , stIvtIostorinvdis . getQty_unit_name ( ) ) ;
storPublicService . IOStor ( iForm , "31" ) ;
// 查询明细
StIvtIostorinvdtl dtl = stIvtIostorinvdtlMapper . selectById ( dis . getIostorinvdtl_id ( ) ) ;
if ( ObjectUtil . isNotEmpty ( iosDis . getPoint_id ( ) ) | | isVirtual ) {
if ( dtl . getUnassign_qty ( ) . doubleValue ( ) = = 0 ) {
// 查询未分配的明细
List < StIvtIostorinvdis > disDivList = stIvtIostorinvdisMapper . selectList ( new LambdaQueryWrapper < StIvtIostorinvdis > ( )
. eq ( StIvtIostorinvdis : : getIostorinvdtl_id , dis . getIostorinvdtl_id ( ) )
. isNull ( StIvtIostorinvdis : : getStruct_id )
. isNull ( StIvtIostorinvdis : : getPoint_id ) ) ;
if ( disDivList . isEmpty ( ) ) {
dtl . setBill_status ( "40" ) ;
stIvtIostorinvdtlMapper . updateById ( dtl ) ;
// 查询主表下的明细状态
List < StIvtIostorinvdtl > dtlList = stIvtIostorinvdtlMapper . selectList ( new LambdaQueryWrapper < StIvtIostorinvdtl > ( )
. eq ( StIvtIostorinvdtl : : getIostorinv_id , iostorinvId )
. lt ( StIvtIostorinvdtl : : getBill_status , "40" ) ) ;
if ( dtlList . isEmpty ( ) ) {
mst . setBill_status ( "40" ) ;
mst . setDis_optid ( Long . valueOf ( currentUserId ) ) ;
mst . setDis_optname ( nickName ) ;
mst . setDis_time ( DateUtil . now ( ) ) ;
stIvtIostorinvMapper . updateById ( mst ) ;
} else {
mst_jo . put ( "bill_status" , "30" ) ;
mst_jo . put ( "dis_optid" , currentUserId ) ;
mst_jo . put ( "dis_optname" , nickName ) ;
mst_jo . put ( "dis_time" , now ) ;
WQLObject . getWQLObject ( "ST_IVT_IOStorInv" ) . update ( mst_jo ) ;
mst . setBill_status ( "30" ) ;
mst . setDis_optid ( Long . valueOf ( currentUserId ) ) ;
mst . setDis_optname ( nickName ) ;
mst . setDis_time ( DateUtil . now ( ) ) ;
stIvtIostorinvMapper . updateById ( mst ) ;
}
}
}
} else {
dtl_jo . put ( "bill_status" , "30" ) ;
WQLObject . getWQLObject ( "ST_IVT_IOStorInvDtl" ) . update ( dtl_jo ) ;
mst_jo . put ( "bill_status" , "30" ) ;
mst_jo . put ( "dis_optid" , currentUserId ) ;
mst_jo . put ( "dis_optname" , nickName ) ;
mst_jo . put ( "dis_time" , now ) ;
WQLObject . getWQLObject ( "ST_IVT_IOStorInv" ) . update ( mst_jo ) ;
dtl . setBill_status ( "30" ) ;
stIvtIostorinvdtlMapper . updateById ( dtl ) ;
mst . setBill_status ( "30" ) ;
mst . setDis_optid ( Long . valueOf ( currentUserId ) ) ;
mst . setDis_optname ( nickName ) ;
mst . setDis_time ( DateUtil . now ( ) ) ;
stIvtIostorinvMapper . updateById ( mst ) ;
}
}
//如果是虚拟区,直接更新完成分配任务
if ( is_v irtual ) {
if ( isV irtual ) {
JSONObject dis_form = new JSONObject ( ) ;
dis_form . put ( "task_id" , dis_map . get ( "task_id" ) ) ;
dis_form . put ( "task_id" , dis . getTask_id ( ) ) ;
inbillService . confirmDis ( dis_form ) ;
}
}
@Override
public JSONArray queryBoxMater ( JSONArray rows ) {
JSONArray total_rows = new JSONArray ( ) ;
HashSet < String > set = new HashSet < > ( ) ;
for ( int i = 0 ; i < rows . size ( ) ; i + + ) {
JSONObject row = rows . getJSONObject ( i ) ;
String package_box_sn = row . getString ( "package_box_sn" ) ;
set . add ( package_box_sn ) ;
}
for ( String s : set ) {
List < PdmBiSubpackagerelation > pdmBiSubpackagerelations = pdmBiSubpackagerelationMapper . selectList ( new LambdaQueryWrapper < PdmBiSubpackagerelation > ( ) . eq ( PdmBiSubpackagerelation : : getPackage_box_sn , s ) . eq ( PdmBiSubpackagerelation : : getStatus , "0" ) ) ;
for ( int i = 0 ; i < pdmBiSubpackagerelations . size ( ) ; i + + ) {
JSONObject mater = JSON . parseObject ( JSON . toJSONString ( pdmBiSubpackagerelations . get ( i ) ) ) ;
total_rows . add ( mater ) ;
}
}
return total_rows ;
}
@Override
public JSONObject autoDis ( JSONObject whereJson ) {
/ *
@ -1091,15 +1423,15 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
jsonParam . put ( "sect_id" , RegionTypeEnum . ZC01 . getId ( ) ) ;
jsonParam . put ( "sect_code" , "ZC01" ) ;
jsonParam . put ( "sect_name" , RegionTypeEnum . ZC01 . getName ( ) ) ;
attr . update ( jsonParam , "sect_code = 'KTP01' AND block_num = '" + json . getString ( "block_num" ) + "' AND row_num = '" + json . getString ( "row_num" ) + "' AND layer_num = '1'" ) ;
attr . update ( jsonParam , "sect_code = 'KTP01' AND block_num = '" + json . getString ( "block_num" ) + "' AND row_num = '" + json . getString ( "row_num" ) + "' AND layer_num = '1'" ) ;
// 更新点位为主存区域
jsonParam . put ( "region_id" , RegionTypeEnum . ZC01 . getId ( ) ) ;
jsonParam . put ( "region_code" , "ZC01" ) ;
jsonParam . put ( "region_name" , RegionTypeEnum . ZC01 . getName ( ) ) ;
point . update ( jsonParam , "region_code = 'KTP01' AND block_num = '" + json . getString ( "block_num" ) + "' AND row_num = '" + json . getString ( "row_num" ) + "' AND layer_num = '1'" ) ;
point . update ( jsonParam , "region_code = 'KTP01' AND block_num = '" + json . getString ( "block_num" ) + "' AND row_num = '" + json . getString ( "row_num" ) + "' AND layer_num = '1'" ) ;
} catch ( Exception e ) {
System . out . println ( "1层主存区扩容失败:" + e . getMessage ( ) ) ;
System . out . println ( "1层主存区扩容失败:" + e . getMessage ( ) ) ;
return false ;
}
return true ;