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

xignzi006 发布系统代码

上级 cc575977
...@@ -22,14 +22,84 @@ public class Ir_sequenceExService extends Ir_sequenceServiceImpl { ...@@ -22,14 +22,84 @@ public class Ir_sequenceExService extends Ir_sequenceServiceImpl {
} }
/** /**
* 自定义行为[Next_by_code]用户扩展 * 自定义行为[Alter_sequence]用户扩展
* @param et * @param et
* @return * @return
*/ */
@Override @Override
@Transactional @Transactional
public Ir_sequence next_by_code(Ir_sequence et) { public Ir_sequence alter_sequence(Ir_sequence et) {
return super.next_by_code(et); return super.alter_sequence(et);
}
/**
* 自定义行为[Create_sequence]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public Ir_sequence create_sequence(Ir_sequence et) {
return super.create_sequence(et);
}
/**
* 自定义行为[Drop_sequence]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public Ir_sequence drop_sequence(Ir_sequence et) {
return super.drop_sequence(et);
}
/**
* 自定义行为[Get_next]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public Ir_sequence get_next(Ir_sequence et) {
return super.get_next(et);
}
/**
* 自定义行为[Get_next_by_code]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public Ir_sequence get_next_by_code(Ir_sequence et) {
return super.get_next_by_code(et);
}
/**
* 自定义行为[Predict_nextval]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public Ir_sequence predict_nextval(Ir_sequence et) {
return super.predict_nextval(et);
}
/**
* 自定义行为[Select_nextval]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public Ir_sequence select_nextval(Ir_sequence et) {
return super.select_nextval(et);
}
/**
* 自定义行为[Update_nogap]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public Ir_sequence update_nogap(Ir_sequence et) {
return super.update_nogap(et);
} }
} }
package cn.ibizlab.businesscentral.core.extensions.service;
import cn.ibizlab.businesscentral.core.odoo_ir.service.impl.Ir_sequence_date_rangeServiceImpl;
import lombok.extern.slf4j.Slf4j;
import cn.ibizlab.businesscentral.core.odoo_ir.domain.Ir_sequence_date_range;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Primary;
import java.util.*;
/**
* 实体[序列日期范围] 自定义服务对象
*/
@Slf4j
@Primary
@Service("Ir_sequence_date_rangeExService")
public class Ir_sequence_date_rangeExService extends Ir_sequence_date_rangeServiceImpl {
@Override
protected Class currentModelClass() {
return com.baomidou.mybatisplus.core.toolkit.ReflectionKit.getSuperClassGenericType(this.getClass().getSuperclass(), 1);
}
/**
* 自定义行为[Create_sequence]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public Ir_sequence_date_range create_sequence(Ir_sequence_date_range et) {
return super.create_sequence(et);
}
}
...@@ -180,12 +180,12 @@ public class Ir_sequence extends EntityMP implements Serializable { ...@@ -180,12 +180,12 @@ public class Ir_sequence extends EntityMP implements Serializable {
@JsonProperty("write_date") @JsonProperty("write_date")
private Timestamp writeDate; private Timestamp writeDate;
/** /**
* next_code_value * next_char
*/ */
@TableField(exist = false) @TableField(exist = false)
@JSONField(name = "next_code_value") @JSONField(name = "next_char")
@JsonProperty("next_code_value") @JsonProperty("next_char")
private String nextCodeValue; private String nextChar;
/** /**
* 公司 * 公司
......
...@@ -68,6 +68,24 @@ public class Ir_sequence_date_rangeSearchContext extends QueryWrapperContext<Ir_ ...@@ -68,6 +68,24 @@ public class Ir_sequence_date_rangeSearchContext extends QueryWrapperContext<Ir_
if(!ObjectUtils.isEmpty(this.n_write_uid_eq)){ if(!ObjectUtils.isEmpty(this.n_write_uid_eq)){
this.getSearchCond().eq("write_uid", n_write_uid_eq); this.getSearchCond().eq("write_uid", n_write_uid_eq);
} }
}
@JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
@JSONField(format="yyyy-MM-dd")
private Timestamp n_date_from_ltandeq;//[起始日期]
public void setN_date_from_ltandeq(Timestamp n_date_from_ltandeq) {
this.n_date_from_ltandeq = n_date_from_ltandeq;
if(!ObjectUtils.isEmpty(this.n_date_from_ltandeq)){
this.getSearchCond().le("date_from", n_date_from_ltandeq);
}
}
@JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
@JSONField(format="yyyy-MM-dd")
private Timestamp n_date_to_gtandeq;//[结束日期]
public void setN_date_to_gtandeq(Timestamp n_date_to_gtandeq) {
this.n_date_to_gtandeq = n_date_to_gtandeq;
if(!ObjectUtils.isEmpty(this.n_date_to_gtandeq)){
this.getSearchCond().ge("date_to", n_date_to_gtandeq);
}
} }
private Long n_sequence_id_eq;//[ID] private Long n_sequence_id_eq;//[ID]
public void setN_sequence_id_eq(Long n_sequence_id_eq) { public void setN_sequence_id_eq(Long n_sequence_id_eq) {
......
...@@ -34,10 +34,17 @@ public interface IIr_sequenceService extends IService<Ir_sequence>{ ...@@ -34,10 +34,17 @@ public interface IIr_sequenceService extends IService<Ir_sequence>{
void removeBatch(Collection<Long> idList) ; void removeBatch(Collection<Long> idList) ;
Ir_sequence get(Long key) ; Ir_sequence get(Long key) ;
Ir_sequence getDraft(Ir_sequence et) ; Ir_sequence getDraft(Ir_sequence et) ;
Ir_sequence alter_sequence(Ir_sequence et) ;
boolean checkKey(Ir_sequence et) ; boolean checkKey(Ir_sequence et) ;
Ir_sequence next_by_code(Ir_sequence et) ; Ir_sequence create_sequence(Ir_sequence et) ;
Ir_sequence drop_sequence(Ir_sequence et) ;
Ir_sequence get_next(Ir_sequence et) ;
Ir_sequence get_next_by_code(Ir_sequence et) ;
Ir_sequence predict_nextval(Ir_sequence et) ;
boolean save(Ir_sequence et) ; boolean save(Ir_sequence et) ;
void saveBatch(List<Ir_sequence> list) ; void saveBatch(List<Ir_sequence> list) ;
Ir_sequence select_nextval(Ir_sequence et) ;
Ir_sequence update_nogap(Ir_sequence et) ;
Page<Ir_sequence> searchDefault(Ir_sequenceSearchContext context) ; Page<Ir_sequence> searchDefault(Ir_sequenceSearchContext context) ;
List<Ir_sequence> selectByCompanyId(Long id) ; List<Ir_sequence> selectByCompanyId(Long id) ;
void removeByCompanyId(Long id) ; void removeByCompanyId(Long id) ;
......
...@@ -35,6 +35,7 @@ public interface IIr_sequence_date_rangeService extends IService<Ir_sequence_dat ...@@ -35,6 +35,7 @@ public interface IIr_sequence_date_rangeService extends IService<Ir_sequence_dat
Ir_sequence_date_range get(Long key) ; Ir_sequence_date_range get(Long key) ;
Ir_sequence_date_range getDraft(Ir_sequence_date_range et) ; Ir_sequence_date_range getDraft(Ir_sequence_date_range et) ;
boolean checkKey(Ir_sequence_date_range et) ; boolean checkKey(Ir_sequence_date_range et) ;
Ir_sequence_date_range create_sequence(Ir_sequence_date_range et) ;
boolean save(Ir_sequence_date_range et) ; boolean save(Ir_sequence_date_range et) ;
void saveBatch(List<Ir_sequence_date_range> list) ; void saveBatch(List<Ir_sequence_date_range> list) ;
Page<Ir_sequence_date_range> searchDefault(Ir_sequence_date_rangeSearchContext context) ; Page<Ir_sequence_date_range> searchDefault(Ir_sequence_date_rangeSearchContext context) ;
......
...@@ -126,13 +126,48 @@ public class Ir_sequenceServiceImpl extends ServiceImpl<Ir_sequenceMapper, Ir_se ...@@ -126,13 +126,48 @@ public class Ir_sequenceServiceImpl extends ServiceImpl<Ir_sequenceMapper, Ir_se
return et; return et;
} }
@Override
@Transactional
public Ir_sequence alter_sequence(Ir_sequence et) {
//自定义代码
return et;
}
@Override @Override
public boolean checkKey(Ir_sequence et) { public boolean checkKey(Ir_sequence et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId()))); return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
} }
@Override @Override
@Transactional @Transactional
public Ir_sequence next_by_code(Ir_sequence et) { public Ir_sequence create_sequence(Ir_sequence et) {
//自定义代码
return et;
}
@Override
@Transactional
public Ir_sequence drop_sequence(Ir_sequence et) {
//自定义代码
return et;
}
@Override
@Transactional
public Ir_sequence get_next(Ir_sequence et) {
//自定义代码
return et;
}
@Override
@Transactional
public Ir_sequence get_next_by_code(Ir_sequence et) {
//自定义代码
return et;
}
@Override
@Transactional
public Ir_sequence predict_nextval(Ir_sequence et) {
//自定义代码 //自定义代码
return et; return et;
} }
...@@ -170,6 +205,20 @@ public class Ir_sequenceServiceImpl extends ServiceImpl<Ir_sequenceMapper, Ir_se ...@@ -170,6 +205,20 @@ public class Ir_sequenceServiceImpl extends ServiceImpl<Ir_sequenceMapper, Ir_se
saveOrUpdateBatch(list,batchSize); saveOrUpdateBatch(list,batchSize);
} }
@Override
@Transactional
public Ir_sequence select_nextval(Ir_sequence et) {
//自定义代码
return et;
}
@Override
@Transactional
public Ir_sequence update_nogap(Ir_sequence et) {
//自定义代码
return et;
}
@Override @Override
public List<Ir_sequence> selectByCompanyId(Long id) { public List<Ir_sequence> selectByCompanyId(Long id) {
......
...@@ -127,6 +127,13 @@ public class Ir_sequence_date_rangeServiceImpl extends ServiceImpl<Ir_sequence_d ...@@ -127,6 +127,13 @@ public class Ir_sequence_date_rangeServiceImpl extends ServiceImpl<Ir_sequence_d
public boolean checkKey(Ir_sequence_date_range et) { public boolean checkKey(Ir_sequence_date_range et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId()))); return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
} }
@Override
@Transactional
public Ir_sequence_date_range create_sequence(Ir_sequence_date_range et) {
//自定义代码
return et;
}
@Override @Override
@Transactional @Transactional
public boolean save(Ir_sequence_date_range et) { public boolean save(Ir_sequence_date_range et) {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<result property="companyId" column="company_id" /> <result property="companyId" column="company_id" />
<result property="createDate" column="create_date" /> <result property="createDate" column="create_date" />
<result property="writeDate" column="write_date" /> <result property="writeDate" column="write_date" />
<result property="nextCodeValue" column="next_code_value" /> <result property="nextChar" column="next_char" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 --> <!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
......
...@@ -71525,9 +71525,9 @@ ...@@ -71525,9 +71525,9 @@
"major_field":0 "major_field":0
}, },
{ {
"fieldname":"NEXT_CODE_VALUE" , "fieldname":"NEXT_CHAR" ,
"codename":"Next_code_value", "codename":"Next_char",
"field_logic_name":"next_code_value", "field_logic_name":"next_char",
"entity_name":"Ir_sequence", "entity_name":"Ir_sequence",
"field_type":"TEXT", "field_type":"TEXT",
"nullable":1, "nullable":1,
...@@ -188,13 +188,13 @@ public class Ir_sequenceDTO extends DTOBase implements Serializable { ...@@ -188,13 +188,13 @@ public class Ir_sequenceDTO extends DTOBase implements Serializable {
private Timestamp writeDate; private Timestamp writeDate;
/** /**
* 属性 [NEXT_CODE_VALUE] * 属性 [NEXT_CHAR]
* *
*/ */
@JSONField(name = "next_code_value") @JSONField(name = "next_char")
@JsonProperty("next_code_value") @JsonProperty("next_char")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String nextCodeValue; private String nextChar;
/** /**
......
...@@ -114,19 +114,74 @@ public class Ir_sequenceResource { ...@@ -114,19 +114,74 @@ public class Ir_sequenceResource {
return ResponseEntity.status(HttpStatus.OK).body(ir_sequenceMapping.toDto(ir_sequenceService.getDraft(new Ir_sequence()))); return ResponseEntity.status(HttpStatus.OK).body(ir_sequenceMapping.toDto(ir_sequenceService.getDraft(new Ir_sequence())));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-Alter_sequence-all')")
@ApiOperation(value = "修改序列", tags = {"序列" }, notes = "修改序列")
@RequestMapping(method = RequestMethod.POST, value = "/ir_sequences/{ir_sequence_id}/alter_sequence")
public ResponseEntity<Ir_sequenceDTO> alter_sequence(@PathVariable("ir_sequence_id") Long ir_sequence_id, @RequestBody Ir_sequenceDTO ir_sequencedto) {
Ir_sequence domain = ir_sequenceMapping.toDomain(ir_sequencedto);
domain.setId(ir_sequence_id);
domain = ir_sequenceService.alter_sequence(domain);
ir_sequencedto = ir_sequenceMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ir_sequencedto);
}
@ApiOperation(value = "检查序列", tags = {"序列" }, notes = "检查序列") @ApiOperation(value = "检查序列", tags = {"序列" }, notes = "检查序列")
@RequestMapping(method = RequestMethod.POST, value = "/ir_sequences/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/ir_sequences/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Ir_sequenceDTO ir_sequencedto) { public ResponseEntity<Boolean> checkKey(@RequestBody Ir_sequenceDTO ir_sequencedto) {
return ResponseEntity.status(HttpStatus.OK).body(ir_sequenceService.checkKey(ir_sequenceMapping.toDomain(ir_sequencedto))); return ResponseEntity.status(HttpStatus.OK).body(ir_sequenceService.checkKey(ir_sequenceMapping.toDomain(ir_sequencedto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-Next_by_code-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-Create_sequence-all')")
@ApiOperation(value = "next_by_code", tags = {"序列" }, notes = "next_by_code") @ApiOperation(value = "创建序列", tags = {"序列" }, notes = "创建序列")
@RequestMapping(method = RequestMethod.POST, value = "/ir_sequences/{ir_sequence_id}/next_by_code") @RequestMapping(method = RequestMethod.POST, value = "/ir_sequences/{ir_sequence_id}/create_sequence")
public ResponseEntity<Ir_sequenceDTO> next_by_code(@PathVariable("ir_sequence_id") Long ir_sequence_id, @RequestBody Ir_sequenceDTO ir_sequencedto) { public ResponseEntity<Ir_sequenceDTO> create_sequence(@PathVariable("ir_sequence_id") Long ir_sequence_id, @RequestBody Ir_sequenceDTO ir_sequencedto) {
Ir_sequence domain = ir_sequenceMapping.toDomain(ir_sequencedto);
domain.setId(ir_sequence_id);
domain = ir_sequenceService.create_sequence(domain);
ir_sequencedto = ir_sequenceMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ir_sequencedto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-Drop_sequence-all')")
@ApiOperation(value = "删除序列", tags = {"序列" }, notes = "删除序列")
@RequestMapping(method = RequestMethod.POST, value = "/ir_sequences/{ir_sequence_id}/drop_sequence")
public ResponseEntity<Ir_sequenceDTO> drop_sequence(@PathVariable("ir_sequence_id") Long ir_sequence_id, @RequestBody Ir_sequenceDTO ir_sequencedto) {
Ir_sequence domain = ir_sequenceMapping.toDomain(ir_sequencedto); Ir_sequence domain = ir_sequenceMapping.toDomain(ir_sequencedto);
domain.setId(ir_sequence_id); domain.setId(ir_sequence_id);
domain = ir_sequenceService.next_by_code(domain); domain = ir_sequenceService.drop_sequence(domain);
ir_sequencedto = ir_sequenceMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ir_sequencedto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-Get_next-all')")
@ApiOperation(value = "get_next", tags = {"序列" }, notes = "get_next")
@RequestMapping(method = RequestMethod.GET, value = "/ir_sequences/{ir_sequence_id}/get_next")
public ResponseEntity<Ir_sequenceDTO> get_next(@PathVariable("ir_sequence_id") Long ir_sequence_id, @RequestBody Ir_sequenceDTO ir_sequencedto) {
Ir_sequence domain = ir_sequenceMapping.toDomain(ir_sequencedto);
domain.setId(ir_sequence_id);
domain = ir_sequenceService.get_next(domain);
ir_sequencedto = ir_sequenceMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ir_sequencedto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-Get_next_by_code-all')")
@ApiOperation(value = "get_next_by_code", tags = {"序列" }, notes = "get_next_by_code")
@RequestMapping(method = RequestMethod.GET, value = "/ir_sequences/{ir_sequence_id}/get_next_by_code")
public ResponseEntity<Ir_sequenceDTO> get_next_by_code(@PathVariable("ir_sequence_id") Long ir_sequence_id, @RequestBody Ir_sequenceDTO ir_sequencedto) {
Ir_sequence domain = ir_sequenceMapping.toDomain(ir_sequencedto);
domain.setId(ir_sequence_id);
domain = ir_sequenceService.get_next_by_code(domain);
ir_sequencedto = ir_sequenceMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ir_sequencedto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-Predict_nextval-all')")
@ApiOperation(value = "预言nextval", tags = {"序列" }, notes = "预言nextval")
@RequestMapping(method = RequestMethod.POST, value = "/ir_sequences/{ir_sequence_id}/predict_nextval")
public ResponseEntity<Ir_sequenceDTO> predict_nextval(@PathVariable("ir_sequence_id") Long ir_sequence_id, @RequestBody Ir_sequenceDTO ir_sequencedto) {
Ir_sequence domain = ir_sequenceMapping.toDomain(ir_sequencedto);
domain.setId(ir_sequence_id);
domain = ir_sequenceService.predict_nextval(domain);
ir_sequencedto = ir_sequenceMapping.toDto(domain); ir_sequencedto = ir_sequenceMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ir_sequencedto); return ResponseEntity.status(HttpStatus.OK).body(ir_sequencedto);
} }
...@@ -146,6 +201,28 @@ public class Ir_sequenceResource { ...@@ -146,6 +201,28 @@ public class Ir_sequenceResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-Select_nextval-all')")
@ApiOperation(value = "获取nextval", tags = {"序列" }, notes = "获取nextval")
@RequestMapping(method = RequestMethod.POST, value = "/ir_sequences/{ir_sequence_id}/select_nextval")
public ResponseEntity<Ir_sequenceDTO> select_nextval(@PathVariable("ir_sequence_id") Long ir_sequence_id, @RequestBody Ir_sequenceDTO ir_sequencedto) {
Ir_sequence domain = ir_sequenceMapping.toDomain(ir_sequencedto);
domain.setId(ir_sequence_id);
domain = ir_sequenceService.select_nextval(domain);
ir_sequencedto = ir_sequenceMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ir_sequencedto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-Update_nogap-all')")
@ApiOperation(value = "update_nogap", tags = {"序列" }, notes = "update_nogap")
@RequestMapping(method = RequestMethod.PUT, value = "/ir_sequences/{ir_sequence_id}/update_nogap")
public ResponseEntity<Ir_sequenceDTO> update_nogap(@PathVariable("ir_sequence_id") Long ir_sequence_id, @RequestBody Ir_sequenceDTO ir_sequencedto) {
Ir_sequence domain = ir_sequenceMapping.toDomain(ir_sequencedto);
domain.setId(ir_sequence_id);
domain = ir_sequenceService.update_nogap(domain);
ir_sequencedto = ir_sequenceMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ir_sequencedto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-searchDefault-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence-searchDefault-all')")
@ApiOperation(value = "获取数据集", tags = {"序列" } ,notes = "获取数据集") @ApiOperation(value = "获取数据集", tags = {"序列" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/ir_sequences/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ir_sequences/fetchdefault")
......
...@@ -120,6 +120,17 @@ public class Ir_sequence_date_rangeResource { ...@@ -120,6 +120,17 @@ public class Ir_sequence_date_rangeResource {
return ResponseEntity.status(HttpStatus.OK).body(ir_sequence_date_rangeService.checkKey(ir_sequence_date_rangeMapping.toDomain(ir_sequence_date_rangedto))); return ResponseEntity.status(HttpStatus.OK).body(ir_sequence_date_rangeService.checkKey(ir_sequence_date_rangeMapping.toDomain(ir_sequence_date_rangedto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence_date_range-Create_sequence-all')")
@ApiOperation(value = "创建序列", tags = {"序列日期范围" }, notes = "创建序列")
@RequestMapping(method = RequestMethod.POST, value = "/ir_sequence_date_ranges/{ir_sequence_date_range_id}/create_sequence")
public ResponseEntity<Ir_sequence_date_rangeDTO> create_sequence(@PathVariable("ir_sequence_date_range_id") Long ir_sequence_date_range_id, @RequestBody Ir_sequence_date_rangeDTO ir_sequence_date_rangedto) {
Ir_sequence_date_range domain = ir_sequence_date_rangeMapping.toDomain(ir_sequence_date_rangedto);
domain.setId(ir_sequence_date_range_id);
domain = ir_sequence_date_rangeService.create_sequence(domain);
ir_sequence_date_rangedto = ir_sequence_date_rangeMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ir_sequence_date_rangedto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence_date_range-Save-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence_date_range-Save-all')")
@ApiOperation(value = "保存序列日期范围", tags = {"序列日期范围" }, notes = "保存序列日期范围") @ApiOperation(value = "保存序列日期范围", tags = {"序列日期范围" }, notes = "保存序列日期范围")
@RequestMapping(method = RequestMethod.POST, value = "/ir_sequence_date_ranges/save") @RequestMapping(method = RequestMethod.POST, value = "/ir_sequence_date_ranges/save")
...@@ -243,6 +254,17 @@ public class Ir_sequence_date_rangeResource { ...@@ -243,6 +254,17 @@ public class Ir_sequence_date_rangeResource {
return ResponseEntity.status(HttpStatus.OK).body(ir_sequence_date_rangeService.checkKey(ir_sequence_date_rangeMapping.toDomain(ir_sequence_date_rangedto))); return ResponseEntity.status(HttpStatus.OK).body(ir_sequence_date_rangeService.checkKey(ir_sequence_date_rangeMapping.toDomain(ir_sequence_date_rangedto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence_date_range-Create_sequence-all')")
@ApiOperation(value = "根据序列序列日期范围", tags = {"序列日期范围" }, notes = "根据序列序列日期范围")
@RequestMapping(method = RequestMethod.POST, value = "/ir_sequences/{ir_sequence_id}/ir_sequence_date_ranges/{ir_sequence_date_range_id}/create_sequence")
public ResponseEntity<Ir_sequence_date_rangeDTO> create_sequenceByIr_sequence(@PathVariable("ir_sequence_id") Long ir_sequence_id, @PathVariable("ir_sequence_date_range_id") Long ir_sequence_date_range_id, @RequestBody Ir_sequence_date_rangeDTO ir_sequence_date_rangedto) {
Ir_sequence_date_range domain = ir_sequence_date_rangeMapping.toDomain(ir_sequence_date_rangedto);
domain.setSequenceId(ir_sequence_id);
domain = ir_sequence_date_rangeService.create_sequence(domain) ;
ir_sequence_date_rangedto = ir_sequence_date_rangeMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ir_sequence_date_rangedto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence_date_range-Save-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Ir_sequence_date_range-Save-all')")
@ApiOperation(value = "根据序列保存序列日期范围", tags = {"序列日期范围" }, notes = "根据序列保存序列日期范围") @ApiOperation(value = "根据序列保存序列日期范围", tags = {"序列日期范围" }, notes = "根据序列保存序列日期范围")
@RequestMapping(method = RequestMethod.POST, value = "/ir_sequences/{ir_sequence_id}/ir_sequence_date_ranges/save") @RequestMapping(method = RequestMethod.POST, value = "/ir_sequences/{ir_sequence_id}/ir_sequence_date_ranges/save")
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册