报废异常单号

master
赵嘉伟 3 years ago
parent 07d56fc140
commit 3f6d4f5d5f

@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
*
@ -181,6 +182,12 @@ public class AbnormalBillController {
return R.ok(result);
}
@GetMapping("getAbnormalByConditionalPage")
public R getAbnormalByConditionalPage(FrontPage frontPage,@RequestParam(required = false) Map paramMap){
String globalQuery = frontPage.getGlobalQuery();
return R.ok(abnormalBillService.getAbnormalByConditionalPage(frontPage.getPagePlus(),paramMap,globalQuery));
}
/**

@ -1,6 +1,7 @@
package com.foreverwin.mesnac.anomaly.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.anomaly.dto.AbnormalBillDto;
import com.foreverwin.mesnac.anomaly.model.AbnormalBill;
import com.foreverwin.mesnac.common.dto.ScrapDto;
@ -43,5 +44,7 @@ public interface AbnormalBillMapper extends BaseMapper<AbnormalBill> {
List<AbnormalBill> getQCAbnormalList(@Param("site") String site);
IPage getAbnormalByConditional(IPage page, @Param("paramMap")Map<String,String> paramMap,@Param("keyword")String keyword);
}

@ -11,6 +11,7 @@ import com.foreverwin.modular.core.util.FrontPage;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* <p>
@ -139,4 +140,6 @@ public interface AbnormalBillService extends IService<AbnormalBill> {
List<AbnormalBill> getQCAbnormal();
IPage getAbnormalByConditionalPage(IPage page,Map paramMap,String keyword);
}

@ -1189,6 +1189,12 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
return abnormalBillMapper.getQCAbnormalList(CommonMethods.getSite());
}
@Override
public IPage getAbnormalByConditionalPage(IPage page,Map paramMap,String keyword) {
paramMap.put("site",CommonMethods.getSite());
return abnormalBillMapper.getAbnormalByConditional(page,paramMap,keyword);
}
@Override
public Map<String, String> jgProductionIsScrap(String abnormalNo, String site, String sfc) {
//查询该sfc在质量异常异常方案是否是报废,如果是则大于1

@ -1192,4 +1192,25 @@
JOIN Z_ABNORMAL_BILL_DISPOSE ZABD ON ZABD.ABNORMAL_BILL_BO= ZAB.HANDLE
WHERE zab.SITE=#{site} AND zab.STATUS='G' AND zab."TYPE"='Z' AND s.QTY>1 AND (ZABD.ABNORMAL_METHOD='F' OR ZABD.ABNORMAL_METHOD='C') ORDER BY ZABD.CLOSED_DATE_TIME DESC
</select>
<select id="getAbnormalByConditional" resultMap="BaseResultMap">
SELECT zab.ABNORMAL_NO ABNORMAL_NO,zab.PB_DESCRIPTION PB_DESCRIPTION
FROM Z_ABNORMAL_BILL zab
INNER JOIN Z_ABNORMAL_BILL_DISPOSE zabd ON zab.HANDLE = zabd.ABNORMAL_BILL_BO
<where>
zab.SITE = #{paramMap.site}
AND zab.SFC IS NOT NULL
<if test="paramMap.abnormalMethod != null and paramMap.abnormalMethod != ''">
AND zabd.ABNORMAL_METHOD = #{paramMap.abnormalMethod}
</if>
<if test="paramMap.type != null and paramMap.type != ''">
AND zab.TYPE = #{paramMap.type}
</if>
<if test="keyword != null and keyword != ''">
AND (zab.ABNORMAL_NO LIKE '%${keyword}%'
OR zab.PB_DESCRIPTION LIKE '%${keyword}%')
</if>
</where>
ORDER BY zab.CREATED_DATE_TIME DESC
</select>
</mapper>

Loading…
Cancel
Save