Merge remote-tracking branch 'origin/master'

master
董哲奇 8 months ago
commit 40e506cfc1

@ -129,5 +129,9 @@ public class DmBchxylp implements Serializable {
private String drbs;
@ApiModelProperty(value = "物品规格1")
@TableField(exist = false)
private String wpgg1;
}

@ -368,7 +368,7 @@ public class DmYdjh implements Serializable {
@AllArgsConstructor
private enum ZyjhzxEnum{
SLPP("11"), // 上料匹配
SLPP("11"), // 上料匹配 比对库存给上垛位
SLFK("21"),
PWPG("31"),
PWFK("32"),

@ -2,6 +2,8 @@ package com.dsic.gj_erp.bean.kc;
import lombok.Data;
import java.util.List;
/**
* SlKc:
*
@ -62,4 +64,7 @@ public class SlKc {
private String dyry;
private String dyrq;
private String ydid;
private Integer xh;
private List<SlKc> list;
}

@ -1,6 +1,7 @@
package com.dsic.gj_erp.controller.pgd;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
@ -14,12 +15,16 @@ import com.dsic.gj_erp.bean.kc.SlKc;
import com.dsic.gj_erp.bean.pgd.PgdPwjh;
import com.dsic.gj_erp.bean.pgd.PgdSljh;
import com.dsic.gj_erp.bean.pgd.PgdTzjh;
import com.dsic.gj_erp.bean.sy.Dm_zhbmp;
import com.dsic.gj_erp.dao.sy.Dm_zhbmpRepository;
import com.dsic.gj_erp.exception.CustomException;
import com.dsic.gj_erp.mapper.kc.ImCkwpkwpMapper;
import com.dsic.gj_erp.service.fd.DmCzjbbService;
import com.dsic.gj_erp.service.jhgk.DmYdjhService;
import com.dsic.gj_erp.service.kc.ImCkwpkwpService;
import com.dsic.gj_erp.service.pgd.PgdSljhService;
import com.dsic.gj_erp.service.sy.SYService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -58,7 +63,96 @@ public class PgdSljhController {
@Autowired
DmCzjbbService dmCzjbbService;
@Autowired
SYService syService;
@Autowired
Dm_zhbmpRepository dm_zhbmpRepository;
@PostMapping("/slPrint")
@ResponseBody
public ResultBean slPrint(HttpServletRequest req, @RequestBody List<SlKc> list) throws Exception, CustomException {
//ls_lsh = F_GETPJH("MM",'00',"MSMS")
String id = syService.f_getpjh("MM", "00", "MSMS");
//dw_1.object.sllsh[ll_ii] = ls_lsh
//dw_1.object.dyry[ll_ii] = gs_user
//dw_1.object.dyrq[ll_ii] = ls_datetime
List<DmYdjh>ydupList=new ArrayList<>();
List<ImCkwpkwp>ckupList=new ArrayList<>();
for(SlKc slKc: list){
if(StringUtils.isBlank(slKc.getSllsh())){
ImCkwpkwp imCkwpkwp = new ImCkwpkwp();
imCkwpkwp.setCkh(slKc.getCKH());
imCkwpkwp.setWph(slKc.getWPH());
imCkwpkwp.setKwh(slKc.getKWH());
imCkwpkwp.setNbsbm(slKc.getNBSBM());
imCkwpkwp.setSllsh(id);
imCkwpkwp.setDyrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm"));
imCkwpkwp.setDyry((String) req.getAttribute("yhms"));
ckupList.add(imCkwpkwp);
// slKc.setDyrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd"));
}
if(StringUtils.isNotBlank(slKc.getYdid())){
DmYdjh ydjh =new DmYdjh();
// 库存主键 没存
ydjh.setId(slKc.getYdid());
ydjh.setZt("11");
ydupList.add(ydjh);
}
}
dmYdjhService.updateBatchById(ydupList);
imCkwpkwpService.updateBatchByMultiId(ckupList);
List<Dm_zhbmp> qgkws = dm_zhbmpRepository.findByBMLB("QGKW");
List<Dm_zhbmp> zylxs = dm_zhbmpRepository.findByBMLB("zylx");
List<Dm_zhbmp> pwwzs = dm_zhbmpRepository.findByBMLB("pwwz");
List<Dm_zhbmp> dhql = dm_zhbmpRepository.findByBMLB("DHQL");
List<Dm_zhbmp> wpzts = dm_zhbmpRepository.findByBMLB("WPZT");
Map<String, String> qgKwMap = qgkws.stream().collect(Collectors.toMap(Dm_zhbmp::getBM, Dm_zhbmp::getBmsm));
Map<String, String> zylxMap = zylxs.stream().collect(Collectors.toMap(Dm_zhbmp::getBM, Dm_zhbmp::getBmsm));
Map<String, String> pwwzMap = pwwzs.stream().collect(Collectors.toMap(Dm_zhbmp::getBM, Dm_zhbmp::getBmsm));
Map<String, String> dhqlMap = dhql.stream().collect(Collectors.toMap(Dm_zhbmp::getBM, Dm_zhbmp::getBmsm));
Map<String, String> wpztMap = wpzts.stream().collect(Collectors.toMap(Dm_zhbmp::getBM, Dm_zhbmp::getBmsm));
Integer sh=1;
for(SlKc slKc: list){
slKc.setXh(sh);
sh++;
slKc.setZYLX(zylxMap.get(slKc.getZYLX()));
slKc.setSLDW(qgKwMap.get(slKc.getSLDW()));
slKc.setWPZT(wpztMap.get(slKc.getWPZT()));
}
int ceil = (int) (Math.ceil((double) list.size() / 40));
List<SlKc> slKcList= new ArrayList<>();
if(ceil>1){
for(int i=0;i<ceil;i++){
SlKc slKc =new SlKc();
slKc.setDyrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd"));
if (ceil - i == 1){
slKc.setList(list.subList(i*40,list.size()));
}else{
int num =i*40+40;
slKc.setList(list.subList(i*40,num));
}
slKcList.add(slKc);
}
}else{
SlKc slKc =new SlKc();
slKc.setDyrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd"));
slKc.setList(list);
slKcList.add(slKc);
}
return new ResultBean(slKcList);
}
@PostMapping("/getKcAndSljh")
@ResponseBody
public ResultBean getKcAndSljh(HttpServletRequest req, @RequestBody Map map) throws Exception, CustomException {
@ -80,24 +174,57 @@ public class PgdSljhController {
qw.eq("isnull(ZT,'')","11");
}
List<DmYdjh> ydjhs = dmYdjhService.list(qw);
// List<DmYdjh> ydjhs = dmYdjhService.list(qw);
// 查询上料计划
Map retrunMap =new HashMap();
retrunMap.put("slkcs",slkcs);
retrunMap.put("ydjhs",ydjhs);
retrunMap.put("ydjhs",null);
return new ResultBean(retrunMap);
}
@PostMapping("/getKcAndSljh1")
@ResponseBody
public ResultBean getKcAndSljh1(HttpServletRequest req, @RequestBody Map map) throws Exception, CustomException {
// 查询库存
//List<SlKc> slkcs = imCkwpkwpMapper.slxxKcList(map);
QueryWrapper<DmYdjh> qw =new QueryWrapper<>();
qw.eq(StrUtil.isNotEmpty((String)map.get("xqdcch")),"dc_ch",(String)map.get("xqdcch"));
qw.eq(StrUtil.isNotEmpty((String)map.get("xqpl")),"dc_pl",(String)map.get("xqpl"));
// 库存标识 不等于 01 没有匹配上
if(map.get("rqopt").equals("01")){
qw.eq("isnull(ZT,'')","2");
}else if(map.get("rqopt").equals("02")) {
qw.eq("isnull(ZT,'')","2").ne("isnull(slkcdw,'')","");
}else if(map.get("rqopt").equals("03")) {
qw.eq("isnull(ZT,'')","11");
}
List<DmYdjh> ydjhs = dmYdjhService.list(qw);
// 查询上料计划
return new ResultBean(ydjhs);
}
@PostMapping("/getydjhByid")
@ResponseBody
public ResultBean getydjhByid(HttpServletRequest req, @RequestBody Map map) throws Exception, CustomException {
// 查询库存
DmYdjh id = dmYdjhService.getById((String)map.get("id"));
return new ResultBean(id);
List<DmYdjh> list = dmYdjhService.list(new QueryWrapper<DmYdjh>().eq("id", (String) map.get("id")));
return new ResultBean(list);
}
@ -124,7 +251,7 @@ public class PgdSljhController {
}
String cjs1=cjs;
DmYdjh dmYdjh = ydjhs.stream()
.filter(fst -> fst.getDcCh().equalsIgnoreCase(slKc.getDCCH())
.filter(fst -> fst.getDcCh().equalsIgnoreCase(slKc.getDCCH()) &&StringUtils.isNotBlank(fst.getWpgg())
&& fst.getWpgg().equalsIgnoreCase(slKc.getWPGG())
&& (fst.getWpxh().equalsIgnoreCase(slKc.getWPXH())
|| (cjs1 + fst.getWpxh()).equalsIgnoreCase(slKc.getWPXH()))
@ -140,8 +267,8 @@ public class PgdSljhController {
dmYdjh.setSlxhth(slKc.getGCDDH());
dmYdjh.setSlhth(slKc.getDcFd());
dmYdjh.setSlwlh(slKc.getWPH());
dmYdjh.setZt("11");
dmYdjh.setKcbs("01");
dmYdjh.setSlycldw((Integer) map.get("dw"));
// ImCkwpkwp imCkwpkwp =new ImCkwpkwp();
// imCkwpkwp.setCkh(slKc.getCKH());
@ -156,11 +283,13 @@ public class PgdSljhController {
ydupList.add(dmYdjh);
// ckupList.add(imCkwpkwp);
slKc.setZYLX(getLx(dmYdjh.getLqlb(), dmYdjh.getZl()));
slKc.setZYCH(dmYdjh.getDcCh());
slKc.setZYPL(dmYdjh.getDcPl());
slKc.setZYLX(dmYdjh.getZl());
// slKc.setZYLX(dmYdjh.getZl());
slKc.setSLDW(dmYdjh.getKw());
slKc.setDHH(dmYdjh.getSljhrq());
//slKc.setPwwz(dmYdjh.getKw());
slKc.setYdid(dmYdjh.getId());
ydjhs.remove(dmYdjh); // 从列表中移除找到的元素
ckupList.add(slKc);
@ -176,7 +305,7 @@ public class PgdSljhController {
@PostMapping("kcAdnSlZx")
@ResponseBody
public void kcAdnSlZx(HttpServletRequest req, @RequestBody Map map) throws Exception, CustomException {
public ResultBean kcAdnSlZx(HttpServletRequest req, @RequestBody Map map) throws Exception, CustomException {
String str= JSON.toJSONString(map.get("data1"));
List<SlKc> slKcs= JSONObject.parseArray(str, SlKc.class);
@ -198,12 +327,15 @@ public class PgdSljhController {
imCkwpkwp.setZypl(slKc.getZYPL());
imCkwpkwp.setZylx(slKc.getZYLX());
imCkwpkwp.setSldw(slKc.getSLDW());
imCkwpkwp.setPwwz(slKc.getPwwz());
imCkwpkwp.setBz(slKc.getBZ());
imCkwpkwp.setDhh(slKc.getDHH());
ckupList.add(imCkwpkwp);
}
imCkwpkwpService.updateBatchByMultiId(ckupList);
dmYdjhService.updateBatchById(ydjhs);
return new ResultBean();
//
}
@ -269,5 +401,60 @@ public class PgdSljhController {
// return new ResultBean();
// }
public String getLx(String lqlb ,String zl){
// 1000 数中大
// 1001 数小
// 1002 数中
// 1003 数大
// 1004 数曲
// 1005 手小
// 1006 手中
// 1007 手大
// 1008 手中大
// 1009 焊接机器人肘板 --
// 1010 手工
// 1020 数控
if("1010".equals(lqlb)){
if("1110".equals(zl)){ //数中大
return "1000";
}
if("1010".equals(zl)){ //数小
return "1001";
}
if("1020".equals(zl)){ //数中
return "1002";
}
if("1060".equals(zl)){ //数大
return "1003";
}
if("4207".equals(zl)||"1090".equals(zl)){ //数大
return "1004";
}
}
if("1020".equals(lqlb)){
if("1110".equals(zl)){ //手中大
return "1008";
}
if("1010".equals(zl)){ //数小
return "1005";
}
if("1020".equals(zl)){ //数中
return "1006";
}
if("1060".equals(zl)){ //数大
return "1007";
}
}
if("4230".equals(zl)){ //焊接机器人肘板
return "1009";
}
return "";
}
}

@ -13,7 +13,9 @@ import com.dsic.gj_erp.bean.jcsj.DmDwxxp;
import com.dsic.gj_erp.bean.jcsj.EmSbjgry;
import com.dsic.gj_erp.bean.jhgk.DmTzjh;
import com.dsic.gj_erp.bean.pgd.PgdTzjh;
import com.dsic.gj_erp.bean.sy.Dm_zhbmp;
import com.dsic.gj_erp.bean.zyjh.Ycldw;
import com.dsic.gj_erp.dao.sy.Dm_zhbmpRepository;
import com.dsic.gj_erp.exception.CustomException;
import com.dsic.gj_erp.service.jcsj.DmBclqjbpService;
import com.dsic.gj_erp.service.jcsj.DmBclqmxpService;
@ -55,7 +57,8 @@ public class PgdTzjhController {
DmDwxxpService dwxxpService;
@Autowired
YcldwService ycldwService;
@Autowired
Dm_zhbmpRepository dm_zhbmpRepository;
@Autowired
@ -135,6 +138,21 @@ public class PgdTzjhController {
returnMap.put("ycldws", ycldws);
returnMap.put("bmbm", bmbm);
List<Dm_zhbmp> qgkws = dm_zhbmpRepository.findByBMLB("QGKW");
List<Dm_zhbmp> zylxs = dm_zhbmpRepository.findByBMLB("zylx");
List<Dm_zhbmp> pwwzs = dm_zhbmpRepository.findByBMLB("pwwz");
List<Dm_zhbmp> dhql = dm_zhbmpRepository.findByBMLB("DHQL");
// Map<String, String> qgKwMap = qgkws.stream().collect(Collectors.toMap(Dm_zhbmp::getBM, Dm_zhbmp::getBmsm));
// Map<String, String> zylxMap = zylxs.stream().collect(Collectors.toMap(Dm_zhbmp::getBM, Dm_zhbmp::getBmsm));
// Map<String, String> pwwzMap = pwwzs.stream().collect(Collectors.toMap(Dm_zhbmp::getBM, Dm_zhbmp::getBmsm));
// Map<String, String> dhqlMap = dhql.stream().collect(Collectors.toMap(Dm_zhbmp::getBM, Dm_zhbmp::getBmsm));
returnMap.put("qgkw", qgkws);
returnMap.put("zylx", zylxs);
returnMap.put("pwwz", pwwzs);
returnMap.put("dhql", dhql);
/// zylx 流向 pwwz 抛丸位置 // QGKW 切割跨位
return new ResultBean(returnMap);
}

@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.dsic.gj_erp.annotation.AuthFunction;
import com.dsic.gj_erp.bean.ResultBean;
@ -25,7 +26,9 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("zyjh")
@ -129,7 +132,32 @@ public class ZyjhController {
}
}
if ("PWFK".equals(dto.getZxZtName())){
List<YcldwInfo> ycldwInfos = ycldwInfoService.updatePwWeb(list);
for(YcldwInfo y :ycldwInfos){
wsHandler.sendPwComplete((JSONObject) JSONObject.toJSON(y));
}
}
if ("HXFK".equals(dto.getZxZtName())){
List<YcldwInfo> ycldwInfos = ycldwInfoService.updatePwWeb(list);
for(YcldwInfo y :ycldwInfos){
wsHandler.sendHXComplete((JSONObject) JSONObject.toJSON(y));
}
}
if ("QGFK".equals(dto.getZxZtName())){
//无需划线,从理料间获取时才更新垛位信息
if ("42".equals(dto.getZt())){
ycldwInfoService.updatePwWeb(list);
}
wsHandler.sendHXComplete((JSONObject) JSONObject.toJSON(dto.getYcldwInfo()));
wsHandler.sendQGComplete((JSONObject) JSONObject.toJSON(dto.getYcldwInfo()));
}
zyjhService.updateBatchById(list);
return new ResultBean<>();
} catch (NoSuchFieldException | IllegalAccessException e) {
throw new ServiceException(10001,"属性字段不存在");
@ -217,52 +245,7 @@ public class ZyjhController {
@PostMapping("slweb")
@Transactional(rollbackFor = Exception.class)
@AuthFunction
public ResultBean<?> slweb(@RequestBody List<DmYdjh> ydjhs, HttpServletRequest request) {
for(DmYdjh dmYdjh :ydjhs){
ShangLiao shangLiao = new ShangLiao();
dmYdjh.setSlfkrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm:ss"));
dmYdjh.setSlfkry( (String) request.getAttribute("yhms"));
shangLiao.setYdjh(dmYdjh);
// shangLiao.setCkwpkwp();
// shangLiao.setPgdId();
shangLiao.setDwId(dmYdjh.getSlycldw());
shangLiao.setCeng(dmYdjh.getSlyclcs());
shangLiao.setCzbh(dmYdjh.getDcCh());
shangLiao.setPl(dmYdjh.getDcPl());
shangLiao.setFd(dmYdjh.getDcFd());
shangLiao.setKw(dmYdjh.getKw());
shangLiao.setZl(dmYdjh.getZl());
shangLiao.setTlth(dmYdjh.getTzbh());
// shangLiao.setWph(dmYdjh.getm);
shangLiao.setWpgg(dmYdjh.getWpgg());
shangLiao.setSljhrq(dmYdjh.getSljhrq());
shangLiao.setQgjhrq(dmYdjh.getSljhrq());
shangLiao.setBfr( (String) request.getAttribute("yhms"));
shangLiao.setType(Ycldw.DwTypeEnum.YCL);
//更新预处理垛位信息
if (!shangLiao.checkCkwp()){
//throw new ServiceException(10009,"物品库存不存在,或库存信息错误");
}
YcldwInfo info=ycldwInfoService.updateForSl(shangLiao);
//更新月度计划上料相关字段
zyjhService.updateForSl(shangLiao);
//todo 更新库存信息
wsHandler.sendSlComplete((JSONObject)JSONObject.toJSON(info));
}
return new ResultBean<>();
}
/**
*
*/

@ -18,5 +18,6 @@ public interface DmBchxylpMapper extends BaseMapper<DmBchxylp> {
public List<DmBchxylp> getBcTJlList(Map map);
public List<DmBchxylp> getYlListAdd(Map map);
}

@ -179,6 +179,10 @@ public class SYService {
if (f_qz.equals("年月")){
f_qz= DateUtil.format(DateUtil.date(),"yyMM");
}
if (f_qz.equals("年月日")){
f_qz= DateUtil.format(DateUtil.date(),"yyMMdd");
}
}
//确定编码前缀值结束

@ -1,12 +1,16 @@
package com.dsic.gj_erp.service.zyjh;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsic.gj_erp.bean.jhgk.DmYdjh;
import com.dsic.gj_erp.bean.zyjh.YcldwInfo;
import com.dsic.gj_erp.controller.zyjh.dto.ShangLiao;
import com.dsic.gj_erp.mapper.zyjh.YcldwInfoMapper;
import org.springframework.stereotype.Service;
import javax.transaction.Transactional;
import java.util.ArrayList;
import java.util.List;
@Service
public class YcldwInfoService extends ServiceImpl<YcldwInfoMapper, YcldwInfo> {
@ -23,7 +27,26 @@ public class YcldwInfoService extends ServiceImpl<YcldwInfoMapper, YcldwInfo> {
@Transactional(rollbackOn = Exception.class)
public void updatePw(YcldwInfo info){
this.removeById(info.getId());
baseMapper.pwfk(info.getCeng(),info.getDwId());
}
@Transactional(rollbackOn = Exception.class)
public List<YcldwInfo> updatePwWeb(List<DmYdjh> list){
List<YcldwInfo> ad =new ArrayList<>();
for(DmYdjh info :list){
YcldwInfo ydid = this.getOne(new QueryWrapper<YcldwInfo>().eq("ydid", info.getId()));
if(null!= ydid){
ad.add(ydid);
}
this.remove(new QueryWrapper<YcldwInfo>().eq("ydid",info.getId()));
}
return ad;
}
}

@ -13,8 +13,8 @@ public class ZyjhService extends ServiceImpl<DmYdjhMapper,DmYdjh> {
public void updateForSl(ShangLiao sl){
LambdaUpdateWrapper<DmYdjh> wrapper = Wrappers.<DmYdjh>lambdaUpdate()
.set(DmYdjh::getSlkcdw, sl.getYdjh().getSlkcdw())
.set(DmYdjh::getSlcs, sl.getYdjh().getSlcs())
.set(DmYdjh::getSlycldw, sl.getYdjh().getSlycldw())
.set(DmYdjh::getSlyclcs, sl.getYdjh().getSlyclcs())
.set(DmYdjh::getSlfkrq, sl.getYdjh().getSlfkrq())
.set(DmYdjh::getSlfkry, sl.getYdjh().getSlfkry())
.eq(DmYdjh::getId, sl.getYdjh().getId());

@ -114,4 +114,54 @@
order by dc_ch,dc_pl,dc_zl,tzbh
</select>
<select id="getYlListAdd" parameterType="map" resultType="com.dsic.gj_erp.bean.jcsj.DmBchxylp">
SELECT dm_bchxylp.hxbh,
dm_bchxylp.xh,
dm_bchxylp.ylbh,
dm_bchxylp.tzbh,
dm_bchxylp.hxfl,
dm_bchxylp.wpgg,
dm_bchxylp.wpxh,
dm_bchxylp.jldw,
dm_bchxylp.ylzl,
dm_bchxylp.bz,
dm_bchxylp.zdr,
dm_bchxylp.zdrq,
dm_bchxylp.ylzd1,
dm_bchxylp.ylzd2,
dm_bchxylp.ylzd3,
dm_bchxylp.ylzd4,
dm_bchxylp.ylzd5,
dm_bchxylp.ylzd6,
dm_bchxylp.kwh,
dm_bchxylp.rkrq,
dm_bchxylp.bgr,
dm_bchxylp.rkph,
dm_bchxylp.rkbs,
dm_bchxylp.dc_ch,
dm_bchxylp.dc_pl,
dm_bchxylp.dc_zl,
dm_bchxylp.sfyl,
dm_bchxylp.ylgg,
convert(int,left(dm_bchxylp.ylgg,charindex('*',dm_bchxylp.ylgg) - 1)) as wpgg1,
dm_bchxylp.sl,
dm_bchxylp.xcmc ,
dm_bchxylp.ZZCJ ,
'N' as bs,
'N' as bs_all
FROM dm_bchxylp
<if test=" dcpl!=null and dcpl!=''">
and dm_bchxylp.dc_pl=#{dcpl}
</if>
<if test=" dcch!=null and dcch!=''">
and dm_bchxylp.DC_CH=#{dcch}
</if>
<if test=" tzbh!=null and tzbh!=''">
and dm_bchxylp.tzbh=#{tzbh}
</if>
order by dc_ch,dc_pl,dc_zl,tzbh
</select>
</mapper>

@ -77,16 +77,28 @@
<if test="dcch != null and dcch!=''">
and IM_CKWPKWP.dc_ch=#{dcch}
</if>
<if test="pl != null and pl!=''">
and IM_CKWPKWP.dc_pl=#{pl}
<if test="ql!= null and ql!=''">
and IM_CKWPKWP.dzwz=#{ql}
</if>
<if test="rqopt=='01'.toString() ">
and ( isnull(IM_CKWPKWP.ydid,'')='' and isnull(IM_CKWPKWP.sllsh,'')='' )
and isnull(IM_CKWPKWP.zych,'')=''
-- and ( isnull(IM_CKWPKWP.ydid,'')='' and isnull(IM_CKWPKWP.sllsh,'')='' )
</if>
<if test="rqopt=='02'.toString() ">
and (isnull(IM_CKWPKWP.ydid,'')&lt;&gt;'' or isnull(IM_CKWPKWP.sllsh,'')&lt;&gt;'')
and isnull(IM_CKWPKWP.zych,'')&lt;&gt;'' and isnull(IM_CKWPKWP.sllsh,'')=''
-- and (isnull(IM_CKWPKWP.ydid,'')&lt;&gt;'' or isnull(IM_CKWPKWP.sllsh,'')&lt;&gt;'')
</if>
<if test="rqopt=='03'.toString() ">
and isnull(IM_CKWPKWP.zych,'')&lt;&gt;'' and isnull(IM_CKWPKWP.sllsh,'')&lt;&gt;''
</if>
<if test="rqopt=='03'.toString() ">
and isnull(IM_CKWPKWP.zych,'')&lt;&gt;'' and isnull(IM_CKWPKWP.sllsh,'')&lt;&gt;''
</if>
order by IM_CKWPKWP.kwh,IM_CKWPKWP.cfcs1
order by IM_CKWPKWP.kwh,IM_CKWPKWP.cfcs1 desc
</select>
</mapper>

Loading…
Cancel
Save