提交 2ccbba81 编写于 作者: doc_wei's avatar doc_wei

Merge branch 'company_server' of https://gitee.com/doc_wei01/skyeye into company_server

/*******************************************************************************
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
******************************************************************************/
package com.skyeye.controller;
import com.skyeye.common.object.InputObject;
import com.skyeye.common.object.OutputObject;
import com.skyeye.service.ApiModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class ApiModelController {
@Autowired
private ApiModelService apiModelService;
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: queryApiModelList
* @Description: 获取api接口模块列表
*/
@RequestMapping("/post/ApiModelController/queryApiModelList")
@ResponseBody
public void queryApiModelList(InputObject inputObject, OutputObject outputObject) throws Exception {
apiModelService.queryApiModelList(inputObject, outputObject);
}
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: insertApiModelMation
* @Description: 新增api接口模块信息
*/
@RequestMapping("/post/ApiModelController/insertApiModelMation")
@ResponseBody
public void insertApiModelMation(InputObject inputObject, OutputObject outputObject) throws Exception {
apiModelService.insertApiModelMation(inputObject, outputObject);
}
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: deleteApiModelById
* @Description: 删除api接口模块信息
*/
@RequestMapping("/post/ApiModelController/deleteApiModelById")
@ResponseBody
public void deleteApiModelById(InputObject inputObject, OutputObject outputObject) throws Exception {
apiModelService.deleteApiModelById(inputObject, outputObject);
}
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: selectApiModelById
* @Description: 通过id查找对应的api接口模块信息
*/
@RequestMapping("/post/ApiModelController/selectApiModelById")
@ResponseBody
public void selectApiModelById(InputObject inputObject, OutputObject outputObject) throws Exception {
apiModelService.selectApiModelById(inputObject, outputObject);
}
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: editApiModelMationById
* @Description: 通过id编辑对应的api接口模块信息
*/
@RequestMapping("/post/ApiModelController/editApiModelMationById")
@ResponseBody
public void editApiModelMationById(InputObject inputObject, OutputObject outputObject) throws Exception {
apiModelService.editApiModelMationById(inputObject, outputObject);
}
}
/*******************************************************************************
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
******************************************************************************/
package com.skyeye.dao;
import java.util.List;
import java.util.Map;
/**
* @ClassName: ApiModelDao
* @Description: api接口模块数据层
* @author: skyeye云系列
* @date: 2021/11/27 16:12
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
*/
public interface ApiModelDao {
public List<Map<String, Object>> queryApiModelList(Map<String, Object> map) throws Exception;
public Map<String, Object> queryApiModelMationByName(Map<String, Object> map) throws Exception;
public int insertApiModel(Map<String, Object> map) throws Exception;
public int deleteApiModelById(Map<String, Object> map) throws Exception;
public Map<String, Object> queryApiModelToEditById(Map<String, Object> map) throws Exception;
public int editApiModelById(Map<String, Object> map) throws Exception;
}
/*******************************************************************************
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
******************************************************************************/
package com.skyeye.service;
import com.skyeye.common.object.InputObject;
import com.skyeye.common.object.OutputObject;
public interface ApiModelService {
public void queryApiModelList(InputObject inputObject, OutputObject outputObject) throws Exception;
public void insertApiModelMation(InputObject inputObject, OutputObject outputObject) throws Exception;
public void deleteApiModelById(InputObject inputObject, OutputObject outputObject) throws Exception;
public void selectApiModelById(InputObject inputObject, OutputObject outputObject) throws Exception;
public void editApiModelMationById(InputObject inputObject, OutputObject outputObject) throws Exception;
}
/*******************************************************************************
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
******************************************************************************/
package com.skyeye.service.impl;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.skyeye.common.object.InputObject;
import com.skyeye.common.object.OutputObject;
import com.skyeye.common.util.DateUtil;
import com.skyeye.common.util.ToolUtil;
import com.skyeye.dao.ApiModelDao;
import com.skyeye.service.ApiModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @ClassName: ApiModelServiceImpl
* @Description: api接口模块服务类
* @author: skyeye云系列
* @date: 2021/11/27 16:15
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
*/
@Service
public class ApiModelServiceImpl implements ApiModelService {
@Autowired
private ApiModelDao apiModelDao;
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: queryApiModelList
* @Description: 获取api接口模块表
*/
@Override
public void queryApiModelList(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
map.put("userId", inputObject.getLogParams().get("id"));
Page pages = PageHelper.startPage(Integer.parseInt(map.get("page").toString()), Integer.parseInt(map.get("limit").toString()));
List<Map<String, Object>> beans = apiModelDao.queryApiModelList(map);
outputObject.setBeans(beans);
outputObject.settotal(pages.getTotal());
}
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: insertApiModelMation
* @Description: 新增api接口模块
*/
@Override
@Transactional(value = "transactionManager")
public void insertApiModelMation(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
Map<String, Object> bean = apiModelDao.queryApiModelMationByName(map);
if (bean != null && !bean.isEmpty()) {
outputObject.setreturnMessage("该模块名称已存在,请更换");
} else {
map.put("id", ToolUtil.getSurFaceId());
map.put("userId", inputObject.getLogParams().get("id"));
map.put("createTime", DateUtil.getTimeAndToString());
apiModelDao.insertApiModel(map);
}
}
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: deleteApiModelById
* @Description: 删除api接口模块信息
*/
@Override
@Transactional(value = "transactionManager")
public void deleteApiModelById(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
apiModelDao.deleteApiModelById(map);
}
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: selectApiModelById
* @Description: 通过id查找对应的api接口模块信息
*/
@Override
public void selectApiModelById(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
Map<String, Object> bean = apiModelDao.queryApiModelToEditById(map);
outputObject.setBean(bean);
outputObject.settotal(1);
}
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: editApiModelMationById
* @Description: 通过id编辑对应的api接口模块信息
*/
@Override
@Transactional(value = "transactionManager")
public void editApiModelMationById(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
Map<String, Object> bean = apiModelDao.queryApiModelMationByName(map);
if (bean != null && !bean.isEmpty()) {
outputObject.setreturnMessage("该模块名称已存在,请更换");
} else {
map.put("userId", inputObject.getLogParams().get("id"));
map.put("lastUpdateTime", DateUtil.getTimeAndToString());
apiModelDao.editApiModelById(map);
}
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.skyeye.dao.ApiModelDao">
<select id="queryApiModelList" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id,
a.name `name`
FROM
api_model a
WHERE
1 = 1
<if test="name != '' and name != null">
AND a.name LIKE '%${name}%'
</if>
ORDER BY a.last_update_time DESC
</select>
<select id="queryApiModelMationByName" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id
FROM
api_model a
WHERE
a.name = #{name}
<if test="id != '' and id != null">
AND a.id != #{id}
</if>
</select>
<insert id="insertApiModel" parameterType="java.util.Map">
INSERT INTO api_model (id, `name`, create_id, create_time, last_update_id, last_update_time)
VALUES
(#{id}, #{name}, #{userId}, #{createTime}, #{userId}, #{createTime})
</insert>
<select id="queryApiModelToEditById" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id,
a.name `name`
FROM
api_model a
WHERE
a.id = #{id}
</select>
<update id="editApiModelById" parameterType="java.util.Map">
UPDATE api_model
<set>
`name` = #{name},
last_update_id = #{userId},
last_update_time = #{lastUpdateTime}
</set>
WHERE
id = #{id}
</update>
<delete id="deleteApiModelById" parameterType="java.util.Map">
DELETE
FROM
api_model
WHERE
id = #{id}
</delete>
</mapper>
\ No newline at end of file
......@@ -23,4 +23,25 @@
</url>
<!-- api接口信息结束 -->
<!-- api接口模块开始 -->
<url id="apimodel001" path="/post/ApiModelController/queryApiModelList" val="查询api接口模块列表信息" allUse="1" groupName="api接口">
<property id="name" name="name" ref="" var="模块名称" />
<property id="limit" name="limit" ref="required,num" var="分页参数,每页多少条数据" />
<property id="page" name="page" ref="required,num" var="分页参数,第几页"/>
</url>
<url id="apimodel002" path="/post/ApiModelController/insertApiModelMation" val="添加api接口模块信息" allUse="1" method="POST" groupName="api接口">
<property id="name" name="name" ref="required" var="模块名称" />
</url>
<url id="apimodel003" path="/post/ApiModelController/selectApiModelById" val="查询api接口模块信息用于数据回显" allUse="2" method="GET" groupName="api接口">
<property id="rowId" name="id" ref="required" var="模块Id"></property>
</url>
<url id="apimodel004" path="/post/ApiModelController/editApiModelMationById" val="编辑api接口模块信息" allUse="1" method="PUT" groupName="api接口">
<property id="rowId" name="id" ref="required" var="模块Id"></property>
<property id="name" name="name" ref="required" var="模块名称" />
</url>
<url id="apimodel005" path="/post/ApiModelController/deleteApiModelById" val="删除api接口模块信息" allUse="1" method="DELETE" groupName="api接口">
<property id="rowId" name="id" ref="required" var="模块Id"></property>
</url>
<!-- api接口模块结束 -->
</controller>
\ No newline at end of file
/*******************************************************************************
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
******************************************************************************/
package com.skyeye.controller;
import com.skyeye.common.object.InputObject;
import com.skyeye.common.object.OutputObject;
import com.skyeye.service.IfsAccountSubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class IfsAccountSubjectController {
@Autowired
private IfsAccountSubjectService ifsAccountSubjectService;
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: queryIfsAccountSubjectList
* @Description: 获取会计科目管理列表
*/
@RequestMapping("/post/IfsAccountSubjectController/queryIfsAccountSubjectList")
@ResponseBody
public void queryIfsAccountSubjectList(InputObject inputObject, OutputObject outputObject) throws Exception {
ifsAccountSubjectService.queryIfsAccountSubjectList(inputObject, outputObject);
}
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: insertIfsAccountSubjectMation
* @Description: 新增会计科目管理信息
*/
@RequestMapping("/post/IfsAccountSubjectController/insertIfsAccountSubjectMation")
@ResponseBody
public void insertIfsAccountSubjectMation(InputObject inputObject, OutputObject outputObject) throws Exception {
ifsAccountSubjectService.insertIfsAccountSubjectMation(inputObject, outputObject);
}
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: deleteIfsAccountSubjectById
* @Description: 删除会计科目管理信息
*/
@RequestMapping("/post/IfsAccountSubjectController/deleteIfsAccountSubjectById")
@ResponseBody
public void deleteIfsAccountSubjectById(InputObject inputObject, OutputObject outputObject) throws Exception {
ifsAccountSubjectService.deleteIfsAccountSubjectById(inputObject, outputObject);
}
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: selectIfsAccountSubjectById
* @Description: 通过id查找对应的会计科目管理信息
*/
@RequestMapping("/post/IfsAccountSubjectController/selectIfsAccountSubjectById")
@ResponseBody
public void selectIfsAccountSubjectById(InputObject inputObject, OutputObject outputObject) throws Exception {
ifsAccountSubjectService.selectIfsAccountSubjectById(inputObject, outputObject);
}
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: editIfsAccountSubjectMationById
* @Description: 通过id编辑对应的会计科目管理信息
*/
@RequestMapping("/post/IfsAccountSubjectController/editIfsAccountSubjectMationById")
@ResponseBody
public void editIfsAccountSubjectMationById(InputObject inputObject, OutputObject outputObject) throws Exception {
ifsAccountSubjectService.editIfsAccountSubjectMationById(inputObject, outputObject);
}
}
/*******************************************************************************
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
******************************************************************************/
package com.skyeye.dao;
import java.util.List;
import java.util.Map;
/**
* @ClassName: IfsAccountSubjectDao
* @Description: 会计科目管理数据层
* @author: skyeye云系列
* @date: 2021/11/27 12:03
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
*/
public interface IfsAccountSubjectDao {
public List<Map<String, Object>> queryIfsAccountSubjectList(Map<String, Object> map) throws Exception;
public Map<String, Object> queryIfsAccountSubjectMationByName(Map<String, Object> map) throws Exception;
public Map<String, Object> queryIfsAccountSubjectMationByNum(Map<String, Object> map) throws Exception;
public int insertIfsAccountSubject(Map<String, Object> map) throws Exception;
public int deleteIfsAccountSubjectById(Map<String, Object> map) throws Exception;
public Map<String, Object> queryIfsAccountSubjectToEditById(Map<String, Object> map) throws Exception;
public int editIfsAccountSubjectById(Map<String, Object> map) throws Exception;
}
/*******************************************************************************
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
******************************************************************************/
package com.skyeye.service;
import com.skyeye.common.object.InputObject;
import com.skyeye.common.object.OutputObject;
public interface IfsAccountSubjectService {
public void queryIfsAccountSubjectList(InputObject inputObject, OutputObject outputObject) throws Exception;
public void insertIfsAccountSubjectMation(InputObject inputObject, OutputObject outputObject) throws Exception;
public void deleteIfsAccountSubjectById(InputObject inputObject, OutputObject outputObject) throws Exception;
public void selectIfsAccountSubjectById(InputObject inputObject, OutputObject outputObject) throws Exception;
public void editIfsAccountSubjectMationById(InputObject inputObject, OutputObject outputObject) throws Exception;
}
/*******************************************************************************
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
******************************************************************************/
package com.skyeye.service.impl;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.skyeye.common.object.InputObject;
import com.skyeye.common.object.OutputObject;
import com.skyeye.common.util.DateUtil;
import com.skyeye.common.util.ToolUtil;
import com.skyeye.dao.IfsAccountSubjectDao;
import com.skyeye.service.IfsAccountSubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @ClassName: IfsAccountSubjectServiceImpl
* @Description: 会计科目管理服务类
* @author: skyeye云系列
* @date: 2021/11/27 12:15
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
*/
@Service
public class IfsAccountSubjectServiceImpl implements IfsAccountSubjectService {
@Autowired
private IfsAccountSubjectDao ifsAccountSubjectDao;
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: queryIfsAccountSubjectList
* @Description: 获取会计科目管理表
*/
@Override
public void queryIfsAccountSubjectList(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
map.put("userId", inputObject.getLogParams().get("id"));
Page pages = PageHelper.startPage(Integer.parseInt(map.get("page").toString()), Integer.parseInt(map.get("limit").toString()));
List<Map<String, Object>> beans = ifsAccountSubjectDao.queryIfsAccountSubjectList(map);
outputObject.setBeans(beans);
outputObject.settotal(pages.getTotal());
}
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: insertIfsAccountSubjectMation
* @Description: 新增会计科目管理
*/
@Override
@Transactional(value = "transactionManager")
public void insertIfsAccountSubjectMation(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
String str = judgeSimpleTitle(map);
if (!"".equals(str)){
outputObject.setreturnMessage(str);
} else {
map.put("id", ToolUtil.getSurFaceId());
map.put("userId", inputObject.getLogParams().get("id"));
map.put("createTime", DateUtil.getTimeAndToString());
ifsAccountSubjectDao.insertIfsAccountSubject(map);
}
}
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: deleteIfsAccountSubjectById
* @Description: 删除会计科目管理信息
*/
@Override
@Transactional(value = "transactionManager")
public void deleteIfsAccountSubjectById(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
ifsAccountSubjectDao.deleteIfsAccountSubjectById(map);
}
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: selectIfsAccountSubjectById
* @Description: 通过id查找对应的会计科目管理信息
*/
@Override
public void selectIfsAccountSubjectById(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
Map<String, Object> bean = ifsAccountSubjectDao.queryIfsAccountSubjectToEditById(map);
outputObject.setBean(bean);
outputObject.settotal(1);
}
/**
* @param inputObject
* @param outputObject
* @return void 返回类型
* @throws Exception 参数
* @throws
* @Title: editIfsAccountSubjectMationById
* @Description: 通过id编辑对应的会计科目管理信息
*/
@Override
@Transactional(value = "transactionManager")
public void editIfsAccountSubjectMationById(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
String str = judgeSimpleTitle(map);
if (!"".equals(str)){
outputObject.setreturnMessage(str);
} else {
map.put("userId", inputObject.getLogParams().get("id"));
map.put("lastUpdateTime", DateUtil.getTimeAndToString());
ifsAccountSubjectDao.editIfsAccountSubjectById(map);
}
}
private String judgeSimpleTitle(Map<String, Object> map) throws Exception {
String str = "";
Map<String, Object> bean = new HashMap<>();
bean = ifsAccountSubjectDao.queryIfsAccountSubjectMationByName(map);
if (bean == null || bean.isEmpty()) {
bean = ifsAccountSubjectDao.queryIfsAccountSubjectMationByNum(map);
if (bean != null && !bean.isEmpty()) {
str = "该会计科目编号已存在,请更换";
}
} else {
str = "该会计科目名称已存在,请更换";
}
return str;
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.skyeye.dao.IfsAccountSubjectDao">
<select id="queryIfsAccountSubjectList" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id,
a.name `name`,
a.num num,
CASE a.type WHEN '1' THEN '资产类' WHEN '2' THEN '负债类' WHEN '3' THEN '权益类' WHEN '4' THEN '成本类' WHEN '5' THEN '损益类' ELSE a.type END `type`,
CASE a.state WHEN '1' THEN '启用' WHEN '2' THEN '停用' ELSE a.state END state,
a.remark
FROM
ifs_account_subject a
WHERE
1 = 1
<if test="type != '' and type != null">
AND a.type = #{type}
</if>
<if test="state != '' and state != null">
AND a.state = #{state}
</if>
<if test="name != '' and name != null">
AND a.name LIKE '%${name}%'
</if>
ORDER BY a.last_update_time DESC
</select>
<select id="queryIfsAccountSubjectMationByName" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id
FROM
ifs_account_subject a
WHERE
a.name = #{name}
<if test="id != '' and id != null">
AND a.id != #{id}
</if>
</select>
<select id="queryIfsAccountSubjectMationByNum" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id
FROM
ifs_account_subject a
WHERE
a.num = #{num}
<if test="id != '' and id != null">
AND a.id != #{id}
</if>
</select>
<insert id="insertIfsAccountSubject" parameterType="java.util.Map">
INSERT INTO ifs_account_subject (id, num, `name`, state, `type`, remark, create_id, create_time, last_update_id, last_update_time
) VALUES
(#{id}, #{num}, #{name}, #{state}, #{type}, #{remark}, #{userId}, #{createTime}, #{userId}, #{createTime})
</insert>
<select id="queryIfsAccountSubjectToEditById" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id,
a.name `name`,
a.state state,
a.num num,
a.type `type`,
a.remark
FROM
ifs_account_subject a
WHERE
a.id = #{id}
</select>
<update id="editIfsAccountSubjectById" parameterType="java.util.Map">
UPDATE ifs_account_subject
<set>
`name` = #{name},
state = #{state},
`type` = #{type},
num = #{num},
remark = #{remark},
last_update_id = #{userId},
last_update_time = #{lastUpdateTime}
</set>
WHERE
id = #{id}
</update>
<delete id="deleteIfsAccountSubjectById" parameterType="java.util.Map">
DELETE
FROM
ifs_account_subject
WHERE
id = #{id}
</delete>
</mapper>
\ No newline at end of file
......@@ -365,4 +365,35 @@
</url>
<!-- 收支项目管理结束 -->
<!-- 会计科目管理开始 -->
<url id="ifsaccountsubject001" path="/post/IfsAccountSubjectController/queryIfsAccountSubjectList" val="查询会计科目列表信息" allUse="1" groupName="财务模块">
<property id="name" name="name" ref="" var="会计科目名称" />
<property id="state" name="state" ref="" var="状态" />
<property id="type" name="type" ref="" var="类型" />
<property id="limit" name="limit" ref="required,num" var="分页参数,每页多少条数据" />
<property id="page" name="page" ref="required,num" var="分页参数,第几页"/>
</url>
<url id="ifsaccountsubject002" path="/post/IfsAccountSubjectController/insertIfsAccountSubjectMation" val="添加会计科目信息" allUse="1" method="POST" groupName="财务模块">
<property id="name" name="name" ref="required" var="会计科目名称" />
<property id="state" name="state" ref="required,num" var="状态" />
<property id="type" name="type" ref="required,num" var="类型" />
<property id="num" name="num" ref="required" var="编号" />
<property id="remark" name="remark" ref="" var="描述" />
</url>
<url id="ifsaccountsubject003" path="/post/IfsAccountSubjectController/selectIfsAccountSubjectById" val="查询会计科目信息用于数据回显" allUse="2" method="GET" groupName="财务模块">
<property id="rowId" name="id" ref="required" var="会计科目Id"></property>
</url>
<url id="ifsaccountsubject004" path="/post/IfsAccountSubjectController/editIfsAccountSubjectMationById" val="编辑会计科目信息" allUse="1" method="PUT" groupName="财务模块">
<property id="rowId" name="id" ref="required" var="会计科目Id"></property>
<property id="name" name="name" ref="required" var="会计科目名称" />
<property id="state" name="state" ref="required,num" var="状态" />
<property id="type" name="type" ref="required,num" var="类型" />
<property id="num" name="num" ref="required" var="编号" />
<property id="remark" name="remark" ref="" var="描述" />
</url>
<url id="ifsaccountsubject005" path="/post/IfsAccountSubjectController/deleteIfsAccountSubjectById" val="删除会计科目信息" allUse="1" method="DELETE" groupName="财务模块">
<property id="rowId" name="id" ref="required" var="会计科目Id"></property>
</url>
<!-- 会计科目管理结束 -->
</controller>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册