7 changed files with 341 additions and 0 deletions
@ -0,0 +1,33 @@ |
|||||||
|
package apelet.association.controller; |
||||||
|
|
||||||
|
import apelet.association.service.ContractService; |
||||||
|
import apelet.association.vo.ContractListVo; |
||||||
|
import apelet.common.core.object.ResponseResult; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||||
|
import org.springframework.web.bind.annotation.RestController; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* 合同管理 |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@RequestMapping("/tenantadmin/contract") |
||||||
|
public class ContractController { |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private ContractService contractService; |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询所有合同(合同签订日期、报价负责人、名称、总报价、产品服务交付日期) |
||||||
|
* |
||||||
|
* @return 合同列表 |
||||||
|
*/ |
||||||
|
@GetMapping("/contractList") |
||||||
|
public ResponseResult<List<ContractListVo>> contractList() { |
||||||
|
List<ContractListVo> result = contractService.contractList(); |
||||||
|
return ResponseResult.success(result); |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,18 @@ |
|||||||
|
package apelet.association.dao; |
||||||
|
|
||||||
|
import apelet.association.model.Contract; |
||||||
|
import apelet.association.vo.ContractListVo; |
||||||
|
import apelet.common.core.base.dao.BaseDaoMapper; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
public interface ContractMapper extends BaseDaoMapper<Contract> { |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询所有合同,关联 sys_user_info 解析报价负责人姓名。 |
||||||
|
* 仅返回:合同签订日期、报价负责人(ID+姓名)、名称、总报价、产品服务交付日期。 |
||||||
|
* |
||||||
|
* @return 合同列表 |
||||||
|
*/ |
||||||
|
List<ContractListVo> contractList(); |
||||||
|
} |
||||||
@ -0,0 +1,183 @@ |
|||||||
|
package apelet.association.model; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
import com.baomidou.mybatisplus.annotation.IdType; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableId; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
import java.math.BigDecimal; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
/** |
||||||
|
* 合同 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("contract") |
||||||
|
public class Contract implements Serializable { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 主键ID |
||||||
|
*/ |
||||||
|
@TableId(value = "id", type = IdType.ASSIGN_ID) |
||||||
|
private Long id; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建人登录名称 |
||||||
|
*/ |
||||||
|
@TableField("create_user_id") |
||||||
|
private String createUserId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建日期 |
||||||
|
*/ |
||||||
|
@TableField("create_time") |
||||||
|
private Date createTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新人登录名称 |
||||||
|
*/ |
||||||
|
@TableField("update_user_id") |
||||||
|
private String updateUserId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新日期 |
||||||
|
*/ |
||||||
|
@TableField("update_time") |
||||||
|
private Date updateTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* 逻辑删除标记(1: 正常 -1: 已删除) |
||||||
|
*/ |
||||||
|
@TableField("deleted_flag") |
||||||
|
private Integer deletedFlag; |
||||||
|
|
||||||
|
/** |
||||||
|
* 编码 |
||||||
|
*/ |
||||||
|
@TableField("number") |
||||||
|
private String number; |
||||||
|
|
||||||
|
/** |
||||||
|
* 名称 |
||||||
|
*/ |
||||||
|
@TableField("name") |
||||||
|
private String name; |
||||||
|
|
||||||
|
/** |
||||||
|
* 流程状态 |
||||||
|
*/ |
||||||
|
@TableField("flow_status") |
||||||
|
private Integer flowStatus; |
||||||
|
|
||||||
|
/** |
||||||
|
* 流程最新状态 |
||||||
|
*/ |
||||||
|
@TableField("flow_approval_status") |
||||||
|
private Integer flowApprovalStatus; |
||||||
|
|
||||||
|
/** |
||||||
|
* 流程实例id |
||||||
|
*/ |
||||||
|
@TableField("pro_ins_id") |
||||||
|
private String proInsId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 状态 |
||||||
|
*/ |
||||||
|
@TableField("billstatus") |
||||||
|
private String billstatus; |
||||||
|
|
||||||
|
/** |
||||||
|
* 公司 |
||||||
|
*/ |
||||||
|
@TableField("org") |
||||||
|
private Integer org; |
||||||
|
|
||||||
|
/** |
||||||
|
* 来源单据ID |
||||||
|
*/ |
||||||
|
@TableField("srcbillid") |
||||||
|
private Integer srcbillid; |
||||||
|
|
||||||
|
/** |
||||||
|
* 来源单据编码 |
||||||
|
*/ |
||||||
|
@TableField("srcbillnumber") |
||||||
|
private Integer srcbillnumber; |
||||||
|
|
||||||
|
/** |
||||||
|
* 来源分录Id |
||||||
|
*/ |
||||||
|
@TableField("srcentryid") |
||||||
|
private Integer srcentryid; |
||||||
|
|
||||||
|
/** |
||||||
|
* 总报价 |
||||||
|
*/ |
||||||
|
@TableField("qty") |
||||||
|
private BigDecimal qty; |
||||||
|
|
||||||
|
/** |
||||||
|
* 报价负责人ID |
||||||
|
*/ |
||||||
|
@TableField("managerperson") |
||||||
|
private Long managerperson; |
||||||
|
|
||||||
|
/** |
||||||
|
* 项目类型 |
||||||
|
*/ |
||||||
|
@TableField("type") |
||||||
|
private String type; |
||||||
|
|
||||||
|
/** |
||||||
|
* 合同签订日期 |
||||||
|
*/ |
||||||
|
@TableField("signing_date") |
||||||
|
private Date signingDate; |
||||||
|
|
||||||
|
/** |
||||||
|
* 产品服务交付日期 |
||||||
|
*/ |
||||||
|
@TableField("delivery_date") |
||||||
|
private Date deliveryDate; |
||||||
|
|
||||||
|
/** |
||||||
|
* 分包价格 |
||||||
|
*/ |
||||||
|
@TableField("price") |
||||||
|
private BigDecimal price; |
||||||
|
|
||||||
|
/** |
||||||
|
* 收款计划 |
||||||
|
*/ |
||||||
|
@TableField("get_date") |
||||||
|
private Date getDate; |
||||||
|
|
||||||
|
/** |
||||||
|
* 产品服务交付负责人 |
||||||
|
*/ |
||||||
|
@TableField("delivery_person") |
||||||
|
private Long deliveryPerson; |
||||||
|
|
||||||
|
/** |
||||||
|
* 附件 |
||||||
|
*/ |
||||||
|
@TableField("file_text") |
||||||
|
private String fileText; |
||||||
|
|
||||||
|
/** |
||||||
|
* 分包商 |
||||||
|
*/ |
||||||
|
@TableField("subcontractor") |
||||||
|
private String subcontractor; |
||||||
|
|
||||||
|
/** |
||||||
|
* 客户 |
||||||
|
*/ |
||||||
|
@TableField("bd_customer") |
||||||
|
private Long bdCustomer; |
||||||
|
} |
||||||
@ -0,0 +1,17 @@ |
|||||||
|
package apelet.association.service; |
||||||
|
|
||||||
|
import apelet.association.model.Contract; |
||||||
|
import apelet.association.vo.ContractListVo; |
||||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
public interface ContractService extends IService<Contract> { |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询所有合同(合同签订日期、报价负责人、名称、总报价、产品服务交付日期) |
||||||
|
* |
||||||
|
* @return 合同列表 |
||||||
|
*/ |
||||||
|
List<ContractListVo> contractList(); |
||||||
|
} |
||||||
@ -0,0 +1,19 @@ |
|||||||
|
package apelet.association.service.impl; |
||||||
|
|
||||||
|
import apelet.association.dao.ContractMapper; |
||||||
|
import apelet.association.model.Contract; |
||||||
|
import apelet.association.service.ContractService; |
||||||
|
import apelet.association.vo.ContractListVo; |
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
@Service |
||||||
|
public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> implements ContractService { |
||||||
|
|
||||||
|
@Override |
||||||
|
public List<ContractListVo> contractList() { |
||||||
|
return baseMapper.contractList(); |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,48 @@ |
|||||||
|
package apelet.association.vo; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.math.BigDecimal; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
/** |
||||||
|
* 合同列表展示对象 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class ContractListVo { |
||||||
|
|
||||||
|
/** |
||||||
|
* 主键ID |
||||||
|
*/ |
||||||
|
private Long id; |
||||||
|
|
||||||
|
/** |
||||||
|
* 合同签订日期 |
||||||
|
*/ |
||||||
|
private Date signingDate; |
||||||
|
|
||||||
|
/** |
||||||
|
* 报价负责人ID |
||||||
|
*/ |
||||||
|
private Long managerperson; |
||||||
|
|
||||||
|
/** |
||||||
|
* 报价负责人姓名(关联 sys_user_info.USER_NAME) |
||||||
|
*/ |
||||||
|
private String managerName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 名称 |
||||||
|
*/ |
||||||
|
private String name; |
||||||
|
|
||||||
|
/** |
||||||
|
* 总报价 |
||||||
|
*/ |
||||||
|
private BigDecimal qty; |
||||||
|
|
||||||
|
/** |
||||||
|
* 产品服务交付日期 |
||||||
|
*/ |
||||||
|
private Date deliveryDate; |
||||||
|
} |
||||||
@ -0,0 +1,23 @@ |
|||||||
|
<?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="apelet.association.dao.ContractMapper"> |
||||||
|
|
||||||
|
<!-- 查询所有合同:关联 sys_user_info 解析负责人姓名 --> |
||||||
|
<select id="contractList" |
||||||
|
resultType="apelet.association.vo.ContractListVo"> |
||||||
|
SELECT |
||||||
|
c.id AS id, |
||||||
|
c.signing_date AS signingDate, |
||||||
|
c.managerperson AS managerperson, |
||||||
|
u.USER_NAME AS managerName, |
||||||
|
c.name AS name, |
||||||
|
c.qty AS qty, |
||||||
|
c.delivery_date AS deliveryDate |
||||||
|
FROM contract c |
||||||
|
LEFT JOIN sys_user_info u ON c.managerperson = u.user_id |
||||||
|
WHERE c.deleted_flag = 1 |
||||||
|
ORDER BY c.signing_date DESC |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
||||||
Loading…
Reference in new issue