i have solved the problem that two constraints can't work together.

it's because the parameter defition of the constraint should be in the loop. In other words, it should be a new variable in every loop.
IntVar sum1=new IntVar(store,"s",0,1);