🎨 sql语句修改
All checks were successful
Release / Release (push) Successful in 33s

This commit is contained in:
my_ong 2024-12-19 12:44:26 +08:00
parent 7d28aab41f
commit 4328fc5bac
2 changed files with 12 additions and 11 deletions

View File

@ -7,6 +7,7 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.apache.poi.util.StringUtil;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -68,8 +69,8 @@ public class ApplyFormController {
return applyFormService.page(Page.of(page, size), Wrappers.<ApplyForm>lambdaQuery()
.eq(auditType != null, ApplyForm::getAuditType, auditType)
.eq(ApplyForm::getType, ApplyTypeEnum.AUDIT)
.eq(taker != null, ApplyForm::getTaker, taker)
.eq(createDate != null, ApplyForm::getCreatedTime, createDate)
.like(StringUtil.isNotBlank(taker), ApplyForm::getTaker, "%" + taker + "%")
.ge(createDate != null, ApplyForm::getCreatedTime, createDate)
.in(reviewResults != null && !reviewResults.isEmpty(), ApplyForm::getReviewResult, reviewResults)
.orderByDesc(ApplyForm::getCreatedTime)
);
@ -182,8 +183,8 @@ public class ApplyFormController {
@GetMapping("wait-scan-data/{applyId}")
@Operation(summary = "获取盘点的待扫码信息")
public List<WaitScanInfo> getWaitScanData(@Parameter(description = "申请单ID") @PathVariable(name = "applyId") Long applyId){
return applyDetailService.getWaitScanData(applyId);
public List<WaitScanInfo> getWaitScanData(@Parameter(description = "申请单ID") @PathVariable(name = "applyId") Long applyId) {
return applyDetailService.getWaitScanData(applyId);
}
@PostMapping("scan-data/{applyId}")

View File

@ -43,14 +43,14 @@
</choose>
</if>
<if test="type!= null and type!= ''">
AND m.m_type = #{type}
</if>
<if test="code!= null and code!= ''">
AND m.m_code LIKE CONCAT('%', #{code}, '%')
</if>
<if test="name!= null and name!= ''">
AND m.m_name LIKE CONCAT('%', #{name}, '%')
and( m.m_type LIKE CONCAT('%', #{type}, '%') or m.m_code LIKE CONCAT('%', #{code}, '%') or m.m_name LIKE CONCAT('%', #{name}, '%') )
</if>
<!-- <if test="code!= null and code!= ''">-->
<!-- AND m.m_code LIKE CONCAT('%', #{code}, '%')-->
<!-- </if>-->
<!-- <if test="name!= null and name!= ''">-->
<!-- AND m.m_name LIKE CONCAT('%', #{name}, '%')-->
<!-- </if>-->
ORDER BY f.af_apply_date DESC
</select>