|
@@ -35,8 +35,8 @@ import org.springblade.core.tool.utils.BeanUtil;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
import org.springblade.los.box.dto.ExportTradingBoxItemOut;
|
|
import org.springblade.los.box.dto.ExportTradingBoxItemOut;
|
|
|
import org.springblade.los.box.dto.ExportTradingBoxItemOutEn;
|
|
import org.springblade.los.box.dto.ExportTradingBoxItemOutEn;
|
|
|
|
|
+import org.springblade.los.box.dto.ExportTradingBoxItemTZ;
|
|
|
import org.springblade.los.box.dto.ExportTradingBoxOut;
|
|
import org.springblade.los.box.dto.ExportTradingBoxOut;
|
|
|
-import org.springblade.los.box.entity.PutBox;
|
|
|
|
|
import org.springblade.los.box.entity.TradingBox;
|
|
import org.springblade.los.box.entity.TradingBox;
|
|
|
import org.springblade.los.box.entity.TradingBoxItem;
|
|
import org.springblade.los.box.entity.TradingBoxItem;
|
|
|
import org.springblade.los.box.service.ITradingBoxItemService;
|
|
import org.springblade.los.box.service.ITradingBoxItemService;
|
|
@@ -127,10 +127,10 @@ public class TradingBoxController extends BladeController {
|
|
|
.eq(ObjectUtils.isNotNull(tradingBox.getDc()), TradingBox::getDc, tradingBox.getDc())
|
|
.eq(ObjectUtils.isNotNull(tradingBox.getDc()), TradingBox::getDc, tradingBox.getDc())
|
|
|
;
|
|
;
|
|
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
- if (ObjectUtils.isNotNull(tradingBox.getEffectiveDate()) ) {
|
|
|
|
|
|
|
+ if (ObjectUtils.isNotNull(tradingBox.getEffectiveDate())) {
|
|
|
lambdaQueryWrapper.apply(ObjectUtils.isNotNull(tradingBox.getEffectiveDate()), "DATE_FORMAT(effective_date,'%Y-%m-%d') >= '" + formatter.format(tradingBox.getEffectiveDate()) + "'");
|
|
lambdaQueryWrapper.apply(ObjectUtils.isNotNull(tradingBox.getEffectiveDate()), "DATE_FORMAT(effective_date,'%Y-%m-%d') >= '" + formatter.format(tradingBox.getEffectiveDate()) + "'");
|
|
|
}
|
|
}
|
|
|
- if ( ObjectUtils.isNotNull(tradingBox.getExpiryDate())) {
|
|
|
|
|
|
|
+ if (ObjectUtils.isNotNull(tradingBox.getExpiryDate())) {
|
|
|
lambdaQueryWrapper.apply(ObjectUtils.isNotNull(tradingBox.getExpiryDate()), "DATE_FORMAT(expiry_date,'%Y-%m-%d') >= '" + formatter.format(tradingBox.getExpiryDate()) + "'");
|
|
lambdaQueryWrapper.apply(ObjectUtils.isNotNull(tradingBox.getExpiryDate()), "DATE_FORMAT(expiry_date,'%Y-%m-%d') >= '" + formatter.format(tradingBox.getExpiryDate()) + "'");
|
|
|
}
|
|
}
|
|
|
if (tradingBox.getEffectiveDateList() != null && tradingBox.getEffectiveDateList().size() > 1) {
|
|
if (tradingBox.getEffectiveDateList() != null && tradingBox.getEffectiveDateList().size() > 1) {
|
|
@@ -170,7 +170,7 @@ public class TradingBoxController extends BladeController {
|
|
|
.le(TradingBox::getExpiryDate, calendar1.getTime())
|
|
.le(TradingBox::getExpiryDate, calendar1.getTime())
|
|
|
.ne(TradingBox::getSuitcaseNum, 0);
|
|
.ne(TradingBox::getSuitcaseNum, 0);
|
|
|
lambdaQueryWrapper.apply("suitcase_num != box_number - cancel_number");
|
|
lambdaQueryWrapper.apply("suitcase_num != box_number - cancel_number");
|
|
|
- }else if ("5".equals(tradingBox.getWhetherDisplay())) {
|
|
|
|
|
|
|
+ } else if ("5".equals(tradingBox.getWhetherDisplay())) {
|
|
|
lambdaQueryWrapper.apply("suitcase_num = box_number - cancel_number");
|
|
lambdaQueryWrapper.apply("suitcase_num = box_number - cancel_number");
|
|
|
}
|
|
}
|
|
|
lambdaQueryWrapper.orderByDesc(TradingBox::getCreateTime);
|
|
lambdaQueryWrapper.orderByDesc(TradingBox::getCreateTime);
|
|
@@ -293,6 +293,7 @@ public class TradingBoxController extends BladeController {
|
|
|
);
|
|
);
|
|
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
List<ExportTradingBoxItemOut> outList = new ArrayList<>();
|
|
List<ExportTradingBoxItemOut> outList = new ArrayList<>();
|
|
|
|
|
+ List<ExportTradingBoxItemTZ> tZList = new ArrayList<>();
|
|
|
List<ExportTradingBoxItemOutEn> outListEn = new ArrayList<>();
|
|
List<ExportTradingBoxItemOutEn> outListEn = new ArrayList<>();
|
|
|
for (TradingBoxItem item : tradingBoxItemList) {
|
|
for (TradingBoxItem item : tradingBoxItemList) {
|
|
|
if ("OW-N,OW-F".contains(detail.getType())) {
|
|
if ("OW-N,OW-F".contains(detail.getType())) {
|
|
@@ -325,6 +326,14 @@ public class TradingBoxController extends BladeController {
|
|
|
export.setMblno(item.getMblno());
|
|
export.setMblno(item.getMblno());
|
|
|
export.setHblno(item.getHblno());
|
|
export.setHblno(item.getHblno());
|
|
|
outListEn.add(export);
|
|
outListEn.add(export);
|
|
|
|
|
+ } else if ("TZ".contains(detail.getType())) {
|
|
|
|
|
+ ExportTradingBoxItemTZ itemTZ = new ExportTradingBoxItemTZ();
|
|
|
|
|
+ itemTZ.setContractNo(detail.getContractNo());
|
|
|
|
|
+ itemTZ.setCode(item.getCode());
|
|
|
|
|
+ itemTZ.setBoxType(item.getBoxType());
|
|
|
|
|
+ itemTZ.setStationCname(item.getStationCname());
|
|
|
|
|
+ itemTZ.setRentingOutDate(item.getRentingOutDate());
|
|
|
|
|
+ tZList.add(itemTZ);
|
|
|
} else {
|
|
} else {
|
|
|
ExportTradingBoxItemOut data = new ExportTradingBoxItemOut();
|
|
ExportTradingBoxItemOut data = new ExportTradingBoxItemOut();
|
|
|
data.setBoxEastName(item.getBoxEastName());
|
|
data.setBoxEastName(item.getBoxEastName());
|
|
@@ -340,6 +349,8 @@ public class TradingBoxController extends BladeController {
|
|
|
}
|
|
}
|
|
|
if ("OW-N,OW-F".contains(detail.getType())) {
|
|
if ("OW-N,OW-F".contains(detail.getType())) {
|
|
|
ExcelUtil.export(response, "箱明细", "箱明细", outListEn, ExportTradingBoxItemOutEn.class);
|
|
ExcelUtil.export(response, "箱明细", "箱明细", outListEn, ExportTradingBoxItemOutEn.class);
|
|
|
|
|
+ } else if ("TZ".contains(detail.getType())) {
|
|
|
|
|
+ ExcelUtil.export(response, "退租箱明细", "退租箱明细", tZList, ExportTradingBoxItemTZ.class);
|
|
|
} else {
|
|
} else {
|
|
|
ExcelUtil.export(response, "箱明细", "箱明细", outList, ExportTradingBoxItemOut.class);
|
|
ExcelUtil.export(response, "箱明细", "箱明细", outList, ExportTradingBoxItemOut.class);
|
|
|
}
|
|
}
|
|
@@ -555,7 +566,7 @@ public class TradingBoxController extends BladeController {
|
|
|
* 删除 配箱信息并同步修改状态数据
|
|
* 删除 配箱信息并同步修改状态数据
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("/removeById")
|
|
@GetMapping("/removeById")
|
|
|
- public R removeById( @RequestParam("ids") String ids) {
|
|
|
|
|
|
|
+ public R removeById(@RequestParam("ids") String ids) {
|
|
|
return tradingBoxService.deleteById(ids);
|
|
return tradingBoxService.deleteById(ids);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -571,7 +582,7 @@ public class TradingBoxController extends BladeController {
|
|
|
* 同步放箱号-箱明细信息
|
|
* 同步放箱号-箱明细信息
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("/synchronizationBoxInformation")
|
|
@GetMapping("/synchronizationBoxInformation")
|
|
|
- public R synchronizationBoxInformation( @RequestParam("id") Long id) {
|
|
|
|
|
|
|
+ public R synchronizationBoxInformation(@RequestParam("id") Long id) {
|
|
|
return tradingBoxService.synchronizationBoxInformation(id);
|
|
return tradingBoxService.synchronizationBoxInformation(id);
|
|
|
}
|
|
}
|
|
|
|
|
|