|
@@ -761,7 +761,7 @@ public class PurchaseInquiryServiceImpl implements PurchaseInquiryService {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public List<InquiryMessage> getMessageList() {
|
|
public List<InquiryMessage> getMessageList() {
|
|
|
- String sql = "select * from (select p.id_id id,p.id_prid productId,p.id_date as \"date\" from purc$puinquiryitems p left join purc$puinquiry i on i.in_id = p.id_inid where i.in_isopen = 1 and i.in_enuu <> "
|
|
|
|
|
|
|
+ String sql = "select * from (select p.id_id id, p.id_prid productId, p.id_date as \"date\", i.in_enuu enuu from purc$puinquiryitems p left join purc$puinquiry i on i.in_id = p.id_inid where i.in_isopen = 1 and i.in_enuu <> "
|
|
|
+ SystemSession.getUser().getEnterprise().getUu()
|
|
+ SystemSession.getUser().getEnterprise().getUu()
|
|
|
+ "and i.in_enddate > trunc(sysdate) and nvl(p.id_overdue, 0) <> 1 order by id_id desc) where rownum <= 7";
|
|
+ "and i.in_enddate > trunc(sysdate) and nvl(p.id_overdue, 0) <> 1 order by id_id desc) where rownum <= 7";
|
|
|
List<PurcInquiryItem> items = commonDao.query(sql, PurcInquiryItem.class);
|
|
List<PurcInquiryItem> items = commonDao.query(sql, PurcInquiryItem.class);
|
|
@@ -769,6 +769,10 @@ public class PurchaseInquiryServiceImpl implements PurchaseInquiryService {
|
|
|
if (!CollectionUtils.isEmpty(items)) {
|
|
if (!CollectionUtils.isEmpty(items)) {
|
|
|
for (PurcInquiryItem item : items) {
|
|
for (PurcInquiryItem item : items) {
|
|
|
InquiryMessage message = new InquiryMessage();
|
|
InquiryMessage message = new InquiryMessage();
|
|
|
|
|
+ if (null != item.getEnuu()) {
|
|
|
|
|
+ Enterprise enterprise = enterpriseDao.findEnterpriseByUu(item.getEnuu());
|
|
|
|
|
+ message.setEnName(enterprise.getEnName());
|
|
|
|
|
+ }
|
|
|
Product prod = productDao.findOne(item.getProductId());
|
|
Product prod = productDao.findOne(item.getProductId());
|
|
|
message.setPordName(prod.getTitle());
|
|
message.setPordName(prod.getTitle());
|
|
|
item = purcInquiryItemDao.findOne(item.getId());
|
|
item = purcInquiryItemDao.findOne(item.getId());
|
|
@@ -788,7 +792,7 @@ public class PurchaseInquiryServiceImpl implements PurchaseInquiryService {
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
private boolean isToday(Date date) {
|
|
private boolean isToday(Date date) {
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");
|
|
|
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
String inDate = sdf.format(date);
|
|
String inDate = sdf.format(date);
|
|
|
String nowDate = sdf.format(new Date());
|
|
String nowDate = sdf.format(new Date());
|
|
|
return inDate.equals(nowDate);
|
|
return inDate.equals(nowDate);
|