Showing
9 changed files
with
1062 additions
and
0 deletions
| @@ -1465,3 +1465,70 @@ ALTER TABLE tbl_purchase_order_line ADD COLUMN production_process text COMMENT ' | @@ -1465,3 +1465,70 @@ ALTER TABLE tbl_purchase_order_line ADD COLUMN production_process text COMMENT ' | ||
| 1465 | 1465 | ||
| 1466 | ALTER TABLE tbl_contract_distributor_standard | 1466 | ALTER TABLE tbl_contract_distributor_standard |
| 1467 | ADD COLUMN change_reason varchar(50) DEFAULT NULL COMMENT '变更原因'; | 1467 | ADD COLUMN change_reason varchar(50) DEFAULT NULL COMMENT '变更原因'; |
| 1468 | + | ||
| 1469 | +------- 采购------- | ||
| 1470 | + | ||
| 1471 | +CREATE TABLE `procurement_domestic_customer_credit` | ||
| 1472 | +( | ||
| 1473 | + `id` varchar(32) NOT NULL COMMENT 'ID', | ||
| 1474 | + `unit_name` varchar(200) NOT NULL COMMENT '单位名称', | ||
| 1475 | + `company_nature` varchar(200) NOT NULL COMMENT '公司性质', | ||
| 1476 | + `bank_name` varchar(200) NOT NULL COMMENT '开户行', | ||
| 1477 | + `bank_account` varchar(200) NOT NULL COMMENT '账号', | ||
| 1478 | + `registered_capital` decimal(18, 4) NOT NULL COMMENT '注册资金(万元)', | ||
| 1479 | + `legal_representative` varchar(200) NOT NULL COMMENT '法人代表', | ||
| 1480 | + `company_established_time` date NOT NULL COMMENT '公司成立时间', | ||
| 1481 | + `address` varchar(500) NOT NULL COMMENT '地址', | ||
| 1482 | + `business_principal` varchar(200) NOT NULL COMMENT '业务负责人', | ||
| 1483 | + `business_principal_position` varchar(200) NOT NULL COMMENT '职务', | ||
| 1484 | + `business_principal_phone` varchar(200) NOT NULL COMMENT '电话', | ||
| 1485 | + `legal_business_relation` varchar(500) NOT NULL COMMENT '法人和业务负责人关系', | ||
| 1486 | + `factory_office_property` varchar(500) NOT NULL COMMENT '生产厂房及办公楼产权', | ||
| 1487 | + `factory_office_area` varchar(500) NOT NULL COMMENT '生产厂房及办公楼面积', | ||
| 1488 | + `warehouse_yard_property` varchar(500) NOT NULL COMMENT '仓库或货场产权', | ||
| 1489 | + `warehouse_yard_area` varchar(500) NOT NULL COMMENT '仓库或货场产权面积', | ||
| 1490 | + `main_equipment` text NOT NULL COMMENT '主要生产设备', | ||
| 1491 | + `normal_inventory` varchar(500) NOT NULL COMMENT '正常库存量', | ||
| 1492 | + `main_varieties` varchar(500) NOT NULL COMMENT '主要品种', | ||
| 1493 | + `monthly_purchase_volume` varchar(500) NOT NULL COMMENT '月度收购量', | ||
| 1494 | + `purchase_source` varchar(500) NOT NULL COMMENT '收购来源', | ||
| 1495 | + `stock_in_product_name` varchar(500) NOT NULL COMMENT '入库品名', | ||
| 1496 | + `product_name` varchar(500) NOT NULL COMMENT '产品名称', | ||
| 1497 | + `capacity` varchar(500) NOT NULL COMMENT '产能', | ||
| 1498 | + `sales_channel` text NOT NULL COMMENT '销售渠道', | ||
| 1499 | + `has_preferential_policy` boolean NOT NULL COMMENT '是否享有优惠政策', | ||
| 1500 | + `invest_in_futures` boolean NOT NULL COMMENT '是否投资期货', | ||
| 1501 | + `has_penalty_record` boolean NOT NULL COMMENT '是否有被处罚记录', | ||
| 1502 | + `business_scope_match` boolean NOT NULL COMMENT '实际经营范围与法定经营范围是否相符', | ||
| 1503 | + `first_cooperation_year` varchar(4) COMMENT '首次合作年份', | ||
| 1504 | + `is_new_development` varchar(20) NOT NULL COMMENT '是否新开发', | ||
| 1505 | + `operation_mode` varchar(200) NOT NULL COMMENT '操作方式', | ||
| 1506 | + `has_failed_plan_record` boolean NOT NULL COMMENT '是否有计划落空的不良记录', | ||
| 1507 | + `has_plan_performance_issue` boolean NOT NULL COMMENT '是否有计划履行不到位现象', | ||
| 1508 | + `accounting_process` text NOT NULL COMMENT '进销账务如何处理', | ||
| 1509 | + `invoice_name_match` boolean NOT NULL COMMENT '开票品名与出库单品名是否一致', | ||
| 1510 | + `outbound_process_standard` boolean NOT NULL COMMENT '出库流程是否规范', | ||
| 1511 | + `transport_mode` varchar(200) NOT NULL COMMENT '运输方式', | ||
| 1512 | + `common_material_issue` text DEFAULT NULL COMMENT '常见料质问题', | ||
| 1513 | + `other_issue` text DEFAULT NULL COMMENT '合作中的其它问题', | ||
| 1514 | + `attachment_file_ids` text DEFAULT NULL COMMENT '附件文件ID集合', | ||
| 1515 | + `attachment_file_names` text DEFAULT NULL COMMENT '附件文件名称集合', | ||
| 1516 | + `investigator_id` varchar(200) NOT NULL COMMENT '资信调查人ID', | ||
| 1517 | + `investigator_name` varchar(200) NOT NULL COMMENT '资信调查人', | ||
| 1518 | + `purchase_department` varchar(200) NOT NULL COMMENT '采购处', | ||
| 1519 | + `review_valid_until` date NOT NULL COMMENT '评审有效期', | ||
| 1520 | + `status` varchar(20) DEFAULT NULL COMMENT '审核状态', | ||
| 1521 | + `freeze` bool DEFAULT false COMMENT '是否冻结', | ||
| 1522 | + `create_by_id` varchar(32) DEFAULT NULL COMMENT '创建人ID', | ||
| 1523 | + `create_by` varchar(64) DEFAULT NULL COMMENT '创建人', | ||
| 1524 | + `update_by_id` varchar(32) DEFAULT NULL COMMENT '更新人ID', | ||
| 1525 | + `update_by` varchar(64) DEFAULT NULL COMMENT '更新人', | ||
| 1526 | + `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | ||
| 1527 | + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | ||
| 1528 | + PRIMARY KEY (`id`), | ||
| 1529 | + KEY `idx_pdcc_unit_name` (`unit_name`), | ||
| 1530 | + KEY `idx_pdcc_purchase_department` (`purchase_department`), | ||
| 1531 | + KEY `idx_pdcc_review_valid_until` (`review_valid_until`), | ||
| 1532 | + KEY `idx_pdcc_create_time` (`create_time`) | ||
| 1533 | +) ENGINE=InnoDB | ||
| 1534 | + DEFAULT CHARSET=utf8mb4 COMMENT='采购内贸资信调查表'; |
| 1 | +package com.lframework.xingyun.sc.procurement.controller; | ||
| 2 | + | ||
| 3 | +import com.lframework.starter.web.core.annotations.security.HasPermission; | ||
| 4 | +import com.lframework.starter.web.core.components.resp.InvokeResult; | ||
| 5 | +import com.lframework.starter.web.core.components.resp.InvokeResultBuilder; | ||
| 6 | +import com.lframework.starter.web.core.components.resp.PageResult; | ||
| 7 | +import com.lframework.starter.web.core.controller.DefaultBaseController; | ||
| 8 | +import com.lframework.xingyun.sc.procurement.entity.ProcurementDomesticCustomerCredit; | ||
| 9 | +import com.lframework.xingyun.sc.procurement.service.ProcurementDomesticCustomerCreditService; | ||
| 10 | +import com.lframework.xingyun.sc.procurement.vo.CreateProcurementDomesticCustomerCreditVo; | ||
| 11 | +import com.lframework.xingyun.sc.procurement.vo.QueryProcurementDomesticCustomerCreditVo; | ||
| 12 | +import io.swagger.annotations.Api; | ||
| 13 | +import io.swagger.annotations.ApiImplicitParam; | ||
| 14 | +import io.swagger.annotations.ApiOperation; | ||
| 15 | +import javax.annotation.Resource; | ||
| 16 | +import javax.validation.Valid; | ||
| 17 | +import javax.validation.constraints.NotBlank; | ||
| 18 | +import org.springframework.validation.annotation.Validated; | ||
| 19 | +import org.springframework.web.bind.annotation.GetMapping; | ||
| 20 | +import org.springframework.web.bind.annotation.PostMapping; | ||
| 21 | +import org.springframework.web.bind.annotation.RequestBody; | ||
| 22 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 23 | +import org.springframework.web.bind.annotation.RestController; | ||
| 24 | + | ||
| 25 | +@Api(tags = "采购内贸资信调查表") | ||
| 26 | +@Validated | ||
| 27 | +@RestController | ||
| 28 | +@RequestMapping("/procurement/domesticCustomerCredit") | ||
| 29 | +public class ProcurementDomesticCustomerCreditController extends DefaultBaseController { | ||
| 30 | + | ||
| 31 | + @Resource | ||
| 32 | + private ProcurementDomesticCustomerCreditService procurementDomesticCustomerCreditService; | ||
| 33 | + | ||
| 34 | + @ApiOperation("新增") | ||
| 35 | + @HasPermission({"procure-manage:domestic-trade:add"}) | ||
| 36 | + @PostMapping | ||
| 37 | + public InvokeResult<Void> create(@Valid @RequestBody CreateProcurementDomesticCustomerCreditVo vo) { | ||
| 38 | + procurementDomesticCustomerCreditService.create(vo); | ||
| 39 | + return InvokeResultBuilder.success(); | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + @ApiOperation("分页查询") | ||
| 43 | + @HasPermission({"procure-manage:domestic-trade:query"}) | ||
| 44 | + @GetMapping("/query") | ||
| 45 | + public InvokeResult<PageResult<ProcurementDomesticCustomerCredit>> query( | ||
| 46 | + @Valid QueryProcurementDomesticCustomerCreditVo vo) { | ||
| 47 | + return InvokeResultBuilder.success( | ||
| 48 | + procurementDomesticCustomerCreditService.query(getPageIndex(vo), getPageSize(vo), vo)); | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + @ApiOperation("详情") | ||
| 52 | + @HasPermission({"procure-manage:domestic-trade:query"}) | ||
| 53 | + @ApiImplicitParam(value = "id", name = "id", paramType = "query", required = true) | ||
| 54 | + @GetMapping("/get") | ||
| 55 | + public InvokeResult<ProcurementDomesticCustomerCredit> get( | ||
| 56 | + @NotBlank(message = "id不能为空!") String id) { | ||
| 57 | + return InvokeResultBuilder.success(procurementDomesticCustomerCreditService.findById(id)); | ||
| 58 | + } | ||
| 59 | +} |
| 1 | +package com.lframework.xingyun.sc.procurement.entity; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.annotation.FieldFill; | ||
| 4 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
| 5 | +import com.baomidou.mybatisplus.annotation.TableName; | ||
| 6 | +import com.lframework.starter.web.core.dto.BaseDto; | ||
| 7 | +import com.lframework.starter.web.core.entity.BaseEntity; | ||
| 8 | +import java.math.BigDecimal; | ||
| 9 | +import java.time.LocalDate; | ||
| 10 | +import java.time.LocalDateTime; | ||
| 11 | +import lombok.Data; | ||
| 12 | + | ||
| 13 | +@Data | ||
| 14 | +@TableName("procurement_domestic_customer_credit") | ||
| 15 | +public class ProcurementDomesticCustomerCredit extends BaseEntity implements BaseDto { | ||
| 16 | + | ||
| 17 | + private static final long serialVersionUID = 1L; | ||
| 18 | + | ||
| 19 | + public static final String CACHE_NAME = "ProcurementDomesticCustomerCredit"; | ||
| 20 | + | ||
| 21 | + /** | ||
| 22 | + * ID | ||
| 23 | + */ | ||
| 24 | + private String id; | ||
| 25 | + | ||
| 26 | + /** | ||
| 27 | + * 单位名称 | ||
| 28 | + */ | ||
| 29 | + private String unitName; | ||
| 30 | + | ||
| 31 | + /** | ||
| 32 | + * 公司性质 | ||
| 33 | + */ | ||
| 34 | + private String companyNature; | ||
| 35 | + | ||
| 36 | + /** | ||
| 37 | + * 开户行 | ||
| 38 | + */ | ||
| 39 | + private String bankName; | ||
| 40 | + | ||
| 41 | + /** | ||
| 42 | + * 账号 | ||
| 43 | + */ | ||
| 44 | + private String bankAccount; | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 注册资金(万元) | ||
| 48 | + */ | ||
| 49 | + private BigDecimal registeredCapital; | ||
| 50 | + | ||
| 51 | + /** | ||
| 52 | + * 法人代表 | ||
| 53 | + */ | ||
| 54 | + private String legalRepresentative; | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * 公司成立时间 | ||
| 58 | + */ | ||
| 59 | + private LocalDate companyEstablishedTime; | ||
| 60 | + | ||
| 61 | + /** | ||
| 62 | + * 地址 | ||
| 63 | + */ | ||
| 64 | + private String address; | ||
| 65 | + | ||
| 66 | + /** | ||
| 67 | + * 业务负责人 | ||
| 68 | + */ | ||
| 69 | + private String businessPrincipal; | ||
| 70 | + | ||
| 71 | + /** | ||
| 72 | + * 职务 | ||
| 73 | + */ | ||
| 74 | + private String businessPrincipalPosition; | ||
| 75 | + | ||
| 76 | + /** | ||
| 77 | + * 电话 | ||
| 78 | + */ | ||
| 79 | + private String businessPrincipalPhone; | ||
| 80 | + | ||
| 81 | + /** | ||
| 82 | + * 法人与业务负责人关系 | ||
| 83 | + */ | ||
| 84 | + private String legalBusinessRelation; | ||
| 85 | + | ||
| 86 | + /** | ||
| 87 | + * 生产厂房及办公楼产权 | ||
| 88 | + */ | ||
| 89 | + private String factoryOfficeProperty; | ||
| 90 | + | ||
| 91 | + /** | ||
| 92 | + * 生产厂房及办公楼面积 | ||
| 93 | + */ | ||
| 94 | + private String factoryOfficeArea; | ||
| 95 | + | ||
| 96 | + /** | ||
| 97 | + * 仓库或货场产权 | ||
| 98 | + */ | ||
| 99 | + private String warehouseYardProperty; | ||
| 100 | + | ||
| 101 | + /** | ||
| 102 | + * 仓库或货场产权面积 | ||
| 103 | + */ | ||
| 104 | + private String warehouseYardArea; | ||
| 105 | + | ||
| 106 | + /** | ||
| 107 | + * 主要生产设备 | ||
| 108 | + */ | ||
| 109 | + private String mainEquipment; | ||
| 110 | + | ||
| 111 | + /** | ||
| 112 | + * 正常库存量 | ||
| 113 | + */ | ||
| 114 | + private String normalInventory; | ||
| 115 | + | ||
| 116 | + /** | ||
| 117 | + * 主要品种 | ||
| 118 | + */ | ||
| 119 | + private String mainVarieties; | ||
| 120 | + | ||
| 121 | + /** | ||
| 122 | + * 月度收购量 | ||
| 123 | + */ | ||
| 124 | + private String monthlyPurchaseVolume; | ||
| 125 | + | ||
| 126 | + /** | ||
| 127 | + * 收购来源 | ||
| 128 | + */ | ||
| 129 | + private String purchaseSource; | ||
| 130 | + | ||
| 131 | + /** | ||
| 132 | + * 入库品名 | ||
| 133 | + */ | ||
| 134 | + private String stockInProductName; | ||
| 135 | + | ||
| 136 | + /** | ||
| 137 | + * 产品名称 | ||
| 138 | + */ | ||
| 139 | + private String productName; | ||
| 140 | + | ||
| 141 | + /** | ||
| 142 | + * 产能 | ||
| 143 | + */ | ||
| 144 | + private String capacity; | ||
| 145 | + | ||
| 146 | + /** | ||
| 147 | + * 销售渠道 | ||
| 148 | + */ | ||
| 149 | + private String salesChannel; | ||
| 150 | + | ||
| 151 | + /** | ||
| 152 | + * 是否享有优惠政策 | ||
| 153 | + */ | ||
| 154 | + private Boolean hasPreferentialPolicy; | ||
| 155 | + | ||
| 156 | + /** | ||
| 157 | + * 是否投资期货 | ||
| 158 | + */ | ||
| 159 | + private Boolean investInFutures; | ||
| 160 | + | ||
| 161 | + /** | ||
| 162 | + * 是否有被处罚记录 | ||
| 163 | + */ | ||
| 164 | + private Boolean hasPenaltyRecord; | ||
| 165 | + | ||
| 166 | + /** | ||
| 167 | + * 实际经营范围与法定经营范围是否相符 | ||
| 168 | + */ | ||
| 169 | + private Boolean businessScopeMatch; | ||
| 170 | + | ||
| 171 | + /** | ||
| 172 | + * 首次合作年份 | ||
| 173 | + */ | ||
| 174 | + private String firstCooperationYear; | ||
| 175 | + | ||
| 176 | + /** | ||
| 177 | + * 是否新开发 | ||
| 178 | + */ | ||
| 179 | + private String isNewDevelopment; | ||
| 180 | + | ||
| 181 | + /** | ||
| 182 | + * 操作方式 | ||
| 183 | + */ | ||
| 184 | + private String operationMode; | ||
| 185 | + | ||
| 186 | + /** | ||
| 187 | + * 是否有计划落空的不良记录 | ||
| 188 | + */ | ||
| 189 | + private Boolean hasFailedPlanRecord; | ||
| 190 | + | ||
| 191 | + /** | ||
| 192 | + * 是否有计划履行不到位现象 | ||
| 193 | + */ | ||
| 194 | + private Boolean hasPlanPerformanceIssue; | ||
| 195 | + | ||
| 196 | + /** | ||
| 197 | + * 进销账务如何处理 | ||
| 198 | + */ | ||
| 199 | + private String accountingProcess; | ||
| 200 | + | ||
| 201 | + /** | ||
| 202 | + * 开票品名与出库单品名是否一致 | ||
| 203 | + */ | ||
| 204 | + private Boolean invoiceNameMatch; | ||
| 205 | + | ||
| 206 | + /** | ||
| 207 | + * 出库流程是否规范 | ||
| 208 | + */ | ||
| 209 | + private Boolean outboundProcessStandard; | ||
| 210 | + | ||
| 211 | + /** | ||
| 212 | + * 运输方式 | ||
| 213 | + */ | ||
| 214 | + private String transportMode; | ||
| 215 | + | ||
| 216 | + /** | ||
| 217 | + * 常见料质问题 | ||
| 218 | + */ | ||
| 219 | + private String commonMaterialIssue; | ||
| 220 | + | ||
| 221 | + /** | ||
| 222 | + * 合作中的其它问题 | ||
| 223 | + */ | ||
| 224 | + private String otherIssue; | ||
| 225 | + | ||
| 226 | + /** | ||
| 227 | + * 附件文件ID集合 | ||
| 228 | + */ | ||
| 229 | + private String attachmentFileIds; | ||
| 230 | + | ||
| 231 | + /** | ||
| 232 | + * 附件文件名称集合 | ||
| 233 | + */ | ||
| 234 | + private String attachmentFileNames; | ||
| 235 | + | ||
| 236 | + /** | ||
| 237 | + * 资信调查人ID | ||
| 238 | + */ | ||
| 239 | + private String investigatorId; | ||
| 240 | + | ||
| 241 | + /** | ||
| 242 | + * 资信调查人 | ||
| 243 | + */ | ||
| 244 | + private String investigatorName; | ||
| 245 | + | ||
| 246 | + /** | ||
| 247 | + * 采购处 | ||
| 248 | + */ | ||
| 249 | + private String purchaseDepartment; | ||
| 250 | + | ||
| 251 | + /** | ||
| 252 | + * 评审有效期 | ||
| 253 | + */ | ||
| 254 | + private LocalDate reviewValidUntil; | ||
| 255 | + | ||
| 256 | + /** | ||
| 257 | + * 审核状态 | ||
| 258 | + */ | ||
| 259 | + private String status; | ||
| 260 | + | ||
| 261 | + /** | ||
| 262 | + * 是否冻结 | ||
| 263 | + */ | ||
| 264 | + private Boolean freeze; | ||
| 265 | + | ||
| 266 | + /** | ||
| 267 | + * 创建人ID | ||
| 268 | + */ | ||
| 269 | + @TableField(fill = FieldFill.INSERT) | ||
| 270 | + private String createById; | ||
| 271 | + | ||
| 272 | + /** | ||
| 273 | + * 创建人 | ||
| 274 | + */ | ||
| 275 | + @TableField(fill = FieldFill.INSERT) | ||
| 276 | + private String createBy; | ||
| 277 | + | ||
| 278 | + /** | ||
| 279 | + * 更新人ID | ||
| 280 | + */ | ||
| 281 | + @TableField(fill = FieldFill.INSERT_UPDATE) | ||
| 282 | + private String updateById; | ||
| 283 | + | ||
| 284 | + /** | ||
| 285 | + * 更新人 | ||
| 286 | + */ | ||
| 287 | + @TableField(fill = FieldFill.INSERT_UPDATE) | ||
| 288 | + private String updateBy; | ||
| 289 | + | ||
| 290 | + /** | ||
| 291 | + * 创建时间 | ||
| 292 | + */ | ||
| 293 | + @TableField(fill = FieldFill.INSERT) | ||
| 294 | + private LocalDateTime createTime; | ||
| 295 | + | ||
| 296 | + /** | ||
| 297 | + * 更新时间 | ||
| 298 | + */ | ||
| 299 | + @TableField(fill = FieldFill.INSERT_UPDATE) | ||
| 300 | + private LocalDateTime updateTime; | ||
| 301 | +} |
| 1 | +package com.lframework.xingyun.sc.procurement.impl; | ||
| 2 | + | ||
| 3 | +import com.github.pagehelper.PageInfo; | ||
| 4 | +import com.lframework.starter.common.exceptions.impl.DefaultClientException; | ||
| 5 | +import com.lframework.starter.common.utils.Assert; | ||
| 6 | +import com.lframework.starter.web.core.annotations.oplog.OpLog; | ||
| 7 | +import com.lframework.starter.web.core.components.resp.PageResult; | ||
| 8 | +import com.lframework.starter.web.core.components.security.SecurityUtil; | ||
| 9 | +import com.lframework.starter.web.core.impl.BaseMpServiceImpl; | ||
| 10 | +import com.lframework.starter.web.core.utils.IdUtil; | ||
| 11 | +import com.lframework.starter.web.core.utils.OpLogUtil; | ||
| 12 | +import com.lframework.starter.web.core.utils.PageHelperUtil; | ||
| 13 | +import com.lframework.starter.web.core.utils.PageResultUtil; | ||
| 14 | +import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; | ||
| 15 | +import com.lframework.starter.web.inner.entity.SysUser; | ||
| 16 | +import com.lframework.starter.web.inner.service.system.SysUserService; | ||
| 17 | +import com.lframework.xingyun.sc.procurement.entity.ProcurementDomesticCustomerCredit; | ||
| 18 | +import com.lframework.xingyun.sc.procurement.mappers.ProcurementDomesticCustomerCreditMapper; | ||
| 19 | +import com.lframework.xingyun.sc.procurement.service.ProcurementDomesticCustomerCreditService; | ||
| 20 | +import com.lframework.xingyun.sc.procurement.vo.CreateProcurementDomesticCustomerCreditVo; | ||
| 21 | +import com.lframework.xingyun.sc.procurement.vo.QueryProcurementDomesticCustomerCreditVo; | ||
| 22 | +import java.util.List; | ||
| 23 | +import javax.annotation.Resource; | ||
| 24 | +import org.springframework.stereotype.Service; | ||
| 25 | +import org.springframework.transaction.annotation.Transactional; | ||
| 26 | + | ||
| 27 | +@Service | ||
| 28 | +public class ProcurementDomesticCustomerCreditServiceImpl | ||
| 29 | + extends BaseMpServiceImpl<ProcurementDomesticCustomerCreditMapper, ProcurementDomesticCustomerCredit> | ||
| 30 | + implements ProcurementDomesticCustomerCreditService { | ||
| 31 | + | ||
| 32 | + @Resource | ||
| 33 | + private SysUserService sysUserService; | ||
| 34 | + | ||
| 35 | + @Override | ||
| 36 | + public PageResult<ProcurementDomesticCustomerCredit> query(Integer pageIndex, Integer pageSize, | ||
| 37 | + QueryProcurementDomesticCustomerCreditVo vo) { | ||
| 38 | + Assert.greaterThanZero(pageIndex); | ||
| 39 | + Assert.greaterThanZero(pageSize); | ||
| 40 | + | ||
| 41 | + PageHelperUtil.startPage(pageIndex, pageSize); | ||
| 42 | + List<ProcurementDomesticCustomerCredit> datas = this.query(vo); | ||
| 43 | + return PageResultUtil.convert(new PageInfo<>(datas)); | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + @Override | ||
| 47 | + public List<ProcurementDomesticCustomerCredit> query(QueryProcurementDomesticCustomerCreditVo vo) { | ||
| 48 | + return getBaseMapper().query(vo); | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + @Override | ||
| 52 | + public ProcurementDomesticCustomerCredit findById(String id) { | ||
| 53 | + return getBaseMapper().findById(id); | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + @OpLog(type = OtherOpLogType.class, name = "新增采购内贸资信调查表,ID:{}", params = {"#id"}) | ||
| 57 | + @Transactional(rollbackFor = Exception.class) | ||
| 58 | + @Override | ||
| 59 | + public String create(CreateProcurementDomesticCustomerCreditVo vo) { | ||
| 60 | + String currentUserId = SecurityUtil.getCurrentUser().getId(); | ||
| 61 | + SysUser currentUser = sysUserService.findById(currentUserId); | ||
| 62 | + if (currentUser == null) { | ||
| 63 | + throw new DefaultClientException("当前用户不存在!"); | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + ProcurementDomesticCustomerCredit data = new ProcurementDomesticCustomerCredit(); | ||
| 67 | + data.setId(IdUtil.getId()); | ||
| 68 | + data.setUnitName(vo.getUnitName()); | ||
| 69 | + data.setCompanyNature(vo.getCompanyNature()); | ||
| 70 | + data.setBankName(vo.getBankName()); | ||
| 71 | + data.setBankAccount(vo.getBankAccount()); | ||
| 72 | + data.setRegisteredCapital(vo.getRegisteredCapital()); | ||
| 73 | + data.setLegalRepresentative(vo.getLegalRepresentative()); | ||
| 74 | + data.setCompanyEstablishedTime(vo.getCompanyEstablishedTime()); | ||
| 75 | + data.setAddress(vo.getAddress()); | ||
| 76 | + data.setBusinessPrincipal(vo.getBusinessPrincipal()); | ||
| 77 | + data.setBusinessPrincipalPosition(vo.getBusinessPrincipalPosition()); | ||
| 78 | + data.setBusinessPrincipalPhone(vo.getBusinessPrincipalPhone()); | ||
| 79 | + data.setLegalBusinessRelation(vo.getLegalBusinessRelation()); | ||
| 80 | + data.setFactoryOfficeProperty(vo.getFactoryOfficeProperty()); | ||
| 81 | + data.setFactoryOfficeArea(vo.getFactoryOfficeArea()); | ||
| 82 | + data.setWarehouseYardProperty(vo.getWarehouseYardProperty()); | ||
| 83 | + data.setWarehouseYardArea(vo.getWarehouseYardArea()); | ||
| 84 | + data.setMainEquipment(vo.getMainEquipment()); | ||
| 85 | + data.setNormalInventory(vo.getNormalInventory()); | ||
| 86 | + data.setMainVarieties(vo.getMainVarieties()); | ||
| 87 | + data.setMonthlyPurchaseVolume(vo.getMonthlyPurchaseVolume()); | ||
| 88 | + data.setPurchaseSource(vo.getPurchaseSource()); | ||
| 89 | + data.setStockInProductName(vo.getStockInProductName()); | ||
| 90 | + data.setProductName(vo.getProductName()); | ||
| 91 | + data.setCapacity(vo.getCapacity()); | ||
| 92 | + data.setSalesChannel(vo.getSalesChannel()); | ||
| 93 | + data.setHasPreferentialPolicy(vo.getHasPreferentialPolicy()); | ||
| 94 | + data.setInvestInFutures(vo.getInvestInFutures()); | ||
| 95 | + data.setHasPenaltyRecord(vo.getHasPenaltyRecord()); | ||
| 96 | + data.setBusinessScopeMatch(vo.getBusinessScopeMatch()); | ||
| 97 | + data.setFirstCooperationYear(vo.getFirstCooperationYear()); | ||
| 98 | + data.setIsNewDevelopment(vo.getIsNewDevelopment()); | ||
| 99 | + data.setOperationMode(vo.getOperationMode()); | ||
| 100 | + data.setHasFailedPlanRecord(vo.getHasFailedPlanRecord()); | ||
| 101 | + data.setHasPlanPerformanceIssue(vo.getHasPlanPerformanceIssue()); | ||
| 102 | + data.setAccountingProcess(vo.getAccountingProcess()); | ||
| 103 | + data.setInvoiceNameMatch(vo.getInvoiceNameMatch()); | ||
| 104 | + data.setOutboundProcessStandard(vo.getOutboundProcessStandard()); | ||
| 105 | + data.setTransportMode(vo.getTransportMode()); | ||
| 106 | + data.setCommonMaterialIssue(vo.getCommonMaterialIssue()); | ||
| 107 | + data.setOtherIssue(vo.getOtherIssue()); | ||
| 108 | + data.setAttachmentFileIds(vo.getAttachmentFileIds()); | ||
| 109 | + data.setAttachmentFileNames(vo.getAttachmentFileNames()); | ||
| 110 | + data.setInvestigatorId(vo.getInvestigatorId()); | ||
| 111 | + data.setInvestigatorName(currentUser.getName()); | ||
| 112 | + data.setPurchaseDepartment(vo.getPurchaseDepartment()); | ||
| 113 | + data.setReviewValidUntil(vo.getReviewValidUntil()); | ||
| 114 | +// data.setStatus("AUDIT"); | ||
| 115 | + data.setFreeze(Boolean.FALSE); | ||
| 116 | + | ||
| 117 | + getBaseMapper().insert(data); | ||
| 118 | + | ||
| 119 | + OpLogUtil.setVariable("id", data.getId()); | ||
| 120 | + OpLogUtil.setExtra(vo); | ||
| 121 | + return data.getId(); | ||
| 122 | + } | ||
| 123 | +} |
| 1 | +package com.lframework.xingyun.sc.procurement.mappers; | ||
| 2 | + | ||
| 3 | +import com.lframework.starter.web.core.mapper.BaseMapper; | ||
| 4 | +import com.lframework.xingyun.sc.procurement.entity.ProcurementDomesticCustomerCredit; | ||
| 5 | +import com.lframework.xingyun.sc.procurement.vo.QueryProcurementDomesticCustomerCreditVo; | ||
| 6 | +import java.util.List; | ||
| 7 | +import org.apache.ibatis.annotations.Param; | ||
| 8 | + | ||
| 9 | +public interface ProcurementDomesticCustomerCreditMapper extends BaseMapper<ProcurementDomesticCustomerCredit> { | ||
| 10 | + | ||
| 11 | + List<ProcurementDomesticCustomerCredit> query(@Param("vo") QueryProcurementDomesticCustomerCreditVo vo); | ||
| 12 | + | ||
| 13 | + ProcurementDomesticCustomerCredit findById(@Param("id") String id); | ||
| 14 | +} |
| 1 | +package com.lframework.xingyun.sc.procurement.service; | ||
| 2 | + | ||
| 3 | +import com.lframework.starter.web.core.components.resp.PageResult; | ||
| 4 | +import com.lframework.starter.web.core.service.BaseMpService; | ||
| 5 | +import com.lframework.xingyun.sc.procurement.entity.ProcurementDomesticCustomerCredit; | ||
| 6 | +import com.lframework.xingyun.sc.procurement.vo.CreateProcurementDomesticCustomerCreditVo; | ||
| 7 | +import com.lframework.xingyun.sc.procurement.vo.QueryProcurementDomesticCustomerCreditVo; | ||
| 8 | +import java.util.List; | ||
| 9 | + | ||
| 10 | +public interface ProcurementDomesticCustomerCreditService extends BaseMpService<ProcurementDomesticCustomerCredit> { | ||
| 11 | + | ||
| 12 | + /** | ||
| 13 | + * 分页查询采购内贸资信调查表 | ||
| 14 | + * | ||
| 15 | + * @param pageIndex 页码 | ||
| 16 | + * @param pageSize 页大小 | ||
| 17 | + * @param vo 查询条件 | ||
| 18 | + * @return 分页结果 | ||
| 19 | + */ | ||
| 20 | + PageResult<ProcurementDomesticCustomerCredit> query(Integer pageIndex, Integer pageSize, | ||
| 21 | + QueryProcurementDomesticCustomerCreditVo vo); | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * 查询采购内贸资信调查表列表 | ||
| 25 | + * | ||
| 26 | + * @param vo 查询条件 | ||
| 27 | + * @return 数据列表 | ||
| 28 | + */ | ||
| 29 | + List<ProcurementDomesticCustomerCredit> query(QueryProcurementDomesticCustomerCreditVo vo); | ||
| 30 | + | ||
| 31 | + /** | ||
| 32 | + * 根据ID查询采购内贸资信调查表 | ||
| 33 | + * | ||
| 34 | + * @param id ID | ||
| 35 | + * @return 详情 | ||
| 36 | + */ | ||
| 37 | + ProcurementDomesticCustomerCredit findById(String id); | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + * 新增采购内贸资信调查表 | ||
| 41 | + * | ||
| 42 | + * @param vo 新增参数 | ||
| 43 | + * @return ID | ||
| 44 | + */ | ||
| 45 | + String create(CreateProcurementDomesticCustomerCreditVo vo); | ||
| 46 | +} |
| 1 | +package com.lframework.xingyun.sc.procurement.vo; | ||
| 2 | + | ||
| 3 | +import com.lframework.starter.web.core.vo.BaseVo; | ||
| 4 | +import io.swagger.annotations.ApiModelProperty; | ||
| 5 | +import java.io.Serializable; | ||
| 6 | +import java.math.BigDecimal; | ||
| 7 | +import java.time.LocalDate; | ||
| 8 | +import javax.validation.constraints.Digits; | ||
| 9 | +import javax.validation.constraints.NotBlank; | ||
| 10 | +import javax.validation.constraints.NotNull; | ||
| 11 | +import lombok.Data; | ||
| 12 | +import org.hibernate.validator.constraints.Length; | ||
| 13 | + | ||
| 14 | +@Data | ||
| 15 | +public class CreateProcurementDomesticCustomerCreditVo implements BaseVo, Serializable { | ||
| 16 | + | ||
| 17 | + private static final long serialVersionUID = 1L; | ||
| 18 | + | ||
| 19 | + @ApiModelProperty(value = "单位名称", required = true) | ||
| 20 | + @NotBlank(message = "单位名称不能为空!") | ||
| 21 | + @Length(max = 200, message = "单位名称最多允许200个字符!") | ||
| 22 | + private String unitName; | ||
| 23 | + | ||
| 24 | + @ApiModelProperty(value = "公司性质", required = true) | ||
| 25 | + @NotBlank(message = "公司性质不能为空!") | ||
| 26 | + @Length(max = 200, message = "公司性质最多允许200个字符!") | ||
| 27 | + private String companyNature; | ||
| 28 | + | ||
| 29 | + @ApiModelProperty(value = "开户行", required = true) | ||
| 30 | + @NotBlank(message = "开户行不能为空!") | ||
| 31 | + @Length(max = 200, message = "开户行最多允许200个字符!") | ||
| 32 | + private String bankName; | ||
| 33 | + | ||
| 34 | + @ApiModelProperty(value = "账号", required = true) | ||
| 35 | + @NotBlank(message = "账号不能为空!") | ||
| 36 | + @Length(max = 200, message = "账号最多允许200个字符!") | ||
| 37 | + private String bankAccount; | ||
| 38 | + | ||
| 39 | + @ApiModelProperty(value = "注册资金(万元)", required = true) | ||
| 40 | + @NotNull(message = "注册资金不能为空!") | ||
| 41 | + @Digits(integer = 14, fraction = 4, message = "注册资金最多支持14位整数和4位小数!") | ||
| 42 | + private BigDecimal registeredCapital; | ||
| 43 | + | ||
| 44 | + @ApiModelProperty(value = "法人代表", required = true) | ||
| 45 | + @NotBlank(message = "法人代表不能为空!") | ||
| 46 | + @Length(max = 200, message = "法人代表最多允许200个字符!") | ||
| 47 | + private String legalRepresentative; | ||
| 48 | + | ||
| 49 | + @ApiModelProperty(value = "公司成立时间", required = true) | ||
| 50 | + @NotNull(message = "公司成立时间不能为空!") | ||
| 51 | + private LocalDate companyEstablishedTime; | ||
| 52 | + | ||
| 53 | + @ApiModelProperty(value = "地址", required = true) | ||
| 54 | + @NotBlank(message = "地址不能为空!") | ||
| 55 | + @Length(max = 500, message = "地址最多允许500个字符!") | ||
| 56 | + private String address; | ||
| 57 | + | ||
| 58 | + @ApiModelProperty(value = "业务负责人", required = true) | ||
| 59 | + @NotBlank(message = "业务负责人不能为空!") | ||
| 60 | + @Length(max = 200, message = "业务负责人最多允许200个字符!") | ||
| 61 | + private String businessPrincipal; | ||
| 62 | + | ||
| 63 | + @ApiModelProperty(value = "职务", required = true) | ||
| 64 | + @NotBlank(message = "职务不能为空!") | ||
| 65 | + @Length(max = 200, message = "职务最多允许200个字符!") | ||
| 66 | + private String businessPrincipalPosition; | ||
| 67 | + | ||
| 68 | + @ApiModelProperty(value = "电话", required = true) | ||
| 69 | + @NotBlank(message = "电话不能为空!") | ||
| 70 | + @Length(max = 200, message = "电话最多允许200个字符!") | ||
| 71 | + private String businessPrincipalPhone; | ||
| 72 | + | ||
| 73 | + @ApiModelProperty(value = "法人与业务负责人关系", required = true) | ||
| 74 | + @NotBlank(message = "法人与业务负责人关系不能为空!") | ||
| 75 | + @Length(max = 500, message = "法人与业务负责人关系最多允许500个字符!") | ||
| 76 | + private String legalBusinessRelation; | ||
| 77 | + | ||
| 78 | + @ApiModelProperty(value = "生产厂房及办公楼产权", required = true) | ||
| 79 | + @NotBlank(message = "生产厂房及办公楼产权不能为空!") | ||
| 80 | + @Length(max = 500, message = "生产厂房及办公楼产权最多允许500个字符!") | ||
| 81 | + private String factoryOfficeProperty; | ||
| 82 | + | ||
| 83 | + @ApiModelProperty(value = "生产厂房及办公楼面积", required = true) | ||
| 84 | + @NotBlank(message = "生产厂房及办公楼面积不能为空!") | ||
| 85 | + @Length(max = 500, message = "生产厂房及办公楼面积最多允许500个字符!") | ||
| 86 | + private String factoryOfficeArea; | ||
| 87 | + | ||
| 88 | + @ApiModelProperty(value = "仓库或货场产权", required = true) | ||
| 89 | + @NotBlank(message = "仓库或货场产权不能为空!") | ||
| 90 | + @Length(max = 500, message = "仓库或货场产权最多允许500个字符!") | ||
| 91 | + private String warehouseYardProperty; | ||
| 92 | + | ||
| 93 | + @ApiModelProperty(value = "仓库或货场产权面积", required = true) | ||
| 94 | + @NotBlank(message = "仓库或货场产权面积不能为空!") | ||
| 95 | + @Length(max = 500, message = "仓库或货场产权面积最多允许500个字符!") | ||
| 96 | + private String warehouseYardArea; | ||
| 97 | + | ||
| 98 | + @ApiModelProperty(value = "主要生产设备", required = true) | ||
| 99 | + @NotBlank(message = "主要生产设备不能为空!") | ||
| 100 | + @Length(max = 65535, message = "主要生产设备内容过长!") | ||
| 101 | + private String mainEquipment; | ||
| 102 | + | ||
| 103 | + @ApiModelProperty(value = "正常库存量", required = true) | ||
| 104 | + @NotBlank(message = "正常库存量不能为空!") | ||
| 105 | + @Length(max = 500, message = "正常库存量最多允许500个字符!") | ||
| 106 | + private String normalInventory; | ||
| 107 | + | ||
| 108 | + @ApiModelProperty(value = "主要品种", required = true) | ||
| 109 | + @NotBlank(message = "主要品种不能为空!") | ||
| 110 | + @Length(max = 500, message = "主要品种最多允许500个字符!") | ||
| 111 | + private String mainVarieties; | ||
| 112 | + | ||
| 113 | + @ApiModelProperty(value = "月度收购量", required = true) | ||
| 114 | + @NotBlank(message = "月度收购量不能为空!") | ||
| 115 | + @Length(max = 500, message = "月度收购量最多允许500个字符!") | ||
| 116 | + private String monthlyPurchaseVolume; | ||
| 117 | + | ||
| 118 | + @ApiModelProperty(value = "收购来源", required = true) | ||
| 119 | + @NotBlank(message = "收购来源不能为空!") | ||
| 120 | + @Length(max = 500, message = "收购来源最多允许500个字符!") | ||
| 121 | + private String purchaseSource; | ||
| 122 | + | ||
| 123 | + @ApiModelProperty(value = "入库品名", required = true) | ||
| 124 | + @NotBlank(message = "入库品名不能为空!") | ||
| 125 | + @Length(max = 500, message = "入库品名最多允许500个字符!") | ||
| 126 | + private String stockInProductName; | ||
| 127 | + | ||
| 128 | + @ApiModelProperty(value = "产品名称", required = true) | ||
| 129 | + @NotBlank(message = "产品名称不能为空!") | ||
| 130 | + @Length(max = 500, message = "产品名称最多允许500个字符!") | ||
| 131 | + private String productName; | ||
| 132 | + | ||
| 133 | + @ApiModelProperty(value = "产能", required = true) | ||
| 134 | + @NotBlank(message = "产能不能为空!") | ||
| 135 | + @Length(max = 500, message = "产能最多允许500个字符!") | ||
| 136 | + private String capacity; | ||
| 137 | + | ||
| 138 | + @ApiModelProperty(value = "销售渠道", required = true) | ||
| 139 | + @NotBlank(message = "销售渠道不能为空!") | ||
| 140 | + @Length(max = 65535, message = "销售渠道内容过长!") | ||
| 141 | + private String salesChannel; | ||
| 142 | + | ||
| 143 | + @ApiModelProperty(value = "是否享有优惠政策", required = true) | ||
| 144 | + @NotNull(message = "是否享有优惠政策不能为空!") | ||
| 145 | + private Boolean hasPreferentialPolicy; | ||
| 146 | + | ||
| 147 | + @ApiModelProperty(value = "是否投资期货", required = true) | ||
| 148 | + @NotNull(message = "是否投资期货不能为空!") | ||
| 149 | + private Boolean investInFutures; | ||
| 150 | + | ||
| 151 | + @ApiModelProperty(value = "是否有被处罚记录", required = true) | ||
| 152 | + @NotNull(message = "是否有被处罚记录不能为空!") | ||
| 153 | + private Boolean hasPenaltyRecord; | ||
| 154 | + | ||
| 155 | + @ApiModelProperty(value = "实际经营范围与法定经营范围是否相符", required = true) | ||
| 156 | + @NotNull(message = "实际经营范围与法定经营范围是否相符不能为空!") | ||
| 157 | + private Boolean businessScopeMatch; | ||
| 158 | + | ||
| 159 | + @ApiModelProperty("首次合作年份") | ||
| 160 | + @Length(max = 4, message = "首次合作年份最多允许4个字符!") | ||
| 161 | + private String firstCooperationYear; | ||
| 162 | + | ||
| 163 | + @ApiModelProperty(value = "是否新开发", required = true) | ||
| 164 | + @NotBlank(message = "是否新开发不能为空!") | ||
| 165 | + @Length(max = 20, message = "是否新开发最多允许20个字符!") | ||
| 166 | + private String isNewDevelopment; | ||
| 167 | + | ||
| 168 | + @ApiModelProperty(value = "操作方式", required = true) | ||
| 169 | + @NotBlank(message = "操作方式不能为空!") | ||
| 170 | + @Length(max = 200, message = "操作方式最多允许200个字符!") | ||
| 171 | + private String operationMode; | ||
| 172 | + | ||
| 173 | + @ApiModelProperty(value = "是否有计划落空的不良记录", required = true) | ||
| 174 | + @NotNull(message = "是否有计划落空的不良记录不能为空!") | ||
| 175 | + private Boolean hasFailedPlanRecord; | ||
| 176 | + | ||
| 177 | + @ApiModelProperty(value = "是否有计划履行不到位现象", required = true) | ||
| 178 | + @NotNull(message = "是否有计划履行不到位现象不能为空!") | ||
| 179 | + private Boolean hasPlanPerformanceIssue; | ||
| 180 | + | ||
| 181 | + @ApiModelProperty(value = "进销账务如何处理", required = true) | ||
| 182 | + @NotBlank(message = "进销账务如何处理不能为空!") | ||
| 183 | + @Length(max = 65535, message = "进销账务如何处理内容过长!") | ||
| 184 | + private String accountingProcess; | ||
| 185 | + | ||
| 186 | + @ApiModelProperty(value = "开票品名与出库单品名是否一致", required = true) | ||
| 187 | + @NotNull(message = "开票品名与出库单品名是否一致不能为空!") | ||
| 188 | + private Boolean invoiceNameMatch; | ||
| 189 | + | ||
| 190 | + @ApiModelProperty(value = "出库流程是否规范", required = true) | ||
| 191 | + @NotNull(message = "出库流程是否规范不能为空!") | ||
| 192 | + private Boolean outboundProcessStandard; | ||
| 193 | + | ||
| 194 | + @ApiModelProperty(value = "运输方式", required = true) | ||
| 195 | + @NotBlank(message = "运输方式不能为空!") | ||
| 196 | + @Length(max = 200, message = "运输方式最多允许200个字符!") | ||
| 197 | + private String transportMode; | ||
| 198 | + | ||
| 199 | + @ApiModelProperty("常见料质问题") | ||
| 200 | + @Length(max = 65535, message = "常见料质问题内容过长!") | ||
| 201 | + private String commonMaterialIssue; | ||
| 202 | + | ||
| 203 | + @ApiModelProperty("合作中的其它问题") | ||
| 204 | + @Length(max = 65535, message = "合作中的其它问题内容过长!") | ||
| 205 | + private String otherIssue; | ||
| 206 | + | ||
| 207 | + @ApiModelProperty("附件文件ID集合") | ||
| 208 | + @Length(max = 65535, message = "附件文件ID集合内容过长!") | ||
| 209 | + private String attachmentFileIds; | ||
| 210 | + | ||
| 211 | + @ApiModelProperty("附件文件名称集合") | ||
| 212 | + @Length(max = 65535, message = "附件文件名称集合内容过长!") | ||
| 213 | + private String attachmentFileNames; | ||
| 214 | + | ||
| 215 | + /** | ||
| 216 | + * 资信调查人ID | ||
| 217 | + */ | ||
| 218 | + @ApiModelProperty("资信调查人ID") | ||
| 219 | + @NotBlank(message = "资信调查人ID!") | ||
| 220 | + @Length(max = 200, message = "资信调查人ID内容过长!") | ||
| 221 | + private String investigatorId; | ||
| 222 | + | ||
| 223 | + @ApiModelProperty(value = "采购处", required = true) | ||
| 224 | + @NotBlank(message = "采购处不能为空!") | ||
| 225 | + @Length(max = 200, message = "采购处最多允许200个字符!") | ||
| 226 | + private String purchaseDepartment; | ||
| 227 | + | ||
| 228 | + @ApiModelProperty(value = "评审有效期", required = true) | ||
| 229 | + @NotNull(message = "评审有效期不能为空!") | ||
| 230 | + private LocalDate reviewValidUntil; | ||
| 231 | +} |
| 1 | +package com.lframework.xingyun.sc.procurement.vo; | ||
| 2 | + | ||
| 3 | +import com.lframework.starter.web.core.vo.BaseVo; | ||
| 4 | +import com.lframework.starter.web.core.vo.PageVo; | ||
| 5 | +import io.swagger.annotations.ApiModelProperty; | ||
| 6 | +import java.io.Serializable; | ||
| 7 | +import java.time.LocalDate; | ||
| 8 | +import lombok.Data; | ||
| 9 | + | ||
| 10 | +@Data | ||
| 11 | +public class QueryProcurementDomesticCustomerCreditVo extends PageVo implements BaseVo, Serializable { | ||
| 12 | + | ||
| 13 | + private static final long serialVersionUID = 1L; | ||
| 14 | + | ||
| 15 | + @ApiModelProperty("单位名称") | ||
| 16 | + private String unitName; | ||
| 17 | + | ||
| 18 | + @ApiModelProperty("公司性质") | ||
| 19 | + private String companyNature; | ||
| 20 | + | ||
| 21 | + @ApiModelProperty("业务负责人") | ||
| 22 | + private String businessPrincipal; | ||
| 23 | + | ||
| 24 | + @ApiModelProperty("资信调查人ID") | ||
| 25 | + private String investigatorId; | ||
| 26 | + | ||
| 27 | + @ApiModelProperty("资信调查人") | ||
| 28 | + private String investigatorName; | ||
| 29 | + | ||
| 30 | + @ApiModelProperty("采购处") | ||
| 31 | + private String purchaseDepartment; | ||
| 32 | + | ||
| 33 | + @ApiModelProperty("审核状态") | ||
| 34 | + private String status; | ||
| 35 | + | ||
| 36 | + @ApiModelProperty("是否冻结") | ||
| 37 | + private Boolean freeze; | ||
| 38 | + | ||
| 39 | + @ApiModelProperty("评审有效期开始") | ||
| 40 | + private LocalDate reviewValidUntilStart; | ||
| 41 | + | ||
| 42 | + @ApiModelProperty("评审有效期结束") | ||
| 43 | + private LocalDate reviewValidUntilEnd; | ||
| 44 | + | ||
| 45 | + @ApiModelProperty("创建日期开始") | ||
| 46 | + private LocalDate createDateStart; | ||
| 47 | + | ||
| 48 | + @ApiModelProperty("创建日期结束") | ||
| 49 | + private LocalDate createDateEnd; | ||
| 50 | +} |
xingyun-sc/src/main/resources/mappers/procurement/ProcurementDomesticCustomerCreditMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | +<mapper namespace="com.lframework.xingyun.sc.procurement.mappers.ProcurementDomesticCustomerCreditMapper"> | ||
| 4 | + | ||
| 5 | + <resultMap id="ProcurementDomesticCustomerCredit" | ||
| 6 | + type="com.lframework.xingyun.sc.procurement.entity.ProcurementDomesticCustomerCredit"> | ||
| 7 | + <id column="id" property="id"/> | ||
| 8 | + <result column="unit_name" property="unitName"/> | ||
| 9 | + <result column="company_nature" property="companyNature"/> | ||
| 10 | + <result column="bank_name" property="bankName"/> | ||
| 11 | + <result column="bank_account" property="bankAccount"/> | ||
| 12 | + <result column="registered_capital" property="registeredCapital"/> | ||
| 13 | + <result column="legal_representative" property="legalRepresentative"/> | ||
| 14 | + <result column="company_established_time" property="companyEstablishedTime"/> | ||
| 15 | + <result column="address" property="address"/> | ||
| 16 | + <result column="business_principal" property="businessPrincipal"/> | ||
| 17 | + <result column="business_principal_position" property="businessPrincipalPosition"/> | ||
| 18 | + <result column="business_principal_phone" property="businessPrincipalPhone"/> | ||
| 19 | + <result column="legal_business_relation" property="legalBusinessRelation"/> | ||
| 20 | + <result column="factory_office_property" property="factoryOfficeProperty"/> | ||
| 21 | + <result column="factory_office_area" property="factoryOfficeArea"/> | ||
| 22 | + <result column="warehouse_yard_property" property="warehouseYardProperty"/> | ||
| 23 | + <result column="warehouse_yard_area" property="warehouseYardArea"/> | ||
| 24 | + <result column="main_equipment" property="mainEquipment"/> | ||
| 25 | + <result column="normal_inventory" property="normalInventory"/> | ||
| 26 | + <result column="main_varieties" property="mainVarieties"/> | ||
| 27 | + <result column="monthly_purchase_volume" property="monthlyPurchaseVolume"/> | ||
| 28 | + <result column="purchase_source" property="purchaseSource"/> | ||
| 29 | + <result column="stock_in_product_name" property="stockInProductName"/> | ||
| 30 | + <result column="product_name" property="productName"/> | ||
| 31 | + <result column="capacity" property="capacity"/> | ||
| 32 | + <result column="sales_channel" property="salesChannel"/> | ||
| 33 | + <result column="has_preferential_policy" property="hasPreferentialPolicy"/> | ||
| 34 | + <result column="invest_in_futures" property="investInFutures"/> | ||
| 35 | + <result column="has_penalty_record" property="hasPenaltyRecord"/> | ||
| 36 | + <result column="business_scope_match" property="businessScopeMatch"/> | ||
| 37 | + <result column="first_cooperation_year" property="firstCooperationYear"/> | ||
| 38 | + <result column="is_new_development" property="isNewDevelopment"/> | ||
| 39 | + <result column="operation_mode" property="operationMode"/> | ||
| 40 | + <result column="has_failed_plan_record" property="hasFailedPlanRecord"/> | ||
| 41 | + <result column="has_plan_performance_issue" property="hasPlanPerformanceIssue"/> | ||
| 42 | + <result column="accounting_process" property="accountingProcess"/> | ||
| 43 | + <result column="invoice_name_match" property="invoiceNameMatch"/> | ||
| 44 | + <result column="outbound_process_standard" property="outboundProcessStandard"/> | ||
| 45 | + <result column="transport_mode" property="transportMode"/> | ||
| 46 | + <result column="common_material_issue" property="commonMaterialIssue"/> | ||
| 47 | + <result column="other_issue" property="otherIssue"/> | ||
| 48 | + <result column="attachment_file_ids" property="attachmentFileIds"/> | ||
| 49 | + <result column="attachment_file_names" property="attachmentFileNames"/> | ||
| 50 | + <result column="investigator_id" property="investigatorId"/> | ||
| 51 | + <result column="investigator_name" property="investigatorName"/> | ||
| 52 | + <result column="purchase_department" property="purchaseDepartment"/> | ||
| 53 | + <result column="review_valid_until" property="reviewValidUntil"/> | ||
| 54 | + <result column="status" property="status"/> | ||
| 55 | + <result column="freeze" property="freeze"/> | ||
| 56 | + <result column="create_by_id" property="createById"/> | ||
| 57 | + <result column="create_by" property="createBy"/> | ||
| 58 | + <result column="update_by_id" property="updateById"/> | ||
| 59 | + <result column="update_by" property="updateBy"/> | ||
| 60 | + <result column="create_time" property="createTime"/> | ||
| 61 | + <result column="update_time" property="updateTime"/> | ||
| 62 | + </resultMap> | ||
| 63 | + | ||
| 64 | + <sql id="ProcurementDomesticCustomerCreditSql"> | ||
| 65 | + SELECT | ||
| 66 | + tb.id, | ||
| 67 | + tb.unit_name, | ||
| 68 | + tb.company_nature, | ||
| 69 | + tb.bank_name, | ||
| 70 | + tb.bank_account, | ||
| 71 | + tb.registered_capital, | ||
| 72 | + tb.legal_representative, | ||
| 73 | + tb.company_established_time, | ||
| 74 | + tb.address, | ||
| 75 | + tb.business_principal, | ||
| 76 | + tb.business_principal_position, | ||
| 77 | + tb.business_principal_phone, | ||
| 78 | + tb.legal_business_relation, | ||
| 79 | + tb.factory_office_property, | ||
| 80 | + tb.factory_office_area, | ||
| 81 | + tb.warehouse_yard_property, | ||
| 82 | + tb.warehouse_yard_area, | ||
| 83 | + tb.main_equipment, | ||
| 84 | + tb.normal_inventory, | ||
| 85 | + tb.main_varieties, | ||
| 86 | + tb.monthly_purchase_volume, | ||
| 87 | + tb.purchase_source, | ||
| 88 | + tb.stock_in_product_name, | ||
| 89 | + tb.product_name, | ||
| 90 | + tb.capacity, | ||
| 91 | + tb.sales_channel, | ||
| 92 | + tb.has_preferential_policy, | ||
| 93 | + tb.invest_in_futures, | ||
| 94 | + tb.has_penalty_record, | ||
| 95 | + tb.business_scope_match, | ||
| 96 | + tb.first_cooperation_year, | ||
| 97 | + tb.is_new_development, | ||
| 98 | + tb.operation_mode, | ||
| 99 | + tb.has_failed_plan_record, | ||
| 100 | + tb.has_plan_performance_issue, | ||
| 101 | + tb.accounting_process, | ||
| 102 | + tb.invoice_name_match, | ||
| 103 | + tb.outbound_process_standard, | ||
| 104 | + tb.transport_mode, | ||
| 105 | + tb.common_material_issue, | ||
| 106 | + tb.other_issue, | ||
| 107 | + tb.attachment_file_ids, | ||
| 108 | + tb.attachment_file_names, | ||
| 109 | + tb.investigator_id, | ||
| 110 | + tb.investigator_name, | ||
| 111 | + tb.purchase_department, | ||
| 112 | + tb.review_valid_until, | ||
| 113 | + tb.status, | ||
| 114 | + tb.freeze, | ||
| 115 | + tb.create_by_id, | ||
| 116 | + tb.create_by, | ||
| 117 | + tb.update_by_id, | ||
| 118 | + tb.update_by, | ||
| 119 | + tb.create_time, | ||
| 120 | + tb.update_time | ||
| 121 | + FROM procurement_domestic_customer_credit tb | ||
| 122 | + </sql> | ||
| 123 | + | ||
| 124 | + <select id="query" resultMap="ProcurementDomesticCustomerCredit"> | ||
| 125 | + <include refid="ProcurementDomesticCustomerCreditSql"/> | ||
| 126 | + <where> | ||
| 127 | + <if test="vo.unitName != null and vo.unitName != ''"> | ||
| 128 | + AND tb.unit_name LIKE CONCAT('%', #{vo.unitName}, '%') | ||
| 129 | + </if> | ||
| 130 | + <if test="vo.companyNature != null and vo.companyNature != ''"> | ||
| 131 | + AND tb.company_nature LIKE CONCAT('%', #{vo.companyNature}, '%') | ||
| 132 | + </if> | ||
| 133 | + <if test="vo.businessPrincipal != null and vo.businessPrincipal != ''"> | ||
| 134 | + AND tb.business_principal LIKE CONCAT('%', #{vo.businessPrincipal}, '%') | ||
| 135 | + </if> | ||
| 136 | + <if test="vo.investigatorId != null and vo.investigatorId != ''"> | ||
| 137 | + AND tb.investigator_id = #{vo.investigatorId} | ||
| 138 | + </if> | ||
| 139 | + <if test="vo.investigatorName != null and vo.investigatorName != ''"> | ||
| 140 | + AND tb.investigator_name LIKE CONCAT('%', #{vo.investigatorName}, '%') | ||
| 141 | + </if> | ||
| 142 | + <if test="vo.purchaseDepartment != null and vo.purchaseDepartment != ''"> | ||
| 143 | + AND tb.purchase_department = #{vo.purchaseDepartment} | ||
| 144 | + </if> | ||
| 145 | + <if test="vo.status != null and vo.status != ''"> | ||
| 146 | + AND tb.status = #{vo.status} | ||
| 147 | + </if> | ||
| 148 | + <if test="vo.freeze != null"> | ||
| 149 | + AND tb.freeze = #{vo.freeze} | ||
| 150 | + </if> | ||
| 151 | + <if test="vo.reviewValidUntilStart != null"> | ||
| 152 | + AND tb.review_valid_until <![CDATA[ >= ]]> #{vo.reviewValidUntilStart} | ||
| 153 | + </if> | ||
| 154 | + <if test="vo.reviewValidUntilEnd != null"> | ||
| 155 | + AND tb.review_valid_until <![CDATA[ <= ]]> #{vo.reviewValidUntilEnd} | ||
| 156 | + </if> | ||
| 157 | + <if test="vo.createDateStart != null"> | ||
| 158 | + AND DATE(tb.create_time) <![CDATA[ >= ]]> #{vo.createDateStart} | ||
| 159 | + </if> | ||
| 160 | + <if test="vo.createDateEnd != null"> | ||
| 161 | + AND DATE(tb.create_time) <![CDATA[ <= ]]> #{vo.createDateEnd} | ||
| 162 | + </if> | ||
| 163 | + </where> | ||
| 164 | + ORDER BY tb.create_time DESC | ||
| 165 | + </select> | ||
| 166 | + | ||
| 167 | + <select id="findById" resultMap="ProcurementDomesticCustomerCredit"> | ||
| 168 | + <include refid="ProcurementDomesticCustomerCreditSql"/> | ||
| 169 | + WHERE tb.id = #{id} | ||
| 170 | + </select> | ||
| 171 | +</mapper> |