rev:向飞书推送图片
This commit is contained in:
@@ -53,7 +53,7 @@ public class SalesController {
|
||||
@Log("查询业务员")
|
||||
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody String[] ids) {
|
||||
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||
salesService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public interface SalesService {
|
||||
*
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(String[] ids);
|
||||
void deleteAll(Long[] ids);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.math.BigDecimal;
|
||||
@Data
|
||||
public class SalesDto implements Serializable {
|
||||
|
||||
private Long id;
|
||||
private Long sales_id;
|
||||
|
||||
private String sales_code;
|
||||
|
||||
|
||||
@@ -57,9 +57,9 @@ public class SalesServiceImpl implements SalesService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public SalesDto findById(Long id) {
|
||||
public SalesDto findById(Long sales_id) {
|
||||
WQLObject wo = WQLObject.getWQLObject("md_cs_areasalesinfo");
|
||||
JSONObject json = wo.query("id =" + id + "").uniqueResult(0);
|
||||
JSONObject json = wo.query("sales_id =" + sales_id + "").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(json)) {
|
||||
return null;
|
||||
}
|
||||
@@ -87,7 +87,7 @@ public class SalesServiceImpl implements SalesService {
|
||||
throw new BadRequestException("存在相同的编码");
|
||||
}
|
||||
|
||||
dto.setId(IdUtil.getSnowflake(1, 1).nextId());
|
||||
dto.setSales_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("md_cs_areasalesinfo");
|
||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||
@@ -97,14 +97,14 @@ public class SalesServiceImpl implements SalesService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(SalesDto dto) {
|
||||
SalesDto entity = this.findById(dto.getId());
|
||||
SalesDto entity = this.findById(dto.getSales_id());
|
||||
if (entity == null) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
}
|
||||
|
||||
String sales_code = dto.getSales_code();
|
||||
SalesDto unitDto = this.findByCode(sales_code);
|
||||
if (unitDto != null && !unitDto.getId().equals(dto.getId())) {
|
||||
if (unitDto != null && !unitDto.getSales_id().equals(dto.getSales_id())) {
|
||||
throw new BadRequestException("存在相同的编码");
|
||||
}
|
||||
|
||||
@@ -115,14 +115,14 @@ public class SalesServiceImpl implements SalesService {
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteAll(String[] ids) {
|
||||
public void deleteAll(Long[] ids) {
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("md_cs_areasalesinfo");
|
||||
for (String id : ids) {
|
||||
wo.delete("id = '" + id + "'");
|
||||
for (Long sales_id : ids) {
|
||||
wo.delete("sales_id = '" + sales_id + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
box_type = "2";
|
||||
}
|
||||
|
||||
if (Double.parseDouble(in_download_box_high) > box_high) {
|
||||
if (Double.parseDouble(in_download_box_high) >= box_high) {
|
||||
box_type = "1";
|
||||
}
|
||||
|
||||
@@ -688,7 +688,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
if (is_labeling.equals("0")) {
|
||||
//更新实际重量
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("real_weight", weight);
|
||||
map.put("real_weight", NumberUtil.round(weight, 1));
|
||||
WQLObject.getWQLObject("pdm_bi_subpackagerelation").update(map, "package_box_sn = '" + vehicle_code + "'");
|
||||
data.put("is_auto_table", "0");
|
||||
result.put("data", data);
|
||||
|
||||
@@ -705,7 +705,6 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
||||
|
||||
@Override
|
||||
public JSONObject sendSalesIvtMsg(String file_name) {
|
||||
log.info("sendSalesIvtMsg接口输入参数为:-------------------" + file_name.toString());
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
if (StrUtil.equals("0", is_connect_mes)) {
|
||||
@@ -717,11 +716,12 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
||||
|
||||
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("FEISHU_URL").getValue();
|
||||
String api = "/FeiShuNoticesWebApi/UploadImage";
|
||||
url = url + api;
|
||||
url = url + api +"?fileName="+file_name;
|
||||
|
||||
log.info("sendSalesIvtMsg接口输入参数为:-------------------" + url.toString());
|
||||
|
||||
try {
|
||||
String resultMsg = HttpRequest.get(url)
|
||||
.body("fileName",file_name)
|
||||
String resultMsg = HttpRequest.post(url)
|
||||
.execute().body();
|
||||
result = JSONObject.parseObject(resultMsg);
|
||||
log.info("sendSalesIvtMsg接口输出参数为:-------------------" + result.toString());
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in areaList"
|
||||
v-for="item in dict.IVT_REIGION"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
@@ -53,7 +53,7 @@
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column prop="sales_code" label="编码" />
|
||||
<el-table-column prop="sales_name" label="名称" />
|
||||
<el-table-column prop="area" label="区域" width="135" />
|
||||
<el-table-column prop="area" label="区域" width="135" :formatter="formateArea"/>
|
||||
<el-table-column prop="is_active" label="启用 ">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
@@ -88,9 +88,9 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
const defaultForm = { id: null, sales_code: null, sales_name: null, area: null, is_active: null }
|
||||
const defaultForm = { sales_id: null, sales_code: null, sales_name: null, area: null, is_active: null }
|
||||
export default {
|
||||
dicts: ['is_used'],
|
||||
dicts: ['is_used', 'IVT_REIGION'],
|
||||
name: 'Sales',
|
||||
// eslint-disable-next-line vue/no-unused-components
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
@@ -102,7 +102,7 @@ export default {
|
||||
add: true,
|
||||
reset: true
|
||||
},
|
||||
idField: 'id',
|
||||
idField: 'sales_id',
|
||||
sort: 'sales_code,desc',
|
||||
crudMethod: { ...crudSales }})
|
||||
},
|
||||
@@ -110,24 +110,6 @@ export default {
|
||||
return {
|
||||
permission: {
|
||||
},
|
||||
areaList: [
|
||||
{
|
||||
'value': '华东区域',
|
||||
'text': '华东区域'
|
||||
},
|
||||
{
|
||||
'value': '华南区域',
|
||||
'text': '华南区域'
|
||||
},
|
||||
{
|
||||
'value': '华中区域',
|
||||
'text': '华中区域'
|
||||
},
|
||||
{
|
||||
'value': '中心区域',
|
||||
'text': '中心区域'
|
||||
}
|
||||
],
|
||||
rules: {
|
||||
sales_code: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
@@ -175,6 +157,9 @@ export default {
|
||||
},
|
||||
handleChange(value) {
|
||||
console.log(value)
|
||||
},
|
||||
formateArea(row) {
|
||||
return this.dict.label.IVT_REIGION[row.area]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user