Commit d5304caf authored by litengwei's avatar litengwei

省测卡片问题1,2

parent 68adc734
......@@ -2036,15 +2036,44 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
DecimalFormat df = new DecimalFormat("#.00");
List<Map<String, Object>> statics = planTaskMapper.getStatics(bizOrgCode);
if(Integer.parseInt(statics.get(0).get("xfxcjrljxcdw").toString()) == 0) {
statics.get(0).put("xfxchgzb", "0");
statics.get(0).put("xfxclcl", "0");
int xcdw = 0;
int hgdw = 0;
int lcdw = 0;
for (Map<String, Object> map : statics
) {
if(map.get("code").equals("xfxcjrljxcdw")) {
xcdw = Integer.parseInt(map.get("value").toString());
}
if(map.get("code").equals("xfxchg")) {
hgdw = Integer.parseInt(map.get("value").toString());
}
if(map.get("code").equals("xfxcjrlcdw")) {
lcdw = Integer.parseInt(map.get("value").toString());
}
}
if(xcdw == 0) {
for (Map<String, Object> map : statics
) {
if(map.get("code").equals("xfxchgzb")) {
map.put("value","0");
}
if(map.get("code").equals("xfxclcl")) {
map.put("value","0");
}
}
} else {
statics.get(0).put("xfxchgzb", df.format(Integer.parseInt(statics.get(0).get("xfxcjrljxcdw").toString()) / Integer.parseInt(statics.get(0).get("xfxcjrljxcdw").toString()) ));
statics.get(0).put("xfxclcl", df.format(Integer.parseInt(statics.get(0).get("xfxcjrlcdw").toString()) / Integer.parseInt(statics.get(0).get("xfxcjrljxcdw").toString()) ));
for (Map<String, Object> map : statics
) {
if(map.get("code").equals("xfxchgzb")) {
map.put("value",df.format( hgdw / xcdw ));
}
if(map.get("code").equals("xfxclcl")) {
map.put("value",df.format( lcdw / xcdw ));
}
}
}
return planTaskMapper.getStatics(bizOrgCode);
return statics;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment