| | |
| | | <?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.zy.asrs.mapper.PlaMapper"> |
| | | <update id="autoThaw"> |
| | | update |
| | | asr_pla_detl |
| | | set |
| | | stock_freeze = 1 |
| | | where |
| | | stock_freeze = 0 |
| | | and status != '全部出库' |
| | | and stock_freeze_date is not null |
| | | and datediff(day , stock_freeze_date, getdate()) > 90 |
| | | </update> |
| | | <select id="getStockStatisAll" resultType="com.zy.asrs.entity.Pla"> |
| | | select brand, matnr,workshop, sum(weight_anfme) as weight |
| | | from asr_pla_detl |
| | |
| | | <if test="etime != null"> |
| | | and pakin_time <= #{etime} |
| | | </if> |
| | | <if test="status == null or status.trim() == ''"> |
| | | and status in ('已入库','部分出库','待出库') |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | and status = #{status} |
| | | </if> |
| | | <if test="type != null and type != ''"> |
| | | and type = #{type} |
| | | </if> |
| | | <if test="workshop != null and workshop != ''"> |
| | | and workshop = #{workshop} |
| | | </if> |
| | | <if test="transfer != null and transfer != ''"> |
| | | and transfer = #{transfer} |
| | | </if> |
| | | </where> |
| | | GROUP BY brand,matnr,workshop ORDER BY matnr,workshop |
| | | GROUP BY brand,matnr,workshop HAVING SUM(weight_anfme) > 0 ORDER BY matnr,workshop |
| | | </select> |
| | | <select id="getDropdownValues" resultType="com.zy.asrs.entity.DropdownValuesDto"> |
| | | SELECT type, value |
| | | FROM dropdown_values_view |
| | | </select> |
| | | </mapper> |