13 changed files with 727 additions and 9 deletions
@ -0,0 +1,104 @@ |
|||
package com.zdxt.app.controller; |
|||
|
|||
import com.zdxt.code.domain.EnterpriseEvaluate; |
|||
import com.zdxt.code.service.IEnterpriseEvaluateService; |
|||
import com.zdxt.common.ZDResponse; |
|||
import com.zdxt.common.controller.BaseController; |
|||
import com.zdxt.common.util.TableDataInfo; |
|||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.ui.ModelMap; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 企业端-执法评价Controller |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-08-02 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/app/evaluate") |
|||
public class AppEnterpriseEvaluateController extends BaseController |
|||
{ |
|||
private String prefix = "project/code/evaluate"; |
|||
|
|||
@Autowired |
|||
private IEnterpriseEvaluateService enterpriseEvaluateService; |
|||
|
|||
@RequiresPermissions("system:evaluate:view") |
|||
@GetMapping() |
|||
public String evaluate() |
|||
{ |
|||
return prefix + "/evaluate"; |
|||
} |
|||
|
|||
/** |
|||
* 查询企业端-执法评价列表 |
|||
*/ |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(EnterpriseEvaluate enterpriseEvaluate) |
|||
{ |
|||
startPage(); |
|||
List<EnterpriseEvaluate> list = enterpriseEvaluateService.selectEnterpriseEvaluateList(enterpriseEvaluate); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 新增企业端-执法评价 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存企业端-执法评价 |
|||
*/ |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public ZDResponse addSave(@RequestBody EnterpriseEvaluate enterpriseEvaluate) |
|||
{ |
|||
return enterpriseEvaluateService.insertEnterpriseEvaluate(enterpriseEvaluate) > 0 |
|||
?ZDResponse.success("保存成功"):ZDResponse.error("保存失败"); |
|||
} |
|||
|
|||
/** |
|||
* 修改企业端-执法评价 |
|||
*/ |
|||
@GetMapping("/edit/{id}") |
|||
public String edit(@PathVariable("id") String id, ModelMap mmap) |
|||
{ |
|||
EnterpriseEvaluate enterpriseEvaluate = enterpriseEvaluateService.selectEnterpriseEvaluateById(id); |
|||
mmap.put("enterpriseEvaluate", enterpriseEvaluate); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存企业端-执法评价 |
|||
*/ |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public ZDResponse editSave(EnterpriseEvaluate enterpriseEvaluate) |
|||
{ |
|||
return enterpriseEvaluateService.updateEnterpriseEvaluate(enterpriseEvaluate) > 0 ? |
|||
ZDResponse.success("修改成功"):ZDResponse.error("修改失败"); |
|||
} |
|||
|
|||
/** |
|||
* 删除企业端-执法评价 |
|||
*/ |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public ZDResponse remove(String ids) |
|||
{ |
|||
return enterpriseEvaluateService.deleteEnterpriseEvaluateByIds(ids) > 0 ? |
|||
ZDResponse.success("删除成功") : ZDResponse.error("删除失败"); |
|||
} |
|||
} |
|||
@ -0,0 +1,108 @@ |
|||
package com.zdxt.code.controller; |
|||
|
|||
import java.util.List; |
|||
|
|||
import com.zdxt.code.domain.EnterpriseEvaluate; |
|||
import com.zdxt.code.service.IEnterpriseEvaluateService; |
|||
import com.zdxt.common.ZDResponse; |
|||
import com.zdxt.common.controller.BaseController; |
|||
import com.zdxt.common.util.TableDataInfo; |
|||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.ui.ModelMap; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.ResponseBody; |
|||
|
|||
|
|||
/** |
|||
* 企业端-执法评价Controller |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-08-02 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/code/evaluate") |
|||
public class EnterpriseEvaluateController extends BaseController |
|||
{ |
|||
private String prefix = "system/evaluate"; |
|||
|
|||
@Autowired |
|||
private IEnterpriseEvaluateService enterpriseEvaluateService; |
|||
|
|||
@RequiresPermissions("system:evaluate:view") |
|||
@GetMapping() |
|||
public String evaluate() |
|||
{ |
|||
return prefix + "/evaluate"; |
|||
} |
|||
|
|||
/** |
|||
* 查询企业端-执法评价列表 |
|||
*/ |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(EnterpriseEvaluate enterpriseEvaluate) |
|||
{ |
|||
startPage(); |
|||
List<EnterpriseEvaluate> list = enterpriseEvaluateService.selectEnterpriseEvaluateList(enterpriseEvaluate); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 新增企业端-执法评价 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存企业端-执法评价 |
|||
*/ |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public ZDResponse addSave(EnterpriseEvaluate enterpriseEvaluate) |
|||
{ |
|||
return enterpriseEvaluateService.insertEnterpriseEvaluate(enterpriseEvaluate) > 0 |
|||
?ZDResponse.success("保存成功"):ZDResponse.error("保存失败"); |
|||
} |
|||
|
|||
/** |
|||
* 修改企业端-执法评价 |
|||
*/ |
|||
@GetMapping("/edit/{id}") |
|||
public String edit(@PathVariable("id") String id, ModelMap mmap) |
|||
{ |
|||
EnterpriseEvaluate enterpriseEvaluate = enterpriseEvaluateService.selectEnterpriseEvaluateById(id); |
|||
mmap.put("enterpriseEvaluate", enterpriseEvaluate); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存企业端-执法评价 |
|||
*/ |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public ZDResponse editSave(EnterpriseEvaluate enterpriseEvaluate) |
|||
{ |
|||
return enterpriseEvaluateService.updateEnterpriseEvaluate(enterpriseEvaluate) > 0 ? |
|||
ZDResponse.success("修改成功"):ZDResponse.error("修改失败"); |
|||
} |
|||
|
|||
/** |
|||
* 删除企业端-执法评价 |
|||
*/ |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public ZDResponse remove(String ids) |
|||
{ |
|||
return enterpriseEvaluateService.deleteEnterpriseEvaluateByIds(ids) > 0 ? |
|||
ZDResponse.success("删除成功") : ZDResponse.error("删除失败"); |
|||
} |
|||
} |
|||
@ -0,0 +1,138 @@ |
|||
package com.zdxt.code.domain; |
|||
|
|||
import com.zdxt.common.BaseDomain; |
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
import org.apache.commons.lang3.builder.ToStringStyle; |
|||
|
|||
|
|||
/** |
|||
* 企业端-执法评价对象 enterprise_evaluate |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-08-02 |
|||
*/ |
|||
public class EnterpriseEvaluate extends BaseDomain |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 主键ID */ |
|||
private String id; |
|||
|
|||
/** 案件名称 */ |
|||
private String enforcementName; |
|||
|
|||
/** 案件ID */ |
|||
private String enforcementId; |
|||
|
|||
/** 评价|意见建议 */ |
|||
private String evaluateDescription; |
|||
|
|||
/** 联系人 */ |
|||
private String linkman; |
|||
|
|||
/** 联系电话 */ |
|||
private String linkmanTel; |
|||
|
|||
/** 是否授权 0 否 1是 */ |
|||
private Integer authorization; |
|||
|
|||
/** 企业名称 */ |
|||
private String enterpriseName; |
|||
|
|||
/** 企业纳税识别号 */ |
|||
private String enterpriseNumber; |
|||
|
|||
public void setId(String id) |
|||
{ |
|||
this.id = id; |
|||
} |
|||
|
|||
public String getId() |
|||
{ |
|||
return id; |
|||
} |
|||
public void setEnforcementName(String enforcementName) |
|||
{ |
|||
this.enforcementName = enforcementName; |
|||
} |
|||
|
|||
public String getEnforcementName() |
|||
{ |
|||
return enforcementName; |
|||
} |
|||
public void setEnforcementId(String enforcementId) |
|||
{ |
|||
this.enforcementId = enforcementId; |
|||
} |
|||
|
|||
public String getEnforcementId() |
|||
{ |
|||
return enforcementId; |
|||
} |
|||
public void setEvaluateDescription(String evaluateDescription) |
|||
{ |
|||
this.evaluateDescription = evaluateDescription; |
|||
} |
|||
|
|||
public String getEvaluateDescription() |
|||
{ |
|||
return evaluateDescription; |
|||
} |
|||
public void setLinkman(String linkman) |
|||
{ |
|||
this.linkman = linkman; |
|||
} |
|||
|
|||
public String getLinkman() |
|||
{ |
|||
return linkman; |
|||
} |
|||
public void setLinkmanTel(String linkmanTel) |
|||
{ |
|||
this.linkmanTel = linkmanTel; |
|||
} |
|||
|
|||
public String getLinkmanTel() |
|||
{ |
|||
return linkmanTel; |
|||
} |
|||
public void setAuthorization(Integer authorization) |
|||
{ |
|||
this.authorization = authorization; |
|||
} |
|||
|
|||
public Integer getAuthorization() |
|||
{ |
|||
return authorization; |
|||
} |
|||
|
|||
public String getEnterpriseName() { |
|||
return enterpriseName; |
|||
} |
|||
|
|||
public void setEnterpriseName(String enterpriseName) { |
|||
this.enterpriseName = enterpriseName; |
|||
} |
|||
|
|||
public String getEnterpriseNumber() { |
|||
return enterpriseNumber; |
|||
} |
|||
|
|||
public void setEnterpriseNumber(String enterpriseNumber) { |
|||
this.enterpriseNumber = enterpriseNumber; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("id", getId()) |
|||
.append("enforcementName", getEnforcementName()) |
|||
.append("enforcementId", getEnforcementId()) |
|||
.append("evaluateDescription", getEvaluateDescription()) |
|||
.append("linkman", getLinkman()) |
|||
.append("linkmanTel", getLinkmanTel()) |
|||
.append("authorization", getAuthorization()) |
|||
.append("createTime", getCreateTime()) |
|||
.toString(); |
|||
} |
|||
} |
|||
@ -0,0 +1,62 @@ |
|||
package com.zdxt.code.mapper; |
|||
|
|||
import com.zdxt.code.domain.EnterpriseEvaluate; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 企业端-执法评价Mapper接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-08-02 |
|||
*/ |
|||
public interface EnterpriseEvaluateMapper |
|||
{ |
|||
/** |
|||
* 查询企业端-执法评价 |
|||
* |
|||
* @param id 企业端-执法评价ID |
|||
* @return 企业端-执法评价 |
|||
*/ |
|||
public EnterpriseEvaluate selectEnterpriseEvaluateById(String id); |
|||
|
|||
/** |
|||
* 查询企业端-执法评价列表 |
|||
* |
|||
* @param enterpriseEvaluate 企业端-执法评价 |
|||
* @return 企业端-执法评价集合 |
|||
*/ |
|||
public List<EnterpriseEvaluate> selectEnterpriseEvaluateList(EnterpriseEvaluate enterpriseEvaluate); |
|||
|
|||
/** |
|||
* 新增企业端-执法评价 |
|||
* |
|||
* @param enterpriseEvaluate 企业端-执法评价 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertEnterpriseEvaluate(EnterpriseEvaluate enterpriseEvaluate); |
|||
|
|||
/** |
|||
* 修改企业端-执法评价 |
|||
* |
|||
* @param enterpriseEvaluate 企业端-执法评价 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateEnterpriseEvaluate(EnterpriseEvaluate enterpriseEvaluate); |
|||
|
|||
/** |
|||
* 删除企业端-执法评价 |
|||
* |
|||
* @param id 企业端-执法评价ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteEnterpriseEvaluateById(String id); |
|||
|
|||
/** |
|||
* 批量删除企业端-执法评价 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteEnterpriseEvaluateByIds(String[] ids); |
|||
} |
|||
@ -0,0 +1,62 @@ |
|||
package com.zdxt.code.service; |
|||
|
|||
import com.zdxt.code.domain.EnterpriseEvaluate; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 企业端-执法评价Service接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-08-02 |
|||
*/ |
|||
public interface IEnterpriseEvaluateService |
|||
{ |
|||
/** |
|||
* 查询企业端-执法评价 |
|||
* |
|||
* @param id 企业端-执法评价ID |
|||
* @return 企业端-执法评价 |
|||
*/ |
|||
public EnterpriseEvaluate selectEnterpriseEvaluateById(String id); |
|||
|
|||
/** |
|||
* 查询企业端-执法评价列表 |
|||
* |
|||
* @param enterpriseEvaluate 企业端-执法评价 |
|||
* @return 企业端-执法评价集合 |
|||
*/ |
|||
public List<EnterpriseEvaluate> selectEnterpriseEvaluateList(EnterpriseEvaluate enterpriseEvaluate); |
|||
|
|||
/** |
|||
* 新增企业端-执法评价 |
|||
* |
|||
* @param enterpriseEvaluate 企业端-执法评价 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertEnterpriseEvaluate(EnterpriseEvaluate enterpriseEvaluate); |
|||
|
|||
/** |
|||
* 修改企业端-执法评价 |
|||
* |
|||
* @param enterpriseEvaluate 企业端-执法评价 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateEnterpriseEvaluate(EnterpriseEvaluate enterpriseEvaluate); |
|||
|
|||
/** |
|||
* 批量删除企业端-执法评价 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteEnterpriseEvaluateByIds(String ids); |
|||
|
|||
/** |
|||
* 删除企业端-执法评价信息 |
|||
* |
|||
* @param id 企业端-执法评价ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteEnterpriseEvaluateById(String id); |
|||
} |
|||
@ -0,0 +1,126 @@ |
|||
package com.zdxt.code.service.impl; |
|||
|
|||
import java.util.List; |
|||
|
|||
import cn.hutool.core.convert.Convert; |
|||
import cn.hutool.core.util.IdUtil; |
|||
import cn.hutool.core.util.StrUtil; |
|||
import com.zdxt.code.domain.EnforcementRegistration; |
|||
import com.zdxt.code.domain.EnterpriseEvaluate; |
|||
import com.zdxt.code.mapper.EnforcementRegistrationMapper; |
|||
import com.zdxt.code.mapper.EnterpriseEvaluateMapper; |
|||
import com.zdxt.code.service.IEnterpriseEvaluateService; |
|||
import com.zdxt.common.util.DateUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
|
|||
/** |
|||
* 企业端-执法评价Service业务层处理 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-08-02 |
|||
*/ |
|||
@Service |
|||
public class EnterpriseEvaluateServiceImpl implements IEnterpriseEvaluateService |
|||
{ |
|||
@Autowired |
|||
private EnterpriseEvaluateMapper enterpriseEvaluateMapper; |
|||
|
|||
@Autowired |
|||
private EnforcementRegistrationMapper enforcementRegistrationMapper; |
|||
|
|||
/** |
|||
* 查询企业端-执法评价 |
|||
* |
|||
* @param id 企业端-执法评价ID |
|||
* @return 企业端-执法评价 |
|||
*/ |
|||
@Override |
|||
public EnterpriseEvaluate selectEnterpriseEvaluateById(String id) |
|||
{ |
|||
return enterpriseEvaluateMapper.selectEnterpriseEvaluateById(id); |
|||
} |
|||
|
|||
/** |
|||
* 查询企业端-执法评价列表 |
|||
* |
|||
* @param enterpriseEvaluate 企业端-执法评价 |
|||
* @return 企业端-执法评价 |
|||
*/ |
|||
@Override |
|||
public List<EnterpriseEvaluate> selectEnterpriseEvaluateList(EnterpriseEvaluate enterpriseEvaluate) |
|||
{ |
|||
return enterpriseEvaluateMapper.selectEnterpriseEvaluateList(enterpriseEvaluate); |
|||
} |
|||
|
|||
/** |
|||
* 新增企业端-执法评价 |
|||
* |
|||
* @param enterpriseEvaluate 企业端-执法评价 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertEnterpriseEvaluate(EnterpriseEvaluate enterpriseEvaluate) |
|||
{ |
|||
enterpriseEvaluate.setCreateTime(DateUtils.getNowDate()); |
|||
enterpriseEvaluate.setId(IdUtil.simpleUUID()); |
|||
|
|||
//查询案件信息
|
|||
EnforcementRegistration enforcementRegistration = |
|||
enforcementRegistrationMapper.selectEnforcementRegistrationById(enterpriseEvaluate.getEnforcementId()); |
|||
if(StrUtil.isNotEmpty(enforcementRegistration.getEnterpriseNumber())){ |
|||
//获取被执法企业信息
|
|||
enterpriseEvaluate.setEnterpriseName(enforcementRegistration.getEnterpriseName()); |
|||
enterpriseEvaluate.setEnterpriseNumber(enforcementRegistration.getEnterpriseNumber()); |
|||
} |
|||
int i = enterpriseEvaluateMapper.insertEnterpriseEvaluate(enterpriseEvaluate); |
|||
if(i > 0){ |
|||
//变更执法登记是否评价状态
|
|||
EnforcementRegistration enforcementRegistration1 = new EnforcementRegistration(); |
|||
enforcementRegistration1.setId(enforcementRegistration.getId()); |
|||
enforcementRegistration1.setIsEvaluate(1); |
|||
|
|||
|
|||
enforcementRegistrationMapper.updateEnforcementRegistration(enforcementRegistration1); |
|||
} |
|||
return i; |
|||
} |
|||
|
|||
/** |
|||
* 修改企业端-执法评价 |
|||
* |
|||
* @param enterpriseEvaluate 企业端-执法评价 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateEnterpriseEvaluate(EnterpriseEvaluate enterpriseEvaluate) |
|||
{ |
|||
enterpriseEvaluate.setUpdateTime(DateUtils.getNowDate()); |
|||
return enterpriseEvaluateMapper.updateEnterpriseEvaluate(enterpriseEvaluate); |
|||
} |
|||
|
|||
/** |
|||
* 删除企业端-执法评价对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteEnterpriseEvaluateByIds(String ids) |
|||
{ |
|||
return enterpriseEvaluateMapper.deleteEnterpriseEvaluateByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除企业端-执法评价信息 |
|||
* |
|||
* @param id 企业端-执法评价ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteEnterpriseEvaluateById(String id) |
|||
{ |
|||
return enterpriseEvaluateMapper.deleteEnterpriseEvaluateById(id); |
|||
} |
|||
} |
|||
@ -0,0 +1,91 @@ |
|||
<?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.zdxt.code.mapper.EnterpriseEvaluateMapper"> |
|||
|
|||
<resultMap type="EnterpriseEvaluate" id="EnterpriseEvaluateResult"> |
|||
<result property="id" column="id" /> |
|||
<result property="enforcementName" column="enforcement_name" /> |
|||
<result property="enforcementId" column="enforcement_id" /> |
|||
<result property="evaluateDescription" column="evaluate_description" /> |
|||
<result property="linkman" column="linkman" /> |
|||
<result property="linkmanTel" column="linkman_tel" /> |
|||
<result property="authorization" column="authorization" /> |
|||
<result property="createTime" column="create_time" /> |
|||
<result property="enterpriseNumber" column="enterprise_number" /> |
|||
<result property="enterpriseName" column="enterprise_name" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectEnterpriseEvaluateVo"> |
|||
select id, enforcement_name, enforcement_id, evaluate_description, linkman, linkman_tel, |
|||
authorization, create_time,enterprise_number,enterprise_name from enterprise_evaluate |
|||
</sql> |
|||
|
|||
<select id="selectEnterpriseEvaluateList" parameterType="EnterpriseEvaluate" resultMap="EnterpriseEvaluateResult"> |
|||
<include refid="selectEnterpriseEvaluateVo"/> |
|||
<where> |
|||
<if test="enforcementName != null and enforcementName != ''"> and enforcement_name like concat('%', #{enforcementName}, '%')</if> |
|||
<if test="enforcementId != null and enforcementId != ''"> and enforcement_id = #{enforcementId}</if> |
|||
<if test="evaluateDescription != null and evaluateDescription != ''"> and evaluate_description = #{evaluateDescription}</if> |
|||
<if test="linkman != null and linkman != ''"> and linkman = #{linkman}</if> |
|||
<if test="linkmanTel != null and linkmanTel != ''"> and linkman_tel = #{linkmanTel}</if> |
|||
<if test="authorization != null "> and authorization = #{authorization}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectEnterpriseEvaluateById" parameterType="String" resultMap="EnterpriseEvaluateResult"> |
|||
<include refid="selectEnterpriseEvaluateVo"/> |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
<insert id="insertEnterpriseEvaluate" parameterType="EnterpriseEvaluate"> |
|||
insert into enterprise_evaluate |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null and id != ''">id,</if> |
|||
<if test="enforcementName != null and enforcementName != ''">enforcement_name,</if> |
|||
<if test="enforcementId != null and enforcementId != ''">enforcement_id,</if> |
|||
<if test="evaluateDescription != null and evaluateDescription != ''">evaluate_description,</if> |
|||
<if test="linkman != null and linkman != ''">linkman,</if> |
|||
<if test="linkmanTel != null and linkmanTel != ''">linkman_tel,</if> |
|||
<if test="authorization != null ">authorization,</if> |
|||
<if test="createTime != null ">create_time,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null and id != ''">#{id},</if> |
|||
<if test="enforcementName != null and enforcementName != ''">#{enforcementName},</if> |
|||
<if test="enforcementId != null and enforcementId != ''">#{enforcementId},</if> |
|||
<if test="evaluateDescription != null and evaluateDescription != ''">#{evaluateDescription},</if> |
|||
<if test="linkman != null and linkman != ''">#{linkman},</if> |
|||
<if test="linkmanTel != null and linkmanTel != ''">#{linkmanTel},</if> |
|||
<if test="authorization != null ">#{authorization},</if> |
|||
<if test="createTime != null ">#{createTime},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateEnterpriseEvaluate" parameterType="EnterpriseEvaluate"> |
|||
update enterprise_evaluate |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="enforcementName != null and enforcementName != ''">enforcement_name = #{enforcementName},</if> |
|||
<if test="enforcementId != null and enforcementId != ''">enforcement_id = #{enforcementId},</if> |
|||
<if test="evaluateDescription != null and evaluateDescription != ''">evaluate_description = #{evaluateDescription},</if> |
|||
<if test="linkman != null and linkman != ''">linkman = #{linkman},</if> |
|||
<if test="linkmanTel != null and linkmanTel != ''">linkman_tel = #{linkmanTel},</if> |
|||
<if test="authorization != null ">authorization = #{authorization},</if> |
|||
<if test="createTime != null ">create_time = #{createTime},</if> |
|||
</trim> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<delete id="deleteEnterpriseEvaluateById" parameterType="String"> |
|||
delete from enterprise_evaluate where id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="deleteEnterpriseEvaluateByIds" parameterType="String"> |
|||
delete from enterprise_evaluate where id in |
|||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
</mapper> |
|||
Loading…
Reference in new issue