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

xignzi006 发布系统代码,后台体系[Spring Boot]

上级 fc0ca110
...@@ -31,7 +31,7 @@ import cn.ibizlab.businesscentral.util.domain.EntityMP; ...@@ -31,7 +31,7 @@ import cn.ibizlab.businesscentral.util.domain.EntityMP;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
/** /**
* 实体[Contract] * 实体[合同]
*/ */
@Getter @Getter
@Setter @Setter
...@@ -139,14 +139,6 @@ public class Hr_contract extends EntityMP implements Serializable { ...@@ -139,14 +139,6 @@ public class Hr_contract extends EntityMP implements Serializable {
@JSONField(name = "wage") @JSONField(name = "wage")
@JsonProperty("wage") @JsonProperty("wage")
private BigDecimal wage; private BigDecimal wage;
/**
* 社交管理中心
*/
@DEField(name = "reported_to_secretariat")
@TableField(value = "reported_to_secretariat")
@JSONField(name = "reported_to_secretariat")
@JsonProperty("reported_to_secretariat")
private Boolean reportedToSecretariat;
/** /**
* 开始日期 * 开始日期
*/ */
...@@ -365,13 +357,6 @@ public class Hr_contract extends EntityMP implements Serializable { ...@@ -365,13 +357,6 @@ public class Hr_contract extends EntityMP implements Serializable {
@JSONField(name = "employee_id_text") @JSONField(name = "employee_id_text")
@JsonProperty("employee_id_text") @JsonProperty("employee_id_text")
private String employeeIdText; private String employeeIdText;
/**
* 员工类别
*/
@TableField(exist = false)
@JSONField(name = "type_id_text")
@JsonProperty("type_id_text")
private String typeIdText;
/** /**
* 签证到期日期 * 签证到期日期
*/ */
...@@ -443,22 +428,6 @@ public class Hr_contract extends EntityMP implements Serializable { ...@@ -443,22 +428,6 @@ public class Hr_contract extends EntityMP implements Serializable {
@JSONField(name = "department_id") @JSONField(name = "department_id")
@JsonProperty("department_id") @JsonProperty("department_id")
private Long departmentId; private Long departmentId;
/**
* 员工类别
*/
@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_hr.domain.Hr_contract_type odooType;
/** /**
* *
...@@ -568,14 +537,6 @@ public class Hr_contract extends EntityMP implements Serializable { ...@@ -568,14 +537,6 @@ public class Hr_contract extends EntityMP implements Serializable {
this.modify("wage",wage); this.modify("wage",wage);
} }
/**
* 设置 [社交管理中心]
*/
public void setReportedToSecretariat(Boolean reportedToSecretariat){
this.reportedToSecretariat = reportedToSecretariat ;
this.modify("reported_to_secretariat",reportedToSecretariat);
}
/** /**
* 设置 [开始日期] * 设置 [开始日期]
*/ */
...@@ -676,14 +637,6 @@ public class Hr_contract extends EntityMP implements Serializable { ...@@ -676,14 +637,6 @@ public class Hr_contract extends EntityMP implements Serializable {
this.modify("department_id",departmentId); this.modify("department_id",departmentId);
} }
/**
* 设置 [员工类别]
*/
public void setTypeId(Long typeId){
this.typeId = typeId ;
this.modify("type_id",typeId);
}
@Override @Override
public Serializable getDefaultKey(boolean gen) { public Serializable getDefaultKey(boolean gen) {
......
...@@ -145,20 +145,6 @@ public class Hr_contractSearchContext extends QueryWrapperContext<Hr_contract> { ...@@ -145,20 +145,6 @@ public class Hr_contractSearchContext extends QueryWrapperContext<Hr_contract> {
if(!ObjectUtils.isEmpty(this.n_employee_id_text_like)){ if(!ObjectUtils.isEmpty(this.n_employee_id_text_like)){
this.getSearchCond().like("employee_id_text", n_employee_id_text_like); this.getSearchCond().like("employee_id_text", n_employee_id_text_like);
} }
}
private String n_type_id_text_eq;//[员工类别]
public void setN_type_id_text_eq(String n_type_id_text_eq) {
this.n_type_id_text_eq = n_type_id_text_eq;
if(!ObjectUtils.isEmpty(this.n_type_id_text_eq)){
this.getSearchCond().eq("type_id_text", n_type_id_text_eq);
}
}
private String n_type_id_text_like;//[员工类别]
public void setN_type_id_text_like(String n_type_id_text_like) {
this.n_type_id_text_like = n_type_id_text_like;
if(!ObjectUtils.isEmpty(this.n_type_id_text_like)){
this.getSearchCond().like("type_id_text", n_type_id_text_like);
}
} }
private Long n_resource_calendar_id_eq;//[工作安排] private Long n_resource_calendar_id_eq;//[工作安排]
public void setN_resource_calendar_id_eq(Long n_resource_calendar_id_eq) { public void setN_resource_calendar_id_eq(Long n_resource_calendar_id_eq) {
...@@ -209,13 +195,6 @@ public class Hr_contractSearchContext extends QueryWrapperContext<Hr_contract> { ...@@ -209,13 +195,6 @@ public class Hr_contractSearchContext extends QueryWrapperContext<Hr_contract> {
this.getSearchCond().eq("department_id", n_department_id_eq); this.getSearchCond().eq("department_id", n_department_id_eq);
} }
} }
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,8 +62,6 @@ public interface Hr_contractMapper extends BaseMapper<Hr_contract>{ ...@@ -62,8 +62,6 @@ public interface Hr_contractMapper extends BaseMapper<Hr_contract>{
@Delete("${sql}") @Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param); boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Hr_contract> selectByTypeId(@Param("id") Serializable id) ;
List<Hr_contract> selectByDepartmentId(@Param("id") Serializable id) ; List<Hr_contract> selectByDepartmentId(@Param("id") Serializable id) ;
List<Hr_contract> selectByEmployeeId(@Param("id") Serializable id) ; List<Hr_contract> selectByEmployeeId(@Param("id") Serializable id) ;
......
...@@ -37,10 +37,6 @@ public interface IHr_contractService extends IService<Hr_contract>{ ...@@ -37,10 +37,6 @@ public interface IHr_contractService extends IService<Hr_contract>{
boolean save(Hr_contract et) ; boolean save(Hr_contract et) ;
void saveBatch(List<Hr_contract> list) ; void saveBatch(List<Hr_contract> list) ;
Page<Hr_contract> searchDefault(Hr_contractSearchContext context) ; Page<Hr_contract> searchDefault(Hr_contractSearchContext context) ;
List<Hr_contract> selectByTypeId(Long id);
void resetByTypeId(Long id);
void resetByTypeId(Collection<Long> ids);
void removeByTypeId(Long id);
List<Hr_contract> selectByDepartmentId(Long id); List<Hr_contract> selectByDepartmentId(Long id);
void resetByDepartmentId(Long id); void resetByDepartmentId(Long id);
void resetByDepartmentId(Collection<Long> ids); void resetByDepartmentId(Collection<Long> ids);
......
...@@ -44,15 +44,12 @@ import com.alibaba.fastjson.JSONObject; ...@@ -44,15 +44,12 @@ import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
/** /**
* 实体[Contract] 服务对象接口实现 * 实体[合同] 服务对象接口实现
*/ */
@Slf4j @Slf4j
@Service("Hr_contractServiceImpl") @Service("Hr_contractServiceImpl")
public class Hr_contractServiceImpl extends EBSServiceImpl<Hr_contractMapper, Hr_contract> implements IHr_contractService { public class Hr_contractServiceImpl extends EBSServiceImpl<Hr_contractMapper, Hr_contract> implements IHr_contractService {
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_hr.service.IHr_contract_typeService hrContractTypeService;
@Autowired @Autowired
@Lazy @Lazy
protected cn.ibizlab.businesscentral.core.odoo_hr.service.IHr_departmentService hrDepartmentService; protected cn.ibizlab.businesscentral.core.odoo_hr.service.IHr_departmentService hrDepartmentService;
...@@ -209,25 +206,6 @@ public class Hr_contractServiceImpl extends EBSServiceImpl<Hr_contractMapper, Hr ...@@ -209,25 +206,6 @@ public class Hr_contractServiceImpl extends EBSServiceImpl<Hr_contractMapper, Hr
} }
@Override
public List<Hr_contract> selectByTypeId(Long id) {
return baseMapper.selectByTypeId(id);
}
@Override
public void resetByTypeId(Long id) {
this.update(new UpdateWrapper<Hr_contract>().set("type_id",null).eq("type_id",id));
}
@Override
public void resetByTypeId(Collection<Long> ids) {
this.update(new UpdateWrapper<Hr_contract>().set("type_id",null).in("type_id",ids));
}
@Override
public void removeByTypeId(Long id) {
this.remove(new QueryWrapper<Hr_contract>().eq("type_id",id));
}
@Override @Override
public List<Hr_contract> selectByDepartmentId(Long id) { public List<Hr_contract> selectByDepartmentId(Long id) {
return baseMapper.selectByDepartmentId(id); return baseMapper.selectByDepartmentId(id);
...@@ -358,16 +336,6 @@ public class Hr_contractServiceImpl extends EBSServiceImpl<Hr_contractMapper, Hr ...@@ -358,16 +336,6 @@ public class Hr_contractServiceImpl extends EBSServiceImpl<Hr_contractMapper, Hr
* @param et * @param et
*/ */
private void fillParentData(Hr_contract et){ private void fillParentData(Hr_contract et){
//实体关系[DER1N_HR_CONTRACT__HR_CONTRACT_TYPE__TYPE_ID]
if(!ObjectUtils.isEmpty(et.getTypeId())){
cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_contract_type odooType=et.getOdooType();
if(ObjectUtils.isEmpty(odooType)){
cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_contract_type majorEntity=hrContractTypeService.get(et.getTypeId());
et.setOdooType(majorEntity);
odooType=majorEntity;
}
et.setTypeIdText(odooType.getName());
}
//实体关系[DER1N_HR_CONTRACT__HR_DEPARTMENT__DEPARTMENT_ID] //实体关系[DER1N_HR_CONTRACT__HR_DEPARTMENT__DEPARTMENT_ID]
if(!ObjectUtils.isEmpty(et.getDepartmentId())){ if(!ObjectUtils.isEmpty(et.getDepartmentId())){
cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_department odooDepartment=et.getOdooDepartment(); cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_department odooDepartment=et.getOdooDepartment();
......
...@@ -50,9 +50,6 @@ import org.springframework.util.StringUtils; ...@@ -50,9 +50,6 @@ import org.springframework.util.StringUtils;
@Service("Hr_contract_typeServiceImpl") @Service("Hr_contract_typeServiceImpl")
public class Hr_contract_typeServiceImpl extends EBSServiceImpl<Hr_contract_typeMapper, Hr_contract_type> implements IHr_contract_typeService { public class Hr_contract_typeServiceImpl extends EBSServiceImpl<Hr_contract_typeMapper, Hr_contract_type> implements IHr_contract_typeService {
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_hr.service.IHr_contractService hrContractService;
@Autowired @Autowired
@Lazy @Lazy
protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_usersService resUsersService; protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_usersService resUsersService;
...@@ -127,7 +124,6 @@ public class Hr_contract_typeServiceImpl extends EBSServiceImpl<Hr_contract_type ...@@ -127,7 +124,6 @@ public class Hr_contract_typeServiceImpl extends EBSServiceImpl<Hr_contract_type
@Override @Override
@Transactional @Transactional
public boolean remove(Long key) { public boolean remove(Long key) {
hrContractService.resetByTypeId(key);
boolean result=removeById(key); boolean result=removeById(key);
return result ; return result ;
} }
...@@ -135,7 +131,6 @@ public class Hr_contract_typeServiceImpl extends EBSServiceImpl<Hr_contract_type ...@@ -135,7 +131,6 @@ public class Hr_contract_typeServiceImpl extends EBSServiceImpl<Hr_contract_type
@Override @Override
@Transactional @Transactional
public void removeBatch(Collection<Long> idList) { public void removeBatch(Collection<Long> idList) {
hrContractService.resetByTypeId(idList);
removeByIds(idList); removeByIds(idList);
} }
......
...@@ -61865,7 +61865,7 @@ ...@@ -61865,7 +61865,7 @@
, ,
{ {
"entity_name":"HR_CONTRACT", "entity_name":"HR_CONTRACT",
"logic_name":"Contract", "logic_name":"合同",
"code_name":"Hr_contract", "code_name":"Hr_contract",
"table_name":"HR_CONTRACT", "table_name":"HR_CONTRACT",
"system_id":"iBizBusinessCentral", "system_id":"iBizBusinessCentral",
...@@ -62048,19 +62048,6 @@ ...@@ -62048,19 +62048,6 @@
"major_field":0 "major_field":0
}, },
{ {
"fieldname":"REPORTED_TO_SECRETARIAT" ,
"codename":"Reported_to_secretariat",
"field_logic_name":"社交管理中心",
"entity_name":"Hr_contract",
"field_type":"TRUEFALSE",
"nullable":1,
"physical_field":1,
"data_type":"BIT",
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"DATE_START" , "fieldname":"DATE_START" ,
"codename":"Date_start", "codename":"Date_start",
"field_logic_name":"开始日期", "field_logic_name":"开始日期",
...@@ -62505,24 +62492,6 @@ ...@@ -62505,24 +62492,6 @@
"major_field":0 "major_field":0
}, },
{ {
"fieldname":"TYPE_ID_TEXT" ,
"codename":"Type_id_text",
"field_logic_name":"员工类别",
"entity_name":"Hr_contract",
"ref_de":"HR_CONTRACT_TYPE",
"ref_field_name":"NAME",
"relation_name":"DER1N_HR_CONTRACT__HR_CONTRACT_TYPE__TYPE_ID",
"relation_codename":"Odoo_type",
"field_type":"PICKUPTEXT",
"nullable":1,
"physical_field":0,
"data_type":"VARCHAR",
"data_length":200,
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"VISA_EXPIRE" , "fieldname":"VISA_EXPIRE" ,
"codename":"Visa_expire", "codename":"Visa_expire",
"field_logic_name":"签证到期日期", "field_logic_name":"签证到期日期",
...@@ -62677,34 +62646,11 @@ ...@@ -62677,34 +62646,11 @@
"key_field":0, "key_field":0,
"show_order":1000, "show_order":1000,
"major_field":0 "major_field":0
},
{
"fieldname":"TYPE_ID" ,
"codename":"Type_id",
"field_logic_name":"员工类别",
"entity_name":"Hr_contract",
"ref_de":"HR_CONTRACT_TYPE",
"ref_field_name":"ID",
"relation_name":"DER1N_HR_CONTRACT__HR_CONTRACT_TYPE__TYPE_ID",
"relation_codename":"Odoo_type",
"field_type":"PICKUP",
"nullable":0,
"physical_field":1,
"data_type":"BIGINT",
"key_field":0,
"show_order":1000,
"major_field":0
} }
], ],
"subEntitys":[ "subEntitys":[
], ],
"parentEntitys":[ "parentEntitys":[
{"name":"DER1N_HR_CONTRACT__HR_CONTRACT_TYPE__TYPE_ID",
"relation_type":"DER1N",
"code_name":"Odoo_type",
"entity_name":"HR_CONTRACT",
"ref_entity_name":"HR_CONTRACT_TYPE"
},
{"name":"DER1N_HR_CONTRACT__HR_DEPARTMENT__DEPARTMENT_ID", {"name":"DER1N_HR_CONTRACT__HR_DEPARTMENT__DEPARTMENT_ID",
"relation_type":"DER1N", "relation_type":"DER1N",
"code_name":"Odoo_department", "code_name":"Odoo_department",
...@@ -62927,12 +62873,6 @@ ...@@ -62927,12 +62873,6 @@
} }
], ],
"subEntitys":[ "subEntitys":[
{"name":"DER1N_HR_CONTRACT__HR_CONTRACT_TYPE__TYPE_ID",
"relation_type":"DER1N",
"code_name":"Odoo_type",
"entity_name":"HR_CONTRACT",
"ref_entity_name":"HR_CONTRACT_TYPE"
}
], ],
"parentEntitys":[ "parentEntitys":[
{"name":"DER1N_HR_CONTRACT_TYPE__RES_USERS__CREATE_UID", {"name":"DER1N_HR_CONTRACT_TYPE__RES_USERS__CREATE_UID",
...@@ -145,14 +145,6 @@ public class Hr_contractDTO extends DTOBase implements Serializable { ...@@ -145,14 +145,6 @@ public class Hr_contractDTO extends DTOBase implements Serializable {
@NotNull(message = "[工资]不允许为空!") @NotNull(message = "[工资]不允许为空!")
private BigDecimal wage; private BigDecimal wage;
/**
* 属性 [REPORTED_TO_SECRETARIAT]
*
*/
@JSONField(name = "reported_to_secretariat")
@JsonProperty("reported_to_secretariat")
private Boolean reportedToSecretariat;
/** /**
* 属性 [DATE_START] * 属性 [DATE_START]
* *
...@@ -414,15 +406,6 @@ public class Hr_contractDTO extends DTOBase implements Serializable { ...@@ -414,15 +406,6 @@ public class Hr_contractDTO extends DTOBase implements Serializable {
@Size(min = 0, max = 200, message = "内容长度必须小于等于[200]") @Size(min = 0, max = 200, message = "内容长度必须小于等于[200]")
private String employeeIdText; private String employeeIdText;
/**
* 属性 [TYPE_ID_TEXT]
*
*/
@JSONField(name = "type_id_text")
@JsonProperty("type_id_text")
@Size(min = 0, max = 200, message = "内容长度必须小于等于[200]")
private String typeIdText;
/** /**
* 属性 [VISA_EXPIRE] * 属性 [VISA_EXPIRE]
* *
...@@ -504,16 +487,6 @@ public class Hr_contractDTO extends DTOBase implements Serializable { ...@@ -504,16 +487,6 @@ public class Hr_contractDTO extends DTOBase implements Serializable {
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long departmentId; private Long departmentId;
/**
* 属性 [TYPE_ID]
*
*/
@JSONField(name = "type_id")
@JsonProperty("type_id")
@JsonSerialize(using = ToStringSerializer.class)
@NotNull(message = "[员工类别]不允许为空!")
private Long typeId;
/** /**
* 设置 [DATE_END] * 设置 [DATE_END]
...@@ -555,14 +528,6 @@ public class Hr_contractDTO extends DTOBase implements Serializable { ...@@ -555,14 +528,6 @@ public class Hr_contractDTO extends DTOBase implements Serializable {
this.modify("wage",wage); this.modify("wage",wage);
} }
/**
* 设置 [REPORTED_TO_SECRETARIAT]
*/
public void setReportedToSecretariat(Boolean reportedToSecretariat){
this.reportedToSecretariat = reportedToSecretariat ;
this.modify("reported_to_secretariat",reportedToSecretariat);
}
/** /**
* 设置 [DATE_START] * 设置 [DATE_START]
*/ */
...@@ -643,14 +608,6 @@ public class Hr_contractDTO extends DTOBase implements Serializable { ...@@ -643,14 +608,6 @@ public class Hr_contractDTO extends DTOBase implements Serializable {
this.modify("department_id",departmentId); this.modify("department_id",departmentId);
} }
/**
* 设置 [TYPE_ID]
*/
public void setTypeId(Long typeId){
this.typeId = typeId ;
this.modify("type_id",typeId);
}
} }
......
...@@ -35,7 +35,7 @@ import cn.ibizlab.businesscentral.core.odoo_hr.filter.Hr_contractSearchContext; ...@@ -35,7 +35,7 @@ import cn.ibizlab.businesscentral.core.odoo_hr.filter.Hr_contractSearchContext;
import cn.ibizlab.businesscentral.util.annotation.VersionCheck; import cn.ibizlab.businesscentral.util.annotation.VersionCheck;
@Slf4j @Slf4j
@Api(tags = {"Contract" }) @Api(tags = {"合同" })
@RestController("Core-hr_contract") @RestController("Core-hr_contract")
@RequestMapping("") @RequestMapping("")
public class Hr_contractResource { public class Hr_contractResource {
...@@ -48,7 +48,7 @@ public class Hr_contractResource { ...@@ -48,7 +48,7 @@ public class Hr_contractResource {
public Hr_contractMapping hr_contractMapping; public Hr_contractMapping hr_contractMapping;
@PreAuthorize("hasPermission(this.hr_contractMapping.toDomain(#hr_contractdto),'iBizBusinessCentral-Hr_contract-Create')") @PreAuthorize("hasPermission(this.hr_contractMapping.toDomain(#hr_contractdto),'iBizBusinessCentral-Hr_contract-Create')")
@ApiOperation(value = "新建Contract", tags = {"Contract" }, notes = "新建Contract") @ApiOperation(value = "新建合同", tags = {"合同" }, notes = "新建合同")
@RequestMapping(method = RequestMethod.POST, value = "/hr_contracts") @RequestMapping(method = RequestMethod.POST, value = "/hr_contracts")
public ResponseEntity<Hr_contractDTO> create(@Validated @RequestBody Hr_contractDTO hr_contractdto) { public ResponseEntity<Hr_contractDTO> create(@Validated @RequestBody Hr_contractDTO hr_contractdto) {
Hr_contract domain = hr_contractMapping.toDomain(hr_contractdto); Hr_contract domain = hr_contractMapping.toDomain(hr_contractdto);
...@@ -58,7 +58,7 @@ public class Hr_contractResource { ...@@ -58,7 +58,7 @@ public class Hr_contractResource {
} }
@PreAuthorize("hasPermission(this.hr_contractMapping.toDomain(#hr_contractdtos),'iBizBusinessCentral-Hr_contract-Create')") @PreAuthorize("hasPermission(this.hr_contractMapping.toDomain(#hr_contractdtos),'iBizBusinessCentral-Hr_contract-Create')")
@ApiOperation(value = "批量新建Contract", tags = {"Contract" }, notes = "批量新建Contract") @ApiOperation(value = "批量新建合同", tags = {"合同" }, notes = "批量新建合同")
@RequestMapping(method = RequestMethod.POST, value = "/hr_contracts/batch") @RequestMapping(method = RequestMethod.POST, value = "/hr_contracts/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<Hr_contractDTO> hr_contractdtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<Hr_contractDTO> hr_contractdtos) {
hr_contractService.createBatch(hr_contractMapping.toDomain(hr_contractdtos)); hr_contractService.createBatch(hr_contractMapping.toDomain(hr_contractdtos));
...@@ -67,7 +67,7 @@ public class Hr_contractResource { ...@@ -67,7 +67,7 @@ public class Hr_contractResource {
@VersionCheck(entity = "hr_contract" , versionfield = "writeDate") @VersionCheck(entity = "hr_contract" , versionfield = "writeDate")
@PreAuthorize("hasPermission(this.hr_contractService.get(#hr_contract_id),'iBizBusinessCentral-Hr_contract-Update')") @PreAuthorize("hasPermission(this.hr_contractService.get(#hr_contract_id),'iBizBusinessCentral-Hr_contract-Update')")
@ApiOperation(value = "更新Contract", tags = {"Contract" }, notes = "更新Contract") @ApiOperation(value = "更新合同", tags = {"合同" }, notes = "更新合同")
@RequestMapping(method = RequestMethod.PUT, value = "/hr_contracts/{hr_contract_id}") @RequestMapping(method = RequestMethod.PUT, value = "/hr_contracts/{hr_contract_id}")
public ResponseEntity<Hr_contractDTO> update(@PathVariable("hr_contract_id") Long hr_contract_id, @RequestBody Hr_contractDTO hr_contractdto) { public ResponseEntity<Hr_contractDTO> update(@PathVariable("hr_contract_id") Long hr_contract_id, @RequestBody Hr_contractDTO hr_contractdto) {
Hr_contract domain = hr_contractMapping.toDomain(hr_contractdto); Hr_contract domain = hr_contractMapping.toDomain(hr_contractdto);
...@@ -78,7 +78,7 @@ public class Hr_contractResource { ...@@ -78,7 +78,7 @@ public class Hr_contractResource {
} }
@PreAuthorize("hasPermission(this.hr_contractService.getHrContractByEntities(this.hr_contractMapping.toDomain(#hr_contractdtos)),'iBizBusinessCentral-Hr_contract-Update')") @PreAuthorize("hasPermission(this.hr_contractService.getHrContractByEntities(this.hr_contractMapping.toDomain(#hr_contractdtos)),'iBizBusinessCentral-Hr_contract-Update')")
@ApiOperation(value = "批量更新Contract", tags = {"Contract" }, notes = "批量更新Contract") @ApiOperation(value = "批量更新合同", tags = {"合同" }, notes = "批量更新合同")
@RequestMapping(method = RequestMethod.PUT, value = "/hr_contracts/batch") @RequestMapping(method = RequestMethod.PUT, value = "/hr_contracts/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<Hr_contractDTO> hr_contractdtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<Hr_contractDTO> hr_contractdtos) {
hr_contractService.updateBatch(hr_contractMapping.toDomain(hr_contractdtos)); hr_contractService.updateBatch(hr_contractMapping.toDomain(hr_contractdtos));
...@@ -86,14 +86,14 @@ public class Hr_contractResource { ...@@ -86,14 +86,14 @@ public class Hr_contractResource {
} }
@PreAuthorize("hasPermission(this.hr_contractService.get(#hr_contract_id),'iBizBusinessCentral-Hr_contract-Remove')") @PreAuthorize("hasPermission(this.hr_contractService.get(#hr_contract_id),'iBizBusinessCentral-Hr_contract-Remove')")
@ApiOperation(value = "删除Contract", tags = {"Contract" }, notes = "删除Contract") @ApiOperation(value = "删除合同", tags = {"合同" }, notes = "删除合同")
@RequestMapping(method = RequestMethod.DELETE, value = "/hr_contracts/{hr_contract_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/hr_contracts/{hr_contract_id}")
public ResponseEntity<Boolean> remove(@PathVariable("hr_contract_id") Long hr_contract_id) { public ResponseEntity<Boolean> remove(@PathVariable("hr_contract_id") Long hr_contract_id) {
return ResponseEntity.status(HttpStatus.OK).body(hr_contractService.remove(hr_contract_id)); return ResponseEntity.status(HttpStatus.OK).body(hr_contractService.remove(hr_contract_id));
} }
@PreAuthorize("hasPermission(this.hr_contractService.getHrContractByIds(#ids),'iBizBusinessCentral-Hr_contract-Remove')") @PreAuthorize("hasPermission(this.hr_contractService.getHrContractByIds(#ids),'iBizBusinessCentral-Hr_contract-Remove')")
@ApiOperation(value = "批量删除Contract", tags = {"Contract" }, notes = "批量删除Contract") @ApiOperation(value = "批量删除合同", tags = {"合同" }, notes = "批量删除合同")
@RequestMapping(method = RequestMethod.DELETE, value = "/hr_contracts/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/hr_contracts/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<Long> ids) { public ResponseEntity<Boolean> removeBatch(@RequestBody List<Long> ids) {
hr_contractService.removeBatch(ids); hr_contractService.removeBatch(ids);
...@@ -101,7 +101,7 @@ public class Hr_contractResource { ...@@ -101,7 +101,7 @@ public class Hr_contractResource {
} }
@PostAuthorize("hasPermission(this.hr_contractMapping.toDomain(returnObject.body),'iBizBusinessCentral-Hr_contract-Get')") @PostAuthorize("hasPermission(this.hr_contractMapping.toDomain(returnObject.body),'iBizBusinessCentral-Hr_contract-Get')")
@ApiOperation(value = "获取Contract", tags = {"Contract" }, notes = "获取Contract") @ApiOperation(value = "获取合同", tags = {"合同" }, notes = "获取合同")
@RequestMapping(method = RequestMethod.GET, value = "/hr_contracts/{hr_contract_id}") @RequestMapping(method = RequestMethod.GET, value = "/hr_contracts/{hr_contract_id}")
public ResponseEntity<Hr_contractDTO> get(@PathVariable("hr_contract_id") Long hr_contract_id) { public ResponseEntity<Hr_contractDTO> get(@PathVariable("hr_contract_id") Long hr_contract_id) {
Hr_contract domain = hr_contractService.get(hr_contract_id); Hr_contract domain = hr_contractService.get(hr_contract_id);
...@@ -109,27 +109,27 @@ public class Hr_contractResource { ...@@ -109,27 +109,27 @@ public class Hr_contractResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@ApiOperation(value = "获取Contract草稿", tags = {"Contract" }, notes = "获取Contract草稿") @ApiOperation(value = "获取合同草稿", tags = {"合同" }, notes = "获取合同草稿")
@RequestMapping(method = RequestMethod.GET, value = "/hr_contracts/getdraft") @RequestMapping(method = RequestMethod.GET, value = "/hr_contracts/getdraft")
public ResponseEntity<Hr_contractDTO> getDraft() { public ResponseEntity<Hr_contractDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(hr_contractMapping.toDto(hr_contractService.getDraft(new Hr_contract()))); return ResponseEntity.status(HttpStatus.OK).body(hr_contractMapping.toDto(hr_contractService.getDraft(new Hr_contract())));
} }
@ApiOperation(value = "检查Contract", tags = {"Contract" }, notes = "检查Contract") @ApiOperation(value = "检查合同", tags = {"合同" }, notes = "检查合同")
@RequestMapping(method = RequestMethod.POST, value = "/hr_contracts/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/hr_contracts/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Hr_contractDTO hr_contractdto) { public ResponseEntity<Boolean> checkKey(@RequestBody Hr_contractDTO hr_contractdto) {
return ResponseEntity.status(HttpStatus.OK).body(hr_contractService.checkKey(hr_contractMapping.toDomain(hr_contractdto))); return ResponseEntity.status(HttpStatus.OK).body(hr_contractService.checkKey(hr_contractMapping.toDomain(hr_contractdto)));
} }
@PreAuthorize("hasPermission(this.hr_contractMapping.toDomain(#hr_contractdto),'iBizBusinessCentral-Hr_contract-Save')") @PreAuthorize("hasPermission(this.hr_contractMapping.toDomain(#hr_contractdto),'iBizBusinessCentral-Hr_contract-Save')")
@ApiOperation(value = "保存Contract", tags = {"Contract" }, notes = "保存Contract") @ApiOperation(value = "保存合同", tags = {"合同" }, notes = "保存合同")
@RequestMapping(method = RequestMethod.POST, value = "/hr_contracts/save") @RequestMapping(method = RequestMethod.POST, value = "/hr_contracts/save")
public ResponseEntity<Boolean> save(@RequestBody Hr_contractDTO hr_contractdto) { public ResponseEntity<Boolean> save(@RequestBody Hr_contractDTO hr_contractdto) {
return ResponseEntity.status(HttpStatus.OK).body(hr_contractService.save(hr_contractMapping.toDomain(hr_contractdto))); return ResponseEntity.status(HttpStatus.OK).body(hr_contractService.save(hr_contractMapping.toDomain(hr_contractdto)));
} }
@PreAuthorize("hasPermission(this.hr_contractMapping.toDomain(#hr_contractdtos),'iBizBusinessCentral-Hr_contract-Save')") @PreAuthorize("hasPermission(this.hr_contractMapping.toDomain(#hr_contractdtos),'iBizBusinessCentral-Hr_contract-Save')")
@ApiOperation(value = "批量保存Contract", tags = {"Contract" }, notes = "批量保存Contract") @ApiOperation(value = "批量保存合同", tags = {"合同" }, notes = "批量保存合同")
@RequestMapping(method = RequestMethod.POST, value = "/hr_contracts/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/hr_contracts/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<Hr_contractDTO> hr_contractdtos) { public ResponseEntity<Boolean> saveBatch(@RequestBody List<Hr_contractDTO> hr_contractdtos) {
hr_contractService.saveBatch(hr_contractMapping.toDomain(hr_contractdtos)); hr_contractService.saveBatch(hr_contractMapping.toDomain(hr_contractdtos));
...@@ -137,7 +137,7 @@ public class Hr_contractResource { ...@@ -137,7 +137,7 @@ public class Hr_contractResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_contract-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Hr_contract-Get')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_contract-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Hr_contract-Get')")
@ApiOperation(value = "获取数据集", tags = {"Contract" } ,notes = "获取数据集") @ApiOperation(value = "获取数据集", tags = {"合同" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/hr_contracts/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/hr_contracts/fetchdefault")
public ResponseEntity<List<Hr_contractDTO>> fetchDefault(Hr_contractSearchContext context) { public ResponseEntity<List<Hr_contractDTO>> fetchDefault(Hr_contractSearchContext context) {
Page<Hr_contract> domains = hr_contractService.searchDefault(context) ; Page<Hr_contract> domains = hr_contractService.searchDefault(context) ;
...@@ -150,7 +150,7 @@ public class Hr_contractResource { ...@@ -150,7 +150,7 @@ public class Hr_contractResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_contract-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Hr_contract-Get')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_contract-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Hr_contract-Get')")
@ApiOperation(value = "查询数据集", tags = {"Contract" } ,notes = "查询数据集") @ApiOperation(value = "查询数据集", tags = {"合同" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/hr_contracts/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/hr_contracts/searchdefault")
public ResponseEntity<Page<Hr_contractDTO>> searchDefault(@RequestBody Hr_contractSearchContext context) { public ResponseEntity<Page<Hr_contractDTO>> searchDefault(@RequestBody Hr_contractSearchContext context) {
Page<Hr_contract> domains = hr_contractService.searchDefault(context) ; Page<Hr_contract> domains = hr_contractService.searchDefault(context) ;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册