二维码优化

This commit is contained in:
mashuai 2025-01-03 16:29:25 +08:00
parent b4e3a03c9b
commit 711b3ba64d
5 changed files with 18 additions and 5 deletions

View File

@ -63,6 +63,9 @@ public class BmQrcodeInfo extends BaseEntity
@ApiModelProperty(value = "绑定状态") @ApiModelProperty(value = "绑定状态")
private String bindStatus; private String bindStatus;
@ApiModelProperty(value = "绑定人")
private String bindUser;
@ApiModelProperty(value = "绑定状态名称") @ApiModelProperty(value = "绑定状态名称")
private String bindStatusName; private String bindStatusName;

View File

@ -108,6 +108,7 @@ public class BmQrcodeInfoServiceImpl implements IBmQrcodeInfoService
String qrUrl = saveDirectory + code + ".jpg"; String qrUrl = saveDirectory + code + ".jpg";
bmQrcodeInfo.setQrCode(code); bmQrcodeInfo.setQrCode(code);
bmQrcodeInfo.setQrUrl(qrUrl); bmQrcodeInfo.setQrUrl(qrUrl);
bmQrcodeInfo.setQrType("盘点");
result += bmQrcodeInfoMapper.insertBmQrcodeInfo(bmQrcodeInfo); result += bmQrcodeInfoMapper.insertBmQrcodeInfo(bmQrcodeInfo);
} }
if (result > 0) { if (result > 0) {

View File

@ -24,6 +24,7 @@ import org.springframework.stereotype.Service;
import com.bonus.material.scrap.mapper.ScrapApplyDetailsMapper; import com.bonus.material.scrap.mapper.ScrapApplyDetailsMapper;
import com.bonus.material.scrap.domain.ScrapApplyDetails; import com.bonus.material.scrap.domain.ScrapApplyDetails;
import com.bonus.material.scrap.service.IScrapApplyDetailsService; import com.bonus.material.scrap.service.IScrapApplyDetailsService;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -153,6 +154,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
* @return * @return
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult approve(ScrapApplyDetails scrapApplyDetails) { public AjaxResult approve(ScrapApplyDetails scrapApplyDetails) {
// TODO: 报废审核二级页面通过 // TODO: 报废审核二级页面通过
int result = 0; int result = 0;
@ -231,6 +233,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
* @return * @return
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult reject(ScrapApplyDetails scrapApplyDetails) { public AjaxResult reject(ScrapApplyDetails scrapApplyDetails) {
// TODO: 报废审核二级页面驳回 // TODO: 报废审核二级页面驳回
int result = 0; int result = 0;

View File

@ -29,18 +29,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBmQrcodeInfoList" resultType="com.bonus.material.basic.domain.BmQrcodeInfo"> <select id="selectBmQrcodeInfoList" resultType="com.bonus.material.basic.domain.BmQrcodeInfo">
select bqi.id as qrId, bqi.qr_code as qrCode, mt1.type_name as typeName, mt.type_name as typeModelName, select bqi.id as qrId, bqi.qr_code as qrCode, mt1.type_name as typeName, mt.type_name as typeModelName,
bqi.ma_code as maCode, bqi.type_id as typeId, bqi.qr_type as qrType, bqi.task_id as taskId, bqi.create_by as bqi.ma_code as maCode, bqi.type_id as typeId, bqi.task_id as taskId, bqi.create_by as
createBy, createBy,
CASE
WHEN bqi.qr_type IS NULL THEN '新购'
ELSE bqi.qr_type
END AS qrType,
bqi.create_time as createTime, bqi.update_by as updateBy, bqi.create_time as createTime, bqi.update_by as updateBy,
bqi.update_time as updateTime, bqi.update_time as updateTime,
bqi.remark as remark, bqi.remark as remark,
bqi.company_id as companyId, bqi.company_id as companyId,
bqi.is_bind as bindStatus, bqi.is_bind as bindStatus,
u.nick_name as bindUser,
msi.supplier as supplierName msi.supplier as supplierName
from bm_qrcode_info bqi from bm_qrcode_info bqi
left join ma_type mt on bqi.type_id = mt.type_id and mt.del_flag = '0' left join ma_type mt on bqi.type_id = mt.type_id and mt.del_flag = '0'
left join ma_type mt1 on mt1.type_id = mt.parent_id and mt1.del_flag = '0' left join ma_type mt1 on mt1.type_id = mt.parent_id and mt1.del_flag = '0'
left join ma_supplier_info msi on bqi.supplier_id = msi.supplier_id and msi.del_flag = '0' left join purchase_check_info pci on bqi.task_id = pci.task_id
left join ma_supplier_info msi on pci.supplier_id = msi.supplier_id and msi.del_flag = '0'
left join sys_user u ON bqi.bind_user = u.user_id
<where> <where>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
<![CDATA[and DATE_FORMAT( bqi.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]> <![CDATA[and DATE_FORMAT( bqi.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
@ -53,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mt.type_name like concat('%', #{keyWord}, '%') or mt.type_name like concat('%', #{keyWord}, '%') or
bqi.ma_code like concat('%', #{keyWord}, '%') or bqi.ma_code like concat('%', #{keyWord}, '%') or
msi.supplier like concat('%', #{keyWord}, '%') or msi.supplier like concat('%', #{keyWord}, '%') or
bqi.ma_code like concat('%', #{keyWord}, '%') u.nick_name like concat('%', #{keyWord}, '%')
) )
</if> </if>
</where> </where>
@ -103,7 +110,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
<if test="companyId != null">company_id,</if> <if test="companyId != null">company_id,</if>
<if test="supplierId != null">supplier_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="qrCode != null">#{qrCode},</if> <if test="qrCode != null">#{qrCode},</if>
@ -117,7 +123,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
<if test="companyId != null">#{companyId},</if> <if test="companyId != null">#{companyId},</if>
<if test="supplierId != null">#{supplierId},</if>
</trim> </trim>
</insert> </insert>

View File

@ -375,6 +375,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="bindMaCodeByQrCode"> <update id="bindMaCodeByQrCode">
update bm_qrcode_info set ma_code = #{maCode}, is_bind = 1 update bm_qrcode_info set ma_code = #{maCode}, is_bind = 1
,bind_user = #{createBy}
where where
qr_code = #{qrCode} qr_code = #{qrCode}
and status != '1' and status != '1'