・緑黄色野菜 修正
[nucalgen] / src / main / java / jp / satomichan / nucalgen / MextStdFoodCompTable.java
index d85124898ebffdea68e075f3a59930f0d6e9c44e..ec6718833c3765974ded7283ff01fe8db574502c 100644 (file)
@@ -87,16 +87,17 @@ public class MextStdFoodCompTable {
 
                                } //CELL
 
+
+
                                //食品群(1~18)書き込み
                                compRow.createCell(62).setCellValue(group);
 
-
                                //緑黄色野菜か?
-                               if(brightColoredVegetablesXmlFileName.length() > 0) {
-                                       boolean isBrightColored = false;
+                               boolean isBrightColored = false;
+                               if(group == 6 && brightColoredVegetablesXmlFileName.length() > 0) {
                                        String foodName = thisRow.getCell(3).getStringCellValue();
                                        for(String aBright : this.brightColoredVegetableList) {
-                                               if(foodName.matches(aBright + ".*")) {
+                                               if(foodName.matches(".*" + aBright + ".*")) {
                                                        isBrightColored = true;
                                                        break;
                                                }