|
@@ -1,5 +1,6 @@
|
|
|
package com.xt.js.gkaq.web.ctl;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
@@ -10,8 +11,15 @@ import org.springframework.ui.Model;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.xt.js.gkaq.common.BaseCtl;
|
|
|
+import com.xt.js.gkaq.common.BaseUUIDModel;
|
|
|
+import com.xt.js.gkaq.common.DictConsts;
|
|
|
+import com.xt.js.gkaq.frame.model.ComboBoxDto;
|
|
|
+import com.xt.js.gkaq.frame.service.CodeService;
|
|
|
+import com.xt.js.gkaq.web.model.GqModel;
|
|
|
import com.xt.js.gkaq.web.model.ZyfzModel;
|
|
|
+import com.xt.js.gkaq.web.service.GqService;
|
|
|
import com.xt.js.gkaq.web.service.ZyfzsqService;
|
|
|
import com.xt.js.gkaq.web.vo.ZyfzsqVo;
|
|
|
import com.yuanxd.tools.pagehelper.PageHelper;
|
|
@@ -25,10 +33,14 @@ import com.yuanxd.tools.utils.string.StringUtils;
|
|
|
*
|
|
|
*/
|
|
|
@Controller
|
|
|
-@RequestMapping(value = "/zyfzsq")
|
|
|
+@RequestMapping(value = "/zyfzsq", produces = "application/json; charset=utf-8")
|
|
|
public class ZyfzsqCtl extends BaseCtl {
|
|
|
@Autowired
|
|
|
private ZyfzsqService zyfzsqService;
|
|
|
+ @Autowired
|
|
|
+ private CodeService codeService;
|
|
|
+ @Autowired
|
|
|
+ private GqService gqService;
|
|
|
|
|
|
@RequestMapping("")
|
|
|
public String main(Model model) {
|
|
@@ -127,4 +139,40 @@ public class ZyfzsqCtl extends BaseCtl {
|
|
|
ZyfzModel model = zyfzsqService.findById(id);
|
|
|
return model;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取下拉所在地数据
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping("getDdlData")
|
|
|
+ @ResponseBody
|
|
|
+ public String getDdlData(String lx) {
|
|
|
+ List<ComboBoxDto> list = null;
|
|
|
+ if("szd".equals(lx)) {
|
|
|
+ list = codeService.findByPcode(DictConsts.DM_SZD);
|
|
|
+ } else if("gq".equals(lx)) {
|
|
|
+ list = gqService.selectByInfo(new GqModel());
|
|
|
+ } else if("whdj".equals(lx)) {
|
|
|
+ list = codeService.findByPcode(DictConsts.DM_WHDJ);
|
|
|
+ } else if("rwzt".equals(lx)) {
|
|
|
+ ComboBoxDto dto = null;
|
|
|
+ list = new ArrayList<ComboBoxDto>();
|
|
|
+ String[] ztName= {"未提交","待填报","待形式审查","待审查","待审核","待批准","已完成"};
|
|
|
+ String[] ztVal= {BaseUUIDModel.STATE_DRAFT,
|
|
|
+ "a",
|
|
|
+ BaseUUIDModel.STATE_SUBMIT,
|
|
|
+ "b",
|
|
|
+ "c",
|
|
|
+ "d",
|
|
|
+ BaseUUIDModel.STATE_COMPLETED};
|
|
|
+ for(int i = 0; i < ztName.length; i++) {
|
|
|
+ dto = new ComboBoxDto();
|
|
|
+ dto.setOptName(ztName[i]);
|
|
|
+ dto.setOptVal(ztVal[i]);
|
|
|
+ list.add(dto);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return JSONArray.toJSONString(list);
|
|
|
+ }
|
|
|
}
|