Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -33,8 +33,7 @@ public class WarehouseAnsBillRest {
|
||||
@ApiOperation("分页列表")
|
||||
ResultBean<PagerVo<WarehouseAnsBillVo>> listPage(@RequestBody PagerQuery<WarehouseAnsBillQuery> pagerQuery) {
|
||||
ResultBean<PagerVo<WarehouseAnsBillVo>> rb = ResultBean.fireFail();
|
||||
PagerVo<WarehouseAnsBillVo> pv = wmsAnsBillService.listPages(pagerQuery);
|
||||
return rb.success().setData(pv);
|
||||
return wmsAnsBillService.listPages(pagerQuery);
|
||||
}
|
||||
|
||||
@GetMapping("details")
|
||||
|
||||
@@ -15,37 +15,45 @@ import java.util.Date;
|
||||
@Data
|
||||
public class WarehouseAnsBill extends BaseEntity {
|
||||
|
||||
@ApiModelProperty("外部单号(业务单据编号)")
|
||||
private String sourceBillNo;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
@ApiModelProperty("申请时间")
|
||||
private Date applicationTime;
|
||||
@ApiModelProperty("单据编号")
|
||||
private String billNo;
|
||||
@ApiModelProperty("业务类型key(采购预约、调拨预约、其他预约)")
|
||||
private String busTypeKey;
|
||||
@ApiModelProperty("业务类型value(采购预约、调拨预约、其他预约)")
|
||||
private String busTypeValue;
|
||||
@ApiModelProperty("制单人姓名")
|
||||
private String createByName;
|
||||
@ApiModelProperty("交接状态")
|
||||
private String handoverStatus;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
@ApiModelProperty("交接时间")
|
||||
private Date handoverTime;
|
||||
@ApiModelProperty("货物状态(在途、部分收货、已收货、已取消)")
|
||||
private Integer billState;
|
||||
@ApiModelProperty("审核状态(待审核、审核通过、审核拒绝)")
|
||||
private String reviewStatus;
|
||||
@ApiModelProperty("拒绝原因")
|
||||
private String refuseReason;
|
||||
@ApiModelProperty("联系人")
|
||||
private String contact;
|
||||
@ApiModelProperty("联系人手机")
|
||||
private String mobile;
|
||||
@ApiModelProperty("仓库sid")
|
||||
private Integer warehouseSid;
|
||||
@ApiModelProperty("仓库名")
|
||||
private String warehouseName;
|
||||
@ApiModelProperty("库区sid")
|
||||
private String warehouseRackSid;
|
||||
@ApiModelProperty("库区名")
|
||||
private String warehouseRackName;
|
||||
@ApiModelProperty("申请人")
|
||||
private String applicant;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
@ApiModelProperty("预约时间")
|
||||
private Date reservationTime;
|
||||
@ApiModelProperty("供应商sid")
|
||||
private String supplierSid;
|
||||
@ApiModelProperty("供应商名称")
|
||||
@ApiModelProperty("供应商")
|
||||
private String supplierName;
|
||||
@ApiModelProperty("货主sid")
|
||||
private String goodsOwnerSid;
|
||||
@ApiModelProperty("货主")
|
||||
private String goodsOwner;
|
||||
@ApiModelProperty("预计到货日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private Date deliveryDate;
|
||||
@ApiModelProperty("外部单号")
|
||||
private String sourceBillNo;
|
||||
@ApiModelProperty("联系人")
|
||||
private String contact;
|
||||
@ApiModelProperty("联系电话")
|
||||
private String mobile;
|
||||
@ApiModelProperty("使用组织sid")
|
||||
private String useOrgSid;
|
||||
@ApiModelProperty("创建组织sid")
|
||||
|
||||
@@ -62,6 +62,6 @@ public class WarehouseAnsBillDto {
|
||||
private String useOrgSid;
|
||||
@ApiModelProperty("创建组织sid")
|
||||
private String createOrgSid;
|
||||
|
||||
private String userSid;
|
||||
private List<WarehouseAnsBillDetailDto> StorageAnsBillDetailList = new ArrayList<>();
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
wab.reviewStatus,
|
||||
wab.refuseReason
|
||||
from warehouse_ans_bill wab
|
||||
LEFT JOIN ss_user.sys_organization as s ON wab.useOrgSid = s.sid
|
||||
<where>
|
||||
${ew.sqlSegment}
|
||||
</where>
|
||||
|
||||
@@ -15,23 +15,27 @@ public class WarehouseAnsBillQuery implements Query {
|
||||
@ApiModelProperty("单据编号")
|
||||
private String billNo;
|
||||
@ApiModelProperty("开始时间")
|
||||
private String createTimeStart;
|
||||
private String applicationTimeStart;
|
||||
@ApiModelProperty("结束时间")
|
||||
private String createTimeEnd;
|
||||
private String applicationTimeEnd;
|
||||
@ApiModelProperty("业务类型")
|
||||
private String busTypeKey;
|
||||
@ApiModelProperty("供应商")
|
||||
private String supplierName;
|
||||
@ApiModelProperty("预期到货日期开始时间")
|
||||
private String deliveryDateStart;
|
||||
@ApiModelProperty("预期到货日期结束时间")
|
||||
private String deliveryDateEnd;
|
||||
//单据状态
|
||||
private String billState;
|
||||
|
||||
@ApiModelProperty("审核状态")
|
||||
private String reviewStatus;
|
||||
|
||||
@ApiModelProperty("外部单号(业务单据编号)")
|
||||
private String sourceBillNo;
|
||||
|
||||
|
||||
|
||||
private String orgLevelKey;//权限等级
|
||||
@ApiModelProperty("菜单路由")
|
||||
private String menuUrl;
|
||||
@ApiModelProperty("组织全路径sid")
|
||||
private String orgPath;
|
||||
@ApiModelProperty("用户sid")
|
||||
private String userSid;
|
||||
private int index;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.yxt.warehouse.biz.warehouseansbill;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.common.base.service.MybatisBaseService;
|
||||
@@ -10,10 +11,12 @@ import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import com.yxt.warehouse.biz.warehouseansbilldetail.*;
|
||||
import com.yxt.warehouse.biz.warehouseinfo.WarehouseInfoVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -41,6 +44,9 @@ public class WarehouseAnsBillService extends MybatisBaseService<WarehouseAnsBill
|
||||
} else {
|
||||
return rb.setMsg("单据明细不能为空");
|
||||
}
|
||||
WarehouseAnsBill.setCreateTime(new DateTime());
|
||||
WarehouseAnsBill.setCreateBySid(dto.getUserSid());
|
||||
WarehouseAnsBill.setCreateOrgSid(dto.getUseOrgSid());
|
||||
baseMapper.insert(WarehouseAnsBill);
|
||||
|
||||
} else {
|
||||
@@ -56,24 +62,52 @@ public class WarehouseAnsBillService extends MybatisBaseService<WarehouseAnsBill
|
||||
} else {
|
||||
return rb.setMsg("单据明细不能为空");
|
||||
}
|
||||
WarehouseAnsBill.setModifyTime(new Date());
|
||||
baseMapper.updateById(WarehouseAnsBill);
|
||||
|
||||
}
|
||||
return rb.success().setData(sid);
|
||||
}
|
||||
|
||||
public PagerVo<WarehouseAnsBillVo> listPages(PagerQuery<WarehouseAnsBillQuery> pagerQuery) {
|
||||
public ResultBean<PagerVo<WarehouseAnsBillVo>> listPages(PagerQuery<WarehouseAnsBillQuery> pagerQuery) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
WarehouseAnsBillQuery query = pagerQuery.getParams();
|
||||
QueryWrapper<WarehouseAnsBill> qw = new QueryWrapper<>();
|
||||
//ToDo:添加查询条件
|
||||
if (query != null) {
|
||||
|
||||
if (StringUtils.isNotBlank(query.getOrgLevelKey())) {
|
||||
//数据权限ID(1全部、2本部门及子部门、3本部门、4个人)
|
||||
String orgLevelKey=query.getOrgLevelKey();
|
||||
String orgSidPath=query.getOrgPath();
|
||||
int index=query.getIndex();
|
||||
if ("1".equals(orgLevelKey)) {
|
||||
orgSidPath = orgSidPath.substring(0, index);
|
||||
qw.like("s.orgSidPath", orgSidPath);
|
||||
} else if ("2".equals(orgLevelKey)) {
|
||||
orgSidPath = orgSidPath.substring(0, index);
|
||||
qw.like("s.orgSidPath", orgSidPath);
|
||||
} else if ("3".equals(orgLevelKey)) {
|
||||
orgSidPath = orgSidPath.substring(0, index);
|
||||
qw.apply("s.orgSidPath like('"+orgSidPath+"')");
|
||||
} else if ("4".equals(orgLevelKey)) {
|
||||
qw.eq("wab.createBySid", query.getUserSid());
|
||||
} else {
|
||||
PagerVo<WarehouseAnsBillVo> p = new PagerVo<>();
|
||||
return rb.success().setData(p);
|
||||
}
|
||||
} else {
|
||||
PagerVo<WarehouseAnsBillVo> p = new PagerVo<>();
|
||||
return rb.success().setData(p);
|
||||
}
|
||||
|
||||
//单据编号
|
||||
if (StringUtils.isNotBlank(query.getBillNo())) {
|
||||
qw.like("wab.billNo", query.getBillNo());
|
||||
}
|
||||
//单据日期开始时间-单据日期结束时间
|
||||
qw.apply(StringUtils.isNotBlank(query.getCreateTimeStart()), "date_format (wab.createTime,'%Y-%m-%d') >= date_format('" + query.getCreateTimeStart() + "','%Y-%m-%d')").
|
||||
apply(StringUtils.isNotBlank(query.getCreateTimeEnd()), "date_format (wab.createTime,'%Y-%m-%d') <= date_format('" + query.getCreateTimeEnd() + "','%Y-%m-%d')"
|
||||
qw.apply(StringUtils.isNotBlank(query.getApplicationTimeStart()), "date_format (wab.createTime,'%Y-%m-%d') >= date_format('" + query.getApplicationTimeStart() + "','%Y-%m-%d')").
|
||||
apply(StringUtils.isNotBlank(query.getApplicationTimeEnd()), "date_format (wab.createTime,'%Y-%m-%d') <= date_format('" + query.getApplicationTimeEnd() + "','%Y-%m-%d')"
|
||||
);
|
||||
//业务类型
|
||||
if (StringUtils.isNotBlank(query.getBusTypeKey())) {
|
||||
@@ -83,19 +117,10 @@ public class WarehouseAnsBillService extends MybatisBaseService<WarehouseAnsBill
|
||||
if (StringUtils.isNotBlank(query.getSupplierName())) {
|
||||
qw.like("wab.supplierName", query.getSupplierName());
|
||||
}
|
||||
//预期到货日期开始时间-预期到货日期结束时间
|
||||
qw.apply(StringUtils.isNotBlank(query.getDeliveryDateStart()), "date_format (wab.deliveryDate,'%Y-%m-%d') >= date_format('" + query.getDeliveryDateStart() + "','%Y-%m-%d')").
|
||||
apply(StringUtils.isNotBlank(query.getDeliveryDateEnd()), "date_format (wab.deliveryDate,'%Y-%m-%d') <= date_format('" + query.getDeliveryDateEnd() + "','%Y-%m-%d')"
|
||||
);
|
||||
//单据状态
|
||||
if (StringUtils.isNotBlank(query.getBillState())) {
|
||||
qw.like("wab.billState", query.getBillState());
|
||||
}
|
||||
|
||||
//审核状态
|
||||
if (StringUtils.isNotBlank(query.getReviewStatus())) {
|
||||
qw.like("wab.reviewStatus", query.getReviewStatus());
|
||||
}
|
||||
//外部编号
|
||||
if (StringUtils.isNotBlank(query.getSourceBillNo())) {
|
||||
qw.like("wab.sourceBillNo", query.getSourceBillNo());
|
||||
@@ -105,7 +130,7 @@ public class WarehouseAnsBillService extends MybatisBaseService<WarehouseAnsBill
|
||||
IPage<WarehouseAnsBill> page = PagerUtil.queryToPage(pagerQuery);
|
||||
IPage<WarehouseAnsBillVo> pagging = baseMapper.listPages(page, qw);
|
||||
PagerVo<WarehouseAnsBillVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
return p;
|
||||
return rb.success().setData(p);
|
||||
}
|
||||
|
||||
public ResultBean<WarehouseAnsDetailsVo> details(String sid) {
|
||||
@@ -135,6 +160,9 @@ public class WarehouseAnsBillService extends MybatisBaseService<WarehouseAnsBill
|
||||
} else {
|
||||
return rb.setMsg("单据明细不能为空");
|
||||
}
|
||||
WarehouseAnsBill.setCreateTime(new DateTime());
|
||||
WarehouseAnsBill.setCreateBySid(dto.getUserSid());
|
||||
WarehouseAnsBill.setCreateOrgSid(dto.getUseOrgSid());
|
||||
baseMapper.insert(WarehouseAnsBill);
|
||||
return rb;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ public interface WarehouseAreaMapper extends BaseMapper<WarehouseArea> {
|
||||
IPage<WarehouseAreaVo> listPage(IPage<WarehouseArea> page, @Param(Constants.WRAPPER) QueryWrapper<WarehouseArea> qw);
|
||||
WarehouseAreaVo initialization (@Param("sid") String sid);
|
||||
int updateBySidIsDelete(List<String> list);
|
||||
@Select("select * from wms_warehouse_area where warehouseSid = #{ckSid}")
|
||||
@Select("select * from warehouse_area where warehouseSid = #{ckSid} and isDelete!='1' and isEnable='1'")
|
||||
List<WarehouseAreaAllVo> selectAll(String ckSid);
|
||||
List<WarehouseAreaVo> listAll(@Param("orgPath")String orgPath);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
from warehouse_area a
|
||||
LEFT JOIN ss_user.sys_organization as s ON a.useOrgSid = s.sid
|
||||
<where>
|
||||
s.orgSidPath like concat('%',#{orgPath},'%') and a.isDelete !='1'
|
||||
s.orgSidPath like concat('%',#{orgPath},'%') and a.isDelete !='1' and a.isEnable ='1'
|
||||
</where>
|
||||
</select>
|
||||
<select id="initialization" resultType="com.yxt.warehouse.biz.warehousearea.WarehouseAreaVo">
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
from warehouse_area_type a
|
||||
LEFT JOIN ss_user.sys_organization as s ON a.useOrgSid = s.sid
|
||||
<where>
|
||||
s.orgSidPath like concat('%',#{orgPath},'%') and a.isDelete !='1'
|
||||
s.orgSidPath like concat('%',#{orgPath},'%') and a.isDelete !='1' and a.isEnable ='1'
|
||||
</where>
|
||||
</select>
|
||||
<select id="initialization" resultType="com.yxt.warehouse.biz.warehouseareatype.WarehouseAreaTypeVo">
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
from warehouse_info a
|
||||
LEFT JOIN ss_user.sys_organization as s ON a.useOrgSid = s.sid
|
||||
<where>
|
||||
s.orgSidPath like concat('%',#{orgPath},'%') and a.isDelete !='1'
|
||||
s.orgSidPath like concat('%',#{orgPath},'%') and a.isDelete !='1' and a.isEnable ='1'
|
||||
</where>
|
||||
</select>
|
||||
<select id="getWareHouse" resultType="com.yxt.warehouse.biz.warehouseinfo.SmsOrderHouseInfo">
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
from warehouse_rack a
|
||||
LEFT JOIN ss_user.sys_organization as s ON a.useOrgSid = s.sid
|
||||
<where>
|
||||
s.orgSidPath like concat('%',#{orgPath},'%') and a.isDelete !='1'
|
||||
s.orgSidPath like concat('%',#{orgPath},'%') and a.isDelete !='1' and a.isEnable ='1'
|
||||
</where>
|
||||
</select>
|
||||
<select id="initialization" resultType="com.yxt.warehouse.biz.warehouserack.WarehouseRackVo">
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
from warehouse_region a
|
||||
LEFT JOIN ss_user.sys_organization as s ON a.useOrgSid = s.sid
|
||||
<where>
|
||||
s.orgSidPath like concat('%',#{orgPath},'%') and a.isDelete !='1'
|
||||
s.orgSidPath like concat('%',#{orgPath},'%') and a.isDelete !='1' and a.isEnable ='1'
|
||||
</where>
|
||||
</select>
|
||||
<update id="updateBySidIsDelete">
|
||||
|
||||
Reference in New Issue
Block a user