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());
|
||||
|
||||
Reference in New Issue
Block a user