物流周转
parent
ec03738f92
commit
f2fc8f8964
@ -0,0 +1,132 @@
|
||||
package com.foreverwin.mesnac.meapi.controller;
|
||||
|
||||
import com.foreverwin.modular.core.util.R;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import com.foreverwin.modular.core.util.CommonMethods;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.foreverwin.mesnac.meapi.service.LocationService;
|
||||
import com.foreverwin.mesnac.meapi.model.Location;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author YANG.WL
|
||||
* @since 2022-08-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/Z-LOCATION")
|
||||
public class LocationController {
|
||||
|
||||
@Autowired
|
||||
public LocationService locationService;
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/{id:.+}")
|
||||
public R getLocationById(@PathVariable String id) {
|
||||
return R.ok( locationService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("")
|
||||
public R getLocationList(Location location){
|
||||
List<Location> result;
|
||||
QueryWrapper<Location> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(location);
|
||||
result = locationService.list(queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询数据
|
||||
*
|
||||
* @param frontPage 分页信息
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/page")
|
||||
public R page(FrontPage<Location> frontPage, Location location){
|
||||
IPage result;
|
||||
QueryWrapper<Location> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(location);
|
||||
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
|
||||
//TODO modify global query
|
||||
queryWrapper.lambda().and(wrapper -> wrapper
|
||||
.like(Location::getHandle, frontPage.getGlobalQuery())
|
||||
.or().like(Location::getLocationCode, frontPage.getGlobalQuery())
|
||||
.or().like(Location::getWorkCenter, frontPage.getGlobalQuery())
|
||||
.or().like(Location::getDescription, frontPage.getGlobalQuery())
|
||||
);
|
||||
}
|
||||
result = locationService.page(frontPage.getPagePlus(), queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param location 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PostMapping
|
||||
public R save(@RequestBody Location location) {
|
||||
return R.ok(locationService.save(location));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param location 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PutMapping
|
||||
public R updateById(@RequestBody Location location) {
|
||||
return R.ok(locationService.updateById(location));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除对象
|
||||
* @param id 实体ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
|
||||
public R removeById(@PathVariable("id") String id){
|
||||
return R.ok(locationService.removeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除对象
|
||||
* @param ids 实体集合ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.POST, value = "/delete-batch")
|
||||
public R removeByIds(List<String> ids){
|
||||
return R.ok(locationService.removeByIds(ids));
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@GetMapping("/LOCATION")
|
||||
public Location getLocation(String code){
|
||||
Location location=new Location();
|
||||
location.setLocationCode(code);
|
||||
QueryWrapper<Location> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(location);
|
||||
location = locationService.getOne(queryWrapper);
|
||||
return location;
|
||||
}
|
||||
}
|
@ -0,0 +1,122 @@
|
||||
package com.foreverwin.mesnac.meapi.controller;
|
||||
|
||||
import com.foreverwin.modular.core.util.R;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import com.foreverwin.modular.core.util.CommonMethods;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.foreverwin.mesnac.meapi.service.LogisticsBillService;
|
||||
import com.foreverwin.mesnac.meapi.model.LogisticsBill;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author YANG.WL
|
||||
* @since 2022-08-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/Z-LOGISTICS-BILL")
|
||||
public class LogisticsBillController {
|
||||
|
||||
@Autowired
|
||||
public LogisticsBillService logisticsBillService;
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/{id:.+}")
|
||||
public R getLogisticsBillById(@PathVariable String id) {
|
||||
return R.ok( logisticsBillService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("")
|
||||
public R getLogisticsBillList(LogisticsBill logisticsBill){
|
||||
List<LogisticsBill> result;
|
||||
QueryWrapper<LogisticsBill> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(logisticsBill);
|
||||
result = logisticsBillService.list(queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询数据
|
||||
*
|
||||
* @param frontPage 分页信息
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/page")
|
||||
public R page(FrontPage<LogisticsBill> frontPage, LogisticsBill logisticsBill){
|
||||
IPage result;
|
||||
QueryWrapper<LogisticsBill> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(logisticsBill);
|
||||
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
|
||||
//TODO modify global query
|
||||
queryWrapper.lambda().and(wrapper -> wrapper
|
||||
.like(LogisticsBill::getLogisticsBillNo, frontPage.getGlobalQuery())
|
||||
.or().like(LogisticsBill::getLogisticsBo, frontPage.getGlobalQuery())
|
||||
.or().like(LogisticsBill::getOther1, frontPage.getGlobalQuery())
|
||||
.or().like(LogisticsBill::getOther2, frontPage.getGlobalQuery())
|
||||
.or().like(LogisticsBill::getOther3, frontPage.getGlobalQuery())
|
||||
);
|
||||
}
|
||||
result = logisticsBillService.page(frontPage.getPagePlus(), queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param logisticsBill 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PostMapping
|
||||
public R save(@RequestBody LogisticsBill logisticsBill) {
|
||||
return R.ok(logisticsBillService.save(logisticsBill));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param logisticsBill 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PutMapping
|
||||
public R updateById(@RequestBody LogisticsBill logisticsBill) {
|
||||
return R.ok(logisticsBillService.updateById(logisticsBill));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除对象
|
||||
* @param id 实体ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
|
||||
public R removeById(@PathVariable("id") String id){
|
||||
return R.ok(logisticsBillService.removeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除对象
|
||||
* @param ids 实体集合ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.POST, value = "/delete-batch")
|
||||
public R removeByIds(List<String> ids){
|
||||
return R.ok(logisticsBillService.removeByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.foreverwin.mesnac.meapi.mapper;
|
||||
|
||||
import com.foreverwin.mesnac.meapi.model.Location;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author YANG.WL
|
||||
* @since 2022-08-04
|
||||
*/
|
||||
@Repository
|
||||
public interface LocationMapper extends BaseMapper<Location> {
|
||||
|
||||
Location getLocation(String locationcode);
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.foreverwin.mesnac.meapi.mapper;
|
||||
|
||||
import com.foreverwin.mesnac.meapi.model.LogisticsBill;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author YANG.WL
|
||||
* @since 2022-08-05
|
||||
*/
|
||||
@Repository
|
||||
public interface LogisticsBillMapper extends BaseMapper<LogisticsBill> {
|
||||
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
package com.foreverwin.mesnac.meapi.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author YANG.WL
|
||||
* @since 2022-08-04
|
||||
*/
|
||||
|
||||
@TableName("Z_LOCATION")
|
||||
|
||||
public class Location extends Model<Location> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableField("HANDLE")
|
||||
private String handle;
|
||||
/**
|
||||
* 库位码
|
||||
*/
|
||||
@TableField("LOCATION_CODE")
|
||||
private String locationCode;
|
||||
/**
|
||||
* 所属车间
|
||||
*/
|
||||
@TableField("WORK_CENTER")
|
||||
private String workCenter;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("CREATED_DATE_TIME")
|
||||
private LocalDateTime createdDateTime;
|
||||
/**
|
||||
* 库位描述
|
||||
*/
|
||||
@TableField("DESCRIPTION")
|
||||
private String description;
|
||||
|
||||
|
||||
public String getHandle() {
|
||||
return handle;
|
||||
}
|
||||
|
||||
public void setHandle(String handle) {
|
||||
this.handle = handle;
|
||||
}
|
||||
|
||||
public String getLocationCode() {
|
||||
return locationCode;
|
||||
}
|
||||
|
||||
public void setLocationCode(String locationCode) {
|
||||
this.locationCode = locationCode;
|
||||
}
|
||||
|
||||
public String getWorkCenter() {
|
||||
return workCenter;
|
||||
}
|
||||
|
||||
public void setWorkCenter(String workCenter) {
|
||||
this.workCenter = workCenter;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreatedDateTime() {
|
||||
return createdDateTime;
|
||||
}
|
||||
|
||||
public void setCreatedDateTime(LocalDateTime createdDateTime) {
|
||||
this.createdDateTime = createdDateTime;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public static final String HANDLE = "HANDLE";
|
||||
|
||||
public static final String LOCATION_CODE = "LOCATION_CODE";
|
||||
|
||||
public static final String WORK_CENTER = "WORK_CENTER";
|
||||
|
||||
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
|
||||
|
||||
public static final String DESCRIPTION = "DESCRIPTION";
|
||||
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.handle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Location{" +
|
||||
"handle = " + handle +
|
||||
", locationCode = " + locationCode +
|
||||
", workCenter = " + workCenter +
|
||||
", createdDateTime = " + createdDateTime +
|
||||
", description = " + description +
|
||||
"}";
|
||||
}
|
||||
}
|
@ -0,0 +1,124 @@
|
||||
package com.foreverwin.mesnac.meapi.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author YANG.WL
|
||||
* @since 2022-08-05
|
||||
*/
|
||||
|
||||
@TableName("Z_LOGISTICS_BILL")
|
||||
|
||||
public class LogisticsBill extends Model<LogisticsBill> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 转运单号
|
||||
*/
|
||||
@TableField("LOGISTICS_BILL_NO")
|
||||
private String logisticsBillNo;
|
||||
/**
|
||||
* 转运任务主键
|
||||
*/
|
||||
@TableField("LOGISTICS_BO")
|
||||
private String logisticsBo;
|
||||
/**
|
||||
* 转运完成时间
|
||||
*/
|
||||
@TableField("COM_TIME")
|
||||
private LocalDateTime comTime;
|
||||
@TableField("OTHER1")
|
||||
private String other1;
|
||||
@TableField("OTHER2")
|
||||
private String other2;
|
||||
@TableField("OTHER3")
|
||||
private String other3;
|
||||
|
||||
|
||||
public String getLogisticsBillNo() {
|
||||
return logisticsBillNo;
|
||||
}
|
||||
|
||||
public void setLogisticsBillNo(String logisticsBillNo) {
|
||||
this.logisticsBillNo = logisticsBillNo;
|
||||
}
|
||||
|
||||
public String getLogisticsBo() {
|
||||
return logisticsBo;
|
||||
}
|
||||
|
||||
public void setLogisticsBo(String logisticsBo) {
|
||||
this.logisticsBo = logisticsBo;
|
||||
}
|
||||
|
||||
public LocalDateTime getComTime() {
|
||||
return comTime;
|
||||
}
|
||||
|
||||
public void setComTime(LocalDateTime comTime) {
|
||||
this.comTime = comTime;
|
||||
}
|
||||
|
||||
public String getOther1() {
|
||||
return other1;
|
||||
}
|
||||
|
||||
public void setOther1(String other1) {
|
||||
this.other1 = other1;
|
||||
}
|
||||
|
||||
public String getOther2() {
|
||||
return other2;
|
||||
}
|
||||
|
||||
public void setOther2(String other2) {
|
||||
this.other2 = other2;
|
||||
}
|
||||
|
||||
public String getOther3() {
|
||||
return other3;
|
||||
}
|
||||
|
||||
public void setOther3(String other3) {
|
||||
this.other3 = other3;
|
||||
}
|
||||
|
||||
public static final String LOGISTICS_BILL_NO = "LOGISTICS_BILL_NO";
|
||||
|
||||
public static final String LOGISTICS_BO = "LOGISTICS_BO";
|
||||
|
||||
public static final String COM_TIME = "COM_TIME";
|
||||
|
||||
public static final String OTHER1 = "OTHER1";
|
||||
|
||||
public static final String OTHER2 = "OTHER2";
|
||||
|
||||
public static final String OTHER3 = "OTHER3";
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LogisticsBill{" +
|
||||
"logisticsBillNo = " + logisticsBillNo +
|
||||
", logisticsBo = " + logisticsBo +
|
||||
", comTime = " + comTime +
|
||||
", other1 = " + other1 +
|
||||
", other2 = " + other2 +
|
||||
", other3 = " + other3 +
|
||||
"}";
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.foreverwin.mesnac.meapi.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.meapi.model.Location;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author YANG.WL
|
||||
* @since 2022-08-04
|
||||
*/
|
||||
public interface LocationService extends IService<Location> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param frontPage
|
||||
* @return
|
||||
*/
|
||||
IPage<Location> selectPage(FrontPage<Location> frontPage, Location location);
|
||||
|
||||
List<Location> selectList(Location location);
|
||||
|
||||
Location getLocation(String locationcode);
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.foreverwin.mesnac.meapi.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.meapi.model.LogisticsBill;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author YANG.WL
|
||||
* @since 2022-08-05
|
||||
*/
|
||||
public interface LogisticsBillService extends IService<LogisticsBill> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param frontPage
|
||||
* @return
|
||||
*/
|
||||
IPage<LogisticsBill> selectPage(FrontPage<LogisticsBill> frontPage, LogisticsBill logisticsBill);
|
||||
|
||||
List<LogisticsBill> selectList(LogisticsBill logisticsBill);
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.foreverwin.mesnac.meapi.service.impl;
|
||||
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.meapi.model.Location;
|
||||
import com.foreverwin.mesnac.meapi.mapper.LocationMapper;
|
||||
import com.foreverwin.mesnac.meapi.service.LocationService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author YANG.WL
|
||||
* @since 2022-08-04
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> implements LocationService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private LocationMapper locationMapper;
|
||||
|
||||
@Override
|
||||
public IPage<Location> selectPage(FrontPage<Location> frontPage, Location location) {
|
||||
QueryWrapper<Location> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(location);
|
||||
return super.page(frontPage.getPagePlus(), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Location> selectList(Location location) {
|
||||
QueryWrapper<Location> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(location);
|
||||
return super.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Location getLocation(String locationcode) {
|
||||
return locationMapper.getLocation(locationcode);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.foreverwin.mesnac.meapi.service.impl;
|
||||
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.meapi.model.LogisticsBill;
|
||||
import com.foreverwin.mesnac.meapi.mapper.LogisticsBillMapper;
|
||||
import com.foreverwin.mesnac.meapi.service.LogisticsBillService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author YANG.WL
|
||||
* @since 2022-08-05
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class LogisticsBillServiceImpl extends ServiceImpl<LogisticsBillMapper, LogisticsBill> implements LogisticsBillService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private LogisticsBillMapper logisticsBillMapper;
|
||||
|
||||
@Override
|
||||
public IPage<LogisticsBill> selectPage(FrontPage<LogisticsBill> frontPage, LogisticsBill logisticsBill) {
|
||||
QueryWrapper<LogisticsBill> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(logisticsBill);
|
||||
return super.page(frontPage.getPagePlus(), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LogisticsBill> selectList(LogisticsBill logisticsBill) {
|
||||
QueryWrapper<LogisticsBill> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(logisticsBill);
|
||||
return super.list(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,293 @@
|
||||
<?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.foreverwin.mesnac.meapi.mapper.LocationMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.Location">
|
||||
<result column="HANDLE" property="handle" />
|
||||
<result column="LOCATION_CODE" property="locationCode" />
|
||||
<result column="WORK_CENTER" property="workCenter" />
|
||||
<result column="CREATED_DATE_TIME" property="createdDateTime" />
|
||||
<result column="DESCRIPTION" property="description" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
HANDLE, LOCATION_CODE, WORK_CENTER, CREATED_DATE_TIME, DESCRIPTION
|
||||
</sql>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
<select id="selectByMap" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM Z_LOCATION
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectOne" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM Z_LOCATION
|
||||
<where>
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.handle}
|
||||
</if>
|
||||
<if test="ew.entity.locationCode!=null"> AND LOCATION_CODE=#{ew.entity.locationCode}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCount" resultType="Integer">
|
||||
SELECT COUNT(1) FROM Z_LOCATION
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.locationCode!=null"> AND LOCATION_CODE=#{ew.entity.locationCode}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOCATION
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.locationCode!=null"> AND LOCATION_CODE=#{ew.entity.locationCode}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMaps" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOCATION
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.locationCode!=null"> AND LOCATION_CODE=#{ew.entity.locationCode}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectObjs" resultType="Object">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOCATION
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.locationCode!=null"> AND LOCATION_CODE=#{ew.entity.locationCode}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectPage" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOCATION
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.locationCode!=null"> AND LOCATION_CODE=#{ew.entity.locationCode}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMapsPage" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOCATION
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.locationCode!=null"> AND LOCATION_CODE=#{ew.entity.locationCode}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getLocation" resultType="com.foreverwin.mesnac.meapi.model.Location">
|
||||
SELECT * FROM Z_LOCATION WHERE LOCATION_CODE=#{locationcode}
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.foreverwin.mesnac.meapi.model.Location">
|
||||
INSERT INTO Z_LOCATION
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
HANDLE,
|
||||
<if test="locationCode!=null">LOCATION_CODE,</if>
|
||||
<if test="workCenter!=null">WORK_CENTER,</if>
|
||||
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
|
||||
<if test="description!=null">DESCRIPTION,</if>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
<if test="locationCode!=null">#{locationCode},</if>
|
||||
<if test="workCenter!=null">#{workCenter},</if>
|
||||
<if test="createdDateTime!=null">#{createdDateTime},</if>
|
||||
<if test="description!=null">#{description},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.meapi.model.Location">
|
||||
INSERT INTO Z_LOCATION
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<include refid="Base_Column_List"></include>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
#{locationCode},
|
||||
#{workCenter},
|
||||
#{createdDateTime},
|
||||
#{description},
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<update id="update">
|
||||
UPDATE Z_LOCATION <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.handle!=null">HANDLE=#{et.handle},</if>
|
||||
<if test="et.locationCode!=null">LOCATION_CODE=#{et.locationCode},</if>
|
||||
<if test="et.workCenter!=null">WORK_CENTER=#{et.workCenter},</if>
|
||||
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
||||
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
|
||||
</trim>
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
<if test="ew.entity.locationCode!=null"> AND LOCATION_CODE=#{ew.entity.locationCode}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteByMap">
|
||||
DELETE FROM Z_LOCATION
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<delete id="delete">
|
||||
DELETE FROM Z_LOCATION
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.locationCode!=null"> AND LOCATION_CODE=#{ew.entity.locationCode}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
</mapper>
|
@ -0,0 +1,304 @@
|
||||
<?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.foreverwin.mesnac.meapi.mapper.LogisticsBillMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.LogisticsBill">
|
||||
<result column="LOGISTICS_BILL_NO" property="logisticsBillNo" />
|
||||
<result column="LOGISTICS_BO" property="logisticsBo" />
|
||||
<result column="COM_TIME" property="comTime" />
|
||||
<result column="OTHER1" property="other1" />
|
||||
<result column="OTHER2" property="other2" />
|
||||
<result column="OTHER3" property="other3" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
LOGISTICS_BILL_NO, LOGISTICS_BO, COM_TIME, OTHER1, OTHER2, OTHER3
|
||||
</sql>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
<select id="selectByMap" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM Z_LOGISTICS_BILL
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectOne" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM Z_LOGISTICS_BILL
|
||||
<where>
|
||||
<if test="ew.entity.logisticsBillNo!=null">
|
||||
LOGISTICS_BILL_NO=#{ew.logisticsBillNo}
|
||||
</if>
|
||||
<if test="ew.entity.logisticsBo!=null"> AND LOGISTICS_BO=#{ew.entity.logisticsBo}</if>
|
||||
<if test="ew.entity.comTime!=null"> AND COM_TIME=#{ew.entity.comTime}</if>
|
||||
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCount" resultType="Integer">
|
||||
SELECT COUNT(1) FROM Z_LOGISTICS_BILL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.logisticsBillNo!=null">
|
||||
LOGISTICS_BILL_NO=#{ew.entity.logisticsBillNo}
|
||||
</if>
|
||||
<if test="ew.entity.logisticsBo!=null"> AND LOGISTICS_BO=#{ew.entity.logisticsBo}</if>
|
||||
<if test="ew.entity.comTime!=null"> AND COM_TIME=#{ew.entity.comTime}</if>
|
||||
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOGISTICS_BILL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.logisticsBillNo!=null">
|
||||
LOGISTICS_BILL_NO=#{ew.entity.logisticsBillNo}
|
||||
</if>
|
||||
<if test="ew.entity.logisticsBo!=null"> AND LOGISTICS_BO=#{ew.entity.logisticsBo}</if>
|
||||
<if test="ew.entity.comTime!=null"> AND COM_TIME=#{ew.entity.comTime}</if>
|
||||
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMaps" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOGISTICS_BILL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.logisticsBillNo!=null">
|
||||
LOGISTICS_BILL_NO=#{ew.entity.logisticsBillNo}
|
||||
</if>
|
||||
<if test="ew.entity.logisticsBo!=null"> AND LOGISTICS_BO=#{ew.entity.logisticsBo}</if>
|
||||
<if test="ew.entity.comTime!=null"> AND COM_TIME=#{ew.entity.comTime}</if>
|
||||
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectObjs" resultType="Object">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOGISTICS_BILL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.logisticsBillNo!=null">
|
||||
LOGISTICS_BILL_NO=#{ew.entity.logisticsBillNo}
|
||||
</if>
|
||||
<if test="ew.entity.logisticsBo!=null"> AND LOGISTICS_BO=#{ew.entity.logisticsBo}</if>
|
||||
<if test="ew.entity.comTime!=null"> AND COM_TIME=#{ew.entity.comTime}</if>
|
||||
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectPage" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOGISTICS_BILL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.logisticsBillNo!=null">
|
||||
LOGISTICS_BILL_NO=#{ew.entity.logisticsBillNo}
|
||||
</if>
|
||||
<if test="ew.entity.logisticsBo!=null"> AND LOGISTICS_BO=#{ew.entity.logisticsBo}</if>
|
||||
<if test="ew.entity.comTime!=null"> AND COM_TIME=#{ew.entity.comTime}</if>
|
||||
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMapsPage" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOGISTICS_BILL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.logisticsBillNo!=null">
|
||||
LOGISTICS_BILL_NO=#{ew.entity.logisticsBillNo}
|
||||
</if>
|
||||
<if test="ew.entity.logisticsBo!=null"> AND LOGISTICS_BO=#{ew.entity.logisticsBo}</if>
|
||||
<if test="ew.entity.comTime!=null"> AND COM_TIME=#{ew.entity.comTime}</if>
|
||||
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.foreverwin.mesnac.meapi.model.LogisticsBill">
|
||||
INSERT INTO Z_LOGISTICS_BILL
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
LOGISTICS_BILL_NO,
|
||||
<if test="logisticsBo!=null">LOGISTICS_BO,</if>
|
||||
<if test="comTime!=null">COM_TIME,</if>
|
||||
<if test="other1!=null">OTHER1,</if>
|
||||
<if test="other2!=null">OTHER2,</if>
|
||||
<if test="other3!=null">OTHER3,</if>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{logisticsBillNo},
|
||||
<if test="logisticsBo!=null">#{logisticsBo},</if>
|
||||
<if test="comTime!=null">#{comTime},</if>
|
||||
<if test="other1!=null">#{other1},</if>
|
||||
<if test="other2!=null">#{other2},</if>
|
||||
<if test="other3!=null">#{other3},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.meapi.model.LogisticsBill">
|
||||
INSERT INTO Z_LOGISTICS_BILL
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<include refid="Base_Column_List"></include>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{logisticsBillNo},
|
||||
#{logisticsBo},
|
||||
#{comTime},
|
||||
#{other1},
|
||||
#{other2},
|
||||
#{other3},
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<update id="update">
|
||||
UPDATE Z_LOGISTICS_BILL <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.logisticsBillNo!=null">LOGISTICS_BILL_NO=#{et.logisticsBillNo},</if>
|
||||
<if test="et.logisticsBo!=null">LOGISTICS_BO=#{et.logisticsBo},</if>
|
||||
<if test="et.comTime!=null">COM_TIME=#{et.comTime},</if>
|
||||
<if test="et.other1!=null">OTHER1=#{et.other1},</if>
|
||||
<if test="et.other2!=null">OTHER2=#{et.other2},</if>
|
||||
<if test="et.other3!=null">OTHER3=#{et.other3},</if>
|
||||
</trim>
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
LOGISTICS_BILL_NO=#{ew.entity.logisticsBillNo}
|
||||
<if test="ew.entity.logisticsBo!=null"> AND LOGISTICS_BO=#{ew.entity.logisticsBo}</if>
|
||||
<if test="ew.entity.comTime!=null"> AND COM_TIME=#{ew.entity.comTime}</if>
|
||||
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteByMap">
|
||||
DELETE FROM Z_LOGISTICS_BILL
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<delete id="delete">
|
||||
DELETE FROM Z_LOGISTICS_BILL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
LOGISTICS_BILL_NO=#{ew.entity.logisticsBillNo}
|
||||
</if>
|
||||
<if test="ew.entity.logisticsBo!=null"> AND LOGISTICS_BO=#{ew.entity.logisticsBo}</if>
|
||||
<if test="ew.entity.comTime!=null"> AND COM_TIME=#{ew.entity.comTime}</if>
|
||||
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue