添加用户
This commit is contained in:
@@ -18,47 +18,47 @@ import org.apache.ibatis.annotations.Select;
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface AppProjectMapper extends BaseMapper<AppProjectPO> {
|
||||
@Select (
|
||||
{"<script>",
|
||||
"SELECT\n" +
|
||||
"\ta.id id,\n" +
|
||||
"\ta.`name` name,\n" +
|
||||
// "\ta.user_id user_id,\n" +
|
||||
// "\t\"username\" user_name,\n" +
|
||||
"\ta.area area,\n" +
|
||||
// "\tb.file_path topologyDiagramPath,\n" +
|
||||
// "\ta.lng lng,\n" +
|
||||
// "\ta.lat lat,\n" +
|
||||
"\tc.name engineering_name,\n" +
|
||||
"\ta.description description,\n"+
|
||||
"\ta.engineering_id engineering_id,\n" +
|
||||
"\ta.`status` STATUS,\n" +
|
||||
"\ta.create_by create_by,\n" +
|
||||
"\ta.create_time create_time,\n" +
|
||||
"\ta.update_by update_by,\n" +
|
||||
"\ta.update_time update_time\n" +
|
||||
"FROM\n" +
|
||||
"\tcs_project a\n" +
|
||||
" LEFT JOIN cs_engineering c on a.engineering_id=c.id \n" +
|
||||
"WHERE\n" +
|
||||
"\t1 = 1 AND a.status=\"1\"\n" ,
|
||||
"<when test='temp.projectId!=null and temp.projectId!=\"\"'>",
|
||||
"AND a.id = #{temp.projectId} "+
|
||||
"</when>",
|
||||
"<when test='temp.engineeringId!=null and temp.engineeringId!=\"\"'>",
|
||||
"AND a.engineering_id = #{temp.engineeringId} "+
|
||||
"</when>",
|
||||
"<when test='temp.endTime!=null and temp.endTime!=\"\"'>",
|
||||
"AND a.create_time <= #{temp.endTime}" +
|
||||
"</when>",
|
||||
"<when test='temp.startTime!=null and temp.startTime!=\"\"'>",
|
||||
"AND a.create_time >= #{temp.startTime}" +
|
||||
"</when>",
|
||||
"<when test='temp.searchValue!=null and temp.searchValue!=\"\"'>",
|
||||
"AND a.`name` like concat('%',#{temp.searchValue},'%')",
|
||||
"</when>",
|
||||
" order by a.create_time desc",
|
||||
"</script>"}
|
||||
)
|
||||
// @Select (
|
||||
// {"<script>",
|
||||
// "SELECT\n" +
|
||||
// "\ta.id id,\n" +
|
||||
// "\ta.`name` name,\n" +
|
||||
//// "\ta.user_id user_id,\n" +
|
||||
//// "\t\"username\" user_name,\n" +
|
||||
// "\ta.area area,\n" +
|
||||
//// "\tb.file_path topologyDiagramPath,\n" +
|
||||
//// "\ta.lng lng,\n" +
|
||||
//// "\ta.lat lat,\n" +
|
||||
// "\tc.name engineering_name,\n" +
|
||||
// "\ta.description description,\n"+
|
||||
// "\ta.engineering_id engineering_id,\n" +
|
||||
// "\ta.`status` STATUS,\n" +
|
||||
// "\ta.create_by create_by,\n" +
|
||||
// "\ta.create_time create_time,\n" +
|
||||
// "\ta.update_by update_by,\n" +
|
||||
// "\ta.update_time update_time\n" +
|
||||
// "FROM\n" +
|
||||
// "\tcs_project a\n" +
|
||||
// " LEFT JOIN cs_engineering c on a.engineering_id=c.id \n" +
|
||||
// "WHERE\n" +
|
||||
// "\t1 = 1 AND a.status=\"1\"\n" ,
|
||||
// "<when test='temp.projectId!=null and temp.projectId!=\"\"'>",
|
||||
// "AND a.id = #{temp.projectId} "+
|
||||
// "</when>",
|
||||
// "<when test='temp.engineeringId!=null and temp.engineeringId!=\"\"'>",
|
||||
// "AND a.engineering_id = #{temp.engineeringId} "+
|
||||
// "</when>",
|
||||
// "<when test='temp.endTime!=null and temp.endTime!=\"\"'>",
|
||||
// "AND a.create_time <= #{temp.endTime}" +
|
||||
// "</when>",
|
||||
// "<when test='temp.startTime!=null and temp.startTime!=\"\"'>",
|
||||
// "AND a.create_time >= #{temp.startTime}" +
|
||||
// "</when>",
|
||||
// "<when test='temp.searchValue!=null and temp.searchValue!=\"\"'>",
|
||||
// "AND a.`name` like concat('%',#{temp.searchValue},'%')",
|
||||
// "</when>",
|
||||
// " order by a.create_time desc",
|
||||
// "</script>"}
|
||||
// )
|
||||
Page<AppProjectVO> getPageVo(Page<AppProjectVO> returnpage, @Param("temp")AppProjectQueryParm appProjectQueryParm);
|
||||
}
|
||||
@@ -1,16 +1,16 @@
|
||||
package com.njcn.csdevice.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.csdevice.pojo.po.CsProjectEquipmentPO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/4/3 10:24【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface CsProjectEquipmentMapper extends BaseMapper<CsProjectEquipmentPO> {
|
||||
}
|
||||
//package com.njcn.csdevice.mapper;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
//import com.njcn.csdevice.pojo.po.CsProjectEquipmentPO;
|
||||
//
|
||||
///**
|
||||
// *
|
||||
// * Description:
|
||||
// * 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
// * Date: 2023/4/3 10:24【需求编号】
|
||||
// *
|
||||
// * @author clam
|
||||
// * @version V1.0.0
|
||||
// */
|
||||
//public interface CsProjectEquipmentMapper extends BaseMapper<CsProjectEquipmentPO> {
|
||||
//}
|
||||
@@ -21,4 +21,25 @@
|
||||
id, `name`, user_id, area_id, lng, lat, `status`, create_by, create_time, update_by,
|
||||
update_time
|
||||
</sql>
|
||||
|
||||
<select id="getPageVo" resultType="com.njcn.csdevice.pojo.vo.AppProjectVO">
|
||||
select a.*,b.id as engineering_id,b.`Name` as engineering_name from cs_project a LEFT JOIN cs_ledger b on a.id = b.id where 1=1
|
||||
and a.status ="1"
|
||||
<if test="temp!=null and temp.projectId != null and temp.projectId !=''">
|
||||
AND a.id = #{temp.projectId}
|
||||
</if>
|
||||
<if test="temp!=null and temp.engineeringId != null and temp.engineeringId !=''">
|
||||
AND b.id = #{temp.engineeringId}
|
||||
</if>
|
||||
<if test="temp!=null and temp.endTime != null and temp.endTime !=''">
|
||||
AND a.create_time <= #{temp.endTime}"
|
||||
</if>
|
||||
<if test="temp!=null and temp.startTime != null and temp.startTime !=''">
|
||||
AND a.create_time >= #{temp.startTime}
|
||||
</if>
|
||||
<if test="temp!=null and temp.searchValue != null and temp.searchValue !=''">
|
||||
AND a.`name` like concat('%',#{temp.searchValue},'%')
|
||||
</if>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -32,25 +32,31 @@
|
||||
</sql>
|
||||
<select id="queryProjectEquipmentVO" resultType="com.njcn.csdevice.pojo.vo.ProjectEquipmentVO">
|
||||
SELECT
|
||||
a.engineering_id engineeringId,
|
||||
d.name engineeringName,
|
||||
a.id projectId,
|
||||
a.name projectName,
|
||||
b.id equipmentId,
|
||||
b.name equipmentName,
|
||||
a.id engineeringId,
|
||||
a.name engineeringName,
|
||||
b.id projectId,
|
||||
b.name projectName,
|
||||
c.id equipmentId,
|
||||
c.name equipmentName,
|
||||
c.create_time createTime
|
||||
FROM cs_project a,
|
||||
cs_equipment_delivery b,
|
||||
cs_project_equipment c,
|
||||
cs_engineering d
|
||||
WHERE a.id = c.project_id
|
||||
AND b.id = c.equipment_id
|
||||
and a.engineering_id =d.id
|
||||
FROM
|
||||
(select * from cs_ledger where LEVEL = 0 ) a,
|
||||
(select * from cs_ledger where LEVEL = 1 ) b,
|
||||
(select * from cs_ledger where LEVEL = 2 ) d,
|
||||
cs_equipment_delivery c
|
||||
WHERE
|
||||
a.LEVEL = 0
|
||||
AND b.LEVEL = 1
|
||||
AND a.id = b.pid
|
||||
AND b.id = d.pid
|
||||
AND c.id =d.id
|
||||
<if test="projectEquipmentQueryParm!=null and projectEquipmentQueryParm.projectType != null and projectEquipmentQueryParm.projectType !=''">
|
||||
AND a.project_type = #{projectEquipmentQueryParm.projectType}
|
||||
AND c.project_type = #{projectEquipmentQueryParm.projectType}
|
||||
</if>
|
||||
<if test="projectEquipmentQueryParm!=null and projectEquipmentQueryParm.projectId != null and projectEquipmentQueryParm.projectId !=''">
|
||||
AND a.id = #{projectEquipmentQueryParm.projectId}
|
||||
AND b.id = #{projectEquipmentQueryParm.projectId}
|
||||
</if>
|
||||
order by a.create_time desc
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?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.njcn.csdevice.mapper.CsProjectEquipmentMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.csdevice.pojo.po.CsProjectEquipmentPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table `cs_project_equipment`-->
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="equipment_id" jdbcType="VARCHAR" property="equipmentId" />
|
||||
<result column="status" jdbcType="INTEGER" property="status" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, project_id, equipment_id, `status`, create_by, create_time, update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user