fix(oms):出入库预约单单号
This commit is contained in:
+2
@@ -67,4 +67,6 @@ public interface ReservationStockInOrderMapper extends BaseMapper<ReservationSto
|
|||||||
String getNcUrl(@Param("interfaceType") String interfaceType,@Param("organizationName") String organizationName,@Param("organizationId") Long organizationId);
|
String getNcUrl(@Param("interfaceType") String interfaceType,@Param("organizationName") String organizationName,@Param("organizationId") Long organizationId);
|
||||||
|
|
||||||
String getCustomerOrgCode(@Param("id") Long id);
|
String getCustomerOrgCode(@Param("id") Long id);
|
||||||
|
|
||||||
|
int countByOrderNumberPrefix(@Param("prefix") String prefix);
|
||||||
}
|
}
|
||||||
+4
@@ -2286,4 +2286,8 @@ public class ReservationStockInOrderApplicationService {
|
|||||||
return filteredList;
|
return filteredList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String generateReserveOrderNumber() {
|
||||||
|
return stockInOrderDomainService.generateReserveOrderNumber();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+12
@@ -1225,4 +1225,16 @@ public class ReservationStockInOrderDomainService {
|
|||||||
return prefix + seq;
|
return prefix + seq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成入库预约单号:
|
||||||
|
*/
|
||||||
|
public String generateReserveOrderNumber() {
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyMMdd");
|
||||||
|
String datePart = sdf.format(new Date());
|
||||||
|
String prefix = "R" + datePart;
|
||||||
|
int todayCount = reservationStockInOrderMapper.countByOrderNumberPrefix(prefix);
|
||||||
|
String seq = String.format("%03d", todayCount + 1);
|
||||||
|
return prefix + seq;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+2
@@ -37,4 +37,6 @@ public interface ReservationStockOutOrderMapper extends BaseMapper<ReservationSt
|
|||||||
List<ReservationOutMaterialDetailPO> queryOutStockNoticePrintDetail(ReservationStockOutOrderDO stockOutOrderDO);
|
List<ReservationOutMaterialDetailPO> queryOutStockNoticePrintDetail(ReservationStockOutOrderDO stockOutOrderDO);
|
||||||
|
|
||||||
Long queryShipperId(@Param("userMemberCode") String userMemberCode,@Param("organizationId") Long organizationId);
|
Long queryShipperId(@Param("userMemberCode") String userMemberCode,@Param("organizationId") Long organizationId);
|
||||||
|
|
||||||
|
int countByOrderNumberPrefix(@Param("prefix") String prefix);
|
||||||
}
|
}
|
||||||
+4
@@ -1743,4 +1743,8 @@ public class ReservationStockOutOrderApplicationService {
|
|||||||
return filteredList;
|
return filteredList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String generateReserveOrderNumber() {
|
||||||
|
return stockOutOrderDomainService.generateReserveOrderNumber();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+15
@@ -48,6 +48,7 @@ import com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialBaseInfo
|
|||||||
import com.mhd.oms.domain.reservationStockInOrder.repository.todo.ReservationStockInOrderDO;
|
import com.mhd.oms.domain.reservationStockInOrder.repository.todo.ReservationStockInOrderDO;
|
||||||
import com.mhd.oms.domain.reservationStockOutOrder.entity.ReservationStockOutOrder;
|
import com.mhd.oms.domain.reservationStockOutOrder.entity.ReservationStockOutOrder;
|
||||||
import com.mhd.oms.domain.reservationStockOutOrder.repository.facade.IReservationStockOutOrderService;
|
import com.mhd.oms.domain.reservationStockOutOrder.repository.facade.IReservationStockOutOrderService;
|
||||||
|
import com.mhd.oms.domain.reservationStockOutOrder.repository.mapper.ReservationStockOutOrderMapper;
|
||||||
import com.mhd.oms.domain.reservationStockOutOrder.repository.po.ReservationStockOutOrderPO;
|
import com.mhd.oms.domain.reservationStockOutOrder.repository.po.ReservationStockOutOrderPO;
|
||||||
import com.mhd.oms.domain.reservationStockOutOrder.repository.todo.ReservationStockOutOrderDO;
|
import com.mhd.oms.domain.reservationStockOutOrder.repository.todo.ReservationStockOutOrderDO;
|
||||||
import com.mhd.system.api.SystemServiceFeign;
|
import com.mhd.system.api.SystemServiceFeign;
|
||||||
@@ -109,6 +110,8 @@ public class ReservationStockOutOrderDomainService {
|
|||||||
private IBusinessDeliveryDetailsLinkService businessDeliveryDetailsLinkService;
|
private IBusinessDeliveryDetailsLinkService businessDeliveryDetailsLinkService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private BusinessDeliveryDetailsLinkMapper businessDeliveryDetailsLinkMapper;
|
private BusinessDeliveryDetailsLinkMapper businessDeliveryDetailsLinkMapper;
|
||||||
|
@Autowired
|
||||||
|
private ReservationStockOutOrderMapper reservationStockOutOrderMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询出库单列表
|
* 分页查询出库单列表
|
||||||
@@ -1064,4 +1067,16 @@ public class ReservationStockOutOrderDomainService {
|
|||||||
return prefix + seq;
|
return prefix + seq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成出库预约单号:
|
||||||
|
*/
|
||||||
|
public String generateReserveOrderNumber() {
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyMMdd");
|
||||||
|
String datePart = sdf.format(new Date());
|
||||||
|
String prefix = "C" + datePart;
|
||||||
|
int todayCount = reservationStockOutOrderMapper.countByOrderNumberPrefix(prefix);
|
||||||
|
String seq = String.format("%03d", todayCount + 1);
|
||||||
|
return prefix + seq;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+6
@@ -246,4 +246,10 @@ public class ReservationStockOutOrderApi extends BaseController {
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("生成出库预约单号")
|
||||||
|
@GetMapping("/generateOrderNumber")
|
||||||
|
public AjaxResult generateOrderNumber() {
|
||||||
|
return AjaxResult.success(stockOutOrderApplicationService.generateReserveOrderNumber());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+6
@@ -281,4 +281,10 @@ public class ReservationStockInOrderApi extends BaseController {
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("生成入库预约单号")
|
||||||
|
@GetMapping("/generateOrderNumber")
|
||||||
|
public AjaxResult generateOrderNumber() {
|
||||||
|
return AjaxResult.success(stockInOrderApplicationService.generateReserveOrderNumber());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+6
@@ -649,4 +649,10 @@
|
|||||||
<select id="getCustomerOrgCode" resultType="java.lang.String">
|
<select id="getCustomerOrgCode" resultType="java.lang.String">
|
||||||
select ORG_CODE from "NGWL_TEST_USER".USER_SHIPPER where 1 = 1 and DEL_FLAG = 1 and USER_ID = #{id}
|
select ORG_CODE from "NGWL_TEST_USER".USER_SHIPPER where 1 = 1 and DEL_FLAG = 1 and USER_ID = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="countByOrderNumberPrefix" resultType="java.lang.Integer" parameterType="java.lang.String">
|
||||||
|
SELECT COUNT(1)
|
||||||
|
FROM reservation_stock_in_order
|
||||||
|
WHERE in_order_number LIKE concat(#{prefix}, '%')
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
+5
@@ -470,4 +470,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
select max(user_id) as user_id from NGWL_TEST_USER."USER" where ORGANIZATION_ID = #{organizationId} and USER_MEMBER_CODE = #{userMemberCode} and DEL_FLAG = 1
|
select max(user_id) as user_id from NGWL_TEST_USER."USER" where ORGANIZATION_ID = #{organizationId} and USER_MEMBER_CODE = #{userMemberCode} and DEL_FLAG = 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="countByOrderNumberPrefix" resultType="java.lang.Integer" parameterType="java.lang.String">
|
||||||
|
SELECT COUNT(1)
|
||||||
|
FROM reservation_stock_out_order
|
||||||
|
WHERE out_order_number LIKE concat(#{prefix}, '%')
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user