添加薪资管理
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
package com.gear.oa.controller;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.annotation.RepeatSubmit;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.poi.ExcelUtil;
|
||||
import com.gear.oa.domain.bo.GearReimbursementBo;
|
||||
import com.gear.oa.domain.vo.GearReimbursementVo;
|
||||
import com.gear.oa.service.IGearReimbursementService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报销
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/oa/reimbursement")
|
||||
public class GearReimbursementController extends BaseController {
|
||||
|
||||
private final IGearReimbursementService iGearReimbursementService;
|
||||
|
||||
/**
|
||||
* 查询报销列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<GearReimbursementVo> list(GearReimbursementBo bo, PageQuery pageQuery) {
|
||||
return iGearReimbursementService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出报销列表
|
||||
*/
|
||||
@Log(title = "报销", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(GearReimbursementBo bo, HttpServletResponse response) {
|
||||
List<GearReimbursementVo> list = iGearReimbursementService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "报销", GearReimbursementVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取报销详细信息
|
||||
*/
|
||||
@GetMapping("/{reimbursementId}")
|
||||
public R<GearReimbursementVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long reimbursementId) {
|
||||
return R.ok(iGearReimbursementService.queryById(reimbursementId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增报销
|
||||
*/
|
||||
@Log(title = "报销", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody GearReimbursementBo bo) {
|
||||
return toAjax(iGearReimbursementService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改报销
|
||||
*/
|
||||
@Log(title = "报销", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody GearReimbursementBo bo) {
|
||||
return toAjax(iGearReimbursementService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除报销
|
||||
*/
|
||||
@Log(title = "报销", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{reimbursementIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] reimbursementIds) {
|
||||
return toAjax(iGearReimbursementService.deleteWithValidByIds(Arrays.asList(reimbursementIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.gear.oa.controller;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.annotation.RepeatSubmit;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.poi.ExcelUtil;
|
||||
import com.gear.oa.domain.bo.GearWageEntryDetailBo;
|
||||
import com.gear.oa.domain.vo.GearWageEntryDetailVo;
|
||||
import com.gear.oa.service.IGearWageEntryDetailService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 工资录入明细
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/oa/wageEntryDetail")
|
||||
public class GearWageEntryDetailController extends BaseController {
|
||||
|
||||
private final IGearWageEntryDetailService iGearWageEntryDetailService;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<GearWageEntryDetailVo> list(GearWageEntryDetailBo bo, PageQuery pageQuery) {
|
||||
return iGearWageEntryDetailService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@Log(title = "工资录入明细", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(GearWageEntryDetailBo bo, HttpServletResponse response) {
|
||||
List<GearWageEntryDetailVo> list = iGearWageEntryDetailService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "工资录入明细", GearWageEntryDetailVo.class, response);
|
||||
}
|
||||
|
||||
@GetMapping("/{detailId}")
|
||||
public R<GearWageEntryDetailVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long detailId) {
|
||||
return R.ok(iGearWageEntryDetailService.queryById(detailId));
|
||||
}
|
||||
|
||||
@Log(title = "工资录入明细", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody GearWageEntryDetailBo bo) {
|
||||
return toAjax(iGearWageEntryDetailService.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "工资录入明细", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody GearWageEntryDetailBo bo) {
|
||||
return toAjax(iGearWageEntryDetailService.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "工资录入明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{detailIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] detailIds) {
|
||||
return toAjax(iGearWageEntryDetailService.deleteWithValidByIds(Arrays.asList(detailIds), true));
|
||||
}
|
||||
|
||||
@PostMapping("/initDailyWorkers")
|
||||
public R<Integer> initDailyWorkers(@RequestBody Map<String, Object> payload) {
|
||||
String entryDate = String.valueOf(payload.get("entryDate"));
|
||||
Boolean forceReset = payload.get("forceReset") != null && Boolean.parseBoolean(String.valueOf(payload.get("forceReset")));
|
||||
return R.ok(iGearWageEntryDetailService.initDailyWorkers(entryDate, forceReset));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.gear.oa.controller;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.annotation.RepeatSubmit;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.poi.ExcelUtil;
|
||||
import com.gear.oa.domain.bo.GearWageMakeupLogBo;
|
||||
import com.gear.oa.domain.vo.GearWageMakeupLogVo;
|
||||
import com.gear.oa.service.IGearWageMakeupLogService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工资补录日志
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/oa/wageMakeupLog")
|
||||
public class GearWageMakeupLogController extends BaseController {
|
||||
|
||||
private final IGearWageMakeupLogService iGearWageMakeupLogService;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<GearWageMakeupLogVo> list(GearWageMakeupLogBo bo, PageQuery pageQuery) {
|
||||
return iGearWageMakeupLogService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@Log(title = "工资补录日志", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(GearWageMakeupLogBo bo, HttpServletResponse response) {
|
||||
List<GearWageMakeupLogVo> list = iGearWageMakeupLogService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "工资补录日志", GearWageMakeupLogVo.class, response);
|
||||
}
|
||||
|
||||
@GetMapping("/{logId}")
|
||||
public R<GearWageMakeupLogVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long logId) {
|
||||
return R.ok(iGearWageMakeupLogService.queryById(logId));
|
||||
}
|
||||
|
||||
@Log(title = "工资补录日志", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody GearWageMakeupLogBo bo) {
|
||||
return toAjax(iGearWageMakeupLogService.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "工资补录日志", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody GearWageMakeupLogBo bo) {
|
||||
return toAjax(iGearWageMakeupLogService.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "工资补录日志", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{logIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] logIds) {
|
||||
return toAjax(iGearWageMakeupLogService.deleteWithValidByIds(Arrays.asList(logIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.gear.oa.controller;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.annotation.RepeatSubmit;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.poi.ExcelUtil;
|
||||
import com.gear.oa.domain.bo.GearWageRateConfigBo;
|
||||
import com.gear.oa.domain.vo.GearWageRateConfigVo;
|
||||
import com.gear.oa.service.IGearWageRateConfigService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工资费率配置
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/oa/wageRateConfig")
|
||||
public class GearWageRateConfigController extends BaseController {
|
||||
|
||||
private final IGearWageRateConfigService iGearWageRateConfigService;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<GearWageRateConfigVo> list(GearWageRateConfigBo bo, PageQuery pageQuery) {
|
||||
return iGearWageRateConfigService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@Log(title = "工资费率配置", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(GearWageRateConfigBo bo, HttpServletResponse response) {
|
||||
List<GearWageRateConfigVo> list = iGearWageRateConfigService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "工资费率配置", GearWageRateConfigVo.class, response);
|
||||
}
|
||||
|
||||
@GetMapping("/{rateId}")
|
||||
public R<GearWageRateConfigVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long rateId) {
|
||||
return R.ok(iGearWageRateConfigService.queryById(rateId));
|
||||
}
|
||||
|
||||
@Log(title = "工资费率配置", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody GearWageRateConfigBo bo) {
|
||||
return toAjax(iGearWageRateConfigService.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "工资费率配置", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody GearWageRateConfigBo bo) {
|
||||
return toAjax(iGearWageRateConfigService.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "工资费率配置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{rateIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] rateIds) {
|
||||
return toAjax(iGearWageRateConfigService.deleteWithValidByIds(Arrays.asList(rateIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.gear.oa.controller;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.annotation.RepeatSubmit;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.poi.ExcelUtil;
|
||||
import com.gear.oa.domain.bo.GearWorkerBo;
|
||||
import com.gear.oa.domain.bo.GearWorkerImportBo;
|
||||
import com.gear.oa.domain.vo.GearWorkerVo;
|
||||
import com.gear.oa.service.IGearWorkerService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.InputStream;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工人管理
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/oa/worker")
|
||||
public class GearWorkerController extends BaseController {
|
||||
|
||||
private final IGearWorkerService iGearWorkerService;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<GearWorkerVo> list(GearWorkerBo bo, PageQuery pageQuery) {
|
||||
return iGearWorkerService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@Log(title = "工人管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(GearWorkerBo bo, HttpServletResponse response) {
|
||||
List<GearWorkerVo> list = iGearWorkerService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "工人管理", GearWorkerVo.class, response);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/importTemplate", method = {RequestMethod.GET, RequestMethod.POST})
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ExcelUtil.exportExcel(Collections.singletonList(new GearWorkerImportBo()), "工人导入模板", GearWorkerImportBo.class, response);
|
||||
}
|
||||
|
||||
@Log(title = "工人管理", businessType = BusinessType.IMPORT)
|
||||
@PostMapping("/importData")
|
||||
public R<String> importData(@RequestPart("file") MultipartFile file,
|
||||
@RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport) throws Exception {
|
||||
if (file == null || file.isEmpty()) {
|
||||
return R.fail("导入文件不能为空");
|
||||
}
|
||||
try (InputStream is = file.getInputStream()) {
|
||||
List<GearWorkerImportBo> list = ExcelUtil.importExcel(is, GearWorkerImportBo.class);
|
||||
String msg = iGearWorkerService.importByExcel(list, updateSupport);
|
||||
return R.ok(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/{workerId}")
|
||||
public R<GearWorkerVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long workerId) {
|
||||
return R.ok(iGearWorkerService.queryById(workerId));
|
||||
}
|
||||
|
||||
@Log(title = "工人管理", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody GearWorkerBo bo) {
|
||||
return toAjax(iGearWorkerService.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "工人管理", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody GearWorkerBo bo) {
|
||||
return toAjax(iGearWorkerService.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "工人管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{workerIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] workerIds) {
|
||||
return toAjax(iGearWorkerService.deleteWithValidByIds(Arrays.asList(workerIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.gear.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 报销对象 gear_reimbursement
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("gear_reimbursement")
|
||||
public class GearReimbursement extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 报销ID
|
||||
*/
|
||||
@TableId(value = "reimbursement_id")
|
||||
private Long reimbursementId;
|
||||
|
||||
/**
|
||||
* 申请人用户ID
|
||||
*/
|
||||
private Long applicantId;
|
||||
|
||||
/**
|
||||
* 申请人名称
|
||||
*/
|
||||
private String applicantName;
|
||||
|
||||
/**
|
||||
* 附件(OSS ID串,逗号分隔)
|
||||
*/
|
||||
private String attachmentUrl;
|
||||
|
||||
/**
|
||||
* 上传时间
|
||||
*/
|
||||
private Date uploadTime;
|
||||
|
||||
/**
|
||||
* 报销金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 报销状态(0未报销 1已报销)
|
||||
*/
|
||||
private String reimburseStatus;
|
||||
|
||||
/**
|
||||
* 删除标志(0存在 2删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.gear.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 工资录入明细对象 gear_wage_entry_detail
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("gear_wage_entry_detail")
|
||||
public class GearWageEntryDetail extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "detail_id")
|
||||
private Long detailId;
|
||||
|
||||
private Date entryDate;
|
||||
|
||||
private Long empId;
|
||||
|
||||
private String empName;
|
||||
|
||||
/**
|
||||
* 计费类型(1小时工 2计件工 3天工)
|
||||
*/
|
||||
private String billingType;
|
||||
|
||||
private Long rateId;
|
||||
|
||||
private String workTypeName;
|
||||
|
||||
private String itemName;
|
||||
|
||||
private String processName;
|
||||
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 工作量(小时/件数/天数)
|
||||
*/
|
||||
private BigDecimal workload;
|
||||
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
private BigDecimal baseAmount;
|
||||
|
||||
private BigDecimal extraAmount;
|
||||
|
||||
private String extraReason;
|
||||
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 是否补录(0否 1是)
|
||||
*/
|
||||
private String isMakeup;
|
||||
|
||||
private Long sourceDetailId;
|
||||
|
||||
private Long makeupResponsibleId;
|
||||
|
||||
private String makeupResponsible;
|
||||
|
||||
private String makeupReason;
|
||||
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.gear.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 工资补录日志对象 gear_wage_makeup_log
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("gear_wage_makeup_log")
|
||||
public class GearWageMakeupLog extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "log_id")
|
||||
private Long logId;
|
||||
|
||||
private Long detailId;
|
||||
|
||||
private Long sourceDetailId;
|
||||
|
||||
/**
|
||||
* 操作类型(1新增补录 2修改补录 3撤销补录)
|
||||
*/
|
||||
private String operationType;
|
||||
|
||||
private Date operationDate;
|
||||
|
||||
private Long empId;
|
||||
|
||||
private Long makeupResponsibleId;
|
||||
|
||||
private String makeupResponsible;
|
||||
|
||||
private String makeupReason;
|
||||
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.gear.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 工资费率配置对象 gear_wage_rate_config
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("gear_wage_rate_config")
|
||||
public class GearWageRateConfig extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "rate_id")
|
||||
private Long rateId;
|
||||
|
||||
private String rateCode;
|
||||
|
||||
private String rateName;
|
||||
|
||||
/**
|
||||
* 计费类型(1小时工 2计件工 3天工)
|
||||
*/
|
||||
private String billingType;
|
||||
|
||||
private String workTypeName;
|
||||
|
||||
private String itemName;
|
||||
|
||||
private String processName;
|
||||
|
||||
/**
|
||||
* 日工时制度(如8/9,仅天工)
|
||||
*/
|
||||
private BigDecimal workdayHours;
|
||||
|
||||
/**
|
||||
* 小时单价/件单价/日薪
|
||||
*/
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/**
|
||||
* 状态(0启用 1停用)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
|
||||
private String remark;
|
||||
}
|
||||
45
gear-oa/src/main/java/com/gear/oa/domain/GearWorker.java
Normal file
45
gear-oa/src/main/java/com/gear/oa/domain/GearWorker.java
Normal file
@@ -0,0 +1,45 @@
|
||||
package com.gear.oa.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 工人主数据对象 gear_worker
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("gear_worker")
|
||||
public class GearWorker extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "worker_id")
|
||||
private Long workerId;
|
||||
|
||||
private String workerNo;
|
||||
|
||||
private String workerName;
|
||||
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 默认计费类型(1小时工 2计件工 3天工)
|
||||
*/
|
||||
private String defaultBillingType;
|
||||
|
||||
private String defaultWorkTypeName;
|
||||
|
||||
/**
|
||||
* 状态(0在职 1离职)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.gear.oa.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 报销业务对象 gear_reimbursement
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class GearReimbursementBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 报销ID
|
||||
*/
|
||||
private Long reimbursementId;
|
||||
|
||||
/**
|
||||
* 申请人用户ID
|
||||
*/
|
||||
private Long applicantId;
|
||||
|
||||
/**
|
||||
* 申请人名称
|
||||
*/
|
||||
private String applicantName;
|
||||
|
||||
/**
|
||||
* 附件(OSS ID串,逗号分隔)
|
||||
*/
|
||||
private String attachmentUrl;
|
||||
|
||||
/**
|
||||
* 上传时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date uploadTime;
|
||||
|
||||
/**
|
||||
* 报销金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 报销状态(0未报销 1已报销)
|
||||
*/
|
||||
private String reimburseStatus;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.gear.oa.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 工资录入明细业务对象 gear_wage_entry_detail
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class GearWageEntryDetailBo extends BaseEntity {
|
||||
|
||||
@NotNull(message = "明细ID不能为空", groups = {EditGroup.class})
|
||||
private Long detailId;
|
||||
|
||||
@NotNull(message = "业务日期不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date entryDate;
|
||||
|
||||
@NotNull(message = "员工ID不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long empId;
|
||||
|
||||
private String empName;
|
||||
|
||||
@NotBlank(message = "计费类型不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private String billingType;
|
||||
|
||||
@NotNull(message = "费率配置不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long rateId;
|
||||
|
||||
private String workTypeName;
|
||||
|
||||
private String itemName;
|
||||
|
||||
private String processName;
|
||||
|
||||
private String orderNo;
|
||||
|
||||
@NotNull(message = "工作量不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private BigDecimal workload;
|
||||
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
private BigDecimal baseAmount;
|
||||
|
||||
private BigDecimal extraAmount;
|
||||
|
||||
private String extraReason;
|
||||
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
private String isMakeup;
|
||||
|
||||
private Long sourceDetailId;
|
||||
|
||||
private Long makeupResponsibleId;
|
||||
|
||||
private String makeupResponsible;
|
||||
|
||||
private String makeupReason;
|
||||
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.gear.oa.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 工资补录日志业务对象 gear_wage_makeup_log
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class GearWageMakeupLogBo extends BaseEntity {
|
||||
|
||||
private Long logId;
|
||||
|
||||
private Long detailId;
|
||||
|
||||
private Long sourceDetailId;
|
||||
|
||||
private String operationType;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date operationDate;
|
||||
|
||||
private Long empId;
|
||||
|
||||
private Long makeupResponsibleId;
|
||||
|
||||
private String makeupResponsible;
|
||||
|
||||
private String makeupReason;
|
||||
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.gear.oa.domain.bo;
|
||||
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 工资费率配置业务对象 gear_wage_rate_config
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class GearWageRateConfigBo extends BaseEntity {
|
||||
|
||||
@NotNull(message = "费率ID不能为空", groups = {EditGroup.class})
|
||||
private Long rateId;
|
||||
|
||||
/**
|
||||
* 费率编码(后端自动生成)
|
||||
*/
|
||||
private String rateCode;
|
||||
|
||||
@NotBlank(message = "费率名称不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private String rateName;
|
||||
|
||||
/**
|
||||
* 计费类型(1小时工 2计件工 3天工)
|
||||
*/
|
||||
@NotBlank(message = "计费类型不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private String billingType;
|
||||
|
||||
private String workTypeName;
|
||||
|
||||
private String itemName;
|
||||
|
||||
private String processName;
|
||||
|
||||
private BigDecimal workdayHours;
|
||||
|
||||
@NotNull(message = "单价不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
private String status;
|
||||
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gear.oa.domain.bo;
|
||||
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 工人主数据业务对象 gear_worker
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class GearWorkerBo extends BaseEntity {
|
||||
|
||||
@NotNull(message = "工人ID不能为空", groups = {EditGroup.class})
|
||||
private Long workerId;
|
||||
|
||||
@NotBlank(message = "工号不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private String workerNo;
|
||||
|
||||
@NotBlank(message = "姓名不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private String workerName;
|
||||
|
||||
private String phone;
|
||||
|
||||
private String defaultBillingType;
|
||||
|
||||
private String defaultWorkTypeName;
|
||||
|
||||
private String status;
|
||||
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.gear.oa.domain.bo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 工人工资模板导入对象
|
||||
*/
|
||||
@Data
|
||||
public class GearWorkerImportBo {
|
||||
|
||||
@ExcelProperty(value = "工号")
|
||||
private String workerNo;
|
||||
|
||||
@ExcelProperty(value = "姓名")
|
||||
private String workerName;
|
||||
|
||||
@ExcelProperty(value = "手机号")
|
||||
private String phone;
|
||||
|
||||
@ExcelProperty(value = "默认计费类型(1小时工/2计件工/3天工)")
|
||||
private String defaultBillingType;
|
||||
|
||||
@ExcelProperty(value = "默认工种")
|
||||
private String defaultWorkTypeName;
|
||||
|
||||
@ExcelProperty(value = "状态(0在职/1离职)")
|
||||
private String status;
|
||||
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.gear.oa.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 报销视图对象 gear_reimbursement
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class GearReimbursementVo {
|
||||
|
||||
/**
|
||||
* 报销ID
|
||||
*/
|
||||
@ExcelProperty(value = "报销ID")
|
||||
private Long reimbursementId;
|
||||
|
||||
/**
|
||||
* 申请人用户ID
|
||||
*/
|
||||
@ExcelProperty(value = "申请人ID")
|
||||
private Long applicantId;
|
||||
|
||||
/**
|
||||
* 申请人名称
|
||||
*/
|
||||
@ExcelProperty(value = "申请人")
|
||||
private String applicantName;
|
||||
|
||||
/**
|
||||
* 附件(OSS ID串,逗号分隔)
|
||||
*/
|
||||
@ExcelProperty(value = "附件")
|
||||
private String attachmentUrl;
|
||||
|
||||
/**
|
||||
* 上传时间
|
||||
*/
|
||||
@ExcelProperty(value = "上传时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date uploadTime;
|
||||
|
||||
/**
|
||||
* 报销金额
|
||||
*/
|
||||
@ExcelProperty(value = "金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 报销状态(0未报销 1已报销)
|
||||
*/
|
||||
@ExcelProperty(value = "报销状态")
|
||||
private String reimburseStatus;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.gear.oa.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 工资录入明细视图对象 gear_wage_entry_detail
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class GearWageEntryDetailVo {
|
||||
|
||||
@ExcelProperty(value = "明细ID")
|
||||
private Long detailId;
|
||||
|
||||
@ExcelProperty(value = "业务日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date entryDate;
|
||||
|
||||
@ExcelProperty(value = "员工ID")
|
||||
private Long empId;
|
||||
|
||||
@ExcelProperty(value = "员工姓名")
|
||||
private String empName;
|
||||
|
||||
@ExcelProperty(value = "计费类型")
|
||||
private String billingType;
|
||||
|
||||
@ExcelProperty(value = "费率配置ID")
|
||||
private Long rateId;
|
||||
|
||||
@ExcelProperty(value = "工种")
|
||||
private String workTypeName;
|
||||
|
||||
@ExcelProperty(value = "加工物品")
|
||||
private String itemName;
|
||||
|
||||
@ExcelProperty(value = "工序")
|
||||
private String processName;
|
||||
|
||||
@ExcelProperty(value = "订单号")
|
||||
private String orderNo;
|
||||
|
||||
@ExcelProperty(value = "工作量")
|
||||
private BigDecimal workload;
|
||||
|
||||
@ExcelProperty(value = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@ExcelProperty(value = "基础金额")
|
||||
private BigDecimal baseAmount;
|
||||
|
||||
@ExcelProperty(value = "额外金额")
|
||||
private BigDecimal extraAmount;
|
||||
|
||||
@ExcelProperty(value = "额外原因")
|
||||
private String extraReason;
|
||||
|
||||
@ExcelProperty(value = "总金额")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
@ExcelProperty(value = "是否补录")
|
||||
private String isMakeup;
|
||||
|
||||
@ExcelProperty(value = "补录责任人")
|
||||
private String makeupResponsible;
|
||||
|
||||
@ExcelProperty(value = "补录原因")
|
||||
private String makeupReason;
|
||||
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.gear.oa.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 工资补录日志视图对象 gear_wage_makeup_log
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class GearWageMakeupLogVo {
|
||||
|
||||
@ExcelProperty(value = "日志ID")
|
||||
private Long logId;
|
||||
|
||||
@ExcelProperty(value = "补录后明细ID")
|
||||
private Long detailId;
|
||||
|
||||
@ExcelProperty(value = "补录前明细ID")
|
||||
private Long sourceDetailId;
|
||||
|
||||
@ExcelProperty(value = "操作类型")
|
||||
private String operationType;
|
||||
|
||||
@ExcelProperty(value = "补录目标日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date operationDate;
|
||||
|
||||
@ExcelProperty(value = "员工ID")
|
||||
private Long empId;
|
||||
|
||||
@ExcelProperty(value = "责任人ID")
|
||||
private Long makeupResponsibleId;
|
||||
|
||||
@ExcelProperty(value = "责任人")
|
||||
private String makeupResponsible;
|
||||
|
||||
@ExcelProperty(value = "补录原因")
|
||||
private String makeupReason;
|
||||
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.gear.oa.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 工资费率配置视图对象 gear_wage_rate_config
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class GearWageRateConfigVo {
|
||||
|
||||
@ExcelProperty(value = "费率ID")
|
||||
private Long rateId;
|
||||
|
||||
@ExcelProperty(value = "费率编码")
|
||||
private String rateCode;
|
||||
|
||||
@ExcelProperty(value = "费率名称")
|
||||
private String rateName;
|
||||
|
||||
@ExcelProperty(value = "计费类型")
|
||||
private String billingType;
|
||||
|
||||
@ExcelProperty(value = "工种")
|
||||
private String workTypeName;
|
||||
|
||||
@ExcelProperty(value = "加工物品")
|
||||
private String itemName;
|
||||
|
||||
@ExcelProperty(value = "工序")
|
||||
private String processName;
|
||||
|
||||
@ExcelProperty(value = "日工时制度")
|
||||
private BigDecimal workdayHours;
|
||||
|
||||
@ExcelProperty(value = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@ExcelProperty(value = "状态")
|
||||
private String status;
|
||||
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gear.oa.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 工人主数据视图对象 gear_worker
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class GearWorkerVo {
|
||||
|
||||
@ExcelProperty(value = "工人ID")
|
||||
private Long workerId;
|
||||
|
||||
@ExcelProperty(value = "工号")
|
||||
private String workerNo;
|
||||
|
||||
@ExcelProperty(value = "姓名")
|
||||
private String workerName;
|
||||
|
||||
@ExcelProperty(value = "手机号")
|
||||
private String phone;
|
||||
|
||||
@ExcelProperty(value = "默认计费类型")
|
||||
private String defaultBillingType;
|
||||
|
||||
@ExcelProperty(value = "默认工种")
|
||||
private String defaultWorkTypeName;
|
||||
|
||||
@ExcelProperty(value = "状态")
|
||||
private String status;
|
||||
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.gear.oa.mapper;
|
||||
|
||||
import com.gear.common.core.mapper.BaseMapperPlus;
|
||||
import com.gear.oa.domain.GearReimbursement;
|
||||
import com.gear.oa.domain.vo.GearReimbursementVo;
|
||||
|
||||
/**
|
||||
* 报销Mapper接口
|
||||
*/
|
||||
public interface GearReimbursementMapper extends BaseMapperPlus<GearReimbursementMapper, GearReimbursement, GearReimbursementVo> {
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.gear.oa.mapper;
|
||||
|
||||
import com.gear.common.core.mapper.BaseMapperPlus;
|
||||
import com.gear.oa.domain.GearWageEntryDetail;
|
||||
import com.gear.oa.domain.vo.GearWageEntryDetailVo;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 工资录入明细Mapper接口
|
||||
*/
|
||||
public interface GearWageEntryDetailMapper extends BaseMapperPlus<GearWageEntryDetailMapper, GearWageEntryDetail, GearWageEntryDetailVo> {
|
||||
|
||||
@Delete("delete from gear_wage_entry_detail where entry_date = #{entryDate}")
|
||||
int deletePhysicalByEntryDate(@Param("entryDate") java.sql.Date entryDate);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.gear.oa.mapper;
|
||||
|
||||
import com.gear.common.core.mapper.BaseMapperPlus;
|
||||
import com.gear.oa.domain.GearWageMakeupLog;
|
||||
import com.gear.oa.domain.vo.GearWageMakeupLogVo;
|
||||
|
||||
/**
|
||||
* 工资补录日志Mapper接口
|
||||
*/
|
||||
public interface GearWageMakeupLogMapper extends BaseMapperPlus<GearWageMakeupLogMapper, GearWageMakeupLog, GearWageMakeupLogVo> {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.gear.oa.mapper;
|
||||
|
||||
import com.gear.common.core.mapper.BaseMapperPlus;
|
||||
import com.gear.oa.domain.GearWageRateConfig;
|
||||
import com.gear.oa.domain.vo.GearWageRateConfigVo;
|
||||
|
||||
/**
|
||||
* 工资费率配置Mapper接口
|
||||
*/
|
||||
public interface GearWageRateConfigMapper extends BaseMapperPlus<GearWageRateConfigMapper, GearWageRateConfig, GearWageRateConfigVo> {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.gear.oa.mapper;
|
||||
|
||||
import com.gear.common.core.mapper.BaseMapperPlus;
|
||||
import com.gear.oa.domain.GearWorker;
|
||||
import com.gear.oa.domain.vo.GearWorkerVo;
|
||||
|
||||
/**
|
||||
* 工人主数据Mapper接口
|
||||
*/
|
||||
public interface GearWorkerMapper extends BaseMapperPlus<GearWorkerMapper, GearWorker, GearWorkerVo> {
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.gear.oa.service;
|
||||
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.oa.domain.bo.GearReimbursementBo;
|
||||
import com.gear.oa.domain.vo.GearReimbursementVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报销Service接口
|
||||
*/
|
||||
public interface IGearReimbursementService {
|
||||
|
||||
/**
|
||||
* 查询报销
|
||||
*/
|
||||
GearReimbursementVo queryById(Long reimbursementId);
|
||||
|
||||
/**
|
||||
* 查询报销列表
|
||||
*/
|
||||
TableDataInfo<GearReimbursementVo> queryPageList(GearReimbursementBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询报销列表
|
||||
*/
|
||||
List<GearReimbursementVo> queryList(GearReimbursementBo bo);
|
||||
|
||||
/**
|
||||
* 新增报销
|
||||
*/
|
||||
Boolean insertByBo(GearReimbursementBo bo);
|
||||
|
||||
/**
|
||||
* 修改报销
|
||||
*/
|
||||
Boolean updateByBo(GearReimbursementBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除报销
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.gear.oa.service;
|
||||
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.oa.domain.bo.GearWageEntryDetailBo;
|
||||
import com.gear.oa.domain.vo.GearWageEntryDetailVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工资录入明细Service接口
|
||||
*/
|
||||
public interface IGearWageEntryDetailService {
|
||||
|
||||
GearWageEntryDetailVo queryById(Long detailId);
|
||||
|
||||
TableDataInfo<GearWageEntryDetailVo> queryPageList(GearWageEntryDetailBo bo, PageQuery pageQuery);
|
||||
|
||||
List<GearWageEntryDetailVo> queryList(GearWageEntryDetailBo bo);
|
||||
|
||||
Boolean insertByBo(GearWageEntryDetailBo bo);
|
||||
|
||||
Boolean updateByBo(GearWageEntryDetailBo bo);
|
||||
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
Integer initDailyWorkers(String entryDate, Boolean forceReset);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.gear.oa.service;
|
||||
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.oa.domain.bo.GearWageEntryDetailBo;
|
||||
import com.gear.oa.domain.bo.GearWageMakeupLogBo;
|
||||
import com.gear.oa.domain.vo.GearWageMakeupLogVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工资补录日志Service接口
|
||||
*/
|
||||
public interface IGearWageMakeupLogService {
|
||||
|
||||
GearWageMakeupLogVo queryById(Long logId);
|
||||
|
||||
TableDataInfo<GearWageMakeupLogVo> queryPageList(GearWageMakeupLogBo bo, PageQuery pageQuery);
|
||||
|
||||
List<GearWageMakeupLogVo> queryList(GearWageMakeupLogBo bo);
|
||||
|
||||
Boolean insertByBo(GearWageMakeupLogBo bo);
|
||||
|
||||
Boolean updateByBo(GearWageMakeupLogBo bo);
|
||||
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
Boolean insertMakeupLog(Long detailId, Long sourceDetailId, String operationType, GearWageEntryDetailBo detailBo);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.gear.oa.service;
|
||||
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.oa.domain.bo.GearWageRateConfigBo;
|
||||
import com.gear.oa.domain.vo.GearWageRateConfigVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工资费率配置Service接口
|
||||
*/
|
||||
public interface IGearWageRateConfigService {
|
||||
|
||||
GearWageRateConfigVo queryById(Long rateId);
|
||||
|
||||
TableDataInfo<GearWageRateConfigVo> queryPageList(GearWageRateConfigBo bo, PageQuery pageQuery);
|
||||
|
||||
List<GearWageRateConfigVo> queryList(GearWageRateConfigBo bo);
|
||||
|
||||
Boolean insertByBo(GearWageRateConfigBo bo);
|
||||
|
||||
Boolean updateByBo(GearWageRateConfigBo bo);
|
||||
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.gear.oa.service;
|
||||
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.oa.domain.bo.GearWorkerBo;
|
||||
import com.gear.oa.domain.bo.GearWorkerImportBo;
|
||||
import com.gear.oa.domain.vo.GearWorkerVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工人主数据Service接口
|
||||
*/
|
||||
public interface IGearWorkerService {
|
||||
|
||||
GearWorkerVo queryById(Long workerId);
|
||||
|
||||
TableDataInfo<GearWorkerVo> queryPageList(GearWorkerBo bo, PageQuery pageQuery);
|
||||
|
||||
List<GearWorkerVo> queryList(GearWorkerBo bo);
|
||||
|
||||
Boolean insertByBo(GearWorkerBo bo);
|
||||
|
||||
Boolean updateByBo(GearWorkerBo bo);
|
||||
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
String importByExcel(List<GearWorkerImportBo> list, Boolean updateSupport);
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.gear.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.helper.LoginHelper;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.oa.domain.GearReimbursement;
|
||||
import com.gear.oa.domain.bo.GearReimbursementBo;
|
||||
import com.gear.oa.domain.vo.GearReimbursementVo;
|
||||
import com.gear.oa.mapper.GearReimbursementMapper;
|
||||
import com.gear.oa.service.IGearReimbursementService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报销Service业务层处理
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class GearReimbursementServiceImpl implements IGearReimbursementService {
|
||||
|
||||
private final GearReimbursementMapper baseMapper;
|
||||
|
||||
@Override
|
||||
public GearReimbursementVo queryById(Long reimbursementId) {
|
||||
return baseMapper.selectVoById(reimbursementId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<GearReimbursementVo> queryPageList(GearReimbursementBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<GearReimbursement> lqw = buildQueryWrapper(bo);
|
||||
Page<GearReimbursementVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GearReimbursementVo> queryList(GearReimbursementBo bo) {
|
||||
LambdaQueryWrapper<GearReimbursement> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<GearReimbursement> buildQueryWrapper(GearReimbursementBo bo) {
|
||||
LambdaQueryWrapper<GearReimbursement> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getReimbursementId() != null, GearReimbursement::getReimbursementId, bo.getReimbursementId());
|
||||
lqw.eq(bo.getApplicantId() != null, GearReimbursement::getApplicantId, bo.getApplicantId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getApplicantName()), GearReimbursement::getApplicantName, bo.getApplicantName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getReimburseStatus()), GearReimbursement::getReimburseStatus, bo.getReimburseStatus());
|
||||
lqw.eq(bo.getAmount() != null, GearReimbursement::getAmount, bo.getAmount());
|
||||
lqw.orderByDesc(GearReimbursement::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insertByBo(GearReimbursementBo bo) {
|
||||
GearReimbursement add = BeanUtil.toBean(bo, GearReimbursement.class);
|
||||
|
||||
// 新增时自动回填当前登录人为申请人
|
||||
if (LoginHelper.getUserId() != null) {
|
||||
add.setApplicantId(LoginHelper.getUserId());
|
||||
add.setApplicantName(LoginHelper.getNickName());
|
||||
}
|
||||
// 新增时状态固定为未报销
|
||||
add.setReimburseStatus("0");
|
||||
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setReimbursementId(add.getReimbursementId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateByBo(GearReimbursementBo bo) {
|
||||
GearReimbursement update = BeanUtil.toBean(bo, GearReimbursement.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
private void validEntityBeforeSave(GearReimbursement entity) {
|
||||
// TODO 可扩展校验逻辑
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
// TODO 可扩展业务校验逻辑
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,225 @@
|
||||
package com.gear.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.helper.LoginHelper;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.oa.domain.GearWageEntryDetail;
|
||||
import com.gear.oa.domain.GearWageRateConfig;
|
||||
import com.gear.oa.domain.GearWorker;
|
||||
import com.gear.oa.domain.bo.GearWageEntryDetailBo;
|
||||
import com.gear.oa.domain.vo.GearWageEntryDetailVo;
|
||||
import com.gear.oa.mapper.GearWageEntryDetailMapper;
|
||||
import com.gear.oa.mapper.GearWageRateConfigMapper;
|
||||
import com.gear.oa.mapper.GearWorkerMapper;
|
||||
import com.gear.oa.service.IGearWageEntryDetailService;
|
||||
import com.gear.oa.service.IGearWageMakeupLogService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工资录入明细Service业务层处理
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class GearWageEntryDetailServiceImpl implements IGearWageEntryDetailService {
|
||||
|
||||
private final GearWageEntryDetailMapper baseMapper;
|
||||
private final IGearWageMakeupLogService iGearWageMakeupLogService;
|
||||
private final GearWorkerMapper gearWorkerMapper;
|
||||
private final GearWageRateConfigMapper gearWageRateConfigMapper;
|
||||
|
||||
@Override
|
||||
public GearWageEntryDetailVo queryById(Long detailId) {
|
||||
return baseMapper.selectVoById(detailId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<GearWageEntryDetailVo> queryPageList(GearWageEntryDetailBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<GearWageEntryDetail> lqw = buildQueryWrapper(bo);
|
||||
Page<GearWageEntryDetailVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GearWageEntryDetailVo> queryList(GearWageEntryDetailBo bo) {
|
||||
LambdaQueryWrapper<GearWageEntryDetail> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<GearWageEntryDetail> buildQueryWrapper(GearWageEntryDetailBo bo) {
|
||||
LambdaQueryWrapper<GearWageEntryDetail> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getDetailId() != null, GearWageEntryDetail::getDetailId, bo.getDetailId());
|
||||
lqw.eq(bo.getEntryDate() != null, GearWageEntryDetail::getEntryDate, bo.getEntryDate());
|
||||
lqw.eq(bo.getEmpId() != null, GearWageEntryDetail::getEmpId, bo.getEmpId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getEmpName()), GearWageEntryDetail::getEmpName, bo.getEmpName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getBillingType()), GearWageEntryDetail::getBillingType, bo.getBillingType());
|
||||
lqw.eq(bo.getRateId() != null, GearWageEntryDetail::getRateId, bo.getRateId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getIsMakeup()), GearWageEntryDetail::getIsMakeup, bo.getIsMakeup());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getOrderNo()), GearWageEntryDetail::getOrderNo, bo.getOrderNo());
|
||||
lqw.orderByDesc(GearWageEntryDetail::getEntryDate)
|
||||
.orderByDesc(GearWageEntryDetail::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insertByBo(GearWageEntryDetailBo bo) {
|
||||
GearWageEntryDetail add = BeanUtil.toBean(bo, GearWageEntryDetail.class);
|
||||
fillAmountFields(add);
|
||||
fillMakeupFields(add);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setDetailId(add.getDetailId());
|
||||
if ("1".equals(add.getIsMakeup())) {
|
||||
iGearWageMakeupLogService.insertMakeupLog(add.getDetailId(), add.getSourceDetailId(), "1", bo);
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateByBo(GearWageEntryDetailBo bo) {
|
||||
GearWageEntryDetail old = baseMapper.selectById(bo.getDetailId());
|
||||
GearWageEntryDetail update = BeanUtil.toBean(bo, GearWageEntryDetail.class);
|
||||
fillAmountFields(update);
|
||||
fillMakeupFields(update);
|
||||
validEntityBeforeSave(update);
|
||||
boolean flag = baseMapper.updateById(update) > 0;
|
||||
if (flag && "1".equals(update.getIsMakeup())) {
|
||||
iGearWageMakeupLogService.insertMakeupLog(update.getDetailId(), old == null ? null : old.getDetailId(), "2", bo);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
private void fillAmountFields(GearWageEntryDetail entity) {
|
||||
BigDecimal workload = entity.getWorkload() == null ? BigDecimal.ZERO : entity.getWorkload();
|
||||
BigDecimal extraAmount = entity.getExtraAmount() == null ? BigDecimal.ZERO : entity.getExtraAmount();
|
||||
|
||||
// 小时工/天工默认按1个计量单位计算基础金额(1小时或1天)
|
||||
if (("1".equals(entity.getBillingType()) || "3".equals(entity.getBillingType())) && workload.compareTo(BigDecimal.ZERO) <= 0) {
|
||||
workload = BigDecimal.ONE;
|
||||
entity.setWorkload(workload);
|
||||
}
|
||||
|
||||
// 小时工/天工优先使用费率配置中的单价;计件工允许前端录入单价
|
||||
if ("1".equals(entity.getBillingType()) || "3".equals(entity.getBillingType())) {
|
||||
if (entity.getRateId() != null && entity.getRateId() > 0) {
|
||||
GearWageRateConfig config = gearWageRateConfigMapper.selectById(entity.getRateId());
|
||||
if (config != null && config.getUnitPrice() != null) {
|
||||
entity.setUnitPrice(config.getUnitPrice());
|
||||
}
|
||||
if (StringUtils.isBlank(entity.getWorkTypeName()) && config != null) {
|
||||
entity.setWorkTypeName(config.getRateName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BigDecimal unitPrice = entity.getUnitPrice() == null ? BigDecimal.ZERO : entity.getUnitPrice();
|
||||
BigDecimal baseAmount = workload.multiply(unitPrice);
|
||||
entity.setBaseAmount(baseAmount);
|
||||
entity.setExtraAmount(extraAmount);
|
||||
entity.setTotalAmount(baseAmount.add(extraAmount));
|
||||
}
|
||||
|
||||
private void fillMakeupFields(GearWageEntryDetail entity) {
|
||||
if (!"1".equals(entity.getIsMakeup())) {
|
||||
entity.setIsMakeup("0");
|
||||
entity.setSourceDetailId(null);
|
||||
entity.setMakeupResponsibleId(null);
|
||||
entity.setMakeupResponsible(null);
|
||||
entity.setMakeupReason(null);
|
||||
return;
|
||||
}
|
||||
if (entity.getMakeupResponsibleId() == null) {
|
||||
entity.setMakeupResponsibleId(LoginHelper.getUserId());
|
||||
}
|
||||
if (StringUtils.isBlank(entity.getMakeupResponsible())) {
|
||||
entity.setMakeupResponsible(LoginHelper.getNickName());
|
||||
}
|
||||
}
|
||||
|
||||
private void validEntityBeforeSave(GearWageEntryDetail entity) {
|
||||
// 可扩展:按 rate_id 自动回填单价,或校验唯一索引冲突前置提示
|
||||
if (entity.getUnitPrice() == null) {
|
||||
entity.setUnitPrice(BigDecimal.ZERO);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer initDailyWorkers(String entryDate, Boolean forceReset) {
|
||||
java.sql.Date date = java.sql.Date.valueOf(entryDate);
|
||||
|
||||
LambdaQueryWrapper<GearWageEntryDetail> dayWrapper = Wrappers.<GearWageEntryDetail>lambdaQuery()
|
||||
.eq(GearWageEntryDetail::getEntryDate, date);
|
||||
|
||||
Long exists = baseMapper.selectCount(dayWrapper);
|
||||
if (exists != null && exists > 0) {
|
||||
if (Boolean.TRUE.equals(forceReset)) {
|
||||
baseMapper.deletePhysicalByEntryDate(date);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
List<GearWorker> workers = gearWorkerMapper.selectList(Wrappers.<GearWorker>lambdaQuery()
|
||||
.eq(GearWorker::getStatus, "0")
|
||||
.orderByAsc(GearWorker::getWorkerNo));
|
||||
|
||||
int count = 0;
|
||||
for (GearWorker worker : workers) {
|
||||
String billingType = StringUtils.isBlank(worker.getDefaultBillingType()) ? "1" : worker.getDefaultBillingType();
|
||||
|
||||
GearWageRateConfig rateConfig = gearWageRateConfigMapper.selectOne(Wrappers.<GearWageRateConfig>lambdaQuery()
|
||||
.eq(GearWageRateConfig::getBillingType, billingType)
|
||||
.eq(StringUtils.isNotBlank(worker.getDefaultWorkTypeName()), GearWageRateConfig::getRateName, worker.getDefaultWorkTypeName())
|
||||
.eq(GearWageRateConfig::getStatus, "0")
|
||||
.last("limit 1"));
|
||||
|
||||
Long rateId = rateConfig == null ? 0L : rateConfig.getRateId();
|
||||
String orderNo = "";
|
||||
|
||||
Long existsSame = baseMapper.selectCount(Wrappers.<GearWageEntryDetail>lambdaQuery()
|
||||
.eq(GearWageEntryDetail::getEntryDate, date)
|
||||
.eq(GearWageEntryDetail::getEmpId, worker.getWorkerId())
|
||||
.eq(GearWageEntryDetail::getBillingType, billingType)
|
||||
.eq(GearWageEntryDetail::getRateId, rateId)
|
||||
.eq(GearWageEntryDetail::getOrderNo, orderNo));
|
||||
if (existsSame != null && existsSame > 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
GearWageEntryDetail detail = new GearWageEntryDetail();
|
||||
detail.setEntryDate(date);
|
||||
detail.setEmpId(worker.getWorkerId());
|
||||
detail.setEmpName(worker.getWorkerName());
|
||||
detail.setBillingType(billingType);
|
||||
detail.setWorkTypeName(StringUtils.isNotBlank(worker.getDefaultWorkTypeName()) ? worker.getDefaultWorkTypeName() : (rateConfig == null ? null : rateConfig.getRateName()));
|
||||
detail.setRateId(rateId);
|
||||
detail.setWorkload(BigDecimal.ZERO);
|
||||
detail.setUnitPrice(rateConfig == null || rateConfig.getUnitPrice() == null ? BigDecimal.ZERO : rateConfig.getUnitPrice());
|
||||
detail.setBaseAmount(BigDecimal.ZERO);
|
||||
detail.setExtraAmount(BigDecimal.ZERO);
|
||||
detail.setTotalAmount(BigDecimal.ZERO);
|
||||
detail.setIsMakeup("0");
|
||||
detail.setOrderNo(orderNo);
|
||||
detail.setRemark("当日名单初始化");
|
||||
baseMapper.insert(detail);
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.gear.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.helper.LoginHelper;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.oa.domain.GearWageMakeupLog;
|
||||
import com.gear.oa.domain.bo.GearWageEntryDetailBo;
|
||||
import com.gear.oa.domain.bo.GearWageMakeupLogBo;
|
||||
import com.gear.oa.domain.vo.GearWageMakeupLogVo;
|
||||
import com.gear.oa.mapper.GearWageMakeupLogMapper;
|
||||
import com.gear.oa.service.IGearWageMakeupLogService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工资补录日志Service业务层处理
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class GearWageMakeupLogServiceImpl implements IGearWageMakeupLogService {
|
||||
|
||||
private final GearWageMakeupLogMapper baseMapper;
|
||||
|
||||
@Override
|
||||
public GearWageMakeupLogVo queryById(Long logId) {
|
||||
return baseMapper.selectVoById(logId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<GearWageMakeupLogVo> queryPageList(GearWageMakeupLogBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<GearWageMakeupLog> lqw = buildQueryWrapper(bo);
|
||||
Page<GearWageMakeupLogVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GearWageMakeupLogVo> queryList(GearWageMakeupLogBo bo) {
|
||||
LambdaQueryWrapper<GearWageMakeupLog> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<GearWageMakeupLog> buildQueryWrapper(GearWageMakeupLogBo bo) {
|
||||
LambdaQueryWrapper<GearWageMakeupLog> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getLogId() != null, GearWageMakeupLog::getLogId, bo.getLogId());
|
||||
lqw.eq(bo.getDetailId() != null, GearWageMakeupLog::getDetailId, bo.getDetailId());
|
||||
lqw.eq(bo.getEmpId() != null, GearWageMakeupLog::getEmpId, bo.getEmpId());
|
||||
lqw.eq(bo.getOperationDate() != null, GearWageMakeupLog::getOperationDate, bo.getOperationDate());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOperationType()), GearWageMakeupLog::getOperationType, bo.getOperationType());
|
||||
lqw.eq(bo.getMakeupResponsibleId() != null, GearWageMakeupLog::getMakeupResponsibleId, bo.getMakeupResponsibleId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getMakeupResponsible()), GearWageMakeupLog::getMakeupResponsible, bo.getMakeupResponsible());
|
||||
lqw.orderByDesc(GearWageMakeupLog::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insertByBo(GearWageMakeupLogBo bo) {
|
||||
GearWageMakeupLog add = BeanUtil.toBean(bo, GearWageMakeupLog.class);
|
||||
return baseMapper.insert(add) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateByBo(GearWageMakeupLogBo bo) {
|
||||
GearWageMakeupLog update = BeanUtil.toBean(bo, GearWageMakeupLog.class);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insertMakeupLog(Long detailId, Long sourceDetailId, String operationType, GearWageEntryDetailBo detailBo) {
|
||||
GearWageMakeupLog add = new GearWageMakeupLog();
|
||||
add.setDetailId(detailId);
|
||||
add.setSourceDetailId(sourceDetailId);
|
||||
add.setOperationType(operationType);
|
||||
add.setOperationDate(detailBo.getEntryDate());
|
||||
add.setEmpId(detailBo.getEmpId());
|
||||
add.setMakeupResponsibleId(detailBo.getMakeupResponsibleId() != null ? detailBo.getMakeupResponsibleId() : LoginHelper.getUserId());
|
||||
add.setMakeupResponsible(StringUtils.isNotBlank(detailBo.getMakeupResponsible()) ? detailBo.getMakeupResponsible() : LoginHelper.getNickName());
|
||||
add.setMakeupReason(detailBo.getMakeupReason());
|
||||
add.setRemark(detailBo.getRemark());
|
||||
return baseMapper.insert(add) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.gear.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.oa.domain.GearWageRateConfig;
|
||||
import com.gear.oa.domain.bo.GearWageRateConfigBo;
|
||||
import com.gear.oa.domain.vo.GearWageRateConfigVo;
|
||||
import com.gear.oa.mapper.GearWageRateConfigMapper;
|
||||
import com.gear.oa.service.IGearWageRateConfigService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工资费率配置Service业务层处理
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class GearWageRateConfigServiceImpl implements IGearWageRateConfigService {
|
||||
|
||||
private final GearWageRateConfigMapper baseMapper;
|
||||
|
||||
@Override
|
||||
public GearWageRateConfigVo queryById(Long rateId) {
|
||||
return baseMapper.selectVoById(rateId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<GearWageRateConfigVo> queryPageList(GearWageRateConfigBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<GearWageRateConfig> lqw = buildQueryWrapper(bo);
|
||||
Page<GearWageRateConfigVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GearWageRateConfigVo> queryList(GearWageRateConfigBo bo) {
|
||||
LambdaQueryWrapper<GearWageRateConfig> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<GearWageRateConfig> buildQueryWrapper(GearWageRateConfigBo bo) {
|
||||
LambdaQueryWrapper<GearWageRateConfig> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getRateId() != null, GearWageRateConfig::getRateId, bo.getRateId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getRateCode()), GearWageRateConfig::getRateCode, bo.getRateCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getRateName()), GearWageRateConfig::getRateName, bo.getRateName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getBillingType()), GearWageRateConfig::getBillingType, bo.getBillingType());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getWorkTypeName()), GearWageRateConfig::getWorkTypeName, bo.getWorkTypeName());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getItemName()), GearWageRateConfig::getItemName, bo.getItemName());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getProcessName()), GearWageRateConfig::getProcessName, bo.getProcessName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), GearWageRateConfig::getStatus, bo.getStatus());
|
||||
lqw.orderByDesc(GearWageRateConfig::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insertByBo(GearWageRateConfigBo bo) {
|
||||
GearWageRateConfig add = BeanUtil.toBean(bo, GearWageRateConfig.class);
|
||||
// 前端不传rateCode,后端自动生成
|
||||
add.setRateCode("RATE_" + IdUtil.getSnowflakeNextIdStr());
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setRateId(add.getRateId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateByBo(GearWageRateConfigBo bo) {
|
||||
GearWageRateConfig update = BeanUtil.toBean(bo, GearWageRateConfig.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
private void validEntityBeforeSave(GearWageRateConfig entity) {
|
||||
// 可扩展:按计费类型校验必填字段
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
package com.gear.oa.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.oa.domain.GearWorker;
|
||||
import com.gear.oa.domain.bo.GearWorkerBo;
|
||||
import com.gear.oa.domain.bo.GearWorkerImportBo;
|
||||
import com.gear.oa.domain.vo.GearWorkerVo;
|
||||
import com.gear.oa.mapper.GearWorkerMapper;
|
||||
import com.gear.oa.service.IGearWorkerService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工人主数据Service业务层处理
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class GearWorkerServiceImpl implements IGearWorkerService {
|
||||
|
||||
private final GearWorkerMapper baseMapper;
|
||||
|
||||
@Override
|
||||
public GearWorkerVo queryById(Long workerId) {
|
||||
return baseMapper.selectVoById(workerId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<GearWorkerVo> queryPageList(GearWorkerBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<GearWorker> lqw = buildQueryWrapper(bo);
|
||||
Page<GearWorkerVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GearWorkerVo> queryList(GearWorkerBo bo) {
|
||||
LambdaQueryWrapper<GearWorker> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<GearWorker> buildQueryWrapper(GearWorkerBo bo) {
|
||||
LambdaQueryWrapper<GearWorker> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getWorkerId() != null, GearWorker::getWorkerId, bo.getWorkerId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getWorkerNo()), GearWorker::getWorkerNo, bo.getWorkerNo());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getWorkerName()), GearWorker::getWorkerName, bo.getWorkerName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPhone()), GearWorker::getPhone, bo.getPhone());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), GearWorker::getStatus, bo.getStatus());
|
||||
lqw.orderByDesc(GearWorker::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insertByBo(GearWorkerBo bo) {
|
||||
GearWorker add = BeanUtil.toBean(bo, GearWorker.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setWorkerId(add.getWorkerId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateByBo(GearWorkerBo bo) {
|
||||
GearWorker update = BeanUtil.toBean(bo, GearWorker.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
private void validEntityBeforeSave(GearWorker entity) {
|
||||
if (StringUtils.isBlank(entity.getStatus())) {
|
||||
entity.setStatus("0");
|
||||
}
|
||||
if (StringUtils.isBlank(entity.getDefaultBillingType())) {
|
||||
entity.setDefaultBillingType("1");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String importByExcel(List<GearWorkerImportBo> list, Boolean updateSupport) {
|
||||
if (list == null || list.isEmpty()) {
|
||||
return "导入数据为空";
|
||||
}
|
||||
int success = 0;
|
||||
int fail = 0;
|
||||
StringBuilder msg = new StringBuilder();
|
||||
for (GearWorkerImportBo item : list) {
|
||||
if (StringUtils.isBlank(item.getWorkerNo()) || StringUtils.isBlank(item.getWorkerName())) {
|
||||
fail++;
|
||||
msg.append("[工号/姓名为空]");
|
||||
continue;
|
||||
}
|
||||
GearWorker exist = baseMapper.selectOne(Wrappers.<GearWorker>lambdaQuery()
|
||||
.eq(GearWorker::getWorkerNo, item.getWorkerNo()));
|
||||
|
||||
if (exist == null) {
|
||||
GearWorker add = BeanUtil.toBean(item, GearWorker.class);
|
||||
validEntityBeforeSave(add);
|
||||
baseMapper.insert(add);
|
||||
success++;
|
||||
} else if (Boolean.TRUE.equals(updateSupport)) {
|
||||
GearWorker update = BeanUtil.toBean(item, GearWorker.class);
|
||||
update.setWorkerId(exist.getWorkerId());
|
||||
validEntityBeforeSave(update);
|
||||
baseMapper.updateById(update);
|
||||
success++;
|
||||
} else {
|
||||
fail++;
|
||||
msg.append("[工号重复:").append(item.getWorkerNo()).append("]");
|
||||
}
|
||||
}
|
||||
return "导入完成,成功" + success + "条,失败" + fail + "条" + (msg.length() > 0 ? "," + msg : "");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gear.oa.mapper.GearWageEntryDetailMapper">
|
||||
|
||||
<resultMap type="com.gear.oa.domain.GearWageEntryDetail" id="GearWageEntryDetailResult">
|
||||
<result property="detailId" column="detail_id"/>
|
||||
<result property="entryDate" column="entry_date"/>
|
||||
<result property="empId" column="emp_id"/>
|
||||
<result property="empName" column="emp_name"/>
|
||||
<result property="billingType" column="billing_type"/>
|
||||
<result property="rateId" column="rate_id"/>
|
||||
<result property="workTypeName" column="work_type_name"/>
|
||||
<result property="itemName" column="item_name"/>
|
||||
<result property="processName" column="process_name"/>
|
||||
<result property="orderNo" column="order_no"/>
|
||||
<result property="workload" column="workload"/>
|
||||
<result property="unitPrice" column="unit_price"/>
|
||||
<result property="baseAmount" column="base_amount"/>
|
||||
<result property="extraAmount" column="extra_amount"/>
|
||||
<result property="extraReason" column="extra_reason"/>
|
||||
<result property="totalAmount" column="total_amount"/>
|
||||
<result property="isMakeup" column="is_makeup"/>
|
||||
<result property="sourceDetailId" column="source_detail_id"/>
|
||||
<result property="makeupResponsibleId" column="makeup_responsible_id"/>
|
||||
<result property="makeupResponsible" column="makeup_responsible"/>
|
||||
<result property="makeupReason" column="makeup_reason"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gear.oa.mapper.GearWageMakeupLogMapper">
|
||||
|
||||
<resultMap type="com.gear.oa.domain.GearWageMakeupLog" id="GearWageMakeupLogResult">
|
||||
<result property="logId" column="log_id"/>
|
||||
<result property="detailId" column="detail_id"/>
|
||||
<result property="sourceDetailId" column="source_detail_id"/>
|
||||
<result property="operationType" column="operation_type"/>
|
||||
<result property="operationDate" column="operation_date"/>
|
||||
<result property="empId" column="emp_id"/>
|
||||
<result property="makeupResponsibleId" column="makeup_responsible_id"/>
|
||||
<result property="makeupResponsible" column="makeup_responsible"/>
|
||||
<result property="makeupReason" column="makeup_reason"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gear.oa.mapper.GearWageRateConfigMapper">
|
||||
|
||||
<resultMap type="com.gear.oa.domain.GearWageRateConfig" id="GearWageRateConfigResult">
|
||||
<result property="rateId" column="rate_id"/>
|
||||
<result property="rateCode" column="rate_code"/>
|
||||
<result property="rateName" column="rate_name"/>
|
||||
<result property="billingType" column="billing_type"/>
|
||||
<result property="workTypeName" column="work_type_name"/>
|
||||
<result property="itemName" column="item_name"/>
|
||||
<result property="processName" column="process_name"/>
|
||||
<result property="workdayHours" column="workday_hours"/>
|
||||
<result property="unitPrice" column="unit_price"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
23
gear-oa/src/main/resources/mapper/oa/GearWorkerMapper.xml
Normal file
23
gear-oa/src/main/resources/mapper/oa/GearWorkerMapper.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gear.oa.mapper.GearWorkerMapper">
|
||||
|
||||
<resultMap type="com.gear.oa.domain.GearWorker" id="GearWorkerResult">
|
||||
<result property="workerId" column="worker_id"/>
|
||||
<result property="workerNo" column="worker_no"/>
|
||||
<result property="workerName" column="worker_name"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="defaultBillingType" column="default_billing_type"/>
|
||||
<result property="defaultWorkTypeName" column="default_work_type_name"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user