diff --git a/resources/mybatis/bm/ProjectManageMapper.xml b/resources/mybatis/bm/ProjectManageMapper.xml
index df07aa1..98d3df5 100644
--- a/resources/mybatis/bm/ProjectManageMapper.xml
+++ b/resources/mybatis/bm/ProjectManageMapper.xml
@@ -352,8 +352,22 @@
FROM bm_project
WHERE `NAME` = #{name}
-
-
+
+
+
+ UPDATE bm_project
+ set NUM = #{num}
+ where ID = #{id}
+
+
+ UPDATE bm_project
+ set NAME = #{projectName}
+ where NUM = #{projectCode}
+
diff --git a/src/com/bonus/bm/controller/ProjectManageController.java b/src/com/bonus/bm/controller/ProjectManageController.java
index 26bbb6c..1e25a05 100644
--- a/src/com/bonus/bm/controller/ProjectManageController.java
+++ b/src/com/bonus/bm/controller/ProjectManageController.java
@@ -33,375 +33,363 @@ import com.bonus.sys.beans.ZNode;
@RequestMapping("/backstage/project/")
public class ProjectManageController extends BaseController {
- // 16位KEY
- private static final String aesKey = "Z3PX8V9KJ2T7W4QN";
- // 密钥
- private static final String appSecret = "secret20250705";
- // appID
- private static final String allowAppId = "equipment";
+ // 16位KEY
+ private static final String aesKey = "Z3PX8V9KJ2T7W4QN";
+ // 密钥
+ private static final String appSecret = "secret20250705";
+ // appID
+ private static final String allowAppId = "equipment";
- @Autowired
- private ProjectManageService pmService;
+ @Autowired
+ private ProjectManageService pmService;
- @RequestMapping("list")
- public String index(Model model) {
- return "/bm/projectManage";
- }
+ @RequestMapping("list")
+ public String index(Model model) {
+ return "/bm/projectManage";
+ }
- @RequestMapping("projectTree")
- public String unitTree(Model model) {
- return "/bm/projectTree";
- }
+ @RequestMapping("projectTree")
+ public String unitTree(Model model) {
+ return "/bm/projectTree";
+ }
- /**
- * 与数创部同步工程信息,单次接收1条
- */
- @RequestMapping(value = "syncProject", method = RequestMethod.POST)
- @ResponseBody
- public AjaxRes syncProject(@RequestBody JSONObject payload) {
- AjaxRes result = getAjaxRes();
- if (payload == null) {
- result.setFailMsg("同步错误,参数不能为空!");
- return result;
- }
+ /**
+ * 与数创部同步工程信息,单次接收1条
+ */
+ @RequestMapping(value = "syncProject", method = RequestMethod.POST)
+ @ResponseBody
+ public AjaxRes syncProject(@RequestBody JSONObject payload) {
+ AjaxRes result = getAjaxRes();
+ if (payload == null) {
+ result.setFailMsg("同步错误,参数不能为空!");
+ return result;
+ }
- String appId = payload.getStr("appId");
- String timestamp = payload.getStr("timestamp");
- String encryptedData = payload.getStr("data");
- String sign = payload.getStr("sign");
+ String appId = payload.getStr("appId");
+ String timestamp = payload.getStr("timestamp");
+ String encryptedData = payload.getStr("data");
+ String sign = payload.getStr("sign");
- // 1. 校验appId
- if (Objects.isNull(appId) || !allowAppId.equals(appId)) {
- result.setFailMsg("appId不匹配");
- return result;
- }
+ // 1. 校验appId
+ if (Objects.isNull(appId) || !allowAppId.equals(appId)) {
+ result.setFailMsg("appId不匹配");
+ return result;
+ }
- // 2. 时间戳校验(防重放)
-// try {
-// Date time = DateUtil.parse(timestamp, "yyyyMMddHHmmss");
-// long diff = Math.abs(System.currentTimeMillis() - time.getTime());
-// if (diff > 5 * 60 * 1000) {
-// result.setFailMsg("请求时间戳不合法!!");
-// return result;
-// }
-// } catch (Exception e) {
-// System.err.println("时间戳解析异常:" + timestamp + "," + e.getMessage());
-// result.setFailMsg("时间戳解析异常");
-// return result;
-// }
+ // 3. 验证签名
+ String baseSign = appId + timestamp + encryptedData + appSecret;
+ String serverSign = SecureUtil.sha256(baseSign).toUpperCase();
+ if (!serverSign.equals(sign)) {
+ result.setFailMsg("签名不合法!");
+ return result;
+ }
- // 3. 验证签名
- String baseSign = appId + timestamp + encryptedData + appSecret;
- String serverSign = SecureUtil.sha256(baseSign).toUpperCase();
- if (!serverSign.equals(sign)) {
- result.setFailMsg("签名不合法!");
- return result;
- }
+ // 4. 解密数据
+ AES aes = SecureUtil.aes(aesKey.getBytes());
+ String json = aes.decryptStr(encryptedData);
+ JSONObject bizData = JSONUtil.parseObj(json);
- // 4. 解密数据
- AES aes = SecureUtil.aes(aesKey.getBytes());
- String json = aes.decryptStr(encryptedData);
- JSONObject bizData = JSONUtil.parseObj(json);
+ // 5. 业务处理
+ String projectCode = bizData.getStr("projectCode");
+ String projectName = bizData.getStr("projectName");
+ String companyCode = bizData.getStr("companyCode");
+ String typeCode = bizData.getStr("typeCode");
+ String startDate = bizData.getStr("startDate", "");
+ String status = bizData.getStr("status");
- // 5. 业务处理
- String projectCode = bizData.getStr("projectCode");
- String projectName = bizData.getStr("projectName");
- String companyCode = bizData.getStr("companyCode");
- String typeCode = bizData.getStr("typeCode");
- String startDate = bizData.getStr("startDate", "");
- String status = bizData.getStr("status");
+ // 6. 校验数据
+ if (StrUtil.isBlank(projectCode) || StrUtil.isBlank(projectName) || StrUtil.isBlank(companyCode)
+ || StrUtil.isBlank(typeCode) || StrUtil.isBlank(status)) {
+ System.err.println(projectCode + "," + projectName + "," + companyCode + "," + typeCode + "," + status + ","
+ + startDate);
+ result.setFailMsg("数据不完整!!");
+ return result;
+ } else {
+ ProjectManageBean beanCode = pmService.findByCode(projectCode);
+ if (beanCode == null) {
+ ProjectManageBean findBean = pmService.findByName(projectName);
+ if (findBean != null) {
+ pmService.updateProject(projectCode, String.valueOf(findBean.getId()));
+ result.setFailMsg("工程名称已存在,跳过处理!");
+ } else {
+ ProjectManageBean bean = new ProjectManageBean();
+ bean.setName(projectName);
+ bean.setNum(projectCode);
+ bean.setCompanyId(companyCode);
+ bean.setTypeId(typeCode);
+ bean.setStartTime(startDate);
+ bean.setEndTime("");
+ try {
+ pmService.insert(bean);
+ System.out.println("同步工程数据成功: " + json);
+ result.setSucceedMsg("同步成功");
+ } catch (Exception e) {
+ System.err.println(e.getMessage());
+ result.setFailMsg(projectName + "----工程信息同步失败:" + e.getMessage());
+ }
+ }
+ } else {
+ pmService.updateProjectName(projectName, projectCode);
+ }
- // 6. 校验数据
- if (StrUtil.isBlank(projectCode) || StrUtil.isBlank(projectName) || StrUtil.isBlank(companyCode)
- || StrUtil.isBlank(typeCode) || StrUtil.isBlank(status)) {
- System.err.println(projectCode + "," + projectName + "," + companyCode + "," + typeCode + "," + status + ","
- + startDate);
- result.setFailMsg("数据不完整!!");
- return result;
- } else {
- ProjectManageBean findBean = pmService.findByName(projectName);
- if (findBean != null) {
- System.out.println("工程名称已存在,跳过处理!");
- result.setFailMsg("工程名称已存在,跳过处理!");
- } else {
- ProjectManageBean bean = new ProjectManageBean();
- bean.setName(projectName);
- bean.setNum(projectCode);
- bean.setCompanyId(companyCode);
- bean.setTypeId(typeCode);
- bean.setStartTime(startDate);
- bean.setEndTime("");
- try {
- pmService.insert(bean);
- System.out.println("同步工程数据成功: " + json);
- result.setSucceedMsg("同步成功");
- } catch (Exception e) {
- System.err.println(e.getMessage());
- result.setFailMsg(projectName + "----工程信息同步失败:" + e.getMessage());
- }
- }
- }
- return result;
- }
+ }
+ return result;
+ }
- @RequestMapping(value = "findByPage", method = RequestMethod.POST)
- @ResponseBody
- public AjaxRes findByPage(Page page, ProjectManageBean o) {
- AjaxRes ar = getAjaxRes();
- if (ar.setNoAuth(doSecurityIntercept(GlobalConst.RESOURCES_TYPE_MENU, "/backstage/project/list"))) {
- try {
- if (o != null && !"".equals(o.getEndTime())) {
- String time = DateTimeHelper.getAddNumDay(o.getEndTime(), 1);
- o.setEndTime(time);
- }
- Page station = pmService.findByPage(o, page);
- Map p = new HashMap();
- p.put("list", station);
- ar.setSucceed(p);
- } catch (Exception e) {
- logger.error(e.toString(), e);
- ar.setFailMsg(GlobalConst.DATA_FAIL);
- }
- }
- return ar;
- }
+ @RequestMapping(value = "findByPage", method = RequestMethod.POST)
+ @ResponseBody
+ public AjaxRes findByPage(Page page, ProjectManageBean o) {
+ AjaxRes ar = getAjaxRes();
+ if (ar.setNoAuth(doSecurityIntercept(GlobalConst.RESOURCES_TYPE_MENU, "/backstage/project/list"))) {
+ try {
+ if (o != null && !"".equals(o.getEndTime())) {
+ String time = DateTimeHelper.getAddNumDay(o.getEndTime(), 1);
+ o.setEndTime(time);
+ }
+ Page station = pmService.findByPage(o, page);
+ Map p = new HashMap();
+ p.put("list", station);
+ ar.setSucceed(p);
+ } catch (Exception e) {
+ logger.error(e.toString(), e);
+ ar.setFailMsg(GlobalConst.DATA_FAIL);
+ }
+ }
+ return ar;
+ }
- @RequestMapping(value = "insert", method = RequestMethod.POST)
- @ResponseBody
- public AjaxRes insert(ProjectManageBean o) {
- AjaxRes ar = getAjaxRes();
- try {
- ProjectManageBean bean = pmService.findByName(o.getName());
- if (bean == null) {
- String typeId = o.getTypeId1();
- String companyId = o.getCompanyId1();
+ @RequestMapping(value = "insert", method = RequestMethod.POST)
+ @ResponseBody
+ public AjaxRes insert(ProjectManageBean o) {
+ AjaxRes ar = getAjaxRes();
+ try {
+ ProjectManageBean bean = pmService.findByName(o.getName());
+ if (bean == null) {
+ String typeId = o.getTypeId1();
+ String companyId = o.getCompanyId1();
- String provinceid = o.getProvinceid();
- String cityid = o.getCityid();
- String areaid = o.getAreaid();
- if ("0".equals(typeId) || "0".equals(companyId)) {
- ar.setFailMsg("请选择所属分公司或者工程类别");
- } else if ("0".equals(provinceid)) {
- ar.setFailMsg("请选择所在省");
- } else if ("0".equals(cityid)) {
- ar.setFailMsg("请选择所在市");
- } else if ("0".equals(areaid)) {
- ar.setFailMsg("请选择所在区");
- } else {
- pmService.insert(o);
- //塞入bid_id
- if (o.getId()!=null){
- pmService.updateBidId(o);
- }
- ar.setSucceedMsg(GlobalConst.SAVE_SUCCEED);
- }
- } else {
- ar.setFailMsg("工程名称重复,请重新填写");
- }
- } catch (Exception e) {
- logger.error(e.toString(), e);
- ar.setFailMsg(GlobalConst.SAVE_FAIL);
- }
- return ar;
- }
+ String provinceid = o.getProvinceid();
+ String cityid = o.getCityid();
+ String areaid = o.getAreaid();
+ if ("0".equals(typeId) || "0".equals(companyId)) {
+ ar.setFailMsg("请选择所属分公司或者工程类别");
+ } else if ("0".equals(provinceid)) {
+ ar.setFailMsg("请选择所在省");
+ } else if ("0".equals(cityid)) {
+ ar.setFailMsg("请选择所在市");
+ } else if ("0".equals(areaid)) {
+ ar.setFailMsg("请选择所在区");
+ } else {
+ pmService.insert(o);
+ ar.setSucceedMsg(GlobalConst.SAVE_SUCCEED);
+ }
+ } else {
+ ar.setFailMsg("工程名称重复,请重新填写");
+ }
+ } catch (Exception e) {
+ logger.error(e.toString(), e);
+ ar.setFailMsg(GlobalConst.SAVE_FAIL);
+ }
+ return ar;
+ }
- @RequestMapping(value = "update", method = RequestMethod.POST)
- @ResponseBody
- public AjaxRes update(ProjectManageBean o) {
- AjaxRes ar = getAjaxRes();
- try {
+ @RequestMapping(value = "update", method = RequestMethod.POST)
+ @ResponseBody
+ public AjaxRes update(ProjectManageBean o) {
+ AjaxRes ar = getAjaxRes();
+ try {
- String typeId = o.getTypeId1();
- String companyId = o.getCompanyId1();
+ String typeId = o.getTypeId1();
+ String companyId = o.getCompanyId1();
- String provinceid = o.getProvinceid();
- String cityid = o.getCityid();
- String areaid = o.getAreaid();
- if ("0".equals(typeId) || "0".equals(companyId)) {
- ar.setFailMsg("请选择所属分公司或者工程类别");
- } else if ("0".equals(provinceid)) {
- ar.setFailMsg("请选择所在省");
- } else if ("0".equals(cityid)) {
- ar.setFailMsg("请选择所在市");
- } else if ("0".equals(areaid)) {
- ar.setFailMsg("请选择所在区");
- } else {
- pmService.update(o);
- ar.setSucceedMsg(GlobalConst.UPDATE_SUCCEED);
- }
- } catch (Exception e) {
- logger.error(e.toString(), e);
- ar.setFailMsg(GlobalConst.UPDATE_FAIL);
- }
- return ar;
- }
+ String provinceid = o.getProvinceid();
+ String cityid = o.getCityid();
+ String areaid = o.getAreaid();
+ if ("0".equals(typeId) || "0".equals(companyId)) {
+ ar.setFailMsg("请选择所属分公司或者工程类别");
+ } else if ("0".equals(provinceid)) {
+ ar.setFailMsg("请选择所在省");
+ } else if ("0".equals(cityid)) {
+ ar.setFailMsg("请选择所在市");
+ } else if ("0".equals(areaid)) {
+ ar.setFailMsg("请选择所在区");
+ } else {
+ pmService.update(o);
+ ar.setSucceedMsg(GlobalConst.UPDATE_SUCCEED);
+ }
+ } catch (Exception e) {
+ logger.error(e.toString(), e);
+ ar.setFailMsg(GlobalConst.UPDATE_FAIL);
+ }
+ return ar;
+ }
- @RequestMapping(value = "find", method = RequestMethod.POST)
- @ResponseBody
- public AjaxRes find(ProjectManageBean o) {
- AjaxRes ar = getAjaxRes();
- try {
- List list = pmService.find(o);
- ar.setSucceed(list);
- } catch (Exception e) {
- logger.error(e.toString(), e);
- ar.setFailMsg(GlobalConst.DATA_FAIL);
- }
- return ar;
- }
+ @RequestMapping(value = "find", method = RequestMethod.POST)
+ @ResponseBody
+ public AjaxRes find(ProjectManageBean o) {
+ AjaxRes ar = getAjaxRes();
+ try {
+ List list = pmService.find(o);
+ ar.setSucceed(list);
+ } catch (Exception e) {
+ logger.error(e.toString(), e);
+ ar.setFailMsg(GlobalConst.DATA_FAIL);
+ }
+ return ar;
+ }
- @RequestMapping(value = "getProjectType", method = RequestMethod.POST)
- @ResponseBody
- public AjaxRes getProjectType() {
- AjaxRes ar = getAjaxRes();
- try {
- List list = pmService.getProjectType();
- Map p = new HashMap();
- p.put("list", list);
- ar.setSucceed(p);
- } catch (Exception e) {
- logger.error(e.toString(), e);
- ar.setFailMsg(GlobalConst.DATA_FAIL);
- }
- return ar;
- }
+ @RequestMapping(value = "getProjectType", method = RequestMethod.POST)
+ @ResponseBody
+ public AjaxRes getProjectType() {
+ AjaxRes ar = getAjaxRes();
+ try {
+ List list = pmService.getProjectType();
+ Map p = new HashMap();
+ p.put("list", list);
+ ar.setSucceed(p);
+ } catch (Exception e) {
+ logger.error(e.toString(), e);
+ ar.setFailMsg(GlobalConst.DATA_FAIL);
+ }
+ return ar;
+ }
- @RequestMapping(value = "getProjectName", method = RequestMethod.POST)
- @ResponseBody
- public AjaxRes getProjectName(ProjectManageBean o) {
- AjaxRes ar = getAjaxRes();
- try {
- List list = pmService.getProjectName(o);
- Map p = new HashMap();
- p.put("list", list);
- ar.setSucceed(p);
- } catch (Exception e) {
- logger.error(e.toString(), e);
- ar.setFailMsg(GlobalConst.DATA_FAIL);
- }
- return ar;
- }
+ @RequestMapping(value = "getProjectName", method = RequestMethod.POST)
+ @ResponseBody
+ public AjaxRes getProjectName(ProjectManageBean o) {
+ AjaxRes ar = getAjaxRes();
+ try {
+ List list = pmService.getProjectName(o);
+ Map p = new HashMap();
+ p.put("list", list);
+ ar.setSucceed(p);
+ } catch (Exception e) {
+ logger.error(e.toString(), e);
+ ar.setFailMsg(GlobalConst.DATA_FAIL);
+ }
+ return ar;
+ }
- @RequestMapping(value = "getVolLever", method = RequestMethod.POST)
- @ResponseBody
- public AjaxRes getVolLever() {
- AjaxRes ar = getAjaxRes();
- try {
- List list = pmService.getVolLever();
- Map p = new HashMap();
- p.put("list", list);
- ar.setSucceed(p);
- } catch (Exception e) {
- logger.error(e.toString(), e);
- ar.setFailMsg(GlobalConst.DATA_FAIL);
- }
- return ar;
- }
+ @RequestMapping(value = "getVolLever", method = RequestMethod.POST)
+ @ResponseBody
+ public AjaxRes getVolLever() {
+ AjaxRes ar = getAjaxRes();
+ try {
+ List list = pmService.getVolLever();
+ Map p = new HashMap();
+ p.put("list", list);
+ ar.setSucceed(p);
+ } catch (Exception e) {
+ logger.error(e.toString(), e);
+ ar.setFailMsg(GlobalConst.DATA_FAIL);
+ }
+ return ar;
+ }
- @RequestMapping(value = "findWorkTree", method = RequestMethod.POST)
- @ResponseBody
- public AjaxRes roleTree() {
- AjaxRes ar = getAjaxRes();
- try {
- List list = pmService.findWorkTree();
- ar.setSucceed(list);
- } catch (Exception e) {
- logger.error(e.toString(), e);
- ar.setFailMsg(GlobalConst.DATA_FAIL);
- }
- return ar;
- }
+ @RequestMapping(value = "findWorkTree", method = RequestMethod.POST)
+ @ResponseBody
+ public AjaxRes roleTree() {
+ AjaxRes ar = getAjaxRes();
+ try {
+ List list = pmService.findWorkTree();
+ ar.setSucceed(list);
+ } catch (Exception e) {
+ logger.error(e.toString(), e);
+ ar.setFailMsg(GlobalConst.DATA_FAIL);
+ }
+ return ar;
+ }
- @RequestMapping(value = "projectTree", method = RequestMethod.POST)
- @ResponseBody
- public AjaxRes projectTree(ProjectManageBean o, HttpServletRequest req) {
- AjaxRes ar = getAjaxRes();
- try {
- List list = null;
- if ("0".equals(o.getUnitId())) {
- list = pmService.projectTree(o);
- } else {
- if (StringHelper.isNotEmpty(o.getUnitId())) {
- list = pmService.projectTreeByUnitId(o);
- } else {
- list = pmService.projectTree(o);
- }
- }
- String isOpen = req.getParameter("isOpen");
- if (StringHelper.isNotEmpty(isOpen)) {
- for (ZNode zNode : list) {
- zNode.setOpen(true);
- }
- }
- Map p = new HashMap();
- p.put("list", list);
- ar.setSucceed(p);
- } catch (Exception e) {
- logger.error(e.toString(), e);
- ar.setFailMsg(GlobalConst.DATA_FAIL);
- }
- return ar;
- }
+ @RequestMapping(value = "projectTree", method = RequestMethod.POST)
+ @ResponseBody
+ public AjaxRes projectTree(ProjectManageBean o, HttpServletRequest req) {
+ AjaxRes ar = getAjaxRes();
+ try {
+ List list = null;
+ if ("0".equals(o.getUnitId())) {
+ list = pmService.projectTree(o);
+ } else {
+ if (StringHelper.isNotEmpty(o.getUnitId())) {
+ list = pmService.projectTreeByUnitId(o);
+ } else {
+ list = pmService.projectTree(o);
+ }
+ }
+ String isOpen = req.getParameter("isOpen");
+ if (StringHelper.isNotEmpty(isOpen)) {
+ for (ZNode zNode : list) {
+ zNode.setOpen(true);
+ }
+ }
+ Map p = new HashMap();
+ p.put("list", list);
+ ar.setSucceed(p);
+ } catch (Exception e) {
+ logger.error(e.toString(), e);
+ ar.setFailMsg(GlobalConst.DATA_FAIL);
+ }
+ return ar;
+ }
- @RequestMapping(value = "del", method = RequestMethod.POST)
- @ResponseBody
- public AjaxRes del(ProjectManageBean o) {
- AjaxRes ar = getAjaxRes();
- try {
- pmService.delete(o);
- ar.setSucceedMsg(GlobalConst.DEL_SUCCEED);
- } catch (Exception e) {
- logger.error(e.toString(), e);
- ar.setFailMsg(GlobalConst.DEL_FAIL);
- }
- return ar;
- }
+ @RequestMapping(value = "del", method = RequestMethod.POST)
+ @ResponseBody
+ public AjaxRes del(ProjectManageBean o) {
+ AjaxRes ar = getAjaxRes();
+ try {
+ pmService.delete(o);
+ ar.setSucceedMsg(GlobalConst.DEL_SUCCEED);
+ } catch (Exception e) {
+ logger.error(e.toString(), e);
+ ar.setFailMsg(GlobalConst.DEL_FAIL);
+ }
+ return ar;
+ }
- @RequestMapping(value = "getProvinces", method = RequestMethod.POST)
- @ResponseBody
- public AjaxRes getProvinces() {
- AjaxRes ar = getAjaxRes();
- try {
- List list = pmService.getProvinces();
- Map p = new HashMap();
- p.put("list", list);
- ar.setSucceed(p);
- } catch (Exception e) {
- logger.error(e.toString(), e);
- ar.setFailMsg(GlobalConst.DATA_FAIL);
- }
- return ar;
- }
+ @RequestMapping(value = "getProvinces", method = RequestMethod.POST)
+ @ResponseBody
+ public AjaxRes getProvinces() {
+ AjaxRes ar = getAjaxRes();
+ try {
+ List list = pmService.getProvinces();
+ Map p = new HashMap();
+ p.put("list", list);
+ ar.setSucceed(p);
+ } catch (Exception e) {
+ logger.error(e.toString(), e);
+ ar.setFailMsg(GlobalConst.DATA_FAIL);
+ }
+ return ar;
+ }
- @RequestMapping(value = "getCities", method = RequestMethod.POST)
- @ResponseBody
- public AjaxRes getCities(ProjectManageBean o) {
- AjaxRes ar = getAjaxRes();
- try {
- List list = pmService.getCities(o);
- Map p = new HashMap();
- p.put("list", list);
- ar.setSucceed(p);
- } catch (Exception e) {
- logger.error(e.toString(), e);
- ar.setFailMsg(GlobalConst.DATA_FAIL);
- }
- return ar;
- }
+ @RequestMapping(value = "getCities", method = RequestMethod.POST)
+ @ResponseBody
+ public AjaxRes getCities(ProjectManageBean o) {
+ AjaxRes ar = getAjaxRes();
+ try {
+ List list = pmService.getCities(o);
+ Map p = new HashMap();
+ p.put("list", list);
+ ar.setSucceed(p);
+ } catch (Exception e) {
+ logger.error(e.toString(), e);
+ ar.setFailMsg(GlobalConst.DATA_FAIL);
+ }
+ return ar;
+ }
- @RequestMapping(value = "getDistricts", method = RequestMethod.POST)
- @ResponseBody
- public AjaxRes getDistricts(ProjectManageBean o) {
- AjaxRes ar = getAjaxRes();
- try {
- List list = pmService.getDistricts(o);
- Map p = new HashMap();
- p.put("list", list);
- ar.setSucceed(p);
- } catch (Exception e) {
- logger.error(e.toString(), e);
- ar.setFailMsg(GlobalConst.DATA_FAIL);
- }
- return ar;
- }
+ @RequestMapping(value = "getDistricts", method = RequestMethod.POST)
+ @ResponseBody
+ public AjaxRes getDistricts(ProjectManageBean o) {
+ AjaxRes ar = getAjaxRes();
+ try {
+ List list = pmService.getDistricts(o);
+ Map p = new HashMap();
+ p.put("list", list);
+ ar.setSucceed(p);
+ } catch (Exception e) {
+ logger.error(e.toString(), e);
+ ar.setFailMsg(GlobalConst.DATA_FAIL);
+ }
+ return ar;
+ }
}
diff --git a/src/com/bonus/bm/dao/ProjectManageDao.java b/src/com/bonus/bm/dao/ProjectManageDao.java
index 4ca8244..614ba6b 100644
--- a/src/com/bonus/bm/dao/ProjectManageDao.java
+++ b/src/com/bonus/bm/dao/ProjectManageDao.java
@@ -12,25 +12,31 @@ import com.bonus.sys.beans.ZNode;
@BonusBatis
public interface ProjectManageDao extends BaseDao {
- List getVolLever();
+ List getVolLever();
- List getProjectType();
+ List getProjectType();
- public List findWorkTree();
+ public List findWorkTree();
- List getProjectName(ProjectManageBean o);
+ List getProjectName(ProjectManageBean o);
- List projectTree(ProjectManageBean o);
+ List projectTree(ProjectManageBean o);
- List projectTreeByUnitId(ProjectManageBean o);
+ List projectTreeByUnitId(ProjectManageBean o);
- ProjectManageBean findByName(String name);
+ ProjectManageBean findByName(String name);
- List getProvinces();
+ List getProvinces();
- List getCities(@Param("param") ProjectManageBean o);
+ List getCities(@Param("param") ProjectManageBean o);
- List getDistricts(@Param("param") ProjectManageBean o);
+ List getDistricts(@Param("param") ProjectManageBean o);
- int updateBidId(ProjectManageBean o);
+ void updateProject(@Param("num") String num, @Param("id") String id);
+
+ ProjectManageBean findByCode(String projectCode);
+
+ void updateProjectName(@Param("projectName")String projectName, @Param("projectCode")String projectCode);
+
+ int updateBidId(ProjectManageBean o);
}
diff --git a/src/com/bonus/bm/service/ProjectManageService.java b/src/com/bonus/bm/service/ProjectManageService.java
index 01287f9..260226a 100644
--- a/src/com/bonus/bm/service/ProjectManageService.java
+++ b/src/com/bonus/bm/service/ProjectManageService.java
@@ -28,5 +28,12 @@ public interface ProjectManageService extends BaseService {
List getDistricts(ProjectManageBean o);
+ ProjectManageBean findByCode(String projectCode);
+
+ void updateProjectName(String projectName, String projectCode);
+
+ void updateProject(String num,String id);
+
+
int updateBidId(ProjectManageBean o);
}
diff --git a/src/com/bonus/bm/service/ProjectManageServiceImp.java b/src/com/bonus/bm/service/ProjectManageServiceImp.java
index b160786..e255e1e 100644
--- a/src/com/bonus/bm/service/ProjectManageServiceImp.java
+++ b/src/com/bonus/bm/service/ProjectManageServiceImp.java
@@ -85,4 +85,5 @@ public class ProjectManageServiceImp extends BaseServiceImp i
public int updateBidId(ProjectManageBean o) {
return pmDao.updateBidId(o);
}
+
}