提交 f0826713 编写于 作者: ibizdev's avatar ibizdev

xignzi006 发布系统代码

上级 c066dba0
......@@ -58,4 +58,27 @@ public class crm_leadFallback implements crm_leadFeignClient{
return null;
}
public Crm_lead getDraft(){
return null;
}
public Boolean checkKey(Crm_lead crm_lead){
return false;
}
public Boolean save(Crm_lead crm_lead){
return false;
}
public Boolean saveBatch(List<Crm_lead> crm_leads){
return false;
}
public Page<Crm_lead> searchDefault(Crm_leadSearchContext context){
return null;
}
}
......@@ -56,4 +56,24 @@ public interface crm_leadFeignClient {
Page<Crm_lead> select();
@RequestMapping(method = RequestMethod.GET, value = "/crm_leads/getdraft")
Crm_lead getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/crm_leads/checkkey")
Boolean checkKey(@RequestBody Crm_lead crm_lead);
@RequestMapping(method = RequestMethod.POST, value = "/crm_leads/save")
Boolean save(@RequestBody Crm_lead crm_lead);
@RequestMapping(method = RequestMethod.POST, value = "/crm_leads/savebatch")
Boolean saveBatch(@RequestBody List<Crm_lead> crm_leads);
@RequestMapping(method = RequestMethod.POST, value = "/crm_leads/searchdefault")
Page<Crm_lead> searchDefault(@RequestBody Crm_leadSearchContext context);
}
......@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject;
public interface Crm_leadMapper extends BaseMapper<Crm_lead>{
Page<Crm_lead> searchDefault(IPage page, @Param("srf") Crm_leadSearchContext context, @Param("ew") Wrapper<Crm_lead> wrapper) ;
@Override
Crm_lead selectById(Serializable id);
@Override
......@@ -61,4 +62,32 @@ public interface Crm_leadMapper extends BaseMapper<Crm_lead>{
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Crm_lead> selectByLostReason(@Param("id") Serializable id) ;
List<Crm_lead> selectByStageId(@Param("id") Serializable id) ;
List<Crm_lead> selectByTeamId(@Param("id") Serializable id) ;
List<Crm_lead> selectByCompanyId(@Param("id") Serializable id) ;
List<Crm_lead> selectByStateId(@Param("id") Serializable id) ;
List<Crm_lead> selectByCountryId(@Param("id") Serializable id) ;
List<Crm_lead> selectByTitle(@Param("id") Serializable id) ;
List<Crm_lead> selectByPartnerId(@Param("id") Serializable id) ;
List<Crm_lead> selectByCreateUid(@Param("id") Serializable id) ;
List<Crm_lead> selectByUserId(@Param("id") Serializable id) ;
List<Crm_lead> selectByWriteUid(@Param("id") Serializable id) ;
List<Crm_lead> selectByCampaignId(@Param("id") Serializable id) ;
List<Crm_lead> selectByMediumId(@Param("id") Serializable id) ;
List<Crm_lead> selectBySourceId(@Param("id") Serializable id) ;
}
......@@ -33,6 +33,39 @@ public interface ICrm_leadService extends IService<Crm_lead>{
boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ;
Crm_lead get(Long key) ;
Crm_lead getDraft(Crm_lead et) ;
boolean checkKey(Crm_lead et) ;
boolean save(Crm_lead et) ;
void saveBatch(List<Crm_lead> list) ;
Page<Crm_lead> searchDefault(Crm_leadSearchContext context) ;
List<Crm_lead> selectByLostReason(Long id) ;
void removeByLostReason(Long id) ;
List<Crm_lead> selectByStageId(Long id) ;
void removeByStageId(Long id) ;
List<Crm_lead> selectByTeamId(Long id) ;
void removeByTeamId(Long id) ;
List<Crm_lead> selectByCompanyId(Long id) ;
void removeByCompanyId(Long id) ;
List<Crm_lead> selectByStateId(Long id) ;
void removeByStateId(Long id) ;
List<Crm_lead> selectByCountryId(Long id) ;
void removeByCountryId(Long id) ;
List<Crm_lead> selectByTitle(Long id) ;
void removeByTitle(Long id) ;
List<Crm_lead> selectByPartnerId(Long id) ;
void removeByPartnerId(Long id) ;
List<Crm_lead> selectByCreateUid(Long id) ;
void removeByCreateUid(Long id) ;
List<Crm_lead> selectByUserId(Long id) ;
void removeByUserId(Long id) ;
List<Crm_lead> selectByWriteUid(Long id) ;
void removeByWriteUid(Long id) ;
List<Crm_lead> selectByCampaignId(Long id) ;
void removeByCampaignId(Long id) ;
List<Crm_lead> selectByMediumId(Long id) ;
void removeByMediumId(Long id) ;
List<Crm_lead> selectBySourceId(Long id) ;
void removeBySourceId(Long id) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
......
......@@ -156,7 +156,199 @@ public class Crm_leadServiceImpl extends ServiceImpl<Crm_leadMapper, Crm_lead> i
return et;
}
@Override
public Crm_lead getDraft(Crm_lead et) {
fillParentData(et);
return et;
}
@Override
public boolean checkKey(Crm_lead et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(Crm_lead et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(Crm_lead et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<Crm_lead> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<Crm_lead> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<Crm_lead> selectByLostReason(Long id) {
return baseMapper.selectByLostReason(id);
}
@Override
public void removeByLostReason(Long id) {
this.remove(new QueryWrapper<Crm_lead>().eq("lost_reason",id));
}
@Override
public List<Crm_lead> selectByStageId(Long id) {
return baseMapper.selectByStageId(id);
}
@Override
public void removeByStageId(Long id) {
this.remove(new QueryWrapper<Crm_lead>().eq("stage_id",id));
}
@Override
public List<Crm_lead> selectByTeamId(Long id) {
return baseMapper.selectByTeamId(id);
}
@Override
public void removeByTeamId(Long id) {
this.remove(new QueryWrapper<Crm_lead>().eq("team_id",id));
}
@Override
public List<Crm_lead> selectByCompanyId(Long id) {
return baseMapper.selectByCompanyId(id);
}
@Override
public void removeByCompanyId(Long id) {
this.remove(new QueryWrapper<Crm_lead>().eq("company_id",id));
}
@Override
public List<Crm_lead> selectByStateId(Long id) {
return baseMapper.selectByStateId(id);
}
@Override
public void removeByStateId(Long id) {
this.remove(new QueryWrapper<Crm_lead>().eq("state_id",id));
}
@Override
public List<Crm_lead> selectByCountryId(Long id) {
return baseMapper.selectByCountryId(id);
}
@Override
public void removeByCountryId(Long id) {
this.remove(new QueryWrapper<Crm_lead>().eq("country_id",id));
}
@Override
public List<Crm_lead> selectByTitle(Long id) {
return baseMapper.selectByTitle(id);
}
@Override
public void removeByTitle(Long id) {
this.remove(new QueryWrapper<Crm_lead>().eq("title",id));
}
@Override
public List<Crm_lead> selectByPartnerId(Long id) {
return baseMapper.selectByPartnerId(id);
}
@Override
public void removeByPartnerId(Long id) {
this.remove(new QueryWrapper<Crm_lead>().eq("partner_id",id));
}
@Override
public List<Crm_lead> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void removeByCreateUid(Long id) {
this.remove(new QueryWrapper<Crm_lead>().eq("create_uid",id));
}
@Override
public List<Crm_lead> selectByUserId(Long id) {
return baseMapper.selectByUserId(id);
}
@Override
public void removeByUserId(Long id) {
this.remove(new QueryWrapper<Crm_lead>().eq("user_id",id));
}
@Override
public List<Crm_lead> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void removeByWriteUid(Long id) {
this.remove(new QueryWrapper<Crm_lead>().eq("write_uid",id));
}
@Override
public List<Crm_lead> selectByCampaignId(Long id) {
return baseMapper.selectByCampaignId(id);
}
@Override
public void removeByCampaignId(Long id) {
this.remove(new QueryWrapper<Crm_lead>().eq("campaign_id",id));
}
@Override
public List<Crm_lead> selectByMediumId(Long id) {
return baseMapper.selectByMediumId(id);
}
@Override
public void removeByMediumId(Long id) {
this.remove(new QueryWrapper<Crm_lead>().eq("medium_id",id));
}
@Override
public List<Crm_lead> selectBySourceId(Long id) {
return baseMapper.selectBySourceId(id);
}
@Override
public void removeBySourceId(Long id) {
this.remove(new QueryWrapper<Crm_lead>().eq("source_id",id));
}
/**
* 查询集合 数据集
*/
@Override
public Page<Crm_lead> searchDefault(Crm_leadSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Crm_lead> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Crm_lead>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
......@@ -186,6 +186,22 @@ public class Purchase_requisition extends EntityMP implements Serializable {
@JSONField(name = "schedule_date" , format="yyyy-MM-dd")
@JsonProperty("schedule_date")
private Timestamp scheduleDate;
/**
* 申请类型
*/
@DEField(name = "type_id")
@TableField(value = "type_id")
@JSONField(name = "type_id")
@JsonProperty("type_id")
private Long typeId;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.businesscentral.core.odoo_purchase.domain.Purchase_requisition_type odooType;
/**
*
......@@ -377,6 +393,14 @@ public class Purchase_requisition extends EntityMP implements Serializable {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
return sdf.format(scheduleDate);
}
/**
* 设置 [申请类型]
*/
public void setTypeId(Long typeId){
this.typeId = typeId ;
this.modify("type_id",typeId);
}
@Override
public Serializable getDefaultKey(boolean gen) {
......
......@@ -104,6 +104,13 @@ public class Purchase_requisitionSearchContext extends QueryWrapperContext<Purch
this.getSearchCond().like("vendor_id_text", n_vendor_id_text_like);
}
}
private Long n_type_id_eq;//[申请类型]
public void setN_type_id_eq(Long n_type_id_eq) {
this.n_type_id_eq = n_type_id_eq;
if(!ObjectUtils.isEmpty(this.n_type_id_eq)){
this.getSearchCond().eq("type_id", n_type_id_eq);
}
}
/**
* 启用快速搜索
......
......@@ -62,6 +62,8 @@ public interface Purchase_requisitionMapper extends BaseMapper<Purchase_requisit
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Purchase_requisition> selectByTypeId(@Param("id") Serializable id) ;
List<Purchase_requisition> selectByVendorId(@Param("id") Serializable id) ;
List<Purchase_requisition> selectByCreateUid(@Param("id") Serializable id) ;
......
......@@ -38,6 +38,8 @@ public interface IPurchase_requisitionService extends IService<Purchase_requisit
boolean save(Purchase_requisition et) ;
void saveBatch(List<Purchase_requisition> list) ;
Page<Purchase_requisition> searchDefault(Purchase_requisitionSearchContext context) ;
List<Purchase_requisition> selectByTypeId(Long id) ;
void removeByTypeId(Long id) ;
List<Purchase_requisition> selectByVendorId(Long id) ;
void removeByVendorId(Long id) ;
List<Purchase_requisition> selectByCreateUid(Long id) ;
......
......@@ -53,6 +53,9 @@ public class Purchase_requisitionServiceImpl extends ServiceImpl<Purchase_requis
protected cn.ibizlab.businesscentral.core.odoo_purchase.service.IPurchase_requisition_lineService purchaseRequisitionLineService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_purchase.service.IPurchase_requisition_typeService purchaseRequisitionTypeService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_partnerService resPartnerService;
@Autowired
@Lazy
......@@ -164,6 +167,16 @@ public class Purchase_requisitionServiceImpl extends ServiceImpl<Purchase_requis
}
@Override
public List<Purchase_requisition> selectByTypeId(Long id) {
return baseMapper.selectByTypeId(id);
}
@Override
public void removeByTypeId(Long id) {
this.remove(new QueryWrapper<Purchase_requisition>().eq("type_id",id));
}
@Override
public List<Purchase_requisition> selectByVendorId(Long id) {
return baseMapper.selectByVendorId(id);
......
......@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
@Service("Purchase_requisition_typeServiceImpl")
public class Purchase_requisition_typeServiceImpl extends ServiceImpl<Purchase_requisition_typeMapper, Purchase_requisition_type> implements IPurchase_requisition_typeService {
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_purchase.service.IPurchase_requisitionService purchaseRequisitionService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_usersService resUsersService;
......
......@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Purchase_requisitionResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.ACTIVITY_DATE_DEADLINE, t1.ACTIVITY_STATE, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.DATE_END, t1.ID, t1.NAME, t1.ORDERING_DATE, t1.ORDER_COUNT, t1.ORIGIN, t1.SCHEDULE_DATE, t1.VENDOR_ID, t51.NAME AS VENDOR_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION t1 LEFT JOIN RES_USERS t11 ON t1.WRITE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.CREATE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t1.VENDOR_ID = t51.ID ) t1 where id=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.ACTIVITY_DATE_DEADLINE, t1.ACTIVITY_STATE, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.DATE_END, t1.ID, t1.NAME, t1.ORDERING_DATE, t1.ORDER_COUNT, t1.ORIGIN, t1.SCHEDULE_DATE, t1.TYPE_ID, t1.VENDOR_ID, t51.NAME AS VENDOR_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION t1 LEFT JOIN RES_USERS t11 ON t1.WRITE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.CREATE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t1.VENDOR_ID = t51.ID ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
......@@ -26,8 +26,11 @@
<result property="orderingDate" column="ordering_date" />
<result property="dateEnd" column="date_end" />
<result property="scheduleDate" column="schedule_date" />
<result property="typeId" column="type_id" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooType" javaType="cn.ibizlab.businesscentral.core.odoo_purchase.domain.Purchase_requisition_type" column="type_id" select="cn.ibizlab.businesscentral.core.odoo_purchase.mapper.Purchase_requisition_typeMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooVendor" javaType="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner" column="vendor_id" select="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_partnerMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
......@@ -36,6 +39,13 @@
<association property="odooWrite" javaType="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_users" column="write_uid" select="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_usersMapper.selectById" fetchType="lazy"></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_PURCHASE_REQUISITION_PURCHASE_REQUISITION_TYPE_TYPE_ID] -->
<select id="selectByTypeId" resultMap="Purchase_requisitionResultMap">
select t1.* from (
<include refid="Default" />
) t1
where type_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_PURCHASE_REQUISITION_RES_PARTNER_VENDOR_ID] -->
<select id="selectByVendorId" resultMap="Purchase_requisitionResultMap">
select t1.* from (
......@@ -69,12 +79,12 @@
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.ACTIVITY_DATE_DEADLINE, t1.ACTIVITY_STATE, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.DATE_END, t1.ID, t1.NAME, t1.ORDERING_DATE, t1.ORDER_COUNT, t1.ORIGIN, t1.SCHEDULE_DATE, t1.VENDOR_ID, t51.NAME AS VENDOR_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION t1 LEFT JOIN RES_USERS t11 ON t1.WRITE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.CREATE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t1.VENDOR_ID = t51.ID
<![CDATA[ SELECT t1.ACTIVITY_DATE_DEADLINE, t1.ACTIVITY_STATE, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.DATE_END, t1.ID, t1.NAME, t1.ORDERING_DATE, t1.ORDER_COUNT, t1.ORIGIN, t1.SCHEDULE_DATE, t1.TYPE_ID, t1.VENDOR_ID, t51.NAME AS VENDOR_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION t1 LEFT JOIN RES_USERS t11 ON t1.WRITE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.CREATE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t1.VENDOR_ID = t51.ID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.ACTIVITY_DATE_DEADLINE, t1.ACTIVITY_STATE, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.DATE_END, t1.ID, t1.NAME, t1.ORDERING_DATE, t1.ORDER_COUNT, t1.ORIGIN, t1.SCHEDULE_DATE, t1.VENDOR_ID, t51.NAME AS VENDOR_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION t1 LEFT JOIN RES_USERS t11 ON t1.WRITE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.CREATE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t1.VENDOR_ID = t51.ID
<![CDATA[ SELECT t1.ACTIVITY_DATE_DEADLINE, t1.ACTIVITY_STATE, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.DATE_END, t1.ID, t1.NAME, t1.ORDERING_DATE, t1.ORDER_COUNT, t1.ORIGIN, t1.SCHEDULE_DATE, t1.TYPE_ID, t1.VENDOR_ID, t51.NAME AS VENDOR_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION t1 LEFT JOIN RES_USERS t11 ON t1.WRITE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.CREATE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t1.VENDOR_ID = t51.ID
]]>
</sql>
</mapper>
......
......@@ -123952,6 +123952,23 @@
"data_type":"DATETIME",
"key_field":0,
"major_field":0
},
{
"fieldname":"TYPE_ID" ,
"codename":"Type_id",
"field_logic_name":"申请类型",
"entity_name":"Purchase_requisition",
"ref_de":"PURCHASE_REQUISITION_TYPE",
"ref_field_name":"ID",
"relation_name":"DER1N_PURCHASE_REQUISITION_PURCHASE_REQUISITION_TYPE_TYPE_ID",
"relation_codename":"Odoo_type",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"data_length":20,
"key_field":0,
"major_field":0
}
],
"subEntitys":[
......@@ -123963,6 +123980,12 @@
}
],
"parentEntitys":[
{"name":"DER1N_PURCHASE_REQUISITION_PURCHASE_REQUISITION_TYPE_TYPE_ID",
"relation_type":"DER1N",
"code_name":"Odoo_type",
"entity_name":"PURCHASE_REQUISITION",
"ref_entity_name":"PURCHASE_REQUISITION_TYPE"
},
{"name":"DER1N_PURCHASE_REQUISITION_RES_PARTNER_VENDOR_ID",
"relation_type":"DER1N",
"code_name":"Odoo_vendor",
......@@ -124612,6 +124635,12 @@
}
],
"subEntitys":[
{"name":"DER1N_PURCHASE_REQUISITION_PURCHASE_REQUISITION_TYPE_TYPE_ID",
"relation_type":"DER1N",
"code_name":"Odoo_type",
"entity_name":"PURCHASE_REQUISITION",
"ref_entity_name":"PURCHASE_REQUISITION_TYPE"
}
],
"parentEntitys":[
{"name":"DER1N_PURCHASE_REQUISITION_TYPE_RES_USERS_CREATE_UID",
......@@ -191,6 +191,15 @@ public class Purchase_requisitionDTO extends DTOBase implements Serializable {
@JsonProperty("schedule_date")
private Timestamp scheduleDate;
/**
* 属性 [TYPE_ID]
*
*/
@JSONField(name = "type_id")
@JsonProperty("type_id")
@JsonSerialize(using = ToStringSerializer.class)
private Long typeId;
/**
* 设置 [NAME]
......@@ -296,6 +305,14 @@ public class Purchase_requisitionDTO extends DTOBase implements Serializable {
this.modify("schedule_date",scheduleDate);
}
/**
* 设置 [TYPE_ID]
*/
public void setTypeId(Long typeId){
this.typeId = typeId ;
this.modify("type_id",typeId);
}
}
......
......@@ -109,6 +109,55 @@ public class Crm_leadResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取线索/商机草稿", tags = {"线索/商机" }, notes = "获取线索/商机草稿")
@RequestMapping(method = RequestMethod.GET, value = "/crm_leads/getdraft")
public ResponseEntity<Crm_leadDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(crm_leadMapping.toDto(crm_leadService.getDraft(new Crm_lead())));
}
@ApiOperation(value = "检查线索/商机", tags = {"线索/商机" }, notes = "检查线索/商机")
@RequestMapping(method = RequestMethod.POST, value = "/crm_leads/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Crm_leadDTO crm_leaddto) {
return ResponseEntity.status(HttpStatus.OK).body(crm_leadService.checkKey(crm_leadMapping.toDomain(crm_leaddto)));
}
@PreAuthorize("hasPermission(this.crm_leadMapping.toDomain(#crm_leaddto),'iBizBusinessCentral-Crm_lead-Save')")
@ApiOperation(value = "保存线索/商机", tags = {"线索/商机" }, notes = "保存线索/商机")
@RequestMapping(method = RequestMethod.POST, value = "/crm_leads/save")
public ResponseEntity<Boolean> save(@RequestBody Crm_leadDTO crm_leaddto) {
return ResponseEntity.status(HttpStatus.OK).body(crm_leadService.save(crm_leadMapping.toDomain(crm_leaddto)));
}
@PreAuthorize("hasPermission(this.crm_leadMapping.toDomain(#crm_leaddtos),'iBizBusinessCentral-Crm_lead-Save')")
@ApiOperation(value = "批量保存线索/商机", tags = {"线索/商机" }, notes = "批量保存线索/商机")
@RequestMapping(method = RequestMethod.POST, value = "/crm_leads/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<Crm_leadDTO> crm_leaddtos) {
crm_leadService.saveBatch(crm_leadMapping.toDomain(crm_leaddtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Crm_lead-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Crm_lead-Get')")
@ApiOperation(value = "获取数据集", tags = {"线索/商机" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/crm_leads/fetchdefault")
public ResponseEntity<List<Crm_leadDTO>> fetchDefault(Crm_leadSearchContext context) {
Page<Crm_lead> domains = crm_leadService.searchDefault(context) ;
List<Crm_leadDTO> list = crm_leadMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Crm_lead-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Crm_lead-Get')")
@ApiOperation(value = "查询数据集", tags = {"线索/商机" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/crm_leads/searchdefault")
public ResponseEntity<Page<Crm_leadDTO>> searchDefault(@RequestBody Crm_leadSearchContext context) {
Page<Crm_lead> domains = crm_leadService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(crm_leadMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册