8 changed files with 368 additions and 3 deletions
-
38src/main/java/com/spring/modules/quotation/controller/QuotationInformationController.java
-
141src/main/java/com/spring/modules/quotation/entity/QuotationInformationEntity.java
-
15src/main/java/com/spring/modules/quotation/mapper/QuotationInformationMapper.java
-
12src/main/java/com/spring/modules/quotation/service/QuotationInformationService.java
-
32src/main/java/com/spring/modules/quotation/service/impl/QuotationInformationServiceImpl.java
-
44src/main/java/com/spring/modules/quotation/vo/QuotationInformationVo.java
-
6src/main/resources/mapper/customer/CustomerInformationMapper.xml
-
83src/main/resources/mapper/quotation/QuotationInformationMapper.xml
@ -0,0 +1,38 @@ |
|||
package com.spring.modules.quotation.controller; |
|||
|
|||
import com.spring.common.utils.PageUtils; |
|||
import com.spring.common.utils.R; |
|||
import com.spring.modules.customer.vo.CustomerInformationVo; |
|||
import com.spring.modules.quotation.service.QuotationInformationService; |
|||
import com.spring.modules.quotation.vo.QuotationInformationVo; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* @description: 报价信息 |
|||
* @author: fengyuan_yang |
|||
* @date: 2023/9/11 11:46 |
|||
* @param: |
|||
* @return: |
|||
**/ |
|||
@RestController |
|||
@RequestMapping("plm/quotationInformation") |
|||
public class QuotationInformationController { |
|||
|
|||
@Autowired |
|||
private QuotationInformationService quotationInformationService; |
|||
|
|||
/** |
|||
* @description: 报价信息列表 |
|||
* @author: fengyuan_yang |
|||
* @date: 2023/9/11 13:04 |
|||
* @param: [data] |
|||
* @return: com.spring.common.utils.R |
|||
**/ |
|||
@PostMapping(value="/quotationInformationSearch") |
|||
@ResponseBody |
|||
public R quotationInformationSearch(@RequestBody QuotationInformationVo data){ |
|||
PageUtils page = quotationInformationService.quotationInformationSearch(data); |
|||
return R.ok().put("page", page); |
|||
} |
|||
} |
|||
@ -0,0 +1,141 @@ |
|||
package com.spring.modules.quotation.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.FieldFill; |
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.spring.common.utils.QueryPage; |
|||
import lombok.Data; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@TableName("plm_quotation_information") |
|||
public class QuotationInformationEntity extends QueryPage implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
/** |
|||
* 工厂 |
|||
**/ |
|||
private String site; |
|||
/** |
|||
* 报价单号 |
|||
**/ |
|||
private String quotationNo; |
|||
/** |
|||
* 客户编码 |
|||
**/ |
|||
private String customerNo; |
|||
/** |
|||
* 项目编码 |
|||
**/ |
|||
private String projectId; |
|||
/** |
|||
* 跟单人员 |
|||
**/ |
|||
private String tracker; |
|||
/** |
|||
* 报价人员 |
|||
**/ |
|||
private String quoter; |
|||
/** |
|||
* 状态 |
|||
**/ |
|||
private String quotationStatus; |
|||
/** |
|||
* 产品编码 |
|||
**/ |
|||
private String testPartNo; |
|||
/** |
|||
* 优先等级 |
|||
**/ |
|||
private String priorityLevel; |
|||
/** |
|||
* 要求完成日期 |
|||
**/ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date requiredCompletionDate; |
|||
/** |
|||
* 备注 |
|||
**/ |
|||
private String remark; |
|||
/** |
|||
* 技术注意事项 |
|||
**/ |
|||
private String technicalConsiderations; |
|||
/** |
|||
* 客户负责人 |
|||
**/ |
|||
private String customerResponsiblePerson; |
|||
/** |
|||
* 客户负责人联系方式 |
|||
**/ |
|||
private String customerResponsiblePersonPhone; |
|||
/** |
|||
* 接下来的状态 |
|||
**/ |
|||
private String nextToDo; |
|||
/** |
|||
* 实际报价日期 |
|||
**/ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date actualityQuotationDate; |
|||
/** |
|||
* 报价结果信息 |
|||
**/ |
|||
private String quotationResultInformation; |
|||
/** |
|||
* 实际提交客户日期 |
|||
**/ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date actualitySubmissionDate; |
|||
/** |
|||
* 提交方式 |
|||
**/ |
|||
private String submissionMethod; |
|||
/** |
|||
* 提交备注 |
|||
**/ |
|||
private String submissionRemark; |
|||
/** |
|||
* 实际回复日期 |
|||
**/ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date actualityReplyDate; |
|||
/** |
|||
* 客户确认结果 |
|||
**/ |
|||
private String confirmResults; |
|||
/** |
|||
* 客户确认人 |
|||
**/ |
|||
private String confirmBy; |
|||
/** |
|||
* 客户回复信息 |
|||
**/ |
|||
private String confirmInformation; |
|||
/** |
|||
* 创建时间 |
|||
**/ |
|||
@TableField(fill = FieldFill.INSERT) |
|||
private Date createDate; |
|||
/** |
|||
* 创建人 |
|||
**/ |
|||
private String createBy; |
|||
/** |
|||
* 更新时间 |
|||
**/ |
|||
@TableField(fill = FieldFill.UPDATE) |
|||
private Date updateDate; |
|||
/** |
|||
* 更新人 |
|||
**/ |
|||
private String updateBy; |
|||
|
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
package com.spring.modules.quotation.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.spring.modules.customer.entity.CustomerAddressEntity; |
|||
import com.spring.modules.quotation.entity.QuotationInformationEntity; |
|||
import com.spring.modules.quotation.vo.QuotationInformationVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
@Mapper |
|||
public interface QuotationInformationMapper extends BaseMapper<QuotationInformationEntity> { |
|||
IPage<QuotationInformationVo> quotationInformationSearch(Page<QuotationInformationVo> quotationInformationVoPage, @Param("query") QuotationInformationVo data); |
|||
} |
|||
@ -0,0 +1,12 @@ |
|||
package com.spring.modules.quotation.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.spring.common.utils.PageUtils; |
|||
import com.spring.modules.quotation.entity.QuotationInformationEntity; |
|||
import com.spring.modules.quotation.vo.QuotationInformationVo; |
|||
|
|||
public interface QuotationInformationService extends IService<QuotationInformationEntity> { |
|||
|
|||
|
|||
PageUtils quotationInformationSearch(QuotationInformationVo data); |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
package com.spring.modules.quotation.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import com.spring.common.utils.PageUtils; |
|||
import com.spring.modules.quotation.entity.QuotationInformationEntity; |
|||
import com.spring.modules.quotation.mapper.QuotationInformationMapper; |
|||
import com.spring.modules.quotation.service.QuotationInformationService; |
|||
import com.spring.modules.quotation.vo.QuotationInformationVo; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service |
|||
public class QuotationInformationServiceImpl extends ServiceImpl<QuotationInformationMapper, QuotationInformationEntity> implements QuotationInformationService { |
|||
|
|||
@Autowired |
|||
private QuotationInformationMapper quotationInformationMapper; |
|||
|
|||
/** |
|||
* @description: 报价信息列表 |
|||
* @author: fengyuan_yang |
|||
* @date: 2023/9/11 13:08 |
|||
* @param: [data] |
|||
* @return: com.spring.common.utils.PageUtils |
|||
**/ |
|||
@Override |
|||
public PageUtils quotationInformationSearch(QuotationInformationVo data) { |
|||
IPage<QuotationInformationVo> resultList = this.quotationInformationMapper.quotationInformationSearch(new Page<QuotationInformationVo>(data.getPage(), data.getLimit()), data); |
|||
return new PageUtils(resultList); |
|||
} |
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
package com.spring.modules.quotation.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.spring.modules.quotation.entity.QuotationInformationEntity; |
|||
import lombok.Data; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
public class QuotationInformationVo extends QuotationInformationEntity { |
|||
/** |
|||
* 客户名称 |
|||
**/ |
|||
private String customerDesc; |
|||
/** |
|||
* 项目名称 |
|||
**/ |
|||
private String projectName; |
|||
/** |
|||
* 跟单人员名称 |
|||
**/ |
|||
private String trackerName; |
|||
/** |
|||
* 报价人员名称 |
|||
**/ |
|||
private String quoterName; |
|||
/** |
|||
* 产品名称 |
|||
**/ |
|||
private String testPartDesc; |
|||
/** |
|||
* 要求完成日期(开始) |
|||
**/ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date startDate; |
|||
/** |
|||
* 要求完成日期(结束) |
|||
**/ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date endDate; |
|||
} |
|||
@ -0,0 +1,83 @@ |
|||
<?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.spring.modules.quotation.mapper.QuotationInformationMapper"> |
|||
|
|||
<!-- 客户信息列表 --> |
|||
<select id="quotationInformationSearch" parameterType="com.spring.modules.quotation.vo.QuotationInformationVo" resultType="com.spring.modules.quotation.vo.QuotationInformationVo"> |
|||
SELECT |
|||
site, |
|||
quotation_no, |
|||
customer_no, |
|||
dbo.plm_get_customer_desc(site, customer_no) as customerDesc, |
|||
project_id, |
|||
dbo.plm_get_project_name(site, project_id) as projectName, |
|||
tracker, |
|||
dbo.plm_get_user_display(site, tracker) as trackerName, |
|||
quoter, |
|||
dbo.plm_get_user_display(site, quoter) as quoterName, |
|||
quotation_status, |
|||
test_part_no, |
|||
dbo.plm_get_test_part_desc(site, test_part_no) as testPartDesc, |
|||
priority_level, |
|||
required_completion_date, |
|||
remark, |
|||
technical_considerations, |
|||
customer_responsible_person, |
|||
customer_responsible_person_phone, |
|||
create_date, |
|||
create_by, |
|||
update_date, |
|||
update_by, |
|||
next_to_do, |
|||
actuality_quotation_date, |
|||
quotation_result_information, |
|||
actuality_submission_date, |
|||
submission_method, |
|||
submission_remark, |
|||
actuality_reply_date, |
|||
confirm_results, |
|||
confirm_by, |
|||
confirm_information |
|||
FROM plm_quotation_information |
|||
<where> |
|||
site = #{query.site} |
|||
<if test = "query.customerNo != null and query.customerNo != ''"> |
|||
AND customer_no like #{query.customerNo} |
|||
</if> |
|||
<if test = "query.customerDesc != null and query.customerDesc != ''"> |
|||
AND customer_desc like #{query.customerDesc} |
|||
</if> |
|||
<if test = "query.projectId != null and query.projectId != ''"> |
|||
AND project_id like #{query.projectId} |
|||
</if> |
|||
<if test = "query.projectName != null and query.projectName != ''"> |
|||
AND project_name like #{query.projectName} |
|||
</if> |
|||
<if test = "query.trackerName != null and query.trackerName != ''"> |
|||
AND dbo.plm_get_user_display(site, tracker) like #{query.trackerName} |
|||
</if> |
|||
<if test = "query.quoterName != null and query.quoterName != ''"> |
|||
AND dbo.plm_get_user_display(site, quoter) like #{query.quoterName} |
|||
</if> |
|||
<if test = "query.testPartNo != null and query.testPartNo != ''"> |
|||
AND test_part_no like #{query.testPartNo} |
|||
</if> |
|||
<if test = "query.testPartDesc != null and query.testPartDesc != ''"> |
|||
AND dbo.plm_get_test_part_desc(site, test_part_no) like #{query.testPartDesc} |
|||
</if> |
|||
<if test = "query.quotationStatus != null and query.quotationStatus != ''"> |
|||
AND quotation_status = #{query.quotationStatus} |
|||
</if> |
|||
<if test = "query.priorityLevel != null and query.priorityLevel != ''"> |
|||
AND priority_level = #{query.priorityLevel} |
|||
</if> |
|||
<if test="query.startDate != null "> |
|||
AND required_completion_date >= #{query.startDate} |
|||
</if> |
|||
<if test="query.endDate != null "> |
|||
AND #{query.endDate} >= required_completion_date |
|||
</if> |
|||
</where> |
|||
</select> |
|||
|
|||
</mapper> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue