44 changed files with 1055 additions and 30 deletions
@ -0,0 +1,17 @@ |
|||||
|
package com.yxt.supervise.crm.api.industrydictionary; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:34 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "所属行业字典", description = "所属行业字典") |
||||
|
@TableName("industry_dictionary") |
||||
|
public class IndustryDictionary extends BaseEntity { |
||||
|
private String industryName; |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.yxt.supervise.crm.api.industrydictionary; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:36 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "所属行业字典 视图数据详情", description = "所属行业字典 视图数据详情") |
||||
|
public class IndustryDictionaryDetailsVo implements Vo { |
||||
|
private String industryName; |
||||
|
private String id; |
||||
|
private String sid; |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.yxt.supervise.crm.api.industrydictionary; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:36 |
||||
|
*/ |
||||
|
@ApiModel(value = "所属行业字典 数据传输对象", description = "所属行业字典 数据传输对象") |
||||
|
@Data |
||||
|
public class IndustryDictionaryDto implements Dto { |
||||
|
private String industryName; |
||||
|
private String id; |
||||
|
private String sid; |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.yxt.supervise.crm.api.industrydictionary; |
||||
|
|
||||
|
import com.yxt.supervise.crm.api.warehouselocation.WarehouseLocationFeignFallback; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:36 |
||||
|
*/ |
||||
|
@Api(tags = "所属行业字典") |
||||
|
@FeignClient( |
||||
|
contextId = "supervise-crm-industrydictionary", |
||||
|
name = "supervise-crm", |
||||
|
path = "v1/industrydictionary", |
||||
|
fallback = IndustryDictionaryFeignFallback.class) |
||||
|
public interface IndustryDictionaryFeign { |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
package com.yxt.supervise.crm.api.industrydictionary; |
||||
|
|
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:37 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class IndustryDictionaryFeignFallback { |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.yxt.supervise.crm.api.industrydictionary; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:37 |
||||
|
*/ |
||||
|
@ApiModel(value = "所属行业字典 查询条件", description = "所属行业字典 查询条件") |
||||
|
@Data |
||||
|
public class IndustryDictionaryQuery implements Query { |
||||
|
private String industryName; |
||||
|
private String id; |
||||
|
private String sid; |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.yxt.supervise.crm.api.industrydictionary; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:37 |
||||
|
*/ |
||||
|
@ApiModel(value = "所属行业字典 视图数据对象", description = "所属行业字典 视图数据对象") |
||||
|
@Data |
||||
|
public class IndustryDictionaryVo implements Vo { |
||||
|
private String industryName; |
||||
|
private String id; |
||||
|
private String sid; |
||||
|
} |
@ -0,0 +1,29 @@ |
|||||
|
package com.yxt.supervise.crm.api.projectinformation; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:27 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "项目信息", description = "项目信息") |
||||
|
@TableName("project_information") |
||||
|
public class ProjectInformation extends BaseEntity { |
||||
|
private String entryName; |
||||
|
private String engaDate; |
||||
|
private String creditLimit; |
||||
|
private String signingDate; |
||||
|
private String endDate; |
||||
|
private String regulatoryLeader; |
||||
|
private String generalManager; |
||||
|
private String fillInDate; |
||||
|
private String bankSid; |
||||
|
private String managerSid; |
||||
|
private String enterpriseSid; |
||||
|
private String industrySid; |
||||
|
private String typeSid; |
||||
|
} |
@ -0,0 +1,13 @@ |
|||||
|
package com.yxt.supervise.crm.api.projectinformation; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:28 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "项目信息 视图数据详情", description = "项目信息 视图数据详情") |
||||
|
public class ProjectInformationDetailsVo { |
||||
|
} |
@ -0,0 +1,44 @@ |
|||||
|
package com.yxt.supervise.crm.api.projectinformation; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:28 |
||||
|
*/ |
||||
|
@ApiModel(value = "项目信息 数据传输对象", description = "项目信息 数据传输对象") |
||||
|
@Data |
||||
|
public class ProjectInformationDto implements Dto { |
||||
|
private String id; |
||||
|
private String sid; |
||||
|
//项目名称
|
||||
|
private String entryName; |
||||
|
//接洽日期
|
||||
|
private String engaDate; |
||||
|
//授信额度
|
||||
|
private String creditLimit; |
||||
|
//签约日期
|
||||
|
private String signingDate; |
||||
|
//结束日期
|
||||
|
private String endDate; |
||||
|
//监管负责人
|
||||
|
private String regulatoryLeader; |
||||
|
//事业部总经理
|
||||
|
private String generalManager; |
||||
|
//填表日期
|
||||
|
private String fillInDate; |
||||
|
//银行sid
|
||||
|
private String bankSid; |
||||
|
//银行负责人sid
|
||||
|
private String managerSid; |
||||
|
//企业sid
|
||||
|
private String enterpriseSid; |
||||
|
//行业sid
|
||||
|
private String industrySid; |
||||
|
//项目类型sid
|
||||
|
private String typeSid; |
||||
|
//项目说明
|
||||
|
private String remarks; |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.yxt.supervise.crm.api.projectinformation; |
||||
|
|
||||
|
import com.yxt.supervise.crm.api.warehouselocation.WarehouseLocationFeignFallback; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:28 |
||||
|
*/ |
||||
|
@Api(tags = "项目信息") |
||||
|
@FeignClient( |
||||
|
contextId = "supervise-crm-projectinformation", |
||||
|
name = "supervise-crm", |
||||
|
path = "v1/projectinformation", |
||||
|
fallback = ProjectInformationFeignFallback.class) |
||||
|
public interface ProjectInformationFeign { |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
package com.yxt.supervise.crm.api.projectinformation; |
||||
|
|
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:29 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class ProjectInformationFeignFallback { |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
package com.yxt.supervise.crm.api.projectinformation; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:29 |
||||
|
*/ |
||||
|
@ApiModel(value = "项目信息 查询条件", description = "项目信息 查询条件") |
||||
|
@Data |
||||
|
public class ProjectInformationQuery implements Query { |
||||
|
private String id; |
||||
|
private String sid; |
||||
|
private String entryName; |
||||
|
private String engaDate; |
||||
|
private String creditLimit; |
||||
|
private String signingDate; |
||||
|
private String endDate; |
||||
|
private String regulatoryLeader; |
||||
|
private String generalManager; |
||||
|
private String fillInDate; |
||||
|
private String bankSid; |
||||
|
private String bManagerSid; |
||||
|
private String enterpriseSid; |
||||
|
private String industrySid; |
||||
|
private String typeSid; |
||||
|
private String remarks; |
||||
|
|
||||
|
} |
@ -0,0 +1,48 @@ |
|||||
|
package com.yxt.supervise.crm.api.projectinformation; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:29 |
||||
|
*/ |
||||
|
@ApiModel(value = "项目信息 视图数据对象", description = "项目信息 视图数据对象") |
||||
|
@Data |
||||
|
public class ProjectInformationVo implements Vo { |
||||
|
private String id ; |
||||
|
private String sid; |
||||
|
//项目名称
|
||||
|
private String entryName; |
||||
|
//所属行业
|
||||
|
private String industryName; |
||||
|
//项目类型
|
||||
|
private String typeName; |
||||
|
//授信额度
|
||||
|
private String creditLimit; |
||||
|
//贷款行
|
||||
|
private String bankName; |
||||
|
//客户经理
|
||||
|
private String bManagerName; |
||||
|
//签约日期
|
||||
|
private String signingDate; |
||||
|
//结束日期
|
||||
|
private String endDate; |
||||
|
//企业名称
|
||||
|
private String enterpriseName; |
||||
|
//联系人
|
||||
|
private String eContacts; |
||||
|
//监管负责人
|
||||
|
private String regulatoryLeader; |
||||
|
|
||||
|
private String generalManager; |
||||
|
private String fillInDate; |
||||
|
private String bankSid; |
||||
|
private String managerSid; |
||||
|
private String enterpriseSid; |
||||
|
private String industrySid; |
||||
|
private String typeSid; |
||||
|
private String remarks; |
||||
|
private String engaDate; |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.yxt.supervise.crm.api.projecttypedictionary; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:27 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "项目类型字典", description = "项目类型字典") |
||||
|
@TableName("project_type_dictionary") |
||||
|
public class ProjectTypeDictionary extends BaseEntity { |
||||
|
private String typeName; |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.yxt.supervise.crm.api.projecttypedictionary; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:28 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "项目类型字典 视图数据详情", description = "项目类型字典 视图数据详情") |
||||
|
public class ProjectTypeDictionaryDetailsVo { |
||||
|
private String typeName; |
||||
|
private String id; |
||||
|
private String sid; |
||||
|
|
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.yxt.supervise.crm.api.projecttypedictionary; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:28 |
||||
|
*/ |
||||
|
@ApiModel(value = "项目类型字典 数据传输对象", description = "项目类型字典 数据传输对象") |
||||
|
@Data |
||||
|
public class ProjectTypeDictionaryDto implements Dto { |
||||
|
private String typeName; |
||||
|
private String id; |
||||
|
private String sid; |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.yxt.supervise.crm.api.projecttypedictionary; |
||||
|
|
||||
|
import io.swagger.annotations.Api; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:28 |
||||
|
*/ |
||||
|
@Api(tags = "项目类型字典") |
||||
|
@FeignClient( |
||||
|
contextId = "supervise-crm-projecttypedictionary", |
||||
|
name = "supervise-crm", |
||||
|
path = "v1/projecttypedictionary", |
||||
|
fallback = ProjectTypeDictionaryFeignFallback.class) |
||||
|
public interface ProjectTypeDictionaryFeign { |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
package com.yxt.supervise.crm.api.projecttypedictionary; |
||||
|
|
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:29 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class ProjectTypeDictionaryFeignFallback { |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.yxt.supervise.crm.api.projecttypedictionary; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:29 |
||||
|
*/ |
||||
|
@ApiModel(value = "项目类型字典 查询条件", description = "项目类型字典 查询条件") |
||||
|
@Data |
||||
|
public class ProjectTypeDictionaryQuery implements Query { |
||||
|
private String typeName; |
||||
|
private String id; |
||||
|
private String sid; |
||||
|
|
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.yxt.supervise.crm.api.projecttypedictionary; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/25 9:29 |
||||
|
*/ |
||||
|
@ApiModel(value = "项目类型字典 视图数据对象", description = "项目类型字典 视图数据对象") |
||||
|
@Data |
||||
|
public class ProjectTypeDictionaryVo implements Vo { |
||||
|
private String typeName; |
||||
|
private String id; |
||||
|
private String sid; |
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.yxt.supervise.crm.biz.industrydictionary; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants; |
||||
|
import com.yxt.supervise.crm.api.industrydictionary.IndustryDictionary; |
||||
|
import com.yxt.supervise.crm.api.industrydictionary.IndustryDictionaryVo; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/12 17:09 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IndustryDictionaryMapper extends BaseMapper<IndustryDictionary> { |
||||
|
IPage<IndustryDictionaryVo> selectPageVo(IPage<IndustryDictionary> page, @Param(Constants.WRAPPER) Wrapper<IndustryDictionary> qw); |
||||
|
|
||||
|
List<IndustryDictionaryVo> selectList(); |
||||
|
IndustryDictionaryVo getIndustryBySid( @Param("sid") String sid); |
||||
|
|
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
<?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.yxt.supervise.crm.biz.industrydictionary.IndustryDictionaryMapper"> |
||||
|
<!-- <where> ${ew.sqlSegment} </where>--> |
||||
|
<!-- ${ew.customSqlSegment} --> |
||||
|
<select id="selectPageVo" resultType="com.yxt.supervise.crm.api.industrydictionary.IndustryDictionaryVo"> |
||||
|
SELECT |
||||
|
* |
||||
|
FROM |
||||
|
project_type_dictionary |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
<select id="selectList" resultType="com.yxt.supervise.crm.api.industrydictionary.IndustryDictionaryVo"> |
||||
|
SELECT * |
||||
|
FROM industry_dictionary |
||||
|
</select> |
||||
|
<select id="getIndustryBySid" resultType="com.yxt.supervise.crm.api.industrydictionary.IndustryDictionaryVo"> |
||||
|
SELECT * |
||||
|
FROM industry_dictionary |
||||
|
WHERE sid=#{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,67 @@ |
|||||
|
package com.yxt.supervise.crm.biz.industrydictionary; |
||||
|
|
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import com.yxt.supervise.crm.api.industrydictionary.IndustryDictionaryDto; |
||||
|
import com.yxt.supervise.crm.api.industrydictionary.IndustryDictionaryFeign; |
||||
|
import com.yxt.supervise.crm.api.industrydictionary.IndustryDictionaryQuery; |
||||
|
import com.yxt.supervise.crm.api.industrydictionary.IndustryDictionaryVo; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/12 17:10 |
||||
|
*/ |
||||
|
@Api(tags = "所属行业字典信息") |
||||
|
@RestController |
||||
|
@RequestMapping("v1/industrydictionary") |
||||
|
public class IndustryDictionaryRest implements IndustryDictionaryFeign { |
||||
|
@Autowired |
||||
|
IndustryDictionaryService IndustryDictionaryService; |
||||
|
@ApiOperation("根据条件分页查询数据的列表") |
||||
|
@PostMapping("/listPage") |
||||
|
public ResultBean<PagerVo<IndustryDictionaryVo>> listPage(@RequestBody PagerQuery<IndustryDictionaryQuery> pq) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
PagerVo<IndustryDictionaryVo> pv = IndustryDictionaryService.listPageVo(pq); |
||||
|
return rb.success().setData(pv); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("查询字典数据") |
||||
|
@PostMapping("/list") |
||||
|
public ResultBean<List<IndustryDictionaryVo>> list() { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
List<IndustryDictionaryVo> pv = IndustryDictionaryService.industrylist(); |
||||
|
return rb.success().setData(pv); |
||||
|
} |
||||
|
@ApiOperation("保存") |
||||
|
@PostMapping("/save") |
||||
|
public ResultBean save(@RequestBody IndustryDictionaryDto dto) { |
||||
|
return IndustryDictionaryService.save(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("修改") |
||||
|
@PostMapping("/update") |
||||
|
public ResultBean update(@RequestBody IndustryDictionaryDto dto) { |
||||
|
return IndustryDictionaryService.update(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("根据sid查询") |
||||
|
@GetMapping("/getIndustryBySid/{sid}") |
||||
|
public ResultBean getWarehouse(@PathVariable String sid){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
IndustryDictionaryVo IndustryDictionaryVo=IndustryDictionaryService.getIndustryBySid(sid); |
||||
|
return rb.success().setData(IndustryDictionaryVo); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("删除") |
||||
|
@DeleteMapping("/delete/{sid}") |
||||
|
public ResultBean delete(@PathVariable String sid) { |
||||
|
return IndustryDictionaryService.delete(sid); |
||||
|
} |
||||
|
} |
@ -0,0 +1,69 @@ |
|||||
|
package com.yxt.supervise.crm.biz.industrydictionary; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.base.utils.PagerUtil; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import com.yxt.supervise.crm.api.industrydictionary.IndustryDictionary; |
||||
|
import com.yxt.supervise.crm.api.industrydictionary.IndustryDictionaryDto; |
||||
|
import com.yxt.supervise.crm.api.industrydictionary.IndustryDictionaryQuery; |
||||
|
import com.yxt.supervise.crm.api.industrydictionary.IndustryDictionaryVo; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/12 17:10 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class IndustryDictionaryService extends MybatisBaseService<IndustryDictionaryMapper, IndustryDictionary> { |
||||
|
|
||||
|
public PagerVo<IndustryDictionaryVo> listPageVo(PagerQuery<IndustryDictionaryQuery> pq) { |
||||
|
IndustryDictionaryQuery query = pq.getParams(); |
||||
|
QueryWrapper<IndustryDictionary> qw = new QueryWrapper<>(); |
||||
|
// if(StringUtils.isNotBlank(query.getEnterpriseName())){
|
||||
|
// qw.like("enterpriseName",query.getEnterpriseName());
|
||||
|
// }
|
||||
|
// if(StringUtils.isNotBlank(query.getTelephone())){
|
||||
|
// qw.like("telephone",query.getTelephone());
|
||||
|
// }
|
||||
|
|
||||
|
IPage<IndustryDictionary> page = PagerUtil.queryToPage(pq); |
||||
|
IPage<IndustryDictionaryVo> pagging = baseMapper.selectPageVo(page, qw); |
||||
|
PagerVo<IndustryDictionaryVo> p = PagerUtil.pageToVo(pagging, null); |
||||
|
return p; |
||||
|
} |
||||
|
public List<IndustryDictionaryVo> industrylist() { |
||||
|
List<IndustryDictionaryVo> list = baseMapper.selectList(); |
||||
|
return list; |
||||
|
} |
||||
|
public ResultBean save(IndustryDictionaryDto dto) { |
||||
|
ResultBean rb=new ResultBean(); |
||||
|
IndustryDictionary entity=new IndustryDictionary(); |
||||
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
||||
|
baseMapper.insert(entity); |
||||
|
return rb.success().setMsg("保存仓库信息成功"); |
||||
|
} |
||||
|
public ResultBean update(IndustryDictionaryDto dto) { |
||||
|
ResultBean rb=new ResultBean(); |
||||
|
String dtoSid = dto.getSid(); |
||||
|
IndustryDictionary entity=fetchBySid(dtoSid); |
||||
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
||||
|
baseMapper.updateById(entity); |
||||
|
return rb.success().setMsg("修改仓库信息成功"); |
||||
|
} |
||||
|
public IndustryDictionaryVo getIndustryBySid(String sid){ |
||||
|
IndustryDictionaryVo bank=baseMapper.getIndustryBySid(sid); |
||||
|
return bank; |
||||
|
} |
||||
|
public ResultBean delete(String sid) { |
||||
|
ResultBean rb=new ResultBean(); |
||||
|
baseMapper.delete(new QueryWrapper<IndustryDictionary>().eq("sid",sid)); |
||||
|
return rb.success().setMsg("删除仓库信息成功"); |
||||
|
} |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package com.yxt.supervise.crm.biz.projectinformation; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants; |
||||
|
import com.yxt.supervise.crm.api.projectinformation.ProjectInformation; |
||||
|
import com.yxt.supervise.crm.api.projectinformation.ProjectInformationVo; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/12 17:09 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface ProjectInformationMapper extends BaseMapper<ProjectInformation> { |
||||
|
IPage<ProjectInformationVo> selectPageVo(IPage<ProjectInformation> page, @Param(Constants.WRAPPER) Wrapper<ProjectInformation> qw); |
||||
|
ProjectInformationVo getProjectBySid( @Param("sid") String sid); |
||||
|
|
||||
|
} |
@ -0,0 +1,52 @@ |
|||||
|
<?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.yxt.supervise.crm.biz.projectinformation.ProjectInformationMapper"> |
||||
|
<!-- <where> ${ew.sqlSegment} </where>--> |
||||
|
<!-- ${ew.customSqlSegment} --> |
||||
|
<select id="selectPageVo" resultType="com.yxt.supervise.crm.api.projectinformation.ProjectInformationVo"> |
||||
|
SELECT |
||||
|
info.entryName, |
||||
|
id.industryName, |
||||
|
td.projectType as typeName, |
||||
|
info.creditLimit, |
||||
|
bank.bankName, |
||||
|
bm.name as bManagerName, |
||||
|
info.signingDate, |
||||
|
info.endDate, |
||||
|
ei.enterpriseName, |
||||
|
ei.contacts as eContacts, |
||||
|
info.regulatoryLeader,info.* |
||||
|
FROM |
||||
|
project_information info |
||||
|
LEFT JOIN project_type_dictionary td on td.sid=info.typeSid |
||||
|
left join industry_dictionary id on id.sid =info .industrySid |
||||
|
left join loan_bank_information bank on bank.sid=info.bankSid |
||||
|
left join bank_manager bm on bm.sid =info.managerSid |
||||
|
LEFT JOIN enterprise_information ei on ei.sid=info.enterpriseSid |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
<select id="getProjectBySid" resultType="com.yxt.supervise.crm.api.projectinformation.ProjectInformationVo"> |
||||
|
SELECT |
||||
|
info.entryName, |
||||
|
id.industryName, |
||||
|
td.projectType as typeName, |
||||
|
info.creditLimit, |
||||
|
bank.bankName, |
||||
|
bm.name as bManagerName, |
||||
|
info.signingDate, |
||||
|
info.endDate, |
||||
|
ei.enterpriseName, |
||||
|
ei.contacts as eContacts, |
||||
|
info.regulatoryLeader,info.* |
||||
|
FROM |
||||
|
project_information info |
||||
|
LEFT JOIN project_type_dictionary td on td.sid=info.typeSid |
||||
|
left join industry_dictionary id on id.sid =info .industrySid |
||||
|
left join loan_bank_information bank on bank.sid=info.bankSid |
||||
|
left join bank_manager bm on bm.sid =info.managerSid |
||||
|
LEFT JOIN enterprise_information ei on ei.sid=info.enterpriseSid |
||||
|
WHERE info.sid=#{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,60 @@ |
|||||
|
package com.yxt.supervise.crm.biz.projectinformation; |
||||
|
|
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import com.yxt.supervise.crm.api.projectinformation.ProjectInformationDto; |
||||
|
import com.yxt.supervise.crm.api.projectinformation.ProjectInformationFeign; |
||||
|
import com.yxt.supervise.crm.api.projectinformation.ProjectInformationQuery; |
||||
|
import com.yxt.supervise.crm.api.projectinformation.ProjectInformationVo; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/12 17:10 |
||||
|
*/ |
||||
|
@Api(tags = "项目信息") |
||||
|
@RestController |
||||
|
@RequestMapping("v1/projectinformation") |
||||
|
public class ProjectInformationRest implements ProjectInformationFeign { |
||||
|
@Autowired |
||||
|
ProjectInformationService ProjectInformationService; |
||||
|
|
||||
|
|
||||
|
@ApiOperation("根据条件分页查询数据的列表") |
||||
|
@PostMapping("/listPage") |
||||
|
public ResultBean<PagerVo<ProjectInformationVo>> listPage(@RequestBody PagerQuery<ProjectInformationQuery> pq) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
PagerVo<ProjectInformationVo> pv = ProjectInformationService.listPageVo(pq); |
||||
|
return rb.success().setData(pv); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("保存") |
||||
|
@PostMapping("/save") |
||||
|
public ResultBean save(@RequestBody ProjectInformationDto dto) { |
||||
|
return ProjectInformationService.save(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("修改") |
||||
|
@PostMapping("/update") |
||||
|
public ResultBean update(@RequestBody ProjectInformationDto dto) { |
||||
|
return ProjectInformationService.update(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("根据sid查询") |
||||
|
@GetMapping("/getProjectBySid/{sid}") |
||||
|
public ResultBean getWarehouse(@PathVariable String sid){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
ProjectInformationVo ProjectInformationVo=ProjectInformationService.getProjectBySid(sid); |
||||
|
return rb.success().setData(ProjectInformationVo); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("删除") |
||||
|
@DeleteMapping("/delete/{sid}") |
||||
|
public ResultBean delete(@PathVariable String sid) { |
||||
|
return ProjectInformationService.delete(sid); |
||||
|
} |
||||
|
} |
@ -0,0 +1,59 @@ |
|||||
|
package com.yxt.supervise.crm.biz.projectinformation; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.base.utils.PagerUtil; |
||||
|
import com.yxt.common.base.utils.StringUtils; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import com.yxt.supervise.crm.api.projectinformation.ProjectInformation; |
||||
|
import com.yxt.supervise.crm.api.projectinformation.ProjectInformationDto; |
||||
|
import com.yxt.supervise.crm.api.projectinformation.ProjectInformationQuery; |
||||
|
import com.yxt.supervise.crm.api.projectinformation.ProjectInformationVo; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/12 17:10 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class ProjectInformationService extends MybatisBaseService<ProjectInformationMapper, ProjectInformation> { |
||||
|
public PagerVo<ProjectInformationVo> listPageVo(PagerQuery<ProjectInformationQuery> pq) { |
||||
|
ProjectInformationQuery query = pq.getParams(); |
||||
|
QueryWrapper<ProjectInformation> qw = new QueryWrapper<>(); |
||||
|
if(StringUtils.isNotBlank(query.getEntryName())){ |
||||
|
qw.like("info.entryName",query.getEntryName()); |
||||
|
} |
||||
|
IPage<ProjectInformation> page = PagerUtil.queryToPage(pq); |
||||
|
IPage<ProjectInformationVo> pagging = baseMapper.selectPageVo(page, qw); |
||||
|
PagerVo<ProjectInformationVo> p = PagerUtil.pageToVo(pagging, null); |
||||
|
return p; |
||||
|
} |
||||
|
public ResultBean save(ProjectInformationDto dto) { |
||||
|
ResultBean rb=new ResultBean(); |
||||
|
ProjectInformation entity=new ProjectInformation(); |
||||
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
||||
|
baseMapper.insert(entity); |
||||
|
return rb.success().setMsg("保存项目信息成功"); |
||||
|
} |
||||
|
public ResultBean update(ProjectInformationDto dto) { |
||||
|
ResultBean rb=new ResultBean(); |
||||
|
String dtoSid = dto.getSid(); |
||||
|
ProjectInformation entity=fetchBySid(dtoSid); |
||||
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
||||
|
baseMapper.updateById(entity); |
||||
|
return rb.success().setMsg("修改项目信息成功"); |
||||
|
} |
||||
|
public ProjectInformationVo getProjectBySid(String sid){ |
||||
|
ProjectInformationVo bank=baseMapper.getProjectBySid(sid); |
||||
|
return bank; |
||||
|
} |
||||
|
public ResultBean delete(String sid) { |
||||
|
ResultBean rb=new ResultBean(); |
||||
|
baseMapper.delete(new QueryWrapper<ProjectInformation>().eq("sid",sid)); |
||||
|
return rb.success().setMsg("删除项目信息成功"); |
||||
|
} |
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
package com.yxt.supervise.crm.biz.projecttypedictionary; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants; |
||||
|
import com.yxt.supervise.crm.api.projecttypedictionary.ProjectTypeDictionary; |
||||
|
import com.yxt.supervise.crm.api.projecttypedictionary.ProjectTypeDictionaryVo; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/12 17:09 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface ProjectTypeDictionaryMapper extends BaseMapper<ProjectTypeDictionary> { |
||||
|
IPage<ProjectTypeDictionaryVo> selectPageVo(IPage<ProjectTypeDictionary> page, @Param(Constants.WRAPPER) Wrapper<ProjectTypeDictionary> qw); |
||||
|
List<ProjectTypeDictionaryVo> typeList(); |
||||
|
ProjectTypeDictionaryVo getProjectTypeBySid( @Param("sid") String sid); |
||||
|
|
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
<?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.yxt.supervise.crm.biz.projecttypedictionary.ProjectTypeDictionaryMapper"> |
||||
|
<!-- <where> ${ew.sqlSegment} </where>--> |
||||
|
<!-- ${ew.customSqlSegment} --> |
||||
|
<select id="selectPageVo" resultType="com.yxt.supervise.crm.api.projecttypedictionary.ProjectTypeDictionaryVo"> |
||||
|
SELECT |
||||
|
* |
||||
|
FROM |
||||
|
project_type_dictionary |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
<select id="typeList" resultType="com.yxt.supervise.crm.api.projecttypedictionary.ProjectTypeDictionaryVo"> |
||||
|
SELECT *,projectType as typeName |
||||
|
FROM project_type_dictionary |
||||
|
</select> |
||||
|
<select id="getProjectTypeBySid" resultType="com.yxt.supervise.crm.api.projecttypedictionary.ProjectTypeDictionaryVo"> |
||||
|
SELECT *,projectType as typeName |
||||
|
FROM project_type_dictionary |
||||
|
WHERE sid=#{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,64 @@ |
|||||
|
package com.yxt.supervise.crm.biz.projecttypedictionary; |
||||
|
|
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import com.yxt.supervise.crm.api.projecttypedictionary.ProjectTypeDictionaryDto; |
||||
|
import com.yxt.supervise.crm.api.projecttypedictionary.ProjectTypeDictionaryFeign; |
||||
|
import com.yxt.supervise.crm.api.projecttypedictionary.ProjectTypeDictionaryQuery; |
||||
|
import com.yxt.supervise.crm.api.projecttypedictionary.ProjectTypeDictionaryVo; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/12 17:10 |
||||
|
*/ |
||||
|
@Api(tags = "仓库位置信息") |
||||
|
@RestController |
||||
|
@RequestMapping("v1/projtypedictionary") |
||||
|
public class ProjectTypeDictionaryRest implements ProjectTypeDictionaryFeign { |
||||
|
@Autowired |
||||
|
ProjectTypeDictionaryService ProjectTypeDictionaryService; |
||||
|
|
||||
|
@ApiOperation("根据条件分页查询数据的列表") |
||||
|
@PostMapping("/listPage") |
||||
|
public ResultBean<PagerVo<ProjectTypeDictionaryVo>> listPage(@RequestBody PagerQuery<ProjectTypeDictionaryQuery> pq) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
PagerVo<ProjectTypeDictionaryVo> pv = ProjectTypeDictionaryService.listPageVo(pq); |
||||
|
return rb.success().setData(pv); |
||||
|
} |
||||
|
@ApiOperation("查询项目类型字典") |
||||
|
@PostMapping("/list") |
||||
|
public ResultBean<List<ProjectTypeDictionaryVo>> listPage() { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
List<ProjectTypeDictionaryVo> pv = ProjectTypeDictionaryService.typeList(); |
||||
|
return rb.success().setData(pv); |
||||
|
} |
||||
|
@ApiOperation("保存") |
||||
|
@PostMapping("/save") |
||||
|
public ResultBean save(@RequestBody ProjectTypeDictionaryDto dto) { |
||||
|
return ProjectTypeDictionaryService.save(dto); |
||||
|
} |
||||
|
@ApiOperation("修改") |
||||
|
@PostMapping("/update") |
||||
|
public ResultBean update(@RequestBody ProjectTypeDictionaryDto dto) { |
||||
|
return ProjectTypeDictionaryService.update(dto); |
||||
|
} |
||||
|
@ApiOperation("根据sid查询") |
||||
|
@GetMapping("/getProjTypeBySid/{sid}") |
||||
|
public ResultBean getWarehouse(@PathVariable String sid){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
ProjectTypeDictionaryVo ProjectTypeDictionaryVo=ProjectTypeDictionaryService.getProjectTypeBySid(sid); |
||||
|
return rb.success().setData(ProjectTypeDictionaryVo); |
||||
|
} |
||||
|
@ApiOperation("删除") |
||||
|
@DeleteMapping("/delete/{sid}") |
||||
|
public ResultBean delete(@PathVariable String sid) { |
||||
|
return ProjectTypeDictionaryService.delete(sid); |
||||
|
} |
||||
|
} |
@ -0,0 +1,68 @@ |
|||||
|
package com.yxt.supervise.crm.biz.projecttypedictionary; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.base.utils.PagerUtil; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import com.yxt.supervise.crm.api.projecttypedictionary.ProjectTypeDictionary; |
||||
|
import com.yxt.supervise.crm.api.projecttypedictionary.ProjectTypeDictionaryDto; |
||||
|
import com.yxt.supervise.crm.api.projecttypedictionary.ProjectTypeDictionaryQuery; |
||||
|
import com.yxt.supervise.crm.api.projecttypedictionary.ProjectTypeDictionaryVo; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/4/12 17:10 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class ProjectTypeDictionaryService extends MybatisBaseService<ProjectTypeDictionaryMapper, ProjectTypeDictionary> { |
||||
|
public PagerVo<ProjectTypeDictionaryVo> listPageVo(PagerQuery<ProjectTypeDictionaryQuery> pq) { |
||||
|
ProjectTypeDictionaryQuery query = pq.getParams(); |
||||
|
QueryWrapper<ProjectTypeDictionary> qw = new QueryWrapper<>(); |
||||
|
// if(StringUtils.isNotBlank(query.getEnterpriseName())){
|
||||
|
// qw.like("enterpriseName",query.getEnterpriseName());
|
||||
|
// }
|
||||
|
// if(StringUtils.isNotBlank(query.getTelephone())){
|
||||
|
// qw.like("telephone",query.getTelephone());
|
||||
|
// }
|
||||
|
|
||||
|
IPage<ProjectTypeDictionary> page = PagerUtil.queryToPage(pq); |
||||
|
IPage<ProjectTypeDictionaryVo> pagging = baseMapper.selectPageVo(page, qw); |
||||
|
PagerVo<ProjectTypeDictionaryVo> p = PagerUtil.pageToVo(pagging, null); |
||||
|
return p; |
||||
|
} |
||||
|
public List<ProjectTypeDictionaryVo> typeList() { |
||||
|
List<ProjectTypeDictionaryVo> pagging = baseMapper.typeList(); |
||||
|
return pagging; |
||||
|
} |
||||
|
public ResultBean save(ProjectTypeDictionaryDto dto) { |
||||
|
ResultBean rb=new ResultBean(); |
||||
|
ProjectTypeDictionary entity=new ProjectTypeDictionary(); |
||||
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
||||
|
baseMapper.insert(entity); |
||||
|
return rb.success().setMsg("保存仓库信息成功"); |
||||
|
} |
||||
|
public ResultBean update(ProjectTypeDictionaryDto dto) { |
||||
|
ResultBean rb=new ResultBean(); |
||||
|
String dtoSid = dto.getSid(); |
||||
|
ProjectTypeDictionary entity=fetchBySid(dtoSid); |
||||
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
||||
|
baseMapper.updateById(entity); |
||||
|
return rb.success().setMsg("修改仓库信息成功"); |
||||
|
} |
||||
|
public ProjectTypeDictionaryVo getProjectTypeBySid(String sid){ |
||||
|
ProjectTypeDictionaryVo bank=baseMapper.getProjectTypeBySid(sid); |
||||
|
return bank; |
||||
|
} |
||||
|
public ResultBean delete(String sid) { |
||||
|
ResultBean rb=new ResultBean(); |
||||
|
baseMapper.delete(new QueryWrapper<ProjectTypeDictionary>().eq("sid",sid)); |
||||
|
return rb.success().setMsg("删除仓库信息成功"); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue