45 changed files with 1244 additions and 411 deletions
@ -0,0 +1,30 @@ |
|||
import request from '@/utils/request' |
|||
import qs from 'qs' |
|||
// 统一请求路径前缀
|
|||
const base = process.env.VUE_APP_URL |
|||
|
|||
// 文件上传接口
|
|||
export const uploadFile = '/api/file/upload' |
|||
// export const uploadFile = process.env.VUE_APP_BASE_API + '/customer/file/upload'
|
|||
|
|||
|
|||
|
|||
// 上传图片
|
|||
// export function imageUpload(data) {
|
|||
// return request({
|
|||
// url: '/portal/file/upload',
|
|||
// method: 'post',
|
|||
// data,
|
|||
// headers: { 'Content-Type': 'multipart/form-data' }
|
|||
// })
|
|||
// }
|
|||
|
|||
// 移除图片
|
|||
export function deleteFilesOss(data) { |
|||
return request({ |
|||
url: '/base/v1/baseVehicleAppendixs/deleteFilesOss', |
|||
method: 'post', |
|||
data: qs.stringify(data), |
|||
// headers: { 'Content-Type': 'multipart/form-data' }
|
|||
}) |
|||
} |
@ -0,0 +1,12 @@ |
|||
-- 企业/集团信息 |
|||
INSERT INTO `enp_info` (`sid`, `name`, `code`) VALUES |
|||
('1001', '中鸿记', '1001'); |
|||
-- 企业品牌信息 |
|||
INSERT INTO `enp_brand` (`sid`, `name`, `code`, `enpSid`, `enpCode`, `enpName`) VALUES |
|||
('100101', '熟溢香', '100101', '1001', '1001', '中鸿记'), |
|||
('100102', '馍馍卤', '100102', '1001', '1001', '中鸿记'); |
|||
-- 企业门店信息 |
|||
INSERT INTO `enp_store` (`sid`, `name`, `code`, `enpSid`, `enpCode`, `enpName`, `brandSid`, `brandCode`, `brandName`) VALUES |
|||
('10010101', '熟溢香振头店', '10010101', '1001', '1001', '中鸿记','100101', '100101', '熟溢香'), |
|||
('10010102', '馍馍卤振岗店', '10010102', '1001', '1001', '中鸿记','100102', '100102', '馍馍卤'), |
|||
('10010103', '馍馍卤雅清街店', '10010103', '1001', '1001', '中鸿记','100102', '100102', '馍馍卤'); |
@ -1,7 +1,7 @@ |
|||
<?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.supervise.dbcenter.zhj.crawl.biz.enpBrand.EnpBrandMapper"> |
|||
<delete id="deleteEnpBrandBySid"> |
|||
delete from enp_brand where sid = #{sid} |
|||
</delete> |
|||
<select id="selectEnpBrandBEnpySid" resultType="com.yxt.supervise.dbcenter.zhj.crawl.biz.enpBrand.EnpBrand"> |
|||
select * from enp_brand where enpSid = #{sid} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,5 @@ |
|||
<?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.supervise.dbcenter.zhj.crawl.biz.enpInfo.EnpInfoMapper"> |
|||
|
|||
</mapper> |
@ -0,0 +1,112 @@ |
|||
package com.yxt.supervise.dbcenter.zhj.crawl.biz.enpStore; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
|
|||
/** |
|||
* @author shkstart |
|||
* @create 2023-05-11-11:03 |
|||
*/ |
|||
@ApiModel("企业门店信息 传输对象") |
|||
public class EnpStoreDto implements Dto { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
@ApiModelProperty("门店编码") |
|||
private String code; |
|||
@ApiModelProperty("门店名称") |
|||
private String name; |
|||
@ApiModelProperty("所属企业Sid") |
|||
private String enpSid; |
|||
@ApiModelProperty("所属企业编码") |
|||
private String enpCode; |
|||
@ApiModelProperty("所属企业名称") |
|||
private String enpName; |
|||
@ApiModelProperty("所属品牌Sid") |
|||
private String brandSid; |
|||
@ApiModelProperty("所属品牌编码") |
|||
private String brandCode; |
|||
@ApiModelProperty("所属品牌名称") |
|||
private String brandName; |
|||
|
|||
public String getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(String id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public String getSid() { |
|||
return sid; |
|||
} |
|||
|
|||
public void setSid(String sid) { |
|||
this.sid = sid; |
|||
} |
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public void setCode(String code) { |
|||
this.code = code; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name; |
|||
} |
|||
|
|||
public String getEnpSid() { |
|||
return enpSid; |
|||
} |
|||
|
|||
public void setEnpSid(String enpSid) { |
|||
this.enpSid = enpSid; |
|||
} |
|||
|
|||
public String getEnpCode() { |
|||
return enpCode; |
|||
} |
|||
|
|||
public void setEnpCode(String enpCode) { |
|||
this.enpCode = enpCode; |
|||
} |
|||
|
|||
public String getEnpName() { |
|||
return enpName; |
|||
} |
|||
|
|||
public void setEnpName(String enpName) { |
|||
this.enpName = enpName; |
|||
} |
|||
|
|||
public String getBrandSid() { |
|||
return brandSid; |
|||
} |
|||
|
|||
public void setBrandSid(String brandSid) { |
|||
this.brandSid = brandSid; |
|||
} |
|||
|
|||
public String getBrandCode() { |
|||
return brandCode; |
|||
} |
|||
|
|||
public void setBrandCode(String brandCode) { |
|||
this.brandCode = brandCode; |
|||
} |
|||
|
|||
public String getBrandName() { |
|||
return brandName; |
|||
} |
|||
|
|||
public void setBrandName(String brandName) { |
|||
this.brandName = brandName; |
|||
} |
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.yxt.supervise.dbcenter.zhj.crawl.biz.enpStore; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* @author shkstart |
|||
* @create 2023-05-11-11:11 |
|||
*/ |
|||
@Mapper |
|||
public interface EnpStoreMapper extends BaseMapper<EnpStore> { |
|||
EnpStore selectEnpStoreByEnpSid(@Param("sid") String sid); |
|||
|
|||
EnpStore selectEnpStoreByBrandSid(@Param("sid") String sid); |
|||
} |
@ -0,0 +1,11 @@ |
|||
<?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.supervise.dbcenter.zhj.crawl.biz.enpStore.EnpStoreMapper"> |
|||
<select id="selectEnpStoreByEnpSid" resultType="com.yxt.supervise.dbcenter.zhj.crawl.biz.enpStore.EnpStore"> |
|||
select * from enp_store where enpSid = #{sid} |
|||
</select> |
|||
|
|||
<select id="selectEnpStoreByBrandSid" resultType="com.yxt.supervise.dbcenter.zhj.crawl.biz.enpStore.EnpStore"> |
|||
select * from enp_store where brandSid = #{sid} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,41 @@ |
|||
package com.yxt.supervise.dbcenter.zhj.crawl.biz.enpStore; |
|||
|
|||
import com.yxt.common.core.result.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @author shkstart |
|||
* @create 2023-05-11-11:07 |
|||
*/ |
|||
@Api("企业门店信息") |
|||
@RestController |
|||
@RequestMapping("dbCenter/enpStore") |
|||
public class EnpStoreRest { |
|||
|
|||
@Autowired |
|||
private EnpStoreService enpStoreService; |
|||
|
|||
@ApiOperation("新增企业门店信息") |
|||
@RequestMapping("/save") |
|||
public ResultBean save(@RequestBody EnpStoreDto dto){ |
|||
return enpStoreService.save(dto); |
|||
} |
|||
|
|||
@ApiOperation("删除企业门店信息") |
|||
@RequestMapping("/deleteEnpStore/{sid}") |
|||
public ResultBean deleteEnpStore(@PathVariable String sid){ |
|||
return enpStoreService.deleteEnpStore(sid); |
|||
} |
|||
|
|||
@ApiOperation("修改企业门店信息") |
|||
@RequestMapping("/alterEnpStore") |
|||
public ResultBean alterEnpStore(@RequestBody EnpStoreDto dto){ |
|||
return enpStoreService.alterEnpStore(dto); |
|||
} |
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.yxt.supervise.dbcenter.zhj.crawl.biz.enpStore; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* @author shkstart |
|||
* @create 2023-05-11-11:11 |
|||
*/ |
|||
@Service |
|||
public class EnpStoreService extends MybatisBaseService<EnpStoreMapper, EnpStore> { |
|||
|
|||
public ResultBean save(EnpStoreDto dto){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
EnpStore store = new EnpStore(); |
|||
BeanUtil.copyProperties(dto,store); |
|||
int insert = baseMapper.insert(store); |
|||
if (insert == 0){ |
|||
return rb.setMsg("新增失败"); |
|||
} |
|||
return rb.success().setMsg("新增成功"); |
|||
} |
|||
|
|||
public ResultBean deleteEnpStore(String sid){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
int i = deleteBySid(sid); |
|||
return rb.success().setMsg("删除成功"); |
|||
} |
|||
|
|||
public ResultBean alterEnpStore(EnpStoreDto dto){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
EnpStore enpStore = fetchBySid(dto.getSid()); |
|||
BeanUtil.copyProperties(dto,enpStore,"id","sid"); |
|||
int i = baseMapper.updateById(enpStore); |
|||
if (i == 0){ |
|||
return rb.setMsg("修改失败"); |
|||
} |
|||
return rb.success().setMsg("修改成功"); |
|||
} |
|||
} |
@ -0,0 +1,72 @@ |
|||
package com.yxt.supervise.dbcenter.zhj.crawl.biz.materialInfo; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
|
|||
/** |
|||
* @author shkstart |
|||
* @create 2023-05-11-11:26 |
|||
*/ |
|||
@ApiModel("物料信息 传输对象") |
|||
public class MaterialInfoDto implements Dto { |
|||
private String id; |
|||
private String sid; |
|||
|
|||
@ApiModelProperty("物料编码") |
|||
private String code; |
|||
@ApiModelProperty("物料名称") |
|||
private String name; |
|||
@ApiModelProperty("规格单位") |
|||
private String unit; |
|||
@ApiModelProperty("含税单位") |
|||
private String taxPrice; |
|||
|
|||
public String getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(String id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public String getSid() { |
|||
return sid; |
|||
} |
|||
|
|||
public void setSid(String sid) { |
|||
this.sid = sid; |
|||
} |
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public void setCode(String code) { |
|||
this.code = code; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name; |
|||
} |
|||
|
|||
public String getUnit() { |
|||
return unit; |
|||
} |
|||
|
|||
public void setUnit(String unit) { |
|||
this.unit = unit; |
|||
} |
|||
|
|||
public String getTaxPrice() { |
|||
return taxPrice; |
|||
} |
|||
|
|||
public void setTaxPrice(String taxPrice) { |
|||
this.taxPrice = taxPrice; |
|||
} |
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.yxt.supervise.dbcenter.zhj.crawl.biz.materialInfo; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* @author shkstart |
|||
* @create 2023-05-11-11:35 |
|||
*/ |
|||
@Mapper |
|||
public interface MaterialInfoMapper extends BaseMapper<MaterialInfo> { |
|||
} |
@ -0,0 +1,41 @@ |
|||
package com.yxt.supervise.dbcenter.zhj.crawl.biz.materialInfo; |
|||
|
|||
import com.yxt.common.core.result.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @author shkstart |
|||
* @create 2023-05-11-11:28 |
|||
*/ |
|||
@Api("物料信息") |
|||
@RestController |
|||
@RequestMapping("dbCenter/materialInfo") |
|||
public class MaterialInfoRest { |
|||
|
|||
@Autowired |
|||
private MaterialInfoService materialInfoService; |
|||
|
|||
@ApiOperation("新增物料信息") |
|||
@RequestMapping("/save") |
|||
public ResultBean save(@RequestBody MaterialInfoDto dto){ |
|||
return materialInfoService.save(dto); |
|||
} |
|||
|
|||
@ApiOperation("删除物料信息") |
|||
@RequestMapping("/deleteMaterialInfo/{sid}") |
|||
public ResultBean deleteMaterialInfo(@PathVariable String sid){ |
|||
return materialInfoService.deleteMaterialInfo(sid); |
|||
} |
|||
|
|||
@ApiOperation("修改物料信息") |
|||
@RequestMapping("/alterMaterialInfo") |
|||
public ResultBean alterMaterialInfo(@RequestBody MaterialInfoDto dto){ |
|||
return materialInfoService.alterMaterialInfo(dto); |
|||
} |
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.yxt.supervise.dbcenter.zhj.crawl.biz.materialInfo; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* @author shkstart |
|||
* @create 2023-05-11-11:34 |
|||
*/ |
|||
@Service |
|||
public class MaterialInfoService extends MybatisBaseService<MaterialInfoMapper, MaterialInfo> { |
|||
|
|||
public ResultBean save(MaterialInfoDto dto){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
MaterialInfo info = new MaterialInfo(); |
|||
BeanUtil.copyProperties(dto,info); |
|||
int insert = baseMapper.insert(info); |
|||
if (insert == 0){ |
|||
return rb.setMsg("新增失败"); |
|||
} |
|||
return rb.success().setMsg("新增成功"); |
|||
} |
|||
|
|||
public ResultBean deleteMaterialInfo(String sid){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
int i = deleteBySid(sid); |
|||
return rb.success().setMsg("删除成功"); |
|||
} |
|||
|
|||
public ResultBean alterMaterialInfo(MaterialInfoDto dto){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
MaterialInfo materialInfo = fetchBySid(dto.getSid()); |
|||
BeanUtil.copyProperties(dto,materialInfo,"id","sid"); |
|||
int i = baseMapper.updateById(materialInfo); |
|||
if (i == 0){ |
|||
return rb.setMsg("修改失败"); |
|||
} |
|||
return rb.success().setMsg("修改成功"); |
|||
} |
|||
} |
Loading…
Reference in new issue