@ -1,12 +1,11 @@
package org.nl.wms.board.service.impl ;
package org.nl.wms.board.service.impl ;
import com.alibaba.fastjson.JSON ;
import com.alibaba.fastjson.JSONObject ;
import com.alibaba.fastjson.JSONObject ;
import lombok.extern.slf4j.Slf4j ;
import lombok.extern.slf4j.Slf4j ;
import org.nl.common.utils.RedisUtils ;
import org.nl.wms.board.service.BoardService ;
import org.nl.wms.board.service.BoardService ;
import org.nl.wms.board.service.dao.dto.HwDto ;
import org.nl.wms.board.service.dao.dto.* ;
import org.nl.wms.board.service.dao.dto.KcDto ;
import org.nl.wms.board.service.dao.dto.ScDto ;
import org.nl.wms.board.service.dao.dto.WlDto ;
import org.nl.wms.board.service.dao.mapper.BoardMapper ;
import org.nl.wms.board.service.dao.mapper.BoardMapper ;
import org.nl.wms.pda.service.dao.vo.PdaResponseVo ;
import org.nl.wms.pda.service.dao.vo.PdaResponseVo ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.beans.factory.annotation.Autowired ;
@ -19,25 +18,50 @@ import java.util.List;
public class BoardServiceImpl implements BoardService {
public class BoardServiceImpl implements BoardService {
@Autowired
@Autowired
private BoardMapper boardMapper ;
private BoardMapper boardMapper ;
public PdaResponseVo cz ( JSONObject param ) {
@Autowired
return PdaResponseVo . pdaResultOk ( "回温状态查询成功" ) ;
private RedisUtils redisUtils ;
public JSONObject cz ( ) {
CzDto czDto = boardMapper . cz ( String . valueOf ( redisUtils . get ( "sub_tray" ) ) ) ;
if ( czDto = = null ) {
czDto = new CzDto ( ) ;
}
redisUtils . set ( "mother_tray" , 0 ) ;
redisUtils . set ( "sub_tray" , 0 ) ;
redisUtils . set ( "device_type" , 0 ) ;
redisUtils . set ( "frame_type" , 0 ) ;
redisUtils . set ( "mother_type" , 0 ) ;
redisUtils . set ( "sub_type" , 0 ) ;
redisUtils . set ( "point_qty" , 0 ) ;
czDto . setMother_tray ( String . valueOf ( redisUtils . get ( "mother_tray" ) ) ) ;
czDto . setPoint_qty ( String . valueOf ( redisUtils . get ( "point_qty" ) ) ) ;
czDto . setDevice_type ( ( Integer ) redisUtils . get ( "device_type" ) ) ;
czDto . setFrame_type ( ( Integer ) redisUtils . get ( "frame_type" ) ) ;
czDto . setMother_type ( ( Integer ) redisUtils . get ( "mother_type" ) ) ;
czDto . setSub_type ( ( Integer ) redisUtils . get ( "sub_type" ) ) ;
czDto . setError ( ( Integer ) redisUtils . get ( "error" ) ) ;
return JSONObject . parseObject ( JSON . toJSONString ( czDto ) ) ;
}
}
public JSONObject rk ( ) {
public JSONObject rk ( ) {
KcDto kcDto = boardMapper . kc ( ) ;
KcDto kcDto = boardMapper . kc ( ) ;
kcDto . setList ( boardMapper . wuliao ( ) ) ;
kcDto . setList ( boardMapper . wuliao ( ) ) ;
HwDto hwDto = boardMapper . hw ( ) ;
HwDto hwDto = boardMapper . hw ( ) ;
List < WlDto > knList = boardMapper . kn ( ) ;
List < WlDto > knList = boardMapper . kn ( ) ;
List < WlDto > wrkList = boardMapper . wrk ( ) ;
List < WlDto > wrkList = boardMapper . wrk ( ) ;
JSONObject jsonObject = new JSONObject ( ) ;
JSONObject jsonObject = new JSONObject ( ) ;
jsonObject . put ( "kc" , kcDto ) ;
jsonObject . put ( "kc" , kcDto ) ;
jsonObject . put ( "hw" , hwDto ) ;
jsonObject . put ( "hw" , hwDto ) ;
jsonObject . put ( "kn" , knList ) ;
jsonObject . put ( "kn" , knList ) ;
jsonObject . put ( "wrk" , wrkList ) ;
jsonObject . put ( "wrk" , wrkList ) ;
return jsonObject ;
return jsonObject ;
}
}
public List < ScDto > sc ( String region_code ) {
public JSONObject sc ( ) {
return boardMapper . sc ( region_code ) ;
JSONObject jsonObject = new JSONObject ( ) ;
jsonObject . put ( "pt" , boardMapper . sc ( "HW" ) ) ;
jsonObject . put ( "ks" , boardMapper . sc ( "HWK" ) ) ;
return jsonObject ;
}
}
}
}