<div dir="ltr">Hello, since i&#39;m not moving a step from where I am at dsl rule, I&#39;m trying to do it with SimpleScoreCalculator, but the same is happening.<div><br></div><div>------------</div><div><div>public HardAndSoftScore calculateScore(Distributor distributor) {</div>
<div><span class="" style="white-space:pre">                </span>int hardScore = 0;</div><div><span class="" style="white-space:pre">                </span>int softScore = 0;</div><div><span class="" style="white-space:pre">                </span></div><div><span class="" style="white-space:pre">                </span>for (Engineer e : distributor.getEngineerList()){</div>
<div><span class="" style="white-space:pre">                        </span>long skill = e.getSkillEngineerList().get(0).getSkill().getId();</div><div><span class="" style="white-space:pre">                        </span>int requiredWorktime = 0;</div><div><span class="" style="white-space:pre">                        </span>long requiredSkill = 0l;</div>
<div><span class="" style="white-space:pre">                        </span></div><div><span class="" style="white-space:pre">                        </span></div><div><span class="" style="white-space:pre">                        </span>for (WorkOrder o : distributor.getWorkOrderList()){</div>
<div><span class="" style="white-space:pre">                                </span>if (e.equals(o.getEngineer())){</div><div><span class="" style="white-space:pre">                                        </span>requiredWorktime += o.getRequiredWorktime();</div><div><span class="" style="white-space:pre">                                        </span>requiredSkill = o.getRequiredSkills().get(0).getSkill().getId();</div>
<div><span class="" style="white-space:pre">                                </span>}</div><div><span class="" style="white-space:pre">                        </span>}</div><div><span class="" style="white-space:pre">                        </span></div><div><span class="" style="white-space:pre">                        </span></div>
<div><span class="" style="white-space:pre">                        </span>int engineerAvailableTime = e.getWorktime() - requiredWorktime;</div><div><span class="" style="white-space:pre">                        </span>if (engineerAvailableTime &lt; 0 ){</div><div>
<span class="" style="white-space:pre">                                </span>hardScore += engineerAvailableTime;</div><div><span class="" style="white-space:pre">                        </span>}</div><div><span class="" style="white-space:pre">                        </span></div><div><span class="" style="white-space:pre">                        </span>if (requiredSkill == skill){</div>
<div><span class="" style="white-space:pre">                                </span>softScore += requiredSkill;</div><div><span class="" style="white-space:pre">                        </span>}</div><div><span class="" style="white-space:pre">                </span>}</div><div><span class="" style="white-space:pre">                </span>return DefaultHardAndSoftScore.valueOf(hardScore, softScore);</div>
<div><span class="" style="white-space:pre">        </span>}</div></div><div>------------</div><div><br></div><div style>wouldn&#39;t that have to fit since i&#39;m comparing the 1st attribute of each skill list from engineers and workorders? And how can I weight which engineer would be better to a determined workorder if the workorder have more skills and so does the engineer?</div>
</div>