📖 CRM:code review 合同的代码实现

plp
YunaiV 2 years ago
parent 3347d3320d
commit bf8ec22144

@ -43,17 +43,6 @@ public class BpmModelController {
return success(model); return success(model);
} }
// TODO @puhui999这个接口的目的是啥呀业务表单预览流程🤣
// TODO @puhui999捉摸是不是搞成前端跳转过去不另外做 bpmn 组件哈;
@GetMapping("/get-by-key")
@Operation(summary = "获得模型")
@Parameter(name = "key", description = "流程标识", required = true, example = "oa_leave")
@PreAuthorize("@ss.hasPermission('bpm:model:query')")
public CommonResult<BpmModelRespVO> getModelByKey(@RequestParam("key") String key) {
BpmModelRespVO model = modelService.getBpmnModelByKey(key);
return success(model);
}
@PostMapping("/create") @PostMapping("/create")
@Operation(summary = "新建模型") @Operation(summary = "新建模型")
@PreAuthorize("@ss.hasPermission('bpm:model:create')") @PreAuthorize("@ss.hasPermission('bpm:model:create')")

@ -37,14 +37,6 @@ public interface BpmModelService {
*/ */
BpmModelRespVO getModel(String id); BpmModelRespVO getModel(String id);
/**
*
*
* @param key
* @return
*/
BpmModelRespVO getBpmnModelByKey(String key);
/** /**
* *
* *

@ -134,19 +134,6 @@ public class BpmModelServiceImpl implements BpmModelService {
return modelRespVO; return modelRespVO;
} }
@Override
public BpmModelRespVO getBpmnModelByKey(String key) {
Model model = getModelByKey(key);
if (model == null) {
return null;
}
BpmModelRespVO modelRespVO = BpmModelConvert.INSTANCE.convert(model);
// 拼接 bpmn XML
byte[] bpmnBytes = repositoryService.getModelEditorSource(model.getId());
modelRespVO.setBpmnXml(StrUtil.utf8Str(bpmnBytes));
return modelRespVO;
}
@Override @Override
@Transactional(rollbackFor = Exception.class) // 因为进行多个操作,所以开启事务 @Transactional(rollbackFor = Exception.class) // 因为进行多个操作,所以开启事务
public void updateModel(@Valid BpmModelUpdateReqVO updateReqVO) { public void updateModel(@Valid BpmModelUpdateReqVO updateReqVO) {

@ -5,6 +5,7 @@ import lombok.Data;
import java.time.LocalDateTime; import java.time.LocalDateTime;
// TODO @puhui999合并到 RespVO 里哈;
/** /**
* CRM Excel VO * CRM Excel VO
* *

@ -116,6 +116,11 @@ public class CrmContractRespVO {
@ExcelProperty("创建人名字") @ExcelProperty("创建人名字")
private String creatorName; private String creatorName;
@Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("更新时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime updateTime;
@Schema(description = "负责人", example = "test") @Schema(description = "负责人", example = "test")
@ExcelProperty("负责人") @ExcelProperty("负责人")
private String ownerUserName; private String ownerUserName;

@ -1,6 +1,9 @@
package cn.iocoder.yudao.module.crm.dal.dataobject.contract; package cn.iocoder.yudao.module.crm.dal.dataobject.contract;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO;
import cn.iocoder.yudao.module.crm.dal.dataobject.contact.CrmContactDO;
import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO;
import cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum; import cn.iocoder.yudao.module.crm.enums.common.CrmAuditStatusEnum;
import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
@ -30,30 +33,36 @@ public class CrmContractDO extends BaseDO {
*/ */
@TableId @TableId
private Long id; private Long id;
/**
*
*/
private String no;
/** /**
* *
*/ */
private String name; private String name;
/** /**
* *
*
* {@link CrmCustomerDO#getId()}
*/ */
private Long customerId; private Long customerId;
/** /**
* *
*
* {@link CrmBusinessDO#getId()}
*/ */
private Long businessId; private Long businessId;
/** /**
* *
*
* ProcessInstance id
*/ */
private String processInstanceId; private String processInstanceId;
/** /**
* *
*/ */
private LocalDateTime orderDate; private LocalDateTime orderDate;
/**
*
*/
private String no;
/** /**
* *
*/ */
@ -63,7 +72,7 @@ public class CrmContractDO extends BaseDO {
*/ */
private LocalDateTime endTime; private LocalDateTime endTime;
/** /**
* *
*/ */
private Integer price; private Integer price;
/** /**
@ -71,15 +80,19 @@ public class CrmContractDO extends BaseDO {
*/ */
private Integer discountPercent; private Integer discountPercent;
/** /**
* *
*/ */
private Integer productPrice; private Integer productPrice;
/** /**
* *
*
* {@link CrmContactDO#getId()}
*/ */
private Long contactId; private Long contactId;
/** /**
* *
*
* AdminUserDO id
*/ */
private Long signUserId; private Long signUserId;
/** /**

Loading…
Cancel
Save