|
@@ -0,0 +1,91 @@
|
|
|
+package com.xt.jygl.gkyxtjyfx.hxhbtj.ctl;
|
|
|
+
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.ui.Model;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+
|
|
|
+import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
+import com.xt.jygl.common.BaseWebCtl;
|
|
|
+import com.xt.jygl.ggfwxxgl.hxgl.service.HxglService;
|
|
|
+import com.xt.jygl.gkjcxx.gk.entity.GkEntity;
|
|
|
+import com.xt.jygl.gkjcxx.gk.service.GkService;
|
|
|
+import com.xt.jygl.gkyxtjyfx.gkttlfx.vo.GkttlfxVo;
|
|
|
+import com.xt.jygl.gkyxtjyfx.hxhbtj.service.HxhbtjService;
|
|
|
+import com.xt.jygl.gkyxtjyfx.hxhbtj.vo.HxhbtjVo;
|
|
|
+import com.xtframe.core.support.SecurityMgr;
|
|
|
+import com.xtframe.sec.common.QueryService;
|
|
|
+import com.xtframe.sec.common.SimplePageRequest;
|
|
|
+import com.xtframe.util.StringUtils;
|
|
|
+
|
|
|
+@Controller
|
|
|
+@RequestMapping("/hxhbtjpro")
|
|
|
+public class HxhbtjProCtl extends BaseWebCtl {
|
|
|
+ @Autowired
|
|
|
+ private HxglService hxglService;
|
|
|
+ @Autowired
|
|
|
+ private SecurityMgr securityMgr;
|
|
|
+ @Autowired
|
|
|
+ private GkService gkService;
|
|
|
+ @Autowired
|
|
|
+ private HxhbtjService hxhbtjService;
|
|
|
+ @Autowired
|
|
|
+ private QueryService query;
|
|
|
+
|
|
|
+ @RequestMapping(value = "/main")
|
|
|
+ public String main(SimplePageRequest page, Model model, final HttpServletRequest request, String rq, final String szgkid, final String menuid) throws JsonProcessingException {
|
|
|
+
|
|
|
+ if(StringUtils.isEmpty(rq)){
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
|
|
+ rq = sdf.format(new Date());
|
|
|
+ }
|
|
|
+
|
|
|
+ List<Object> list = hxhbtjService.findAllSzd(rq);
|
|
|
+ List<HxhbtjVo> volist = new ArrayList<HxhbtjVo>();
|
|
|
+ Object[] sum = new Object[10];
|
|
|
+ if(list != null && list.size()>0){
|
|
|
+ for (Object ob : list) {
|
|
|
+ Object[] e = (Object[]) ob;
|
|
|
+ HxhbtjVo vo = new HxhbtjVo();
|
|
|
+ vo.setSzd((String) e[0]);
|
|
|
+ vo.setYyhxts(e[1].toString());
|
|
|
+ vo.setYyhxhbs(e[2].toString());
|
|
|
+ vo.setJyhxts(e[3].toString());
|
|
|
+ vo.setJyhxhbs(e[4].toString());
|
|
|
+ vo.setNzxts(e[5].toString());
|
|
|
+ vo.setNzxhbs(e[6].toString());
|
|
|
+ vo.setNmhxts(e[7].toString());
|
|
|
+ vo.setNmhxhbs(e[8].toString());
|
|
|
+ volist.add(vo);
|
|
|
+ for (int j = 1; j < e.length; j++) {
|
|
|
+ BigDecimal s = new BigDecimal(0.0000);
|
|
|
+ if (sum[j] != null) {
|
|
|
+ s = (BigDecimal) sum[j];
|
|
|
+ }
|
|
|
+ BigDecimal ss = (BigDecimal) e[j];
|
|
|
+ s = s.add(ss);
|
|
|
+ sum[j] = s;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (int i = 0; i < sum.length; i++) {
|
|
|
+ if (sum[i] != null) {
|
|
|
+ model.addAttribute("a" + i, sum[i].toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ model.addAttribute("volist", volist);
|
|
|
+ model.addAttribute("rq", rq);
|
|
|
+ model.addAttribute("menuid", menuid);
|
|
|
+ return "gkyxtjyfx/hxhbtj/hxhbtjpro";
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|