lyyb2001

只是为方便自己找记录而已
posts - 57, comments - 27, trackbacks - 0, articles - 5
  BlogJava :: 首页 :: 新随笔 :: 联系 ::  :: 管理

2016年12月8日

表单里面先对某一个控件有效性验证(如手机号码,当手机号码输入正确,才发送验证码,最后才是对表单验证)

<input type="text" id="mobile" name="mobile" placeholder="请输入您的手机号码" class="easyui-validatebox form-control" data-options="required:true,validType:'mobile'" />

validateType自己扩展规则

对单个输入框的验证为:$("#mobile").validatebox('isValid') 通过返回true

posted @ 2017-09-19 15:59 skycity 阅读(820) | 评论 (0)编辑 收藏

    public enum Section {
KITTING(1),
LABELKITTING(2),
PACKING(3);

private final int code;

private Section(int code)
{
this.code=code;
}
public int getCode()
{
return this.code;
}
}

Map<Integer,Section> MAP=Arrays.stream(Section.values()).collect(Collectors.toMap(s->s.code, section->section));

posted @ 2017-07-11 11:40 skycity 阅读(2728) | 评论 (0)编辑 收藏

Optional<MaterialPaneModel> maxMaterial = list.stream().max(Comparator.comparingInt(MaterialPaneModel::getMaterialQty));

posted @ 2017-07-06 15:43 skycity 阅读(3983) | 评论 (0)编辑 收藏

try{

JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean();

factoryBean.getInInterceptors().add(new LoggingInInterceptor());

factoryBean.getOutInterceptors().add(new LoggingOutInterceptor());

factoryBean.setServiceClass(AutoPackServiceIntf.class);

factoryBean.setAddress("http://10.241.0.105:17000/TEST");

AutoPackServiceIntf factory = (AutoPackServiceIntf) factoryBean.create();

Client client = ClientProxy.getClient(factory);

HTTPConduit conduit = (HTTPConduit) client.getConduit();

HTTPClientPolicy policy = new HTTPClientPolicy();

policy.setConnectionTimeout(30000); //连接超时时间

policy.setReceiveTimeout(120000); //请求超时时间.

conduit.setClient(policy);

System.out.println(factory.getFirstUnitCramp("1"));

}catch(WebServiceException ex){

long l2 = System.currentTimeMillis();

System.out.println((l2-l1)+"ms");

System.out.println("连接异常");

}

posted @ 2016-12-08 14:19 skycity 阅读(267) | 评论 (0)编辑 收藏