
117 changed files with 1203 additions and 2351 deletions
@ -0,0 +1,99 @@ |
|||||
|
package com.yxt.oms.apiadmin.aggregation; |
||||
|
|
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import com.yxt.oms.biz.func.dictcommon.*; |
||||
|
import com.yxt.oms.biz.func.dicttype.DictTypeService; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Controller; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/7/5 21:29 |
||||
|
* @description |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Controller |
||||
|
@RequestMapping("apiadmin/dictcommons") |
||||
|
@Api(tags = "数据字典数据项管理") |
||||
|
public class DictCommonRest { |
||||
|
|
||||
|
@Autowired |
||||
|
private DictTypeService dictTypeService; |
||||
|
|
||||
|
@Autowired |
||||
|
private DictCommonService dictCommonService; |
||||
|
|
||||
|
@PostMapping(value = "/save") |
||||
|
@ResponseBody |
||||
|
@ApiOperation(value = "数据字典数据项保存") |
||||
|
ResultBean save(@Valid @RequestBody DictCommonDto dictCommonDto) { |
||||
|
return dictCommonService.save(dictCommonDto); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("/pageList") |
||||
|
@ResponseBody |
||||
|
@ApiOperation(value = "数据字典数据项分页列表") |
||||
|
ResultBean<PagerVo<DictCommonVo>> pageList(@RequestBody PagerQuery<DictCommonQuery> pagerQuery) { |
||||
|
return dictCommonService.pageList(pagerQuery); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("/update/{sid}") |
||||
|
@ResponseBody |
||||
|
@ApiOperation(value = "数据字典修改后保存") |
||||
|
ResultBean update(@Valid @RequestBody DictCommonDto dictCommonDto, @ApiParam(value = "数据项sid", required = true) @PathVariable("sid") String sid){ |
||||
|
|
||||
|
return dictCommonService.updateBySid(dictCommonDto, sid); |
||||
|
} |
||||
|
|
||||
|
@ResponseBody |
||||
|
@DeleteMapping("/delete/{sid}") |
||||
|
@ApiOperation(value = "删除") |
||||
|
ResultBean delete(@ApiParam(value = "数据项sid", required = true) @PathVariable("sid") String sid){ |
||||
|
return dictCommonService.del(sid); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/typeValues") |
||||
|
@ResponseBody |
||||
|
@ApiOperation("下拉框的获取") |
||||
|
ResultBean<List<DictCommonVo>> getTypeValues(@RequestParam("type") String type, @RequestParam(value = "psid", defaultValue = "0")String psid){ |
||||
|
return dictCommonService.getValue(type,psid); |
||||
|
} |
||||
|
|
||||
|
@ResponseBody |
||||
|
@GetMapping("/selectBykey/{key}/{type}") |
||||
|
@ApiOperation(value = "数据字典信息修改时的初始化信息") |
||||
|
public ResultBean<DictCommonVo> selectBykey(@ApiParam(value = "数据字典key", required = true) @PathVariable("key") String key, @ApiParam(value = "数据字典type", required = true) @PathVariable("type") String type) { |
||||
|
|
||||
|
return dictCommonService.selectBykey(key, type); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/getFirstDictKeyByType") |
||||
|
@ResponseBody |
||||
|
@ApiOperation("根据数据字典的key获取第一个值(默认值)") |
||||
|
ResultBean getFirstDictKeyByType(@RequestParam("dictType") String dictType, @RequestParam("psid") String psid){ |
||||
|
ResultBean<List<DictCommonVo>> resultBean = getTypeValues(dictType, psid); |
||||
|
if (resultBean.getSuccess() && resultBean.getData() != null) { |
||||
|
String dictKey = resultBean.getData().get(0).getDictKey(); |
||||
|
return new ResultBean().success().setData(dictKey); |
||||
|
} else { |
||||
|
return new ResultBean().fail().setData(new DictCommon()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/getTypeValueList") |
||||
|
@ResponseBody |
||||
|
@ApiOperation("根据分类编码和数据分组查询数据字典") |
||||
|
ResultBean<List<DictCommonVo>> getTypeValueList(@RequestParam("type")String type,@RequestParam("groupNum")String groupNum){ |
||||
|
return dictCommonService.getList(type,groupNum); |
||||
|
} |
||||
|
} |
@ -0,0 +1,65 @@ |
|||||
|
package com.yxt.oms.apiadmin.aggregation; |
||||
|
|
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import com.yxt.oms.biz.func.dictcommon.DictCommonService; |
||||
|
import com.yxt.oms.biz.func.dicttype.DictTypeDto; |
||||
|
import com.yxt.oms.biz.func.dicttype.DictTypeQuery; |
||||
|
import com.yxt.oms.biz.func.dicttype.DictTypeService; |
||||
|
import com.yxt.oms.biz.func.dicttype.DictTypeVo; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Controller; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/7/5 22:37 |
||||
|
* @description |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Controller |
||||
|
@RequestMapping("apiadmin/dicttypes") |
||||
|
@Api(tags = "数据字典类型管理") |
||||
|
public class DictTypeRest{ |
||||
|
|
||||
|
@Autowired |
||||
|
private DictTypeService dictTypeService; |
||||
|
|
||||
|
@Autowired |
||||
|
private DictCommonService dictCommonService; |
||||
|
|
||||
|
|
||||
|
@PostMapping(value = "/save") |
||||
|
@ResponseBody |
||||
|
@ApiOperation(value = "数据字典类型保存") |
||||
|
ResultBean save(@Valid @RequestBody DictTypeDto dictTypeDto){ |
||||
|
return dictTypeService.save(dictTypeDto); |
||||
|
} |
||||
|
@PostMapping("/pageList") |
||||
|
@ResponseBody |
||||
|
@ApiOperation(value = "数据字典类型分页列表") |
||||
|
ResultBean<PagerVo<DictTypeVo>> pageList(@RequestBody PagerQuery<DictTypeQuery> pagerQuery){ |
||||
|
return dictTypeService.pageList(pagerQuery); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("/update/{sid}") |
||||
|
@ResponseBody |
||||
|
@ApiOperation(value = "数据字典类型更新") |
||||
|
ResultBean update(@Valid DictTypeDto dictTypeDto, @ApiParam(value = "数据字典类型sid", required = true) @PathVariable("sid") String sid){ |
||||
|
return dictTypeService.updateBySid(dictTypeDto, sid); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping("/delete/{sid}") |
||||
|
@ResponseBody |
||||
|
@ApiOperation(value = "数据字典类型删除") |
||||
|
ResultBean delete(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid){ |
||||
|
return dictTypeService.del(sid); |
||||
|
} |
||||
|
} |
@ -1,74 +0,0 @@ |
|||||
package com.yxt.oms.apiadmin.aggregation; |
|
||||
|
|
||||
import com.yxt.common.core.query.PagerQuery; |
|
||||
import com.yxt.common.core.result.ResultBean; |
|
||||
import com.yxt.common.core.vo.PagerVo; |
|
||||
import com.yxt.oms.biz.func.purchasereceiptbill.PurchaseReceiptBillService; |
|
||||
import com.yxt.oms.biz.func.purchasereceiptbill.PurchaseReceiptBill; |
|
||||
import com.yxt.oms.biz.func.purchasereceiptbill.PurchaseReceiptBillDto; |
|
||||
import com.yxt.oms.biz.func.purchasereceiptbill.PurchaseReceiptBillQuery; |
|
||||
import com.yxt.oms.biz.func.purchasereceiptbill.PurchaseReceiptBillVo; |
|
||||
import com.yxt.oms.utils.OrgPathQuery; |
|
||||
import io.swagger.annotations.Api; |
|
||||
import io.swagger.annotations.ApiOperation; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.web.bind.annotation.*; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 15:49 |
|
||||
*/ |
|
||||
@Api(tags = "商品品牌") |
|
||||
@RestController |
|
||||
@RequestMapping("/apiadmin/base/basegoodsbrand") |
|
||||
public class PurchaseReceiptBillRest { |
|
||||
|
|
||||
@Autowired |
|
||||
PurchaseReceiptBillService baseBrandInfoService; |
|
||||
|
|
||||
@ApiOperation("分页列表") |
|
||||
@PostMapping("/listPage") |
|
||||
public ResultBean<PagerVo<PurchaseReceiptBillVo>> listPage(@RequestBody PagerQuery<PurchaseReceiptBillQuery> pq) { |
|
||||
return baseBrandInfoService.listPage(pq); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation("查询所有的品牌") |
|
||||
@PostMapping("/listAll") |
|
||||
public ResultBean<List<PurchaseReceiptBill>> listAll(@RequestBody OrgPathQuery query) { |
|
||||
return baseBrandInfoService.listAll(query); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation("保存") |
|
||||
@PostMapping("/save") |
|
||||
public ResultBean<String> save(@RequestBody PurchaseReceiptBillDto dto) { |
|
||||
return baseBrandInfoService.save(dto); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation("初始化") |
|
||||
@GetMapping("/initialization/{sid}") |
|
||||
public ResultBean<PurchaseReceiptBillVo> initialization(@PathVariable("sid") String sid) { |
|
||||
return baseBrandInfoService.initialization(sid); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation("删除") |
|
||||
@DeleteMapping("/delete/{sid}") |
|
||||
public ResultBean delete(@PathVariable("sid") String sid) { |
|
||||
return baseBrandInfoService.delete(sid); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation("根据sid批量删除") |
|
||||
@DeleteMapping("/delBySids") |
|
||||
public ResultBean delBySids(@RequestBody String[] sids){ |
|
||||
ResultBean rb = ResultBean.fireFail(); |
|
||||
baseBrandInfoService.delAll(sids); |
|
||||
return rb.success(); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation("更改可用状态") |
|
||||
@GetMapping("/updateIsEnable/{sid}/{isEnable}") |
|
||||
public ResultBean updateIsEnable(@PathVariable("sid") String sid,@PathVariable("isEnable")String isEnable) { |
|
||||
return baseBrandInfoService.updateIsEnable(sid,isEnable); |
|
||||
} |
|
||||
} |
|
@ -0,0 +1,61 @@ |
|||||
|
package com.yxt.oms.apiadmin.aggregation; |
||||
|
|
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.oms.biz.func.region.RegionChildTwoVo; |
||||
|
import com.yxt.oms.biz.func.region.RegionService; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Api(tags = "省、市、县") |
||||
|
@RestController |
||||
|
@RequestMapping("/apiadmin/regions") |
||||
|
public class RegionRest { |
||||
|
|
||||
|
@Autowired |
||||
|
private RegionService regionService; |
||||
|
|
||||
|
/** |
||||
|
* 区域获取省 |
||||
|
* |
||||
|
* @return 所有省的集合 |
||||
|
*/ |
||||
|
@ApiOperation("获取省") |
||||
|
@ResponseBody |
||||
|
@GetMapping("/getProvince") |
||||
|
public ResultBean getProvince() { |
||||
|
List<RegionChildTwoVo> regionList = regionService.getProvince(); |
||||
|
return ResultBean.fireSuccess().setData(regionList); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 根据省查询该省下所有的市 |
||||
|
* |
||||
|
* @param sid 省sid |
||||
|
* @return 某省下所有的市 |
||||
|
*/ |
||||
|
@ApiOperation("根据省sid获取该省的所有市") |
||||
|
@ResponseBody |
||||
|
@GetMapping("/getCity") |
||||
|
public ResultBean getCity(@RequestParam("sid") String sid){ |
||||
|
List<RegionChildTwoVo> city = regionService.getCity(sid); |
||||
|
return ResultBean.fireSuccess().setData(city); |
||||
|
}; |
||||
|
|
||||
|
/** |
||||
|
* 根据市查询该市下的所有县区 |
||||
|
* |
||||
|
* @param sid 市sid |
||||
|
* @return 某市下的所有县区 |
||||
|
*/ |
||||
|
@ApiOperation("根据市sid获取该市的所有县区") |
||||
|
@ResponseBody |
||||
|
@GetMapping("/getCounty") |
||||
|
public ResultBean getCounty(@RequestParam("sid") String sid){ |
||||
|
List<RegionChildTwoVo> county = regionService.getCounty(sid); |
||||
|
return ResultBean.fireSuccess().setData(county); |
||||
|
}; |
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.yxt.oms.biz.func.dictcommon; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/6/23 15:40 |
||||
|
* @description 数据字典数据项 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DictCommon extends BaseEntity { |
||||
|
private static final long serialVersionUID = 8921237815183601526L; |
||||
|
@ApiModelProperty(value = "数据项值") |
||||
|
private String dictKey; |
||||
|
@ApiModelProperty(value = "数据类型") |
||||
|
private String dictType; |
||||
|
@ApiModelProperty(value = "数据项相对应的value值") |
||||
|
private String dictValue; |
||||
|
@ApiModelProperty(value = "数据项的父级sid") |
||||
|
private String parentSid; |
||||
|
@ApiModelProperty(value = "分组名称") |
||||
|
private String groupName; |
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
package com.yxt.oms.biz.func.dictcommon; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/6/23 15:41 |
||||
|
* @description 数据字典数据项参数 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DictCommonDto implements Dto { |
||||
|
private static final long serialVersionUID = 9102264215113210976L; |
||||
|
|
||||
|
@ApiModelProperty(value = "数据项值", required = true) |
||||
|
@NotBlank(message = "数据项值不能为空") |
||||
|
private String dictKey; |
||||
|
|
||||
|
@ApiModelProperty(value = "数据类型", required = true) |
||||
|
@NotBlank(message = "数据类型不能为空") |
||||
|
private String dictType; |
||||
|
|
||||
|
@ApiModelProperty(value = "数据项相对应的value值", required = true) |
||||
|
@NotBlank(message = "数据项相对应的value值不能为空") |
||||
|
private String dictValue; |
||||
|
|
||||
|
@ApiModelProperty(value = "数据项的父级sid", required = true) |
||||
|
@NotBlank(message = "数据项的父级sid不能为空") |
||||
|
private String parentSid; |
||||
|
|
||||
|
@ApiModelProperty(value = "分组名称", required = true) |
||||
|
private String groupName; |
||||
|
} |
@ -0,0 +1,60 @@ |
|||||
|
package com.yxt.oms.biz.func.dictcommon; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/6/23 15:07 |
||||
|
* @description |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface DictCommonMapper extends BaseMapper<DictCommon> { |
||||
|
/** |
||||
|
* 根据数据项的key值和分类类型code值查询数量 |
||||
|
* |
||||
|
* @param dictKey 数据项key值 |
||||
|
* @param dictType 类型code值 |
||||
|
* @param parentSid 父级sid,无父级的此字段为0 |
||||
|
* @return |
||||
|
*/ |
||||
|
DictCommon selectSize(@Param("dictkey") String dictKey, @Param("dictType") String dictType, @Param("parentSid") String parentSid); |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 根据类型查询数据项 |
||||
|
* |
||||
|
* @param dictTypeCode 数据分类的类型 |
||||
|
* @return |
||||
|
*/ |
||||
|
List<DictCommon> selectByType(String dictTypeCode); |
||||
|
|
||||
|
|
||||
|
IPage<DictCommonVo> pageList( |
||||
|
IPage<DictCommonQuery> page, @Param(Constants.WRAPPER) Wrapper<DictCommonVo> qw); |
||||
|
|
||||
|
DictCommonVo selectBykey(@Param("key") String key, @Param("type") String sid); |
||||
|
|
||||
|
/** |
||||
|
* 根据类型和父级sid查询数据字典 |
||||
|
* |
||||
|
* @param qw 查询条件 |
||||
|
* @return |
||||
|
*/ |
||||
|
List<DictCommonVo> getValue(@Param(Constants.WRAPPER) QueryWrapper<DictCommonVo> qw); |
||||
|
|
||||
|
/** |
||||
|
* 根据数据字典编码类别和分组查询数据字典 |
||||
|
* @param type 数据字典编码类别 |
||||
|
* @param groupNum 数据字典分组 |
||||
|
* @return |
||||
|
*/ |
||||
|
List<DictCommonVo> getList(@Param("type") String type, @Param("groupNum") String groupNum); |
||||
|
} |
@ -0,0 +1,43 @@ |
|||||
|
<?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.yxt.oms.biz.func.dictcommon.DictCommonMapper"> |
||||
|
<select id="selectSize" resultType="com.yxt.oms.biz.func.dictcommon.DictCommon"> |
||||
|
SELECT * |
||||
|
FROM dict_common |
||||
|
WHERE dictKey = #{dictkey} |
||||
|
AND dictType = #{dictType} |
||||
|
AND parentSid = #{parentSid} |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectByType" resultType="com.yxt.oms.biz.func.dictcommon.DictCommon"> |
||||
|
SELECT * |
||||
|
FROM dict_common |
||||
|
WHERE dictType = #{dictTypeCode} |
||||
|
</select> |
||||
|
|
||||
|
<select id="pageList" resultType="com.yxt.oms.biz.func.dictcommon.DictCommonVo"> |
||||
|
SELECT dc.dictValue, dc.dictType, dc.dictKey, dc.sid, dc.parentSid,dc.groupName |
||||
|
FROM dict_common dc |
||||
|
${ew.customSqlSegment} |
||||
|
</select> |
||||
|
<!--获取下拉框--> |
||||
|
<select id="getValue" resultType="com.yxt.oms.biz.func.dictcommon.DictCommonVo"> |
||||
|
SELECT dc.sid, dc.dictType, dc.dictKey, dc.dictValue, dc.parentSid |
||||
|
FROM dict_common dc ${ew.customSqlSegment} |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectBykey" resultType="com.yxt.oms.biz.func.dictcommon.DictCommonVo"> |
||||
|
SELECT sid, |
||||
|
dictKey, |
||||
|
dictType, |
||||
|
dictValue, |
||||
|
groupName |
||||
|
FROM dict_common |
||||
|
WHERE dictType = #{type} |
||||
|
AND dictkey = #{key} |
||||
|
</select> |
||||
|
|
||||
|
<select id="getList" resultType="com.yxt.oms.biz.func.dictcommon.DictCommonVo"> |
||||
|
select * from dict_common dc where dc.dictType = #{type} and find_in_set(#{groupNum}, replace(dc.groupName, ',', ',')); |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,24 @@ |
|||||
|
package com.yxt.oms.biz.func.dictcommon; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/6/28 10:39 |
||||
|
* @description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DictCommonQuery implements Query { |
||||
|
private static final long serialVersionUID = -787372981183812826L; |
||||
|
|
||||
|
@ApiModelProperty(value = "数据字典条目key", required = false) |
||||
|
private String dictKey; |
||||
|
|
||||
|
@ApiModelProperty(value = "数据字典文本", required = false) |
||||
|
private String dictValue; |
||||
|
|
||||
|
@ApiModelProperty(value ="dictType") |
||||
|
private String dictType; |
||||
|
} |
@ -0,0 +1,61 @@ |
|||||
|
package com.yxt.oms.biz.func.dictcommon; |
||||
|
|
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import com.yxt.oms.feign.portal.dictcommon.DictCommonFeign; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/6/23 15:06 |
||||
|
* @description |
||||
|
*/ |
||||
|
@Service |
||||
|
public class DictCommonService extends MybatisBaseService<DictCommonMapper, DictCommon> { |
||||
|
|
||||
|
@Resource |
||||
|
DictCommonFeign dictCommonFeign; |
||||
|
|
||||
|
public ResultBean save(DictCommonDto dictCommonDto) { |
||||
|
return dictCommonFeign.save(dictCommonDto); |
||||
|
} |
||||
|
public ResultBean updateBySid(DictCommonDto dictCommonDto,String sid ) { |
||||
|
return dictCommonFeign.update(dictCommonDto,sid ); |
||||
|
} |
||||
|
public ResultBean del(String sid ) { |
||||
|
return dictCommonFeign.delete(sid ); |
||||
|
} |
||||
|
|
||||
|
public List<DictCommon> selectByType(String dictTypeCode) { |
||||
|
return baseMapper.selectByType(dictTypeCode); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<PagerVo<DictCommonVo>> pageList(PagerQuery<DictCommonQuery> pagerQuery) { |
||||
|
return dictCommonFeign.pageList(pagerQuery); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 根据类型和父级sid查询数据字典 |
||||
|
* |
||||
|
* @param |
||||
|
* @return |
||||
|
*/ |
||||
|
public ResultBean<List<DictCommonVo>> getValue(String type,String psid) { |
||||
|
|
||||
|
return dictCommonFeign.getTypeValues(type, psid); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<DictCommonVo> selectBykey(String key, String type) { |
||||
|
return dictCommonFeign.selectBykey(key, type); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<List<DictCommonVo>> getList(String type, String groupNum) { |
||||
|
return dictCommonFeign.getTypeValueList(type,groupNum); |
||||
|
} |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package com.yxt.oms.biz.func.dictcommon; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/9/30 15:33 |
||||
|
* @description 下拉框条件 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DictCommonTypeQuery implements Query { |
||||
|
private static final long serialVersionUID = 139959085226402464L; |
||||
|
|
||||
|
@ApiModelProperty(value = "数据字典类型", required = true) |
||||
|
private String type; |
||||
|
|
||||
|
@ApiModelProperty(value = "psid", required = false,example = "0") |
||||
|
private String psid; |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
package com.yxt.oms.biz.func.dictcommon; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/6/23 15:54 |
||||
|
* @description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DictCommonVo implements Vo { |
||||
|
private static final long serialVersionUID = -1094142938193916816L; |
||||
|
|
||||
|
@ApiModelProperty(value = "数据字典项sid") |
||||
|
private String sid; |
||||
|
|
||||
|
@ApiModelProperty(value = "数据字典项key") |
||||
|
private String dictKey; |
||||
|
|
||||
|
@ApiModelProperty(value = "数据字典类型") |
||||
|
private String dictType; |
||||
|
|
||||
|
@ApiModelProperty(value = "数据字典项名称") |
||||
|
private String dictValue; |
||||
|
@ApiModelProperty(value = "父级sid:0为第一级") |
||||
|
private String parentSid; |
||||
|
|
||||
|
@ApiModelProperty(value = "分组名称") |
||||
|
private String groupName; |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package com.yxt.oms.biz.func.dicttype; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/7/5 22:29 |
||||
|
* @description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DictType extends BaseEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = -2790449398289680139L; |
||||
|
|
||||
|
@ApiModelProperty(value = "类型代码") |
||||
|
private String dictTypeCode; |
||||
|
@ApiModelProperty(value = "类型名称") |
||||
|
private String dictTypeName; |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.yxt.oms.biz.func.dicttype; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/6/23 15:20 |
||||
|
* @description 数据字典类型参数 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DictTypeDto implements Dto { |
||||
|
private static final long serialVersionUID = -2302005624272862359L; |
||||
|
|
||||
|
@ApiModelProperty(value = "类型代码", required = true) |
||||
|
@NotBlank(message = "类型代码不能为空") |
||||
|
private String dictTypeCode; |
||||
|
|
||||
|
@ApiModelProperty(value = "类型名称", required = true) |
||||
|
@NotBlank(message = "类型名称不能为空") |
||||
|
private String dictTypeName; |
||||
|
|
||||
|
@ApiModelProperty(value = "类型说明", required = false) |
||||
|
private String remarks; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
package com.yxt.oms.biz.func.dicttype; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/6/23 14:56 |
||||
|
* @description |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface DictTypeMapper extends BaseMapper<DictType> { |
||||
|
|
||||
|
/** |
||||
|
* 查询该类型代码存在的数量 |
||||
|
* |
||||
|
* @param dictTypeCode 类型代码 |
||||
|
* @return |
||||
|
*/ |
||||
|
int selectSize(String dictTypeCode); |
||||
|
|
||||
|
IPage<DictTypeVo> pageList(IPage<?> page, @Param(Constants.WRAPPER) Wrapper<DictTypeVo> qw); |
||||
|
|
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
<?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.yxt.oms.biz.func.dicttype.DictTypeMapper"> |
||||
|
|
||||
|
<select id="selectSize" resultType="java.lang.Integer"> |
||||
|
SELECT COUNT(*) |
||||
|
FROM dict_type |
||||
|
WHERE dictTypeCode = #{dictTypeCode} |
||||
|
</select> |
||||
|
|
||||
|
<select id="pageList" resultType="com.yxt.oms.biz.func.dicttype.DictTypeVo"> |
||||
|
SELECT dt.dictTypeCode, dt.dictTypeName, dt.sid, dt.remarks |
||||
|
FROM dict_type dt |
||||
|
${ew.customSqlSegment} |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,24 @@ |
|||||
|
package com.yxt.oms.biz.func.dicttype; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/6/28 9:17 |
||||
|
* @description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DictTypeQuery implements Query { |
||||
|
private static final long serialVersionUID = -1033205660448956012L; |
||||
|
|
||||
|
@ApiModelProperty(value = "数据字典code", required = false) |
||||
|
private String dictTypeCode; |
||||
|
|
||||
|
@ApiModelProperty(value = "数据分类名称", required = false) |
||||
|
private String dictTypeName; |
||||
|
|
||||
|
@ApiModelProperty(value = "说明", required = false) |
||||
|
private String remarks; |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
package com.yxt.oms.biz.func.dicttype; |
||||
|
|
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import com.yxt.oms.feign.portal.dicttype.DictTypeFeign; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/6/23 14:55 |
||||
|
* @description 数据字典类型实现类 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class DictTypeService extends MybatisBaseService<DictTypeMapper, DictType> { |
||||
|
@Autowired |
||||
|
DictTypeFeign dictTypeFeign; |
||||
|
|
||||
|
|
||||
|
public ResultBean save(DictTypeDto dictTypeDto) { |
||||
|
return dictTypeFeign.save(dictTypeDto); |
||||
|
} |
||||
|
public ResultBean updateBySid(DictTypeDto dictTypeDto,String sid ) { |
||||
|
return dictTypeFeign.update(dictTypeDto,sid); |
||||
|
} |
||||
|
public ResultBean del( String sid ) { |
||||
|
return dictTypeFeign.delete(sid); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<PagerVo<DictTypeVo>> pageList(PagerQuery<DictTypeQuery> pagerQuery) { |
||||
|
return dictTypeFeign.pageList(pagerQuery); |
||||
|
} |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
package com.yxt.oms.biz.func.dicttype; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/6/23 15:18 |
||||
|
* @description 数据字典类型返回数据 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DictTypeVo implements Vo { |
||||
|
private static final long serialVersionUID = 9052935182700117654L; |
||||
|
|
||||
|
@ApiModelProperty(value = "数据类型sid") |
||||
|
private String sid; |
||||
|
|
||||
|
@ApiModelProperty(value = "类型代码") |
||||
|
private String dictTypeCode; |
||||
|
|
||||
|
@ApiModelProperty(value = "类型名称") |
||||
|
private String dictTypeName; |
||||
|
|
||||
|
@ApiModelProperty(value = "说明") |
||||
|
private String remarks; |
||||
|
|
||||
|
@ApiModelProperty(value = "分组名称") |
||||
|
private String groupName; |
||||
|
|
||||
|
|
||||
|
} |
@ -1,85 +0,0 @@ |
|||||
/********************************************************* |
|
||||
********************************************************* |
|
||||
******************** ******************* |
|
||||
************* ************ |
|
||||
******* _oo0oo_ ******* |
|
||||
*** o8888888o *** |
|
||||
* 88" . "88 * |
|
||||
* (| -_- |) * |
|
||||
* 0\ = /0 * |
|
||||
* ___/`---'\___ * |
|
||||
* .' \\| |// '. *
|
|
||||
* / \\||| : |||// \ *
|
|
||||
* / _||||| -:- |||||- \ * |
|
||||
* | | \\\ - /// | | *
|
|
||||
* | \_| ''\---/'' |_/ | * |
|
||||
* \ .-\__ '-' ___/-. / * |
|
||||
* ___'. .' /--.--\ `. .'___ * |
|
||||
* ."" '< `.___\_<|>_/___.' >' "". * |
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|
||||
* `=---=' * |
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|
||||
*********************************************************/ |
|
||||
package com.yxt.oms.biz.func.purchasebill; |
|
||||
|
|
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import com.yxt.common.core.vo.Vo; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
import java.math.BigDecimal; |
|
||||
import java.util.Date; |
|
||||
|
|
||||
/** |
|
||||
* Project: yxt-pms(采购) <br/> |
|
||||
* File: PmsPurchaseBillVo.java <br/> |
|
||||
* Class: com.yxt.pms.api.purchasebill.PmsPurchaseBillVo <br/> |
|
||||
* Description: 采购单 视图数据对象. <br/> |
|
||||
* Copyright: Copyright (c) 2011 <br/> |
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
|
||||
* Makedate: 2024-03-19 13:51:46 <br/> |
|
||||
* |
|
||||
* @author liupopo |
|
||||
* @version 1.0 |
|
||||
* @since 1.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@ApiModel(value = "采购单 视图数据对象", description = "采购单 视图数据对象") |
|
||||
public class PurchaseChoiceBillDetailsVo implements Vo { |
|
||||
|
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|
||||
@ApiModelProperty("单据日期") |
|
||||
private Date createTime; |
|
||||
@ApiModelProperty("采购员姓名") |
|
||||
private String purchaserName; |
|
||||
@ApiModelProperty("采购类型Value(厂家采购、外采、其他)") |
|
||||
private String purchaseTypeValue; |
|
||||
@ApiModelProperty("采购原因(储备/客户订单/在修车辆)") |
|
||||
private String purchaseReasonValue; |
|
||||
@ApiModelProperty("付款方式value(预付款/月结/单笔付款)") |
|
||||
private String payTypeValue; |
|
||||
@ApiModelProperty("供应商名称") |
|
||||
private String supplierName; |
|
||||
@ApiModelProperty("是否需要开发票(是1,否0)") |
|
||||
private String isInvoicing; |
|
||||
@ApiModelProperty("票据类型(不含税、增值税、普通税、已含增值税)") |
|
||||
private String billType; |
|
||||
@ApiModelProperty("税率") |
|
||||
private BigDecimal taxRate; |
|
||||
@ApiModelProperty("备注") |
|
||||
private String remarks; |
|
||||
@ApiModelProperty("采购金额合计") |
|
||||
private BigDecimal amountCount; |
|
||||
@ApiModelProperty("运费") |
|
||||
private BigDecimal freight; |
|
||||
@ApiModelProperty("优惠金额") |
|
||||
private BigDecimal discountAmount; |
|
||||
@ApiModelProperty("误差调整金额") |
|
||||
private BigDecimal errorAmount; |
|
||||
|
|
||||
} |
|
@ -1,79 +0,0 @@ |
|||||
/********************************************************* |
|
||||
********************************************************* |
|
||||
******************** ******************* |
|
||||
************* ************ |
|
||||
******* _oo0oo_ ******* |
|
||||
*** o8888888o *** |
|
||||
* 88" . "88 * |
|
||||
* (| -_- |) * |
|
||||
* 0\ = /0 * |
|
||||
* ___/`---'\___ * |
|
||||
* .' \\| |// '. *
|
|
||||
* / \\||| : |||// \ *
|
|
||||
* / _||||| -:- |||||- \ * |
|
||||
* | | \\\ - /// | | *
|
|
||||
* | \_| ''\---/'' |_/ | * |
|
||||
* \ .-\__ '-' ___/-. / * |
|
||||
* ___'. .' /--.--\ `. .'___ * |
|
||||
* ."" '< `.___\_<|>_/___.' >' "". * |
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|
||||
* `=---=' * |
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|
||||
*********************************************************/ |
|
||||
package com.yxt.oms.biz.func.purchasebill; |
|
||||
|
|
||||
|
|
||||
import com.yxt.common.core.query.Query; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
/** |
|
||||
* Project: yxt-pms(采购) <br/> |
|
||||
* File: PmsPurchaseBillQuery.java <br/> |
|
||||
* Class: com.yxt.pms.api.purchasebill.PmsPurchaseBillQuery <br/> |
|
||||
* Description: 采购单 查询条件. <br/> |
|
||||
* Copyright: Copyright (c) 2011 <br/> |
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
|
||||
* Makedate: 2024-03-19 13:51:45 <br/> |
|
||||
* |
|
||||
* @author liupopo |
|
||||
* @version 1.0 |
|
||||
* @since 1.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@ApiModel(value = "采购单原单 查询条件", description = "采购单 查询条件") |
|
||||
public class PurchaseChoiceBillQuery implements Query { |
|
||||
|
|
||||
@ApiModelProperty("创建组织名称") |
|
||||
private String createOrgName; |
|
||||
@ApiModelProperty("申请部门名称") |
|
||||
private String deptName; |
|
||||
@ApiModelProperty("申请人") |
|
||||
private String createByName; |
|
||||
@ApiModelProperty("单据编号") |
|
||||
private String billNo; |
|
||||
@ApiModelProperty("创建开始日期") |
|
||||
private String createStartTime; |
|
||||
@ApiModelProperty("创建结束日期") |
|
||||
private String createEndTime; |
|
||||
@ApiModelProperty("办结开始日期") |
|
||||
private String finishStartTime; |
|
||||
@ApiModelProperty("办结结束日期") |
|
||||
private String finishEndTime; |
|
||||
@ApiModelProperty("采购类型Value(厂家采购、外采、其他)") |
|
||||
private String purchaseTypeValue; |
|
||||
@ApiModelProperty("采购原因(储备/客户订单/在修车辆)") |
|
||||
private String purchaseReasonValue; |
|
||||
@ApiModelProperty("付款方式value(预付款/月结/单笔付款)") |
|
||||
private String payTypeValue; |
|
||||
@ApiModelProperty("供应商名称") |
|
||||
private String supplierName; |
|
||||
@ApiModelProperty("是否需要开发票(是1,否0)") |
|
||||
private String isInvoicing; |
|
||||
|
|
||||
private String createOrgSid; |
|
||||
} |
|
@ -1,105 +0,0 @@ |
|||||
/********************************************************* |
|
||||
********************************************************* |
|
||||
******************** ******************* |
|
||||
************* ************ |
|
||||
******* _oo0oo_ ******* |
|
||||
*** o8888888o *** |
|
||||
* 88" . "88 * |
|
||||
* (| -_- |) * |
|
||||
* 0\ = /0 * |
|
||||
* ___/`---'\___ * |
|
||||
* .' \\| |// '. *
|
|
||||
* / \\||| : |||// \ *
|
|
||||
* / _||||| -:- |||||- \ * |
|
||||
* | | \\\ - /// | | *
|
|
||||
* | \_| ''\---/'' |_/ | * |
|
||||
* \ .-\__ '-' ___/-. / * |
|
||||
* ___'. .' /--.--\ `. .'___ * |
|
||||
* ."" '< `.___\_<|>_/___.' >' "". * |
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|
||||
* `=---=' * |
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|
||||
*********************************************************/ |
|
||||
package com.yxt.oms.biz.func.purchasebill; |
|
||||
|
|
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import com.yxt.common.core.vo.Vo; |
|
||||
import com.yxt.pms.biz.pms.pmspurchasebilldetail.PmsPurchaseBillDetailDetailsVo; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
import java.math.BigDecimal; |
|
||||
import java.util.Date; |
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* Project: yxt-pms(采购) <br/> |
|
||||
* File: PmsPurchaseBillVo.java <br/> |
|
||||
* Class: com.yxt.pms.api.purchasebill.PmsPurchaseBillVo <br/> |
|
||||
* Description: 采购单 视图数据对象. <br/> |
|
||||
* Copyright: Copyright (c) 2011 <br/> |
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
|
||||
* Makedate: 2024-03-19 13:51:46 <br/> |
|
||||
* |
|
||||
* @author liupopo |
|
||||
* @version 1.0 |
|
||||
* @since 1.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@ApiModel(value = "采购单 视图数据对象", description = "采购单 视图数据对象") |
|
||||
public class PurchaseChoiceBillVo implements Vo { |
|
||||
|
|
||||
private String sid; // sid
|
|
||||
|
|
||||
/*仅页面展示*/ |
|
||||
@ApiModelProperty("创建组织名称") |
|
||||
private String createOrgName; |
|
||||
@ApiModelProperty("申请部门名称") |
|
||||
private String deptName; |
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|
||||
@ApiModelProperty("办结时间") |
|
||||
private Date finishTime; |
|
||||
|
|
||||
@ApiModelProperty("单据编号") |
|
||||
private String billNo; |
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
|
||||
@ApiModelProperty("单据日期") |
|
||||
private Date createTime; |
|
||||
@ApiModelProperty("采购员姓名") |
|
||||
private String purchaserName; |
|
||||
@ApiModelProperty("采购类型Value(厂家采购、外采、其他)") |
|
||||
private String purchaseTypeValue; |
|
||||
@ApiModelProperty("采购原因(储备/客户订单/在修车辆)") |
|
||||
private String purchaseReasonValue; |
|
||||
@ApiModelProperty("付款方式value(预付款/月结/单笔付款)") |
|
||||
private String payTypeValue; |
|
||||
@ApiModelProperty("供应商名称") |
|
||||
private String supplierName; |
|
||||
@ApiModelProperty("是否需要开发票(是1,否0)") |
|
||||
private String isInvoicing; |
|
||||
@ApiModelProperty("票据类型(不含税、增值税、普通税、已含增值税)") |
|
||||
private String billType; |
|
||||
@ApiModelProperty("税率") |
|
||||
private BigDecimal taxRate; |
|
||||
@ApiModelProperty("备注") |
|
||||
private String remarks; |
|
||||
|
|
||||
@ApiModelProperty("采购金额合计") |
|
||||
private BigDecimal amountCount; |
|
||||
@ApiModelProperty("运费") |
|
||||
private BigDecimal freight; |
|
||||
@ApiModelProperty("优惠金额") |
|
||||
private BigDecimal discountAmount; |
|
||||
@ApiModelProperty("误差调整金额") |
|
||||
private BigDecimal errorAmount; |
|
||||
@ApiModelProperty("应付金额(=采购金额+运费-优惠金额)") |
|
||||
private BigDecimal payableAmount; |
|
||||
|
|
||||
@ApiModelProperty("采购单商品明细") |
|
||||
private List<PmsPurchaseBillDetailDetailsVo> pmsPurchaseBillDetailList; |
|
||||
} |
|
@ -1,41 +0,0 @@ |
|||||
/********************************************************* |
|
||||
********************************************************* |
|
||||
******************** ******************* |
|
||||
************* ************ |
|
||||
******* _oo0oo_ ******* |
|
||||
*** o8888888o *** |
|
||||
* 88" . "88 * |
|
||||
* (| -_- |) * |
|
||||
* 0\ = /0 * |
|
||||
* ___/`---'\___ * |
|
||||
* .' \\| |// '. *
|
|
||||
* / \\||| : |||// \ *
|
|
||||
* / _||||| -:- |||||- \ * |
|
||||
* | | \\\ - /// | | *
|
|
||||
* | \_| ''\---/'' |_/ | * |
|
||||
* \ .-\__ '-' ___/-. / * |
|
||||
* ___'. .' /--.--\ `. .'___ * |
|
||||
* ."" '< `.___\_<|>_/___.' >' "". * |
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|
||||
* `=---=' * |
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|
||||
*********************************************************/ |
|
||||
package com.yxt.oms.biz.func.purchasebillamount; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||
import org.apache.ibatis.annotations.Delete; |
|
||||
import org.apache.ibatis.annotations.Mapper; |
|
||||
import org.apache.ibatis.annotations.Select; |
|
||||
|
|
||||
@Mapper |
|
||||
public interface PurchaseBillAmountMapper extends BaseMapper<PurchaseBillAmount> { |
|
||||
|
|
||||
@Delete("delete from purchase_bill_amount where billSid = #{dtoSid}") |
|
||||
void delByMainSid(String dtoSid); |
|
||||
|
|
||||
@Select("select * from purchase_bill_amount where billSid = #{billSid}") |
|
||||
PurchaseBillAmountDetailsVo selByMainSid(String billSid); |
|
||||
} |
|
@ -1,6 +0,0 @@ |
|||||
<?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.yxt.oms.biz.func.purchasebillamount.PurchaseBillAmountMapper"> |
|
||||
<!-- <where> ${ew.sqlSegment} </where>--> |
|
||||
<!-- ${ew.customSqlSegment} --> |
|
||||
</mapper> |
|
@ -1,64 +0,0 @@ |
|||||
/********************************************************* |
|
||||
********************************************************* |
|
||||
******************** ******************* |
|
||||
************* ************ |
|
||||
******* _oo0oo_ ******* |
|
||||
*** o8888888o *** |
|
||||
* 88" . "88 * |
|
||||
* (| -_- |) * |
|
||||
* 0\ = /0 * |
|
||||
* ___/`---'\___ * |
|
||||
* .' \\| |// '. *
|
|
||||
* / \\||| : |||// \ *
|
|
||||
* / _||||| -:- |||||- \ * |
|
||||
* | | \\\ - /// | | *
|
|
||||
* | \_| ''\---/'' |_/ | * |
|
||||
* \ .-\__ '-' ___/-. / * |
|
||||
* ___'. .' /--.--\ `. .'___ * |
|
||||
* ."" '< `.___\_<|>_/___.' >' "". * |
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|
||||
* `=---=' * |
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|
||||
*********************************************************/ |
|
||||
package com.yxt.oms.biz.func.purchasebilldetail; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|
||||
import org.apache.ibatis.annotations.Delete; |
|
||||
import org.apache.ibatis.annotations.Mapper; |
|
||||
import org.apache.ibatis.annotations.Param; |
|
||||
import org.apache.ibatis.annotations.Select; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* Project: yxt-pms(采购) <br/> |
|
||||
* File: PmsPurchaseBillDetailMapper.java <br/> |
|
||||
* Class: com.yxt.pms.biz.purchasebilldetail.PmsPurchaseBillDetailMapper <br/> |
|
||||
* Description: 采购单据明细. <br/> |
|
||||
* Copyright: Copyright (c) 2011 <br/> |
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
|
||||
* Makedate: 2024-03-19 13:51:46 <br/> |
|
||||
* |
|
||||
* @author liupopo |
|
||||
* @version 1.0 |
|
||||
* @since 1.0 |
|
||||
*/ |
|
||||
@Mapper |
|
||||
public interface PurchaseBillDetailMapper extends BaseMapper<PurchaseBillDetail> { |
|
||||
|
|
||||
@Delete("delete from purchase_bill_detail where billSid = #{dtoSid}") |
|
||||
void delByMainSid(String dtoSid); |
|
||||
|
|
||||
@Select("select * from purchase_bill_detail where billSid = #{billSid}") |
|
||||
List<PurchaseBillDetailDetailsVo> selByMainSid(String billSid); |
|
||||
|
|
||||
IPage<PurchaseBillDetailReportVo> purDetailReForm(IPage<PurchaseBillDetail> page, @Param(Constants.WRAPPER) QueryWrapper<PurchaseBillDetail> qw); |
|
||||
|
|
||||
IPage<PurchaseBillDetailSumVo> purSumReForm(IPage<PurchaseBillDetail> page, @Param(Constants.WRAPPER) QueryWrapper<PurchaseBillDetail> qw); |
|
||||
} |
|
@ -1,46 +0,0 @@ |
|||||
<?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.yxt.purchase.biz.purchasebilldetail.PurchaseBillDetailMapper"> |
|
||||
<!-- <where> ${ew.sqlSegment} </where>--> |
|
||||
<!-- ${ew.customSqlSegment} --> |
|
||||
|
|
||||
<select id="purDetailReForm" resultType="com.yxt.purchase.biz.purchasebilldetail.PurchaseBillDetailReportVo"> |
|
||||
SELECT |
|
||||
pdd.goodsSpuName, |
|
||||
pdd.goodsSkuCode, |
|
||||
pdd.cost, |
|
||||
pdd.cost * pdd.count AS costCount, |
|
||||
pdd.taxAmount, |
|
||||
pdd.taxAmount * pdd.count AS taxAmountCount, |
|
||||
pdd.taxPrice, |
|
||||
pdd.count, |
|
||||
IFNULL(ppd.backCount,0) AS retreatCount, |
|
||||
pdd.amount, |
|
||||
pdd.warehouseName, |
|
||||
pdd.unit |
|
||||
FROM pms_purchase_bill_detail pdd |
|
||||
LEFT JOIN pms_purchaseback_bill ppb |
|
||||
ON pdd.billSid = ppb.sourceBillSid |
|
||||
LEFT JOIN pms_purchaseback_detail ppd |
|
||||
ON ppb.sid = ppd.billSid |
|
||||
<where> ${ew.sqlSegment} </where> |
|
||||
</select> |
|
||||
|
|
||||
<select id="purSumReForm" resultType="com.yxt.purchase.biz.purchasebilldetail.PurchaseBillDetailSumVo"> |
|
||||
SELECT |
|
||||
pdd.goodsSpuName, |
|
||||
pdd.goodsSkuCode, |
|
||||
pdd.unit, |
|
||||
pdd.goodsSkuOwnSpec, |
|
||||
pdd.count, |
|
||||
pdd.amount, |
|
||||
IFNULL(ppd.backCount,0) AS retreatCount, |
|
||||
ppd.backAmount |
|
||||
FROM pms_purchase_bill_detail pdd |
|
||||
LEFT JOIN pms_purchaseback_bill ppb |
|
||||
ON pdd.billSid = ppb.sourceBillSid |
|
||||
LEFT JOIN pms_purchaseback_detail ppd |
|
||||
ON ppb.sid = ppd.billSid |
|
||||
<where> ${ew.sqlSegment} </where> |
|
||||
</select> |
|
||||
</mapper> |
|
@ -1,93 +0,0 @@ |
|||||
/********************************************************* |
|
||||
********************************************************* |
|
||||
******************** ******************* |
|
||||
************* ************ |
|
||||
******* _oo0oo_ ******* |
|
||||
*** o8888888o *** |
|
||||
* 88" . "88 * |
|
||||
* (| -_- |) * |
|
||||
* 0\ = /0 * |
|
||||
* ___/`---'\___ * |
|
||||
* .' \\| |// '. *
|
|
||||
* / \\||| : |||// \ *
|
|
||||
* / _||||| -:- |||||- \ * |
|
||||
* | | \\\ - /// | | *
|
|
||||
* | \_| ''\---/'' |_/ | * |
|
||||
* \ .-\__ '-' ___/-. / * |
|
||||
* ___'. .' /--.--\ `. .'___ * |
|
||||
* ."" '< `.___\_<|>_/___.' >' "". * |
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|
||||
* `=---=' * |
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|
||||
*********************************************************/ |
|
||||
package com.yxt.oms.biz.func.purchasebilldetail; |
|
||||
|
|
||||
|
|
||||
import com.yxt.common.core.query.Query; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
import java.math.BigDecimal; |
|
||||
|
|
||||
/** |
|
||||
* Project: yxt-pms(采购) <br/> |
|
||||
* File: PmsPurchaseBillDetailQuery.java <br/> |
|
||||
* Class: com.yxt.pms.api.purchasebilldetail.PmsPurchaseBillDetailQuery <br/> |
|
||||
* Description: 采购单据明细 查询条件. <br/> |
|
||||
* Copyright: Copyright (c) 2011 <br/> |
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
|
||||
* Makedate: 2024-03-19 13:51:46 <br/> |
|
||||
* |
|
||||
* @author liupopo |
|
||||
* @version 1.0 |
|
||||
* @since 1.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@ApiModel(value = "采购单据明细 查询条件", description = "采购单据明细 查询条件") |
|
||||
public class PurchaseBillDetailQuery implements Query { |
|
||||
|
|
||||
@ApiModelProperty("制单人姓名") |
|
||||
private String createByName; // 制单人姓名
|
|
||||
@ApiModelProperty("单据sid") |
|
||||
private String billSid; // 单据sid
|
|
||||
@ApiModelProperty("商品基础信息Sid") |
|
||||
private String goodSpuSid; // 商品基础信息Sid
|
|
||||
@ApiModelProperty("商品名称") |
|
||||
private String goodsSpuName; // 商品名称
|
|
||||
@ApiModelProperty("商品Skusid") |
|
||||
private String goodsSkuSid; // 商品Skusid
|
|
||||
@ApiModelProperty("商品Sku名称") |
|
||||
private String goodsSkuTitle; // 商品Sku名称
|
|
||||
@ApiModelProperty("商品编码(图号)") |
|
||||
private String goodsSkuCode; // 商品编码(图号)
|
|
||||
@ApiModelProperty("规格型号") |
|
||||
private String goodsSkuOwnSpec; // 规格型号
|
|
||||
@ApiModelProperty("采购前库存数量") |
|
||||
private BigDecimal currentCount; // 采购前库存数量
|
|
||||
@ApiModelProperty("仓库sid") |
|
||||
private String warehouseSid; // 仓库sid
|
|
||||
@ApiModelProperty("仓库名称") |
|
||||
private String warehouseName; // 仓库名称
|
|
||||
@ApiModelProperty("库区/货位sid") |
|
||||
private String warehouseAreaSid; // 库区/货位sid
|
|
||||
@ApiModelProperty("库区名称") |
|
||||
private String warehouseAreaName; // 库区名称
|
|
||||
@ApiModelProperty("货架sid") |
|
||||
private String warehouseRackSid; // 货架sid
|
|
||||
@ApiModelProperty("货架名称") |
|
||||
private String warehouseRackName; // 货架名称
|
|
||||
@ApiModelProperty("单位成本(进货价)") |
|
||||
private BigDecimal cost; // 单位成本(进货价)
|
|
||||
@ApiModelProperty("采购数量") |
|
||||
private BigDecimal count; // 采购数量
|
|
||||
@ApiModelProperty("税额") |
|
||||
private BigDecimal taxAmount; // 税额
|
|
||||
@ApiModelProperty("含税价") |
|
||||
private BigDecimal taxPrice; // 含税价
|
|
||||
@ApiModelProperty("采购金额") |
|
||||
private BigDecimal amount; // 采购金额
|
|
||||
} |
|
@ -1,59 +0,0 @@ |
|||||
/********************************************************* |
|
||||
********************************************************* |
|
||||
******************** ******************* |
|
||||
************* ************ |
|
||||
******* _oo0oo_ ******* |
|
||||
*** o8888888o *** |
|
||||
* 88" . "88 * |
|
||||
* (| -_- |) * |
|
||||
* 0\ = /0 * |
|
||||
* ___/`---'\___ * |
|
||||
* .' \\| |// '. *
|
|
||||
* / \\||| : |||// \ *
|
|
||||
* / _||||| -:- |||||- \ * |
|
||||
* | | \\\ - /// | | *
|
|
||||
* | \_| ''\---/'' |_/ | * |
|
||||
* \ .-\__ '-' ___/-. / * |
|
||||
* ___'. .' /--.--\ `. .'___ * |
|
||||
* ."" '< `.___\_<|>_/___.' >' "". * |
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|
||||
* `=---=' * |
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|
||||
*********************************************************/ |
|
||||
package com.yxt.oms.biz.func.purchasebilldetail; |
|
||||
|
|
||||
|
|
||||
import com.yxt.common.core.query.Query; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
/** |
|
||||
* Project: yxt-pms(采购) <br/> |
|
||||
* File: PmsPurchaseBillDetailVo.java <br/> |
|
||||
* Class: com.yxt.pms.api.purchasebilldetail.PmsPurchaseBillDetailVo <br/> |
|
||||
* Description: 采购单据明细 视图数据对象. <br/> |
|
||||
* Copyright: Copyright (c) 2011 <br/> |
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
|
||||
* Makedate: 2024-03-19 13:51:46 <br/> |
|
||||
* |
|
||||
* @author liupopo |
|
||||
* @version 1.0 |
|
||||
* @since 1.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@ApiModel(value = "采购单据明细 视图数据对象", description = "采购单据明细 视图数据对象") |
|
||||
public class PurchaseBillDetailReportQuery implements Query { |
|
||||
|
|
||||
@ApiModelProperty("仓库名称") |
|
||||
private String warehouseName; |
|
||||
@ApiModelProperty("商品编码(图号)") |
|
||||
private String goodsSkuCode; |
|
||||
@ApiModelProperty("规格") |
|
||||
private String goodsSkuOwnSpec; |
|
||||
@ApiModelProperty("商品名称") |
|
||||
private String goodsSpuName; |
|
||||
} |
|
@ -1,77 +0,0 @@ |
|||||
/********************************************************* |
|
||||
********************************************************* |
|
||||
******************** ******************* |
|
||||
************* ************ |
|
||||
******* _oo0oo_ ******* |
|
||||
*** o8888888o *** |
|
||||
* 88" . "88 * |
|
||||
* (| -_- |) * |
|
||||
* 0\ = /0 * |
|
||||
* ___/`---'\___ * |
|
||||
* .' \\| |// '. *
|
|
||||
* / \\||| : |||// \ *
|
|
||||
* / _||||| -:- |||||- \ * |
|
||||
* | | \\\ - /// | | *
|
|
||||
* | \_| ''\---/'' |_/ | * |
|
||||
* \ .-\__ '-' ___/-. / * |
|
||||
* ___'. .' /--.--\ `. .'___ * |
|
||||
* ."" '< `.___\_<|>_/___.' >' "". * |
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|
||||
* `=---=' * |
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|
||||
*********************************************************/ |
|
||||
package com.yxt.oms.biz.func.purchasebilldetail; |
|
||||
|
|
||||
|
|
||||
import com.yxt.common.core.vo.Vo; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
import java.math.BigDecimal; |
|
||||
|
|
||||
/** |
|
||||
* Project: yxt-pms(采购) <br/> |
|
||||
* File: PmsPurchaseBillDetailVo.java <br/> |
|
||||
* Class: com.yxt.pms.api.purchasebilldetail.PmsPurchaseBillDetailVo <br/> |
|
||||
* Description: 采购单据明细 视图数据对象. <br/> |
|
||||
* Copyright: Copyright (c) 2011 <br/> |
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
|
||||
* Makedate: 2024-03-19 13:51:46 <br/> |
|
||||
* |
|
||||
* @author liupopo |
|
||||
* @version 1.0 |
|
||||
* @since 1.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@ApiModel(value = "采购单据明细 视图数据对象", description = "采购单据明细 视图数据对象") |
|
||||
public class PurchaseBillDetailReportVo implements Vo { |
|
||||
|
|
||||
@ApiModelProperty("商品名称") |
|
||||
private String goodsSpuName; |
|
||||
@ApiModelProperty("商品编码(图号)") |
|
||||
private String goodsSkuCode; |
|
||||
@ApiModelProperty("单位成本(进货价)") |
|
||||
private BigDecimal cost; |
|
||||
@ApiModelProperty("总体单位成本(进货价)") |
|
||||
private BigDecimal costCount; |
|
||||
@ApiModelProperty("税额") |
|
||||
private BigDecimal taxAmount; |
|
||||
@ApiModelProperty("税额合计") |
|
||||
private BigDecimal taxAmountCount; |
|
||||
@ApiModelProperty("含税价") |
|
||||
private BigDecimal taxPrice; |
|
||||
@ApiModelProperty("采购数量") |
|
||||
private BigDecimal count; |
|
||||
@ApiModelProperty("退货数量") |
|
||||
private BigDecimal retreatCount; |
|
||||
@ApiModelProperty("采购金额") |
|
||||
private BigDecimal amount; |
|
||||
@ApiModelProperty("仓库名称") |
|
||||
private String warehouseName; |
|
||||
@ApiModelProperty("单位") |
|
||||
private String unit; |
|
||||
} |
|
@ -1,71 +0,0 @@ |
|||||
/********************************************************* |
|
||||
********************************************************* |
|
||||
******************** ******************* |
|
||||
************* ************ |
|
||||
******* _oo0oo_ ******* |
|
||||
*** o8888888o *** |
|
||||
* 88" . "88 * |
|
||||
* (| -_- |) * |
|
||||
* 0\ = /0 * |
|
||||
* ___/`---'\___ * |
|
||||
* .' \\| |// '. *
|
|
||||
* / \\||| : |||// \ *
|
|
||||
* / _||||| -:- |||||- \ * |
|
||||
* | | \\\ - /// | | *
|
|
||||
* | \_| ''\---/'' |_/ | * |
|
||||
* \ .-\__ '-' ___/-. / * |
|
||||
* ___'. .' /--.--\ `. .'___ * |
|
||||
* ."" '< `.___\_<|>_/___.' >' "". * |
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|
||||
* `=---=' * |
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|
||||
*********************************************************/ |
|
||||
package com.yxt.oms.biz.func.purchasebilldetail; |
|
||||
|
|
||||
|
|
||||
import com.yxt.common.core.vo.Vo; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
import java.math.BigDecimal; |
|
||||
|
|
||||
/** |
|
||||
* Project: yxt-pms(采购) <br/> |
|
||||
* File: PmsPurchaseBillDetailVo.java <br/> |
|
||||
* Class: com.yxt.pms.api.purchasebilldetail.PmsPurchaseBillDetailVo <br/> |
|
||||
* Description: 采购单据明细 视图数据对象. <br/> |
|
||||
* Copyright: Copyright (c) 2011 <br/> |
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
|
||||
* Makedate: 2024-03-19 13:51:46 <br/> |
|
||||
* |
|
||||
* @author liupopo |
|
||||
* @version 1.0 |
|
||||
* @since 1.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@ApiModel(value = "采购单据明细 视图数据对象", description = "采购单据明细 视图数据对象") |
|
||||
public class PurchaseBillDetailSumVo implements Vo { |
|
||||
|
|
||||
@ApiModelProperty("商品名称") |
|
||||
private String goodsSpuName; |
|
||||
@ApiModelProperty("商品编码(图号)") |
|
||||
private String goodsSkuCode; |
|
||||
@ApiModelProperty("单位") |
|
||||
private String unit; |
|
||||
@ApiModelProperty("规格") |
|
||||
private String goodsSkuOwnSpec; |
|
||||
@ApiModelProperty("采购数量") |
|
||||
private BigDecimal count; |
|
||||
@ApiModelProperty("采购金额") |
|
||||
private BigDecimal amount; |
|
||||
@ApiModelProperty("退货数量") |
|
||||
private BigDecimal retreatCount; |
|
||||
@ApiModelProperty("退货金额") |
|
||||
private BigDecimal backAmount; |
|
||||
@ApiModelProperty("门店") |
|
||||
private String useOrgName; |
|
||||
} |
|
@ -1,96 +0,0 @@ |
|||||
/********************************************************* |
|
||||
********************************************************* |
|
||||
******************** ******************* |
|
||||
************* ************ |
|
||||
******* _oo0oo_ ******* |
|
||||
*** o8888888o *** |
|
||||
* 88" . "88 * |
|
||||
* (| -_- |) * |
|
||||
* 0\ = /0 * |
|
||||
* ___/`---'\___ * |
|
||||
* .' \\| |// '. *
|
|
||||
* / \\||| : |||// \ *
|
|
||||
* / _||||| -:- |||||- \ * |
|
||||
* | | \\\ - /// | | *
|
|
||||
* | \_| ''\---/'' |_/ | * |
|
||||
* \ .-\__ '-' ___/-. / * |
|
||||
* ___'. .' /--.--\ `. .'___ * |
|
||||
* ."" '< `.___\_<|>_/___.' >' "". * |
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|
||||
* `=---=' * |
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|
||||
*********************************************************/ |
|
||||
package com.yxt.oms.biz.func.purchasebilldetail; |
|
||||
|
|
||||
|
|
||||
import com.yxt.common.core.vo.Vo; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
import java.math.BigDecimal; |
|
||||
|
|
||||
/** |
|
||||
* Project: yxt-pms(采购) <br/> |
|
||||
* File: PmsPurchaseBillDetailVo.java <br/> |
|
||||
* Class: com.yxt.pms.api.purchasebilldetail.PmsPurchaseBillDetailVo <br/> |
|
||||
* Description: 采购单据明细 视图数据对象. <br/> |
|
||||
* Copyright: Copyright (c) 2011 <br/> |
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
|
||||
* Makedate: 2024-03-19 13:51:46 <br/> |
|
||||
* |
|
||||
* @author liupopo |
|
||||
* @version 1.0 |
|
||||
* @since 1.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@ApiModel(value = "采购单据明细 视图数据对象", description = "采购单据明细 视图数据对象") |
|
||||
public class PurchaseBillDetailVo implements Vo { |
|
||||
|
|
||||
private String sid; // sid
|
|
||||
|
|
||||
@ApiModelProperty("制单人姓名") |
|
||||
private String createByName; // 制单人姓名
|
|
||||
@ApiModelProperty("单据sid") |
|
||||
private String billSid; // 单据sid
|
|
||||
@ApiModelProperty("商品基础信息Sid") |
|
||||
private String goodSpuSid; // 商品基础信息Sid
|
|
||||
@ApiModelProperty("商品名称") |
|
||||
private String goodsSpuName; // 商品名称
|
|
||||
@ApiModelProperty("商品Skusid") |
|
||||
private String goodsSkuSid; // 商品Skusid
|
|
||||
@ApiModelProperty("商品Sku名称") |
|
||||
private String goodsSkuTitle; // 商品Sku名称
|
|
||||
@ApiModelProperty("商品编码(图号)") |
|
||||
private String goodsSkuCode; // 商品编码(图号)
|
|
||||
@ApiModelProperty("规格型号") |
|
||||
private String goodsSkuOwnSpec; // 规格型号
|
|
||||
@ApiModelProperty("采购前库存数量") |
|
||||
private BigDecimal currentCount; // 采购前库存数量
|
|
||||
@ApiModelProperty("仓库sid") |
|
||||
private String warehouseSid; // 仓库sid
|
|
||||
@ApiModelProperty("仓库名称") |
|
||||
private String warehouseName; // 仓库名称
|
|
||||
@ApiModelProperty("库区/货位sid") |
|
||||
private String warehouseAreaSid; // 库区/货位sid
|
|
||||
@ApiModelProperty("库区名称") |
|
||||
private String warehouseAreaName; // 库区名称
|
|
||||
@ApiModelProperty("货架sid") |
|
||||
private String warehouseRackSid; // 货架sid
|
|
||||
@ApiModelProperty("货架名称") |
|
||||
private String warehouseRackName; // 货架名称
|
|
||||
@ApiModelProperty("单位成本(进货价)") |
|
||||
private BigDecimal cost; // 单位成本(进货价)
|
|
||||
@ApiModelProperty("采购数量") |
|
||||
private BigDecimal count; // 采购数量
|
|
||||
@ApiModelProperty("税额") |
|
||||
private BigDecimal taxAmount; // 税额
|
|
||||
@ApiModelProperty("含税价") |
|
||||
private BigDecimal taxPrice; // 含税价
|
|
||||
@ApiModelProperty("采购金额") |
|
||||
private BigDecimal amount; // 采购金额
|
|
||||
|
|
||||
} |
|
@ -1,54 +0,0 @@ |
|||||
/********************************************************* |
|
||||
********************************************************* |
|
||||
******************** ******************* |
|
||||
************* ************ |
|
||||
******* _oo0oo_ ******* |
|
||||
*** o8888888o *** |
|
||||
* 88" . "88 * |
|
||||
* (| -_- |) * |
|
||||
* 0\ = /0 * |
|
||||
* ___/`---'\___ * |
|
||||
* .' \\| |// '. *
|
|
||||
* / \\||| : |||// \ *
|
|
||||
* / _||||| -:- |||||- \ * |
|
||||
* | | \\\ - /// | | *
|
|
||||
* | \_| ''\---/'' |_/ | * |
|
||||
* \ .-\__ '-' ___/-. / * |
|
||||
* ___'. .' /--.--\ `. .'___ * |
|
||||
* ."" '< `.___\_<|>_/___.' >' "". * |
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|
||||
* `=---=' * |
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|
||||
*********************************************************/ |
|
||||
package com.yxt.oms.biz.func.purchasebillextend; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||
import org.apache.ibatis.annotations.Delete; |
|
||||
import org.apache.ibatis.annotations.Mapper; |
|
||||
import org.apache.ibatis.annotations.Select; |
|
||||
|
|
||||
/** |
|
||||
* Project: yxt-pms(采购) <br/> |
|
||||
* File: PmsPurchaseBillExtendMapper.java <br/> |
|
||||
* Class: com.yxt.pms.biz.purchasebillextend.PmsPurchaseBillExtendMapper <br/> |
|
||||
* Description: 采购单扩展. <br/> |
|
||||
* Copyright: Copyright (c) 2011 <br/> |
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
|
||||
* Makedate: 2024-03-19 13:51:46 <br/> |
|
||||
* |
|
||||
* @author liupopo |
|
||||
* @version 1.0 |
|
||||
* @since 1.0 |
|
||||
*/ |
|
||||
@Mapper |
|
||||
public interface PurchaseBillExtendMapper extends BaseMapper<PurchaseBillExtend> { |
|
||||
|
|
||||
@Delete("delete from purchase_bill_extend where billSid = #{dtoSid}") |
|
||||
void delByMainSid(String dtoSid); |
|
||||
|
|
||||
@Select("select * from purchase_bill_extend where billSid = #{billSid}") |
|
||||
PurchaseBillExtendDetailsVo selByMainSid(String billSid); |
|
||||
} |
|
@ -1,6 +0,0 @@ |
|||||
<?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.yxt.purchase.biz.purchasebillextend.PurchaseBillExtendMapper"> |
|
||||
<!-- <where> ${ew.sqlSegment} </where>--> |
|
||||
<!-- ${ew.customSqlSegment} --> |
|
||||
</mapper> |
|
@ -1,83 +0,0 @@ |
|||||
/********************************************************* |
|
||||
********************************************************* |
|
||||
******************** ******************* |
|
||||
************* ************ |
|
||||
******* _oo0oo_ ******* |
|
||||
*** o8888888o *** |
|
||||
* 88" . "88 * |
|
||||
* (| -_- |) * |
|
||||
* 0\ = /0 * |
|
||||
* ___/`---'\___ * |
|
||||
* .' \\| |// '. *
|
|
||||
* / \\||| : |||// \ *
|
|
||||
* / _||||| -:- |||||- \ * |
|
||||
* | | \\\ - /// | | *
|
|
||||
* | \_| ''\---/'' |_/ | * |
|
||||
* \ .-\__ '-' ___/-. / * |
|
||||
* ___'. .' /--.--\ `. .'___ * |
|
||||
* ."" '< `.___\_<|>_/___.' >' "". * |
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|
||||
* `=---=' * |
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|
||||
*********************************************************/ |
|
||||
package com.yxt.oms.biz.func.purchasebillextend; |
|
||||
|
|
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import com.yxt.common.core.query.Query; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
import java.util.Date; |
|
||||
|
|
||||
/** |
|
||||
* Project: yxt-pms(采购) <br/> |
|
||||
* File: PmsPurchaseBillExtendQuery.java <br/> |
|
||||
* Class: com.yxt.pms.api.purchasebillextend.PmsPurchaseBillExtendQuery <br/> |
|
||||
* Description: 采购单扩展 查询条件. <br/> |
|
||||
* Copyright: Copyright (c) 2011 <br/> |
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
|
||||
* Makedate: 2024-03-19 13:51:46 <br/> |
|
||||
* |
|
||||
* @author liupopo |
|
||||
* @version 1.0 |
|
||||
* @since 1.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@ApiModel(value = "采购单扩展 查询条件", description = "采购单扩展 查询条件") |
|
||||
public class PurchaseBillExtendQuery implements Query { |
|
||||
|
|
||||
@ApiModelProperty("制单人姓名") |
|
||||
private String createByName; // 制单人姓名
|
|
||||
@ApiModelProperty("采购单sid") |
|
||||
private String purchaseBillSid; // 采购单sid
|
|
||||
@ApiModelProperty("加价方式(统一加价率、区间加价率、仓库加价率)") |
|
||||
private String markupType; // 加价方式(统一加价率、区间加价率、仓库加价率)
|
|
||||
@ApiModelProperty("进价不同时的价格策略(加权平均、分别计价)") |
|
||||
private String priceStrategy; // 进价不同时的价格策略(加权平均、分别计价)
|
|
||||
@ApiModelProperty("临时加价率") |
|
||||
private Integer tempMarkupRate; // 临时加价率
|
|
||||
@ApiModelProperty("发货人姓名") |
|
||||
private String shipperName; // 发货人姓名
|
|
||||
@ApiModelProperty("发货人手机") |
|
||||
private String shipperMob; // 发货人手机
|
|
||||
@ApiModelProperty("发货省市区sid") |
|
||||
private String deliveryAreaSid; // 发货省市区sid
|
|
||||
@ApiModelProperty("发货详细地址") |
|
||||
private String deliveryAddress; // 发货详细地址
|
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|
||||
@ApiModelProperty("到货日期") |
|
||||
private Date arrivalDateStart; // 到货日期
|
|
||||
private Date arrivalDateEnd; // 到货日期
|
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|
||||
@ApiModelProperty("付款期限") |
|
||||
private Date paymentTermStart; // 付款期限
|
|
||||
private Date paymentTermEnd; // 付款期限
|
|
||||
@ApiModelProperty("仓库sid") |
|
||||
private String wareHouseSid; // 仓库sid
|
|
||||
|
|
||||
} |
|
@ -1,85 +0,0 @@ |
|||||
/********************************************************* |
|
||||
********************************************************* |
|
||||
******************** ******************* |
|
||||
************* ************ |
|
||||
******* _oo0oo_ ******* |
|
||||
*** o8888888o *** |
|
||||
* 88" . "88 * |
|
||||
* (| -_- |) * |
|
||||
* 0\ = /0 * |
|
||||
* ___/`---'\___ * |
|
||||
* .' \\| |// '. *
|
|
||||
* / \\||| : |||// \ *
|
|
||||
* / _||||| -:- |||||- \ * |
|
||||
* | | \\\ - /// | | *
|
|
||||
* | \_| ''\---/'' |_/ | * |
|
||||
* \ .-\__ '-' ___/-. / * |
|
||||
* ___'. .' /--.--\ `. .'___ * |
|
||||
* ."" '< `.___\_<|>_/___.' >' "". * |
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|
||||
* `=---=' * |
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|
||||
*********************************************************/ |
|
||||
package com.yxt.oms.biz.func.purchasebillextend; |
|
||||
|
|
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import com.yxt.common.core.vo.Vo; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
import java.util.Date; |
|
||||
|
|
||||
/** |
|
||||
* Project: yxt-pms(采购) <br/> |
|
||||
* File: PmsPurchaseBillExtendVo.java <br/> |
|
||||
* Class: com.yxt.pms.api.purchasebillextend.PmsPurchaseBillExtendVo <br/> |
|
||||
* Description: 采购单扩展 视图数据对象. <br/> |
|
||||
* Copyright: Copyright (c) 2011 <br/> |
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
|
||||
* Makedate: 2024-03-19 13:51:46 <br/> |
|
||||
* |
|
||||
* @author liupopo |
|
||||
* @version 1.0 |
|
||||
* @since 1.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@ApiModel(value = "采购单扩展 视图数据对象", description = "采购单扩展 视图数据对象") |
|
||||
public class PurchaseBillExtendVo implements Vo { |
|
||||
|
|
||||
private String sid; // sid
|
|
||||
|
|
||||
@ApiModelProperty("制单人姓名") |
|
||||
private String createByName; // 制单人姓名
|
|
||||
@ApiModelProperty("采购单sid") |
|
||||
private String purchaseBillSid; // 采购单sid
|
|
||||
@ApiModelProperty("加价方式(统一加价率、区间加价率、仓库加价率)") |
|
||||
private String markupType; // 加价方式(统一加价率、区间加价率、仓库加价率)
|
|
||||
@ApiModelProperty("进价不同时的价格策略(加权平均、分别计价)") |
|
||||
private String priceStrategy; // 进价不同时的价格策略(加权平均、分别计价)
|
|
||||
@ApiModelProperty("临时加价率") |
|
||||
private Integer tempMarkupRate; // 临时加价率
|
|
||||
@ApiModelProperty("发货人姓名") |
|
||||
private String shipperName; // 发货人姓名
|
|
||||
@ApiModelProperty("发货人手机") |
|
||||
private String shipperMob; // 发货人手机
|
|
||||
@ApiModelProperty("发货省市区sid") |
|
||||
private String deliveryAreaSid; // 发货省市区sid
|
|
||||
@ApiModelProperty("发货详细地址") |
|
||||
private String deliveryAddress; // 发货详细地址
|
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|
||||
@ApiModelProperty("到货日期") |
|
||||
private Date arrivalDateStart; // 到货日期
|
|
||||
private Date arrivalDateEnd; // 到货日期
|
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|
||||
@ApiModelProperty("付款期限") |
|
||||
private Date paymentTermStart; // 付款期限
|
|
||||
private Date paymentTermEnd; // 付款期限
|
|
||||
@ApiModelProperty("仓库sid") |
|
||||
private String wareHouseSid; // 仓库sid
|
|
||||
|
|
||||
} |
|
@ -1,42 +0,0 @@ |
|||||
package com.yxt.oms.biz.func.purchasereceiptbill; |
|
||||
|
|
||||
import com.yxt.common.core.domain.BaseEntity; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:36 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class PurchaseReceiptBill extends BaseEntity { |
|
||||
|
|
||||
|
|
||||
private String sourceBillSid;//来源单sid(工单sid)
|
|
||||
private String sourceBillNo;//来源单编号
|
|
||||
private String billNo;//单据编号
|
|
||||
private String createDate;//单据日期
|
|
||||
private String createUserSid;//制单人sid
|
|
||||
private String createByName;//制单人姓名
|
|
||||
private String purchaseType;//采购类型(厂家采购、外采)
|
|
||||
private String supplierSid;//供应商sid
|
|
||||
private String supplierName;//供应商名称
|
|
||||
private String supplierPhone;//供应商联系电话
|
|
||||
private String billType;//票据类型(不含税、增值税、普通税、已含增值税)
|
|
||||
private String markupType;//加价方式(统一加价率、区间加价率、仓库加价率)
|
|
||||
private String priceStrategy;//进价不同时的价格策略(加权平均、分别计价)
|
|
||||
private String isInvoicing;//是否需要开发票(是1,否0)
|
|
||||
private String invoiceCode;//发票号码
|
|
||||
private String tempMarkupRate;//临时加价率
|
|
||||
private String purchaserSid;//采购员sid(单选)
|
|
||||
private String purchaserName;//
|
|
||||
private String storekeeperSid;//库管员sid(单选)
|
|
||||
private String storekeeperName;//
|
|
||||
private String errorAmount;//误差调整金额
|
|
||||
private String freight;//运费
|
|
||||
private String discountAmount;//优惠金额
|
|
||||
private String payableAmount;//应付金额(=采购金额+运费-优惠金额)
|
|
||||
private String useOrgSid;//使用组织sid
|
|
||||
private String createOrgSid;//创建组织sid
|
|
||||
|
|
||||
|
|
||||
} |
|
@ -1,56 +0,0 @@ |
|||||
package com.yxt.oms.biz.func.purchasereceiptbill; |
|
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import com.yxt.common.core.dto.Dto; |
|
||||
import com.yxt.oms.biz.func.purchasereceiptbilldetail.PurchaseReceiptBillDetailDto; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
import java.util.ArrayList; |
|
||||
import java.util.Date; |
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:38 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class PurchaseReceiptBillDto implements Dto { |
|
||||
private String id; |
|
||||
private String sid; |
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|
||||
private Date createTime; |
|
||||
private String remarks; |
|
||||
private String isEnable; |
|
||||
private String sourceBillSid;//来源单sid(工单sid)
|
|
||||
private String sourceBillNo;//来源单编号
|
|
||||
private String billNo;//单据编号
|
|
||||
private String createDate;//单据日期
|
|
||||
private String createUserSid;//制单人sid
|
|
||||
private String createByName;//制单人姓名
|
|
||||
private String purchaseType;//采购类型(厂家采购、外采)
|
|
||||
private String supplierSid;//供应商sid
|
|
||||
private String supplierName;//供应商名称
|
|
||||
private String supplierPhone;//供应商联系电话
|
|
||||
private String billType;//票据类型(不含税、增值税、普通税、已含增值税)
|
|
||||
private String markupType;//加价方式(统一加价率、区间加价率、仓库加价率)
|
|
||||
private String priceStrategy;//进价不同时的价格策略(加权平均、分别计价)
|
|
||||
private String isInvoicing;//是否需要开发票(是1,否0)
|
|
||||
private String invoiceCode;//发票号码
|
|
||||
private String tempMarkupRate;//临时加价率
|
|
||||
private String purchaserSid;//采购员sid(单选)
|
|
||||
private String purchaserName;//
|
|
||||
private String storekeeperSid;//库管员sid(单选)
|
|
||||
private String storekeeperName;//
|
|
||||
private String errorAmount;//误差调整金额
|
|
||||
private String freight;//运费
|
|
||||
private String discountAmount;//优惠金额
|
|
||||
private String payableAmount;//应付金额(=采购金额+运费-优惠金额)
|
|
||||
private String useOrgSid;//使用组织sid
|
|
||||
private String createOrgSid;//创建组织sid
|
|
||||
private String contact;//联系人
|
|
||||
private String mobile;//联系人手机
|
|
||||
private String goodsOwnerSid;//货主sid
|
|
||||
private String goodsOwner;//货主
|
|
||||
private List<PurchaseReceiptBillDetailDto> purchaseReceiptBillList=new ArrayList<>(); |
|
||||
} |
|
@ -1,13 +0,0 @@ |
|||||
package com.yxt.oms.biz.func.purchasereceiptbill; |
|
||||
|
|
||||
import com.yxt.common.core.query.Query; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:37 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class PurchaseReceiptBillQuery implements Query { |
|
||||
private String name; |
|
||||
} |
|
@ -1,101 +0,0 @@ |
|||||
package com.yxt.oms.biz.func.purchasereceiptbill; |
|
||||
|
|
||||
import com.yxt.common.base.config.component.FileUploadComponent; |
|
||||
import com.yxt.common.base.service.MybatisBaseService; |
|
||||
import com.yxt.common.core.query.PagerQuery; |
|
||||
import com.yxt.common.core.result.ResultBean; |
|
||||
import com.yxt.common.core.vo.PagerVo; |
|
||||
import com.yxt.oms.biz.func.purchasereceiptbilldetail.PurchaseReceiptBillDetailDto; |
|
||||
import com.yxt.oms.biz.func.warehouseansbill.WarehouseAnsBillDto; |
|
||||
import com.yxt.oms.biz.func.warehouseansbilldetail.WarehouseAnsBillDetailDto; |
|
||||
import com.yxt.oms.feign.purchase.purchasereceiptbill.PurchaseReceiptBillFeign; |
|
||||
import com.yxt.oms.feign.warehouse.warehouseansbill.WarehouseAnsBillFeign; |
|
||||
import com.yxt.oms.utils.OrgPathQuery; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
|
|
||||
import javax.annotation.Resource; |
|
||||
import java.util.ArrayList; |
|
||||
import java.util.Date; |
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:40 |
|
||||
*/ |
|
||||
@Service |
|
||||
public class PurchaseReceiptBillService { |
|
||||
@Autowired |
|
||||
private FileUploadComponent fileUploadComponent; |
|
||||
@Resource |
|
||||
PurchaseReceiptBillFeign purchaseReceiptBillFeign; |
|
||||
@Resource |
|
||||
WarehouseAnsBillFeign warehouseAnsBillFeignl; |
|
||||
|
|
||||
public ResultBean<PagerVo<PurchaseReceiptBillVo>> listPage(PagerQuery<PurchaseReceiptBillQuery> pq) { |
|
||||
ResultBean rb = ResultBean.fireFail(); |
|
||||
return purchaseReceiptBillFeign.listPage(pq); |
|
||||
} |
|
||||
|
|
||||
public ResultBean<List<PurchaseReceiptBill>> listAll(OrgPathQuery query) { |
|
||||
ResultBean rb = ResultBean.fireFail(); |
|
||||
|
|
||||
return purchaseReceiptBillFeign.listAll(query); |
|
||||
} |
|
||||
public ResultBean<String> save(PurchaseReceiptBillDto dto) { |
|
||||
ResultBean rb = ResultBean.fireFail(); |
|
||||
WarehouseAnsBillDto dto1=new WarehouseAnsBillDto(); |
|
||||
dto1.setSourceBillNo(""); |
|
||||
dto1.setBusTypeKey("采购预约"); |
|
||||
dto1.setBusTypeValue("采购预约"); |
|
||||
dto1.setCreateByName(dto.getCreateByName()); |
|
||||
dto1.setBillState(1); |
|
||||
dto1.setReviewStatus(""); |
|
||||
dto1.setRefuseReason(""); |
|
||||
dto1.setContact(dto.getContact()); |
|
||||
dto1.setMobile(dto.getMobile()); |
|
||||
dto1.setGoodsOwner(dto.getGoodsOwner()); |
|
||||
dto1.setGoodsOwnerSid(dto.getGoodsOwnerSid()); |
|
||||
dto1.setSupplierSid(dto.getSupplierSid()); |
|
||||
dto1.setSupplierName(dto.getSupplierName()); |
|
||||
dto1.setDeliveryDate(new Date()); |
|
||||
dto1.setUseOrgSid(dto.getUseOrgSid()); |
|
||||
dto1.setCreateBySid(dto.getCreateOrgSid()); |
|
||||
List<WarehouseAnsBillDetailDto> wmsAnsBillDetailList = new ArrayList<>(); |
|
||||
for (PurchaseReceiptBillDetailDto purchaseReceiptBillDetailDto : dto.getPurchaseReceiptBillList()) { |
|
||||
WarehouseAnsBillDetailDto d=new WarehouseAnsBillDetailDto(); |
|
||||
d.setGoodsSkuSid(purchaseReceiptBillDetailDto.getGoodsSid()); |
|
||||
d.setGoodsSkuTitle(purchaseReceiptBillDetailDto.getGoodsName()); |
|
||||
d.setUnit(purchaseReceiptBillDetailDto.getUnit()); |
|
||||
d.setCost(purchaseReceiptBillDetailDto.getCost()); |
|
||||
d.setOrderCount(purchaseReceiptBillDetailDto.getCount()); |
|
||||
d.setTaxAmount(purchaseReceiptBillDetailDto.getTaxAmount()); |
|
||||
d.setTaxPrice(purchaseReceiptBillDetailDto.getTaxPrice()); |
|
||||
d.setAmount(purchaseReceiptBillDetailDto.getAmount()); |
|
||||
wmsAnsBillDetailList.add(d); |
|
||||
} |
|
||||
warehouseAnsBillFeignl.saveBill(dto1); |
|
||||
return purchaseReceiptBillFeign.saveOrUpdate(dto); |
|
||||
} |
|
||||
|
|
||||
public ResultBean<PurchaseReceiptBillVo> initialization(String sid) { |
|
||||
ResultBean rb = ResultBean.fireFail(); |
|
||||
|
|
||||
return purchaseReceiptBillFeign.initialization(sid); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
public ResultBean delete(String sid) { |
|
||||
ResultBean rb = ResultBean.fireFail(); |
|
||||
return rb.success().setMsg("成功"); |
|
||||
} |
|
||||
public ResultBean delAll(String[] sids) { |
|
||||
return purchaseReceiptBillFeign.delBySids(sids); |
|
||||
} |
|
||||
public ResultBean updateIsEnable(String sid,String isEnable) { |
|
||||
ResultBean rb = ResultBean.fireFail(); |
|
||||
return purchaseReceiptBillFeign.updateIsEnable(sid,isEnable); |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -1,52 +0,0 @@ |
|||||
package com.yxt.oms.biz.func.purchasereceiptbill; |
|
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import com.yxt.common.core.vo.Vo; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
import java.util.Date; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:37 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class PurchaseReceiptBillVo implements Vo { |
|
||||
private String id; |
|
||||
private String sid; |
|
||||
private String lockVersion; |
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|
||||
private Date createTime; |
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|
||||
private Date modifyTime; |
|
||||
private String remarks; |
|
||||
private String isEnable; |
|
||||
private String state; |
|
||||
private String isDelete; |
|
||||
private String sourceBillSid;//来源单sid(工单sid)
|
|
||||
private String sourceBillNo;//来源单编号
|
|
||||
private String billNo;//单据编号
|
|
||||
private String createDate;//单据日期
|
|
||||
private String createUserSid;//制单人sid
|
|
||||
private String createByName;//制单人姓名
|
|
||||
private String purchaseType;//采购类型(厂家采购、外采)
|
|
||||
private String supplierSid;//供应商sid
|
|
||||
private String supplierName;//供应商名称
|
|
||||
private String supplierPhone;//供应商联系电话
|
|
||||
private String billType;//票据类型(不含税、增值税、普通税、已含增值税)
|
|
||||
private String markupType;//加价方式(统一加价率、区间加价率、仓库加价率)
|
|
||||
private String priceStrategy;//进价不同时的价格策略(加权平均、分别计价)
|
|
||||
private String isInvoicing;//是否需要开发票(是1,否0)
|
|
||||
private String invoiceCode;//发票号码
|
|
||||
private String tempMarkupRate;//临时加价率
|
|
||||
private String purchaserSid;//采购员sid(单选)
|
|
||||
private String purchaserName;//
|
|
||||
private String storekeeperSid;//库管员sid(单选)
|
|
||||
private String storekeeperName;//
|
|
||||
private String errorAmount;//误差调整金额
|
|
||||
private String freight;//运费
|
|
||||
private String discountAmount;//优惠金额
|
|
||||
private String payableAmount;//应付金额(=采购金额+运费-优惠金额)
|
|
||||
private String useOrgSid;//使用组织sid
|
|
||||
private String createOrgSid;//创建组织sid
|
|
||||
} |
|
@ -1,33 +0,0 @@ |
|||||
package com.yxt.oms.biz.func.purchasereceiptbilldetail; |
|
||||
|
|
||||
import com.yxt.common.core.domain.BaseEntity; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:36 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class PurchaseReceiptBillDetail extends BaseEntity { |
|
||||
|
|
||||
|
|
||||
private String billSid;//单据sid
|
|
||||
private String goodsSid;//商品sid
|
|
||||
private String goodsName;//商品名称
|
|
||||
private String goodsCode;//商品编码(图号)
|
|
||||
private String specification;//规格
|
|
||||
private String goodsModel;//型号
|
|
||||
private double currentCount;//当前库存数量
|
|
||||
private String unit;//计量单位
|
|
||||
private String warehouseSid;//仓库sid
|
|
||||
private String warehouseName;//仓库名称
|
|
||||
private String position;//货位
|
|
||||
private double cost;//单位成本(进货价)
|
|
||||
private double count;//采购数量
|
|
||||
private double taxAmount;//税额(
|
|
||||
private double taxPrice;//含税价
|
|
||||
private double amount;//采购金额
|
|
||||
private double price1;//销售价1
|
|
||||
private double price2;//销售价2
|
|
||||
|
|
||||
} |
|
@ -1,39 +0,0 @@ |
|||||
package com.yxt.oms.biz.func.purchasereceiptbilldetail; |
|
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import com.yxt.common.core.dto.Dto; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
import java.util.Date; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:38 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class PurchaseReceiptBillDetailDto implements Dto { |
|
||||
private String id; |
|
||||
private String sid; |
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|
||||
private Date createTime; |
|
||||
private String remarks; |
|
||||
private String isEnable; |
|
||||
private String billSid;//单据sid
|
|
||||
private String goodsSid;//商品sid
|
|
||||
private String goodsName;//商品名称
|
|
||||
private String goodsCode;//商品编码(图号)
|
|
||||
private String specification;//规格
|
|
||||
private String goodsModel;//型号
|
|
||||
private double currentCount;//当前库存数量
|
|
||||
private String unit;//计量单位
|
|
||||
private String warehouseSid;//仓库sid
|
|
||||
private String warehouseName;//仓库名称
|
|
||||
private String position;//货位
|
|
||||
private double cost;//单位成本(进货价)
|
|
||||
private double count;//采购数量
|
|
||||
private double taxAmount;//税额(
|
|
||||
private double taxPrice;//含税价
|
|
||||
private double amount;//采购金额
|
|
||||
private double price1;//销售价1
|
|
||||
private double price2;//销售价2
|
|
||||
} |
|
@ -1,13 +0,0 @@ |
|||||
package com.yxt.oms.biz.func.purchasereceiptbilldetail; |
|
||||
|
|
||||
import com.yxt.common.core.query.Query; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:37 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class PurchaseReceiptBillDetailQuery implements Query { |
|
||||
private String name; |
|
||||
} |
|
@ -1,44 +0,0 @@ |
|||||
package com.yxt.oms.biz.func.purchasereceiptbilldetail; |
|
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import com.yxt.common.core.vo.Vo; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
import java.util.Date; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:37 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class PurchaseReceiptBillDetailVo implements Vo { |
|
||||
private String id; |
|
||||
private String sid; |
|
||||
private String lockVersion; |
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|
||||
private Date createTime; |
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|
||||
private Date modifyTime; |
|
||||
private String remarks; |
|
||||
private String isEnable; |
|
||||
private String state; |
|
||||
private String isDelete; |
|
||||
private String billSid;//单据sid
|
|
||||
private String goodsSid;//商品sid
|
|
||||
private String goodsName;//商品名称
|
|
||||
private String goodsCode;//商品编码(图号)
|
|
||||
private String specification;//规格
|
|
||||
private String goodsModel;//型号
|
|
||||
private double currentCount;//当前库存数量
|
|
||||
private String unit;//计量单位
|
|
||||
private String warehouseSid;//仓库sid
|
|
||||
private String warehouseName;//仓库名称
|
|
||||
private String position;//货位
|
|
||||
private double cost;//单位成本(进货价)
|
|
||||
private double count;//采购数量
|
|
||||
private double taxAmount;//税额(
|
|
||||
private double taxPrice;//含税价
|
|
||||
private double amount;//采购金额
|
|
||||
private double price1;//销售价1
|
|
||||
private double price2;//销售价2
|
|
||||
} |
|
@ -0,0 +1,29 @@ |
|||||
|
package com.yxt.oms.biz.func.region; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/7/2 14:21 |
||||
|
* @description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class Region extends BaseEntity { |
||||
|
private static final long serialVersionUID = -2834981997098086066L; |
||||
|
@ApiModelProperty(value = "上级sid") |
||||
|
private String pSid; |
||||
|
@ApiModelProperty(value = "级别") |
||||
|
private Integer level; |
||||
|
@ApiModelProperty(value = "名称,区域名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty(value = "行政区划代码") |
||||
|
private String districtCode; |
||||
|
@ApiModelProperty(value = "sid全路径") |
||||
|
private String sidPath; |
||||
|
@ApiModelProperty(value = "排序号") |
||||
|
private Integer sortNo; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.yxt.oms.biz.func.region; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/7/2 23:15 |
||||
|
* @description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class RegionChildTwoVo implements Vo { |
||||
|
private static final long serialVersionUID = 4618662603777612150L; |
||||
|
|
||||
|
@ApiModelProperty(value = "sid") |
||||
|
private String sid; |
||||
|
@ApiModelProperty(value = "上级sid") |
||||
|
private String pSid; |
||||
|
@ApiModelProperty(value = "级别") |
||||
|
private Integer level; |
||||
|
@ApiModelProperty(value = "名称,区域名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty(value = "行政区划代码") |
||||
|
private String districtCode; |
||||
|
@ApiModelProperty(value = "sid全路径") |
||||
|
private String sidPath; |
||||
|
@ApiModelProperty(value = "排序号") |
||||
|
private Integer sortNo; |
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
package com.yxt.oms.biz.func.region; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/7/2 23:14 |
||||
|
* @description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class RegionChildVo implements Vo { |
||||
|
private static final long serialVersionUID = -4741874809037026585L; |
||||
|
|
||||
|
@ApiModelProperty(value = "sid") |
||||
|
private String sid; |
||||
|
@ApiModelProperty(value = "上级sid") |
||||
|
private String pSid; |
||||
|
@ApiModelProperty(value = "级别") |
||||
|
private Integer level; |
||||
|
@ApiModelProperty(value = "名称,区域名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty(value = "行政区划代码") |
||||
|
private String districtCode; |
||||
|
@ApiModelProperty(value = "sid全路径") |
||||
|
private String sidPath; |
||||
|
@ApiModelProperty(value = "排序号") |
||||
|
private Integer sortNo; |
||||
|
|
||||
|
private List<RegionChildTwoVo> regionChildTwoVoList; |
||||
|
} |
@ -0,0 +1,46 @@ |
|||||
|
package com.yxt.oms.biz.func.region; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.Size; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2021/11/11 15:18 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class RegionDto implements Dto { |
||||
|
private static final long serialVersionUID = 1283045363206557586L; |
||||
|
/** |
||||
|
* 名称,区域名称 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "区域名称", required = true) |
||||
|
@NotBlank(message = "区域名称不能为空") |
||||
|
@Size(max = 64, min = 1) |
||||
|
private String name; |
||||
|
/** |
||||
|
* 行政区划代码 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "行政区划代码", required = true) |
||||
|
@NotBlank(message = "行政区划代码不能为空") |
||||
|
private String districtCode; |
||||
|
/** |
||||
|
* 上级sid |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "上级sid", required = true, example = "0") |
||||
|
private String psid; |
||||
|
|
||||
|
/** |
||||
|
* 排序号 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "排序号", required = true) |
||||
|
private Integer sortNo; |
||||
|
@ApiModelProperty(value = "级别") |
||||
|
private int level; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
package com.yxt.oms.biz.func.region; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/7/13 21:41 |
||||
|
* @description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class RegionListVo implements Vo { |
||||
|
private static final long serialVersionUID = 8123582673134551495L; |
||||
|
@ApiModelProperty(value = "sid") |
||||
|
private String sid; |
||||
|
@ApiModelProperty(value = "名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty(value = "区划代码") |
||||
|
private String districtCode; |
||||
|
@ApiModelProperty(value = "排序") |
||||
|
private Integer sortNo; |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package com.yxt.oms.biz.func.region; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/7/2 15:10 |
||||
|
* @description |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface RegionMapper extends BaseMapper<Region> { |
||||
|
|
||||
|
List<RegionChildTwoVo> getProvince(); |
||||
|
|
||||
|
List<RegionChildTwoVo> getCity(String sid); |
||||
|
|
||||
|
List<RegionChildTwoVo> getCounty(String sid); |
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
<?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.yxt.oms.biz.func.region.RegionMapper"> |
||||
|
<resultMap id="regionMapNoChild" type="com.yxt.oms.biz.func.region.RegionChildTwoVo"> |
||||
|
<result column="name" jdbcType="VARCHAR" property="name"/> |
||||
|
<result column="sid" jdbcType="VARCHAR" property="sid"/> |
||||
|
<result column="pSid" jdbcType="VARCHAR" property="pSid"/> |
||||
|
<result column="districtCode" jdbcType="INTEGER" property="districtCode"/> |
||||
|
<result column="sidPath" jdbcType="VARCHAR" property="sidPath"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<select id="getProvince" parameterType="com.yxt.oms.biz.func.region.RegionVo" resultMap="regionMapNoChild"> |
||||
|
SELECT name, sid, pSid, districtCode, sidPath |
||||
|
FROM region |
||||
|
WHERE level = 1 |
||||
|
AND pSid = 0 |
||||
|
</select> |
||||
|
|
||||
|
<select id="getCity" parameterType="com.yxt.oms.biz.func.region.RegionVo" resultMap="regionMapNoChild"> |
||||
|
SELECT name, sid, pSid, districtCode, sidPath |
||||
|
FROM region |
||||
|
WHERE level = 2 |
||||
|
AND pSid = #{sid} |
||||
|
ORDER BY sortNo + 0 |
||||
|
</select> |
||||
|
|
||||
|
<select id="getCounty" parameterType="com.yxt.oms.biz.func.region.RegionVo" resultMap="regionMapNoChild"> |
||||
|
SELECT name, sid, pSid, districtCode, sidPath |
||||
|
FROM region |
||||
|
WHERE level = 3 |
||||
|
AND pSid = #{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,23 @@ |
|||||
|
package com.yxt.oms.biz.func.region; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/7/13 21:55 |
||||
|
* @description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class RegionQuery implements Query { |
||||
|
private static final long serialVersionUID = -3494331991678665867L; |
||||
|
|
||||
|
@ApiModelProperty(value = "行政区划") |
||||
|
private String districtCode; |
||||
|
@ApiModelProperty(value = "名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty(value = "pSid,市级列表此值需要传省级列表sid", example = "0") |
||||
|
private String psid; |
||||
|
} |
@ -0,0 +1,45 @@ |
|||||
|
package com.yxt.oms.biz.func.region; |
||||
|
|
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.oms.feign.portal.region.RegionFeign; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/7/2 15:06 |
||||
|
* @description |
||||
|
*/ |
||||
|
@Service |
||||
|
public class RegionService extends MybatisBaseService<RegionMapper, Region> { |
||||
|
|
||||
|
@Autowired |
||||
|
private RegionFeign regionFeign; |
||||
|
|
||||
|
public List<RegionChildTwoVo> getProvince() { |
||||
|
return regionFeign.getProvince().getData(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取某省下的所有市 |
||||
|
* |
||||
|
* @param sid 省sid |
||||
|
* @return 该省下的所有市的list |
||||
|
*/ |
||||
|
public List<RegionChildTwoVo> getCity(String sid) { |
||||
|
return regionFeign.getCity(sid).getData(); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取某市下的所有区县 |
||||
|
* |
||||
|
* @param sid 市sid |
||||
|
* @return 该市下的所有县区的list |
||||
|
*/ |
||||
|
public List<RegionChildTwoVo> getCounty(String sid) { |
||||
|
return regionFeign.getCounty(sid).getData(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
package com.yxt.oms.biz.func.region; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author liuguohui |
||||
|
* @Date 2021/10/4 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class RegionThirdLevelNameVo implements Vo { |
||||
|
|
||||
|
@ApiModelProperty(value = "省") |
||||
|
private String province; |
||||
|
|
||||
|
@ApiModelProperty(value = "市") |
||||
|
private String city; |
||||
|
|
||||
|
@ApiModelProperty(value = "县") |
||||
|
private String county; |
||||
|
|
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
package com.yxt.oms.biz.func.region; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author dimengzhe |
||||
|
* @date 2021/7/2 14:22 |
||||
|
* @description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class RegionVo implements Vo { |
||||
|
private static final long serialVersionUID = 3351684167946104384L; |
||||
|
|
||||
|
@ApiModelProperty(value = "sid") |
||||
|
private String sid; |
||||
|
@ApiModelProperty(value = "上级sid") |
||||
|
private String pSid; |
||||
|
@ApiModelProperty(value = "级别") |
||||
|
private Integer level; |
||||
|
@ApiModelProperty(value = "名称,区域名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty(value = "行政区划代码") |
||||
|
private String districtCode; |
||||
|
@ApiModelProperty(value = "sid全路径") |
||||
|
private String sidPath; |
||||
|
@ApiModelProperty(value = "排序号") |
||||
|
private Integer sortNo; |
||||
|
|
||||
|
private List<RegionVo> children; |
||||
|
|
||||
|
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue