src/main/java/com/ruoyi/compensationperformance/controller/CompensationPerformanceController.java
@@ -1,5 +1,6 @@ package com.ruoyi.compensationperformance.controller; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.utils.poi.ExcelUtil; @@ -9,16 +10,23 @@ import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.project.system.domain.SysUser; import com.ruoyi.project.system.mapper.SysUserMapper; import com.ruoyi.purchase.dto.PaymentRegistrationDto; import com.ruoyi.staff.mapper.StaffOnJobMapper; import com.ruoyi.staff.pojo.StaffOnJob; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; /** * @author :yys @@ -76,5 +84,31 @@ util.exportExcel(response, list, "导åºèªèµç®¡çå表"); } @Log(title = "ä¸è½½èªèµç®¡çå表模æ¿", businessType = BusinessType.EXPORT) @PostMapping("/exportTemplate") public void exportTemplate(HttpServletResponse response) { List<CompensationPerformance> list = new ArrayList<>(); ExcelUtil<CompensationPerformance> util = new ExcelUtil<>(CompensationPerformance.class); util.exportExcel(response, list, "ä¸è½½èªèµç®¡çå表模æ¿"); } @Autowired private SysUserMapper sysUserMapper; @Log(title = "å¯¼å ¥èªèµç®¡çå表", businessType = BusinessType.IMPORT) @PostMapping("/importData") public AjaxResult importData(MultipartFile file) throws Exception { ExcelUtil<CompensationPerformance> util = new ExcelUtil<>(CompensationPerformance.class); List<CompensationPerformance> list = util.importExcel(file.getInputStream()); list.forEach(item->{ SysUser staffOnJob = sysUserMapper.selectUserByNickName(item.getName()); if(staffOnJob!=null){ item.setStaffId(staffOnJob.getUserId()); } }); boolean b = compensationPerformanceService.saveBatch(list); return AjaxResult.success(b); } } src/main/java/com/ruoyi/compensationperformance/pojo/CompensationPerformance.java
@@ -28,9 +28,9 @@ private Long id; /** * åå·¥id * ç¨æ·id */ @ApiModelProperty("åå·¥id") @ApiModelProperty("ç¨æ·id") private Long staffId; /** @@ -61,14 +61,14 @@ * åºåºå¤å¤©æ° */ @ApiModelProperty("åºåºå¤å¤©æ°") @Excel(name = "åºåºå¤å¤©æ°") // @Excel(name = "åºåºå¤å¤©æ°") private BigDecimal shouldAttendedNum; /** * å®é åºå¤å¤©æ° */ @ApiModelProperty("å®é åºå¤å¤©æ°") @Excel(name = "å®é åºå¤å¤©æ°") // @Excel(name = "å®é åºå¤å¤©æ°") private BigDecimal actualAttendedNum; @@ -76,21 +76,21 @@ * åºæ¬å·¥èµ */ @ApiModelProperty("åºæ¬å·¥èµ") @Excel(name = "åºæ¬å·¥èµ") // @Excel(name = "åºæ¬å·¥èµ") private BigDecimal basicSalary; /** * å²ä½å·¥èµ */ @ApiModelProperty("å²ä½å·¥èµ") @Excel(name = "å²ä½å·¥èµ") // @Excel(name = "å²ä½å·¥èµ") private BigDecimal postSalary; /** * å ¥ç¦»èç¼ºå¤æ£æ¬¾ */ @ApiModelProperty("å ¥ç¦»èç¼ºå¤æ£æ¬¾") @Excel(name = "å ¥ç¦»èç¼ºå¤æ£æ¬¾") // @Excel(name = "å ¥ç¦»èç¼ºå¤æ£æ¬¾") private BigDecimal deductionAbsenteeism; @@ -98,34 +98,34 @@ * ç åæ£æ¬¾ */ @ApiModelProperty("ç åæ£æ¬¾") @Excel(name = "ç åæ£æ¬¾") // @Excel(name = "ç åæ£æ¬¾") private BigDecimal sickLeaveDeductions; /** * äºåæ£æ¬¾ */ @ApiModelProperty("äºåæ£æ¬¾") @Excel(name = "äºåæ£æ¬¾") // @Excel(name = "äºåæ£æ¬¾") private BigDecimal deductionPersonalLeave; /** * å¿è®°æå¡æ£æ¬¾ */ @ApiModelProperty("å¿è®°æå¡æ£æ¬¾") @Excel(name = "å¿è®°æå¡æ£æ¬¾") // @Excel(name = "å¿è®°æå¡æ£æ¬¾") private BigDecimal forgetClockDeduct; /** * 绩æå¾å */ @ApiModelProperty("绩æå¾å") @Excel(name = "绩æå¾å") // @Excel(name = "绩æå¾å") private BigDecimal performanceScore; /** * 绩æå·¥èµ */ @ApiModelProperty("绩æå·¥èµ") @Excel(name = "绩æå·¥èµ") // @Excel(name = "绩æå·¥èµ") private BigDecimal performancePay; @@ -133,67 +133,67 @@ * åºåå计 */ @ApiModelProperty("åºåå计") @Excel(name = "åºåå计") // @Excel(name = "åºåå计") private BigDecimal payableWages; /** * 社ä¿ä¸ªäºº */ @ApiModelProperty("社ä¿ä¸ªäºº") @Excel(name = "社ä¿ä¸ªäºº") // @Excel(name = "社ä¿ä¸ªäºº") private BigDecimal socialSecurityIndividuals; /** * 社ä¿å ¬å¸ */ @ApiModelProperty("社ä¿å ¬å¸") @Excel(name = "社ä¿å ¬å¸") // @Excel(name = "社ä¿å ¬å¸") private BigDecimal socialSecurityCompanies; /** * 社ä¿å计 */ @ApiModelProperty("社ä¿å计") @Excel(name = "社ä¿å计") // @Excel(name = "社ä¿å计") private BigDecimal socialSecurityTotal; /** * å ¬ç§¯éå计 */ @ApiModelProperty("å ¬ç§¯éå计") @Excel(name = "å ¬ç§¯éå计") // @Excel(name = "å ¬ç§¯éå计") private BigDecimal providentFundTotal; /** * å ¬ç§¯éå ¬å¸ */ @ApiModelProperty("å ¬ç§¯éå ¬å¸") @Excel(name = "å ¬ç§¯éå ¬å¸") // @Excel(name = "å ¬ç§¯éå ¬å¸") private BigDecimal providentFundCompany; /** * å ¬ç§¯é个人 */ @ApiModelProperty("å ¬ç§¯é个人") @Excel(name = "å ¬ç§¯é个人") // @Excel(name = "å ¬ç§¯é个人") private BigDecimal providentFundIndividuals; /** * åºç¨å·¥èµ */ @ApiModelProperty("åºç¨å·¥èµ") @Excel(name = "åºç¨å·¥èµ") // @Excel(name = "åºç¨å·¥èµ") private BigDecimal taxableWaget; /** * 个人æå¾ç¨ */ @ApiModelProperty("个人æå¾ç¨") @Excel(name = "个人æå¾ç¨") // @Excel(name = "个人æå¾ç¨") private BigDecimal personalIncomeTax; /** * å®åå·¥èµ */ @ApiModelProperty("å®åå·¥èµ") @Excel(name = "å®åå·¥èµ") @Excel(name = "å®åå·¥èµ", width = 30) private BigDecimal actualWages; /** src/main/java/com/ruoyi/device/dto/DeviceLedgerDto.java
@@ -37,6 +37,19 @@ private String deviceModel; /** * 设å¤åç */ @ApiModelProperty("设å¤åç") private String deviceBrand; /** * åæ¾ä½ç½® */ @ApiModelProperty("åæ¾ä½ç½®") private String storageLocation; /** * ä¾åºååç§° */ private String supplierName; src/main/java/com/ruoyi/device/pojo/DeviceLedger.java
@@ -41,6 +41,18 @@ private String deviceModel; /** * 设å¤åç */ @ApiModelProperty("设å¤åç") private String deviceBrand; /** * åæ¾ä½ç½® */ @ApiModelProperty("åæ¾ä½ç½®") private String storageLocation; /** * ä¾åºååç§° */ private String supplierName; src/main/java/com/ruoyi/production/controller/SalesLedgerSchedulingController.java
@@ -15,6 +15,8 @@ import com.ruoyi.production.mapper.SpeculativeTradingInfoMapper; import com.ruoyi.production.pojo.SpeculativeTradingInfo; import com.ruoyi.production.service.impl.SalesLedgerSchedulingServiceImpl; import com.ruoyi.sales.mapper.LossMapper; import com.ruoyi.sales.pojo.Loss; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -44,15 +46,40 @@ @Autowired private SpeculativeTradingInfoMapper speculativeTradingInfoMapper; @Autowired private LossMapper lossMapper; @GetMapping("/loss") @Log(title = "ç产管ç-ç产派工-æèç", businessType = BusinessType.OTHER) @ApiOperation("ç产管ç-ç产派工-æèç") public AjaxResult loss() { return AjaxResult.success(lossMapper.selectList(null)); } @PostMapping("/addLoss") @Log(title = "ç产管ç-ç产派工-æ·»å æèç", businessType = BusinessType.INSERT) @ApiOperation("ç产管ç-ç产派工-æ·»å æèç") public AjaxResult addLoss(@RequestBody Loss loss) { lossMapper.insert(loss); return AjaxResult.success("æ·»å æèçæå"); } @PostMapping("/updateLoss") @Log(title = "ç产管ç-ç产派工-ä¿®æ¹æèç", businessType = BusinessType.UPDATE) @ApiOperation("ç产管ç-ç产派工-ä¿®æ¹æèç") public AjaxResult updateLoss(@RequestBody Loss loss) { lossMapper.updateById(loss); return AjaxResult.success("ä¿®æ¹æèçæå"); } @GetMapping("/list") @Log(title = "ç产管ç-ç产派工-çæºä¿¡æ¯", businessType = BusinessType.OTHER) @ApiOperation("ç产管ç-ç产派工-çæºä¿¡æ¯") public AjaxResult list() { List<SpeculativeTradingInfo> result = speculativeTradingInfoMapper.selectList(null); result.forEach(item -> { item.setCurrentWorkLoad(salesLedgerSchedulingService.getSchedulingNumBySpeculativeTradingName(item.getName()).divide(new BigDecimal(1000),2, RoundingMode.CEILING)); item.setVacant(item.getWorkLoad().subtract(item.getCurrentWorkLoad())); item.setVacant(item.getWorkLoad().subtract(item.getCurrentWorkLoad()).setScale(2, RoundingMode.HALF_UP)); //ä¿ç两ä½å°æ° }); return AjaxResult.success(result); } src/main/java/com/ruoyi/production/dto/SalesLedgerSchedulingDto.java
@@ -27,6 +27,9 @@ @ApiModelProperty(value = "éå®å°è´¦ID") private Long salesLedgerId; @ApiModelProperty(value = "ç产æ»é(åä½kg)") private BigDecimal totalProduction; /** * çäº§çæº */ src/main/java/com/ruoyi/production/dto/SalesLedgerSchedulingProcessDto.java
@@ -23,6 +23,9 @@ @ApiModelProperty(value = "éå®äº§åID") private Long salesLedgerProductId; @ApiModelProperty(value = "ç产æ»é(åä½kg)") private BigDecimal totalProduction; @ApiModelProperty(value = "éå®å°è´¦ID") private Long salesLedgerId; src/main/java/com/ruoyi/production/service/impl/SalesLedgerProductionAccountingServiceImpl.java
@@ -11,6 +11,8 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import java.math.BigDecimal; /** * @author :yys * @date : 2025/7/21 14:41 @@ -25,6 +27,13 @@ @Override public IPage<SalesLedgerProductionAccountingDto> listPage(Page page, SalesLedgerProductionAccountingDto salesLedgerProductionAccountingDto) { IPage<SalesLedgerProductionAccountingDto> list = salesLedgerProductionAccountingMapper.listPage(page, salesLedgerProductionAccountingDto); list.getRecords().forEach(item -> { String[] split = item.getSpecificationModel().split("\\*"); if(split.length == 2){ // 计ç®å·¥èµ = å·¥æ¶å®é¢ * æ°é * è§æ ¼ item.setWages(item.getWages().multiply(new BigDecimal(split[1]))); } }); return list; } } src/main/java/com/ruoyi/production/service/impl/SalesLedgerSchedulingServiceImpl.java
@@ -18,7 +18,9 @@ import com.ruoyi.production.service.SalesLedgerSchedulingService; import com.ruoyi.project.system.domain.SysUser; import com.ruoyi.project.system.mapper.SysUserMapper; import com.ruoyi.sales.mapper.LossMapper; import com.ruoyi.sales.mapper.SalesLedgerProductMapper; import com.ruoyi.sales.pojo.Loss; import com.ruoyi.sales.pojo.SalesLedgerProduct; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -28,6 +30,7 @@ import javax.servlet.http.HttpServletResponse; import java.math.BigDecimal; import java.math.RoundingMode; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.ArrayList; @@ -77,6 +80,15 @@ }else{ i.setStatus("ç产ä¸"); } // 计ç®ç产æ»é = è§æ ¼ * æ°é / 1000 String[] split = i.getSpecificationModel().split("\\*"); if(split.length == 2){ BigDecimal multiply = new BigDecimal(split[0]) .multiply(new BigDecimal(split[1]) .multiply(i.getQuantity()).divide(new BigDecimal(1000),2, RoundingMode.CEILING)); i.setTotalProduction(multiply); } }); return list; } @@ -210,8 +222,14 @@ totalNum.addAndGet(productionNum.intValue()); } }); return new BigDecimal(totalNum.get()); // éè¦ / æèç Loss loss = lossMapper.selectOne(new LambdaQueryWrapper<Loss>().last("limit 1")); BigDecimal lossNum = loss == null ? new BigDecimal(6) : loss.getRate(); //没ææèçåé»è®¤ä¸º6 return new BigDecimal(totalNum.get()).multiply(new BigDecimal(100)).divide(lossNum, 2,RoundingMode.HALF_UP); } private LossMapper lossMapper; /** @@ -256,14 +274,16 @@ // salesLedgerWorkLambdaQueryWrapper.in(SalesLedgerWork::getSalesLedgerSchedulingId, collect) // .ne(SalesLedgerWork::getStatus, 1); // List<SalesLedgerWork> salesLedgerWorks = salesLedgerWorkMapper.selectList(salesLedgerWorkLambdaQueryWrapper); // list.getRecords().forEach(i -> { // // è·å宿æ°é // i.setSuccessNum(salesLedgerWorks // .stream() // .filter(j -> j.getSalesLedgerSchedulingId().equals(i.getId())) // .map(SalesLedgerWork::getFinishedNum) // .reduce(BigDecimal.ZERO, BigDecimal::add)); // }); list.getRecords().forEach(i -> { // 计ç®ç产æ»é = è§æ ¼ * æ°é / 1000 String[] split = i.getSpecificationModel().split("\\*"); if(split.length == 2){ BigDecimal multiply = new BigDecimal(split[0]) .multiply(new BigDecimal(split[1]) .multiply(i.getSuccessNum()).divide(new BigDecimal(1000),2, RoundingMode.CEILING)); i.setTotalProduction(multiply); } }); return list; } src/main/java/com/ruoyi/project/system/controller/SysUserController.java
@@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletResponse; import com.ruoyi.project.system.domain.vo.SysUserDeptVo; import com.ruoyi.project.system.mapper.SysUserMapper; import com.ruoyi.project.system.service.*; import org.apache.commons.lang3.ArrayUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -67,6 +68,17 @@ return getDataTable(list); } /** * è·åç¨æ·å表 */ @PreAuthorize("@ss.hasPermi('system:user:list')") @GetMapping("/listAll") public AjaxResult listAll(SysUser user) { List<SysUser> list = userService.selectUserList(user); return AjaxResult.success(list); } @Log(title = "ç¨æ·ç®¡ç", businessType = BusinessType.EXPORT) @PreAuthorize("@ss.hasPermi('system:user:export')") @PostMapping("/export") src/main/java/com/ruoyi/project/system/mapper/SysUserMapper.java
@@ -49,6 +49,14 @@ public SysUser selectUserByUserName(String userName); /** * éè¿æµç§°æ¥è¯¢ç¨æ· * * @param nickName ç¨æ·å * @return ç¨æ·å¯¹è±¡ä¿¡æ¯ */ public SysUser selectUserByNickName(String nickName); /** * éè¿ç¨æ·IDæ¥è¯¢ç¨æ· * * @param userId ç¨æ·ID src/main/java/com/ruoyi/sales/mapper/LossMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,11 @@ package com.ruoyi.sales.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.sales.pojo.Loss; /** * @author :yys * @date : 2025/11/13 16:17 */ public interface LossMapper extends BaseMapper<Loss> { } src/main/java/com/ruoyi/sales/pojo/Loss.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,31 @@ package com.ruoyi.sales.pojo; import com.baomidou.mybatisplus.annotation.*; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.math.BigDecimal; /** * @author :yys * @date : 2025/11/13 16:16 */ @Data @TableName("loss") public class Loss { private static final long serialVersionUID = 1L; /** * åºå· */ @TableId(type = IdType.AUTO) private Long id; private BigDecimal rate; @ApiModelProperty(value = "ç§æ·ID") @TableField(fill = FieldFill.INSERT) private Long tenantId; } src/main/java/com/ruoyi/staff/controller/StaffSchedulingController.java
@@ -53,6 +53,14 @@ return AjaxResult.success(); } /** * è·åå½åç¨æ·ææ°æçè®°å½ */ @GetMapping("/getCurrentUserLatestScheduling") public AjaxResult getCurrentUserLatestScheduling(){ return AjaxResult.success(staffSchedulingService.getCurrentUserLatestScheduling()); } @Log(title = "导åºäººåæçå表", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response ) { src/main/java/com/ruoyi/staff/dto/SaveStaffSchedulingDto.java
@@ -1,5 +1,6 @@ package com.ruoyi.staff.dto; import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.AllArgsConstructor; import lombok.Data; @@ -21,27 +22,34 @@ public class SaveStaffSchedulingDto implements Serializable { private Integer id; @NotNull(message = "å¿ é¡»è¦éæ©åå·¥") private Integer staffId; // @NotNull(message = "å¿ é¡»è¦éæ©åå·¥") private String staffId; @NotNull(message = "é¨é¨idä¸è½ä¸ºç©º!") /** * å伿¶é´ */ private String lunchTime; private String staffName; // @NotNull(message = "é¨é¨idä¸è½ä¸ºç©º!") private Integer department; @NotNull(message = "çæ¬¡idä¸è½ä¸ºç©º!") // @NotNull(message = "çæ¬¡idä¸è½ä¸ºç©º!") private Integer shiftType; @NotNull(message = "工使¥ä¸è½ä¸ºç©º!") // @NotNull(message = "工使¥ä¸è½ä¸ºç©º!") private Date workDate; @NotNull(message = "ä¸çæ¶é´ä¸è½ä¸ºç©º!") // @NotNull(message = "ä¸çæ¶é´ä¸è½ä¸ºç©º!") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime workStartTime; @NotNull(message = "ä¸çæ¶é´ä¸è½ä¸ºç©º!") // @NotNull(message = "ä¸çæ¶é´ä¸è½ä¸ºç©º!") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime workEndTime; @NotNull(message = "å·¥æ¶ä¸è½ä¸ºç©º!") // @NotNull(message = "å·¥æ¶ä¸è½ä¸ºç©º!") private Integer status; private String remark; src/main/java/com/ruoyi/staff/dto/StaffSchedulingDto.java
@@ -1,6 +1,7 @@ package com.ruoyi.staff.dto; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.framework.aspectj.lang.annotation.Excel; @@ -24,7 +25,14 @@ /** * åå·¥ID */ private Integer staffId; private String staffId; /** * å伿¶é´ */ @Excel(name = "å伿¶é´") private String lunchTime; @Excel(name = "åå·¥åç§°") private String staffName; src/main/java/com/ruoyi/staff/pojo/StaffScheduling.java
@@ -24,7 +24,19 @@ * åå·¥ID */ @TableField(value = "staff_id") private Integer staffId; private String staffId; /** * æç人å */ @TableField(value = "staff_name") private String staffName; /** * å伿¶é´ */ @TableField(value = "lunch_time") private String lunchTime; /** * é¨é¨ @@ -44,6 +56,7 @@ @TableField(value = "work_date") private Date workDate; /** * å¼å§å·¥ä½æ¶é´ */ src/main/java/com/ruoyi/staff/service/StaffSchedulingService.java
@@ -17,4 +17,6 @@ void saveStaffScheduling(SaveStaffSchedulingDto saveStaffSchedulingDto); IPage<StaffSchedulingDto> listPage(SearchSchedulingVo vo); StaffScheduling getCurrentUserLatestScheduling(); } src/main/java/com/ruoyi/staff/service/impl/StaffSchedulingServiceImpl.java
@@ -1,8 +1,11 @@ package com.ruoyi.staff.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.framework.security.LoginUser; import com.ruoyi.staff.dto.SaveStaffSchedulingDto; import com.ruoyi.staff.dto.StaffSchedulingDto; import com.ruoyi.staff.mapper.StaffSchedulingMapper; @@ -54,6 +57,15 @@ return staffSchedulingMapper.listPage(page, vo); } @Override public StaffScheduling getCurrentUserLatestScheduling() { LoginUser loginUser = SecurityUtils.getLoginUser(); return staffSchedulingMapper.selectOne(new LambdaQueryWrapper<StaffScheduling>() .like(StaffScheduling::getStaffId,loginUser.getUserId()) .orderByDesc(StaffScheduling::getWorkEndTime) .last("LIMIT 1")); } } src/main/resources/mapper/device/DeviceLedgerMapper.xml
@@ -11,6 +11,8 @@ dl.device_name, dl.device_model, dl.supplier_name, dl.device_brand, dl.storage_location, dl.unit, dl.number, dl.status, src/main/resources/mapper/staff/StaffSchedulingMapper.xml
@@ -6,7 +6,7 @@ <resultMap id="BaseResultMap" type="com.ruoyi.staff.pojo.StaffScheduling"> <id property="id" column="id" jdbcType="INTEGER"/> <result property="staffId" column="staff_id" jdbcType="INTEGER"/> <result property="staffId" column="staff_id" jdbcType="VARCHAR"/> <result property="department" column="department" jdbcType="INTEGER"/> <result property="shiftType" column="shift_type" jdbcType="INTEGER"/> <result property="workDate" column="work_date" jdbcType="DATE"/> @@ -31,12 +31,11 @@ </sql> <select id="listPage" resultType="com.ruoyi.staff.dto.StaffSchedulingDto"> SELECT t1.*,t2.staff_name as 'staff_name' ,t2.staff_no as 'staff_no' t1.* FROM staff_scheduling t1 left join staff_join_leave_record t2 on t1.staff_id = t2.id where 1=1 <if test="vo.staffName != null and vo.staffName != '' "> AND t2.staff_name LIKE CONCAT('%', #{vo.staffName}, '%') AND t1.staff_name LIKE CONCAT('%', #{vo.staffName}, '%') </if> <if test="vo.shiftType != null and vo.shiftType != '' "> AND t1.shift_type = #{vo.shiftType} src/main/resources/mapper/system/SysUserMapper.xml
@@ -180,6 +180,12 @@ #{id} </foreach> </select> <select id="selectUserByNickName" resultType="com.ruoyi.project.system.domain.SysUser" parameterType="java.lang.String"> <include refid="selectUserVo"/> where u.nick_name = #{nickName} and u.del_flag = '0' limit 1 </select> <insert id="insertUser" parameterType="com.ruoyi.project.system.domain.SysUser" useGeneratedKeys="true" keyProperty="userId"> insert into sys_user(