余料退回明细表

master
赵嘉伟 3 years ago
parent 74c629c0ca
commit 0d2905b383

@ -6,14 +6,12 @@ package com.foreverwin.mesnac.anomaly.controller;
* @Since 2021-08-23
*/
import com.foreverwin.mesnac.anomaly.dto.PartsManufacturing;
import com.foreverwin.mesnac.anomaly.service.ReportService;
import com.foreverwin.mesnac.integration.model.IntegrationLog;
import com.foreverwin.modular.core.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/REPORT")
@ -39,4 +37,13 @@ public class Report {
return R.failed(e.getMessage());
}
}
@GetMapping("/surplusReturnTable")
public R surplusReturnTable(String item,String itemDescription){
try{
return R.ok(reportService.surplusReturnTable(item,itemDescription));
}catch(Exception e){
return R.failed(e.getMessage());
}
}
}

@ -1,5 +1,6 @@
package com.foreverwin.mesnac.anomaly.mapper;
import com.foreverwin.mesnac.anomaly.dto.PartsManufacturing;
import com.foreverwin.mesnac.integration.model.IntegrationLog;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@ -18,4 +19,8 @@ public interface ReportMapper {
List<Map<String,Object>> findIntegrationLog(@Param("integration") IntegrationLog integration);
List<Map<String, Object>> partsManufacturing(@Param("site")String site,@Param("locale")String locale, @Param("partsManufacturing") PartsManufacturing partsManufacturing);
List<Map<String,Object>> surplusReturnTable(@Param("site")String site, @Param("locale")String locale,
@Param("item")String item, @Param("itemDescription")String itemDescription);
}

@ -1,5 +1,6 @@
package com.foreverwin.mesnac.anomaly.service;
import com.foreverwin.mesnac.anomaly.dto.PartsManufacturing;
import com.foreverwin.mesnac.integration.model.IntegrationLog;
import java.util.List;
@ -14,4 +15,6 @@ public interface ReportService {
List<Map<String,Object>> findIntegrationLog(IntegrationLog integration);
List<Map<String, Object>> partsManufacturing(PartsManufacturing partsManufacturing);
List<Map<String, Object>> surplusReturnTable(String item, String itemDescription);
}

@ -1,5 +1,6 @@
package com.foreverwin.mesnac.anomaly.service.impl;
import com.foreverwin.mesnac.anomaly.dto.PartsManufacturing;
import com.foreverwin.mesnac.anomaly.mapper.ReportMapper;
import com.foreverwin.mesnac.anomaly.service.ReportService;
import com.foreverwin.mesnac.integration.model.IntegrationLog;
@ -47,4 +48,11 @@ public class ReportServiceImpl implements ReportService {
String locale = LocaleContextHolder.getLocale().getLanguage();
return reportMapper.partsManufacturing(site,locale,partsManufacturing);
}
@Override
public List<Map<String, Object>> surplusReturnTable(String item, String itemDescription) {
String locale = LocaleContextHolder.getLocale().getLanguage();
String site = CommonMethods.getSite();
return reportMapper.surplusReturnTable(site,locale,item,itemDescription);
}
}

@ -70,4 +70,22 @@
</if>
</where>
</select>
<select id="surplusReturnTable" resultType="map">
SELECT ZSR.INVENTORY INVENTORY,ZSR.ITEM_BO ITEM_BO,IT.DESCRIPTION ITEM_DESCRIPTION,ZSR.LENGHT LENGHT,
ZSR.WIDTH WIDTH,ZSR.NUMBERS NUMBERS,ZSR.QTY QTY,ZSR.CREATED_DATE_TIME CREATED_DATE_TIME
FROM
Z_SURPLUS_RETURN ZSR
INNER JOIN ITEM I ON I.HANDLE = ZSR.ITEM_BO
INNER JOIN ITEM_T IT ON IT.ITEM_BO = I.HANDLE
<where>
ZSR.SITE = #{site}
<if test="item != null and item != ''">
AND I.ITEM LIKE '%${item}%'
</if>
<if test="itemDescription != null and itemDescription != ''">
AND IT.DESCRIPTION LIKE '%${itemDescription}%'
</if>
</where>
</select>
</mapper>

@ -65,13 +65,4 @@ public class SurplusReturnController {
return R.ok(0,"物料条码【" +inventory+ "】余料退回操作成功!");
}
@GetMapping("/surplusReturnTable")
public R surplusReturnTable(String item,String itemDescription){
try{
return R.ok(surplusReturnService.surplusReturnTable(item,itemDescription));
}catch(Exception e){
return R.failed(e.getMessage());
}
}
}

@ -5,7 +5,6 @@ import com.foreverwin.mesnac.dispatch.model.SurplusReturn;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
@ -28,6 +27,4 @@ public interface SurplusReturnMapper extends BaseMapper<SurplusReturn> {
*/
Map<String, Object> selectInventoryData(@Param("inventoryBo") String inventoryBo);
List<SurplusReturn> surplusReturnTable(@Param("site")String site, @Param("locale")String locale,
@Param("item")String item, @Param("itemDescription")String itemDescription);
}

@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.mesnac.dispatch.model.SurplusReturn;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
/**
@ -42,6 +41,4 @@ public interface SurplusReturnService extends IService<SurplusReturn> {
*/
void surplusReturn(String site, String user, String inventory, String length, String width, BigDecimal numbers, BigDecimal qty);
List<SurplusReturn> surplusReturnTable(String item,String itemDescription);
}

@ -225,10 +225,5 @@ public class SurplusReturnServiceImpl extends ServiceImpl<SurplusReturnMapper, S
printLogService.save(printLog);
}
@Override
public List<SurplusReturn> surplusReturnTable(String item, String itemDescription) {
String locale = LocaleContextHolder.getLocale().getLanguage();
String site = CommonMethods.getSite();
return surplusReturnMapper.surplusReturnTable(site,locale,item,itemDescription);
}
}

@ -458,21 +458,4 @@
WHERE IV.HANDLE = #{inventoryBo}
</select>
<select id="surplusReturnTable" resultMap="BaseResultMap">
SELECT ZSR.INVENTORY INVENTORY,ZSR.ITEM_BO ITEM_BO,IT.DESCRIPTION ITEM_DESCRIPTION,ZSR.LENGHT LENGHT,
ZSR.WIDTH WIDTH,ZSR.NUMBERS NUMBERS,ZSR.QTY QTY,ZSR.CREATED_DATE_TIME CREATED_DATE_TIME
FROM
Z_SURPLUS_RETURN ZSR
INNER JOIN ITEM I ON I.HANDLE = ZSR.ITEM_BO
INNER JOIN ITEM_T IT ON IT.ITEM_BO = I.HANDLE
<where>
ZSR.SITE = #{site}
<if test="item != null and item != ''">
AND I.ITEM LIKE '%${item}%'
</if>
<if test="itemDescription != null and itemDescription != ''">
AND IT.DESCRIPTION LIKE '%${itemDescription}%'
</if>
</where>
</select>
</mapper>

Loading…
Cancel
Save