Commit 0f0aeb6c by XiaHou

修复万科相关接口

parent 1ff9d0f2
...@@ -17,6 +17,8 @@ import org.springframework.web.bind.annotation.RequestMethod; ...@@ -17,6 +17,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
@Controller @Controller
@Api(tags = "万科后台_物品相关接口", description = "物品控制器") @Api(tags = "万科后台_物品相关接口", description = "物品控制器")
@RequestMapping("/vankeGoods") @RequestMapping("/vankeGoods")
...@@ -31,11 +33,11 @@ public class VankeGoodsController { ...@@ -31,11 +33,11 @@ public class VankeGoodsController {
public CommonResult<CommonPage<VankeGoodsDto>> list(@ApiParam(value="分页大小") @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, public CommonResult<CommonPage<VankeGoodsDto>> list(@ApiParam(value="分页大小") @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
@ApiParam(value="分页页数") @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, @ApiParam(value="分页页数") @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@ApiParam(value="物品名称") @RequestParam(value = "name") String name, @ApiParam(value="物品名称") @RequestParam(value = "name") String name,
@ApiParam(value="物品名称") @RequestParam(value = "goodsCategoryName") String goodsCategoryName, @ApiParam(value="物品分类id") @RequestParam(value = "goodsCategoryId") Long goodsCategoryId,
@ApiParam(value="物品名称") @RequestParam(value = "supplierName") String supplierName, @ApiParam(value="供应商id") @RequestParam(value = "supplierId") Long supplierId,
@ApiParam(value="物品名称") @RequestParam(value = "stockRoomName") String stockRoomName @ApiParam(value="库房id") @RequestParam(value = "stockRoomId") Long stockRoomId
) { ) {
return CommonResult.success(CommonPage.restPage(this.vankeGoodsService.selectList(pageNum,pageSize,name,goodsCategoryName,supplierName,stockRoomName))); return CommonResult.success(CommonPage.restPage(this.vankeGoodsService.selectList(pageNum,pageSize,name,goodsCategoryId,supplierId,stockRoomId)));
} }
@ApiOperation("万科后台_物品插入操作") @ApiOperation("万科后台_物品插入操作")
...@@ -59,4 +61,29 @@ public class VankeGoodsController { ...@@ -59,4 +61,29 @@ public class VankeGoodsController {
} }
return CommonResult.failed(res.getMsg()); return CommonResult.failed(res.getMsg());
} }
@ApiOperation("万科后台_根据供应商id查询物品类别")
@RequestMapping(value = "/selectCategoryBySupplierId", method = RequestMethod.GET)
@ResponseBody
public CommonResult<List<VankeGoodsDto>> selectCategoryBySupplierId(@ApiParam(value="供应商id") @RequestParam(value = "supplierId") Long supplierId){
VankeGoodsDto vankeGoodsDto = new VankeGoodsDto();
vankeGoodsDto.setSupplierId(supplierId);
return CommonResult.success(this.vankeGoodsService.selectGoodsCategoryBySupplierId(vankeGoodsDto));
}
@ApiOperation("万科后台_根据供应商id和物品类别id查询物品")
@RequestMapping(value = "/selectByCategoryIdAndSupplierId", method = RequestMethod.GET)
@ResponseBody
public CommonResult<List<VankeGoodsDto>> selectByCategoryIdAndSupplierId(@ApiParam(value="供应商id") @RequestParam(value = "supplierId") Long supplierId,
@ApiParam(value="分类id") @RequestParam(value = "categoryId") Long categoryId){
VankeGoodsDto vankeGoodsDto = new VankeGoodsDto();
vankeGoodsDto.setSupplierId(supplierId);
vankeGoodsDto.setGoodsCategoryId(categoryId);
return CommonResult.success(this.vankeGoodsService.selectGoodsByCategotyAndSupplier(vankeGoodsDto));
}
} }
package com.macro.mall.controller.vanke;
import com.macro.mall.common.api.CommonPage;
import com.macro.mall.common.api.CommonResult;
import com.macro.mall.model.dto.vanke.VankeInboundRecordDto;
import com.macro.mall.model.dto.vanke.VankeOutboundRecordDto;
import com.macro.mall.service.vanke.IVankeInboundRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@Api(tags = "万科后台_入库管理相关接口", description = "入库管理控制器")
@RequestMapping("/vankeInboundRecord")
public class VankeInboundRecordController {
@Autowired
private IVankeInboundRecordService vankeInboundRecordService;
@ApiOperation("万科后台_入库查询分页操作")
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ResponseBody
public CommonResult<CommonPage<VankeInboundRecordDto>> list(@ApiParam(value="分页大小") @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
@ApiParam(value="分页页数") @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@ApiParam(value="物品名称") @RequestParam(value = "goodsMame") String goodsName
){
return CommonResult.success(CommonPage.restPage(this.vankeInboundRecordService.getPageList(pageNum,pageSize,goodsName)));
}
}
package com.macro.mall.controller.vanke;
import com.macro.mall.common.api.CommonPage;
import com.macro.mall.common.api.CommonResult;
import com.macro.mall.model.dto.vanke.VankeGoodsDto;
import com.macro.mall.model.dto.vanke.VankeOutboundRecordDto;
import com.macro.mall.service.vanke.IVankeOutboundRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@Api(tags = "万科后台_出库管理相关接口", description = "出库管理控制器")
@RequestMapping("/vankeOutboundRecord")
public class VankeOutboundRecordController {
@Autowired
private IVankeOutboundRecordService vankeOutboundRecordService;
@ApiOperation("万科后台_出库查询分页操作")
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ResponseBody
public CommonResult<CommonPage<VankeOutboundRecordDto>> list(@ApiParam(value="分页大小") @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
@ApiParam(value="分页页数") @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@ApiParam(value="物品分类id") @RequestParam(value = "goodsCategoryId") Long goodsCategoryId,
@ApiParam(value="部门id") @RequestParam(value = "stockRoomId") Long departId,
@ApiParam(value="会员昵称") @RequestParam(value = "memberName") String memberName,
@ApiParam(value="物品名称") @RequestParam(value = "goodsMame") String goodsName
){
return CommonResult.success(CommonPage.restPage(this.vankeOutboundRecordService.getPageList(pageNum,pageSize,goodsCategoryId,departId,memberName,goodsName)));
}
}
package com.macro.mall.controller.vanke;
import io.swagger.annotations.Api;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@Api(tags = "万科后台_统计图表相关接口", description = "统计图表控制器")
@RequestMapping("/vankeStatisticalChart")
public class VankeStatisticalChartController {
}
package com.macro.mall.common.utils;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
public class TimeUtils {
/**起始时间 和结尾时间 得到期间每个时间日期
* @return
*/
public static List<String> getDaysByStartTimeAndEndTime(String startTime,String endTime){
List<String> dataList = new ArrayList<>();
for(String days: findDaysStr(startTime,endTime)){
dataList.add(days);
}
return dataList;
}
private static List<String> findDaysStr(String begintTime, String endTime) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date dBegin = null;
Date dEnd = null;
try {
dBegin = sdf.parse(begintTime);
dEnd = sdf.parse(endTime);
} catch (Exception e) {
e.printStackTrace();
}
List<String> daysStrList = new ArrayList<>();
daysStrList.add(sdf.format(dBegin));
Calendar calBegin = Calendar.getInstance();
calBegin.setTime(dBegin);
Calendar calEnd = Calendar.getInstance();
calEnd.setTime(dEnd);
while (dEnd.after(calBegin.getTime())) {
calBegin.add(Calendar.DAY_OF_MONTH, 1);
String dayStr = sdf.format(calBegin.getTime());
daysStrList.add(dayStr);
}
return daysStrList;
}
}
...@@ -45,7 +45,7 @@ public class UmsMember implements Serializable { ...@@ -45,7 +45,7 @@ public class UmsMember implements Serializable {
@ApiModelProperty(value = "职业") @ApiModelProperty(value = "职业")
private String job; private String job;
@ApiModelProperty(value = "个性签名") @ApiModelProperty(value = "个性签名(说明)")
private String personalizedSignature; private String personalizedSignature;
@ApiModelProperty(value = "用户来源") @ApiModelProperty(value = "用户来源")
...@@ -131,6 +131,18 @@ public class UmsMember implements Serializable { ...@@ -131,6 +131,18 @@ public class UmsMember implements Serializable {
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date loginTime; private Date loginTime;
@ApiModelProperty(value = "结算周期 1(7天) 2(15天) 3(30天)")
private Integer cycleType;
@ApiModelProperty(value = "结算方式 1(指定账期1 ) 2( 指定账期2 ) 3(指定账期3)")
private Integer payType;
@ApiModelProperty(value = "万科员工编号")
private String jobNo;
@ApiModelProperty(value = "部门id")
private Long departId;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public Long getId() { public Long getId() {
...@@ -445,6 +457,38 @@ public class UmsMember implements Serializable { ...@@ -445,6 +457,38 @@ public class UmsMember implements Serializable {
this.loginTime = loginTime; this.loginTime = loginTime;
} }
public Integer getCycleType() {
return cycleType;
}
public void setCycleType(Integer cycleType) {
this.cycleType = cycleType;
}
public Integer getPayType() {
return payType;
}
public void setPayType(Integer payType) {
this.payType = payType;
}
public String getJobNo() {
return jobNo;
}
public void setJobNo(String jobNo) {
this.jobNo = jobNo;
}
public Long getDepartId() {
return departId;
}
public void setDepartId(Long departId) {
this.departId = departId;
}
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
...@@ -490,6 +534,10 @@ public class UmsMember implements Serializable { ...@@ -490,6 +534,10 @@ public class UmsMember implements Serializable {
sb.append(", distributionLevel=").append(distributionLevel); sb.append(", distributionLevel=").append(distributionLevel);
sb.append(", accouuntType=").append(accouuntType); sb.append(", accouuntType=").append(accouuntType);
sb.append(", loginTime=").append(loginTime); sb.append(", loginTime=").append(loginTime);
sb.append(", cycleType=").append(cycleType);
sb.append(", payType=").append(payType);
sb.append(", jobNo=").append(jobNo);
sb.append(", departId=").append(departId);
sb.append(", serialVersionUID=").append(serialVersionUID); sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
......
...@@ -2651,6 +2651,256 @@ public class UmsMemberExample { ...@@ -2651,6 +2651,256 @@ public class UmsMemberExample {
addCriterion("login_time not between", value1, value2, "loginTime"); addCriterion("login_time not between", value1, value2, "loginTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCycleTypeIsNull() {
addCriterion("cycle_type is null");
return (Criteria) this;
}
public Criteria andCycleTypeIsNotNull() {
addCriterion("cycle_type is not null");
return (Criteria) this;
}
public Criteria andCycleTypeEqualTo(Integer value) {
addCriterion("cycle_type =", value, "cycleType");
return (Criteria) this;
}
public Criteria andCycleTypeNotEqualTo(Integer value) {
addCriterion("cycle_type <>", value, "cycleType");
return (Criteria) this;
}
public Criteria andCycleTypeGreaterThan(Integer value) {
addCriterion("cycle_type >", value, "cycleType");
return (Criteria) this;
}
public Criteria andCycleTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("cycle_type >=", value, "cycleType");
return (Criteria) this;
}
public Criteria andCycleTypeLessThan(Integer value) {
addCriterion("cycle_type <", value, "cycleType");
return (Criteria) this;
}
public Criteria andCycleTypeLessThanOrEqualTo(Integer value) {
addCriterion("cycle_type <=", value, "cycleType");
return (Criteria) this;
}
public Criteria andCycleTypeIn(List<Integer> values) {
addCriterion("cycle_type in", values, "cycleType");
return (Criteria) this;
}
public Criteria andCycleTypeNotIn(List<Integer> values) {
addCriterion("cycle_type not in", values, "cycleType");
return (Criteria) this;
}
public Criteria andCycleTypeBetween(Integer value1, Integer value2) {
addCriterion("cycle_type between", value1, value2, "cycleType");
return (Criteria) this;
}
public Criteria andCycleTypeNotBetween(Integer value1, Integer value2) {
addCriterion("cycle_type not between", value1, value2, "cycleType");
return (Criteria) this;
}
public Criteria andPayTypeIsNull() {
addCriterion("pay_type is null");
return (Criteria) this;
}
public Criteria andPayTypeIsNotNull() {
addCriterion("pay_type is not null");
return (Criteria) this;
}
public Criteria andPayTypeEqualTo(Integer value) {
addCriterion("pay_type =", value, "payType");
return (Criteria) this;
}
public Criteria andPayTypeNotEqualTo(Integer value) {
addCriterion("pay_type <>", value, "payType");
return (Criteria) this;
}
public Criteria andPayTypeGreaterThan(Integer value) {
addCriterion("pay_type >", value, "payType");
return (Criteria) this;
}
public Criteria andPayTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("pay_type >=", value, "payType");
return (Criteria) this;
}
public Criteria andPayTypeLessThan(Integer value) {
addCriterion("pay_type <", value, "payType");
return (Criteria) this;
}
public Criteria andPayTypeLessThanOrEqualTo(Integer value) {
addCriterion("pay_type <=", value, "payType");
return (Criteria) this;
}
public Criteria andPayTypeIn(List<Integer> values) {
addCriterion("pay_type in", values, "payType");
return (Criteria) this;
}
public Criteria andPayTypeNotIn(List<Integer> values) {
addCriterion("pay_type not in", values, "payType");
return (Criteria) this;
}
public Criteria andPayTypeBetween(Integer value1, Integer value2) {
addCriterion("pay_type between", value1, value2, "payType");
return (Criteria) this;
}
public Criteria andPayTypeNotBetween(Integer value1, Integer value2) {
addCriterion("pay_type not between", value1, value2, "payType");
return (Criteria) this;
}
public Criteria andJobNoIsNull() {
addCriterion("job_no is null");
return (Criteria) this;
}
public Criteria andJobNoIsNotNull() {
addCriterion("job_no is not null");
return (Criteria) this;
}
public Criteria andJobNoEqualTo(String value) {
addCriterion("job_no =", value, "jobNo");
return (Criteria) this;
}
public Criteria andJobNoNotEqualTo(String value) {
addCriterion("job_no <>", value, "jobNo");
return (Criteria) this;
}
public Criteria andJobNoGreaterThan(String value) {
addCriterion("job_no >", value, "jobNo");
return (Criteria) this;
}
public Criteria andJobNoGreaterThanOrEqualTo(String value) {
addCriterion("job_no >=", value, "jobNo");
return (Criteria) this;
}
public Criteria andJobNoLessThan(String value) {
addCriterion("job_no <", value, "jobNo");
return (Criteria) this;
}
public Criteria andJobNoLessThanOrEqualTo(String value) {
addCriterion("job_no <=", value, "jobNo");
return (Criteria) this;
}
public Criteria andJobNoLike(String value) {
addCriterion("job_no like", value, "jobNo");
return (Criteria) this;
}
public Criteria andJobNoNotLike(String value) {
addCriterion("job_no not like", value, "jobNo");
return (Criteria) this;
}
public Criteria andJobNoIn(List<String> values) {
addCriterion("job_no in", values, "jobNo");
return (Criteria) this;
}
public Criteria andJobNoNotIn(List<String> values) {
addCriterion("job_no not in", values, "jobNo");
return (Criteria) this;
}
public Criteria andJobNoBetween(String value1, String value2) {
addCriterion("job_no between", value1, value2, "jobNo");
return (Criteria) this;
}
public Criteria andJobNoNotBetween(String value1, String value2) {
addCriterion("job_no not between", value1, value2, "jobNo");
return (Criteria) this;
}
public Criteria andDepartIdIsNull() {
addCriterion("depart_id is null");
return (Criteria) this;
}
public Criteria andDepartIdIsNotNull() {
addCriterion("depart_id is not null");
return (Criteria) this;
}
public Criteria andDepartIdEqualTo(Long value) {
addCriterion("depart_id =", value, "departId");
return (Criteria) this;
}
public Criteria andDepartIdNotEqualTo(Long value) {
addCriterion("depart_id <>", value, "departId");
return (Criteria) this;
}
public Criteria andDepartIdGreaterThan(Long value) {
addCriterion("depart_id >", value, "departId");
return (Criteria) this;
}
public Criteria andDepartIdGreaterThanOrEqualTo(Long value) {
addCriterion("depart_id >=", value, "departId");
return (Criteria) this;
}
public Criteria andDepartIdLessThan(Long value) {
addCriterion("depart_id <", value, "departId");
return (Criteria) this;
}
public Criteria andDepartIdLessThanOrEqualTo(Long value) {
addCriterion("depart_id <=", value, "departId");
return (Criteria) this;
}
public Criteria andDepartIdIn(List<Long> values) {
addCriterion("depart_id in", values, "departId");
return (Criteria) this;
}
public Criteria andDepartIdNotIn(List<Long> values) {
addCriterion("depart_id not in", values, "departId");
return (Criteria) this;
}
public Criteria andDepartIdBetween(Long value1, Long value2) {
addCriterion("depart_id between", value1, value2, "departId");
return (Criteria) this;
}
public Criteria andDepartIdNotBetween(Long value1, Long value2) {
addCriterion("depart_id not between", value1, value2, "departId");
return (Criteria) this;
}
} }
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {
......
package com.macro.mall.model.dto.vanke; package com.macro.mall.model.dto.vanke;
import com.macro.mall.model.VankeGoods; import com.macro.mall.model.VankeGoods;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@Data @Data
public class VankeGoodsDto extends VankeGoods { public class VankeGoodsDto extends VankeGoods {
private String supplierName;//供应商名称 @ApiModelProperty("供应商名称")
private String supplierName;
private String stockRoomName;//库房名称 @ApiModelProperty("库房名称")
private String stockRoomName;
private String goodsCategoryName;//商品分类名称 @ApiModelProperty("物品分类名称")
private String goodsCategoryName;
@ApiModelProperty("物品分类Id")
private Long goodsCategoryId;
@ApiModelProperty("供应商id")
private Long supplierId;
@ApiModelProperty("库房id")
private Long stockRoomId;
} }
package com.macro.mall.model.dto.vanke;
import com.macro.mall.model.VankeInboundRecord;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class VankeInboundRecordDto extends VankeInboundRecord {
@ApiModelProperty("库房名称")
private String stockRoomName;
@ApiModelProperty("前台出库员名称")
private String receptInboundName;
@ApiModelProperty("后台出库员名称")
private String backInboundName;
@ApiModelProperty("物品名称")
private String goodsName;
}
package com.macro.mall.model.dto.vanke;
import com.macro.mall.model.VankeOutboundRecord;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class VankeOutboundRecordDto extends VankeOutboundRecord {
@ApiModelProperty("前台出库员名称")
private String receptOutboundName;
@ApiModelProperty("后台出库员名称")
private String backOutboundName;
@ApiModelProperty("物品名称")
private String goodsName;
@ApiModelProperty("库房名称")
private String stockRoomName;
@ApiModelProperty("出库会员名称")
private String memberName;
@ApiModelProperty("会员所属部门")
private String departmentName;
}
...@@ -41,6 +41,10 @@ ...@@ -41,6 +41,10 @@
<result column="distribution_level" jdbcType="INTEGER" property="distributionLevel" /> <result column="distribution_level" jdbcType="INTEGER" property="distributionLevel" />
<result column="accouunt_type" jdbcType="INTEGER" property="accouuntType" /> <result column="accouunt_type" jdbcType="INTEGER" property="accouuntType" />
<result column="login_time" jdbcType="TIMESTAMP" property="loginTime" /> <result column="login_time" jdbcType="TIMESTAMP" property="loginTime" />
<result column="cycle_type" jdbcType="INTEGER" property="cycleType" />
<result column="pay_type" jdbcType="INTEGER" property="payType" />
<result column="job_no" jdbcType="VARCHAR" property="jobNo" />
<result column="depart_id" jdbcType="BIGINT" property="departId" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
...@@ -106,7 +110,8 @@ ...@@ -106,7 +110,8 @@
create_by, update_date, update_by, delete_status, name, create_time, luckey_count, create_by, update_date, update_by, delete_status, name, create_time, luckey_count,
history_integration, email, identity_number, identity_photo_a, identity_photo_b, history_integration, email, identity_number, identity_photo_a, identity_photo_b,
identity_review_opinion, identity_review_status, identity_review_time, invitation_code, identity_review_opinion, identity_review_status, identity_review_time, invitation_code,
invitation_code_id, union_id, label, distribution_level, accouunt_type, login_time invitation_code_id, union_id, label, distribution_level, accouunt_type, login_time,
cycle_type, pay_type, job_no, depart_id
</sql> </sql>
<select id="selectByExample" parameterType="com.macro.mall.model.UmsMemberExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.macro.mall.model.UmsMemberExample" resultMap="BaseResultMap">
select select
...@@ -139,10 +144,13 @@ ...@@ -139,10 +144,13 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.UmsMember"> <insert id="insert" parameterType="com.macro.mall.model.UmsMember">
insert into ums_member (id, member_level_id, username, <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
password, nickname, phone, SELECT LAST_INSERT_ID()
status, icon, gender, </selectKey>
birthday, city, job, personalized_signature, insert into ums_member (member_level_id, username, password,
nickname, phone, status,
icon, gender, birthday,
city, job, personalized_signature,
source_type, integration, growth, source_type, integration, growth,
create_date, create_by, update_date, create_date, create_by, update_date,
update_by, delete_status, name, update_by, delete_status, name,
...@@ -152,11 +160,12 @@ ...@@ -152,11 +160,12 @@
identity_review_status, identity_review_time, identity_review_status, identity_review_time,
invitation_code, invitation_code_id, union_id, invitation_code, invitation_code_id, union_id,
label, distribution_level, accouunt_type, label, distribution_level, accouunt_type,
login_time) login_time, cycle_type, pay_type,
values (#{id,jdbcType=BIGINT}, #{memberLevelId,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, job_no, depart_id)
#{password,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, values (#{memberLevelId,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{icon,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER}, #{nickname,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{birthday,jdbcType=DATE}, #{city,jdbcType=VARCHAR}, #{job,jdbcType=VARCHAR}, #{personalizedSignature,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER}, #{birthday,jdbcType=DATE},
#{city,jdbcType=VARCHAR}, #{job,jdbcType=VARCHAR}, #{personalizedSignature,jdbcType=VARCHAR},
#{sourceType,jdbcType=INTEGER}, #{integration,jdbcType=INTEGER}, #{growth,jdbcType=INTEGER}, #{sourceType,jdbcType=INTEGER}, #{integration,jdbcType=INTEGER}, #{growth,jdbcType=INTEGER},
#{createDate,jdbcType=TIMESTAMP}, #{createBy,jdbcType=BIGINT}, #{updateDate,jdbcType=TIMESTAMP}, #{createDate,jdbcType=TIMESTAMP}, #{createBy,jdbcType=BIGINT}, #{updateDate,jdbcType=TIMESTAMP},
#{updateBy,jdbcType=BIGINT}, #{deleteStatus,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{updateBy,jdbcType=BIGINT}, #{deleteStatus,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
...@@ -166,14 +175,15 @@ ...@@ -166,14 +175,15 @@
#{identityReviewStatus,jdbcType=VARCHAR}, #{identityReviewTime,jdbcType=TIMESTAMP}, #{identityReviewStatus,jdbcType=VARCHAR}, #{identityReviewTime,jdbcType=TIMESTAMP},
#{invitationCode,jdbcType=VARCHAR}, #{invitationCodeId,jdbcType=BIGINT}, #{unionId,jdbcType=VARCHAR}, #{invitationCode,jdbcType=VARCHAR}, #{invitationCodeId,jdbcType=BIGINT}, #{unionId,jdbcType=VARCHAR},
#{label,jdbcType=VARCHAR}, #{distributionLevel,jdbcType=INTEGER}, #{accouuntType,jdbcType=INTEGER}, #{label,jdbcType=VARCHAR}, #{distributionLevel,jdbcType=INTEGER}, #{accouuntType,jdbcType=INTEGER},
#{loginTime,jdbcType=TIMESTAMP}) #{loginTime,jdbcType=TIMESTAMP}, #{cycleType,jdbcType=INTEGER}, #{payType,jdbcType=INTEGER},
#{jobNo,jdbcType=VARCHAR}, #{departId,jdbcType=BIGINT})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.UmsMember"> <insert id="insertSelective" parameterType="com.macro.mall.model.UmsMember">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into ums_member insert into ums_member
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="memberLevelId != null"> <if test="memberLevelId != null">
member_level_id, member_level_id,
</if> </if>
...@@ -288,11 +298,20 @@ ...@@ -288,11 +298,20 @@
<if test="loginTime != null"> <if test="loginTime != null">
login_time, login_time,
</if> </if>
<if test="cycleType != null">
cycle_type,
</if>
<if test="payType != null">
pay_type,
</if>
<if test="jobNo != null">
job_no,
</if>
<if test="departId != null">
depart_id,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="memberLevelId != null"> <if test="memberLevelId != null">
#{memberLevelId,jdbcType=BIGINT}, #{memberLevelId,jdbcType=BIGINT},
</if> </if>
...@@ -407,6 +426,18 @@ ...@@ -407,6 +426,18 @@
<if test="loginTime != null"> <if test="loginTime != null">
#{loginTime,jdbcType=TIMESTAMP}, #{loginTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="cycleType != null">
#{cycleType,jdbcType=INTEGER},
</if>
<if test="payType != null">
#{payType,jdbcType=INTEGER},
</if>
<if test="jobNo != null">
#{jobNo,jdbcType=VARCHAR},
</if>
<if test="departId != null">
#{departId,jdbcType=BIGINT},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.macro.mall.model.UmsMemberExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.macro.mall.model.UmsMemberExample" resultType="java.lang.Long">
...@@ -535,6 +566,18 @@ ...@@ -535,6 +566,18 @@
<if test="record.loginTime != null"> <if test="record.loginTime != null">
login_time = #{record.loginTime,jdbcType=TIMESTAMP}, login_time = #{record.loginTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="record.cycleType != null">
cycle_type = #{record.cycleType,jdbcType=INTEGER},
</if>
<if test="record.payType != null">
pay_type = #{record.payType,jdbcType=INTEGER},
</if>
<if test="record.jobNo != null">
job_no = #{record.jobNo,jdbcType=VARCHAR},
</if>
<if test="record.departId != null">
depart_id = #{record.departId,jdbcType=BIGINT},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
...@@ -580,7 +623,11 @@ ...@@ -580,7 +623,11 @@
label = #{record.label,jdbcType=VARCHAR}, label = #{record.label,jdbcType=VARCHAR},
distribution_level = #{record.distributionLevel,jdbcType=INTEGER}, distribution_level = #{record.distributionLevel,jdbcType=INTEGER},
accouunt_type = #{record.accouuntType,jdbcType=INTEGER}, accouunt_type = #{record.accouuntType,jdbcType=INTEGER},
login_time = #{record.loginTime,jdbcType=TIMESTAMP} login_time = #{record.loginTime,jdbcType=TIMESTAMP},
cycle_type = #{record.cycleType,jdbcType=INTEGER},
pay_type = #{record.payType,jdbcType=INTEGER},
job_no = #{record.jobNo,jdbcType=VARCHAR},
depart_id = #{record.departId,jdbcType=BIGINT}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -702,6 +749,18 @@ ...@@ -702,6 +749,18 @@
<if test="loginTime != null"> <if test="loginTime != null">
login_time = #{loginTime,jdbcType=TIMESTAMP}, login_time = #{loginTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="cycleType != null">
cycle_type = #{cycleType,jdbcType=INTEGER},
</if>
<if test="payType != null">
pay_type = #{payType,jdbcType=INTEGER},
</if>
<if test="jobNo != null">
job_no = #{jobNo,jdbcType=VARCHAR},
</if>
<if test="departId != null">
depart_id = #{departId,jdbcType=BIGINT},
</if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
...@@ -744,7 +803,11 @@ ...@@ -744,7 +803,11 @@
label = #{label,jdbcType=VARCHAR}, label = #{label,jdbcType=VARCHAR},
distribution_level = #{distributionLevel,jdbcType=INTEGER}, distribution_level = #{distributionLevel,jdbcType=INTEGER},
accouunt_type = #{accouuntType,jdbcType=INTEGER}, accouunt_type = #{accouuntType,jdbcType=INTEGER},
login_time = #{loginTime,jdbcType=TIMESTAMP} login_time = #{loginTime,jdbcType=TIMESTAMP},
cycle_type = #{cycleType,jdbcType=INTEGER},
pay_type = #{payType,jdbcType=INTEGER},
job_no = #{jobNo,jdbcType=VARCHAR},
depart_id = #{departId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -7,4 +7,17 @@ import java.util.List; ...@@ -7,4 +7,17 @@ import java.util.List;
public interface VankeGoodsDao { public interface VankeGoodsDao {
List<VankeGoodsDto> selectList(VankeGoodsDto vankeGoodsDto); List<VankeGoodsDto> selectList(VankeGoodsDto vankeGoodsDto);
/**
* 根据供应商查询物品类别
* @return
*/
List<VankeGoodsDto> selectSupplierCategory(VankeGoodsDto vankeGoodsDto);
/**
* 根据供应商和物品类别 查询商品
* @param vankeGoodsDto
* @return
*/
List<VankeGoodsDto> selectGoodsByCategotyAndSupplier(VankeGoodsDto vankeGoodsDto);
} }
package com.macro.mall.dao.vanke;
import com.macro.mall.model.dto.vanke.VankeInboundRecordDto;
import java.util.List;
public interface VankeInboundRecordDao {
List<VankeInboundRecordDto> getPageList(VankeInboundRecordDto vankeInboundRecordDto);
}
package com.macro.mall.dao.vanke;
import com.macro.mall.model.dto.vanke.VankeOutboundRecordDto;
import java.util.List;
public interface VankeOutBoundRecordDao {
List<VankeOutboundRecordDto> getPageList(VankeOutboundRecordDto vankeOutboundRecordDto);
}
...@@ -27,10 +27,21 @@ public interface IVankeGoodsService { ...@@ -27,10 +27,21 @@ public interface IVankeGoodsService {
* @param pageNum 页数 * @param pageNum 页数
* @param pageSize 页数大小 * @param pageSize 页数大小
* @param name 物品名称 * @param name 物品名称
* @param goodsCategoryName 类别名称
* @param supplierName 供应商名称
* @param stockRoomName 库房名称
* @return * @return
*/ */
List<VankeGoodsDto> selectList(Integer pageNum,Integer pageSize,String name,String goodsCategoryName,String supplierName,String stockRoomName); List<VankeGoodsDto> selectList(Integer pageNum,Integer pageSize,String name, Long goodsCategoryId, Long supplierId, Long stockRoomId);
/**
* 根据供应商id 获得旗下物品类别
* @param vankeGoodsDto
* @return
*/
List<VankeGoodsDto> selectGoodsCategoryBySupplierId(VankeGoodsDto vankeGoodsDto);
/**
* 根据供应商和物品类别 查询商品
* @param vankeGoodsDto
* @return
*/
List<VankeGoodsDto> selectGoodsByCategotyAndSupplier(VankeGoodsDto vankeGoodsDto);
} }
package com.macro.mall.service.vanke;
import com.macro.mall.model.dto.vanke.VankeInboundRecordDto;
import com.macro.mall.model.dto.vanke.VankeOutboundRecordDto;
import java.util.List;
public interface IVankeInboundRecordService {
/**
* 入库分页操作
* @param pageNum
* @param pageSize
* @param goodsName
* @return
*/
List<VankeInboundRecordDto> getPageList(Integer pageNum,Integer pageSize,String goodsName);
}
package com.macro.mall.service.vanke;
import com.macro.mall.model.dto.vanke.VankeOutboundRecordDto;
import java.util.List;
public interface IVankeOutboundRecordService {
/**
* 出库记录分页操作
* @param pageNum
* @param pageSize
* @param goodsCategoryId
* @param departId
* @param memberName
* @param goodsMame
* @return
*/
List<VankeOutboundRecordDto> getPageList(Integer pageNum, Integer pageSize, Long goodsCategoryId, Long departId, String memberName, String goodsMame );
}
package com.macro.mall.service.vanke.impl; package com.macro.mall.service.vanke.impl;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.macro.mall.common.utils.TimeUtils;
import com.macro.mall.dao.vanke.VankeGoodsDao; import com.macro.mall.dao.vanke.VankeGoodsDao;
import com.macro.mall.mapper.VankeGoodsMapper; import com.macro.mall.mapper.VankeGoodsMapper;
import com.macro.mall.model.UmsAdmin; import com.macro.mall.model.UmsAdmin;
import com.macro.mall.model.VankeGoods; import com.macro.mall.model.VankeGoods;
import com.macro.mall.model.VankeStockRoom;
import com.macro.mall.model.common.ResultMsg; import com.macro.mall.model.common.ResultMsg;
import com.macro.mall.model.dto.vanke.VankeGoodsDto; import com.macro.mall.model.dto.vanke.VankeGoodsDto;
import com.macro.mall.service.system.UmsAdminService; import com.macro.mall.service.system.UmsAdminService;
import com.macro.mall.service.vanke.IVankeBackLogService; import com.macro.mall.service.vanke.IVankeBackLogService;
import com.macro.mall.service.vanke.IVankeGoodsService; import com.macro.mall.service.vanke.IVankeGoodsService;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List; import java.util.List;
@Service @Service
...@@ -36,20 +41,17 @@ public class VankeGoodsServiceImpl implements IVankeGoodsService { ...@@ -36,20 +41,17 @@ public class VankeGoodsServiceImpl implements IVankeGoodsService {
* @param pageNum 页数 * @param pageNum 页数
* @param pageSize 页数大小 * @param pageSize 页数大小
* @param name 物品名称 * @param name 物品名称
* @param goodsCategoryName 类别名称
* @param supplierName 供应商名称
* @param stockRoomName 库房名称
* @return * @return
*/ */
@Override @Override
public List<VankeGoodsDto> selectList(Integer pageNum, Integer pageSize, String name, String goodsCategoryName, String supplierName, String stockRoomName){ public List<VankeGoodsDto> selectList(Integer pageNum, Integer pageSize, String name, Long goodsCategoryId, Long supplierId, Long stockRoomId){
//分页操作 //分页操作
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);
VankeGoodsDto vankeGoodsDto = new VankeGoodsDto(); VankeGoodsDto vankeGoodsDto = new VankeGoodsDto();
vankeGoodsDto.setName(name); vankeGoodsDto.setName(name);
vankeGoodsDto.setGoodsCategoryName(goodsCategoryName); vankeGoodsDto.setGoodsCategoryId(goodsCategoryId);
vankeGoodsDto.setSupplierName(supplierName); vankeGoodsDto.setSupplierId(supplierId);
vankeGoodsDto.setStockRoomName(stockRoomName); vankeGoodsDto.setStockRoomId(stockRoomId);
return this.vankeGoodsDao.selectList(vankeGoodsDto); return this.vankeGoodsDao.selectList(vankeGoodsDto);
} }
...@@ -124,4 +126,35 @@ public class VankeGoodsServiceImpl implements IVankeGoodsService { ...@@ -124,4 +126,35 @@ public class VankeGoodsServiceImpl implements IVankeGoodsService {
} }
return new ResultMsg(true,"校验物品成功"); return new ResultMsg(true,"校验物品成功");
} }
/**
* 根据供应商id 获得旗下物品类别
* @param vankeGoodsDto
* @return
*/
@Override
public List<VankeGoodsDto> selectGoodsCategoryBySupplierId(VankeGoodsDto vankeGoodsDto){
return this.vankeGoodsDao.selectSupplierCategory(vankeGoodsDto);
}
/**
* 根据供应商和物品类别 查询商品
* @param vankeGoodsDto
* @return
*/
@Override
public List<VankeGoodsDto> selectGoodsByCategotyAndSupplier(VankeGoodsDto vankeGoodsDto){
return this.vankeGoodsDao.selectGoodsByCategotyAndSupplier(vankeGoodsDto);
}
@Test
public void test1(){
List<String> dataList = TimeUtils.getDaysByStartTimeAndEndTime("2019-2-25","2019-3-02");
dataList.forEach(data ->{
System.out.println(data);
//SELECT * FROM vanke_outbound_record where date_format(createtime,'%Y-%m-%d') = '2020-06-21'
});
}
} }
package com.macro.mall.service.vanke.impl;
import com.github.pagehelper.PageHelper;
import com.macro.mall.dao.vanke.VankeInboundRecordDao;
import com.macro.mall.mapper.VankeInboundRecordMapper;
import com.macro.mall.model.dto.vanke.VankeInboundRecordDto;
import com.macro.mall.model.dto.vanke.VankeOutboundRecordDto;
import com.macro.mall.service.vanke.IVankeInboundRecordService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
public class VankeInboundRecordServiceImpl implements IVankeInboundRecordService {
@Resource
private VankeInboundRecordDao vankeInboundRecordDao;
/**
* 入库分页操作
* @param pageNum
* @param pageSize
* @param goodsName
* @return
*/
@Override
public List<VankeInboundRecordDto> getPageList(Integer pageNum, Integer pageSize, String goodsName){
PageHelper.startPage(pageNum, pageSize);
VankeInboundRecordDto vankeInboundRecordDto = new VankeInboundRecordDto();
vankeInboundRecordDto.setGoodsName(goodsName);
return this.vankeInboundRecordDao.getPageList(vankeInboundRecordDto);
}
}
package com.macro.mall.service.vanke.impl;
import com.github.pagehelper.PageHelper;
import com.macro.mall.dao.vanke.VankeOutBoundRecordDao;
import com.macro.mall.model.dto.vanke.VankeOutboundRecordDto;
import com.macro.mall.service.vanke.IVankeOutboundRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
public class VankeOutboundRecordServiceImpl implements IVankeOutboundRecordService {
@Resource
private VankeOutBoundRecordDao vankeOutBoundRecordDao;
/**
* 出库记录分页操作
* @param pageNum
* @param pageSize
* @param goodsCategoryId
* @param departId
* @return
*/
@Override
public List<VankeOutboundRecordDto> getPageList(Integer pageNum, Integer pageSize, Long goodsCategoryId, Long departId, String memberName, String goodsMame){
PageHelper.startPage(pageNum, pageSize);
VankeOutboundRecordDto vord = new VankeOutboundRecordDto();
vord.setGoodsCategoryId(goodsCategoryId);
vord.setDepartId(departId);
vord.setMemberName(memberName);
vord.setGoodsName(goodsMame);
return this.vankeOutBoundRecordDao.getPageList(vord);
}
}
...@@ -17,15 +17,29 @@ ...@@ -17,15 +17,29 @@
<if test="name != null and name!=''"> <if test="name != null and name!=''">
and a.name like CONCAT(#{name},'%') and a.name like CONCAT(#{name},'%')
</if> </if>
<if test="goodsCategoryName != null and goodsCategoryName!=''"> <if test="goodsCategoryId != null and goodsCategoryId!=''">
and b.name = #{goodsCategoryName} and b.id = #{goodsCategoryId}
</if> </if>
<if test="stockRoomName != null and stockRoomName!=''"> <if test="stockRoomId != null and stockRoomId!=''">
and c.name = #{stockRoomName} and c.id = #{stockRoomId}
</if> </if>
<if test="supplierName != null and supplierName!=''"> <if test="supplierId != null and supplierId!=''">
and d.name = #{supplierName} and d.id = #{supplierId}
</if> </if>
</select> </select>
<select id="selectSupplierCategory" parameterType="com.macro.mall.model.dto.vanke.VankeGoodsDto" resultMap="BaseResultMap">
select a.goods_category_id,b.name goodsCategoryName from vanke_goods a
left join vanke_goods_category b ON a.goods_category_id = b.id
where a.delete_status = 1
and a.supplier_id = #{supplierId}
group by a.goods_category_id
</select>
<select id="selectGoodsByCategotyAndSupplier" parameterType="com.macro.mall.model.dto.vanke.VankeGoodsDto" resultMap="BaseResultMap">
select a.id,a.name from vanke_goods a
where a.delete_status = 1
and a.supplier_id = #{supplierId}
and a.goods_category_id = #{goodsCategoryId}
</select>
</mapper> </mapper>
\ No newline at end of file
<?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.macro.mall.dao.vanke.VankeInboundRecordDao">
<resultMap id="BaseResultMap" type="com.macro.mall.model.dto.vanke.VankeInboundRecordDto" extends="com.macro.mall.mapper.VankeInboundRecordMapper.BaseResultMap">
<result column="receptInboundName" jdbcType="VARCHAR" property="receptInboundName" />
<result column="backInboundName" jdbcType="VARCHAR" property="backInboundName" />
<result column="goodsName" jdbcType="VARCHAR" property="goodsName" />
<result column="stockRoomName" jdbcType="VARCHAR" property="stockRoomName" />
</resultMap>
<select id="getPageList" parameterType="com.macro.mall.model.dto.vanke.VankeInboundRecordDto" resultMap="BaseResultMap">
select
a.*,b.name receptInboundName,c.name backInboundName,d.name goodsName,e.name stockRoomName,f.name memberName,g.name departmentName
from vanke_inbound_record a
left join ums_member b ON a.recept_inbound_member_id = b.id
left join ums_member c ON a.back_inbound_member_id = c.id
left join vanke_goods d ON a.goods_id = d.id
left join vanke_stock_room e ON a.stock_room_id = e.id
where a.delete_status = 1
<if test="goodsName != null and goodsName!=''">
and d.name like CONCAT(#{goodsName},'%')
</if>
</select>
</mapper>
\ No newline at end of file
<?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.macro.mall.dao.vanke.VankeOutBoundRecordDao">
<resultMap id="BaseResultMap" type="com.macro.mall.model.dto.vanke.VankeOutboundRecordDto" extends="com.macro.mall.mapper.VankeOutboundRecordMapper.BaseResultMap">
<result column="receptOutboundName" jdbcType="VARCHAR" property="receptOutboundName" />
<result column="backOutboundName" jdbcType="VARCHAR" property="backOutboundName" />
<result column="goodsName" jdbcType="VARCHAR" property="goodsName" />
<result column="stockRoomName" jdbcType="VARCHAR" property="stockRoomName" />
<result column="memberName" jdbcType="VARCHAR" property="memberName" />
<result column="departmentName" jdbcType="VARCHAR" property="departmentName" />
</resultMap>
<select id="getPageList" parameterType="com.macro.mall.model.dto.vanke.VankeOutboundRecordDto" resultMap="BaseResultMap">
select
a.*,b.name receptOutboundName,c.name backOutboundName,d.name goodsName,e.name stockRoomName,f.name memberName,g.name departmentName
from vanke_outbound_record a
left join ums_member b ON a.recept_outbound_member_id = b.id
left join ums_member c ON a.back_outbound_member_id = c.id
left join vanke_goods d ON a.goods_id = d.id
left join vanke_stock_room e ON a.stock_room_id = e.id
left join ums_member f ON a.member_id = f.id
left join vanke_department g ON a.depart_id = g.id
left join vanke_goods_category h ON a.
where a.delete_status = 1
<if test="goodsCategoryId != null">
and a.goods_category_id = #{goodsCategoryId}
</if>
<if test="departId != null">
and a.depart_id = #{departId}
</if>
<if test="goodsName != null and goodsName!=''">
and d.name like CONCAT(#{goodsName},'%')
</if>
<if test="memberName != null and memberName!=''">
and f.name like CONCAT(#{memberName},'%')
</if>
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment